Refactor queries for hardware and software single stepping support in GDBServer.
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
7d00775e
AT
12015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2
3 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
4 New function.
5 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
7 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
8 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
9 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
10 Initialize.
11 * linux-crisv32-low.c (cris_supports_hardware_single_step):
12 New function.
13 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
14 * linux-low.c (can_hardware_single_step): Use
15 supports_hardware_single_step.
16 (can_software_single_step): New function.
17 (start_step_over): Call can_software_single_step.
18 (linux_supports_hardware_single_step): New function.
19 (struct target_ops) <supports_software_single_step>: Initialize.
20 * linux-low.h (struct linux_target_ops)
21 <supports_hardware_single_step>: Initialize.
22 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
23 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
24 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
25 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
26 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
27 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
28 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
29 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
30 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
31 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
32 Initialize.
33 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
34 (struct linux_target_ops) <tile_supports_hardware_single_step>:
35 Initialize.
36 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
37 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
38 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
39 New function.
40 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
41 * target.h (struct target_ops): <supports_software_single_step>:
42 New field.
43 (target_supports_software_single_step): New macro.
44
2d97cd35
AT
452015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
46
47 * linux-low.c (linux_wait_1): Fix pc advance condition.
48 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
49 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
50
769ef81f
AT
512015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
52
53 * linux-arm-low.c (arm_is_thumb_mode): New function.
54 (arm_breakpoint_at): Use arm_is_thumb_mode.
55 (arm_breakpoint_kind_from_current_state): New function.
56 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
57 Initialize.
58 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
59 (linux_breakpoint_kind_from_current_state): New function.
60 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
61 * linux-low.h (struct linux_target_ops)
62 <breakpoint_kind_from_current_state>: New field.
63 * target.h (struct target_ops): Likewise.
64 (target_breakpoint_kind_from_current_state): New macro.
65
1bebeeca
PA
662015-11-30 Pedro Alves <palves@redhat.com>
67
68 * linux-low.c (linux_resume): Wake up the event loop before
69 returning.
70
a67a9fae
PA
712015-11-30 Pedro Alves <palves@redhat.com>
72
73 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
74 check.
75 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
76 to -1.
77 * target.c (struct thread_search): New structure.
78 (thread_search_callback): New function.
79 (prev_general_thread): New global.
80 (prepare_to_access_memory, done_accessing_memory): New functions.
81 * target.h (prepare_to_access_memory, done_accessing_memory):
82 Replace macros with function declarations.
83
f2faf941
PA
842015-11-30 Pedro Alves <palves@redhat.com>
85
86 PR 14618
87 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
88 report TARGET_WAITKIND_NO_RESUMED.
89 * remote-utils.c (prepare_resume_reply): Handle
90 TARGET_WAITKIND_NO_RESUMED.
91 * server.c (report_no_resumed): New global.
92 (handle_query) <qSupported>: Handle "no-resumed+". Report
93 "no-resumed+" support.
94 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
95 return error if the client doesn't support no-resumed events.
96 (push_stop_notification): New function.
97 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
98 events if the client supports them.
99
a681f9c9
PA
1002015-11-30 Pedro Alves <palves@redhat.com>
101
102 * linux-low.c (thread_still_has_status_pending_p): Don't check
103 vCont;t here.
104 (lwp_resumed): New function.
105 (status_pending_p_callback): Return early if the LWP is not
106 supposed to be resumed.
107
65706a29
PA
1082015-11-30 Pedro Alves <palves@redhat.com>
109
110 * linux-low.c (handle_extended_wait): Assert that the LWP's
111 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
112 thread create events, leave the new child's status pending.
113 (linux_low_filter_event): If GDB wants to hear about thread exit
114 events, leave the LWP marked dead and don't delete it.
115 (linux_wait_for_event_filtered): Don't check for thread exit.
116 (filter_exit_event): New function.
117 (linux_wait_1): Use it, when returning an exit event.
118 (linux_resume_one_lwp_throw): Assert that the LWP's
119 waitstatus is TARGET_WAITKIND_IGNORE.
120 * remote-utils.c (prepare_resume_reply): Handle
121 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
122 * server.c (report_thread_events): New global.
123 (handle_general_set): Handle QThreadEvents.
124 (handle_query) <qSupported>: Handle and report QThreadEvents+;
125 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
126 TARGET_WAITKIND_THREAD_EXITED.
127 * server.h (report_thread_events): Declare.
128
56cf4bed
PA
1292015-11-30 Pedro Alves <palves@redhat.com>
130
131 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
132 the thread's last_resume_kind was resume_stop.
133
500c1d85
PA
1342015-11-30 Pedro Alves <palves@redhat.com>
135
136 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
137 before returning.
138
de979965
PA
1392015-11-30 Pedro Alves <palves@redhat.com>
140
141 * server.c (handle_v_requests): Handle vCtrlC.
142
34c65914
PA
1432015-11-30 Pedro Alves <palves@redhat.com>
144
145 * gdbthread.h (find_any_thread_of_pid): Declare.
146 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
147 functions.
148 * server.c (handle_query): If current_thread is NULL, look for
149 another thread of the selected process.
150
79efa585 1512015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 152 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
153
154 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
155 * server.c (handle_qxfer_threads_worker): Refactor to include thread
156 name in reply.
157 * target.h (struct target_ops) <thread_name>: New field.
158 (target_thread_name): New macro.
159
80d82c19
JB
1602015-11-23 Joel Brobecker <brobecker@adacore.com>
161
162 * regcache.h (regcache_invalidate_pid): Add declaration.
163 * regcache.c (regcache_invalidate_pid): New function, extracted
164 from regcache_invalidate.
165 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
166 Add trivial documentation comment.
167 * lynx-low.c: Use regcache_invalidate_pid instead of
168 regcache_invalidate.
169
64da5dd5
JB
1702015-11-23 Joel Brobecker <brobecker@adacore.com>
171
172 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
173 and Elf64_auxv_t if the target is Android.
174
37ce4055
DE
1752015-11-22 Doug Evans <xdje42@gmail.com>
176
177 * target.h: #include <sys/types.h>.
178
06e03fff
PA
1792015-11-19 Pedro Alves <palves@redhat.com>
180
181 * linux-low.c (linux_process_qsupported): Change prototype.
182 Adjust.
183 * linux-low.h (struct linux_target_ops) <process_qsupported>:
184 Change prototype.
185 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
186 and adjust to loop over all features.
187 * server.c (handle_query) <qSupported>: Adjust to call
188 target_process_qsupported once, passing it a vector of unprocessed
189 features.
190 * target.h (struct target_ops) <process_qsupported>: Change
191 prototype.
192 (target_process_qsupported): Adjust.
193
9a084706
PA
1942015-11-19 Pedro Alves <palves@redhat.com>
195
196 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
197 mode.
198 * configure: Regenerate.
199
dad44a1f
PA
2002015-11-19 Pedro Alves <palves@redhat.com>
201
202 * configure: Regenerate.
203
231c0592
YQ
2042015-11-19 Yao Qi <yao.qi@linaro.org>
205
206 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
207 type to uint32_t.
208
6c1c9a8b
YQ
2092015-11-19 Yao Qi <yao.qi@linaro.org>
210
211 * linux-aarch64-low.c (enum aarch64_operand_type): New.
212 (struct aarch64_operand): Move enum out.
213
9caa3311
YQ
2142015-11-19 Yao Qi <yao.qi@linaro.org>
215
216 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
217 struct user_fpsimd_state *.
218 (aarch64_store_fpregset): Likewise.
219
6a69a054
YQ
2202015-11-19 Yao Qi <yao.qi@linaro.org>
221
222 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
223 struct user_pt_regs *.
224 (aarch64_store_gregset): Likewise.
225
1798301e
PA
2262015-11-18 Pedro Alves <palves@redhat.com>
227
228 * Makefile.in (all_object_files): Add $IPA_OBJS.
229
ce7715e2
PA
2302015-11-17 Pedro Alves <palves@redhat.com>
231
232 * win32-low.c (win32_resume): Use gdb_signal_from_host,
233 GDB_SIGNAL_0 and gdb_signal_to_string.
234
c0879059
PA
2352015-11-17 Pedro Alves <palves@redhat.com>
236
237 * win32-low.c (handle_output_debug_string): Remove parameter.
238 (win32_kill): Remove our_status local and adjust call to
239 handle_output_debug_string.
240 (get_child_debug_event): Adjust call to
241 handle_output_debug_string.
242
1996e237
SM
2432015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
244
245 * linux-mips-low.c (mips_fill_gregset): Add cast.
246 (mips_store_gregset): Likewise.
247 (mips_fill_fpregset): Likewise.
248 (mips_store_fpregset): Likewise.
249
cbec665b
SM
2502015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
251
252 * linux-mips-low.c (mips_add_watchpoint): Rename private to
253 priv.
254
eb3e3c67
SM
2552015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
256
257 * linux-mips-low.c (mips_linux_new_thread): Change type of
258 watch_type to enum target_hw_bp_type.
259
171de4b8
SM
2602015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
261
262 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
263 Change return type to arm_hwbp_type.
264
04248ead
SM
2652015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
266
267 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
268 (arm_store_gregset): Likewise.
269 * linux-arm-low.c (arm_get_hwcap): Likewise.
270 (arm_read_description): Likewise.
271
04b3479c
SM
2722015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
273
274 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
275
2bc84e8a
SM
2762015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
277
278 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
279 (ppc_fill_vsxregset): Likewise.
280 (ppc_store_vsxregset): Likewise.
281 (ppc_fill_vrregset): Likewise.
282 (ppc_store_vrregset): Likewise.
283 (ppc_fill_evrregset): Likewise.
284 (ppc_store_evrregset): Likewise.
285
e6c5bb05
SM
2862015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
287
288 * linux-ppc-low.c (ppc_usrregs_info): Remove
289 forward-declaration.
290 (ppc_arch_setup): Move lower in file.
291
7ea45d72
SM
2922015-10-30 Simon Marchi <simon.marchi@ericsson.com>
293
294 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
295 (ps_pdwrite): Likewise.
296
69291610
HW
2972015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
298
299 * linux-arm-low.c (arm_new_thread): Move pointer dereference
300 to after assert checks.
301
b42945fd
SM
3022015-10-29 Simon Marchi <simon.marchi@ericsson.com>
303
304 * proc-service.c (ps_pdread): Add/adjust casts.
305 (ps_pdwrite): Add/adjust casts.
306
d6f85c84
SM
3072015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
308
309 * server.c (handle_search_memory_1): Cast return value of
310 memmem.
311
f98cd059
SM
3122015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
313
314 * server.c (write_qxfer_response): Change type of data to
315 gdb_byte *.
316
d2412fa5
PA
3172015-10-29 Pedro Alves <palves@redhat.com>
318
319 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
320
c17414a2
PA
3212015-10-29 Pedro Alves <palves@redhat.com>
322
323 * tracepoint.c (clear_installed_tracepoints): Add casts.
324
e053fbc4
PA
3252015-10-29 Pedro Alves <palves@redhat.com>
326
327 * server.c (handle_v_cont, process_serial_event): Add enum
328 gdb_signal casts to signal parsing code.
329
add67df8
PA
3302015-10-29 Pedro Alves <palves@redhat.com>
331
332 * linux-low.h (NULL_REGSET): Define.
333 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
334 * linux-arm-low.c (arm_regsets): Likewise.
335 * linux-crisv32-low.c (cris_regsets): Likewise.
336 * linux-m68k-low.c (m68k_regsets): Likewise.
337 * linux-mips-low.c (mips_regsets): Likewise.
338 * linux-nios2-low.c (nios2_regsets): Likewise.
339 * linux-ppc-low.c (ppc_regsets): Likewise.
340 * linux-s390-low.c (s390_regsets): Likewise.
341 * linux-sh-low.c (sh_regsets): Likewise.
342 * linux-sparc-low.c (sparc_regsets): Likewise.
343 * linux-tic6x-low.c (tic6x_regsets): Likewise.
344 * linux-tile-low.c (tile_regsets): Likewise.
345 * linux-x86-low.c (x86_regsets): Likewise.
346 * linux-xtensa-low.c (xtensa_regsets): Likewise.
347
50bc912a
PA
3482015-10-29 Pedro Alves <palves@redhat.com>
349
350 * linux-low.h (NULL_REGSET): Define.
351 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
352 * linux-arm-low.c (arm_regsets): Likewise.
353 * linux-crisv32-low.c (cris_regsets): Likewise.
354 * linux-m68k-low.c (m68k_regsets): Likewise.
355 * linux-mips-low.c (mips_regsets): Likewise.
356 * linux-nios2-low.c (nios2_regsets): Likewise.
357 * linux-ppc-low.c (ppc_regsets): Likewise.
358 * linux-s390-low.c (s390_regsets): Likewise.
359 * linux-sh-low.c (sh_regsets): Likewise.
360 * linux-sparc-low.c (sparc_regsets): Likewise.
361 * linux-tic6x-low.c (tic6x_regsets): Likewise.
362 * linux-tile-low.c (tile_regsets): Likewise.
363 * linux-x86-low.c (x86_regsets): Likewise.
364 * linux-xtensa-low.c (xtensa_regsets): Likewise.
365
682b2546
DE
3662015-10-26 Doug Evans <dje@google.com>
367
368 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
369
963843d4
DE
3702015-10-26 Doug Evans <dje@google.com>
371
372 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
373
d41401ac
DE
3742015-10-26 Doug Evans <dje@google.com>
375
376 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
377 for debug_printf.
378 (attach_thread, find_new_threads_callback): Ditto.
379
3db28855
AT
3802015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
381
382 * mem-break.h (set_breakpoint_data): Remove.
383
fb78e89c
AT
3842015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
385
386 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
387 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
388 (initialize_low): Remove set_breakpoint_data call.
389 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
390 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
391 (initialize_low): Remove set_breakpoint_data call.
392 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
393 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
394 (initialize_low): Remove set_breakpoint_data call.
395
2e6ee069
AT
3962015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
397
398 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
399 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
400 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
401 * target.h (target_breakpoint_kind_from_pc): New macro.
402
1652a986
AT
4032015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
404
405 * linux-low.c (default_breakpoint_kind_from_pc): New function.
406 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
407 the default breakpoint kind.
408
abeead09
AT
4092015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
410
411 * linux-arm-low.c (arm_supports_z_point_type): Add software
412 breakpoint support.
413
b0b4b501
AT
4142015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
415
416 * linux-arm-low.c: Refactor breakpoint definitions.
417 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
418 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
419
8689682c
AT
4202015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
421
422 * Makefile.in: Add arm.c/o.
423 * configure.srv: Likewise.
424 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
425 (arm_breakpoint_kind_from_pc): New function.
426 (arm_sw_breakpoint_from_kind): Return proper kind.
427 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
428
27165294
AT
4292015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
430
431 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
432 removal.
433 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
434 (struct raw_breakpoint) <size>: Remove.
435 (struct raw_breakpoint) <kind>: Add.
436 (bp_size): New function.
437 (bp_opcode): Likewise.
438 (find_raw_breakpoint_at): Adjust for kind.
439 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
440 (remove_memory_breakpoint): Adjust for kind call bp_size.
441 (set_raw_breakpoint_at): Adjust for kind.
442 (set_breakpoint): Likewise.
443 (set_breakpoint_at): Call breakpoint_kind_from_pc.
444 (delete_raw_breakpoint): Adjust for kind.
445 (delete_breakpoint): Likewise.
446 (find_gdb_breakpoint): Likewise.
447 (set_gdb_breakpoint_1): Likewise.
448 (set_gdb_breakpoint): Likewise.
449 (delete_gdb_breakpoint_1): Likewise.
450 (delete_gdb_breakpoint): Likewise.
451 (uninsert_raw_breakpoint): Likewise.
452 (reinsert_raw_breakpoint): Likewise.
453 (set_breakpoint_data): Remove.
454 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
455 (check_mem_read): Adjust for kind call bp_size.
456 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
457 (clone_one_breakpoint): Adjust for kind.
458 * mem-break.h (set_gdb_breakpoint): Likewise.
459 (delete_gdb_breakpoint): Likewise.
460 * server.c (process_serial_event): Likewise.
461
dd373349
AT
4622015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
463
464 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
465 (struct linux_target_ops) <breakpoint>: Remove.
466 (struct linux_target_ops) <breakpoint_len>: Remove.
467 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
468 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
469 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
470 (arm_sw_breakpoint_from_kind): New function.
471 * linux-bfin-low.c (bfin_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-cris-low.c (cris_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-crisv32-low.c (cris_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-low.c (linux_wait_1): Call breakpoint_kind_from_pc
487 and sw_breakpoint_from_kind to increment the pc.
488 (linux_breakpoint_kind_from_pc): New function.
489 (linux_sw_breakpoint_from_kind): New function.
490 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
491 (initialize_low): Call breakpoint_kind_from_pc and
492 sw_breakpoint_from_kind to replace breakpoint_data/len.
493 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
494 New field.
495 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
496 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
497 (struct linux_target_ops) <breakpoint>: Remove.
498 (struct linux_target_ops) <breakpoint_len>: Remove.
499 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
500 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
501 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
502 (struct linux_target_ops) <breakpoint>: Remove.
503 (struct linux_target_ops) <breakpoint_len>: Remove.
504 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
505 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
506 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
507 (struct linux_target_ops) <breakpoint>: Remove.
508 (struct linux_target_ops) <breakpoint_len>: Remove.
509 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
510 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
511 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
512 (struct linux_target_ops) <breakpoint>: Remove.
513 (struct linux_target_ops) <breakpoint_len>: Remove.
514 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
515 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
516 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
517 (struct linux_target_ops) <breakpoint>: Remove.
518 (struct linux_target_ops) <breakpoint_len>: Remove.
519 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
520 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
521 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
522 (struct linux_target_ops) <breakpoint>: Remove.
523 (struct linux_target_ops) <breakpoint_len>: Remove.
524 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
525 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
526 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
527 (struct linux_target_ops) <breakpoint>: Remove.
528 (struct linux_target_ops) <breakpoint_len>: Remove.
529 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
530 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
531 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
532 (struct linux_target_ops) <breakpoint>: Remove.
533 (struct linux_target_ops) <breakpoint_len>: Remove.
534 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
535 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
536 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
537 (struct linux_target_ops) <breakpoint>: Remove.
538 (struct linux_target_ops) <breakpoint_len>: Remove.
539 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
540 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
541 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
542 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
543 (struct linux_target_ops) <breakpoint>: Remove.
544 (struct linux_target_ops) <breakpoint_len>: Remove.
545 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
546 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
547 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
548 (struct linux_target_ops) <breakpoint>: Remove.
549 (struct linux_target_ops) <breakpoint_len>: Remove.
550 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
551 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
552
4cd98a19
AT
5532015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
554
555 * linux-cris-low.c (cris_get_pc): Remove void arg.
556
774ee6d2
AR
5572015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
558
559 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
560 variable name.
561
833dcd29
AR
5622015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
563
564 * inferiors.c (thread_pid_matches_callback): New function.
565 (find_thread_process): New function.
566 (remove_thread): Reset current_thread.
567 (remove_process): Assert threads have been removed first.
568
8d689ee5
YQ
5692015-10-15 Yao Qi <yao.qi@linaro.org>
570
571 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
572 if it is 3.
573 (aarch64_remove_point): Likewise.
574 * regcache.c (regcache_register_size): New function.
575
1c2e1515
YQ
5762015-10-12 Yao Qi <yao.qi@linaro.org>
577
578 * linux-aarch64-low.c: Update all callers as emit_load_store
579 is renamed to aarch64_emit_load_store.
580
e1c587c3
YQ
5812015-10-12 Yao Qi <yao.qi@linaro.org>
582
583 * linux-aarch64-low.c: Update all callers of function renaming
584 from emit_insn to aarch64_emit_insn.
585
b6542f81
YQ
5862015-10-12 Yao Qi <yao.qi@linaro.org>
587
588 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
589 arch/aarch64-insn.h.
590 (struct aarch64_memory_operand): Likewise.
591 (ENCODE): Likewise.
592 (emit_insn): Move to arch/aarch64-insn.c.
593 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
594 (emit_load_store): Move to arch/aarch64-insn.c.
595 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
596 (can_encode_int32): Remove.
597
246994ce
YQ
5982015-10-12 Yao Qi <yao.qi@linaro.org>
599
600 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
601 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
602 (aarch64_relocate_instruction): Likewise.
603 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
604 (struct aarch64_insn_visitor): Likewise.
605
0badd99f
YQ
6062015-10-12 Yao Qi <yao.qi@linaro.org>
607
608 * linux-aarch64-low.c (struct aarch64_insn_data): New.
609 (struct aarch64_insn_visitor): New.
610 (struct aarch64_insn_relocation_data): New.
611 (aarch64_ftrace_insn_reloc_b): New function.
612 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
613 (aarch64_ftrace_insn_reloc_cb): Likewise.
614 (aarch64_ftrace_insn_reloc_tb): Likewise.
615 (aarch64_ftrace_insn_reloc_adr): Likewise.
616 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
617 (aarch64_ftrace_insn_reloc_others): Likewise.
618 (visitor): New.
619 (aarch64_relocate_instruction): Use visitor.
620
dfaffe9d
YQ
6212015-10-12 Yao Qi <yao.qi@linaro.org>
622
623 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
624 int. Add argument buf.
625 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
626 aarch64_relocate_instruction.
627
70b439f0
YQ
6282015-10-12 Yao Qi <yao.qi@linaro.org>
629
630 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
631 argument insn. Remove local variable insn. Don't call
632 target_read_uint32.
633 (aarch64_install_fast_tracepoint_jump_pad): Call
634 target_read_uint32.
635
7781c06f
YQ
6362015-09-30 Yao Qi <yao.qi@linaro.org>
637
638 * linux-aarch64-low.c (emit_movk): Shorten a long line.
639 (emit_load_store_pair): Likewise.
640
9a3c8263
SM
6412015-09-25 Simon Marchi <simon.marchi@ericsson.com>
642
643 * dll.c (match_dll): Add cast(s).
644 (unloaded_dll): Likewise.
645 * linux-low.c (second_thread_of_pid_p): Likewise.
646 (delete_lwp_callback): Likewise.
647 (count_events_callback): Likewise.
648 (select_event_lwp_callback): Likewise.
649 (linux_set_resume_request): Likewise.
650 * server.c (accumulate_file_name_length): Likewise.
651 (emit_dll_description): Likewise.
652 (handle_qxfer_threads_worker): Likewise.
653 (visit_actioned_threads): Likewise.
654 * thread-db.c (any_thread_of): Likewise.
655 * tracepoint.c (same_process_p): Likewise.
656 (match_blocktype): Likewise.
657 (build_traceframe_info_xml): Likewise.
658
224c3ddb
SM
6592015-09-25 Simon Marchi <simon.marchi@ericsson.com>
660
661 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
662 assignment.
663 (gdb_unparse_agent_expr): Likewise.
664 * hostio.c (require_data): Likewise.
665 (handle_pread): Likewise.
666 * linux-low.c (disable_regset): Likewise.
667 (fetch_register): Likewise.
668 (store_register): Likewise.
669 (get_dynamic): Likewise.
670 (linux_qxfer_libraries_svr4): Likewise.
671 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
672 (set_fast_tracepoint_jump): Likewise.
673 (uninsert_fast_tracepoint_jumps_at): Likewise.
674 (reinsert_fast_tracepoint_jumps_at): Likewise.
675 (validate_inserted_breakpoint): Likewise.
676 (clone_agent_expr): Likewise.
677 * regcache.c (init_register_cache): Likewise.
678 * remote-utils.c (putpkt_binary_1): Likewise.
679 (decode_M_packet): Likewise.
680 (decode_X_packet): Likewise.
681 (look_up_one_symbol): Likewise.
682 (relocate_instruction): Likewise.
683 (monitor_output): Likewise.
684 * server.c (handle_search_memory): Likewise.
685 (handle_qxfer_exec_file): Likewise.
686 (handle_qxfer_libraries): Likewise.
687 (handle_qxfer): Likewise.
688 (handle_query): Likewise.
689 (handle_v_cont): Likewise.
690 (handle_v_run): Likewise.
691 (captured_main): Likewise.
692 * target.c (write_inferior_memory): Likewise.
693 * thread-db.c (try_thread_db_load_from_dir): Likewise.
694 * tracepoint.c (init_trace_buffer): Likewise.
695 (add_tracepoint_action): Likewise.
696 (add_traceframe): Likewise.
697 (add_traceframe_block): Likewise.
698 (cmd_qtdpsrc): Likewise.
699 (cmd_qtdv): Likewise.
700 (cmd_qtstatus): Likewise.
701 (response_source): Likewise.
702 (response_tsv): Likewise.
703 (cmd_qtnotes): Likewise.
704 (gdb_collect): Likewise.
705 (initialize_tracepoint): Likewise.
706
afbe19f8
PL
7072015-09-21 Pierre Langlois <pierre.langlois@arm.com>
708
709 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
710 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
711 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
712 <NOP>: New.
713 (enum aarch64_condition_codes): New enum.
714 (w0): New static global.
715 (fp): Likewise.
716 (lr): Likewise.
717 (struct aarch64_memory_operand) <type>: New
718 MEMORY_OPERAND_POSTINDEX type.
719 (postindex_memory_operand): New helper function.
720 (emit_ret): New function.
721 (emit_load_store_pair): New function, factored out of emit_stp
722 with support for MEMORY_OPERAND_POSTINDEX.
723 (emit_stp): Rewrite using emit_load_store_pair.
724 (emit_ldp): New function.
725 (emit_load_store): Likewise.
726 (emit_ldr): Mention post-index instruction in comment.
727 (emit_ldrh): New function.
728 (emit_ldrb): New function.
729 (emit_ldrsw): Mention post-index instruction in comment.
730 (emit_str): Likewise.
731 (emit_subs): New function.
732 (emit_cmp): Likewise.
733 (emit_and): Likewise.
734 (emit_orr): Likewise.
735 (emit_orn): Likewise.
736 (emit_eor): Likewise.
737 (emit_mvn): Likewise.
738 (emit_lslv): Likewise.
739 (emit_lsrv): Likewise.
740 (emit_asrv): Likewise.
741 (emit_mul): Likewise.
742 (emit_sbfm): Likewise.
743 (emit_sbfx): Likewise.
744 (emit_ubfm): Likewise.
745 (emit_ubfx): Likewise.
746 (emit_csinc): Likewise.
747 (emit_cset): Likewise.
748 (emit_nop): Likewise.
749 (emit_ops_insns): New helper function.
750 (emit_pop): Likewise.
751 (emit_push): Likewise.
752 (aarch64_emit_prologue): New function.
753 (aarch64_emit_epilogue): Likewise.
754 (aarch64_emit_add): Likewise.
755 (aarch64_emit_sub): Likewise.
756 (aarch64_emit_mul): Likewise.
757 (aarch64_emit_lsh): Likewise.
758 (aarch64_emit_rsh_signed): Likewise.
759 (aarch64_emit_rsh_unsigned): Likewise.
760 (aarch64_emit_ext): Likewise.
761 (aarch64_emit_log_not): Likewise.
762 (aarch64_emit_bit_and): Likewise.
763 (aarch64_emit_bit_or): Likewise.
764 (aarch64_emit_bit_xor): Likewise.
765 (aarch64_emit_bit_not): Likewise.
766 (aarch64_emit_equal): Likewise.
767 (aarch64_emit_less_signed): Likewise.
768 (aarch64_emit_less_unsigned): Likewise.
769 (aarch64_emit_ref): Likewise.
770 (aarch64_emit_if_goto): Likewise.
771 (aarch64_emit_goto): Likewise.
772 (aarch64_write_goto_address): Likewise.
773 (aarch64_emit_const): Likewise.
774 (aarch64_emit_call): Likewise.
775 (aarch64_emit_reg): Likewise.
776 (aarch64_emit_pop): Likewise.
777 (aarch64_emit_stack_flush): Likewise.
778 (aarch64_emit_zero_ext): Likewise.
779 (aarch64_emit_swap): Likewise.
780 (aarch64_emit_stack_adjust): Likewise.
781 (aarch64_emit_int_call_1): Likewise.
782 (aarch64_emit_void_call_2): Likewise.
783 (aarch64_emit_eq_goto): Likewise.
784 (aarch64_emit_ne_goto): Likewise.
785 (aarch64_emit_lt_goto): Likewise.
786 (aarch64_emit_le_goto): Likewise.
787 (aarch64_emit_gt_goto): Likewise.
788 (aarch64_emit_ge_got): Likewise.
789 (aarch64_emit_ops_impl): New static global variable.
790 (aarch64_emit_ops): New target function, return
791 &aarch64_emit_ops_impl.
792 (struct linux_target_ops): Install it.
793
bb903df0
PL
7942015-09-21 Pierre Langlois <pierre.langlois@arm.com>
795
796 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
797 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
798 aarch64-ipa.o.
799 * linux-aarch64-ipa.c: New file.
800 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
801 and endian.h.
802 (aarch64_get_thread_area): New target method.
803 (extract_signed_bitfield): New helper function.
804 (aarch64_decode_ldr_literal): New function.
805 (enum aarch64_opcodes): New enum.
806 (struct aarch64_register): New struct.
807 (struct aarch64_operand): New struct.
808 (x0): New static global.
809 (x1): Likewise.
810 (x2): Likewise.
811 (x3): Likewise.
812 (x4): Likewise.
813 (w2): Likewise.
814 (ip0): Likewise.
815 (sp): Likewise.
816 (xzr): Likewise.
817 (aarch64_register): New helper function.
818 (register_operand): Likewise.
819 (immediate_operand): Likewise.
820 (struct aarch64_memory_operand): New struct.
821 (offset_memory_operand): New helper function.
822 (preindex_memory_operand): Likewise.
823 (enum aarch64_system_control_registers): New enum.
824 (ENCODE): New macro.
825 (emit_insn): New helper function.
826 (emit_b): New function.
827 (emit_bcond): Likewise.
828 (emit_cb): Likewise.
829 (emit_tb): Likewise.
830 (emit_blr): Likewise.
831 (emit_stp): Likewise.
832 (emit_ldp_q_offset): Likewise.
833 (emit_stp_q_offset): Likewise.
834 (emit_load_store): Likewise.
835 (emit_ldr): Likewise.
836 (emit_ldrsw): Likewise.
837 (emit_str): Likewise.
838 (emit_ldaxr): Likewise.
839 (emit_stxr): Likewise.
840 (emit_stlr): Likewise.
841 (emit_data_processing_reg): Likewise.
842 (emit_data_processing): Likewise.
843 (emit_add): Likewise.
844 (emit_sub): Likewise.
845 (emit_mov): Likewise.
846 (emit_movk): Likewise.
847 (emit_mov_addr): Likewise.
848 (emit_mrs): Likewise.
849 (emit_msr): Likewise.
850 (emit_sevl): Likewise.
851 (emit_wfe): Likewise.
852 (append_insns): Likewise.
853 (can_encode_int32_in): New helper function.
854 (aarch64_relocate_instruction): New function.
855 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
856 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
857 (struct linux_target_ops): Install aarch64_get_thread_area,
858 aarch64_install_fast_tracepoint_jump_pad and
859 aarch64_get_min_fast_tracepoint_insn_len.
860
787749ea
PL
8612015-09-21 Pierre Langlois <pierre.langlois@arm.com>
862
863 * Makefile.in (aarch64-insn.o): New rule.
864 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
865
9812b2e6
YQ
8662015-09-21 Yao Qi <yao.qi@linaro.org>
867
868 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
869
18fe412b
YQ
8702015-09-21 Yao Qi <yao.qi@linaro.org>
871
872 * tracepoint.c (max_jump_pad_size): Remove.
873
a0cc84cd
YQ
8742015-09-18 Yao Qi <yao.qi@linaro.org>
875
876 * linux-aarch64-low.c: Don't include sys/uio.h.
877 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
878
d78908cf
WW
8792015-09-16 Wei-cheng Wang <cole945@gmail.com>
880
881 * tracepoint.c (eval_result_type): Change prototype.
882 (condition_true_at_tracepoint): Fix argument to compiled_cond.
883
d57e0d50
PA
8842015-09-15 Pedro Alves <palves@redhat.com>
885
886 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
887 Check whether to report exec events instead of checking whether
888 multiprocess is enabled.
889
5a676acc
PA
8902015-09-15 Pedro Alves <palves@redhat.com>
891
892 PR remote/18965
893 * remote-utils.c (prepare_resume_reply): Merge
894 TARGET_WAITKIND_VFORK_DONE switch case with the
895 TARGET_WAITKIND_FORKED case.
896
7c5d0fad
YQ
8972015-09-15 Yao Qi <yao.qi@linaro.org>
898
899 * server.c (handle_query): Check string comparison using
900 "else if" instead of "if".
901
750ce8d1
YQ
9022015-09-15 Yao Qi <yao.qi@linaro.org>
903
904 * server.c (vCont_supported): New global variable.
905 (handle_query): Set vCont_supported to 1 if "vContSupported+"
906 matches. Append ";vContSupported+" to own_buf.
907 (handle_v_requests): Append ";s;S" to own_buf if target supports
908 hardware single step or vCont_supported is false.
909 (capture_main): Set vCont_supported to zero.
910
70b90b91
YQ
9112015-09-15 Yao Qi <yao.qi@linaro.org>
912
913 * linux-low.c (linux_supports_conditional_breakpoints): Rename
914 it to ...
915 (linux_supports_hardware_single_step): ... New function.
916 (linux_target_ops): Update.
917 * lynx-low.c (lynx_target_ops): Set field
918 supports_hardware_single_step to target_can_do_hardware_single_step.
919 * nto-low.c (nto_target_ops): Likewise.
920 * spu-low.c (spu_target_ops): Likewise.
921 * win32-low.c (win32_target_ops): Likewise.
922 * target.c (target_can_do_hardware_single_step): New function.
923 * target.h (struct target_ops) <supports_conditional_breakpoints>:
924 Remove. <supports_hardware_single_step>: New field.
925 (target_supports_conditional_breakpoints): Remove.
926 (target_supports_hardware_single_step): New macro.
927 (target_can_do_hardware_single_step): Declare.
928 * server.c (handle_query): Use target_supports_hardware_single_step
929 instead of target_supports_conditional_breakpoints.
930
ade90bde
YQ
9312015-09-15 Yao Qi <yao.qi@linaro.org>
932
933 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
934 function.
935 (struct linux_target_ops the_low_target): Install
936 aarch64_linux_siginfo_fixup.
937
94585166
DB
9382015-09-11 Don Breazeal <donb@codesourcery.com>
939 Luis Machado <lgustavo@codesourcery.com>
940
941 * linux-low.c (linux_mourn): Static declaration.
942 (linux_arch_setup): Move in front of
943 handle_extended_wait.
944 (linux_arch_setup_thread): New function.
945 (handle_extended_wait): Handle exec events. Call
946 linux_arch_setup_thread. Make event_lwp argument a
947 pointer-to-a-pointer.
948 (check_zombie_leaders): Do not check stopped threads.
949 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
950 (linux_low_filter_event): Add lwp and thread for exec'ing
951 non-leader thread if leader thread has been deleted.
952 Refactor code into linux_arch_setup_thread and call it.
953 Pass child lwp pointer by reference to handle_extended_wait.
954 (linux_wait_for_event_filtered): Update comment.
955 (linux_wait_1): Prevent clobbering exec event status.
956 (linux_supports_exec_events): New function.
957 (linux_target_ops) <supports_exec_events>: Initialize new member.
958 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
959 new member.
960 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
961 * server.c (report_exec_events): New global variable.
962 (handle_query): Handle qSupported query for exec-events feature.
963 (captured_main): Initialize report_exec_events.
964 * server.h (report_exec_events): Declare new global variable.
965 * target.h (struct target_ops) <supports_exec_events>: New
966 member.
967 (target_supports_exec_events): New macro.
968 * win32-low.c (win32_target_ops) <supports_exec_events>:
969 Initialize new member.
970
0568462b
MM
9712015-09-09 Markus Metzger <markus.t.metzger@intel.com>
972
973 * linux-low.c (linux_low_enable_btrace): Remove.
974 (linux_target_ops): Replace linux_low_enable_btrace with
975 linux_enable_btrace.
976
39edd165
YQ
9772015-09-03 Yao Qi <yao.qi@linaro.org>
978
979 * linux-aarch64-low.c (aarch64_insert_point): Call
980 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
981 returns true.
982
1db33b5a
UW
9832015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
984
985 * linux-low.c (check_stopped_by_breakpoint): Use
986 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
987
ab290430
PA
9882015-08-27 Pedro Alves <palves@redhat.com>
989
990 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
991
8d749320
SM
9922015-08-26 Simon Marchi <simon.marchi@ericsson.com>
993
6711b7f8
SM
994 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
995 the XNEW-family equivalent.
8d749320
SM
996 (compile_bytecodes): Likewise.
997 * dll.c (loaded_dll): Likewise.
998 * event-loop.c (append_callback_event): Likewise.
999 (create_file_handler): Likewise.
1000 (create_file_event): Likewise.
1001 * hostio.c (handle_open): Likewise.
1002 * inferiors.c (add_thread): Likewise.
1003 (add_process): Likewise.
1004 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
1005 * linux-arm-low.c (arm_new_process): Likewise.
1006 (arm_new_thread): Likewise.
1007 * linux-low.c (add_to_pid_list): Likewise.
1008 (linux_add_process): Likewise.
1009 (handle_extended_wait): Likewise.
1010 (add_lwp): Likewise.
1011 (enqueue_one_deferred_signal): Likewise.
1012 (enqueue_pending_signal): Likewise.
1013 (linux_resume_one_lwp_throw): Likewise.
1014 (linux_resume_one_thread): Likewise.
1015 (linux_read_memory): Likewise.
1016 (linux_write_memory): Likewise.
1017 * linux-mips-low.c (mips_linux_new_process): Likewise.
1018 (mips_linux_new_thread): Likewise.
1019 (mips_add_watchpoint): Likewise.
1020 * linux-x86-low.c (initialize_low_arch): Likewise.
1021 * lynx-low.c (lynx_add_process): Likewise.
1022 * mem-break.c (set_raw_breakpoint_at): Likewise.
1023 (set_breakpoint): Likewise.
1024 (add_condition_to_breakpoint): Likewise.
1025 (add_commands_to_breakpoint): Likewise.
1026 (clone_agent_expr): Likewise.
1027 (clone_one_breakpoint): Likewise.
1028 * regcache.c (new_register_cache): Likewise.
1029 * remote-utils.c (look_up_one_symbol): Likewise.
1030 * server.c (queue_stop_reply): Likewise.
1031 (start_inferior): Likewise.
1032 (queue_stop_reply_callback): Likewise.
1033 (handle_target_event): Likewise.
1034 * spu-low.c (fetch_ppc_memory): Likewise.
1035 (store_ppc_memory): Likewise.
1036 * target.c (set_target_ops): Likewise.
1037 * thread-db.c (thread_db_load_search): Likewise.
1038 (try_thread_db_load_1): Likewise.
1039 * tracepoint.c (add_tracepoint): Likewise.
1040 (add_tracepoint_action): Likewise.
1041 (create_trace_state_variable): Likewise.
1042 (cmd_qtdpsrc): Likewise.
1043 (cmd_qtro): Likewise.
1044 (add_while_stepping_state): Likewise.
1045 * win32-low.c (child_add_thread): Likewise.
1046 (get_image_name): Likewise.
1047
ed8b7b42
YQ
10482015-08-25 Yao Qi <yao.qi@linaro.org>
1049
1050 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
1051
db3cb7cb
YQ
10522015-08-25 Yao Qi <yao.qi@linaro.org>
1053
1054 * Makefile.in (aarch64-linux.o): New rule.
1055 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
1056 srv_tgtobj.
1057 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
1058 (aarch64_init_debug_reg_state): Make it extern.
1059 (aarch64_linux_prepare_to_resume): Remove.
1060
f6011a1c
YQ
10612015-08-25 Yao Qi <yao.qi@linaro.org>
1062
1063 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
1064 lwp_arch_private_info and ptid_of_lwp.
1065
88e2cf7e
YQ
10662015-08-25 Yao Qi <yao.qi@linaro.org>
1067
1068 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
1069 Find proc_info by find_process_pid. All callers updated.
1070
5e35436e
YQ
10712015-08-25 Yao Qi <yao.qi@linaro.org>
1072
1073 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
1074 Remove.
1075 (debug_reg_change_callback): Remove.
1076 (aarch64_notify_debug_reg_change): Remove.
1077
4a8a7965
YQ
10782015-08-25 Yao Qi <yao.qi@linaro.org>
1079
1080 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
1081 Call current_lwp_ptid.
1082
32a271ee
YQ
10832015-08-25 Yao Qi <yao.qi@linaro.org>
1084
1085 * linux-aarch64-low.c (debug_reg_change_callback): Use
1086 debug_printf.
1087
0d51c8d7
YQ
10882015-08-25 Yao Qi <yao.qi@linaro.org>
1089
1090 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
1091
31a43dd5
YQ
10922015-08-25 Yao Qi <yao.qi@linaro.org>
1093
1094 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
1095
8ee52567
YQ
10962015-08-25 Yao Qi <yao.qi@linaro.org>
1097
1098 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
1099 the code.
1100
ff3f0f45
YQ
11012015-08-25 Yao Qi <yao.qi@linaro.org>
1102
1103 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
1104 Remove.
1105 (debug_reg_change_callback): Remove argument entry and add argument
1106 lwp. Remove local variable thread. Don't print thread id in the
1107 debugging output. Don't check whether pid of thread equals to pid.
1108 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
1109 iterate_over_lwps instead find_inferior.
1110
3d40fbb5
PA
11112015-08-24 Pedro Alves <palves@redhat.com>
1112
1113 * inferiors.c (get_first_process): New function.
1114 * inferiors.h (get_first_process): New declaration.
1115 * remote-utils.c (read_ptid): Default to the first process in the
1116 list, instead of to the current thread's process.
1117
438e1e42
PA
11182015-08-24 Pedro Alves <palves@redhat.com>
1119
1120 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
1121 * event-loop.c: Likewise.
1122 * remote-utils.c: Likewise.
1123 * tracepoint.c: Likewise.
1124
a8c6d4fc
PA
11252015-08-24 Pedro Alves <palves@redhat.com>
1126
1127 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
1128 ptid_get_lwp.
1129
99b0bb12
PA
11302015-08-21 Pedro Alves <palves@redhat.com>
1131
1132 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
1133 instead of literal 1.
1134
f8904751
PA
11352015-08-21 Pedro Alves <palves@redhat.com>
1136
1137 * tdesc.c (default_description): Explicitly zero-initialize.
1138
465a859e
PA
11392015-08-21 Pedro Alves <palves@redhat.com>
1140
1141 PR gdb/18749
1142 * inferiors.c (remove_thread): Discard any pending stop reply for
1143 this thread.
1144 * server.c (remove_all_on_match_pid): Rename to ...
1145 (remove_all_on_match_ptid): ... this. Work with a filter ptid
1146 instead of a pid.
1147 (discard_queued_stop_replies): Change parameter to a ptid. Now
1148 extern.
1149 (handle_v_kill, kill_inferior_callback, captured_main)
1150 (process_serial_event): Adjust.
1151 * server.h (discard_queued_stop_replies): Declare.
1152
f0db101d
PA
11532015-08-21 Pedro Alves <palves@redhat.com>
1154
1155 * linux-low.c (wait_for_sigstop): Always switch to no thread
1156 selected if the previously current thread dies.
1157 * lynx-low.c (lynx_request_interrupt): Use the first thread's
1158 process instead of the current thread's.
1159 * remote-utils.c (input_interrupt): Don't check if there's no
1160 current thread.
1161 * server.c (gdb_read_memory, gdb_write_memory): If setting the
1162 current thread to the general thread fails, error out.
1163 (handle_qxfer_auxv, handle_qxfer_libraries)
1164 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
1165 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
1166 (handle_query): Check if there's a thread selected instead of
1167 checking whether there's any thread in the thread list.
1168 (handle_qxfer_threads, handle_qxfer_btrace)
1169 (handle_qxfer_btrace_conf): Don't error out early if there's no
1170 thread in the thread list.
1171 (handle_v_cont, myresume): Don't set the current thread to the
1172 continue thread.
1173 (process_serial_event) <Hg handling>: Also set thread_id if the
1174 previous general thread is still alive.
1175 (process_serial_event) <g/G handling>: If setting the current
1176 thread to the general thread fails, error out.
1177 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
1178 thread's lwp instead of the current thread's.
1179 * target.c (set_desired_thread): If the desired thread was not
1180 found, leave the current thread pointing to NULL. Return an int
1181 (boolean) indicating success.
1182 * target.h (set_desired_thread): Change return type to int.
1183
40045d91
MF
11842015-08-20 Max Filippov <jcmvbkbc@gmail.com>
1185
1186 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
1187 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
1188 #includes.
1189 (ps_get_thread_area): New function.
1190
45face3b
GB
11912015-08-19 Gary Benson <gbenson@redhat.com>
1192
1193 * hostio.c (handle_pread): Do not attempt to read more data
1194 than hostio_reply_with_data can fit in a packet.
1195
16d5f642
JB
11962015-08-18 Joel Brobecker <brobecker@adacore.com>
1197
1198 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
1199
a738da3a
MF
12002015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
1201
1202 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
1203
33ebda9d
PA
12042015-08-06 Pedro Alves <palves@redhat.com>
1205
1206 * tracepoint.c (expr_eval_result): Now an int.
1207
a44892be
PA
12082015-08-06 Pedro Alves <palves@redhat.com>
1209
1210 * gdbthread.h (struct regcache): Forward declare.
1211 (struct thread_info) <regcache_data>: Now a struct regcache
1212 pointer.
1213 * inferiors.c (inferior_regcache_data)
1214 (set_inferior_regcache_data): Now work with struct regcache
1215 pointers.
1216 * inferiors.h (struct regcache): Forward declare.
1217 (inferior_regcache_data, set_inferior_regcache_data): Now work
1218 with struct regcache pointers.
1219 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
1220 (free_register_cache_thread): Remove struct regcache pointer
1221 casts.
1222
608a1e46
PA
12232015-08-06 Pedro Alves <palves@redhat.com>
1224
1225 * server.c (captured_main): On error, print the exception message
1226 to stderr, and if run_once is set, throw a quit.
1227
f0ce0d3a
PA
12282015-08-06 Pedro Alves <palves@redhat.com>
1229
1230 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
1231 the current thread.
1232
bf47e248
PA
12332015-08-06 Pedro Alves <palves@redhat.com>
1234
1235 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
1236 reading beyond the passed in buffer length.
1237
b6b9ffcc
PL
12382015-08-06 Pierre Langlois <pierre.langlois@arm.com>
1239
1240 * tracepoint.c (symbol_list) <required>: Remove.
1241
863d01bd
PA
12422015-08-06 Pedro Alves <palves@redhat.com>
1243
1244 * linux-low.c (handle_extended_wait): Set the fork child's suspend
1245 count if stopping and suspending threads.
1246 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
1247 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
1248 (linux_detach): Complete an ongoing step-over.
1249 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
1250 throughout.
1251 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
1252 (linux_wait_1): If passing a signal to the inferior after
1253 finishing a step-over, unsuspend and re-resume all lwps. If we
1254 see a single-step event but the thread should be continuing, don't
1255 pass the trap to gdb.
1256 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
1257 internal_error instead of gdb_assert.
1258 (enqueue_pending_signal): New function.
1259 (check_ptrace_stopped_lwp_gone): Add debug output.
1260 (start_step_over): Use internal_error instead of gdb_assert.
1261 (complete_ongoing_step_over): New function.
1262 (linux_resume_one_thread): Don't resume a suspended thread.
1263 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
1264 it stepping.
1265
00db26fa
PA
12662015-08-06 Pedro Alves <palves@redhat.com>
1267
1268 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
1269 (linux_thread_alive): Use lwp_is_marked_dead.
1270 (extended_event_reported): Delete.
1271 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
1272 instead of extended_event_reported.
1273 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
1274 as well.
1275 (lwp_is_marked_dead): New function.
1276 (lwp_running): Use lwp_is_marked_dead.
1277 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
1278 comment.
1279
ad071a30
PA
12802015-08-06 Pedro Alves <palves@redhat.com>
1281
1282 * linux-low.c (linux_wait_1): Move fork event output out of the
1283 !report_to_gdb check. Pass event_child->waitstatus to
1284 target_waitstatus_to_string instead of ourstatus.
1285
524b57e6
YQ
12862015-08-04 Yao Qi <yao.qi@linaro.org>
1287
1288 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
1289 if current_thread is 32 bit.
1290
6085d6f6
YQ
12912015-08-04 Yao Qi <yao.qi@linaro.org>
1292
1293 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
1294 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
1295 * server.c (extended_protocol): Remove "static".
1296 * server.h (extended_protocol): Declare it.
1297
8a7e4587
YQ
12982015-08-04 Yao Qi <yao.qi@linaro.org>
1299
1300 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
1301 both aarch64 and aarch32.
1302 (aarch64_set_pc): Likewise.
1303
3b53ae99
YQ
13042015-08-04 Yao Qi <yao.qi@linaro.org>
1305
1306 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
1307 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
1308 arm-with-neon.xml to srv_xmlfiles.
1309 * linux-aarch64-low.c: Include linux-aarch32-low.h.
1310 (is_64bit_tdesc): New function.
1311 (aarch64_linux_read_description): New function.
1312 (aarch64_arch_setup): Call aarch64_linux_read_description.
1313 (regs_info): Rename to regs_info_aarch64.
1314 (aarch64_regs_info): Return right regs_info.
1315 (initialize_low_arch): Call initialize_low_arch_aarch32.
1316
bd9e6534
YQ
13172015-08-04 Yao Qi <yao.qi@linaro.org>
1318
1319 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
1320 * linux-aarch32-low.c: New file.
1321 * linux-aarch32-low.h: New file.
1322 * linux-arm-low.c (arm_fill_gregset): Move it to
1323 linux-aarch32-low.c.
1324 (arm_store_gregset): Likewise.
1325 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
1326 (arm_store_vfpregset): Call arm_store_vfpregset_num.
1327 (arm_arch_setup): Check if PTRACE_GETREGSET works.
1328 (regs_info): Rename to regs_info_arm.
1329 (arm_regs_info): Return regs_info_aarch32 if
1330 have_ptrace_getregset is 1 and target description is
1331 arm_with_neon or arm_with_vfpv3.
1332 (initialize_low_arch): Don't call init_registers_arm_with_neon.
1333 Call initialize_low_arch_aarch32 instead.
1334
ded48a5e
YQ
13352015-08-04 Yao Qi <yao.qi@linaro.org>
1336
1337 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
1338 * linux-low.c: ... here.
1339 * linux-low.h (have_ptrace_getregset): Declare it.
1340
96e9210f
PA
13412015-08-04 Pedro Alves <palves@redhat.com>
1342
1343 * thread-db.c (struct thread_db): Use new typedefs.
1344 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
1345 CHK calls.
1346 (disable_thread_event_reporting): Cast result of dlsym to
1347 destination function pointer type.
1348 (thread_db_mourn): Use td_ta_delete_ftype.
1349
af60a1ef
SL
13502015-08-03 Sandra Loosemore <sandra@codesourcery.com>
1351
1352 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
1353 arch variant.
1354 (CDX_BREAKPOINT): Define for R2.
1355 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
1356 (the_low_target): Add comments.
1357
e8b41681
YQ
13582015-07-30 Yao Qi <yao.qi@linaro.org>
1359
1360 * linux-arm-low.c (arm_hwcap): Remove it.
1361 (arm_read_description): New local variable arm_hwcap. Don't
1362 set arm_hwcap to zero.
1363
89abb039
YQ
13642015-07-30 Yao Qi <yao.qi@linaro.org>
1365
1366 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
1367 Use regcache->tdesc instead.
1368 (arm_store_wmmxregset): Likewise.
1369 (arm_fill_vfpregset): Likewise.
1370 (arm_store_vfpregset): Likewise.
1371
deca266c
YQ
13722015-07-30 Yao Qi <yao.qi@linaro.org>
1373
1374 * linux-arm-low.c: Include arch/arm.h.
1375 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
1376 (arm_store_gregset): Likewise.
1377
aa58a496
SM
13782015-07-29 Simon Marchi <simon.marchi@ericsson.com>
1379
1380 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
1381 ptrace's 4th parameter.
1382
50904b25
YQ
13832015-07-27 Yao Qi <yao.qi@linaro.org>
1384
1385 * configure.srv (case aarch64*-*-linux*): Don't set
1386 srv_linux_usrregs.
1387
5826e159
PA
13882015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
1389
1390 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
1391 sys/ptrace.h.
1392 * linux-arm-low.c: Likewise.
1393 * linux-cris-low.c: Likewise.
1394 * linux-crisv32-low.c: Likewise.
1395 * linux-low.c: Likewise.
1396 * linux-m68k-low.c: Likewise.
1397 * linux-mips-low.c: Likewise.
1398 * linux-nios2-low.c: Likewise.
1399 * linux-s390-low.c: Likewise.
1400 * linux-sparc-low.c: Likewise.
1401 * linux-tic6x-low.c: Likewise.
1402 * linux-tile-low.c: Likewise.
1403 * linux-x86-low.c: Likewise.
1404
54019719
PA
14052015-07-24 Pedro Alves <palves@redhat.com>
1406
1407 * config.in: Regenerate.
1408 * configure: Regenerate.
1409
eb7aa561
PA
14102015-07-24 Pedro Alves <palves@redhat.com>
1411
1412 * acinclude.m4: Include ../ptrace.m4.
1413 * configure.ac: Call GDB_AC_PTRACE.
1414 * config.in, configure: Regenerate.
1415
55d7b841
YQ
14162015-07-24 Yao Qi <yao.qi@linaro.org>
1417
1418 * linux-low.c (linux_create_inferior): Remove setting to
1419 proc->priv->new_inferior.
1420 (linux_attach): Likewise.
1421 (linux_low_filter_event): Likewise.
1422 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
1423
c06cbd92
YQ
14242015-07-24 Yao Qi <yao.qi@linaro.org>
1425
1426 * linux-low.c (linux_arch_setup): New function.
1427 (linux_low_filter_event): If proc->tdesc is NULL and
1428 proc->attached is true, call the_low_target.arch_setup.
1429 Otherwise, keep status pending, and return.
1430 (linux_resume_one_lwp_throw): Don't call get_pc if
1431 thread->while_stepping isn't NULL. Don't call
1432 get_thread_regcache if proc->tdesc is NULL.
1433 (need_step_over_p): Return 0 if proc->tdesc is NULL.
1434 (linux_target_ops): Install arch_setup.
1435 * server.c (start_inferior): Call the_target->arch_setup.
1436 * target.h (struct target_ops) <arch_setup>: New field.
1437 (target_arch_setup): New marco.
1438 * lynx-low.c (lynx_target_ops): Update.
1439 * nto-low.c (nto_target_ops): Update.
1440 * spu-low.c (spu_target_ops): Update.
1441 * win32-low.c (win32_target_ops): Update.
1442
5ae3ebba
YQ
14432015-07-24 Yao Qi <yao.qi@linaro.org>
1444
1445 * linux-low.c (linux_add_process): Don't set
1446 proc->priv->new_inferior.
1447 (linux_create_inferior): Set proc->priv->new_inferior to 1.
1448 (linux_attach): Likewise.
1449
eb97750b
YQ
14502015-07-24 Yao Qi <yao.qi@linaro.org>
1451
1452 * server.c (start_inferior): Code refactor.
1453
51aee833
YQ
14542015-07-24 Yao Qi <yao.qi@linaro.org>
1455
1456 * server.c (process_serial_event): Set general_thread.
1457
af1b22f3
YQ
14582015-07-21 Yao Qi <yao.qi@linaro.org>
1459
1460 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
1461 aarch64_linux_get_debug_reg_capacity.
1462
554717a3
YQ
14632015-07-17 Yao Qi <yao.qi@linaro.org>
1464
1465 * Makefile.in (aarch64-linux-hw-point.o): New rule.
1466 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
1467 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
1468 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
1469 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
1470 (AARCH64_HWP_ALIGNMENT): Likewise.
1471 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
1472 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
1473 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
1474 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
1475 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
1476 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
1477 (struct aarch64_debug_reg_state): Likewise.
1478 (struct arch_lwp_info): Likewise.
1479 (aarch64_align_watchpoint): Likewise.
1480 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
1481 (aarch64_watchpoint_length): Likewise.
1482 (aarch64_point_encode_ctrl_reg): Likewise
1483 (aarch64_point_is_aligned): Likewise.
1484 (aarch64_align_watchpoint): Likewise.
1485 (aarch64_linux_set_debug_regs):
1486 (aarch64_dr_state_insert_one_point): Likewise.
1487 (aarch64_dr_state_remove_one_point): Likewise.
1488 (aarch64_handle_breakpoint): Likewise.
1489 (aarch64_handle_aligned_watchpoint): Likewise.
1490 (aarch64_handle_unaligned_watchpoint): Likewise.
1491 (aarch64_handle_watchpoint): Likewise.
1492
c67ca4de
YQ
14932015-07-17 Yao Qi <yao.qi@linaro.org>
1494
1495 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
1496 and don't aarch64_get_debug_reg_state. All callers update.
1497 (aarch64_handle_aligned_watchpoint): Likewise.
1498 (aarch64_handle_unaligned_watchpoint): Likewise.
1499 (aarch64_handle_watchpoint): Likewise.
1500 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
1501 (aarch64_remove_point): Likewise.
1502
25abf979
YQ
15032015-07-17 Yao Qi <yao.qi@linaro.org>
1504
1505 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
1506 debug_printf.
1507 (aarch64_handle_unaligned_watchpoint): Likewise.
1508
db1ff28b
JK
15092015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
1510
1511 Revert the previous 3 commits:
1512 Move gdb_regex* to common/
1513 Move linux_find_memory_regions_full & co.
1514 gdbserver build-id attribute generator
1515
700ca40f
JK
15162015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1517 Jan Kratochvil <jan.kratochvil@redhat.com>
1518
1519 gdbserver build-id attribute generator.
1520 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
1521 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
1522 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
1523 (find_phdr): New.
1524 (get_dynamic): Use find_pdhr to traverse program headers.
1525 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
1526 (compare_mapping_entry_range, struct find_memory_region_callback_data)
1527 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
1528 (get_hex_build_id): New.
1529 (linux_qxfer_libraries_svr4): Add optional build-id attribute
1530 to reply XML document.
1531
9904185c
JK
15322015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1533 Jan Kratochvil <jan.kratochvil@redhat.com>
1534
1535 * target.c: Include target/target-utils.h and fcntl.h.
1536 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
1537 (target_fileio_read_stralloc): New functions.
1538
6e5b4429
JK
15392015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
1540
1541 * Makefile.in (OBS): Add gdb_regex.o.
1542 (gdb_regex.o): New.
1543 * config.in: Rebuilt.
1544 * configure: Rebuilt.
1545
ddc98fbf
JK
15462015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1547 Jan Kratochvil <jan.kratochvil@redhat.com>
1548
1549 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
1550 * Makefile.in (OBS): Add target-utils.o.
1551 (linux-maps.o, target-utils.o): New.
1552 * configure.srv (srv_linux_obj): Add linux-maps.o.
1553
e57bb7a0
PL
15542015-07-15 Pierre Langlois <pierre.langlois@arm.com>
1555
1556 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
1557 function, return 1.
1558 (the_low_target): Install it.
1559
586b02a9
PA
15602015-07-14 Pedro Alves <palves@redhat.com>
1561
1562 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
1563 Instead, ignore ECHILD, and throw an error for other errnos.
1564
58c1b36c
PA
15652015-07-10 Pedro Alves <palves@redhat.com>
1566
1567 * event-loop.c (struct callback_event) <data>: Change type to
1568 gdb_client_data instance instead of gdb_client_data pointer.
1569 (append_callback_event): Adjust.
1570
421530db
PL
15712015-07-10 Pierre Langlois <pierre.langlois@arm.com>
1572
1573 * linux-aarch64-low.c: Add comments for each linux_target_ops
1574 method. Remove comments already covered in target_ops and
1575 linux_target_ops definitions.
1576 (the_low_target): Add comments for each unimplemented method.
1577
c2d65f38
YQ
15782015-07-09 Yao Qi <yao.qi@linaro.org>
1579
1580 * linux-aarch64-low.c (aarch64_regmap): Remove.
1581 (aarch64_usrregs_info): Remove.
1582 (regs_info): Set field usrregs to NULL.
1583
b20a6524
MM
15842015-07-02 Markus Metzger <markus.t.metzger@intel.com>
1585
1586 * linux-low.c: Include "rsp-low.h"
1587 (linux_low_encode_pt_config, linux_low_encode_raw): New.
1588 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
1589 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
1590 (handle_btrace_enable_pt): New.
1591 (handle_btrace_general_set): Support "pt".
1592 (handle_btrace_conf_general_set): Support "pt:size".
1593
96c97461
PL
15942015-06-29 Pierre Langlois <pierre.langlois@arm.com>
1595
1596 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
1597 Z_PACKET_SW_BP.
1598
37d66942
PL
15992015-06-29 Pierre Langlois <pierre.langlois@arm.com>
1600
1601 * linux-aarch64-low.c: Remove comment about endianness.
1602 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
1603 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
1604 memcmp.
1605
dc06243f
GB
16062015-06-24 Gary Benson <gbenson@redhat.com>
1607
1608 * linux-i386-ipa.c (stdint.h): Do not include.
1609 * lynx-i386-low.c (stdint.h): Likewise.
1610 * lynx-ppc-low.c (stdint.h): Likewise.
1611 * mem-break.c (stdint.h): Likewise.
1612 * thread-db.c (stdint.h): Likewise.
1613 * tracepoint.c (stdint.h): Likewise.
1614 * win32-low.c (stdint.h): Likewise.
1615
124e13d9
SM
16162015-06-18 Simon Marchi <simon.marchi@ericsson.com>
1617
1618 * server.c (write_qxfer_response): Update call to
1619 remote_escape_output.
1620
909c2cda
JK
16212015-06-15 Aleksandar Ristovski <aristovski@qnx.com
1622 Jan Kratochvil <jan.kratochvil@redhat.com>
1623
1624 Merge multiple hex conversions.
1625 * gdbreplay.c (tohex): Rename to 'fromhex'.
1626 (logchar): Use fromhex.
1627
24c05f46
JK
16282015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
1629
1630 * server.c (handle_qxfer_libraries): Set `version' attribute for
1631 <library-list>.
1632
14d2069a
GB
16332015-06-10 Gary Benson <gbenson@redhat.com>
1634
1635 * target.h (struct target_ops) <multifs_open>: New field.
1636 <multifs_unlink>: Likewise.
1637 <multifs_readlink>: Likewise.
1638 * linux-low.c (nat/linux-namespaces.h): New include.
1639 (linux_target_ops): Initialize the_target->multifs_open,
1640 the_target->multifs_unlink and the_target->multifs_readlink.
1641 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
1642 * hostio.c (hostio_fs_pid): New static variable.
1643 (hostio_handle_new_gdb_connection): New function.
1644 (handle_setfs): Likewise.
1645 (handle_open): Use the_target->multifs_open as appropriate.
1646 (handle_unlink): Use the_target->multifs_unlink as appropriate.
1647 (handle_readlink): Use the_target->multifs_readlink as
1648 appropriate.
1649 (handle_vFile): Handle vFile:setfs packets.
1650 * server.c (handle_query): Call hostio_handle_new_gdb_connection
1651 after target_handle_new_gdb_connection.
1652
4b8b5e72
GB
16532015-06-10 Gary Benson <gbenson@redhat.com>
1654
1655 * configure.ac (AC_CHECK_FUNCS): Add setns.
1656 * config.in: Regenerate.
1657 * configure: Likewise.
1658 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
1659 (linux-namespaces.o): New rule.
1660 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
1661
3ac2e371
GB
16622015-06-09 Gary Benson <gbenson@redhat.com>
1663
1664 * hostio.c (handle_open): Process mode argument with
1665 fileio_to_host_mode.
1666
ca9b78ce
YQ
16672015-06-01 Yao Qi <yao.qi@linaro.org>
1668
1669 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
1670 * linux-x86-low.c: Likewise.
1671
bfacd19d
DB
16722015-05-28 Don Breazeal <donb@codesourcery.com>
1673
1674 * linux-low.c (handle_extended_wait): Initialize
1675 thread_info.last_resume_kind for new fork children.
1676
452003ef
PA
16772015-05-15 Pedro Alves <palves@redhat.com>
1678
1679 * target.h (target_handle_new_gdb_connection): Rewrite using if
1680 wrapped in do/while.
1681
1041a03c
JB
16822015-05-14 Joel Brobecker <brobecker@adacore.com>
1683
1684 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
1685 * configure, config.in: Regenerate.
1686 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
1687 Declare typedef.
1688
c269dbdb
DB
16892015-05-12 Don Breazeal <donb@codesourcery.com>
1690
1691 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
1692 PTRACE_EVENT_VFORK_DONE.
1693 (linux_low_ptrace_options, extended_event_reported): Add vfork
1694 events.
1695 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
1696 and "vforkdone" for RSP 'T' Stop Reply Packet.
1697 * server.h (report_vfork_events): Declare
1698 global variable.
1699
3a8a0396
DB
17002015-05-12 Don Breazeal <donb@codesourcery.com>
1701
1702 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
1703 (the_low_target) <new_fork>: Initialize new member.
1704 * linux-arm-low.c (arm_new_fork): New function.
1705 (the_low_target) <new_fork>: Initialize new member.
1706 * linux-low.c (handle_extended_wait): Call new target function
1707 new_fork.
1708 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
1709 * linux-mips-low.c (mips_add_watchpoint): New function
1710 extracted from mips_insert_point.
1711 (the_low_target) <new_fork>: Initialize new member.
1712 (mips_linux_new_fork): New function.
1713 (mips_insert_point): Call mips_add_watchpoint.
1714 * linux-x86-low.c (x86_linux_new_fork): New function.
1715 (the_low_target) <new_fork>: Initialize new member.
1716
de0d863e
DB
17172015-05-12 Don Breazeal <donb@codesourcery.com>
1718
1719 * linux-low.c (handle_extended_wait): Implement return value,
1720 rename argument 'event_child' to 'event_lwp', handle
1721 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
1722 (linux_low_ptrace_options): New function.
1723 (linux_low_filter_event): Call linux_low_ptrace_options,
1724 use different argument fo linux_enable_event_reporting,
1725 use return value from handle_extended_wait.
1726 (extended_event_reported): New function.
1727 (linux_wait_1): Call extended_event_reported and set
1728 status to report fork events.
1729 (linux_write_memory): Add pid to debug message.
1730 (reset_lwp_ptrace_options_callback): New function.
1731 (linux_handle_new_gdb_connection): New function.
1732 (linux_target_ops): Initialize new structure member.
1733 * linux-low.h (struct lwp_info) <waitstatus>: New member.
1734 * lynx-low.c: Initialize new structure member.
1735 * remote-utils.c (prepare_resume_reply): Implement stop reason
1736 "fork" for "T" stop message.
1737 * server.c (handle_query): Call handle_new_gdb_connection.
1738 * server.h (report_fork_events): Declare global flag.
1739 * target.h (struct target_ops) <handle_new_gdb_connection>:
1740 New member.
1741 (target_handle_new_gdb_connection): New macro.
1742 * win32-low.c: Initialize new structure member.
1743
ddcbc397
DB
17442015-05-12 Don Breazeal <donb@codesourcery.com>
1745
1746 * mem-break.c (APPEND_TO_LIST): Define macro.
1747 (clone_agent_expr): New function.
1748 (clone_one_breakpoint): New function.
1749 (clone_all_breakpoints): New function.
1750 * mem-break.h: Declare new functions.
1751
89245bc0
DB
17522015-05-12 Don Breazeal <donb@codesourcery.com>
1753
1754 * linux-low.c (linux_supports_fork_events): New function.
1755 (linux_supports_vfork_events): New function.
1756 (linux_target_ops): Initialize new structure members.
1757 (initialize_low): Call linux_check_ptrace_features.
1758 * lynx-low.c (lynx_target_ops): Initialize new structure
1759 members.
1760 * server.c (report_fork_events, report_vfork_events):
1761 New global flags.
1762 (handle_query): Add new features to qSupported packet and
1763 response.
1764 (captured_main): Initialize new global variables.
1765 * target.h (struct target_ops) <supports_fork_events>:
1766 New member.
1767 <supports_vfork_events>: New member.
1768 (target_supports_fork_events): New macro.
1769 (target_supports_vfork_events): New macro.
1770 * win32-low.c (win32_target_ops): Initialize new structure
1771 members.
1772
835205d0
GB
17732015-05-12 Gary Benson <gbenson@redhat.com>
1774
1775 * server.c (handle_qxfer_exec_file): Use current process
1776 if annex is empty.
1777
21e94bd9
SL
17782015-05-08 Sandra Loosemore <sandra@codesourcery.com>
1779
1780 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
1781 Remove HAVE_PTRACE_GETREGS conditionals.
1782 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
1783 instead of PTRACE_GETREGS and PTRACE_SETREGS.
1784
45614f15
YQ
17852015-05-08 Yao Qi <yao.qi@linaro.org>
1786
1787 * linux-low.c (linux_supports_conditional_breakpoints): New
1788 function.
1789 (linux_target_ops): Install new target method.
1790 * lynx-low.c (lynx_target_ops): Install NULL hook for
1791 supports_conditional_breakpoints.
1792 * nto-low.c (nto_target_ops): Likewise.
1793 * spu-low.c (spu_target_ops): Likewise.
1794 * win32-low.c (win32_target_ops): Likewise.
1795 * server.c (handle_query): Check
1796 target_supports_conditional_breakpoints.
1797 * target.h (struct target_ops) <supports_conditional_breakpoints>:
1798 New field.
1799 (target_supports_conditional_breakpoints): New macro.
1800
80ad801e
PA
18012015-05-06 Pedro Alves <palves@redhat.com>
1802
1803 PR server/18081
1804 * server.c (start_inferior): If the process exits, mourn it.
1805
819843c7
GB
18062015-04-21 Gary Benson <gbenson@redhat.com>
1807
1808 * hostio.c (fileio_open_flags_to_host): Factored out to
1809 fileio_to_host_openflags in common/fileio.c. Single use
1810 updated.
1811
a2d5a9d7
MF
18122015-04-17 Max Filippov <jcmvbkbc@gmail.com>
1813
1814 * linux-xtensa-low.c (xtensa_fill_gregset)
1815 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
1816 XCHAL_HAVE_LOOP.
1817
deb44829
MF
18182015-04-17 Max Filippov <jcmvbkbc@gmail.com>
1819
1820 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
1821 (regs_info): Replace usrregs pointer with NULL.
1822
e57f1de3
GB
18232015-04-17 Gary Benson <gbenson@redhat.com>
1824
1825 * target.h (struct target_ops) <pid_to_exec_file>: New field.
1826 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
1827 * server.c (handle_qxfer_exec_file): New function.
1828 (qxfer_packets): Add exec-file entry.
1829 (handle_query): Report qXfer:exec-file:read as supported packet.
1830
62828379
RN
18312015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
1832
1833 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
1834
b88bb450
GB
18352015-04-09 Gary Benson <gbenson@redhat.com>
1836
1837 * hostio-errno.c (errno_to_fileio_error): Remove function.
1838 Update caller to use remote_fileio_to_fio_error.
1839
c8f4bfdd
YQ
18402015-04-09 Yao Qi <yao.qi@linaro.org>
1841
1842 * linux-low.c (linux_insert_point): Call
1843 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
1844 (linux_remove_point): Call remove_memory_breakpoint if type is
1845 raw_bkpt_type_sw.
1846 * linux-x86-low.c (x86_insert_point): Don't call
1847 insert_memory_breakpoint.
1848 (x86_remove_point): Don't call remove_memory_breakpoint.
1849
41f98f02
PA
18502015-04-01 Pedro Alves <palves@redhat.com>
1851 Cleber Rosa <crosa@redhat.com>
1852
1853 * server.c (gdbserver_usage): Reorganize and extend the usage
1854 message.
1855
2bf6fb9d
PA
18562015-03-24 Pedro Alves <palves@redhat.com>
1857
1858 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
1859 output. Also dump TRAP_TRACE.
1860 (linux_low_filter_event): In debug output, distinguish a
1861 resume_stop SIGSTOP from a delayed SIGSTOP.
1862
369f6daa
GB
18632015-03-24 Gary Benson <gbenson@redhat.com>
1864
1865 * linux-x86-low.c (x86_linux_new_thread): Moved to
1866 nat/x86-linux.c.
1867 (x86_linux_prepare_to_resume): Likewise.
1868
8e5d4070
GB
18692015-03-24 Gary Benson <gbenson@redhat.com>
1870
1871 * Makefile.in (x86-linux-dregs.o): New rule.
1872 * configure.srv: Add x86-linux-dregs.o to relevant targets.
1873 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
1874 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
1875 (x86_linux_dr_get): Likewise.
1876 (x86_linux_dr_set): Likewise.
1877 (update_debug_registers_callback): Likewise.
1878 (x86_linux_dr_set_addr): Likewise.
1879 (x86_linux_dr_get_addr): Likewise.
1880 (x86_linux_dr_set_control): Likewise.
1881 (x86_linux_dr_get_control): Likewise.
1882 (x86_linux_dr_get_status): Likewise.
1883 (x86_linux_update_debug_registers): Likewise.
1884
2b95d440
GB
18852015-03-24 Gary Benson <gbenson@redhat.com>
1886
1887 * linux-x86-low.c (x86_linux_update_debug_registers):
1888 New function, factored out from...
1889 (x86_linux_prepare_to_resume): ...this.
1890
14b0bc68
GB
18912015-03-24 Gary Benson <gbenson@redhat.com>
1892
1893 * linux-x86-low.c (x86_linux_dr_get): Update comments.
1894 (x86_linux_dr_set): Likewise.
1895 (update_debug_registers_callback): Likewise.
1896 (x86_linux_dr_set_addr): Likewise.
1897 (x86_linux_dr_get_addr): Likewise.
1898 (x86_linux_dr_set_control): Likewise.
1899 (x86_linux_dr_get_control): Likewise.
1900 (x86_linux_dr_get_status): Likewise.
1901 (x86_linux_prepare_to_resume): Likewise.
1902
5dfe6ca8
GB
19032015-03-24 Gary Benson <gbenson@redhat.com>
1904
1905 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
1906 Use perror_with_name. Pass string through gettext.
1907 (x86_linux_dr_set): Likewise.
1908
d33472ad
GB
19092015-03-24 Gary Benson <gbenson@redhat.com>
1910
1911 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
1912 (x86_linux_dr_set_addr): ...this.
1913 (x86_dr_low_get_addr): Rename to...
1914 (x86_linux_dr_get_addr): ...this.
1915 (x86_dr_low_set_control): Rename to...
1916 (x86_linux_dr_set_control): ...this.
1917 (x86_dr_low_get_control): Rename to...
1918 (x86_linux_dr_get_control): ...this.
1919 (x86_dr_low_get_status): Rename to...
1920 (x86_linux_dr_get_status): ...this.
1921 (x86_dr_low): Update with new function names.
1922
4b134ca1
GB
19232015-03-24 Gary Benson <gbenson@redhat.com>
1924
1925 * Makefile.in (x86-linux.o): New rule.
1926 * configure.srv: Add x86-linux.o to relevant targets.
1927 * linux-low.c (lwp_set_arch_private_info): New function.
1928 (lwp_arch_private_info): Likewise.
1929 * linux-x86-low.c: Include nat/x86-linux.h.
1930 (arch_lwp_info): Removed structure.
1931 (update_debug_registers_callback):
1932 Use lwp_set_debug_registers_changed.
1933 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
1934 and lwp_set_debug_registers_changed.
1935 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
1936
34c703da
GB
19372015-03-24 Gary Benson <gbenson@redhat.com>
1938
1939 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
1940 * linux-arm-low.c (arm_new_thread): Likewise.
1941 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
1942 * linux-mips-low.c (mips_linux_new_thread): Likewise.
1943 * linux-x86-low.c (x86_linux_new_thread): Likewise.
1944 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
1945
cff068da
GB
19462015-03-24 Gary Benson <gbenson@redhat.com>
1947
1948 * linux-low.c (ptid_of_lwp): New function.
1949 (lwp_is_stopped): Likewise.
1950 (lwp_stop_reason): Likewise.
1951 * linux-x86-low.c (update_debug_registers_callback):
1952 Use lwp_is_stopped.
1953 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
1954 lwp_stop_reason.
1955
b2f7c7e8
GB
19562015-03-24 Gary Benson <gbenson@redhat.com>
1957
1958 * linux-low.h (linux_stop_lwp): Remove declaration.
1959
6d4ee8c6
GB
19602015-03-24 Gary Benson <gbenson@redhat.com>
1961
1962 * linux-low.h: Include nat/linux-nat.h.
1963 * linux-low.c (iterate_over_lwps_args): New structure.
1964 (iterate_over_lwps_filter): New function.
1965 (iterate_over_lwps): Likewise.
1966 * linux-x86-low.c (update_debug_registers_callback):
1967 Update signature to what iterate_over_lwps expects.
1968 Remove PID check that iterate_over_lwps now performs.
1969 (x86_dr_low_set_addr): Use iterate_over_lwps.
1970 (x86_dr_low_set_control): Likewise.
1971
70a0bb6b
GB
19722015-03-24 Gary Benson <gbenson@redhat.com>
1973
1974 * linux-x86-low.c (x86_debug_reg_state): New function.
1975 (x86_linux_prepare_to_resume): Use the above.
1976
7b669087
GB
19772015-03-24 Gary Benson <gbenson@redhat.com>
1978
1979 * linux-low.c (current_lwp_ptid): New function.
1980 * linux-x86-low.c: Include nat/linux-nat.h.
1981 (x86_dr_low_get_addr): Use current_lwp_ptid.
1982 (x86_dr_low_get_control): Likewise.
1983 (x86_dr_low_get_status): Likewise.
1984
eef49a3d
PA
19852015-03-20 Pedro Alves <palves@redhat.com>
1986
1987 * tracepoint.c (cmd_qtstatus): Make "str" const.
1988
b2333d22
PA
19892015-03-20 Pedro Alves <palves@redhat.com>
1990
1991 * server.c (handle_general_set): Make "req_str" const.
1992
23f238d3
PA
19932015-03-19 Pedro Alves <palves@redhat.com>
1994
1995 * linux-low.c (linux_resume_one_lwp): Rename to ...
1996 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
1997 instead call perror_with_name.
1998 (check_ptrace_stopped_lwp_gone): New function.
1999 (linux_resume_one_lwp): Reimplement as wrapper around
2000 linux_resume_one_lwp_throw that swallows errors if the LWP is
2001 gone.
2002
91baf43f
PA
20032015-03-19 Pedro Alves <palves@redhat.com>
2004
2005 * linux-low.c (count_events_callback, select_event_lwp_callback):
2006 No longer check whether the thread has resume_stop as last resume
2007 kind.
2008
8bf3b159
PA
20092015-03-19 Pedro Alves <palves@redhat.com>
2010
2011 * linux-low.c (count_events_callback, select_event_lwp_callback):
2012 Use the lwp's status_pending_p field, not the thread's.
2013
b90fc188
PA
20142015-03-19 Pedro Alves <palves@redhat.com>
2015
2016 * linux-low.c (select_event_lwp_callback): Update comments to
2017 no longer mention SIGTRAP.
2018
464b0089
GB
20192015-03-18 Gary Benson <gbenson@redhat.com>
2020
2021 * server.c (handle_query): Do not report vFile:fstat as supported.
2022
aa9e327f
GB
20232015-03-11 Gary Benson <gbenson@redhat.com>
2024
2025 * hostio.c (sys/types.h): New include.
2026 (sys/stat.h): Likewise.
2027 (common-remote-fileio.h): Likewise.
2028 (handle_fstat): New function.
2029 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 2030
791c0056
GB
20312015-03-11 Gary Benson <gbenson@redhat.com>
2032
2033 * configure.ac (AC_CHECK_MEMBERS): Add checks for
2034 struct stat.st_blocks and struct stat.st_blksize.
2035 * configure: Regenerate.
2036 * config.in: Likewise.
2037 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
2038 (OBS): Add common-remote-fileio.o.
2039 (common-remote-fileio.o): New rule.
2040
9a9df970
PA
20412015-03-09 Pedro Alves <palves@redhat.com>
2042
2043 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
2044 'struct sockaddr' pointer in 'accept' call.
2045
9eb1356e
PA
20462015-03-09 Pedro Alves <palves@redhat.com>
2047
2048 Revert:
2049 2015-03-07 Pedro Alves <palves@redhat.com>
2050 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
2051 or <winsock2.h> here. Instead include "gdb_socket.h".
2052 (remote_open): Use union gdb_sockaddr_u.
2053 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
2054 or <winsock2.h> here. Instead include "gdb_socket.h".
2055 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
2056 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
2057 or <sys/un.h>.
2058 (init_named_socket, gdb_agent_helper_thread): Use union
2059 gdb_sockaddr_u.
2060
aac331e4
PA
20612015-03-07 Pedro Alves <palves@redhat.com>
2062
2063 * configure.ac (build_warnings): Move
2064 -Wdeclaration-after-statement to the C-specific set.
2065 * configure: Regenerate.
2066
366c75fc
PA
20672015-03-07 Pedro Alves <palves@redhat.com>
2068
2069 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
2070 or <winsock2.h> here. Instead include "gdb_socket.h".
2071 (remote_open): Use union gdb_sockaddr_u.
2072 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
2073 or <winsock2.h> here. Instead include "gdb_socket.h".
2074 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
2075 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
2076 or <sys/un.h>.
2077 (init_named_socket, gdb_agent_helper_thread): Use union
2078 gdb_sockaddr_u.
2079
492d29ea
PA
20802015-03-07 Pedro Alves <palves@redhat.com>
2081
2082 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
2083 instead.
2084
60a191ed
YQ
20852015-03-06 Yao Qi <yao.qi@linaro.org>
2086
2087 * linux-aarch64-low.c (aarch64_insert_point): Use
2088 show_debug_regs as a boolean.
2089 (aarch64_remove_point): Likewise.
2090
f5771b1d
PA
20912015-03-05 Pedro Alves <palves@redhat.com>
2092
2093 * lynx-low.c (lynx_target_ops): Install NULL hooks for
2094 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
2095 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
2096 * nto-low.c (nto_target_ops): Likewise.
2097 * spu-low.c (spu_target_ops): Likewise.
2098 * win32-low.c (win32_target_ops): Likewise.
2099
3e572f71
PA
21002015-03-04 Pedro Alves <palves@redhat.com>
2101
72f4393d 2102 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
2103 Decide whether a breakpoint triggered based on the SIGTRAP's
2104 siginfo.si_code.
72f4393d
L
2105 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
2106 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
2107 (linux_low_filter_event): Check for breakpoints before checking
2108 watchpoints.
2109 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
2110 siginfo.si_code.
72f4393d
L
2111 (linux_stopped_by_sw_breakpoint)
2112 (linux_supports_stopped_by_sw_breakpoint)
2113 (linux_stopped_by_hw_breakpoint)
2114 (linux_supports_stopped_by_hw_breakpoint): New functions.
2115 (linux_target_ops): Install new target methods.
3e572f71 2116
1ec68e26
PA
21172015-03-04 Pedro Alves <palves@redhat.com>
2118
2119 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
2120 * server.c (swbreak_feature, hwbreak_feature): New globals.
2121 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
2122 (captured_main): Clear swbreak_feature and hwbreak_feature.
2123 * server.h (swbreak_feature, hwbreak_feature): Declare.
2124 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
2125 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
2126 supports_stopped_by_hw_breakpoint>: New fields.
2127 (target_supports_stopped_by_sw_breakpoint)
2128 (target_stopped_by_sw_breakpoint)
2129 (target_supports_stopped_by_hw_breakpoint)
2130 (target_stopped_by_hw_breakpoint): Declare.
2131
15c66dd6
PA
21322015-03-04 Pedro Alves <palves@redhat.com>
2133
2134 enum lwp_stop_reason -> enum target_stop_reason
2135 * linux-low.c (check_stopped_by_breakpoint): Adjust.
2136 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
2137 (linux_wait_1, stuck_in_jump_pad_callback)
2138 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
2139 (linux_stopped_by_watchpoint):
2140 * linux-low.h (enum lwp_stop_reason): Delete.
2141 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
2142 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
2143
98fc70d6
YQ
21442015-03-04 Yao Qi <yao.qi@linaro.org>
2145
2146 * Makefile.in (SFILES): Add linux-aarch64-low.c.
2147
dd2ac174
GB
21482015-03-03 Gary Benson <gbenson@redhat.com>
2149
2150 * hostio.c (handle_vFile): Fix prefix lengths.
2151
d68e53f4
MM
21522015-03-03 Markus Metzger <markus.t.metzger@intel.com>
2153
2154 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
2155 ptr_bits.
2156
bf2d68ab
AA
21572015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
2158
2159 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
2160 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
2161 (clean): Add "rm -f" for above C files.
2162 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
2163 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
2164 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
2165 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
2166 * linux-s390-low.c (HWCAP_S390_VX): New macro.
2167 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
2168 (init_registers_s390x_vx_linux64)
2169 (init_registers_s390x_tevx_linux64)
2170 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
2171 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
2172 declarations.
2173 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
2174 (s390_store_vxrs_high): New functions.
2175 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
2176 NT_S390_VXRS_HIGH.
2177 (s390_arch_setup): Add logic for selecting one of the new target
2178 descriptions. Activate the new vector regsets if applicable.
2179 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
2180 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
2181 and init_registers_s390x_tevx_linux64.
2182
c966a859
PA
21832015-03-01 Pedro Alves <palves@redhat.com>
2184
2185 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
2186 parameter.
2187
4180215b
PA
21882015-02-27 Pedro Alves <palves@redhat.com>
2189
2190 * linux-x86-low.c (u_debugreg_offset): New function.
2191 (x86_linux_dr_get, x86_linux_dr_set): Use it.
2192
749bab01
PA
21932015-02-27 Pedro Alves <palves@redhat.com>
2194
2195 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
2196 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
2197 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
2198 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
2199 (ps_lsetfpregs, ps_getpid)
2200 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
2201 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
2202 (ps_lsetxregs, ps_plog): Declare.
2203
3c14e5a3
PA
22042015-02-27 Pedro Alves <palves@redhat.com>
2205
2206 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
2207 IP_AGENT_EXPORT_FUNC.
2208 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
2209 IP_AGENT_EXPORT_FUNC.
2210 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
2211 (IP_AGENT_EXPORT): Delete.
2212 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
2213 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
2214 (gdb_trampoline_buffer_error, collecting, gdb_collect)
2215 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
2216 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
2217 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
2218 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
2219 (traceframe_read_count, traceframe_write_count)
2220 (traceframes_created, trace_state_variables, get_raw_reg)
2221 (get_trace_state_variable_value, set_trace_state_variable_value)
2222 (ust_loaded, helper_thread_id, cmd_buf): Use
2223 IPA_SYM_EXPORTED_NAME.
2224 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
2225 (tracepoints) Use IP_AGENT_EXPORT_VAR.
2226 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
2227 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2228 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
2229 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
2230 EXTERN_C_PUSH/EXTERN_C_POP.
2231 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
2232 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
2233 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2234 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
2235 (traceframe_write_count, traceframe_read_count)
2236 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
2237 (about_to_request_buffer_space, get_trace_state_variable_value)
2238 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
2239 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
2240 EXTERN_C_PUSH/EXTERN_C_POP.
2241 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
2242 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
2243 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
2244 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2245 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
2246 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
2247 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
2248 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
2249 Define.
2250 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
2251 (IP_AGENT_EXPORT_VAR_DECL): Define.
2252 (tracing): Declare.
2253 (gdb_agent_get_raw_reg): Declare.
2254
fe978cb0
PA
22552015-02-27 Tom Tromey <tromey@redhat.com>
2256 Pedro Alves <palves@redhat.com>
2257
2258 Rename symbols whose names are reserved C++ keywords throughout.
2259
3bc3d82a
PA
22602015-02-27 Pedro Alves <palves@redhat.com>
2261
2262 * Makefile.in (COMPILER): New, get it from autoconf.
2263 (CXX): Get from autoconf instead.
2264 (COMPILE.pre): Use COMPILER.
2265 (CC-LD): Rename to ...
2266 (CC_LD): ... this. Use COMPILER.
2267 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
2268 (CXX_FOR_TARGET): Default to g++ instead of gcc.
2269 * acinclude.m4: Include build-with-cxx.m4.
2270 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
2271 Disable -Werror by default if building in C++ mode.
2272 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
2273 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
2274 the C++ compiler. Save/restore CXXFLAGS too.
2275 * configure: Regenerate.
2276
07697489
PA
22772015-02-27 Pedro Alves <palves@redhat.com>
2278
2279 * acinclude.m4: Include libiberty.m4.
2280 * configure.ac: Call libiberty_INIT.
2281 * config.in, configure: Regenerate.
2282
9beb7c4e
PA
22832015-02-26 Pedro Alves <palves@redhat.com>
2284
2285 * linux-low.c (linux_wait_1): When incrementing the PC past a
2286 program breakpoint always use the_low_target.breakpoint_len as
2287 increment, rather than the maximum between that and
2288 the_low_target.decr_pc_after_break.
2289
8090aef2
PA
22902015-02-23 Pedro Alves <palves@redhat.com>
2291
2292 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
2293 thread was doing a step-over; always adjust the PC if
2294 we stepped over a permanent breakpoint.
2295 (linux_wait_1): If we stepped over breakpoint that was on top of a
2296 permanent breakpoint, manually advance the PC past it.
2297
bc9540e8
PA
22982015-02-23 Pedro Alves <palves@redhat.com>
2299
2300 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
2301 modes.
2302 (x86_fill_gregset, x86_store_gregset): Use it when handling
2303 $orig_eax.
2304
2db9a427
PA
23052015-02-20 Pedro Alves <palves@redhat.com>
2306
2307 * thread-db.c: Include "nat/linux-procfs.h".
2308 (thread_db_init): Skip listing new threads if the kernel supports
2309 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
2310
afa8d396
PA
23112015-02-20 Pedro Alves <palves@redhat.com>
2312
2313 * linux-low.c (status_pending_p_callback): Use ptid_match.
2314
c9587f88
AT
23152015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
2316
2317 PR breakpoints/16812
2318 * linux-low.c (wstatus_maybe_breakpoint): Remove.
2319 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
2320 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
2321
b05ec7a5
AT
23222015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
2323
2324 PR breakpoints/15956
2325 * tracepoint.c (cmd_qtinit): Add check for current_thread.
2326
d33501a5
MM
23272015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2328
2329 * linux-low.c (linux_low_btrace_conf): Print size.
2330 * server.c (handle_btrace_conf_general_set): New.
2331 (hanle_general_set): Call handle_btrace_conf_general_set.
2332 (handle_query): Report Qbtrace-conf:bts:size as supported.
2333
f4abbc16
MM
23342015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2335
2336 * linux-low.c (linux_low_enable_btrace): Update parameters.
2337 (linux_low_btrace_conf): New.
2338 (linux_target_ops)<to_btrace_conf>: Initialize.
2339 * server.c (current_btrace_conf): New.
2340 (handle_btrace_enable): Rename to ...
2341 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
2342 to target_enable_btrace. Update comment. Update users.
2343 (handle_qxfer_btrace_conf): New.
2344 (qxfer_packets): Add btrace-conf entry.
2345 (handle_query): Report qXfer:btrace-conf:read as supported packet.
2346 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
2347 (target_ops)<read_btrace_conf>: New.
2348 (target_enable_btrace): Update parameters.
2349 (target_read_btrace_conf): New.
2350
043c3577
MM
23512015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2352
2353 * server.c (handle_btrace_general_set): Remove call to
2354 target_supports_btrace.
2355 (supported_btrace_packets): New.
2356 (handle_query): Call supported_btrace_packets.
2357 * target.h: include btrace-common.h.
2358 (btrace_target_info): Removed.
2359 (supports_btrace, target_supports_btrace): Update parameters.
2360
734b0e4b
MM
23612015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2362
2363 * Makefile.in (SFILES): Add common/btrace-common.c.
2364 (OBS): Add common/btrace-common.o.
2365 (btrace-common.o): Add build rules.
2366 * linux-low: Include btrace-common.h.
2367 (linux_low_read_btrace): Use struct btrace_data. Call
2368 btrace_data_init and btrace_data_fini.
2369
d6c146e9
PA
23702015-02-06 Pedro Alves <palves@redhat.com>
2371
2372 * thread-db.c (find_new_threads_callback): Add debug output.
2373
20ba1ce6
PA
23742015-02-04 Pedro Alves <palves@redhat.com>
2375
2376 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
2377 (resume_stopped_resumed_lwps): New function.
2378 (linux_wait_for_event_filtered): Use it.
2379
8cc73a39
SDJ
23802015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
2381
2382 * Makefile.in (SFILES): Add linux-personality.c.
2383 (linux-personality.o): New rule.
2384 * configure.srv (srv_linux_obj): Add linux-personality.o to the
2385 list of objects to be built.
2386 * linux-low.c: Include nat/linux-personality.h.
2387 (linux_create_inferior): Remove code to disable address space
2388 randomization (moved to ../nat/linux-personality.c). Create
2389 cleanup to disable address space randomization.
2390
fb23d554
SDJ
23912015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
2392
2393 * Makefile.in (posix-strerror.o): New rule.
2394 (mingw-strerror.o): Likewise.
2395 * configure: Regenerated.
2396 * configure.ac: Source file ../common/common.host. Initialize new
2397 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
2398
cdf43629
YQ
23992015-01-14 Yao Qi <yao@codesourcery.com>
2400
2401 * Makefile.in (SFILES): Add nat/ppc-linux.c.
2402 (ppc-linux.o): New rule.
2403 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
2404 * configure.ac: AC_CHECK_FUNCS(getauxval).
2405 * config.in: Re-generated.
2406 * configure: Re-generated.
2407 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
2408 ppc64_64bit_inferior_p
2409
514c5338
YQ
24102015-01-14 Yao Qi <yao@codesourcery.com>
2411
2412 * linux-ppc-low.c: Include "nat/ppc-linux.h".
2413 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
2414 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
2415 (PT_ORIG_R3, PT_TRAP): Likewise.
2416 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
2417 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
2418 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
2419
3368c1e5
JB
24202015-01-10 Joel Brobecker <brobecker@adacore.com>
2421
2422 * i387-fp.c (i387_cache_to_xsave): In look over
2423 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
2424 zmmh_low_space field by use of zmmh_high_space.
2425
582511be
PA
24262015-01-09 Pedro Alves <palves@redhat.com>
2427
2428 * linux-low.c (step_over_bkpt): Move higher up in the file.
2429 (handle_extended_wait): Don't store the stop_pc here.
2430 (get_stop_pc): Adjust comments and rename to ...
2431 (check_stopped_by_breakpoint): ... this. Record whether the LWP
2432 stopped for a software breakpoint or hardware breakpoint.
2433 (thread_still_has_status_pending_p): New function.
2434 (status_pending_p_callback): Use
2435 thread_still_has_status_pending_p. If the event is no longer
2436 interesting, resume the LWP.
2437 (handle_tracepoints): Add assert.
2438 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
2439 (wstatus_maybe_breakpoint): New function.
2440 (cancel_breakpoint): Delete function.
2441 (check_stopped_by_watchpoint): New function, factored out from
2442 linux_low_filter_event.
2443 (lp_status_maybe_breakpoint): Delete function.
2444 (linux_low_filter_event): Remove filter_ptid argument.
2445 Leave thread group exits pending here. Store the LWP's stop PC.
2446 Always leave events pending.
2447 (linux_wait_for_event_filtered): Pull all events out of the
2448 kernel, and leave them all pending.
2449 (count_events_callback, select_event_lwp_callback): Consider all
2450 events.
2451 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
2452 (select_event_lwp): Only give preference to the stepping LWP in
2453 all-stop mode. Adjust comments.
2454 (ignore_event): New function.
2455 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
2456 references to cancel_breakpoints. Adjust to renames. Also give
2457 equal priority to all LWPs that have had events in non-stop mode.
2458 If reporting a software breakpoint event, unadjust the LWP's PC.
2459 (linux_wait): If linux_wait_1 returned an ignored event, retry.
2460 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
2461 Adjust.
2462 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
2463 (resume_status_pending_p): Use thread_still_has_status_pending_p.
2464 (linux_stopped_by_watchpoint): Adjust.
2465 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
2466 * linux-low.h (enum lwp_stop_reason): New.
2467 (struct lwp_info) <stop_pc>: Adjust comment.
2468 <stopped_by_watchpoint>: Delete field.
2469 <stop_reason>: New field.
2470 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
2471 * mem-break.c (software_breakpoint_inserted_here)
2472 (hardware_breakpoint_inserted_here): New function.
2473 * mem-break.h (software_breakpoint_inserted_here)
2474 (hardware_breakpoint_inserted_here): Declare.
2475 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
2476 (cancel_breakpoints): Delete.
2477 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
2478 (upload_fast_traceframes): Remove references to
2479 cancel_breakpoints.
2480
a33e3959
PA
24812015-01-09 Pedro Alves <palves@redhat.com>
2482
2483 * thread-db.c (find_new_threads_callback): Ignore thread if the
2484 kernel thread ID is -1.
2485
8784d563
PA
24862015-01-09 Pedro Alves <palves@redhat.com>
2487
2488 * linux-low.c (linux_attach_fail_reason_string): Move to
2489 nat/linux-ptrace.c, and rename.
2490 (linux_attach_lwp): Update comment.
2491 (attach_proc_task_lwp_callback): New function.
2492 (linux_attach): Adjust to rename and use
2493 linux_proc_attach_tgid_threads.
2494 (linux_attach_fail_reason_string): Delete declaration.
2495
76f2b779
JB
24962015-01-01 Joel Brobecker <brobecker@adacore.com>
2497
2498 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
2499 * server.c (gdbserver_version): Likewise.
2500
fafcc06a
SDJ
25012014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
2502
2503 * remote-utils.c: Include ctype.h.
2504 (input_interrupt): Explicitly handle the case when the char
2505 received is the NUL byte. Improve the printing of non-ASCII
2506 characters.
2507
beed38b8
JB
25082014-12-16 Joel Brobecker <brobecker@adacore.com>
2509
2510 * linux-low.c (linux_low_filter_event): Update call to
2511 linux_enable_event_reporting following the addition of
2512 a new parameter to that function.
2513
bf330350
CU
25142014-12-16 Catalin Udma <catalin.udma@freescale.com>
2515
2516 PR server/17457
2517 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
2518 (AARCH64_FPCR_REGNO): Likewise.
2519 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
2520 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
2521 (aarch64_store_fpregset): Likewise.
2522
5227d625
JB
25232014-12-15 Joel Brobecker <brobecker@adacore.com>
2524
2525 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
2526 Remove FIXME comment about assumption about N.
2527
f93b65a0
JB
25282014-12-13 Joel Brobecker <brobecker@adacore.com>
2529
2530 * configure.ac: If large-file support is disabled in GDBserver,
2531 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
2532 * configure: Regenerate.
2533
e5a9158d
AA
25342014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2535
2536 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
2537 warning upon ENODATA from ptrace.
2538 * linux-s390-low.c (s390_store_tdb): New.
2539 (s390_regsets): Add regset for NT_S390_TDB.
2540
feea5f36
AA
25412014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2542
2543 * linux-low.c (regsets_store_inferior_registers): Skip regsets
2544 without a fill_function.
2545 * linux-s390-low.c (s390_fill_last_break): Remove.
2546 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
2547 (s390_arch_setup): Use regset's size instead of fill_function for
2548 loop end condition.
2549
098dbe61
AA
25502014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2551
2552 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
2553 the regset's store function when ptrace returned an error.
2554 * regcache.c (get_thread_regcache): Invalidate register cache
2555 before fetching inferior's registers.
2556
28eef672
AA
25572014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2558
2559 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
2560 while-loop as for-loop.
2561 (regsets_store_inferior_registers): Likewise.
2562
bdca27a2
YQ
25632014-11-28 Yao Qi <yao@codesourcery.com>
2564
2565 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
2566 * config.in, configure: Re-generate.
2567 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
2568 is defined.
2569
9c232dda
YQ
25702014-11-21 Yao Qi <yao@codesourcery.com>
2571
2572 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
2573 (AC_CHECK_HEADERS): Remove malloc.h.
2574 * configure: Re-generated.
2575 * config.in: Re-generated.
2576 * server.h: Don't include alloca.h and malloc.h.
2577 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
2578 Don't include malloc.h.
2579
43968415
JB
25802014-11-17 Joel Brobecker <brobecker@adacore.com>
2581
2582 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
2583 corresponding ERRNO check in same block.
2584
40e91bc7
PA
25852014-11-12 Pedro Alves <palves@redhat.com>
2586
2587 * server.c (cont_thread): Update comment.
2588 (start_inferior, attach_inferior): No longer clear cont_thread.
2589 (handle_v_cont): No longer set cont_thread.
2590 (captured_main): Clear cont_thread each time a GDB connects.
2591
c2c118cf
PA
25922014-11-12 Pedro Alves <palves@redhat.com>
2593
2594 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
2595 thread, and don't resume all threads if the Hc thread has exited.
2596
78708b7c
PA
25972014-11-12 Pedro Alves <palves@redhat.com>
2598
2599 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
2600 the process group instead of to a specific LWP.
2601
a2abc7de
PA
26022014-10-15 Pedro Alves <palves@redhat.com>
2603
2604 PR server/17487
2605 * win32-arm-low.c (arm_set_thread_context): Remove current_event
2606 parameter.
2607 (arm_set_thread_context): Delete.
2608 (the_low_target): Adjust.
2609 * win32-i386-low.c (debug_registers_changed)
2610 (debug_registers_used): Delete.
2611 (update_debug_registers_callback): New function.
2612 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
2613 needing to update their debug registers.
2614 (win32_get_current_dr): New function.
2615 (x86_dr_low_get_addr, x86_dr_low_get_control)
2616 (x86_dr_low_get_status): Fetch the debug register from the thread
2617 record's context.
2618 (i386_initial_stuff): Adjust.
2619 (i386_get_thread_context): Remove current_event parameter. Don't
2620 clear debug_registers_changed nor copy DR values to
2621 debug_reg_state.
2622 (i386_set_thread_context): Delete.
2623 (i386_prepare_to_resume): New function.
2624 (i386_thread_added): Mark the thread as needing to update irs
2625 debug registers.
2626 (the_low_target): Remove i386_set_thread_context and install
2627 i386_prepare_to_resume.
2628 * win32-low.c (win32_get_thread_context): Adjust.
2629 (win32_set_thread_context): Use SetThreadContext
2630 directly.
2631 (win32_prepare_to_resume): New function.
2632 (win32_require_context): New function, factored out from ...
2633 (thread_rec): ... this.
2634 (continue_one_thread): Call win32_prepare_to_resume on each thread
2635 we're about to continue.
2636 (win32_resume): Call win32_prepare_to_resume on the event thread.
2637 * win32-low.h (struct win32_thread_info)
2638 <debug_registers_changed>: New field.
2639 (struct win32_target_ops): Change prototype of set_thread_context,
2640 delete set_thread_context and add prepare_to_resume.
2641 (win32_require_context): New declaration.
2642
a442d071
GB
26432014-10-08 Gary Benson <gbenson@redhat.com>
2644
2645 * server.h: Do not include common-exceptions.h.
2646
6f1947e8
GB
26472014-10-08 Gary Benson <gbenson@redhat.com>
2648
2649 * server.h: Do not include cleanups.h.
2650
63b434a4
JH
26512014-09-30 James Hogan <james.hogan@imgtec.com>
2652
2653 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
2654 mips64-dsp-linux.c.
2655
c4d9ceb6
YQ
26562014-09-23 Yao Qi <yao@codesourcery.com>
2657
2658 * linux-low.c (lp_status_maybe_breakpoint): New function.
2659 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
2660 (count_events_callback): Likewise.
2661 (select_event_lwp_callback): Likewise.
2662 (cancel_breakpoints_callback): Likewise.
2663
89a5711c
DB
26642014-09-19 Don Breazeal <donb@codesourcery.com>
2665
2666 * linux-low.c (handle_extended_wait): Call
2667 linux_ptrace_get_extended_event.
2668 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
2669 linux_is_extended_waitstatus.
2670
bffc0964
JB
26712014-09-16 Joel Brobecker <brobecker@adacore.com>
2672
2673 * Makefile.in (CPPFLAGS): Define.
2674 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
2675 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
2676
0bfdf32f
GB
26772014-09-16 Gary Benson <gbenson@redhat.com>
2678
2679 * inferiors.h (current_inferior): Renamed as...
2680 (current_thread): New variable. All uses updated.
2681 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
2682 (maybe_move_out_of_jump_pad): Likewise.
2683 (cancel_breakpoint): Likewise.
2684 (linux_low_filter_event): Likewise.
2685 (wait_for_sigstop): Likewise.
2686 (linux_resume_one_lwp): Likewise.
2687 (need_step_over_p): Likewise.
2688 (start_step_over): Likewise.
2689 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
2690 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
2691 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
2692 and save_inferior as saved_thread.
2693 * regcache.c (get_thread_regcache): Renamed saved_inferior as
2694 saved_thread.
2695 (regcache_invalidate_thread): Likewise.
2696 * remote-utils.c (prepare_resume_reply): Likewise.
2697 * thread-db.c (thread_db_get_tls_address): Likewise.
2698 (disable_thread_event_reporting): Likewise.
2699 (remove_thread_event_breakpoints): Likewise.
2700 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
2701 as saved_thread.
2702 * target.h (set_desired_inferior): Renamed as...
2703 (set_desired_thread): New declaration. All uses updated.
2704 * server.c (myresume): Updated comment to reference thread instead
2705 of inferior.
2706 (handle_serial_event): Likewise.
2707 (handle_target_event): Likewise.
2708
361c8ade
GB
27092014-09-12 Tom Tromey <tromey@redhat.com>
2710 Gary Benson <gbenson@redhat.com>
2711
2712 * regcache.h: Include common-regcache.h.
2713 (regcache_read_pc): Don't declare.
2714 * regcache.c (get_thread_regcache_for_ptid): New function.
2715
bd9269f7
GB
27162014-09-11 Tom Tromey <tromey@redhat.com>
2717 Gary Benson <gbenson@redhat.com>
2718
2719 * symbol.c: New file.
2720 * Makefile.in (SFILES): Add symbol.c.
2721 (OBS): Add symbol.o.
2722
f8c1d06b
GB
27232014-09-11 Gary Benson <gbenson@redhat.com>
2724
2725 * target.c (target_stop_ptid, target_continue_ptid): New
2726 functions.
2727
721ec300
GB
27282014-09-11 Tom Tromey <tromey@redhat.com>
2729 Gary Benson <gbenson@redhat.com>
2730
2731 * target.h: Include target/target.h.
2732 * target.c (target_read_memory, target_read_uint32)
2733 (target_write_memory): New functions.
2734
c5e92cca
GB
27352014-09-11 Gary Benson <gbenson@redhat.com>
2736
2737 * server.h (debug_hw_points): Don't declare.
2738 * server.c (debug_hw_points): Don't define. Replace all uses
2739 with show_debug_regs.
2740 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
2741 all uses with show_debug_regs.
2742
2e4bb98a
EBM
27432014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
2744
2745 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
2746 endianness into account.
2747 (ppc_supply_ptrace_register): Likewise.
2748
ac740bc7
JH
27492014-09-03 James Hogan <james.hogan@imgtec.com>
2750
2751 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
2752 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
2753
97ea6506
GB
27542014-09-03 Gary Benson <gbenson@redhat.com>
2755
2756 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
2757 ALL_DEBUG_ADDRESS_REGISTERS.
2758
df7e5265
GB
27592014-09-02 Gary Benson <gbenson@redhat.com>
2760
2761 * i386-low.h: Renamed as...
2762 * x86-low.h: New file. All type, function and variable name
2763 prefixes changed from "i386_" to "x86_". All references updated.
2764 * i386-low.c: Renamed as...
2765 * x86-low.c: New file. All type, function and variable name
2766 prefixes changed from "i386_" to "x86_". All references updated.
2767
ed859da7
GB
27682014-09-02 Gary Benson <gbenson@redhat.com>
2769
2770 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
2771 (x86_linux_new_thread): Likewise.
2772
860789c7
GB
27732014-08-29 Gary Benson <gbenson@redhat.com>
2774
2775 * server.h (setjmp.h): Do not include.
2776 (toplevel): Do not declare.
2777 (common-exceptions.h): Include.
2778 (cleanups.h): Likewise.
2779 * server.c (toplevel): Do not define.
2780 (exit_code): New static global.
2781 (detach_or_kill_for_exit_cleanup): New function.
2782 (main): New function. Original main renamed to...
2783 (captured_main): New function.
2784 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
2785
ff55e1b5
GB
27862014-08-29 Gary Benson <gbenson@redhat.com>
2787
2788 * Makefile.in (SFILES): Add common/common-exceptions.c.
2789 (OBS): Add common-exceptions.o.
2790 (common-exceptions.o): New rule.
2791 * utils.c (prepare_to_throw_exception): New function.
2792
e9bcb658
GB
27932014-08-29 Gary Benson <gbenson@redhat.com>
2794
2795 * config.in: Regenerate.
2796 * configure: Likewise.
2797
e3180625
GB
27982014-08-29 Gary Benson <gbenson@redhat.com>
2799
2800 * Makefile.in (SFILES): Add common/cleanups.c.
2801 (OBS): cleanups.o.
2802 (cleanups.o): New rule.
2803
e3d6ba5d
GB
28042014-08-29 Gary Benson <gbenson@redhat.com>
2805
2806 * utils.c (internal_vwarning): New function.
2807
7096e886
GB
28082014-08-28 Gary Benson <gbenson@redhat.com>
2809
2810 * utils.h (fatal): Remove declaration.
2811 * utils.c (fatal): Remove function.
2812
14ce3192
GB
28132014-08-28 Gary Benson <gbenson@redhat.com>
2814
2815 * tracepoint.c (gdb_agent_init): Replace fatal with
2816 perror_with_name.
2817 (initialize_tracepoint): Likewise.
2818
50278d59
GB
28192014-08-28 Gary Benson <gbenson@redhat.com>
2820
2821 * remote-utils.c (remote_prepare): Replace fatal with error.
2822
aa96c426
GB
28232014-08-28 Gary Benson <gbenson@redhat.com>
2824
2825 * linux-low.c (linux_async): Replace fatal with warning.
2826 Tidy up and return.
2827 (linux_start_non_stop): Return -1 if linux_async failed.
2828
f7160e97
GB
28292014-08-28 Gary Benson <gbenson@redhat.com>
2830
2831 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
2832 gdb_assert.
2833 (i386_dr_low_get_addr): Remove vague comment.
2834 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
2835 gdb_assert.
2836
38e08fca
GB
28372014-08-28 Gary Benson <gbenson@redhat.com>
2838
2839 * inferiors.c (get_thread_process): Replace check with gdb_assert.
2840 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
2841 internal_error.
2842 (linux_resume_one_lwp): Likewise.
2843 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
2844 gdb_assert.
2845 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
2846 with internal_error.
2847 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
2848 (init_register_cache): Replace fatal with gdb_assert_not_reached.
2849 (find_register_by_name): Replace fatal with internal_error.
2850 (find_regno): Likewise.
2851 * tdesc.c (init_target_desc): Replace check with gdb_assert.
2852 * thread-db.c (thread_db_create_event): Likewise.
2853 (thread_db_load_search): Likewise.
2854 (try_thread_db_load_1): Likewise.
2855 * tracepoint.c (get_jump_space_head): Replace fatal with
2856 internal_error.
2857 (claim_trampoline_space): Likewise.
2858 (have_fast_tracepoint_trampoline_buffer): Likewise.
2859 (cmd_qtstart): Likewise.
2860 (stop_tracing): Likewise.
2861 (fast_tracepoint_collecting): Likewise.
2862 (target_malloc): Likewise.
2863 (download_tracepoint): Likewise.
2864 (download_trace_state_variables): Replace check with gdb_assert.
2865 (upload_fast_traceframes): Replace fatal with internal_error.
2866
34abf635
GB
28672014-08-19 Tom Tromey <tromey@redhat.com>
2868 Gary Benson <gbenson@redhat.com>
2869
2870 * Makefile.in (SFILES): Add common/common-debug.c.
2871 (OBS): Add common-debug.o.
2872 (common-debug.o): New rule.
2873 * debug.h (debug_printf): Don't declare.
2874 * debug.c (debug_printf): Renamed and rewritten as...
2875 (debug_vprintf): New function.
2876
f6e94d78
GB
28772014-08-19 Gary Benson <gbenson@redhat.com>
2878
2879 * utils.h: Do not include print-utils.h.
2880
9239eeab
GB
28812014-08-19 Tom Tromey <tromey@redhat.com>
2882 Gary Benson <gbenson@redhat.com>
2883
2884 * server.h: Add static assertion.
2885 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
2886
ef87c8bb
GB
28872014-08-19 Tom Tromey <tromey@redhat.com>
2888 Gary Benson <gbenson@redhat.com>
2889
2890 * Makefile.in (SFILES): Add common/errors.c.
2891 (OBS): Add errors.o.
2892 (IPA_OBS): Add errors-ipa.o.
2893 (errors.o): New rule.
2894 (errors-ipa.o): Likewise.
2895 * utils.h (perror_with_name, error, warning): Don't declare.
2896 * utils.c (warning): Renamed and rewritten as...
2897 (vwarning): New function.
2898 (error): Renamed and rewritten as...
2899 (verror): New function.
2900 (internal_error): Renamed and rewritten as...
2901 (internal_verror): New function.
2902
bb974a24
GB
29032014-08-07 Gary Benson <gbenson@redhat.com>
2904
2905 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
2906 * configure: Regenerate.
2907 * config.in: Likewise.
2908 * server.h: Do not include errno.h.
2909 * event-loop.c: Likewise.
2910 * hostio-errno.c: Likewise.
2911 * linux-low.c: Likewise.
2912 * remote-utils.c: Likewise.
2913 * spu-low.c: Likewise.
2914 * utils.c: Likewise.
2915 * gdbreplay.c: Unconditionally include errno.h.
2916
6d3d12eb
GB
29172014-08-07 Gary Benson <gbenson@redhat.com>
2918
2919 * server.h: Do not include string.h.
2920 * event-loop.c: Likewise.
2921 * linux-low.c: Likewise.
2922 * regcache.c: Likewise.
2923 * remote-utils.c: Likewise.
2924 * spu-low.c: Likewise.
2925 * utils.c: Likewise.
2926
dccbb609
GB
29272014-08-07 Gary Benson <gbenson@redhat.com>
2928
2929 * server.h: Do not include gdb_assert.h.
2930
e76df0d0
GB
29312014-08-07 Gary Benson <gbenson@redhat.com>
2932
2933 * server.h: Do not include common-utils.h.
2934
4cb9c816
GB
29352014-08-07 Gary Benson <gbenson@redhat.com>
2936
2937 * server.h: Do not include ptid.h.
2938 * notif.h: Likewise.
2939
3995eeee
GB
29402014-08-07 Gary Benson <gbenson@redhat.com>
2941
2942 * server.h: Do not include gdb_locale.h.
2943
cb9f1a9b
GB
29442014-08-07 Gary Benson <gbenson@redhat.com>
2945
2946 * server.h: Do not include gdb/signals.h.
2947 * win32-low.c: Likewise.
2948
a5fceff8
GB
29492014-08-07 Gary Benson <gbenson@redhat.com>
2950
2951 * server.h: Do not include pathmax.h.
2952
b9391142
GB
29532014-08-07 Gary Benson <gbenson@redhat.com>
2954
2955 * server.h: Do not include libiberty.h.
2956 * linux-bfin-low.c: Likewise.
2957
0e443c87
GB
29582014-08-07 Gary Benson <gbenson@redhat.com>
2959
2960 * server.h: Do not include ansidecl.h.
2961
8ebb3f56
GB
29622014-08-07 Gary Benson <gbenson@redhat.com>
2963
2964 * linux-x86-low.c: Do not include stddef.h.
2965 * lynx-ppc-low.c: Likewise.
2966 * tracepoint.c: Likewise.
2967
8980bdf6
GB
29682014-08-07 Gary Benson <gbenson@redhat.com>
2969
2970 * server.h: Do not include stdarg.h.
2971 * nto-low.c: Likewise.
2972
d7096f71
GB
29732014-08-07 Gary Benson <gbenson@redhat.com>
2974
2975 * server.h: Do not include stdlib.h.
2976 * inferiors.c: Likewise.
2977 * linux-low.c: Likewise.
2978 * regcache.c: Likewise.
2979 * spu-low.c: Likewise.
2980 * tracepoint.c: Likewise.
2981 * utils.c: Likewise.
2982
d02f550d
GB
29832014-08-07 Gary Benson <gbenson@redhat.com>
2984
2985 * server.h: Do not include stdio.h.
2986 * linux-low.c: Likewise.
2987 * remote-utils.c: Likewise.
2988 * spu-low.c: Likewise.
2989 * utils.c: Likewise.
2990 * wincecompat.c: Likewise.
2991
87f6c4e3
GB
29922014-08-06 Gary Benson <gbenson@redhat.com>
2993
2994 * regcache.c (init_register_cache): Move conditionals inside if.
2995
7089dca4
GB
29962014-08-06 Gary Benson <gbenson@redhat.com>
2997
2998 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
2999
462f517e
GB
30002014-07-31 Gary Benson <gbenson@redhat.com>
3001
3002 * ax.h: Do not include server.h.
3003 * gdbthread.h: Likewise.
3004 * lynx-low.h: Likewise.
3005 * notif.h: Likewise.
3006
976411d6
GB
30072014-07-30 Gary Benson <gbenson@redhat.com>
3008
3009 * server.h: Include common-defs.h.
3010 Do not include config.h or build-gnulib-gdbserver/config.h.
3011
d41f6d8e
GB
30122014-07-30 Gary Benson <gbenson@redhat.com>
3013
3014 * hostio-errno.c: Move server.h to top of includes list.
3015 * inferiors.c: Likewise.
3016 * linux-x86-low.c: Likewise.
3017 * notif.c: Include server.h.
3018
314c6a35
TT
30192014-07-24 Tom Tromey <tromey@redhat.com>
3020 Gary Benson <gbenson@redhat.com>
3021
3022 * server.h (CORE_ADDR): Now unsigned.
3023
69ff6be5
PA
30242014-07-16 Pedro Alves <palves@redhat.com>
3025
3026 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
3027
ce9e3fe7
PA
30282014-07-15 Pedro Alves <palves@redhat.com>
3029
3030 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
3031 copy.
3032
e76126e8
PA
30332014-07-11 Pedro Alves <palves@redhat.com>
3034
3035 * linux-low.c (kill_wait_lwp): New function, based on
3036 kill_one_lwp_callback, but use my_waitpid directly.
3037 (kill_one_lwp_callback, linux_kill): Use it.
3038
8e9db26e
PA
30392014-06-23 Pedro Alves <palves@redhat.com>
3040
3041 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
3042 before setting DR0..DR3.
3043
698b3e08
GB
30442014-06-20 Gary Benson <gbenson@redhat.com>
3045
3046 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
3047 * configure: Regenerated.
3048 * config.in: Likewise.
3049
125f8a3d
GB
30502014-06-20 Gary Benson <gbenson@redhat.com>
3051
3052 * Makefile.in (SFILES): Update locations for files moved
3053 from common to nat.
3054 (object file files): Reordered.
3055
42995dbd
GB
30562014-06-20 Gary Benson <gbenson@redhat.com>
3057
3058 * i386-low.h (i386_dr_low_can_set_addr): Removed.
3059 (i386_dr_low_set_addr): Likewise.
3060 (i386_dr_low_get_addr): Likewise.
3061 (i386_dr_low_can_set_control): Likewise.
3062 (i386_dr_low_set_control): Likewise.
3063 (i386_dr_low_get_control): Likewise.
3064 (i386_dr_low_get_status): Likewise.
3065 (i386_get_debug_register_length): Likewise.
3066 * linux-x86-low.c (i386_dr_low_set_addr):
3067 Changed signature. Made static.
3068 (i386_dr_low_get_addr): Likewise.
3069 (i386_dr_low_set_control): Likewise.
3070 (i386_dr_low_get_control): Likewise.
3071 (i386_dr_low_get_status): Likewise.
3072 (i386_dr_low): New global variable.
3073 * win32-i386-low.c (i386_dr_low_set_addr):
3074 Changed signature. Made static.
3075 (i386_dr_low_get_addr): Likewise.
3076 (i386_dr_low_set_control): Likewise.
3077 (i386_dr_low_get_control): Likewise.
3078 (i386_dr_low_get_status): Likewise.
3079 (i386_dr_low): New global variable.
3080
e1d2394b
MS
30812014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
3082
3083 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
3084 * Makefile.in (AR, AR_FLAGS): Define.
3085 * configure: Regenerate.
3086
3a8ee006
GB
30872014-06-19 Gary Benson <gbenson@redhat.com>
3088
3089 * Makefile.in (i386-dregs.o): New rule.
3090 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
3091 * i386-low.c (target.h): Remove include.
3092 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
3093 (DR_CONTROL_SHIFT): Likewise.
3094 (DR_CONTROL_SIZE): Likewise.
3095 (DR_RW_EXECUTE): Likewise.
3096 (DR_RW_WRITE): Likewise.
3097 (DR_RW_READ): Likewise.
3098 (DR_RW_IORW): Likewise.
3099 (DR_LEN_1): Likewise.
3100 (DR_LEN_2): Likewise.
3101 (DR_LEN_4): Likewise.
3102 (DR_LEN_8): Likewise.
3103 (DR_LOCAL_ENABLE_SHIFT): Likewise.
3104 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
3105 (DR_ENABLE_SIZE): Likewise.
3106 (DR_LOCAL_SLOWDOWN): Likewise.
3107 (DR_GLOBAL_SLOWDOWN): Likewise.
3108 (DR_CONTROL_RESERVED): Likewise.
3109 (I386_DR_CONTROL_MASK): Likewise.
3110 (I386_DR_VACANT): Likewise.
3111 (I386_DR_LOCAL_ENABLE): Likewise.
3112 (I386_DR_GLOBAL_ENABLE): Likewise.
3113 (I386_DR_DISABLE): Likewise.
3114 (I386_DR_SET_RW_LEN): Likewise.
3115 (I386_DR_GET_RW_LEN): Likewise.
3116 (I386_DR_WATCH_HIT): Likewise.
3117 (i386_wp_op_t): Likewise.
3118 (i386_show_dr): Likewise.
3119 (i386_length_and_rw_bits): Likewise.
3120 (i386_insert_aligned_watchpoint): Likewise.
3121 (i386_remove_aligned_watchpoint): Likewise.
3122 (i386_handle_nonaligned_watchpoint): Likewise.
3123 i386_update_inferior_debug_regs(): Likewise.
3124 (i386_dr_insert_watchpoint): Likewise.
3125 (i386_dr_remove_watchpoint): Likewise.
3126 (i386_dr_region_ok_for_watchpoint): Likewise.
3127 (i386_dr_stopped_data_address): Likewise.
3128 (i386_dr_stopped_by_watchpoint): Likewise.
3129
8f26655c
GB
31302014-06-19 Gary Benson <gbenson@redhat.com>
3131
3132 * i386-low.c (i386_dr_show): Renamed to
3133 i386_show_dr and made static. All uses updated.
3134 (i386_dr_length_and_rw_bits): Renamed to
3135 i386_length_and_rw_bits and made static.
3136 All uses updated.
3137 (i386_dr_insert_aligned_watchpoint): Renamed to
3138 i386_insert_aligned_watchpoint and made static.
3139 All uses updated.
3140 (i386_dr_remove_aligned_watchpoint): Renamed to
3141 i386_remove_aligned_watchpoint and made static.
3142 All uses updated.
3143 (i386_dr_update_inferior_debug_regs): Renamed to
3144 i386_update_inferior_debug_regs and made static.
3145 All uses updated.
3146
b9228891
GB
31472014-06-18 Gary Benson <gbenson@redhat.com>
3148
5171def3
GB
3149 * i386-low.h (i386_dr_low_can_set_addr): New macro.
3150 (i386_dr_low_can_set_control): Likewise.
3151 (i386_get_debug_register_length): Likewise.
3152 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
3153 (i386_dr_low_can_set_control): Likewise.
3154 (i386_get_debug_register_length): Likewise.
3155
31562014-06-17 Gary Benson <gbenson@redhat.com>
3157
b9228891
GB
3158 * i386-low.h (i386-dregs.h): New include.
3159 (DR_FIRSTADDR): Now in i386-dregs.h.
3160 (DR_LASTADDR): Likewise.
3161 (DR_NADDR): Likewise.
3162 (DR_STATUS): Likewise.
3163 (DR_CONTROL): Likewise.
3164 (i386_debug_reg_state): Likewise.
3165 (i386_dr_insert_watchpoint): Likewise.
3166 (i386_dr_remove_watchpoint): Likewise.
3167 (i386_dr_region_ok_for_watchpoint): Likewise.
3168 (i386_dr_stopped_data_address): Likewise.
3169 (i386_dr_stopped_by_watchpoint): Likewise.
3170 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
3171
4be83cc2
GB
31722014-06-18 Gary Benson <gbenson@redhat.com>
3173
3174 * i386-low.h (i386_low_insert_watchpoint): Renamed to
3175 i386_dr_insert_watchpoint.
3176 (i386_low_remove_watchpoint): Renamed to
3177 i386_dr_remove_watchpoint.
3178 (i386_low_region_ok_for_watchpoint): Renamed to
3179 i386_dr_region_ok_for_watchpoint.
3180 (i386_low_stopped_data_address): Renamed to
3181 i386_dr_stopped_data_address.
3182 (i386_low_stopped_by_watchpoint): Renamed to
3183 i386_dr_stopped_by_watchpoint.
3184 * i386-low.c (i386_show_dr): Renamed to
3185 i386_dr_show and made nonstatic. All uses updated.
3186 (i386_length_and_rw_bits): Renamed to
3187 i386_dr_length_and_rw_bits and made nonstatic.
3188 All uses updated.
3189 (i386_insert_aligned_watchpoint): Renamed to
3190 i386_dr_insert_aligned_watchpoint and made nonstatic.
3191 All uses updated.
3192 (i386_remove_aligned_watchpoint): Renamed to
3193 i386_dr_remove_aligned_watchpoint and made nonstatic.
3194 All uses updated.
3195 (i386_update_inferior_debug_regs): Renamed to
3196 i386_dr_update_inferior_debug_regs and made nonstatic.
3197 All uses updated.
3198 (i386_low_insert_watchpoint): Renamed to
3199 i386_dr_insert_watchpoint. All uses updated.
3200 (i386_low_remove_watchpoint): Renamed to
3201 i386_dr_remove_watchpoint. All uses updated.
3202 (i386_low_region_ok_for_watchpoint): Renamed to
3203 i386_dr_region_ok_for_watchpoint. All uses updated.
3204 (i386_low_stopped_data_address): Renamed to
3205 i386_dr_stopped_data_address. All uses updated.
3206 (i386_low_stopped_by_watchpoint): Renamed to
3207 i386_dr_stopped_by_watchpoint. All uses updated.
3208
131aa0d4
GB
32092014-06-18 Gary Benson <gbenson@redhat.com>
3210
3211 * i386-low.c (i386_dr_low_can_set_addr): New macro.
3212 (i386_dr_low_can_set_control): Likewise.
3213 (i386_insert_aligned_watchpoint): New check.
3214
d9305f7f
GB
32152014-06-18 Gary Benson <gbenson@redhat.com>
3216
3217 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
3218 Renamed to state.
3219
e927c9fc
GB
32202014-06-18 Gary Benson <gbenson@redhat.com>
3221
3222 * i386-low.c (i386_length_and_rw_bits): Use internal_error
3223 instead of fatal and error.
3224 (i386_handle_nonaligned_watchpoint): Likewise.
3225
1b6d4134
GB
32262014-06-18 Gary Benson <gbenson@redhat.com>
3227
3228 * i386-low.c (i386_get_debug_register_length): New macro.
3229 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
3230 (i386_show_dr): Use debug_printf instead of fprintf. Use
3231 phex to format values.
3232
6e62758f
GB
32332014-06-18 Gary Benson <gbenson@redhat.com>
3234
3235 * i386-low.h: Comment changes.
3236 * i386-low.c: Likewise.
3237
fc6e2f03
GB
32382014-06-18 Gary Benson <gbenson@redhat.com>
3239
3240 * i386-low.c: Whitespace changes.
3241
f9d1eeed
TT
32422014-06-12 Tom Tromey <tromey@redhat.com>
3243
3244 * utils.c (freeargv): Remove.
3245
0b04e523
TT
32462014-06-12 Tom Tromey <tromey@redhat.com>
3247
3248 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
3249 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
3250 (parse_debug_format_options): Likewise.
3251 (gdbserver_usage): Likewise.
3252 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
3253 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
3254 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
3255 against libiberty.
3256 ($(LIBGNU)): Depend on libiberty.
3257 (all-lib): Recurse into all subdirs.
3258 (install-only): Invoke "install" target in subdirs.
3259 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
3260 targets.
3261 * configure: Rebuild.
3262 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
3263 for vasprintf, vsnprintf, or gettimeofday.
3264 * configure.srv: Don't add safe-ctype.o or lbasename.o to
3265 srv_tgtobj.
3266
270c9937
JB
32672014-06-05 Joel Brobecker <brobecker@adacore.com>
3268
3269 * development.sh: Delete.
3270 * Makefile.in (config.status): Adjust dependency on development.sh.
3271 * configure.ac: Adjust development.sh source call.
3272 * configure: Regenerate.
3273
0a261ed8
PA
32742014-06-02 Pedro Alves <palves@redhat.com>
3275
3276 * ax.c (gdb_free_agent_expr): New function.
3277 * ax.h (gdb_free_agent_expr): New declaration.
3278 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
3279 list.
3280 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
3281 static.
3282 (clear_breakpoint_conditions_and_commands): New function.
3283 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
3284 (clear_breakpoint_conditions_and_commands): New declaration.
3285
e9dae05e
RR
32862014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
3287
3288 * linux-aarch64-low.c (asm/ptrace.h): Include.
3289
5876f503
JK
32902014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
3291
3292 Fix TLS access for -static -pthread.
3293 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
3294 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
3295 (thread_db_load_search, try_thread_db_load_1): Initialize it.
3296
802e8e6d
PA
32972014-05-20 Pedro Alves <palves@redhat.com>
3298
3299 * linux-aarch64-low.c (aarch64_insert_point)
3300 (aarch64_remove_point): No longer check whether the type is
3301 supported here. Adjust to new interface.
3302 (the_low_target): Install aarch64_supports_z_point_type as
3303 supports_z_point_type method.
3304 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
3305 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
3306 instead of a Z packet char. Adjust.
3307 (arm_supports_z_point_type): New function.
3308 (arm_insert_point, arm_remove_point): Adjust to new interface.
3309 (the_low_target): Install arm_supports_z_point_type.
3310 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
3311 (cris_insert_point, cris_remove_point): Adjust to new interface.
3312 Don't check whether the type is supported here.
3313 (the_low_target): Install cris_supports_z_point_type.
3314 * linux-low.c (linux_supports_z_point_type): New function.
3315 (linux_insert_point, linux_remove_point): Adjust to new interface.
3316 * linux-low.h (struct linux_target_ops) <insert_point,
3317 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
3318 raw_breakpoint pointer parameter.
3319 <supports_z_point_type>: New method.
3320 * linux-mips-low.c (mips_supports_z_point_type): New function.
3321 (mips_insert_point, mips_remove_point): Adjust to new interface.
3322 Use mips_supports_z_point_type.
3323 (the_low_target): Install mips_supports_z_point_type.
3324 * linux-ppc-low.c (the_low_target): Install NULL as
3325 supports_z_point_type method.
3326 * linux-s390-low.c (the_low_target): Install NULL as
3327 supports_z_point_type method.
3328 * linux-sparc-low.c (the_low_target): Install NULL as
3329 supports_z_point_type method.
3330 * linux-x86-low.c (x86_supports_z_point_type): New function.
3331 (x86_insert_point): Adjust to new insert_point interface. Use
3332 insert_memory_breakpoint. Adjust to new
3333 i386_low_insert_watchpoint interface.
3334 (x86_remove_point): Adjust to remove_point interface. Use
3335 remove_memory_breakpoint. Adjust to new
3336 i386_low_remove_watchpoint interface.
3337 (the_low_target): Install x86_supports_z_point_type.
3338 * lynx-low.c (lynx_target_ops): Install NULL as
3339 supports_z_point_type callback.
3340 * nto-low.c (nto_supports_z_point_type): New.
3341 (nto_insert_point, nto_remove_point): Adjust to new interface.
3342 (nto_target_ops): Install nto_supports_z_point_type.
3343 * mem-break.c: Adjust intro comment.
3344 (struct raw_breakpoint) <raw_type, size>: New fields.
3345 <inserted>: Update comment.
3346 <shlib_disabled>: Delete field.
3347 (enum bkpt_type) <gdb_breakpoint>: Delete value.
3348 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
3349 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
3350 (raw_bkpt_type_to_target_hw_bp_type): New function.
3351 (find_enabled_raw_code_breakpoint_at): New function.
3352 (find_raw_breakpoint_at): New type and size parameters. Use them.
3353 (insert_memory_breakpoint): New function, based off
3354 set_raw_breakpoint_at.
3355 (remove_memory_breakpoint): New function.
3356 (set_raw_breakpoint_at): Reimplement.
3357 (set_breakpoint): New, based on set_breakpoint_at.
3358 (set_breakpoint_at): Reimplement.
3359 (delete_raw_breakpoint): Go through the_target->remove_point
3360 instead of assuming memory breakpoints.
3361 (find_gdb_breakpoint_at): Delete.
3362 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
3363 (find_gdb_breakpoint): New function.
3364 (set_gdb_breakpoint_at): Delete.
3365 (z_type_supported): New function.
3366 (set_gdb_breakpoint_1): New function, loosely based off
3367 set_gdb_breakpoint_at.
3368 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
3369 (delete_gdb_breakpoint_at): Delete.
3370 (delete_gdb_breakpoint_1): New function, loosely based off
3371 delete_gdb_breakpoint_at.
3372 (delete_gdb_breakpoint): New function.
3373 (clear_gdb_breakpoint_conditions): Rename to ...
3374 (clear_breakpoint_conditions): ... this. Don't handle a NULL
3375 breakpoint.
3376 (add_condition_to_breakpoint): Make static.
3377 (add_breakpoint_condition): Take a struct breakpoint pointer
3378 instead of an address. Adjust.
3379 (gdb_condition_true_at_breakpoint): Rename to ...
3380 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
3381 z_type parameter.
3382 (gdb_condition_true_at_breakpoint): Reimplement.
3383 (add_breakpoint_commands): Take a struct breakpoint pointer
3384 instead of an address. Adjust.
3385 (gdb_no_commands_at_breakpoint): Rename to ...
3386 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
3387 parameter. Return true if no breakpoint was found. Change debug
3388 output.
3389 (gdb_no_commands_at_breakpoint): Reimplement.
3390 (run_breakpoint_commands): Rename to ...
3391 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
3392 and change return type to boolean.
3393 (run_breakpoint_commands): New function.
3394 (gdb_breakpoint_here): Also check for Z1 breakpoints.
3395 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
3396 breakpoint. Go through the_target->remove_point instead of
3397 assuming memory breakpoint.
3398 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
3399 software and hardware breakpoints.
3400 (reinsert_raw_breakpoint): Go through the_target->insert_point
3401 instead of assuming memory breakpoint.
3402 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
3403 software and hardware breakpoints.
3404 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
3405 Check both software and hardware breakpoints.
3406 (validate_inserted_breakpoint): Assert the breakpoint is a
3407 software breakpoint. Set the inserted flag to -1 instead of
3408 setting shlib_disabled.
3409 (delete_disabled_breakpoints): Adjust.
3410 (validate_breakpoints): Only validate software breakpoints.
3411 Adjust to inserted flag change.
3412 (check_mem_read, check_mem_write): Skip breakpoint types other
3413 than software breakpoints. Adjust to inserted flag change.
3414 * mem-break.h (enum raw_bkpt_type): New enum.
3415 (raw_breakpoint, struct process_info): Forward declare.
3416 (Z_packet_to_target_hw_bp_type): Delete declaration.
3417 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
3418 (set_gdb_breakpoint, delete_gdb_breakpoint)
3419 (clear_breakpoint_conditions): New declarations.
3420 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
3421 (breakpoint_inserted_here): Update comment.
3422 (add_breakpoint_condition, add_breakpoint_commands): Replace
3423 address parameter with a breakpoint pointer parameter.
3424 (gdb_breakpoint_here): Update comment.
3425 (delete_gdb_breakpoint_at): Delete.
3426 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
3427 * server.c (process_point_options): Take a struct breakpoint
3428 pointer instead of an address. Adjust.
3429 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
3430 delete_gdb_breakpoint.
3431 * spu-low.c (spu_target_ops): Install NULL as
3432 supports_z_point_type method.
3433 * target.h: Include mem-break.h.
3434 (struct target_ops) <prepare_to_access_memory>: Update comment.
3435 <supports_z_point_type>: New field.
3436 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
3437 instead of a char. Also take a raw breakpoint pointer.
3438 * win32-arm-low.c (the_low_target): Install NULL as
3439 supports_z_point_type.
3440 * win32-i386-low.c (i386_supports_z_point_type): New function.
3441 (i386_insert_point, i386_remove_point): Adjust to new interface.
3442 (the_low_target): Install i386_supports_z_point_type.
3443 * win32-low.c (win32_supports_z_point_type): New function.
3444 (win32_insert_point, win32_remove_point): Adjust to new interface.
3445 (win32_target_ops): Install win32_supports_z_point_type.
3446 * win32-low.h (struct win32_target_ops):
3447 <supports_z_point_type>: New method.
3448 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
3449 instead of a char. Also take a raw breakpoint pointer.
3450
932539e3
PA
34512014-05-20 Pedro Alves <palves@redhat.com>
3452
3453 * mem-break.h: Include break-common.h.
3454 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
3455 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
3456 (Z_packet_to_target_hw_bp_type): New declaration.
3457 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
3458 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
3459 (Z_PACKET_ACCESS_WP): Delete macros.
3460 (Z_packet_to_hw_type): Delete function.
3461 * i386-low.h: Don't include break-common.h here.
3462 (Z_packet_to_hw_type): Delete declaration.
3463 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
3464 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
3465 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
3466 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
3467 * linux-aarch64-low.c: Don't include break-common.h here.
3468 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
3469 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
3470 (Z_packet_to_target_hw_bp_type): Delete function.
3471 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
3472 function.
3473 (mips_insert_point, mips_remove_point): Use
3474 Z_packet_to_target_hw_bp_type.
3475
4ff0d3d8
PA
34762014-05-20 Pedro Alves <palves@redhat.com>
3477
3478 * linux-aarch64-low.c: Include break-common.h.
3479 (enum target_point_type): Delete.
3480 (Z_packet_to_point_type): Rename to ...
3481 (Z_packet_to_target_hw_bp_type): ... this, and return a
3482 target_hw_bp_type instead.
3483 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
3484 instead of an enum target_point_type.
3485 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
3486 breakpoint type.
3487 (aarch64_dr_state_insert_one_point)
3488 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
3489 (aarch64_handle_aligned_watchpoint)
3490 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
3491 Take an enum target_hw_bp_type instead of an enum
3492 target_point_type.
3493 (aarch64_supports_z_point_type): New function.
3494 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
3495 use Z_packet_to_target_hw_bp_type.
3496
786dc519
JB
34972014-05-20 Joel Brobecker <brobecker@adacore.com>
3498
3499 * configure.ac: Only use -Werror by default when DEVELOPMENT
3500 is true.
3501 * configure: Regenerate.
3502
9e0aa64f
JK
35032014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
3504
3505 Fix gdbserver qGetTLSAddr for x86_64 -m32.
3506 * linux-x86-low.c (X86_64_USER_REGS): New.
3507 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
3508
2b577b92
YQ
35092014-04-28 Yao Qi <yao@codesourcery.com>
3510
3511 * Makefile.in (i386-avx512.c): Fix the typo of generated file
3512 name.
3513
94611da2
PA
35142014-04-25 Pedro Alves <palves@redhat.com>
3515
3516 PR server/16255
3517 * linux-low.c (linux_attach_fail_reason_string): New function.
3518 (linux_attach_lwp): Delete.
3519 (linux_attach_lwp_1): Rename to ...
3520 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
3521 argument. Remove "initial" parameter. Return int instead of
3522 void. Don't error or warn here.
3523 (linux_attach): Adjust to call linux_attach_lwp. Call error on
3524 failure to attach to the tgid. Call warning when failing to
3525 attach to an lwp.
3526 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
3527 argument. Remove "initial" parameter. Return int instead of
3528 void. Don't error or warn here.
3529 (linux_attach_fail_reason_string): New declaration.
3530 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
3531 interface change. Use linux_attach_fail_reason_string.
3532
01f9f808
MS
35332014-04-24 Michael Sturm <michael.sturm@mintel.com>
3534 Walfred Tedeschi <walfred.tedeschi@intel.com>
3535
3536 * Makefile.in: Added rules to handle new files
3537 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
3538 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
3539 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
3540 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
3541 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
3542 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
3543 x32-avx512-linux.o.
3544 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
3545 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
3546 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
3547 i386/x32-avx512.xml.
3548 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
3549 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
3550 i386/x32-avx512-linux.xml.
3551 * i387-fp.c (num_avx512_k_registers): New constant for number
3552 of K registers.
3553 (num_avx512_zmmh_low_registers): New constant for number of
3554 lower ZMM registers (0-15).
3555 (num_avx512_zmmh_high_registers): New constant for number of
3556 higher ZMM registers (16-31).
3557 (num_avx512_ymmh_registers): New contant for number of higher
3558 YMM registers (ymm16-31 added by avx521 on x86_64).
3559 (num_avx512_xmm_registers): New constant for number of higher
3560 XMM registers (xmm16-31 added by AVX512 on x86_64).
3561 (struct i387_xsave): Add space for AVX512 registers.
3562 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
3563 Add code to handle AVX512 registers.
3564 (i387_xsave_to_cache): Add code to handle AVX512 registers.
3565 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
3566 prototypei from generated file.
3567 (tdesc_amd64_avx512_linux): Likewise.
3568 (init_registers_x32_avx512_linux): Likewise.
3569 (tdesc_x32_avx512_linux): Likewise.
3570 (init_registers_i386_avx512_linux): Likewise.
3571 (tdesc_i386_avx512_linux): Likewise.
3572 (x86_64_regmap): Add AVX512 registers.
3573 (x86_linux_read_description): Add code to handle AVX512 XSTATE
3574 mask.
3575 (initialize_low_arch): Add code to initialize AVX512 registers.
3576
51aa91f9
PA
35772014-04-23 Pedro Alves <palves@redhat.com>
3578
3579 * mem-break.c (find_gdb_breakpoint_at): Make static.
3580 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
3581
a4165e94
PA
35822014-04-23 Pedro Alves <palves@redhat.com>
3583
3584 * i386-low.c: Don't include break-common.h here.
3585 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
3586 prototype to take target_hw_bp_type as argument instead of a Z
3587 packet char.
3588 * i386-low.h: Include break-common.h here.
3589 (Z_packet_to_hw_type): Declare.
3590 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
3591 prototypes.
3592 * linux-x86-low.c (x86_insert_point): Convert the packet number to
3593 a target_hw_bp_type before calling i386_low_insert_watchpoint.
3594 (x86_remove_point): Convert the packet number to a
3595 target_hw_bp_type before calling i386_low_remove_watchpoint.
3596 * win32-i386-low.c (i386_insert_point): Convert the packet number
3597 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
3598 (i386_remove_point): Convert the packet number to a
3599 target_hw_bp_type before calling i386_low_remove_watchpoint.
3600
b8acf843
PA
36012014-04-23 Pedro Alves <palves@redhat.com>
3602
3603 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
3604
d708bcd1
PA
36052014-04-10 Pedro Alves <palves@redhat.com>
3606
3607 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
3608 Check if the condition or command is NULL before checking if the
3609 breakpoint is known. On success, return true.
3610 * mem-break.h (add_breakpoint_condition): Document return.
3611 (add_breakpoint_commands): Add describing comment.
3612 * server.c (skip_to_semicolon): New function.
3613 (process_point_options): Use it.
3614
2eec7d5b
PA
36152014-04-09 Pedro Alves <palves@redhat.com>
3616
3617 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
3618 to lwpid_of.
3619
fa96cb38
PA
36202014-02-27 Pedro Alves <palves@redhat.com>
3621
3622 PR 12702
3623 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
3624 macros.
3625 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
3626 output.
3627 (last_thread_of_process_p): Take a PID argument instead of a
3628 thread pointer.
3629 (linux_wait_for_lwp): Delete.
3630 (num_lwps, check_zombie_leaders, not_stopped_callback): New
3631 functions.
3632 (linux_low_filter_event): New function, party factored out from
3633 linux_wait_for_event.
3634 (linux_wait_for_event): Rename to ...
3635 (linux_wait_for_event_filtered): ... this. Add new filter ptid
3636 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
3637 sigsuspend. Check for zombie leaders.
3638 (linux_wait_for_event): Reimplement as wrapper around
3639 linux_wait_for_event_filtered.
3640 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
3641 a normal or signal exit is seen, it's the whole process exiting.
3642 (wait_for_sigstop): No longer a for_each_inferior callback.
3643 Rewrite on top of linux_wait_for_event_filtered.
3644 (stop_all_lwps): Call wait_for_sigstop directly.
3645 * server.c (resume, handle_target_event): Handle
3646 TARGET_WAITKIND_NO_RESUMED.
3647
d763de10
JB
36482014-02-26 Joel Brobecker <brobecker@adacore.com>
3649
3650 * win32-low.c (psapi_get_dll_name,
3651 * win32_CreateToolhelp32Snapshot): Delete.
3652 (win32_CreateToolhelp32Snapshot, win32_Module32First)
3653 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
3654 Delete.
3655 (handle_load_dll): Add function description.
3656 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
3657
850a0f76
JB
36582014-02-26 Joel Brobecker <brobecker@adacore.com>
3659
3660 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
3661 Add comment.
3662 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
3663 base address when calling win32_add_one_solib.
3664 (handle_load_dll): Delete local variable load_addr.
3665 Remove 0x1000 offset applied to DLL base address when calling
3666 win32_add_one_solib.
3667 (handle_unload_dll): Add comment.
3668
f25b3fc3
JB
36692014-02-26 Joel Brobecker <brobecker@adacore.com>
3670
3671 * win32-low.c (win32_add_all_dlls): Renames
3672 win32_ensure_ntdll_loaded. Rewrite function documentation.
3673 Adjust implementation to always load all DLLs.
3674 Add 0x1000 offset to DLL base address when calling
3675 win32_add_one_solib.
3676 (child_initialization_done): New static global.
3677 (do_initial_child_stuff): Set child_initialization_done to
3678 zero during child initialization, and 1 after. Replace call
3679 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
3680 Add comment.
3681 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
3682 (handle_unload_dll): Add function documentation.
3683 (get_child_debug_event): Ignore load and unload DLL events
3684 during child initialization.
3685
d86d4aaf
DE
36862014-02-20 Doug Evans <dje@google.com>
3687
3bc32da3 3688 Remove global all_lwps.
d86d4aaf
DE
3689 * inferiors.h (ptid_of): Move here from linux-low.h.
3690 (pid_of, lwpid_of): Ditto.
3691 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
3692 parameter is a struct thread_info * now.
3693 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
3694 directly. Pass &all_threads to find_inferior instead of &all_lwps.
3695 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
3696 directly.
3697 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
3698 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
3699 * linux-arm-low.c (update_registers_callback): Update, "entry"
3700 parameter is a struct thread_info * now.
3701 Fetch lwpid from current_inferior directly.
3702 (arm_insert_point): Pass &all_threads to find_inferior instead of
3703 &all_lwps.
3704 (arm_remove_point): Ditto.
3705 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
3706 (arm_prepare_to_resume): Fetch pid from thread.
3707 (arm_read_description): Fetch lwpid from current_inferior directly.
3708 * linux-low.c (all_lwps): Delete.
3709 (delete_lwp): Delete call to remove_inferior.
3710 (handle_extended_wait): Fetch lwpid from thread.
3711 (add_lwp): Don't set lwp->entry.id. Remove call to
3712 add_inferior_to_list.
3713 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
3714 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
3715 (kill_one_lwp_callback): Ditto.
3716 (linux_kill): Don't dereference NULL pointer.
3717 Fetch ptid,lwpid from thread.
3718 (get_detach_signal): Fetch ptid from thread.
3719 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
3720 Simplify call to regcache_invalidate_thread.
3721 (delete_lwp_callback): Update, "entry" parameter is a
3722 struct thread_info * now. Fetch pid from thread.
3723 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
3724 (status_pending_p_callback): Update, "entry" parameter is a
3725 struct thread_info * now. Fetch ptid from thread.
3726 (find_lwp_pid): Update, "entry" parameter is a
3727 struct thread_info * now.
3728 (linux_wait_for_lwp): Fetch pid from thread.
3729 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
3730 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
3731 (enqueue_one_deferred_signal): Fetch lwpid from thread.
3732 (dequeue_one_deferred_signal): Ditto.
3733 (cancel_breakpoint): Fetch ptid from current_inferior.
3734 (linux_wait_for_event): Pass &all_threads to find_inferior,
3735 not &all_lwps. Fetch ptid, lwpid from thread.
3736 (count_events_callback): Update, "entry" parameter is a
3737 struct thread_info * now.
3738 (select_singlestep_lwp_callback): Ditto.
3739 (select_event_lwp_callback): Ditto.
3740 (cancel_breakpoints_callback): Ditto.
3741 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
3742 not &all_lwps.
3743 (select_event_lwp): Ditto. Fetch ptid from event_thread.
3744 (unsuspend_one_lwp): Update, "entry" parameter is a
3745 struct thread_info * now.
3746 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
3747 not &all_lwps.
3748 (linux_stabilize_threads): Ditto. And for for_each_inferior.
3749 Fetch lwpid from thread, not lwp.
3750 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
3751 Pass &all_threads to find_inferior, not &all_lwps.
3752 (send_sigstop): Fetch lwpid from thread, not lwp.
3753 (send_sigstop_callback): Update, "entry" parameter is a
3754 struct thread_info * now.
3755 (suspend_and_send_sigstop_callback): Ditto.
3756 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
3757 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
3758 struct thread_info * now.
3759 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
3760 from thread, lwp.
3761 (lwp_running): Update, "entry" parameter is a
3762 struct thread_info * now.
3763 (stop_all_lwps): Fetch ptid from thread.
3764 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
3765 (linux_resume_one_lwp): Fetch lwpid from thread.
3766 (linux_set_resume_request): Update, "entry" parameter is a
3767 struct thread_info * now. Fetch pid, lwpid from thread.
3768 (resume_status_pending_p): Update, "entry" parameter is a
3769 struct thread_info * now.
3770 (need_step_over_p): Ditto. Fetch lwpid from thread.
3771 (start_step_over): Fetch lwpid from thread.
3772 (linux_resume_one_thread): Update, "entry" parameter is a
3773 struct thread_info * now. Fetch lwpid from thread.
3774 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
3775 (proceed_one_lwp): Update, "entry" parameter is a
3776 struct thread_info * now. Fetch lwpid from thread.
3777 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
3778 struct thread_info * now.
3779 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
3780 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
3781 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
3782 directly.
3783 (regsets_store_inferior_registers): Ditto.
3784 (fetch_register, store_register): Ditto.
3785 (linux_read_memory, linux_write_memory): Ditto.
3786 (linux_request_interrupt): Ditto.
3787 (linux_read_auxv): Ditto.
3788 (linux_xfer_siginfo): Ditto.
3789 (linux_qxfer_spu): Ditto.
3790 (linux_qxfer_libraries_svr4): Ditto.
3791 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
3792 moved to inferiors.h.
3793 (get_lwp): Delete.
3794 (get_thread_lwp): Update.
3795 (struct lwp_info): Delete member "entry". Simplify comment for
3796 member "thread".
3797 (all_lwps): Delete.
3798 * linux-mips-low.c (mips_read_description): Fetch lwpid from
3799 current_inferior directly.
3800 (update_watch_registers_callback): Update, "entry" parameter is a
3801 struct thread_info * now. Fetch pid from thread.
3802 (mips_linux_prepare_to_resume): Fetch ptid from thread.
3803 (mips_insert_point): Fetch lwpid from current_inferior.
3804 Pass &all_threads to find_inferior, not &all_lwps.
3805 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
3806 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
3807 directly.
3808 (mips_stopped_data_address): Ditto.
3809 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
3810 directly.
3811 * linux-tile-low.c (tile_arch_setup): Ditto.
3812 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
3813 (update_debug_registers_callback): Update, "entry" parameter is a
3814 struct thread_info * now. Fetch pid from thread.
3815 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
3816 Pass &all_threads to find_inferior, not &all_lwps.
3817 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
3818 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
3819 Pass &all_threads to find_inferior, not &all_lwps.
3820 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
3821 (i386_dr_low_get_status): Ditto.
3822 (x86_linux_prepare_to_resume): Fetch ptid from thread.
3823 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
3824 (x86_linux_read_description): Ditto.
3825 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
3826
3b8361aa
DE
38272014-02-20 Doug Evans <dje@google.com>
3828
3829 * inferiors.c (get_first_inferior): Fix buglet.
3830
f7667f0d
DE
38312014-02-19 Doug Evans <dje@google.com>
3832
3833 * gdbthread.h (add_thread): Change result type to struct thread_info *.
3834 * inferiors.c (add_thread): Change result type to struct thread_info *.
3835 All callers updated.
3836 (add_lwp): Call add_thread here instead of in callers.
3837 All callers updated.
3838 * linux-low.h (get_lwp_thread): Rewrite.
3839 (struct lwp_info): New member "thread".
3840
b3312d80
DE
38412014-02-19 Doug Evans <dje@google.com>
3842
3843 * linux-low.c (add_lwp): Change result to struct lwp_info *.
3844 All callers updated.
3845
ecc6f45c
DE
38462014-02-19 Doug Evans <dje@google.com>
3847
3848 * inferiors.c (add_thread): Fix whitespace.
3849
649ebbca
DE
38502014-02-19 Doug Evans <dje@google.com>
3851
3852 * dll.c (clear_dlls): Replace accessing list implemention details
3853 with API function.
3854 * gdbthread.h (get_first_thread): Declare.
3855 * inferiors.c (for_each_inferior_with_data): New function.
3856 (get_first_thread): New function.
3857 (find_thread_ptid): Simplify.
3858 (get_first_inferior): New function.
3859 (clear_list): Delete.
3860 (one_inferior_p): New function.
3861 (clear_inferior_list): New function.
3862 (clear_inferiors): Update.
3863 * inferiors.h (for_each_inferior_with_data): Declare.
3864 (clear_inferior_list): Declare.
3865 (one_inferior_p): Declare.
3866 (get_first_inferior): Declare.
3867 * linux-low.c (linux_wait_for_event): Replace accessing list
3868 implemention details with API function.
3869 * server.c (target_running): Ditto.
3870 (accumulate_file_name_length): New function.
3871 (emit_dll_description): New function.
3872 (handle_qxfer_libraries): Replace accessing list implemention
3873 details with API function.
3874 (handle_qxfer_threads_worker): New function.
3875 (handle_qxfer_threads_proper): Replace accessing list implemention
3876 details with API function.
3877 (handle_query): Ditto.
3878 (visit_actioned_threads_callback_ftype): New typedef.
3879 (visit_actioned_threads_data): New struct.
3880 (visit_actioned_threads): Rewrite to be find_inferior callback.
3881 (resume): Call find_inferior.
3882 (handle_status): Replace accessing list implemention
3883 details with API function.
3884 (process_serial_event): Replace accessing list implemention details
3885 with API function.
3886 * target.c (set_desired_inferior): Replace accessing list implemention
3887 details with API function.
3888 * tracepoint.c (same_process_p): New function.
3889 (gdb_agent_about_to_close): Replace accessing list implemention
3890 details with API function.
3891 * win32-low.c (child_delete_thread): Replace accessing list
3892 implemention details with API function.
3893 (match_dll_by_basename): New function.
3894 (dll_is_loaded_by_basename): New function.
3895 (win32_ensure_ntdll_loaded): Replace accessing list implemention
3896 details call to dll_is_loaded_by_basename.
3897
80894984
DE
38982014-02-19 Doug Evans <dje@google.com>
3899
3900 * dll.h (struct dll_info): Add comment.
3901 * gdbthread.h (struct thread_info): Add comment.
3902 (current_ptid): Simplify.
3903 * inferiors.c (add_process): Update.
3904 (remove_process): Update.
3905 * inferiors.h (struct process_info): Rename member "head" to "entry".
3906 * linux-low.c (delete_lwp): Update.
3907 (add_lwp): Update.
3908 (last_thread_of_process_p): Update.
3909 (kill_one_lwp_callback, linux_kill): Update.
3910 (status_pending_p_callback): Update.
3911 (wait_for_sigstop): Update. Simplify read of ptid.
3912 (start_step_over): Update.
3913 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
3914 (get_lwp_thread): Update.
3915 (struct lwp_info): Rename member "head" to "entry".
3916 * regcache.h (inferior_list_entry): Delete.
3917 * server.c (kill_inferior_callback): Update.
3918 (detach_or_kill_inferior_callback): Update.
3919 (print_started_pid): Update.
3920 (print_attached_pid): Update.
3921 (process_serial_event): Simplify read of ptid.
3922 * thread-db.c (thread_db_create_event): Update.
3923 (thread_db_get_tls_address): Update.
3924 * win32-low.c (current_inferior_ptid): Simplify.
3925
46917d26
TT
39262014-02-19 Tom Tromey <tromey@redhat.com>
3927
3928 * target.h (struct target_ops) <supports_btrace>: Add target_ops
3929 argument.
3930 (target_supports_btrace): Update.
3931
0759a81e
YQ
39322014-02-14 Yao Qi <yao@codesourcery.com>
3933
3934 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
3935 (rsp-low-ipa.o): New target.
3936
a7191e8b
TT
39372014-02-12 Tom Tromey <tromey@redhat.com>
3938
3939 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
3940 convert_ascii_to_int.
3941 * regcache.c (registers_to_string): Likewise.
3942 * remote-utils.c (decode_M_packet): Likewise.
3943 * server.c (process_serial_event): Likewise.
3944
ff0e980e
TT
39452014-02-12 Tom Tromey <tromey@redhat.com>
3946
3947 * server.c (handle_query, handle_v_run): Use hex2bin, not
3948 unhexify.
3949 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
3950
e9371aff
TT
39512014-02-12 Tom Tromey <tromey@redhat.com>
3952
3953 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
3954 convert_int_to_ascii.
3955 * regcache.c (registers_to_string, collect_register_as_string):
3956 Likewise.
3957 * remote-utils.c (look_up_one_symbol, relocate_instruction):
3958 Likewise.
3959 * server.c (process_serial_event): Likewise.
3960 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
3961 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
3962
971dc0b8
TT
39632014-02-12 Tom Tromey <tromey@redhat.com>
3964
3965 * remote-utils.c (look_up_one_symbol, monitor_output): Use
3966 bin2hex, not hexify.
3967 * tracepoint.c (cmd_qtstatus): Likewise.
3968
0a822afb
TT
39692014-02-12 Tom Tromey <tromey@redhat.com>
3970
3971 * remote-utils.c (monitor_output): Pass explicit length to
3972 hexify.
3973
9c3d6531
TT
39742014-02-12 Tom Tromey <tromey@redhat.com>
3975
3976 * tracepoint.c: Include rsp-low.h.
3977 * server.c: Include rsp-low.h.
3978 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
3979 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
3980 declare.
3981 * remote-utils.c: Include rsp-low.h.
3982 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
3983 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
3984 (convert_int_to_ascii, convert_ascii_to_int): Move to
3985 common/rsp-low.c.
3986 * regcache.c: Include rsp-low.h.
3987 * ax.c: Include rsp-low.h.
3988 * Makefile.in (SFILES): Add common/rsp-low.c.
3989 (OBS): Add rsp-low.o.
3990 (rsp-low.o): New target.
3991
01fd3ea5
TT
39922014-02-12 Tom Tromey <tromey@redhat.com>
3993
3994 * utils.h (pulongest, plongest, phex_nz): Don't declare.
3995 Include print-utils.h.
3996 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
3997 (plongest, thirty_two, phex_nz): Remove.
3998 * Makefile.in (SFILES): Add common/print-utils.c.
3999 (OBS): Add print-utils.o.
4000 (print-utils-ipa.o): New target.
4001 (print-utils.o): New target.
4002 (IPA_OBJS): Add print-utils-ipa.o.
4003
e99dc820
TT
40042014-02-06 Tom Tromey <tromey@redhat.com>
4005
4006 * Makefile.in (SFILES): Fix indentation.
4007
ee1e2d4f
DE
40082014-02-05 Doug Evans <dje@google.com>
4009
4010 * linux-low.c (linux_wait_for_event): Improve comment.
4011 (linux_wait_1): Keep current_inferior in sync with event_child.
4012
f5a02773
DE
40132014-01-22 Doug Evans <dje@google.com>
4014
4015 * gdbthread.h (gdb_id_to_thread): Delete, unused.
4016
87ce2a04
DE
40172014-01-22 Doug Evans <dje@google.com>
4018
4019 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
4020 * configure: Regenerate.
4021 * config.in: Regenerate.
4022 * Makefile.in (SFILES): Add debug.c.
4023 (OBS): Add debug.o.
4024 * debug.c: New file.
4025 * debug.h: New file.
4026 * linux-aarch64-low.c (*): Update all debugging printfs to use
4027 debug_printf instead of fprintf.
4028 * linux-arm-low.c (*): Ditto.
4029 * linux-cris-low.c (*): Ditto.
4030 * linux-crisv32-low.c (*): Ditto.
4031 * linux-m32r-low.c (*): Ditto.
4032 * linux-sparc-low.c (*): Ditto.
4033 * linux-x86.c (*): Ditto.
4034 * linux-low.c (*): Ditto.
4035 (linux_wait_1): Add calls to debug_enter, debug_exit.
4036 (linux_wait): Remove redundant debugging printf.
4037 (stop_all_lwps): Add calls to debug_enter, debug_exit.
4038 (linux_resume, unstop_all_lwps): Ditto.
4039 * mem-break.c (*): Update all debugging printfs to use
4040 debug_printf instead of fprintf.
4041 * remote-utils.c (*): Ditto.
4042 * thread-db.c (*): Ditto.
4043 * server.c #include <ctype.h>, "gdb_vecs.h".
4044 (debug_threads): Moved to debug.c.
4045 (*): Update all debugging printfs to use debug_printf instead of
4046 fprintf.
4047 (start_inferior): Replace call to fflush with call to debug_flush.
4048 (monitor_show_help): Mention set debug-format.
4049 (parse_debug_format_options): New function.
4050 (handle_monitor_command): Handle "monitor set debug-format".
4051 (gdbserver_usage): Mention --debug-format.
4052 (main): Parse --debug-format.
4053 * server.h (debug_threads): Declaration moved to debug.h.
4054 #include "debug.h".
4055 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
4056 trace_debug_1 that uses debug_printf.
4057 (tracepoint_look_up_symbols): Update all debugging printfs to use
4058 debug_printf instead of fprintf.
4059
e671835b
BS
40602014-01-20 Baruch Siach <baruch@tkos.co.il>
4061
4062 * linux-xtensa-low.c: Include asm/ptrace.h instead of
4063 sys/ptrace.h.
4064
b5737fa9
PA
40652014-01-17 Pedro Alves <palves@redhat.com>
4066
ea38d2a9 4067 PR build/16445
c7faa97a
PA
4068 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
4069 defined after including gdb_proc_service.h.
b5737fa9 4070
40ed484e
DE
40712014-01-16 Doug Evans <dje@google.com>
4072
4073 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
4074 (match_dll): Use it.
4075
969c39fb
MM
40762014-01-16 Markus Metzger <markus.t.metzger@intel.com>
4077
4078 * target.h (target_ops) <read_btrace>: Change parameters and
4079 return type to allow error reporting.
4080 * server.c (handle_qxfer_btrace): Support delta reads. Pass
4081 trace reading errors on.
4082 * linux-low.c (linux_low_read_btrace): Pass trace reading
4083 errors on.
4084 (linux_low_disable_btrace): New.
4085
ab7f45ba
DE
40862014-01-15 Doug Evans <dje@google.com>
4087
4088 * inferiors.c (thread_id_to_gdb_id): Delete.
4089 * inferiors.h (thread_id_to_gdb_id): Delete.
4090
66af0f44
EZ
40912014-01-13 Eli Zaretskii <eliz@gnu.org>
4092
4093 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
4094 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
4095 versions.
4096
9939e131
PA
40972014-01-08 Pedro Alves <palves@redhat.com>
4098
4099 * server.c (handle_status): Don't discard previous queued stop
4100 replies or thread's pending status here.
4101 (main) <disconnection>: Do it here instead.
4102
b7ea362b
PA
41032014-01-08 Pedro Alves <palves@redhat.com>
4104
4105 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
4106 * server.c (visit_actioned_threads, handle_pending_status): New
4107 function.
4108 (handle_v_cont): Factor out parts to ...
4109 (resume): ... this new function. If in all-stop, and a thread
4110 being resumed has a pending status, report it without actually
4111 resuming.
4112 (myresume): Adjust to use the new 'resume' function.
4113 (clear_pending_status_callback, set_pending_status_callback)
4114 (find_status_pending_thread_callback): New functions.
4115 (handle_status): Handle the case of multiple threads having
4116 interesting statuses to report. Report threads' real last signal
4117 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
4118 with an interesting thread to report the status for, instead of
4119 always reporting the status of the first thread.
4120
28498c42
JB
41212014-01-01 Joel Brobecker <brobecker@adacore.com>
4122
4123 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
4124 * gdbreplay.c (gdbreplay_version): Likewise.
4125
f45c82da
YZ
41262013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
4127
4128 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
4129 iov.iov_len with the real length in use.
4130
379a5e2d
JB
41312013-12-13 Joel Brobecker <brobecker@adacore.com>
4132
4133 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
4134 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
4135 for all targets that use win32-low.c.
4136 * win32-low.c (win32_ensure_ntdll_loaded): New function.
4137 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
4138
4210d83e
PA
41392013-12-13 Pedro Alves <palves@redhat.com>
4140
4141 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
4142 if equal to TARGET_WAITKIND_LOADED.
4143 * win32-low.c (cached_status): New static global.
4144 (win32_wait): Add declaration.
4145 (do_initial_child_stuff): Flush all initial pending debug events
4146 up to the initial breakpoint.
4147 (win32_wait): If CACHED_STATUS was set, return that instead
4148 of doing a real wait. Remove the code resuming the execution
4149 of the inferior after receiving a TARGET_WAITKIND_LOADED event
4150 during the initial phase. Also remove the code changing
4151 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
4152 TARGET_WAITKIND_STOPPED.
4153
e7f0d979
YQ
41542013-12-11 Yao Qi <yao@codesourcery.com>
4155
4156 * notif.c (handle_notif_ack): Return 0 if no notification
4157 matches.
4158
ebcf782c
DE
41592013-11-20 Doug Evans <dje@google.com>
4160
4161 * linux-low.c (linux_set_resume_request): Fix comment.
4162
20ad9378
DE
41632013-11-20 Doug Evans <dje@google.com>
4164
4165 * linux-low.c (resume_status_pending_p): Tweak comment.
4166
a196ebeb
WT
41672013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
4168
4169 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
4170 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
4171 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
4172 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
4173 (srv_amd64_regobj): Add amd64-mpx.o.
4174 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
4175 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
4176 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
4177 * i387-fp.c (num_pl_bnd_register) Added constant.
4178 (num_pl_bnd_cfg_registers) Added constant.
4179 (struct i387_xsave) Added reserved area and MPX fields.
4180 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
4181 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
4182 function.
4183 (tdesc_i386_mpx_linux): Add MPX amd64 target.
4184 (init_registers_amd64_mpx_linux): Declare new function.
4185 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
4186 (x86_64_regmap): Add MPX registers.
4187 (x86_linux_read_description): Add MPX case.
4188 (initialize_low_arch): Initialize MPX targets.
4189
0080a2f6
TT
41902013-11-18 Tom Tromey <tromey@redhat.com>
4191
4192 * configure: Rebuild.
4193 * configure.ac: Don't check for stdlib.h.
4194 * gdbreplay.c: Unconditionally include stdlib.h.
4195
2978b111
TT
41962013-11-18 Tom Tromey <tromey@redhat.com>
4197
4198 * config.in: Rebuild.
4199 * configure: Rebuild.
4200 * configure.ac: Don't use AC_HEADER_DIRENT.
4201
a3d08894
TT
42022013-11-18 Tom Tromey <tromey@redhat.com>
4203
4204 * server.h: Don't check HAVE_STRING_H.
4205 * gdbreplay.c: Don't check HAVE_STRING_H.
4206 * configure: Rebuild.
4207
0a5dd17d
TT
42082013-11-18 Tom Tromey <tromey@redhat.com>
4209
4210 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
4211 LIBGNU.
4212
1bd2f0ba
TT
42132013-11-08 Tom Tromey <tromey@redhat.com>
4214
4215 * configure, config.in: Rebuild.
4216 * configure.ac: Remove unused configury.
4217
3266f10b
TT
42182013-11-08 Tom Tromey <tromey@redhat.com>
4219
4220 * acinclude.m4: Include common.m4, codeset.m4.
4221 * configure, config.in: Rebuild.
4222 * configure.ac: Use GDB_AC_COMMON.
4223
6682d959
AA
42242013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
4225
4226 * linux-s390-low.c (HWCAP_S390_TE): New define.
4227 (s390_arch_setup): Consider the TE field in the HWCAP for
4228 determining 'have_regset_tdb'.
4229
fd0a4d76
SDJ
42302013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
4231
4232 PR gdb/16014
4233 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
4234 call to sizeof.
4235
1a3d890b
PA
42362013-10-02 Pedro Alves <palves@redhat.com>
4237
4238 * server.c (process_serial_event): Don't output "GDBserver
4239 exiting" if GDB is connected through stdio.
4240 * target.c (mywait): Likewise, be silent if GDB is connected
4241 through stdio.
4242
97ad4581
JB
42432013-10-01 Joel Brobecker <brobecker@adacore.com>
4244
4245 * lynx-low.c (lynx_add_threads_after_attach): New function.
4246 (lynx_attach): Remove call to add_thread. Add call to
4247 lynx_add_threads_after_attach instead.
4248
5b4e221c
MF
42492013-09-28 Mike Frysinger <vapier@gentoo.org>
4250
4251 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
4252 * config.in, configure: Regenerated.
4253
ee47b2f8
YQ
42542013-09-18 Yao Qi <yao@codesourcery.com>
4255
4256 PR server/15959
4257 * server.c (start_inferior): Clear 'resume_info'.
4258
d6707650 42592013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 4260
d6707650
JW
4261 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
4262 for each register.
4263
9243dd0e 42642013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 4265
9243dd0e
JW
4266 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
4267 linux-tile-low.o to srv_tgtobj.
4268
c623a6ef
WN
42692013-09-16 Will Newton <will.newton@linaro.org>
4270
4271 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
4272 out regs.
4273
fb71d39e
PA
42742013-09-06 Pedro Alves <palves@redhat.com>
4275
4276 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
4277 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
4278 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
4279 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
4280 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
4281 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
4282
8e7e9910
PA
42832013-09-06 Pedro Alves <palves@redhat.com>
4284
4285 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
4286 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
4287
7c3a12ca
PA
42882013-09-06 Pedro Alves <palves@redhat.com>
4289
4290 * linux-amd64-ipa.c: Include tracepoint.h.
4291 * linux-i386-ipa.c: Include tracepoint.h.
4292
8eb3d7b6
RW
42932013-09-06 Ricard Wanderlof <ricardw@axis.com>
4294
4295 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
4296 (ps_get_thread_area): New function.
4297
eddddb9d
RW
42982013-09-06 Ricard Wanderlof <ricardw@axis.com>
4299
4300 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
4301 (initialize_low_arch): Call init_registers_crisv32 rather than
4302 init_register_crisv32.
4303
533b0600
PA
43042013-09-05 Pedro Alves <palves@redhat.com>
4305
4306 * server.h (handle_vFile, hostio_last_error_from_errno): Move
4307 to ...
4308 * hostio.h: ... this new file.
4309 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
4310 win32-low.c: Include hostio.h.
4311
0ce3d3b5
PA
43122013-09-05 Pedro Alves <palves@redhat.com>
4313
4314 * server.h (gdb_client_data, handler_func, callback_handler_func)
4315 (delete_file_handler, add_file_handler, append_callback_event)
4316 (delete_callback_event, start_event_loop, initialize_event_loop):
4317 Move to event-loop.h and include it.
4318 * event-loop.h: New file.
4319
799cdc37
PA
43202013-09-05 Pedro Alves <palves@redhat.com>
4321
4322 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
4323 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
4324 (loaded_dll, unloaded_dll): Move to ...
4325 * dll.h: ... this new file.
4326 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
4327
6a6bbd9d
PA
43282013-09-05 Pedro Alves <palves@redhat.com>
4329
4330 * server.h (current_process, get_thread_process, all_processes)
4331 (add_inferior_to_list, for_each_inferior, current_inferior)
4332 (remove_inferior, add_process, remove_process, find_process_pid)
4333 (have_started_inferiors_p, have_attached_inferiors_p)
4334 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
4335 (clear_inferiors, find_inferior, find_inferior_id)
4336 (inferior_target_data, set_inferior_target_data)
4337 (inferior_regcache_data, set_inferior_regcache_data): Move to
4338 inferiors.h, and include it.
4339 * inferiors.h: New file.
4340
f699aaba
PA
43412013-09-05 Pedro Alves <palves@redhat.com>
4342
4343 * server.h (struct emit_ops, current_insn_ptr, emit_error):
4344 Move ...
72f4393d 4345 * ax.h: ... here.
f699aaba 4346
c144c7a0
PA
43472013-09-05 Pedro Alves <palves@redhat.com>
4348
4349 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
4350 tracepoint.h.
4351 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
4352 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
4353 (handle_tracepoint_general_set, handle_tracepoint_query)
4354 (tracepoint_finished_step, tracepoint_was_hit)
4355 (release_while_stepping_state_list, current_traceframe)
4356 (in_readonly_region, traceframe_read_mem)
4357 (fetch_traceframe_registers, traceframe_read_sdata)
4358 (traceframe_read_info, struct fast_tpoint_collect_status)
4359 (fast_tracepoint_collecting, force_unlock_trace_buffer)
4360 (handle_tracepoit_bkpts, initialize_low_tracepoint)
4361 (supply_fast_tracepoint_registers)
4362 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
4363 (ipa_tdesc, claim_trampoline_space)
4364 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
4365 (agent_mem_read, agent_get_trace_state_variable_value)
4366 (agent_set_trace_state_variable_value, agent_tsv_read)
4367 (agent_mem_read_string, get_raw_reg_func_addr)
4368 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
4369 * tracepoint.h: ... this new file.
4370
ff42e6ab
PA
43712013-09-05 Pedro Alves <palves@redhat.com>
4372
4373 * server.h (perror_with_name, error, fatal, warning, paddress)
4374 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
4375 include it.
4376 * utils.h: New file.
4377
541af0f4
PA
43782013-09-05 Pedro Alves <palves@redhat.com>
4379
4380 * server.h (remote_debug, noack_mode, transport_is_reliable)
4381 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
4382 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
4383 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
4384 (write_enn, initialize_async_io, enable_async_io)
4385 (disable_async_io, check_remote_input_interrupt_request)
4386 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
4387 (dead_thread_notify, prepare_resume_reply)
4388 (decode_address_to_semicolon, decode_address, decode_m_packet)
4389 (decode_M_packet, decode_X_packet, decode_xfer_write)
4390 (decode_search_memory_packet, unhexify, hexify)
4391 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
4392 (look_up_one_symbol, relocate_instruction)
4393 (monitor_output): Move to remote-utils.h, and include it.
4394 * remote-utils.h: New file.
4395
eebdf26b
PA
43962013-09-05 Pedro Alves <palves@redhat.com>
4397
4398 * server.h (_): Delete.
4399
3aafd2ff
PA
44002013-09-02 Pedro Alves <palves@redhat.com>
4401
4402 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
4403 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
4404 allocated.
4405 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
4406
cee83bcb
PM
44072013-09-02 Pierre Muller <muller@sourceware.org>
4408
4409 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
4410 or WriteProcessMemory complete successfully and handle
4411 ERROR_PARTIAL_COPY error.
4412
9a13b2fa
PA
44132013-09-02 Pedro Alves <palves@redhat.com>
4414
4415 * server.c (gdb_read_memory): Return -1 on traceframe memory read
4416 error instead of EIO.
4417
602e3198
JK
44182013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4419
4420 PR server/15604
4421 * linux-low.c: Include filestuff.h.
4422 (linux_create_inferior) <pid == 0>: Call close_most_fds.
4423 * lynx-low.c: Include filestuff.h.
4424 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
4425 * server.c: Include filestuff.h.
4426 (main): Call notice_open_fds.
4427 * spu-low.c: Include filestuff.h.
4428 (spu_create_inferior) <pid == 0>: Call close_most_fds.
4429
96d7229d
LM
44302013-08-22 Luis Machado <lgustavo@codesourcery.com>
4431
4432 * Makefile.in: Explain why ../target and ../nat are not
4433 listed as include file search paths.
4434 (linux-waitpid.o): New object file rule.
4435 * configure.srv (srv_native_linux_obj): New variable.
4436 Replace all occurrences of linux native object files with
4437 $srv_native_linux_obj.
4438 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
4439 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
4440 (linux_enable_event_reporting): Remove declaration.
4441 (my_waitpid): Moved to common/linux-waitpid.c.
4442 (linux_wait_for_event): Pass ptid when calling
4443 linux_enable_event_reporting.
4444 (linux_supports_tracefork_flag): Remove.
4445 (linux_enable_event_reporting): Likewise.
4446 (linux_tracefork_grandchild): Remove.
4447 (STACK_SIZE): Moved to common/linux-ptrace.c.
4448 (linux_tracefork_child): Remove.
4449 (linux_test_for_tracefork): Remove.
4450 (linux_look_up_symbols): Call linux_supports_traceclone.
4451 (initialize_low): Remove call to linux_test_for_tracefork.
4452 * linux-low.h (PTRACE_TYPE_ARG3): Move to
4453 common/linux-ptrace.h.
4454 (PTRACE_TYPE_ARG4): Likewise.
4455 Include linux-ptrace.h.
4456
32940073
PA
44572013-08-21 Pedro Alves <palves@redhat.com>
4458
4459 * config.in: Renegerate.
4460
33b60d58 44612013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 4462
33b60d58
LM
4463 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
4464 (SFILES): Remove $(srcdir)/common/target-common.c and
4465 add $(srcdir)/target/waitstatus.c.
4466 (OBS): Remove target-common.o and add waitstatus.o.
4467 (server_h): Remove $(srcdir)/../common/target-common.h and
4468 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
4469 and $(srcdir)/../target/waitstatus.h.
4470 (target-common.o): Remove.
4471 (waitstatus.o): New target object file.
4472 * target.h: Do not include target-common.h and
4473 include target/resume.h, target/wait.h and
4474 target/waitstatus.h.
4475
b8e1b30e
LM
44762013-08-13 Luis Machado <lgustavo@codesourcery.com>
4477
4478 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
4479 to PTRACE_TYPE_ARG3.
4480 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
4481 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
4482 PTRACE_TYPE_ARG4.
4483 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
4484 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
4485
7a60ad40
YQ
44862013-07-27 Jie Zhang <jie@codesourcery.com>
4487 Daniel Jacobowitz <dan@codesourcery.com>
4488 Yao Qi <yao@codesourcery.com>
4489
4490 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
4491 (mips-linux-watch.o): New rule.
4492 (mips_linux_watch_h): New variable.
4493 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
4494 srv_tgtobj.
4495 * linux-mips-low.c: Include mips-linux-watch.h.
4496 (struct arch_process_info, struct arch_lwp_info): New.
4497 (update_watch_registers_callback): New function.
4498 (mips_linux_new_process, mips_linux_new_thread) New functions.
4499 (mips_linux_prepare_to_resume, mips_insert_point): New
4500 functions.
4501 (mips_remove_point, mips_stopped_by_watchpoint): New
4502 functions.
4503 (rsp_bp_type_to_target_hw_bp_type): New function.
4504 (mips_stopped_data_address): New function.
4505 (the_low_target): Add watchpoint support functions.
4506
de6f69ad
YQ
45072013-07-27 Yao Qi <yao@codesourcery.com>
4508
4509 * i386-low.c: Include break-common.h.
4510 (enum target_hw_bp_type): Remove.
4511
3360c0bf
LM
45122013-07-24 Luis Machado <lgustavo@codesourcery.com>
4513
4514 * Makefile.in (SFILES): /common/target-common.c.
4515 (OBS): Add target-common.o.
4516 (server_h): Add $(srcdir)/../common/target-common.h.
4517 (target-common.o): New target.
4518 * server.c (queue_stop_reply_callback): Free
4519 status string after use.
4520 * target.c (target_waitstatus_to_string): Remove.
4521 * target.h: Include target-common.h.
4522 (resume_kind): Likewise.
4523 (target_waitkind): Likewise.
4524 (target_waitstatus): Likewise.
4525 (TARGET_WNOHANG): Likewise.
4526
bd885420
YQ
45272013-07-04 Yao Qi <yao@codesourcery.com>
4528
4529 * Makefile.in (host_alias): Use @host_noncanonical@.
4530 (target_alias): Use @target_noncanonical@.
4531 * configure.ac: Use ACX_NONCANONICAL_TARGET and
4532 ACX_NONCANONICAL_HOST.
4533 * configure: Regenerated.
4534
4535 Revert:
4536 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
4537
4538 * configure.ac (version_host, version_target): Set and AC_SUBST them.
4539 * configure: Rebuild.
4540 * Makefile.in (version_host, version_target): Get from configure.
4541 (version.c): Use $(version_host) and $(version_target).
4542
17ef446e
PA
45432013-07-03 Pedro Alves <palves@redhat.com>
4544
4545 * Makefile.in (config.status): Depend on development.sh.
4546 * acinclude.m4: Include libmcheck.m4.
4547 * configure: Regenerate.
4548
7a9a7487
MG
45492013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
4550
4551 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
4552 attribute inside the parentheses.
4553 (winapi_DebugSetProcessKillOnExit): Ditto.
4554 (winapi_DebugBreakProcess): Ditto.
4555 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 4556
49b64de6
MG
45572013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
4558
4559 * notif.h (notif_event): Add a dummy member to avoid compiler
4560 errors.
4561
d5749ee7
PA
45622013-07-01 Pedro Alves <palves@redhat.com>
4563
4564 * hostio.c (HOSTIO_PATH_MAX): Define.
4565 (require_filename, handle_open, handle_unlink, handle_readlink):
4566 Use it.
4567
d8d2a3ee
PA
45682013-07-01 Pedro Alves <palves@redhat.com>
4569
4570 * server.h: Include "pathmax.h".
4571 * linux-low.c: Don't include sys/param.h.
4572 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
4573 MAXPATHLEN.
4574 * win32-low.c: Don't include sys/param.h.
4575 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
4576
bc7dea8d
PA
45772013-07-01 Pedro Alves <palves@redhat.com>
4578
4579 * event-loop.c: Don't check HAVE_UNISTD_H before including
4580 <unistd.h>.
4581 * gdbreplay.c: Likewise.
4582 * remote-utils.c: Likewise.
4583 * server.c: Likewise.
4584 * configure.ac: Don't check for unistd.h.
4585 * configure: Regenerate.
4586
d6c2da54
TT
45872013-06-28 Tom Tromey <tromey@redhat.com>
4588
4589 * Makefile.in (version.c): Use version.in, not
4590 common/version.in.
4591
257b6bec
MG
45922013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
4593
4594 * configure.ac (version_host, version_target): Set and AC_SUBST them.
4595 * configure: Rebuild.
4596 * Makefile.in (version_host, version_target): Get from configure.
4597 (version.c): Use $(version_host) and $(version_target).
4598
86ebe149
DK
45992013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
4600
4601 Fix trace-status to output user name without trailing colon.
4602 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
4603
f30aa5af
DK
46042013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
4605
4606 Fix trace-status to output proper start-time and stop-time.
4607 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
4608 output start time and stop time in hex as gdb expects.
4609
28a93511
YQ
46102013-06-26 Pedro Alves <pedro@codesourcery.com>
4611
4612 * tracepoint.c (build_traceframe_info_xml): Output trace state
4613 variables present in the trace buffer.
4614
01208463
TT
46152013-06-24 Tom Tromey <tromey@redhat.com>
4616
4617 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
4618 create-version.sh.
4619 (version.o): Remove.
4620 * gdbreplay.c: Include version.h.
4621 (version, host_name): Don't declare.
4622 * server.h: Include version.h.
4623 (version, host_name): Don't declare.
4624
760256f9
PA
46252013-06-12 Pedro Alves <palves@redhat.com>
4626
4627 * linux-x86-low.c (linux_is_elf64): Delete global.
4628 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
4629 with local linux_pid_exe_is_elf_64_file use.
4630
030031ee
PA
46312013-06-11 Pedro Alves <palves@redhat.com>
4632
4633 * linux-low.c (regset_disabled, disable_regset): New functions.
4634 (regsets_fetch_inferior_registers)
4635 (regsets_store_inferior_registers): Use them.
4636 (initialize_regsets_info); Don't allocate the disabled_regsets
4637 array here.
4638 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
4639 comment.
4640
5da6eb0a
PA
46412013-06-11 Pedro Alves <palves@redhat.com>
4642
4643 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
4644 xmalloc.
4645
7e5aaa09
PA
46462013-06-11 Pedro Alves <palves@redhat.com>
4647
4648 * linux-x86-low.c (initialize_low_arch): Call
4649 init_registers_x32_avx_linux.
4650
d878444c
JK
46512013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
4652
4653 Fix compatibility with Android Bionic.
4654 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
4655 it is not empty.
4656
3aee8918
PA
46572013-06-07 Pedro Alves <palves@redhat.com>
4658
5f2b57b5 4659 PR server/14823
3aee8918
PA
4660 * Makefile.in (OBS): Add tdesc.o.
4661 (IPA_OBJS): Add tdesc-ipa.o.
4662 (tdesc-ipa.o): New rule.
4663 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
4664 interface.
4665 * linux-low.c (new_inferior): Delete.
4666 (disabled_regsets, num_regsets): Delete.
4667 (linux_add_process): Adjust to set the new per-process
4668 new_inferior flag.
4669 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
4670 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
4671 was a stop. When calling arch_setup, switch the current inferior
4672 to the thread that got an event.
4673 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
4674 (regsets_fetch_inferior_registers)
4675 (regsets_store_inferior_registers): New regsets_info parameter.
4676 Adjust to use it.
4677 (linux_register_in_regsets): New regs_info parameter. Adjust to
4678 use it.
4679 (register_addr, fetch_register, store_register): New usrregs_info
4680 parameter. Adjust to use it.
4681 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
4682 parameter regs_info. Adjust to use it.
4683 (linux_fetch_registers): Get the current inferior's regs_info, and
4684 adjust to use it.
4685 (linux_store_registers): Ditto.
4686 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
4687 (initialize_low): Don't initialize the target_regsets here. Call
4688 initialize_low_arch.
4689 * linux-low.h (target_regsets): Delete declaration.
4690 (struct regsets_info): New.
4691 (struct usrregs_info): New.
4692 (struct regs_info): New.
4693 (struct process_info_private) <new_inferior>: New field.
4694 (struct linux_target_ops): Delete the num_regs, regmap, and
4695 regset_bitmap fields. New field regs_info.
4696 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
4697 * i387-fp.c (num_xmm_registers): Delete.
4698 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
4699 calls to new interface.
4700 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
4701 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
4702 Infer the number of xmm registers from the regcache's target
4703 description.
4704 * i387-fp.h (num_xmm_registers): Delete.
4705 * inferiors.c (add_thread): Don't install the thread's regcache
4706 here.
4707 * proc-service.c (gregset_info): Fetch the current inferior's
4708 regs_info. Adjust to use it.
4709 * regcache.c: Include tdesc.h.
4710 (register_bytes, reg_defs, num_registers)
4711 (gdbserver_expedite_regs): Delete.
4712 (get_thread_regcache): If the thread doesn't have a regcache yet,
4713 create one, instead of aborting gdbserver.
4714 (regcache_invalidate_one): Rename to ...
4715 (regcache_invalidate_thread): ... this.
4716 (regcache_invalidate_one): New.
4717 (regcache_invalidate): Only invalidate registers of the current
4718 process.
4719 (init_register_cache): Add target_desc parameter, and use it.
4720 (new_register_cache): Ditto. Assert the target description has a
4721 non zero registers_size.
4722 (regcache_cpy): Add assertions. Adjust.
4723 (realloc_register_cache, set_register_cache): Delete.
4724 (registers_to_string, registers_from_string): Adjust.
4725 (find_register_by_name, find_regno, find_register_by_number)
4726 (register_cache_size): Add target_desc parameter, and use it.
4727 (free_register_cache_thread, free_register_cache_thread_one)
4728 (regcache_release, register_cache_size): New.
4729 (register_size): Add target_desc parameter, and use it.
4730 (register_data, supply_register, supply_register_zeroed)
4731 (supply_regblock, supply_register_by_name, collect_register)
4732 (collect_register_as_string, collect_register_by_name): Adjust.
4733 * regcache.h (struct target_desc): Forward declare.
4734 (struct regcache) <tdesc>: New field.
4735 (init_register_cache, new_register_cache): Add target_desc
4736 parameter.
4737 (regcache_invalidate_thread): Declare.
4738 (regcache_invalidate_one): Delete declaration.
4739 (regcache_release): Declare.
4740 (find_register_by_number, register_cache_size, register_size)
4741 (find_regno): Add target_desc parameter.
4742 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
4743 declarations.
4744 * remote-utils.c: Include tdesc.h.
4745 (outreg, prepare_resume_reply): Adjust.
4746 * server.c: Include tdesc.h.
4747 (gdbserver_xmltarget): Delete declaration.
4748 (get_features_xml, process_serial_event): Adjust.
4749 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
4750 declare.
4751 (struct process_info) <tdesc>: New field.
4752 (ipa_tdesc): Declare.
4753 * tdesc.c: New file.
4754 * tdesc.h: New file.
4755 * tracepoint.c: Include tdesc.h.
4756 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
4757 (get_context_regcache): Adjust to pass ipa_tdesc down.
4758 (do_action_at_tracepoint): Adjust to get the register cache size
4759 from the context regcache's description.
4760 (traceframe_walk_blocks): Adjust to get the register cache size
4761 from the current trace frame's description.
4762 (traceframe_get_pc): Adjust to get current trace frame's
4763 description and pass it down.
4764 (gdb_collect): Adjust to get the register cache size from the
4765 IPA's description.
4766 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
4767 (gdbserver_xmltarget): Delete.
4768 (initialize_low_tracepoint): Set the ipa's target description.
4769 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
4770 (initialize_low_tracepoint): Set the ipa's target description.
4771 * linux-x86-low.c: Include tdesc.h.
4772 [__x86_64__] (is_64bit_tdesc): New.
4773 (ps_get_thread_area, x86_get_thread_area): Use it.
4774 (i386_cannot_store_register): Rename to ...
4775 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
4776 (i386_cannot_fetch_register): Rename to ...
4777 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
4778 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
4779 to new interface.
4780 (target_regsets): Rename to ...
4781 (x86_regsets): ... this.
4782 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
4783 interface.
4784 (x86_siginfo_fixup): Use is_64bit_tdesc.
4785 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
4786 (tdesc_x32_avx_linux, tdesc_x32_linux)
4787 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
4788 Declare.
4789 (x86_linux_update_xmltarget): Delete.
4790 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
4791 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
4792 (AMD64_LINUX_USER64_CS): New.
4793 (x86_linux_read_description): New, based on
4794 x86_linux_update_xmltarget.
4795 (same_process_callback): New.
4796 (x86_arch_setup_process_callback): New.
4797 (x86_linux_update_xmltarget): New.
4798 (x86_regsets_info): New.
4799 (amd64_linux_regs_info): New.
4800 (i386_linux_usrregs_info): New.
4801 (i386_linux_regs_info): New.
4802 (x86_linux_regs_info): New.
4803 (x86_arch_setup): Reimplement.
4804 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
4805 (x86_emit_ops): Ditto.
4806 (the_low_target): Adjust. Install x86_linux_regs_info,
4807 x86_cannot_fetch_register, and x86_cannot_store_register.
4808 (initialize_low_arch): New.
4809 * linux-ia64-low.c (tdesc_ia64): Declare.
4810 (ia64_fetch_register): Adjust.
4811 (ia64_usrregs_info, regs_info): New globals.
4812 (ia64_regs_info): New function.
4813 (the_low_target): Adjust.
4814 (initialize_low_arch): New function.
4815 * linux-sparc-low.c (tdesc_sparc64): Declare.
4816 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
4817 Adjust.
4818 (sparc_arch_setup): New function.
4819 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
4820 (the_low_target): Adjust.
4821 (initialize_low_arch): New function.
4822 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
4823 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
4824 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
4825 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
4826 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
4827 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
4828 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
4829 (tdesc_powerpc_isa205_vsx64l): Declare.
4830 (ppc_cannot_store_register, ppc_collect_ptrace_register)
4831 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
4832 (ppc_set_pc, ppc_get_hwcap): Adjust.
4833 (ppc_usrregs_info): Forward declare.
4834 (!__powerpc64__) ppc_regmap_adjusted: New global.
4835 (ppc_arch_setup): Adjust to the current process'es target
4836 description.
4837 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
4838 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
4839 (ppc_store_evrregset): Adjust.
4840 (target_regsets): Rename to ...
4841 (ppc_regsets): ... this, and make static.
4842 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
4843 (ppc_regs_info): New function.
4844 (the_low_target): Adjust.
4845 (initialize_low_arch): New function.
4846 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
4847 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
4848 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
4849 (tdesc_s390x_linux64v2): Declare.
4850 (s390_collect_ptrace_register, s390_supply_ptrace_register)
4851 (s390_fill_gregset, s390_store_last_break): Adjust.
4852 (target_regsets): Rename to ...
4853 (s390_regsets): ... this, and make static.
4854 (s390_get_pc, s390_set_pc): Adjust.
4855 (s390_get_hwcap): New target_desc parameter, and use it.
4856 [__s390x__] (have_hwcap_s390_high_gprs): New global.
4857 (s390_arch_setup): Adjust to set the current process'es target
4858 description. Don't adjust the regmap.
4859 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
4860 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
4861 (regs_info_3264): New globals.
4862 (s390_regs_info): New function.
4863 (the_low_target): Adjust.
4864 (initialize_low_arch): New function.
4865 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
4866 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
4867 [__mips64] (init_registers_mips_linux)
4868 (init_registers_mips_dsp_linux): Delete defines.
4869 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
4870 (have_dsp): New global.
4871 (mips_read_description): New, based on mips_arch_setup.
4872 (mips_arch_setup): Reimplement.
4873 (get_usrregs_info): New function.
4874 (mips_cannot_fetch_register, mips_cannot_store_register)
4875 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
4876 (mips_fill_fpregset, mips_store_fpregset): Adjust.
4877 (target_regsets): Rename to ...
4878 (mips_regsets): ... this, and make static.
4879 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
4880 (dsp_regs_info, regs_info): New globals.
4881 (mips_regs_info): New function.
4882 (the_low_target): Adjust.
4883 (initialize_low_arch): New function.
4884 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
4885 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
4886 Declare.
4887 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
4888 (arm_read_description): New, with bits factored from
4889 arm_arch_setup.
4890 (arm_arch_setup): Reimplement.
4891 (target_regsets): Rename to ...
4892 (arm_regsets): ... this, and make static.
4893 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
4894 (arm_regs_info): New function.
4895 (the_low_target): Adjust.
4896 (initialize_low_arch): New function.
4897 * linux-m68k-low.c (tdesc_m68k): Declare.
4898 (target_regsets): Rename to ...
4899 (m68k_regsets): ... this, and make static.
4900 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
4901 (m68k_regs_info): New function.
4902 (m68k_arch_setup): New function.
4903 (the_low_target): Adjust.
4904 (initialize_low_arch): New function.
4905 * linux-sh-low.c (tdesc_sharch): Declare.
4906 (target_regsets): Rename to ...
4907 (sh_regsets): ... this, and make static.
4908 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
4909 (sh_regs_info, sh_arch_setup): New functions.
4910 (the_low_target): Adjust.
4911 (initialize_low_arch): New function.
4912 * linux-bfin-low.c (tdesc_bfin): Declare.
4913 (bfin_arch_setup): New function.
4914 (bfin_usrregs_info, regs_info): New globals.
4915 (bfin_regs_info): New function.
4916 (the_low_target): Adjust.
4917 (initialize_low_arch): New function.
4918 * linux-cris-low.c (tdesc_cris): Declare.
4919 (cris_arch_setup): New function.
4920 (cris_usrregs_info, regs_info): New globals.
4921 (cris_regs_info): New function.
4922 (the_low_target): Adjust.
4923 (initialize_low_arch): New function.
4924 * linux-cris-low.c (tdesc_crisv32): Declare.
4925 (cris_arch_setup): New function.
4926 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
4927 (cris_regs_info): New function.
4928 (the_low_target): Adjust.
4929 (initialize_low_arch): New function.
4930 * linux-m32r-low.c (tdesc_m32r): Declare.
4931 (m32r_arch_setup): New function.
4932 (m32r_usrregs_info, regs_info): New globals.
4933 (m32r_regs_info): Adjust.
4934 (initialize_low_arch): New function.
4935 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
4936 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
4937 (tic6x_usrregs_info): Forward declare.
4938 (tic6x_read_description): New function, based on ...
4939 (tic6x_arch_setup): ... this. Reimplement.
4940 (target_regsets): Rename to ...
4941 (tic6x_regsets): ... this, and make static.
4942 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
4943 (tic6x_regs_info): New function.
4944 (the_low_target): Adjust.
4945 (initialize_low_arch): New function.
4946 * linux-xtensa-low.c (tdesc_xtensa): Declare.
4947 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
4948 (target_regsets): Rename to ...
4949 (xtensa_regsets): ... this, and make static.
4950 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
4951 globals.
4952 (xtensa_arch_setup, xtensa_regs_info): New functions.
4953 (the_low_target): Adjust.
4954 (initialize_low_arch): New function.
4955 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
4956 (nios2_arch_setup): Set the current process'es tdesc.
4957 (target_regsets): Rename to ...
4958 (nios2_regsets): ... this.
4959 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
4960 (nios2_regs_info): New function.
4961 (the_low_target): Adjust.
4962 (initialize_low_arch): New function.
a261b8f5
PA
4963 * linux-aarch64-low.c (tdesc_aarch64): Declare.
4964 (aarch64_arch_setup): Set the current process'es tdesc.
4965 (target_regsets): Rename to ...
4966 (aarch64_regsets): ... this.
4967 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
4968 (aarch64_regs_info): New function.
4969 (the_low_target): Adjust.
4970 (initialize_low_arch): New function.
3aee8918
PA
4971 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
4972 globals.
4973 (target_regsets): Rename to ...
4974 (tile_regsets): ... this.
4975 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
4976 (tile_regs_info): New function.
4977 (tile_arch_setup): Set the current process'es tdesc.
4978 (the_low_target): Adjust.
4979 (initialize_low_arch): New function.
4980 * spu-low.c (tdesc_spu): Declare.
4981 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
4982 * win32-arm-low.c (tdesc_arm): Declare.
4983 (arm_arch_setup): New function.
4984 (the_low_target): Install arm_arch_setup instead of
4985 init_registers_arm.
4986 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
4987 (init_windows_x86): Rename to ...
4988 (i386_arch_setup): ... this. Set `win32_tdesc'.
4989 (the_low_target): Adjust.
4990 * win32-low.c (win32_tdesc): New global.
4991 (child_add_thread): Don't create the thread cache here.
4992 (do_initial_child_stuff): Set the new process'es tdesc.
4993 * win32-low.h (struct target_desc): Forward declare.
4994 (win32_tdesc): Declare.
4995 * lynx-i386-low.c (tdesc_i386): Declare global.
4996 (lynx_i386_arch_setup): Set `lynx_tdesc'.
4997 * lynx-low.c (lynx_tdesc): New global.
4998 (lynx_add_process): Set the new process'es tdesc.
4999 * lynx-low.h (struct target_desc): Forward declare.
5000 (lynx_tdesc): Declare global.
5001 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
5002 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
5003 * nto-low.c (nto_tdesc): New global.
5004 (do_attach): Set the new process'es tdesc.
5005 * nto-low.h (struct target_desc): Forward declare.
5006 (nto_tdesc): Declare.
5007 * nto-x86-low.c (tdesc_i386): Declare.
5008 (nto_x86_arch_setup): Set `nto_tdesc'.
5009
b1fbec62
GB
50102013-06-04 Gary Benson <gbenson@redhat.com>
5011
5012 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
5013 to qSupported response when appropriate.
5014 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
5015 with nonzero-length annex.
5016 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
5017 arguments supplied in annex.
5018
d1ec4ce7
DE
50192013-05-31 Doug Evans <dje@google.com>
5020
ac44adcb 5021 PR server/15594
d1ec4ce7
DE
5022 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
5023 64 bits in 64-cross-32 environment.
5024
9b25f2d3
PA
50252013-05-28 Pedro Alves <palves@redhat.com>
5026
5027 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
5028 (aarch64-without-fpu.c): Delete rule.
5029 * configure.srv (aarch64*-*-linux*): Remove references to
5030 aarch64-without-fpu.o and aarch64-without-fpu.xml.
5031 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
5032 declaration.
5033
6740dc9c
PA
50342013-05-24 Pedro Alves <palves@redhat.com>
5035
5036 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
5037 instead of strchr/decode_address. Error if the range isn't split
5038 with a ','. Don't assume there's be a ':' in the action.
5039
c2d6af84
PA
50402013-05-23 Yao Qi <yao@codesourcery.com>
5041 Pedro Alves <palves@redhat.com>
5042
5043 * linux-low.c (lwp_in_step_range): New function.
5044 (linux_wait_1): If the thread was range stepping and stopped
5045 outside the stepping range, report the stop to GDB. Otherwise,
5046 continue stepping. Add range stepping debug output.
5047 (linux_set_resume_request): Copy the step range from the resume
5048 request to the lwp.
5049 (linux_supports_range_stepping): New.
5050 (linux_target_ops) <supports_range_stepping>: Set to
5051 linux_supports_range_stepping.
5052 * linux-low.h (struct linux_target_ops)
5053 <supports_range_stepping>: New field.
5054 (struct lwp_info) <step_range_start, step_range_end>: New fields.
5055 * linux-x86-low.c (x86_supports_range_stepping): New.
5056 (the_low_target) <supports_range_stepping>: Set to
5057 x86_supports_range_stepping.
5058 * server.c (handle_v_cont): Handle 'r' action.
5059 (handle_v_requests): Append ";r" if the target supports range
5060 stepping.
5061 * target.h (struct thread_resume) <step_range_start,
5062 step_range_end>: New fields.
5063 (struct target_ops) <supports_range_stepping>:
5064 New field.
5065 (target_supports_range_stepping): New macro.
5066
58794e1a
JB
50672013-05-17 Joel Brobecker <brobecker@adacore.com>
5068
5069 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
5070 confusion in comment.
5071
d631c5a7
JB
50722013-05-17 Joel Brobecker <brobecker@adacore.com>
5073
5074 * lynx-low.c (struct process_info_private): New type.
5075 (lynx_add_process): New function.
5076 (lynx_create_inferior, lynx_attach): Replace calls to
5077 add_process by calls to lynx_add_process.
5078 (lynx_resume): If PTID is null, then try using
5079 current_process()->private->last_wait_event_ptid.
5080 Add comments.
5081 (lynx_clear_inferiors): Delete. The contents of that function
5082 has been inlined in lynx_mourn;
5083 (lynx_wait_1): Save the ptid in the process's private data.
5084 (lynx_mourn): Free the process' private data. Replace call
5085 to lynx_clear_inferiors by call to clear_inferiors.
5086
96f7a20f
YQ
50872013-05-17 Yao Qi <yao@codesourcery.com>
5088
5089 * i386-low.c (i386_length_and_rw_bits): Move the comment to
5090 the right place.
5091
db0dfaa0
LM
50922013-05-16 Luis Machado <lgustavo@codesourcery.com>
5093
5094 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
5095 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
5096 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
5097 PT_TEXT_END_ADDR guards. Update comments.
5098 (linux_target_op) <read_offsets>: Conditionally define to
5099 linux_read_offsets if the target is UCLIBC and if it defines
5100 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
5101
68f5f838
SL
51022013-05-06 Sandra Loosemore <sandra@codesourcery.com>
5103 Andrew Jenner <andrew@codesourcery.com>
5104
5105 * Makefile.in (SFILES): Add linux-nios2-low.c.
5106 (clean): Add action to delete nios2-linux.c.
5107 (nios2-linux.c): New rule.
5108 * configure.srv: Add nios2*-*-linux*.
5109 * linux-nios2-low.c: New.
5110
1ebff1fd
HAQ
51112013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
5112
5113 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
5114
f6150862
HZ
51152013-04-25 Hui Zhu <hui@codesourcery.com>
5116
5117 PR gdb/15186
f6150862
HZ
5118 * ax.c (ax_printf): Add fflush.
5119
614c279d
TT
51202013-04-22 Tom Tromey <tromey@redhat.com>
5121
5122 * Makefile.in (SFILES): Add filestuff.c.
5123 (OBS): Add filestuff.o.
5124 (filestuff.o): New target.
5125 * config.in, configure: Rebuild.
5126 * configure.ac: Check for fdwalk, pipe2.
5127
7d4e5717
PA
51282013-04-17 Pedro Alves <palves@redhat.com>
5129
5130 * configure.ac (USE_THREAD_DB): Delete variable.
5131 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
5132 Don't AC_SUBST USE_THREAD_DB.
5133 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
5134 * config.in, configure: Regenerate.
5135
d5c93e41
PA
51362013-04-16 Pedro Alves <palves@redhat.com>
5137
5138 * linux-low.h (struct lwp_info) <thread_known>: Move under
5139 the USE_THREAD_DB #ifdef.
5140
04f5fe89
PA
51412013-04-16 Pedro Alves <palves@redhat.com>
5142
5143 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
5144 (linux-low.o): Delete rule.
5145 * linux-low.h: Always include "gdb_thread_db.h" instead of
5146 conditionally including thread_db.h.
5147 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
5148 HAVE_THREAD_DB_H.
5149
480b27bf
JK
51502013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5151
5152 * Makefile.in (install-only): Fix make install regression.
5153
43662968
JK
51542013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
5155
5156 Convert man pages to texinfo, new gdbinit.5 texinfo page.
5157 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
5158 installation.
5159 * gdbserver.1: Remove.
5160
3e74e146
PA
51612013-03-22 Pedro Alves <palves@redhat.com>
5162
5163 * linux-low.c (handle_extended_wait): Don't call
5164 linux_enable_event_reporting.
5165
a8347a2a
TT
51662013-03-15 Tony Theodore <tonyt@logyst.com>
5167
5168 PR build/9098:
5169 * Makefile.in (SHELL): Use @SHELL@.
5170
eeb56fa7
SDJ
51712013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
5172
5173 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
5174 compiler warning.
5175
4fa7e2ff
JB
51762013-03-13 Joel Brobecker <brobecker@adacore.com>
5177
5178 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
5179 Remove extraneous NULL element.
5180
8ddb1965
YQ
51812013-03-13 Yao Qi <yao@codesourcery.com>
5182
5183 * tracepoint.c (traceframe_read_tsv): Look for the last matched
5184 'V' block in trace frame.
5185
9accd112
MM
51862013-03-11 Markus Metzger <markus.t.metzger@intel.com>
5187
5188 * target.h (struct target_ops): Add btrace ops.
5189 (target_supports_btrace): New macro.
5190 (target_enable_btrace): New macro.
5191 (target_disable_btrace): New macro.
5192 (target_read_btrace): New macro.
5193 * gdbthread.h (struct thread_info): Add btrace field.
5194 * server.c: Include btrace-common.h.
5195 (handle_btrace_general_set): New function.
5196 (handle_btrace_enable): New function.
5197 (handle_btrace_disable): New function.
5198 (handle_general_set): Call handle_btrace_general_set.
5199 (handle_qxfer_btrace): New function.
5200 (struct qxfer qxfer_packets[]): Add btrace entry.
5201 * inferiors.c (remove_thread): Disable btrace.
5202 * linux-low: Include linux-btrace.h.
5203 (linux_low_enable_btrace): New function.
5204 (linux_low_read_btrace): New function.
5205 (linux_target_ops): Add btrace ops.
5206 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
5207 Add srv_linux_btrace=yes.
5208 (x86_64-*-linux*): Add linux-btrace.o.
5209 Add srv_linux_btrace=yes.
5210 * configure.ac: Define HAVE_LINUX_BTRACE.
5211 * config.in: Regenerated.
5212 * configure: Regenerated.
5213
5cc22e4c
MM
52142013-03-11 Markus Metzger <markus.t.metzger@intel.com>
5215
5216 * server.c (handle_qxfer): Preserve error message if -3 is
5217 returned.
5218 (qxfer): Document the -3 return value.
5219
7c97f91e
MM
52202013-03-11 Markus Metzger <markus.t.metzger@intel.com>
5221
5222 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
5223 (linux_btrace_h): New variable.
5224 (linux-btrace.o): New rule.
5225
be9a119c 52262013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
5227 Hafiz Abid Qadeer <abidh@codesourcery.com>
5228
5229 * tracepoint.c (trace_buffer_size): New global.
5230 (DEFAULT_TRACE_BUFFER_SIZE): New define.
5231 (init_trace_buffer): Change to one-argument function. Allocate
5232 trace buffer memory.
5233 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
5234 handle QTBuffer:size packet.
5235 (cmd_bigqtbuffer_size): New function.
5236 (initialize_tracepoint): Call init_trace_buffer with
5237 DEFAULT_TRACE_BUFFER_SIZE.
5238 * server.c (handle_query): Add QTBuffer:size in the
5239 supported packets.
5240
e64f7499
YQ
52412013-03-07 Yao Qi <yao@codesourcery.com>
5242
5243 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
5244 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
5245 of -1.
5246 (cmd_qtsp): Adjust condition. Do post increment.
5247 Set cur_action and cur_step_action back to 0.
5248
f0ae6fc3
PA
52492013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
5250
5251 PR server/15236
5252 * linux-low.c (linux_write_memory): Return early success if LEN is
5253 zero.
5254
b5b0b0af
CV
52552013-03-05 Corinna Vinschen <vinschen@redhat.de>
5256
334ad4a8 5257 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 5258
589bc927
TT
52592013-02-28 Tom Tromey <tromey@redhat.com>
5260
5261 * configure.ac: Invoke AC_SYS_LARGEFILE.
5262 * configure, config.in: Rebuild.
5263
dfe07582
CV
52642013-02-28 Corinna Vinschen <vinschen@redhat.com>
5265
5266 * win32-low.c: Throughout, fix format strings and casts of
5267 printf-like functions to avoid type related warnings on all
5268 platforms.
5269 (get_child_debug_event): Print dwDebugEventCode as hex since
5270 that's how it's usually documented.
5271
736cd585
YQ
52722013-02-28 Yao Qi <yao@codesourcery.com>
5273
5274 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
5275 pulongest.
5276
e1f58301
JW
52772013-02-27 Jiong Wang <jiwang@tilera.com>
5278
5279 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
5280 (reg-tilegx32.c): New rule.
5281 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
5282 * linux-tile-low.c (tile_arch_setup): New function. Invoke
5283 different register info initializer according to elf class.
5284 (init_registers_tilgx32): New function. The tilegx32 register info
5285 initializer.
5286 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
5287 (tile_store_gregset): Likewise.
5288
d171ca78
YQ
52892013-02-27 Yao Qi <yao@codesourcery.com>
5290
5291 * server.c (process_point_options): Print debug message when
5292 debug_threads is true.
5293
282bbdf3
YQ
52942013-02-26 Yao Qi <yao@codesourcery.com>
5295
5296 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
5297
aca22551
PA
52982013-02-19 Pedro Alves <palves@redhat.com>
5299 Kai Tietz <ktietz@redhat.com>
5300
5301 PR gdb/15161
5302
5303 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
5304 instead of strtoul to extract address from packet.
5305 (process_serial_event) <'z'>: Likewise.
5306
4f3cee1c
YQ
53072013-02-18 Yao Qi <yao@codesourcery.com>
5308
5309 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
5310
8e1d55a3
PA
53112013-02-14 Pedro Alves <palves@redhat.com>
5312
5313 Plug memory leak.
5314
5315 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
5316 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
5317
458820da
PA
53182013-02-14 Pedro Alves <palves@redhat.com>
5319
5320 * tracepoint.c (cmd_qtdpsrc): Use savestring.
5321
baea0dae
PA
53222013-02-14 Pedro Alves <palves@redhat.com>
5323
5324 * tracepoint.c (save_string): Delete.
5325 (add_tracepoint_action): Use savestring instead of save_string.
5326
0b1afbb3
PA
53272013-02-12 Pedro Alves <palves@redhat.com>
5328
5329 * linux-xtensa-low.c: Ditto.
5330 * xtensa-xtregs.c: Ditto.
5331
8a4ac37e
PA
53322013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
5333
5334 * thread-db.c (thread_db_get_tls_address): NULL pointer check
5335 thread_db.
5336
148de6bb
MS
53372013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
5338
5339 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
5340 aarch64_num_wp_regs and aarch64_num_bp_regs to
5341 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
5342
55fac6e0
MS
53432013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
5344
5345 * linux-aarch64-low.c (ps_get_thread_area): Replace
5346 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
5347
176eb98c
MS
53482013-02-04 Jim MacArthur <jim.macarthur@arm.com>
5349 Marcus Shawcroft <marcus.shawcroft@arm.com>
5350 Nigel Stephens <nigel.stephens@arm.com>
5351 Yufeng Zhang <yufeng.zhang@arm.com>
5352
5353 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
5354 (aarch64.c, aarch64-without-fpu.c): New targets.
5355 * configure.srv (aarch64*-*-linux*): New.
5356 * linux-aarch64-low.c: New file.
5357
56f7af9c
MS
53582013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
5359
43aaf8b6 5360 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
5361 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
5362 (dequeue_one_deferred_signal, linux_resume_one_thread)
5363 (fetch_register, linux_write_memory, linux_enable_event_reporting)
5364 (linux_tracefork_grandchild, linux_test_for_tracefork)
5365 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
5366 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
5367 where the argument is 0.
5368
60f662b0
YQ
53692013-01-25 Yao Qi <yao@codesourcery.com>
5370
5371 * event-loop.c: Include "queue.h".
5372 (gdb_event_p): New typedef.
5373 (struct gdb_event) <next_event>: Remove.
5374 (event_queue): Change to QUEUE(gdb_event_p).
5375 (async_queue_event): Remove.
5376 (gdb_event_xfree): New.
5377 (initialize_event_loop): New.
5378 (process_event): Use API from QUEUE.
5379 (wait_for_event): Likewise.
5380 * server.c (main): Call initialize_event_loop.
5381 * server.h (initialize_event_loop): Declare.
5382
5ae4861a
YQ
53832013-01-18 Yao Qi <yao@codesourcery.com>
5384
5385 * ax.h (struct eval_agent_expr_context): New.
5386 (gdb_eval_agent_expr): Update declaration.
5387 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
5388 TFRAME. Add new argument CTX.
5389 * server.h (struct eval_agent_expr_context): Declare.
5390 (agent_mem_read, agent_tsv_read): Update declaration.
5391 (agent_mem_read_string): Likewise.
5392 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
5393 (add_traceframe_block): Add new argument TPOINT.
5394 Increase TPOINT->traceframe_usage.
5395 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
5396 eval_tracepoint_agent_expr.
5397 (condition_true_at_tracepoint): Likewise.
5398 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
5399 (agent_mem_read_string, agent_tsv_read): Likewise.
5400
85e00e85
YQ
54012013-01-16 Yao Qi <yao@codesourcery.com>
5402
5403 * linux-low.c (linux_resume_one_lwp): Don't check
5404 'lwp->bp_reinsert != 0'.
5405
4039cf45
JB
54062013-01-07 Joel Brobecker <brobecker@adacore.com>
5407 Pedro Alves <palves@redhat.com>
5408
5409 * lynx-low.c (ptrace_request_to_str): Define a temporary
5410 macro and use it to simplify this function's implementation.
5411
9044dee2
JB
54122013-01-07 Joel Brobecker <brobecker@adacore.com>
5413
5414 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
5415 sets errno.
5416
e6352c8f
JB
54172013-01-07 Joel Brobecker <brobecker@adacore.com>
5418
5419 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
5420
50681a27
JB
54212013-01-07 Joel Brobecker <brobecker@adacore.com>
5422
5423 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
5424
3f6e77ef
JB
54252013-01-07 Joel Brobecker <brobecker@adacore.com>
5426
5427 * lynx-low.c (lynx_resume): Use the resume_info parameter
5428 to determine the ptid for the lynx_ptrace call, unless
5429 it is equal to minus_one_ptid, in which case we use the
5430 ptid of the current_inferior.
5431 (lynx_wait_1): After having received a thread create/exit
5432 event, resume the inferior's execution using the signaling
5433 thread's ptid, rather than the old ptid.
5434
7fda33ae
JB
54352013-01-07 Joel Brobecker <brobecker@adacore.com>
5436
5437 * lynx-low.c (lynx_resume): Delete variable ret.
5438
b9786c74
JB
54392013-01-01 Joel Brobecker <brobecker@adacore.com>
5440
5441 * gdbreplay.c (gdbreplay_version): Update copyright year.
5442 * server.c (gdbserver_version): Likewise.
5443
8b93d60f
JB
54442012-12-17 Joel Brobecker <brobecker@adacore.com>
5445
5446 * lynx-low.c (lynx_wait_1): Add debug trace before adding
5447 new thread.
5448
037335a7
JB
54492012-12-17 Joel Brobecker <brobecker@adacore.com>
5450
5451 * lynx-low.c (ptrace_request_to_str): Add handling for
5452 PTRACE_GETTRACESIG.
5453
52d4cbd8
JB
54542012-12-17 Joel Brobecker <brobecker@adacore.com>
5455
5456 * lynx-low.c (lynx_attach): Delete variable new_process.
5457
ab8f6ca9
JB
54582012-12-17 Joel Brobecker <brobecker@adacore.com>
5459
5460 * lynx-low.c (lynx_create_inferior): Delete variable
5461 new_process.
5462
78cbc024
JB
54632012-12-17 Joel Brobecker <brobecker@adacore.com>
5464
5465 * lynx-low.c (ptrace_request_to_str): Do not handle
5466 PTRACE_GETTHREADLIST if this macro does not exist.
5467
14a00470
YQ
54682012-12-15 Yao Qi <yao@codesourcery.com>
5469
5470 * Makefile.in (OBS): Add notif.o.
5471 * notif.c, notif.h: New.
5472 * server.c: Include "notif.h".
5473 (struct vstop_notif) <next>: Remove.
5474 <base>: New field.
5475 (queue_stop_reply): Update.
5476 (push_event, send_next_stop_reply): Remove.
5477 (discard_queued_stop_replies): Update.
5478 (notif_stop): New variable.
5479 (handle_v_stopped): Remove.
5480 (handle_v_requests): Don't call handle_v_stopped. Call
5481 handle_ack_notif instead.
5482 (queue_stop_reply_callback): Call notif_event_enque instead
5483 of queue_stop_reply.
5484 (handle_status): Don't call send_next_stop_reply, call
5485 notif_write_event instead.
5486 (kill_inferior_callback): Likewise.
5487 (detach_or_kill_inferior_callback): Likewise.
5488 (main): Call initialize_notif.
5489 (process_serial_event): Call QUEUE_is_empty.
5490 (handle_target_event): Call notif_push instead of push event.
5491 * server.h (push_event): Remove declaration.
5492
61c125b9
TT
54932012-12-10 Tom Tromey <tromey@redhat.com>
5494
5495 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
5496 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
5497 macros.
5498 (.c.o): Rewrite.
5499 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
5500 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
5501 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
5502 (amd64-linux-ipa.o, ax.o): Rewrite.
5503 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
5504 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
5505 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
5506 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
5507 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
5508 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
5509 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
5510 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
5511 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
5512 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
5513 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
5514 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
5515 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
5516 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
5517 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
5518 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
5519 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
5520 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
5521 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
5522 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
5523 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
5524 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
5525 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
5526 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
5527 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
5528 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
5529 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
5530 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
5531 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
5532 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
5533 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
5534 (reg-tilegx.o): Remove.
5535 (all_object_files): New macro.
5536 Include .deps files.
5537 * aclocal.m4, configure: Rebuild.
5538 * acinclude.m4: Include depstand.m4, lead-dot.m4.
5539 * configure.ac: Invoke ZW_CREATE_DEPDIR,
5540 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
5541
e90e9ad9
TT
55422012-12-05 Tom Tromey <tromey@redhat.com>
5543
5544 PR gdb/14917:
5545 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
5546
02d403bf 55472012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
5548
5549 * configure.ac: Check for linux/perf_event.h.
5550 * config.in: Regenerated.
5551 * configure: Regenerated.
5552
0270a750
PA
55532012-11-26 Maxime Villard <rustyBSD@gmx.fr>
5554
5555 * hostio.c (handle_readlink): Decrease buffer size
5556 parameter passed to readlink by one byte.
5557
8c29b58e
YQ
55582012-11-26 Yao Qi <yao@codesourcery.com>
5559
5560 * configure.ac (build_warnings): Append '-Wempty-body'.
5561 * configure: Regenerated.
5562 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
5563 body.
5564
8bdce1ff
PM
55652012-11-15 Pierre Muller <muller@sourceware.org>
5566
5567 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
5568 * config.in: Regenerate.
5569 * configure: Regenerate.
5570 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
5571 Use "gdb_wait.h" header instead of <sys/wait.h> header.
5572 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
5573 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
5574 header.
5575 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
5576 instead of <sys/wait.h> header.
5577 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
5578
02d403bf 55792012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
5580
5581 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
5582 (various make rules): Remove -DGDBSERVER
5583
fbd5db48
YQ
55842012-11-09 Yao Qi <yao@codesourcery.com>
5585
5586 * spu-low.c (current_ptid): Move it to ..
5587 * gdbthread.h: ... here. New.
5588 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
5589 * server.c (myresume, process_serial_event): Likewise.
5590 * thread-db.c (thread_db_find_new_threads): Likewise.
5591 * tracepoint.c (run_inferior_command): Likewise.
5592
b3dc46ff
AB
55932012-10-01 Andrew Burgess <aburgess@broadcom.com>
5594
5595 * server.c (handle_search_memory_1): Include access length in
5596 warning message.
5597
07c04788
HPN
55982012-09-05 Michael Brandt <michael.brandt@axis.com>
5599
5600 * linux-crisv32-low.c: Fix compile errors.
5601
918d227b
YQ
56022012-09-04 Yao Qi <yao@codesourcery.com>
5603
5604 * tracepoint.c (cmd_qtsv): Adjust debug message.
5605 Don't check CUR_TPOINT.
5606
18c1b81a
YQ
56072012-08-28 Yao Qi <yao@codesourcery.com>
5608
5609 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
5610 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
5611 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
5612 Remove declarations of xmalloc, xreallloc, xstrdup and
5613 freeargv.
5614 * Makefile.in (libiberty_h): New.
5615 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
5616 (linux-bfin-low.o): Append dependency 'libiberty.h'.
5617
dc82f37b
YQ
56182012-08-23 Yao Qi <yao@codesourcery.com>
5619
5620 * server.h: Remove declaration of 'xsnprintf'.
5621
406b1477
KS
56222012-08-22 Keith Seitz <keiths@redhat.com>
5623
5624 * server.h: Include build-gnulib-gbserver/config.h.
5625 * gdbreplay.c: Likewise.
5626
e6712ff1
DE
56272012-08-08 Doug Evans <dje@google.com>
5628
5629 * Makefile.in (SFILES): Add gdb_vecs.c.
5630 (OBS): Add gdb_vecs.o.
5631 (gdb_vecs_h, host_defs_h): New variables.
5632 (thread-db.o): Add $(gdb_vecs_h) dependency.
5633 (gdb_vecs.o): New rule.
5634 * thread-db.c: #include "gdb_vecs.h".
5635 (thread_db_load_search): Use a vector to iterate over path elements.
5636 Handle text appearing after "$pdir".
5637
5638 * configure.ac: Add check for strstr.
5639 * config.in: Regenerate.
5640 * configure: Regenerate.
5641
7c3270ae
UW
56422012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
5643
5644 * hostio.c (handle_pread): If pread fails, fall back to attempting
5645 lseek/read.
5646 (handle_pwrite): Likewise for pwrite.
5647
b62e2b27
UW
56482012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
5649
5650 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
5651 between unsupported TYPE and unimplementable ADDR/LEN combination.
5652 (arm_insert_point): Act on new return value.
5653
78a99e91
PA
56542012-07-31 Pedro Alves <palves@redhat.com>
5655
5656 * server.c (process_point_options): Only skip tokens if we find
5657 one that is unrecognized. Don't treat 'X' specially while
5658 skipping unrecognized tokens.
5659
fcf303ab
UW
56602012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
5661
5662 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
5663 to 4-byte-align HW breakpoint addresses for Thumb.
5664
7255706c
YQ
56652012-07-27 Yao Qi <yao@codesourcery.com>
5666
5667 PR remote/14161.
5668
5669 * server.h: Declare gdb_agent_about_to_close.
5670 * target.c (kill_inferior): Include "agent.h".
5671 New. Send command 'kill'.
5672 * target.h (kill_inferior): Removed macro.
5673 * tracepoint.c (gdb_agent_about_to_close): New.
5674 (gdb_agent_helper_thread): Handle command 'close'.
5675 Wait endlessly until the inferior stops.
5676 Install gdb_agent_remove_socket to atexit hook.
5677 (agent_socket_name): New static variable.
5678 (gdb_agent_socket_init): Replace local variable 'name' with
5679 'agent_socket_name'.
5680 (gdb_agent_remove_socket): New.
5681
5a3f286f
YQ
56822012-07-27 Yao Qi <yao@codesourcery.com>
5683
5684 * server.c (process_point_options): Stop at 'X' when parsing.
5685
961bd387
ME
56862012-07-19 Michael Eager <eager@eagercon.com>
5687
a261b8f5 5688 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
5689 to hw_execute.
5690 * linux-x86-low.c (x86_insert_point, x86_remove_point):
5691 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
5692 hardware breakpoint.
5693
aa7c7447
JK
56942012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5695
5696 * gdbserver/linux-low.c (initialize_low): Call
5697 linux_ptrace_init_warnings.
5698
7f216e7c
DE
56992012-07-02 Doug Evans <dje@google.com>
5700
5701 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
5702 pointer to int.
5703
d3ce09f5
SS
57042012-07-02 Stan Shebs <stan@codesourcery.com>
5705
5706 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
5707 (ax.o): Add it to build rule.
5708 (ax-ipa.o): Ditto.
5709 (OBS): Add format.o.
5710 (IPA_OBS): Add format.o.
5711 * server.c (handle_query): Claim support for breakpoint commands.
5712 (process_point_options): Add command case.
5713 (process_serial_event): Leave running if there are printfs in
5714 effect.
5715 * mem-break.h (any_persistent_commands): Declare.
5716 (add_breakpoint_commands): Declare.
5717 (gdb_no_commands_at_breakpoint): Declare.
5718 (run_breakpoint_commands): Declare.
5719 * mem-break.c (struct point_command_list): New struct.
5720 (struct breakpoint): New field command_list.
5721 (any_persistent_commands): New function.
5722 (add_commands_to_breakpoint): New function.
5723 (add_breakpoint_commands): New function.
5724 (gdb_no_commands_at_breakpoint): New function.
5725 (run_breakpoint_commands): New function.
5726 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
5727 locally.
5728 * ax.c: Include format.h.
5729 (ax_printf): New function.
5730 (gdb_eval_agent_expr): Add printf opcode.
5731
2f8f6aed
YQ
57322012-06-13 Yao Qi <yao@codesourcery.com>
5733
5734 * server.c (start_inferior): Remove duplicated writes to fields
5735 'last_resume_kind' and 'last_status' of 'current_inferior'.
5736
0c9070b3
YQ
57372012-06-12 Yao Qi <yao@codesourcery.com>
5738 Pedro Alves <palves@redhat.com>
5739
5740 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
5741 comment.
5742 * server.c (handle_v_cont): Extend comment.
5743
c52daf70
YQ
57442012-06-11 Yao Qi <yao@codesourcery.com>
5745
5746 * linux-low.c (linux_attach): Add 'static'.
5747
d38bbb0a
YQ
57482012-06-06 Yao Qi <yao@codesourcery.com>
5749
5750 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
5751
89dc0afd
JK
57522012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
5753
5754 Fix gcc -flto compilation warning.
5755 * server.c (main): Make variable multi_mode and attach volatile.
5756
75f62ce7
TJB
57572012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5758
5759 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
5760 if the platform doesn't know about it.
5761
65f479b6
PA
57622012-05-30 Jeff Kenton <jkenton@tilera.com>
5763
5764 * Makefile.in (SFILES): Add linux-tile-low.c.
5765 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
5766 * configure.srv: Handle tilegx-*-linux*.
5767 * linux-tile-low.c: New file.
5768
0c5bf5a9
JK
57692012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5770
5771 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
5772
a493e3e2
PA
57732012-05-24 Pedro Alves <palves@redhat.com>
5774
5775 PR gdb/7205
5776
43aaf8b6 5777 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 5778
2ea28649
PA
57792012-05-24 Pedro Alves <palves@redhat.com>
5780
5781 PR gdb/7205
5782
5783 Replace target_signal with gdb_signal throughout.
5784
8d409d16
MR
57852012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
5786
5787 * linux-low.c (linux_store_registers): Avoid the copying sequence
5788 when no data has been retrieved by ptrace.
5789
23512c01
MGD
57902012-05-22 Will Deacon <will.deacon@arm.com>
5791
5792 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
5793 Include asm/ptrace.h.
5794 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
5795 already defined.
5796
4934b29e
MR
57972012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
5798
5799 * linux-low.c (linux_store_registers): Don't re-retrieve data
5800 with ptrace that has already been obtained from /proc. Always
5801 copy any data retrieved with ptrace to the buffer supplied.
5802
bde24c0a
PA
58032012-05-11 Yao Qi <yao@codesourcery.com>
5804 Pedro Alves <palves@redhat.com>
5805
5806 * linux-low.c (enum stopping_threads_kind): New.
5807 (stopping_threads): Change type to `enum stopping_threads_kind'.
5808 (handle_extended_wait): If stopping and suspending threads, leave
5809 the new_lwp suspended too.
5810 (linux_wait_for_event): Adjust.
5811 (stop_all_lwps): Set `stopping_threads' to
5812 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
5813 whether we're suspending threads or just stopping them. Assert no
5814 recursion happens.
5815
623b6bdf
YQ
58162012-04-29 Yao Qi <yao@codesourcery.com>
5817
5818 * server.h: Move some code to ...
5819 * gdbthread.h: ... here. New.
5820 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
5821 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
5822 (nto-low.o, win32-low.o): Likewise.
5823 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
5824 * regcache.c, remote-utils.c, server.c: Likewise.
5825 * target.c, tracepoint.c, win32-low.c: Likewise.
5826
f15f9948
TJB
58272012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5828
5829 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
5830 (PTRACE_ARG4_TYPE): Likewise.
5831 (PTRACE_XFER_TYPE): Likewise.
5832 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
5833 ptrace to PTRACE_ARG3_TYPE.
5834 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
5835 (PTRACE_ARG4_TYPE): Likewise.
5836 (PTRACE_XFER_TYPE): Likewise.
5837 (linux_detach_one_lwp): Cast fourth argument of
5838 ptrace to long then PTRACE_ARG4_TYPE.
5839 (regsets_fetch_inferior_registers): Cast third argument of
5840 ptrace to long then PTRACE_ARG3_TYPE.
5841 (regsets_store_inferior_registers): Likewise.
5842
38ea300a
PA
58432012-04-20 Pedro Alves <palves@redhat.com>
5844
5845 * configure: Regenerate.
5846
c971b7fa
PA
58472012-04-19 Pedro Alves <palves@redhat.com>
5848
43aaf8b6 5849 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 5850 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
5851 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
5852 (all, install-only, uninstall, clean-info, all-lib, clean): No
5853 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
5854 (maintainer-clean realclean distclean): Use subdir_do.
5855 (subdir_do): New.
5856 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 5857 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
5858 * acinclude.m4: Include acx_configure_dir.m4.
5859 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
5860 calls. Call AC_PROG_RANLIB. Configure gnulib using
5861 ACX_CONFIGURE_DIR.
5862 (GNULIB): New.
5863 (GNULIB_STDINT_H): Adjust.
5864 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
5865 * gdbreplay.c: Include build-gnulib/config.h.
5866 * server.h: Likewise.
5867 * aclocal.m4: Regenerate.
5868 * config.in: Regenerate.
5869 * configure: Regenerate.
c971b7fa 5870
809277f8
PA
58712012-04-19 Pedro Alves <palves@redhat.com>
5872
5873 * Makefile.in (LIBGNU, INCGNU): Adjust.
5874 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
5875 (all, install-only, uninstall, clean-info, all-lib, clean)
5876 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
5877 * configure.ac: Adjust AC_OUTPUT output.
5878 * aclocal.m4: Regenerate.
5879 * configure: Regenerate.
5880
fd9bb8b8
PA
58812012-04-19 Pedro Alves <palves@redhat.com>
5882
5883 * Makefile.in (generated_files): New.
5884 (server_h): Remove the explicit dependency on config.h, and depend
5885 on $generated_files.
5886
1c298c66
PA
58872012-04-19 Pedro Alves <palves@redhat.com>
5888
5889 * Makefile.in (INCGNU): Add -Ignulib.
5890
57c4b50b
PA
58912012-04-19 Pedro Alves <palves@redhat.com>
5892
5893 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
5894 (INCGNU): ... this, and spell out -I here.
5895 (GNULIB_LIB): Rename to ...
5896 (LIBGNU): ... this.
5897 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
5898
1030e047
PA
58992012-04-19 Pedro Alves <palves@redhat.com>
5900
5901 * config.in: Regenerate.
5902
447d4319
PA
59032012-04-19 Pedro Alves <palves@redhat.com>
5904
5905 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
5906 * server.h (memmem): Remove declaration.
5907 * config.in: Regenerate.
5908 * configure: Regenerate.
5909
aad9eab9
YQ
59102012-04-19 Yao Qi <yao@codesourcery.com>
5911
5912 * Makefile.in (SFILES): Add common/vec.c.
5913 (OBS): Add vec.o.
5914 (vec.o): New rule.
5915
3e10640f
YQ
59162012-04-19 Yao Qi <yao@codesourcery.com>
5917
5918 * remote-utils.c (prepare_resume_reply): Replace with macro
5919 target_core_of_thread.
5920 * server.c (handle_qxfer_threads_proper): Likewise.
5921 * target.h (traget_core_of_thread): New macro.
5922
71622373
PA
59232012-04-18 Pedro Alves <palves@redhat.com>
5924
5925 * aclocal.m4: Regenerate.
5926 * configure: Regenerate.
5927
80d26939
YQ
59282012-04-16 Yao Qi <yao@codesourcery.com>
5929
5930 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
5931 duplicated on address.
5932
42476b70
YQ
59332012-04-16 Yao Qi <yao@codesourcery.com>
5934
5935 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
5936 (struct tracepoint_action_ops) <send>: New field.
5937 (m_tracepoint_action_send, r_tracepoint_action_send): New.
5938 (agent_expr_send, x_tracepoint_action_send): New.
5939 (l_tracepoint_action_send): New.
5940 (cmd_qtdp): Download and install tracepoint
5941 according to `use_agent'.
5942 (run_inferior_command): Add one more parameter `len'.
5943 Update callers.
5944 (tracepoint_send_agent): New.
5945 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
5946
7bc83639
YQ
59472012-04-16 Yao Qi <yao@codesourcery.com>
5948
5949 * tracepoint.c (download_tracepoints): Moved to ...
5950 (cmd_qtstart): ... here.
5951
5f18041e
YQ
59522012-04-14 Yao Qi <yao@codesourcery.com>
5953
5954 * tracepoint.c: Include inttypes.h.
5955 (struct collect_memory_action): Use sized types.
5956 (struct tracepoint): Likewise.
5957 (cmd_qtdp, stop_tracing): Update print specifiers.
5958 (cmd_qtp, response_tracepoint): Likewise.
5959 (collect_data_at_tracepoint): Likewise.
5960 (collect_data_at_step): Likewise.
5961
55a8c076
YQ
59622012-04-14 Yao Qi <yao@codesourcery.com>
5963
5964 Import gnulib module inttypes.
5965 * aclocal.m4, config.in, configure: Regenerated.
5966
dc750257
YQ
59672012-04-14 Yao Qi <yao@codesourcery.com>
5968
5969 * Makefile.in (maintainer-clean, realclean, distclean): Remove
5970 Makefile and config.status at last.
5971
0ab5faf9
YQ
59722012-04-13 Yao Qi <yao@codesourcery.com>
5973
5974 * tracepoint.c: Include stdint.h unconditionally.
5975
18f5fd81
TJB
59762012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5977
5978 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
5979 on BFD_HAVE_SYS_PROCFS_TYPE.
5980 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
5981 * configure: Regenerate.
5982 * config.in: Likewise.
5983
4d47af5c
L
59842012-04-13 H.J. Lu <hongjiu.lu@intel.com>
5985
5986 * Makefile.in (clean): Also remove x32.c x32-linux.c
5987 x32-avx.c x32-avx-linux.c.
5988 (x32.o): New target.
5989 (x32.c): Likewise.
5990 (x32-linux.o): Likewise.
5991 (x32-linux.c): Likewise.
5992 (x32-avx.o): Likewise.
5993 (x32-avx.c): Likewise.
5994 (x32-avx-linux.o): Likewise.
5995 (x32-avx-linux.c): Likewise.
5996
5997 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
5998 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
5999 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
6000 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
6001 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
6002 i386/x32-avx-linux.xml.
6003
6004 * linux-x86-low.c (init_registers_x32_linux): New prototype.
6005 (init_registers_x32_avx_linux): Likwise.
6006 (x86_linux_update_xmltarget): Call init_registers_x32_linux
6007 or init_registers_x32_avx_linux if linux_is_elf64 is false.
6008
ecedbe58
PA
60092012-04-13 Pedro Alves <palves@redhat.com>
6010
6011 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
6012 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
6013 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
6014 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
6015 the sub-make.
6016
c92b5177
L
60172012-04-12 H.J. Lu <hongjiu.lu@intel.com>
6018
6019 * linux-x86-low.c (compat_x32_clock_t): New.
6020 (compat_x32_siginfo_t): Likewise.
6021 (compat_x32_siginfo_from_siginfo): Likewise.
6022 (siginfo_from_compat_x32_siginfo): Likewise.
6023 (linux_is_elf64): Likewise.
6024 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
6025 and siginfo_from_compat_x32_siginfo for x32.
6026 (x86_arch_setup): Set linux_is_elf64.
6027
214d508e
L
60282012-04-12 H.J. Lu <hongjiu.lu@intel.com>
6029
6030 PR gdb/13969
6031 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
6032 e_machine field.
6033 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
6034 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
6035 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
6036 compatible with process.
6037
c9a1864a
YQ
60382012-04-12 Yao Qi <yao@codesourcery.com>
6039
6040 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
6041 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
6042 (install-only, install-info, clean): Handle sub dir gnulib.
6043 (all-lib, am--refresh): New targets.
6044 (memmem.o): Remove target.
6045 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
6046 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
6047 (AC_REPLACE_FUNCS): Remove memmem.
6048 Invoke gl_INIT and AM_INIT_AUTOMAKE.
6049 (AC_OUTPUT): Generate Makefile in gnulib/.
6050 * aclocal.m4, config.in, configure: Regenerated.
6051
367ba2c2
MR
60522012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
6053
6054 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
6055
9d236627
PA
60562012-04-05 Pedro Alves <palves@redhat.com>
6057
6058 -Werror=strict-aliasing
6059
6060 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
6061 pointer.
6062
111217b3
PA
60632012-04-04 Pedro Alves <palves@redhat.com>
6064
6065 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
6066 (sparc_store_gregset_from_stack, sparc_store_gregset)
6067 (sparc_breakpoint_at): Fix formatting.
6068
8365dcf5
TJB
60692012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
6070
6071 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
6072 are available.
6073 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
6074 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
6075 * config.in: Regenerate.
6076 * configure: Likewise.
6077
689cc2ae
PA
60782012-03-29 Pedro Alves <palves@redhat.com>
6079
6080 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
6081 Correct ptrace arguments.
6082
c14dfd32
PA
60832012-03-28 Pedro Alves <palves@redhat.com>
6084
6085 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
6086 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
6087 (IA64_FR1_REGNUM): New defines.
6088 (ia64_fetch_register): New.
6089 (the_low_target): Install it.
6090 * linux-low.h (struct linux_target_ops) <fetch_register>: New
6091 field.
6092 * linux-low.c (linux_fetch_registers): Try the
6093 the_low_target.fetch_register hook first.
6094
6095 * linux-arm-low.c (the_low_target): Adjust.
6096 * linux-bfin-low.c (the_low_target): Adjust.
6097 * linux-cris-low.c (the_low_target): Adjust.
6098 * linux-crisv32-low.c (the_low_target): Adjust.
6099 * linux-m32r-low.c (the_low_target): Adjust.
6100 * linux-m68k-low.c (the_low_target): Adjust.
6101 * linux-mips-low.c (the_low_target): Adjust.
6102 * linux-ppc-low.c (the_low_target): Adjust.
6103 * linux-s390-low.c (the_low_target): Adjust.
6104 * linux-sh-low.c (the_low_target): Adjust.
6105 * linux-sparc-low.c (the_low_target): Adjust.
6106 * linux-tic6x-low.c (the_low_target): Adjust.
6107 * linux-x86-low.c (the_low_target): Adjust.
6108 * linux-xtensa-low.c (the_low_target): Adjust.
6109
63c88e13
PA
61102012-03-26 Pedro Alves <palves@redhat.com>
6111
6112 * server.c (handle_qxfer_libraries): Don't bail early if
6113 the_target->qxfer_libraries_svr4 is not NULL.
6114
fb723180
PA
61152012-03-26 Pedro Alves <palves@redhat.com>
6116
6117 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
6118
0afae3cf
PA
61192012-03-23 Pedro Alves <palves@redhat.com>
6120
6121 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
6122 "library-list-svr4" element's start tag when the the DSO list is
6123 empty.
6124
485f1ee4
PA
61252012-03-23 Pedro Alves <palves@redhat.com>
6126
6127 * linux-low.c (read_one_ptr): Read the inferior's pointer through
6128 a variable whose type size is the same as the inferior's pointer
6129 size.
6130
a5362b9a
TS
61312012-03-21 Thomas Schwinge <thomas@codesourcery.com>
6132
6133 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
6134 struct siginfo.
6135 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
6136 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
6137 * linux-low.h: Include <signal.h>.
6138 (struct siginfo): Remove forward declaration.
6139 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
6140 struct siginfo.
6141
d226c142
MF
61422012-03-21 Mike Frysinger <vapier@gentoo.org>
6143
6144 * .gitignore: Ignore more files.
6145
122f36ef
PA
61462012-03-19 Pedro Alves <palves@redhat.com>
6147 Jan Kratochvil <jan.kratochvil@redhat.com>
6148
6149 * server.c (cont_thread, general_thread): Add describing comments.
6150 (start_inferior): Clear `cont_thread'.
6151 (handle_v_cont): Don't set `cont_thread' if resuming all threads
6152 of a process.
6153
fc3e5175
YQ
61542012-03-15 Yao Qi <yao@codesourcery.com>
6155
6156 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
6157 handling to ...
6158 (cmd_qtdp): ... here.
6159
8d0d92cd
YQ
61602012-03-15 Yao Qi <yao@codesourcery.com>
6161
6162 * tracepoint.c (struct tracepoint_action_ops): New.
6163 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
6164 (m_tracepoint_action_download): New.
6165 (r_tracepoint_action_download): New.
6166 (x_tracepoint_action_download): New.
6167 (l_tracepoint_action_download): New.
6168 (add_tracepoint_action): Install `action->ops' according type.
6169 (download_tracepoint_1): Move code `download' function pointer
6170 of various tracepoint_action_ops.
6171
87b0bb13
JK
61722012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
6173
6174 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
6175 linux_ptrace_attach_warnings.
6176
5f572dec
JK
61772012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
6178
6179 * Makefile.in (linux-ptrace.o): New.
6180 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
6181 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
6182 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
6183 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
6184 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
6185 of these targets.
6186 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
6187
f4647387
YQ
61882012-03-08 Yao Qi <yao@codesourcery.com>
6189 Pedro Alves <palves@redhat.com>
6190
6191 Fix PR server/13392.
6192 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
6193 offset of JMP insn.
6194 * tracepoint.c (remove_tracepoint): New.
6195 (cmd_qtdp): Call remove_tracepoint when failed to install.
6196
9b224c5e
PA
61972012-03-07 Pedro Alves <palves@redhat.com>
6198
6199 * linux-low.c (get_detach_signal): New.
6200 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
6201 Pass on pending signals to PTRACE_DETACH. Check the result of the
6202 ptrace call.
6203 * server.c (program_signals, program_signals_p): New.
6204 (handle_general_set): Handle QProgramSignals.
6205 * server.h (program_signals, program_signals_p): Declare.
6206
e237a7e2
JK
62072012-03-05 Pedro Alves <palves@redhat.com>
6208 Jan Kratochvil <jan.kratochvil@redhat.com>
6209
6210 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
6211 New comment why.
6212
5808517f
YQ
62132012-03-03 Yao Qi <yao@codesourcery.com>
6214
6215 * tracepoint.c (tracepoint_look_up_symbols): Update call to
6216 agent_look_up_symbols.
6217
58b4daa5
YQ
62182012-03-03 Yao Qi <yao@codesourcery.com>
6219
6220 * Makefile.in (linux-low.o): Keep dependence on agent.h.
6221 (linux-x86-low.o): Likewise.
6222 * server.h: Remove in_process_agent_loaded.
6223 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
6224 common/agent.c.
6225 Update callers.
6226
8ffcbaaf
YQ
62272012-03-03 Yao Qi <yao@codesourcery.com>
6228
6229 * tracepoint.c (gdb_agent_capability): New global.
6230 (in_process_agent_loaded_ust): Renamed to
6231 `in_process_agent_supports_ust'.
6232 Update callers.
6233 (in_process_agent_supports_ust): Call agent_capability_check.
6234 (clear_installed_tracepoints): Assert that agent supports
6235 agent.
6236
d1feda86
YQ
62372012-03-03 Yao Qi <yao@codesourcery.com>
6238
6239 * linux-low.c (linux_supports_agent): New.
6240 (linux_target_ops): Initialize field `supports_agent' with
6241 linux_supports_agent.
6242 * target.h (struct target_ops) <supports_agent>: New.
6243 (target_supports_agent): New macro.
6244 * server.c (handle_general_set): Handle packet 'QAgent'.
6245 (handle_query): Send `QAgent+'.
6246 * Makefile.in (server.o): Depends on agent.h.
6247
2fa291ac
YQ
62482012-03-03 Yao Qi <yao@codesourcery.com>
6249
6250 * Makefile.in (OBS): Add agent.o.
6251 Add new rule for agent.o.
6252 Track dependence of tracepoint.c on agent.h.
6253 * tracepoint.c (run_inferior_command_1):
6254 (run_inferior_command): Call agent_run_command.
6255 (gdb_ust_connect_sync_socket): Deleted. Move it to
6256 common/agent.c.
6257 (resume_thread, stop_thread): Likewise.
6258 (gdb_ust_socket_init): Renamed to ...
6259 (gdb_agent_socket_init): ... New.
6260 (gdb_ust_thread): Renamed to ...
6261 (gdb_agent_helper_thread): ... New.
6262 (gdb_ust_init): Move some code to ...
6263 (gdb_agent_init): ... here. New.
6264 [HAVE_UST]: Call gdb_ust_init.
6265 (initialize_tracepoint_ftlib): Call gdb_agent_init.
6266 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
6267 * config.in, configure: Regenerated.
6268
05044653
PA
62692012-03-02 Pedro Alves <palves@redhat.com>
6270
6271 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
6272 * linux-low.c (struct simple_pid_list): New.
6273 (stopped_pids): New a struct simple_pid_list pointer.
6274 (add_to_pid_list, pull_pid_from_list): New.
6275 (handle_extended_wait): Don't assume the first signal new children
6276 report is SIGSTOP. Adjust call to pull_pid_from_list.
6277 (linux_wait_for_lwp): Adjust.
6278
8d00225b
YQ
62792012-03-02 Yao Qi <yao@codesourcery.com>
6280
6281 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
6282 debug log.
6283
19560ba5
YQ
62842012-03-02 Yao Qi <yao@codesourcery.com>
6285
6286 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
6287 `stop_pc' and `tpoint'. Update caller.
6288
1faeff08
MR
62892012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
6290
6291 * linux-low.h (linux_target_ops): Add regset_bitmap member.
6292 * linux-low.c (use_linux_regsets): New macro.
6293 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
6294 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
6295 (linux_register_in_regsets): New function.
6296 (usr_fetch_inferior_registers): Skip registers covered by
6297 regsets.
6298 (usr_store_inferior_registers): Likewise.
6299 (usr_fetch_inferior_registers): New macro.
6300 (usr_store_inferior_registers): Likewise.
6301 (linux_fetch_registers): Handle mixed regset/non-regset targets.
6302 (linux_store_registers): Likewise.
6303 * linux-mips-low.c (init_registers_mips_dsp_linux): New
6304 prototype.
6305 (init_registers_mips64_dsp_linux): Likewise.
6306 (init_registers_mips_linux): New macro.
6307 (init_registers_mips_dsp_linux): Likewise.
6308 (mips_dsp_num_regs): Likewise.
6309 (DSP_BASE, DSP_CONTROL): New fallback macros.
6310 (mips_base_regs): New macro.
6311 (mips_regmap): Use it. Fix the size.
6312 (mips_dsp_regmap): New variable.
6313 (mips_dsp_regset_bitmap): Likewise.
6314 (mips_arch_setup): New function.
6315 (mips_cannot_fetch_register): Use the_low_target.regmap rather
6316 than mips_regmap.
6317 (mips_cannot_store_register): Likewise.
6318 (the_low_target): Update .arch_setup, .num_regs and .regmap
6319 initializers. Add .regset_bitmap initializer.
6320 * linux-arm-low.c (the_low_target): Add .regset_bitmap
6321 initializer.
6322 * linux-bfin-low.c (the_low_target): Likewise.
6323 * linux-cris-low.c (the_low_target): Likewise.
6324 * linux-crisv32-low.c (the_low_target): Likewise.
6325 * linux-ia64-low.c (the_low_target): Likewise.
6326 * linux-m32r-low.c (the_low_target): Likewise.
6327 * linux-m68k-low.c (the_low_target): Likewise.
6328 * linux-ppc-low.c (the_low_target): Likewise.
6329 * linux-s390-low.c (the_low_target): Likewise.
6330 * linux-sh-low.c (the_low_target): Likewise.
6331 * linux-sparc-low.c (the_low_target): Likewise.
6332 * linux-tic6x-low.c (the_low_target): Likewise.
6333 * linux-x86-low.c (the_low_target): Likewise.
6334 * linux-xtensa-low.c (the_low_target): Likewise.
6335 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
6336 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
6337 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
6338 srv_xmlfiles.
6339 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
6340 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
6341
c03e6ccc
YQ
63422012-02-29 Yao Qi <yao@codesourcery.com>
6343 Pedro Alves <palves@redhat.com>
6344
6345 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
6346 `step_over_finished' is true.
6347
644cebc9
PA
63482012-02-27 Pedro Alves <palves@redhat.com>
6349
6350 * linux-low.c (pid_is_stopped): Delete, moved to common/.
6351 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
6352
c14d7ab2
PA
63532012-02-27 Pedro Alves <palves@redhat.com>
6354
6355 PR server/9684
6356 * linux-low.c (pid_is_stopped): New.
6357 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
6358
412c89dd
LM
63592012-02-25 Luis Machado <lgustavo@codesourcery.com>
6360
6361 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
6362 of conditions.
6363
b745defe
MR
63642012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
6365
6366 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
6367
9f3a5c85
LM
63682012-02-24 Luis Machado <lgustavo@codesourcery>
6369
6370 * server.c (handle_query): Advertise support for target-side
6371 breakpoint condition evaluation.
6372 (process_point_options): New function.
6373 (process_serial_event): When inserting a breakpoint, check for
6374 a target-side condition that should be evaluated.
6375
6376 * mem-break.c: Include regcache.h and ax.h.
6377 (point_cond_list_t): New data structure.
6378 (breakpoint) <cond_list>: New field.
6379 (find_gdb_breakpoint_at): Make non-static.
6380 (delete_gdb_breakpoint_at): Clear any target-side
6381 conditions.
6382 (clear_gdb_breakpoint_conditions): New function.
6383 (add_condition_to_breakpoint): Likewise.
6384 (add_breakpoint_condition): Likewise.
6385 (gdb_condition_true_at_breakpoint): Likewise.
6386 (gdb_breakpoint_here): Return result directly instead
6387 of going through a local variable.
6388
6389 * mem-break.h (find_gdb_breakpoint_at): New prototype.
6390 (clear_gdb_breakpoint_conditions): Likewise.
6391 (add_breakpoint_condition): Likewise.
6392 (gdb_condition_true_at_breakpoint): Likewise.
6393
6394 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
6395 (need_step_over_p): Take target-side breakpoint condition into
6396 consideration.
6397
5e1dc496
LM
63982012-02-24 Luis Machado <lgustavo@codesourcery>
6399
6400 * server.h: Include tracepoint.h.
6401 (agent_mem_read, agent_get_trace_state_variable_value,
6402 agent_set_trace_state_variable_value,
6403 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
6404 get_set_tsv_func_addr): New prototypes.
6405
6406 * ax.h: New include file.
6407 * ax.c: New source file.
6408
6409 * tracepoint.c: Include ax.h.
6410 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
6411 agent_expr, eval_result_type): Move to ax.h.
6412 (parse_agent_expr): Rename to ...
6413 (gdb_parse_agent_expr): ... this, make it non-static and move
6414 to ax.h.
6415 (unparse_agent_expr) Rename to ...
6416 (gdb_unparse_agent_expr): ... this, make it non-static and move
6417 to ax.h.
6418 (eval_agent_expr): Rename to ...
6419 (eval_tracepoint_agent_expr): ... this.
6420 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
6421 forward declarations.
6422 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
6423 (agent_get_trace_state_variable_value): New function.
6424 (agent_set_trace_state_variable_value): New function.
6425 (cmd_qtdp): Call gdb_parse_agent_expr (...).
6426 (response_tracepoint): Call gdb_unparse_agent_expr (...).
6427 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
6428 (condition_true_at_tracepoint): Likewise.
6429 (parse_agent_expr): Rename to ...
6430 (gdb_parse_agent_expr): ... this and move to ax.c.
6431 (unparse_agent_expr): Rename to ...
6432 (gdb_unparse_agent_expr): ... this and move to ax.c.
6433 (gdb_agent_op_name): Move to ax.c.
6434 (eval_agent_expr): Rename to ...
6435 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
6436 and move to ax.c.
6437 (eval_tracepoint_agent_expr): New function.
6438 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 6439 non-static.
5e1dc496
LM
6440 (current_insn_ptr, emit_error, struct bytecode_address): Move to
6441 ax.c.
6442 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
6443 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
6444 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
6445 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
6446 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
6447 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
6448 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
6449 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
6450 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
6451 (compile_bytecodes): Remove forward declaration.
6452 (is_goto_target): Move to ax.c.
6453 (compile_bytecodes): Move to ax.c and call
6454 agent_get_trace_state_variable_value (...) and
6455 agent_set_trace_state_variable_value (...).
6456
6457 * Makefile.in: Update ax.c and IPA dependencies.
6458
277e4e52
PA
64592012-02-24 Pedro Alves <palves@redhat.com>
6460
6461 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
6462 (cmd_bigqtbuffer_circular): ... this. Only handle
6463 'QTBuffer:circular:'.
6464 (handle_tracepoint_general_set): Adjust.
6465
bf4c19f7
YQ
64662012-02-16 Yao Qi <yao@codesourcery.com>
6467
6468 * inferiors.c: Move code to ...
6469 * dll.c: .... here. New.
6470 * server.h: Declare clear_dlls.
6471 * Makefile.in (SFILES): Add dll.c.
6472 (OBS): Add dll.o
6473 (dll.o): New rule.
6474
d73f2619
YQ
64752012-02-11 Yao Qi <yao@codesourcery.com>
6476
6477 * server.c: (handle_monitor_command): Add a new parameter
6478 `own_buf'.
6479 (handle_query): Update caller.
6480
f8255c2a
JB
64812012-02-09 Joel Brobecker <brobecker@adacore.com>
6482
6483 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
6484 * configure, config.in: Regenerate.
6485 * hostio.c: Provide an alternate implementation if HAVE_READLINK
6486 is not defined.
6487
da84f473
PA
64882012-02-02 Pedro Alves <palves@redhat.com>
6489
6490 Try SIGKILL first, then PTRACE_KILL.
6491 * linux-low.c (linux_kill_one_lwp): New.
6492 (linux_kill_one_lwp): Rename to ...
6493 (kill_one_lwp_callback): ... this. Use the new
6494 linux_kill_one_lwp.
6495
e886a173
PA
64962012-02-02 Pedro Alves <palves@redhat.com>
6497
6498 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
6499 inferior.
6500
be07f1a2
PA
65012012-01-27 Pedro Alves <palves@redhat.com>
6502
6503 * linux-low.c (linux_child_pid_to_exec_file): Delete.
6504 (elf_64_file_p): Make static.
6505 (linux_pid_exe_is_elf_64_file): New.
6506 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
6507 Delete declarations.
6508 (linux_pid_exe_is_elf_64_file): Declare.
6509 * linux-x86-low.c (x86_arch_setup): Use
6510 linux_pid_exe_is_elf_64_file.
6511
d8301ad1
JK
65122012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
6513
6514 * linux-low.c (linux_wait_for_event_1): Rename to ...
6515 (linux_wait_for_event): ... here and merge it with former
6516 linux_wait_for_event - new variable wait_ptid, use it.
6517 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
6518
01b17894
PA
65192012-01-23 Pedro Alves <palves@redhat.com>
6520
6521 * server.c (main): Avoid yet another case of infinite loop while
6522 detaching/killing after a longjmp.
6523
e825046f
JK
65242012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
6525
6526 Code cleanup.
6527 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
6528
b9e7b9c3
UW
65292012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
6530
6531 * hostio.c (handle_readlink): New function.
6532 (handle_vFile): Call it to handle "vFile:readlink" packets.
6533
901f9912
UW
65342012-01-20 Pedro Alves <palves@redhat.com>
6535 Ulrich Weigand <ulrich.weigand@linaro.org>
6536
6537 * server.c (handle_v_requests): Only support vAttach and vRun to
6538 start multiple processes when in extended protocol mode.
6539
fc1ab1a0
PA
65402012-01-17 Pedro Alves <palves@redhat.com>
6541
6542 * tracepoint.c (initialize_tracepoint): Use mmap instead of
6543 memalign plus mprotect to allocate the scratch buffer.
6544
7d5d4e98
PA
65452012-01-13 Pedro Alves <palves@redhat.com>
6546
6547 * server.c (attach_inferior): Clear `cont_thread'.
6548
f128d5e9
PA
65492012-01-13 Pedro Alves <palves@redhat.com>
6550
6551 * server.c (main): Avoid infinite loop while detaching/killing
6552 after a longjmp.
6553
06db92f0
DE
65542012-01-09 Doug Evans <dje@google.com>
6555
6556 * server.c (start_inferior): Set last_ptid in --wrapper case.
6557
32d92999
YQ
65582012-01-06 Yao Qi <yao@codesourcery.com>
6559
6560 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
6561 defined.
6562 [IN_PROCESS_AGENT] (debug_agent): New global variable.
6563
5e0a92a9
YQ
65642012-01-04 Yao Qi <yao@codesourcery.com>
6565
6566 * tracepoint.c (cmd_qtdp): Print debug message
6567 for static tracepoint.
6568
ae639e8c
YQ
65692012-01-04 Yao Qi <yao@codesourcery.com>
6570
6571 * tracepoint.c (trace_vdebug): Differentiate debug message
6572 between gdbserver and IPA.
6573
f72429c5
YQ
65742012-01-03 Yao Qi <yao@codesourcery.com>
6575
6576 * tracepoint.c (tracepoint_was_hit): Don't collect for
6577 static tracepoint.
6578
12c3e59c
JB
65792012-01-02 Joel Brobecker <brobecker@adacore.com>
6580
6581 * terminal.h: Reformat copyright header.
6582
67827812
JB
65832012-01-02 Joel Brobecker <brobecker@adacore.com>
6584
6585 * server.c (gdbserver_version): Update copyright year.
6586 * gdbreplay.c (gdbreplay_version): Likewise.
6587
3e52c33d
JK
65882011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
6589
6590 * linux-low.c (linux_create_inferior): Put empty if clause for write.
6591
6592 Revert:
6593 2011-12-18 Hui Zhu <teawater@gmail.com>
6594 * linux-low.c (linux_create_inferior): Save return value to ret.
6595
66f1260e
HZ
65962011-12-18 Hui Zhu <teawater@gmail.com>
6597
6598 * linux-low.c (linux_create_inferior): Save return value to ret.
6599
e77616d7
DE
66002011-12-16 Doug Evans <dje@google.com>
6601
e7b06c57
DE
6602 * linux-low.c (linux_create_inferior): If stdio connection,
6603 redirect stdin from /dev/null, stdout to stderr.
6604 * remote-utils.c (remote_is_stdio): New static global.
6605 (remote_connection_is_stdio): New function.
6606 (remote_prepare): Handle stdio connection.
6607 (remote_open): Ditto.
6608 (remote_close): Don't close stdin for stdio connections.
6609 (read_prim,write_prim): New functions. Replace all calls to
6610 read/write to these.
6611 * server.c (main): Watch for "-" argument. Move call to
6612 remote_prepare before start_inferior.
6613 * server.h (STDIO_CONNECTION_NAME): New macro.
6614 (remote_connection_is_stdio): Declare.
6615
e77616d7
DE
6616 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
6617 in debugging output.
6618
82067193
YQ
66192011-12-15 Yao Qi <yao@codesourcery.com>
6620
6621 * tracepoint.c: Include sys/syscall.h.
6622 (gdb_ust_thread): Remove preprocessor conditional.
6623
82bfbe7e
PA
66242011-12-14 Pedro Alves <pedro@codesourcery.com>
6625
6626 * linux-low.c (linux_detach_one_lwp): Call
6627 the_low_target.prepare_to_resume before detaching.
6628
712c6575
YQ
66292011-12-14 Yao Qi <yao@codesourcery.com>
6630
6631 * tracepoint.c (gdb_ust_thread): Don't ignore return value
6632 of write.
6633
d54d1edf
YQ
66342011-12-14 Yao Qi <yao@codesourcery.com>
6635
6636 * i386-low.c (i386_low_stopped_data_address): Initialize local
6637 variable `control'.
6638
6210a125
PA
66392011-12-13 Pedro Alves <pedro@codesourcery.com>
6640
6641 PR remote/13492
6642
6643 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
6644 DR_CONTROL unless necessary. Extend comments.
6645 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
6646 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
6647
2ece8244
YQ
66482011-12-13 Yao Qi <yao@codesourcery.com>
6649
6650 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
6651 macros.
6652 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
6653
784867a5
JK
66542011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
6655
6656 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
6657 Print new debug message for such case.
6658
6bf36717
JK
66592011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
6660
6661 Fix overlapping memcpy.
6662 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
6663 the read_inferior_memory transfer.
6664 (delete_fast_tracepoint_jump): New variable buf. Use it for the
6665 write_inferior_memory transfer.
6666 (set_fast_tracepoint_jump): New variable buf. Use it for the
6667 read_inferior_memory and write_inferior_memory transfers.
6668 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
6669 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
6670 Use it for the write_inferior_memory transfer.
6671 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
6672 buffers.
6673
50275556
MR
66742011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
6675
6676 * linux-low.c (fetch_register, store_register): Make code
6677 consistent, fix formatting.
6678
7325beb4
MR
66792011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
6680
6681 * linux-low.c (usr_store_inferior_registers): Factor out code
6682 to handle individual registers into...
6683 (store_register): ... this new function.
6684
c642a434
UW
66852011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
6686
6687 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
6688 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
6689 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
6690 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
6691 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
6692 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
6693 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
6694 (srv_xmlfiles): Add new XML files.
6695
6696 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
6697 and <sys/uio.h>.
6698 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
6699 (init_registers_s390_linux32v1): Add prototype.
6700 (init_registers_s390_linux32v2): Likewise.
6701 (init_registers_s390_linux64v1): Likewise.
6702 (init_registers_s390_linux64v2): Likewise.
6703 (init_registers_s390x_linux64v1): Likewise.
6704 (init_registers_s390x_linux64v2): Likewise.
6705 (s390_num_regs): Increment to 52.
6706 (s390_regmap): Add orig_r2 register.
6707 (s390_num_regs_3264): Increment to 68.
6708 (s390_regmap_3264): Add orig_r2 register.
6709 (s390_collect_ptrace_register): Handle orig_r2 register.
6710 (s390_supply_ptrace_register): Likewise.
6711 (s390_fill_last_break): New function.
6712 (s390_store_last_break): Likewise.
6713 (s390_fill_system_call): New function.
6714 (s390_store_system_call): Likewise.
6715 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
6716 register sets.
6717 (s390_check_regset): New function.
6718 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
6719 NT_S390_SYSTEM_CALL regsets and use appropriate description.
6720 Update target_regsets for available register sets.
6721
2268b414
JK
67222011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
6723 Jan Kratochvil <jan.kratochvil@redhat.com>
6724
6725 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
6726 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
6727 New.
6728 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
6729 * linux-low.h (struct process_info_private): New member r_debug.
6730 * server.c (handle_qxfer_libraries): Call
6731 the_target->qxfer_libraries_svr4.
6732 (handle_qxfer_libraries_svr4): New function.
6733 (qxfer_packets): New entry "libraries-svr4".
6734 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
6735 * target.h (struct target_ops): New member qxfer_libraries_svr4.
6736 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
6737 PACKET_qXfer_libraries_svr4.
6738
d6db1fab
UW
67392011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
6740
6741 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
6742 PSW address/mask between 8-byte and 16-byte formats.
6743 (s390_supply_ptrace_register): Likewise.
6744 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
6745 basic addressing mode bit.
6746
242f5f1c
SS
67472011-11-24 Stan Shebs <stan@codesourcery.com>
6748
6749 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
6750
f196051f
SS
67512011-11-17 Stan Shebs <stan@codesourcery.com>
6752
6753 * tracepoint.c (struct tracepoint): New field traceframe_usage.
6754 (tracing_start_time): New global.
6755 (tracing_stop_time): New global.
6756 (tracing_user_name): New global.
6757 (tracing_notes): New global.
6758 (tracing_stop_note): New global.
6759 (cmd_qtstart): Set traceframe_usage, start_time.
6760 (stop_tracing): Set stop_time.
6761 (cmd_qtstatus): Report additional status.
6762 (cmd_qtp): New function.
6763 (handle_tracepoint_query): Call it.
6764 (cmd_qtnotes): New function.
6765 (handle_tracepoint_general_set): Call it.
6766 (get_timestamp): Rename from tsv_get_timestamp.
6767
405f8e94
SS
67682011-11-14 Stan Shebs <stan@codesourcery.com>
6769 Kwok Cheung Yeung <kcy@codesourcery.com>
6770
6771 * linux-x86-low.c (small_jump_insn): New.
6772 (i386_install_fast_tracepoint_jump_pad): Add arguments for
6773 trampoline and error message, build a trampoline and issue a small
6774 jump instruction to it.
6775 (x86_install_fast_tracepoint_jump_pad): Add arguments for
6776 trampoline and error message.
6777 (x86_get_min_fast_tracepoint_insn_len): New.
6778 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
6779 * linux-low.h (struct linux_target_ops): Add arguments to
6780 install_fast_tracepoint_jump_pad operation, add new operation.
6781 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
6782 arguments.
6783 (linux_get_min_fast_tracepoint_insn_len): New function.
6784 (linux_target_op): Add new operation.
6785 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
6786 (gdb_trampoline_buffer_end): Ditto.
6787 (gdb_trampoline_buffer_error): Ditto.
6788 (struct ipa_sym_addresses): Add fields for new IPA variables.
6789 (symbol_list): Add entries for new IPA variables.
6790 (struct tracepoint): Add fields to hold the address range of the
6791 trampoline used by the tracepoint.
6792 (trampoline_buffer_head): New static variable.
6793 (trampoline_buffer_tail): Ditto.
6794 (claim_trampoline_space): New function.
6795 (have_fast_tracepoint_trampoline_buffer): New function.
6796 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
6797 structure.
6798 (install_fast_tracepoint): Ditto, also add error buffer argument.
6799 (cmd_qtminftpilen): New function.
6800 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
6801 (fast_tracepoint_from_trampoline_address): New function.
6802 (fast_tracepoint_collecting): Handle trampoline as part of jump
6803 pad space.
6804 (set_trampoline_buffer_space): New function.
6805 (initialize_tracepoint): Initialize new IPA variables.
6806 * target.h (struct target_ops): Add arguments to
6807 install_fast_tracepoint_jump_pad operation, add new
6808 get_min_fast_tracepoint_insn_len operation.
6809 (target_get_min_fast_tracepoint_insn_len): New.
6810 (install_fast_tracepoint_jump_pad): Add arguments.
6811 * server.h (IPA_BUFSIZ): Define.
6812 * linux-i386-ipa.c: Include extra header files.
6813 (initialize_fast_tracepoint_trampoline_buffer): New function.
6814 (initialize_low_tracepoint): Call it.
6815 * server.h (set_trampoline_buffer_space): Declare.
6816 (claim_trampoline_space): Ditto.
6817 (have_fast_tracepoint_trampoline_buffer): Ditto.
6818
1e4d1764
YQ
68192011-11-14 Yao Qi <yao@codesourcery.com>
6820
6821 * server.c (handle_query): Handle InstallInTrace for qSupported.
6822 * tracepoint.c (add_tracepoint): Sort list.
6823 (install_tracepoint, download_tracepoint): New.
6824 (cmd_qtdp): Call them to install and download tracepoints.
6825 (sort_tracepoints): Removed.
6826 (cmd_qtstart): Update.
6827
5c73ff4e
YQ
68282011-11-14 Yao Qi <yao@codesourcery.com>
6829
6830 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
6831 * mem-break.h: Declare.
6832 * tracepoint.c (cmd_qtstart): Move some code to ...
6833 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
6834 New.
6835 (download_tracepoints): Move some code to ...
6836 (download_tracepoint_1): ... here. New.
6837
86a30030
YQ
68382011-11-08 Yao Qi <yao@codesourcery.com>
6839
6840 * remote-utils.c (relocate_instruction): A comment fix.
6841
8d26e50c
JB
68422011-11-07 Joel Brobecker <brobecker@adacore.com>
6843
6844 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
6845 (i386_dr_low_get_control, i386_dr_low_get_status): Use
6846 dr_status_mirror and dr_control_mirror from debug_reg_state.
6847 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
6848 (i386_initial_stuff): Remove use of deleted globals.
6849 (i386_get_thread_context, i386_set_thread_context,
6850 i386_thread_added): Use dr_status_mirror and dr_control_mirror
6851 from debug_reg_state.
6852
a59306a3
YQ
68532011-11-05 Yao Qi <yao@codesourcery.com>
6854
6855 * tracepoint.c (gdb_collect): Loop over tracepoints of same
6856 address as TPOINT's.
6857
3065dfb6
SS
68582011-11-02 Stan Shebs <stan@codesourcery.com>
6859
6860 * tracepoint.c (agent_mem_read_string): New function.
6861 (eval_agent_expr): Call it for tracenz.
6862 * server.c (handle_query): Report support for tracenz.
6863
fd0d8c7c
YQ
68642011-11-02 Yao Qi <yao@codesourcery.com>
6865
6866 * tracepoint.c (cmd_qtstart): Remove unused local variables.
6867
609086b1
YQ
68682011-11-02 Yao Qi <yao@codesourcery.com>
6869
6870 * target.h: Fix a typo in comment.
6871
b9fd1791
PA
68722011-10-31 Pedro Alves <pedro@codesourcery.com>
6873
6874 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
6875 clobber the breakpoints' shadows with fast tracepoint jumps.
6876 * mem-break.h (check_mem_write): Add `myaddr' parameter.
6877 * target.c (write_inferior_memory): Also pass MYADDR down to
6878 check_mem_write.
6879
03583c20
UW
68802011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
6881
6882 * configure.ac: Check support for personality routine.
6883 * configure: Regenerate.
6884 * config.in: Likewise.
6885 * linux-low.c: Include <sys/personality.h>.
6886 Define ADDR_NO_RANDOMIZE if necessary.
6887 (linux_create_inferior): Disable address space randomization when
6888 forking inferior, if requested.
6889 (linux_supports_disable_randomization): New function.
6890 (linux_target_ops): Install it.
6891 * server.h (disable_randomization): Declare.
6892 * server.c (disable_randomization): New global variable.
6893 (handle_general_set): Handle QDisableRandomization.
6894 (handle_query): Likewise for qSupported.
6895 (main): Support --disable-randomization and --no-disable-randomization
6896 command line arguments.
6897 * target.h (struct target_ops): Add supports_disable_randomization.
6898 (target_supports_disable_randomization): New macro.
6899
723b724b
MF
69002011-09-29 Mike Frysinger <vapier@gentoo.org>
6901
6902 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
6903 ifdef check.
6904 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
6905 [!PT_GETDSBT] (target_loadmap): New definition.
6906 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
6907 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
6908 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
6909 and PT_GETDSBT to LINUX_LOADMAP.
6910 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
6911 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
6912
55329a5c 69132011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
6914
6915 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
6916 (arm_linux_hwbp_cap): New static variable.
6917 (arm_linux_get_hwbp_cap): Replace by ...
6918 (arm_linux_init_hwbp_cap): ... this new function.
6919 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
6920 (arm_linux_get_hw_watchpoint_count): Likewise.
6921 (arm_linux_get_hw_watchpoint_max_length): Likewise.
6922 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
6923 (arm_prepare_to_resume): Use perror_with_name instead of error.
6924
55329a5c 69252011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
6926
6927 * linux-arm-low.c: Include <signal.h>.
6928 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
6929 (struct arm_linux_hwbp_cap): New data type.
6930 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
6931 (struct arm_linux_hw_breakpoint): New data type.
6932 (MAX_BPTS, MAX_WPTS): Define.
6933 (struct arch_process_info, struct arch_lwp_info): New data types.
6934 (arm_linux_get_hwbp_cap): New function.
6935 (arm_linux_get_hw_breakpoint_count): Likewise.
6936 (arm_linux_get_hw_watchpoint_count): Likewise.
6937 (arm_linux_get_hw_watchpoint_max_length): Likewise.
6938 (arm_hwbp_control_initialize): Likewise.
6939 (arm_hwbp_control_is_enabled): Likewise.
6940 (arm_hwbp_control_is_initialized): Likewise.
6941 (arm_hwbp_control_disable): Likewise.
6942 (arm_linux_hw_breakpoint_equal): Likewise.
6943 (arm_linux_hw_point_initialize): Likewise.
6944 (struct update_registers_data): New data structure.
6945 (update_registers_callback: New function.
6946 (arm_insert_point): Likewise.
6947 (arm_remove_point): Likewise.
6948 (arm_stopped_by_watchpoint): Likewise.
6949 (arm_stopped_data_address): Likewise.
6950 (arm_new_process): Likewise.
6951 (arm_new_thread): Likewise.
6952 (arm_prepare_to_resume): Likewise.
6953 (the_low_target): Register arm_insert_point, arm_remove_point,
6954 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
6955 arm_new_thread, and arm_prepare_to_resume.
6956
6b9801d4
SS
69572011-09-15 Stan Shebs <stan@codesourcery.com>
6958
6959 * server.h (struct emit_ops): Add compare-goto fields.
6960 * tracepoint.c (gdb_agent_op_sizes): New table.
6961 (emit_eq_goto): New function.
6962 (emit_ne_goto): New function.
6963 (emit_lt_goto): New function.
6964 (emit_le_goto): New function.
6965 (emit_gt_goto): New function.
6966 (emit_ge_goto): New function.
6967 (is_goto_target): New function.
6968 (compile_bytecodes): Recognize special cases of compare-goto
6969 combinations and call specialized emitters for them.
6970 * linux-x86-low.c (amd64_emit_eq_goto): New function.
6971 (amd64_emit_ne_goto): New function.
6972 (amd64_emit_lt_goto): New function.
6973 (amd64_emit_le_goto): New function.
6974 (amd64_emit_gt_goto): New function.
6975 (amd64_emit_ge_goto): New function.
6976 (amd64_emit_ops): Add the new functions.
6977 (i386_emit_eq_goto): New function.
6978 (i386_emit_ne_goto): New function.
6979 (i386_emit_lt_goto): New function.
6980 (i386_emit_le_goto): New function.
6981 (i386_emit_gt_goto): New function.
6982 (i386_emit_ge_goto): New function.
6983 (i386_emit_ops): Add the new functions.
6984
bf15cbda
SS
69852011-09-08 Stan Shebs <stan@codesourcery.com>
6986
6987 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
6988 (i386_emit_epilogue): Restore %ebx.
6989
943ca1dd
JZ
69902011-08-31 Jie Zhang <jzhang918@gmail.com>
6991
6992 * server.c (step_thread): Remove definition.
6993 (process_serial_event): Don't handle Hs.
6994 * server.h (step_thread): Remove declaration.
6995 * target.c (set_desired_inferior): Remove use of step_thread.
6996
e3deef73
LM
69972011-08-24 Luis Machado <lgustavo@codesourcery.com>
6998
6999 * linux-low.c: Include linux-procfs.h.
7000 (linux_attach_lwp_1): Update comments.
7001 (linux_attach): Scan for existing threads when attaching to a
7002 process that is the tgid.
7003 * Makefile.in: Update dependencies.
7004
13da1c97
LM
70052011-08-24 Luis Machado <lgustavo@codesourcery.com>
7006
7007 * configure.srv: Add linux-procfs.o dependencies.
7008
881127c9
YQ
70092011-08-14 Yao Qi <yao@codesourcery.com>
7010
7011 * target.h (struct target_ops): Fix indent.
7012 * win32-low.c (win32_target_ops): Fix comment.
7013
58dbd541
YQ
70142011-08-14 Andrew Jenner <andrew@codesourcery.com>
7015 Yao Qi <yao@codesourcery.com>
7016
7017 * Makefile.in (clean): Remove tic6x-*.c files.
7018 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
7019 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
7020 (tic6x-c64xp-linux.c): Likewise.
7021 * configure.srv: Add support for tic6x-*-uclinux.
7022 * linux-tic6x-low.c: New.
7023 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
7024
78d85199
YQ
70252011-08-14 Andrew Stubbs <ams@codesourcery.com>
7026 Yao Qi <yao@codesourcery.com>
7027
7028 * target.h (struct target_ops): Add read_loadmap.
7029 * linux-low.c (struct target_loadseg): New type.
7030 (struct target_loadmap): New type.
7031 (linux_read_loadmap): New function.
7032 (linux_target_ops): Add linux_read_loadmap.
7033 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
7034 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
7035 to NULL.
78d85199 7036
a959a88d
EZ
70372011-08-05 Eli Zaretskii <eliz@gnu.org>
7038
7039 * win32-low.c: Include <stdint.h>.
7040
1ced966e
PA
70412011-07-22 Pedro Alves <pedro@codesourcery.com>
7042
7043 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
7044 to the inferior here.
7045 (i386_remove_aligned_watchpoint): Ditto.
7046 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
7047 fit part of the watchpoint in the debug registers.
7048 (i386_update_inferior_debug_regs): New.
7049 (i386_low_insert_watchpoint): Work on a local mirror of the debug
7050 registers, and only update the inferior on success.
7051 (i386_low_remove_watchpoint): Ditto.
7052
d26e3629
KY
70532011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
7054
7055 * linux-low.c (compare_ints, unique, list_threads, show_process,
7056 linux_core_of_thread): Delete.
7057 (linux_target_ops): Change linux_core_of_thread to
7058 linux_common_core_of_thread.
7059 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
7060 * utils.c (malloc_failure): Change type of argument.
7061 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
7062 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
7063 common/linux-osdata.c, common/ptid.c and common/buffer.c.
7064 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
7065 (IPA_OBJS): Add common-utils-ipa.o.
7066 (ptid_h, linux_osdata_h): New macros.
7067 (server_h): Add common/common-utils.h, common/xml-utils.h,
7068 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
7069 common/ptid.h.
7070 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
7071 ptid.o, buffer.o): New rules.
7072 (linux-low.o): Add common/linux-osdata.h as a dependency.
7073 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
7074 * configure.ac: Add AC_HEADER_DIRENT check.
7075 * config.in: Regenerate.
7076 * configure: Regenerate.
7077 * remote-utils.c (xml_escape_text): Delete.
7078 (buffer_grow, buffer_free, buffer_init, buffer_finish,
7079 buffer_xml_printf): Move to common/buffer.c.
7080 * server.c (main): Remove call to initialize_inferiors.
7081 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
7082 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
7083 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
7084 internal_error, gdb_assert, gdb_assert_fail): Delete.
7085 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
7086 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
7087 common/buffer.h.
7088 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
7089 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
7090 initialize_inferiors): Delete.
7091
2275a1a7
PA
70922011-07-20 Pedro Alves <pedro@codesourcery.com>
7093
7094 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
7095 symbol error.
7096
0a5b1e09
PA
70972011-05-31 Pedro Alves <pedro@codesourcery.com>
7098
7099 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
7100 assertion.
7101 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
7102
6938fd34
YQ
71032011-05-26 Yao Qi <yao@codesourcery.com>
7104
7105 * Makefile.in (thread-db.o): Track dependence to
7106 common/gdb_thread_db.h.
7107 * thread-db.c: include gdb_thread_db.h from right place.
7108
b481f9e0
TT
71092011-05-16 Adrian Cornish <gnu@bluedreamer.com>
7110
7111 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
7112 __FILE__ and __LINE__ to internal_error.
7113
98a5dd13
DE
71142011-05-13 Doug Evans <dje@google.com>
7115
7116 * thread-db.c (try_thread_db_load_from_sdir): New function.
7117 (try_thread_db_load_from_dir): New function.
7118 (thread_db_load_search): Handle $sdir, ignore $pdir.
7119 Remove trying of system directories if search of
7120 libthread-db-search-path fails, that is now done via $sdir.
7121
d248b706
KY
71222011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
7123
7124 * server.c (handle_query): Add EnableDisableTracepoints to the list
7125 of supported features.
43aaf8b6 7126 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 7127 tracepoints.
43aaf8b6
PA
7128 (cmd_qtenable_disable): New.
7129 (cmd_qtstart): Install tracepoints even if disabled.
7130 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
7131 receiving a QTEnable or QTDisable packet.
7132 (gdb_collect): Skip data collection if fast tracepoint is disabled.
7133 (ust_marker_to_static_tracepoint): Do not ignore disabled static
7134 tracepoints.
7135 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 7136
84e578fb
DE
71372011-05-10 Doug Evans <dje@google.com>
7138
7139 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
7140
71f55dd8
DE
71412011-05-04 Doug Evans <dje@google.com>
7142
7143 * linux-low.c (linux_join): Skip process lookup.
7144 * spu-low.c (spu_join): Ditto.
7145 * server.c (join_inferiors_callback): Delete.
7146 (process_serial_event): For 'D' packet (detach) call join_inferior
7147 directly.
7148
4d393d60
JM
71492011-05-04 Joseph Myers <joseph@codesourcery.com>
7150
7151 * README: Don't mention xscale*-*-linux*.
7152 * configure.srv (xscale*-*-linux*): Don't handle target.
7153
b00ad6ff
NF
71542011-04-27 Nathan Froyd <froydnj@codesourcery.com>
7155
7156 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
7157 casting pointers.
7158 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
7159 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
7160 (i386_emit_void_call_2): Likewise.
7161
af96c192
YQ
71622011-04-26 Yao Qi <yao@codesourcery.com>
7163
43aaf8b6
PA
7164 * linux-low.c: Move common macros to linux-ptrace.h.
7165 Include linux-ptrace.h.
af96c192
YQ
7166 * Makefile.in (linux_ptrace_h): New.
7167 (linux-low.o): Depends on linux-ptrace.h.
7168
03f2bd59
JK
71692011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
7170
7171 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
7172 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
7173 (remote_prepare): New function with most of the TCP code from ...
7174 (remote_open): ... here. Detect PORT here unconditionally. Move also
7175 setting transport_is_reliable.
7176 * server.c (run_once): New variable.
7177 (gdbserver_usage): Document it.
7178 (main): Set run_once for `--once'. Call remote_prepare. Exit after
7179 the first run if RUN_ONCE.
7180 * server.h (run_once, remote_prepare): New declarations.
7181
7a9dd1b2
TT
71822011-04-19 Tom Tromey <tromey@redhat.com>
7183
7184 * win32-low.c (handle_load_dll): Remove duplicate "the".
7185
81239425
PM
71862011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
7187
7188 Remove support for old Cygwin 1.5 versions.
7189 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
7190 function to avoid warning.
7191 (win32_add_one_solib): Use cygwin_conv_path function to avoid
7192 warning.
7193
9e0627f1
PM
71942011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
7195
7196 * gdbserver/server.h (Macro _): Define it if not available.
7197
588eebee
MS
71982011-03-14 Michael Snyder <msnyder@vmware.com>
7199
348af9f7 7200 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 7201
43f70d4c
JB
72022011-03-10 Joel Brobecker <brobecker@adacore.com>
7203
7204 * Makefile.in (maintainer-clean realclean distclean): Remove
7205 "make ... subdir_do" command.
7206
348af9f7
MS
72072011-03-10 Michael Snyder <msnyder@vmware.com>
7208
7209 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
7210
7211 * server.c (handle_v_run): Free alloced buffer on early return.
7212
e637a4f5
YQ
72132011-03-09 Yao Qi <yao@codesourcery.com>
7214
7215 Revert:
7216 2011-03-04 Yao Qi <yao@codesourcery.com>
7217
7218 * Makefile.in: Remove GNU make feature --directory.
7219
7220 2011-03-05 Yao Qi <yao@codesourcery.com>
7221
7222 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
7223 (subdir_do): New make target. Copied from gdb/Makefile.
7224 (maintainer-clean, realclean, distclean, clean): Call corresponding
7225 make targets in common/Makefile.
7226
7227 2011-02-11 Yao Qi <yao@codesourcery.com>
7228
7229 * configure.ac: Call AC_PROG_RANLIB.
7230 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
7231 * configure: Regenerate.
7232
e6edda56
JK
72332011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7234
7235 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
7236
e5141119
JB
72372011-03-06 Yao Qi <yao@codesourcery.com>
7238
7239 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
7240
64794aa4
JB
72412011-03-05 Yao Qi <yao@codesourcery.com>
7242
7243 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
7244 (subdir_do): New make target. Copied from gdb/Makefile.
7245 (maintainer-clean, realclean, distclean, clean): Call corresponding
7246 make targets in common/Makefile.
7247
7a762829
YQ
72482011-03-04 Yao Qi <yao@codesourcery.com>
7249
7250 * Makefile.in: Remove GNU make feature --directory.
7251
348af9f7
MS
72522011-03-04 Michael Snyder <msnyder@vmware.com>
7253
7254 * server.c (queue_stop_reply): Call xmalloc not malloc.
7255
72562011-03-02 Michael Snyder <msnyder@vmware.com>
7257
7258 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
7259
9f72fee2
MS
72602011-02-28 Michael Snyder <msnyder@vmware.com>
7261
588eebee
MS
7262 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
7263 (cmd_qtframe): Ditto.
7264 (cmd_qtbuffer): Ditto.
7265 (cmd_bigqtbuffer): Ditto.
7266
9f72fee2
MS
7267 * utils.c (decimal2str): Initialize 'width' to nine, then
7268 don't mess with it.
7269
8040bd49
UW
72702011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
7271
7272 * hostio.c (require_data): Free *data, not data.
7273
7e52cbd0
JK
72742011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7275
7276 * hostio.c (require_data): Use free, not xfree.
7277
9130f83e
MS
72782011-02-27 Michael Snyder <msnyder@vmware.com>
7279
4b812f4e
MS
7280 * server.c (handle_query): Discard unused value.
7281
9130f83e
MS
7282 * hostio.c (require_data): Free malloc memory before returning
7283 error.
7284
69d37113
MS
72852011-02-26 Michael Snyder <msnyder@vmware.com>
7286
7287 * linux-low.c (list_threads): Call closedir for dirent.
7288
35f5825a
MS
72892011-02-27 Michael Snyder <msnyder@vmware.com>
7290
2a589cef
MS
7291 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
7292 a case statement falls through.
7293
0adea5f7
MS
7294 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
7295
35f5825a
MS
7296 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
7297 in comparison.
7298
238f1c74
MS
72992011-02-26 Michael Snyder <msnyder@vmware.com>
7300
7301 * utils.c (decimal2str): Eliminate dead code and dead param.
7302 (pulongest): Drop dead param from call to decimal2str.
7303 (plongest): Ditto.
7304
633ff500
JB
73052011-02-24 Joel Brobecker <brobecker@adacore.com>
7306
7307 Revert the following patch (not approved yet):
7308 2011-02-21 Hui Zhu <teawater@gmail.com>
7309 * tracepoint.c (tp_printf): New function.
7310 (eval_agent_expr): Handle gdb_agent_op_printf.
7311
f9c6ff72
HZ
73122011-02-21 Hui Zhu <teawater@gmail.com>
7313
7314 * tracepoint.c (tp_printf): New function.
7315 (eval_agent_expr): Handle gdb_agent_op_printf.
7316
94d5e490
TT
73172011-02-18 Tom Tromey <tromey@redhat.com>
7318
7319 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
7320 (tracepoint.o): Likewise.
7321 * tracepoint.c (enum gdb_agent_op): Use ax.def.
7322 (gdb_agent_op_names): Likewise.
7323
c7f96d2b
TT
73242011-02-18 Tom Tromey <tromey@redhat.com>
7325
7326 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
7327 gdb_agent_op_rot>: New constants.
7328 (gdb_agent_op_names): Add pick and roll.
7329 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
7330 cases.
7331
0feedb2c
JK
73322011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
7333
7334 * aclocal.m4: Regenerated with aclocal-1.11.1.
7335
b3b9301e
PA
73362011-02-14 Pedro Alves <pedro@codesourcery.com>
7337
7338 * server.c (handle_qxfer_traceframe_info): New.
7339 (qxfer_packets): Register "traceframe-info".
7340 (handle_query): Report support for qXfer:traceframe-info:read+.
7341 * tracepoint.c (match_blocktype): New.
7342 (traceframe_find_block_type): Rename to ...
7343 (traceframe_walk_blocks): ... this. Add callback filter argument,
7344 and use it.
7345 (traceframe_find_block_type): New, reimplemented on top of
7346 traceframe_walk_blocks.
7347 (build_traceframe_info_xml): New.
7348 (traceframe_read_info): New.
7349 * server.h (traceframe_read_info): Declare.
7350
4f3e6fb7
YQ
73512011-02-11 Yao Qi <yao@codesourcery.com>
7352
7353 * configure.ac: Call AC_PROG_RANLIB.
7354 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
7355 * configure: Regenerate.
7356
764880b7
PA
73572011-02-07 Pedro Alves <pedro@codesourcery.com>
7358
7359 * server.c (gdb_read_memory): Change return semantics to allow
7360 partial transfers.
7361 (handle_search_memory_1): Adjust.
7362 (process_serial_event) <'m' packet>: Handle partial transfers.
7363 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
7364
1c79eb8a
PA
73652011-01-28 Pedro Alves <pedro@codesourcery.com>
7366
7367 * regcache.c (init_register_cache): Initialize
7368 regcache->register_status.
7369 (free_register_cache): Release regcache->register_status.
7370 (regcache_cpy): Copy register_status.
7371 (registers_to_string): Print 'x's for unavailable registers.
7372 (supply_register): Mark the register's status valid or
7373 unavailable, depending on whether a buffer was passed in or not.
7374 (supply_register_zeroed): New.
7375 (supply_regblock): Mark the registers' status valid or
7376 unavailable, depending on whether a buffer was passed in or not.
7377 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
7378 (struct regcache): New `register_status' field.
7379 (supply_register_zeroed): Declare.
7380 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
7381 supply_register_zeroed, rather than passing a NULL buffer to
7382 supply_register.
7383 * tracepoint.c (fetch_traceframe_registers): Update comment.
7384
85724a0e
PA
73852011-01-28 Pedro Alves <pedro@codesourcery.com>
7386
7387 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
7388 buffer explicit.
7389
d08aafef
PA
73902011-01-25 Pedro Alves <pedro@codesourcery.com>
7391
7392 * server.h (decode_xfer_write): Change prototype.
7393 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
7394 and don't extract the annex here.
7395 * server.c (decode_xfer_read): Remove `annex' parameter,
7396 and don't extract the annex here.
7397 (decode_xfer): New.
7398 (struct qxfer): New.
7399 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
7400 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
7401 (handle_qxfer_statictrace): New functions, abstracted out from
7402 handle_query, and made to use the struct qxfer interface.
7403 (handle_threads_qxfer_proper): Rename to ...
7404 (handle_qxfer_threads_proper): ... this.
7405 (handle_threads_qxfer): Rename to ...
7406 (handle_qxfer_threads): ... this. Adjust.
7407 (qxfer_packets): New array.
7408 (handle_qxfer): New function.
7409 (handle_query): Use handle_qxfer.
7410
493e2a69
MS
74112011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
7412
7413 * gdbreplay.c: Shorten lines of >= 80 columns.
7414 * linux-low.c: Ditto.
7415 * linux-ppc-low.c: Ditto.
7416 * linux-s390-low.c: Ditto.
7417 * linux-sparc-low.c: Ditto.
7418 * linux-x86-low.c: Ditto.
7419 * linux-xtensa-low.c: Ditto.
7420 * mem-break.c: Ditto.
7421 * nto-low.c: Ditto.
7422 * regcache.h: Ditto.
7423 * remote-utils.c: Ditto.
7424 * server.c: Ditto.
7425 * server.h: Ditto.
7426 * thread-db.c: Ditto.
7427 * tracepoint.c: Ditto.
7428 * utils.c: Ditto.
7429 * win32-low.h: Ditto.
7430
44944448
JB
74312011-01-05 Joel Brobecker <brobecker@adacore.com>
7432
7433 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
7434 update.
7435
71ce852c
JB
74362011-01-01 Joel Brobecker <brobecker@adacore.com>
7437
7438 * server.c (gdbserver_version): Update copyright year in version
7439 output.
7440 * gdbreplay.c (gdbreplay_version): Ditto.
7441
eb826dc6
MF
74422010-12-29 Jie Zhang <jie.zhang@analog.com>
7443
7444 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
7445 * linux-bfin-low.c: New file.
7446 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
7447 PT_DATA_ADDR for BFIN targets.
7448 * Makefile.in (SFILES): Add linux-bfin-low.c.
7449 (clean): Remove reg-bfin.c.
7450 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
7451 * README: Mention supported Blackfin targets.
7452
39ab222a
MF
74532010-12-23 Mike Frysinger <vapier@gentoo.org>
7454
7455 * .gitignore: New file.
7456
a1f2ce7d
MF
74572010-11-16 Mike Frysinger <vapier@gentoo.org>
7458
7459 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
7460
f474844c
JZ
74612010-10-22 Jie Zhang <jie@codesourcery.com>
7462
7463 * Makefile.in: Add FLAGS_TO_PASS variable.
7464 (install): Remove dependency of install-only and recursively
7465 invoke make for install-only.
7466
f1048712
DE
74672010-10-04 Doug Evans <dje@google.com>
7468
7469 * Makefile.in (uninstall): Use $(DESTDIR).
7470
b53a1623
PA
74712010-09-24 Pedro Alves <pedro@codesourcery.com>
7472
e6ee044d
PA
7473 PR gdb/11842
7474
b53a1623
PA
7475 * linux-x86-low.c (compat_siginfo_from_siginfo)
7476 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
7477 si_code is < 0. Check for si_code == SI_TIMER before checking for
7478 si_code < 0.
7479
fa1bd1e4
JB
74802010-09-13 Joel Brobecker <brobecker@adacore.com>
7481
7482 * lynx-i386-low.c: New file.
7483 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
7484
47fac8f8
JB
74852010-09-13 Joel Brobecker <brobecker@adacore.com>
7486
7487 * lynx-low.c (ptrace_request_to_str): Remove handling for
7488 request values that have been removed in LynxOS 5.x.
7489
1adfc54d
JB
74902010-09-13 Joel Brobecker <brobecker@adacore.com>
7491
7492 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
7493 <ptrace.h>
7494
c2a66c29
NS
74952010-09-09 Nathan Sidwell <nathan@codesourcery.com>
7496
7497 * configure.ac: Add --enable-inprocess-agent option.
7498 * configure: Rebuilt.
7499
32fcada3
YQ
75002010-09-06 Yao Qi <yao@codesourcery.com>
7501
7502 * linux-low.c (linux_kill): Remove unused variable.
7503 (linux_stabilize_threads): Likewise.
7504 * server.c (start_inferior): Likewise.
7505 (queue_stop_reply_callback): Likewise.
7506 * tracepoint.c (do_action_at_tracepoint): Likewise.
7507
0cccb683
YQ
75082010-09-06 Yao Qi <yao@codesourcery.com>
7509
7510 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
7511 on return.
7512
423ec54c
JK
75132010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
7514
7515 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
7516
12ac6819
PA
75172010-09-06 Pedro Alves <pedro@codesourcery.com>
7518
7519 * Makefile.in (install-only): Replace $IPA_DEPFILES with
7520 "$(IPA_DEPFILES)".
7521
8ed54b31
JB
75222010-09-01 Joel Brobecker <brobecker@adacore.com>
7523
7524 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
7525 gdbserver/lynx-ppc-low.c: New files.
7526 * Makefile.in (lynx_low_h): New variable.
7527 (lynx-low.o, lynx-ppc-low.o): New rules.
7528 * configure.ac: On LynxOS, link with -lnetinet.
7529 * configure.srv: Add handling of powerpc-*-lynxos* targets.
7530 * configure: regenerate.
7531
bb0116a4
JB
75322010-09-01 Joel Brobecker <brobecker@adacore.com>
7533
7534 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
7535 * configure.ac: Add check for vasprintf and vsnprintf.
7536 * configure, config.in: Regenerate.
7537 * server.h (vasprintf, vsnprintf): Add conditional declarations.
7538
a778ab81 75392010-09-01 Joel Brobecker <brobecker@adacore.com>
7540
7541 * gdbreplay.c: Move include of alloca.h up, next to include of
7542 malloc.h.
7543 * server.h: Add include of malloc.h.
7544 * mem-break.c: Remove include of malloc.h.
7545 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
7546
8b034a19 75472010-09-01 Joel Brobecker <brobecker@adacore.com>
7548
7549 * Makefile.in (memmem.o): Build with -Wno-error.
7550
75512010-09-01 Joel Brobecker <brobecker@adacore.com>
7552
7553 * utils.c (xsnprintf): Make non-static.
7554 * server.h: Add xsnprintf declaration.
7555 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
7556 replace calls to snprintf by calls to xsnprintf throughout.
7557
75582010-09-01 Joel Brobecker <brobecker@adacore.com>
7559
7560 * configure.ac: Add configure check for alloca.
7561 * configure, config.in: Regenerate.
7562 * server.h: Include alloca.h if it exists.
7563 * gdbreplay.c: Include alloca.h if it exists.
7564
1a981360
PA
75652010-08-28 Pedro Alves <pedro@codesourcery.com>
7566
7567 * linux-low.c (__SIGRTMIN): Define if not already defined.
7568 (linux_create_inferior): Check for __ANDROID__ rather than
7569 __SIGRTMIN.
7570 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
7571 are already deferred.
7572 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
7573 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
7574 stopped and already has a pending signal to report.
7575 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
7576 a pending signal to report or is moving out of a jump pad.
7577 (linux_init_signals): Check for __ANDROID__ rather than
7578 __SIGRTMIN.
7579
b4d51a55
PA
75802010-08-28 Pedro Alves <pedro@codesourcery.com>
7581
7582 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
7583 debug_threads check. Avoid a linear search when not doing debug
7584 output.
7585
ec48365d
PA
75862010-08-27 Pedro Alves <pedro@codesourcery.com>
7587
7588 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
7589 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
7590 (struct file_handler) <fd>: Change type to gdb_fildes_t.
7591 (process_event): Change local fd's type to gdb_fildes_t.
7592 (create_file_handler): Adjust prototype.
7593 (delete_file_handler): Adjust prototype.
7594 (handle_file_event): Adjust prototype. Use pfildes.
7595 (create_file_event): Adjsut prototype.
7596 * remote-utils.c (remote_desc, listen_desc): Change type to
7597 gdb_fildes_t.
7598 * server.h: New gdb_fildes_t typedef.
7599 [USE_WIN32API]: Include winsock2.h.
7600 (delete_file_handler, add_file_handler): Adjust prototypes.
7601 (pfildes): Declare.
7602 * utils.c (pfildes): New.
7603
854d88f0
PA
76042010-08-27 Pedro Alves <pedro@codesourcery.com>
7605
7606 * configure.ac (build_warnings): Add -Wno-char-subscripts.
7607 * configure: Regenerate.
7608
0146f85b
PA
76092010-08-27 Pedro Alves <pedro@codesourcery.com>
7610
7611 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
7612 (linux_done_accessing_memory): ... this.
7613 (linux_target_ops): Adjust.
7614 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
7615 * nto-low.c (nto_target_ops): Adjust comment.
7616 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
7617 * spu-low.c (spu_target_ops): Adjust comment.
7618 * target.h (target_ops): Rename unprepare_to_access_memory field
7619 to done_accessing_memory.
7620 (unprepare_to_access_memory): Rename to ...
7621 (done_accessing_memory): ... this.
7622
90d74c30
PA
76232010-08-26 Pedro Alves <pedro@codesourcery.com>
7624
7625 * linux-low.c (linux_prepare_to_access_memory): New.
7626 (linux_unprepare_to_access_memory): New.
7627 (linux_target_ops): Install them.
7628 * server.c (read_memory): Rename to ...
7629 (gdb_read_memory): ... this. Use
7630 prepare_to_access_memory/prepare_to_access_memory.
7631 (write_memory): Rename to ...
7632 (gdb_write_memory): ... this. Use
7633 prepare_to_access_memory/prepare_to_access_memory.
7634 (handle_search_memory_1): Adjust.
7635 (process_serial_event): Adjust.
7636 * target.h (struct target_ops): New fields
7637 prepare_to_access_memory and unprepare_to_access_memory.
7638 (prepare_to_access_memory, unprepare_to_access_memory): New.
7639 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
7640 prepare_to_access_memory/prepare_to_access_memory.
7641 * nto-low.c (nto_target_ops): Adjust.
7642 * spu-low.c (spu_target_ops): Adjust.
7643 * win32-low.c (win32_target_ops): Adjust.
7644
fd467969
PA
76452010-08-26 Pedro Alves <pedro@codesourcery.com>
7646
7647 * Makefile.in (WARN_CFLAGS): Get it from configure.
7648 (WERROR_CFLAGS): New.
7649 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
7650 * configure.ac: Introduce --enable-werror, which adds -Werror to
7651 the compiler command line. Enabled by default. Disable with
7652 --disable-werror. Add -Wdeclaration-after-statement
7653 Wpointer-arith and -Wformat-nonliteral to warning flags.
7654 * configure: Regenerate.
7655
331e2f5f
PA
76562010-08-26 Pedro Alves <pedro@codesourcery.com>
7657
7658 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
7659
e581f2b4
PA
76602010-08-26 Pedro Alves <pedro@codesourcery.com>
7661
7662 * gdbreplay.c (remote_error): New.
7663 (gdbchar): New.
7664 (expect): Use gdbchar. Check for error reading from GDB.
7665 Clarify sync error output.
7666 (play): Check for errors writing to GDB.
7667 * linux-low.c (sigchld_handler): Really ignore `write' errors.
7668 * remote-utils.c (getpkt): Check for errors writing to the remote
7669 descriptor.
7670
3c11dd79
PA
76712010-08-25 Pedro Alves <pedro@codesourcery.com>
7672
7673 * linux-low.c (linux_wait_1): Move non-debugging code out of
7674 `debug_threads' control.
7675
d20a8ad9
PA
76762010-08-25 Pedro Alves <pedro@codesourcery.com>
7677
7678 * linux-low.c (linux_wait_1): Don't set last_status here.
7679 * server.c (push_event, queue_stop_reply_callback): Assert we're
7680 not pushing a TARGET_WAITKIND_IGNORE event.
7681 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
7682 (myresume, handle_target_event): Set the thread's last_resume_kind
7683 and last_status from the target returned status.
7684
964e4306
PA
76852010-08-25 Pedro Alves <pedro@codesourcery.com>
7686
7687 PR threads/10729
7688
7689 * linux-x86-low.c (update_debug_registers_callback): New.
7690 (i386_dr_low_set_addr): Use it.
7691 (i386_dr_low_get_addr): New.
7692 (i386_dr_low_set_control): Use update_debug_registers_callback.
7693 (i386_dr_low_get_control): New.
7694 (i386_dr_low_get_status): Adjust.
7695 * linux-low.c (linux_stop_lwp): New.
7696 * linux-low.h (linux_stop_lwp): Declare.
7697
7698 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
7699 argument instead of a i386_debug_reg_state.
7700 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
7701 a i386_debug_reg_state.
7702 (i386_insert_aligned_watchpoint): Adjust.
7703 (i386_remove_aligned_watchpoint): Adjust.
7704 (i386_low_stopped_data_address): Read the debug registers from the
7705 inferior instead of from the mirrors.
7706 * i386-low.h (struct i386_debug_reg_state): Extend comment.
7707 (i386_dr_low_get_addr): Declare.
7708 (i386_dr_low_get_control): Declare.
7709 (i386_dr_low_get_status): Change prototype.
7710
7711 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
7712 (i386_dr_low_get_addr): New.
7713 (i386_dr_low_get_control): New.
7714 (i386_dr_low_get_status): Adjust prototype. Return
7715 dr_status_mirror.
7716 (i386_initial_stuff): Clear dr_status_mirror and
7717 dr_control_mirror.
7718 (i386_get_thread_context): Adjust.
7719 (i386_set_thread_context): Adjust.
7720 (i386_thread_added): Adjust.
7721
5f21a75b
PA
77222010-08-24 Pedro Alves <pedro@codesourcery.com>
7723
7724 * linux-low.h (linux_thread_area): Delete declaration.
7725
3e4c1235
TS
77262010-08-11 Thomas Schwinge <thomas@codesourcery.com>
7727
7728 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
7729 after its termination.
7730
1971b033
PA
77312010-08-09 Pedro Alves <pedro@codesourcery.com>
7732
7733 * linux-low.c (gdb_wants_lwp_stopped): Delete.
7734 (gdb_wants_all_stopped): Delete.
7735 (linux_wait_1): Don't call them.
7736 * server.c (handle_v_cont): Tag all threads as want-stopped.
7737 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
7738 stopped as "client-wants-stopped".
7739
310444ac
PA
77402010-07-31 Pedro Alves <pedro@codesourcery.com>
7741
7742 * Makefile.in (signals_h): New.
7743 (server_h): Depend on it.
7744 (server.o): Don't depend on $(signals_def).
7745 (signals.o): Depend on $(signals_def).
7746
a19cae16
JK
77472010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
7748
7749 * Makefile.in (signals_def): New.
7750 (server_h): Append include/gdb/signals.h and signals_def.
7751 (server.o): Append signals_def.
7752
30d50328
JK
77532010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
7754
7755 * server.c (handle_target_event): Use target_signal_to_host for
7756 resume_info.sig initialization.
7757 * target.h (struct thread_resume) <sig>: New comment.
7758
5c3216e2
OS
77592010-07-20 Ozkan Sezer <sezeroz@gmail.com>
7760
c6f46ca0
OS
7761 * server.c (handle_query): strcpy() the returned string from paddress()
7762 instead of sprintf().
5c3216e2
OS
7763 * utils.c (paddress): Return phex_nz().
7764
6bd31874
JB
77652010-07-07 Joel Brobecker <brobecker@adacore.com>
7766
7767 * server.c (handle_v_cont): Call mourn_inferior if process
7768 just exited.
7769 (myresume): Likewise.
7770
0fb4aa4b
PA
77712010-07-01 Pedro Alves <pedro@codesourcery.com>
7772
7773 Static tracepoints, and integration with UST.
7774
7775 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
7776 * mem-break.c (uninsert_all_breakpoints)
7777 (reinsert_all_breakpoints): New.
7778 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
7779 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
7780 (gdb_agent_ust_loaded, helper_thread_id)
7781 (gdb_agent_helper_thread_id): New macros.
7782 (struct ipa_sym_addresses): Add addr_ust_loaded,
7783 addr_helper_thread_id, addr_cmd_buf.
7784 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
7785 (in_process_agent_loaded_ust): New.
7786 (write_e_ust_not_loaded): New.
7787 (maybe_write_ipa_ust_not_loaded): New.
7788 (struct collect_static_trace_data_action): New.
7789 (enum tracepoint_type) <static_tracepoint>: New.
7790 (struct tracepoint) <handle>: Mention static tracepoints.
7791 (struct static_tracepoint_ctx): New.
7792 (CMD_BUF_SIZE): New.
7793 (add_tracepoint_action): Handle static tracepoint actions.
7794 (unprobe_marker_at): New.
7795 (clear_installed_tracepoints): Handle static tracepoints.
7796 (cmd_qtdp): Handle static tracepoints.
7797 (probe_marker_at): New.
7798 (cmd_qtstart): Handle static tracepoints.
7799 (response_tracepoint): Handle static tracepoints.
7800 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
7801 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
7802 (get_context_regcache): Handle static tracepoints.
7803 (do_action_at_tracepoint): Handle static tracepoint actions.
7804 (traceframe_find_block_type): Handle static trace data blocks.
7805 (traceframe_read_sdata): New.
7806 (download_tracepoints): Download static tracepoint actions.
7807 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
7808 (GDB_PROBE_NAME): New.
7809 (ust_ops): New.
7810 (GET_UST_SYM): New.
7811 (USTF): New.
7812 (dlsym_ust): New.
7813 (ust_marker_to_static_tracepoint): New.
7814 (gdb_probe): New.
7815 (collect_ust_data_at_tracepoint): New.
7816 (gdb_ust_probe): New.
7817 (UNIX_PATH_MAX, SOCK_DIR): New.
7818 (gdb_ust_connect_sync_socket): New.
7819 (resume_thread, stop_thread): New.
7820 (run_inferior_command): New.
7821 (init_named_socket): New.
7822 (gdb_ust_socket_init): New.
7823 (cstr_to_hexstr): New.
7824 (next_st): New.
7825 (first_marker, next_marker): New.
7826 (response_ust_marker): New.
7827 (cmd_qtfstm, cmd_qtsstm): New.
7828 (unprobe_marker_at, probe_marker_at): New.
7829 (cmd_qtstmat, gdb_ust_thread): New.
7830 (gdb_ust_init): New.
7831 (initialize_tracepoint_ftlib): Call gdb_ust_init.
7832 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
7833 (ST_REGENTRY): New.
7834 (x86_64_st_collect_regmap): New.
7835 (X86_64_NUM_ST_COLLECT_GREGS): New.
7836 (AMD64_RIP_REGNUM): New.
7837 (supply_static_tracepoint_registers): New.
7838 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
7839 (ST_REGENTRY): New.
7840 (i386_st_collect_regmap): New.
7841 (i386_NUM_ST_COLLECT_GREGS): New.
7842 (supply_static_tracepoint_registers): New.
7843 * server.c (handle_query): Handle qXfer:statictrace:read.
7844 <qSupported>: Report support for StaticTracepoints, and
7845 qXfer:statictrace:read features.
7846 * server.h (traceframe_read_sdata)
7847 (supply_static_tracepoint_registers): Declare.
7848 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
7849 (unpack_varlen_hex): Include in IPA build.
7850 * Makefile.in (ustlibs, ustinc): New.
7851 (IPA_OBJS): Add remote-utils-ipa.o.
7852 ($(IPA_LIB)): Link -ldl and -lpthread.
7853 (UST_CFLAGS): New.
7854 (IPAGENT_CFLAGS): Add UST_CFLAGS.
7855 * config.in, configure: Regenerate.
7856
9e4344e5
PA
78572010-06-20 Ian Lance Taylor <iant@google.com>
7858 Pedro Alves <pedro@codesourcery.com>
7859
7860 * linux-x86-low.c (always_true): Delete.
7861 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
7862 trying to fool the compiler with always_true.
7863
c6beb2cb
PA
78642010-06-20 Pedro Alves <pedro@codesourcery.com>
7865
7866 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
7867 conditions in gdbserver.
7868
d2ed6730
UW
78692010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
7870
7871 * spu-low.c (spu_read_memory): Wrap around local store limit.
7872 (spu_write_memory): Likewise.
7873
4e29fb54
PA
78742010-06-15 Pedro Alves <pedro@codesourcery.com>
7875
7876 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
7877 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
7878 LONGEST uses.
7879 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
7880 uses.
7881 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
7882 uses with LONGEST uses.
7883
6a271cae
PA
78842010-06-14 Stan Shebs <stan@codesourcery.com>
7885 Pedro Alves <pedro@codesourcery.com>
7886
7887 Bytecode compiler.
7888
7889 * linux-x86-low.c: Include limits.h.
7890 (add_insns): New.
7891 (always_true): New.
7892 (EMIT_ASM): New.
7893 (EMIT_ASM32): New.
7894 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
7895 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
7896 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
7897 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
7898 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
7899 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
7900 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
7901 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
7902 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
7903 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
7904 (amd64_emit_void_call_2): New.
7905 (amd64_emit_ops): New.
7906 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
7907 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
7908 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
7909 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
7910 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
7911 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
7912 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
7913 (i386_emit_call, i386_emit_reg, i386_emit_pop)
7914 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
7915 (i386_emit_stack_adjust, i386_emit_int_call_1)
7916 (i386_emit_void_call_2): New.
7917 (i386_emit_ops): New.
7918 (x86_emit_ops): New.
7919 (the_low_target): Install x86_emit_ops.
7920 * server.h (struct emit_ops): New.
7921 (get_raw_reg_func_addr): Declare.
7922 (current_insn_ptr, emit_error): Declare.
7923 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
7924 (set_trace_state_variable_value): New defines.
7925 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
7926 addr_get_trace_state_variable_value and
7927 addr_set_trace_state_variable_value.
7928 (symbol_list): New fields for get_raw_reg,
7929 get_trace_state_variable_value and set_trace_state_variable_value.
7930 (condfn): New typedef.
7931 (struct tracepoint): New field `compiled_cond'.
7932 (do_action_at_tracepoint): Clear compiled_cond.
7933 (get_trace_state_variable_value, set_trace_state_variable_value):
7934 Export in the IPA.
7935 (condition_true_at_tracepoint): If there's a compiled condition,
7936 run that.
7937 (current_insn_ptr, emit_error): New globals.
7938 (struct bytecode_address): New.
7939 (get_raw_reg_func_addr): New.
7940 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
7941 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
7942 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
7943 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
7944 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
7945 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
7946 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
7947 (compile_tracepoint_condition, compile_bytecodes): New.
7948 * target.h (emit_ops): Forward declare.
7949 (struct target_ops): New field emit_ops.
7950 (target_emit_ops): New.
7951 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
7952 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
7953 * linux-low.c (linux_emit_ops): New.
7954 (linux_target_ops): Install it.
7955 * linux-low.h (struct linux_target_ops): New field emit_ops.
7956
92b72907
UW
79572010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
7958
7959 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
7960 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
7961
fa593d66
PA
79622010-06-01 Pedro Alves <pedro@codesourcery.com>
7963 Stan Shebs <stan@codesourcery.com>
7964
7965 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
7966 (all): Depend on $(extra_libraries).
7967 (install-only): Install the IPA.
7968 (IPA_OBJS, IPA_LIB): New.
7969 (clean): Remove the IPA lib.
7970 (IPAGENT_CFLAGS): New.
7971 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
7972 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
7973 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
7974 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
7975 * configure.ac: Check for atomic builtins support in the compiler.
7976 (IPA_DEPFILES, extra_libraries): Define.
7977 * configure.srv (ipa_obj): Add description.
7978 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
7979 (i[34567]86-*-linux*): Set ipa_obj.
7980 (x86_64-*-linux*): Set ipa_obj.
7981 * linux-low.c (stabilizing_threads): New.
7982 (supports_fast_tracepoints): New.
7983 (linux_detach): Stabilize threads before detaching.
7984 (handle_tracepoints): Handle internal tracing breakpoints. Assert
7985 the lwp is either not stabilizing, or is moving out of a jump pad.
7986 (linux_fast_tracepoint_collecting): New.
7987 (maybe_move_out_of_jump_pad): New.
7988 (enqueue_one_deferred_signal): New.
7989 (dequeue_one_deferred_signal): New.
7990 (linux_wait_for_event_1): If moving out of a jump pad, defer
7991 pending signals to later.
7992 (linux_stabilize_threads): New.
7993 (linux_wait_1): Check if threads need moving out of jump pads, and
7994 do it if so.
7995 (stuck_in_jump_pad_callback): New.
7996 (move_out_of_jump_pad_callback): New.
7997 (lwp_running): New.
7998 (linux_resume_one_lwp): Handle moving out of jump pads.
7999 (linux_set_resume_request): Dequeue deferred signals.
8000 (need_step_over_p): Also step over fast tracepoint jumps.
8001 (start_step_over): Also uninsert fast tracepoint jumps.
8002 (finish_step_over): Also reinsert fast tracepoint jumps.
8003 (linux_install_fast_tracepoint_jump): New.
8004 (linux_target_ops): Install linux_stabilize_threads and
8005 linux_install_fast_tracepoint_jump_pad.
8006 * linux-low.h (linux_target_ops) <get_thread_area,
8007 install_fast_tracepoint_jump_pad>: New fields.
8008 (struct lwp_info) <collecting_fast_tracepoint,
8009 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
8010 (linux_get_thread_area): Declare.
8011 * linux-x86-low.c (jump_insn): New.
8012 (x86_get_thread_area): New.
8013 (append_insns): New.
8014 (push_opcode): New.
8015 (amd64_install_fast_tracepoint_jump_pad): New.
8016 (i386_install_fast_tracepoint_jump_pad): New.
8017 (x86_install_fast_tracepoint_jump_pad): New.
8018 (the_low_target): Install x86_get_thread_area and
8019 x86_install_fast_tracepoint_jump_pad.
8020 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
8021 (struct fast_tracepoint_jump): New.
8022 (fast_tracepoint_jump_insn): New.
8023 (fast_tracepoint_jump_shadow): New.
8024 (find_fast_tracepoint_jump_at): New.
8025 (fast_tracepoint_jump_here): New.
8026 (delete_fast_tracepoint_jump): New.
8027 (set_fast_tracepoint_jump): New.
8028 (uninsert_fast_tracepoint_jumps_at): New.
8029 (reinsert_fast_tracepoint_jumps_at): New.
8030 (set_breakpoint_at): Use write_inferior_memory.
8031 (uninsert_raw_breakpoint): Use write_inferior_memory.
8032 (check_mem_read): Mask out fast tracepoint jumps.
8033 (check_mem_write): Mask out fast tracepoint jumps.
8034 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
8035 (set_fast_tracepoint_jump): Declare.
8036 (delete_fast_tracepoint_jump)
8037 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
8038 (reinsert_fast_tracepoint_jumps_at): Declare.
8039 * regcache.c: Don't compile many functions when building the
8040 in-process agent library.
8041 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
8042 the register buffer in the heap.
8043 (free_register_cache): If the register buffer isn't owned by the
8044 regcache, don't free it.
8045 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
8046 pre-existing register caches.
8047 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
8048 type.
8049 (convert_ascii_to_int): : Constify `from' parameter type.
8050 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
8051 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
8052 the needed buffer in-place.
8053 (relocate_instruction): New.
8054 * server.c (handle_query) <qSymbols>: If the target supports
8055 tracepoints, give it a chance of looking up symbols. Report
8056 support for fast tracepoints.
8057 (handle_status): Stabilize threads.
8058 (process_serial_event): Adjust.
8059 * server.h (struct fast_tracepoint_jump): Forward declare.
8060 (struct process_info) <fast_tracepoint_jumps>: New field.
8061 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
8062 (decode_X_packet, decode_M_packet): Adjust.
8063 (relocate_instruction): Declare.
8064 (in_process_agent_loaded): Declare.
8065 (tracepoint_look_up_symbols): Declare.
8066 (struct fast_tpoint_collect_status): Declare.
8067 (fast_tracepoint_collecting): Declare.
8068 (force_unlock_trace_buffer): Declare.
8069 (handle_tracepoint_bkpts): Declare.
8070 (initialize_low_tracepoint)
8071 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
8072 * target.h (struct target_ops) <stabilize_threads,
8073 install_fast_tracepoint_jump_pad>: New fields.
8074 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
8075 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
8076 [HAVE_STDINT_H]: Include stdint.h.
8077 (trace_debug_1): Rename to ...
8078 (trace_vdebug): ... this.
8079 (trace_debug): Rename to ...
8080 (trace_debug_1): ... this. Add `level' parameter.
8081 (trace_debug): New.
8082 (ATTR_USED, ATTR_NOINLINE): New.
8083 (IP_AGENT_EXPORT): New.
8084 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
8085 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
8086 (about_to_request_buffer_space, trace_buffer_is_full)
8087 (stopping_tracepoint, expr_eval_result, error_tracepoint)
8088 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
8089 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
8090 (traceframe_write_count, traceframes_created)
8091 (trace_state_variables)
8092 New renaming defines.
8093 (struct ipa_sym_addresses): New.
8094 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
8095 (symbol_list): New.
8096 (ipa_sym_addrs): New.
8097 (all_tracepoint_symbols_looked_up): New.
8098 (in_process_agent_loaded): New.
8099 (write_e_ipa_not_loaded): New.
8100 (maybe_write_ipa_not_loaded): New.
8101 (tracepoint_look_up_symbols): New.
8102 (debug_threads) [IN_PROCESS_AGENT]: New.
8103 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
8104 (UNKNOWN_SIDE_EFFECTS): New.
8105 (stop_tracing): New.
8106 (flush_trace_buffer): New.
8107 (stop_tracing_bkpt): New.
8108 (flush_trace_buffer_bkpt): New.
8109 (read_inferior_integer): New.
8110 (read_inferior_uinteger): New.
8111 (read_inferior_data_pointer): New.
8112 (write_inferior_data_pointer): New.
8113 (write_inferior_integer): New.
8114 (write_inferior_uinteger): New.
8115 (struct collect_static_trace_data_action): Delete.
8116 (enum tracepoint_type): New.
8117 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
8118 <actions_str, step_actions, step_actions_str>: Only include in
8119 GDBserver.
fa593d66
PA
8120 <orig_size, obj_addr_on_target, adjusted_insn_addr>
8121 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
8122 (tracepoints): Use IP_AGENT_EXPORT.
8123 (last_tracepoint): Don't include in the IPA.
8124 (stopping_tracepoint): Use IP_AGENT_EXPORT.
8125 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
8126 (alloced_trace_state_variables): New.
8127 (trace_state_variables): Use IP_AGENT_EXPORT.
8128 (traceframe_t): Delete unused variable.
8129 (circular_trace_buffer): Don't include in the IPA.
8130 (trace_buffer_start): Delete.
8131 (struct trace_buffer_control): New.
8132 (trace_buffer_free): Delete.
8133 (struct ipa_trace_buffer_control): New.
8134 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
8135 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
8136 New.
8137 (trace_buffer_ctrl): New.
8138 (TRACE_BUFFER_CTRL_CURR): New.
8139 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
8140 Reimplement as macros.
8141 (trace_buffer_wrap): Delete.
8142 (traceframe_write_count, traceframe_read_count)
8143 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
8144 (struct tracepoint_hit_ctx) <type>: New field.
8145 (struct fast_tracepoint_ctx): New.
8146 (memory_barrier): New.
8147 (cmpxchg): New.
8148 (record_tracepoint_error): Update atomically in the IPA.
8149 (clear_inferior_trace_buffer): New.
8150 (about_to_request_buffer_space): New.
8151 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
8152 updating the same buffer.
8153 (add_tracepoint): Default the tracepoint's type to trap
8154 tracepoint, and orig_size to -1.
8155 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
8156 internal variables.
8157 (create_trace_state_variable): New parameter `gdb'. Handle it.
8158 (clear_installed_tracepoints): Clear fast tracepoint jumps.
8159 (cmd_qtdp): Handle fast tracepoints.
8160 (cmd_qtdv): Adjust.
8161 (max_jump_pad_size): New.
8162 (gdb_jump_pad_head): New.
8163 (get_jump_space_head): New.
8164 (claim_jump_space): New.
8165 (sort_tracepoints): New.
8166 (MAX_JUMP_SIZE): New.
8167 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
8168 IPA.
8169 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
8170 support. Upload fast traceframes, and delete internal IPA
8171 breakpoints.
8172 (stop_tracing_handler): New.
8173 (flush_trace_buffer_handler): New.
8174 (cmd_qtstop): Upload fast tracepoints.
8175 (response_tracepoint): Handle fast tracepoints.
8176 (tracepoint_finished_step): Upload fast traceframes. Set the
8177 tracepoint hit context's tracepoint type.
8178 (handle_tracepoint_bkpts): New.
8179 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
8180 type. Add comment about fast tracepoints.
8181 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
8182 non-existing action_str field.
8183 (get_context_regcache): Handle fast tracepoints.
8184 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
8185 to the regcache.
8186 (fast_tracepoint_from_jump_pad_address): New.
8187 (fast_tracepoint_from_ipa_tpoint_address): New.
8188 (collecting_t): New.
8189 (force_unlock_trace_buffer): New.
8190 (fast_tracepoint_collecting): New.
8191 (collecting): New.
8192 (gdb_collect): New.
8193 (write_inferior_data_ptr): New.
8194 (target_tp_heap): New.
8195 (target_malloc): New.
8196 (download_agent_expr): New.
8197 (UALIGN): New.
8198 (download_tracepoints): New.
8199 (download_trace_state_variables): New.
8200 (upload_fast_traceframes): New.
8201 (IPA_FIRST_TRACEFRAME): New.
8202 (IPA_NEXT_TRACEFRAME_1): New.
8203 (IPA_NEXT_TRACEFRAME): New.
8204 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
8205 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
8206 (gdb_jump_pad_buffer_end): New.
8207 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
8208 (initialize_tracepoint): Adjust.
8209 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
8210 buffer. Initialize the low module.
8211 * utils.c (PREFIX, TOOLNAME): New.
8212 (malloc_failure): Use PREFIX.
8213 (error): In the IPA, an error causes an exit.
8214 (fatal, warning): Use PREFIX.
8215 (internal_error): Use TOOLNAME.
8216 (NUMCELLS): Increase to 10.
8217 * configure, config.in: Regenerate.
8218
d149dd1d
PA
82192010-06-01 Pedro Alves <pedro@codesourcery.com>
8220
8221 * server.c (handle_query) <qSupported>: Do two passes over the
8222 qSupported string to avoid nesting strtok.
8223
f6528abd
JK
82242010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8225
8226 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
8227 (CDEPS): New.
8228 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
8229 -Wl,--dynamic-list.
8230 * configure: Regenerate.
8231 * proc-service.list: New.
8232
ca2a87a0
JK
82332010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8234
8235 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
8236 New comment.
8237
363a6e9f
OS
82382010-05-26 Ozkan Sezer <sezeroz@gmail.com>
8239
8240 * gdbreplay.c (remote_open): Check error return from socket() call by
8241 its equality to -1 not by it being negative.
8242 * remote-utils.c (remote_open): Likewise.
8243
d23b6cb1
PA
82442010-05-23 Pedro Alves <pedro@codesourcery.com>
8245
8246 * config.h: Regenerate.
8247
28d3cf85
MK
82482010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
8249
8250 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
8251 doesn't provide PTRACE_GET_THREAD_AREA.
8252
fea36a59
MK
82532010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
8254
8255 * linux-m68k-low.c: Include <asm/ptrace.h>
8256 (ps_get_thread_area): Implement.
8257
24b066ba
DE
82582010-05-03 Doug Evans <dje@google.com>
8259
8260 * event-loop.c (struct callback_event): New struct.
8261 (callback_list): New global.
8262 (append_callback_event, delete_callback_event): New functions.
8263 (process_callback): New function.
8264 (start_event_loop): Call it.
8265 * remote-utils.c (NOT_SCHEDULED): Define.
8266 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
8267 moved out of readchar.
8268 (readchar): Rewrite. Call reschedule before returning.
8269 (reset_readchar): New function.
8270 (remote_close): Call it.
8271 (process_remaining, reschedule): New functions.
8272 * server.h (callback_handler_func): New typedef.
8273 (append_callback_event, delete_callback_event): Declare.
8274
9836d6ea
PA
82752010-05-03 Pedro Alves <pedro@codesourcery.com>
8276
8277 * proc-service.c (ps_pglobal_lookup): Use
8278 thread_db_look_up_one_symbol.
8279 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
8280 parameter. Use it instead of all_symbols_looked_up.
8281 * server.h (struct process_info) <all_symbols_looked_up>: Delete
8282 field.
8283 (all_symbols_looked_up): Don't declare.
8284 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
8285 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
8286 field.
8287 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
8288 Set all_symbols_looked_up here.
8289 (thread_db_look_up_one_symbol): New.
8290 (thread_db_get_tls_address): Adjust.
8291 (thread_db_load_search, try_thread_db_load_1): Always allocate the
8292 thread_db object on the heap, and tentatively set it in the
8293 process structure.
8294 (thread_db_init): Don't set all_symbols_looked_up here.
8295 * linux-low.h (thread_db_look_up_one_symbol): Declare.
8296
7984d532
PA
82972010-05-03 Pedro Alves <pedro@codesourcery.com>
8298
8299 * linux-low.c (linux_kill, linux_detach): Adjust.
8300 (status_pending_p_callback): Remove redundant statement. Check
8301 for !TARGET_WAITIKIND_IGNORE, instead of
8302 TARGET_WAITKIND_STOPPED.
8303 (handle_tracepoints): Make sure LWP is locked. Adjust.
8304 (linux_wait_for_event_1): Adjust.
8305 (linux_cancel_breakpoints): New.
8306 (unsuspend_one_lwp): New.
8307 (unsuspend_all_lwps): New.
8308 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
8309 (send_sigstop_callback): Change return type to int, add new
8310 `except' parameter and handle it.
8311 (suspend_and_send_sigstop_callback): New.
8312 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
8313 pass them down. If SUSPEND, also increment the lwp's suspend
8314 count.
8315 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
8316 (need_step_over_p): Don't consider suspended LWPs.
8317 (start_step_over): Adjust.
8318 (proceed_one_lwp): Change return type to int, add new `except'
8319 parameter and handle it.
8320 (unsuspend_and_proceed_one_lwp): New.
8321 (proceed_all_lwps): Use find_inferior instead of
8322 for_each_inferior.
8323 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
8324 also decrement the suspend count of LWPs. Pass `except' down,
8325 instead of hacking its suspend count.
8326 (linux_pause_all): Add `freeze' parameter. Adjust.
8327 (linux_unpause_all): New.
8328 (linux_target_ops): Install linux_unpause_all.
8329 * server.c (handle_status): Adjust.
8330 * target.h (struct target_ops): New fields `unpause_all' and
8331 `cancel_breakpoints'. Add new parameter to `pause_all'.
8332 (pause_all): Add new `freeze' parameter.
8333 (unpause_all): New.
8334 (cancel_breakpoints): New.
8335 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
8336 cancel breakpoints.
8337 (cmd_qtstart): Pause threads.
8338 (stop_tracing): Pause threads, and cancel breakpoints.
8339 * win32-low.c (win32_target_ops): Adjust.
8340
e471f25b
PA
83412010-05-03 Pedro Alves <pedro@codesourcery.com>
8342
8343 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
8344 the inferior right away from here...
8345 (linux_wait_1): ... to here, and adjust to check the thread's
8346 last_resume_kind instead of the lwp's step or stop_expected flags.
8347
1915ef4f
PA
83482010-05-02 Pedro Alves <pedro@codesourcery.com>
8349
8350 * README: Use consistent `GDB' and `GDBserver' spellings.
8351
f9e39928
PA
83522010-05-02 Pedro Alves <pedro@codesourcery.com>
8353
8354 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
8355 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
8356 (linux_detach_one_lwp): Assume the lwp is stopped.
8357 (any_thread_of): Delete.
8358 (linux_detach): Stop all lwps here. Don't blindly delete all
8359 breakpoints.
8360 (delete_lwp_callback): New.
8361 (linux_mourn): Delete all lwps of the process that is gone.
8362 (linux_wait_1): Don't delete the last lwp of the process here.
8363 * mem-break.h (mark_breakpoints_out): Declare.
8364 * mem-break.c (mark_breakpoints_out): New.
8365 (free_all_breakpoints): Use it.
8366 * server.c (handle_target_event): If the process is gone, mark
8367 breakpoints out.
8368 * thread-db.c (struct thread_db) <create_bp>: New field.
8369 (thread_db_enable_reporting): Fix prototype. Store a thread event
8370 breakpoint reference in the thread_db struct.
8371 (thread_db_load_search): Clear the thread_db object.
8372 (try_thread_db_load_1): Ditto.
8373 (switch_to_process): New.
8374 (disable_thread_event_reporting): Use it.
8375 (remove_thread_event_breakpoints): New.
8376 (thread_db_detach, thread_db_mourn): Use it.
8377
1e7fc18c
PA
83782010-05-01 Pedro Alves <pedro@codesourcery.com>
8379
8380 * linux-low.c (linux_enable_event_reporting): New.
8381 (linux_wait_for_event_1, handle_extended_wait): Use it.
8382
02fc4de7
PA
83832010-04-30 Pedro Alves <pedro@codesourcery.com>
8384
8385 * linux-low.c (linux_kill_one_lwp, linux_kill)
8386 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
8387 (send_sigstop): Take an lwp_info as parameter instead. Queue a
8388 SIGSTOP even if the LWP is stopped.
8389 (send_sigstop_callback): New.
8390 (stop_all_lwps): Use send_sigstop_callback instead.
8391 (linux_resume_one_thread): Adjust.
8392 (proceed_one_lwp): Still proceed an LWP that the client has
8393 requested to stop, if we haven't reported it as stopped yet. Make
8394 sure that LWPs the client want stopped, have a pending SIGSTOP.
8395
bc3b5632
DE
83962010-04-26 Doug Evans <dje@google.com>
8397
ae1ada35
DE
8398 * server.c (handle_general_set): Make static.
8399
bc3b5632
DE
8400 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
8401 Print received char after testing for error/eof instead of before.
8402 (input_interrupt): Tweak comment.
8403
65730243
DE
84042010-04-23 Doug Evans <dje@google.com>
8405
8406 * server.c (start_inferior): Print inferior argv if --debug.
8407
a8ae7dc0
AR
84082010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
8409
8410 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
8411 * nto-x86-low.c: Include server.h
8412
1c07cc19
PM
84132010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
8414
8415 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
8416 be consistent with other sources of this directory.
8417 (init_registers_amd64): Correct name of source file of this function
8418 in the comment.
8419
e0a61e09
PM
84202010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8421
8422 * configure.srv (x86_64-*-mingw*): New configuration for Windows
8423 64-bit executables.
8424
54709339
PM
84252010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8426
8427 * win32-i386-low.c: Add 64-bit support.
8428 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
8429 (init_registers_amd64): Declare.
8430 (mappings): Add 64-bit version of array.
8431 (init_windows_x86): New function.
8432 (the_low_target): Change init_arch field to init_windows_x86.
8433
e8f0053d
PM
84342010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8435
8436 * win32-low.c: Adapt to support also 64-bit architecture.
8437 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
8438 (get_image_name): Use SIZE_T type for local variable `done'.
8439 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
8440 (toolhelp_get_dll_name): Idem.
8441 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
8442 Use uintptr_t typecast to avoid warning.
8443 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
8444 (handle_exception): Use phex_nz to avoid warning.
8445 (win32_wait): Remove unused local variable `process'.
8446
c481e77e
PM
84472010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8448
8449 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
8450 `amd64-avx.o'.
8451
12ea4b69
PM
84522010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
8453
8454 * configure.ac: Use `ws2_32' library for srv_mingw.
8455 * configure: Regenerate.
8456 * gdbreplay.c: Include winsock2.h instead of winsock.h.
8457 * remote-utils.c: Likewise.
8458
f6d1620c
L
84592010-04-17 H.J. Lu <hongjiu.lu@intel.com>
8460
8461 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
8462 if __x86_64__ is defined.
8463
8e642873
PM
84642010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
8465
8466 * configure: Regenerate.
8467
711e434b
PM
84682010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
8469
8470 * server.c (handle_query): Handle 'qGetTIBAddr' query.
8471 * target.h (target_ops): New get_tib_address field.
8472 * win32-low.h (win32_thread_info): Add thread_local_base field.
8473 * win32-low.c (child_add_thread): Add tlb argument.
8474 Set thread_local_base field to TLB.
8475 (get_child_debug_event): Adapt to child_add_thread change.
8476 (win32_get_tib_address): New function.
8477 (win32_target_ops): Set get_tib_address field to
8478 win32_get_tib_address.
8479 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
8480
505106cd
PA
84812010-04-12 Pedro Alves <pedro@codesourcery.com>
8482
505106cd
PA
8483 * linux-low.c (linux_mourn): Also remove the process.
8484 * server.c (handle_target_event): Don't remove the process here.
8485 * nto-low.c (nto_mourn): New.
8486 (nto_target_ops): Install it.
8487 * spu-low.c (spu_mourn): New.
8488 (spu_target_ops): Install it.
8489 * win32-low.c (win32_mourn): New.
8490 (win32_target_ops): Install it.
8491
e8470a06
PA
84922010-04-12 Pedro Alves <pedro@codesourcery.com>
8493
8494 * server.h (buffer_xml_printf): Remove redundant `;'.
8495
45ba0d02
PA
84962010-04-12 Pedro Alves <pedro@codesourcery.com>
8497
8498 * regcache.c (set_register_cache): Invalidate regcaches before
8499 changing the register cache layout.
8500 (regcache_invalidate_one): Allow a NULL regcache.
8501 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
8502 regcaches before changing the register cache layout or the target
8503 regsets.
8504
59e04013
L
85052010-04-12 H.J. Lu <hongjiu.lu@intel.com>
8506
8507 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
8508 variable warning on Linux/x86-64.
8509
8336d594
PA
85102010-04-11 Pedro Alves <pedro@codesourcery.com>
8511
8512 GDBserver disconnected tracing support.
8513
8514 * linux-low.c (linux_remove_process): Delete.
8515 (add_lwp): Don't set last_resume_kind here.
8516 (linux_kill): Use `mourn'.
8517 (linux_detach): Use `thread_db_detach', and `mourn'.
8518 (linux_mourn): New.
8519 (linux_attach_lwp_1): Adjust comment.
8520 (linux_attach): last_resume_kind moved the thread_info; adjust.
8521 (status_pending_p_callback): Adjust.
8522 (linux_wait_for_event_1): Adjust.
8523 (count_events_callback, select_singlestep_lwp_callback)
8524 (select_event_lwp_callback, cancel_breakpoints_callback)
8525 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
8526 (proceed_one_lwp): Adjust.
8527 (linux_async): Add debug output.
8528 (linux_thread_stopped): New.
8529 (linux_pause_all): New.
8530 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
8531 linux_pause_all.
8532 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
8533 (thread_db_free): Delete declaration.
8534 (thread_db_detach, thread_db_mourn): Declare.
8535 * thread-db.c (thread_db_init): Use thread_db_mourn.
8536 (thread_db_free): Delete, split in two.
8537 (disable_thread_event_reporting): New.
8538 (thread_db_detach): New.
8539 (thread_db_mourn): New.
8540
8541 * server.h (struct thread_info) <last_resume_kind>: New field.
8542 <attached>: Add comment.
8543 <gdb_detached>: New field.
8544 (handler_func): Change return type to int.
8545 (handle_serial_event, handle_target_event): Ditto.
8546 (gdb_connected): Declare.
8547 (tracing): Delete.
8548 (disconnected_tracing): Declare.
8549 (stop_tracing): Declare.
8550
8551 * server.c (handle_query) <qSupported>: Report support for
8552 disconnected tracing.
8553 (queue_stop_reply_callback): Account for running threads.
8554 (gdb_wants_thread_stopped): New.
8555 (gdb_wants_all_threads_stopped): New.
8556 (gdb_reattached_process): New.
8557 (handle_status): Clear the `gdb_detached' flag of all processes.
8558 In all-stop, stop all threads.
8559 (main): Be sure to leave tfind mode. Handle disconnected tracing.
8560 (process_serial_event): If the remote connection breaks, or if an
8561 exit was forced with "monitor exit", force an event loop exit.
8562 Handle disconnected tracing on detach.
8563 (handle_serial_event): Adjust.
8564 (handle_target_event): If GDB isn't connected, forward events back
8565 to the inferior, unless the last process exited, in which case,
8566 exit gdbserver. Adjust interface.
8567
8568 * remote-utils.c (remote_open): Don't block in accept. Instead
8569 register an event loop source on the listen socket file
8570 descriptor. Refactor bits into ...
8571 (listen_desc): ... this new global.
8572 (gdb_connected): ... this new function.
8573 (enable_async_notification): ... this new function.
8574 (handle_accept_event): ... this new function.
8575 (remote_close): Clear remote_desc.
8576
8577 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
8578
8579 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
8580 New fields.
8581 (mourn_inferior): Define.
8582 (target_process_qsupported): Avoid the dangling else problem.
8583 (thread_stopped): Define.
8584 (pause_all): Define.
8585 (target_waitstatus_to_string): Declare.
8586 * target.c (target_waitstatus_to_string): New.
8587
8588 * tracepoint.c (tracing): Make extern.
8589 (disconnected_tracing): New.
8590 (stop_tracing): Make extern. Handle tracing stops due to GDB
8591 disconnecting.
8592 (cmd_qtdisconnected): New.
8593 (cmd_qtstatus): Report disconnected tracing status in trace reply.
8594 (handle_tracepoint_general_set): Handle QTDisconnected.
8595
8596 * event-loop.c (event_handler_func): Change return type to int.
8597 (process_event): Bail out if the event handler wants the event
8598 loop to stop.
8599 (handle_file_event): Ditto.
8600 (start_event_loop): Bail out if the event handler wants the event
8601 loop to stop.
8602
8603 * nto-low.c (nto_target_ops): Adjust.
8604 * spu-low.c (spu_wait): Don't remove the process here.
8605 (spu_target_ops): Adjust.
8606 * win32-low.c (win32_wait): Don't remove the process here.
8607 (win32_target_ops): Adjust.
8608
5d267c4c
PA
86092010-04-11 Pedro Alves <pedro@codesourcery.com>
8610
8611 * regcache.c (realloc_register_cache): Invalidate inferior's
8612 regcache before recreating it.
8613
623ccd72
PA
86142010-04-09 Pedro Alves <pedro@codesourcery.com>
8615
8616 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
8617
219f2f23
PA
86182010-04-09 Stan Shebs <stan@codesourcery.com>
8619 Pedro Alves <pedro@codesourcery.com>
8620
8621 * server.h (LONGEST): New.
8622 (struct thread_info) <while_stepping>: New field.
8623 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
8624 Declare.
8625 (initialize_tracepoint, handle_tracepoint_general_set)
8626 (handle_tracepoint_query, tracepoint_finished_step)
8627 (tracepoint_was_hit, release_while_stepping_state_list):
8628 (current_traceframe): Declare.
8629 * server.c (handle_general_set): Handle tracepoint packets.
8630 (read_memory): New.
8631 (write_memory): New.
8632 (handle_search_memory_1): Use read_memory.
8633 (handle_query): Report support for conditional tracepoints, trace
8634 state variables, and tracepoint sources. Handle tracepoint
8635 queries.
8636 (main): Initialize the tracepoints module.
8637 (process_serial_event): Handle traceframe reads/writes.
8638
8639 * linux-low.c (handle_tracepoints): New.
8640 (linux_wait_1): Call it.
8641 (linux_resume_one_lwp): Handle while-stepping.
8642 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
8643 (linux_target_ops): Install them.
8644 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
8645 New field.
8646 * linux-x86-low.c (x86_supports_tracepoints): New.
8647 (the_low_target). Install it.
8648
8649 * mem-break.h (delete_breakpoint): Declare.
8650 * mem-break.c (delete_breakpoint): Make external.
8651
8652 * target.h (struct target_ops): Add `supports_tracepoints',
8653 `read_pc', and `write_pc' fields.
8654 (target_supports_tracepoints): Define.
8655 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
8656 (phex_nz): New.
8657
8658 * regcache.h (struct regcache) <registers_owned>: New field.
8659 (init_register_cache, regcache_cpy): Declare.
8660 (regcache_read_pc, regcache_write_pc): Declare.
8661 (register_cache_size): Declare.
8662 (supply_regblock): Declare.
8663 * regcache.c (init_register_cache): New.
8664 (new_register_cache): Use it.
8665 (regcache_cpy): New.
8666 (register_cache_size): New.
8667 (supply_regblock): New.
8668 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 8669
219f2f23
PA
8670 * tracepoint.c: New.
8671
8672 * Makefile.in (OBS): Add tracepoint.o.
8673 (tracepoint.o): New rule.
8674
3a13a53b
L
86752010-04-08 H.J. Lu <hongjiu.lu@intel.com>
8676
8677 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
8678 (i386-mmx.o): New.
8679 (i386-mmx.c): Likewise.
8680 (i386-mmx-linux.o): Likewise.
8681 (i386-mmx-linux.c): Likewise.
8682
8683 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
8684 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
8685 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
8686 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
8687
8688 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
8689 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
8690 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
8691
1570b33e
L
86922010-04-07 H.J. Lu <hongjiu.lu@intel.com>
8693
8694 * Makefile.in (clean): Updated.
8695 (i386-avx.o): New.
8696 (i386-avx.c): Likewise.
8697 (i386-avx-linux.o): Likewise.
8698 (i386-avx-linux.c): Likewise.
8699 (amd64-avx.o): Likewise.
8700 (amd64-avx.c): Likewise.
8701 (amd64-avx-linux.o): Likewise.
8702 (amd64-avx-linux.c): Likewise.
8703
8704 * configure.srv (srv_i386_regobj): Add i386-avx.o.
8705 (srv_i386_linux_regobj): Add i386-avx-linux.o.
8706 (srv_amd64_regobj): Add amd64-avx.o.
8707 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
8708 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
8709 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
8710 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
8711 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
8712 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
8713 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
8714
8715 * i387-fp.c: Include "i386-xstate.h".
8716 (i387_xsave): New.
8717 (i387_cache_to_xsave): Likewise.
8718 (i387_xsave_to_cache): Likewise.
8719 (x86_xcr0): Likewise.
8720
8721 * i387-fp.h (i387_cache_to_xsave): Likewise.
8722 (i387_xsave_to_cache): Likewise.
8723 (x86_xcr0): Likewise.
8724
8725 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
8726 * linux-crisv32-low.c (target_regsets): Likewise.
8727 * linux-m68k-low.c (target_regsets): Likewise.
8728 * linux-mips-low.c (target_regsets): Likewise.
8729 * linux-ppc-low.c (target_regsets): Likewise.
8730 * linux-s390-low.c (target_regsets): Likewise.
8731 * linux-sh-low.c (target_regsets): Likewise.
8732 * linux-sparc-low.c (target_regsets): Likewise.
8733 * linux-xtensa-low.c (target_regsets): Likewise.
8734
8735 * linux-low.c: Include <sys/uio.h>.
8736 (regsets_fetch_inferior_registers): Support nt_type.
8737 (regsets_store_inferior_registers): Likewise.
8738 (linux_process_qsupported): New.
8739 (linux_target_ops): Add linux_process_qsupported.
8740
8741 * linux-low.h (regset_info): Add nt_type.
8742 (linux_target_ops): Add process_qsupported.
8743
8744 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
8745 and <sys/uio.h>.
8746 (init_registers_i386_avx_linux): New.
8747 (init_registers_amd64_avx_linux): Likewise.
8748 (xmltarget_i386_linux_no_xml): Likewise.
8749 (xmltarget_amd64_linux_no_xml): Likewise.
8750 (PTRACE_GETREGSET): Likewise.
8751 (PTRACE_SETREGSET): Likewise.
8752 (x86_fill_xstateregset): Likewise.
8753 (x86_store_xstateregset): Likewise.
8754 (use_xml): Likewise.
8755 (x86_linux_update_xmltarget): Likewise.
8756 (x86_linux_process_qsupported): Likewise.
8757 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
8758 (x86_arch_setup): Don't call init_registers_amd64_linux nor
8759 init_registers_i386_linux here. Call
8760 x86_linux_update_xmltarget.
8761 (the_low_target): Add x86_linux_process_qsupported.
8762
8763 * server.c (handle_query): Call target_process_qsupported.
8764
8765 * target.h (target_ops): Add process_qsupported.
8766 (target_process_qsupported): New.
8767
fc7238bb
PA
87682010-04-03 Pedro Alves <pedro@codesourcery.com>
8769
8770 * inferiors.c (add_thread): Set last_status kind to
8771 TARGET_WAITKIND_IGNORE.
8772 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
8773 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
8774 (linux_wait_1): Move `thread' local definition to block that uses
8775 it. Don't NULL initialize `event_child'.
8776 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
8777 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
8778 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
8779
bdabb078
PA
87802010-04-01 Pedro Alves <pedro@codesourcery.com>
8781
8782 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
8783 an extended waitstatus, or by a watchpoint.
8784 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
8785 thread was stepping or has been stopped by a watchpoint.
8786
d3bbe7a0
PA
87872010-04-01 Pedro Alves <pedro@codesourcery.com>
8788
8789 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
8790 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
8791 of another, then delete the previous, and validate all
8792 breakpoints.
8793 (validate_inserted_breakpoint): New.
8794 (delete_disabled_breakpoints): New.
8795 (validate_breakpoints): New.
8796 (check_mem_read): Validate breakpoints before trusting their
8797 shadow. Delete disabled breakpoints.
8798 (check_mem_write): Validate breakpoints before trusting they
8799 should be inserted. Delete disabled breakpoints.
8800 * mem-break.h (validate_breakpoints):
8801 * server.c (handle_query): Validate breakpoints when we see a
8802 qSymbol query.
8803
8b07ae33
PA
88042010-04-01 Pedro Alves <pedro@codesourcery.com>
8805
8806 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
8807 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
8808 if we could tell there's a GDB breakpoint at stop_pc.
8809 (need_step_over_p): Don't do a step over if we find a GDB
8810 breakpoint at the resume PC.
8811
8812 * mem-break.c (struct raw_breakpoint): New.
8813 (enum bkpt_type): New type `gdb_breakpoint'.
8814 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
8815 fields. New field `raw'.
8816 (find_raw_breakpoint_at): New.
8817 (set_raw_breakpoint_at): Handle refcounting. Create a raw
8818 breakpoint instead.
8819 (set_breakpoint_at): Adjust.
8820 (delete_raw_breakpoint): New.
8821 (release_breakpoint): New.
8822 (delete_breakpoint): Rename to...
8823 (delete_breakpoint_1): ... this. Add proc parameter. Use
8824 release_breakpoint. Return ENOENT.
8825 (delete_breakpoint): Reimplement.
8826 (find_breakpoint_at): Delete.
8827 (find_gdb_breakpoint_at): New.
8828 (delete_breakpoint_at): Delete.
8829 (set_gdb_breakpoint_at): New.
8830 (delete_gdb_breakpoint_at): New.
8831 (gdb_breakpoint_here): New.
8832 (set_reinsert_breakpoint): Use release_breakpoint.
8833 (uninsert_breakpoint): Rename to ...
8834 (uninsert_raw_breakpoint): ... this.
8835 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
8836 (reinsert_raw_breakpoint): Change parameter type to
8837 raw_breakpoint.
8838 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
8839 instead.
8840 (check_breakpoints): Adjust. Use release_breakpoint.
8841 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
8842 (breakpoint_inserted_here): Ditto.
8843 (check_mem_read): Adjust to iterate over raw breakpoints instead.
8844 Don't trust the breakpoint's shadow if it is not inserted.
8845 (check_mem_write): Adjust to iterate over raw breakpoints instead.
8846 (delete_all_breakpoints): Adjust.
8847 (free_all_breakpoints): Mark all breakpoints as uninserted, and
8848 use delete_breakpoint_1.
8849
8850 * mem-break.h (breakpoints_supported): Delete declaration.
8851 (set_gdb_breakpoint_at): Declare.
8852 (gdb_breakpoint_here): Declare.
8853 (delete_breakpoint_at): Delete.
8854 (delete_gdb_breakpoint_at): Declare.
8855
8856 * server.h (struct raw_breakpoint): Forward declare.
8857 (struct process_info): New field `raw_breakpoints'.
8858
8859 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
8860 breakpoints.
8861
6bf5e0ba
PA
88622010-03-24 Pedro Alves <pedro@codesourcery.com>
8863
8864 * linux-low.c (status_pending_p_callback): Fix comment.
8865 (linux_wait_for_event_1): Move most of the internal breakpoint
8866 handling from here...
8867 (linux_wait_1): ... to here.
8868 (count_events_callback): New.
8869 (select_singlestep_lwp_callback): New.
8870 (select_event_lwp_callback): New.
8871 (cancel_breakpoints_callback): New.
8872 (select_event_lwp): New.
8873 (linux_wait_1): Simplify internal breakpoint handling. Give equal
8874 priority to all LWPs that have had events that should be reported
8875 to the client. Cancel breakpoints when about to reporting the
8876 event to the client, not while stopping lwps. No longer cancel
8877 finished single-steps here.
8878 (cancel_finished_single_step): Delete.
8879 (cancel_finished_single_steps): Delete.
8880
414a389f
PA
88812010-03-24 Pedro Alves <pedro@codesourcery.com>
8882
8883 * mem-break.c (enum bkpt_type): New.
8884 (struct breakpoint): New field `type'.
8885 (set_breakpoint_at): Change return type to struct breakpoint
8886 pointer. Set type to `other_breakpoint' by default.
8887 (delete_breakpoint): Rewrite, supporting more than one breakpoint
8888 in the breakpoint list.
8889 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
8890 (reinsert_breakpoint): Rename to ...
8891 (reinsert_raw_breakpoint): ... this.
8892 (reinsert_breakpoints_at): Adjust.
8893 * mem-break.h (struct breakpoint): Declare.
8894 (set_breakpoint_at): Change return type to struct breakpoint
8895 pointer.
8896
2280c721
PA
88972010-03-24 Pedro Alves <pedro@codesourcery.com>
8898
8899 * server.c (handle_query): Assign, not compare.
8900
d50171e4
PA
89012010-03-24 Pedro Alves <pedro@codesourcery.com>
8902
8903 Teach linux gdbserver to step-over-breakpoints.
8904
8905 * linux-low.c (can_hardware_single_step): New.
8906 (supports_breakpoints): New.
8907 (handle_extended_wait): If stopping threads, read the stop pc of
8908 the new cloned LWP.
8909 (get_pc): New.
8910 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
8911 low target doesn't support retrieving the PC.
8912 (add_lwp): Set last_resume_kind to resume_continue.
8913 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
8914 (linux_attach): Don't clear stop_expected. Set the lwp's
8915 last_resume_kind to resume_stop.
8916 (linux_detach_one_lwp): Don't check for removed breakpoints.
8917 (check_removed_breakpoint): Delete.
8918 (status_pending_p): Rename to ...
8919 (status_pending_p_callback): ... this. Don't check for removed
8920 breakpoints. Don't consider threads that are stopped from GDB's
8921 perspective.
8922 (linux_wait_for_lwp): Always read the stop_pc here.
8923 (cancel_breakpoint): New.
8924 (step_over_bkpt): New global.
8925 (linux_wait_for_event_1): Implement stepping over breakpoints.
8926 (gdb_wants_lwp_stopped): New.
8927 (gdb_wants_all_stopped): New.
8928 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
8929 single-step traps here. Store the thread's last reported target
8930 wait status.
8931 (send_sigstop): Don't clear stop_expected. Always set it,
8932 instead.
8933 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
8934 (cancel_finished_single_step): New.
8935 (cancel_finished_single_steps): New.
8936 (wait_for_sigstop): Don't cancel finished single-step traps here.
8937 (linux_resume_one_lwp): Don't check for removed breakpoints.
8938 Don't set `step' on non-hardware step archs.
8939 (linux_set_resume_request): Ignore resume_stop requests if already
8940 stopping or stopped. Set the lwp's last_resume_kind.
8941 (resume_status_pending_p): Don't check for removed breakpoints.
8942 (need_step_over_p): New.
8943 (start_step_over): New.
8944 (finish_step_over): New.
8945 (linux_resume_one_thread): Always queue a sigstop for resume_stop
8946 requests. Clear the thread's last reported target waitstatus.
8947 Don't use the `suspended' flag. Don't consider pending breakpoints.
8948 (linux_resume): Start a step-over if necessary.
8949 (proceed_one_lwp): New.
8950 (proceed_all_lwps): New.
8951 (unstop_all_lwps): New.
8952 * linux-low.h (struct lwp_info): Rewrite comment for the
8953 `suspended' flag. Add the `stop_pc' field. Delete the
8954 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
8955 Add `'last_resume_kind' and `need_step_over' fields.
8956 * inferiors.c (struct thread_info): Delete, moved elsewhere.
8957 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
8958 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
8959 (set_raw_breakpoint_at): New.
8960 (set_breakpoint_at): Rewrite to use it.
8961 (reinsert_breakpoint_handler): Delete.
8962 (set_reinsert_breakpoint): New.
8963 (reinsert_breakpoint_by_bp): Delete.
8964 (delete_reinsert_breakpoints): New.
8965 (uninsert_breakpoint): Rewrite.
8966 (uninsert_breakpoints_at): New.
8967 (reinsert_breakpoint): Rewrite.
8968 (reinsert_breakpoints_at): New.
8969 (check_breakpoints): Rewrite.
8970 (breakpoint_here): New.
8971 (breakpoint_inserted_here): New.
8972 (check_mem_read): Adjust.
8973 * mem-break.h (breakpoints_supported, breakpoint_here)
8974 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
8975 (reinsert_breakpoint_by_bp): Delete declaration.
8976 (delete_reinsert_breakpoints): Declare.
8977 (reinsert_breakpoint): Delete declaration.
8978 (reinsert_breakpoints_at): Declare.
8979 (uninsert_breakpoint): Delete declaration.
8980 (uninsert_breakpoints_at): Declare.
8981 (check_breakpoints): Adjust prototype.
8982 * server.h: Adjust include order.
8983 (struct thread_info): Declare here. Add a `last_status' field.
8984
30ba68cb
MS
89852010-03-23 Michael Snyder <msnyder@vmware.com>
8986
8987 * server.c (crc32): New function.
8988 (handle_query): Add handling for 'qCRC:' request.
8989
b9a881c2
PA
89902010-03-23 Pedro Alves <pedro@codesourcery.com>
8991
8992 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
8993 lwp had been stopped by a watchpoint.
8994
e92d13d5
PA
89952010-03-16 Pedro Alves <pedro@codesourcery.com>
8996
8997 * server.h (internal_error): Declare.
8998 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
8999 * utils.c (internal_error): New function.
9000
64daa791
AS
90012010-03-15 Andreas Schwab <schwab@redhat.com>
9002
9003 * configure.srv: Fix typo setting srv_regobj.
9004
f52cd8cd
PA
90052010-03-15 Pedro Alves <pedro@codesourcery.com>
9006
9007 * linux-low.c (fetch_register): Avoid passing a non string literal
9008 format to `error'.
9009 (usr_store_inferior_registers): Ditto.
9010
93ae6fdc
PA
90112010-03-14 Pedro Alves <pedro@codesourcery.com>
9012
9013 * linux-low.c (linux_write_memory): Bail out early if peeking
9014 memory failed.
9015
c3adc08c
PA
90162010-03-14 Pedro Alves <pedro@codesourcery.com>
9017
9018 * linux-low.h (struct lwp_info): New fields
9019 `stopped_by_watchpoint' and `stopped_data_address'.
9020 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
9021 here, and cache them in the lwp object.
9022 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
9023 directly.
9024 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
9025 field.
9026 (linux_stopped_by_watchpoint): Rewrite.
9027 (linux_stopped_data_address): Rewrite.
9028
bce522a2
PA
90292010-03-06 Simo Melenius <simo.melenius@iki.fi>
9030
9031 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
9032 switching the current inferior, not before.
9033
90884b2b
L
90342010-03-01 H.J. Lu <hongjiu.lu@intel.com>
9035
9036 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
9037 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
9038 i386-linux.c and amd64-linux.c.
9039 (reg-i386.o): Removed.
9040 (reg-i386.c): Likewise.
9041 (reg-i386-linux.o): Likewise.
9042 (reg-i386-linux.c): Likewise.
9043 (reg-x86-64.o): Likewise.
9044 (reg-x86-64.c): Likewise.
9045 (reg-x86-64-linux.o): Likewise.
9046 (reg-x86-64-linux.c): Likewise.
9047 (i386.o): New.
9048 (i386.c): Likewise.
9049 (i386-linux.o): Likewise.
9050 (i386-linux.c): Likewise.
9051 (amd64.o): Likewise.
9052 (amd64.c): Likewise.
9053 (amd64-linux.o): Likewise.
9054 (amd64-linux.c): Likewise.
9055
9056 * configure.srv (srv_i386_regobj): New.
9057 (srv_i386_linux_regobj): Likewise.
9058 (srv_amd64_regobj): Likewise.
9059 (srv_amd64_linux_regobj): Likewise.
9060 (srv_i386_32bit_xmlfiles): Likewise.
9061 (srv_i386_64bit_xmlfiles): Likewise.
9062 (srv_i386_xmlfiles): Likewise.
9063 (srv_amd64_xmlfiles): Likewise.
9064 (srv_i386_linux_xmlfiles): Likewise.
9065 (srv_amd64_linux_xmlfiles): Likewise.
9066 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
9067 srv_xmlfiles to $srv_i386_xmlfiles.
9068 (i[34567]86-*-mingw32ce*): Likewise.
9069 (i[34567]86-*-mingw*): Likewise.
9070 (i[34567]86-*-nto*): Likewise.
9071 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
9072 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
9073 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
9074 (x86_64-*-linux*): Likewise.
9075
9076 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
9077 (init_registers_amd64_linux): New.
9078 (x86_arch_setup): Replace init_registers_x86_64_linux with
9079 init_registers_amd64_linux.
9080
193f13e6
MK
90812010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
9082
9083 * configure.ac: Check for libdl. If it is not available link against
9084 static libthread_db.
9085 * configure: Regenerate.
9086
85d721b8
PA
90872010-02-22 Pedro Alves <pedro@codesourcery.com>
9088
9089 PR9605
9090
9091 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
9092 handing a read watchpoint.
9093 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
9094
6076632b
DE
90952010-02-12 Doug Evans <dje@google.com>
9096
9097 * linux-low.c (linux_supports_tracefork_flag): Document.
9098 (linux_look_up_symbols): Add comment.
9099
3327ccf7
L
91002010-02-03 H.J. Lu <hongjiu.lu@intel.com>
9101
9102 * regcache.c (supply_register): Clear regcache if buf is NULL.
9103
0718675c 91042010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 9105 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
9106
9107 * inferiors.c (find_inferior): Add function documentation.
9108 (unloaded_dll): Handle the case where the unloaded dll has not
9109 been previously registered in the dll list.
9110
177321bd
DJ
91112010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
9112
9113 * linux-arm-low.c (thumb_breakpoint_len): Delete.
9114 (thumb2_breakpoint): New.
9115 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
9116
2b009048
DJ
91172010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
9118
9119 * linux-low.c (get_stop_pc): Check for SIGTRAP.
9120 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
9121 breakpoints.
9122
3be029c7
PA
91232010-01-21 Pedro Alves <pedro@codesourcery.com>
9124
9125 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
9126
18f5de3b
JK
91272010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
9128
9129 * linux-s390-low.c (s390_collect_ptrace_register)
9130 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
9131
3743bb4f
DE
91322010-01-21 Doug Evans <dje@google.com>
9133
14ce3065
DE
9134 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
9135 (PTRACE_ARG4_TYPE): New macro.
9136 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
9137 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
9138 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
9139 (usr_store_inferior_registers): Ditto.
9140 (linux_read_memory, linux_write_memory): Ditto.
9141 (linux_test_for_tracefork): Ditto.
9142
3743bb4f
DE
9143 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
9144 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
9145
8b315be5
PA
91462010-01-21 Pedro Alves <pedro@codesourcery.com>
9147
9148 * proc-service.c (ps_lgetregs): Don't refetch registers from the
9149 target.
9150
85492558
PA
91512010-01-21 Pedro Alves <pedro@codesourcery.com>
9152
9153 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
9154 prototype to take a regcache. Adjust.
9155
442ea881
PA
91562010-01-20 Pedro Alves <pedro@codesourcery.com>
9157
9158 * regcache.h (struct thread_info): Forward declare.
9159 (struct regcache): New.
9160 (new_register_cache): Adjust prototype.
9161 (get_thread_regcache): Declare.
9162 (free_register_cache): Adjust prototype.
9163 (registers_to_string, registers_from_string): Ditto.
9164 (supply_register, supply_register_by_name, collect_register)
9165 (collect_register_as_string, collect_register_by_name): Ditto.
9166 * regcache.c (struct inferior_regcache_data): Delete.
9167 (get_regcache): Rename to ...
9168 (get_thread_regcache): ... this. Adjust. Switch inferior before
9169 fetching registers.
9170 (regcache_invalidate_one): Adjust.
9171 (regcache_invalidate): Fix prototype.
9172 (new_register_cache): Return the new register cache.
9173 (free_register_cache): Change prototype.
9174 (realloc_register_cache): Adjust.
9175 (registers_to_string): Change prototype to take a regcache. Adjust.
9176 (registers_from_string): Ditto.
9177 (register_data): Ditto.
9178 (supply_register): Ditto.
9179 (supply_register_by_name): Ditto.
9180 (collect_register): Ditto.
9181 (collect_register_as_string): Ditto.
9182 (collect_register_by_name): Ditto.
9183 * server.c (process_serial_event): Adjust.
9184 * linux-low.h (regset_fill_func, regset_store_func): Change
9185 prototype.
9186 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
9187 Change prototype.
9188 * linux-low.c (get_stop_pc): Adjust.
9189 (check_removed_breakpoint): Adjust.
9190 (linux_wait_for_event): Adjust.
9191 (linux_resume_one_lwp): Adjust.
9192 (fetch_register): Add regcache parameter. Adjust.
9193 (usr_store_inferior_registers): Ditto.
9194 (regsets_fetch_inferior_registers): Ditto.
9195 (regsets_store_inferior_registers): Ditto.
9196 (linux_fetch_registers, linux_store_registers): Ditto.
9197 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
9198 regcache. Adjust.
43aaf8b6
PA
9199 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
9200 Ditto.
442ea881
PA
9201 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
9202 prototype to take a regcache.
9203 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
9204 * remote-utils.c (convert_ascii_to_int, outreg)
9205 (prepare_resume_reply): Change prototype to take a regcache.
9206 Adjust.
9207 * target.h (struct target_ops) <fetch_registers, store_registers>:
9208 Change prototype to take a regcache.
9209 (fetch_inferior_registers, store_inferior_registers): Change
9210 prototype to take a regcache. Adjust.
9211 * proc-service.c (ps_lgetregs): Adjust.
9212 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
9213 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
9214 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
9215 take a regcache. Adjust.
9216 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
9217 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
9218 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
9219 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
9220 * linux-cris-low.c (cris_get_pc, cris_set_pc)
9221 (cris_cannot_fetch_register):
9222 (cris_breakpoint_at): Change prototype to take a regcache.
9223 Adjust.
9224 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
9225 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
9226 to take a regcache. Adjust.
9227 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
9228 Adjust.
9229 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
9230 take a regcache. Adjust.
9231 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
9232 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
9233 (m68k_set_pc): Change prototype to take a regcache. Adjust.
9234 * linux-mips-low.c (mips_get_pc):
9235 (mips_set_pc): Change prototype to take a regcache. Adjust.
9236 (mips_reinsert_addr): Adjust.
9237 (mips_collect_register): Change prototype to take a regcache.
9238 Adjust.
9239 (mips_supply_register):
9240 (mips_collect_register_32bit, mips_supply_register_32bit)
9241 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
9242 (mips_store_fpregset): Ditto.
43aaf8b6
PA
9243 * linux-ppc-low.c (ppc_supply_ptrace_register)
9244 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
9245 (parse_spufs_run): Adjust.
9246 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
9247 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
9248 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
9249 take a regcache. Adjust.
9250 * linux-s390-low.c (s390_collect_ptrace_register)
9251 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
9252 (s390_set_pc): Change prototype to take a regcache. Adjust.
9253 (s390_arch_setup): Adjust.
9254 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
9255 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
9256 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
9257 (sparc_fill_gregset, sparc_store_gregset_from_stack)
9258 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
9259 regcache. Adjust.
9260 (sparc_breakpoint_at): Adjust.
9261 * linux-xtensa-low.c (xtensa_fill_gregset):
9262 (xtensa_store_gregset):
9263 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
9264 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
9265 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
9266 prototype to take a regcache. Adjust.
9267 * win32-arm-low.c (arm_fetch_inferior_register)
9268 (arm_store_inferior_register): Change prototype to take a
9269 regcache. Adjust.
9270 * win32-i386-low.c (i386_fetch_inferior_register)
9271 (i386_store_inferior_register): Change prototype to take a
9272 regcache. Adjust.
9273 * win32-low.c (child_fetch_inferior_registers)
9274 (child_store_inferior_registers): Change prototype to take a
9275 regcache. Adjust.
9276 (win32_wait): Adjust.
9277 (win32_fetch_inferior_registers): Change prototype to take a
9278 regcache. Adjust.
9279 (win32_store_inferior_registers): Adjust.
9280 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
9281 store_inferior_register>: Change prototype to take a regcache.
9282
60c3d7b0
DE
92832010-01-20 Doug Evans <dje@google.com>
9284
9285 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
9286 #ifdef.
9287 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 9288 (W_STOPCODE): Provide definition if missing.
60c3d7b0 9289
dc146f7c
VP
92902010-01-13 Vladimir Prus <vladimir@codesourcery.com>
9291
9292 * linux-low.c (linux_core_of_thread): New.
9293 (compare_ints, show_process, list_threads): New.
9294 (linux_qxfer_osdata): Report threads and cores.
9295 (linux_target_op): Register linux_core_of_thread.
9296 * remote-utils.c (prepare_resume_reply): Report the core.
9297 (buffer_xml_printf): Support %d specifier.
9298 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
9299 New.
9300 (handle_query): Handle qXfer:threads. Announce availability
9301 thereof.
9302 * target.h (struct target_ops): New field core_of_thread.
9303
7803799a
UW
93042010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
9305
9306 * Makefile.in (clean): Remove new generated files.
9307 (reg-s390.o, reg-s390.c): Remove rules.
9308 (reg-s390x.o, reg-s390x.c): Likewise.
9309 (s390-linux32.o, s390-linux32.c): Add rules.
9310 (s390-linux64.o, s390-linux64.c): Likewise.
9311 (s390x-linux64.o, s390x-linux64.c): Likewise.
9312 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
9313 * linux-s390-low.c: Include <elf.h>.
9314 (HWCAP_S390_HIGH_GPRS): Define if undefined.
9315 (init_registers_s390): Remove prototype.
9316 (init_registers_s390x): Likewise.
9317 (init_registers_s390_linux32): Add prototype.
9318 (init_registers_s390_linux64): Likewise.
9319 (init_registers_s390x_linux64): Likewise.
9320 (s390_num_regs_3264): New define.
9321 (s390_regmap_3264): New global variable.
9322 (s390_cannot_fetch_register): Remove obsolete check.
9323 (s390_cannot_store_register): Likewise.
9324 (s390_collect_ptrace_register): Handle upper/lower register halves.
9325 (s390_supply_ptrace_register): Likewise.
9326 (s390_fill_gregset): Update to register number changes.
9327 (s390_get_hwcap): New routine.
9328 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
9329 Install appropriate regmap and register set.
9330
6e7ffa39
JB
93312010-01-01 Joel Brobecker <brobecker@adacore.com>
9332
9333 * server.c (gdbserver_version): Update copyright year to 2010.
9334 * gdbreplay.c (gdbreplay_version): Likewise.
9335
957f3f49
DE
93362009-12-28 Doug Evans <dje@google.com>
9337
9338 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
9339 elf/external.h. Include <elf.h> instead but only if necessary.
9340
ca5c370d
PA
93412009-12-28 Pedro Alves <pedro@codesourcery.com>
9342
9343 * linux-low.c (linux_remove_process): Remove `detaching'
9344 parameter. Don't release/detach from thread_db here.
9345 (linux_kill): Release/detach from thread_db here, ...
9346 (linux_detach): ... and here, before actually detaching.
9347 (linux_wait_1): ... and here, when a process exits.
9348 * thread-db.c (any_thread_of): New.
9349 (thread_db_free): Switch the current inferior to a thread of the
9350 passed in process.
9351
4ee62156
DE
93522009-12-21 Doug Evans <dje@google.com>
9353
d90e6a88
DE
9354 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
9355
c5f62d5f
DE
9356 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
9357 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
9358 warning ifndef __NR_tkill. Move setting of errno there too.
9359 Delete unnecessary resetting of errno after syscall.
9360 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
9361
10e86dd7
DE
9362 * configure.ac: Check for dladdr.
9363 * config.in: Regenerate.
9364 * configure: Regenerate.
9365 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
9366 (try_thread_db_load): Update.
9367
4ee62156
DE
9368 * linux-low.c (my_waitpid): Delete unnecessary prototype.
9369
00f515da
DE
93702009-12-18 Doug Evans <dje@google.com>
9371
e9464885
DE
9372 * event-loop.c: Include unistd.h if it exists.
9373
07d4f67e
DE
9374 * linux-low.c (my_waitpid): Move definition away from being in
9375 between linux_tracefork_child/linux_test_for_tracefork.
9376
00f515da
DE
9377 * gdb_proc_service.h (psaddr_t): Fix type.
9378 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
9379 signature to match glibc.
9380
1de1badb
DE
93812009-12-16 Doug Evans <dje@google.com>
9382
9383 * linux-low.c (linux_read_memory): Fix argument to read.
9384
aeeb81d1
PA
93852009-11-26 Pedro Alves <pedro@codesourcery.com>
9386
9387 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
9388 events, don't leave current_inferior pointing at null.
9389
10357975
PA
93902009-11-26 Pedro Alves <pedro@codesourcery.com>
9391
9392 * win32-low.c (LOG): Delete.
9393 (OUTMSG): Output to stderr.
9394 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
9395 on compile time LOG macro.
9396 (win32_wait): Fix debug output.
9397
cf6e3471
PA
93982009-11-26 Pedro Alves <pedro@codesourcery.com>
9399
9400 * win32-low.c (win32_add_one_solib): If the dll name is
9401 "ntdll.dll", prepend the system directory to the dll path.
9402
0c85e18e
MK
94032009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
9404
9405 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
9406
9ac544ce 94072009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 9408 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
9409
9410 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
9411 * configure.ac: Check for __mcoldfire__ and set
9412 gdb_cv_m68k_is_coldfire.
9413 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
9414 reg-cf.o and reg-m68k.o.
9415 * configure: Regenerated.
9416
fd7dd3e6
PA
94172009-11-16 Pedro Alves <pedro@codesourcery.com>
9418
9419 * linux-low.c (linux_remove_process): Add `detaching' parameter.
9420 Pass it to thread_db_free.
9421 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
9422 proper `detaching' argument to linux_remove_process.
9423 * linux-low.h (thread_db_free): Add `detaching' parameter.
9424 * thread-db.c (thread_db_init): Pass false as `detaching' argument
9425 to thread_db_free.
9426 (thread_db_free): Add `detaching' parameter. Only
9427 call td_ta_clear_event if detaching from process.
9428
75aa492e
MK
94292009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
9430
9431 * thread-db.c (thread_db_free): Fix typo.
9432
21e1bee4
PP
94332009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
9434
9435 PR gdb/10838
9436 * thread-db.c (thread_db_free): Call td_ta_clear_event.
9437
8838b45e
NS
94382009-11-03 Nathan Sidwell <nathan@codesourcery.com>
9439
9440 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
9441 with an i686 compiler.
9442 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
9443 needed.
9444 * configure: Rebuilt.
9445
8a35fb51
SL
94462009-10-29 Sandra Loosemore <sandra@codesourcery.com>
9447
9448 PR gdb/10783
9449
9450 * server.c (handle_search_memory_1): Correct read_addr initialization
9451 in loop for searching subsequent chunks.
9452
96f15937
PP
94532009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
9454
9455 * configure.ac: New --with-libthread-db option.
9456 * thread-db.c: Allow direct dependence on libthread_db.
9457 (thread_db_free): Adjust.
9458 * config.in: Regenerate.
9459 * configure: Likewise.
889bf7c5 9460
5f7d1694
PP
94612009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
9462
9463 PR gdb/10757
9464 * thread-db.c (attach_thread): New function.
9465 (maybe_attach_thread): Return success/failure.
9466 (find_new_threads_callback): Adjust.
889bf7c5
PA
9467 (thread_db_find_new_threads): Loop until no new threads.
9468
88e3b899
PA
94692009-10-13 Pedro Alves <pedro@codesourcery.com>
9470
9471 * proc-service.c (ps_lgetregs): Formatting.
9472
cdbfd419
PP
94732009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
9474
9475 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
9476 * configure.ac: Adjust.
9477 * linux-low.h (struct process_info_private): Move members to struct
9478 thread_db.
9479 (thread_db_free, thread_db_handle_monitor_command): New prototype.
9480 * linux-low.c (linux_remove_process): Adjust.
9481 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
9482 * server.c (handle_query): Move code ...
9483 (handle_monitor_command): ... here. New function.
9484 * target.h (struct target_ops): New member.
9485 * thread-db.c (struct thread_db): New.
9486 (libthread_db_search_path): New variable.
9487 (thread_db_create_event, thread_db_enable_reporting)
9488 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
9489 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
9490 (try_thread_db_load_1, dladdr_to_soname): New functions.
9491 (try_thread_db_load, thread_db_load_search): New functions.
9492 (thread_db_init): Search for libthread_db.
9493 (thread_db_free): New function.
9494 (thread_db_handle_monitor_command): Likewise.
9495 * config.in: Regenerate.
9496 * configure: Regenerate.
889bf7c5 9497
4168d2d6
UW
94982009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
9499
9500 * spu-low.c (spu_kill): Wait for inferior to terminate.
9501 Call clear_inferiors.
9502 (spu_detach): Call clear_inferiors.
9503
81ecdfbb
RW
95042009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9505
9506 * aclocal.m4: Regenerate.
9507 * config.in: Likewise.
9508 * configure: Likewise.
9509
0b9ff2c0
UW
95102009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9511
9512 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
9513 (parse_spufs_run): New function.
9514 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
9515 (ppc_breakpoint_at): Handle SPU breakpoints.
9516
efcbbd14
UW
95172009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9518
9519 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
9520 (SPUFS_MAGIC): Define.
9521 (spu_enumerate_spu_ids): New function.
9522 (linux_qxfer_spu): New function.
9523 (linux_target_ops): Install linux_qxfer_spu.
9524
f4d9bade
UW
95252009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9526
9527 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
9528 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
9529 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
9530 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
9531 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
9532 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
9533 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
9534 (init_registers_powerpc_cell32l): Add prototype.
9535 (init_registers_powerpc_cell64l): Likewise.
9536 (ppc_arch_setup): Detect Cell/B.E. architecture.
9537
96e946ca
RW
95382009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9539
9540 * Makefile.in (datarootdir): New variable.
9541
58d6951d
DJ
95422009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
9543
9544 * linux-low.c (linux_write_memory): Update debugging output.
9545 * Makefile.in (clean): Add new descriptions.
9546 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
9547 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
9548 * configure.srv: Add new files for arm*-*-linux*.
9549 * linux-arm-low.c: Add new declarations.
9550 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
9551 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
9552 (HWCAP_VFPv3D16): New.
9553 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
9554 instead of __IWMMXT__.
9555 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
9556 (arm_arch_setup): New.
9557 (target_regsets): Remove #ifdef. Add VFP regset.
9558 (the_low_target): Use arm_arch_setup.
9559
12b42a12
DJ
95602009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
9561
9562 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
9563 the main thread again.
9564
ac8c974e
AR
95652009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
9566
9567 Adding Neutrino gdbserver.
9568 * configure: Regenerated.
9569 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
9570 * configure.srv (i[34567]86-*-nto*): New target.
9571 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
9572 * remote-utils.c [__QNX__]: Include sys/iomgr.h
9573 (nto_comctrl) [__QNX__]: New function.
9574 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
9575
4424e0c3 95762009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
9577
9578 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
9579 srv_tgtobj.
9580
912cf4ba
PA
95812009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
9582 Pedro Alves <pedro@codesourcery.com>
9583
9584 * win32-i386-low.c (i386_get_thread_context): Handle systems that
9585 don't support CONTEXT_EXTENDED_REGISTERS.
9586 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
9587 (the_low_target): Install them.
9588 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
9589 failing with ERROR_PIPE_NOT_CONNECTED.
9590
aa5ca48f
DE
95912009-06-30 Doug Evans <dje@google.com>
9592 Pierre Muller <muller@ics.u-strasbg.fr>
9593
9594 Add h/w watchpoint support to x86-linux, win32-i386.
9595 * Makefile.in (SFILES): Add i386-low.c
9596 (i386_low_h): Define.
9597 (i386-low.o): Add dependencies.
9598 (linux-x86-low.o): Add i386-low.h dependency.
9599 (win32-i386-low.o): Ditto.
9600 * i386-low.c: New file.
9601 * i386-low.h: New file.
9602 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
9603 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
9604 * linux-low.c (linux_add_process): Initialize arch_private.
9605 (linux_remove_process): Free arch_private.
9606 (add_lwp): Initialize arch_private.
9607 (delete_lwp): Free arch_private.
9608 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
9609 provided.
9610 * linux-low.h (process_info_private): New member arch_private.
9611 (lwp_info): New member arch_private.
9612 (linux_target_ops): New members new_process, new_thread,
9613 prepare_to_resume.
9614 (ptid_of): New macro.
9615 * linux-x86-low.c: Include stddef.h, i386-low.h.
9616 (arch_process_info): New struct.
9617 (arch_lwp_info): New struct.
9618 (x86_linux_dr_get, x86_linux_dr_set): New functions.
9619 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
9620 (i386_dr_low_get_status): New function.
9621 (x86_insert_point, x86_remove_point): New functions.
9622 (x86_stopped_by_watchpoint): New function.
9623 (x86_stopped_data_address): New function.
9624 (x86_linux_new_process, x86_linux_new_thread): New functions.
9625 (x86_linux_prepare_to_resume): New function.
9626 (the_low_target): Add entries for insert_point, remove_point,
9627 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
9628 prepare_to_resume.
9629 * server.c (debug_hw_points): New global.
9630 (monitor_show_help): Document set debug-hw-points.
9631 (handle_query): Process "set debug-hw-points".
9632 * server.h (debug_hw_points): Declare.
9633 (paddress): Declare.
9634 * utils.c (NUMCELLS, CELLSIZE): New macros.
9635 (get_sell, xsnprintf, paddress): New functions.
9636 * win32-arm-low.c (the_low_target): Add entries for insert_point,
9637 remove_point, stopped_by_watchpoint, stopped_data_address.
9638 * win32-i386-low.c: Include i386-low.h.
9639 (debug_reg_state): Replaces dr.
9640 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
9641 (i386_dr_low_get_status): New function.
9642 (i386_insert_point, i386_remove_point): New functions.
9643 (i386_stopped_by_watchpoint): New function.
9644 (i386_stopped_data_address): New function.
9645 (i386_initial_stuff): Update.
9646 (get_thread_context,set_thread_context,i386_thread_added): Update.
9647 (the_low_target): Add entries for insert_point,
9648 remove_point, stopped_by_watchpoint, stopped_data_address.
9649 * win32-low.c (win32_insert_watchpoint): New function.
9650 (win32_remove_watchpoint): New function.
9651 (win32_stopped_by_watchpoint): New function.
9652 (win32_stopped_data_address): New function.
9653 (win32_target_ops): Add entries for insert_watchpoint,
9654 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
9655 * win32-low.h (win32_target_ops): New members insert_point,
9656 remove_point, stopped_by_watchpoint, stopped_data_address.
9657
d993e290
PA
96582009-06-25 Pedro Alves <pedro@codesourcery.com>
9659
9660 * server.c (process_serial_event): Re-return unsupported, not
9661 error, if the type isn't recognized. Re-allow supporting only
9662 insert or remove packets. Also call require_running for
9663 breakpoints. Add missing break statement to default case. Tidy.
9664 * target.h (struct target_ops): Rename insert_watchpoint to
9665 insert_point, and remove_watchpoint to remove_point.
9666
9667 * linux-low.h (struct linux_target_ops): Likewise.
9668 * linux-low.c (linux_insert_watchpoint): Rename to ...
9669 (linux_insert_point): ... this. Adjust.
9670 (linux_remove_watchpoint): Rename to ...
9671 (linux_remove_point): ... this. Adjust.
9672 (linux_target_ops): Adjust.
9673 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
9674 (cris_insert_point): ... this.
9675 (cris_remove_watchpoint): Rename to ...
9676 (cris_remove_point): ... this.
9677 (the_low_target): Adjust.
9678
0f54c268
PM
96792009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
9680
9681 * server.c (handle_v_kill): Pass signal_pid to
9682 kill_inferior if multi_process is zero.
9683
c6314022
AR
96842009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
9685
9686 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
9687 * target.h (target_ops): Comment for *_watchpoint to make it clear
9688 the functions can get types '0' and '1'.
9689
4463ce24
AR
96902009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
9691
9692 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
9693 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
9694 * regcache.c (get_regcache): Likewise.
9695 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
9696 * win32-low.c (child_fetch_inferior_registers): Remove check for
9697 regno 0.
9698
cf8fd78b
PA
96992009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
9700 Pedro Alves <pedro@codesourcery.com>
9701
9702 * target.h (struct target_ops) <supports_multi_process>: New
9703 callback.
9704 (target_supports_multi_process): New.
9705 * server.c (handle_query): Even if GDB reports support, only
9706 enable multi-process if the target also supports it. Report
9707 multi-process support only if the target backend supports it.
9708 * linux-low.c (linux_supports_multi_process): New function.
9709 (linux_target_ops): Install it as target_supports_multi_process
9710 callback.
9711
47c0c975
DE
97122009-05-24 Doug Evans <dje@google.com>
9713
e09875d4
DE
9714 Global renaming of find_thread_pid to find_thread_ptid.
9715 * server.h (find_thread_ptid): Renamed from find_thread_pid.
9716 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
9717 All callers updated.
9718
e27d73f6
DE
9719 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
9720 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
9721 directly.
9722
47c0c975
DE
9723 * linux-low.c (get_stop_pc): Print pc if debug_threads.
9724 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
9725 (linux_resume_one_lwp): Ditto.
9726
2acc282a
DE
97272009-05-23 Doug Evans <dje@google.com>
9728
9729 * linux-low.c (linux_resume_one_lwp): Change type of first arg
9730 from struct inferior_list_entry * to struct lwp_info *.
9731 All callers updated.
9732
9f1036c1
DE
97332009-05-13 Doug Evans <dje@google.com>
9734
9735 * linux-x86-low.c: Don't include assert.h.
9736 (x86_siginfo_fixup): Use fatal, not assert.
9737 (x86_arch_setup): Fix comment.
9738
d0722149
DE
97392009-05-12 Doug Evans <dje@google.com>
9740
9741 Biarch support for i386/amd64 gdbserver.
9742 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
9743 Add linux-x86-low.c.
9744 (linux-i386-low.o, linux-x86-64-low.o): Delete.
9745 (linux-x86-low.o): Add.
9746 * linux-x86-64-low.c: Delete.
9747 * linux-i386-low.c: Delete.
9748 * linux-x86-low.c: New file.
9749 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
9750 linux-x86-low.o.
9751 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
9752 linux-x86-low.o.
9753 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
9754 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
9755 (linux_child_pid_to_exec_file): New function.
9756 (elf_64_header_p, elf_64_file_p): New functions.
9757 (siginfo_fixup): New function.
9758 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
9759 give target a chance to convert layout.
9760 * linux-low.h (linux_target_ops): New member siginfo_fixup.
9761 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
9762
fdeb2a12
DE
97632009-05-07 Doug Evans <dje@google.com>
9764
9765 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
9766 (regsets_store_inferior_registers): Ditto.
9767
a6dbe5df
PA
97682009-05-06 Pedro Alves <pedro@codesourcery.com>
9769
9770 PR server/10048
9771
9772 * linux-low.c (must_set_ptrace_flags): Delete.
9773 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
9774 of the global.
9775 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
9776 `lwp->must_set_ptrace_flags' instead.
ba42693b 9777 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
9778 (linux_wait_1): ... not here.
9779
5091eb23
DE
97802009-04-30 Doug Evans <dje@google.com>
9781
9f767825
DE
9782 * inferiors.c (started_inferior_callback): New function.
9783 (attached_inferior_callback): New function.
9784 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
9785 * server.c (print_started_pid, print_attached_pid): New functions.
9786 (detach_or_kill_for_exit): New function.
9787 (main): Call it instead of for_each_inferior (kill_inferior_callback).
9788 * server.h (have_started_inferiors_p): Declare.
9789 (have_attached_inferiors_p): Declare.
9790
5091eb23
DE
9791 * inferiors.c (remove_process): Fix memory leak, free process.
9792 * linux-low.c (linux_remove_process): New function.
9793 (linux_kill): Call it instead of remove_process.
9794 (linux_detach, linux_wait_1): Ditto.
9795
155c8968
PA
97962009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
9797
9798 * configure.srv: Add x86 Windows CE target.
9799
7fe519cb
UW
98002009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
9801
9802 * inferiors.c (get_thread_process): Make global.
9803 * server.h (get_thread_process): Add prototype.
9804 * thread-db.c (find_one_thread): Use get_thread_process
9805 instead of current_process.
9806 (thread_db_get_tls_address): Do not crash if called when
9807 thread layer is not yet initialized.
9808
5472f405
UW
98092009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
9810
9811 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
9812 * spu-low.c (current_tid): Rename to ...
9813 (current_ptid): ... this.
9814 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
9815 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
9816 ptid_get_lwp (current_ptid) instead of current_tid.
9817 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
9818 instead of current_tid. Use find_process_pid to verify pid
9819 argument is valid. Pass proper argument to remove_process.
9820 (spu_thread_alive): Compare current_ptid instead of current_tid.
9821 (spu_resume): Likewise.
9822
55ac2b99
PA
98232009-04-02 Pedro Alves <pedro@codesourcery.com>
9824
9825 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
9826 variable.
9827
95954743
PA
98282009-04-01 Pedro Alves <pedro@codesourcery.com>
9829
9830 Implement the multiprocess extensions, and add linux multiprocess
9831 support.
9832
9833 * server.h (ULONGEST): Declare.
9834 (struct ptid, ptid_t): New.
9835 (minus_one_ptid, null_ptid): Declare.
9836 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
9837 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
9838 (struct inferior_list_entry): Change `id' type from unsigned from
9839 to ptid_t.
9840 (struct sym_cache, struct breakpoint, struct
9841 process_info_private): Forward declare.
9842 (struct process_info): Declare.
9843 (current_process): Declare.
9844 (all_processes): Declare.
9845 (initialize_inferiors): Declare.
9846 (add_thread): Adjust to use ptid_t.
9847 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
9848 (add_process, remove_process, find_thread_pid): Declare.
9849 (find_inferior_id): Adjust to use ptid_t.
9850 (cont_thread, general_thread, step_thread): Change type to ptid_t.
9851 (multi_process): Declare.
9852 (push_event): Adjust to use ptid_t.
9853 (read_ptid, write_ptid): Declare.
9854 (prepare_resume_reply): Adjust to use ptid_t.
9855 (clear_symbol_cache): Declare.
9856 * inferiors.c (all_processes): New.
9857 (null_ptid, minus_one_ptid): New.
9858 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
9859 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
9860 (add_thread): Change unsigned long to ptid. Remove gdb_id
9861 parameter. Adjust.
9862 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
9863 (gdb_id_to_thread): Rename to ...
9864 (find_thread_pid): ... this. Change unsigned long to ptid.
9865 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
9866 (loaded_dll, pull_pid_from_list): Adjust.
9867 (add_process, remove_process, find_process_pid)
9868 (get_thread_process, current_process, initialize_inferiors): New.
9869 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
9870 (struct target_waitstatus) <related_pid>: Ditto.
9871 (struct target_ops) <kill, detach>: Add `pid' argument. Change
9872 return type to int.
9873 (struct target_ops) <join>: Add `pid' argument.
9874 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
9875 (struct target_ops) <wait>: Add `ptid' field. Change return type
9876 to ptid.
9877 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
9878 (mywait): Add `ptid' argument. Change return type to ptid_t.
9879 (target_pid_to_str): Declare.
9880 * target.c (set_desired_inferior): Adjust to use ptids.
9881 (mywait): Add new `ptid' argument. Adjust.
9882 (target_pid_to_str): New.
9883 * mem-break.h (free_all_breakpoints): Declare.
9884 * mem-break.c (breakpoints): Delelete.
9885 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
9886 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
9887 to use per-process breakpoint list.
9888 (free_all_breakpoints): New.
9889 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
9890 (symbol_cache, all_symbols_looked_up): Delete.
9891 (hexchars): New.
9892 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
9893 read_ptid): New.
9894 (prepare_resume_reply): Change ptid argument's type from unsigned
9895 long to ptid_t. Adjust. Implement W;process and X;process.
9896 (free_sym_cache, clear_symbol_cache): New.
9897 (look_up_one_symbol): Adjust to per-process symbol cache. *
9898 * server.c (cont_thread, general_thread, step_thread): Change type
9899 to ptid_t.
9900 (attached): Delete.
9901 (multi_process): New.
9902 (last_ptid): Change type to ptid_t.
9903 (struct vstop_notif) <ptid>: Change type to ptid_t.
9904 (queue_stop_reply, push_event): Change `ptid' argument's type to
9905 ptid_t.
9906 (discard_queued_stop_replies): Add `pid' argument.
9907 (start_inferior): Adjust to use ptids. Adjust to mywait interface
9908 changes. Don't reference the `attached' global.
9909 (attach_inferior): Adjust to mywait interface changes.
9910 (handle_query): Adjust to use ptids. Parse GDB's qSupported
9911 features. Handle and report "multiprocess+". Handle
9912 "qAttached:PID".
9913 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
9914 changes.
9915 (handle_v_kill): New.
9916 (handle_v_stopped): Adjust to use target_pid_to_str.
9917 (handle_v_requests): Allow multiple attaches and runs when
9918 multiprocess extensions are in effect. Handle "vKill".
9919 (myresume): Adjust to use ptids.
9920 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
9921 (handle_status): Adjust to discard_queued_stop_replies interface
9922 change.
9923 (first_thread_of, kill_inferior_callback)
9924 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
9925 (main): Call initialize_inferiors. Adjust to use ptids, killing
9926 and detaching from all inferiors. Handle multiprocess packet
9927 variants.
9928 * linux-low.h: Include gdb_proc_service.h.
9929 (struct process_info_private): New.
9930 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
9931 <lwpid_of>: Use ptid_get_lwp.
9932 (get_lwp_thread): Adjust.
9933 (struct lwp_info): Add `dead' member.
9934 (find_lwp_pid): Declare.
9935 * linux-low.c (thread_db_active): Delete.
9936 (new_inferior): Adjust comment.
9937 (inferior_pid): Delete.
9938 (linux_add_process): New.
9939 (handle_extended_wait): Adjust.
9940 (add_lwp): Change unsigned long to ptid.
9941 (linux_create_inferior): Add process to processes table. Adjust
9942 to use ptids. Don't set new_inferior here.
9943 (linux_attach_lwp): Rename to ...
9944 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
9945 it. Adjust to use ptids.
9946 (linux_attach_lwp): New.
9947 (linux_attach): Add process to processes table. Don't set
9948 new_inferior here.
9949 (struct counter): New.
9950 (second_thread_of_pid_p, last_thread_of_process_p): New.
9951 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
9952 multiple processes.
9953 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
9954 processes. Remove process from process table.
9955 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
9956 to multiple processes.
9957 (any_thread_of): New.
9958 (linux_detach): Add `pid' argument, and handle it. Remove process
9959 from processes table.
9960 (linux_join): Add `pid' argument. Handle it.
9961 (linux_thread_alive): Change unsighed long argument to ptid_t.
9962 Consider dead lwps as not being alive.
9963 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
9964 threads we're not interested in.
9965 (same_lwp, find_lwp_pid): New.
9966 (linux_wait_for_lwp): Change `pid' argument's type from int to
9967 ptid_t. Adjust.
9968 (linux_wait_for_event): Rename to ...
9969 (linux_wait_for_event_1): ... this. Change `pid' argument's type
9970 from int to ptid_t. Adjust.
9971 (linux_wait_for_event): New.
9972 (linux_wait_1): Add `ptid' argument. Change return type to
9973 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
9974 that exit from the process table.
9975 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
9976 Adjust.
9977 (mark_lwp_dead): New.
9978 (wait_for_sigstop): Adjust to use ptids. If a process exits while
9979 stopping all threads, mark its main lwp as dead.
9980 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
9981 ptids.
9982 (fetch_register, usr_store_inferior_registers)
9983 (regsets_fetch_inferior_registers)
9984 (regsets_store_inferior_registers, linux_read_memory)
9985 (linux_write_memory): Inline `inferior_pid'.
9986 (linux_look_up_symbols): Adjust to use per-process
9987 `thread_db_active'.
9988 (linux_request_interrupt): Adjust to use ptids.
9989 (linux_read_auxv): Inline `inferior_pid'.
9990 (initialize_low): Don't reference thread_db_active.
9991 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
9992 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
9993 (ps_getpid): Return the pid of the current inferior.
9994 * thread-db.c (proc_handle, thread_agent): Delete.
9995 (thread_db_create_event, thread_db_enable_reporting): Adjust to
9996 per-process data.
9997 (find_one_thread): Change argument type to ptid_t. Adjust to
9998 per-process data.
9999 (maybe_attach_thread): Adjust to per-process data and ptids.
10000 (thread_db_find_new_threads): Ditto.
10001 (thread_db_init): Ditto.
10002 * spu-low.c (spu_create_inferior, spu_attach): Add process to
10003 processes table. Adjust to use ptids.
10004 (spu_kill, spu_detach): Adjust interface. Remove process from
10005 processes table.
10006 (spu_join, spu_thread_alive): Adjust interface.
10007 (spu_wait): Adjust interface. Remove process from processes
10008 table. Adjust to use ptids.
10009 * win32-low.c (current_inferior_tid): Delete.
10010 (current_inferior_ptid): New.
10011 (debug_event_ptid): New.
10012 (thread_rec): Take a ptid. Adjust.
10013 (child_add_thread): Add `pid' argument. Adjust to use ptids.
10014 (child_delete_thread): Ditto.
10015 (do_initial_child_stuff): Add `attached' argument. Add process to
10016 processes table.
10017 (child_fetch_inferior_registers, child_store_inferior_registers):
10018 Adjust.
10019 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
10020 (win32_attach): Pass 1 to do_initial_child_stuff.
10021 (win32_kill): Adjust interface. Remove process from processes
10022 table.
10023 (win32_detach): Ditto.
10024 (win32_join): Adjust interface.
10025 (win32_thread_alive): Take a ptid.
10026 (win32_resume): Adjust to use ptids.
10027 (get_child_debug_event): Ditto.
10028 (win32_wait): Adjust interface. Remove exiting process from
10029 processes table.
10030
bd99dc85
PA
100312009-04-01 Pedro Alves <pedro@codesourcery.com>
10032
10033 Non-stop mode support.
10034
10035 * server.h (non_stop): Declare.
10036 (gdb_client_data, handler_func): Declare.
10037 (delete_file_handler, add_file_handler, start_event_loop):
10038 Declare.
10039 (handle_serial_event, handle_target_event, push_event)
10040 (putpkt_notif): Declare.
10041 * target.h (enum resume_kind): New.
10042 (struct thread_resume): Replace `step' field by `kind' field.
10043 (TARGET_WNOHANG): Define.
10044 (struct target_ops) <wait>: Add `options' argument.
10045 <supports_non_stop, async, start_non_stop>: New fields.
10046 (target_supports_non_stop, target_async): New.
10047 (start_non_stop): Declare.
10048 (mywait): Add `options' argument.
10049 * target.c (mywait): Add `options' argument. Print child exit
10050 notifications here.
10051 (start_non_stop): New.
10052 * server.c (non_stop, own_buf, mem_buf): New globals.
10053 (struct vstop_notif): New.
10054 (notif_queue): New global.
10055 (queue_stop_reply, push_event, discard_queued_stop_replies)
10056 (send_next_stop_reply): New.
10057 (start_inferior): Adjust to use resume_kind. Adjust to mywait
10058 interface changes.
10059 (attach_inferior): In non-stop mode, don't wait for the target
10060 here.
10061 (handle_general_set): Handle QNonStop.
10062 (handle_query): When handling qC, return the current general
10063 thread, instead of the first thread of the list.
10064 (handle_query): If the backend supports non-stop mode, include
10065 QNonStop+ in the qSupported query response.
10066 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
10067 and non-stop mode.
10068 (handle_v_attach, handle_v_run): Handle non-stop mode.
10069 (handle_v_stopped): New.
10070 (handle_v_requests): Report support for vCont;t. Handle vStopped.
10071 (myresume): Adjust to use resume_kind. Handle non-stop.
10072 (queue_stop_reply_callback): New.
10073 (handle_status): Handle non-stop mode.
10074 (main): Clear non_stop flag on reconnection. Use the event-loop.
10075 Refactor serial protocol handling from here ...
10076 (process_serial_event): ... to this new function. When GDB
10077 selects any thread, select one here. In non-stop mode, wait until
10078 GDB acks all pending events before exiting.
10079 (handle_serial_event, handle_target_event): New.
10080 * remote-utils.c (remote_open): Install remote_desc in the event
10081 loop.
10082 (remote_close): Remove remote_desc from the event loop.
10083 (putpkt_binary): Rename to...
10084 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
10085 (putpkt_binary): New as wrapper around putpkt_binary_1.
10086 (putpkt_notif): New.
10087 (prepare_resume_reply): In non-stop mode, don't change the
10088 general_thread.
10089 * event-loop.c: New.
10090 * Makefile.in (OBJ): Add event-loop.o.
10091 (event-loop.o): New rule.
10092
10093 * linux-low.h (pid_of): Moved here.
10094 (lwpid_of): New.
10095 (get_lwp_thread): Use lwpid_of.
10096 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
10097 * linux-low.c (pid_of): Delete.
10098 (inferior_pid): Use lwpid_of.
10099 (linux_event_pipe): New.
10100 (target_is_async_p): New.
10101 (delete_lwp): New.
10102 (handle_extended_wait): Use lwpid_of.
10103 (add_lwp): Don't set lwpid field.
10104 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
10105 (linux_kill_one_lwp): If killing a running lwp, stop it first.
10106 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
10107 (linux_detach_one_lwp): If detaching from a running lwp, stop it
10108 first. Adjust to linux_wait_for_event interface changes. Use
10109 lwpid_of.
10110 (linux_detach): Don't delete the main lwp here.
10111 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
10112 (status_pending_p): Don't consider explicitly suspended lwps.
10113 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
10114 pointer. Add OPTIONS argument. Change return type to int. Use
10115 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
10116 (linux_wait_for_event): Take an integer pid instead of a lwp_info
10117 pointer. Add status pointer argument. Return a pid instead of a
10118 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
10119 changes. In non-stop mode, don't switch to a random thread.
10120 (linux_wait): Rename to...
10121 (linux_wait_1): ... this. Add target_options argument, and handle
10122 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
10123 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
10124 clean exit and signal exit code. Don't stop all threads in
10125 non-stop mode. In all-stop mode, only stop all threads when
10126 reporting a stop to GDB. Handle explicit thread stop requests.
10127 (async_file_flush, async_file_mark): New.
10128 (linux_wait): New.
10129 (send_sigstop): Use lwpid_of.
10130 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
10131 interface changes. In non-stop mode, don't switch to a random
10132 thread.
10133 (linux_resume_one_lwp): Use lwpid_of.
10134 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
10135 (linux_resume_one_thread): ... this. Handle resume_stop. In
10136 non-stop mode, don't look for pending flag in all threads.
10137 (resume_status_pending_p): Don't consider explicitly suspended
10138 threads.
10139 (my_waitpid): Reimplement. Emulate __WALL.
10140 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
10141 Use lwpid_of.
10142 (sigchld_handler, linux_supports_non_stop, linux_async)
10143 (linux_start_non_stop): New.
10144 (linux_target_ops): Register linux_supports_non_stop, linux_async
10145 and linux_start_non_stop.
10146 (initialize_low): Install SIGCHLD handler.
10147 * thread-db.c (thread_db_create_event, find_one_thread)
10148 (thread_db_get_tls_address): Use lwpid_of.
10149 * win32-low.c (win32_detach): Adjust to use resume_kind.
10150 (win32_wait): Add `options' argument.
10151 * spu-low.c (spu_resume): Adjust to use resume_kind.
10152 (spu_wait): Add `options' argument.
10153
5b1c542e
PA
101542009-04-01 Pedro Alves <pedro@codesourcery.com>
10155
10156 Decouple target code from remote protocol.
10157
10158 * target.h (enum target_waitkind): New.
10159 (struct target_waitstatus): New.
10160 (struct target_ops) <wait>: Return an unsigned long. Take a
10161 target_waitstatus pointer instead of a char pointer.
10162 (mywait): Likewise.
10163 * target.c (mywait): Change prototype to return an unsigned long.
10164 Take a target_waitstatus pointer instead of a char pointer. Adjust.
10165 * server.h (thread_from_wait, old_thread_from_wait): Delete
10166 declarations.
10167 (prepare_resume_reply): Change prototype to take a
10168 target_waitstatus.
10169 * server.c (thread_from_wait, old_thread_from_wait): Delete.
10170 (last_status, last_ptid): New.
10171 (start_inferior): Remove "statusptr" argument. Adjust. Return a
10172 pid instead of a signal.
10173 (attach_inferior): Remove "status" and "signal" parameters.
10174 Adjust.
10175 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
10176 not as an address.
10177 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
10178 (handle_v_requests, myresume): Remove "status" and "signal"
10179 parameters. Adjust.
10180 (handle_status): New.
10181 (main): Delete local `status'. Adjust.
10182 * remote-utils.c: Include target.h.
10183 (prepare_resume_reply): Change prototype to take a
10184 target_waitstatus. Adjust.
10185
10186 * linux-low.c (linux_wait): Adjust to new target_ops->wait
10187 interface.
10188 * spu-low.c (spu_wait): Adjust.
10189 * win32-low.c (enum target_waitkind, struct target_waitstatus):
10190 Delete.
10191 (win32_wait): Adjust.
10192
2bd7c093
PA
101932009-04-01 Pedro Alves <pedro@codesourcery.com>
10194
10195 * target.h (struct thread_resume): Delete leave_stopped member.
10196 (struct target_ops): Add a `n' argument to the `resume' callback.
10197 * server.c (start_inferior): Adjust.
10198 (handle_v_cont, myresume): Adjust.
10199 * linux-low.c (check_removed_breakpoint): Adjust to resume
10200 interface change, and to removed leave_stopped field.
10201 (resume_ptr): Delete.
10202 (struct thread_resume_array): New.
10203 (linux_set_resume_request): Add new `arg' parameter. Adjust to
10204 resume interface change.
10205 (linux_continue_one_thread, linux_queue_one_thread)
10206 (resume_status_pending_p): Check if the resume field is NULL
10207 instead of checking the leave_stopped member.
10208 (linux_resume): Adjust to the target resume interface change.
10209 * spu-low.c (spu_resume): Adjust to the target resume interface
10210 change.
10211 * win32-low.c (win32_detach, win32_resume): Ditto.
10212
c35fafde
PA
102132009-04-01 Pedro Alves <pedro@codesourcery.com>
10214
10215 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
10216 flag.
10217 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
10218 pending.
10219 (linux_continue_one_thread): Only preserve the stepping flag if
10220 there's a pending breakpoint.
10221
0a59d50b
PA
102222009-03-31 Pedro Alves <pedro@codesourcery.com>
10223
10224 * server.c (main): After the inferior having exited, call
10225 remote_close before exiting gdbserver.
10226
f04c6d38
TJB
102272009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
10228
10229 Fix size of FPSCR in Power 7 processors.
10230 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
10231 (PPC_FEATURE_HAS_DFP): New #define.
10232 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
10233 size of the FPSCR.
10234
78e5cee6
PA
102352009-03-23 Pedro Alves <pedro@codesourcery.com>
10236
10237 * server.c (handle_query) Whitespace and formatting.
10238
1b3f6016
PA
102392009-03-22 Pedro Alves <pedro@codesourcery.com>
10240
10241 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
10242 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
10243 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
10244 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
10245 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
10246 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
10247 Makefile.in, configure.ac: Fix whitespace throughout.
10248 * configure: Regenerate.
10249
a07b2135
PA
102502009-03-22 Pedro Alves <pedro@codesourcery.com>
10251
10252 * inferiors.c (find_inferior): Make it safe for the callback
10253 function to delete the currently iterated inferior.
10254
67cc2626
PA
102552009-03-22 Pedro Alves <pedro@codesourcery.com>
10256
10257 * Makefile.in (linuw_low_h): Move higher.
10258 (thread-db.o): Depend on $(linux_low_h).
10259
54a0b537
PA
102602009-03-17 Pedro Alves <pedro@codesourcery.com>
10261
10262 Rename "process" to "lwp" throughout.
10263
10264 * linux-low.c (all_processes): Rename to...
10265 (all_lwps): ... this.
10266 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
10267 (add_process): Rename to ...
10268 (add_lwp): ... this. Adjust.
10269 (linux_create_inferior): Adjust.
10270 (linux_attach_lwp): Adjust.
10271 (linux_attach): Adjust.
10272 (linux_kill_one_process): Rename to ...
10273 (linux_kill_one_lwp): ... this. Adjust.
10274 (linux_kill): Adjust.
10275 (linux_detach_one_process): Rename to ...
10276 (linux_detach_one_lwp): ... this. Adjust.
10277 (linux_detach): Adjust.
10278 (check_removed_breakpoint): Adjust.
10279 (status_pending_p): Adjust.
10280 (linux_wait_for_process): Rename to ...
10281 (linux_wait_for_lwp): ... this. Adjust.
10282 (linux_wait_for_event): Adjust.
10283 (send_sigstop): Adjust.
10284 (wait_for_sigstop): Adjust.
10285 (stop_all_processes): Rename to ...
10286 (stop_all_lwps): ... this.
10287 (linux_resume_one_process): Rename to ...
10288 (linux_resume_one_lwp): ... this. Adjust.
10289 (linux_set_resume_request, linux_continue_one_thread)
10290 (linux_queue_one_thread, resume_status_pending_p)
10291 (usr_store_inferior_registers, regsets_store_inferior_registers)
10292 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
10293 Adjust.
10294 * linux-low.h (get_process): Rename to ...
10295 (get_lwp): ... this. Adjust.
10296 (get_thread_process): Rename to ...
10297 (get_thread_lwp): ... this. Adjust.
10298 (get_process_thread): Rename to ...
10299 (get_lwp_thread): ... this. Adjust.
10300 (struct process_info): Rename to ...
10301 (struct lwp_info): ... this.
10302 (all_processes): Rename to ...
10303 (all_lwps): ... this.
10304 * proc-service.c (ps_lgetregs): Adjust.
10305 * thread-db.c (thread_db_create_event, find_one_thread)
10306 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
10307
0b16c5cf
PA
103082009-03-14 Pedro Alves <pedro@codesourcery.com>
10309
10310 * server.c (handle_query): Handle "qAttached".
10311
32de4b9d
NS
103122009-03-13 Nathan Sidwell <nathan@codesourcery.com>
10313
10314 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
10315 GPLv3, update license URL.
10316
2aecd87f
DE
103172009-03-01 Doug Evans <dje@google.com>
10318
93efd302 10319 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
10320 (server_h): Add gdb_signals.h.
10321 (signals.o): Update.
10322 * server.h (target_signal_from_host,target_signal_to_host_p)
10323 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
10324
86b1f9c5
PM
103252009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
10326
10327 * remote-utils.c (getpkt): Also generate remote-debug
10328 information if noack_mode is set.
10329
4aa995e1
PA
103302009-02-06 Pedro Alves <pedro@codesourcery.com>
10331
10332 * server.c (handle_query): Report qXfer:siginfo:read and
10333 qXfer:siginfo:write as supported and handle them.
10334 * target.h (struct target_ops) <qxfer_siginfo>: New field.
10335 * linux-low.c (linux_xfer_siginfo): New.
10336 (linux_target_ops): Set it.
10337
62709adf
PA
103382009-01-26 Pedro Alves <pedro@codesourcery.com>
10339
10340 * server.c (gdbserver_usage): Mention --remote-debug.
10341 (main): Accept '--remote-debug' switch.
10342
aef93bd7
DE
103432009-01-18 Doug Evans <dje@google.com>
10344
10345 * regcache.c (new_register_cache): No need to check result of xcalloc.
10346 * server.c (handle_search_memory): Back out calls to xmalloc,
10347 result is checked and error is returned to user upon failure.
10348 (handle_query): Ditto. Add more checks for result of malloc.
10349 (handle_v_cont): Check result of malloc, report error back to
10350 user upon failure.
10351 (handle_v_run): Ditto. Call freeargv.
10352 * server.h (freeargv): Declare.
10353 * utils.c (freeargv): New fn.
10354
54363045
DE
103552009-01-15 Doug Evans <dje@google.com>
10356
f626972c
DE
10357 * gdbreplay.c (perror_with_name): Make arg const char *.
10358 * server.h (target_signal_to_name): Make return type const char *.
0842e787 10359 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 10360 * utils.c (perror_with_name): Make arg const char *.
54363045 10361
18aae699
PA
103622009-01-14 Pedro Alves <pedro@codesourcery.com>
10363
10364 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
10365 when handling a EXIT_PROCESS_DEBUG_EVENT.
10366
ff703abe
JB
103672009-01-06 Joel Brobecker <brobecker@adacore.com>
10368
10369 * gdbreplay.c (gdbreplay_version): Update copyright year.
10370 * server.c (gdbserver_version): Likewise.
10371
f21cc1a2 103722009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
10373
10374 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 10375 (handle_extended_wait): Improve comment.
0e21c1ec 10376
bca929d3
DE
103772008-12-13 Doug Evans <dje@google.com>
10378
10379 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
10380 * server.h (ATTR_MALLOC): New macro.
10381 (xmalloc,xcalloc,xstrdup): Declare.
10382 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
10383 * inferiors.c: Ditto.
10384 * linux-low.c: Ditto.
10385 * mem-break.c: Ditto.
10386 * regcache.c: Ditto.
10387 * remote-utils.c: Ditto.
10388 * server.c: Ditto.
10389 * target.c: Ditto.
10390 * win32-low.c: Ditto.
10391
97438e3f
DE
103922008-12-12 Doug Evans <dje@google.com>
10393
896c7fbb
DE
10394 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
10395 in debugging printf.
10396
97438e3f
DE
10397 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
10398
e3b886f8
DE
103992008-12-09 Doug Evans <dje@google.com>
10400
10401 * linux-low.h (struct process_info): Delete member tid, unused.
10402 * thread-db.c (find_one_thread): Update.
10403 (maybe_attach_thread): Update.
10404
07e059b5
VP
104052008-12-02 Pedro Alves <pedro@codesourcery.com>
10406
889bf7c5
PA
10407 * target.h (struct target_ops): Add qxfer_osdata member.
10408 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
10409 and dirent.h.
10410 (linux_qxfer_osdata): New functions.
10411 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
10412 callback.
10413 * server.c (handle_query): Handle "qXfer:osdata:read:".
10414 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
10415 (buffer_xml_printf): New functions.
10416 * server.h (struct buffer): New.
10417 (buffer_grow_str, buffer_grow_str0): New macros.
10418 (buffer_grow, buffer_free, buffer_init, buffer_finish)
10419 (buffer_xml_printf): Declare.
07e059b5 10420
4cab47ab
DE
104212008-11-24 Doug Evans <dje@google.com>
10422
10423 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
10424
f142445f
DJ
104252008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
10426
10427 * server.c (handle_v_run): Always use the supplied argument list.
10428
d0107bb6 104292008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 10430
d0107bb6
BW
10431 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
10432 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 10433
2c4ad781
TJB
104342008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
10435
10436 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
10437 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
10438 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
10439 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
10440 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
10441 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
10442 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
10443 XML target descriptions.
10444 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
10445 when inferior is running on an ISA 2.05 or later processor. Add
10446 special case to return offset for full 64-bit slot of FPSCR when
10447 in 32-bits.
10448
dfb64f85
DJ
104492008-11-14 Daniel Gutson <dgutson@codesourcery.com>
10450
10451 * Makefile.in (SFILES, clean): Added sparc64 files.
10452 (reg-sparc64.o, reg-sparc64.c): New.
10453 * configure.srv (sparc*-*-linux*): New configuration.
10454 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
10455 syscall arguments for SPARC.
10456 (regsets_store_inferior_registers): Likewise.
10457 * linux-sparc-low.c: New file.
10458
66b6e1dd
DE
104592008-10-21 Doug Evans <dje@google.com>
10460
10461 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
10462 (READLINE_DIR,READLINE_DEP): Delete.
10463 (INTERNAL_CFLAGS): Update.
10464 (LINTFLAGS): Update.
10465
9b710a42
PA
104662008-10-10 Pedro Alves <pedro@codesourcery.com>
10467
10468 * server.c (handle_v_run): If GDB didn't specify an argv, use the
10469 whole argv from the last run, not just argv[0].
10470
5822d809
PA
104712008-09-08 Pedro Alves <pedro@codesourcery.com>
10472
10473 * regcache.c (new_register_cache): Return NULL if the register
10474 cache size isn't known yet.
10475 (free_register_cache): Avoid dereferencing a NULL regcache.
10476
74aac56f
DJ
104772008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
10478
10479 * configure.srv: Merge MIPS and MIPS64.
10480
400b20f5
MR
104812008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
10482
10483 * Makefile.in (uninstall): Apply $(EXEEXT) too.
10484
677c5bb1
LM
104852008-08-18 Luis Machado <luisgpm@br.ibm.com>
10486
10487 * Makefile.in: Add required vsx dependencies.
10488
10489 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
10490 Declare init_registers_powerpc_vsx32l.
10491 Declare init_registers_powerpc_vsx64l.
10492 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
10493 (ppc_arch_setup): Check for VSX in hwcap.
10494 (ppc_fill_vsxregset): New function.
10495 (ppc_store_vsxregset): New function.
10496 Add new VSX entry in regset_info target_regsets.
10497
10498 * configure.srv: Add new VSX dependencies.
10499
a6f3e723
SL
105002008-08-12 Pedro Alves <pedro@codesourcery.com>
10501
10502 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
10503 (remote_open): Set or clear transport_is_reliable.
10504 (putpkt_binary): Don't expect acks in noack mode.
10505 (getpkt): Don't send ack/nac in noack mode.
10506 * server.c (handle_general_set): Handle QStartNoAckMode.
10507 (handle_query): If connected by tcp pass QStartNoAckMode+ in
10508 qSupported.
10509 (main): Reset noack_mode on every connection.
10510 * server.h (noack_mode): Declare.
10511
a417dc56
RW
105122008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
10513
10514 * Makefile.in (GDBREPLAY_OBS): New variable.
10515 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
10516
3221518c
UW
105172008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
10518 Daniel Jacobowitz <dan@codesourcery.com>
10519
10520 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
10521 (usr_store_inferior_registers): Likewise.
10522 (regsets_store_inferior_registers): Likewise.
10523
ec56be1b
PA
105242008-07-31 Rolf Jansen <rj@surtec.com>
10525 Pedro Alves <pedro@codesourcery.com>
10526
10527 * configure.ac: Check for memmem declaration.
10528 * server.c [HAVE_MALLOC_H]: Include malloc.h.
10529 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
10530 (disable_packet_qfThreadInfo): Unconditionally compile.
10531 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
10532 * configure, config.in: Regenerate.
10533
2fe5e3ff
DE
105342008-07-28 Doug Kwan <dougkwan@google.com>
10535
10536 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
10537 (linux_write_memory): Remove declaration of errno.
10538
836acd6d
UW
105392008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
10540
10541 * linux-low.c (handle_extended_wait): Do not use "status"
10542 variable uninitialized.
10543
aeba519e
PA
105442008-07-07 Pedro Alves <pedro@codesourcery.com>
10545
10546 * server.c (handle_v_attach): Inhibit reporting dll changes.
10547
db42f210
PA
105482008-06-27 Pedro Alves <pedro@codesourcery.com>
10549
10550 * remote-utils.c (prepare_resume_reply): If requested, don't
10551 output "thread:TID" in the T stop reply.
10552
10553 * server.c (disable_packet_vCont, disable_packet_Tthread)
10554 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
10555 (handle_query): If requested, disable support for qC, qfThreadInfo
10556 and qsThreadInfo.
10557 (handle_v_requests): If requested, disable support for vCont.
10558 (gdbserver_show_disableable): New.
10559 (main): Handle --disable-packet and --disable-packet=LIST.
10560
10561 * server.h (disable_packet_vCont, disable_packet_Tthread)
10562 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
10563
8e4c5421
CD
105642008-06-20 Carlos O'Donell <carlos@codesourcery.com>
10565
10566 * server.c (gdbserver_usage): Mention --version.
10567
6e23a804
DJ
105682008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
10569
10570 * Makefile.in (gdbreplay.o): New rule.
10571
90aa6a40
JM
105722008-06-06 Joseph Myers <joseph@codesourcery.com>
10573
10574 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
10575 message, not gdbserver.
10576
c16158bc 105772008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
10578 Nathan Sidwell <nathan@codesourcery.com>
10579 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
10580
10581 * acinclude.m4: Include ../../config/acx.m4.
10582 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
10583 * configure, config.in: Regenerate.
10584 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
10585 * server.c (gdbserver_version): Print PKGVERSION.
10586 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
10587 (main): Adjust gdbserver_usage calls.
10588 * gdbreplay.c (version, host_name): Add declarations.
10589 (gdbreplay_version, gdbreplay_usage): New.
10590 (main): Accept --version and --help options.
10591
aeb75bf5
DJ
105922008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
10593
10594 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
10595 (arm_breakpoint_at): Handle Thumb.
10596 (the_low_target): Add comment.
10597
76b233dd
UW
105982008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
10599
10600 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
10601
08388c79
DE
106022008-05-09 Doug Evans <dje@google.com>
10603
a3c83fae
DE
10604 * server.h (decode_search_memory_packet): Declare.
10605 * remote-utils.c (decode_search_memory_packet): New fn.
10606 * server.c (handle_search_memory_1): New fn.
08388c79
DE
10607 (handle_search_memory): New fn.
10608 (handle_query): Process qSearch:memory packets.
10609
bb9c3d36
UW
106102008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
10611
10612 * regcache.c (registers_length): Remove.
10613 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
10614 full register packet.
10615 * regcache.h (registers_length): Remove prototype.
10616 * server.h (PBUFSIZ): Define to 16384.
10617
7284e1be
UW
106182008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
10619
10620 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
10621 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
10622 powerpc-64l.o, and powerpc-altivec64l.o.
10623 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
10624 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
10625 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
10626 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
10627 rs6000/power-linux.xml, and rs6000/power64-linux.xml
10628 to srv_xmlfiles.
10629
10630 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
10631 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
10632 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
10633 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
10634 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
10635 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
10636 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
10637 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
10638 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
10639 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
10640 (clean): Update.
10641
10642 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
10643 (init_registers_powerpc_32l): ... this new prototype.
10644 (init_registers_powerpc_32): Remove, replace by ...
10645 (init_registers_powerpc_altivec32l): ... this new prototype.
10646 (init_registers_powerpc_e500): Remove, replace by ...
10647 (init_registers_powerpc_e500l): ... this new prototype.
10648 (init_registers_ppc64): Remove, replace by ...
10649 (init_registers_powerpc_64l): ... this new prototype.
10650 (init_registers_powerpc_64): Remove, replace by ...
10651 (init_registers_powerpc_altivec64l): ... this new prototype.
10652 (ppc_num_regs): Set to 73.
10653 (PT_ORIG_R3, PT_TRAP): Define if necessary.
10654 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
10655 (ppc_cannot_store_register): Handle orig_r3 and trap.
10656 (ppc_arch_setup): Update init_registers_... calls.
10657 (ppc_fill_gregset): Handle orig_r3 and trap.
10658
10659 * inferiors.c (clear_inferiors): Reset current_inferior.
10660
fdc59709
PB
106612008-04-23 Paolo Bonzini <bonzini@gnu.org>
10662
889bf7c5
PA
10663 * acinclude.m4: Add override.m4.
10664 * configure: Regenerate.
fdc59709 10665
c9b2f845
UW
106662008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
10667
10668 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
10669 initial call to init_register_ppc64.
10670
550512b8
UW
106712008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
10672
43aaf8b6
PA
10673 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
10674 single powerpc*-*-linux* case.
550512b8
UW
10675 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
10676
b6430ec3
UW
106772008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
10678
10679 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 10680 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
10681 from reg_xmlfiles.
10682 * linux-ppc-low.c: Include <elf.h>.
10683 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
10684 (ppc_hwcap): New global variable.
10685 (ppc_regmap): Remove __SPE__ #ifdef sections.
10686 (ppc_regmap_e500): New global variable.
10687 (ppc_cannot_store_register): Update __SPE__ special case.
10688 (ppc_get_hwcap): New function.
10689 (ppc_arch_setup): Use it to determine whether inferior supports
10690 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
10691 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
10692 Do not access registers if target does not support AltiVec.
10693 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
10694 Do not access registers if target does not support SPE.
10695 (target_regsets): Unconditionally include AltiVec and SPE regsets.
10696
52fa2412
UW
106972008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
10698
10699 * linux-low.c (disabled_regsets, num_regsets): New.
10700 (use_regsets_p): Delete.
10701 (linux_wait_for_process): Clear disabled_regsets.
10702 (regsets_fetch_inferior_registers): Check and set it.
10703 (regsets_store_inferior_registers): Likewise.
10704 (linux_fetch_registers, linux_store_registers): Do not use
10705 use_regsets_p.
10706 (initialize_low): Allocate disabled_regsets.
10707
e28b3332
DJ
107082008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
10709
10710 * Makefile.in (LIBOBJS): New.
10711 (OBS): Use LIBOBJS.
10712 (memmem.o): New rule.
10713 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
10714 * configure: Regenerated.
10715
4536995d
UW
107162008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
10717
10718 * server.c (handle_query): Never return "unsupported" for
10719 qXfer:features:read queries.
10720
221c031f
UW
107212008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
10722
10723 * server.c (get_features_xml): Fix inverted condition.
10724 (handle_query): Always support qXfer:feature:read.
10725
ccd213ac
DJ
107262008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
10727
10728 * server.c (wrapper_argv): New.
10729 (start_inferior): Handle wrapper_argv. If set, expect an extra
10730 trap.
10731 (gdbserver_usage): Document --wrapper.
10732 (main): Parse --wrapper.
10733
6fe305f7
UW
107342008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10735
10736 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
10737 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
10738 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
10739 (ppc_set_pc): Likewise.
10740 (ppc_arch_setup): New function.
10741 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
10742 of collect_register.
889bf7c5 10743 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 10744
5b0a002e
UW
107452008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10746
10747 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
10748 instead of linux-ppc64-low.o.
10749 * linux-ppc64-low.c: Remove file.
10750 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
10751 (linux-ppc64-low.o): Remove rule.
10752
10753 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
10754 (init_registers_powerpc_64): Likewise.
10755 (ppc_regmap): Conditionally define depending on __powerpc64__.
10756 (ppc_cannot_store_register): Do not special-case "fpscr" when
10757 compiled on __powerpc64__.
10758 (ppc_collect_ptrace_register): New function.
10759 (ppc_supply_ptrace_register): New function.
10760 (ppc_breakpoint): Change type to "unsigned int".
10761 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
10762 (the_low_target): Conditionally provide initializers for the
889bf7c5 10763 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
10764 collect_ptrace_register and supply_ptrace_register members.
10765
9b4b61c8
UW
107662008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10767
10768 * regcache.h (gdbserver_xmltarget): Add extern declaration.
10769 * server.c (gdbserver_xmltarget): Define.
10770 (get_features_xml): Use it to replace "target.xml" and arch_string.
10771
10772 * configure.srv: Remove srv_xmltarget. Add XML files that were
10773 mentioned there to srv_xmlfiles instead. Remove conditional tests
10774 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
10775 srv_xmlfiles and srv_regobj to include all possible choices.
10776 * configure.ac (srv_xmltarget): Remove.
10777 (srv_xmlfiles): Do not add "target.xml".
10778 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
10779 checks for supplementary target information.
10780 * configure: Regenerate.
10781 * Makefile.in (XML_TARGET): Remove.
10782 (target.xml): Remove rule.
10783 (clean): Do not clean up target.xml.
10784 (.PRECIOUS): Do not mention target.xml.
10785
10786 * target.h (struct target_ops): Remove arch_string member.
10787 * linux-low.c (linux_arch_string): Remove.
10788 (linux_target_ops): Remove arch_string initializer.
10789 * linux-low.h (struct linux_target_ops): Remove arch_string member.
10790 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
10791 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
10792 * spu-low.c (spu_arch_string): Remove.
10793 (spu_target_ops): Remove arch_string initializer.
10794 * win32-low.c (win32_arch_string): Remove.
10795 (win32_target_ops): Remove arch_string initializer.
10796 * win32-low.h (struct win32_target_ops): Remove arch_string member.
10797 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
10798 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
10799
ee1a7ae4
UW
108002008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
10801
10802 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
10803 by collect_ptrace_register and supply_ptrace_register hooks.
10804 * linux-low.c (fetch_register): Use supply_ptrace_register callback
10805 instead of checking for the_low_target.left_pad_xfer.
10806 (usr_store_inferior_registers): Use collect_ptrace_register callback
10807 instead of checking for the_low_target.left_pad_xfer.
10808
10809 * linux-s390-low.c (s390_collect_ptrace_register): New function.
10810 (s390_supply_ptrace_register): Likewise.
10811 (s390_fill_gregset): Call s390_collect_ptrace_register.
10812 (the_low_target): Update.
10813
10814 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
10815 (ppc_supply_ptrace_register): Likewise.
10816 (the_low_target): Update.
10817
10818 * linux-i386-low.c (the_low_target): Update.
10819 * linux-x86-64-low.c (the_low_target): Update.
10820
d61ddec4
UW
108212008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
10822
10823 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
10824 reg-s390.o and reg-s390x.o.
10825
10826 * linux-low.c (new_inferior): New global variable.
10827 (linux_create_inferior, linux_attach): Set it.
10828 (linux_wait_for_process): Call the_low_target.arch_setup after the
10829 target has stopped for the first time.
10830 (initialize_low): Do not call the_low_target.arch_setup.
10831
10832 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
10833 (s390_set_pc): Likewise.
10834 (s390_arch_setup): New function.
10835 (the_low_target): Use s390_arch_setup as arch_setup routine.
10836
10837 * regcache.c (realloc_register_cache): New function.
10838 (set_register_cache): Call it for each existing regcache.
10839
d05b4ac3
UW
108402008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
10841
10842 * server.h (init_registers): Remove prototype.
10843
10844 * linux-low.h (struct linux_target_ops): Add arch_setup field.
10845 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
10846 instead of init_registers ().
10847 * linux-arm-low.c (init_registers_arm): Add prototype.
10848 (init_registers_arm_with_iwmmxt): Likewise.
10849 (the_low_target): Add initializer for arch_setup field.
10850 * linux-cris-low.c (init_registers_cris): Add prototype.
10851 (the_low_target): Add initializer for arch_setup field.
10852 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
10853 (the_low_target): Add initializer for arch_setup field.
10854 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
10855 (the_low_target): Add initializer for arch_setup field.
10856 * linux-ia64-low.c (init_registers_ia64): Add prototype.
10857 (the_low_target): Add initializer for arch_setup field.
10858 * linux-m32r-low.c (init_registers_m32r): Add prototype.
10859 (the_low_target): Add initializer for arch_setup field.
10860 * linux-m68k-low.c (init_registers_m68k): Add prototype.
10861 (the_low_target): Add initializer for arch_setup field.
10862 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
10863 (init_registers_mips64_linux): Likewise.
10864 (the_low_target): Add initializer for arch_setup field.
10865 * linux-ppc-low.c (init_registers_ppc): Add prototype.
10866 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
10867 (the_low_target): Add initializer for arch_setup field.
10868 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
10869 (init_registers_powerpc_64): Likewise.
10870 (the_low_target): Add initializer for arch_setup field.
10871 * linux-s390-low.c (init_registers_s390): Add prototype.
10872 (init_registers_s390x): Likewise.
10873 (the_low_target): Add initializer for arch_setup field.
10874 * linux-sh-low.c (init_registers_sh): Add prototype.
10875 (the_low_target): Add initializer for arch_setup field.
10876 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
10877 (the_low_target): Add initializer for arch_setup field.
10878 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
10879 (the_low_target): Add initializer for arch_setup field.
10880
10881 * win32-low.h (struct win32_target_ops): Add arch_setup field.
10882 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
10883 instead of init_registers ().
10884 * win32-arm-low.c (init_registers_arm): Add prototype.
10885 (the_low_target): Add initializer for arch_setup field.
10886 * win32-i386-low.c (init_registers_i386): Add prototype.
10887 (the_low_target): Add initializer for arch_setup field.
10888
10889 * spu-low.c (init_registers_spu): Add prototype.
10890 (initialize_low): Call initialie_registers_spu () instead of
10891 initialize_registers ().
10892
fd96d250
PA
108932008-02-19 Pedro Alves <pedro@codesourcery.com>
10894
10895 * server.c (handle_v_requests): When handling the vRun and vAttach
10896 packets, if already debugging a process, don't kill it. Return an
10897 error instead.
10898
d41b6bb4
DJ
108992008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
10900
10901 * server.c (handle_query): Correct length check.
10902
5ac588cf
PA
109032008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
10904
10905 * win32-low.c (do_initial_child_stuff): Add process handle
10906 parameter. Set current_process_handle and current_process_id from the
10907 parameters. Clear globals.
10908 (win32_create_inferior): Don't set current_process_handle and
10909 current_process_id here. Instead pass them on the call to
10910 do_initial_child_stuff.
10911 (win32_attach): Likewise.
10912 (win32_clear_inferiors): New.
10913 (win32_kill): Don't close the current process handle or the
10914 current thread handle here. Instead call win32_clear_inferiors.
10915 (win32_detach): Don't open a new handle to the process. Call
10916 win32_clear_inferiors.
10917 (win32_join): Don't rely on current_process_handle; open a new
10918 handle using the process id.
10919 (win32_wait): Call win32_clear_inferiors when the inferior process
10920 has exited.
10921
ecd7ecbc
DJ
109222008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
10923
10924 * server.c (monitor_show_help): Add "exit".
10925
1525d545
MG
109262008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
10927
ecd7ecbc 10928 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
10929 (clean): Add reg-xtensa.c.
10930 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
10931 * configure.srv (xtensa*-*-linux*) New target.
10932 * linux-xtensa-low.c: New.
10933 * xtensa-xtregs.c: New.
1525d545 10934
59a016f0
PA
109352008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
10936
10937 * hostio.c: Don't include errno.h.
10938 (errno_to_fileio_errno): Move to hostio-errno.
10939 * hostio.c: (hostio_error): Remove the error parameter. Defer the
10940 error number outputting to the target->hostio_last_error callback.
10941 (hostio_packet_error): Use FILEIO_EINVAL directly.
10942 (handle_open, handle_pread, hostio_error, handle_unlink): Update
10943 calls to hostio_error.
10944 * hostio-errno.c: New.
10945 * server.h (hostio_last_error_from_errno): Declare.
10946 * target.h (target_ops): Add hostio_last_error member.
10947 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
10948 as hostio_last_error handler.
889bf7c5 10949 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
10950 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
10951 (wince_hostio_last_error): New functions.
10952 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
10953 as hostio_last_error handler.
10954 (win32_target_ops) [!_WIN32_WCE]: Register
10955 hostio_last_error_from_errno as hostio_last_error handler.
10956 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
10957 (hostio-errno.o): New rule.
10958 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
10959 * configure.srv (srv_hostio_err_objs): New variable. Default to
10960 hostio-errno.o.
10961 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
10962 * configure: Regenerate.
10963
2d717e4f
DJ
109642008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
10965
10966 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
10967 (linux_kill, linux_detach): Clean up the process list.
10968 * remote-utils.c (remote_open): Improve port number parsing.
10969 (putpkt_binary, input_interrupt): Only send interrupts if the target
10970 is running.
10971 * server.c (extended_protocol): Make static.
10972 (attached): Define earlier.
10973 (exit_requested, response_needed, program_argv): New variables.
10974 (target_running): New.
10975 (start_inferior): Clear attached here.
10976 (attach_inferior): Set attached here.
10977 (require_running): Define.
10978 (handle_query): Use require_running and target_running. Implement
10979 "monitor exit".
10980 (handle_v_attach, handle_v_run): New.
10981 (handle_v_requests): Use require_running. Handle vAttach and vRun.
10982 (gdbserver_usage): Update.
10983 (main): Redo argument parsing. Handle --debug and --multi. Handle
10984 --attach along with other options or after the port. Save
10985 program_argv. Support no initial program. Resynchronize
10986 communication with GDB after an error. Handle "monitor exit".
10987 Use require_running and target_running. Always allow the extended
10988 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
10989 restart in extended mode.
10990 * README: Refer to the GDB manual. Update --attach usage.
10991
7407e2de
AS
109922007-12-20 Andreas Schwab <schwab@suse.de>
10993
10994 * linux-low.c (STACK_SIZE): Define.
10995 (linux_tracefork_child): Use it. Use __clone2 on ia64.
10996 (linux_test_for_tracefork): Likewise.
10997
b65d95c5
DJ
109982007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
10999
11000 * linux-low.c (linux_wait_for_event): Update messages. Do not
11001 reinsert auto-delete breakpoints.
11002 * mem-break.c (struct breakpoint): Change return type of handler to
11003 int.
11004 (set_breakpoint_at): Update handler type.
11005 (reinsert_breakpoint_handler): Return 1 instead of calling
11006 delete_breakpoint.
11007 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
11008 setting a new one.
11009 (check_breakpoints): Delete auto-delete breakpoints and return 2.
11010 * mem-break.h (set_breakpoint_at): Update handler type.
11011 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
11012 * win32-low.c (auto_delete_breakpoint): New.
11013 (get_child_debug_event): Use it.
11014
4e799345
DJ
110152007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
11016
11017 * configure.ac: Check for pread and pwrite.
11018 * hostio.c (handle_pread): Fall back to lseek and read.
11019 (handle_pwrite): Fall back to lseek and write.
11020 * config.in, configure: Regenerated.
11021
27524b67
DJ
110222007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
11023
11024 * server.c (myresume): Add own_buf argument.
11025 (main): Update calls.
11026
a20d5e98
DJ
110272007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
11028
11029 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
11030 * remote-utils.c (remote_open): Do not call disable_async_io.
11031 (block_async_io): Delete.
11032 (unblock_async_io): Make static.
11033 (initialize_async_io): New.
11034 * server.c (handle_v_cont): Handle async I/O here.
11035 (myresume): Likewise. Move other common resume tasks here...
11036 (main): ... from here. Call initialize_async_io. Disable async
11037 I/O before the main loop.
11038 * server.h (initialize_async_io): Declare.
11039 (block_async_io, unblock_async_io): Delete prototypes.
11040 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
11041
b79d787e
DJ
110422007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
11043
11044 * remote-utils.c (readchar): Allow binary data in received messages.
11045
d97903b2
PA
110462007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11047
11048 * win32-low.c (attaching): New global.
11049 (win32_create_inferior): Clear the `attaching' global.
11050 (win32_attach): Set the `attaching' global.
11051 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
11052 attaching. Only set a breakpoint at the entry point if not
11053 attaching.
11054
311de423
PA
110552007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11056
11057 * server.c (main): Don't report dll events on the initial
11058 connection on attaches.
11059
6c2d16d2
PA
110602007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11061
11062 * server.c (main): Relax numerical bases supported for the pid of
11063 the --attach command line argument.
11064
5ca906e6
PA
110652007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11066
11067 * win32-low.c (win32_attach): Call OpenProcess before
11068 DebugActiveProcess, not after. Add last error output to error
11069 call.
11070
9c6c8194
PA
110712007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11072
11073 * win32-low.c (win32_get_thread_context)
11074 (win32_set_thread_context): New functions.
11075 (thread_rec): Use win32_get_thread_context.
11076 (continue_one_thread, win32_resume): Use win32_set_thread_context.
11077 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
11078 field.
11079
4d5d1aaa
PA
110802007-12-03 Leo Zayas
11081 Pedro Alves <pedro_alves@portugalmail.pt>
11082
11083 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
11084 global variables.
11085 (child_add_thread): Minor cleanup.
11086 (child_continue): Resume artificially suspended threads before
11087 calling ContinueDebugEvent.
11088 (suspend_one_thread): New.
11089 (fake_breakpoint_event): New.
11090 (get_child_debug_event): Change return type to int. Check here if
11091 gdb sent an interrupt request. If a soft interrupt was requested,
11092 fake a breakpoint event. Return 0 if there is no event to handle,
11093 and 1 otherwise.
11094 (win32_wait): Don't check here if gdb sent an interrupt request.
11095 Ensure there is a valid event to handle.
11096 (win32_request_interrupt): Add soft interruption method as last
11097 resort.
11098
c436e841
PA
110992007-12-03 Leo Zayas
11100 Pedro Alves <pedro_alves@portugalmail.pt>
11101
11102 * win32-low.h (win32_thread_info): Add descriptions to the
11103 structure members. Replace `suspend_count' counter by a
11104 `suspended' flag.
11105 * win32-low.c (thread_rec): Update condition of when to get the
11106 context from the inferior. Rely on ContextFlags being set if it
11107 has already been retrieved. Only suspend the inferior thread if
11108 we haven't already. Warn if that fails.
11109 (continue_one_thread): s/suspend_count/suspended/. Only call
11110 ResumeThread once. Warn if that fails.
11111
e7b5fa67
PA
111122007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
11113
11114 * win32-low.c (win32_wait): Don't read from the inferior when it
11115 has already exited.
11116
a385171d
PA
111172007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
11118
11119 * Makefile.in (win32_low_h): New variable.
11120 (win32-low.o): Add dependency on $(win32_low_h).
11121 (win32-arm-low.o, win32-i386-low.o): New rules.
11122
f80c84b3
DJ
111232007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
11124
11125 * hostio.c: Correct copyright year.
11126
a6b151f1
DJ
111272007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
11128
11129 * Makefile.in (OBS): Add hostio.o.
11130 (hostio.o): New rule.
11131 * server.h (handle_vFile): Declare.
11132 * hostio.c: New file.
11133 * server.c (handle_v_requests): Take packet_len and new_packet_len
11134 for binary packets. Call handle_vFile.
11135 (main): Update call to handle_v_requests.
11136
f9387fc3
DJ
111372007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
11138
11139 * linux-low.c: Include <sched.h>.
11140
51c2684e
DJ
111412007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
11142
11143 * linux-low.c (linux_tracefork_grandchild): New.
11144 (linux_tracefork_child): Use clone.
11145 (linux_test_for_tracefork): Use clone; allocate and free a stack.
11146
75f83163
JB
111472007-10-31 Joel Brobecker <brobecker@adacore.com>
11148
11149 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
11150
da5898ce
DJ
111512007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
11152
11153 * linux-low.c (handle_extended_wait): Handle unexpected signals.
11154
24a09b5f
DJ
111552007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
11156
11157 * inferiors.c (change_inferior_id): Delete.
11158 (add_pid_to_list, pull_pid_from_list): New.
11159 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
11160 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
11161 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
11162 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
11163 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
11164 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
11165 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
11166 (using_threads): Always set to 1.
11167 (handle_extended_wait): New.
11168 (add_process): Do not set TID.
11169 (linux_create_inferior): Set must_set_ptrace_flags.
11170 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
11171 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
11172 (linux_thread_alive): Rename TID argument to LWPID.
11173 (linux_wait_for_process): Handle unknown processes. Do not use TID.
11174 (linux_wait_for_event): Do not use TID or check using_threads. Update
11175 call to dead_thread_notify. Call handle_extended_wait.
11176 (linux_create_inferior): Use PTRACE_SETOPTIONS.
11177 (send_sigstop): Delete sigstop_sent.
11178 (wait_for_sigstop): Avoid TID.
11179 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
11180 (linux_test_for_tracefork): New.
11181 (linux_lookup_signals): Use thread_db_active and
11182 linux_supports_tracefork_flag.
11183 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
11184 * linux-low.h (get_process_thread): Avoid TID.
11185 (struct process_ifo): Move thread_known and tid to the end. Remove
11186 sigstop_sent.
11187 (linux_attach_lwp, thread_db_init): Update prototypes.
11188 * server.h (change_inferior_id): Delete prototype.
11189 (add_pid_to_list, pull_pid_from_list): New prototypes.
11190 * thread-db.c (thread_db_use_events): New.
11191 (find_first_thread): Rename to...
11192 (find_one_thread): ...this. Update callers and messages. Do not
11193 call fatal. Check thread_db_use_events. Do not call
11194 change_inferior_id or new_thread_notify.
11195 (maybe_attach_thread): Update. Do not call new_thread_notify.
11196 (thread_db_init): Set thread_db_use_events. Check use_events.
11197 * utils.c (fatal, warning): Correct message prefix.
11198
30ed0a8f
DJ
111992007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
11200
11201 * Makefile.in (clean): Remove new files.
11202 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
11203 (powerpc-64.o, powerpc-64.c): New rules.
11204 * configure.srv: Use alternate register sets for powerpc64-*-linux*
11205 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
11206 with SPE.
11207 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
11208 SPE targets.
11209 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
11210 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
11211 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
11212 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
11213 (target_regsets): Add AltiVec and SPE register sets.
11214 * configure.ac: Check for AltiVec and SPE.
11215 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
11216 (ppc_fill_vrregset, ppc_store_vrregset): New.
11217 (target_regsets): Add AltiVec register set.
11218 * configure: Regenerated.
11219
fd462a61
DJ
112202007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
11221
11222 * linux-low.c (O_LARGEFILE): Define.
11223 (linux_read_memory): Use /proc/PID/mem.
11224 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
11225 * configure, config.in: Regenerated.
11226
69f223ed
DJ
112272007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
11228
11229 * linux-low.c (linux_wait_for_event): Do not pass signals while
11230 single-stepping.
11231
aec18585
PA
112322007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
11233
11234 * win32-low.c (create_process): New.
11235 (win32_create_inferior): Use create_process instead of
11236 CreateProcess. If create_process failed retry appending an ".exe"
11237 suffix. Store the GetLastError result immediatelly after
11238 create_process calls and use it on the call to error.
11239
34d86ddd
PA
112402007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
11241
11242 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
11243
5a0e3bd0
JB
112442007-08-23 Joel Brobecker <brobecker@adacore.com>
11245
11246 * configure.ac: Switch license to GPLv3.
11247
f88c79e6
MS
112482007-08-01 Michael Snyder <msnyder@access-company.com>
11249
11250 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
11251
6b3d9b83
PA
112522007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
11253
11254 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
11255 typedef.
11256 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
11257 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
11258 CloseToolhelp32Snapshot.
11259 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
11260 CloseToolhelp32Snapshot.
11261
c588c53c
MS
112622007-07-27 Michael Snyder <michael.snyder@access-company.com>
11263
11264 * server.c (main): Check for inferior exit before main loop.
11265
aa0403d9
PA
112662007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
11267
11268 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
11269 instead of on tmp_desc.
11270
255e7678
DJ
112712007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
11272 Daniel Jacobowitz <dan@codesourcery.com>
11273
11274 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
11275 (add_thread): Minor cleanups.
11276 (clear_inferiors): Move lower in the file. Clear the DLL
11277 list.
11278 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
11279 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
11280 (xml_escape_text): New.
11281 * server.c (handle_query): Handle qXfer:libraries:read. Report it
11282 for qSupported.
11283 (handle_v_cont): Report errors.
11284 (gdbserver_version): Update.
11285 (main): Correct size of own_buf. Do not report initial DLL events.
11286 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
11287 (unloaded_dll, xml_escape_text): New.
11288 * win32-low.c (enum target_waitkind): Update comments.
11289 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
11290 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
11291 (win32_EnumProcessModules, win32_GetModuleInformation)
11292 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
11293 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
11294 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
11295 (win32_Module32First, win32_Module32Next, load_toolhelp)
11296 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
11297 (get_child_debug_event): Handle DLL events.
11298 (win32_wait): Likewise.
11299
0d37add9
DJ
113002007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
11301
11302 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
11303 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
11304
45e2715e
PA
113052007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
11306
11307 * win32-low.c (handle_output_debug_string): Ignore event if not
11308 waiting.
11309
c5674cf1
PA
113102007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
11311
11312 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
11313
2bbe3cc1
DJ
113142007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
11315
11316 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
11317
ae13219e
DJ
113182007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
11319
11320 * inferiors.c (change_inferior_id): Add comment.
11321 * linux-low.c (check_removed_breakpoint): Add an early
11322 prototype. Improve debug output.
11323 (linux_attach): Doc update.
11324 (linux_detach_one_process, linux_detach): Clean up before releasing
11325 each process.
11326 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
11327 * linux-low.h (struct process_info): Doc improvement.
11328 * mem-break.c (delete_all_breakpoints): New.
11329 * mem-break.h (delete_all_breakpoints): New prototype.
11330 * thread-db.c (find_first_thread): New.
11331 (thread_db_create_event): Call it instead of
11332 thread_db_find_new_threads. Clean up unused variables.
11333 (maybe_attach_thread): Remove first thread handling.
11334 (thread_db_find_new_threads): Use find_first_thread.
11335 (thread_db_get_tls_address): Likewise.
11336
4105de34
DJ
113372007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
11338
11339 * thread-db.c (thread_db_find_new_threads): Add prototype.
11340 (thread_db_create_event): Check for the main thread before adding
11341 a new thread.
11342 (maybe_attach_thread): Only enable event reporting if TID == 0.
11343 (thread_db_get_tls_address): Check for new threads.
11344
2b876972
DJ
113452007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
11346
11347 * linux-low.c (linux_create_inferior): Try execv before execvp.
11348 * spu-low.c (spu_create_inferior): Likewise.
11349
7a245884
DJ
113502007-06-13 Mike Frysinger <vapier@gentoo.org>
11351
11352 * linux-low.c (linux_create_inferior): Change execv to execvp.
11353 * spu-low.c (spu_create_inferior): Likewies.
11354
117ce543
DJ
113552007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
11356
11357 * Makefile.in (clean): Clean new files instead of deleted ones.
11358 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
11359 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
11360 rules.
11361 * configure.srv: Specify XML files and new regformats for MIPS and
11362 MIPS64 GNU/Linux.
11363 * linux-mips-low.c (mips_num_regs): Set to only used registers.
11364 (mips_regmap): Do not fetch $0. Remove unused registers. Add
11365 an entry for the restart register.
11366 (mips_cannot_fetch_register, mips_cannot_store_register)
11367 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
11368 register names to match the XML descriptions.
11369 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
11370 restart register instead of $0.
11371
0e7f50da
UW
113722007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
11373 Markus Deuling <deuling@de.ibm.com>
11374
11375 * remote-utils.c (decode_xfer_write): New function.
11376 * server.h (decode_xfer_write): Add prototype.
11377 * server.c (handle_query): Add PACKET_LEN argument. Support
11378 qXfer:spu:read and qXfer:spu:write packets.
11379 (main): Pass packet_len to handle_query.
11380 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
11381 * target.h (target_ops): Add qxfer_spu.
11382
374c1d38
UW
113832007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
11384
11385 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
11386 accessing non-seekable spufs files.
11387
bb63802a
UW
113882007-05-16 Markus Deuling <deuling@de.ibm.com>
11389
889bf7c5 11390 * server.c (handle_query): Add reply for qC packet.
bb63802a 11391
7390519e
PA
113922007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11393 Leo Zayas <lerele@champenstudios@com>
11394
11395 * server.h (check_remote_input_interrupt_request): New function.
11396 * remote_utils.c (INVALID_DESCRIPTOR): New define.
11397 (remote_desc): Initialize with INVALID_DESCRIPTOR.
11398 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
11399 (check_remote_input_interrupt_request): New function.
11400 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 11401 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
11402 winapi_GenerateConsoleCtrlEvent): New typedefs.
11403 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
11404 to 250 ms.
11405 (win32_wait): Check for remote interrupt request
11406 with check_remote_input_interrupt_request.
11407 (win32_request_interrupt): New function.
11408 (win32_target_op): Set request_interrupt to win32_request_interrupt.
11409
34b34921
PA
114102007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11411
11412 * win32-low.c (debug_registers_changed,
11413 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
11414 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
11415 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
11416 (thread_rec): Get context using the low target.
11417 (child_add_thread): Call thread_added on the low target,
11418 which does the same thing.
11419 (regptr): Delete.
11420 (do_initial_child_stuff): Remove debug registers references.
11421 Set context using the low target. Resume threads after
11422 setting the contexts.
11423 (child_continue): Remove dead variable. Remove debug
11424 registers references.
11425 (child_fetch_inferior_registers): Go through the low target.
11426 (do_child_store_inferior_registers): Remove.
11427 (child_store_inferior_registers): Go through the low target.
11428 (win32_resume): Remove debug registers references.
11429 Set context using the low target.
11430 (handle_exception): Change return type to void. Don't record
11431 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
11432 first chance exception.
889bf7c5 11433 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
11434 goto loop. Always return after waiting for debug event.
11435 (win32_wait): Convert to switch statement. Handle spurious
11436 events.
11437
11438 * win32-i386-low.c (debug_registers_changed,
11439 debug_registers_used): New.
11440 (initial_stuff): Rename to ...
11441 (i386_initial_stuff): ... this. Clear debug registers
11442 state variables.
11443 (store_debug_registers): Delete.
11444 (i386_get_thread_context): New.
11445 (load_debug_registers): Delete.
11446 (i386_set_thread_context): New.
11447 (i386_thread_added): New.
11448 (single_step): Rename to ...
11449 (i386_single_step): ... this.
11450 (do_fetch_inferior_registers): Rename to ...
11451 (i386_fetch_inferior_register): ... this.
11452 (i386_store_inferior_register): New.
11453 (the_low_target): Adapt to new interface.
11454
11455 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
11456 (arm_get_thread_context): New.
11457 (arm_set_thread_context): New.
11458 (regptr): New.
11459 (do_fetch_inferior_registers): Rename to ...
11460 (arm_fetch_inferior_register): ... this.
11461 (arm_store_inferior_register): New.
11462 (arm_wince_breakpoint): Reimplement as unsigned long.
11463 (arm_wince_breakpoint_len): Define.
11464 (the_low_target): Adapt to new interface.
11465
11466 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
11467 load_debug_registers. Add get_thread_context, set_thread_context,
11468 thread_added and store_inferior_register. Rename
11469 fetch_inferior_registers to fetch_inferior_register.
11470 (regptr): Remove declaration.
11471
dd6953e1
PA
114722007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11473
11474 * linux-low.c (linux_detach): Change return type to int. Return 0.
11475 * spu-low.c (spu_detach): Likewise.
11476
444d6139
PA
114772007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11478
11479 * target.h (target_ops): Change return type of detach to int.
11480 Add join.
11481 (join_inferior): New.
11482 * server.c (main): Don't skip detach support on mingw32.
11483 If the inferior doesn't support detaching return error.
11484 Call join_inferior instead of using waitpid.
11485 * linux-low.c (linux_join): New.
11486 (linux_target_op): Add linux_join.
11487 * spu-low.c (spu_join): New.
11488 (spu_target_ops): Add spu_join.
11489 * win32-low.c (win32_detach): Adapt to new interface.
11490 Reopen current_process_handle before detaching. Issue a child
11491 resume before detaching.
11492 (win32_join): New.
11493 (win32_target_op): Add win32_join.
11494
1d5315fe
PA
114952007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11496
11497 * win32-low.c (win32-attach): Fix return value.
11498 * target.h (target_ops): Describe ATTACH return values.
11499
bf914831
PA
115002007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11501
11502 * win32-low.c (GETPROCADDRESS): Define.
11503 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
11504 (winapi_DebugSetProcessKillOnExit): Likewise.
11505 (win32_create_inferior): Force usage of ansi CreateProcessA.
11506 (win32_attach): Use GETPROCADDRESS.
11507 (win32_detach): Likewise.
11508
f72f3e60
PA
115092007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11510
11511 * win32-low.c (win32_wait): Don't use WSTOPSIG.
11512
ed50f18f
PA
115132007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
11514
11515 * win32-low.c: Commit leftover changes from 2007-03-29.
11516
0c2ead7e
DJ
115172007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
11518
11519 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
11520 fields short instead of int. Add explicit padding.
11521 (i387_cache_to_fsave): Remove unnecessary casts.
11522 (i387_fsave_to_cache): Doc fix.
11523 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
11524
73725ff3
DJ
115252007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
11526
11527 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
11528 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
11529
d99f33d8
PA
115302007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
11531
11532 * configure.srv (arm*-*-mingw32ce*): Move near the other
11533 arm targets.
11534
68070c10
PA
115352007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
11536
2482afc6 11537 * configure.ac: Add errno checking.
68070c10
PA
11538 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
11539 sys/file.h and malloc.h.
11540 (AC_CHECK_DECLS): Add perror.
11541 (srv_mingwce): Handle.
2482afc6 11542 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
11543 win32-i386-low.o to srv_tgtobj.
11544 (i[34567]86-*-mingw*): Likewise.
11545 (arm*-*-mingw32ce*): Add case.
11546 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
11547 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
11548 [__MINGW32CE__] (strerror): New function.
11549 [__MINGW32CE__] (errno): Define to GetLastError.
11550 [__MINGW32CE__] (COUNTOF): New macro.
11551 (remote_open): Remove extra close call.
11552 * mem-break.c (delete_breakpoint_at): New function.
11553 * mem-break.h (delete_breakpoint_at): Declare.
11554 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
11555 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
11556 [USE_WIN32API] (read, write): Add char* casts.
11557 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
11558 * server.h: Include wincecompat.h on Windows CE.
11559 [HAVE_ERRNO_H]: Check.
11560 (perror): Declare if not declared.
11561 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
11562 (perror_with_name): Remove errno declaration.
11563 * wincecompat.h: New.
11564 * wincecompat.c: New.
11565 * win32-low.h: New.
11566 * win32-arm-low.c: New.
11567 * win32-i386-low.c: New.
11568 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
11569 (OUTMSG2): Make it safe.
11570 (_T): New macro.
11571 (COUNTOF): New macro.
11572 (NUM_REGS): Get it from the low target.
11573 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
11574 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
11575 (thread_rec): Let low target handle debug registers.
11576 (child_add_thread): Likewise.
11577 (child_init_thread_list): Likewise.
11578 (continue_one_thread): Likewise.
11579 (regptr): New.
11580 (do_child_fetch_inferior_registers): Move to ...
11581 * win32-i386-low.c: ... here, and rename to ...
11582 (do_fetch_inferior_registers): ... this.
889bf7c5 11583 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
11584 Go through the low target.
11585 (do_child_store_inferior_registers): Use regptr.
11586 (strwinerror): New function.
11587 (win32_create_inferior): Handle Windows CE.
11588 Use strwinerror instead of strerror on Windows error
11589 codes. Add program to the error output.
11590 Don't close the main thread handle on Windows CE.
11591 (win32_attach): Use coredll.dll on Windows CE.
11592 (win32_kill): Close current process and current
11593 thread handles.
11594 (win32_detach): Use coredll.dll on Windows CE.
11595 (win32_resume): Let low target handle debug registers, and
11596 step request.
11597 (handle_exception): Add/Remove initial breakpoint. Avoid
11598 non-existant WSTOPSIG on Windows CE.
11599 (win32_read_inferior_memory): Cast to remove warning.
11600 (win32_arch_string): Go through the low target.
11601 (initialize_low): Call set_breakpoint_data with the low
11602 target's breakpoint.
11603 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
11604 FOP_REGNUM, mappings): Move to ...
11605 * win32-i386-low.c: ... here.
11606 * win32-low.c (win32_thread_info): Move to ...
11607 * win32-low.h: ... here.
11608 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
11609 win32-arm-low.c and wincecompat.c.
11610 (all:): Add $EXEEXT.
11611 (install-only:): Likewise.
11612 (gdbserver:): Likewise.
11613 (gdbreplay:): Likewise.
11614 * config.in: Regenerate.
11615 * configure: Regenerate.
11616
41093d81
PA
116172007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
11618
11619 * win32-low.c: Rename typedef thread_info to
11620 win32_thread_info throughout.
11621
544afa54
PA
116222007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
11623
11624 * win32-i386-low.c: Rename to ...
11625 * win32-low.c: ... this.
11626 * configure.srv: Replace win32-i386-low.o with win32-low.o.
11627 * Makefile.in: Likewise.
11628
bce7165d
PA
116292007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
11630
11631 * remote-utils.c (monitor_output): Constify msg parameter.
11632 * server.h (monitor_output): Likewise.
11633 * win32-i386-low.c (handle_output_debug_string): New.
11634 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
11635 handle_output_debug_string.
11636 (get_child_debug_event): Likewise.
11637
506c7aa0
DJ
116382007-03-27 Mat Hostetter <mat@lcs.mit.edu>
11639
11640 * server.c (main): Correct strtoul check.
11641
42c81e2a
DJ
116422007-03-27 Jon Ringle <jon@ringle.org>
11643
11644 * linux-low.c: Check __ARCH_HAS_MMU__ also.
11645
9453113a
DJ
116462007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
11647
11648 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
11649
64a69107
DJ
116502007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
11651
11652 * terminal.h: Check HAVE_SGTTY_H.
11653
116542007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
11655
11656 * remote-utils.c (remote_open): Print out the assigned port number.
11657
c74d0ad8
DJ
116582007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
11659
11660 * remote-utils.c (monitor_output): New function.
11661 * server.c (debug_threads): Define here.
11662 (monitor_show_help): New function.
11663 (handle_query): Handle qRcmd.
11664 (main): Do not handle 'd' packet.
11665 * server.h (debug_threads, remote_debug, monitor_output): Declare.
11666 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
11667 of debug_threads.
11668
de7c3b4a
PA
116692007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11670
11671 * Makefile.in (EXEEXT): New.
11672 (clean): Use $(EXEEXT).
11673
ef57601b
PA
116742007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11675
11676 * target.h (target_ops): Rename send_signal to request_interrupt,
11677 and remove enum target_signal parameter.
11678 * linux-low.c (linux_request_interrupt): Rename from
11679 linux_send_signal, and always send SIGINT.
11680 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
11681 and always send SIGINT.
11682 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
11683 of send_signal.
11684 (input_interrupt): Likewise.
11685
820f2bda
PA
116862007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11687
11688 * server.c (get_features_xml): Check if target implemented
11689 arch_string.
11690 * win32-i386-low.c (win32_arch_string): New.
11691 (win32_target_ops): Add win32_arch_string as arch_string member.
11692
ab39bf24
UW
116932007-02-22 Markus Deuling <deuling@de.ibm.com>
11694
11695 * spu-low.c (spu_arch_string): New.
11696 (spu_target_ops): Add spu_arch_string.
11697
61ff6e04
DJ
116982007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
11699
11700 * remote-utils.c: Remove HAVE_TERMINAL_H check.
11701 * configure.ac: Do not check for terminal.h.
11702 * configure, config.in: Regenerated.
11703
fb1e4ffc
DJ
117042007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
11705
11706 * Makefile.in (OBS): Add $(XML_BUILTIN).
11707 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
11708 (clean): Update.
11709 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
11710 (arm-with-iwmmxt.c): New.
11711 * config.in, configure: Regenerate.
11712 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
11713 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
11714 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
11715 (arm*-*-linux*): Add iWMMXt and regset support.
11716 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
11717 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
11718 (arm_store_wmmxregset, target_regsets): New.
11719 * server.c (get_features_xml): Take annex argument. Check builtin
11720 XML documents.
11721 (handle_query): Handle multiple annexes.
11722
0f48aa01
DJ
117232007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11724
11725 * remote-utils.c [USE_WIN32API] (read, write): Define.
11726 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
11727 write.
11728
23181151
DJ
117292007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
11730
11731 * linux-i386-low.c (the_low_target): Set arch_string.
11732 * linux-x86-64-low.c (the_low_target): Likewise.
11733 * linux-low.c (linux_arch_string): New.
11734 (linux_target_ops): Add it.
11735 * linux-low.h (struct linux_target_ops): Add arch_string.
11736 * server.c (write_qxfer_response): Use const void * for DATA.
11737 (get_features_xml): New.
11738 (handle_query): Handle qXfer:features:read. Report it for qSupported.
11739 * target.h (struct target_ops): Add arch_string method.
11740
9d606399
DJ
117412007-01-03 Denis Pilat <denis.pilat@st.com>
11742 Daniel Jacobowitz <dan@codesourcery.com>
11743
11744 * linux-low.c (linux_kill): Handle being called with no threads.
11745 * win32-i386-low.c (win32_kill): Likewise.
11746 (get_child_debug_event): Clear current_process_handle.
11747
117482006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
11749 Daniel Jacobowitz <dan@codesourcery.com>
11750
11751 * remote-utils.c (remote_open): Check the type of specified
11752 serial port devices before opening them.
11753 * server.c (main): Kill the inferior if an error occurs during
11754 the first remote_open.
11755
a5e13d24
DJ
117562006-12-05 Markus Deuling <deuling@de.ibm.com>
11757
11758 * README: Update supported targets.
11759
186947f7
DJ
117602006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
11761
11762 * Makefile.in (clean): Remove reg-mips64.c.
11763 (reg-mips64.c, reg-mips64.o): New rules.
11764 * configure.srv: Handle mips64. Include regset support for mips.
11765 * linux-mips-low.c (union mips_register): New.
11766 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
11767 (mips_breakpoint, mips_breakpoint_at): Use int.
11768 (mips_collect_register, mips_supply_register)
11769 (mips_collect_register_32bit, mips_supply_register_32bit)
11770 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
11771 (mips_store_fpregset, target_regsets): New.
11772 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
11773
a13e2c95
UW
117742006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
11775
11776 * configure.srv: Add target "spu*-*-*".
11777 * Makefile.in (clean): Remove reg-spu.c.
11778 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
11779 * spu-low.c: New file.
11780
cb7283db
DJ
117812006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
11782
11783 * configure.ac: Correct td_thr_tls_get_addr test.
11784 * configure: Regenerated.
11785
89be2091
DJ
117862006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
11787
11788 * linux-low.c (linux_wait_for_event): Reformat. Use the
11789 pass_signals array.
11790 * remote-utils.c (decode_address_to_semicolon): New.
11791 * server.c (pass_signals, handle_general_set): New.
11792 (handle_query): Mention QPassSignals for qSupported.
11793 (main): Call handle_general_set.
11794 * server.h (pass_signals, decode_address_to_semicolon): New.
11795
000ef4f0
DJ
117962006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
11797
11798 * server.c (handle_query): Correct error handling for read_auxv.
11799
b7149293
UW
118002005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
11801
11802 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
11803 and srv_linux_thread_db to yes.
11804 * linux-s390-low.c (s390_fill_gregset): New function.
11805 (target_regsets): Define data structure.
11806
dae5f5cf
DJ
118072006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
11808
11809 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
11810 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
11811 * config.in, configure: Regenerated.
11812 * inferiors.c (gdb_id_to_thread): New function.
11813 (gdb_id_to_thread_id): Use it.
11814 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
11815 * linux-low.h (struct process_info): Add th member.
11816 (thread_db_get_tls_address): New prototype.
11817 * remote-utils.c (decode_address): Make non-static.
11818 * server.c (handle_query): Handle qGetTLSAddr.
11819 * server.h (gdb_id_to_thread, decode_address): New prototypes.
11820 * target.h (struct target_ops): Add get_tls_address.
11821 * thread-db.c (maybe_attach_thread): Save the thread handle.
11822 (thread_db_get_tls_address): New.
11823
32ca6d61
DJ
118242006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
11825
11826 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
11827 (linux_resume_one_process): Take a siginfo_t *. Update all
11828 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
11829 (struct pending_signals): Add a siginfo_t.
11830 (linux_wait_for_process): Always set last_status.
11831 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
11832 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
11833 * linux-low.h (struct process_info): Add last_status.
11834
5ffff7c1
DJ
118352006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
11836
11837 * remote-utils.c (try_rle): New function.
11838 (putpkt_binary): Use it.
11839
8695c747
DJ
118402006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
11841
11842 * Makefile.in (clean): Clean reg-x86-64-linux.c.
11843 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
11844 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
11845 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
11846 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
11847 point registers.
11848
290fadea
RS
118492006-08-08 Richard Sandiford <richard@codesourcery.com>
11850
11851 * server.c (terminal_fd): New variable.
11852 (old_foreground_pgrp): Likewise.
11853 (restore_old_foreground_pgrp): New function.
11854 (start_inferior): Record the terminal file descriptor in terminal_fd
11855 and its original foreground group in old_foreground_pgrp. Register
11856 restore_old_foreground_pgrp with atexit().
11857
9f2e1e63
DJ
118582006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
11859
11860 * server.c (handle_query): Correct qPart to qXfer.
11861
b80864fb
DJ
118622006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
11863
11864 * configure.ac: Check for more headers which are missing on
11865 Windows. Automatically supply -lwsock32 and USE_WIN32API.
11866 * configure.srv: Add Cygwin and mingw32.
11867 * remote-utils.c: Don't include headers unconditionally which
11868 are missing on mingw32. Include <winsock.h> for mingw32.
11869 (remote_open): Adjust for mingw32 support. Flush
11870 standard error after writing to it.
11871 (remote_close, putpkt_binary, input_interrupt, block_async_io)
11872 (unblock_async_io, enable_async_io, disable_async_io)
11873 (readchar, getpkt): Update for Winsock support.
11874 (prepare_resume_reply): Expect a protocol signal number.
11875 * server.c: Disable <sys/wait.h> on mingw32.
11876 (start_inferior): Adjust for mingw32 support. Flush
11877 standard error after writing to it.
11878 (attach_inferior): Likewise. Use protocol signal
11879 numbers.
11880 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
11881 and names.
11882 * win32-i386-low.c: New file.
11883 * Makefile.in (XM_CLIBS): Set.
11884 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
11885 (win32-i386-low.o): New dependency rule.
11886 * linux-low.c (linux_wait): Use target signal numbers.
11887 * target.h (struct target_ops): Doc fix.
11888 * server.h (target_signal_to_name): New prototype.
11889 * gdbreplay.c: Don't include headers unconditionally which
11890 are missing on mingw32. Include <winsock.h> for mingw32.
11891 (remote_close, remote_open): Adjust for Winsock support.
11892 * configure, config.in: Regenerated.
11893
0876f84a
DJ
118942006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
11895
11896 * server.c (decode_xfer_read, write_qxfer_response): New.
11897 (handle_query): Take a packet length argument. Handle
11898 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
11899 the qSupported response.
11900 (main): Update call to handle_query.
11901
01f9e8fa
DJ
119022006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
11903
11904 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
11905 (putpkt_binary): Renamed from putpkt and adjusted for binary
11906 data.
11907 (putpkt): New wrapper for putpkt_binary.
11908 (readchar): Don't mask off the high bit.
11909 (decode_X_packet): New function.
11910 * server.c (main): Call putpkt_binary if a handler sets the packet
11911 length. Save the length of the incoming packet. Handle 'X'.
11912 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
11913
be2a5f71
DJ
119142006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
11915
11916 * server.c (handle_query): Handle qSupported.
11917
ea025f5f
DJ
119182006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
11919
11920 * remote-utils.c (all_symbols_looked_up): New variable.
11921 (look_up_one_symbol): Check it.
11922 * server.h (look_up_one_symbol): New declaration.
11923 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
11924
9308fc88
DJ
119252006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
11926
11927 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 11928 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
11929 (PTRACE_GET_THREAD_AREA): Define.
11930 (ps_get_thread_area): New function.
11931
52fb6437
NS
119322006-05-09 Nathan Sidwell <nathan@codesourcery.com>
11933
11934 * configure.srv (m68k*-*-uclinux*): New target.
11935 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
11936 (linux_resume_one_process): Remove extraneous cast.
11937 (linux_read_offsets): New.
11938 (linux_target_op): Add linux_read_offsets on mmuless systems.
11939 * server.c (handle_query): Add qOffsets logic.
11940 * target.h (struct target_ops): Add read_offsets.
11941
21b0f40c
DJ
119422006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
11943
11944 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
11945 (PTRACE_GET_THREAD_AREA): Define.
11946 (ps_get_thread_area): New function.
11947 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
11948 (linux-x86-64-low.o): Update.
11949
0050a760
DJ
119502006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
11951
11952 * configure.ac: Remove checks for prfpregset_t.
11953 * gdb_proc_service.h: New file.
11954 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
11955 new "gdb_proc_service.h".
11956 * proc-service.c: Likewise.
11957 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
11958 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
11959 * Makefile.in (gdb_proc_service_h): Updated.
11960 * configure, config.in: Regenerated.
11961
b92a518e
DJ
119622006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
11963
11964 * remote-utils.c (prepare_resume_reply): Move declaration
11965 of gdb_id_from_wait to the top of the block.
11966
545587ee
DJ
119672006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
11968
11969 * linux-low.c (regsets_store_inferior_registers): Read the regset
11970 from the target before filling it.
11971
9db87ebd
DJ
119722006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
11973
11974 * server.c (attach_inferior): Return SIGTRAP for a successful
11975 attach.
11976
dd24457d
DJ
119772006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
11978
11979 * Makefile.in (OBS): Add version.o.
11980 (STAGESTUFF): Delete.
11981 (version.o): Add dependencies.
11982 (version.c): Replace rule.
11983 (clean): Remove version.c.
11984 * server.c (gdbserver_version): New.
11985 (gdbserver_usage): Use printf.
11986 (main): Handle --version and --help.
11987 * server.h (version, host_name): Add declarations.
11988
6f0f660e
EZ
119892005-12-23 Eli Zaretskii <eliz@gnu.org>
11990
889bf7c5
PA
11991 * linux-arm-low.c:
11992 * linux-arm-low.c:
11993 * inferiors.c:
11994 * i387-fp.h:
11995 * i387-fp.c:
11996 * gdbreplay.c:
11997 * regcache.c:
11998 * proc-service.c:
11999 * mem-break.h:
12000 * mem-break.c:
12001 * linux-x86-64-low.c:
12002 * linux-sh-low.c:
12003 * linux-s390-low.c:
12004 * linux-ppc64-low.c:
12005 * linux-ppc-low.c:
12006 * linux-mips-low.c:
12007 * linux-m68k-low.c:
12008 * linux-m32r-low.c:
12009 * linux-low.h:
12010 * linux-low.c:
12011 * linux-ia64-low.c:
12012 * linux-i386-low.c:
12013 * linux-crisv32-low.c:
12014 * thread-db.c:
12015 * terminal.h:
12016 * target.h:
12017 * target.c:
12018 * server.h:
12019 * server.c:
12020 * remote-utils.c:
12021 * regcache.h:
12022 * utils.c:
12023 * Makefile.in:
12024 * configure.ac:
6f0f660e
EZ
12025 * gdbserver.1: Add (C) after Copyright. Update the FSF
12026 address.
12027
9d1fb177
DJ
120282005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
12029
12030 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
12031 (arm_breakpoint_at): Recognize both breakpoints.
12032 (the_low_target): Use the correct breakpoint instruction.
12033
011a70c2
DJ
120342005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
12035
12036 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
12037 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
12038 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
12039 (the_low_target): Update.
12040
7fb85e41
AS
120412005-10-25 Andreas Schwab <schwab@suse.de>
12042
12043 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
12044
12045 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
12046 (ia64_num_regs): Reduce to 462.
12047
3db0444b
DJ
120482005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
12049
12050 * acinclude.m4: Correct quoting.
12051 * aclocal.m4: Regenerated.
12052
12053 Suggested by SZOKOVACS Robert <szo@ies.hu>:
12054 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
12055 (thread_db_init): Call thread_db_err_str.
12056 * configure.ac: Check for TD_VERSION.
12057 * config.in, configure: Regenerated.
12058
bee0189a
DJ
120592005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12060
12061 * server.h (error, fatal, warning): Add ATTR_FORMAT.
12062
e9d25b98
DJ
120632005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
12064
12065 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
12066 is not available. Define HAVE_PTRACE_GETREGS if it is.
12067 * config.in, configure: Regenerated.
12068 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
12069 * linux-i386-low.c, linux-m68k-low.c: Update to use
12070 HAVE_PTRACE_GETREGS.
12071 * linux-low.c (regsets_fetch_inferior_registers)
12072 (regsets_store_inferior_registers): Only return 0 if we processed
12073 GENERAL_REGS.
12074 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
12075 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
12076
a06660f7
DJ
120772005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
12078
12079 * inferiors.c (struct thread_info): Add gdb_id.
12080 (add_thread): Add gdb_id argument.
12081 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
12082 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
12083 calls to add_thread.
12084 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
12085 * server.c (handle_query): Use thread_to_gdb_id.
12086 (handle_v_cont, main): Use gdb_id_to_thread_id.
12087 * server.h (add_thread): Update prototype.
12088 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
12089 prototypes.
12090
5a1f5858
DJ
120912005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
12092
12093 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
12094 left-padded registers.
12095 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
12096 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
12097
e122f1f5
SE
120982005-07-01 Steve Ellcey <sje@cup.hp.com>
12099
12100 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
12101 * configure: Regenerate.
12102 * config.in: Regenerate.
12103 * server.h (NEED_DECLARATION_STRERROR):
12104 Replace with !HAVE_DECL_STRERROR.
12105
d592fa2f
DJ
121062005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
12107
12108 * linux-low.c (linux_wait, linux_send_signal): Don't test
12109 an unsigned long variable for > 0 if it could be MAX_ULONG.
12110 * server.c (myresume): Likewise.
12111 * target.c (set_desired_inferior): Likewise.
12112
ccbd4912
MK
121132005-06-13 Mark Kettenis <kettenis@gnu.org>
12114
12115 * configure.ac: Simplify and improve check for socklen_t.
12116 * configure, config.in: Regenerate.
12117
f450004a
DJ
121182005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
12119
12120 * acconfig.h: Remove.
12121 * configure.ac: Add a test for socklen_t. Use three-argument
12122 AC_DEFINE throughout.
12123 * config.in: Regenerated using autoheader 2.59.
12124 * configure: Regenerated.
12125
12126 * gdbreplay.c (socklen_t): Provide a default.
12127 (remote_open): Use socklen_t.
12128 * remote-utils.c (socklen_t): Provide a default.
12129 (remote_open): Use socklen_t.
12130 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
12131 unsigned char.
12132
12133 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
12134 char for buffers.
12135 * linux-low.c (linux_read_memory, linux_write_memory)
12136 (linux_read_auxv): Likewise.
12137 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
12138 (check_mem_write): Likewise.
12139 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
12140 Likewise.
12141 * regcache.c (struct inferior_rgcache_data, registers_to_string)
12142 (registers_from_string, register_data): Likewise.
12143 * server.c (handle_query, main): Likewise.
12144 * server.h (convert_ascii_to_int, convert_int_to_ascii)
12145 (decode_M_packet): Likewise.
12146 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
12147 * target.h (struct target_ops): Update read_memory, write_memory,
12148 and read_auxv.
12149 (read_inferior_memory, write_inferior_memory): Update.
12150 * linux-low.h (struct linux_target_ops): Change type of breakpoint
12151 to unsigned char *.
12152 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
12153 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
12154 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
12155 linux-s390-low.c, linux-sh-low.c: Update for changes in
12156 read_inferior_memory and the_low_target->breakpoint.
12157
eee84df1
DJ
121582005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
12159
12160 * Makefile.in (SFILES): Add linux-ppc64-low.c.
12161 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
12162 * configure.srv: Add powerpc64-*-linux*.
12163 * linux-ppc64-low.c: New file.
12164
45b134e5
OF
121652005-05-23 Orjan Friberg <orjanf@axis.com>
12166
12167 * linux-cris-low.c: New file with support for CRIS.
12168 * linux-crisv32-low.c: Ditto for CRISv32.
12169 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
12170 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 12171 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
12172 reg-crisv32.o, and reg-crisv32.c to make rules.
12173 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
12174 recognized targets.
12175
48d93c75
UW
121762005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
12177
12178 * linux-low.c (fetch_register): Ensure buffer size is a multiple
12179 of sizeof (PTRACE_XFER_TYPE).
12180 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
12181
e013ee27
OF
121822005-05-12 Orjan Friberg <orjanf@axis.com>
12183
889bf7c5 12184 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
12185 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
12186 pointers for hardware watchpoint support.
12187 * linux-low.h (struct linux_target_ops): Ditto.
12188 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
12189 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
12190 to linux_target_ops.
12191 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
12192 reply packet.
12193 * server.c (main): Recognize 'Z' and 'z' packets.
12194
b0ded00b
UW
121952005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
12196
12197 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
12198 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
12199 (the_low_target): Add new members.
12200
8643e2ad
DJ
122012005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
12202
12203 * proc-service.c (ps_lgetregs): Search all_processes instead of
12204 all_threads.
12205
fc620387
DJ
122062005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
12207
12208 * server.c (start_inferior): Change return type to int.
12209 (attach_inferior): Change sigptr to int *.
12210 (handle_v_cont, handle_v_requests): Change signal to int *.
12211 (main): Change signal to int.
12212
122132005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
12214
12215 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
12216 * configure.srv: Add m32r*-*-linux*.
12217 * linux-m32r-low.c: New file.
12218
e0e76420
DJ
122192005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
12220
12221 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
12222
a1928bad
DJ
122232005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
12224
12225 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
12226 Take unsigned long arguments for PIDs.
12227 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
12228 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
12229 (wait_for_sigstop, linux_resume_one_process)
12230 (regsets_fetch_inferior_registers, linux_send_signal)
12231 (linux_read_auxv): Likewise. Update the types of variables holding
12232 PIDs. Update format string specifiers.
12233 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
12234 * remote-utils.c (prepare_resume_reply): Likewise.
12235 * server.c (cont_thread, general_thread, step_thread)
12236 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
12237 unsigned long.
12238 (handle_query): Update format specifiers.
12239 (handle_v_cont, main): Use strtoul for thread IDs.
12240 * server.h (struct inferior_list_entry): Use unsigned long for ID.
12241 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
12242 (general_thread, step_thread, thread_from_wait)
12243 (old_thread_from_wait): Update.
12244 * target.h (struct thread_resume): Use unsigned long for THREAD.
12245 (struct target_ops): Use unsigned long for arguments to attach and
12246 thread_alive.
12247
dcdb98d2
DJ
122482005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
12249
12250 * acinclude.m4: Include bfd/bfd.m4 directly.
12251 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
12252 <agriffis@toolchain.org>.
12253 * aclocal.m4, configure: Regenerated.
12254
bec39cab
AC
122552005-01-07 Andrew Cagney <cagney@gnu.org>
12256
12257 * configure.ac: Rename configure.in, require autoconf 2.59.
12258 * configure: Re-generate.
12259
434c4c77
DJ
122602004-12-08 Daniel Jacobowitz <dan@debian.org>
12261
12262 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
12263 LIBS when finished.
12264 * aclocal.m4: Regenerated.
12265 * configure: Regenerated.
12266
db1d3e1b
AS
122672004-11-21 Andreas Schwab <schwab@suse.de>
12268
12269 * linux-m68k-low.c (m68k_num_gregs): Define.
12270 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
12271 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
12272 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
12273 (m68k_breakpoint_at): New. Add to the_low_target.
12274
12275 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
12276 srv_linux_thread_db to yes.
12277
43360365
JB
122782004-10-20 Joel Brobecker <brobecker@gnat.com>
12279
12280 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
12281 (ARCH_SET_FS): Likewise.
12282 (ARCH_GET_FS): Likewise.
12283 (ARCH_GET_GS): Likewise.
12284
fd500816
DJ
122852004-10-16 Daniel Jacobowitz <dan@debian.org>
12286
12287 * linux-i386-low.c (ps_get_thread_area): New.
12288 * linux-x86-64-low.c (ps_get_thread_area): New.
12289 * linux-low.c: Include <sys/syscall.h>.
12290 (linux_kill_one_process): Don't kill the first thread here.
12291 (linux_kill): Kill the first thread here.
12292 (kill_lwp): New function.
12293 (send_sigstop, linux_send_signal): Use it.
12294 * proc-service.c: Clean up #ifdefs.
12295 (fpregset_info): Delete.
12296 (ps_lgetregs): Update and enable implementation.
12297 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
12298 implementations.
12299 * remote-utils.c (struct sym_cache, symbol_cache): New.
12300 (input_interrupt): Print a clearer message.
12301 (async_io_enabled): New variable.
12302 (enable_async_io, disable_async_io): Use it. Update comments.
12303 (look_up_one_symbol): Use the symbol cache.
12304 * thread-db.c (thread_db_look_up_symbols): New function.
12305 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
12306
f6de3c42
DJ
123072004-10-16 Daniel Jacobowitz <dan@debian.org>
12308
12309 * configure.in: Test for -rdynamic.
12310 * configure: Regenerated.
12311 * Makefile (INTERNAL_LDFLAGS): New.
12312 (gdbserver, gdbreplay): Use it.
12313
2c0fc042
AC
123142004-09-02 Andrew Cagney <cagney@gnu.org>
12315
12316 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
12317
075b3282
DJ
123182004-03-23 Daniel Jacobowitz <drow@mvista.com>
12319
12320 * linux-low.c (linux_wait): Clear all_processes list also.
12321
fa6a77dc
DJ
123222004-03-12 Daniel Jacobowitz <drow@mvista.com>
12323
12324 * linux-low.c: Include <errno.h>. Remove extern declaration of
12325 errno.
12326
6d782a97
DJ
123272004-03-12 Daniel Jacobowitz <drow@mvista.com>
12328
12329 * gdbreplay.c, server.h, utils.c: Update copyright years.
12330
3a7fb99b
DJ
123312004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
12332
12333 * server.c (main): Print child status or termination signal from
12334 variable 'signal', not 'sig'.
12335
c3e735a6
DJ
123362004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
12337
12338 * linux-low.c (linux_read_memory): Change return type to
12339 int. Check for and return error from ptrace().
12340 * target.c (read_inferior_memory): Change return type to int. Pass
12341 back return status from the_target->read_memory().
12342 * target.h (struct target_ops): Adapt *read_memory() prototype.
12343 Update comment.
12344 (read_inferior_memory): Adapt prototype.
12345 * server.c (main): Return an error packet if
12346 read_inferior_memory() returns an error.
12347
a59d1c82
DJ
123482004-03-04 Daniel Jacobowitz <drow@mvista.com>
12349
12350 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
12351 Unify with other clean targets.
12352
dc3f8883
DJ
123532004-02-29 Daniel Jacobowitz <drow@mvista.com>
12354
12355 * server.c (handle_v_cont): Call set_desired_inferior.
12356
89a208da
DJ
123572004-02-29 Daniel Jacobowitz <drow@mvista.com>
12358
12359 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
12360
62ea82f5
DJ
123612004-02-29 Daniel Jacobowitz <drow@mvista.com>
12362
12363 * linux-low.c (linux_wait): Unblock async I/O.
12364 (linux_resume): Block and enable async I/O.
12365 * remote-utils.c (block_async_io, unblock_async_io): New functions.
12366 * server.h (block_async_io, unblock_async_io): Add prototypes.
12367
6910d122
DJ
123682004-02-29 Daniel Jacobowitz <drow@mvista.com>
12369
12370 * remote-utils.c (remote_open): Print a status notice after
12371 opening a TCP port.
12372 * server.c (attach_inferior): Print a status notice after
12373 attaching.
12374
123752004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
12376
12377 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
12378
c89dc5d4
DJ
123792004-02-26 Daniel Jacobowitz <drow@mvista.com>
12380
12381 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
12382 error packet.
12383 * server.c, target.h: Update copyright years.
12384
4b8dad4a
RM
123852004-02-25 Roland McGrath <roland@redhat.com>
12386
12387 * target.h (struct target_ops): New member `read_auxv'.
12388 * server.c (handle_query): Handle qPart:auxv:read: query using that.
12389 * linux-low.c (linux_read_auxv): New function.
12390 (linux_target_ops): Initialize `read_auxv' member to that.
12391
d7446758
JB
123922004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
12393
12394 Committed by Jim Blandy <jimb@redhat.com>.
12395
12396 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 12397 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
12398 instead of GPR_SIZE to distiguish s390 and s390x targets.
12399
5544ad89
DJ
124002004-01-31 Daniel Jacobowitz <drow@mvista.com>
12401
12402 * linux-low.c: Update copyright year.
12403 (check_removed_breakpoint): Clear pending_is_breakpoint.
12404 (linux_set_resume_request, linux_queue_one_thread)
12405 (resume_status_pending_p): New functions.
12406 (linux_continue_one_thread): Use process->resume.
12407 (linux_resume): Only resume threads if there are no pending events.
12408 * linux-low.h (struct process_info): Add resume request
12409 pointer.
12410
2a68b70e
DJ
124112004-01-30 Daniel Jacobowitz <drow@mvista.com>
12412
12413 * regcache.c (new_register_cache): Clear the allocated register
12414 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
12415
64386c31
DJ
124162003-10-13 Daniel Jacobowitz <drow@mvista.com>
12417
12418 * linux-low.c (linux_resume): Take a struct thread_resume *
12419 argument.
12420 (linux_wait): Update call.
12421 (resume_ptr): New static variable.
12422 (linux_continue_one_thread): Renamed from
12423 linux_continue_one_process. Use resume_ptr.
12424 (linux_resume): Use linux_continue_one_thread.
12425 * server.c (handle_v_cont, handle_v_requests): New functions.
12426 (myresume): New function.
12427 (main): Handle 'v' case.
12428 * target.h (struct thread_resume): New type.
12429 (struct target_ops): Change argument of "resume" to struct
12430 thread_resume *.
12431 (myresume): Delete macro.
12432
c938e9b0
L
124332003-08-08 H.J. Lu <hongjiu.lu@intel.com>
12434
12435 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
12436 (uninstall): Support DESTDIR.
12437
7f313d07
BC
12438Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
12439
12440 * configure.srv: Add xscale*linux copy of arm*linux entry.
12441
3b2fc2ea
DJ
124422003-07-24 Daniel Jacobowitz <drow@mvista.com>
12443
12444 * linux-arm-low.c (arm_reinsert_addr): New function.
12445 (the_low_target): Add arm_reinsert_addr.
12446
1c0a559e
MK
124472003-07-08 Mark Kettenis <kettenis@gnu.org>
12448
12449 * mem-break.c: Remove whitespace at end of file.
12450
43d5792c
DJ
124512003-06-28 Daniel Jacobowitz <drow@mvista.com>
12452
12453 * configure.in: Check whether we need to prototype strerror.
12454 * server.h: Optionally prototype strerror.
12455 * gdbreplay.c (perror_with_name): Use strerror.
12456 * linux-low.c (linux_attach_lwp): Use strerror.
12457 * utils.c (perror_with_name): Use strerror.
12458 * config.in, configure: Regenerated.
12459
c8a86edf
DJ
124602003-06-28 Daniel Jacobowitz <drow@mvista.com>
12461
12462 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
12463 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
12464
73d37363
DJ
124652003-06-20 Daniel Jacobowitz <drow@mvista.com>
12466
12467 * Makefile.in (SFILES): Update.
12468 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
12469 low-sun3.c: Remove files.
12470
6ad8ae5c
DJ
124712003-06-17 Daniel Jacobowitz <drow@mvista.com>
12472
12473 * linux-low.c: Move comment to linux_thread_alive where it belonged.
12474 (linux_detach_one_process, linux_detach): New functions.
12475 (linux_target_ops): Add linux_detach.
12476 * server.c (main): Handle 'D' packet.
12477 * target.h (struct target_ops): Add "detach" member.
12478 (detach_inferior): Define.
12479
1581182a
MK
124802003-06-13 Mark Kettenis <kettenis@gnu.org>
12481
12482 From Kelley Cook <kelleycook@wideopenwest.com>:
12483 * configure.srv: Accept i[34567]86 variants.
12484
e5379b03
DJ
124852003-06-05 Daniel Jacobowitz <drow@mvista.com>
12486
12487 * linux-low.c (linux_wait_for_event): Correct comment typos.
12488 (linux_resume_one_process): Call check_removed_breakpoint.
12489 (linux_send_signal): New function.
12490 (linux_target_ops): Add linux_send_signal.
12491 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
12492 of kill.
12493 * target.h (struct target_ops): Add send_signal.
12494
2ff29de4
JB
124952003-05-29 Jim Blandy <jimb@redhat.com>
12496
12497 * linux-low.c (usr_store_inferior_registers): Transfer buf in
12498 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
12499 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
12500 away part of the register's value.
12501
254787d4
DJ
125022003-03-26 Daniel Jacobowitz <drow@mvista.com>
12503
12504 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
12505 (linux_wait_for_event, linux_init_signals): Likewise.
12506
94e10508
DJ
125072003-03-17 Daniel Jacobowitz <drow@mvista.com>
12508
12509 * configure.in: Check for stdlib.h.
12510 * configure: Regenerated.
12511 * config.in: Regenerated.
12512
4c0711e0
DJ
125132003-01-04 Andreas Schwab <schwab@suse.de>
12514
12515 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
12516
ef66e766
AC
125172003-01-02 Andrew Cagney <ac131313@redhat.com>
12518
12519 * Makefile.in: Remove obsolete code.
12520
a1358604
DJ
125212002-11-20 Daniel Jacobowitz <drow@mvista.com>
12522
12523 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
12524 defined(PT_FPR0_HI).
12525
23ce3b1c
DJ
125262002-11-17 Stuart Hughes <seh@zee2.com>
12527
12528 * linux-arm-low.c (arm_num_regs): Increase.
12529 (arm_regmap): Include status register.
12530
125312002-11-17 Daniel Jacobowitz <drow@mvista.com>
12532
12533 * linux-low.c (register_addr): Remove incorrect -1 check.
12534
a9fa9f7d
DJ
125352002-08-29 Daniel Jacobowitz <drow@mvista.com>
12536
12537 * linux-low.c (linux_create_inferior): Call setpgid. Return
12538 the new PID.
12539 (unstopped_p, linux_signal_pid): Remove.
12540 (linux_target_ops): Remove linux_signal_pid.
12541 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
12542 global instead of target method.
12543 * target.h (struct target_ops): Remove signal_pid. Update comment
12544 for create_inferior.
12545 * server.c (signal_pid): New variable.
12546 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 12547 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
12548 (attach_inferior): Set signal_pid.
12549
17574093
DJ
125502002-08-23 Daniel Jacobowitz <drow@mvista.com>
12551
12552 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
12553
125542002-08-20 Jim Blandy <jimb@redhat.com>
12555
12556 * Makefile.in (LDFLAGS): Allow the configure script to establish a
12557 default for this.
12558
125592002-08-01 Andrew Cagney <cagney@redhat.com>
12560
12561 * Makefile.in: Make chill references obsolete.
12562
125632002-07-24 Kevin Buettner <kevinb@redhat.com>
12564
12565 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
12566 * configure: Regenerate.
12567 * config.in: Regenerate.
12568
125692002-07-09 David O'Brien <obrien@FreeBSD.org>
12570
12571 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
12572 (perror_with_name, remote_close, remote_open, expect, play): Static.
12573
125742002-07-04 Michal Ludvig <mludvig@suse.cz>
12575
4b8dad4a 12576 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
12577 byte offsets instead of an array of indexes.
12578 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
12579
125802002-06-13 Daniel Jacobowitz <drow@mvista.com>
12581
12582 * regcache.c: Add comment.
12583
125842002-06-11 Daniel Jacobowitz <drow@mvista.com>
12585
12586 * thread-db.c: New file.
12587 * proc-service.c: New file.
12588 * acinclude.m4: New file.
12589 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
12590 proc-service.o, and thread-db.o.
12591 (linux-low.o): Add USE_THREAD_DB.
12592 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
12593 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
12594 * aclocal.m4: Regenerated.
12595 * config.in: Regenerated.
12596 * configure: Regenerated.
12597 * configure.in: Check for proc_service.h, sys/procfs.h,
12598 thread_db.h, and linux/elf.h headrs.
12599 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
12600 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
12601 Check for -lthread_db and thread support.
12602 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
12603 PowerPC, and SuperH.
12604 * i387-fp.c: Constify arguments.
12605 * i387-fp.h: Likewise.
12606 * inferiors.c: (struct thread_info): Renamed from
12607 `struct inferior_info'. Remove PID member. Use generic inferior
12608 list header. All uses updated.
12609 (inferiors, signal_pid): Removed.
12610 (all_threads): New variable.
12611 (get_thread): Define.
12612 (add_inferior_to_list): New function.
12613 (for_each_inferior): New function.
12614 (change_inferior_id): New function.
12615 (add_inferior): Removed.
12616 (remove_inferior): New function.
12617 (add_thread): New function.
12618 (free_one_thread): New function.
12619 (remove_thread): New function.
12620 (clear_inferiors): Use for_each_inferior and free_one_thread.
12621 (find_inferior): New function.
12622 (find_inferior_id): New function.
12623 (inferior_target_data): Update argument type.
12624 (set_inferior_target_data): Likewise.
12625 (inferior_regcache_data): Likewise.
12626 (set_inferior_regcache_data): Likewise.
12627 * linux-low.c (linux_bp_reinsert): Remove.
12628 (all_processes, stopping_threads, using_thrads)
12629 (struct pending_signals, debug_threads, pid_of): New.
12630 (inferior_pid): Replace with macro.
12631 (struct inferior_linux_data): Remove.
12632 (get_stop_pc, add_process): New functions.
12633 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
12634 Use add_process and add_thread.
12635 (linux_attach_lwp): New function, based on old linux_attach. Use
12636 add_process and add_thread. Set stop_expected for new threads.
12637 (linux_attach): New function.
12638 (linux_kill_one_process): New function.
12639 (linux_kill): Kill all LWPs.
12640 (linux_thread_alive): Use find_inferior_id.
12641 (check_removed_breakpoints, status_pending_p): New functions.
12642 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
12643 Update. Use WNOHANG. Wait for cloned processes also. Update process
12644 struct for the found process.
12645 (linux_wait_for_event): New function.
12646 (linux_wait): Use it. Support LWPs.
12647 (send_sigstop, wait_for_sigstop, stop_all_processes)
12648 (linux_resume_one_process, linux_continue_one_process): New functions.
12649 (linux_resume): Support LWPs.
12650 (REGISTER_RAW_SIZE): Remove.
12651 (fetch_register): Use register_size instead. Call supply_register.
12652 (usr_store_inferior_registers): Likewise. Call collect_register.
12653 Fix recursive case.
12654 (regsets_fetch_inferior_registers): Improve error message.
12655 (regsets_store_inferior_registers): Add debugging.
12656 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
12657 (unstopped_p, linux_signal_pid): New functions.
12658 (linux_target_ops): Add linux_signal_pid.
12659 (linux_init_signals): New function.
12660 (initialize_low): Call it. Initialize using_threads.
12661 * regcache.c (inferior_regcache_data): Add valid
12662 flag.
12663 (get_regcache): Fetch registers lazily. Add fetch argument
12664 and update all callers.
12665 (regcache_invalidate_one, regcache_invalidate): New
12666 functions.
12667 (new_register_cache): Renamed from create_register_cache.
12668 Return the new regcache.
12669 (free_register_cache): Change argument to a void *.
12670 (registers_to_string, registers_from_string): Call get_regcache
12671 with fetch flag set.
12672 (register_data): Make static. Pass fetch flag to get_regcache.
12673 (supply_register): Call get_regcache with fetch flag clear.
12674 (collect_register): Call get_regcache with fetch flag set.
12675 (collect_register_as_string): New function.
12676 * regcache.h: Update.
12677 * remote-utils.c (putpkt): Flush after debug output and use
12678 stderr.
12679 Handle input interrupts while waiting for an ACK.
12680 (input_interrupt): Use signal_pid method.
12681 (getpkt): Flush after debug output and use stderr.
12682 (outreg): Use collect_register_as_string.
12683 (new_thread_notify, dead_thread_notify): New functions.
12684 (prepare_resume_reply): Check using_threads. Set thread_from_wait
12685 and general_thread.
12686 (look_up_one_symbol): Flush after debug output.
12687 * server.c (step_thread, server_waiting): New variables.
12688 (start_inferior): Don't use signal_pid. Update call to mywait.
12689 (attach_inferior): Update call to mywait.
12690 (handle_query): Handle qfThreadInfo and qsThreadInfo.
12691 (main): Don't fetch/store registers explicitly. Use
12692 set_desired_inferior. Support proposed ``Hs'' packet. Update
12693 calls to mywait.
12694 * server.h: Update.
12695 (struct inferior_list, struct_inferior_list_entry): New.
12696 * target.c (set_desired_inferior): New.
12697 (write_inferior_memory): Constify.
12698 (mywait): New function.
12699 * target.h: Update.
12700 (struct target_ops): New signal_pid method.
12701 (mywait): Removed macro, added prototype.
12702
12703 * linux-low.h (regset_func): Removed.
12704 (regset_fill_func, regset_store_func): New.
12705 (enum regset_type): New.
12706 (struct regset_info): Add type field. Use new operation types.
12707 (struct linux_target_ops): stop_pc renamed to get_pc.
12708 Add decr_pc_after_break and breakpoint_at.
12709 (get_process, get_thread_proess, get_process_thread)
12710 (strut process_info, all_processes, linux_attach_lwp)
12711 (thread_db_init): New.
12712
12713 * linux-arm-low.c (arm_get_pc, arm_set_pc,
12714 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
12715 (the_low_target): Add new members.
12716 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
12717 (i386_store_fpxregset): Constify.
12718 (target_regsets): Add new kind identifier.
12719 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
12720 (i386_set_pc): Add debugging.
12721 (i386_breakpoint_at): New function.
12722 (the_low_target): Add new members.
12723 * linux-mips-low.c (mips_get_pc, mips_set_pc)
12724 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
12725 (mips_breakpoint_at): New.
12726 (the_low_target): Add new members.
12727 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
12728 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
12729 (the_low_target): Add new members.
12730 * linux-sh-low.c (sh_get_pc, sh_set_pc)
12731 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
12732 (the_low_target): Add new members.
12733 * linux-x86-64-low.c (target_regsets): Add new kind
12734 identifier.
12735
127362002-05-15 Daniel Jacobowitz <drow@mvista.com>
12737
12738 From Martin Pool <mbp@samba.org>:
12739 * server.c (gdbserver_usage): New function.
12740 (main): Call it.
12741
127422002-05-14 Daniel Jacobowitz <drow@mvista.com>
12743
12744 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
12745 stop_at -> stop_pc.
12746
127472002-05-04 Andrew Cagney <ac131313@redhat.com>
12748
12749 * Makefile.in: Remove obsolete code.
12750
127512002-04-24 Michal Ludvig <mludvig@suse.cz>
12752
12753 * linux-low.c (regsets_fetch_inferior_registers),
12754 (regsets_store_inferior_registers): Removed cast to int from
12755 ptrace() calls.
12756 * regcache.h: Added declaration of struct inferior_info.
12757
127582002-04-20 Daniel Jacobowitz <drow@mvista.com>
12759
12760 * inferiors.c (struct inferior_info): Add regcache_data.
12761 (add_inferior): Call create_register_cache.
12762 (clear_inferiors): Call free_register_cache.
12763 (inferior_regcache_data, set_inferior_regcache_data): New functions.
12764 * regcache.c (struct inferior_regcache_data): New.
12765 (registers): Remove.
12766 (get_regcache): New function.
12767 (create_register_cache, free_register_cache): New functions.
12768 (set_register_cache): Don't initialize the register cache here.
12769 (registers_to_string, registers_from_string, register_data): Call
12770 get_regcache.
12771 * regcache.h: Add prototypes.
12772 * server.h: Likewise.
12773
127742002-04-20 Daniel Jacobowitz <drow@mvista.com>
12775
12776 * mem-break.c: New file.
12777 * mem-break.h: New file.
12778 * Makefile.in: Add mem-break.o rule; update server.h
12779 dependencies.
12780 * inferiors.c (struct inferior_info): Add target_data
12781 member.
12782 (clear_inferiors): Free target_data member if set.
12783 (inferior_target_data, set_inferior_target_data): New functions.
12784 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
12785 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
12786 * linux-low.c (linux_bp_reinsert): New variable.
12787 (struct inferior_linux_data): New.
12788 (linux_create_inferior): Use set_inferior_target_data.
12789 (linux_attach): Likewise. Call add_inferior.
12790 (linux_wait_for_one_inferior): New function.
12791 (linux_wait): Call it.
12792 (linux_write_memory): Add const.
12793 (initialize_low): Call set_breakpoint_data.
12794 * linux-low.h (struct linux_target_ops): Add breakpoint
12795 handling members.
12796 * server.c (attach_inferior): Remove extra add_inferior
12797 call.
12798 * server.h: Include mem-break.h. Update inferior.c
12799 prototypes.
12800 * target.c (read_inferior_memory)
12801 (write_inferior_memory): New functions.
12802 * target.h (read_inferior_memory)
12803 (write_inferior_memory): Change macros to prototypes.
12804 (struct target_ops): Update comments. Add const to write_memory
12805 definition.
12806
128072002-04-11 Daniel Jacobowitz <drow@mvista.com>
12808
12809 * linux-low.c (usr_store_inferior_registers): Support
12810 registers which are allowed to fail to store.
12811 * linux-low.h (linux_target_ops): Likewise.
12812 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
12813 (ppc_cannot_store_register): FPSCR may not be storable.
12814
128152002-04-09 Daniel Jacobowitz <drow@mvista.com>
12816
12817 * server.h: Include <string.h> if HAVE_STRING_H.
12818 * ChangeLog: Correct paths in last ChangeLog entry.
12819
128202002-04-09 Daniel Jacobowitz <drow@mvista.com>
12821
12822 * linux-low.h: Remove obsolete prototypes.
12823 (struct linux_target_ops): New.
12824 (extern the_low_target): New.
12825 * linux-low.c (num_regs, regmap): Remove declarations.
12826 (register_addr): Use the_low_target explicitly.
12827 (fetch_register): Likewise.
12828 (usr_fetch_inferior_registers): Likewise.
12829 (usr_store_inferior_registers): Likewise.
12830 * linux-arm-low.c (num_regs): Remove.
12831 (arm_num_regs): Define.
12832 (arm_regmap): Renamed from regmap, made static.
12833 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
12834 made static.
12835 (arm_cannot_store_register): Renamed from cannot_store_register,
12836 made static.
12837 (the_low_target): New.
12838 * linux-i386-low.c (num_regs): Remove.
12839 (i386_num_regs): Define.
12840 (i386_regmap): Renamed from regmap, made static.
12841 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
12842 made static.
12843 (i386_cannot_store_register): Renamed from cannot_store_register,
12844 made static.
12845 (the_low_target): New.
12846 * linux-ia64-low.c (num_regs): Remove.
12847 (ia64_num_regs): Define.
12848 (ia64_regmap): Renamed from regmap, made static.
12849 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
12850 made static.
12851 (ia64_cannot_store_register): Renamed from cannot_store_register,
12852 made static.
12853 (the_low_target): New.
12854 * linux-m68k-low.c (num_regs): Remove.
12855 (m68k_num_regs): Define.
12856 (m68k_regmap): Renamed from regmap, made static.
12857 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
12858 made static.
12859 (m68k_cannot_store_register): Renamed from cannot_store_register,
12860 made static.
12861 (the_low_target): New.
12862 * linux-mips-low.c (num_regs): Remove.
12863 (mips_num_regs): Define.
12864 (mips_regmap): Renamed from regmap, made static.
12865 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
12866 made static.
12867 (mips_cannot_store_register): Renamed from cannot_store_register,
12868 made static.
12869 (the_low_target): New.
12870 * linux-ppc-low.c (num_regs): Remove.
12871 (ppc_num_regs): Define.
12872 (ppc_regmap): Renamed from regmap, made static.
12873 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
12874 made static.
12875 (ppc_cannot_store_register): Renamed from cannot_store_register,
12876 made static.
12877 (the_low_target): New.
12878 * linux-s390-low.c (num_regs): Remove.
12879 (s390_num_regs): Define.
12880 (s390_regmap): Renamed from regmap, made static.
12881 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
12882 made static.
12883 (s390_cannot_store_register): Renamed from cannot_store_register,
12884 made static.
12885 (the_low_target): New.
12886 * linux-sh-low.c (num_regs): Remove.
12887 (sh_num_regs): Define.
12888 (sh_regmap): Renamed from regmap, made static.
12889 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
12890 made static.
12891 (sh_cannot_store_register): Renamed from cannot_store_register,
12892 made static.
12893 (the_low_target): New.
12894 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
12895 (the_low_target): New.
12896
128972002-04-09 Daniel Jacobowitz <drow@mvista.com>
12898
12899 * Makefile.in: Add stamp-h target.
12900 * configure.in: Create stamp-h.
12901 * configure: Regenerated.
12902
129032002-04-09 Daniel Jacobowitz <drow@mvista.com>
12904
12905 * inferiors.c: New file.
12906 * target.c: New file.
12907 * target.h: New file.
12908 * Makefile.in: Add target.o and inferiors.o. Update
12909 dependencies.
12910 * linux-low.c (inferior_pid): New static variable,
12911 moved from server.c.
12912 (linux_create_inferior): Renamed from create_inferior.
12913 Call add_inferior. Return 0 on success instead of a PID.
12914 (linux_attach): Renamed from myattach.
12915 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
12916 (linux_thread_alive): Renamed from mythread_alive.
12917 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
12918 child dies.
12919 (linux_resume): Renamed from myresume. Add missing ``return 0''.
12920 (regsets_store_inferior_registers): Correct error message.
12921 Add missing ``return 0''.
12922 (linux_fetch_registers): Renamed from fetch_inferior_registers.
12923 (linux_store_registers): Renamed from store_inferior_registers.
12924 (linux_read_memory): Renamed from read_inferior_memory.
12925 (linux_write_memory): Renamed from write_inferior_memory.
12926 (linux_target_ops): New structure.
12927 (initialize_low): Call set_target_ops ().
12928 * remote-utils.c (unhexify): New function.
12929 (hexify): New function.
12930 (input_interrupt): Send signals to ``signal_pid''.
12931 * server.c (inferior_pid): Remove.
12932 (start_inferior): Update create_inferior call.
12933 (attach_inferior): Call add_inferior.
12934 (handle_query): New function.
12935 (main): Call handle_query for `q' packets.
12936 * server.h: Include "target.h". Remove obsolete prototypes.
12937 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
12938
129392002-04-09 Daniel Jacobowitz <drow@mvista.com>
12940
12941 * Makefile.in: Add WARN_CFLAGS. Update configury
12942 dependencies.
12943 * configure.in: Check for <string.h>
12944 * configure: Regenerate.
12945 * config.in: Regenerate.
12946 * gdbreplay.c: Include needed system headers.
12947 (remote_open): Remove strchr prototype.
12948 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
12949 * regcache.c (supply_register): Change buf argument to const void *.
12950 (supply_register_by_name): Likewise.
12951 (collect_register): Change buf argument to void *.
12952 (collect_register_by_name): Likewise.
12953 * regcache.h: Add missing prototypes.
12954 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
12955 * server.c (handle_query): New function.
12956 (attached): New static variable, moved out of main.
12957 (main): Quiet longjmp clobber warnings.
12958 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
12959 * utils.c (error): Remove NORETURN.
12960 (fatal): Likewise.
This page took 1.94708 seconds and 4 git commands to generate.