Remove support for thread events without PTRACE_EVENT_CLONE in GDBServer.
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
9b4c5f87
AT
12015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2
3 * linux-low.c (linux_look_up_symbols): Don't call
4 linux_supports_traceclone.
5 * linux-low.h (thread_db_init): Remove use_events argument.
6 * thread-db.c (thread_db_use_event): Remove global variable.
7 (struct thread_db) <td_thr_event_enable_p>: Remove field.
8 (struct thread_db) <td_create_bp>: Remove field.
9 (thread_db_create_event): Remove function.
10 (thread_db_enable_reporting): Likewise.
11 (find_one_thread): Don't check for thread_db_use_events.
12 (attach_thread): Likewise.
13 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
14 (try_thread_db_load_1): Don't check for thread_db_use_events.
15 (thread_db_init): Remove use_events argument and thread events
16 handling.
17 (remove_thread_event_breakpoints): Remove function.
18 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
19
7d00775e
AT
202015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
21
22 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
23 New function.
24 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
25 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
26 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
27 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
28 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
29 Initialize.
30 * linux-crisv32-low.c (cris_supports_hardware_single_step):
31 New function.
32 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
33 * linux-low.c (can_hardware_single_step): Use
34 supports_hardware_single_step.
35 (can_software_single_step): New function.
36 (start_step_over): Call can_software_single_step.
37 (linux_supports_hardware_single_step): New function.
38 (struct target_ops) <supports_software_single_step>: Initialize.
39 * linux-low.h (struct linux_target_ops)
40 <supports_hardware_single_step>: Initialize.
41 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
42 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
43 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
44 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
45 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
46 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
47 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
48 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
49 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
50 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
51 Initialize.
52 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
53 (struct linux_target_ops) <tile_supports_hardware_single_step>:
54 Initialize.
55 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
56 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
57 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
58 New function.
59 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
60 * target.h (struct target_ops): <supports_software_single_step>:
61 New field.
62 (target_supports_software_single_step): New macro.
63
2d97cd35
AT
642015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
65
66 * linux-low.c (linux_wait_1): Fix pc advance condition.
67 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
68 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
69
769ef81f
AT
702015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
71
72 * linux-arm-low.c (arm_is_thumb_mode): New function.
73 (arm_breakpoint_at): Use arm_is_thumb_mode.
74 (arm_breakpoint_kind_from_current_state): New function.
75 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
76 Initialize.
77 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
78 (linux_breakpoint_kind_from_current_state): New function.
79 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
80 * linux-low.h (struct linux_target_ops)
81 <breakpoint_kind_from_current_state>: New field.
82 * target.h (struct target_ops): Likewise.
83 (target_breakpoint_kind_from_current_state): New macro.
84
1bebeeca
PA
852015-11-30 Pedro Alves <palves@redhat.com>
86
87 * linux-low.c (linux_resume): Wake up the event loop before
88 returning.
89
a67a9fae
PA
902015-11-30 Pedro Alves <palves@redhat.com>
91
92 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
93 check.
94 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
95 to -1.
96 * target.c (struct thread_search): New structure.
97 (thread_search_callback): New function.
98 (prev_general_thread): New global.
99 (prepare_to_access_memory, done_accessing_memory): New functions.
100 * target.h (prepare_to_access_memory, done_accessing_memory):
101 Replace macros with function declarations.
102
f2faf941
PA
1032015-11-30 Pedro Alves <palves@redhat.com>
104
105 PR 14618
106 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
107 report TARGET_WAITKIND_NO_RESUMED.
108 * remote-utils.c (prepare_resume_reply): Handle
109 TARGET_WAITKIND_NO_RESUMED.
110 * server.c (report_no_resumed): New global.
111 (handle_query) <qSupported>: Handle "no-resumed+". Report
112 "no-resumed+" support.
113 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
114 return error if the client doesn't support no-resumed events.
115 (push_stop_notification): New function.
116 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
117 events if the client supports them.
118
a681f9c9
PA
1192015-11-30 Pedro Alves <palves@redhat.com>
120
121 * linux-low.c (thread_still_has_status_pending_p): Don't check
122 vCont;t here.
123 (lwp_resumed): New function.
124 (status_pending_p_callback): Return early if the LWP is not
125 supposed to be resumed.
126
65706a29
PA
1272015-11-30 Pedro Alves <palves@redhat.com>
128
129 * linux-low.c (handle_extended_wait): Assert that the LWP's
130 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
131 thread create events, leave the new child's status pending.
132 (linux_low_filter_event): If GDB wants to hear about thread exit
133 events, leave the LWP marked dead and don't delete it.
134 (linux_wait_for_event_filtered): Don't check for thread exit.
135 (filter_exit_event): New function.
136 (linux_wait_1): Use it, when returning an exit event.
137 (linux_resume_one_lwp_throw): Assert that the LWP's
138 waitstatus is TARGET_WAITKIND_IGNORE.
139 * remote-utils.c (prepare_resume_reply): Handle
140 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
141 * server.c (report_thread_events): New global.
142 (handle_general_set): Handle QThreadEvents.
143 (handle_query) <qSupported>: Handle and report QThreadEvents+;
144 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
145 TARGET_WAITKIND_THREAD_EXITED.
146 * server.h (report_thread_events): Declare.
147
56cf4bed
PA
1482015-11-30 Pedro Alves <palves@redhat.com>
149
150 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
151 the thread's last_resume_kind was resume_stop.
152
500c1d85
PA
1532015-11-30 Pedro Alves <palves@redhat.com>
154
155 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
156 before returning.
157
de979965
PA
1582015-11-30 Pedro Alves <palves@redhat.com>
159
160 * server.c (handle_v_requests): Handle vCtrlC.
161
34c65914
PA
1622015-11-30 Pedro Alves <palves@redhat.com>
163
164 * gdbthread.h (find_any_thread_of_pid): Declare.
165 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
166 functions.
167 * server.c (handle_query): If current_thread is NULL, look for
168 another thread of the selected process.
169
79efa585 1702015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 171 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
172
173 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
174 * server.c (handle_qxfer_threads_worker): Refactor to include thread
175 name in reply.
176 * target.h (struct target_ops) <thread_name>: New field.
177 (target_thread_name): New macro.
178
80d82c19
JB
1792015-11-23 Joel Brobecker <brobecker@adacore.com>
180
181 * regcache.h (regcache_invalidate_pid): Add declaration.
182 * regcache.c (regcache_invalidate_pid): New function, extracted
183 from regcache_invalidate.
184 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
185 Add trivial documentation comment.
186 * lynx-low.c: Use regcache_invalidate_pid instead of
187 regcache_invalidate.
188
64da5dd5
JB
1892015-11-23 Joel Brobecker <brobecker@adacore.com>
190
191 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
192 and Elf64_auxv_t if the target is Android.
193
37ce4055
DE
1942015-11-22 Doug Evans <xdje42@gmail.com>
195
196 * target.h: #include <sys/types.h>.
197
06e03fff
PA
1982015-11-19 Pedro Alves <palves@redhat.com>
199
200 * linux-low.c (linux_process_qsupported): Change prototype.
201 Adjust.
202 * linux-low.h (struct linux_target_ops) <process_qsupported>:
203 Change prototype.
204 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
205 and adjust to loop over all features.
206 * server.c (handle_query) <qSupported>: Adjust to call
207 target_process_qsupported once, passing it a vector of unprocessed
208 features.
209 * target.h (struct target_ops) <process_qsupported>: Change
210 prototype.
211 (target_process_qsupported): Adjust.
212
9a084706
PA
2132015-11-19 Pedro Alves <palves@redhat.com>
214
215 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
216 mode.
217 * configure: Regenerate.
218
dad44a1f
PA
2192015-11-19 Pedro Alves <palves@redhat.com>
220
221 * configure: Regenerate.
222
231c0592
YQ
2232015-11-19 Yao Qi <yao.qi@linaro.org>
224
225 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
226 type to uint32_t.
227
6c1c9a8b
YQ
2282015-11-19 Yao Qi <yao.qi@linaro.org>
229
230 * linux-aarch64-low.c (enum aarch64_operand_type): New.
231 (struct aarch64_operand): Move enum out.
232
9caa3311
YQ
2332015-11-19 Yao Qi <yao.qi@linaro.org>
234
235 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
236 struct user_fpsimd_state *.
237 (aarch64_store_fpregset): Likewise.
238
6a69a054
YQ
2392015-11-19 Yao Qi <yao.qi@linaro.org>
240
241 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
242 struct user_pt_regs *.
243 (aarch64_store_gregset): Likewise.
244
1798301e
PA
2452015-11-18 Pedro Alves <palves@redhat.com>
246
247 * Makefile.in (all_object_files): Add $IPA_OBJS.
248
ce7715e2
PA
2492015-11-17 Pedro Alves <palves@redhat.com>
250
251 * win32-low.c (win32_resume): Use gdb_signal_from_host,
252 GDB_SIGNAL_0 and gdb_signal_to_string.
253
c0879059
PA
2542015-11-17 Pedro Alves <palves@redhat.com>
255
256 * win32-low.c (handle_output_debug_string): Remove parameter.
257 (win32_kill): Remove our_status local and adjust call to
258 handle_output_debug_string.
259 (get_child_debug_event): Adjust call to
260 handle_output_debug_string.
261
1996e237
SM
2622015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
263
264 * linux-mips-low.c (mips_fill_gregset): Add cast.
265 (mips_store_gregset): Likewise.
266 (mips_fill_fpregset): Likewise.
267 (mips_store_fpregset): Likewise.
268
cbec665b
SM
2692015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
270
271 * linux-mips-low.c (mips_add_watchpoint): Rename private to
272 priv.
273
eb3e3c67
SM
2742015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
275
276 * linux-mips-low.c (mips_linux_new_thread): Change type of
277 watch_type to enum target_hw_bp_type.
278
171de4b8
SM
2792015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
280
281 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
282 Change return type to arm_hwbp_type.
283
04248ead
SM
2842015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
285
286 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
287 (arm_store_gregset): Likewise.
288 * linux-arm-low.c (arm_get_hwcap): Likewise.
289 (arm_read_description): Likewise.
290
04b3479c
SM
2912015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
292
293 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
294
2bc84e8a
SM
2952015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
296
297 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
298 (ppc_fill_vsxregset): Likewise.
299 (ppc_store_vsxregset): Likewise.
300 (ppc_fill_vrregset): Likewise.
301 (ppc_store_vrregset): Likewise.
302 (ppc_fill_evrregset): Likewise.
303 (ppc_store_evrregset): Likewise.
304
e6c5bb05
SM
3052015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
306
307 * linux-ppc-low.c (ppc_usrregs_info): Remove
308 forward-declaration.
309 (ppc_arch_setup): Move lower in file.
310
7ea45d72
SM
3112015-10-30 Simon Marchi <simon.marchi@ericsson.com>
312
313 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
314 (ps_pdwrite): Likewise.
315
69291610
HW
3162015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
317
318 * linux-arm-low.c (arm_new_thread): Move pointer dereference
319 to after assert checks.
320
b42945fd
SM
3212015-10-29 Simon Marchi <simon.marchi@ericsson.com>
322
323 * proc-service.c (ps_pdread): Add/adjust casts.
324 (ps_pdwrite): Add/adjust casts.
325
d6f85c84
SM
3262015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
327
328 * server.c (handle_search_memory_1): Cast return value of
329 memmem.
330
f98cd059
SM
3312015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
332
333 * server.c (write_qxfer_response): Change type of data to
334 gdb_byte *.
335
d2412fa5
PA
3362015-10-29 Pedro Alves <palves@redhat.com>
337
338 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
339
c17414a2
PA
3402015-10-29 Pedro Alves <palves@redhat.com>
341
342 * tracepoint.c (clear_installed_tracepoints): Add casts.
343
e053fbc4
PA
3442015-10-29 Pedro Alves <palves@redhat.com>
345
346 * server.c (handle_v_cont, process_serial_event): Add enum
347 gdb_signal casts to signal parsing code.
348
add67df8
PA
3492015-10-29 Pedro Alves <palves@redhat.com>
350
351 * linux-low.h (NULL_REGSET): Define.
352 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
353 * linux-arm-low.c (arm_regsets): Likewise.
354 * linux-crisv32-low.c (cris_regsets): Likewise.
355 * linux-m68k-low.c (m68k_regsets): Likewise.
356 * linux-mips-low.c (mips_regsets): Likewise.
357 * linux-nios2-low.c (nios2_regsets): Likewise.
358 * linux-ppc-low.c (ppc_regsets): Likewise.
359 * linux-s390-low.c (s390_regsets): Likewise.
360 * linux-sh-low.c (sh_regsets): Likewise.
361 * linux-sparc-low.c (sparc_regsets): Likewise.
362 * linux-tic6x-low.c (tic6x_regsets): Likewise.
363 * linux-tile-low.c (tile_regsets): Likewise.
364 * linux-x86-low.c (x86_regsets): Likewise.
365 * linux-xtensa-low.c (xtensa_regsets): Likewise.
366
50bc912a
PA
3672015-10-29 Pedro Alves <palves@redhat.com>
368
369 * linux-low.h (NULL_REGSET): Define.
370 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
371 * linux-arm-low.c (arm_regsets): Likewise.
372 * linux-crisv32-low.c (cris_regsets): Likewise.
373 * linux-m68k-low.c (m68k_regsets): Likewise.
374 * linux-mips-low.c (mips_regsets): Likewise.
375 * linux-nios2-low.c (nios2_regsets): Likewise.
376 * linux-ppc-low.c (ppc_regsets): Likewise.
377 * linux-s390-low.c (s390_regsets): Likewise.
378 * linux-sh-low.c (sh_regsets): Likewise.
379 * linux-sparc-low.c (sparc_regsets): Likewise.
380 * linux-tic6x-low.c (tic6x_regsets): Likewise.
381 * linux-tile-low.c (tile_regsets): Likewise.
382 * linux-x86-low.c (x86_regsets): Likewise.
383 * linux-xtensa-low.c (xtensa_regsets): Likewise.
384
682b2546
DE
3852015-10-26 Doug Evans <dje@google.com>
386
387 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
388
963843d4
DE
3892015-10-26 Doug Evans <dje@google.com>
390
391 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
392
d41401ac
DE
3932015-10-26 Doug Evans <dje@google.com>
394
395 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
396 for debug_printf.
397 (attach_thread, find_new_threads_callback): Ditto.
398
3db28855
AT
3992015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
400
401 * mem-break.h (set_breakpoint_data): Remove.
402
fb78e89c
AT
4032015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
404
405 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
406 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
407 (initialize_low): Remove set_breakpoint_data call.
408 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
409 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
410 (initialize_low): Remove set_breakpoint_data call.
411 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
412 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
413 (initialize_low): Remove set_breakpoint_data call.
414
2e6ee069
AT
4152015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
416
417 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
418 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
419 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
420 * target.h (target_breakpoint_kind_from_pc): New macro.
421
1652a986
AT
4222015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
423
424 * linux-low.c (default_breakpoint_kind_from_pc): New function.
425 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
426 the default breakpoint kind.
427
abeead09
AT
4282015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
429
430 * linux-arm-low.c (arm_supports_z_point_type): Add software
431 breakpoint support.
432
b0b4b501
AT
4332015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
434
435 * linux-arm-low.c: Refactor breakpoint definitions.
436 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
437 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
438
8689682c
AT
4392015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
440
441 * Makefile.in: Add arm.c/o.
442 * configure.srv: Likewise.
443 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
444 (arm_breakpoint_kind_from_pc): New function.
445 (arm_sw_breakpoint_from_kind): Return proper kind.
446 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
447
27165294
AT
4482015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
449
450 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
451 removal.
452 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
453 (struct raw_breakpoint) <size>: Remove.
454 (struct raw_breakpoint) <kind>: Add.
455 (bp_size): New function.
456 (bp_opcode): Likewise.
457 (find_raw_breakpoint_at): Adjust for kind.
458 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
459 (remove_memory_breakpoint): Adjust for kind call bp_size.
460 (set_raw_breakpoint_at): Adjust for kind.
461 (set_breakpoint): Likewise.
462 (set_breakpoint_at): Call breakpoint_kind_from_pc.
463 (delete_raw_breakpoint): Adjust for kind.
464 (delete_breakpoint): Likewise.
465 (find_gdb_breakpoint): Likewise.
466 (set_gdb_breakpoint_1): Likewise.
467 (set_gdb_breakpoint): Likewise.
468 (delete_gdb_breakpoint_1): Likewise.
469 (delete_gdb_breakpoint): Likewise.
470 (uninsert_raw_breakpoint): Likewise.
471 (reinsert_raw_breakpoint): Likewise.
472 (set_breakpoint_data): Remove.
473 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
474 (check_mem_read): Adjust for kind call bp_size.
475 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
476 (clone_one_breakpoint): Adjust for kind.
477 * mem-break.h (set_gdb_breakpoint): Likewise.
478 (delete_gdb_breakpoint): Likewise.
479 * server.c (process_serial_event): Likewise.
480
dd373349
AT
4812015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
482
483 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
484 (struct linux_target_ops) <breakpoint>: Remove.
485 (struct linux_target_ops) <breakpoint_len>: Remove.
486 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
487 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
488 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
489 (arm_sw_breakpoint_from_kind): New function.
490 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
491 (struct linux_target_ops) <breakpoint>: Remove.
492 (struct linux_target_ops) <breakpoint_len>: Remove.
493 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
494 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
495 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
496 (struct linux_target_ops) <breakpoint>: Remove.
497 (struct linux_target_ops) <breakpoint_len>: Remove.
498 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
499 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
500 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
501 (struct linux_target_ops) <breakpoint>: Remove.
502 (struct linux_target_ops) <breakpoint_len>: Remove.
503 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
504 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
505 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
506 and sw_breakpoint_from_kind to increment the pc.
507 (linux_breakpoint_kind_from_pc): New function.
508 (linux_sw_breakpoint_from_kind): New function.
509 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
510 (initialize_low): Call breakpoint_kind_from_pc and
511 sw_breakpoint_from_kind to replace breakpoint_data/len.
512 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
513 New field.
514 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
515 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
516 (struct linux_target_ops) <breakpoint>: Remove.
517 (struct linux_target_ops) <breakpoint_len>: Remove.
518 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
519 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
520 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
521 (struct linux_target_ops) <breakpoint>: Remove.
522 (struct linux_target_ops) <breakpoint_len>: Remove.
523 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
524 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
525 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
526 (struct linux_target_ops) <breakpoint>: Remove.
527 (struct linux_target_ops) <breakpoint_len>: Remove.
528 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
529 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
530 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
531 (struct linux_target_ops) <breakpoint>: Remove.
532 (struct linux_target_ops) <breakpoint_len>: Remove.
533 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
534 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
535 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
536 (struct linux_target_ops) <breakpoint>: Remove.
537 (struct linux_target_ops) <breakpoint_len>: Remove.
538 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
539 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
540 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
541 (struct linux_target_ops) <breakpoint>: Remove.
542 (struct linux_target_ops) <breakpoint_len>: Remove.
543 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
544 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
545 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
546 (struct linux_target_ops) <breakpoint>: Remove.
547 (struct linux_target_ops) <breakpoint_len>: Remove.
548 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
549 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
550 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
551 (struct linux_target_ops) <breakpoint>: Remove.
552 (struct linux_target_ops) <breakpoint_len>: Remove.
553 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
554 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
555 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
556 (struct linux_target_ops) <breakpoint>: Remove.
557 (struct linux_target_ops) <breakpoint_len>: Remove.
558 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
559 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
560 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
561 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
562 (struct linux_target_ops) <breakpoint>: Remove.
563 (struct linux_target_ops) <breakpoint_len>: Remove.
564 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
565 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
566 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
567 (struct linux_target_ops) <breakpoint>: Remove.
568 (struct linux_target_ops) <breakpoint_len>: Remove.
569 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
570 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
571
4cd98a19
AT
5722015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
573
574 * linux-cris-low.c (cris_get_pc): Remove void arg.
575
774ee6d2
AR
5762015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
577
578 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
579 variable name.
580
833dcd29
AR
5812015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
582
583 * inferiors.c (thread_pid_matches_callback): New function.
584 (find_thread_process): New function.
585 (remove_thread): Reset current_thread.
586 (remove_process): Assert threads have been removed first.
587
8d689ee5
YQ
5882015-10-15 Yao Qi <yao.qi@linaro.org>
589
590 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
591 if it is 3.
592 (aarch64_remove_point): Likewise.
593 * regcache.c (regcache_register_size): New function.
594
1c2e1515
YQ
5952015-10-12 Yao Qi <yao.qi@linaro.org>
596
597 * linux-aarch64-low.c: Update all callers as emit_load_store
598 is renamed to aarch64_emit_load_store.
599
e1c587c3
YQ
6002015-10-12 Yao Qi <yao.qi@linaro.org>
601
602 * linux-aarch64-low.c: Update all callers of function renaming
603 from emit_insn to aarch64_emit_insn.
604
b6542f81
YQ
6052015-10-12 Yao Qi <yao.qi@linaro.org>
606
607 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
608 arch/aarch64-insn.h.
609 (struct aarch64_memory_operand): Likewise.
610 (ENCODE): Likewise.
611 (emit_insn): Move to arch/aarch64-insn.c.
612 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
613 (emit_load_store): Move to arch/aarch64-insn.c.
614 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
615 (can_encode_int32): Remove.
616
246994ce
YQ
6172015-10-12 Yao Qi <yao.qi@linaro.org>
618
619 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
620 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
621 (aarch64_relocate_instruction): Likewise.
622 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
623 (struct aarch64_insn_visitor): Likewise.
624
0badd99f
YQ
6252015-10-12 Yao Qi <yao.qi@linaro.org>
626
627 * linux-aarch64-low.c (struct aarch64_insn_data): New.
628 (struct aarch64_insn_visitor): New.
629 (struct aarch64_insn_relocation_data): New.
630 (aarch64_ftrace_insn_reloc_b): New function.
631 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
632 (aarch64_ftrace_insn_reloc_cb): Likewise.
633 (aarch64_ftrace_insn_reloc_tb): Likewise.
634 (aarch64_ftrace_insn_reloc_adr): Likewise.
635 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
636 (aarch64_ftrace_insn_reloc_others): Likewise.
637 (visitor): New.
638 (aarch64_relocate_instruction): Use visitor.
639
dfaffe9d
YQ
6402015-10-12 Yao Qi <yao.qi@linaro.org>
641
642 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
643 int. Add argument buf.
644 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
645 aarch64_relocate_instruction.
646
70b439f0
YQ
6472015-10-12 Yao Qi <yao.qi@linaro.org>
648
649 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
650 argument insn. Remove local variable insn. Don't call
651 target_read_uint32.
652 (aarch64_install_fast_tracepoint_jump_pad): Call
653 target_read_uint32.
654
7781c06f
YQ
6552015-09-30 Yao Qi <yao.qi@linaro.org>
656
657 * linux-aarch64-low.c (emit_movk): Shorten a long line.
658 (emit_load_store_pair): Likewise.
659
9a3c8263
SM
6602015-09-25 Simon Marchi <simon.marchi@ericsson.com>
661
662 * dll.c (match_dll): Add cast(s).
663 (unloaded_dll): Likewise.
664 * linux-low.c (second_thread_of_pid_p): Likewise.
665 (delete_lwp_callback): Likewise.
666 (count_events_callback): Likewise.
667 (select_event_lwp_callback): Likewise.
668 (linux_set_resume_request): Likewise.
669 * server.c (accumulate_file_name_length): Likewise.
670 (emit_dll_description): Likewise.
671 (handle_qxfer_threads_worker): Likewise.
672 (visit_actioned_threads): Likewise.
673 * thread-db.c (any_thread_of): Likewise.
674 * tracepoint.c (same_process_p): Likewise.
675 (match_blocktype): Likewise.
676 (build_traceframe_info_xml): Likewise.
677
224c3ddb
SM
6782015-09-25 Simon Marchi <simon.marchi@ericsson.com>
679
680 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
681 assignment.
682 (gdb_unparse_agent_expr): Likewise.
683 * hostio.c (require_data): Likewise.
684 (handle_pread): Likewise.
685 * linux-low.c (disable_regset): Likewise.
686 (fetch_register): Likewise.
687 (store_register): Likewise.
688 (get_dynamic): Likewise.
689 (linux_qxfer_libraries_svr4): Likewise.
690 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
691 (set_fast_tracepoint_jump): Likewise.
692 (uninsert_fast_tracepoint_jumps_at): Likewise.
693 (reinsert_fast_tracepoint_jumps_at): Likewise.
694 (validate_inserted_breakpoint): Likewise.
695 (clone_agent_expr): Likewise.
696 * regcache.c (init_register_cache): Likewise.
697 * remote-utils.c (putpkt_binary_1): Likewise.
698 (decode_M_packet): Likewise.
699 (decode_X_packet): Likewise.
700 (look_up_one_symbol): Likewise.
701 (relocate_instruction): Likewise.
702 (monitor_output): Likewise.
703 * server.c (handle_search_memory): Likewise.
704 (handle_qxfer_exec_file): Likewise.
705 (handle_qxfer_libraries): Likewise.
706 (handle_qxfer): Likewise.
707 (handle_query): Likewise.
708 (handle_v_cont): Likewise.
709 (handle_v_run): Likewise.
710 (captured_main): Likewise.
711 * target.c (write_inferior_memory): Likewise.
712 * thread-db.c (try_thread_db_load_from_dir): Likewise.
713 * tracepoint.c (init_trace_buffer): Likewise.
714 (add_tracepoint_action): Likewise.
715 (add_traceframe): Likewise.
716 (add_traceframe_block): Likewise.
717 (cmd_qtdpsrc): Likewise.
718 (cmd_qtdv): Likewise.
719 (cmd_qtstatus): Likewise.
720 (response_source): Likewise.
721 (response_tsv): Likewise.
722 (cmd_qtnotes): Likewise.
723 (gdb_collect): Likewise.
724 (initialize_tracepoint): Likewise.
725
afbe19f8
PL
7262015-09-21 Pierre Langlois <pierre.langlois@arm.com>
727
728 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
729 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
730 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
731 <NOP>: New.
732 (enum aarch64_condition_codes): New enum.
733 (w0): New static global.
734 (fp): Likewise.
735 (lr): Likewise.
736 (struct aarch64_memory_operand) <type>: New
737 MEMORY_OPERAND_POSTINDEX type.
738 (postindex_memory_operand): New helper function.
739 (emit_ret): New function.
740 (emit_load_store_pair): New function, factored out of emit_stp
741 with support for MEMORY_OPERAND_POSTINDEX.
742 (emit_stp): Rewrite using emit_load_store_pair.
743 (emit_ldp): New function.
744 (emit_load_store): Likewise.
745 (emit_ldr): Mention post-index instruction in comment.
746 (emit_ldrh): New function.
747 (emit_ldrb): New function.
748 (emit_ldrsw): Mention post-index instruction in comment.
749 (emit_str): Likewise.
750 (emit_subs): New function.
751 (emit_cmp): Likewise.
752 (emit_and): Likewise.
753 (emit_orr): Likewise.
754 (emit_orn): Likewise.
755 (emit_eor): Likewise.
756 (emit_mvn): Likewise.
757 (emit_lslv): Likewise.
758 (emit_lsrv): Likewise.
759 (emit_asrv): Likewise.
760 (emit_mul): Likewise.
761 (emit_sbfm): Likewise.
762 (emit_sbfx): Likewise.
763 (emit_ubfm): Likewise.
764 (emit_ubfx): Likewise.
765 (emit_csinc): Likewise.
766 (emit_cset): Likewise.
767 (emit_nop): Likewise.
768 (emit_ops_insns): New helper function.
769 (emit_pop): Likewise.
770 (emit_push): Likewise.
771 (aarch64_emit_prologue): New function.
772 (aarch64_emit_epilogue): Likewise.
773 (aarch64_emit_add): Likewise.
774 (aarch64_emit_sub): Likewise.
775 (aarch64_emit_mul): Likewise.
776 (aarch64_emit_lsh): Likewise.
777 (aarch64_emit_rsh_signed): Likewise.
778 (aarch64_emit_rsh_unsigned): Likewise.
779 (aarch64_emit_ext): Likewise.
780 (aarch64_emit_log_not): Likewise.
781 (aarch64_emit_bit_and): Likewise.
782 (aarch64_emit_bit_or): Likewise.
783 (aarch64_emit_bit_xor): Likewise.
784 (aarch64_emit_bit_not): Likewise.
785 (aarch64_emit_equal): Likewise.
786 (aarch64_emit_less_signed): Likewise.
787 (aarch64_emit_less_unsigned): Likewise.
788 (aarch64_emit_ref): Likewise.
789 (aarch64_emit_if_goto): Likewise.
790 (aarch64_emit_goto): Likewise.
791 (aarch64_write_goto_address): Likewise.
792 (aarch64_emit_const): Likewise.
793 (aarch64_emit_call): Likewise.
794 (aarch64_emit_reg): Likewise.
795 (aarch64_emit_pop): Likewise.
796 (aarch64_emit_stack_flush): Likewise.
797 (aarch64_emit_zero_ext): Likewise.
798 (aarch64_emit_swap): Likewise.
799 (aarch64_emit_stack_adjust): Likewise.
800 (aarch64_emit_int_call_1): Likewise.
801 (aarch64_emit_void_call_2): Likewise.
802 (aarch64_emit_eq_goto): Likewise.
803 (aarch64_emit_ne_goto): Likewise.
804 (aarch64_emit_lt_goto): Likewise.
805 (aarch64_emit_le_goto): Likewise.
806 (aarch64_emit_gt_goto): Likewise.
807 (aarch64_emit_ge_got): Likewise.
808 (aarch64_emit_ops_impl): New static global variable.
809 (aarch64_emit_ops): New target function, return
810 &aarch64_emit_ops_impl.
811 (struct linux_target_ops): Install it.
812
bb903df0
PL
8132015-09-21 Pierre Langlois <pierre.langlois@arm.com>
814
815 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
816 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
817 aarch64-ipa.o.
818 * linux-aarch64-ipa.c: New file.
819 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
820 and endian.h.
821 (aarch64_get_thread_area): New target method.
822 (extract_signed_bitfield): New helper function.
823 (aarch64_decode_ldr_literal): New function.
824 (enum aarch64_opcodes): New enum.
825 (struct aarch64_register): New struct.
826 (struct aarch64_operand): New struct.
827 (x0): New static global.
828 (x1): Likewise.
829 (x2): Likewise.
830 (x3): Likewise.
831 (x4): Likewise.
832 (w2): Likewise.
833 (ip0): Likewise.
834 (sp): Likewise.
835 (xzr): Likewise.
836 (aarch64_register): New helper function.
837 (register_operand): Likewise.
838 (immediate_operand): Likewise.
839 (struct aarch64_memory_operand): New struct.
840 (offset_memory_operand): New helper function.
841 (preindex_memory_operand): Likewise.
842 (enum aarch64_system_control_registers): New enum.
843 (ENCODE): New macro.
844 (emit_insn): New helper function.
845 (emit_b): New function.
846 (emit_bcond): Likewise.
847 (emit_cb): Likewise.
848 (emit_tb): Likewise.
849 (emit_blr): Likewise.
850 (emit_stp): Likewise.
851 (emit_ldp_q_offset): Likewise.
852 (emit_stp_q_offset): Likewise.
853 (emit_load_store): Likewise.
854 (emit_ldr): Likewise.
855 (emit_ldrsw): Likewise.
856 (emit_str): Likewise.
857 (emit_ldaxr): Likewise.
858 (emit_stxr): Likewise.
859 (emit_stlr): Likewise.
860 (emit_data_processing_reg): Likewise.
861 (emit_data_processing): Likewise.
862 (emit_add): Likewise.
863 (emit_sub): Likewise.
864 (emit_mov): Likewise.
865 (emit_movk): Likewise.
866 (emit_mov_addr): Likewise.
867 (emit_mrs): Likewise.
868 (emit_msr): Likewise.
869 (emit_sevl): Likewise.
870 (emit_wfe): Likewise.
871 (append_insns): Likewise.
872 (can_encode_int32_in): New helper function.
873 (aarch64_relocate_instruction): New function.
874 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
875 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
876 (struct linux_target_ops): Install aarch64_get_thread_area,
877 aarch64_install_fast_tracepoint_jump_pad and
878 aarch64_get_min_fast_tracepoint_insn_len.
879
787749ea
PL
8802015-09-21 Pierre Langlois <pierre.langlois@arm.com>
881
882 * Makefile.in (aarch64-insn.o): New rule.
883 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
884
9812b2e6
YQ
8852015-09-21 Yao Qi <yao.qi@linaro.org>
886
887 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
888
18fe412b
YQ
8892015-09-21 Yao Qi <yao.qi@linaro.org>
890
891 * tracepoint.c (max_jump_pad_size): Remove.
892
a0cc84cd
YQ
8932015-09-18 Yao Qi <yao.qi@linaro.org>
894
895 * linux-aarch64-low.c: Don't include sys/uio.h.
896 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
897
d78908cf
WW
8982015-09-16 Wei-cheng Wang <cole945@gmail.com>
899
900 * tracepoint.c (eval_result_type): Change prototype.
901 (condition_true_at_tracepoint): Fix argument to compiled_cond.
902
d57e0d50
PA
9032015-09-15 Pedro Alves <palves@redhat.com>
904
905 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
906 Check whether to report exec events instead of checking whether
907 multiprocess is enabled.
908
5a676acc
PA
9092015-09-15 Pedro Alves <palves@redhat.com>
910
911 PR remote/18965
912 * remote-utils.c (prepare_resume_reply): Merge
913 TARGET_WAITKIND_VFORK_DONE switch case with the
914 TARGET_WAITKIND_FORKED case.
915
7c5d0fad
YQ
9162015-09-15 Yao Qi <yao.qi@linaro.org>
917
918 * server.c (handle_query): Check string comparison using
919 "else if" instead of "if".
920
750ce8d1
YQ
9212015-09-15 Yao Qi <yao.qi@linaro.org>
922
923 * server.c (vCont_supported): New global variable.
924 (handle_query): Set vCont_supported to 1 if "vContSupported+"
925 matches. Append ";vContSupported+" to own_buf.
926 (handle_v_requests): Append ";s;S" to own_buf if target supports
927 hardware single step or vCont_supported is false.
928 (capture_main): Set vCont_supported to zero.
929
70b90b91
YQ
9302015-09-15 Yao Qi <yao.qi@linaro.org>
931
932 * linux-low.c (linux_supports_conditional_breakpoints): Rename
933 it to ...
934 (linux_supports_hardware_single_step): ... New function.
935 (linux_target_ops): Update.
936 * lynx-low.c (lynx_target_ops): Set field
937 supports_hardware_single_step to target_can_do_hardware_single_step.
938 * nto-low.c (nto_target_ops): Likewise.
939 * spu-low.c (spu_target_ops): Likewise.
940 * win32-low.c (win32_target_ops): Likewise.
941 * target.c (target_can_do_hardware_single_step): New function.
942 * target.h (struct target_ops) <supports_conditional_breakpoints>:
943 Remove. <supports_hardware_single_step>: New field.
944 (target_supports_conditional_breakpoints): Remove.
945 (target_supports_hardware_single_step): New macro.
946 (target_can_do_hardware_single_step): Declare.
947 * server.c (handle_query): Use target_supports_hardware_single_step
948 instead of target_supports_conditional_breakpoints.
949
ade90bde
YQ
9502015-09-15 Yao Qi <yao.qi@linaro.org>
951
952 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
953 function.
954 (struct linux_target_ops the_low_target): Install
955 aarch64_linux_siginfo_fixup.
956
94585166
DB
9572015-09-11 Don Breazeal <donb@codesourcery.com>
958 Luis Machado <lgustavo@codesourcery.com>
959
960 * linux-low.c (linux_mourn): Static declaration.
961 (linux_arch_setup): Move in front of
962 handle_extended_wait.
963 (linux_arch_setup_thread): New function.
964 (handle_extended_wait): Handle exec events. Call
965 linux_arch_setup_thread. Make event_lwp argument a
966 pointer-to-a-pointer.
967 (check_zombie_leaders): Do not check stopped threads.
968 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
969 (linux_low_filter_event): Add lwp and thread for exec'ing
970 non-leader thread if leader thread has been deleted.
971 Refactor code into linux_arch_setup_thread and call it.
972 Pass child lwp pointer by reference to handle_extended_wait.
973 (linux_wait_for_event_filtered): Update comment.
974 (linux_wait_1): Prevent clobbering exec event status.
975 (linux_supports_exec_events): New function.
976 (linux_target_ops) <supports_exec_events>: Initialize new member.
977 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
978 new member.
979 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
980 * server.c (report_exec_events): New global variable.
981 (handle_query): Handle qSupported query for exec-events feature.
982 (captured_main): Initialize report_exec_events.
983 * server.h (report_exec_events): Declare new global variable.
984 * target.h (struct target_ops) <supports_exec_events>: New
985 member.
986 (target_supports_exec_events): New macro.
987 * win32-low.c (win32_target_ops) <supports_exec_events>:
988 Initialize new member.
989
0568462b
MM
9902015-09-09 Markus Metzger <markus.t.metzger@intel.com>
991
992 * linux-low.c (linux_low_enable_btrace): Remove.
993 (linux_target_ops): Replace linux_low_enable_btrace with
994 linux_enable_btrace.
995
39edd165
YQ
9962015-09-03 Yao Qi <yao.qi@linaro.org>
997
998 * linux-aarch64-low.c (aarch64_insert_point): Call
999 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
1000 returns true.
1001
1db33b5a
UW
10022015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1003
1004 * linux-low.c (check_stopped_by_breakpoint): Use
1005 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
1006
ab290430
PA
10072015-08-27 Pedro Alves <palves@redhat.com>
1008
1009 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
1010
8d749320
SM
10112015-08-26 Simon Marchi <simon.marchi@ericsson.com>
1012
6711b7f8
SM
1013 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
1014 the XNEW-family equivalent.
8d749320
SM
1015 (compile_bytecodes): Likewise.
1016 * dll.c (loaded_dll): Likewise.
1017 * event-loop.c (append_callback_event): Likewise.
1018 (create_file_handler): Likewise.
1019 (create_file_event): Likewise.
1020 * hostio.c (handle_open): Likewise.
1021 * inferiors.c (add_thread): Likewise.
1022 (add_process): Likewise.
1023 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
1024 * linux-arm-low.c (arm_new_process): Likewise.
1025 (arm_new_thread): Likewise.
1026 * linux-low.c (add_to_pid_list): Likewise.
1027 (linux_add_process): Likewise.
1028 (handle_extended_wait): Likewise.
1029 (add_lwp): Likewise.
1030 (enqueue_one_deferred_signal): Likewise.
1031 (enqueue_pending_signal): Likewise.
1032 (linux_resume_one_lwp_throw): Likewise.
1033 (linux_resume_one_thread): Likewise.
1034 (linux_read_memory): Likewise.
1035 (linux_write_memory): Likewise.
1036 * linux-mips-low.c (mips_linux_new_process): Likewise.
1037 (mips_linux_new_thread): Likewise.
1038 (mips_add_watchpoint): Likewise.
1039 * linux-x86-low.c (initialize_low_arch): Likewise.
1040 * lynx-low.c (lynx_add_process): Likewise.
1041 * mem-break.c (set_raw_breakpoint_at): Likewise.
1042 (set_breakpoint): Likewise.
1043 (add_condition_to_breakpoint): Likewise.
1044 (add_commands_to_breakpoint): Likewise.
1045 (clone_agent_expr): Likewise.
1046 (clone_one_breakpoint): Likewise.
1047 * regcache.c (new_register_cache): Likewise.
1048 * remote-utils.c (look_up_one_symbol): Likewise.
1049 * server.c (queue_stop_reply): Likewise.
1050 (start_inferior): Likewise.
1051 (queue_stop_reply_callback): Likewise.
1052 (handle_target_event): Likewise.
1053 * spu-low.c (fetch_ppc_memory): Likewise.
1054 (store_ppc_memory): Likewise.
1055 * target.c (set_target_ops): Likewise.
1056 * thread-db.c (thread_db_load_search): Likewise.
1057 (try_thread_db_load_1): Likewise.
1058 * tracepoint.c (add_tracepoint): Likewise.
1059 (add_tracepoint_action): Likewise.
1060 (create_trace_state_variable): Likewise.
1061 (cmd_qtdpsrc): Likewise.
1062 (cmd_qtro): Likewise.
1063 (add_while_stepping_state): Likewise.
1064 * win32-low.c (child_add_thread): Likewise.
1065 (get_image_name): Likewise.
1066
ed8b7b42
YQ
10672015-08-25 Yao Qi <yao.qi@linaro.org>
1068
1069 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
1070
db3cb7cb
YQ
10712015-08-25 Yao Qi <yao.qi@linaro.org>
1072
1073 * Makefile.in (aarch64-linux.o): New rule.
1074 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
1075 srv_tgtobj.
1076 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
1077 (aarch64_init_debug_reg_state): Make it extern.
1078 (aarch64_linux_prepare_to_resume): Remove.
1079
f6011a1c
YQ
10802015-08-25 Yao Qi <yao.qi@linaro.org>
1081
1082 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
1083 lwp_arch_private_info and ptid_of_lwp.
1084
88e2cf7e
YQ
10852015-08-25 Yao Qi <yao.qi@linaro.org>
1086
1087 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
1088 Find proc_info by find_process_pid. All callers updated.
1089
5e35436e
YQ
10902015-08-25 Yao Qi <yao.qi@linaro.org>
1091
1092 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
1093 Remove.
1094 (debug_reg_change_callback): Remove.
1095 (aarch64_notify_debug_reg_change): Remove.
1096
4a8a7965
YQ
10972015-08-25 Yao Qi <yao.qi@linaro.org>
1098
1099 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
1100 Call current_lwp_ptid.
1101
32a271ee
YQ
11022015-08-25 Yao Qi <yao.qi@linaro.org>
1103
1104 * linux-aarch64-low.c (debug_reg_change_callback): Use
1105 debug_printf.
1106
0d51c8d7
YQ
11072015-08-25 Yao Qi <yao.qi@linaro.org>
1108
1109 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
1110
31a43dd5
YQ
11112015-08-25 Yao Qi <yao.qi@linaro.org>
1112
1113 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
1114
8ee52567
YQ
11152015-08-25 Yao Qi <yao.qi@linaro.org>
1116
1117 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
1118 the code.
1119
ff3f0f45
YQ
11202015-08-25 Yao Qi <yao.qi@linaro.org>
1121
1122 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
1123 Remove.
1124 (debug_reg_change_callback): Remove argument entry and add argument
1125 lwp. Remove local variable thread. Don't print thread id in the
1126 debugging output. Don't check whether pid of thread equals to pid.
1127 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
1128 iterate_over_lwps instead find_inferior.
1129
3d40fbb5
PA
11302015-08-24 Pedro Alves <palves@redhat.com>
1131
1132 * inferiors.c (get_first_process): New function.
1133 * inferiors.h (get_first_process): New declaration.
1134 * remote-utils.c (read_ptid): Default to the first process in the
1135 list, instead of to the current thread's process.
1136
438e1e42
PA
11372015-08-24 Pedro Alves <palves@redhat.com>
1138
1139 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
1140 * event-loop.c: Likewise.
1141 * remote-utils.c: Likewise.
1142 * tracepoint.c: Likewise.
1143
a8c6d4fc
PA
11442015-08-24 Pedro Alves <palves@redhat.com>
1145
1146 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
1147 ptid_get_lwp.
1148
99b0bb12
PA
11492015-08-21 Pedro Alves <palves@redhat.com>
1150
1151 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
1152 instead of literal 1.
1153
f8904751
PA
11542015-08-21 Pedro Alves <palves@redhat.com>
1155
1156 * tdesc.c (default_description): Explicitly zero-initialize.
1157
465a859e
PA
11582015-08-21 Pedro Alves <palves@redhat.com>
1159
1160 PR gdb/18749
1161 * inferiors.c (remove_thread): Discard any pending stop reply for
1162 this thread.
1163 * server.c (remove_all_on_match_pid): Rename to ...
1164 (remove_all_on_match_ptid): ... this. Work with a filter ptid
1165 instead of a pid.
1166 (discard_queued_stop_replies): Change parameter to a ptid. Now
1167 extern.
1168 (handle_v_kill, kill_inferior_callback, captured_main)
1169 (process_serial_event): Adjust.
1170 * server.h (discard_queued_stop_replies): Declare.
1171
f0db101d
PA
11722015-08-21 Pedro Alves <palves@redhat.com>
1173
1174 * linux-low.c (wait_for_sigstop): Always switch to no thread
1175 selected if the previously current thread dies.
1176 * lynx-low.c (lynx_request_interrupt): Use the first thread's
1177 process instead of the current thread's.
1178 * remote-utils.c (input_interrupt): Don't check if there's no
1179 current thread.
1180 * server.c (gdb_read_memory, gdb_write_memory): If setting the
1181 current thread to the general thread fails, error out.
1182 (handle_qxfer_auxv, handle_qxfer_libraries)
1183 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
1184 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
1185 (handle_query): Check if there's a thread selected instead of
1186 checking whether there's any thread in the thread list.
1187 (handle_qxfer_threads, handle_qxfer_btrace)
1188 (handle_qxfer_btrace_conf): Don't error out early if there's no
1189 thread in the thread list.
1190 (handle_v_cont, myresume): Don't set the current thread to the
1191 continue thread.
1192 (process_serial_event) <Hg handling>: Also set thread_id if the
1193 previous general thread is still alive.
1194 (process_serial_event) <g/G handling>: If setting the current
1195 thread to the general thread fails, error out.
1196 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
1197 thread's lwp instead of the current thread's.
1198 * target.c (set_desired_thread): If the desired thread was not
1199 found, leave the current thread pointing to NULL. Return an int
1200 (boolean) indicating success.
1201 * target.h (set_desired_thread): Change return type to int.
1202
40045d91
MF
12032015-08-20 Max Filippov <jcmvbkbc@gmail.com>
1204
1205 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
1206 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
1207 #includes.
1208 (ps_get_thread_area): New function.
1209
45face3b
GB
12102015-08-19 Gary Benson <gbenson@redhat.com>
1211
1212 * hostio.c (handle_pread): Do not attempt to read more data
1213 than hostio_reply_with_data can fit in a packet.
1214
16d5f642
JB
12152015-08-18 Joel Brobecker <brobecker@adacore.com>
1216
1217 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
1218
a738da3a
MF
12192015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
1220
1221 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
1222
33ebda9d
PA
12232015-08-06 Pedro Alves <palves@redhat.com>
1224
1225 * tracepoint.c (expr_eval_result): Now an int.
1226
a44892be
PA
12272015-08-06 Pedro Alves <palves@redhat.com>
1228
1229 * gdbthread.h (struct regcache): Forward declare.
1230 (struct thread_info) <regcache_data>: Now a struct regcache
1231 pointer.
1232 * inferiors.c (inferior_regcache_data)
1233 (set_inferior_regcache_data): Now work with struct regcache
1234 pointers.
1235 * inferiors.h (struct regcache): Forward declare.
1236 (inferior_regcache_data, set_inferior_regcache_data): Now work
1237 with struct regcache pointers.
1238 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
1239 (free_register_cache_thread): Remove struct regcache pointer
1240 casts.
1241
608a1e46
PA
12422015-08-06 Pedro Alves <palves@redhat.com>
1243
1244 * server.c (captured_main): On error, print the exception message
1245 to stderr, and if run_once is set, throw a quit.
1246
f0ce0d3a
PA
12472015-08-06 Pedro Alves <palves@redhat.com>
1248
1249 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
1250 the current thread.
1251
bf47e248
PA
12522015-08-06 Pedro Alves <palves@redhat.com>
1253
1254 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
1255 reading beyond the passed in buffer length.
1256
b6b9ffcc
PL
12572015-08-06 Pierre Langlois <pierre.langlois@arm.com>
1258
1259 * tracepoint.c (symbol_list) <required>: Remove.
1260
863d01bd
PA
12612015-08-06 Pedro Alves <palves@redhat.com>
1262
1263 * linux-low.c (handle_extended_wait): Set the fork child's suspend
1264 count if stopping and suspending threads.
1265 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
1266 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
1267 (linux_detach): Complete an ongoing step-over.
1268 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
1269 throughout.
1270 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
1271 (linux_wait_1): If passing a signal to the inferior after
1272 finishing a step-over, unsuspend and re-resume all lwps. If we
1273 see a single-step event but the thread should be continuing, don't
1274 pass the trap to gdb.
1275 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
1276 internal_error instead of gdb_assert.
1277 (enqueue_pending_signal): New function.
1278 (check_ptrace_stopped_lwp_gone): Add debug output.
1279 (start_step_over): Use internal_error instead of gdb_assert.
1280 (complete_ongoing_step_over): New function.
1281 (linux_resume_one_thread): Don't resume a suspended thread.
1282 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
1283 it stepping.
1284
00db26fa
PA
12852015-08-06 Pedro Alves <palves@redhat.com>
1286
1287 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
1288 (linux_thread_alive): Use lwp_is_marked_dead.
1289 (extended_event_reported): Delete.
1290 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
1291 instead of extended_event_reported.
1292 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
1293 as well.
1294 (lwp_is_marked_dead): New function.
1295 (lwp_running): Use lwp_is_marked_dead.
1296 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
1297 comment.
1298
ad071a30
PA
12992015-08-06 Pedro Alves <palves@redhat.com>
1300
1301 * linux-low.c (linux_wait_1): Move fork event output out of the
1302 !report_to_gdb check. Pass event_child->waitstatus to
1303 target_waitstatus_to_string instead of ourstatus.
1304
524b57e6
YQ
13052015-08-04 Yao Qi <yao.qi@linaro.org>
1306
1307 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
1308 if current_thread is 32 bit.
1309
6085d6f6
YQ
13102015-08-04 Yao Qi <yao.qi@linaro.org>
1311
1312 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
1313 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
1314 * server.c (extended_protocol): Remove "static".
1315 * server.h (extended_protocol): Declare it.
1316
8a7e4587
YQ
13172015-08-04 Yao Qi <yao.qi@linaro.org>
1318
1319 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
1320 both aarch64 and aarch32.
1321 (aarch64_set_pc): Likewise.
1322
3b53ae99
YQ
13232015-08-04 Yao Qi <yao.qi@linaro.org>
1324
1325 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
1326 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
1327 arm-with-neon.xml to srv_xmlfiles.
1328 * linux-aarch64-low.c: Include linux-aarch32-low.h.
1329 (is_64bit_tdesc): New function.
1330 (aarch64_linux_read_description): New function.
1331 (aarch64_arch_setup): Call aarch64_linux_read_description.
1332 (regs_info): Rename to regs_info_aarch64.
1333 (aarch64_regs_info): Return right regs_info.
1334 (initialize_low_arch): Call initialize_low_arch_aarch32.
1335
bd9e6534
YQ
13362015-08-04 Yao Qi <yao.qi@linaro.org>
1337
1338 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
1339 * linux-aarch32-low.c: New file.
1340 * linux-aarch32-low.h: New file.
1341 * linux-arm-low.c (arm_fill_gregset): Move it to
1342 linux-aarch32-low.c.
1343 (arm_store_gregset): Likewise.
1344 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
1345 (arm_store_vfpregset): Call arm_store_vfpregset_num.
1346 (arm_arch_setup): Check if PTRACE_GETREGSET works.
1347 (regs_info): Rename to regs_info_arm.
1348 (arm_regs_info): Return regs_info_aarch32 if
1349 have_ptrace_getregset is 1 and target description is
1350 arm_with_neon or arm_with_vfpv3.
1351 (initialize_low_arch): Don't call init_registers_arm_with_neon.
1352 Call initialize_low_arch_aarch32 instead.
1353
ded48a5e
YQ
13542015-08-04 Yao Qi <yao.qi@linaro.org>
1355
1356 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
1357 * linux-low.c: ... here.
1358 * linux-low.h (have_ptrace_getregset): Declare it.
1359
96e9210f
PA
13602015-08-04 Pedro Alves <palves@redhat.com>
1361
1362 * thread-db.c (struct thread_db): Use new typedefs.
1363 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
1364 CHK calls.
1365 (disable_thread_event_reporting): Cast result of dlsym to
1366 destination function pointer type.
1367 (thread_db_mourn): Use td_ta_delete_ftype.
1368
af60a1ef
SL
13692015-08-03 Sandra Loosemore <sandra@codesourcery.com>
1370
1371 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
1372 arch variant.
1373 (CDX_BREAKPOINT): Define for R2.
1374 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
1375 (the_low_target): Add comments.
1376
e8b41681
YQ
13772015-07-30 Yao Qi <yao.qi@linaro.org>
1378
1379 * linux-arm-low.c (arm_hwcap): Remove it.
1380 (arm_read_description): New local variable arm_hwcap. Don't
1381 set arm_hwcap to zero.
1382
89abb039
YQ
13832015-07-30 Yao Qi <yao.qi@linaro.org>
1384
1385 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
1386 Use regcache->tdesc instead.
1387 (arm_store_wmmxregset): Likewise.
1388 (arm_fill_vfpregset): Likewise.
1389 (arm_store_vfpregset): Likewise.
1390
deca266c
YQ
13912015-07-30 Yao Qi <yao.qi@linaro.org>
1392
1393 * linux-arm-low.c: Include arch/arm.h.
1394 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
1395 (arm_store_gregset): Likewise.
1396
aa58a496
SM
13972015-07-29 Simon Marchi <simon.marchi@ericsson.com>
1398
1399 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
1400 ptrace's 4th parameter.
1401
50904b25
YQ
14022015-07-27 Yao Qi <yao.qi@linaro.org>
1403
1404 * configure.srv (case aarch64*-*-linux*): Don't set
1405 srv_linux_usrregs.
1406
5826e159
PA
14072015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
1408
1409 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
1410 sys/ptrace.h.
1411 * linux-arm-low.c: Likewise.
1412 * linux-cris-low.c: Likewise.
1413 * linux-crisv32-low.c: Likewise.
1414 * linux-low.c: Likewise.
1415 * linux-m68k-low.c: Likewise.
1416 * linux-mips-low.c: Likewise.
1417 * linux-nios2-low.c: Likewise.
1418 * linux-s390-low.c: Likewise.
1419 * linux-sparc-low.c: Likewise.
1420 * linux-tic6x-low.c: Likewise.
1421 * linux-tile-low.c: Likewise.
1422 * linux-x86-low.c: Likewise.
1423
54019719
PA
14242015-07-24 Pedro Alves <palves@redhat.com>
1425
1426 * config.in: Regenerate.
1427 * configure: Regenerate.
1428
eb7aa561
PA
14292015-07-24 Pedro Alves <palves@redhat.com>
1430
1431 * acinclude.m4: Include ../ptrace.m4.
1432 * configure.ac: Call GDB_AC_PTRACE.
1433 * config.in, configure: Regenerate.
1434
55d7b841
YQ
14352015-07-24 Yao Qi <yao.qi@linaro.org>
1436
1437 * linux-low.c (linux_create_inferior): Remove setting to
1438 proc->priv->new_inferior.
1439 (linux_attach): Likewise.
1440 (linux_low_filter_event): Likewise.
1441 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
1442
c06cbd92
YQ
14432015-07-24 Yao Qi <yao.qi@linaro.org>
1444
1445 * linux-low.c (linux_arch_setup): New function.
1446 (linux_low_filter_event): If proc->tdesc is NULL and
1447 proc->attached is true, call the_low_target.arch_setup.
1448 Otherwise, keep status pending, and return.
1449 (linux_resume_one_lwp_throw): Don't call get_pc if
1450 thread->while_stepping isn't NULL. Don't call
1451 get_thread_regcache if proc->tdesc is NULL.
1452 (need_step_over_p): Return 0 if proc->tdesc is NULL.
1453 (linux_target_ops): Install arch_setup.
1454 * server.c (start_inferior): Call the_target->arch_setup.
1455 * target.h (struct target_ops) <arch_setup>: New field.
1456 (target_arch_setup): New marco.
1457 * lynx-low.c (lynx_target_ops): Update.
1458 * nto-low.c (nto_target_ops): Update.
1459 * spu-low.c (spu_target_ops): Update.
1460 * win32-low.c (win32_target_ops): Update.
1461
5ae3ebba
YQ
14622015-07-24 Yao Qi <yao.qi@linaro.org>
1463
1464 * linux-low.c (linux_add_process): Don't set
1465 proc->priv->new_inferior.
1466 (linux_create_inferior): Set proc->priv->new_inferior to 1.
1467 (linux_attach): Likewise.
1468
eb97750b
YQ
14692015-07-24 Yao Qi <yao.qi@linaro.org>
1470
1471 * server.c (start_inferior): Code refactor.
1472
51aee833
YQ
14732015-07-24 Yao Qi <yao.qi@linaro.org>
1474
1475 * server.c (process_serial_event): Set general_thread.
1476
af1b22f3
YQ
14772015-07-21 Yao Qi <yao.qi@linaro.org>
1478
1479 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
1480 aarch64_linux_get_debug_reg_capacity.
1481
554717a3
YQ
14822015-07-17 Yao Qi <yao.qi@linaro.org>
1483
1484 * Makefile.in (aarch64-linux-hw-point.o): New rule.
1485 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
1486 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
1487 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
1488 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
1489 (AARCH64_HWP_ALIGNMENT): Likewise.
1490 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
1491 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
1492 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
1493 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
1494 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
1495 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
1496 (struct aarch64_debug_reg_state): Likewise.
1497 (struct arch_lwp_info): Likewise.
1498 (aarch64_align_watchpoint): Likewise.
1499 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
1500 (aarch64_watchpoint_length): Likewise.
1501 (aarch64_point_encode_ctrl_reg): Likewise
1502 (aarch64_point_is_aligned): Likewise.
1503 (aarch64_align_watchpoint): Likewise.
1504 (aarch64_linux_set_debug_regs):
1505 (aarch64_dr_state_insert_one_point): Likewise.
1506 (aarch64_dr_state_remove_one_point): Likewise.
1507 (aarch64_handle_breakpoint): Likewise.
1508 (aarch64_handle_aligned_watchpoint): Likewise.
1509 (aarch64_handle_unaligned_watchpoint): Likewise.
1510 (aarch64_handle_watchpoint): Likewise.
1511
c67ca4de
YQ
15122015-07-17 Yao Qi <yao.qi@linaro.org>
1513
1514 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
1515 and don't aarch64_get_debug_reg_state. All callers update.
1516 (aarch64_handle_aligned_watchpoint): Likewise.
1517 (aarch64_handle_unaligned_watchpoint): Likewise.
1518 (aarch64_handle_watchpoint): Likewise.
1519 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
1520 (aarch64_remove_point): Likewise.
1521
25abf979
YQ
15222015-07-17 Yao Qi <yao.qi@linaro.org>
1523
1524 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
1525 debug_printf.
1526 (aarch64_handle_unaligned_watchpoint): Likewise.
1527
db1ff28b
JK
15282015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
1529
1530 Revert the previous 3 commits:
1531 Move gdb_regex* to common/
1532 Move linux_find_memory_regions_full & co.
1533 gdbserver build-id attribute generator
1534
700ca40f
JK
15352015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1536 Jan Kratochvil <jan.kratochvil@redhat.com>
1537
1538 gdbserver build-id attribute generator.
1539 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
1540 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
1541 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
1542 (find_phdr): New.
1543 (get_dynamic): Use find_pdhr to traverse program headers.
1544 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
1545 (compare_mapping_entry_range, struct find_memory_region_callback_data)
1546 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
1547 (get_hex_build_id): New.
1548 (linux_qxfer_libraries_svr4): Add optional build-id attribute
1549 to reply XML document.
1550
9904185c
JK
15512015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1552 Jan Kratochvil <jan.kratochvil@redhat.com>
1553
1554 * target.c: Include target/target-utils.h and fcntl.h.
1555 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
1556 (target_fileio_read_stralloc): New functions.
1557
6e5b4429
JK
15582015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
1559
1560 * Makefile.in (OBS): Add gdb_regex.o.
1561 (gdb_regex.o): New.
1562 * config.in: Rebuilt.
1563 * configure: Rebuilt.
1564
ddc98fbf
JK
15652015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1566 Jan Kratochvil <jan.kratochvil@redhat.com>
1567
1568 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
1569 * Makefile.in (OBS): Add target-utils.o.
1570 (linux-maps.o, target-utils.o): New.
1571 * configure.srv (srv_linux_obj): Add linux-maps.o.
1572
e57bb7a0
PL
15732015-07-15 Pierre Langlois <pierre.langlois@arm.com>
1574
1575 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
1576 function, return 1.
1577 (the_low_target): Install it.
1578
586b02a9
PA
15792015-07-14 Pedro Alves <palves@redhat.com>
1580
1581 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
1582 Instead, ignore ECHILD, and throw an error for other errnos.
1583
58c1b36c
PA
15842015-07-10 Pedro Alves <palves@redhat.com>
1585
1586 * event-loop.c (struct callback_event) <data>: Change type to
1587 gdb_client_data instance instead of gdb_client_data pointer.
1588 (append_callback_event): Adjust.
1589
421530db
PL
15902015-07-10 Pierre Langlois <pierre.langlois@arm.com>
1591
1592 * linux-aarch64-low.c: Add comments for each linux_target_ops
1593 method. Remove comments already covered in target_ops and
1594 linux_target_ops definitions.
1595 (the_low_target): Add comments for each unimplemented method.
1596
c2d65f38
YQ
15972015-07-09 Yao Qi <yao.qi@linaro.org>
1598
1599 * linux-aarch64-low.c (aarch64_regmap): Remove.
1600 (aarch64_usrregs_info): Remove.
1601 (regs_info): Set field usrregs to NULL.
1602
b20a6524
MM
16032015-07-02 Markus Metzger <markus.t.metzger@intel.com>
1604
1605 * linux-low.c: Include "rsp-low.h"
1606 (linux_low_encode_pt_config, linux_low_encode_raw): New.
1607 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
1608 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
1609 (handle_btrace_enable_pt): New.
1610 (handle_btrace_general_set): Support "pt".
1611 (handle_btrace_conf_general_set): Support "pt:size".
1612
96c97461
PL
16132015-06-29 Pierre Langlois <pierre.langlois@arm.com>
1614
1615 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
1616 Z_PACKET_SW_BP.
1617
37d66942
PL
16182015-06-29 Pierre Langlois <pierre.langlois@arm.com>
1619
1620 * linux-aarch64-low.c: Remove comment about endianness.
1621 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
1622 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
1623 memcmp.
1624
dc06243f
GB
16252015-06-24 Gary Benson <gbenson@redhat.com>
1626
1627 * linux-i386-ipa.c (stdint.h): Do not include.
1628 * lynx-i386-low.c (stdint.h): Likewise.
1629 * lynx-ppc-low.c (stdint.h): Likewise.
1630 * mem-break.c (stdint.h): Likewise.
1631 * thread-db.c (stdint.h): Likewise.
1632 * tracepoint.c (stdint.h): Likewise.
1633 * win32-low.c (stdint.h): Likewise.
1634
124e13d9
SM
16352015-06-18 Simon Marchi <simon.marchi@ericsson.com>
1636
1637 * server.c (write_qxfer_response): Update call to
1638 remote_escape_output.
1639
909c2cda
JK
16402015-06-15 Aleksandar Ristovski <aristovski@qnx.com
1641 Jan Kratochvil <jan.kratochvil@redhat.com>
1642
1643 Merge multiple hex conversions.
1644 * gdbreplay.c (tohex): Rename to 'fromhex'.
1645 (logchar): Use fromhex.
1646
24c05f46
JK
16472015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
1648
1649 * server.c (handle_qxfer_libraries): Set `version' attribute for
1650 <library-list>.
1651
14d2069a
GB
16522015-06-10 Gary Benson <gbenson@redhat.com>
1653
1654 * target.h (struct target_ops) <multifs_open>: New field.
1655 <multifs_unlink>: Likewise.
1656 <multifs_readlink>: Likewise.
1657 * linux-low.c (nat/linux-namespaces.h): New include.
1658 (linux_target_ops): Initialize the_target->multifs_open,
1659 the_target->multifs_unlink and the_target->multifs_readlink.
1660 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
1661 * hostio.c (hostio_fs_pid): New static variable.
1662 (hostio_handle_new_gdb_connection): New function.
1663 (handle_setfs): Likewise.
1664 (handle_open): Use the_target->multifs_open as appropriate.
1665 (handle_unlink): Use the_target->multifs_unlink as appropriate.
1666 (handle_readlink): Use the_target->multifs_readlink as
1667 appropriate.
1668 (handle_vFile): Handle vFile:setfs packets.
1669 * server.c (handle_query): Call hostio_handle_new_gdb_connection
1670 after target_handle_new_gdb_connection.
1671
4b8b5e72
GB
16722015-06-10 Gary Benson <gbenson@redhat.com>
1673
1674 * configure.ac (AC_CHECK_FUNCS): Add setns.
1675 * config.in: Regenerate.
1676 * configure: Likewise.
1677 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
1678 (linux-namespaces.o): New rule.
1679 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
1680
3ac2e371
GB
16812015-06-09 Gary Benson <gbenson@redhat.com>
1682
1683 * hostio.c (handle_open): Process mode argument with
1684 fileio_to_host_mode.
1685
ca9b78ce
YQ
16862015-06-01 Yao Qi <yao.qi@linaro.org>
1687
1688 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
1689 * linux-x86-low.c: Likewise.
1690
bfacd19d
DB
16912015-05-28 Don Breazeal <donb@codesourcery.com>
1692
1693 * linux-low.c (handle_extended_wait): Initialize
1694 thread_info.last_resume_kind for new fork children.
1695
452003ef
PA
16962015-05-15 Pedro Alves <palves@redhat.com>
1697
1698 * target.h (target_handle_new_gdb_connection): Rewrite using if
1699 wrapped in do/while.
1700
1041a03c
JB
17012015-05-14 Joel Brobecker <brobecker@adacore.com>
1702
1703 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
1704 * configure, config.in: Regenerate.
1705 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
1706 Declare typedef.
1707
c269dbdb
DB
17082015-05-12 Don Breazeal <donb@codesourcery.com>
1709
1710 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
1711 PTRACE_EVENT_VFORK_DONE.
1712 (linux_low_ptrace_options, extended_event_reported): Add vfork
1713 events.
1714 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
1715 and "vforkdone" for RSP 'T' Stop Reply Packet.
1716 * server.h (report_vfork_events): Declare
1717 global variable.
1718
3a8a0396
DB
17192015-05-12 Don Breazeal <donb@codesourcery.com>
1720
1721 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
1722 (the_low_target) <new_fork>: Initialize new member.
1723 * linux-arm-low.c (arm_new_fork): New function.
1724 (the_low_target) <new_fork>: Initialize new member.
1725 * linux-low.c (handle_extended_wait): Call new target function
1726 new_fork.
1727 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
1728 * linux-mips-low.c (mips_add_watchpoint): New function
1729 extracted from mips_insert_point.
1730 (the_low_target) <new_fork>: Initialize new member.
1731 (mips_linux_new_fork): New function.
1732 (mips_insert_point): Call mips_add_watchpoint.
1733 * linux-x86-low.c (x86_linux_new_fork): New function.
1734 (the_low_target) <new_fork>: Initialize new member.
1735
de0d863e
DB
17362015-05-12 Don Breazeal <donb@codesourcery.com>
1737
1738 * linux-low.c (handle_extended_wait): Implement return value,
1739 rename argument 'event_child' to 'event_lwp', handle
1740 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
1741 (linux_low_ptrace_options): New function.
1742 (linux_low_filter_event): Call linux_low_ptrace_options,
1743 use different argument fo linux_enable_event_reporting,
1744 use return value from handle_extended_wait.
1745 (extended_event_reported): New function.
1746 (linux_wait_1): Call extended_event_reported and set
1747 status to report fork events.
1748 (linux_write_memory): Add pid to debug message.
1749 (reset_lwp_ptrace_options_callback): New function.
1750 (linux_handle_new_gdb_connection): New function.
1751 (linux_target_ops): Initialize new structure member.
1752 * linux-low.h (struct lwp_info) <waitstatus>: New member.
1753 * lynx-low.c: Initialize new structure member.
1754 * remote-utils.c (prepare_resume_reply): Implement stop reason
1755 "fork" for "T" stop message.
1756 * server.c (handle_query): Call handle_new_gdb_connection.
1757 * server.h (report_fork_events): Declare global flag.
1758 * target.h (struct target_ops) <handle_new_gdb_connection>:
1759 New member.
1760 (target_handle_new_gdb_connection): New macro.
1761 * win32-low.c: Initialize new structure member.
1762
ddcbc397
DB
17632015-05-12 Don Breazeal <donb@codesourcery.com>
1764
1765 * mem-break.c (APPEND_TO_LIST): Define macro.
1766 (clone_agent_expr): New function.
1767 (clone_one_breakpoint): New function.
1768 (clone_all_breakpoints): New function.
1769 * mem-break.h: Declare new functions.
1770
89245bc0
DB
17712015-05-12 Don Breazeal <donb@codesourcery.com>
1772
1773 * linux-low.c (linux_supports_fork_events): New function.
1774 (linux_supports_vfork_events): New function.
1775 (linux_target_ops): Initialize new structure members.
1776 (initialize_low): Call linux_check_ptrace_features.
1777 * lynx-low.c (lynx_target_ops): Initialize new structure
1778 members.
1779 * server.c (report_fork_events, report_vfork_events):
1780 New global flags.
1781 (handle_query): Add new features to qSupported packet and
1782 response.
1783 (captured_main): Initialize new global variables.
1784 * target.h (struct target_ops) <supports_fork_events>:
1785 New member.
1786 <supports_vfork_events>: New member.
1787 (target_supports_fork_events): New macro.
1788 (target_supports_vfork_events): New macro.
1789 * win32-low.c (win32_target_ops): Initialize new structure
1790 members.
1791
835205d0
GB
17922015-05-12 Gary Benson <gbenson@redhat.com>
1793
1794 * server.c (handle_qxfer_exec_file): Use current process
1795 if annex is empty.
1796
21e94bd9
SL
17972015-05-08 Sandra Loosemore <sandra@codesourcery.com>
1798
1799 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
1800 Remove HAVE_PTRACE_GETREGS conditionals.
1801 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
1802 instead of PTRACE_GETREGS and PTRACE_SETREGS.
1803
45614f15
YQ
18042015-05-08 Yao Qi <yao.qi@linaro.org>
1805
1806 * linux-low.c (linux_supports_conditional_breakpoints): New
1807 function.
1808 (linux_target_ops): Install new target method.
1809 * lynx-low.c (lynx_target_ops): Install NULL hook for
1810 supports_conditional_breakpoints.
1811 * nto-low.c (nto_target_ops): Likewise.
1812 * spu-low.c (spu_target_ops): Likewise.
1813 * win32-low.c (win32_target_ops): Likewise.
1814 * server.c (handle_query): Check
1815 target_supports_conditional_breakpoints.
1816 * target.h (struct target_ops) <supports_conditional_breakpoints>:
1817 New field.
1818 (target_supports_conditional_breakpoints): New macro.
1819
80ad801e
PA
18202015-05-06 Pedro Alves <palves@redhat.com>
1821
1822 PR server/18081
1823 * server.c (start_inferior): If the process exits, mourn it.
1824
819843c7
GB
18252015-04-21 Gary Benson <gbenson@redhat.com>
1826
1827 * hostio.c (fileio_open_flags_to_host): Factored out to
1828 fileio_to_host_openflags in common/fileio.c. Single use
1829 updated.
1830
a2d5a9d7
MF
18312015-04-17 Max Filippov <jcmvbkbc@gmail.com>
1832
1833 * linux-xtensa-low.c (xtensa_fill_gregset)
1834 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
1835 XCHAL_HAVE_LOOP.
1836
deb44829
MF
18372015-04-17 Max Filippov <jcmvbkbc@gmail.com>
1838
1839 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
1840 (regs_info): Replace usrregs pointer with NULL.
1841
e57f1de3
GB
18422015-04-17 Gary Benson <gbenson@redhat.com>
1843
1844 * target.h (struct target_ops) <pid_to_exec_file>: New field.
1845 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
1846 * server.c (handle_qxfer_exec_file): New function.
1847 (qxfer_packets): Add exec-file entry.
1848 (handle_query): Report qXfer:exec-file:read as supported packet.
1849
62828379
RN
18502015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
1851
1852 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
1853
b88bb450
GB
18542015-04-09 Gary Benson <gbenson@redhat.com>
1855
1856 * hostio-errno.c (errno_to_fileio_error): Remove function.
1857 Update caller to use remote_fileio_to_fio_error.
1858
c8f4bfdd
YQ
18592015-04-09 Yao Qi <yao.qi@linaro.org>
1860
1861 * linux-low.c (linux_insert_point): Call
1862 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
1863 (linux_remove_point): Call remove_memory_breakpoint if type is
1864 raw_bkpt_type_sw.
1865 * linux-x86-low.c (x86_insert_point): Don't call
1866 insert_memory_breakpoint.
1867 (x86_remove_point): Don't call remove_memory_breakpoint.
1868
41f98f02
PA
18692015-04-01 Pedro Alves <palves@redhat.com>
1870 Cleber Rosa <crosa@redhat.com>
1871
1872 * server.c (gdbserver_usage): Reorganize and extend the usage
1873 message.
1874
2bf6fb9d
PA
18752015-03-24 Pedro Alves <palves@redhat.com>
1876
1877 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
1878 output. Also dump TRAP_TRACE.
1879 (linux_low_filter_event): In debug output, distinguish a
1880 resume_stop SIGSTOP from a delayed SIGSTOP.
1881
369f6daa
GB
18822015-03-24 Gary Benson <gbenson@redhat.com>
1883
1884 * linux-x86-low.c (x86_linux_new_thread): Moved to
1885 nat/x86-linux.c.
1886 (x86_linux_prepare_to_resume): Likewise.
1887
8e5d4070
GB
18882015-03-24 Gary Benson <gbenson@redhat.com>
1889
1890 * Makefile.in (x86-linux-dregs.o): New rule.
1891 * configure.srv: Add x86-linux-dregs.o to relevant targets.
1892 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
1893 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
1894 (x86_linux_dr_get): Likewise.
1895 (x86_linux_dr_set): Likewise.
1896 (update_debug_registers_callback): Likewise.
1897 (x86_linux_dr_set_addr): Likewise.
1898 (x86_linux_dr_get_addr): Likewise.
1899 (x86_linux_dr_set_control): Likewise.
1900 (x86_linux_dr_get_control): Likewise.
1901 (x86_linux_dr_get_status): Likewise.
1902 (x86_linux_update_debug_registers): Likewise.
1903
2b95d440
GB
19042015-03-24 Gary Benson <gbenson@redhat.com>
1905
1906 * linux-x86-low.c (x86_linux_update_debug_registers):
1907 New function, factored out from...
1908 (x86_linux_prepare_to_resume): ...this.
1909
14b0bc68
GB
19102015-03-24 Gary Benson <gbenson@redhat.com>
1911
1912 * linux-x86-low.c (x86_linux_dr_get): Update comments.
1913 (x86_linux_dr_set): Likewise.
1914 (update_debug_registers_callback): Likewise.
1915 (x86_linux_dr_set_addr): Likewise.
1916 (x86_linux_dr_get_addr): Likewise.
1917 (x86_linux_dr_set_control): Likewise.
1918 (x86_linux_dr_get_control): Likewise.
1919 (x86_linux_dr_get_status): Likewise.
1920 (x86_linux_prepare_to_resume): Likewise.
1921
5dfe6ca8
GB
19222015-03-24 Gary Benson <gbenson@redhat.com>
1923
1924 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
1925 Use perror_with_name. Pass string through gettext.
1926 (x86_linux_dr_set): Likewise.
1927
d33472ad
GB
19282015-03-24 Gary Benson <gbenson@redhat.com>
1929
1930 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
1931 (x86_linux_dr_set_addr): ...this.
1932 (x86_dr_low_get_addr): Rename to...
1933 (x86_linux_dr_get_addr): ...this.
1934 (x86_dr_low_set_control): Rename to...
1935 (x86_linux_dr_set_control): ...this.
1936 (x86_dr_low_get_control): Rename to...
1937 (x86_linux_dr_get_control): ...this.
1938 (x86_dr_low_get_status): Rename to...
1939 (x86_linux_dr_get_status): ...this.
1940 (x86_dr_low): Update with new function names.
1941
4b134ca1
GB
19422015-03-24 Gary Benson <gbenson@redhat.com>
1943
1944 * Makefile.in (x86-linux.o): New rule.
1945 * configure.srv: Add x86-linux.o to relevant targets.
1946 * linux-low.c (lwp_set_arch_private_info): New function.
1947 (lwp_arch_private_info): Likewise.
1948 * linux-x86-low.c: Include nat/x86-linux.h.
1949 (arch_lwp_info): Removed structure.
1950 (update_debug_registers_callback):
1951 Use lwp_set_debug_registers_changed.
1952 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
1953 and lwp_set_debug_registers_changed.
1954 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
1955
34c703da
GB
19562015-03-24 Gary Benson <gbenson@redhat.com>
1957
1958 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
1959 * linux-arm-low.c (arm_new_thread): Likewise.
1960 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
1961 * linux-mips-low.c (mips_linux_new_thread): Likewise.
1962 * linux-x86-low.c (x86_linux_new_thread): Likewise.
1963 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
1964
cff068da
GB
19652015-03-24 Gary Benson <gbenson@redhat.com>
1966
1967 * linux-low.c (ptid_of_lwp): New function.
1968 (lwp_is_stopped): Likewise.
1969 (lwp_stop_reason): Likewise.
1970 * linux-x86-low.c (update_debug_registers_callback):
1971 Use lwp_is_stopped.
1972 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
1973 lwp_stop_reason.
1974
b2f7c7e8
GB
19752015-03-24 Gary Benson <gbenson@redhat.com>
1976
1977 * linux-low.h (linux_stop_lwp): Remove declaration.
1978
6d4ee8c6
GB
19792015-03-24 Gary Benson <gbenson@redhat.com>
1980
1981 * linux-low.h: Include nat/linux-nat.h.
1982 * linux-low.c (iterate_over_lwps_args): New structure.
1983 (iterate_over_lwps_filter): New function.
1984 (iterate_over_lwps): Likewise.
1985 * linux-x86-low.c (update_debug_registers_callback):
1986 Update signature to what iterate_over_lwps expects.
1987 Remove PID check that iterate_over_lwps now performs.
1988 (x86_dr_low_set_addr): Use iterate_over_lwps.
1989 (x86_dr_low_set_control): Likewise.
1990
70a0bb6b
GB
19912015-03-24 Gary Benson <gbenson@redhat.com>
1992
1993 * linux-x86-low.c (x86_debug_reg_state): New function.
1994 (x86_linux_prepare_to_resume): Use the above.
1995
7b669087
GB
19962015-03-24 Gary Benson <gbenson@redhat.com>
1997
1998 * linux-low.c (current_lwp_ptid): New function.
1999 * linux-x86-low.c: Include nat/linux-nat.h.
2000 (x86_dr_low_get_addr): Use current_lwp_ptid.
2001 (x86_dr_low_get_control): Likewise.
2002 (x86_dr_low_get_status): Likewise.
2003
eef49a3d
PA
20042015-03-20 Pedro Alves <palves@redhat.com>
2005
2006 * tracepoint.c (cmd_qtstatus): Make "str" const.
2007
b2333d22
PA
20082015-03-20 Pedro Alves <palves@redhat.com>
2009
2010 * server.c (handle_general_set): Make "req_str" const.
2011
23f238d3
PA
20122015-03-19 Pedro Alves <palves@redhat.com>
2013
2014 * linux-low.c (linux_resume_one_lwp): Rename to ...
2015 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
2016 instead call perror_with_name.
2017 (check_ptrace_stopped_lwp_gone): New function.
2018 (linux_resume_one_lwp): Reimplement as wrapper around
2019 linux_resume_one_lwp_throw that swallows errors if the LWP is
2020 gone.
2021
91baf43f
PA
20222015-03-19 Pedro Alves <palves@redhat.com>
2023
2024 * linux-low.c (count_events_callback, select_event_lwp_callback):
2025 No longer check whether the thread has resume_stop as last resume
2026 kind.
2027
8bf3b159
PA
20282015-03-19 Pedro Alves <palves@redhat.com>
2029
2030 * linux-low.c (count_events_callback, select_event_lwp_callback):
2031 Use the lwp's status_pending_p field, not the thread's.
2032
b90fc188
PA
20332015-03-19 Pedro Alves <palves@redhat.com>
2034
2035 * linux-low.c (select_event_lwp_callback): Update comments to
2036 no longer mention SIGTRAP.
2037
464b0089
GB
20382015-03-18 Gary Benson <gbenson@redhat.com>
2039
2040 * server.c (handle_query): Do not report vFile:fstat as supported.
2041
aa9e327f
GB
20422015-03-11 Gary Benson <gbenson@redhat.com>
2043
2044 * hostio.c (sys/types.h): New include.
2045 (sys/stat.h): Likewise.
2046 (common-remote-fileio.h): Likewise.
2047 (handle_fstat): New function.
2048 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 2049
791c0056
GB
20502015-03-11 Gary Benson <gbenson@redhat.com>
2051
2052 * configure.ac (AC_CHECK_MEMBERS): Add checks for
2053 struct stat.st_blocks and struct stat.st_blksize.
2054 * configure: Regenerate.
2055 * config.in: Likewise.
2056 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
2057 (OBS): Add common-remote-fileio.o.
2058 (common-remote-fileio.o): New rule.
2059
9a9df970
PA
20602015-03-09 Pedro Alves <palves@redhat.com>
2061
2062 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
2063 'struct sockaddr' pointer in 'accept' call.
2064
9eb1356e
PA
20652015-03-09 Pedro Alves <palves@redhat.com>
2066
2067 Revert:
2068 2015-03-07 Pedro Alves <palves@redhat.com>
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
aac331e4
PA
20802015-03-07 Pedro Alves <palves@redhat.com>
2081
2082 * configure.ac (build_warnings): Move
2083 -Wdeclaration-after-statement to the C-specific set.
2084 * configure: Regenerate.
2085
366c75fc
PA
20862015-03-07 Pedro Alves <palves@redhat.com>
2087
2088 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
2089 or <winsock2.h> here. Instead include "gdb_socket.h".
2090 (remote_open): Use union gdb_sockaddr_u.
2091 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
2092 or <winsock2.h> here. Instead include "gdb_socket.h".
2093 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
2094 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
2095 or <sys/un.h>.
2096 (init_named_socket, gdb_agent_helper_thread): Use union
2097 gdb_sockaddr_u.
2098
492d29ea
PA
20992015-03-07 Pedro Alves <palves@redhat.com>
2100
2101 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
2102 instead.
2103
60a191ed
YQ
21042015-03-06 Yao Qi <yao.qi@linaro.org>
2105
2106 * linux-aarch64-low.c (aarch64_insert_point): Use
2107 show_debug_regs as a boolean.
2108 (aarch64_remove_point): Likewise.
2109
f5771b1d
PA
21102015-03-05 Pedro Alves <palves@redhat.com>
2111
2112 * lynx-low.c (lynx_target_ops): Install NULL hooks for
2113 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
2114 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
2115 * nto-low.c (nto_target_ops): Likewise.
2116 * spu-low.c (spu_target_ops): Likewise.
2117 * win32-low.c (win32_target_ops): Likewise.
2118
3e572f71
PA
21192015-03-04 Pedro Alves <palves@redhat.com>
2120
72f4393d 2121 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
2122 Decide whether a breakpoint triggered based on the SIGTRAP's
2123 siginfo.si_code.
72f4393d
L
2124 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
2125 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
2126 (linux_low_filter_event): Check for breakpoints before checking
2127 watchpoints.
2128 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
2129 siginfo.si_code.
72f4393d
L
2130 (linux_stopped_by_sw_breakpoint)
2131 (linux_supports_stopped_by_sw_breakpoint)
2132 (linux_stopped_by_hw_breakpoint)
2133 (linux_supports_stopped_by_hw_breakpoint): New functions.
2134 (linux_target_ops): Install new target methods.
3e572f71 2135
1ec68e26
PA
21362015-03-04 Pedro Alves <palves@redhat.com>
2137
2138 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
2139 * server.c (swbreak_feature, hwbreak_feature): New globals.
2140 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
2141 (captured_main): Clear swbreak_feature and hwbreak_feature.
2142 * server.h (swbreak_feature, hwbreak_feature): Declare.
2143 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
2144 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
2145 supports_stopped_by_hw_breakpoint>: New fields.
2146 (target_supports_stopped_by_sw_breakpoint)
2147 (target_stopped_by_sw_breakpoint)
2148 (target_supports_stopped_by_hw_breakpoint)
2149 (target_stopped_by_hw_breakpoint): Declare.
2150
15c66dd6
PA
21512015-03-04 Pedro Alves <palves@redhat.com>
2152
2153 enum lwp_stop_reason -> enum target_stop_reason
2154 * linux-low.c (check_stopped_by_breakpoint): Adjust.
2155 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
2156 (linux_wait_1, stuck_in_jump_pad_callback)
2157 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
2158 (linux_stopped_by_watchpoint):
2159 * linux-low.h (enum lwp_stop_reason): Delete.
2160 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
2161 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
2162
98fc70d6
YQ
21632015-03-04 Yao Qi <yao.qi@linaro.org>
2164
2165 * Makefile.in (SFILES): Add linux-aarch64-low.c.
2166
dd2ac174
GB
21672015-03-03 Gary Benson <gbenson@redhat.com>
2168
2169 * hostio.c (handle_vFile): Fix prefix lengths.
2170
d68e53f4
MM
21712015-03-03 Markus Metzger <markus.t.metzger@intel.com>
2172
2173 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
2174 ptr_bits.
2175
bf2d68ab
AA
21762015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
2177
2178 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
2179 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
2180 (clean): Add "rm -f" for above C files.
2181 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
2182 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
2183 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
2184 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
2185 * linux-s390-low.c (HWCAP_S390_VX): New macro.
2186 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
2187 (init_registers_s390x_vx_linux64)
2188 (init_registers_s390x_tevx_linux64)
2189 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
2190 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
2191 declarations.
2192 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
2193 (s390_store_vxrs_high): New functions.
2194 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
2195 NT_S390_VXRS_HIGH.
2196 (s390_arch_setup): Add logic for selecting one of the new target
2197 descriptions. Activate the new vector regsets if applicable.
2198 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
2199 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
2200 and init_registers_s390x_tevx_linux64.
2201
c966a859
PA
22022015-03-01 Pedro Alves <palves@redhat.com>
2203
2204 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
2205 parameter.
2206
4180215b
PA
22072015-02-27 Pedro Alves <palves@redhat.com>
2208
2209 * linux-x86-low.c (u_debugreg_offset): New function.
2210 (x86_linux_dr_get, x86_linux_dr_set): Use it.
2211
749bab01
PA
22122015-02-27 Pedro Alves <palves@redhat.com>
2213
2214 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
2215 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
2216 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
2217 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
2218 (ps_lsetfpregs, ps_getpid)
2219 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
2220 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
2221 (ps_lsetxregs, ps_plog): Declare.
2222
3c14e5a3
PA
22232015-02-27 Pedro Alves <palves@redhat.com>
2224
2225 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
2226 IP_AGENT_EXPORT_FUNC.
2227 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
2228 IP_AGENT_EXPORT_FUNC.
2229 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
2230 (IP_AGENT_EXPORT): Delete.
2231 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
2232 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
2233 (gdb_trampoline_buffer_error, collecting, gdb_collect)
2234 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
2235 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
2236 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
2237 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
2238 (traceframe_read_count, traceframe_write_count)
2239 (traceframes_created, trace_state_variables, get_raw_reg)
2240 (get_trace_state_variable_value, set_trace_state_variable_value)
2241 (ust_loaded, helper_thread_id, cmd_buf): Use
2242 IPA_SYM_EXPORTED_NAME.
2243 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
2244 (tracepoints) Use IP_AGENT_EXPORT_VAR.
2245 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
2246 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2247 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
2248 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
2249 EXTERN_C_PUSH/EXTERN_C_POP.
2250 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
2251 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
2252 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2253 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
2254 (traceframe_write_count, traceframe_read_count)
2255 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
2256 (about_to_request_buffer_space, get_trace_state_variable_value)
2257 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
2258 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
2259 EXTERN_C_PUSH/EXTERN_C_POP.
2260 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
2261 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
2262 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
2263 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2264 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
2265 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
2266 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
2267 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
2268 Define.
2269 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
2270 (IP_AGENT_EXPORT_VAR_DECL): Define.
2271 (tracing): Declare.
2272 (gdb_agent_get_raw_reg): Declare.
2273
fe978cb0
PA
22742015-02-27 Tom Tromey <tromey@redhat.com>
2275 Pedro Alves <palves@redhat.com>
2276
2277 Rename symbols whose names are reserved C++ keywords throughout.
2278
3bc3d82a
PA
22792015-02-27 Pedro Alves <palves@redhat.com>
2280
2281 * Makefile.in (COMPILER): New, get it from autoconf.
2282 (CXX): Get from autoconf instead.
2283 (COMPILE.pre): Use COMPILER.
2284 (CC-LD): Rename to ...
2285 (CC_LD): ... this. Use COMPILER.
2286 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
2287 (CXX_FOR_TARGET): Default to g++ instead of gcc.
2288 * acinclude.m4: Include build-with-cxx.m4.
2289 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
2290 Disable -Werror by default if building in C++ mode.
2291 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
2292 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
2293 the C++ compiler. Save/restore CXXFLAGS too.
2294 * configure: Regenerate.
2295
07697489
PA
22962015-02-27 Pedro Alves <palves@redhat.com>
2297
2298 * acinclude.m4: Include libiberty.m4.
2299 * configure.ac: Call libiberty_INIT.
2300 * config.in, configure: Regenerate.
2301
9beb7c4e
PA
23022015-02-26 Pedro Alves <palves@redhat.com>
2303
2304 * linux-low.c (linux_wait_1): When incrementing the PC past a
2305 program breakpoint always use the_low_target.breakpoint_len as
2306 increment, rather than the maximum between that and
2307 the_low_target.decr_pc_after_break.
2308
8090aef2
PA
23092015-02-23 Pedro Alves <palves@redhat.com>
2310
2311 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
2312 thread was doing a step-over; always adjust the PC if
2313 we stepped over a permanent breakpoint.
2314 (linux_wait_1): If we stepped over breakpoint that was on top of a
2315 permanent breakpoint, manually advance the PC past it.
2316
bc9540e8
PA
23172015-02-23 Pedro Alves <palves@redhat.com>
2318
2319 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
2320 modes.
2321 (x86_fill_gregset, x86_store_gregset): Use it when handling
2322 $orig_eax.
2323
2db9a427
PA
23242015-02-20 Pedro Alves <palves@redhat.com>
2325
2326 * thread-db.c: Include "nat/linux-procfs.h".
2327 (thread_db_init): Skip listing new threads if the kernel supports
2328 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
2329
afa8d396
PA
23302015-02-20 Pedro Alves <palves@redhat.com>
2331
2332 * linux-low.c (status_pending_p_callback): Use ptid_match.
2333
c9587f88
AT
23342015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
2335
2336 PR breakpoints/16812
2337 * linux-low.c (wstatus_maybe_breakpoint): Remove.
2338 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
2339 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
2340
b05ec7a5
AT
23412015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
2342
2343 PR breakpoints/15956
2344 * tracepoint.c (cmd_qtinit): Add check for current_thread.
2345
d33501a5
MM
23462015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2347
2348 * linux-low.c (linux_low_btrace_conf): Print size.
2349 * server.c (handle_btrace_conf_general_set): New.
2350 (hanle_general_set): Call handle_btrace_conf_general_set.
2351 (handle_query): Report Qbtrace-conf:bts:size as supported.
2352
f4abbc16
MM
23532015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2354
2355 * linux-low.c (linux_low_enable_btrace): Update parameters.
2356 (linux_low_btrace_conf): New.
2357 (linux_target_ops)<to_btrace_conf>: Initialize.
2358 * server.c (current_btrace_conf): New.
2359 (handle_btrace_enable): Rename to ...
2360 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
2361 to target_enable_btrace. Update comment. Update users.
2362 (handle_qxfer_btrace_conf): New.
2363 (qxfer_packets): Add btrace-conf entry.
2364 (handle_query): Report qXfer:btrace-conf:read as supported packet.
2365 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
2366 (target_ops)<read_btrace_conf>: New.
2367 (target_enable_btrace): Update parameters.
2368 (target_read_btrace_conf): New.
2369
043c3577
MM
23702015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2371
2372 * server.c (handle_btrace_general_set): Remove call to
2373 target_supports_btrace.
2374 (supported_btrace_packets): New.
2375 (handle_query): Call supported_btrace_packets.
2376 * target.h: include btrace-common.h.
2377 (btrace_target_info): Removed.
2378 (supports_btrace, target_supports_btrace): Update parameters.
2379
734b0e4b
MM
23802015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2381
2382 * Makefile.in (SFILES): Add common/btrace-common.c.
2383 (OBS): Add common/btrace-common.o.
2384 (btrace-common.o): Add build rules.
2385 * linux-low: Include btrace-common.h.
2386 (linux_low_read_btrace): Use struct btrace_data. Call
2387 btrace_data_init and btrace_data_fini.
2388
d6c146e9
PA
23892015-02-06 Pedro Alves <palves@redhat.com>
2390
2391 * thread-db.c (find_new_threads_callback): Add debug output.
2392
20ba1ce6
PA
23932015-02-04 Pedro Alves <palves@redhat.com>
2394
2395 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
2396 (resume_stopped_resumed_lwps): New function.
2397 (linux_wait_for_event_filtered): Use it.
2398
8cc73a39
SDJ
23992015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
2400
2401 * Makefile.in (SFILES): Add linux-personality.c.
2402 (linux-personality.o): New rule.
2403 * configure.srv (srv_linux_obj): Add linux-personality.o to the
2404 list of objects to be built.
2405 * linux-low.c: Include nat/linux-personality.h.
2406 (linux_create_inferior): Remove code to disable address space
2407 randomization (moved to ../nat/linux-personality.c). Create
2408 cleanup to disable address space randomization.
2409
fb23d554
SDJ
24102015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
2411
2412 * Makefile.in (posix-strerror.o): New rule.
2413 (mingw-strerror.o): Likewise.
2414 * configure: Regenerated.
2415 * configure.ac: Source file ../common/common.host. Initialize new
2416 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
2417
cdf43629
YQ
24182015-01-14 Yao Qi <yao@codesourcery.com>
2419
2420 * Makefile.in (SFILES): Add nat/ppc-linux.c.
2421 (ppc-linux.o): New rule.
2422 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
2423 * configure.ac: AC_CHECK_FUNCS(getauxval).
2424 * config.in: Re-generated.
2425 * configure: Re-generated.
2426 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
2427 ppc64_64bit_inferior_p
2428
514c5338
YQ
24292015-01-14 Yao Qi <yao@codesourcery.com>
2430
2431 * linux-ppc-low.c: Include "nat/ppc-linux.h".
2432 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
2433 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
2434 (PT_ORIG_R3, PT_TRAP): Likewise.
2435 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
2436 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
2437 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
2438
3368c1e5
JB
24392015-01-10 Joel Brobecker <brobecker@adacore.com>
2440
2441 * i387-fp.c (i387_cache_to_xsave): In look over
2442 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
2443 zmmh_low_space field by use of zmmh_high_space.
2444
582511be
PA
24452015-01-09 Pedro Alves <palves@redhat.com>
2446
2447 * linux-low.c (step_over_bkpt): Move higher up in the file.
2448 (handle_extended_wait): Don't store the stop_pc here.
2449 (get_stop_pc): Adjust comments and rename to ...
2450 (check_stopped_by_breakpoint): ... this. Record whether the LWP
2451 stopped for a software breakpoint or hardware breakpoint.
2452 (thread_still_has_status_pending_p): New function.
2453 (status_pending_p_callback): Use
2454 thread_still_has_status_pending_p. If the event is no longer
2455 interesting, resume the LWP.
2456 (handle_tracepoints): Add assert.
2457 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
2458 (wstatus_maybe_breakpoint): New function.
2459 (cancel_breakpoint): Delete function.
2460 (check_stopped_by_watchpoint): New function, factored out from
2461 linux_low_filter_event.
2462 (lp_status_maybe_breakpoint): Delete function.
2463 (linux_low_filter_event): Remove filter_ptid argument.
2464 Leave thread group exits pending here. Store the LWP's stop PC.
2465 Always leave events pending.
2466 (linux_wait_for_event_filtered): Pull all events out of the
2467 kernel, and leave them all pending.
2468 (count_events_callback, select_event_lwp_callback): Consider all
2469 events.
2470 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
2471 (select_event_lwp): Only give preference to the stepping LWP in
2472 all-stop mode. Adjust comments.
2473 (ignore_event): New function.
2474 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
2475 references to cancel_breakpoints. Adjust to renames. Also give
2476 equal priority to all LWPs that have had events in non-stop mode.
2477 If reporting a software breakpoint event, unadjust the LWP's PC.
2478 (linux_wait): If linux_wait_1 returned an ignored event, retry.
2479 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
2480 Adjust.
2481 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
2482 (resume_status_pending_p): Use thread_still_has_status_pending_p.
2483 (linux_stopped_by_watchpoint): Adjust.
2484 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
2485 * linux-low.h (enum lwp_stop_reason): New.
2486 (struct lwp_info) <stop_pc>: Adjust comment.
2487 <stopped_by_watchpoint>: Delete field.
2488 <stop_reason>: New field.
2489 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
2490 * mem-break.c (software_breakpoint_inserted_here)
2491 (hardware_breakpoint_inserted_here): New function.
2492 * mem-break.h (software_breakpoint_inserted_here)
2493 (hardware_breakpoint_inserted_here): Declare.
2494 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
2495 (cancel_breakpoints): Delete.
2496 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
2497 (upload_fast_traceframes): Remove references to
2498 cancel_breakpoints.
2499
a33e3959
PA
25002015-01-09 Pedro Alves <palves@redhat.com>
2501
2502 * thread-db.c (find_new_threads_callback): Ignore thread if the
2503 kernel thread ID is -1.
2504
8784d563
PA
25052015-01-09 Pedro Alves <palves@redhat.com>
2506
2507 * linux-low.c (linux_attach_fail_reason_string): Move to
2508 nat/linux-ptrace.c, and rename.
2509 (linux_attach_lwp): Update comment.
2510 (attach_proc_task_lwp_callback): New function.
2511 (linux_attach): Adjust to rename and use
2512 linux_proc_attach_tgid_threads.
2513 (linux_attach_fail_reason_string): Delete declaration.
2514
76f2b779
JB
25152015-01-01 Joel Brobecker <brobecker@adacore.com>
2516
2517 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
2518 * server.c (gdbserver_version): Likewise.
2519
fafcc06a
SDJ
25202014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
2521
2522 * remote-utils.c: Include ctype.h.
2523 (input_interrupt): Explicitly handle the case when the char
2524 received is the NUL byte. Improve the printing of non-ASCII
2525 characters.
2526
beed38b8
JB
25272014-12-16 Joel Brobecker <brobecker@adacore.com>
2528
2529 * linux-low.c (linux_low_filter_event): Update call to
2530 linux_enable_event_reporting following the addition of
2531 a new parameter to that function.
2532
bf330350
CU
25332014-12-16 Catalin Udma <catalin.udma@freescale.com>
2534
2535 PR server/17457
2536 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
2537 (AARCH64_FPCR_REGNO): Likewise.
2538 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
2539 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
2540 (aarch64_store_fpregset): Likewise.
2541
5227d625
JB
25422014-12-15 Joel Brobecker <brobecker@adacore.com>
2543
2544 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
2545 Remove FIXME comment about assumption about N.
2546
f93b65a0
JB
25472014-12-13 Joel Brobecker <brobecker@adacore.com>
2548
2549 * configure.ac: If large-file support is disabled in GDBserver,
2550 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
2551 * configure: Regenerate.
2552
e5a9158d
AA
25532014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2554
2555 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
2556 warning upon ENODATA from ptrace.
2557 * linux-s390-low.c (s390_store_tdb): New.
2558 (s390_regsets): Add regset for NT_S390_TDB.
2559
feea5f36
AA
25602014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2561
2562 * linux-low.c (regsets_store_inferior_registers): Skip regsets
2563 without a fill_function.
2564 * linux-s390-low.c (s390_fill_last_break): Remove.
2565 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
2566 (s390_arch_setup): Use regset's size instead of fill_function for
2567 loop end condition.
2568
098dbe61
AA
25692014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2570
2571 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
2572 the regset's store function when ptrace returned an error.
2573 * regcache.c (get_thread_regcache): Invalidate register cache
2574 before fetching inferior's registers.
2575
28eef672
AA
25762014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2577
2578 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
2579 while-loop as for-loop.
2580 (regsets_store_inferior_registers): Likewise.
2581
bdca27a2
YQ
25822014-11-28 Yao Qi <yao@codesourcery.com>
2583
2584 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
2585 * config.in, configure: Re-generate.
2586 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
2587 is defined.
2588
9c232dda
YQ
25892014-11-21 Yao Qi <yao@codesourcery.com>
2590
2591 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
2592 (AC_CHECK_HEADERS): Remove malloc.h.
2593 * configure: Re-generated.
2594 * config.in: Re-generated.
2595 * server.h: Don't include alloca.h and malloc.h.
2596 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
2597 Don't include malloc.h.
2598
43968415
JB
25992014-11-17 Joel Brobecker <brobecker@adacore.com>
2600
2601 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
2602 corresponding ERRNO check in same block.
2603
40e91bc7
PA
26042014-11-12 Pedro Alves <palves@redhat.com>
2605
2606 * server.c (cont_thread): Update comment.
2607 (start_inferior, attach_inferior): No longer clear cont_thread.
2608 (handle_v_cont): No longer set cont_thread.
2609 (captured_main): Clear cont_thread each time a GDB connects.
2610
c2c118cf
PA
26112014-11-12 Pedro Alves <palves@redhat.com>
2612
2613 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
2614 thread, and don't resume all threads if the Hc thread has exited.
2615
78708b7c
PA
26162014-11-12 Pedro Alves <palves@redhat.com>
2617
2618 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
2619 the process group instead of to a specific LWP.
2620
a2abc7de
PA
26212014-10-15 Pedro Alves <palves@redhat.com>
2622
2623 PR server/17487
2624 * win32-arm-low.c (arm_set_thread_context): Remove current_event
2625 parameter.
2626 (arm_set_thread_context): Delete.
2627 (the_low_target): Adjust.
2628 * win32-i386-low.c (debug_registers_changed)
2629 (debug_registers_used): Delete.
2630 (update_debug_registers_callback): New function.
2631 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
2632 needing to update their debug registers.
2633 (win32_get_current_dr): New function.
2634 (x86_dr_low_get_addr, x86_dr_low_get_control)
2635 (x86_dr_low_get_status): Fetch the debug register from the thread
2636 record's context.
2637 (i386_initial_stuff): Adjust.
2638 (i386_get_thread_context): Remove current_event parameter. Don't
2639 clear debug_registers_changed nor copy DR values to
2640 debug_reg_state.
2641 (i386_set_thread_context): Delete.
2642 (i386_prepare_to_resume): New function.
2643 (i386_thread_added): Mark the thread as needing to update irs
2644 debug registers.
2645 (the_low_target): Remove i386_set_thread_context and install
2646 i386_prepare_to_resume.
2647 * win32-low.c (win32_get_thread_context): Adjust.
2648 (win32_set_thread_context): Use SetThreadContext
2649 directly.
2650 (win32_prepare_to_resume): New function.
2651 (win32_require_context): New function, factored out from ...
2652 (thread_rec): ... this.
2653 (continue_one_thread): Call win32_prepare_to_resume on each thread
2654 we're about to continue.
2655 (win32_resume): Call win32_prepare_to_resume on the event thread.
2656 * win32-low.h (struct win32_thread_info)
2657 <debug_registers_changed>: New field.
2658 (struct win32_target_ops): Change prototype of set_thread_context,
2659 delete set_thread_context and add prepare_to_resume.
2660 (win32_require_context): New declaration.
2661
a442d071
GB
26622014-10-08 Gary Benson <gbenson@redhat.com>
2663
2664 * server.h: Do not include common-exceptions.h.
2665
6f1947e8
GB
26662014-10-08 Gary Benson <gbenson@redhat.com>
2667
2668 * server.h: Do not include cleanups.h.
2669
63b434a4
JH
26702014-09-30 James Hogan <james.hogan@imgtec.com>
2671
2672 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
2673 mips64-dsp-linux.c.
2674
c4d9ceb6
YQ
26752014-09-23 Yao Qi <yao@codesourcery.com>
2676
2677 * linux-low.c (lp_status_maybe_breakpoint): New function.
2678 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
2679 (count_events_callback): Likewise.
2680 (select_event_lwp_callback): Likewise.
2681 (cancel_breakpoints_callback): Likewise.
2682
89a5711c
DB
26832014-09-19 Don Breazeal <donb@codesourcery.com>
2684
2685 * linux-low.c (handle_extended_wait): Call
2686 linux_ptrace_get_extended_event.
2687 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
2688 linux_is_extended_waitstatus.
2689
bffc0964
JB
26902014-09-16 Joel Brobecker <brobecker@adacore.com>
2691
2692 * Makefile.in (CPPFLAGS): Define.
2693 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
2694 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
2695
0bfdf32f
GB
26962014-09-16 Gary Benson <gbenson@redhat.com>
2697
2698 * inferiors.h (current_inferior): Renamed as...
2699 (current_thread): New variable. All uses updated.
2700 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
2701 (maybe_move_out_of_jump_pad): Likewise.
2702 (cancel_breakpoint): Likewise.
2703 (linux_low_filter_event): Likewise.
2704 (wait_for_sigstop): Likewise.
2705 (linux_resume_one_lwp): Likewise.
2706 (need_step_over_p): Likewise.
2707 (start_step_over): Likewise.
2708 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
2709 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
2710 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
2711 and save_inferior as saved_thread.
2712 * regcache.c (get_thread_regcache): Renamed saved_inferior as
2713 saved_thread.
2714 (regcache_invalidate_thread): Likewise.
2715 * remote-utils.c (prepare_resume_reply): Likewise.
2716 * thread-db.c (thread_db_get_tls_address): Likewise.
2717 (disable_thread_event_reporting): Likewise.
2718 (remove_thread_event_breakpoints): Likewise.
2719 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
2720 as saved_thread.
2721 * target.h (set_desired_inferior): Renamed as...
2722 (set_desired_thread): New declaration. All uses updated.
2723 * server.c (myresume): Updated comment to reference thread instead
2724 of inferior.
2725 (handle_serial_event): Likewise.
2726 (handle_target_event): Likewise.
2727
361c8ade
GB
27282014-09-12 Tom Tromey <tromey@redhat.com>
2729 Gary Benson <gbenson@redhat.com>
2730
2731 * regcache.h: Include common-regcache.h.
2732 (regcache_read_pc): Don't declare.
2733 * regcache.c (get_thread_regcache_for_ptid): New function.
2734
bd9269f7
GB
27352014-09-11 Tom Tromey <tromey@redhat.com>
2736 Gary Benson <gbenson@redhat.com>
2737
2738 * symbol.c: New file.
2739 * Makefile.in (SFILES): Add symbol.c.
2740 (OBS): Add symbol.o.
2741
f8c1d06b
GB
27422014-09-11 Gary Benson <gbenson@redhat.com>
2743
2744 * target.c (target_stop_ptid, target_continue_ptid): New
2745 functions.
2746
721ec300
GB
27472014-09-11 Tom Tromey <tromey@redhat.com>
2748 Gary Benson <gbenson@redhat.com>
2749
2750 * target.h: Include target/target.h.
2751 * target.c (target_read_memory, target_read_uint32)
2752 (target_write_memory): New functions.
2753
c5e92cca
GB
27542014-09-11 Gary Benson <gbenson@redhat.com>
2755
2756 * server.h (debug_hw_points): Don't declare.
2757 * server.c (debug_hw_points): Don't define. Replace all uses
2758 with show_debug_regs.
2759 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
2760 all uses with show_debug_regs.
2761
2e4bb98a
EBM
27622014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
2763
2764 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
2765 endianness into account.
2766 (ppc_supply_ptrace_register): Likewise.
2767
ac740bc7
JH
27682014-09-03 James Hogan <james.hogan@imgtec.com>
2769
2770 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
2771 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
2772
97ea6506
GB
27732014-09-03 Gary Benson <gbenson@redhat.com>
2774
2775 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
2776 ALL_DEBUG_ADDRESS_REGISTERS.
2777
df7e5265
GB
27782014-09-02 Gary Benson <gbenson@redhat.com>
2779
2780 * i386-low.h: Renamed as...
2781 * x86-low.h: New file. All type, function and variable name
2782 prefixes changed from "i386_" to "x86_". All references updated.
2783 * i386-low.c: Renamed as...
2784 * x86-low.c: New file. All type, function and variable name
2785 prefixes changed from "i386_" to "x86_". All references updated.
2786
ed859da7
GB
27872014-09-02 Gary Benson <gbenson@redhat.com>
2788
2789 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
2790 (x86_linux_new_thread): Likewise.
2791
860789c7
GB
27922014-08-29 Gary Benson <gbenson@redhat.com>
2793
2794 * server.h (setjmp.h): Do not include.
2795 (toplevel): Do not declare.
2796 (common-exceptions.h): Include.
2797 (cleanups.h): Likewise.
2798 * server.c (toplevel): Do not define.
2799 (exit_code): New static global.
2800 (detach_or_kill_for_exit_cleanup): New function.
2801 (main): New function. Original main renamed to...
2802 (captured_main): New function.
2803 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
2804
ff55e1b5
GB
28052014-08-29 Gary Benson <gbenson@redhat.com>
2806
2807 * Makefile.in (SFILES): Add common/common-exceptions.c.
2808 (OBS): Add common-exceptions.o.
2809 (common-exceptions.o): New rule.
2810 * utils.c (prepare_to_throw_exception): New function.
2811
e9bcb658
GB
28122014-08-29 Gary Benson <gbenson@redhat.com>
2813
2814 * config.in: Regenerate.
2815 * configure: Likewise.
2816
e3180625
GB
28172014-08-29 Gary Benson <gbenson@redhat.com>
2818
2819 * Makefile.in (SFILES): Add common/cleanups.c.
2820 (OBS): cleanups.o.
2821 (cleanups.o): New rule.
2822
e3d6ba5d
GB
28232014-08-29 Gary Benson <gbenson@redhat.com>
2824
2825 * utils.c (internal_vwarning): New function.
2826
7096e886
GB
28272014-08-28 Gary Benson <gbenson@redhat.com>
2828
2829 * utils.h (fatal): Remove declaration.
2830 * utils.c (fatal): Remove function.
2831
14ce3192
GB
28322014-08-28 Gary Benson <gbenson@redhat.com>
2833
2834 * tracepoint.c (gdb_agent_init): Replace fatal with
2835 perror_with_name.
2836 (initialize_tracepoint): Likewise.
2837
50278d59
GB
28382014-08-28 Gary Benson <gbenson@redhat.com>
2839
2840 * remote-utils.c (remote_prepare): Replace fatal with error.
2841
aa96c426
GB
28422014-08-28 Gary Benson <gbenson@redhat.com>
2843
2844 * linux-low.c (linux_async): Replace fatal with warning.
2845 Tidy up and return.
2846 (linux_start_non_stop): Return -1 if linux_async failed.
2847
f7160e97
GB
28482014-08-28 Gary Benson <gbenson@redhat.com>
2849
2850 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
2851 gdb_assert.
2852 (i386_dr_low_get_addr): Remove vague comment.
2853 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
2854 gdb_assert.
2855
38e08fca
GB
28562014-08-28 Gary Benson <gbenson@redhat.com>
2857
2858 * inferiors.c (get_thread_process): Replace check with gdb_assert.
2859 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
2860 internal_error.
2861 (linux_resume_one_lwp): Likewise.
2862 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
2863 gdb_assert.
2864 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
2865 with internal_error.
2866 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
2867 (init_register_cache): Replace fatal with gdb_assert_not_reached.
2868 (find_register_by_name): Replace fatal with internal_error.
2869 (find_regno): Likewise.
2870 * tdesc.c (init_target_desc): Replace check with gdb_assert.
2871 * thread-db.c (thread_db_create_event): Likewise.
2872 (thread_db_load_search): Likewise.
2873 (try_thread_db_load_1): Likewise.
2874 * tracepoint.c (get_jump_space_head): Replace fatal with
2875 internal_error.
2876 (claim_trampoline_space): Likewise.
2877 (have_fast_tracepoint_trampoline_buffer): Likewise.
2878 (cmd_qtstart): Likewise.
2879 (stop_tracing): Likewise.
2880 (fast_tracepoint_collecting): Likewise.
2881 (target_malloc): Likewise.
2882 (download_tracepoint): Likewise.
2883 (download_trace_state_variables): Replace check with gdb_assert.
2884 (upload_fast_traceframes): Replace fatal with internal_error.
2885
34abf635
GB
28862014-08-19 Tom Tromey <tromey@redhat.com>
2887 Gary Benson <gbenson@redhat.com>
2888
2889 * Makefile.in (SFILES): Add common/common-debug.c.
2890 (OBS): Add common-debug.o.
2891 (common-debug.o): New rule.
2892 * debug.h (debug_printf): Don't declare.
2893 * debug.c (debug_printf): Renamed and rewritten as...
2894 (debug_vprintf): New function.
2895
f6e94d78
GB
28962014-08-19 Gary Benson <gbenson@redhat.com>
2897
2898 * utils.h: Do not include print-utils.h.
2899
9239eeab
GB
29002014-08-19 Tom Tromey <tromey@redhat.com>
2901 Gary Benson <gbenson@redhat.com>
2902
2903 * server.h: Add static assertion.
2904 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
2905
ef87c8bb
GB
29062014-08-19 Tom Tromey <tromey@redhat.com>
2907 Gary Benson <gbenson@redhat.com>
2908
2909 * Makefile.in (SFILES): Add common/errors.c.
2910 (OBS): Add errors.o.
2911 (IPA_OBS): Add errors-ipa.o.
2912 (errors.o): New rule.
2913 (errors-ipa.o): Likewise.
2914 * utils.h (perror_with_name, error, warning): Don't declare.
2915 * utils.c (warning): Renamed and rewritten as...
2916 (vwarning): New function.
2917 (error): Renamed and rewritten as...
2918 (verror): New function.
2919 (internal_error): Renamed and rewritten as...
2920 (internal_verror): New function.
2921
bb974a24
GB
29222014-08-07 Gary Benson <gbenson@redhat.com>
2923
2924 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
2925 * configure: Regenerate.
2926 * config.in: Likewise.
2927 * server.h: Do not include errno.h.
2928 * event-loop.c: Likewise.
2929 * hostio-errno.c: Likewise.
2930 * linux-low.c: Likewise.
2931 * remote-utils.c: Likewise.
2932 * spu-low.c: Likewise.
2933 * utils.c: Likewise.
2934 * gdbreplay.c: Unconditionally include errno.h.
2935
6d3d12eb
GB
29362014-08-07 Gary Benson <gbenson@redhat.com>
2937
2938 * server.h: Do not include string.h.
2939 * event-loop.c: Likewise.
2940 * linux-low.c: Likewise.
2941 * regcache.c: Likewise.
2942 * remote-utils.c: Likewise.
2943 * spu-low.c: Likewise.
2944 * utils.c: Likewise.
2945
dccbb609
GB
29462014-08-07 Gary Benson <gbenson@redhat.com>
2947
2948 * server.h: Do not include gdb_assert.h.
2949
e76df0d0
GB
29502014-08-07 Gary Benson <gbenson@redhat.com>
2951
2952 * server.h: Do not include common-utils.h.
2953
4cb9c816
GB
29542014-08-07 Gary Benson <gbenson@redhat.com>
2955
2956 * server.h: Do not include ptid.h.
2957 * notif.h: Likewise.
2958
3995eeee
GB
29592014-08-07 Gary Benson <gbenson@redhat.com>
2960
2961 * server.h: Do not include gdb_locale.h.
2962
cb9f1a9b
GB
29632014-08-07 Gary Benson <gbenson@redhat.com>
2964
2965 * server.h: Do not include gdb/signals.h.
2966 * win32-low.c: Likewise.
2967
a5fceff8
GB
29682014-08-07 Gary Benson <gbenson@redhat.com>
2969
2970 * server.h: Do not include pathmax.h.
2971
b9391142
GB
29722014-08-07 Gary Benson <gbenson@redhat.com>
2973
2974 * server.h: Do not include libiberty.h.
2975 * linux-bfin-low.c: Likewise.
2976
0e443c87
GB
29772014-08-07 Gary Benson <gbenson@redhat.com>
2978
2979 * server.h: Do not include ansidecl.h.
2980
8ebb3f56
GB
29812014-08-07 Gary Benson <gbenson@redhat.com>
2982
2983 * linux-x86-low.c: Do not include stddef.h.
2984 * lynx-ppc-low.c: Likewise.
2985 * tracepoint.c: Likewise.
2986
8980bdf6
GB
29872014-08-07 Gary Benson <gbenson@redhat.com>
2988
2989 * server.h: Do not include stdarg.h.
2990 * nto-low.c: Likewise.
2991
d7096f71
GB
29922014-08-07 Gary Benson <gbenson@redhat.com>
2993
2994 * server.h: Do not include stdlib.h.
2995 * inferiors.c: Likewise.
2996 * linux-low.c: Likewise.
2997 * regcache.c: Likewise.
2998 * spu-low.c: Likewise.
2999 * tracepoint.c: Likewise.
3000 * utils.c: Likewise.
3001
d02f550d
GB
30022014-08-07 Gary Benson <gbenson@redhat.com>
3003
3004 * server.h: Do not include stdio.h.
3005 * linux-low.c: Likewise.
3006 * remote-utils.c: Likewise.
3007 * spu-low.c: Likewise.
3008 * utils.c: Likewise.
3009 * wincecompat.c: Likewise.
3010
87f6c4e3
GB
30112014-08-06 Gary Benson <gbenson@redhat.com>
3012
3013 * regcache.c (init_register_cache): Move conditionals inside if.
3014
7089dca4
GB
30152014-08-06 Gary Benson <gbenson@redhat.com>
3016
3017 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
3018
462f517e
GB
30192014-07-31 Gary Benson <gbenson@redhat.com>
3020
3021 * ax.h: Do not include server.h.
3022 * gdbthread.h: Likewise.
3023 * lynx-low.h: Likewise.
3024 * notif.h: Likewise.
3025
976411d6
GB
30262014-07-30 Gary Benson <gbenson@redhat.com>
3027
3028 * server.h: Include common-defs.h.
3029 Do not include config.h or build-gnulib-gdbserver/config.h.
3030
d41f6d8e
GB
30312014-07-30 Gary Benson <gbenson@redhat.com>
3032
3033 * hostio-errno.c: Move server.h to top of includes list.
3034 * inferiors.c: Likewise.
3035 * linux-x86-low.c: Likewise.
3036 * notif.c: Include server.h.
3037
314c6a35
TT
30382014-07-24 Tom Tromey <tromey@redhat.com>
3039 Gary Benson <gbenson@redhat.com>
3040
3041 * server.h (CORE_ADDR): Now unsigned.
3042
69ff6be5
PA
30432014-07-16 Pedro Alves <palves@redhat.com>
3044
3045 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
3046
ce9e3fe7
PA
30472014-07-15 Pedro Alves <palves@redhat.com>
3048
3049 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
3050 copy.
3051
e76126e8
PA
30522014-07-11 Pedro Alves <palves@redhat.com>
3053
3054 * linux-low.c (kill_wait_lwp): New function, based on
3055 kill_one_lwp_callback, but use my_waitpid directly.
3056 (kill_one_lwp_callback, linux_kill): Use it.
3057
8e9db26e
PA
30582014-06-23 Pedro Alves <palves@redhat.com>
3059
3060 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
3061 before setting DR0..DR3.
3062
698b3e08
GB
30632014-06-20 Gary Benson <gbenson@redhat.com>
3064
3065 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
3066 * configure: Regenerated.
3067 * config.in: Likewise.
3068
125f8a3d
GB
30692014-06-20 Gary Benson <gbenson@redhat.com>
3070
3071 * Makefile.in (SFILES): Update locations for files moved
3072 from common to nat.
3073 (object file files): Reordered.
3074
42995dbd
GB
30752014-06-20 Gary Benson <gbenson@redhat.com>
3076
3077 * i386-low.h (i386_dr_low_can_set_addr): Removed.
3078 (i386_dr_low_set_addr): Likewise.
3079 (i386_dr_low_get_addr): Likewise.
3080 (i386_dr_low_can_set_control): Likewise.
3081 (i386_dr_low_set_control): Likewise.
3082 (i386_dr_low_get_control): Likewise.
3083 (i386_dr_low_get_status): Likewise.
3084 (i386_get_debug_register_length): Likewise.
3085 * linux-x86-low.c (i386_dr_low_set_addr):
3086 Changed signature. Made static.
3087 (i386_dr_low_get_addr): Likewise.
3088 (i386_dr_low_set_control): Likewise.
3089 (i386_dr_low_get_control): Likewise.
3090 (i386_dr_low_get_status): Likewise.
3091 (i386_dr_low): New global variable.
3092 * win32-i386-low.c (i386_dr_low_set_addr):
3093 Changed signature. Made static.
3094 (i386_dr_low_get_addr): Likewise.
3095 (i386_dr_low_set_control): Likewise.
3096 (i386_dr_low_get_control): Likewise.
3097 (i386_dr_low_get_status): Likewise.
3098 (i386_dr_low): New global variable.
3099
e1d2394b
MS
31002014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
3101
3102 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
3103 * Makefile.in (AR, AR_FLAGS): Define.
3104 * configure: Regenerate.
3105
3a8ee006
GB
31062014-06-19 Gary Benson <gbenson@redhat.com>
3107
3108 * Makefile.in (i386-dregs.o): New rule.
3109 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
3110 * i386-low.c (target.h): Remove include.
3111 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
3112 (DR_CONTROL_SHIFT): Likewise.
3113 (DR_CONTROL_SIZE): Likewise.
3114 (DR_RW_EXECUTE): Likewise.
3115 (DR_RW_WRITE): Likewise.
3116 (DR_RW_READ): Likewise.
3117 (DR_RW_IORW): Likewise.
3118 (DR_LEN_1): Likewise.
3119 (DR_LEN_2): Likewise.
3120 (DR_LEN_4): Likewise.
3121 (DR_LEN_8): Likewise.
3122 (DR_LOCAL_ENABLE_SHIFT): Likewise.
3123 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
3124 (DR_ENABLE_SIZE): Likewise.
3125 (DR_LOCAL_SLOWDOWN): Likewise.
3126 (DR_GLOBAL_SLOWDOWN): Likewise.
3127 (DR_CONTROL_RESERVED): Likewise.
3128 (I386_DR_CONTROL_MASK): Likewise.
3129 (I386_DR_VACANT): Likewise.
3130 (I386_DR_LOCAL_ENABLE): Likewise.
3131 (I386_DR_GLOBAL_ENABLE): Likewise.
3132 (I386_DR_DISABLE): Likewise.
3133 (I386_DR_SET_RW_LEN): Likewise.
3134 (I386_DR_GET_RW_LEN): Likewise.
3135 (I386_DR_WATCH_HIT): Likewise.
3136 (i386_wp_op_t): Likewise.
3137 (i386_show_dr): Likewise.
3138 (i386_length_and_rw_bits): Likewise.
3139 (i386_insert_aligned_watchpoint): Likewise.
3140 (i386_remove_aligned_watchpoint): Likewise.
3141 (i386_handle_nonaligned_watchpoint): Likewise.
3142 i386_update_inferior_debug_regs(): Likewise.
3143 (i386_dr_insert_watchpoint): Likewise.
3144 (i386_dr_remove_watchpoint): Likewise.
3145 (i386_dr_region_ok_for_watchpoint): Likewise.
3146 (i386_dr_stopped_data_address): Likewise.
3147 (i386_dr_stopped_by_watchpoint): Likewise.
3148
8f26655c
GB
31492014-06-19 Gary Benson <gbenson@redhat.com>
3150
3151 * i386-low.c (i386_dr_show): Renamed to
3152 i386_show_dr and made static. All uses updated.
3153 (i386_dr_length_and_rw_bits): Renamed to
3154 i386_length_and_rw_bits and made static.
3155 All uses updated.
3156 (i386_dr_insert_aligned_watchpoint): Renamed to
3157 i386_insert_aligned_watchpoint and made static.
3158 All uses updated.
3159 (i386_dr_remove_aligned_watchpoint): Renamed to
3160 i386_remove_aligned_watchpoint and made static.
3161 All uses updated.
3162 (i386_dr_update_inferior_debug_regs): Renamed to
3163 i386_update_inferior_debug_regs and made static.
3164 All uses updated.
3165
b9228891
GB
31662014-06-18 Gary Benson <gbenson@redhat.com>
3167
5171def3
GB
3168 * i386-low.h (i386_dr_low_can_set_addr): New macro.
3169 (i386_dr_low_can_set_control): Likewise.
3170 (i386_get_debug_register_length): Likewise.
3171 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
3172 (i386_dr_low_can_set_control): Likewise.
3173 (i386_get_debug_register_length): Likewise.
3174
31752014-06-17 Gary Benson <gbenson@redhat.com>
3176
b9228891
GB
3177 * i386-low.h (i386-dregs.h): New include.
3178 (DR_FIRSTADDR): Now in i386-dregs.h.
3179 (DR_LASTADDR): Likewise.
3180 (DR_NADDR): Likewise.
3181 (DR_STATUS): Likewise.
3182 (DR_CONTROL): Likewise.
3183 (i386_debug_reg_state): Likewise.
3184 (i386_dr_insert_watchpoint): Likewise.
3185 (i386_dr_remove_watchpoint): Likewise.
3186 (i386_dr_region_ok_for_watchpoint): Likewise.
3187 (i386_dr_stopped_data_address): Likewise.
3188 (i386_dr_stopped_by_watchpoint): Likewise.
3189 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
3190
4be83cc2
GB
31912014-06-18 Gary Benson <gbenson@redhat.com>
3192
3193 * i386-low.h (i386_low_insert_watchpoint): Renamed to
3194 i386_dr_insert_watchpoint.
3195 (i386_low_remove_watchpoint): Renamed to
3196 i386_dr_remove_watchpoint.
3197 (i386_low_region_ok_for_watchpoint): Renamed to
3198 i386_dr_region_ok_for_watchpoint.
3199 (i386_low_stopped_data_address): Renamed to
3200 i386_dr_stopped_data_address.
3201 (i386_low_stopped_by_watchpoint): Renamed to
3202 i386_dr_stopped_by_watchpoint.
3203 * i386-low.c (i386_show_dr): Renamed to
3204 i386_dr_show and made nonstatic. All uses updated.
3205 (i386_length_and_rw_bits): Renamed to
3206 i386_dr_length_and_rw_bits and made nonstatic.
3207 All uses updated.
3208 (i386_insert_aligned_watchpoint): Renamed to
3209 i386_dr_insert_aligned_watchpoint and made nonstatic.
3210 All uses updated.
3211 (i386_remove_aligned_watchpoint): Renamed to
3212 i386_dr_remove_aligned_watchpoint and made nonstatic.
3213 All uses updated.
3214 (i386_update_inferior_debug_regs): Renamed to
3215 i386_dr_update_inferior_debug_regs and made nonstatic.
3216 All uses updated.
3217 (i386_low_insert_watchpoint): Renamed to
3218 i386_dr_insert_watchpoint. All uses updated.
3219 (i386_low_remove_watchpoint): Renamed to
3220 i386_dr_remove_watchpoint. All uses updated.
3221 (i386_low_region_ok_for_watchpoint): Renamed to
3222 i386_dr_region_ok_for_watchpoint. All uses updated.
3223 (i386_low_stopped_data_address): Renamed to
3224 i386_dr_stopped_data_address. All uses updated.
3225 (i386_low_stopped_by_watchpoint): Renamed to
3226 i386_dr_stopped_by_watchpoint. All uses updated.
3227
131aa0d4
GB
32282014-06-18 Gary Benson <gbenson@redhat.com>
3229
3230 * i386-low.c (i386_dr_low_can_set_addr): New macro.
3231 (i386_dr_low_can_set_control): Likewise.
3232 (i386_insert_aligned_watchpoint): New check.
3233
d9305f7f
GB
32342014-06-18 Gary Benson <gbenson@redhat.com>
3235
3236 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
3237 Renamed to state.
3238
e927c9fc
GB
32392014-06-18 Gary Benson <gbenson@redhat.com>
3240
3241 * i386-low.c (i386_length_and_rw_bits): Use internal_error
3242 instead of fatal and error.
3243 (i386_handle_nonaligned_watchpoint): Likewise.
3244
1b6d4134
GB
32452014-06-18 Gary Benson <gbenson@redhat.com>
3246
3247 * i386-low.c (i386_get_debug_register_length): New macro.
3248 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
3249 (i386_show_dr): Use debug_printf instead of fprintf. Use
3250 phex to format values.
3251
6e62758f
GB
32522014-06-18 Gary Benson <gbenson@redhat.com>
3253
3254 * i386-low.h: Comment changes.
3255 * i386-low.c: Likewise.
3256
fc6e2f03
GB
32572014-06-18 Gary Benson <gbenson@redhat.com>
3258
3259 * i386-low.c: Whitespace changes.
3260
f9d1eeed
TT
32612014-06-12 Tom Tromey <tromey@redhat.com>
3262
3263 * utils.c (freeargv): Remove.
3264
0b04e523
TT
32652014-06-12 Tom Tromey <tromey@redhat.com>
3266
3267 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
3268 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
3269 (parse_debug_format_options): Likewise.
3270 (gdbserver_usage): Likewise.
3271 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
3272 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
3273 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
3274 against libiberty.
3275 ($(LIBGNU)): Depend on libiberty.
3276 (all-lib): Recurse into all subdirs.
3277 (install-only): Invoke "install" target in subdirs.
3278 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
3279 targets.
3280 * configure: Rebuild.
3281 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
3282 for vasprintf, vsnprintf, or gettimeofday.
3283 * configure.srv: Don't add safe-ctype.o or lbasename.o to
3284 srv_tgtobj.
3285
270c9937
JB
32862014-06-05 Joel Brobecker <brobecker@adacore.com>
3287
3288 * development.sh: Delete.
3289 * Makefile.in (config.status): Adjust dependency on development.sh.
3290 * configure.ac: Adjust development.sh source call.
3291 * configure: Regenerate.
3292
0a261ed8
PA
32932014-06-02 Pedro Alves <palves@redhat.com>
3294
3295 * ax.c (gdb_free_agent_expr): New function.
3296 * ax.h (gdb_free_agent_expr): New declaration.
3297 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
3298 list.
3299 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
3300 static.
3301 (clear_breakpoint_conditions_and_commands): New function.
3302 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
3303 (clear_breakpoint_conditions_and_commands): New declaration.
3304
e9dae05e
RR
33052014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
3306
3307 * linux-aarch64-low.c (asm/ptrace.h): Include.
3308
5876f503
JK
33092014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
3310
3311 Fix TLS access for -static -pthread.
3312 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
3313 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
3314 (thread_db_load_search, try_thread_db_load_1): Initialize it.
3315
802e8e6d
PA
33162014-05-20 Pedro Alves <palves@redhat.com>
3317
3318 * linux-aarch64-low.c (aarch64_insert_point)
3319 (aarch64_remove_point): No longer check whether the type is
3320 supported here. Adjust to new interface.
3321 (the_low_target): Install aarch64_supports_z_point_type as
3322 supports_z_point_type method.
3323 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
3324 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
3325 instead of a Z packet char. Adjust.
3326 (arm_supports_z_point_type): New function.
3327 (arm_insert_point, arm_remove_point): Adjust to new interface.
3328 (the_low_target): Install arm_supports_z_point_type.
3329 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
3330 (cris_insert_point, cris_remove_point): Adjust to new interface.
3331 Don't check whether the type is supported here.
3332 (the_low_target): Install cris_supports_z_point_type.
3333 * linux-low.c (linux_supports_z_point_type): New function.
3334 (linux_insert_point, linux_remove_point): Adjust to new interface.
3335 * linux-low.h (struct linux_target_ops) <insert_point,
3336 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
3337 raw_breakpoint pointer parameter.
3338 <supports_z_point_type>: New method.
3339 * linux-mips-low.c (mips_supports_z_point_type): New function.
3340 (mips_insert_point, mips_remove_point): Adjust to new interface.
3341 Use mips_supports_z_point_type.
3342 (the_low_target): Install mips_supports_z_point_type.
3343 * linux-ppc-low.c (the_low_target): Install NULL as
3344 supports_z_point_type method.
3345 * linux-s390-low.c (the_low_target): Install NULL as
3346 supports_z_point_type method.
3347 * linux-sparc-low.c (the_low_target): Install NULL as
3348 supports_z_point_type method.
3349 * linux-x86-low.c (x86_supports_z_point_type): New function.
3350 (x86_insert_point): Adjust to new insert_point interface. Use
3351 insert_memory_breakpoint. Adjust to new
3352 i386_low_insert_watchpoint interface.
3353 (x86_remove_point): Adjust to remove_point interface. Use
3354 remove_memory_breakpoint. Adjust to new
3355 i386_low_remove_watchpoint interface.
3356 (the_low_target): Install x86_supports_z_point_type.
3357 * lynx-low.c (lynx_target_ops): Install NULL as
3358 supports_z_point_type callback.
3359 * nto-low.c (nto_supports_z_point_type): New.
3360 (nto_insert_point, nto_remove_point): Adjust to new interface.
3361 (nto_target_ops): Install nto_supports_z_point_type.
3362 * mem-break.c: Adjust intro comment.
3363 (struct raw_breakpoint) <raw_type, size>: New fields.
3364 <inserted>: Update comment.
3365 <shlib_disabled>: Delete field.
3366 (enum bkpt_type) <gdb_breakpoint>: Delete value.
3367 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
3368 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
3369 (raw_bkpt_type_to_target_hw_bp_type): New function.
3370 (find_enabled_raw_code_breakpoint_at): New function.
3371 (find_raw_breakpoint_at): New type and size parameters. Use them.
3372 (insert_memory_breakpoint): New function, based off
3373 set_raw_breakpoint_at.
3374 (remove_memory_breakpoint): New function.
3375 (set_raw_breakpoint_at): Reimplement.
3376 (set_breakpoint): New, based on set_breakpoint_at.
3377 (set_breakpoint_at): Reimplement.
3378 (delete_raw_breakpoint): Go through the_target->remove_point
3379 instead of assuming memory breakpoints.
3380 (find_gdb_breakpoint_at): Delete.
3381 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
3382 (find_gdb_breakpoint): New function.
3383 (set_gdb_breakpoint_at): Delete.
3384 (z_type_supported): New function.
3385 (set_gdb_breakpoint_1): New function, loosely based off
3386 set_gdb_breakpoint_at.
3387 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
3388 (delete_gdb_breakpoint_at): Delete.
3389 (delete_gdb_breakpoint_1): New function, loosely based off
3390 delete_gdb_breakpoint_at.
3391 (delete_gdb_breakpoint): New function.
3392 (clear_gdb_breakpoint_conditions): Rename to ...
3393 (clear_breakpoint_conditions): ... this. Don't handle a NULL
3394 breakpoint.
3395 (add_condition_to_breakpoint): Make static.
3396 (add_breakpoint_condition): Take a struct breakpoint pointer
3397 instead of an address. Adjust.
3398 (gdb_condition_true_at_breakpoint): Rename to ...
3399 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
3400 z_type parameter.
3401 (gdb_condition_true_at_breakpoint): Reimplement.
3402 (add_breakpoint_commands): Take a struct breakpoint pointer
3403 instead of an address. Adjust.
3404 (gdb_no_commands_at_breakpoint): Rename to ...
3405 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
3406 parameter. Return true if no breakpoint was found. Change debug
3407 output.
3408 (gdb_no_commands_at_breakpoint): Reimplement.
3409 (run_breakpoint_commands): Rename to ...
3410 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
3411 and change return type to boolean.
3412 (run_breakpoint_commands): New function.
3413 (gdb_breakpoint_here): Also check for Z1 breakpoints.
3414 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
3415 breakpoint. Go through the_target->remove_point instead of
3416 assuming memory breakpoint.
3417 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
3418 software and hardware breakpoints.
3419 (reinsert_raw_breakpoint): Go through the_target->insert_point
3420 instead of assuming memory breakpoint.
3421 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
3422 software and hardware breakpoints.
3423 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
3424 Check both software and hardware breakpoints.
3425 (validate_inserted_breakpoint): Assert the breakpoint is a
3426 software breakpoint. Set the inserted flag to -1 instead of
3427 setting shlib_disabled.
3428 (delete_disabled_breakpoints): Adjust.
3429 (validate_breakpoints): Only validate software breakpoints.
3430 Adjust to inserted flag change.
3431 (check_mem_read, check_mem_write): Skip breakpoint types other
3432 than software breakpoints. Adjust to inserted flag change.
3433 * mem-break.h (enum raw_bkpt_type): New enum.
3434 (raw_breakpoint, struct process_info): Forward declare.
3435 (Z_packet_to_target_hw_bp_type): Delete declaration.
3436 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
3437 (set_gdb_breakpoint, delete_gdb_breakpoint)
3438 (clear_breakpoint_conditions): New declarations.
3439 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
3440 (breakpoint_inserted_here): Update comment.
3441 (add_breakpoint_condition, add_breakpoint_commands): Replace
3442 address parameter with a breakpoint pointer parameter.
3443 (gdb_breakpoint_here): Update comment.
3444 (delete_gdb_breakpoint_at): Delete.
3445 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
3446 * server.c (process_point_options): Take a struct breakpoint
3447 pointer instead of an address. Adjust.
3448 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
3449 delete_gdb_breakpoint.
3450 * spu-low.c (spu_target_ops): Install NULL as
3451 supports_z_point_type method.
3452 * target.h: Include mem-break.h.
3453 (struct target_ops) <prepare_to_access_memory>: Update comment.
3454 <supports_z_point_type>: New field.
3455 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
3456 instead of a char. Also take a raw breakpoint pointer.
3457 * win32-arm-low.c (the_low_target): Install NULL as
3458 supports_z_point_type.
3459 * win32-i386-low.c (i386_supports_z_point_type): New function.
3460 (i386_insert_point, i386_remove_point): Adjust to new interface.
3461 (the_low_target): Install i386_supports_z_point_type.
3462 * win32-low.c (win32_supports_z_point_type): New function.
3463 (win32_insert_point, win32_remove_point): Adjust to new interface.
3464 (win32_target_ops): Install win32_supports_z_point_type.
3465 * win32-low.h (struct win32_target_ops):
3466 <supports_z_point_type>: New method.
3467 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
3468 instead of a char. Also take a raw breakpoint pointer.
3469
932539e3
PA
34702014-05-20 Pedro Alves <palves@redhat.com>
3471
3472 * mem-break.h: Include break-common.h.
3473 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
3474 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
3475 (Z_packet_to_target_hw_bp_type): New declaration.
3476 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
3477 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
3478 (Z_PACKET_ACCESS_WP): Delete macros.
3479 (Z_packet_to_hw_type): Delete function.
3480 * i386-low.h: Don't include break-common.h here.
3481 (Z_packet_to_hw_type): Delete declaration.
3482 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
3483 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
3484 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
3485 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
3486 * linux-aarch64-low.c: Don't include break-common.h here.
3487 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
3488 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
3489 (Z_packet_to_target_hw_bp_type): Delete function.
3490 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
3491 function.
3492 (mips_insert_point, mips_remove_point): Use
3493 Z_packet_to_target_hw_bp_type.
3494
4ff0d3d8
PA
34952014-05-20 Pedro Alves <palves@redhat.com>
3496
3497 * linux-aarch64-low.c: Include break-common.h.
3498 (enum target_point_type): Delete.
3499 (Z_packet_to_point_type): Rename to ...
3500 (Z_packet_to_target_hw_bp_type): ... this, and return a
3501 target_hw_bp_type instead.
3502 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
3503 instead of an enum target_point_type.
3504 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
3505 breakpoint type.
3506 (aarch64_dr_state_insert_one_point)
3507 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
3508 (aarch64_handle_aligned_watchpoint)
3509 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
3510 Take an enum target_hw_bp_type instead of an enum
3511 target_point_type.
3512 (aarch64_supports_z_point_type): New function.
3513 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
3514 use Z_packet_to_target_hw_bp_type.
3515
786dc519
JB
35162014-05-20 Joel Brobecker <brobecker@adacore.com>
3517
3518 * configure.ac: Only use -Werror by default when DEVELOPMENT
3519 is true.
3520 * configure: Regenerate.
3521
9e0aa64f
JK
35222014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
3523
3524 Fix gdbserver qGetTLSAddr for x86_64 -m32.
3525 * linux-x86-low.c (X86_64_USER_REGS): New.
3526 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
3527
2b577b92
YQ
35282014-04-28 Yao Qi <yao@codesourcery.com>
3529
3530 * Makefile.in (i386-avx512.c): Fix the typo of generated file
3531 name.
3532
94611da2
PA
35332014-04-25 Pedro Alves <palves@redhat.com>
3534
3535 PR server/16255
3536 * linux-low.c (linux_attach_fail_reason_string): New function.
3537 (linux_attach_lwp): Delete.
3538 (linux_attach_lwp_1): Rename to ...
3539 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
3540 argument. Remove "initial" parameter. Return int instead of
3541 void. Don't error or warn here.
3542 (linux_attach): Adjust to call linux_attach_lwp. Call error on
3543 failure to attach to the tgid. Call warning when failing to
3544 attach to an lwp.
3545 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
3546 argument. Remove "initial" parameter. Return int instead of
3547 void. Don't error or warn here.
3548 (linux_attach_fail_reason_string): New declaration.
3549 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
3550 interface change. Use linux_attach_fail_reason_string.
3551
01f9f808
MS
35522014-04-24 Michael Sturm <michael.sturm@mintel.com>
3553 Walfred Tedeschi <walfred.tedeschi@intel.com>
3554
3555 * Makefile.in: Added rules to handle new files
3556 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
3557 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
3558 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
3559 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
3560 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
3561 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
3562 x32-avx512-linux.o.
3563 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
3564 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
3565 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
3566 i386/x32-avx512.xml.
3567 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
3568 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
3569 i386/x32-avx512-linux.xml.
3570 * i387-fp.c (num_avx512_k_registers): New constant for number
3571 of K registers.
3572 (num_avx512_zmmh_low_registers): New constant for number of
3573 lower ZMM registers (0-15).
3574 (num_avx512_zmmh_high_registers): New constant for number of
3575 higher ZMM registers (16-31).
3576 (num_avx512_ymmh_registers): New contant for number of higher
3577 YMM registers (ymm16-31 added by avx521 on x86_64).
3578 (num_avx512_xmm_registers): New constant for number of higher
3579 XMM registers (xmm16-31 added by AVX512 on x86_64).
3580 (struct i387_xsave): Add space for AVX512 registers.
3581 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
3582 Add code to handle AVX512 registers.
3583 (i387_xsave_to_cache): Add code to handle AVX512 registers.
3584 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
3585 prototypei from generated file.
3586 (tdesc_amd64_avx512_linux): Likewise.
3587 (init_registers_x32_avx512_linux): Likewise.
3588 (tdesc_x32_avx512_linux): Likewise.
3589 (init_registers_i386_avx512_linux): Likewise.
3590 (tdesc_i386_avx512_linux): Likewise.
3591 (x86_64_regmap): Add AVX512 registers.
3592 (x86_linux_read_description): Add code to handle AVX512 XSTATE
3593 mask.
3594 (initialize_low_arch): Add code to initialize AVX512 registers.
3595
51aa91f9
PA
35962014-04-23 Pedro Alves <palves@redhat.com>
3597
3598 * mem-break.c (find_gdb_breakpoint_at): Make static.
3599 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
3600
a4165e94
PA
36012014-04-23 Pedro Alves <palves@redhat.com>
3602
3603 * i386-low.c: Don't include break-common.h here.
3604 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
3605 prototype to take target_hw_bp_type as argument instead of a Z
3606 packet char.
3607 * i386-low.h: Include break-common.h here.
3608 (Z_packet_to_hw_type): Declare.
3609 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
3610 prototypes.
3611 * linux-x86-low.c (x86_insert_point): Convert the packet number to
3612 a target_hw_bp_type before calling i386_low_insert_watchpoint.
3613 (x86_remove_point): Convert the packet number to a
3614 target_hw_bp_type before calling i386_low_remove_watchpoint.
3615 * win32-i386-low.c (i386_insert_point): Convert the packet number
3616 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
3617 (i386_remove_point): Convert the packet number to a
3618 target_hw_bp_type before calling i386_low_remove_watchpoint.
3619
b8acf843
PA
36202014-04-23 Pedro Alves <palves@redhat.com>
3621
3622 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
3623
d708bcd1
PA
36242014-04-10 Pedro Alves <palves@redhat.com>
3625
3626 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
3627 Check if the condition or command is NULL before checking if the
3628 breakpoint is known. On success, return true.
3629 * mem-break.h (add_breakpoint_condition): Document return.
3630 (add_breakpoint_commands): Add describing comment.
3631 * server.c (skip_to_semicolon): New function.
3632 (process_point_options): Use it.
3633
2eec7d5b
PA
36342014-04-09 Pedro Alves <palves@redhat.com>
3635
3636 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
3637 to lwpid_of.
3638
fa96cb38
PA
36392014-02-27 Pedro Alves <palves@redhat.com>
3640
3641 PR 12702
3642 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
3643 macros.
3644 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
3645 output.
3646 (last_thread_of_process_p): Take a PID argument instead of a
3647 thread pointer.
3648 (linux_wait_for_lwp): Delete.
3649 (num_lwps, check_zombie_leaders, not_stopped_callback): New
3650 functions.
3651 (linux_low_filter_event): New function, party factored out from
3652 linux_wait_for_event.
3653 (linux_wait_for_event): Rename to ...
3654 (linux_wait_for_event_filtered): ... this. Add new filter ptid
3655 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
3656 sigsuspend. Check for zombie leaders.
3657 (linux_wait_for_event): Reimplement as wrapper around
3658 linux_wait_for_event_filtered.
3659 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
3660 a normal or signal exit is seen, it's the whole process exiting.
3661 (wait_for_sigstop): No longer a for_each_inferior callback.
3662 Rewrite on top of linux_wait_for_event_filtered.
3663 (stop_all_lwps): Call wait_for_sigstop directly.
3664 * server.c (resume, handle_target_event): Handle
3665 TARGET_WAITKIND_NO_RESUMED.
3666
d763de10
JB
36672014-02-26 Joel Brobecker <brobecker@adacore.com>
3668
3669 * win32-low.c (psapi_get_dll_name,
3670 * win32_CreateToolhelp32Snapshot): Delete.
3671 (win32_CreateToolhelp32Snapshot, win32_Module32First)
3672 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
3673 Delete.
3674 (handle_load_dll): Add function description.
3675 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
3676
850a0f76
JB
36772014-02-26 Joel Brobecker <brobecker@adacore.com>
3678
3679 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
3680 Add comment.
3681 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
3682 base address when calling win32_add_one_solib.
3683 (handle_load_dll): Delete local variable load_addr.
3684 Remove 0x1000 offset applied to DLL base address when calling
3685 win32_add_one_solib.
3686 (handle_unload_dll): Add comment.
3687
f25b3fc3
JB
36882014-02-26 Joel Brobecker <brobecker@adacore.com>
3689
3690 * win32-low.c (win32_add_all_dlls): Renames
3691 win32_ensure_ntdll_loaded. Rewrite function documentation.
3692 Adjust implementation to always load all DLLs.
3693 Add 0x1000 offset to DLL base address when calling
3694 win32_add_one_solib.
3695 (child_initialization_done): New static global.
3696 (do_initial_child_stuff): Set child_initialization_done to
3697 zero during child initialization, and 1 after. Replace call
3698 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
3699 Add comment.
3700 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
3701 (handle_unload_dll): Add function documentation.
3702 (get_child_debug_event): Ignore load and unload DLL events
3703 during child initialization.
3704
d86d4aaf
DE
37052014-02-20 Doug Evans <dje@google.com>
3706
3bc32da3 3707 Remove global all_lwps.
d86d4aaf
DE
3708 * inferiors.h (ptid_of): Move here from linux-low.h.
3709 (pid_of, lwpid_of): Ditto.
3710 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
3711 parameter is a struct thread_info * now.
3712 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
3713 directly. Pass &all_threads to find_inferior instead of &all_lwps.
3714 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
3715 directly.
3716 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
3717 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
3718 * linux-arm-low.c (update_registers_callback): Update, "entry"
3719 parameter is a struct thread_info * now.
3720 Fetch lwpid from current_inferior directly.
3721 (arm_insert_point): Pass &all_threads to find_inferior instead of
3722 &all_lwps.
3723 (arm_remove_point): Ditto.
3724 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
3725 (arm_prepare_to_resume): Fetch pid from thread.
3726 (arm_read_description): Fetch lwpid from current_inferior directly.
3727 * linux-low.c (all_lwps): Delete.
3728 (delete_lwp): Delete call to remove_inferior.
3729 (handle_extended_wait): Fetch lwpid from thread.
3730 (add_lwp): Don't set lwp->entry.id. Remove call to
3731 add_inferior_to_list.
3732 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
3733 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
3734 (kill_one_lwp_callback): Ditto.
3735 (linux_kill): Don't dereference NULL pointer.
3736 Fetch ptid,lwpid from thread.
3737 (get_detach_signal): Fetch ptid from thread.
3738 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
3739 Simplify call to regcache_invalidate_thread.
3740 (delete_lwp_callback): Update, "entry" parameter is a
3741 struct thread_info * now. Fetch pid from thread.
3742 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
3743 (status_pending_p_callback): Update, "entry" parameter is a
3744 struct thread_info * now. Fetch ptid from thread.
3745 (find_lwp_pid): Update, "entry" parameter is a
3746 struct thread_info * now.
3747 (linux_wait_for_lwp): Fetch pid from thread.
3748 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
3749 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
3750 (enqueue_one_deferred_signal): Fetch lwpid from thread.
3751 (dequeue_one_deferred_signal): Ditto.
3752 (cancel_breakpoint): Fetch ptid from current_inferior.
3753 (linux_wait_for_event): Pass &all_threads to find_inferior,
3754 not &all_lwps. Fetch ptid, lwpid from thread.
3755 (count_events_callback): Update, "entry" parameter is a
3756 struct thread_info * now.
3757 (select_singlestep_lwp_callback): Ditto.
3758 (select_event_lwp_callback): Ditto.
3759 (cancel_breakpoints_callback): Ditto.
3760 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
3761 not &all_lwps.
3762 (select_event_lwp): Ditto. Fetch ptid from event_thread.
3763 (unsuspend_one_lwp): Update, "entry" parameter is a
3764 struct thread_info * now.
3765 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
3766 not &all_lwps.
3767 (linux_stabilize_threads): Ditto. And for for_each_inferior.
3768 Fetch lwpid from thread, not lwp.
3769 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
3770 Pass &all_threads to find_inferior, not &all_lwps.
3771 (send_sigstop): Fetch lwpid from thread, not lwp.
3772 (send_sigstop_callback): Update, "entry" parameter is a
3773 struct thread_info * now.
3774 (suspend_and_send_sigstop_callback): Ditto.
3775 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
3776 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
3777 struct thread_info * now.
3778 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
3779 from thread, lwp.
3780 (lwp_running): Update, "entry" parameter is a
3781 struct thread_info * now.
3782 (stop_all_lwps): Fetch ptid from thread.
3783 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
3784 (linux_resume_one_lwp): Fetch lwpid from thread.
3785 (linux_set_resume_request): Update, "entry" parameter is a
3786 struct thread_info * now. Fetch pid, lwpid from thread.
3787 (resume_status_pending_p): Update, "entry" parameter is a
3788 struct thread_info * now.
3789 (need_step_over_p): Ditto. Fetch lwpid from thread.
3790 (start_step_over): Fetch lwpid from thread.
3791 (linux_resume_one_thread): Update, "entry" parameter is a
3792 struct thread_info * now. Fetch lwpid from thread.
3793 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
3794 (proceed_one_lwp): Update, "entry" parameter is a
3795 struct thread_info * now. Fetch lwpid from thread.
3796 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
3797 struct thread_info * now.
3798 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
3799 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
3800 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
3801 directly.
3802 (regsets_store_inferior_registers): Ditto.
3803 (fetch_register, store_register): Ditto.
3804 (linux_read_memory, linux_write_memory): Ditto.
3805 (linux_request_interrupt): Ditto.
3806 (linux_read_auxv): Ditto.
3807 (linux_xfer_siginfo): Ditto.
3808 (linux_qxfer_spu): Ditto.
3809 (linux_qxfer_libraries_svr4): Ditto.
3810 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
3811 moved to inferiors.h.
3812 (get_lwp): Delete.
3813 (get_thread_lwp): Update.
3814 (struct lwp_info): Delete member "entry". Simplify comment for
3815 member "thread".
3816 (all_lwps): Delete.
3817 * linux-mips-low.c (mips_read_description): Fetch lwpid from
3818 current_inferior directly.
3819 (update_watch_registers_callback): Update, "entry" parameter is a
3820 struct thread_info * now. Fetch pid from thread.
3821 (mips_linux_prepare_to_resume): Fetch ptid from thread.
3822 (mips_insert_point): Fetch lwpid from current_inferior.
3823 Pass &all_threads to find_inferior, not &all_lwps.
3824 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
3825 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
3826 directly.
3827 (mips_stopped_data_address): Ditto.
3828 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
3829 directly.
3830 * linux-tile-low.c (tile_arch_setup): Ditto.
3831 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
3832 (update_debug_registers_callback): Update, "entry" parameter is a
3833 struct thread_info * now. Fetch pid from thread.
3834 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
3835 Pass &all_threads to find_inferior, not &all_lwps.
3836 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
3837 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
3838 Pass &all_threads to find_inferior, not &all_lwps.
3839 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
3840 (i386_dr_low_get_status): Ditto.
3841 (x86_linux_prepare_to_resume): Fetch ptid from thread.
3842 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
3843 (x86_linux_read_description): Ditto.
3844 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
3845
3b8361aa
DE
38462014-02-20 Doug Evans <dje@google.com>
3847
3848 * inferiors.c (get_first_inferior): Fix buglet.
3849
f7667f0d
DE
38502014-02-19 Doug Evans <dje@google.com>
3851
3852 * gdbthread.h (add_thread): Change result type to struct thread_info *.
3853 * inferiors.c (add_thread): Change result type to struct thread_info *.
3854 All callers updated.
3855 (add_lwp): Call add_thread here instead of in callers.
3856 All callers updated.
3857 * linux-low.h (get_lwp_thread): Rewrite.
3858 (struct lwp_info): New member "thread".
3859
b3312d80
DE
38602014-02-19 Doug Evans <dje@google.com>
3861
3862 * linux-low.c (add_lwp): Change result to struct lwp_info *.
3863 All callers updated.
3864
ecc6f45c
DE
38652014-02-19 Doug Evans <dje@google.com>
3866
3867 * inferiors.c (add_thread): Fix whitespace.
3868
649ebbca
DE
38692014-02-19 Doug Evans <dje@google.com>
3870
3871 * dll.c (clear_dlls): Replace accessing list implemention details
3872 with API function.
3873 * gdbthread.h (get_first_thread): Declare.
3874 * inferiors.c (for_each_inferior_with_data): New function.
3875 (get_first_thread): New function.
3876 (find_thread_ptid): Simplify.
3877 (get_first_inferior): New function.
3878 (clear_list): Delete.
3879 (one_inferior_p): New function.
3880 (clear_inferior_list): New function.
3881 (clear_inferiors): Update.
3882 * inferiors.h (for_each_inferior_with_data): Declare.
3883 (clear_inferior_list): Declare.
3884 (one_inferior_p): Declare.
3885 (get_first_inferior): Declare.
3886 * linux-low.c (linux_wait_for_event): Replace accessing list
3887 implemention details with API function.
3888 * server.c (target_running): Ditto.
3889 (accumulate_file_name_length): New function.
3890 (emit_dll_description): New function.
3891 (handle_qxfer_libraries): Replace accessing list implemention
3892 details with API function.
3893 (handle_qxfer_threads_worker): New function.
3894 (handle_qxfer_threads_proper): Replace accessing list implemention
3895 details with API function.
3896 (handle_query): Ditto.
3897 (visit_actioned_threads_callback_ftype): New typedef.
3898 (visit_actioned_threads_data): New struct.
3899 (visit_actioned_threads): Rewrite to be find_inferior callback.
3900 (resume): Call find_inferior.
3901 (handle_status): Replace accessing list implemention
3902 details with API function.
3903 (process_serial_event): Replace accessing list implemention details
3904 with API function.
3905 * target.c (set_desired_inferior): Replace accessing list implemention
3906 details with API function.
3907 * tracepoint.c (same_process_p): New function.
3908 (gdb_agent_about_to_close): Replace accessing list implemention
3909 details with API function.
3910 * win32-low.c (child_delete_thread): Replace accessing list
3911 implemention details with API function.
3912 (match_dll_by_basename): New function.
3913 (dll_is_loaded_by_basename): New function.
3914 (win32_ensure_ntdll_loaded): Replace accessing list implemention
3915 details call to dll_is_loaded_by_basename.
3916
80894984
DE
39172014-02-19 Doug Evans <dje@google.com>
3918
3919 * dll.h (struct dll_info): Add comment.
3920 * gdbthread.h (struct thread_info): Add comment.
3921 (current_ptid): Simplify.
3922 * inferiors.c (add_process): Update.
3923 (remove_process): Update.
3924 * inferiors.h (struct process_info): Rename member "head" to "entry".
3925 * linux-low.c (delete_lwp): Update.
3926 (add_lwp): Update.
3927 (last_thread_of_process_p): Update.
3928 (kill_one_lwp_callback, linux_kill): Update.
3929 (status_pending_p_callback): Update.
3930 (wait_for_sigstop): Update. Simplify read of ptid.
3931 (start_step_over): Update.
3932 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
3933 (get_lwp_thread): Update.
3934 (struct lwp_info): Rename member "head" to "entry".
3935 * regcache.h (inferior_list_entry): Delete.
3936 * server.c (kill_inferior_callback): Update.
3937 (detach_or_kill_inferior_callback): Update.
3938 (print_started_pid): Update.
3939 (print_attached_pid): Update.
3940 (process_serial_event): Simplify read of ptid.
3941 * thread-db.c (thread_db_create_event): Update.
3942 (thread_db_get_tls_address): Update.
3943 * win32-low.c (current_inferior_ptid): Simplify.
3944
46917d26
TT
39452014-02-19 Tom Tromey <tromey@redhat.com>
3946
3947 * target.h (struct target_ops) <supports_btrace>: Add target_ops
3948 argument.
3949 (target_supports_btrace): Update.
3950
0759a81e
YQ
39512014-02-14 Yao Qi <yao@codesourcery.com>
3952
3953 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
3954 (rsp-low-ipa.o): New target.
3955
a7191e8b
TT
39562014-02-12 Tom Tromey <tromey@redhat.com>
3957
3958 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
3959 convert_ascii_to_int.
3960 * regcache.c (registers_to_string): Likewise.
3961 * remote-utils.c (decode_M_packet): Likewise.
3962 * server.c (process_serial_event): Likewise.
3963
ff0e980e
TT
39642014-02-12 Tom Tromey <tromey@redhat.com>
3965
3966 * server.c (handle_query, handle_v_run): Use hex2bin, not
3967 unhexify.
3968 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
3969
e9371aff
TT
39702014-02-12 Tom Tromey <tromey@redhat.com>
3971
3972 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
3973 convert_int_to_ascii.
3974 * regcache.c (registers_to_string, collect_register_as_string):
3975 Likewise.
3976 * remote-utils.c (look_up_one_symbol, relocate_instruction):
3977 Likewise.
3978 * server.c (process_serial_event): Likewise.
3979 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
3980 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
3981
971dc0b8
TT
39822014-02-12 Tom Tromey <tromey@redhat.com>
3983
3984 * remote-utils.c (look_up_one_symbol, monitor_output): Use
3985 bin2hex, not hexify.
3986 * tracepoint.c (cmd_qtstatus): Likewise.
3987
0a822afb
TT
39882014-02-12 Tom Tromey <tromey@redhat.com>
3989
3990 * remote-utils.c (monitor_output): Pass explicit length to
3991 hexify.
3992
9c3d6531
TT
39932014-02-12 Tom Tromey <tromey@redhat.com>
3994
3995 * tracepoint.c: Include rsp-low.h.
3996 * server.c: Include rsp-low.h.
3997 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
3998 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
3999 declare.
4000 * remote-utils.c: Include rsp-low.h.
4001 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
4002 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
4003 (convert_int_to_ascii, convert_ascii_to_int): Move to
4004 common/rsp-low.c.
4005 * regcache.c: Include rsp-low.h.
4006 * ax.c: Include rsp-low.h.
4007 * Makefile.in (SFILES): Add common/rsp-low.c.
4008 (OBS): Add rsp-low.o.
4009 (rsp-low.o): New target.
4010
01fd3ea5
TT
40112014-02-12 Tom Tromey <tromey@redhat.com>
4012
4013 * utils.h (pulongest, plongest, phex_nz): Don't declare.
4014 Include print-utils.h.
4015 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
4016 (plongest, thirty_two, phex_nz): Remove.
4017 * Makefile.in (SFILES): Add common/print-utils.c.
4018 (OBS): Add print-utils.o.
4019 (print-utils-ipa.o): New target.
4020 (print-utils.o): New target.
4021 (IPA_OBJS): Add print-utils-ipa.o.
4022
e99dc820
TT
40232014-02-06 Tom Tromey <tromey@redhat.com>
4024
4025 * Makefile.in (SFILES): Fix indentation.
4026
ee1e2d4f
DE
40272014-02-05 Doug Evans <dje@google.com>
4028
4029 * linux-low.c (linux_wait_for_event): Improve comment.
4030 (linux_wait_1): Keep current_inferior in sync with event_child.
4031
f5a02773
DE
40322014-01-22 Doug Evans <dje@google.com>
4033
4034 * gdbthread.h (gdb_id_to_thread): Delete, unused.
4035
87ce2a04
DE
40362014-01-22 Doug Evans <dje@google.com>
4037
4038 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
4039 * configure: Regenerate.
4040 * config.in: Regenerate.
4041 * Makefile.in (SFILES): Add debug.c.
4042 (OBS): Add debug.o.
4043 * debug.c: New file.
4044 * debug.h: New file.
4045 * linux-aarch64-low.c (*): Update all debugging printfs to use
4046 debug_printf instead of fprintf.
4047 * linux-arm-low.c (*): Ditto.
4048 * linux-cris-low.c (*): Ditto.
4049 * linux-crisv32-low.c (*): Ditto.
4050 * linux-m32r-low.c (*): Ditto.
4051 * linux-sparc-low.c (*): Ditto.
4052 * linux-x86.c (*): Ditto.
4053 * linux-low.c (*): Ditto.
4054 (linux_wait_1): Add calls to debug_enter, debug_exit.
4055 (linux_wait): Remove redundant debugging printf.
4056 (stop_all_lwps): Add calls to debug_enter, debug_exit.
4057 (linux_resume, unstop_all_lwps): Ditto.
4058 * mem-break.c (*): Update all debugging printfs to use
4059 debug_printf instead of fprintf.
4060 * remote-utils.c (*): Ditto.
4061 * thread-db.c (*): Ditto.
4062 * server.c #include <ctype.h>, "gdb_vecs.h".
4063 (debug_threads): Moved to debug.c.
4064 (*): Update all debugging printfs to use debug_printf instead of
4065 fprintf.
4066 (start_inferior): Replace call to fflush with call to debug_flush.
4067 (monitor_show_help): Mention set debug-format.
4068 (parse_debug_format_options): New function.
4069 (handle_monitor_command): Handle "monitor set debug-format".
4070 (gdbserver_usage): Mention --debug-format.
4071 (main): Parse --debug-format.
4072 * server.h (debug_threads): Declaration moved to debug.h.
4073 #include "debug.h".
4074 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
4075 trace_debug_1 that uses debug_printf.
4076 (tracepoint_look_up_symbols): Update all debugging printfs to use
4077 debug_printf instead of fprintf.
4078
e671835b
BS
40792014-01-20 Baruch Siach <baruch@tkos.co.il>
4080
4081 * linux-xtensa-low.c: Include asm/ptrace.h instead of
4082 sys/ptrace.h.
4083
b5737fa9
PA
40842014-01-17 Pedro Alves <palves@redhat.com>
4085
ea38d2a9 4086 PR build/16445
c7faa97a
PA
4087 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
4088 defined after including gdb_proc_service.h.
b5737fa9 4089
40ed484e
DE
40902014-01-16 Doug Evans <dje@google.com>
4091
4092 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
4093 (match_dll): Use it.
4094
969c39fb
MM
40952014-01-16 Markus Metzger <markus.t.metzger@intel.com>
4096
4097 * target.h (target_ops) <read_btrace>: Change parameters and
4098 return type to allow error reporting.
4099 * server.c (handle_qxfer_btrace): Support delta reads. Pass
4100 trace reading errors on.
4101 * linux-low.c (linux_low_read_btrace): Pass trace reading
4102 errors on.
4103 (linux_low_disable_btrace): New.
4104
ab7f45ba
DE
41052014-01-15 Doug Evans <dje@google.com>
4106
4107 * inferiors.c (thread_id_to_gdb_id): Delete.
4108 * inferiors.h (thread_id_to_gdb_id): Delete.
4109
66af0f44
EZ
41102014-01-13 Eli Zaretskii <eliz@gnu.org>
4111
4112 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
4113 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
4114 versions.
4115
9939e131
PA
41162014-01-08 Pedro Alves <palves@redhat.com>
4117
4118 * server.c (handle_status): Don't discard previous queued stop
4119 replies or thread's pending status here.
4120 (main) <disconnection>: Do it here instead.
4121
b7ea362b
PA
41222014-01-08 Pedro Alves <palves@redhat.com>
4123
4124 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
4125 * server.c (visit_actioned_threads, handle_pending_status): New
4126 function.
4127 (handle_v_cont): Factor out parts to ...
4128 (resume): ... this new function. If in all-stop, and a thread
4129 being resumed has a pending status, report it without actually
4130 resuming.
4131 (myresume): Adjust to use the new 'resume' function.
4132 (clear_pending_status_callback, set_pending_status_callback)
4133 (find_status_pending_thread_callback): New functions.
4134 (handle_status): Handle the case of multiple threads having
4135 interesting statuses to report. Report threads' real last signal
4136 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
4137 with an interesting thread to report the status for, instead of
4138 always reporting the status of the first thread.
4139
28498c42
JB
41402014-01-01 Joel Brobecker <brobecker@adacore.com>
4141
4142 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
4143 * gdbreplay.c (gdbreplay_version): Likewise.
4144
f45c82da
YZ
41452013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
4146
4147 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
4148 iov.iov_len with the real length in use.
4149
379a5e2d
JB
41502013-12-13 Joel Brobecker <brobecker@adacore.com>
4151
4152 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
4153 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
4154 for all targets that use win32-low.c.
4155 * win32-low.c (win32_ensure_ntdll_loaded): New function.
4156 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
4157
4210d83e
PA
41582013-12-13 Pedro Alves <palves@redhat.com>
4159
4160 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
4161 if equal to TARGET_WAITKIND_LOADED.
4162 * win32-low.c (cached_status): New static global.
4163 (win32_wait): Add declaration.
4164 (do_initial_child_stuff): Flush all initial pending debug events
4165 up to the initial breakpoint.
4166 (win32_wait): If CACHED_STATUS was set, return that instead
4167 of doing a real wait. Remove the code resuming the execution
4168 of the inferior after receiving a TARGET_WAITKIND_LOADED event
4169 during the initial phase. Also remove the code changing
4170 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
4171 TARGET_WAITKIND_STOPPED.
4172
e7f0d979
YQ
41732013-12-11 Yao Qi <yao@codesourcery.com>
4174
4175 * notif.c (handle_notif_ack): Return 0 if no notification
4176 matches.
4177
ebcf782c
DE
41782013-11-20 Doug Evans <dje@google.com>
4179
4180 * linux-low.c (linux_set_resume_request): Fix comment.
4181
20ad9378
DE
41822013-11-20 Doug Evans <dje@google.com>
4183
4184 * linux-low.c (resume_status_pending_p): Tweak comment.
4185
a196ebeb
WT
41862013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
4187
4188 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
4189 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
4190 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
4191 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
4192 (srv_amd64_regobj): Add amd64-mpx.o.
4193 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
4194 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
4195 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
4196 * i387-fp.c (num_pl_bnd_register) Added constant.
4197 (num_pl_bnd_cfg_registers) Added constant.
4198 (struct i387_xsave) Added reserved area and MPX fields.
4199 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
4200 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
4201 function.
4202 (tdesc_i386_mpx_linux): Add MPX amd64 target.
4203 (init_registers_amd64_mpx_linux): Declare new function.
4204 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
4205 (x86_64_regmap): Add MPX registers.
4206 (x86_linux_read_description): Add MPX case.
4207 (initialize_low_arch): Initialize MPX targets.
4208
0080a2f6
TT
42092013-11-18 Tom Tromey <tromey@redhat.com>
4210
4211 * configure: Rebuild.
4212 * configure.ac: Don't check for stdlib.h.
4213 * gdbreplay.c: Unconditionally include stdlib.h.
4214
2978b111
TT
42152013-11-18 Tom Tromey <tromey@redhat.com>
4216
4217 * config.in: Rebuild.
4218 * configure: Rebuild.
4219 * configure.ac: Don't use AC_HEADER_DIRENT.
4220
a3d08894
TT
42212013-11-18 Tom Tromey <tromey@redhat.com>
4222
4223 * server.h: Don't check HAVE_STRING_H.
4224 * gdbreplay.c: Don't check HAVE_STRING_H.
4225 * configure: Rebuild.
4226
0a5dd17d
TT
42272013-11-18 Tom Tromey <tromey@redhat.com>
4228
4229 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
4230 LIBGNU.
4231
1bd2f0ba
TT
42322013-11-08 Tom Tromey <tromey@redhat.com>
4233
4234 * configure, config.in: Rebuild.
4235 * configure.ac: Remove unused configury.
4236
3266f10b
TT
42372013-11-08 Tom Tromey <tromey@redhat.com>
4238
4239 * acinclude.m4: Include common.m4, codeset.m4.
4240 * configure, config.in: Rebuild.
4241 * configure.ac: Use GDB_AC_COMMON.
4242
6682d959
AA
42432013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
4244
4245 * linux-s390-low.c (HWCAP_S390_TE): New define.
4246 (s390_arch_setup): Consider the TE field in the HWCAP for
4247 determining 'have_regset_tdb'.
4248
fd0a4d76
SDJ
42492013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
4250
4251 PR gdb/16014
4252 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
4253 call to sizeof.
4254
1a3d890b
PA
42552013-10-02 Pedro Alves <palves@redhat.com>
4256
4257 * server.c (process_serial_event): Don't output "GDBserver
4258 exiting" if GDB is connected through stdio.
4259 * target.c (mywait): Likewise, be silent if GDB is connected
4260 through stdio.
4261
97ad4581
JB
42622013-10-01 Joel Brobecker <brobecker@adacore.com>
4263
4264 * lynx-low.c (lynx_add_threads_after_attach): New function.
4265 (lynx_attach): Remove call to add_thread. Add call to
4266 lynx_add_threads_after_attach instead.
4267
5b4e221c
MF
42682013-09-28 Mike Frysinger <vapier@gentoo.org>
4269
4270 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
4271 * config.in, configure: Regenerated.
4272
ee47b2f8
YQ
42732013-09-18 Yao Qi <yao@codesourcery.com>
4274
4275 PR server/15959
4276 * server.c (start_inferior): Clear 'resume_info'.
4277
d6707650 42782013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 4279
d6707650
JW
4280 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
4281 for each register.
4282
9243dd0e 42832013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 4284
9243dd0e
JW
4285 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
4286 linux-tile-low.o to srv_tgtobj.
4287
c623a6ef
WN
42882013-09-16 Will Newton <will.newton@linaro.org>
4289
4290 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
4291 out regs.
4292
fb71d39e
PA
42932013-09-06 Pedro Alves <palves@redhat.com>
4294
4295 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
4296 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
4297 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
4298 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
4299 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
4300 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
4301
8e7e9910
PA
43022013-09-06 Pedro Alves <palves@redhat.com>
4303
4304 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
4305 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
4306
7c3a12ca
PA
43072013-09-06 Pedro Alves <palves@redhat.com>
4308
4309 * linux-amd64-ipa.c: Include tracepoint.h.
4310 * linux-i386-ipa.c: Include tracepoint.h.
4311
8eb3d7b6
RW
43122013-09-06 Ricard Wanderlof <ricardw@axis.com>
4313
4314 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
4315 (ps_get_thread_area): New function.
4316
eddddb9d
RW
43172013-09-06 Ricard Wanderlof <ricardw@axis.com>
4318
4319 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
4320 (initialize_low_arch): Call init_registers_crisv32 rather than
4321 init_register_crisv32.
4322
533b0600
PA
43232013-09-05 Pedro Alves <palves@redhat.com>
4324
4325 * server.h (handle_vFile, hostio_last_error_from_errno): Move
4326 to ...
4327 * hostio.h: ... this new file.
4328 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
4329 win32-low.c: Include hostio.h.
4330
0ce3d3b5
PA
43312013-09-05 Pedro Alves <palves@redhat.com>
4332
4333 * server.h (gdb_client_data, handler_func, callback_handler_func)
4334 (delete_file_handler, add_file_handler, append_callback_event)
4335 (delete_callback_event, start_event_loop, initialize_event_loop):
4336 Move to event-loop.h and include it.
4337 * event-loop.h: New file.
4338
799cdc37
PA
43392013-09-05 Pedro Alves <palves@redhat.com>
4340
4341 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
4342 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
4343 (loaded_dll, unloaded_dll): Move to ...
4344 * dll.h: ... this new file.
4345 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
4346
6a6bbd9d
PA
43472013-09-05 Pedro Alves <palves@redhat.com>
4348
4349 * server.h (current_process, get_thread_process, all_processes)
4350 (add_inferior_to_list, for_each_inferior, current_inferior)
4351 (remove_inferior, add_process, remove_process, find_process_pid)
4352 (have_started_inferiors_p, have_attached_inferiors_p)
4353 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
4354 (clear_inferiors, find_inferior, find_inferior_id)
4355 (inferior_target_data, set_inferior_target_data)
4356 (inferior_regcache_data, set_inferior_regcache_data): Move to
4357 inferiors.h, and include it.
4358 * inferiors.h: New file.
4359
f699aaba
PA
43602013-09-05 Pedro Alves <palves@redhat.com>
4361
4362 * server.h (struct emit_ops, current_insn_ptr, emit_error):
4363 Move ...
72f4393d 4364 * ax.h: ... here.
f699aaba 4365
c144c7a0
PA
43662013-09-05 Pedro Alves <palves@redhat.com>
4367
4368 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
4369 tracepoint.h.
4370 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
4371 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
4372 (handle_tracepoint_general_set, handle_tracepoint_query)
4373 (tracepoint_finished_step, tracepoint_was_hit)
4374 (release_while_stepping_state_list, current_traceframe)
4375 (in_readonly_region, traceframe_read_mem)
4376 (fetch_traceframe_registers, traceframe_read_sdata)
4377 (traceframe_read_info, struct fast_tpoint_collect_status)
4378 (fast_tracepoint_collecting, force_unlock_trace_buffer)
4379 (handle_tracepoit_bkpts, initialize_low_tracepoint)
4380 (supply_fast_tracepoint_registers)
4381 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
4382 (ipa_tdesc, claim_trampoline_space)
4383 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
4384 (agent_mem_read, agent_get_trace_state_variable_value)
4385 (agent_set_trace_state_variable_value, agent_tsv_read)
4386 (agent_mem_read_string, get_raw_reg_func_addr)
4387 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
4388 * tracepoint.h: ... this new file.
4389
ff42e6ab
PA
43902013-09-05 Pedro Alves <palves@redhat.com>
4391
4392 * server.h (perror_with_name, error, fatal, warning, paddress)
4393 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
4394 include it.
4395 * utils.h: New file.
4396
541af0f4
PA
43972013-09-05 Pedro Alves <palves@redhat.com>
4398
4399 * server.h (remote_debug, noack_mode, transport_is_reliable)
4400 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
4401 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
4402 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
4403 (write_enn, initialize_async_io, enable_async_io)
4404 (disable_async_io, check_remote_input_interrupt_request)
4405 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
4406 (dead_thread_notify, prepare_resume_reply)
4407 (decode_address_to_semicolon, decode_address, decode_m_packet)
4408 (decode_M_packet, decode_X_packet, decode_xfer_write)
4409 (decode_search_memory_packet, unhexify, hexify)
4410 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
4411 (look_up_one_symbol, relocate_instruction)
4412 (monitor_output): Move to remote-utils.h, and include it.
4413 * remote-utils.h: New file.
4414
eebdf26b
PA
44152013-09-05 Pedro Alves <palves@redhat.com>
4416
4417 * server.h (_): Delete.
4418
3aafd2ff
PA
44192013-09-02 Pedro Alves <palves@redhat.com>
4420
4421 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
4422 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
4423 allocated.
4424 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
4425
cee83bcb
PM
44262013-09-02 Pierre Muller <muller@sourceware.org>
4427
4428 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
4429 or WriteProcessMemory complete successfully and handle
4430 ERROR_PARTIAL_COPY error.
4431
9a13b2fa
PA
44322013-09-02 Pedro Alves <palves@redhat.com>
4433
4434 * server.c (gdb_read_memory): Return -1 on traceframe memory read
4435 error instead of EIO.
4436
602e3198
JK
44372013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4438
4439 PR server/15604
4440 * linux-low.c: Include filestuff.h.
4441 (linux_create_inferior) <pid == 0>: Call close_most_fds.
4442 * lynx-low.c: Include filestuff.h.
4443 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
4444 * server.c: Include filestuff.h.
4445 (main): Call notice_open_fds.
4446 * spu-low.c: Include filestuff.h.
4447 (spu_create_inferior) <pid == 0>: Call close_most_fds.
4448
96d7229d
LM
44492013-08-22 Luis Machado <lgustavo@codesourcery.com>
4450
4451 * Makefile.in: Explain why ../target and ../nat are not
4452 listed as include file search paths.
4453 (linux-waitpid.o): New object file rule.
4454 * configure.srv (srv_native_linux_obj): New variable.
4455 Replace all occurrences of linux native object files with
4456 $srv_native_linux_obj.
4457 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
4458 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
4459 (linux_enable_event_reporting): Remove declaration.
4460 (my_waitpid): Moved to common/linux-waitpid.c.
4461 (linux_wait_for_event): Pass ptid when calling
4462 linux_enable_event_reporting.
4463 (linux_supports_tracefork_flag): Remove.
4464 (linux_enable_event_reporting): Likewise.
4465 (linux_tracefork_grandchild): Remove.
4466 (STACK_SIZE): Moved to common/linux-ptrace.c.
4467 (linux_tracefork_child): Remove.
4468 (linux_test_for_tracefork): Remove.
4469 (linux_look_up_symbols): Call linux_supports_traceclone.
4470 (initialize_low): Remove call to linux_test_for_tracefork.
4471 * linux-low.h (PTRACE_TYPE_ARG3): Move to
4472 common/linux-ptrace.h.
4473 (PTRACE_TYPE_ARG4): Likewise.
4474 Include linux-ptrace.h.
4475
32940073
PA
44762013-08-21 Pedro Alves <palves@redhat.com>
4477
4478 * config.in: Renegerate.
4479
33b60d58 44802013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 4481
33b60d58
LM
4482 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
4483 (SFILES): Remove $(srcdir)/common/target-common.c and
4484 add $(srcdir)/target/waitstatus.c.
4485 (OBS): Remove target-common.o and add waitstatus.o.
4486 (server_h): Remove $(srcdir)/../common/target-common.h and
4487 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
4488 and $(srcdir)/../target/waitstatus.h.
4489 (target-common.o): Remove.
4490 (waitstatus.o): New target object file.
4491 * target.h: Do not include target-common.h and
4492 include target/resume.h, target/wait.h and
4493 target/waitstatus.h.
4494
b8e1b30e
LM
44952013-08-13 Luis Machado <lgustavo@codesourcery.com>
4496
4497 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
4498 to PTRACE_TYPE_ARG3.
4499 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
4500 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
4501 PTRACE_TYPE_ARG4.
4502 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
4503 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
4504
7a60ad40
YQ
45052013-07-27 Jie Zhang <jie@codesourcery.com>
4506 Daniel Jacobowitz <dan@codesourcery.com>
4507 Yao Qi <yao@codesourcery.com>
4508
4509 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
4510 (mips-linux-watch.o): New rule.
4511 (mips_linux_watch_h): New variable.
4512 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
4513 srv_tgtobj.
4514 * linux-mips-low.c: Include mips-linux-watch.h.
4515 (struct arch_process_info, struct arch_lwp_info): New.
4516 (update_watch_registers_callback): New function.
4517 (mips_linux_new_process, mips_linux_new_thread) New functions.
4518 (mips_linux_prepare_to_resume, mips_insert_point): New
4519 functions.
4520 (mips_remove_point, mips_stopped_by_watchpoint): New
4521 functions.
4522 (rsp_bp_type_to_target_hw_bp_type): New function.
4523 (mips_stopped_data_address): New function.
4524 (the_low_target): Add watchpoint support functions.
4525
de6f69ad
YQ
45262013-07-27 Yao Qi <yao@codesourcery.com>
4527
4528 * i386-low.c: Include break-common.h.
4529 (enum target_hw_bp_type): Remove.
4530
3360c0bf
LM
45312013-07-24 Luis Machado <lgustavo@codesourcery.com>
4532
4533 * Makefile.in (SFILES): /common/target-common.c.
4534 (OBS): Add target-common.o.
4535 (server_h): Add $(srcdir)/../common/target-common.h.
4536 (target-common.o): New target.
4537 * server.c (queue_stop_reply_callback): Free
4538 status string after use.
4539 * target.c (target_waitstatus_to_string): Remove.
4540 * target.h: Include target-common.h.
4541 (resume_kind): Likewise.
4542 (target_waitkind): Likewise.
4543 (target_waitstatus): Likewise.
4544 (TARGET_WNOHANG): Likewise.
4545
bd885420
YQ
45462013-07-04 Yao Qi <yao@codesourcery.com>
4547
4548 * Makefile.in (host_alias): Use @host_noncanonical@.
4549 (target_alias): Use @target_noncanonical@.
4550 * configure.ac: Use ACX_NONCANONICAL_TARGET and
4551 ACX_NONCANONICAL_HOST.
4552 * configure: Regenerated.
4553
4554 Revert:
4555 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
4556
4557 * configure.ac (version_host, version_target): Set and AC_SUBST them.
4558 * configure: Rebuild.
4559 * Makefile.in (version_host, version_target): Get from configure.
4560 (version.c): Use $(version_host) and $(version_target).
4561
17ef446e
PA
45622013-07-03 Pedro Alves <palves@redhat.com>
4563
4564 * Makefile.in (config.status): Depend on development.sh.
4565 * acinclude.m4: Include libmcheck.m4.
4566 * configure: Regenerate.
4567
7a9a7487
MG
45682013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
4569
4570 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
4571 attribute inside the parentheses.
4572 (winapi_DebugSetProcessKillOnExit): Ditto.
4573 (winapi_DebugBreakProcess): Ditto.
4574 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 4575
49b64de6
MG
45762013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
4577
4578 * notif.h (notif_event): Add a dummy member to avoid compiler
4579 errors.
4580
d5749ee7
PA
45812013-07-01 Pedro Alves <palves@redhat.com>
4582
4583 * hostio.c (HOSTIO_PATH_MAX): Define.
4584 (require_filename, handle_open, handle_unlink, handle_readlink):
4585 Use it.
4586
d8d2a3ee
PA
45872013-07-01 Pedro Alves <palves@redhat.com>
4588
4589 * server.h: Include "pathmax.h".
4590 * linux-low.c: Don't include sys/param.h.
4591 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
4592 MAXPATHLEN.
4593 * win32-low.c: Don't include sys/param.h.
4594 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
4595
bc7dea8d
PA
45962013-07-01 Pedro Alves <palves@redhat.com>
4597
4598 * event-loop.c: Don't check HAVE_UNISTD_H before including
4599 <unistd.h>.
4600 * gdbreplay.c: Likewise.
4601 * remote-utils.c: Likewise.
4602 * server.c: Likewise.
4603 * configure.ac: Don't check for unistd.h.
4604 * configure: Regenerate.
4605
d6c2da54
TT
46062013-06-28 Tom Tromey <tromey@redhat.com>
4607
4608 * Makefile.in (version.c): Use version.in, not
4609 common/version.in.
4610
257b6bec
MG
46112013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
4612
4613 * configure.ac (version_host, version_target): Set and AC_SUBST them.
4614 * configure: Rebuild.
4615 * Makefile.in (version_host, version_target): Get from configure.
4616 (version.c): Use $(version_host) and $(version_target).
4617
86ebe149
DK
46182013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
4619
4620 Fix trace-status to output user name without trailing colon.
4621 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
4622
f30aa5af
DK
46232013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
4624
4625 Fix trace-status to output proper start-time and stop-time.
4626 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
4627 output start time and stop time in hex as gdb expects.
4628
28a93511
YQ
46292013-06-26 Pedro Alves <pedro@codesourcery.com>
4630
4631 * tracepoint.c (build_traceframe_info_xml): Output trace state
4632 variables present in the trace buffer.
4633
01208463
TT
46342013-06-24 Tom Tromey <tromey@redhat.com>
4635
4636 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
4637 create-version.sh.
4638 (version.o): Remove.
4639 * gdbreplay.c: Include version.h.
4640 (version, host_name): Don't declare.
4641 * server.h: Include version.h.
4642 (version, host_name): Don't declare.
4643
760256f9
PA
46442013-06-12 Pedro Alves <palves@redhat.com>
4645
4646 * linux-x86-low.c (linux_is_elf64): Delete global.
4647 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
4648 with local linux_pid_exe_is_elf_64_file use.
4649
030031ee
PA
46502013-06-11 Pedro Alves <palves@redhat.com>
4651
4652 * linux-low.c (regset_disabled, disable_regset): New functions.
4653 (regsets_fetch_inferior_registers)
4654 (regsets_store_inferior_registers): Use them.
4655 (initialize_regsets_info); Don't allocate the disabled_regsets
4656 array here.
4657 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
4658 comment.
4659
5da6eb0a
PA
46602013-06-11 Pedro Alves <palves@redhat.com>
4661
4662 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
4663 xmalloc.
4664
7e5aaa09
PA
46652013-06-11 Pedro Alves <palves@redhat.com>
4666
4667 * linux-x86-low.c (initialize_low_arch): Call
4668 init_registers_x32_avx_linux.
4669
d878444c
JK
46702013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
4671
4672 Fix compatibility with Android Bionic.
4673 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
4674 it is not empty.
4675
3aee8918
PA
46762013-06-07 Pedro Alves <palves@redhat.com>
4677
5f2b57b5 4678 PR server/14823
3aee8918
PA
4679 * Makefile.in (OBS): Add tdesc.o.
4680 (IPA_OBJS): Add tdesc-ipa.o.
4681 (tdesc-ipa.o): New rule.
4682 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
4683 interface.
4684 * linux-low.c (new_inferior): Delete.
4685 (disabled_regsets, num_regsets): Delete.
4686 (linux_add_process): Adjust to set the new per-process
4687 new_inferior flag.
4688 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
4689 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
4690 was a stop. When calling arch_setup, switch the current inferior
4691 to the thread that got an event.
4692 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
4693 (regsets_fetch_inferior_registers)
4694 (regsets_store_inferior_registers): New regsets_info parameter.
4695 Adjust to use it.
4696 (linux_register_in_regsets): New regs_info parameter. Adjust to
4697 use it.
4698 (register_addr, fetch_register, store_register): New usrregs_info
4699 parameter. Adjust to use it.
4700 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
4701 parameter regs_info. Adjust to use it.
4702 (linux_fetch_registers): Get the current inferior's regs_info, and
4703 adjust to use it.
4704 (linux_store_registers): Ditto.
4705 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
4706 (initialize_low): Don't initialize the target_regsets here. Call
4707 initialize_low_arch.
4708 * linux-low.h (target_regsets): Delete declaration.
4709 (struct regsets_info): New.
4710 (struct usrregs_info): New.
4711 (struct regs_info): New.
4712 (struct process_info_private) <new_inferior>: New field.
4713 (struct linux_target_ops): Delete the num_regs, regmap, and
4714 regset_bitmap fields. New field regs_info.
4715 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
4716 * i387-fp.c (num_xmm_registers): Delete.
4717 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
4718 calls to new interface.
4719 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
4720 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
4721 Infer the number of xmm registers from the regcache's target
4722 description.
4723 * i387-fp.h (num_xmm_registers): Delete.
4724 * inferiors.c (add_thread): Don't install the thread's regcache
4725 here.
4726 * proc-service.c (gregset_info): Fetch the current inferior's
4727 regs_info. Adjust to use it.
4728 * regcache.c: Include tdesc.h.
4729 (register_bytes, reg_defs, num_registers)
4730 (gdbserver_expedite_regs): Delete.
4731 (get_thread_regcache): If the thread doesn't have a regcache yet,
4732 create one, instead of aborting gdbserver.
4733 (regcache_invalidate_one): Rename to ...
4734 (regcache_invalidate_thread): ... this.
4735 (regcache_invalidate_one): New.
4736 (regcache_invalidate): Only invalidate registers of the current
4737 process.
4738 (init_register_cache): Add target_desc parameter, and use it.
4739 (new_register_cache): Ditto. Assert the target description has a
4740 non zero registers_size.
4741 (regcache_cpy): Add assertions. Adjust.
4742 (realloc_register_cache, set_register_cache): Delete.
4743 (registers_to_string, registers_from_string): Adjust.
4744 (find_register_by_name, find_regno, find_register_by_number)
4745 (register_cache_size): Add target_desc parameter, and use it.
4746 (free_register_cache_thread, free_register_cache_thread_one)
4747 (regcache_release, register_cache_size): New.
4748 (register_size): Add target_desc parameter, and use it.
4749 (register_data, supply_register, supply_register_zeroed)
4750 (supply_regblock, supply_register_by_name, collect_register)
4751 (collect_register_as_string, collect_register_by_name): Adjust.
4752 * regcache.h (struct target_desc): Forward declare.
4753 (struct regcache) <tdesc>: New field.
4754 (init_register_cache, new_register_cache): Add target_desc
4755 parameter.
4756 (regcache_invalidate_thread): Declare.
4757 (regcache_invalidate_one): Delete declaration.
4758 (regcache_release): Declare.
4759 (find_register_by_number, register_cache_size, register_size)
4760 (find_regno): Add target_desc parameter.
4761 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
4762 declarations.
4763 * remote-utils.c: Include tdesc.h.
4764 (outreg, prepare_resume_reply): Adjust.
4765 * server.c: Include tdesc.h.
4766 (gdbserver_xmltarget): Delete declaration.
4767 (get_features_xml, process_serial_event): Adjust.
4768 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
4769 declare.
4770 (struct process_info) <tdesc>: New field.
4771 (ipa_tdesc): Declare.
4772 * tdesc.c: New file.
4773 * tdesc.h: New file.
4774 * tracepoint.c: Include tdesc.h.
4775 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
4776 (get_context_regcache): Adjust to pass ipa_tdesc down.
4777 (do_action_at_tracepoint): Adjust to get the register cache size
4778 from the context regcache's description.
4779 (traceframe_walk_blocks): Adjust to get the register cache size
4780 from the current trace frame's description.
4781 (traceframe_get_pc): Adjust to get current trace frame's
4782 description and pass it down.
4783 (gdb_collect): Adjust to get the register cache size from the
4784 IPA's description.
4785 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
4786 (gdbserver_xmltarget): Delete.
4787 (initialize_low_tracepoint): Set the ipa's target description.
4788 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
4789 (initialize_low_tracepoint): Set the ipa's target description.
4790 * linux-x86-low.c: Include tdesc.h.
4791 [__x86_64__] (is_64bit_tdesc): New.
4792 (ps_get_thread_area, x86_get_thread_area): Use it.
4793 (i386_cannot_store_register): Rename to ...
4794 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
4795 (i386_cannot_fetch_register): Rename to ...
4796 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
4797 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
4798 to new interface.
4799 (target_regsets): Rename to ...
4800 (x86_regsets): ... this.
4801 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
4802 interface.
4803 (x86_siginfo_fixup): Use is_64bit_tdesc.
4804 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
4805 (tdesc_x32_avx_linux, tdesc_x32_linux)
4806 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
4807 Declare.
4808 (x86_linux_update_xmltarget): Delete.
4809 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
4810 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
4811 (AMD64_LINUX_USER64_CS): New.
4812 (x86_linux_read_description): New, based on
4813 x86_linux_update_xmltarget.
4814 (same_process_callback): New.
4815 (x86_arch_setup_process_callback): New.
4816 (x86_linux_update_xmltarget): New.
4817 (x86_regsets_info): New.
4818 (amd64_linux_regs_info): New.
4819 (i386_linux_usrregs_info): New.
4820 (i386_linux_regs_info): New.
4821 (x86_linux_regs_info): New.
4822 (x86_arch_setup): Reimplement.
4823 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
4824 (x86_emit_ops): Ditto.
4825 (the_low_target): Adjust. Install x86_linux_regs_info,
4826 x86_cannot_fetch_register, and x86_cannot_store_register.
4827 (initialize_low_arch): New.
4828 * linux-ia64-low.c (tdesc_ia64): Declare.
4829 (ia64_fetch_register): Adjust.
4830 (ia64_usrregs_info, regs_info): New globals.
4831 (ia64_regs_info): New function.
4832 (the_low_target): Adjust.
4833 (initialize_low_arch): New function.
4834 * linux-sparc-low.c (tdesc_sparc64): Declare.
4835 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
4836 Adjust.
4837 (sparc_arch_setup): New function.
4838 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
4839 (the_low_target): Adjust.
4840 (initialize_low_arch): New function.
4841 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
4842 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
4843 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
4844 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
4845 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
4846 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
4847 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
4848 (tdesc_powerpc_isa205_vsx64l): Declare.
4849 (ppc_cannot_store_register, ppc_collect_ptrace_register)
4850 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
4851 (ppc_set_pc, ppc_get_hwcap): Adjust.
4852 (ppc_usrregs_info): Forward declare.
4853 (!__powerpc64__) ppc_regmap_adjusted: New global.
4854 (ppc_arch_setup): Adjust to the current process'es target
4855 description.
4856 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
4857 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
4858 (ppc_store_evrregset): Adjust.
4859 (target_regsets): Rename to ...
4860 (ppc_regsets): ... this, and make static.
4861 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
4862 (ppc_regs_info): New function.
4863 (the_low_target): Adjust.
4864 (initialize_low_arch): New function.
4865 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
4866 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
4867 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
4868 (tdesc_s390x_linux64v2): Declare.
4869 (s390_collect_ptrace_register, s390_supply_ptrace_register)
4870 (s390_fill_gregset, s390_store_last_break): Adjust.
4871 (target_regsets): Rename to ...
4872 (s390_regsets): ... this, and make static.
4873 (s390_get_pc, s390_set_pc): Adjust.
4874 (s390_get_hwcap): New target_desc parameter, and use it.
4875 [__s390x__] (have_hwcap_s390_high_gprs): New global.
4876 (s390_arch_setup): Adjust to set the current process'es target
4877 description. Don't adjust the regmap.
4878 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
4879 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
4880 (regs_info_3264): New globals.
4881 (s390_regs_info): New function.
4882 (the_low_target): Adjust.
4883 (initialize_low_arch): New function.
4884 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
4885 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
4886 [__mips64] (init_registers_mips_linux)
4887 (init_registers_mips_dsp_linux): Delete defines.
4888 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
4889 (have_dsp): New global.
4890 (mips_read_description): New, based on mips_arch_setup.
4891 (mips_arch_setup): Reimplement.
4892 (get_usrregs_info): New function.
4893 (mips_cannot_fetch_register, mips_cannot_store_register)
4894 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
4895 (mips_fill_fpregset, mips_store_fpregset): Adjust.
4896 (target_regsets): Rename to ...
4897 (mips_regsets): ... this, and make static.
4898 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
4899 (dsp_regs_info, regs_info): New globals.
4900 (mips_regs_info): New function.
4901 (the_low_target): Adjust.
4902 (initialize_low_arch): New function.
4903 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
4904 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
4905 Declare.
4906 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
4907 (arm_read_description): New, with bits factored from
4908 arm_arch_setup.
4909 (arm_arch_setup): Reimplement.
4910 (target_regsets): Rename to ...
4911 (arm_regsets): ... this, and make static.
4912 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
4913 (arm_regs_info): New function.
4914 (the_low_target): Adjust.
4915 (initialize_low_arch): New function.
4916 * linux-m68k-low.c (tdesc_m68k): Declare.
4917 (target_regsets): Rename to ...
4918 (m68k_regsets): ... this, and make static.
4919 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
4920 (m68k_regs_info): New function.
4921 (m68k_arch_setup): New function.
4922 (the_low_target): Adjust.
4923 (initialize_low_arch): New function.
4924 * linux-sh-low.c (tdesc_sharch): Declare.
4925 (target_regsets): Rename to ...
4926 (sh_regsets): ... this, and make static.
4927 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
4928 (sh_regs_info, sh_arch_setup): New functions.
4929 (the_low_target): Adjust.
4930 (initialize_low_arch): New function.
4931 * linux-bfin-low.c (tdesc_bfin): Declare.
4932 (bfin_arch_setup): New function.
4933 (bfin_usrregs_info, regs_info): New globals.
4934 (bfin_regs_info): New function.
4935 (the_low_target): Adjust.
4936 (initialize_low_arch): New function.
4937 * linux-cris-low.c (tdesc_cris): Declare.
4938 (cris_arch_setup): New function.
4939 (cris_usrregs_info, regs_info): New globals.
4940 (cris_regs_info): New function.
4941 (the_low_target): Adjust.
4942 (initialize_low_arch): New function.
4943 * linux-cris-low.c (tdesc_crisv32): Declare.
4944 (cris_arch_setup): New function.
4945 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
4946 (cris_regs_info): New function.
4947 (the_low_target): Adjust.
4948 (initialize_low_arch): New function.
4949 * linux-m32r-low.c (tdesc_m32r): Declare.
4950 (m32r_arch_setup): New function.
4951 (m32r_usrregs_info, regs_info): New globals.
4952 (m32r_regs_info): Adjust.
4953 (initialize_low_arch): New function.
4954 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
4955 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
4956 (tic6x_usrregs_info): Forward declare.
4957 (tic6x_read_description): New function, based on ...
4958 (tic6x_arch_setup): ... this. Reimplement.
4959 (target_regsets): Rename to ...
4960 (tic6x_regsets): ... this, and make static.
4961 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
4962 (tic6x_regs_info): New function.
4963 (the_low_target): Adjust.
4964 (initialize_low_arch): New function.
4965 * linux-xtensa-low.c (tdesc_xtensa): Declare.
4966 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
4967 (target_regsets): Rename to ...
4968 (xtensa_regsets): ... this, and make static.
4969 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
4970 globals.
4971 (xtensa_arch_setup, xtensa_regs_info): New functions.
4972 (the_low_target): Adjust.
4973 (initialize_low_arch): New function.
4974 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
4975 (nios2_arch_setup): Set the current process'es tdesc.
4976 (target_regsets): Rename to ...
4977 (nios2_regsets): ... this.
4978 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
4979 (nios2_regs_info): New function.
4980 (the_low_target): Adjust.
4981 (initialize_low_arch): New function.
a261b8f5
PA
4982 * linux-aarch64-low.c (tdesc_aarch64): Declare.
4983 (aarch64_arch_setup): Set the current process'es tdesc.
4984 (target_regsets): Rename to ...
4985 (aarch64_regsets): ... this.
4986 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
4987 (aarch64_regs_info): New function.
4988 (the_low_target): Adjust.
4989 (initialize_low_arch): New function.
3aee8918
PA
4990 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
4991 globals.
4992 (target_regsets): Rename to ...
4993 (tile_regsets): ... this.
4994 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
4995 (tile_regs_info): New function.
4996 (tile_arch_setup): Set the current process'es tdesc.
4997 (the_low_target): Adjust.
4998 (initialize_low_arch): New function.
4999 * spu-low.c (tdesc_spu): Declare.
5000 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
5001 * win32-arm-low.c (tdesc_arm): Declare.
5002 (arm_arch_setup): New function.
5003 (the_low_target): Install arm_arch_setup instead of
5004 init_registers_arm.
5005 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
5006 (init_windows_x86): Rename to ...
5007 (i386_arch_setup): ... this. Set `win32_tdesc'.
5008 (the_low_target): Adjust.
5009 * win32-low.c (win32_tdesc): New global.
5010 (child_add_thread): Don't create the thread cache here.
5011 (do_initial_child_stuff): Set the new process'es tdesc.
5012 * win32-low.h (struct target_desc): Forward declare.
5013 (win32_tdesc): Declare.
5014 * lynx-i386-low.c (tdesc_i386): Declare global.
5015 (lynx_i386_arch_setup): Set `lynx_tdesc'.
5016 * lynx-low.c (lynx_tdesc): New global.
5017 (lynx_add_process): Set the new process'es tdesc.
5018 * lynx-low.h (struct target_desc): Forward declare.
5019 (lynx_tdesc): Declare global.
5020 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
5021 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
5022 * nto-low.c (nto_tdesc): New global.
5023 (do_attach): Set the new process'es tdesc.
5024 * nto-low.h (struct target_desc): Forward declare.
5025 (nto_tdesc): Declare.
5026 * nto-x86-low.c (tdesc_i386): Declare.
5027 (nto_x86_arch_setup): Set `nto_tdesc'.
5028
b1fbec62
GB
50292013-06-04 Gary Benson <gbenson@redhat.com>
5030
5031 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
5032 to qSupported response when appropriate.
5033 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
5034 with nonzero-length annex.
5035 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
5036 arguments supplied in annex.
5037
d1ec4ce7
DE
50382013-05-31 Doug Evans <dje@google.com>
5039
ac44adcb 5040 PR server/15594
d1ec4ce7
DE
5041 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
5042 64 bits in 64-cross-32 environment.
5043
9b25f2d3
PA
50442013-05-28 Pedro Alves <palves@redhat.com>
5045
5046 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
5047 (aarch64-without-fpu.c): Delete rule.
5048 * configure.srv (aarch64*-*-linux*): Remove references to
5049 aarch64-without-fpu.o and aarch64-without-fpu.xml.
5050 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
5051 declaration.
5052
6740dc9c
PA
50532013-05-24 Pedro Alves <palves@redhat.com>
5054
5055 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
5056 instead of strchr/decode_address. Error if the range isn't split
5057 with a ','. Don't assume there's be a ':' in the action.
5058
c2d6af84
PA
50592013-05-23 Yao Qi <yao@codesourcery.com>
5060 Pedro Alves <palves@redhat.com>
5061
5062 * linux-low.c (lwp_in_step_range): New function.
5063 (linux_wait_1): If the thread was range stepping and stopped
5064 outside the stepping range, report the stop to GDB. Otherwise,
5065 continue stepping. Add range stepping debug output.
5066 (linux_set_resume_request): Copy the step range from the resume
5067 request to the lwp.
5068 (linux_supports_range_stepping): New.
5069 (linux_target_ops) <supports_range_stepping>: Set to
5070 linux_supports_range_stepping.
5071 * linux-low.h (struct linux_target_ops)
5072 <supports_range_stepping>: New field.
5073 (struct lwp_info) <step_range_start, step_range_end>: New fields.
5074 * linux-x86-low.c (x86_supports_range_stepping): New.
5075 (the_low_target) <supports_range_stepping>: Set to
5076 x86_supports_range_stepping.
5077 * server.c (handle_v_cont): Handle 'r' action.
5078 (handle_v_requests): Append ";r" if the target supports range
5079 stepping.
5080 * target.h (struct thread_resume) <step_range_start,
5081 step_range_end>: New fields.
5082 (struct target_ops) <supports_range_stepping>:
5083 New field.
5084 (target_supports_range_stepping): New macro.
5085
58794e1a
JB
50862013-05-17 Joel Brobecker <brobecker@adacore.com>
5087
5088 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
5089 confusion in comment.
5090
d631c5a7
JB
50912013-05-17 Joel Brobecker <brobecker@adacore.com>
5092
5093 * lynx-low.c (struct process_info_private): New type.
5094 (lynx_add_process): New function.
5095 (lynx_create_inferior, lynx_attach): Replace calls to
5096 add_process by calls to lynx_add_process.
5097 (lynx_resume): If PTID is null, then try using
5098 current_process()->private->last_wait_event_ptid.
5099 Add comments.
5100 (lynx_clear_inferiors): Delete. The contents of that function
5101 has been inlined in lynx_mourn;
5102 (lynx_wait_1): Save the ptid in the process's private data.
5103 (lynx_mourn): Free the process' private data. Replace call
5104 to lynx_clear_inferiors by call to clear_inferiors.
5105
96f7a20f
YQ
51062013-05-17 Yao Qi <yao@codesourcery.com>
5107
5108 * i386-low.c (i386_length_and_rw_bits): Move the comment to
5109 the right place.
5110
db0dfaa0
LM
51112013-05-16 Luis Machado <lgustavo@codesourcery.com>
5112
5113 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
5114 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
5115 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
5116 PT_TEXT_END_ADDR guards. Update comments.
5117 (linux_target_op) <read_offsets>: Conditionally define to
5118 linux_read_offsets if the target is UCLIBC and if it defines
5119 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
5120
68f5f838
SL
51212013-05-06 Sandra Loosemore <sandra@codesourcery.com>
5122 Andrew Jenner <andrew@codesourcery.com>
5123
5124 * Makefile.in (SFILES): Add linux-nios2-low.c.
5125 (clean): Add action to delete nios2-linux.c.
5126 (nios2-linux.c): New rule.
5127 * configure.srv: Add nios2*-*-linux*.
5128 * linux-nios2-low.c: New.
5129
1ebff1fd
HAQ
51302013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
5131
5132 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
5133
f6150862
HZ
51342013-04-25 Hui Zhu <hui@codesourcery.com>
5135
5136 PR gdb/15186
f6150862
HZ
5137 * ax.c (ax_printf): Add fflush.
5138
614c279d
TT
51392013-04-22 Tom Tromey <tromey@redhat.com>
5140
5141 * Makefile.in (SFILES): Add filestuff.c.
5142 (OBS): Add filestuff.o.
5143 (filestuff.o): New target.
5144 * config.in, configure: Rebuild.
5145 * configure.ac: Check for fdwalk, pipe2.
5146
7d4e5717
PA
51472013-04-17 Pedro Alves <palves@redhat.com>
5148
5149 * configure.ac (USE_THREAD_DB): Delete variable.
5150 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
5151 Don't AC_SUBST USE_THREAD_DB.
5152 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
5153 * config.in, configure: Regenerate.
5154
d5c93e41
PA
51552013-04-16 Pedro Alves <palves@redhat.com>
5156
5157 * linux-low.h (struct lwp_info) <thread_known>: Move under
5158 the USE_THREAD_DB #ifdef.
5159
04f5fe89
PA
51602013-04-16 Pedro Alves <palves@redhat.com>
5161
5162 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
5163 (linux-low.o): Delete rule.
5164 * linux-low.h: Always include "gdb_thread_db.h" instead of
5165 conditionally including thread_db.h.
5166 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
5167 HAVE_THREAD_DB_H.
5168
480b27bf
JK
51692013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5170
5171 * Makefile.in (install-only): Fix make install regression.
5172
43662968
JK
51732013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
5174
5175 Convert man pages to texinfo, new gdbinit.5 texinfo page.
5176 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
5177 installation.
5178 * gdbserver.1: Remove.
5179
3e74e146
PA
51802013-03-22 Pedro Alves <palves@redhat.com>
5181
5182 * linux-low.c (handle_extended_wait): Don't call
5183 linux_enable_event_reporting.
5184
a8347a2a
TT
51852013-03-15 Tony Theodore <tonyt@logyst.com>
5186
5187 PR build/9098:
5188 * Makefile.in (SHELL): Use @SHELL@.
5189
eeb56fa7
SDJ
51902013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
5191
5192 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
5193 compiler warning.
5194
4fa7e2ff
JB
51952013-03-13 Joel Brobecker <brobecker@adacore.com>
5196
5197 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
5198 Remove extraneous NULL element.
5199
8ddb1965
YQ
52002013-03-13 Yao Qi <yao@codesourcery.com>
5201
5202 * tracepoint.c (traceframe_read_tsv): Look for the last matched
5203 'V' block in trace frame.
5204
9accd112
MM
52052013-03-11 Markus Metzger <markus.t.metzger@intel.com>
5206
5207 * target.h (struct target_ops): Add btrace ops.
5208 (target_supports_btrace): New macro.
5209 (target_enable_btrace): New macro.
5210 (target_disable_btrace): New macro.
5211 (target_read_btrace): New macro.
5212 * gdbthread.h (struct thread_info): Add btrace field.
5213 * server.c: Include btrace-common.h.
5214 (handle_btrace_general_set): New function.
5215 (handle_btrace_enable): New function.
5216 (handle_btrace_disable): New function.
5217 (handle_general_set): Call handle_btrace_general_set.
5218 (handle_qxfer_btrace): New function.
5219 (struct qxfer qxfer_packets[]): Add btrace entry.
5220 * inferiors.c (remove_thread): Disable btrace.
5221 * linux-low: Include linux-btrace.h.
5222 (linux_low_enable_btrace): New function.
5223 (linux_low_read_btrace): New function.
5224 (linux_target_ops): Add btrace ops.
5225 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
5226 Add srv_linux_btrace=yes.
5227 (x86_64-*-linux*): Add linux-btrace.o.
5228 Add srv_linux_btrace=yes.
5229 * configure.ac: Define HAVE_LINUX_BTRACE.
5230 * config.in: Regenerated.
5231 * configure: Regenerated.
5232
5cc22e4c
MM
52332013-03-11 Markus Metzger <markus.t.metzger@intel.com>
5234
5235 * server.c (handle_qxfer): Preserve error message if -3 is
5236 returned.
5237 (qxfer): Document the -3 return value.
5238
7c97f91e
MM
52392013-03-11 Markus Metzger <markus.t.metzger@intel.com>
5240
5241 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
5242 (linux_btrace_h): New variable.
5243 (linux-btrace.o): New rule.
5244
be9a119c 52452013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
5246 Hafiz Abid Qadeer <abidh@codesourcery.com>
5247
5248 * tracepoint.c (trace_buffer_size): New global.
5249 (DEFAULT_TRACE_BUFFER_SIZE): New define.
5250 (init_trace_buffer): Change to one-argument function. Allocate
5251 trace buffer memory.
5252 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
5253 handle QTBuffer:size packet.
5254 (cmd_bigqtbuffer_size): New function.
5255 (initialize_tracepoint): Call init_trace_buffer with
5256 DEFAULT_TRACE_BUFFER_SIZE.
5257 * server.c (handle_query): Add QTBuffer:size in the
5258 supported packets.
5259
e64f7499
YQ
52602013-03-07 Yao Qi <yao@codesourcery.com>
5261
5262 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
5263 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
5264 of -1.
5265 (cmd_qtsp): Adjust condition. Do post increment.
5266 Set cur_action and cur_step_action back to 0.
5267
f0ae6fc3
PA
52682013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
5269
5270 PR server/15236
5271 * linux-low.c (linux_write_memory): Return early success if LEN is
5272 zero.
5273
b5b0b0af
CV
52742013-03-05 Corinna Vinschen <vinschen@redhat.de>
5275
334ad4a8 5276 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 5277
589bc927
TT
52782013-02-28 Tom Tromey <tromey@redhat.com>
5279
5280 * configure.ac: Invoke AC_SYS_LARGEFILE.
5281 * configure, config.in: Rebuild.
5282
dfe07582
CV
52832013-02-28 Corinna Vinschen <vinschen@redhat.com>
5284
5285 * win32-low.c: Throughout, fix format strings and casts of
5286 printf-like functions to avoid type related warnings on all
5287 platforms.
5288 (get_child_debug_event): Print dwDebugEventCode as hex since
5289 that's how it's usually documented.
5290
736cd585
YQ
52912013-02-28 Yao Qi <yao@codesourcery.com>
5292
5293 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
5294 pulongest.
5295
e1f58301
JW
52962013-02-27 Jiong Wang <jiwang@tilera.com>
5297
5298 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
5299 (reg-tilegx32.c): New rule.
5300 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
5301 * linux-tile-low.c (tile_arch_setup): New function. Invoke
5302 different register info initializer according to elf class.
5303 (init_registers_tilgx32): New function. The tilegx32 register info
5304 initializer.
5305 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
5306 (tile_store_gregset): Likewise.
5307
d171ca78
YQ
53082013-02-27 Yao Qi <yao@codesourcery.com>
5309
5310 * server.c (process_point_options): Print debug message when
5311 debug_threads is true.
5312
282bbdf3
YQ
53132013-02-26 Yao Qi <yao@codesourcery.com>
5314
5315 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
5316
aca22551
PA
53172013-02-19 Pedro Alves <palves@redhat.com>
5318 Kai Tietz <ktietz@redhat.com>
5319
5320 PR gdb/15161
5321
5322 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
5323 instead of strtoul to extract address from packet.
5324 (process_serial_event) <'z'>: Likewise.
5325
4f3cee1c
YQ
53262013-02-18 Yao Qi <yao@codesourcery.com>
5327
5328 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
5329
8e1d55a3
PA
53302013-02-14 Pedro Alves <palves@redhat.com>
5331
5332 Plug memory leak.
5333
5334 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
5335 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
5336
458820da
PA
53372013-02-14 Pedro Alves <palves@redhat.com>
5338
5339 * tracepoint.c (cmd_qtdpsrc): Use savestring.
5340
baea0dae
PA
53412013-02-14 Pedro Alves <palves@redhat.com>
5342
5343 * tracepoint.c (save_string): Delete.
5344 (add_tracepoint_action): Use savestring instead of save_string.
5345
0b1afbb3
PA
53462013-02-12 Pedro Alves <palves@redhat.com>
5347
5348 * linux-xtensa-low.c: Ditto.
5349 * xtensa-xtregs.c: Ditto.
5350
8a4ac37e
PA
53512013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
5352
5353 * thread-db.c (thread_db_get_tls_address): NULL pointer check
5354 thread_db.
5355
148de6bb
MS
53562013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
5357
5358 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
5359 aarch64_num_wp_regs and aarch64_num_bp_regs to
5360 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
5361
55fac6e0
MS
53622013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
5363
5364 * linux-aarch64-low.c (ps_get_thread_area): Replace
5365 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
5366
176eb98c
MS
53672013-02-04 Jim MacArthur <jim.macarthur@arm.com>
5368 Marcus Shawcroft <marcus.shawcroft@arm.com>
5369 Nigel Stephens <nigel.stephens@arm.com>
5370 Yufeng Zhang <yufeng.zhang@arm.com>
5371
5372 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
5373 (aarch64.c, aarch64-without-fpu.c): New targets.
5374 * configure.srv (aarch64*-*-linux*): New.
5375 * linux-aarch64-low.c: New file.
5376
56f7af9c
MS
53772013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
5378
43aaf8b6 5379 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
5380 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
5381 (dequeue_one_deferred_signal, linux_resume_one_thread)
5382 (fetch_register, linux_write_memory, linux_enable_event_reporting)
5383 (linux_tracefork_grandchild, linux_test_for_tracefork)
5384 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
5385 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
5386 where the argument is 0.
5387
60f662b0
YQ
53882013-01-25 Yao Qi <yao@codesourcery.com>
5389
5390 * event-loop.c: Include "queue.h".
5391 (gdb_event_p): New typedef.
5392 (struct gdb_event) <next_event>: Remove.
5393 (event_queue): Change to QUEUE(gdb_event_p).
5394 (async_queue_event): Remove.
5395 (gdb_event_xfree): New.
5396 (initialize_event_loop): New.
5397 (process_event): Use API from QUEUE.
5398 (wait_for_event): Likewise.
5399 * server.c (main): Call initialize_event_loop.
5400 * server.h (initialize_event_loop): Declare.
5401
5ae4861a
YQ
54022013-01-18 Yao Qi <yao@codesourcery.com>
5403
5404 * ax.h (struct eval_agent_expr_context): New.
5405 (gdb_eval_agent_expr): Update declaration.
5406 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
5407 TFRAME. Add new argument CTX.
5408 * server.h (struct eval_agent_expr_context): Declare.
5409 (agent_mem_read, agent_tsv_read): Update declaration.
5410 (agent_mem_read_string): Likewise.
5411 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
5412 (add_traceframe_block): Add new argument TPOINT.
5413 Increase TPOINT->traceframe_usage.
5414 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
5415 eval_tracepoint_agent_expr.
5416 (condition_true_at_tracepoint): Likewise.
5417 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
5418 (agent_mem_read_string, agent_tsv_read): Likewise.
5419
85e00e85
YQ
54202013-01-16 Yao Qi <yao@codesourcery.com>
5421
5422 * linux-low.c (linux_resume_one_lwp): Don't check
5423 'lwp->bp_reinsert != 0'.
5424
4039cf45
JB
54252013-01-07 Joel Brobecker <brobecker@adacore.com>
5426 Pedro Alves <palves@redhat.com>
5427
5428 * lynx-low.c (ptrace_request_to_str): Define a temporary
5429 macro and use it to simplify this function's implementation.
5430
9044dee2
JB
54312013-01-07 Joel Brobecker <brobecker@adacore.com>
5432
5433 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
5434 sets errno.
5435
e6352c8f
JB
54362013-01-07 Joel Brobecker <brobecker@adacore.com>
5437
5438 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
5439
50681a27
JB
54402013-01-07 Joel Brobecker <brobecker@adacore.com>
5441
5442 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
5443
3f6e77ef
JB
54442013-01-07 Joel Brobecker <brobecker@adacore.com>
5445
5446 * lynx-low.c (lynx_resume): Use the resume_info parameter
5447 to determine the ptid for the lynx_ptrace call, unless
5448 it is equal to minus_one_ptid, in which case we use the
5449 ptid of the current_inferior.
5450 (lynx_wait_1): After having received a thread create/exit
5451 event, resume the inferior's execution using the signaling
5452 thread's ptid, rather than the old ptid.
5453
7fda33ae
JB
54542013-01-07 Joel Brobecker <brobecker@adacore.com>
5455
5456 * lynx-low.c (lynx_resume): Delete variable ret.
5457
b9786c74
JB
54582013-01-01 Joel Brobecker <brobecker@adacore.com>
5459
5460 * gdbreplay.c (gdbreplay_version): Update copyright year.
5461 * server.c (gdbserver_version): Likewise.
5462
8b93d60f
JB
54632012-12-17 Joel Brobecker <brobecker@adacore.com>
5464
5465 * lynx-low.c (lynx_wait_1): Add debug trace before adding
5466 new thread.
5467
037335a7
JB
54682012-12-17 Joel Brobecker <brobecker@adacore.com>
5469
5470 * lynx-low.c (ptrace_request_to_str): Add handling for
5471 PTRACE_GETTRACESIG.
5472
52d4cbd8
JB
54732012-12-17 Joel Brobecker <brobecker@adacore.com>
5474
5475 * lynx-low.c (lynx_attach): Delete variable new_process.
5476
ab8f6ca9
JB
54772012-12-17 Joel Brobecker <brobecker@adacore.com>
5478
5479 * lynx-low.c (lynx_create_inferior): Delete variable
5480 new_process.
5481
78cbc024
JB
54822012-12-17 Joel Brobecker <brobecker@adacore.com>
5483
5484 * lynx-low.c (ptrace_request_to_str): Do not handle
5485 PTRACE_GETTHREADLIST if this macro does not exist.
5486
14a00470
YQ
54872012-12-15 Yao Qi <yao@codesourcery.com>
5488
5489 * Makefile.in (OBS): Add notif.o.
5490 * notif.c, notif.h: New.
5491 * server.c: Include "notif.h".
5492 (struct vstop_notif) <next>: Remove.
5493 <base>: New field.
5494 (queue_stop_reply): Update.
5495 (push_event, send_next_stop_reply): Remove.
5496 (discard_queued_stop_replies): Update.
5497 (notif_stop): New variable.
5498 (handle_v_stopped): Remove.
5499 (handle_v_requests): Don't call handle_v_stopped. Call
5500 handle_ack_notif instead.
5501 (queue_stop_reply_callback): Call notif_event_enque instead
5502 of queue_stop_reply.
5503 (handle_status): Don't call send_next_stop_reply, call
5504 notif_write_event instead.
5505 (kill_inferior_callback): Likewise.
5506 (detach_or_kill_inferior_callback): Likewise.
5507 (main): Call initialize_notif.
5508 (process_serial_event): Call QUEUE_is_empty.
5509 (handle_target_event): Call notif_push instead of push event.
5510 * server.h (push_event): Remove declaration.
5511
61c125b9
TT
55122012-12-10 Tom Tromey <tromey@redhat.com>
5513
5514 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
5515 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
5516 macros.
5517 (.c.o): Rewrite.
5518 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
5519 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
5520 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
5521 (amd64-linux-ipa.o, ax.o): Rewrite.
5522 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
5523 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
5524 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
5525 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
5526 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
5527 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
5528 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
5529 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
5530 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
5531 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
5532 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
5533 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
5534 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
5535 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
5536 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
5537 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
5538 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
5539 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
5540 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
5541 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
5542 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
5543 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
5544 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
5545 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
5546 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
5547 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
5548 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
5549 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
5550 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
5551 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
5552 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
5553 (reg-tilegx.o): Remove.
5554 (all_object_files): New macro.
5555 Include .deps files.
5556 * aclocal.m4, configure: Rebuild.
5557 * acinclude.m4: Include depstand.m4, lead-dot.m4.
5558 * configure.ac: Invoke ZW_CREATE_DEPDIR,
5559 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
5560
e90e9ad9
TT
55612012-12-05 Tom Tromey <tromey@redhat.com>
5562
5563 PR gdb/14917:
5564 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
5565
02d403bf 55662012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
5567
5568 * configure.ac: Check for linux/perf_event.h.
5569 * config.in: Regenerated.
5570 * configure: Regenerated.
5571
0270a750
PA
55722012-11-26 Maxime Villard <rustyBSD@gmx.fr>
5573
5574 * hostio.c (handle_readlink): Decrease buffer size
5575 parameter passed to readlink by one byte.
5576
8c29b58e
YQ
55772012-11-26 Yao Qi <yao@codesourcery.com>
5578
5579 * configure.ac (build_warnings): Append '-Wempty-body'.
5580 * configure: Regenerated.
5581 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
5582 body.
5583
8bdce1ff
PM
55842012-11-15 Pierre Muller <muller@sourceware.org>
5585
5586 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
5587 * config.in: Regenerate.
5588 * configure: Regenerate.
5589 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
5590 Use "gdb_wait.h" header instead of <sys/wait.h> header.
5591 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
5592 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
5593 header.
5594 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
5595 instead of <sys/wait.h> header.
5596 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
5597
02d403bf 55982012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
5599
5600 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
5601 (various make rules): Remove -DGDBSERVER
5602
fbd5db48
YQ
56032012-11-09 Yao Qi <yao@codesourcery.com>
5604
5605 * spu-low.c (current_ptid): Move it to ..
5606 * gdbthread.h: ... here. New.
5607 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
5608 * server.c (myresume, process_serial_event): Likewise.
5609 * thread-db.c (thread_db_find_new_threads): Likewise.
5610 * tracepoint.c (run_inferior_command): Likewise.
5611
b3dc46ff
AB
56122012-10-01 Andrew Burgess <aburgess@broadcom.com>
5613
5614 * server.c (handle_search_memory_1): Include access length in
5615 warning message.
5616
07c04788
HPN
56172012-09-05 Michael Brandt <michael.brandt@axis.com>
5618
5619 * linux-crisv32-low.c: Fix compile errors.
5620
918d227b
YQ
56212012-09-04 Yao Qi <yao@codesourcery.com>
5622
5623 * tracepoint.c (cmd_qtsv): Adjust debug message.
5624 Don't check CUR_TPOINT.
5625
18c1b81a
YQ
56262012-08-28 Yao Qi <yao@codesourcery.com>
5627
5628 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
5629 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
5630 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
5631 Remove declarations of xmalloc, xreallloc, xstrdup and
5632 freeargv.
5633 * Makefile.in (libiberty_h): New.
5634 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
5635 (linux-bfin-low.o): Append dependency 'libiberty.h'.
5636
dc82f37b
YQ
56372012-08-23 Yao Qi <yao@codesourcery.com>
5638
5639 * server.h: Remove declaration of 'xsnprintf'.
5640
406b1477
KS
56412012-08-22 Keith Seitz <keiths@redhat.com>
5642
5643 * server.h: Include build-gnulib-gbserver/config.h.
5644 * gdbreplay.c: Likewise.
5645
e6712ff1
DE
56462012-08-08 Doug Evans <dje@google.com>
5647
5648 * Makefile.in (SFILES): Add gdb_vecs.c.
5649 (OBS): Add gdb_vecs.o.
5650 (gdb_vecs_h, host_defs_h): New variables.
5651 (thread-db.o): Add $(gdb_vecs_h) dependency.
5652 (gdb_vecs.o): New rule.
5653 * thread-db.c: #include "gdb_vecs.h".
5654 (thread_db_load_search): Use a vector to iterate over path elements.
5655 Handle text appearing after "$pdir".
5656
5657 * configure.ac: Add check for strstr.
5658 * config.in: Regenerate.
5659 * configure: Regenerate.
5660
7c3270ae
UW
56612012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
5662
5663 * hostio.c (handle_pread): If pread fails, fall back to attempting
5664 lseek/read.
5665 (handle_pwrite): Likewise for pwrite.
5666
b62e2b27
UW
56672012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
5668
5669 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
5670 between unsupported TYPE and unimplementable ADDR/LEN combination.
5671 (arm_insert_point): Act on new return value.
5672
78a99e91
PA
56732012-07-31 Pedro Alves <palves@redhat.com>
5674
5675 * server.c (process_point_options): Only skip tokens if we find
5676 one that is unrecognized. Don't treat 'X' specially while
5677 skipping unrecognized tokens.
5678
fcf303ab
UW
56792012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
5680
5681 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
5682 to 4-byte-align HW breakpoint addresses for Thumb.
5683
7255706c
YQ
56842012-07-27 Yao Qi <yao@codesourcery.com>
5685
5686 PR remote/14161.
5687
5688 * server.h: Declare gdb_agent_about_to_close.
5689 * target.c (kill_inferior): Include "agent.h".
5690 New. Send command 'kill'.
5691 * target.h (kill_inferior): Removed macro.
5692 * tracepoint.c (gdb_agent_about_to_close): New.
5693 (gdb_agent_helper_thread): Handle command 'close'.
5694 Wait endlessly until the inferior stops.
5695 Install gdb_agent_remove_socket to atexit hook.
5696 (agent_socket_name): New static variable.
5697 (gdb_agent_socket_init): Replace local variable 'name' with
5698 'agent_socket_name'.
5699 (gdb_agent_remove_socket): New.
5700
5a3f286f
YQ
57012012-07-27 Yao Qi <yao@codesourcery.com>
5702
5703 * server.c (process_point_options): Stop at 'X' when parsing.
5704
961bd387
ME
57052012-07-19 Michael Eager <eager@eagercon.com>
5706
a261b8f5 5707 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
5708 to hw_execute.
5709 * linux-x86-low.c (x86_insert_point, x86_remove_point):
5710 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
5711 hardware breakpoint.
5712
aa7c7447
JK
57132012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5714
5715 * gdbserver/linux-low.c (initialize_low): Call
5716 linux_ptrace_init_warnings.
5717
7f216e7c
DE
57182012-07-02 Doug Evans <dje@google.com>
5719
5720 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
5721 pointer to int.
5722
d3ce09f5
SS
57232012-07-02 Stan Shebs <stan@codesourcery.com>
5724
5725 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
5726 (ax.o): Add it to build rule.
5727 (ax-ipa.o): Ditto.
5728 (OBS): Add format.o.
5729 (IPA_OBS): Add format.o.
5730 * server.c (handle_query): Claim support for breakpoint commands.
5731 (process_point_options): Add command case.
5732 (process_serial_event): Leave running if there are printfs in
5733 effect.
5734 * mem-break.h (any_persistent_commands): Declare.
5735 (add_breakpoint_commands): Declare.
5736 (gdb_no_commands_at_breakpoint): Declare.
5737 (run_breakpoint_commands): Declare.
5738 * mem-break.c (struct point_command_list): New struct.
5739 (struct breakpoint): New field command_list.
5740 (any_persistent_commands): New function.
5741 (add_commands_to_breakpoint): New function.
5742 (add_breakpoint_commands): New function.
5743 (gdb_no_commands_at_breakpoint): New function.
5744 (run_breakpoint_commands): New function.
5745 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
5746 locally.
5747 * ax.c: Include format.h.
5748 (ax_printf): New function.
5749 (gdb_eval_agent_expr): Add printf opcode.
5750
2f8f6aed
YQ
57512012-06-13 Yao Qi <yao@codesourcery.com>
5752
5753 * server.c (start_inferior): Remove duplicated writes to fields
5754 'last_resume_kind' and 'last_status' of 'current_inferior'.
5755
0c9070b3
YQ
57562012-06-12 Yao Qi <yao@codesourcery.com>
5757 Pedro Alves <palves@redhat.com>
5758
5759 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
5760 comment.
5761 * server.c (handle_v_cont): Extend comment.
5762
c52daf70
YQ
57632012-06-11 Yao Qi <yao@codesourcery.com>
5764
5765 * linux-low.c (linux_attach): Add 'static'.
5766
d38bbb0a
YQ
57672012-06-06 Yao Qi <yao@codesourcery.com>
5768
5769 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
5770
89dc0afd
JK
57712012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
5772
5773 Fix gcc -flto compilation warning.
5774 * server.c (main): Make variable multi_mode and attach volatile.
5775
75f62ce7
TJB
57762012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5777
5778 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
5779 if the platform doesn't know about it.
5780
65f479b6
PA
57812012-05-30 Jeff Kenton <jkenton@tilera.com>
5782
5783 * Makefile.in (SFILES): Add linux-tile-low.c.
5784 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
5785 * configure.srv: Handle tilegx-*-linux*.
5786 * linux-tile-low.c: New file.
5787
0c5bf5a9
JK
57882012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5789
5790 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
5791
a493e3e2
PA
57922012-05-24 Pedro Alves <palves@redhat.com>
5793
5794 PR gdb/7205
5795
43aaf8b6 5796 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 5797
2ea28649
PA
57982012-05-24 Pedro Alves <palves@redhat.com>
5799
5800 PR gdb/7205
5801
5802 Replace target_signal with gdb_signal throughout.
5803
8d409d16
MR
58042012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
5805
5806 * linux-low.c (linux_store_registers): Avoid the copying sequence
5807 when no data has been retrieved by ptrace.
5808
23512c01
MGD
58092012-05-22 Will Deacon <will.deacon@arm.com>
5810
5811 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
5812 Include asm/ptrace.h.
5813 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
5814 already defined.
5815
4934b29e
MR
58162012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
5817
5818 * linux-low.c (linux_store_registers): Don't re-retrieve data
5819 with ptrace that has already been obtained from /proc. Always
5820 copy any data retrieved with ptrace to the buffer supplied.
5821
bde24c0a
PA
58222012-05-11 Yao Qi <yao@codesourcery.com>
5823 Pedro Alves <palves@redhat.com>
5824
5825 * linux-low.c (enum stopping_threads_kind): New.
5826 (stopping_threads): Change type to `enum stopping_threads_kind'.
5827 (handle_extended_wait): If stopping and suspending threads, leave
5828 the new_lwp suspended too.
5829 (linux_wait_for_event): Adjust.
5830 (stop_all_lwps): Set `stopping_threads' to
5831 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
5832 whether we're suspending threads or just stopping them. Assert no
5833 recursion happens.
5834
623b6bdf
YQ
58352012-04-29 Yao Qi <yao@codesourcery.com>
5836
5837 * server.h: Move some code to ...
5838 * gdbthread.h: ... here. New.
5839 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
5840 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
5841 (nto-low.o, win32-low.o): Likewise.
5842 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
5843 * regcache.c, remote-utils.c, server.c: Likewise.
5844 * target.c, tracepoint.c, win32-low.c: Likewise.
5845
f15f9948
TJB
58462012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5847
5848 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
5849 (PTRACE_ARG4_TYPE): Likewise.
5850 (PTRACE_XFER_TYPE): Likewise.
5851 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
5852 ptrace to PTRACE_ARG3_TYPE.
5853 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
5854 (PTRACE_ARG4_TYPE): Likewise.
5855 (PTRACE_XFER_TYPE): Likewise.
5856 (linux_detach_one_lwp): Cast fourth argument of
5857 ptrace to long then PTRACE_ARG4_TYPE.
5858 (regsets_fetch_inferior_registers): Cast third argument of
5859 ptrace to long then PTRACE_ARG3_TYPE.
5860 (regsets_store_inferior_registers): Likewise.
5861
38ea300a
PA
58622012-04-20 Pedro Alves <palves@redhat.com>
5863
5864 * configure: Regenerate.
5865
c971b7fa
PA
58662012-04-19 Pedro Alves <palves@redhat.com>
5867
43aaf8b6 5868 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 5869 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
5870 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
5871 (all, install-only, uninstall, clean-info, all-lib, clean): No
5872 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
5873 (maintainer-clean realclean distclean): Use subdir_do.
5874 (subdir_do): New.
5875 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 5876 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
5877 * acinclude.m4: Include acx_configure_dir.m4.
5878 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
5879 calls. Call AC_PROG_RANLIB. Configure gnulib using
5880 ACX_CONFIGURE_DIR.
5881 (GNULIB): New.
5882 (GNULIB_STDINT_H): Adjust.
5883 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
5884 * gdbreplay.c: Include build-gnulib/config.h.
5885 * server.h: Likewise.
5886 * aclocal.m4: Regenerate.
5887 * config.in: Regenerate.
5888 * configure: Regenerate.
c971b7fa 5889
809277f8
PA
58902012-04-19 Pedro Alves <palves@redhat.com>
5891
5892 * Makefile.in (LIBGNU, INCGNU): Adjust.
5893 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
5894 (all, install-only, uninstall, clean-info, all-lib, clean)
5895 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
5896 * configure.ac: Adjust AC_OUTPUT output.
5897 * aclocal.m4: Regenerate.
5898 * configure: Regenerate.
5899
fd9bb8b8
PA
59002012-04-19 Pedro Alves <palves@redhat.com>
5901
5902 * Makefile.in (generated_files): New.
5903 (server_h): Remove the explicit dependency on config.h, and depend
5904 on $generated_files.
5905
1c298c66
PA
59062012-04-19 Pedro Alves <palves@redhat.com>
5907
5908 * Makefile.in (INCGNU): Add -Ignulib.
5909
57c4b50b
PA
59102012-04-19 Pedro Alves <palves@redhat.com>
5911
5912 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
5913 (INCGNU): ... this, and spell out -I here.
5914 (GNULIB_LIB): Rename to ...
5915 (LIBGNU): ... this.
5916 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
5917
1030e047
PA
59182012-04-19 Pedro Alves <palves@redhat.com>
5919
5920 * config.in: Regenerate.
5921
447d4319
PA
59222012-04-19 Pedro Alves <palves@redhat.com>
5923
5924 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
5925 * server.h (memmem): Remove declaration.
5926 * config.in: Regenerate.
5927 * configure: Regenerate.
5928
aad9eab9
YQ
59292012-04-19 Yao Qi <yao@codesourcery.com>
5930
5931 * Makefile.in (SFILES): Add common/vec.c.
5932 (OBS): Add vec.o.
5933 (vec.o): New rule.
5934
3e10640f
YQ
59352012-04-19 Yao Qi <yao@codesourcery.com>
5936
5937 * remote-utils.c (prepare_resume_reply): Replace with macro
5938 target_core_of_thread.
5939 * server.c (handle_qxfer_threads_proper): Likewise.
5940 * target.h (traget_core_of_thread): New macro.
5941
71622373
PA
59422012-04-18 Pedro Alves <palves@redhat.com>
5943
5944 * aclocal.m4: Regenerate.
5945 * configure: Regenerate.
5946
80d26939
YQ
59472012-04-16 Yao Qi <yao@codesourcery.com>
5948
5949 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
5950 duplicated on address.
5951
42476b70
YQ
59522012-04-16 Yao Qi <yao@codesourcery.com>
5953
5954 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
5955 (struct tracepoint_action_ops) <send>: New field.
5956 (m_tracepoint_action_send, r_tracepoint_action_send): New.
5957 (agent_expr_send, x_tracepoint_action_send): New.
5958 (l_tracepoint_action_send): New.
5959 (cmd_qtdp): Download and install tracepoint
5960 according to `use_agent'.
5961 (run_inferior_command): Add one more parameter `len'.
5962 Update callers.
5963 (tracepoint_send_agent): New.
5964 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
5965
7bc83639
YQ
59662012-04-16 Yao Qi <yao@codesourcery.com>
5967
5968 * tracepoint.c (download_tracepoints): Moved to ...
5969 (cmd_qtstart): ... here.
5970
5f18041e
YQ
59712012-04-14 Yao Qi <yao@codesourcery.com>
5972
5973 * tracepoint.c: Include inttypes.h.
5974 (struct collect_memory_action): Use sized types.
5975 (struct tracepoint): Likewise.
5976 (cmd_qtdp, stop_tracing): Update print specifiers.
5977 (cmd_qtp, response_tracepoint): Likewise.
5978 (collect_data_at_tracepoint): Likewise.
5979 (collect_data_at_step): Likewise.
5980
55a8c076
YQ
59812012-04-14 Yao Qi <yao@codesourcery.com>
5982
5983 Import gnulib module inttypes.
5984 * aclocal.m4, config.in, configure: Regenerated.
5985
dc750257
YQ
59862012-04-14 Yao Qi <yao@codesourcery.com>
5987
5988 * Makefile.in (maintainer-clean, realclean, distclean): Remove
5989 Makefile and config.status at last.
5990
0ab5faf9
YQ
59912012-04-13 Yao Qi <yao@codesourcery.com>
5992
5993 * tracepoint.c: Include stdint.h unconditionally.
5994
18f5fd81
TJB
59952012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5996
5997 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
5998 on BFD_HAVE_SYS_PROCFS_TYPE.
5999 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
6000 * configure: Regenerate.
6001 * config.in: Likewise.
6002
4d47af5c
L
60032012-04-13 H.J. Lu <hongjiu.lu@intel.com>
6004
6005 * Makefile.in (clean): Also remove x32.c x32-linux.c
6006 x32-avx.c x32-avx-linux.c.
6007 (x32.o): New target.
6008 (x32.c): Likewise.
6009 (x32-linux.o): Likewise.
6010 (x32-linux.c): Likewise.
6011 (x32-avx.o): Likewise.
6012 (x32-avx.c): Likewise.
6013 (x32-avx-linux.o): Likewise.
6014 (x32-avx-linux.c): Likewise.
6015
6016 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
6017 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
6018 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
6019 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
6020 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
6021 i386/x32-avx-linux.xml.
6022
6023 * linux-x86-low.c (init_registers_x32_linux): New prototype.
6024 (init_registers_x32_avx_linux): Likwise.
6025 (x86_linux_update_xmltarget): Call init_registers_x32_linux
6026 or init_registers_x32_avx_linux if linux_is_elf64 is false.
6027
ecedbe58
PA
60282012-04-13 Pedro Alves <palves@redhat.com>
6029
6030 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
6031 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
6032 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
6033 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
6034 the sub-make.
6035
c92b5177
L
60362012-04-12 H.J. Lu <hongjiu.lu@intel.com>
6037
6038 * linux-x86-low.c (compat_x32_clock_t): New.
6039 (compat_x32_siginfo_t): Likewise.
6040 (compat_x32_siginfo_from_siginfo): Likewise.
6041 (siginfo_from_compat_x32_siginfo): Likewise.
6042 (linux_is_elf64): Likewise.
6043 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
6044 and siginfo_from_compat_x32_siginfo for x32.
6045 (x86_arch_setup): Set linux_is_elf64.
6046
214d508e
L
60472012-04-12 H.J. Lu <hongjiu.lu@intel.com>
6048
6049 PR gdb/13969
6050 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
6051 e_machine field.
6052 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
6053 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
6054 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
6055 compatible with process.
6056
c9a1864a
YQ
60572012-04-12 Yao Qi <yao@codesourcery.com>
6058
6059 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
6060 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
6061 (install-only, install-info, clean): Handle sub dir gnulib.
6062 (all-lib, am--refresh): New targets.
6063 (memmem.o): Remove target.
6064 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
6065 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
6066 (AC_REPLACE_FUNCS): Remove memmem.
6067 Invoke gl_INIT and AM_INIT_AUTOMAKE.
6068 (AC_OUTPUT): Generate Makefile in gnulib/.
6069 * aclocal.m4, config.in, configure: Regenerated.
6070
367ba2c2
MR
60712012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
6072
6073 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
6074
9d236627
PA
60752012-04-05 Pedro Alves <palves@redhat.com>
6076
6077 -Werror=strict-aliasing
6078
6079 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
6080 pointer.
6081
111217b3
PA
60822012-04-04 Pedro Alves <palves@redhat.com>
6083
6084 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
6085 (sparc_store_gregset_from_stack, sparc_store_gregset)
6086 (sparc_breakpoint_at): Fix formatting.
6087
8365dcf5
TJB
60882012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
6089
6090 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
6091 are available.
6092 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
6093 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
6094 * config.in: Regenerate.
6095 * configure: Likewise.
6096
689cc2ae
PA
60972012-03-29 Pedro Alves <palves@redhat.com>
6098
6099 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
6100 Correct ptrace arguments.
6101
c14dfd32
PA
61022012-03-28 Pedro Alves <palves@redhat.com>
6103
6104 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
6105 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
6106 (IA64_FR1_REGNUM): New defines.
6107 (ia64_fetch_register): New.
6108 (the_low_target): Install it.
6109 * linux-low.h (struct linux_target_ops) <fetch_register>: New
6110 field.
6111 * linux-low.c (linux_fetch_registers): Try the
6112 the_low_target.fetch_register hook first.
6113
6114 * linux-arm-low.c (the_low_target): Adjust.
6115 * linux-bfin-low.c (the_low_target): Adjust.
6116 * linux-cris-low.c (the_low_target): Adjust.
6117 * linux-crisv32-low.c (the_low_target): Adjust.
6118 * linux-m32r-low.c (the_low_target): Adjust.
6119 * linux-m68k-low.c (the_low_target): Adjust.
6120 * linux-mips-low.c (the_low_target): Adjust.
6121 * linux-ppc-low.c (the_low_target): Adjust.
6122 * linux-s390-low.c (the_low_target): Adjust.
6123 * linux-sh-low.c (the_low_target): Adjust.
6124 * linux-sparc-low.c (the_low_target): Adjust.
6125 * linux-tic6x-low.c (the_low_target): Adjust.
6126 * linux-x86-low.c (the_low_target): Adjust.
6127 * linux-xtensa-low.c (the_low_target): Adjust.
6128
63c88e13
PA
61292012-03-26 Pedro Alves <palves@redhat.com>
6130
6131 * server.c (handle_qxfer_libraries): Don't bail early if
6132 the_target->qxfer_libraries_svr4 is not NULL.
6133
fb723180
PA
61342012-03-26 Pedro Alves <palves@redhat.com>
6135
6136 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
6137
0afae3cf
PA
61382012-03-23 Pedro Alves <palves@redhat.com>
6139
6140 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
6141 "library-list-svr4" element's start tag when the the DSO list is
6142 empty.
6143
485f1ee4
PA
61442012-03-23 Pedro Alves <palves@redhat.com>
6145
6146 * linux-low.c (read_one_ptr): Read the inferior's pointer through
6147 a variable whose type size is the same as the inferior's pointer
6148 size.
6149
a5362b9a
TS
61502012-03-21 Thomas Schwinge <thomas@codesourcery.com>
6151
6152 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
6153 struct siginfo.
6154 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
6155 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
6156 * linux-low.h: Include <signal.h>.
6157 (struct siginfo): Remove forward declaration.
6158 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
6159 struct siginfo.
6160
d226c142
MF
61612012-03-21 Mike Frysinger <vapier@gentoo.org>
6162
6163 * .gitignore: Ignore more files.
6164
122f36ef
PA
61652012-03-19 Pedro Alves <palves@redhat.com>
6166 Jan Kratochvil <jan.kratochvil@redhat.com>
6167
6168 * server.c (cont_thread, general_thread): Add describing comments.
6169 (start_inferior): Clear `cont_thread'.
6170 (handle_v_cont): Don't set `cont_thread' if resuming all threads
6171 of a process.
6172
fc3e5175
YQ
61732012-03-15 Yao Qi <yao@codesourcery.com>
6174
6175 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
6176 handling to ...
6177 (cmd_qtdp): ... here.
6178
8d0d92cd
YQ
61792012-03-15 Yao Qi <yao@codesourcery.com>
6180
6181 * tracepoint.c (struct tracepoint_action_ops): New.
6182 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
6183 (m_tracepoint_action_download): New.
6184 (r_tracepoint_action_download): New.
6185 (x_tracepoint_action_download): New.
6186 (l_tracepoint_action_download): New.
6187 (add_tracepoint_action): Install `action->ops' according type.
6188 (download_tracepoint_1): Move code `download' function pointer
6189 of various tracepoint_action_ops.
6190
87b0bb13
JK
61912012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
6192
6193 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
6194 linux_ptrace_attach_warnings.
6195
5f572dec
JK
61962012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
6197
6198 * Makefile.in (linux-ptrace.o): New.
6199 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
6200 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
6201 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
6202 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
6203 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
6204 of these targets.
6205 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
6206
f4647387
YQ
62072012-03-08 Yao Qi <yao@codesourcery.com>
6208 Pedro Alves <palves@redhat.com>
6209
6210 Fix PR server/13392.
6211 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
6212 offset of JMP insn.
6213 * tracepoint.c (remove_tracepoint): New.
6214 (cmd_qtdp): Call remove_tracepoint when failed to install.
6215
9b224c5e
PA
62162012-03-07 Pedro Alves <palves@redhat.com>
6217
6218 * linux-low.c (get_detach_signal): New.
6219 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
6220 Pass on pending signals to PTRACE_DETACH. Check the result of the
6221 ptrace call.
6222 * server.c (program_signals, program_signals_p): New.
6223 (handle_general_set): Handle QProgramSignals.
6224 * server.h (program_signals, program_signals_p): Declare.
6225
e237a7e2
JK
62262012-03-05 Pedro Alves <palves@redhat.com>
6227 Jan Kratochvil <jan.kratochvil@redhat.com>
6228
6229 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
6230 New comment why.
6231
5808517f
YQ
62322012-03-03 Yao Qi <yao@codesourcery.com>
6233
6234 * tracepoint.c (tracepoint_look_up_symbols): Update call to
6235 agent_look_up_symbols.
6236
58b4daa5
YQ
62372012-03-03 Yao Qi <yao@codesourcery.com>
6238
6239 * Makefile.in (linux-low.o): Keep dependence on agent.h.
6240 (linux-x86-low.o): Likewise.
6241 * server.h: Remove in_process_agent_loaded.
6242 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
6243 common/agent.c.
6244 Update callers.
6245
8ffcbaaf
YQ
62462012-03-03 Yao Qi <yao@codesourcery.com>
6247
6248 * tracepoint.c (gdb_agent_capability): New global.
6249 (in_process_agent_loaded_ust): Renamed to
6250 `in_process_agent_supports_ust'.
6251 Update callers.
6252 (in_process_agent_supports_ust): Call agent_capability_check.
6253 (clear_installed_tracepoints): Assert that agent supports
6254 agent.
6255
d1feda86
YQ
62562012-03-03 Yao Qi <yao@codesourcery.com>
6257
6258 * linux-low.c (linux_supports_agent): New.
6259 (linux_target_ops): Initialize field `supports_agent' with
6260 linux_supports_agent.
6261 * target.h (struct target_ops) <supports_agent>: New.
6262 (target_supports_agent): New macro.
6263 * server.c (handle_general_set): Handle packet 'QAgent'.
6264 (handle_query): Send `QAgent+'.
6265 * Makefile.in (server.o): Depends on agent.h.
6266
2fa291ac
YQ
62672012-03-03 Yao Qi <yao@codesourcery.com>
6268
6269 * Makefile.in (OBS): Add agent.o.
6270 Add new rule for agent.o.
6271 Track dependence of tracepoint.c on agent.h.
6272 * tracepoint.c (run_inferior_command_1):
6273 (run_inferior_command): Call agent_run_command.
6274 (gdb_ust_connect_sync_socket): Deleted. Move it to
6275 common/agent.c.
6276 (resume_thread, stop_thread): Likewise.
6277 (gdb_ust_socket_init): Renamed to ...
6278 (gdb_agent_socket_init): ... New.
6279 (gdb_ust_thread): Renamed to ...
6280 (gdb_agent_helper_thread): ... New.
6281 (gdb_ust_init): Move some code to ...
6282 (gdb_agent_init): ... here. New.
6283 [HAVE_UST]: Call gdb_ust_init.
6284 (initialize_tracepoint_ftlib): Call gdb_agent_init.
6285 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
6286 * config.in, configure: Regenerated.
6287
05044653
PA
62882012-03-02 Pedro Alves <palves@redhat.com>
6289
6290 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
6291 * linux-low.c (struct simple_pid_list): New.
6292 (stopped_pids): New a struct simple_pid_list pointer.
6293 (add_to_pid_list, pull_pid_from_list): New.
6294 (handle_extended_wait): Don't assume the first signal new children
6295 report is SIGSTOP. Adjust call to pull_pid_from_list.
6296 (linux_wait_for_lwp): Adjust.
6297
8d00225b
YQ
62982012-03-02 Yao Qi <yao@codesourcery.com>
6299
6300 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
6301 debug log.
6302
19560ba5
YQ
63032012-03-02 Yao Qi <yao@codesourcery.com>
6304
6305 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
6306 `stop_pc' and `tpoint'. Update caller.
6307
1faeff08
MR
63082012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
6309
6310 * linux-low.h (linux_target_ops): Add regset_bitmap member.
6311 * linux-low.c (use_linux_regsets): New macro.
6312 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
6313 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
6314 (linux_register_in_regsets): New function.
6315 (usr_fetch_inferior_registers): Skip registers covered by
6316 regsets.
6317 (usr_store_inferior_registers): Likewise.
6318 (usr_fetch_inferior_registers): New macro.
6319 (usr_store_inferior_registers): Likewise.
6320 (linux_fetch_registers): Handle mixed regset/non-regset targets.
6321 (linux_store_registers): Likewise.
6322 * linux-mips-low.c (init_registers_mips_dsp_linux): New
6323 prototype.
6324 (init_registers_mips64_dsp_linux): Likewise.
6325 (init_registers_mips_linux): New macro.
6326 (init_registers_mips_dsp_linux): Likewise.
6327 (mips_dsp_num_regs): Likewise.
6328 (DSP_BASE, DSP_CONTROL): New fallback macros.
6329 (mips_base_regs): New macro.
6330 (mips_regmap): Use it. Fix the size.
6331 (mips_dsp_regmap): New variable.
6332 (mips_dsp_regset_bitmap): Likewise.
6333 (mips_arch_setup): New function.
6334 (mips_cannot_fetch_register): Use the_low_target.regmap rather
6335 than mips_regmap.
6336 (mips_cannot_store_register): Likewise.
6337 (the_low_target): Update .arch_setup, .num_regs and .regmap
6338 initializers. Add .regset_bitmap initializer.
6339 * linux-arm-low.c (the_low_target): Add .regset_bitmap
6340 initializer.
6341 * linux-bfin-low.c (the_low_target): Likewise.
6342 * linux-cris-low.c (the_low_target): Likewise.
6343 * linux-crisv32-low.c (the_low_target): Likewise.
6344 * linux-ia64-low.c (the_low_target): Likewise.
6345 * linux-m32r-low.c (the_low_target): Likewise.
6346 * linux-m68k-low.c (the_low_target): Likewise.
6347 * linux-ppc-low.c (the_low_target): Likewise.
6348 * linux-s390-low.c (the_low_target): Likewise.
6349 * linux-sh-low.c (the_low_target): Likewise.
6350 * linux-sparc-low.c (the_low_target): Likewise.
6351 * linux-tic6x-low.c (the_low_target): Likewise.
6352 * linux-x86-low.c (the_low_target): Likewise.
6353 * linux-xtensa-low.c (the_low_target): Likewise.
6354 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
6355 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
6356 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
6357 srv_xmlfiles.
6358 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
6359 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
6360
c03e6ccc
YQ
63612012-02-29 Yao Qi <yao@codesourcery.com>
6362 Pedro Alves <palves@redhat.com>
6363
6364 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
6365 `step_over_finished' is true.
6366
644cebc9
PA
63672012-02-27 Pedro Alves <palves@redhat.com>
6368
6369 * linux-low.c (pid_is_stopped): Delete, moved to common/.
6370 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
6371
c14d7ab2
PA
63722012-02-27 Pedro Alves <palves@redhat.com>
6373
6374 PR server/9684
6375 * linux-low.c (pid_is_stopped): New.
6376 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
6377
412c89dd
LM
63782012-02-25 Luis Machado <lgustavo@codesourcery.com>
6379
6380 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
6381 of conditions.
6382
b745defe
MR
63832012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
6384
6385 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
6386
9f3a5c85
LM
63872012-02-24 Luis Machado <lgustavo@codesourcery>
6388
6389 * server.c (handle_query): Advertise support for target-side
6390 breakpoint condition evaluation.
6391 (process_point_options): New function.
6392 (process_serial_event): When inserting a breakpoint, check for
6393 a target-side condition that should be evaluated.
6394
6395 * mem-break.c: Include regcache.h and ax.h.
6396 (point_cond_list_t): New data structure.
6397 (breakpoint) <cond_list>: New field.
6398 (find_gdb_breakpoint_at): Make non-static.
6399 (delete_gdb_breakpoint_at): Clear any target-side
6400 conditions.
6401 (clear_gdb_breakpoint_conditions): New function.
6402 (add_condition_to_breakpoint): Likewise.
6403 (add_breakpoint_condition): Likewise.
6404 (gdb_condition_true_at_breakpoint): Likewise.
6405 (gdb_breakpoint_here): Return result directly instead
6406 of going through a local variable.
6407
6408 * mem-break.h (find_gdb_breakpoint_at): New prototype.
6409 (clear_gdb_breakpoint_conditions): Likewise.
6410 (add_breakpoint_condition): Likewise.
6411 (gdb_condition_true_at_breakpoint): Likewise.
6412
6413 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
6414 (need_step_over_p): Take target-side breakpoint condition into
6415 consideration.
6416
5e1dc496
LM
64172012-02-24 Luis Machado <lgustavo@codesourcery>
6418
6419 * server.h: Include tracepoint.h.
6420 (agent_mem_read, agent_get_trace_state_variable_value,
6421 agent_set_trace_state_variable_value,
6422 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
6423 get_set_tsv_func_addr): New prototypes.
6424
6425 * ax.h: New include file.
6426 * ax.c: New source file.
6427
6428 * tracepoint.c: Include ax.h.
6429 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
6430 agent_expr, eval_result_type): Move to ax.h.
6431 (parse_agent_expr): Rename to ...
6432 (gdb_parse_agent_expr): ... this, make it non-static and move
6433 to ax.h.
6434 (unparse_agent_expr) Rename to ...
6435 (gdb_unparse_agent_expr): ... this, make it non-static and move
6436 to ax.h.
6437 (eval_agent_expr): Rename to ...
6438 (eval_tracepoint_agent_expr): ... this.
6439 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
6440 forward declarations.
6441 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
6442 (agent_get_trace_state_variable_value): New function.
6443 (agent_set_trace_state_variable_value): New function.
6444 (cmd_qtdp): Call gdb_parse_agent_expr (...).
6445 (response_tracepoint): Call gdb_unparse_agent_expr (...).
6446 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
6447 (condition_true_at_tracepoint): Likewise.
6448 (parse_agent_expr): Rename to ...
6449 (gdb_parse_agent_expr): ... this and move to ax.c.
6450 (unparse_agent_expr): Rename to ...
6451 (gdb_unparse_agent_expr): ... this and move to ax.c.
6452 (gdb_agent_op_name): Move to ax.c.
6453 (eval_agent_expr): Rename to ...
6454 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
6455 and move to ax.c.
6456 (eval_tracepoint_agent_expr): New function.
6457 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 6458 non-static.
5e1dc496
LM
6459 (current_insn_ptr, emit_error, struct bytecode_address): Move to
6460 ax.c.
6461 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
6462 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
6463 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
6464 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
6465 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
6466 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
6467 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
6468 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
6469 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
6470 (compile_bytecodes): Remove forward declaration.
6471 (is_goto_target): Move to ax.c.
6472 (compile_bytecodes): Move to ax.c and call
6473 agent_get_trace_state_variable_value (...) and
6474 agent_set_trace_state_variable_value (...).
6475
6476 * Makefile.in: Update ax.c and IPA dependencies.
6477
277e4e52
PA
64782012-02-24 Pedro Alves <palves@redhat.com>
6479
6480 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
6481 (cmd_bigqtbuffer_circular): ... this. Only handle
6482 'QTBuffer:circular:'.
6483 (handle_tracepoint_general_set): Adjust.
6484
bf4c19f7
YQ
64852012-02-16 Yao Qi <yao@codesourcery.com>
6486
6487 * inferiors.c: Move code to ...
6488 * dll.c: .... here. New.
6489 * server.h: Declare clear_dlls.
6490 * Makefile.in (SFILES): Add dll.c.
6491 (OBS): Add dll.o
6492 (dll.o): New rule.
6493
d73f2619
YQ
64942012-02-11 Yao Qi <yao@codesourcery.com>
6495
6496 * server.c: (handle_monitor_command): Add a new parameter
6497 `own_buf'.
6498 (handle_query): Update caller.
6499
f8255c2a
JB
65002012-02-09 Joel Brobecker <brobecker@adacore.com>
6501
6502 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
6503 * configure, config.in: Regenerate.
6504 * hostio.c: Provide an alternate implementation if HAVE_READLINK
6505 is not defined.
6506
da84f473
PA
65072012-02-02 Pedro Alves <palves@redhat.com>
6508
6509 Try SIGKILL first, then PTRACE_KILL.
6510 * linux-low.c (linux_kill_one_lwp): New.
6511 (linux_kill_one_lwp): Rename to ...
6512 (kill_one_lwp_callback): ... this. Use the new
6513 linux_kill_one_lwp.
6514
e886a173
PA
65152012-02-02 Pedro Alves <palves@redhat.com>
6516
6517 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
6518 inferior.
6519
be07f1a2
PA
65202012-01-27 Pedro Alves <palves@redhat.com>
6521
6522 * linux-low.c (linux_child_pid_to_exec_file): Delete.
6523 (elf_64_file_p): Make static.
6524 (linux_pid_exe_is_elf_64_file): New.
6525 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
6526 Delete declarations.
6527 (linux_pid_exe_is_elf_64_file): Declare.
6528 * linux-x86-low.c (x86_arch_setup): Use
6529 linux_pid_exe_is_elf_64_file.
6530
d8301ad1
JK
65312012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
6532
6533 * linux-low.c (linux_wait_for_event_1): Rename to ...
6534 (linux_wait_for_event): ... here and merge it with former
6535 linux_wait_for_event - new variable wait_ptid, use it.
6536 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
6537
01b17894
PA
65382012-01-23 Pedro Alves <palves@redhat.com>
6539
6540 * server.c (main): Avoid yet another case of infinite loop while
6541 detaching/killing after a longjmp.
6542
e825046f
JK
65432012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
6544
6545 Code cleanup.
6546 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
6547
b9e7b9c3
UW
65482012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
6549
6550 * hostio.c (handle_readlink): New function.
6551 (handle_vFile): Call it to handle "vFile:readlink" packets.
6552
901f9912
UW
65532012-01-20 Pedro Alves <palves@redhat.com>
6554 Ulrich Weigand <ulrich.weigand@linaro.org>
6555
6556 * server.c (handle_v_requests): Only support vAttach and vRun to
6557 start multiple processes when in extended protocol mode.
6558
fc1ab1a0
PA
65592012-01-17 Pedro Alves <palves@redhat.com>
6560
6561 * tracepoint.c (initialize_tracepoint): Use mmap instead of
6562 memalign plus mprotect to allocate the scratch buffer.
6563
7d5d4e98
PA
65642012-01-13 Pedro Alves <palves@redhat.com>
6565
6566 * server.c (attach_inferior): Clear `cont_thread'.
6567
f128d5e9
PA
65682012-01-13 Pedro Alves <palves@redhat.com>
6569
6570 * server.c (main): Avoid infinite loop while detaching/killing
6571 after a longjmp.
6572
06db92f0
DE
65732012-01-09 Doug Evans <dje@google.com>
6574
6575 * server.c (start_inferior): Set last_ptid in --wrapper case.
6576
32d92999
YQ
65772012-01-06 Yao Qi <yao@codesourcery.com>
6578
6579 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
6580 defined.
6581 [IN_PROCESS_AGENT] (debug_agent): New global variable.
6582
5e0a92a9
YQ
65832012-01-04 Yao Qi <yao@codesourcery.com>
6584
6585 * tracepoint.c (cmd_qtdp): Print debug message
6586 for static tracepoint.
6587
ae639e8c
YQ
65882012-01-04 Yao Qi <yao@codesourcery.com>
6589
6590 * tracepoint.c (trace_vdebug): Differentiate debug message
6591 between gdbserver and IPA.
6592
f72429c5
YQ
65932012-01-03 Yao Qi <yao@codesourcery.com>
6594
6595 * tracepoint.c (tracepoint_was_hit): Don't collect for
6596 static tracepoint.
6597
12c3e59c
JB
65982012-01-02 Joel Brobecker <brobecker@adacore.com>
6599
6600 * terminal.h: Reformat copyright header.
6601
67827812
JB
66022012-01-02 Joel Brobecker <brobecker@adacore.com>
6603
6604 * server.c (gdbserver_version): Update copyright year.
6605 * gdbreplay.c (gdbreplay_version): Likewise.
6606
3e52c33d
JK
66072011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
6608
6609 * linux-low.c (linux_create_inferior): Put empty if clause for write.
6610
6611 Revert:
6612 2011-12-18 Hui Zhu <teawater@gmail.com>
6613 * linux-low.c (linux_create_inferior): Save return value to ret.
6614
66f1260e
HZ
66152011-12-18 Hui Zhu <teawater@gmail.com>
6616
6617 * linux-low.c (linux_create_inferior): Save return value to ret.
6618
e77616d7
DE
66192011-12-16 Doug Evans <dje@google.com>
6620
e7b06c57
DE
6621 * linux-low.c (linux_create_inferior): If stdio connection,
6622 redirect stdin from /dev/null, stdout to stderr.
6623 * remote-utils.c (remote_is_stdio): New static global.
6624 (remote_connection_is_stdio): New function.
6625 (remote_prepare): Handle stdio connection.
6626 (remote_open): Ditto.
6627 (remote_close): Don't close stdin for stdio connections.
6628 (read_prim,write_prim): New functions. Replace all calls to
6629 read/write to these.
6630 * server.c (main): Watch for "-" argument. Move call to
6631 remote_prepare before start_inferior.
6632 * server.h (STDIO_CONNECTION_NAME): New macro.
6633 (remote_connection_is_stdio): Declare.
6634
e77616d7
DE
6635 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
6636 in debugging output.
6637
82067193
YQ
66382011-12-15 Yao Qi <yao@codesourcery.com>
6639
6640 * tracepoint.c: Include sys/syscall.h.
6641 (gdb_ust_thread): Remove preprocessor conditional.
6642
82bfbe7e
PA
66432011-12-14 Pedro Alves <pedro@codesourcery.com>
6644
6645 * linux-low.c (linux_detach_one_lwp): Call
6646 the_low_target.prepare_to_resume before detaching.
6647
712c6575
YQ
66482011-12-14 Yao Qi <yao@codesourcery.com>
6649
6650 * tracepoint.c (gdb_ust_thread): Don't ignore return value
6651 of write.
6652
d54d1edf
YQ
66532011-12-14 Yao Qi <yao@codesourcery.com>
6654
6655 * i386-low.c (i386_low_stopped_data_address): Initialize local
6656 variable `control'.
6657
6210a125
PA
66582011-12-13 Pedro Alves <pedro@codesourcery.com>
6659
6660 PR remote/13492
6661
6662 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
6663 DR_CONTROL unless necessary. Extend comments.
6664 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
6665 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
6666
2ece8244
YQ
66672011-12-13 Yao Qi <yao@codesourcery.com>
6668
6669 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
6670 macros.
6671 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
6672
784867a5
JK
66732011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
6674
6675 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
6676 Print new debug message for such case.
6677
6bf36717
JK
66782011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
6679
6680 Fix overlapping memcpy.
6681 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
6682 the read_inferior_memory transfer.
6683 (delete_fast_tracepoint_jump): New variable buf. Use it for the
6684 write_inferior_memory transfer.
6685 (set_fast_tracepoint_jump): New variable buf. Use it for the
6686 read_inferior_memory and write_inferior_memory transfers.
6687 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
6688 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
6689 Use it for the write_inferior_memory transfer.
6690 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
6691 buffers.
6692
50275556
MR
66932011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
6694
6695 * linux-low.c (fetch_register, store_register): Make code
6696 consistent, fix formatting.
6697
7325beb4
MR
66982011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
6699
6700 * linux-low.c (usr_store_inferior_registers): Factor out code
6701 to handle individual registers into...
6702 (store_register): ... this new function.
6703
c642a434
UW
67042011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
6705
6706 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
6707 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
6708 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
6709 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
6710 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
6711 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
6712 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
6713 (srv_xmlfiles): Add new XML files.
6714
6715 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
6716 and <sys/uio.h>.
6717 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
6718 (init_registers_s390_linux32v1): Add prototype.
6719 (init_registers_s390_linux32v2): Likewise.
6720 (init_registers_s390_linux64v1): Likewise.
6721 (init_registers_s390_linux64v2): Likewise.
6722 (init_registers_s390x_linux64v1): Likewise.
6723 (init_registers_s390x_linux64v2): Likewise.
6724 (s390_num_regs): Increment to 52.
6725 (s390_regmap): Add orig_r2 register.
6726 (s390_num_regs_3264): Increment to 68.
6727 (s390_regmap_3264): Add orig_r2 register.
6728 (s390_collect_ptrace_register): Handle orig_r2 register.
6729 (s390_supply_ptrace_register): Likewise.
6730 (s390_fill_last_break): New function.
6731 (s390_store_last_break): Likewise.
6732 (s390_fill_system_call): New function.
6733 (s390_store_system_call): Likewise.
6734 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
6735 register sets.
6736 (s390_check_regset): New function.
6737 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
6738 NT_S390_SYSTEM_CALL regsets and use appropriate description.
6739 Update target_regsets for available register sets.
6740
2268b414
JK
67412011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
6742 Jan Kratochvil <jan.kratochvil@redhat.com>
6743
6744 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
6745 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
6746 New.
6747 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
6748 * linux-low.h (struct process_info_private): New member r_debug.
6749 * server.c (handle_qxfer_libraries): Call
6750 the_target->qxfer_libraries_svr4.
6751 (handle_qxfer_libraries_svr4): New function.
6752 (qxfer_packets): New entry "libraries-svr4".
6753 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
6754 * target.h (struct target_ops): New member qxfer_libraries_svr4.
6755 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
6756 PACKET_qXfer_libraries_svr4.
6757
d6db1fab
UW
67582011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
6759
6760 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
6761 PSW address/mask between 8-byte and 16-byte formats.
6762 (s390_supply_ptrace_register): Likewise.
6763 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
6764 basic addressing mode bit.
6765
242f5f1c
SS
67662011-11-24 Stan Shebs <stan@codesourcery.com>
6767
6768 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
6769
f196051f
SS
67702011-11-17 Stan Shebs <stan@codesourcery.com>
6771
6772 * tracepoint.c (struct tracepoint): New field traceframe_usage.
6773 (tracing_start_time): New global.
6774 (tracing_stop_time): New global.
6775 (tracing_user_name): New global.
6776 (tracing_notes): New global.
6777 (tracing_stop_note): New global.
6778 (cmd_qtstart): Set traceframe_usage, start_time.
6779 (stop_tracing): Set stop_time.
6780 (cmd_qtstatus): Report additional status.
6781 (cmd_qtp): New function.
6782 (handle_tracepoint_query): Call it.
6783 (cmd_qtnotes): New function.
6784 (handle_tracepoint_general_set): Call it.
6785 (get_timestamp): Rename from tsv_get_timestamp.
6786
405f8e94
SS
67872011-11-14 Stan Shebs <stan@codesourcery.com>
6788 Kwok Cheung Yeung <kcy@codesourcery.com>
6789
6790 * linux-x86-low.c (small_jump_insn): New.
6791 (i386_install_fast_tracepoint_jump_pad): Add arguments for
6792 trampoline and error message, build a trampoline and issue a small
6793 jump instruction to it.
6794 (x86_install_fast_tracepoint_jump_pad): Add arguments for
6795 trampoline and error message.
6796 (x86_get_min_fast_tracepoint_insn_len): New.
6797 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
6798 * linux-low.h (struct linux_target_ops): Add arguments to
6799 install_fast_tracepoint_jump_pad operation, add new operation.
6800 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
6801 arguments.
6802 (linux_get_min_fast_tracepoint_insn_len): New function.
6803 (linux_target_op): Add new operation.
6804 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
6805 (gdb_trampoline_buffer_end): Ditto.
6806 (gdb_trampoline_buffer_error): Ditto.
6807 (struct ipa_sym_addresses): Add fields for new IPA variables.
6808 (symbol_list): Add entries for new IPA variables.
6809 (struct tracepoint): Add fields to hold the address range of the
6810 trampoline used by the tracepoint.
6811 (trampoline_buffer_head): New static variable.
6812 (trampoline_buffer_tail): Ditto.
6813 (claim_trampoline_space): New function.
6814 (have_fast_tracepoint_trampoline_buffer): New function.
6815 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
6816 structure.
6817 (install_fast_tracepoint): Ditto, also add error buffer argument.
6818 (cmd_qtminftpilen): New function.
6819 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
6820 (fast_tracepoint_from_trampoline_address): New function.
6821 (fast_tracepoint_collecting): Handle trampoline as part of jump
6822 pad space.
6823 (set_trampoline_buffer_space): New function.
6824 (initialize_tracepoint): Initialize new IPA variables.
6825 * target.h (struct target_ops): Add arguments to
6826 install_fast_tracepoint_jump_pad operation, add new
6827 get_min_fast_tracepoint_insn_len operation.
6828 (target_get_min_fast_tracepoint_insn_len): New.
6829 (install_fast_tracepoint_jump_pad): Add arguments.
6830 * server.h (IPA_BUFSIZ): Define.
6831 * linux-i386-ipa.c: Include extra header files.
6832 (initialize_fast_tracepoint_trampoline_buffer): New function.
6833 (initialize_low_tracepoint): Call it.
6834 * server.h (set_trampoline_buffer_space): Declare.
6835 (claim_trampoline_space): Ditto.
6836 (have_fast_tracepoint_trampoline_buffer): Ditto.
6837
1e4d1764
YQ
68382011-11-14 Yao Qi <yao@codesourcery.com>
6839
6840 * server.c (handle_query): Handle InstallInTrace for qSupported.
6841 * tracepoint.c (add_tracepoint): Sort list.
6842 (install_tracepoint, download_tracepoint): New.
6843 (cmd_qtdp): Call them to install and download tracepoints.
6844 (sort_tracepoints): Removed.
6845 (cmd_qtstart): Update.
6846
5c73ff4e
YQ
68472011-11-14 Yao Qi <yao@codesourcery.com>
6848
6849 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
6850 * mem-break.h: Declare.
6851 * tracepoint.c (cmd_qtstart): Move some code to ...
6852 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
6853 New.
6854 (download_tracepoints): Move some code to ...
6855 (download_tracepoint_1): ... here. New.
6856
86a30030
YQ
68572011-11-08 Yao Qi <yao@codesourcery.com>
6858
6859 * remote-utils.c (relocate_instruction): A comment fix.
6860
8d26e50c
JB
68612011-11-07 Joel Brobecker <brobecker@adacore.com>
6862
6863 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
6864 (i386_dr_low_get_control, i386_dr_low_get_status): Use
6865 dr_status_mirror and dr_control_mirror from debug_reg_state.
6866 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
6867 (i386_initial_stuff): Remove use of deleted globals.
6868 (i386_get_thread_context, i386_set_thread_context,
6869 i386_thread_added): Use dr_status_mirror and dr_control_mirror
6870 from debug_reg_state.
6871
a59306a3
YQ
68722011-11-05 Yao Qi <yao@codesourcery.com>
6873
6874 * tracepoint.c (gdb_collect): Loop over tracepoints of same
6875 address as TPOINT's.
6876
3065dfb6
SS
68772011-11-02 Stan Shebs <stan@codesourcery.com>
6878
6879 * tracepoint.c (agent_mem_read_string): New function.
6880 (eval_agent_expr): Call it for tracenz.
6881 * server.c (handle_query): Report support for tracenz.
6882
fd0d8c7c
YQ
68832011-11-02 Yao Qi <yao@codesourcery.com>
6884
6885 * tracepoint.c (cmd_qtstart): Remove unused local variables.
6886
609086b1
YQ
68872011-11-02 Yao Qi <yao@codesourcery.com>
6888
6889 * target.h: Fix a typo in comment.
6890
b9fd1791
PA
68912011-10-31 Pedro Alves <pedro@codesourcery.com>
6892
6893 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
6894 clobber the breakpoints' shadows with fast tracepoint jumps.
6895 * mem-break.h (check_mem_write): Add `myaddr' parameter.
6896 * target.c (write_inferior_memory): Also pass MYADDR down to
6897 check_mem_write.
6898
03583c20
UW
68992011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
6900
6901 * configure.ac: Check support for personality routine.
6902 * configure: Regenerate.
6903 * config.in: Likewise.
6904 * linux-low.c: Include <sys/personality.h>.
6905 Define ADDR_NO_RANDOMIZE if necessary.
6906 (linux_create_inferior): Disable address space randomization when
6907 forking inferior, if requested.
6908 (linux_supports_disable_randomization): New function.
6909 (linux_target_ops): Install it.
6910 * server.h (disable_randomization): Declare.
6911 * server.c (disable_randomization): New global variable.
6912 (handle_general_set): Handle QDisableRandomization.
6913 (handle_query): Likewise for qSupported.
6914 (main): Support --disable-randomization and --no-disable-randomization
6915 command line arguments.
6916 * target.h (struct target_ops): Add supports_disable_randomization.
6917 (target_supports_disable_randomization): New macro.
6918
723b724b
MF
69192011-09-29 Mike Frysinger <vapier@gentoo.org>
6920
6921 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
6922 ifdef check.
6923 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
6924 [!PT_GETDSBT] (target_loadmap): New definition.
6925 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
6926 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
6927 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
6928 and PT_GETDSBT to LINUX_LOADMAP.
6929 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
6930 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
6931
55329a5c 69322011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
6933
6934 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
6935 (arm_linux_hwbp_cap): New static variable.
6936 (arm_linux_get_hwbp_cap): Replace by ...
6937 (arm_linux_init_hwbp_cap): ... this new function.
6938 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
6939 (arm_linux_get_hw_watchpoint_count): Likewise.
6940 (arm_linux_get_hw_watchpoint_max_length): Likewise.
6941 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
6942 (arm_prepare_to_resume): Use perror_with_name instead of error.
6943
55329a5c 69442011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
6945
6946 * linux-arm-low.c: Include <signal.h>.
6947 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
6948 (struct arm_linux_hwbp_cap): New data type.
6949 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
6950 (struct arm_linux_hw_breakpoint): New data type.
6951 (MAX_BPTS, MAX_WPTS): Define.
6952 (struct arch_process_info, struct arch_lwp_info): New data types.
6953 (arm_linux_get_hwbp_cap): New function.
6954 (arm_linux_get_hw_breakpoint_count): Likewise.
6955 (arm_linux_get_hw_watchpoint_count): Likewise.
6956 (arm_linux_get_hw_watchpoint_max_length): Likewise.
6957 (arm_hwbp_control_initialize): Likewise.
6958 (arm_hwbp_control_is_enabled): Likewise.
6959 (arm_hwbp_control_is_initialized): Likewise.
6960 (arm_hwbp_control_disable): Likewise.
6961 (arm_linux_hw_breakpoint_equal): Likewise.
6962 (arm_linux_hw_point_initialize): Likewise.
6963 (struct update_registers_data): New data structure.
6964 (update_registers_callback: New function.
6965 (arm_insert_point): Likewise.
6966 (arm_remove_point): Likewise.
6967 (arm_stopped_by_watchpoint): Likewise.
6968 (arm_stopped_data_address): Likewise.
6969 (arm_new_process): Likewise.
6970 (arm_new_thread): Likewise.
6971 (arm_prepare_to_resume): Likewise.
6972 (the_low_target): Register arm_insert_point, arm_remove_point,
6973 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
6974 arm_new_thread, and arm_prepare_to_resume.
6975
6b9801d4
SS
69762011-09-15 Stan Shebs <stan@codesourcery.com>
6977
6978 * server.h (struct emit_ops): Add compare-goto fields.
6979 * tracepoint.c (gdb_agent_op_sizes): New table.
6980 (emit_eq_goto): New function.
6981 (emit_ne_goto): New function.
6982 (emit_lt_goto): New function.
6983 (emit_le_goto): New function.
6984 (emit_gt_goto): New function.
6985 (emit_ge_goto): New function.
6986 (is_goto_target): New function.
6987 (compile_bytecodes): Recognize special cases of compare-goto
6988 combinations and call specialized emitters for them.
6989 * linux-x86-low.c (amd64_emit_eq_goto): New function.
6990 (amd64_emit_ne_goto): New function.
6991 (amd64_emit_lt_goto): New function.
6992 (amd64_emit_le_goto): New function.
6993 (amd64_emit_gt_goto): New function.
6994 (amd64_emit_ge_goto): New function.
6995 (amd64_emit_ops): Add the new functions.
6996 (i386_emit_eq_goto): New function.
6997 (i386_emit_ne_goto): New function.
6998 (i386_emit_lt_goto): New function.
6999 (i386_emit_le_goto): New function.
7000 (i386_emit_gt_goto): New function.
7001 (i386_emit_ge_goto): New function.
7002 (i386_emit_ops): Add the new functions.
7003
bf15cbda
SS
70042011-09-08 Stan Shebs <stan@codesourcery.com>
7005
7006 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
7007 (i386_emit_epilogue): Restore %ebx.
7008
943ca1dd
JZ
70092011-08-31 Jie Zhang <jzhang918@gmail.com>
7010
7011 * server.c (step_thread): Remove definition.
7012 (process_serial_event): Don't handle Hs.
7013 * server.h (step_thread): Remove declaration.
7014 * target.c (set_desired_inferior): Remove use of step_thread.
7015
e3deef73
LM
70162011-08-24 Luis Machado <lgustavo@codesourcery.com>
7017
7018 * linux-low.c: Include linux-procfs.h.
7019 (linux_attach_lwp_1): Update comments.
7020 (linux_attach): Scan for existing threads when attaching to a
7021 process that is the tgid.
7022 * Makefile.in: Update dependencies.
7023
13da1c97
LM
70242011-08-24 Luis Machado <lgustavo@codesourcery.com>
7025
7026 * configure.srv: Add linux-procfs.o dependencies.
7027
881127c9
YQ
70282011-08-14 Yao Qi <yao@codesourcery.com>
7029
7030 * target.h (struct target_ops): Fix indent.
7031 * win32-low.c (win32_target_ops): Fix comment.
7032
58dbd541
YQ
70332011-08-14 Andrew Jenner <andrew@codesourcery.com>
7034 Yao Qi <yao@codesourcery.com>
7035
7036 * Makefile.in (clean): Remove tic6x-*.c files.
7037 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
7038 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
7039 (tic6x-c64xp-linux.c): Likewise.
7040 * configure.srv: Add support for tic6x-*-uclinux.
7041 * linux-tic6x-low.c: New.
7042 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
7043
78d85199
YQ
70442011-08-14 Andrew Stubbs <ams@codesourcery.com>
7045 Yao Qi <yao@codesourcery.com>
7046
7047 * target.h (struct target_ops): Add read_loadmap.
7048 * linux-low.c (struct target_loadseg): New type.
7049 (struct target_loadmap): New type.
7050 (linux_read_loadmap): New function.
7051 (linux_target_ops): Add linux_read_loadmap.
7052 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
7053 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
7054 to NULL.
78d85199 7055
a959a88d
EZ
70562011-08-05 Eli Zaretskii <eliz@gnu.org>
7057
7058 * win32-low.c: Include <stdint.h>.
7059
1ced966e
PA
70602011-07-22 Pedro Alves <pedro@codesourcery.com>
7061
7062 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
7063 to the inferior here.
7064 (i386_remove_aligned_watchpoint): Ditto.
7065 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
7066 fit part of the watchpoint in the debug registers.
7067 (i386_update_inferior_debug_regs): New.
7068 (i386_low_insert_watchpoint): Work on a local mirror of the debug
7069 registers, and only update the inferior on success.
7070 (i386_low_remove_watchpoint): Ditto.
7071
d26e3629
KY
70722011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
7073
7074 * linux-low.c (compare_ints, unique, list_threads, show_process,
7075 linux_core_of_thread): Delete.
7076 (linux_target_ops): Change linux_core_of_thread to
7077 linux_common_core_of_thread.
7078 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
7079 * utils.c (malloc_failure): Change type of argument.
7080 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
7081 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
7082 common/linux-osdata.c, common/ptid.c and common/buffer.c.
7083 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
7084 (IPA_OBJS): Add common-utils-ipa.o.
7085 (ptid_h, linux_osdata_h): New macros.
7086 (server_h): Add common/common-utils.h, common/xml-utils.h,
7087 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
7088 common/ptid.h.
7089 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
7090 ptid.o, buffer.o): New rules.
7091 (linux-low.o): Add common/linux-osdata.h as a dependency.
7092 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
7093 * configure.ac: Add AC_HEADER_DIRENT check.
7094 * config.in: Regenerate.
7095 * configure: Regenerate.
7096 * remote-utils.c (xml_escape_text): Delete.
7097 (buffer_grow, buffer_free, buffer_init, buffer_finish,
7098 buffer_xml_printf): Move to common/buffer.c.
7099 * server.c (main): Remove call to initialize_inferiors.
7100 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
7101 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
7102 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
7103 internal_error, gdb_assert, gdb_assert_fail): Delete.
7104 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
7105 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
7106 common/buffer.h.
7107 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
7108 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
7109 initialize_inferiors): Delete.
7110
2275a1a7
PA
71112011-07-20 Pedro Alves <pedro@codesourcery.com>
7112
7113 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
7114 symbol error.
7115
0a5b1e09
PA
71162011-05-31 Pedro Alves <pedro@codesourcery.com>
7117
7118 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
7119 assertion.
7120 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
7121
6938fd34
YQ
71222011-05-26 Yao Qi <yao@codesourcery.com>
7123
7124 * Makefile.in (thread-db.o): Track dependence to
7125 common/gdb_thread_db.h.
7126 * thread-db.c: include gdb_thread_db.h from right place.
7127
b481f9e0
TT
71282011-05-16 Adrian Cornish <gnu@bluedreamer.com>
7129
7130 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
7131 __FILE__ and __LINE__ to internal_error.
7132
98a5dd13
DE
71332011-05-13 Doug Evans <dje@google.com>
7134
7135 * thread-db.c (try_thread_db_load_from_sdir): New function.
7136 (try_thread_db_load_from_dir): New function.
7137 (thread_db_load_search): Handle $sdir, ignore $pdir.
7138 Remove trying of system directories if search of
7139 libthread-db-search-path fails, that is now done via $sdir.
7140
d248b706
KY
71412011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
7142
7143 * server.c (handle_query): Add EnableDisableTracepoints to the list
7144 of supported features.
43aaf8b6 7145 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 7146 tracepoints.
43aaf8b6
PA
7147 (cmd_qtenable_disable): New.
7148 (cmd_qtstart): Install tracepoints even if disabled.
7149 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
7150 receiving a QTEnable or QTDisable packet.
7151 (gdb_collect): Skip data collection if fast tracepoint is disabled.
7152 (ust_marker_to_static_tracepoint): Do not ignore disabled static
7153 tracepoints.
7154 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 7155
84e578fb
DE
71562011-05-10 Doug Evans <dje@google.com>
7157
7158 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
7159
71f55dd8
DE
71602011-05-04 Doug Evans <dje@google.com>
7161
7162 * linux-low.c (linux_join): Skip process lookup.
7163 * spu-low.c (spu_join): Ditto.
7164 * server.c (join_inferiors_callback): Delete.
7165 (process_serial_event): For 'D' packet (detach) call join_inferior
7166 directly.
7167
4d393d60
JM
71682011-05-04 Joseph Myers <joseph@codesourcery.com>
7169
7170 * README: Don't mention xscale*-*-linux*.
7171 * configure.srv (xscale*-*-linux*): Don't handle target.
7172
b00ad6ff
NF
71732011-04-27 Nathan Froyd <froydnj@codesourcery.com>
7174
7175 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
7176 casting pointers.
7177 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
7178 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
7179 (i386_emit_void_call_2): Likewise.
7180
af96c192
YQ
71812011-04-26 Yao Qi <yao@codesourcery.com>
7182
43aaf8b6
PA
7183 * linux-low.c: Move common macros to linux-ptrace.h.
7184 Include linux-ptrace.h.
af96c192
YQ
7185 * Makefile.in (linux_ptrace_h): New.
7186 (linux-low.o): Depends on linux-ptrace.h.
7187
03f2bd59
JK
71882011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
7189
7190 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
7191 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
7192 (remote_prepare): New function with most of the TCP code from ...
7193 (remote_open): ... here. Detect PORT here unconditionally. Move also
7194 setting transport_is_reliable.
7195 * server.c (run_once): New variable.
7196 (gdbserver_usage): Document it.
7197 (main): Set run_once for `--once'. Call remote_prepare. Exit after
7198 the first run if RUN_ONCE.
7199 * server.h (run_once, remote_prepare): New declarations.
7200
7a9dd1b2
TT
72012011-04-19 Tom Tromey <tromey@redhat.com>
7202
7203 * win32-low.c (handle_load_dll): Remove duplicate "the".
7204
81239425
PM
72052011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
7206
7207 Remove support for old Cygwin 1.5 versions.
7208 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
7209 function to avoid warning.
7210 (win32_add_one_solib): Use cygwin_conv_path function to avoid
7211 warning.
7212
9e0627f1
PM
72132011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
7214
7215 * gdbserver/server.h (Macro _): Define it if not available.
7216
588eebee
MS
72172011-03-14 Michael Snyder <msnyder@vmware.com>
7218
348af9f7 7219 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 7220
43f70d4c
JB
72212011-03-10 Joel Brobecker <brobecker@adacore.com>
7222
7223 * Makefile.in (maintainer-clean realclean distclean): Remove
7224 "make ... subdir_do" command.
7225
348af9f7
MS
72262011-03-10 Michael Snyder <msnyder@vmware.com>
7227
7228 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
7229
7230 * server.c (handle_v_run): Free alloced buffer on early return.
7231
e637a4f5
YQ
72322011-03-09 Yao Qi <yao@codesourcery.com>
7233
7234 Revert:
7235 2011-03-04 Yao Qi <yao@codesourcery.com>
7236
7237 * Makefile.in: Remove GNU make feature --directory.
7238
7239 2011-03-05 Yao Qi <yao@codesourcery.com>
7240
7241 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
7242 (subdir_do): New make target. Copied from gdb/Makefile.
7243 (maintainer-clean, realclean, distclean, clean): Call corresponding
7244 make targets in common/Makefile.
7245
7246 2011-02-11 Yao Qi <yao@codesourcery.com>
7247
7248 * configure.ac: Call AC_PROG_RANLIB.
7249 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
7250 * configure: Regenerate.
7251
e6edda56
JK
72522011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7253
7254 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
7255
e5141119
JB
72562011-03-06 Yao Qi <yao@codesourcery.com>
7257
7258 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
7259
64794aa4
JB
72602011-03-05 Yao Qi <yao@codesourcery.com>
7261
7262 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
7263 (subdir_do): New make target. Copied from gdb/Makefile.
7264 (maintainer-clean, realclean, distclean, clean): Call corresponding
7265 make targets in common/Makefile.
7266
7a762829
YQ
72672011-03-04 Yao Qi <yao@codesourcery.com>
7268
7269 * Makefile.in: Remove GNU make feature --directory.
7270
348af9f7
MS
72712011-03-04 Michael Snyder <msnyder@vmware.com>
7272
7273 * server.c (queue_stop_reply): Call xmalloc not malloc.
7274
72752011-03-02 Michael Snyder <msnyder@vmware.com>
7276
7277 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
7278
9f72fee2
MS
72792011-02-28 Michael Snyder <msnyder@vmware.com>
7280
588eebee
MS
7281 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
7282 (cmd_qtframe): Ditto.
7283 (cmd_qtbuffer): Ditto.
7284 (cmd_bigqtbuffer): Ditto.
7285
9f72fee2
MS
7286 * utils.c (decimal2str): Initialize 'width' to nine, then
7287 don't mess with it.
7288
8040bd49
UW
72892011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
7290
7291 * hostio.c (require_data): Free *data, not data.
7292
7e52cbd0
JK
72932011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7294
7295 * hostio.c (require_data): Use free, not xfree.
7296
9130f83e
MS
72972011-02-27 Michael Snyder <msnyder@vmware.com>
7298
4b812f4e
MS
7299 * server.c (handle_query): Discard unused value.
7300
9130f83e
MS
7301 * hostio.c (require_data): Free malloc memory before returning
7302 error.
7303
69d37113
MS
73042011-02-26 Michael Snyder <msnyder@vmware.com>
7305
7306 * linux-low.c (list_threads): Call closedir for dirent.
7307
35f5825a
MS
73082011-02-27 Michael Snyder <msnyder@vmware.com>
7309
2a589cef
MS
7310 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
7311 a case statement falls through.
7312
0adea5f7
MS
7313 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
7314
35f5825a
MS
7315 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
7316 in comparison.
7317
238f1c74
MS
73182011-02-26 Michael Snyder <msnyder@vmware.com>
7319
7320 * utils.c (decimal2str): Eliminate dead code and dead param.
7321 (pulongest): Drop dead param from call to decimal2str.
7322 (plongest): Ditto.
7323
633ff500
JB
73242011-02-24 Joel Brobecker <brobecker@adacore.com>
7325
7326 Revert the following patch (not approved yet):
7327 2011-02-21 Hui Zhu <teawater@gmail.com>
7328 * tracepoint.c (tp_printf): New function.
7329 (eval_agent_expr): Handle gdb_agent_op_printf.
7330
f9c6ff72
HZ
73312011-02-21 Hui Zhu <teawater@gmail.com>
7332
7333 * tracepoint.c (tp_printf): New function.
7334 (eval_agent_expr): Handle gdb_agent_op_printf.
7335
94d5e490
TT
73362011-02-18 Tom Tromey <tromey@redhat.com>
7337
7338 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
7339 (tracepoint.o): Likewise.
7340 * tracepoint.c (enum gdb_agent_op): Use ax.def.
7341 (gdb_agent_op_names): Likewise.
7342
c7f96d2b
TT
73432011-02-18 Tom Tromey <tromey@redhat.com>
7344
7345 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
7346 gdb_agent_op_rot>: New constants.
7347 (gdb_agent_op_names): Add pick and roll.
7348 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
7349 cases.
7350
0feedb2c
JK
73512011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
7352
7353 * aclocal.m4: Regenerated with aclocal-1.11.1.
7354
b3b9301e
PA
73552011-02-14 Pedro Alves <pedro@codesourcery.com>
7356
7357 * server.c (handle_qxfer_traceframe_info): New.
7358 (qxfer_packets): Register "traceframe-info".
7359 (handle_query): Report support for qXfer:traceframe-info:read+.
7360 * tracepoint.c (match_blocktype): New.
7361 (traceframe_find_block_type): Rename to ...
7362 (traceframe_walk_blocks): ... this. Add callback filter argument,
7363 and use it.
7364 (traceframe_find_block_type): New, reimplemented on top of
7365 traceframe_walk_blocks.
7366 (build_traceframe_info_xml): New.
7367 (traceframe_read_info): New.
7368 * server.h (traceframe_read_info): Declare.
7369
4f3e6fb7
YQ
73702011-02-11 Yao Qi <yao@codesourcery.com>
7371
7372 * configure.ac: Call AC_PROG_RANLIB.
7373 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
7374 * configure: Regenerate.
7375
764880b7
PA
73762011-02-07 Pedro Alves <pedro@codesourcery.com>
7377
7378 * server.c (gdb_read_memory): Change return semantics to allow
7379 partial transfers.
7380 (handle_search_memory_1): Adjust.
7381 (process_serial_event) <'m' packet>: Handle partial transfers.
7382 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
7383
1c79eb8a
PA
73842011-01-28 Pedro Alves <pedro@codesourcery.com>
7385
7386 * regcache.c (init_register_cache): Initialize
7387 regcache->register_status.
7388 (free_register_cache): Release regcache->register_status.
7389 (regcache_cpy): Copy register_status.
7390 (registers_to_string): Print 'x's for unavailable registers.
7391 (supply_register): Mark the register's status valid or
7392 unavailable, depending on whether a buffer was passed in or not.
7393 (supply_register_zeroed): New.
7394 (supply_regblock): Mark the registers' status valid or
7395 unavailable, depending on whether a buffer was passed in or not.
7396 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
7397 (struct regcache): New `register_status' field.
7398 (supply_register_zeroed): Declare.
7399 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
7400 supply_register_zeroed, rather than passing a NULL buffer to
7401 supply_register.
7402 * tracepoint.c (fetch_traceframe_registers): Update comment.
7403
85724a0e
PA
74042011-01-28 Pedro Alves <pedro@codesourcery.com>
7405
7406 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
7407 buffer explicit.
7408
d08aafef
PA
74092011-01-25 Pedro Alves <pedro@codesourcery.com>
7410
7411 * server.h (decode_xfer_write): Change prototype.
7412 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
7413 and don't extract the annex here.
7414 * server.c (decode_xfer_read): Remove `annex' parameter,
7415 and don't extract the annex here.
7416 (decode_xfer): New.
7417 (struct qxfer): New.
7418 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
7419 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
7420 (handle_qxfer_statictrace): New functions, abstracted out from
7421 handle_query, and made to use the struct qxfer interface.
7422 (handle_threads_qxfer_proper): Rename to ...
7423 (handle_qxfer_threads_proper): ... this.
7424 (handle_threads_qxfer): Rename to ...
7425 (handle_qxfer_threads): ... this. Adjust.
7426 (qxfer_packets): New array.
7427 (handle_qxfer): New function.
7428 (handle_query): Use handle_qxfer.
7429
493e2a69
MS
74302011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
7431
7432 * gdbreplay.c: Shorten lines of >= 80 columns.
7433 * linux-low.c: Ditto.
7434 * linux-ppc-low.c: Ditto.
7435 * linux-s390-low.c: Ditto.
7436 * linux-sparc-low.c: Ditto.
7437 * linux-x86-low.c: Ditto.
7438 * linux-xtensa-low.c: Ditto.
7439 * mem-break.c: Ditto.
7440 * nto-low.c: Ditto.
7441 * regcache.h: Ditto.
7442 * remote-utils.c: Ditto.
7443 * server.c: Ditto.
7444 * server.h: Ditto.
7445 * thread-db.c: Ditto.
7446 * tracepoint.c: Ditto.
7447 * utils.c: Ditto.
7448 * win32-low.h: Ditto.
7449
44944448
JB
74502011-01-05 Joel Brobecker <brobecker@adacore.com>
7451
7452 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
7453 update.
7454
71ce852c
JB
74552011-01-01 Joel Brobecker <brobecker@adacore.com>
7456
7457 * server.c (gdbserver_version): Update copyright year in version
7458 output.
7459 * gdbreplay.c (gdbreplay_version): Ditto.
7460
eb826dc6
MF
74612010-12-29 Jie Zhang <jie.zhang@analog.com>
7462
7463 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
7464 * linux-bfin-low.c: New file.
7465 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
7466 PT_DATA_ADDR for BFIN targets.
7467 * Makefile.in (SFILES): Add linux-bfin-low.c.
7468 (clean): Remove reg-bfin.c.
7469 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
7470 * README: Mention supported Blackfin targets.
7471
39ab222a
MF
74722010-12-23 Mike Frysinger <vapier@gentoo.org>
7473
7474 * .gitignore: New file.
7475
a1f2ce7d
MF
74762010-11-16 Mike Frysinger <vapier@gentoo.org>
7477
7478 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
7479
f474844c
JZ
74802010-10-22 Jie Zhang <jie@codesourcery.com>
7481
7482 * Makefile.in: Add FLAGS_TO_PASS variable.
7483 (install): Remove dependency of install-only and recursively
7484 invoke make for install-only.
7485
f1048712
DE
74862010-10-04 Doug Evans <dje@google.com>
7487
7488 * Makefile.in (uninstall): Use $(DESTDIR).
7489
b53a1623
PA
74902010-09-24 Pedro Alves <pedro@codesourcery.com>
7491
e6ee044d
PA
7492 PR gdb/11842
7493
b53a1623
PA
7494 * linux-x86-low.c (compat_siginfo_from_siginfo)
7495 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
7496 si_code is < 0. Check for si_code == SI_TIMER before checking for
7497 si_code < 0.
7498
fa1bd1e4
JB
74992010-09-13 Joel Brobecker <brobecker@adacore.com>
7500
7501 * lynx-i386-low.c: New file.
7502 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
7503
47fac8f8
JB
75042010-09-13 Joel Brobecker <brobecker@adacore.com>
7505
7506 * lynx-low.c (ptrace_request_to_str): Remove handling for
7507 request values that have been removed in LynxOS 5.x.
7508
1adfc54d
JB
75092010-09-13 Joel Brobecker <brobecker@adacore.com>
7510
7511 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
7512 <ptrace.h>
7513
c2a66c29
NS
75142010-09-09 Nathan Sidwell <nathan@codesourcery.com>
7515
7516 * configure.ac: Add --enable-inprocess-agent option.
7517 * configure: Rebuilt.
7518
32fcada3
YQ
75192010-09-06 Yao Qi <yao@codesourcery.com>
7520
7521 * linux-low.c (linux_kill): Remove unused variable.
7522 (linux_stabilize_threads): Likewise.
7523 * server.c (start_inferior): Likewise.
7524 (queue_stop_reply_callback): Likewise.
7525 * tracepoint.c (do_action_at_tracepoint): Likewise.
7526
0cccb683
YQ
75272010-09-06 Yao Qi <yao@codesourcery.com>
7528
7529 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
7530 on return.
7531
423ec54c
JK
75322010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
7533
7534 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
7535
12ac6819
PA
75362010-09-06 Pedro Alves <pedro@codesourcery.com>
7537
7538 * Makefile.in (install-only): Replace $IPA_DEPFILES with
7539 "$(IPA_DEPFILES)".
7540
8ed54b31
JB
75412010-09-01 Joel Brobecker <brobecker@adacore.com>
7542
7543 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
7544 gdbserver/lynx-ppc-low.c: New files.
7545 * Makefile.in (lynx_low_h): New variable.
7546 (lynx-low.o, lynx-ppc-low.o): New rules.
7547 * configure.ac: On LynxOS, link with -lnetinet.
7548 * configure.srv: Add handling of powerpc-*-lynxos* targets.
7549 * configure: regenerate.
7550
bb0116a4
JB
75512010-09-01 Joel Brobecker <brobecker@adacore.com>
7552
7553 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
7554 * configure.ac: Add check for vasprintf and vsnprintf.
7555 * configure, config.in: Regenerate.
7556 * server.h (vasprintf, vsnprintf): Add conditional declarations.
7557
a778ab81 75582010-09-01 Joel Brobecker <brobecker@adacore.com>
7559
7560 * gdbreplay.c: Move include of alloca.h up, next to include of
7561 malloc.h.
7562 * server.h: Add include of malloc.h.
7563 * mem-break.c: Remove include of malloc.h.
7564 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
7565
8b034a19 75662010-09-01 Joel Brobecker <brobecker@adacore.com>
7567
7568 * Makefile.in (memmem.o): Build with -Wno-error.
7569
75702010-09-01 Joel Brobecker <brobecker@adacore.com>
7571
7572 * utils.c (xsnprintf): Make non-static.
7573 * server.h: Add xsnprintf declaration.
7574 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
7575 replace calls to snprintf by calls to xsnprintf throughout.
7576
75772010-09-01 Joel Brobecker <brobecker@adacore.com>
7578
7579 * configure.ac: Add configure check for alloca.
7580 * configure, config.in: Regenerate.
7581 * server.h: Include alloca.h if it exists.
7582 * gdbreplay.c: Include alloca.h if it exists.
7583
1a981360
PA
75842010-08-28 Pedro Alves <pedro@codesourcery.com>
7585
7586 * linux-low.c (__SIGRTMIN): Define if not already defined.
7587 (linux_create_inferior): Check for __ANDROID__ rather than
7588 __SIGRTMIN.
7589 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
7590 are already deferred.
7591 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
7592 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
7593 stopped and already has a pending signal to report.
7594 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
7595 a pending signal to report or is moving out of a jump pad.
7596 (linux_init_signals): Check for __ANDROID__ rather than
7597 __SIGRTMIN.
7598
b4d51a55
PA
75992010-08-28 Pedro Alves <pedro@codesourcery.com>
7600
7601 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
7602 debug_threads check. Avoid a linear search when not doing debug
7603 output.
7604
ec48365d
PA
76052010-08-27 Pedro Alves <pedro@codesourcery.com>
7606
7607 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
7608 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
7609 (struct file_handler) <fd>: Change type to gdb_fildes_t.
7610 (process_event): Change local fd's type to gdb_fildes_t.
7611 (create_file_handler): Adjust prototype.
7612 (delete_file_handler): Adjust prototype.
7613 (handle_file_event): Adjust prototype. Use pfildes.
7614 (create_file_event): Adjsut prototype.
7615 * remote-utils.c (remote_desc, listen_desc): Change type to
7616 gdb_fildes_t.
7617 * server.h: New gdb_fildes_t typedef.
7618 [USE_WIN32API]: Include winsock2.h.
7619 (delete_file_handler, add_file_handler): Adjust prototypes.
7620 (pfildes): Declare.
7621 * utils.c (pfildes): New.
7622
854d88f0
PA
76232010-08-27 Pedro Alves <pedro@codesourcery.com>
7624
7625 * configure.ac (build_warnings): Add -Wno-char-subscripts.
7626 * configure: Regenerate.
7627
0146f85b
PA
76282010-08-27 Pedro Alves <pedro@codesourcery.com>
7629
7630 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
7631 (linux_done_accessing_memory): ... this.
7632 (linux_target_ops): Adjust.
7633 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
7634 * nto-low.c (nto_target_ops): Adjust comment.
7635 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
7636 * spu-low.c (spu_target_ops): Adjust comment.
7637 * target.h (target_ops): Rename unprepare_to_access_memory field
7638 to done_accessing_memory.
7639 (unprepare_to_access_memory): Rename to ...
7640 (done_accessing_memory): ... this.
7641
90d74c30
PA
76422010-08-26 Pedro Alves <pedro@codesourcery.com>
7643
7644 * linux-low.c (linux_prepare_to_access_memory): New.
7645 (linux_unprepare_to_access_memory): New.
7646 (linux_target_ops): Install them.
7647 * server.c (read_memory): Rename to ...
7648 (gdb_read_memory): ... this. Use
7649 prepare_to_access_memory/prepare_to_access_memory.
7650 (write_memory): Rename to ...
7651 (gdb_write_memory): ... this. Use
7652 prepare_to_access_memory/prepare_to_access_memory.
7653 (handle_search_memory_1): Adjust.
7654 (process_serial_event): Adjust.
7655 * target.h (struct target_ops): New fields
7656 prepare_to_access_memory and unprepare_to_access_memory.
7657 (prepare_to_access_memory, unprepare_to_access_memory): New.
7658 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
7659 prepare_to_access_memory/prepare_to_access_memory.
7660 * nto-low.c (nto_target_ops): Adjust.
7661 * spu-low.c (spu_target_ops): Adjust.
7662 * win32-low.c (win32_target_ops): Adjust.
7663
fd467969
PA
76642010-08-26 Pedro Alves <pedro@codesourcery.com>
7665
7666 * Makefile.in (WARN_CFLAGS): Get it from configure.
7667 (WERROR_CFLAGS): New.
7668 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
7669 * configure.ac: Introduce --enable-werror, which adds -Werror to
7670 the compiler command line. Enabled by default. Disable with
7671 --disable-werror. Add -Wdeclaration-after-statement
7672 Wpointer-arith and -Wformat-nonliteral to warning flags.
7673 * configure: Regenerate.
7674
331e2f5f
PA
76752010-08-26 Pedro Alves <pedro@codesourcery.com>
7676
7677 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
7678
e581f2b4
PA
76792010-08-26 Pedro Alves <pedro@codesourcery.com>
7680
7681 * gdbreplay.c (remote_error): New.
7682 (gdbchar): New.
7683 (expect): Use gdbchar. Check for error reading from GDB.
7684 Clarify sync error output.
7685 (play): Check for errors writing to GDB.
7686 * linux-low.c (sigchld_handler): Really ignore `write' errors.
7687 * remote-utils.c (getpkt): Check for errors writing to the remote
7688 descriptor.
7689
3c11dd79
PA
76902010-08-25 Pedro Alves <pedro@codesourcery.com>
7691
7692 * linux-low.c (linux_wait_1): Move non-debugging code out of
7693 `debug_threads' control.
7694
d20a8ad9
PA
76952010-08-25 Pedro Alves <pedro@codesourcery.com>
7696
7697 * linux-low.c (linux_wait_1): Don't set last_status here.
7698 * server.c (push_event, queue_stop_reply_callback): Assert we're
7699 not pushing a TARGET_WAITKIND_IGNORE event.
7700 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
7701 (myresume, handle_target_event): Set the thread's last_resume_kind
7702 and last_status from the target returned status.
7703
964e4306
PA
77042010-08-25 Pedro Alves <pedro@codesourcery.com>
7705
7706 PR threads/10729
7707
7708 * linux-x86-low.c (update_debug_registers_callback): New.
7709 (i386_dr_low_set_addr): Use it.
7710 (i386_dr_low_get_addr): New.
7711 (i386_dr_low_set_control): Use update_debug_registers_callback.
7712 (i386_dr_low_get_control): New.
7713 (i386_dr_low_get_status): Adjust.
7714 * linux-low.c (linux_stop_lwp): New.
7715 * linux-low.h (linux_stop_lwp): Declare.
7716
7717 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
7718 argument instead of a i386_debug_reg_state.
7719 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
7720 a i386_debug_reg_state.
7721 (i386_insert_aligned_watchpoint): Adjust.
7722 (i386_remove_aligned_watchpoint): Adjust.
7723 (i386_low_stopped_data_address): Read the debug registers from the
7724 inferior instead of from the mirrors.
7725 * i386-low.h (struct i386_debug_reg_state): Extend comment.
7726 (i386_dr_low_get_addr): Declare.
7727 (i386_dr_low_get_control): Declare.
7728 (i386_dr_low_get_status): Change prototype.
7729
7730 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
7731 (i386_dr_low_get_addr): New.
7732 (i386_dr_low_get_control): New.
7733 (i386_dr_low_get_status): Adjust prototype. Return
7734 dr_status_mirror.
7735 (i386_initial_stuff): Clear dr_status_mirror and
7736 dr_control_mirror.
7737 (i386_get_thread_context): Adjust.
7738 (i386_set_thread_context): Adjust.
7739 (i386_thread_added): Adjust.
7740
5f21a75b
PA
77412010-08-24 Pedro Alves <pedro@codesourcery.com>
7742
7743 * linux-low.h (linux_thread_area): Delete declaration.
7744
3e4c1235
TS
77452010-08-11 Thomas Schwinge <thomas@codesourcery.com>
7746
7747 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
7748 after its termination.
7749
1971b033
PA
77502010-08-09 Pedro Alves <pedro@codesourcery.com>
7751
7752 * linux-low.c (gdb_wants_lwp_stopped): Delete.
7753 (gdb_wants_all_stopped): Delete.
7754 (linux_wait_1): Don't call them.
7755 * server.c (handle_v_cont): Tag all threads as want-stopped.
7756 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
7757 stopped as "client-wants-stopped".
7758
310444ac
PA
77592010-07-31 Pedro Alves <pedro@codesourcery.com>
7760
7761 * Makefile.in (signals_h): New.
7762 (server_h): Depend on it.
7763 (server.o): Don't depend on $(signals_def).
7764 (signals.o): Depend on $(signals_def).
7765
a19cae16
JK
77662010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
7767
7768 * Makefile.in (signals_def): New.
7769 (server_h): Append include/gdb/signals.h and signals_def.
7770 (server.o): Append signals_def.
7771
30d50328
JK
77722010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
7773
7774 * server.c (handle_target_event): Use target_signal_to_host for
7775 resume_info.sig initialization.
7776 * target.h (struct thread_resume) <sig>: New comment.
7777
5c3216e2
OS
77782010-07-20 Ozkan Sezer <sezeroz@gmail.com>
7779
c6f46ca0
OS
7780 * server.c (handle_query): strcpy() the returned string from paddress()
7781 instead of sprintf().
5c3216e2
OS
7782 * utils.c (paddress): Return phex_nz().
7783
6bd31874
JB
77842010-07-07 Joel Brobecker <brobecker@adacore.com>
7785
7786 * server.c (handle_v_cont): Call mourn_inferior if process
7787 just exited.
7788 (myresume): Likewise.
7789
0fb4aa4b
PA
77902010-07-01 Pedro Alves <pedro@codesourcery.com>
7791
7792 Static tracepoints, and integration with UST.
7793
7794 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
7795 * mem-break.c (uninsert_all_breakpoints)
7796 (reinsert_all_breakpoints): New.
7797 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
7798 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
7799 (gdb_agent_ust_loaded, helper_thread_id)
7800 (gdb_agent_helper_thread_id): New macros.
7801 (struct ipa_sym_addresses): Add addr_ust_loaded,
7802 addr_helper_thread_id, addr_cmd_buf.
7803 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
7804 (in_process_agent_loaded_ust): New.
7805 (write_e_ust_not_loaded): New.
7806 (maybe_write_ipa_ust_not_loaded): New.
7807 (struct collect_static_trace_data_action): New.
7808 (enum tracepoint_type) <static_tracepoint>: New.
7809 (struct tracepoint) <handle>: Mention static tracepoints.
7810 (struct static_tracepoint_ctx): New.
7811 (CMD_BUF_SIZE): New.
7812 (add_tracepoint_action): Handle static tracepoint actions.
7813 (unprobe_marker_at): New.
7814 (clear_installed_tracepoints): Handle static tracepoints.
7815 (cmd_qtdp): Handle static tracepoints.
7816 (probe_marker_at): New.
7817 (cmd_qtstart): Handle static tracepoints.
7818 (response_tracepoint): Handle static tracepoints.
7819 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
7820 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
7821 (get_context_regcache): Handle static tracepoints.
7822 (do_action_at_tracepoint): Handle static tracepoint actions.
7823 (traceframe_find_block_type): Handle static trace data blocks.
7824 (traceframe_read_sdata): New.
7825 (download_tracepoints): Download static tracepoint actions.
7826 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
7827 (GDB_PROBE_NAME): New.
7828 (ust_ops): New.
7829 (GET_UST_SYM): New.
7830 (USTF): New.
7831 (dlsym_ust): New.
7832 (ust_marker_to_static_tracepoint): New.
7833 (gdb_probe): New.
7834 (collect_ust_data_at_tracepoint): New.
7835 (gdb_ust_probe): New.
7836 (UNIX_PATH_MAX, SOCK_DIR): New.
7837 (gdb_ust_connect_sync_socket): New.
7838 (resume_thread, stop_thread): New.
7839 (run_inferior_command): New.
7840 (init_named_socket): New.
7841 (gdb_ust_socket_init): New.
7842 (cstr_to_hexstr): New.
7843 (next_st): New.
7844 (first_marker, next_marker): New.
7845 (response_ust_marker): New.
7846 (cmd_qtfstm, cmd_qtsstm): New.
7847 (unprobe_marker_at, probe_marker_at): New.
7848 (cmd_qtstmat, gdb_ust_thread): New.
7849 (gdb_ust_init): New.
7850 (initialize_tracepoint_ftlib): Call gdb_ust_init.
7851 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
7852 (ST_REGENTRY): New.
7853 (x86_64_st_collect_regmap): New.
7854 (X86_64_NUM_ST_COLLECT_GREGS): New.
7855 (AMD64_RIP_REGNUM): New.
7856 (supply_static_tracepoint_registers): New.
7857 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
7858 (ST_REGENTRY): New.
7859 (i386_st_collect_regmap): New.
7860 (i386_NUM_ST_COLLECT_GREGS): New.
7861 (supply_static_tracepoint_registers): New.
7862 * server.c (handle_query): Handle qXfer:statictrace:read.
7863 <qSupported>: Report support for StaticTracepoints, and
7864 qXfer:statictrace:read features.
7865 * server.h (traceframe_read_sdata)
7866 (supply_static_tracepoint_registers): Declare.
7867 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
7868 (unpack_varlen_hex): Include in IPA build.
7869 * Makefile.in (ustlibs, ustinc): New.
7870 (IPA_OBJS): Add remote-utils-ipa.o.
7871 ($(IPA_LIB)): Link -ldl and -lpthread.
7872 (UST_CFLAGS): New.
7873 (IPAGENT_CFLAGS): Add UST_CFLAGS.
7874 * config.in, configure: Regenerate.
7875
9e4344e5
PA
78762010-06-20 Ian Lance Taylor <iant@google.com>
7877 Pedro Alves <pedro@codesourcery.com>
7878
7879 * linux-x86-low.c (always_true): Delete.
7880 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
7881 trying to fool the compiler with always_true.
7882
c6beb2cb
PA
78832010-06-20 Pedro Alves <pedro@codesourcery.com>
7884
7885 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
7886 conditions in gdbserver.
7887
d2ed6730
UW
78882010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
7889
7890 * spu-low.c (spu_read_memory): Wrap around local store limit.
7891 (spu_write_memory): Likewise.
7892
4e29fb54
PA
78932010-06-15 Pedro Alves <pedro@codesourcery.com>
7894
7895 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
7896 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
7897 LONGEST uses.
7898 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
7899 uses.
7900 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
7901 uses with LONGEST uses.
7902
6a271cae
PA
79032010-06-14 Stan Shebs <stan@codesourcery.com>
7904 Pedro Alves <pedro@codesourcery.com>
7905
7906 Bytecode compiler.
7907
7908 * linux-x86-low.c: Include limits.h.
7909 (add_insns): New.
7910 (always_true): New.
7911 (EMIT_ASM): New.
7912 (EMIT_ASM32): New.
7913 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
7914 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
7915 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
7916 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
7917 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
7918 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
7919 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
7920 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
7921 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
7922 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
7923 (amd64_emit_void_call_2): New.
7924 (amd64_emit_ops): New.
7925 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
7926 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
7927 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
7928 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
7929 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
7930 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
7931 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
7932 (i386_emit_call, i386_emit_reg, i386_emit_pop)
7933 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
7934 (i386_emit_stack_adjust, i386_emit_int_call_1)
7935 (i386_emit_void_call_2): New.
7936 (i386_emit_ops): New.
7937 (x86_emit_ops): New.
7938 (the_low_target): Install x86_emit_ops.
7939 * server.h (struct emit_ops): New.
7940 (get_raw_reg_func_addr): Declare.
7941 (current_insn_ptr, emit_error): Declare.
7942 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
7943 (set_trace_state_variable_value): New defines.
7944 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
7945 addr_get_trace_state_variable_value and
7946 addr_set_trace_state_variable_value.
7947 (symbol_list): New fields for get_raw_reg,
7948 get_trace_state_variable_value and set_trace_state_variable_value.
7949 (condfn): New typedef.
7950 (struct tracepoint): New field `compiled_cond'.
7951 (do_action_at_tracepoint): Clear compiled_cond.
7952 (get_trace_state_variable_value, set_trace_state_variable_value):
7953 Export in the IPA.
7954 (condition_true_at_tracepoint): If there's a compiled condition,
7955 run that.
7956 (current_insn_ptr, emit_error): New globals.
7957 (struct bytecode_address): New.
7958 (get_raw_reg_func_addr): New.
7959 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
7960 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
7961 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
7962 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
7963 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
7964 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
7965 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
7966 (compile_tracepoint_condition, compile_bytecodes): New.
7967 * target.h (emit_ops): Forward declare.
7968 (struct target_ops): New field emit_ops.
7969 (target_emit_ops): New.
7970 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
7971 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
7972 * linux-low.c (linux_emit_ops): New.
7973 (linux_target_ops): Install it.
7974 * linux-low.h (struct linux_target_ops): New field emit_ops.
7975
92b72907
UW
79762010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
7977
7978 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
7979 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
7980
fa593d66
PA
79812010-06-01 Pedro Alves <pedro@codesourcery.com>
7982 Stan Shebs <stan@codesourcery.com>
7983
7984 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
7985 (all): Depend on $(extra_libraries).
7986 (install-only): Install the IPA.
7987 (IPA_OBJS, IPA_LIB): New.
7988 (clean): Remove the IPA lib.
7989 (IPAGENT_CFLAGS): New.
7990 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
7991 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
7992 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
7993 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
7994 * configure.ac: Check for atomic builtins support in the compiler.
7995 (IPA_DEPFILES, extra_libraries): Define.
7996 * configure.srv (ipa_obj): Add description.
7997 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
7998 (i[34567]86-*-linux*): Set ipa_obj.
7999 (x86_64-*-linux*): Set ipa_obj.
8000 * linux-low.c (stabilizing_threads): New.
8001 (supports_fast_tracepoints): New.
8002 (linux_detach): Stabilize threads before detaching.
8003 (handle_tracepoints): Handle internal tracing breakpoints. Assert
8004 the lwp is either not stabilizing, or is moving out of a jump pad.
8005 (linux_fast_tracepoint_collecting): New.
8006 (maybe_move_out_of_jump_pad): New.
8007 (enqueue_one_deferred_signal): New.
8008 (dequeue_one_deferred_signal): New.
8009 (linux_wait_for_event_1): If moving out of a jump pad, defer
8010 pending signals to later.
8011 (linux_stabilize_threads): New.
8012 (linux_wait_1): Check if threads need moving out of jump pads, and
8013 do it if so.
8014 (stuck_in_jump_pad_callback): New.
8015 (move_out_of_jump_pad_callback): New.
8016 (lwp_running): New.
8017 (linux_resume_one_lwp): Handle moving out of jump pads.
8018 (linux_set_resume_request): Dequeue deferred signals.
8019 (need_step_over_p): Also step over fast tracepoint jumps.
8020 (start_step_over): Also uninsert fast tracepoint jumps.
8021 (finish_step_over): Also reinsert fast tracepoint jumps.
8022 (linux_install_fast_tracepoint_jump): New.
8023 (linux_target_ops): Install linux_stabilize_threads and
8024 linux_install_fast_tracepoint_jump_pad.
8025 * linux-low.h (linux_target_ops) <get_thread_area,
8026 install_fast_tracepoint_jump_pad>: New fields.
8027 (struct lwp_info) <collecting_fast_tracepoint,
8028 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
8029 (linux_get_thread_area): Declare.
8030 * linux-x86-low.c (jump_insn): New.
8031 (x86_get_thread_area): New.
8032 (append_insns): New.
8033 (push_opcode): New.
8034 (amd64_install_fast_tracepoint_jump_pad): New.
8035 (i386_install_fast_tracepoint_jump_pad): New.
8036 (x86_install_fast_tracepoint_jump_pad): New.
8037 (the_low_target): Install x86_get_thread_area and
8038 x86_install_fast_tracepoint_jump_pad.
8039 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
8040 (struct fast_tracepoint_jump): New.
8041 (fast_tracepoint_jump_insn): New.
8042 (fast_tracepoint_jump_shadow): New.
8043 (find_fast_tracepoint_jump_at): New.
8044 (fast_tracepoint_jump_here): New.
8045 (delete_fast_tracepoint_jump): New.
8046 (set_fast_tracepoint_jump): New.
8047 (uninsert_fast_tracepoint_jumps_at): New.
8048 (reinsert_fast_tracepoint_jumps_at): New.
8049 (set_breakpoint_at): Use write_inferior_memory.
8050 (uninsert_raw_breakpoint): Use write_inferior_memory.
8051 (check_mem_read): Mask out fast tracepoint jumps.
8052 (check_mem_write): Mask out fast tracepoint jumps.
8053 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
8054 (set_fast_tracepoint_jump): Declare.
8055 (delete_fast_tracepoint_jump)
8056 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
8057 (reinsert_fast_tracepoint_jumps_at): Declare.
8058 * regcache.c: Don't compile many functions when building the
8059 in-process agent library.
8060 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
8061 the register buffer in the heap.
8062 (free_register_cache): If the register buffer isn't owned by the
8063 regcache, don't free it.
8064 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
8065 pre-existing register caches.
8066 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
8067 type.
8068 (convert_ascii_to_int): : Constify `from' parameter type.
8069 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
8070 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
8071 the needed buffer in-place.
8072 (relocate_instruction): New.
8073 * server.c (handle_query) <qSymbols>: If the target supports
8074 tracepoints, give it a chance of looking up symbols. Report
8075 support for fast tracepoints.
8076 (handle_status): Stabilize threads.
8077 (process_serial_event): Adjust.
8078 * server.h (struct fast_tracepoint_jump): Forward declare.
8079 (struct process_info) <fast_tracepoint_jumps>: New field.
8080 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
8081 (decode_X_packet, decode_M_packet): Adjust.
8082 (relocate_instruction): Declare.
8083 (in_process_agent_loaded): Declare.
8084 (tracepoint_look_up_symbols): Declare.
8085 (struct fast_tpoint_collect_status): Declare.
8086 (fast_tracepoint_collecting): Declare.
8087 (force_unlock_trace_buffer): Declare.
8088 (handle_tracepoint_bkpts): Declare.
8089 (initialize_low_tracepoint)
8090 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
8091 * target.h (struct target_ops) <stabilize_threads,
8092 install_fast_tracepoint_jump_pad>: New fields.
8093 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
8094 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
8095 [HAVE_STDINT_H]: Include stdint.h.
8096 (trace_debug_1): Rename to ...
8097 (trace_vdebug): ... this.
8098 (trace_debug): Rename to ...
8099 (trace_debug_1): ... this. Add `level' parameter.
8100 (trace_debug): New.
8101 (ATTR_USED, ATTR_NOINLINE): New.
8102 (IP_AGENT_EXPORT): New.
8103 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
8104 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
8105 (about_to_request_buffer_space, trace_buffer_is_full)
8106 (stopping_tracepoint, expr_eval_result, error_tracepoint)
8107 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
8108 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
8109 (traceframe_write_count, traceframes_created)
8110 (trace_state_variables)
8111 New renaming defines.
8112 (struct ipa_sym_addresses): New.
8113 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
8114 (symbol_list): New.
8115 (ipa_sym_addrs): New.
8116 (all_tracepoint_symbols_looked_up): New.
8117 (in_process_agent_loaded): New.
8118 (write_e_ipa_not_loaded): New.
8119 (maybe_write_ipa_not_loaded): New.
8120 (tracepoint_look_up_symbols): New.
8121 (debug_threads) [IN_PROCESS_AGENT]: New.
8122 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
8123 (UNKNOWN_SIDE_EFFECTS): New.
8124 (stop_tracing): New.
8125 (flush_trace_buffer): New.
8126 (stop_tracing_bkpt): New.
8127 (flush_trace_buffer_bkpt): New.
8128 (read_inferior_integer): New.
8129 (read_inferior_uinteger): New.
8130 (read_inferior_data_pointer): New.
8131 (write_inferior_data_pointer): New.
8132 (write_inferior_integer): New.
8133 (write_inferior_uinteger): New.
8134 (struct collect_static_trace_data_action): Delete.
8135 (enum tracepoint_type): New.
8136 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
8137 <actions_str, step_actions, step_actions_str>: Only include in
8138 GDBserver.
fa593d66
PA
8139 <orig_size, obj_addr_on_target, adjusted_insn_addr>
8140 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
8141 (tracepoints): Use IP_AGENT_EXPORT.
8142 (last_tracepoint): Don't include in the IPA.
8143 (stopping_tracepoint): Use IP_AGENT_EXPORT.
8144 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
8145 (alloced_trace_state_variables): New.
8146 (trace_state_variables): Use IP_AGENT_EXPORT.
8147 (traceframe_t): Delete unused variable.
8148 (circular_trace_buffer): Don't include in the IPA.
8149 (trace_buffer_start): Delete.
8150 (struct trace_buffer_control): New.
8151 (trace_buffer_free): Delete.
8152 (struct ipa_trace_buffer_control): New.
8153 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
8154 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
8155 New.
8156 (trace_buffer_ctrl): New.
8157 (TRACE_BUFFER_CTRL_CURR): New.
8158 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
8159 Reimplement as macros.
8160 (trace_buffer_wrap): Delete.
8161 (traceframe_write_count, traceframe_read_count)
8162 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
8163 (struct tracepoint_hit_ctx) <type>: New field.
8164 (struct fast_tracepoint_ctx): New.
8165 (memory_barrier): New.
8166 (cmpxchg): New.
8167 (record_tracepoint_error): Update atomically in the IPA.
8168 (clear_inferior_trace_buffer): New.
8169 (about_to_request_buffer_space): New.
8170 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
8171 updating the same buffer.
8172 (add_tracepoint): Default the tracepoint's type to trap
8173 tracepoint, and orig_size to -1.
8174 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
8175 internal variables.
8176 (create_trace_state_variable): New parameter `gdb'. Handle it.
8177 (clear_installed_tracepoints): Clear fast tracepoint jumps.
8178 (cmd_qtdp): Handle fast tracepoints.
8179 (cmd_qtdv): Adjust.
8180 (max_jump_pad_size): New.
8181 (gdb_jump_pad_head): New.
8182 (get_jump_space_head): New.
8183 (claim_jump_space): New.
8184 (sort_tracepoints): New.
8185 (MAX_JUMP_SIZE): New.
8186 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
8187 IPA.
8188 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
8189 support. Upload fast traceframes, and delete internal IPA
8190 breakpoints.
8191 (stop_tracing_handler): New.
8192 (flush_trace_buffer_handler): New.
8193 (cmd_qtstop): Upload fast tracepoints.
8194 (response_tracepoint): Handle fast tracepoints.
8195 (tracepoint_finished_step): Upload fast traceframes. Set the
8196 tracepoint hit context's tracepoint type.
8197 (handle_tracepoint_bkpts): New.
8198 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
8199 type. Add comment about fast tracepoints.
8200 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
8201 non-existing action_str field.
8202 (get_context_regcache): Handle fast tracepoints.
8203 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
8204 to the regcache.
8205 (fast_tracepoint_from_jump_pad_address): New.
8206 (fast_tracepoint_from_ipa_tpoint_address): New.
8207 (collecting_t): New.
8208 (force_unlock_trace_buffer): New.
8209 (fast_tracepoint_collecting): New.
8210 (collecting): New.
8211 (gdb_collect): New.
8212 (write_inferior_data_ptr): New.
8213 (target_tp_heap): New.
8214 (target_malloc): New.
8215 (download_agent_expr): New.
8216 (UALIGN): New.
8217 (download_tracepoints): New.
8218 (download_trace_state_variables): New.
8219 (upload_fast_traceframes): New.
8220 (IPA_FIRST_TRACEFRAME): New.
8221 (IPA_NEXT_TRACEFRAME_1): New.
8222 (IPA_NEXT_TRACEFRAME): New.
8223 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
8224 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
8225 (gdb_jump_pad_buffer_end): New.
8226 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
8227 (initialize_tracepoint): Adjust.
8228 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
8229 buffer. Initialize the low module.
8230 * utils.c (PREFIX, TOOLNAME): New.
8231 (malloc_failure): Use PREFIX.
8232 (error): In the IPA, an error causes an exit.
8233 (fatal, warning): Use PREFIX.
8234 (internal_error): Use TOOLNAME.
8235 (NUMCELLS): Increase to 10.
8236 * configure, config.in: Regenerate.
8237
d149dd1d
PA
82382010-06-01 Pedro Alves <pedro@codesourcery.com>
8239
8240 * server.c (handle_query) <qSupported>: Do two passes over the
8241 qSupported string to avoid nesting strtok.
8242
f6528abd
JK
82432010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8244
8245 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
8246 (CDEPS): New.
8247 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
8248 -Wl,--dynamic-list.
8249 * configure: Regenerate.
8250 * proc-service.list: New.
8251
ca2a87a0
JK
82522010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8253
8254 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
8255 New comment.
8256
363a6e9f
OS
82572010-05-26 Ozkan Sezer <sezeroz@gmail.com>
8258
8259 * gdbreplay.c (remote_open): Check error return from socket() call by
8260 its equality to -1 not by it being negative.
8261 * remote-utils.c (remote_open): Likewise.
8262
d23b6cb1
PA
82632010-05-23 Pedro Alves <pedro@codesourcery.com>
8264
8265 * config.h: Regenerate.
8266
28d3cf85
MK
82672010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
8268
8269 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
8270 doesn't provide PTRACE_GET_THREAD_AREA.
8271
fea36a59
MK
82722010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
8273
8274 * linux-m68k-low.c: Include <asm/ptrace.h>
8275 (ps_get_thread_area): Implement.
8276
24b066ba
DE
82772010-05-03 Doug Evans <dje@google.com>
8278
8279 * event-loop.c (struct callback_event): New struct.
8280 (callback_list): New global.
8281 (append_callback_event, delete_callback_event): New functions.
8282 (process_callback): New function.
8283 (start_event_loop): Call it.
8284 * remote-utils.c (NOT_SCHEDULED): Define.
8285 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
8286 moved out of readchar.
8287 (readchar): Rewrite. Call reschedule before returning.
8288 (reset_readchar): New function.
8289 (remote_close): Call it.
8290 (process_remaining, reschedule): New functions.
8291 * server.h (callback_handler_func): New typedef.
8292 (append_callback_event, delete_callback_event): Declare.
8293
9836d6ea
PA
82942010-05-03 Pedro Alves <pedro@codesourcery.com>
8295
8296 * proc-service.c (ps_pglobal_lookup): Use
8297 thread_db_look_up_one_symbol.
8298 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
8299 parameter. Use it instead of all_symbols_looked_up.
8300 * server.h (struct process_info) <all_symbols_looked_up>: Delete
8301 field.
8302 (all_symbols_looked_up): Don't declare.
8303 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
8304 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
8305 field.
8306 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
8307 Set all_symbols_looked_up here.
8308 (thread_db_look_up_one_symbol): New.
8309 (thread_db_get_tls_address): Adjust.
8310 (thread_db_load_search, try_thread_db_load_1): Always allocate the
8311 thread_db object on the heap, and tentatively set it in the
8312 process structure.
8313 (thread_db_init): Don't set all_symbols_looked_up here.
8314 * linux-low.h (thread_db_look_up_one_symbol): Declare.
8315
7984d532
PA
83162010-05-03 Pedro Alves <pedro@codesourcery.com>
8317
8318 * linux-low.c (linux_kill, linux_detach): Adjust.
8319 (status_pending_p_callback): Remove redundant statement. Check
8320 for !TARGET_WAITIKIND_IGNORE, instead of
8321 TARGET_WAITKIND_STOPPED.
8322 (handle_tracepoints): Make sure LWP is locked. Adjust.
8323 (linux_wait_for_event_1): Adjust.
8324 (linux_cancel_breakpoints): New.
8325 (unsuspend_one_lwp): New.
8326 (unsuspend_all_lwps): New.
8327 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
8328 (send_sigstop_callback): Change return type to int, add new
8329 `except' parameter and handle it.
8330 (suspend_and_send_sigstop_callback): New.
8331 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
8332 pass them down. If SUSPEND, also increment the lwp's suspend
8333 count.
8334 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
8335 (need_step_over_p): Don't consider suspended LWPs.
8336 (start_step_over): Adjust.
8337 (proceed_one_lwp): Change return type to int, add new `except'
8338 parameter and handle it.
8339 (unsuspend_and_proceed_one_lwp): New.
8340 (proceed_all_lwps): Use find_inferior instead of
8341 for_each_inferior.
8342 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
8343 also decrement the suspend count of LWPs. Pass `except' down,
8344 instead of hacking its suspend count.
8345 (linux_pause_all): Add `freeze' parameter. Adjust.
8346 (linux_unpause_all): New.
8347 (linux_target_ops): Install linux_unpause_all.
8348 * server.c (handle_status): Adjust.
8349 * target.h (struct target_ops): New fields `unpause_all' and
8350 `cancel_breakpoints'. Add new parameter to `pause_all'.
8351 (pause_all): Add new `freeze' parameter.
8352 (unpause_all): New.
8353 (cancel_breakpoints): New.
8354 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
8355 cancel breakpoints.
8356 (cmd_qtstart): Pause threads.
8357 (stop_tracing): Pause threads, and cancel breakpoints.
8358 * win32-low.c (win32_target_ops): Adjust.
8359
e471f25b
PA
83602010-05-03 Pedro Alves <pedro@codesourcery.com>
8361
8362 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
8363 the inferior right away from here...
8364 (linux_wait_1): ... to here, and adjust to check the thread's
8365 last_resume_kind instead of the lwp's step or stop_expected flags.
8366
1915ef4f
PA
83672010-05-02 Pedro Alves <pedro@codesourcery.com>
8368
8369 * README: Use consistent `GDB' and `GDBserver' spellings.
8370
f9e39928
PA
83712010-05-02 Pedro Alves <pedro@codesourcery.com>
8372
8373 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
8374 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
8375 (linux_detach_one_lwp): Assume the lwp is stopped.
8376 (any_thread_of): Delete.
8377 (linux_detach): Stop all lwps here. Don't blindly delete all
8378 breakpoints.
8379 (delete_lwp_callback): New.
8380 (linux_mourn): Delete all lwps of the process that is gone.
8381 (linux_wait_1): Don't delete the last lwp of the process here.
8382 * mem-break.h (mark_breakpoints_out): Declare.
8383 * mem-break.c (mark_breakpoints_out): New.
8384 (free_all_breakpoints): Use it.
8385 * server.c (handle_target_event): If the process is gone, mark
8386 breakpoints out.
8387 * thread-db.c (struct thread_db) <create_bp>: New field.
8388 (thread_db_enable_reporting): Fix prototype. Store a thread event
8389 breakpoint reference in the thread_db struct.
8390 (thread_db_load_search): Clear the thread_db object.
8391 (try_thread_db_load_1): Ditto.
8392 (switch_to_process): New.
8393 (disable_thread_event_reporting): Use it.
8394 (remove_thread_event_breakpoints): New.
8395 (thread_db_detach, thread_db_mourn): Use it.
8396
1e7fc18c
PA
83972010-05-01 Pedro Alves <pedro@codesourcery.com>
8398
8399 * linux-low.c (linux_enable_event_reporting): New.
8400 (linux_wait_for_event_1, handle_extended_wait): Use it.
8401
02fc4de7
PA
84022010-04-30 Pedro Alves <pedro@codesourcery.com>
8403
8404 * linux-low.c (linux_kill_one_lwp, linux_kill)
8405 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
8406 (send_sigstop): Take an lwp_info as parameter instead. Queue a
8407 SIGSTOP even if the LWP is stopped.
8408 (send_sigstop_callback): New.
8409 (stop_all_lwps): Use send_sigstop_callback instead.
8410 (linux_resume_one_thread): Adjust.
8411 (proceed_one_lwp): Still proceed an LWP that the client has
8412 requested to stop, if we haven't reported it as stopped yet. Make
8413 sure that LWPs the client want stopped, have a pending SIGSTOP.
8414
bc3b5632
DE
84152010-04-26 Doug Evans <dje@google.com>
8416
ae1ada35
DE
8417 * server.c (handle_general_set): Make static.
8418
bc3b5632
DE
8419 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
8420 Print received char after testing for error/eof instead of before.
8421 (input_interrupt): Tweak comment.
8422
65730243
DE
84232010-04-23 Doug Evans <dje@google.com>
8424
8425 * server.c (start_inferior): Print inferior argv if --debug.
8426
a8ae7dc0
AR
84272010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
8428
8429 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
8430 * nto-x86-low.c: Include server.h
8431
1c07cc19
PM
84322010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
8433
8434 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
8435 be consistent with other sources of this directory.
8436 (init_registers_amd64): Correct name of source file of this function
8437 in the comment.
8438
e0a61e09
PM
84392010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8440
8441 * configure.srv (x86_64-*-mingw*): New configuration for Windows
8442 64-bit executables.
8443
54709339
PM
84442010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8445
8446 * win32-i386-low.c: Add 64-bit support.
8447 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
8448 (init_registers_amd64): Declare.
8449 (mappings): Add 64-bit version of array.
8450 (init_windows_x86): New function.
8451 (the_low_target): Change init_arch field to init_windows_x86.
8452
e8f0053d
PM
84532010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8454
8455 * win32-low.c: Adapt to support also 64-bit architecture.
8456 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
8457 (get_image_name): Use SIZE_T type for local variable `done'.
8458 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
8459 (toolhelp_get_dll_name): Idem.
8460 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
8461 Use uintptr_t typecast to avoid warning.
8462 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
8463 (handle_exception): Use phex_nz to avoid warning.
8464 (win32_wait): Remove unused local variable `process'.
8465
c481e77e
PM
84662010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8467
8468 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
8469 `amd64-avx.o'.
8470
12ea4b69
PM
84712010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
8472
8473 * configure.ac: Use `ws2_32' library for srv_mingw.
8474 * configure: Regenerate.
8475 * gdbreplay.c: Include winsock2.h instead of winsock.h.
8476 * remote-utils.c: Likewise.
8477
f6d1620c
L
84782010-04-17 H.J. Lu <hongjiu.lu@intel.com>
8479
8480 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
8481 if __x86_64__ is defined.
8482
8e642873
PM
84832010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
8484
8485 * configure: Regenerate.
8486
711e434b
PM
84872010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
8488
8489 * server.c (handle_query): Handle 'qGetTIBAddr' query.
8490 * target.h (target_ops): New get_tib_address field.
8491 * win32-low.h (win32_thread_info): Add thread_local_base field.
8492 * win32-low.c (child_add_thread): Add tlb argument.
8493 Set thread_local_base field to TLB.
8494 (get_child_debug_event): Adapt to child_add_thread change.
8495 (win32_get_tib_address): New function.
8496 (win32_target_ops): Set get_tib_address field to
8497 win32_get_tib_address.
8498 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
8499
505106cd
PA
85002010-04-12 Pedro Alves <pedro@codesourcery.com>
8501
505106cd
PA
8502 * linux-low.c (linux_mourn): Also remove the process.
8503 * server.c (handle_target_event): Don't remove the process here.
8504 * nto-low.c (nto_mourn): New.
8505 (nto_target_ops): Install it.
8506 * spu-low.c (spu_mourn): New.
8507 (spu_target_ops): Install it.
8508 * win32-low.c (win32_mourn): New.
8509 (win32_target_ops): Install it.
8510
e8470a06
PA
85112010-04-12 Pedro Alves <pedro@codesourcery.com>
8512
8513 * server.h (buffer_xml_printf): Remove redundant `;'.
8514
45ba0d02
PA
85152010-04-12 Pedro Alves <pedro@codesourcery.com>
8516
8517 * regcache.c (set_register_cache): Invalidate regcaches before
8518 changing the register cache layout.
8519 (regcache_invalidate_one): Allow a NULL regcache.
8520 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
8521 regcaches before changing the register cache layout or the target
8522 regsets.
8523
59e04013
L
85242010-04-12 H.J. Lu <hongjiu.lu@intel.com>
8525
8526 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
8527 variable warning on Linux/x86-64.
8528
8336d594
PA
85292010-04-11 Pedro Alves <pedro@codesourcery.com>
8530
8531 GDBserver disconnected tracing support.
8532
8533 * linux-low.c (linux_remove_process): Delete.
8534 (add_lwp): Don't set last_resume_kind here.
8535 (linux_kill): Use `mourn'.
8536 (linux_detach): Use `thread_db_detach', and `mourn'.
8537 (linux_mourn): New.
8538 (linux_attach_lwp_1): Adjust comment.
8539 (linux_attach): last_resume_kind moved the thread_info; adjust.
8540 (status_pending_p_callback): Adjust.
8541 (linux_wait_for_event_1): Adjust.
8542 (count_events_callback, select_singlestep_lwp_callback)
8543 (select_event_lwp_callback, cancel_breakpoints_callback)
8544 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
8545 (proceed_one_lwp): Adjust.
8546 (linux_async): Add debug output.
8547 (linux_thread_stopped): New.
8548 (linux_pause_all): New.
8549 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
8550 linux_pause_all.
8551 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
8552 (thread_db_free): Delete declaration.
8553 (thread_db_detach, thread_db_mourn): Declare.
8554 * thread-db.c (thread_db_init): Use thread_db_mourn.
8555 (thread_db_free): Delete, split in two.
8556 (disable_thread_event_reporting): New.
8557 (thread_db_detach): New.
8558 (thread_db_mourn): New.
8559
8560 * server.h (struct thread_info) <last_resume_kind>: New field.
8561 <attached>: Add comment.
8562 <gdb_detached>: New field.
8563 (handler_func): Change return type to int.
8564 (handle_serial_event, handle_target_event): Ditto.
8565 (gdb_connected): Declare.
8566 (tracing): Delete.
8567 (disconnected_tracing): Declare.
8568 (stop_tracing): Declare.
8569
8570 * server.c (handle_query) <qSupported>: Report support for
8571 disconnected tracing.
8572 (queue_stop_reply_callback): Account for running threads.
8573 (gdb_wants_thread_stopped): New.
8574 (gdb_wants_all_threads_stopped): New.
8575 (gdb_reattached_process): New.
8576 (handle_status): Clear the `gdb_detached' flag of all processes.
8577 In all-stop, stop all threads.
8578 (main): Be sure to leave tfind mode. Handle disconnected tracing.
8579 (process_serial_event): If the remote connection breaks, or if an
8580 exit was forced with "monitor exit", force an event loop exit.
8581 Handle disconnected tracing on detach.
8582 (handle_serial_event): Adjust.
8583 (handle_target_event): If GDB isn't connected, forward events back
8584 to the inferior, unless the last process exited, in which case,
8585 exit gdbserver. Adjust interface.
8586
8587 * remote-utils.c (remote_open): Don't block in accept. Instead
8588 register an event loop source on the listen socket file
8589 descriptor. Refactor bits into ...
8590 (listen_desc): ... this new global.
8591 (gdb_connected): ... this new function.
8592 (enable_async_notification): ... this new function.
8593 (handle_accept_event): ... this new function.
8594 (remote_close): Clear remote_desc.
8595
8596 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
8597
8598 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
8599 New fields.
8600 (mourn_inferior): Define.
8601 (target_process_qsupported): Avoid the dangling else problem.
8602 (thread_stopped): Define.
8603 (pause_all): Define.
8604 (target_waitstatus_to_string): Declare.
8605 * target.c (target_waitstatus_to_string): New.
8606
8607 * tracepoint.c (tracing): Make extern.
8608 (disconnected_tracing): New.
8609 (stop_tracing): Make extern. Handle tracing stops due to GDB
8610 disconnecting.
8611 (cmd_qtdisconnected): New.
8612 (cmd_qtstatus): Report disconnected tracing status in trace reply.
8613 (handle_tracepoint_general_set): Handle QTDisconnected.
8614
8615 * event-loop.c (event_handler_func): Change return type to int.
8616 (process_event): Bail out if the event handler wants the event
8617 loop to stop.
8618 (handle_file_event): Ditto.
8619 (start_event_loop): Bail out if the event handler wants the event
8620 loop to stop.
8621
8622 * nto-low.c (nto_target_ops): Adjust.
8623 * spu-low.c (spu_wait): Don't remove the process here.
8624 (spu_target_ops): Adjust.
8625 * win32-low.c (win32_wait): Don't remove the process here.
8626 (win32_target_ops): Adjust.
8627
5d267c4c
PA
86282010-04-11 Pedro Alves <pedro@codesourcery.com>
8629
8630 * regcache.c (realloc_register_cache): Invalidate inferior's
8631 regcache before recreating it.
8632
623ccd72
PA
86332010-04-09 Pedro Alves <pedro@codesourcery.com>
8634
8635 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
8636
219f2f23
PA
86372010-04-09 Stan Shebs <stan@codesourcery.com>
8638 Pedro Alves <pedro@codesourcery.com>
8639
8640 * server.h (LONGEST): New.
8641 (struct thread_info) <while_stepping>: New field.
8642 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
8643 Declare.
8644 (initialize_tracepoint, handle_tracepoint_general_set)
8645 (handle_tracepoint_query, tracepoint_finished_step)
8646 (tracepoint_was_hit, release_while_stepping_state_list):
8647 (current_traceframe): Declare.
8648 * server.c (handle_general_set): Handle tracepoint packets.
8649 (read_memory): New.
8650 (write_memory): New.
8651 (handle_search_memory_1): Use read_memory.
8652 (handle_query): Report support for conditional tracepoints, trace
8653 state variables, and tracepoint sources. Handle tracepoint
8654 queries.
8655 (main): Initialize the tracepoints module.
8656 (process_serial_event): Handle traceframe reads/writes.
8657
8658 * linux-low.c (handle_tracepoints): New.
8659 (linux_wait_1): Call it.
8660 (linux_resume_one_lwp): Handle while-stepping.
8661 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
8662 (linux_target_ops): Install them.
8663 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
8664 New field.
8665 * linux-x86-low.c (x86_supports_tracepoints): New.
8666 (the_low_target). Install it.
8667
8668 * mem-break.h (delete_breakpoint): Declare.
8669 * mem-break.c (delete_breakpoint): Make external.
8670
8671 * target.h (struct target_ops): Add `supports_tracepoints',
8672 `read_pc', and `write_pc' fields.
8673 (target_supports_tracepoints): Define.
8674 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
8675 (phex_nz): New.
8676
8677 * regcache.h (struct regcache) <registers_owned>: New field.
8678 (init_register_cache, regcache_cpy): Declare.
8679 (regcache_read_pc, regcache_write_pc): Declare.
8680 (register_cache_size): Declare.
8681 (supply_regblock): Declare.
8682 * regcache.c (init_register_cache): New.
8683 (new_register_cache): Use it.
8684 (regcache_cpy): New.
8685 (register_cache_size): New.
8686 (supply_regblock): New.
8687 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 8688
219f2f23
PA
8689 * tracepoint.c: New.
8690
8691 * Makefile.in (OBS): Add tracepoint.o.
8692 (tracepoint.o): New rule.
8693
3a13a53b
L
86942010-04-08 H.J. Lu <hongjiu.lu@intel.com>
8695
8696 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
8697 (i386-mmx.o): New.
8698 (i386-mmx.c): Likewise.
8699 (i386-mmx-linux.o): Likewise.
8700 (i386-mmx-linux.c): Likewise.
8701
8702 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
8703 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
8704 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
8705 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
8706
8707 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
8708 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
8709 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
8710
1570b33e
L
87112010-04-07 H.J. Lu <hongjiu.lu@intel.com>
8712
8713 * Makefile.in (clean): Updated.
8714 (i386-avx.o): New.
8715 (i386-avx.c): Likewise.
8716 (i386-avx-linux.o): Likewise.
8717 (i386-avx-linux.c): Likewise.
8718 (amd64-avx.o): Likewise.
8719 (amd64-avx.c): Likewise.
8720 (amd64-avx-linux.o): Likewise.
8721 (amd64-avx-linux.c): Likewise.
8722
8723 * configure.srv (srv_i386_regobj): Add i386-avx.o.
8724 (srv_i386_linux_regobj): Add i386-avx-linux.o.
8725 (srv_amd64_regobj): Add amd64-avx.o.
8726 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
8727 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
8728 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
8729 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
8730 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
8731 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
8732 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
8733
8734 * i387-fp.c: Include "i386-xstate.h".
8735 (i387_xsave): New.
8736 (i387_cache_to_xsave): Likewise.
8737 (i387_xsave_to_cache): Likewise.
8738 (x86_xcr0): Likewise.
8739
8740 * i387-fp.h (i387_cache_to_xsave): Likewise.
8741 (i387_xsave_to_cache): Likewise.
8742 (x86_xcr0): Likewise.
8743
8744 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
8745 * linux-crisv32-low.c (target_regsets): Likewise.
8746 * linux-m68k-low.c (target_regsets): Likewise.
8747 * linux-mips-low.c (target_regsets): Likewise.
8748 * linux-ppc-low.c (target_regsets): Likewise.
8749 * linux-s390-low.c (target_regsets): Likewise.
8750 * linux-sh-low.c (target_regsets): Likewise.
8751 * linux-sparc-low.c (target_regsets): Likewise.
8752 * linux-xtensa-low.c (target_regsets): Likewise.
8753
8754 * linux-low.c: Include <sys/uio.h>.
8755 (regsets_fetch_inferior_registers): Support nt_type.
8756 (regsets_store_inferior_registers): Likewise.
8757 (linux_process_qsupported): New.
8758 (linux_target_ops): Add linux_process_qsupported.
8759
8760 * linux-low.h (regset_info): Add nt_type.
8761 (linux_target_ops): Add process_qsupported.
8762
8763 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
8764 and <sys/uio.h>.
8765 (init_registers_i386_avx_linux): New.
8766 (init_registers_amd64_avx_linux): Likewise.
8767 (xmltarget_i386_linux_no_xml): Likewise.
8768 (xmltarget_amd64_linux_no_xml): Likewise.
8769 (PTRACE_GETREGSET): Likewise.
8770 (PTRACE_SETREGSET): Likewise.
8771 (x86_fill_xstateregset): Likewise.
8772 (x86_store_xstateregset): Likewise.
8773 (use_xml): Likewise.
8774 (x86_linux_update_xmltarget): Likewise.
8775 (x86_linux_process_qsupported): Likewise.
8776 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
8777 (x86_arch_setup): Don't call init_registers_amd64_linux nor
8778 init_registers_i386_linux here. Call
8779 x86_linux_update_xmltarget.
8780 (the_low_target): Add x86_linux_process_qsupported.
8781
8782 * server.c (handle_query): Call target_process_qsupported.
8783
8784 * target.h (target_ops): Add process_qsupported.
8785 (target_process_qsupported): New.
8786
fc7238bb
PA
87872010-04-03 Pedro Alves <pedro@codesourcery.com>
8788
8789 * inferiors.c (add_thread): Set last_status kind to
8790 TARGET_WAITKIND_IGNORE.
8791 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
8792 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
8793 (linux_wait_1): Move `thread' local definition to block that uses
8794 it. Don't NULL initialize `event_child'.
8795 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
8796 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
8797 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
8798
bdabb078
PA
87992010-04-01 Pedro Alves <pedro@codesourcery.com>
8800
8801 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
8802 an extended waitstatus, or by a watchpoint.
8803 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
8804 thread was stepping or has been stopped by a watchpoint.
8805
d3bbe7a0
PA
88062010-04-01 Pedro Alves <pedro@codesourcery.com>
8807
8808 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
8809 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
8810 of another, then delete the previous, and validate all
8811 breakpoints.
8812 (validate_inserted_breakpoint): New.
8813 (delete_disabled_breakpoints): New.
8814 (validate_breakpoints): New.
8815 (check_mem_read): Validate breakpoints before trusting their
8816 shadow. Delete disabled breakpoints.
8817 (check_mem_write): Validate breakpoints before trusting they
8818 should be inserted. Delete disabled breakpoints.
8819 * mem-break.h (validate_breakpoints):
8820 * server.c (handle_query): Validate breakpoints when we see a
8821 qSymbol query.
8822
8b07ae33
PA
88232010-04-01 Pedro Alves <pedro@codesourcery.com>
8824
8825 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
8826 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
8827 if we could tell there's a GDB breakpoint at stop_pc.
8828 (need_step_over_p): Don't do a step over if we find a GDB
8829 breakpoint at the resume PC.
8830
8831 * mem-break.c (struct raw_breakpoint): New.
8832 (enum bkpt_type): New type `gdb_breakpoint'.
8833 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
8834 fields. New field `raw'.
8835 (find_raw_breakpoint_at): New.
8836 (set_raw_breakpoint_at): Handle refcounting. Create a raw
8837 breakpoint instead.
8838 (set_breakpoint_at): Adjust.
8839 (delete_raw_breakpoint): New.
8840 (release_breakpoint): New.
8841 (delete_breakpoint): Rename to...
8842 (delete_breakpoint_1): ... this. Add proc parameter. Use
8843 release_breakpoint. Return ENOENT.
8844 (delete_breakpoint): Reimplement.
8845 (find_breakpoint_at): Delete.
8846 (find_gdb_breakpoint_at): New.
8847 (delete_breakpoint_at): Delete.
8848 (set_gdb_breakpoint_at): New.
8849 (delete_gdb_breakpoint_at): New.
8850 (gdb_breakpoint_here): New.
8851 (set_reinsert_breakpoint): Use release_breakpoint.
8852 (uninsert_breakpoint): Rename to ...
8853 (uninsert_raw_breakpoint): ... this.
8854 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
8855 (reinsert_raw_breakpoint): Change parameter type to
8856 raw_breakpoint.
8857 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
8858 instead.
8859 (check_breakpoints): Adjust. Use release_breakpoint.
8860 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
8861 (breakpoint_inserted_here): Ditto.
8862 (check_mem_read): Adjust to iterate over raw breakpoints instead.
8863 Don't trust the breakpoint's shadow if it is not inserted.
8864 (check_mem_write): Adjust to iterate over raw breakpoints instead.
8865 (delete_all_breakpoints): Adjust.
8866 (free_all_breakpoints): Mark all breakpoints as uninserted, and
8867 use delete_breakpoint_1.
8868
8869 * mem-break.h (breakpoints_supported): Delete declaration.
8870 (set_gdb_breakpoint_at): Declare.
8871 (gdb_breakpoint_here): Declare.
8872 (delete_breakpoint_at): Delete.
8873 (delete_gdb_breakpoint_at): Declare.
8874
8875 * server.h (struct raw_breakpoint): Forward declare.
8876 (struct process_info): New field `raw_breakpoints'.
8877
8878 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
8879 breakpoints.
8880
6bf5e0ba
PA
88812010-03-24 Pedro Alves <pedro@codesourcery.com>
8882
8883 * linux-low.c (status_pending_p_callback): Fix comment.
8884 (linux_wait_for_event_1): Move most of the internal breakpoint
8885 handling from here...
8886 (linux_wait_1): ... to here.
8887 (count_events_callback): New.
8888 (select_singlestep_lwp_callback): New.
8889 (select_event_lwp_callback): New.
8890 (cancel_breakpoints_callback): New.
8891 (select_event_lwp): New.
8892 (linux_wait_1): Simplify internal breakpoint handling. Give equal
8893 priority to all LWPs that have had events that should be reported
8894 to the client. Cancel breakpoints when about to reporting the
8895 event to the client, not while stopping lwps. No longer cancel
8896 finished single-steps here.
8897 (cancel_finished_single_step): Delete.
8898 (cancel_finished_single_steps): Delete.
8899
414a389f
PA
89002010-03-24 Pedro Alves <pedro@codesourcery.com>
8901
8902 * mem-break.c (enum bkpt_type): New.
8903 (struct breakpoint): New field `type'.
8904 (set_breakpoint_at): Change return type to struct breakpoint
8905 pointer. Set type to `other_breakpoint' by default.
8906 (delete_breakpoint): Rewrite, supporting more than one breakpoint
8907 in the breakpoint list.
8908 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
8909 (reinsert_breakpoint): Rename to ...
8910 (reinsert_raw_breakpoint): ... this.
8911 (reinsert_breakpoints_at): Adjust.
8912 * mem-break.h (struct breakpoint): Declare.
8913 (set_breakpoint_at): Change return type to struct breakpoint
8914 pointer.
8915
2280c721
PA
89162010-03-24 Pedro Alves <pedro@codesourcery.com>
8917
8918 * server.c (handle_query): Assign, not compare.
8919
d50171e4
PA
89202010-03-24 Pedro Alves <pedro@codesourcery.com>
8921
8922 Teach linux gdbserver to step-over-breakpoints.
8923
8924 * linux-low.c (can_hardware_single_step): New.
8925 (supports_breakpoints): New.
8926 (handle_extended_wait): If stopping threads, read the stop pc of
8927 the new cloned LWP.
8928 (get_pc): New.
8929 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
8930 low target doesn't support retrieving the PC.
8931 (add_lwp): Set last_resume_kind to resume_continue.
8932 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
8933 (linux_attach): Don't clear stop_expected. Set the lwp's
8934 last_resume_kind to resume_stop.
8935 (linux_detach_one_lwp): Don't check for removed breakpoints.
8936 (check_removed_breakpoint): Delete.
8937 (status_pending_p): Rename to ...
8938 (status_pending_p_callback): ... this. Don't check for removed
8939 breakpoints. Don't consider threads that are stopped from GDB's
8940 perspective.
8941 (linux_wait_for_lwp): Always read the stop_pc here.
8942 (cancel_breakpoint): New.
8943 (step_over_bkpt): New global.
8944 (linux_wait_for_event_1): Implement stepping over breakpoints.
8945 (gdb_wants_lwp_stopped): New.
8946 (gdb_wants_all_stopped): New.
8947 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
8948 single-step traps here. Store the thread's last reported target
8949 wait status.
8950 (send_sigstop): Don't clear stop_expected. Always set it,
8951 instead.
8952 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
8953 (cancel_finished_single_step): New.
8954 (cancel_finished_single_steps): New.
8955 (wait_for_sigstop): Don't cancel finished single-step traps here.
8956 (linux_resume_one_lwp): Don't check for removed breakpoints.
8957 Don't set `step' on non-hardware step archs.
8958 (linux_set_resume_request): Ignore resume_stop requests if already
8959 stopping or stopped. Set the lwp's last_resume_kind.
8960 (resume_status_pending_p): Don't check for removed breakpoints.
8961 (need_step_over_p): New.
8962 (start_step_over): New.
8963 (finish_step_over): New.
8964 (linux_resume_one_thread): Always queue a sigstop for resume_stop
8965 requests. Clear the thread's last reported target waitstatus.
8966 Don't use the `suspended' flag. Don't consider pending breakpoints.
8967 (linux_resume): Start a step-over if necessary.
8968 (proceed_one_lwp): New.
8969 (proceed_all_lwps): New.
8970 (unstop_all_lwps): New.
8971 * linux-low.h (struct lwp_info): Rewrite comment for the
8972 `suspended' flag. Add the `stop_pc' field. Delete the
8973 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
8974 Add `'last_resume_kind' and `need_step_over' fields.
8975 * inferiors.c (struct thread_info): Delete, moved elsewhere.
8976 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
8977 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
8978 (set_raw_breakpoint_at): New.
8979 (set_breakpoint_at): Rewrite to use it.
8980 (reinsert_breakpoint_handler): Delete.
8981 (set_reinsert_breakpoint): New.
8982 (reinsert_breakpoint_by_bp): Delete.
8983 (delete_reinsert_breakpoints): New.
8984 (uninsert_breakpoint): Rewrite.
8985 (uninsert_breakpoints_at): New.
8986 (reinsert_breakpoint): Rewrite.
8987 (reinsert_breakpoints_at): New.
8988 (check_breakpoints): Rewrite.
8989 (breakpoint_here): New.
8990 (breakpoint_inserted_here): New.
8991 (check_mem_read): Adjust.
8992 * mem-break.h (breakpoints_supported, breakpoint_here)
8993 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
8994 (reinsert_breakpoint_by_bp): Delete declaration.
8995 (delete_reinsert_breakpoints): Declare.
8996 (reinsert_breakpoint): Delete declaration.
8997 (reinsert_breakpoints_at): Declare.
8998 (uninsert_breakpoint): Delete declaration.
8999 (uninsert_breakpoints_at): Declare.
9000 (check_breakpoints): Adjust prototype.
9001 * server.h: Adjust include order.
9002 (struct thread_info): Declare here. Add a `last_status' field.
9003
30ba68cb
MS
90042010-03-23 Michael Snyder <msnyder@vmware.com>
9005
9006 * server.c (crc32): New function.
9007 (handle_query): Add handling for 'qCRC:' request.
9008
b9a881c2
PA
90092010-03-23 Pedro Alves <pedro@codesourcery.com>
9010
9011 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
9012 lwp had been stopped by a watchpoint.
9013
e92d13d5
PA
90142010-03-16 Pedro Alves <pedro@codesourcery.com>
9015
9016 * server.h (internal_error): Declare.
9017 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
9018 * utils.c (internal_error): New function.
9019
64daa791
AS
90202010-03-15 Andreas Schwab <schwab@redhat.com>
9021
9022 * configure.srv: Fix typo setting srv_regobj.
9023
f52cd8cd
PA
90242010-03-15 Pedro Alves <pedro@codesourcery.com>
9025
9026 * linux-low.c (fetch_register): Avoid passing a non string literal
9027 format to `error'.
9028 (usr_store_inferior_registers): Ditto.
9029
93ae6fdc
PA
90302010-03-14 Pedro Alves <pedro@codesourcery.com>
9031
9032 * linux-low.c (linux_write_memory): Bail out early if peeking
9033 memory failed.
9034
c3adc08c
PA
90352010-03-14 Pedro Alves <pedro@codesourcery.com>
9036
9037 * linux-low.h (struct lwp_info): New fields
9038 `stopped_by_watchpoint' and `stopped_data_address'.
9039 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
9040 here, and cache them in the lwp object.
9041 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
9042 directly.
9043 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
9044 field.
9045 (linux_stopped_by_watchpoint): Rewrite.
9046 (linux_stopped_data_address): Rewrite.
9047
bce522a2
PA
90482010-03-06 Simo Melenius <simo.melenius@iki.fi>
9049
9050 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
9051 switching the current inferior, not before.
9052
90884b2b
L
90532010-03-01 H.J. Lu <hongjiu.lu@intel.com>
9054
9055 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
9056 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
9057 i386-linux.c and amd64-linux.c.
9058 (reg-i386.o): Removed.
9059 (reg-i386.c): Likewise.
9060 (reg-i386-linux.o): Likewise.
9061 (reg-i386-linux.c): Likewise.
9062 (reg-x86-64.o): Likewise.
9063 (reg-x86-64.c): Likewise.
9064 (reg-x86-64-linux.o): Likewise.
9065 (reg-x86-64-linux.c): Likewise.
9066 (i386.o): New.
9067 (i386.c): Likewise.
9068 (i386-linux.o): Likewise.
9069 (i386-linux.c): Likewise.
9070 (amd64.o): Likewise.
9071 (amd64.c): Likewise.
9072 (amd64-linux.o): Likewise.
9073 (amd64-linux.c): Likewise.
9074
9075 * configure.srv (srv_i386_regobj): New.
9076 (srv_i386_linux_regobj): Likewise.
9077 (srv_amd64_regobj): Likewise.
9078 (srv_amd64_linux_regobj): Likewise.
9079 (srv_i386_32bit_xmlfiles): Likewise.
9080 (srv_i386_64bit_xmlfiles): Likewise.
9081 (srv_i386_xmlfiles): Likewise.
9082 (srv_amd64_xmlfiles): Likewise.
9083 (srv_i386_linux_xmlfiles): Likewise.
9084 (srv_amd64_linux_xmlfiles): Likewise.
9085 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
9086 srv_xmlfiles to $srv_i386_xmlfiles.
9087 (i[34567]86-*-mingw32ce*): Likewise.
9088 (i[34567]86-*-mingw*): Likewise.
9089 (i[34567]86-*-nto*): Likewise.
9090 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
9091 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
9092 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
9093 (x86_64-*-linux*): Likewise.
9094
9095 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
9096 (init_registers_amd64_linux): New.
9097 (x86_arch_setup): Replace init_registers_x86_64_linux with
9098 init_registers_amd64_linux.
9099
193f13e6
MK
91002010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
9101
9102 * configure.ac: Check for libdl. If it is not available link against
9103 static libthread_db.
9104 * configure: Regenerate.
9105
85d721b8
PA
91062010-02-22 Pedro Alves <pedro@codesourcery.com>
9107
9108 PR9605
9109
9110 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
9111 handing a read watchpoint.
9112 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
9113
6076632b
DE
91142010-02-12 Doug Evans <dje@google.com>
9115
9116 * linux-low.c (linux_supports_tracefork_flag): Document.
9117 (linux_look_up_symbols): Add comment.
9118
3327ccf7
L
91192010-02-03 H.J. Lu <hongjiu.lu@intel.com>
9120
9121 * regcache.c (supply_register): Clear regcache if buf is NULL.
9122
0718675c 91232010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 9124 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
9125
9126 * inferiors.c (find_inferior): Add function documentation.
9127 (unloaded_dll): Handle the case where the unloaded dll has not
9128 been previously registered in the dll list.
9129
177321bd
DJ
91302010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
9131
9132 * linux-arm-low.c (thumb_breakpoint_len): Delete.
9133 (thumb2_breakpoint): New.
9134 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
9135
2b009048
DJ
91362010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
9137
9138 * linux-low.c (get_stop_pc): Check for SIGTRAP.
9139 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
9140 breakpoints.
9141
3be029c7
PA
91422010-01-21 Pedro Alves <pedro@codesourcery.com>
9143
9144 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
9145
18f5de3b
JK
91462010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
9147
9148 * linux-s390-low.c (s390_collect_ptrace_register)
9149 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
9150
3743bb4f
DE
91512010-01-21 Doug Evans <dje@google.com>
9152
14ce3065
DE
9153 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
9154 (PTRACE_ARG4_TYPE): New macro.
9155 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
9156 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
9157 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
9158 (usr_store_inferior_registers): Ditto.
9159 (linux_read_memory, linux_write_memory): Ditto.
9160 (linux_test_for_tracefork): Ditto.
9161
3743bb4f
DE
9162 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
9163 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
9164
8b315be5
PA
91652010-01-21 Pedro Alves <pedro@codesourcery.com>
9166
9167 * proc-service.c (ps_lgetregs): Don't refetch registers from the
9168 target.
9169
85492558
PA
91702010-01-21 Pedro Alves <pedro@codesourcery.com>
9171
9172 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
9173 prototype to take a regcache. Adjust.
9174
442ea881
PA
91752010-01-20 Pedro Alves <pedro@codesourcery.com>
9176
9177 * regcache.h (struct thread_info): Forward declare.
9178 (struct regcache): New.
9179 (new_register_cache): Adjust prototype.
9180 (get_thread_regcache): Declare.
9181 (free_register_cache): Adjust prototype.
9182 (registers_to_string, registers_from_string): Ditto.
9183 (supply_register, supply_register_by_name, collect_register)
9184 (collect_register_as_string, collect_register_by_name): Ditto.
9185 * regcache.c (struct inferior_regcache_data): Delete.
9186 (get_regcache): Rename to ...
9187 (get_thread_regcache): ... this. Adjust. Switch inferior before
9188 fetching registers.
9189 (regcache_invalidate_one): Adjust.
9190 (regcache_invalidate): Fix prototype.
9191 (new_register_cache): Return the new register cache.
9192 (free_register_cache): Change prototype.
9193 (realloc_register_cache): Adjust.
9194 (registers_to_string): Change prototype to take a regcache. Adjust.
9195 (registers_from_string): Ditto.
9196 (register_data): Ditto.
9197 (supply_register): Ditto.
9198 (supply_register_by_name): Ditto.
9199 (collect_register): Ditto.
9200 (collect_register_as_string): Ditto.
9201 (collect_register_by_name): Ditto.
9202 * server.c (process_serial_event): Adjust.
9203 * linux-low.h (regset_fill_func, regset_store_func): Change
9204 prototype.
9205 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
9206 Change prototype.
9207 * linux-low.c (get_stop_pc): Adjust.
9208 (check_removed_breakpoint): Adjust.
9209 (linux_wait_for_event): Adjust.
9210 (linux_resume_one_lwp): Adjust.
9211 (fetch_register): Add regcache parameter. Adjust.
9212 (usr_store_inferior_registers): Ditto.
9213 (regsets_fetch_inferior_registers): Ditto.
9214 (regsets_store_inferior_registers): Ditto.
9215 (linux_fetch_registers, linux_store_registers): Ditto.
9216 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
9217 regcache. Adjust.
43aaf8b6
PA
9218 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
9219 Ditto.
442ea881
PA
9220 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
9221 prototype to take a regcache.
9222 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
9223 * remote-utils.c (convert_ascii_to_int, outreg)
9224 (prepare_resume_reply): Change prototype to take a regcache.
9225 Adjust.
9226 * target.h (struct target_ops) <fetch_registers, store_registers>:
9227 Change prototype to take a regcache.
9228 (fetch_inferior_registers, store_inferior_registers): Change
9229 prototype to take a regcache. Adjust.
9230 * proc-service.c (ps_lgetregs): Adjust.
9231 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
9232 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
9233 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
9234 take a regcache. Adjust.
9235 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
9236 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
9237 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
9238 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
9239 * linux-cris-low.c (cris_get_pc, cris_set_pc)
9240 (cris_cannot_fetch_register):
9241 (cris_breakpoint_at): Change prototype to take a regcache.
9242 Adjust.
9243 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
9244 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
9245 to take a regcache. Adjust.
9246 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
9247 Adjust.
9248 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
9249 take a regcache. Adjust.
9250 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
9251 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
9252 (m68k_set_pc): Change prototype to take a regcache. Adjust.
9253 * linux-mips-low.c (mips_get_pc):
9254 (mips_set_pc): Change prototype to take a regcache. Adjust.
9255 (mips_reinsert_addr): Adjust.
9256 (mips_collect_register): Change prototype to take a regcache.
9257 Adjust.
9258 (mips_supply_register):
9259 (mips_collect_register_32bit, mips_supply_register_32bit)
9260 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
9261 (mips_store_fpregset): Ditto.
43aaf8b6
PA
9262 * linux-ppc-low.c (ppc_supply_ptrace_register)
9263 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
9264 (parse_spufs_run): Adjust.
9265 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
9266 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
9267 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
9268 take a regcache. Adjust.
9269 * linux-s390-low.c (s390_collect_ptrace_register)
9270 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
9271 (s390_set_pc): Change prototype to take a regcache. Adjust.
9272 (s390_arch_setup): Adjust.
9273 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
9274 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
9275 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
9276 (sparc_fill_gregset, sparc_store_gregset_from_stack)
9277 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
9278 regcache. Adjust.
9279 (sparc_breakpoint_at): Adjust.
9280 * linux-xtensa-low.c (xtensa_fill_gregset):
9281 (xtensa_store_gregset):
9282 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
9283 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
9284 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
9285 prototype to take a regcache. Adjust.
9286 * win32-arm-low.c (arm_fetch_inferior_register)
9287 (arm_store_inferior_register): Change prototype to take a
9288 regcache. Adjust.
9289 * win32-i386-low.c (i386_fetch_inferior_register)
9290 (i386_store_inferior_register): Change prototype to take a
9291 regcache. Adjust.
9292 * win32-low.c (child_fetch_inferior_registers)
9293 (child_store_inferior_registers): Change prototype to take a
9294 regcache. Adjust.
9295 (win32_wait): Adjust.
9296 (win32_fetch_inferior_registers): Change prototype to take a
9297 regcache. Adjust.
9298 (win32_store_inferior_registers): Adjust.
9299 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
9300 store_inferior_register>: Change prototype to take a regcache.
9301
60c3d7b0
DE
93022010-01-20 Doug Evans <dje@google.com>
9303
9304 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
9305 #ifdef.
9306 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 9307 (W_STOPCODE): Provide definition if missing.
60c3d7b0 9308
dc146f7c
VP
93092010-01-13 Vladimir Prus <vladimir@codesourcery.com>
9310
9311 * linux-low.c (linux_core_of_thread): New.
9312 (compare_ints, show_process, list_threads): New.
9313 (linux_qxfer_osdata): Report threads and cores.
9314 (linux_target_op): Register linux_core_of_thread.
9315 * remote-utils.c (prepare_resume_reply): Report the core.
9316 (buffer_xml_printf): Support %d specifier.
9317 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
9318 New.
9319 (handle_query): Handle qXfer:threads. Announce availability
9320 thereof.
9321 * target.h (struct target_ops): New field core_of_thread.
9322
7803799a
UW
93232010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
9324
9325 * Makefile.in (clean): Remove new generated files.
9326 (reg-s390.o, reg-s390.c): Remove rules.
9327 (reg-s390x.o, reg-s390x.c): Likewise.
9328 (s390-linux32.o, s390-linux32.c): Add rules.
9329 (s390-linux64.o, s390-linux64.c): Likewise.
9330 (s390x-linux64.o, s390x-linux64.c): Likewise.
9331 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
9332 * linux-s390-low.c: Include <elf.h>.
9333 (HWCAP_S390_HIGH_GPRS): Define if undefined.
9334 (init_registers_s390): Remove prototype.
9335 (init_registers_s390x): Likewise.
9336 (init_registers_s390_linux32): Add prototype.
9337 (init_registers_s390_linux64): Likewise.
9338 (init_registers_s390x_linux64): Likewise.
9339 (s390_num_regs_3264): New define.
9340 (s390_regmap_3264): New global variable.
9341 (s390_cannot_fetch_register): Remove obsolete check.
9342 (s390_cannot_store_register): Likewise.
9343 (s390_collect_ptrace_register): Handle upper/lower register halves.
9344 (s390_supply_ptrace_register): Likewise.
9345 (s390_fill_gregset): Update to register number changes.
9346 (s390_get_hwcap): New routine.
9347 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
9348 Install appropriate regmap and register set.
9349
6e7ffa39
JB
93502010-01-01 Joel Brobecker <brobecker@adacore.com>
9351
9352 * server.c (gdbserver_version): Update copyright year to 2010.
9353 * gdbreplay.c (gdbreplay_version): Likewise.
9354
957f3f49
DE
93552009-12-28 Doug Evans <dje@google.com>
9356
9357 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
9358 elf/external.h. Include <elf.h> instead but only if necessary.
9359
ca5c370d
PA
93602009-12-28 Pedro Alves <pedro@codesourcery.com>
9361
9362 * linux-low.c (linux_remove_process): Remove `detaching'
9363 parameter. Don't release/detach from thread_db here.
9364 (linux_kill): Release/detach from thread_db here, ...
9365 (linux_detach): ... and here, before actually detaching.
9366 (linux_wait_1): ... and here, when a process exits.
9367 * thread-db.c (any_thread_of): New.
9368 (thread_db_free): Switch the current inferior to a thread of the
9369 passed in process.
9370
4ee62156
DE
93712009-12-21 Doug Evans <dje@google.com>
9372
d90e6a88
DE
9373 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
9374
c5f62d5f
DE
9375 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
9376 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
9377 warning ifndef __NR_tkill. Move setting of errno there too.
9378 Delete unnecessary resetting of errno after syscall.
9379 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
9380
10e86dd7
DE
9381 * configure.ac: Check for dladdr.
9382 * config.in: Regenerate.
9383 * configure: Regenerate.
9384 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
9385 (try_thread_db_load): Update.
9386
4ee62156
DE
9387 * linux-low.c (my_waitpid): Delete unnecessary prototype.
9388
00f515da
DE
93892009-12-18 Doug Evans <dje@google.com>
9390
e9464885
DE
9391 * event-loop.c: Include unistd.h if it exists.
9392
07d4f67e
DE
9393 * linux-low.c (my_waitpid): Move definition away from being in
9394 between linux_tracefork_child/linux_test_for_tracefork.
9395
00f515da
DE
9396 * gdb_proc_service.h (psaddr_t): Fix type.
9397 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
9398 signature to match glibc.
9399
1de1badb
DE
94002009-12-16 Doug Evans <dje@google.com>
9401
9402 * linux-low.c (linux_read_memory): Fix argument to read.
9403
aeeb81d1
PA
94042009-11-26 Pedro Alves <pedro@codesourcery.com>
9405
9406 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
9407 events, don't leave current_inferior pointing at null.
9408
10357975
PA
94092009-11-26 Pedro Alves <pedro@codesourcery.com>
9410
9411 * win32-low.c (LOG): Delete.
9412 (OUTMSG): Output to stderr.
9413 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
9414 on compile time LOG macro.
9415 (win32_wait): Fix debug output.
9416
cf6e3471
PA
94172009-11-26 Pedro Alves <pedro@codesourcery.com>
9418
9419 * win32-low.c (win32_add_one_solib): If the dll name is
9420 "ntdll.dll", prepend the system directory to the dll path.
9421
0c85e18e
MK
94222009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
9423
9424 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
9425
9ac544ce 94262009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 9427 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
9428
9429 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
9430 * configure.ac: Check for __mcoldfire__ and set
9431 gdb_cv_m68k_is_coldfire.
9432 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
9433 reg-cf.o and reg-m68k.o.
9434 * configure: Regenerated.
9435
fd7dd3e6
PA
94362009-11-16 Pedro Alves <pedro@codesourcery.com>
9437
9438 * linux-low.c (linux_remove_process): Add `detaching' parameter.
9439 Pass it to thread_db_free.
9440 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
9441 proper `detaching' argument to linux_remove_process.
9442 * linux-low.h (thread_db_free): Add `detaching' parameter.
9443 * thread-db.c (thread_db_init): Pass false as `detaching' argument
9444 to thread_db_free.
9445 (thread_db_free): Add `detaching' parameter. Only
9446 call td_ta_clear_event if detaching from process.
9447
75aa492e
MK
94482009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
9449
9450 * thread-db.c (thread_db_free): Fix typo.
9451
21e1bee4
PP
94522009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
9453
9454 PR gdb/10838
9455 * thread-db.c (thread_db_free): Call td_ta_clear_event.
9456
8838b45e
NS
94572009-11-03 Nathan Sidwell <nathan@codesourcery.com>
9458
9459 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
9460 with an i686 compiler.
9461 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
9462 needed.
9463 * configure: Rebuilt.
9464
8a35fb51
SL
94652009-10-29 Sandra Loosemore <sandra@codesourcery.com>
9466
9467 PR gdb/10783
9468
9469 * server.c (handle_search_memory_1): Correct read_addr initialization
9470 in loop for searching subsequent chunks.
9471
96f15937
PP
94722009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
9473
9474 * configure.ac: New --with-libthread-db option.
9475 * thread-db.c: Allow direct dependence on libthread_db.
9476 (thread_db_free): Adjust.
9477 * config.in: Regenerate.
9478 * configure: Likewise.
889bf7c5 9479
5f7d1694
PP
94802009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
9481
9482 PR gdb/10757
9483 * thread-db.c (attach_thread): New function.
9484 (maybe_attach_thread): Return success/failure.
9485 (find_new_threads_callback): Adjust.
889bf7c5
PA
9486 (thread_db_find_new_threads): Loop until no new threads.
9487
88e3b899
PA
94882009-10-13 Pedro Alves <pedro@codesourcery.com>
9489
9490 * proc-service.c (ps_lgetregs): Formatting.
9491
cdbfd419
PP
94922009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
9493
9494 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
9495 * configure.ac: Adjust.
9496 * linux-low.h (struct process_info_private): Move members to struct
9497 thread_db.
9498 (thread_db_free, thread_db_handle_monitor_command): New prototype.
9499 * linux-low.c (linux_remove_process): Adjust.
9500 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
9501 * server.c (handle_query): Move code ...
9502 (handle_monitor_command): ... here. New function.
9503 * target.h (struct target_ops): New member.
9504 * thread-db.c (struct thread_db): New.
9505 (libthread_db_search_path): New variable.
9506 (thread_db_create_event, thread_db_enable_reporting)
9507 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
9508 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
9509 (try_thread_db_load_1, dladdr_to_soname): New functions.
9510 (try_thread_db_load, thread_db_load_search): New functions.
9511 (thread_db_init): Search for libthread_db.
9512 (thread_db_free): New function.
9513 (thread_db_handle_monitor_command): Likewise.
9514 * config.in: Regenerate.
9515 * configure: Regenerate.
889bf7c5 9516
4168d2d6
UW
95172009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
9518
9519 * spu-low.c (spu_kill): Wait for inferior to terminate.
9520 Call clear_inferiors.
9521 (spu_detach): Call clear_inferiors.
9522
81ecdfbb
RW
95232009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9524
9525 * aclocal.m4: Regenerate.
9526 * config.in: Likewise.
9527 * configure: Likewise.
9528
0b9ff2c0
UW
95292009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9530
9531 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
9532 (parse_spufs_run): New function.
9533 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
9534 (ppc_breakpoint_at): Handle SPU breakpoints.
9535
efcbbd14
UW
95362009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9537
9538 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
9539 (SPUFS_MAGIC): Define.
9540 (spu_enumerate_spu_ids): New function.
9541 (linux_qxfer_spu): New function.
9542 (linux_target_ops): Install linux_qxfer_spu.
9543
f4d9bade
UW
95442009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9545
9546 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
9547 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
9548 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
9549 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
9550 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
9551 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
9552 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
9553 (init_registers_powerpc_cell32l): Add prototype.
9554 (init_registers_powerpc_cell64l): Likewise.
9555 (ppc_arch_setup): Detect Cell/B.E. architecture.
9556
96e946ca
RW
95572009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9558
9559 * Makefile.in (datarootdir): New variable.
9560
58d6951d
DJ
95612009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
9562
9563 * linux-low.c (linux_write_memory): Update debugging output.
9564 * Makefile.in (clean): Add new descriptions.
9565 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
9566 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
9567 * configure.srv: Add new files for arm*-*-linux*.
9568 * linux-arm-low.c: Add new declarations.
9569 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
9570 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
9571 (HWCAP_VFPv3D16): New.
9572 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
9573 instead of __IWMMXT__.
9574 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
9575 (arm_arch_setup): New.
9576 (target_regsets): Remove #ifdef. Add VFP regset.
9577 (the_low_target): Use arm_arch_setup.
9578
12b42a12
DJ
95792009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
9580
9581 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
9582 the main thread again.
9583
ac8c974e
AR
95842009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
9585
9586 Adding Neutrino gdbserver.
9587 * configure: Regenerated.
9588 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
9589 * configure.srv (i[34567]86-*-nto*): New target.
9590 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
9591 * remote-utils.c [__QNX__]: Include sys/iomgr.h
9592 (nto_comctrl) [__QNX__]: New function.
9593 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
9594
4424e0c3 95952009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
9596
9597 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
9598 srv_tgtobj.
9599
912cf4ba
PA
96002009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
9601 Pedro Alves <pedro@codesourcery.com>
9602
9603 * win32-i386-low.c (i386_get_thread_context): Handle systems that
9604 don't support CONTEXT_EXTENDED_REGISTERS.
9605 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
9606 (the_low_target): Install them.
9607 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
9608 failing with ERROR_PIPE_NOT_CONNECTED.
9609
aa5ca48f
DE
96102009-06-30 Doug Evans <dje@google.com>
9611 Pierre Muller <muller@ics.u-strasbg.fr>
9612
9613 Add h/w watchpoint support to x86-linux, win32-i386.
9614 * Makefile.in (SFILES): Add i386-low.c
9615 (i386_low_h): Define.
9616 (i386-low.o): Add dependencies.
9617 (linux-x86-low.o): Add i386-low.h dependency.
9618 (win32-i386-low.o): Ditto.
9619 * i386-low.c: New file.
9620 * i386-low.h: New file.
9621 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
9622 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
9623 * linux-low.c (linux_add_process): Initialize arch_private.
9624 (linux_remove_process): Free arch_private.
9625 (add_lwp): Initialize arch_private.
9626 (delete_lwp): Free arch_private.
9627 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
9628 provided.
9629 * linux-low.h (process_info_private): New member arch_private.
9630 (lwp_info): New member arch_private.
9631 (linux_target_ops): New members new_process, new_thread,
9632 prepare_to_resume.
9633 (ptid_of): New macro.
9634 * linux-x86-low.c: Include stddef.h, i386-low.h.
9635 (arch_process_info): New struct.
9636 (arch_lwp_info): New struct.
9637 (x86_linux_dr_get, x86_linux_dr_set): New functions.
9638 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
9639 (i386_dr_low_get_status): New function.
9640 (x86_insert_point, x86_remove_point): New functions.
9641 (x86_stopped_by_watchpoint): New function.
9642 (x86_stopped_data_address): New function.
9643 (x86_linux_new_process, x86_linux_new_thread): New functions.
9644 (x86_linux_prepare_to_resume): New function.
9645 (the_low_target): Add entries for insert_point, remove_point,
9646 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
9647 prepare_to_resume.
9648 * server.c (debug_hw_points): New global.
9649 (monitor_show_help): Document set debug-hw-points.
9650 (handle_query): Process "set debug-hw-points".
9651 * server.h (debug_hw_points): Declare.
9652 (paddress): Declare.
9653 * utils.c (NUMCELLS, CELLSIZE): New macros.
9654 (get_sell, xsnprintf, paddress): New functions.
9655 * win32-arm-low.c (the_low_target): Add entries for insert_point,
9656 remove_point, stopped_by_watchpoint, stopped_data_address.
9657 * win32-i386-low.c: Include i386-low.h.
9658 (debug_reg_state): Replaces dr.
9659 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
9660 (i386_dr_low_get_status): New function.
9661 (i386_insert_point, i386_remove_point): New functions.
9662 (i386_stopped_by_watchpoint): New function.
9663 (i386_stopped_data_address): New function.
9664 (i386_initial_stuff): Update.
9665 (get_thread_context,set_thread_context,i386_thread_added): Update.
9666 (the_low_target): Add entries for insert_point,
9667 remove_point, stopped_by_watchpoint, stopped_data_address.
9668 * win32-low.c (win32_insert_watchpoint): New function.
9669 (win32_remove_watchpoint): New function.
9670 (win32_stopped_by_watchpoint): New function.
9671 (win32_stopped_data_address): New function.
9672 (win32_target_ops): Add entries for insert_watchpoint,
9673 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
9674 * win32-low.h (win32_target_ops): New members insert_point,
9675 remove_point, stopped_by_watchpoint, stopped_data_address.
9676
d993e290
PA
96772009-06-25 Pedro Alves <pedro@codesourcery.com>
9678
9679 * server.c (process_serial_event): Re-return unsupported, not
9680 error, if the type isn't recognized. Re-allow supporting only
9681 insert or remove packets. Also call require_running for
9682 breakpoints. Add missing break statement to default case. Tidy.
9683 * target.h (struct target_ops): Rename insert_watchpoint to
9684 insert_point, and remove_watchpoint to remove_point.
9685
9686 * linux-low.h (struct linux_target_ops): Likewise.
9687 * linux-low.c (linux_insert_watchpoint): Rename to ...
9688 (linux_insert_point): ... this. Adjust.
9689 (linux_remove_watchpoint): Rename to ...
9690 (linux_remove_point): ... this. Adjust.
9691 (linux_target_ops): Adjust.
9692 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
9693 (cris_insert_point): ... this.
9694 (cris_remove_watchpoint): Rename to ...
9695 (cris_remove_point): ... this.
9696 (the_low_target): Adjust.
9697
0f54c268
PM
96982009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
9699
9700 * server.c (handle_v_kill): Pass signal_pid to
9701 kill_inferior if multi_process is zero.
9702
c6314022
AR
97032009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
9704
9705 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
9706 * target.h (target_ops): Comment for *_watchpoint to make it clear
9707 the functions can get types '0' and '1'.
9708
4463ce24
AR
97092009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
9710
9711 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
9712 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
9713 * regcache.c (get_regcache): Likewise.
9714 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
9715 * win32-low.c (child_fetch_inferior_registers): Remove check for
9716 regno 0.
9717
cf8fd78b
PA
97182009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
9719 Pedro Alves <pedro@codesourcery.com>
9720
9721 * target.h (struct target_ops) <supports_multi_process>: New
9722 callback.
9723 (target_supports_multi_process): New.
9724 * server.c (handle_query): Even if GDB reports support, only
9725 enable multi-process if the target also supports it. Report
9726 multi-process support only if the target backend supports it.
9727 * linux-low.c (linux_supports_multi_process): New function.
9728 (linux_target_ops): Install it as target_supports_multi_process
9729 callback.
9730
47c0c975
DE
97312009-05-24 Doug Evans <dje@google.com>
9732
e09875d4
DE
9733 Global renaming of find_thread_pid to find_thread_ptid.
9734 * server.h (find_thread_ptid): Renamed from find_thread_pid.
9735 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
9736 All callers updated.
9737
e27d73f6
DE
9738 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
9739 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
9740 directly.
9741
47c0c975
DE
9742 * linux-low.c (get_stop_pc): Print pc if debug_threads.
9743 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
9744 (linux_resume_one_lwp): Ditto.
9745
2acc282a
DE
97462009-05-23 Doug Evans <dje@google.com>
9747
9748 * linux-low.c (linux_resume_one_lwp): Change type of first arg
9749 from struct inferior_list_entry * to struct lwp_info *.
9750 All callers updated.
9751
9f1036c1
DE
97522009-05-13 Doug Evans <dje@google.com>
9753
9754 * linux-x86-low.c: Don't include assert.h.
9755 (x86_siginfo_fixup): Use fatal, not assert.
9756 (x86_arch_setup): Fix comment.
9757
d0722149
DE
97582009-05-12 Doug Evans <dje@google.com>
9759
9760 Biarch support for i386/amd64 gdbserver.
9761 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
9762 Add linux-x86-low.c.
9763 (linux-i386-low.o, linux-x86-64-low.o): Delete.
9764 (linux-x86-low.o): Add.
9765 * linux-x86-64-low.c: Delete.
9766 * linux-i386-low.c: Delete.
9767 * linux-x86-low.c: New file.
9768 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
9769 linux-x86-low.o.
9770 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
9771 linux-x86-low.o.
9772 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
9773 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
9774 (linux_child_pid_to_exec_file): New function.
9775 (elf_64_header_p, elf_64_file_p): New functions.
9776 (siginfo_fixup): New function.
9777 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
9778 give target a chance to convert layout.
9779 * linux-low.h (linux_target_ops): New member siginfo_fixup.
9780 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
9781
fdeb2a12
DE
97822009-05-07 Doug Evans <dje@google.com>
9783
9784 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
9785 (regsets_store_inferior_registers): Ditto.
9786
a6dbe5df
PA
97872009-05-06 Pedro Alves <pedro@codesourcery.com>
9788
9789 PR server/10048
9790
9791 * linux-low.c (must_set_ptrace_flags): Delete.
9792 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
9793 of the global.
9794 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
9795 `lwp->must_set_ptrace_flags' instead.
ba42693b 9796 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
9797 (linux_wait_1): ... not here.
9798
5091eb23
DE
97992009-04-30 Doug Evans <dje@google.com>
9800
9f767825
DE
9801 * inferiors.c (started_inferior_callback): New function.
9802 (attached_inferior_callback): New function.
9803 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
9804 * server.c (print_started_pid, print_attached_pid): New functions.
9805 (detach_or_kill_for_exit): New function.
9806 (main): Call it instead of for_each_inferior (kill_inferior_callback).
9807 * server.h (have_started_inferiors_p): Declare.
9808 (have_attached_inferiors_p): Declare.
9809
5091eb23
DE
9810 * inferiors.c (remove_process): Fix memory leak, free process.
9811 * linux-low.c (linux_remove_process): New function.
9812 (linux_kill): Call it instead of remove_process.
9813 (linux_detach, linux_wait_1): Ditto.
9814
155c8968
PA
98152009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
9816
9817 * configure.srv: Add x86 Windows CE target.
9818
7fe519cb
UW
98192009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
9820
9821 * inferiors.c (get_thread_process): Make global.
9822 * server.h (get_thread_process): Add prototype.
9823 * thread-db.c (find_one_thread): Use get_thread_process
9824 instead of current_process.
9825 (thread_db_get_tls_address): Do not crash if called when
9826 thread layer is not yet initialized.
9827
5472f405
UW
98282009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
9829
9830 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
9831 * spu-low.c (current_tid): Rename to ...
9832 (current_ptid): ... this.
9833 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
9834 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
9835 ptid_get_lwp (current_ptid) instead of current_tid.
9836 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
9837 instead of current_tid. Use find_process_pid to verify pid
9838 argument is valid. Pass proper argument to remove_process.
9839 (spu_thread_alive): Compare current_ptid instead of current_tid.
9840 (spu_resume): Likewise.
9841
55ac2b99
PA
98422009-04-02 Pedro Alves <pedro@codesourcery.com>
9843
9844 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
9845 variable.
9846
95954743
PA
98472009-04-01 Pedro Alves <pedro@codesourcery.com>
9848
9849 Implement the multiprocess extensions, and add linux multiprocess
9850 support.
9851
9852 * server.h (ULONGEST): Declare.
9853 (struct ptid, ptid_t): New.
9854 (minus_one_ptid, null_ptid): Declare.
9855 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
9856 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
9857 (struct inferior_list_entry): Change `id' type from unsigned from
9858 to ptid_t.
9859 (struct sym_cache, struct breakpoint, struct
9860 process_info_private): Forward declare.
9861 (struct process_info): Declare.
9862 (current_process): Declare.
9863 (all_processes): Declare.
9864 (initialize_inferiors): Declare.
9865 (add_thread): Adjust to use ptid_t.
9866 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
9867 (add_process, remove_process, find_thread_pid): Declare.
9868 (find_inferior_id): Adjust to use ptid_t.
9869 (cont_thread, general_thread, step_thread): Change type to ptid_t.
9870 (multi_process): Declare.
9871 (push_event): Adjust to use ptid_t.
9872 (read_ptid, write_ptid): Declare.
9873 (prepare_resume_reply): Adjust to use ptid_t.
9874 (clear_symbol_cache): Declare.
9875 * inferiors.c (all_processes): New.
9876 (null_ptid, minus_one_ptid): New.
9877 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
9878 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
9879 (add_thread): Change unsigned long to ptid. Remove gdb_id
9880 parameter. Adjust.
9881 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
9882 (gdb_id_to_thread): Rename to ...
9883 (find_thread_pid): ... this. Change unsigned long to ptid.
9884 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
9885 (loaded_dll, pull_pid_from_list): Adjust.
9886 (add_process, remove_process, find_process_pid)
9887 (get_thread_process, current_process, initialize_inferiors): New.
9888 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
9889 (struct target_waitstatus) <related_pid>: Ditto.
9890 (struct target_ops) <kill, detach>: Add `pid' argument. Change
9891 return type to int.
9892 (struct target_ops) <join>: Add `pid' argument.
9893 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
9894 (struct target_ops) <wait>: Add `ptid' field. Change return type
9895 to ptid.
9896 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
9897 (mywait): Add `ptid' argument. Change return type to ptid_t.
9898 (target_pid_to_str): Declare.
9899 * target.c (set_desired_inferior): Adjust to use ptids.
9900 (mywait): Add new `ptid' argument. Adjust.
9901 (target_pid_to_str): New.
9902 * mem-break.h (free_all_breakpoints): Declare.
9903 * mem-break.c (breakpoints): Delelete.
9904 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
9905 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
9906 to use per-process breakpoint list.
9907 (free_all_breakpoints): New.
9908 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
9909 (symbol_cache, all_symbols_looked_up): Delete.
9910 (hexchars): New.
9911 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
9912 read_ptid): New.
9913 (prepare_resume_reply): Change ptid argument's type from unsigned
9914 long to ptid_t. Adjust. Implement W;process and X;process.
9915 (free_sym_cache, clear_symbol_cache): New.
9916 (look_up_one_symbol): Adjust to per-process symbol cache. *
9917 * server.c (cont_thread, general_thread, step_thread): Change type
9918 to ptid_t.
9919 (attached): Delete.
9920 (multi_process): New.
9921 (last_ptid): Change type to ptid_t.
9922 (struct vstop_notif) <ptid>: Change type to ptid_t.
9923 (queue_stop_reply, push_event): Change `ptid' argument's type to
9924 ptid_t.
9925 (discard_queued_stop_replies): Add `pid' argument.
9926 (start_inferior): Adjust to use ptids. Adjust to mywait interface
9927 changes. Don't reference the `attached' global.
9928 (attach_inferior): Adjust to mywait interface changes.
9929 (handle_query): Adjust to use ptids. Parse GDB's qSupported
9930 features. Handle and report "multiprocess+". Handle
9931 "qAttached:PID".
9932 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
9933 changes.
9934 (handle_v_kill): New.
9935 (handle_v_stopped): Adjust to use target_pid_to_str.
9936 (handle_v_requests): Allow multiple attaches and runs when
9937 multiprocess extensions are in effect. Handle "vKill".
9938 (myresume): Adjust to use ptids.
9939 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
9940 (handle_status): Adjust to discard_queued_stop_replies interface
9941 change.
9942 (first_thread_of, kill_inferior_callback)
9943 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
9944 (main): Call initialize_inferiors. Adjust to use ptids, killing
9945 and detaching from all inferiors. Handle multiprocess packet
9946 variants.
9947 * linux-low.h: Include gdb_proc_service.h.
9948 (struct process_info_private): New.
9949 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
9950 <lwpid_of>: Use ptid_get_lwp.
9951 (get_lwp_thread): Adjust.
9952 (struct lwp_info): Add `dead' member.
9953 (find_lwp_pid): Declare.
9954 * linux-low.c (thread_db_active): Delete.
9955 (new_inferior): Adjust comment.
9956 (inferior_pid): Delete.
9957 (linux_add_process): New.
9958 (handle_extended_wait): Adjust.
9959 (add_lwp): Change unsigned long to ptid.
9960 (linux_create_inferior): Add process to processes table. Adjust
9961 to use ptids. Don't set new_inferior here.
9962 (linux_attach_lwp): Rename to ...
9963 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
9964 it. Adjust to use ptids.
9965 (linux_attach_lwp): New.
9966 (linux_attach): Add process to processes table. Don't set
9967 new_inferior here.
9968 (struct counter): New.
9969 (second_thread_of_pid_p, last_thread_of_process_p): New.
9970 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
9971 multiple processes.
9972 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
9973 processes. Remove process from process table.
9974 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
9975 to multiple processes.
9976 (any_thread_of): New.
9977 (linux_detach): Add `pid' argument, and handle it. Remove process
9978 from processes table.
9979 (linux_join): Add `pid' argument. Handle it.
9980 (linux_thread_alive): Change unsighed long argument to ptid_t.
9981 Consider dead lwps as not being alive.
9982 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
9983 threads we're not interested in.
9984 (same_lwp, find_lwp_pid): New.
9985 (linux_wait_for_lwp): Change `pid' argument's type from int to
9986 ptid_t. Adjust.
9987 (linux_wait_for_event): Rename to ...
9988 (linux_wait_for_event_1): ... this. Change `pid' argument's type
9989 from int to ptid_t. Adjust.
9990 (linux_wait_for_event): New.
9991 (linux_wait_1): Add `ptid' argument. Change return type to
9992 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
9993 that exit from the process table.
9994 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
9995 Adjust.
9996 (mark_lwp_dead): New.
9997 (wait_for_sigstop): Adjust to use ptids. If a process exits while
9998 stopping all threads, mark its main lwp as dead.
9999 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
10000 ptids.
10001 (fetch_register, usr_store_inferior_registers)
10002 (regsets_fetch_inferior_registers)
10003 (regsets_store_inferior_registers, linux_read_memory)
10004 (linux_write_memory): Inline `inferior_pid'.
10005 (linux_look_up_symbols): Adjust to use per-process
10006 `thread_db_active'.
10007 (linux_request_interrupt): Adjust to use ptids.
10008 (linux_read_auxv): Inline `inferior_pid'.
10009 (initialize_low): Don't reference thread_db_active.
10010 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
10011 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
10012 (ps_getpid): Return the pid of the current inferior.
10013 * thread-db.c (proc_handle, thread_agent): Delete.
10014 (thread_db_create_event, thread_db_enable_reporting): Adjust to
10015 per-process data.
10016 (find_one_thread): Change argument type to ptid_t. Adjust to
10017 per-process data.
10018 (maybe_attach_thread): Adjust to per-process data and ptids.
10019 (thread_db_find_new_threads): Ditto.
10020 (thread_db_init): Ditto.
10021 * spu-low.c (spu_create_inferior, spu_attach): Add process to
10022 processes table. Adjust to use ptids.
10023 (spu_kill, spu_detach): Adjust interface. Remove process from
10024 processes table.
10025 (spu_join, spu_thread_alive): Adjust interface.
10026 (spu_wait): Adjust interface. Remove process from processes
10027 table. Adjust to use ptids.
10028 * win32-low.c (current_inferior_tid): Delete.
10029 (current_inferior_ptid): New.
10030 (debug_event_ptid): New.
10031 (thread_rec): Take a ptid. Adjust.
10032 (child_add_thread): Add `pid' argument. Adjust to use ptids.
10033 (child_delete_thread): Ditto.
10034 (do_initial_child_stuff): Add `attached' argument. Add process to
10035 processes table.
10036 (child_fetch_inferior_registers, child_store_inferior_registers):
10037 Adjust.
10038 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
10039 (win32_attach): Pass 1 to do_initial_child_stuff.
10040 (win32_kill): Adjust interface. Remove process from processes
10041 table.
10042 (win32_detach): Ditto.
10043 (win32_join): Adjust interface.
10044 (win32_thread_alive): Take a ptid.
10045 (win32_resume): Adjust to use ptids.
10046 (get_child_debug_event): Ditto.
10047 (win32_wait): Adjust interface. Remove exiting process from
10048 processes table.
10049
bd99dc85
PA
100502009-04-01 Pedro Alves <pedro@codesourcery.com>
10051
10052 Non-stop mode support.
10053
10054 * server.h (non_stop): Declare.
10055 (gdb_client_data, handler_func): Declare.
10056 (delete_file_handler, add_file_handler, start_event_loop):
10057 Declare.
10058 (handle_serial_event, handle_target_event, push_event)
10059 (putpkt_notif): Declare.
10060 * target.h (enum resume_kind): New.
10061 (struct thread_resume): Replace `step' field by `kind' field.
10062 (TARGET_WNOHANG): Define.
10063 (struct target_ops) <wait>: Add `options' argument.
10064 <supports_non_stop, async, start_non_stop>: New fields.
10065 (target_supports_non_stop, target_async): New.
10066 (start_non_stop): Declare.
10067 (mywait): Add `options' argument.
10068 * target.c (mywait): Add `options' argument. Print child exit
10069 notifications here.
10070 (start_non_stop): New.
10071 * server.c (non_stop, own_buf, mem_buf): New globals.
10072 (struct vstop_notif): New.
10073 (notif_queue): New global.
10074 (queue_stop_reply, push_event, discard_queued_stop_replies)
10075 (send_next_stop_reply): New.
10076 (start_inferior): Adjust to use resume_kind. Adjust to mywait
10077 interface changes.
10078 (attach_inferior): In non-stop mode, don't wait for the target
10079 here.
10080 (handle_general_set): Handle QNonStop.
10081 (handle_query): When handling qC, return the current general
10082 thread, instead of the first thread of the list.
10083 (handle_query): If the backend supports non-stop mode, include
10084 QNonStop+ in the qSupported query response.
10085 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
10086 and non-stop mode.
10087 (handle_v_attach, handle_v_run): Handle non-stop mode.
10088 (handle_v_stopped): New.
10089 (handle_v_requests): Report support for vCont;t. Handle vStopped.
10090 (myresume): Adjust to use resume_kind. Handle non-stop.
10091 (queue_stop_reply_callback): New.
10092 (handle_status): Handle non-stop mode.
10093 (main): Clear non_stop flag on reconnection. Use the event-loop.
10094 Refactor serial protocol handling from here ...
10095 (process_serial_event): ... to this new function. When GDB
10096 selects any thread, select one here. In non-stop mode, wait until
10097 GDB acks all pending events before exiting.
10098 (handle_serial_event, handle_target_event): New.
10099 * remote-utils.c (remote_open): Install remote_desc in the event
10100 loop.
10101 (remote_close): Remove remote_desc from the event loop.
10102 (putpkt_binary): Rename to...
10103 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
10104 (putpkt_binary): New as wrapper around putpkt_binary_1.
10105 (putpkt_notif): New.
10106 (prepare_resume_reply): In non-stop mode, don't change the
10107 general_thread.
10108 * event-loop.c: New.
10109 * Makefile.in (OBJ): Add event-loop.o.
10110 (event-loop.o): New rule.
10111
10112 * linux-low.h (pid_of): Moved here.
10113 (lwpid_of): New.
10114 (get_lwp_thread): Use lwpid_of.
10115 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
10116 * linux-low.c (pid_of): Delete.
10117 (inferior_pid): Use lwpid_of.
10118 (linux_event_pipe): New.
10119 (target_is_async_p): New.
10120 (delete_lwp): New.
10121 (handle_extended_wait): Use lwpid_of.
10122 (add_lwp): Don't set lwpid field.
10123 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
10124 (linux_kill_one_lwp): If killing a running lwp, stop it first.
10125 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
10126 (linux_detach_one_lwp): If detaching from a running lwp, stop it
10127 first. Adjust to linux_wait_for_event interface changes. Use
10128 lwpid_of.
10129 (linux_detach): Don't delete the main lwp here.
10130 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
10131 (status_pending_p): Don't consider explicitly suspended lwps.
10132 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
10133 pointer. Add OPTIONS argument. Change return type to int. Use
10134 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
10135 (linux_wait_for_event): Take an integer pid instead of a lwp_info
10136 pointer. Add status pointer argument. Return a pid instead of a
10137 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
10138 changes. In non-stop mode, don't switch to a random thread.
10139 (linux_wait): Rename to...
10140 (linux_wait_1): ... this. Add target_options argument, and handle
10141 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
10142 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
10143 clean exit and signal exit code. Don't stop all threads in
10144 non-stop mode. In all-stop mode, only stop all threads when
10145 reporting a stop to GDB. Handle explicit thread stop requests.
10146 (async_file_flush, async_file_mark): New.
10147 (linux_wait): New.
10148 (send_sigstop): Use lwpid_of.
10149 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
10150 interface changes. In non-stop mode, don't switch to a random
10151 thread.
10152 (linux_resume_one_lwp): Use lwpid_of.
10153 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
10154 (linux_resume_one_thread): ... this. Handle resume_stop. In
10155 non-stop mode, don't look for pending flag in all threads.
10156 (resume_status_pending_p): Don't consider explicitly suspended
10157 threads.
10158 (my_waitpid): Reimplement. Emulate __WALL.
10159 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
10160 Use lwpid_of.
10161 (sigchld_handler, linux_supports_non_stop, linux_async)
10162 (linux_start_non_stop): New.
10163 (linux_target_ops): Register linux_supports_non_stop, linux_async
10164 and linux_start_non_stop.
10165 (initialize_low): Install SIGCHLD handler.
10166 * thread-db.c (thread_db_create_event, find_one_thread)
10167 (thread_db_get_tls_address): Use lwpid_of.
10168 * win32-low.c (win32_detach): Adjust to use resume_kind.
10169 (win32_wait): Add `options' argument.
10170 * spu-low.c (spu_resume): Adjust to use resume_kind.
10171 (spu_wait): Add `options' argument.
10172
5b1c542e
PA
101732009-04-01 Pedro Alves <pedro@codesourcery.com>
10174
10175 Decouple target code from remote protocol.
10176
10177 * target.h (enum target_waitkind): New.
10178 (struct target_waitstatus): New.
10179 (struct target_ops) <wait>: Return an unsigned long. Take a
10180 target_waitstatus pointer instead of a char pointer.
10181 (mywait): Likewise.
10182 * target.c (mywait): Change prototype to return an unsigned long.
10183 Take a target_waitstatus pointer instead of a char pointer. Adjust.
10184 * server.h (thread_from_wait, old_thread_from_wait): Delete
10185 declarations.
10186 (prepare_resume_reply): Change prototype to take a
10187 target_waitstatus.
10188 * server.c (thread_from_wait, old_thread_from_wait): Delete.
10189 (last_status, last_ptid): New.
10190 (start_inferior): Remove "statusptr" argument. Adjust. Return a
10191 pid instead of a signal.
10192 (attach_inferior): Remove "status" and "signal" parameters.
10193 Adjust.
10194 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
10195 not as an address.
10196 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
10197 (handle_v_requests, myresume): Remove "status" and "signal"
10198 parameters. Adjust.
10199 (handle_status): New.
10200 (main): Delete local `status'. Adjust.
10201 * remote-utils.c: Include target.h.
10202 (prepare_resume_reply): Change prototype to take a
10203 target_waitstatus. Adjust.
10204
10205 * linux-low.c (linux_wait): Adjust to new target_ops->wait
10206 interface.
10207 * spu-low.c (spu_wait): Adjust.
10208 * win32-low.c (enum target_waitkind, struct target_waitstatus):
10209 Delete.
10210 (win32_wait): Adjust.
10211
2bd7c093
PA
102122009-04-01 Pedro Alves <pedro@codesourcery.com>
10213
10214 * target.h (struct thread_resume): Delete leave_stopped member.
10215 (struct target_ops): Add a `n' argument to the `resume' callback.
10216 * server.c (start_inferior): Adjust.
10217 (handle_v_cont, myresume): Adjust.
10218 * linux-low.c (check_removed_breakpoint): Adjust to resume
10219 interface change, and to removed leave_stopped field.
10220 (resume_ptr): Delete.
10221 (struct thread_resume_array): New.
10222 (linux_set_resume_request): Add new `arg' parameter. Adjust to
10223 resume interface change.
10224 (linux_continue_one_thread, linux_queue_one_thread)
10225 (resume_status_pending_p): Check if the resume field is NULL
10226 instead of checking the leave_stopped member.
10227 (linux_resume): Adjust to the target resume interface change.
10228 * spu-low.c (spu_resume): Adjust to the target resume interface
10229 change.
10230 * win32-low.c (win32_detach, win32_resume): Ditto.
10231
c35fafde
PA
102322009-04-01 Pedro Alves <pedro@codesourcery.com>
10233
10234 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
10235 flag.
10236 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
10237 pending.
10238 (linux_continue_one_thread): Only preserve the stepping flag if
10239 there's a pending breakpoint.
10240
0a59d50b
PA
102412009-03-31 Pedro Alves <pedro@codesourcery.com>
10242
10243 * server.c (main): After the inferior having exited, call
10244 remote_close before exiting gdbserver.
10245
f04c6d38
TJB
102462009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
10247
10248 Fix size of FPSCR in Power 7 processors.
10249 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
10250 (PPC_FEATURE_HAS_DFP): New #define.
10251 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
10252 size of the FPSCR.
10253
78e5cee6
PA
102542009-03-23 Pedro Alves <pedro@codesourcery.com>
10255
10256 * server.c (handle_query) Whitespace and formatting.
10257
1b3f6016
PA
102582009-03-22 Pedro Alves <pedro@codesourcery.com>
10259
10260 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
10261 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
10262 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
10263 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
10264 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
10265 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
10266 Makefile.in, configure.ac: Fix whitespace throughout.
10267 * configure: Regenerate.
10268
a07b2135
PA
102692009-03-22 Pedro Alves <pedro@codesourcery.com>
10270
10271 * inferiors.c (find_inferior): Make it safe for the callback
10272 function to delete the currently iterated inferior.
10273
67cc2626
PA
102742009-03-22 Pedro Alves <pedro@codesourcery.com>
10275
10276 * Makefile.in (linuw_low_h): Move higher.
10277 (thread-db.o): Depend on $(linux_low_h).
10278
54a0b537
PA
102792009-03-17 Pedro Alves <pedro@codesourcery.com>
10280
10281 Rename "process" to "lwp" throughout.
10282
10283 * linux-low.c (all_processes): Rename to...
10284 (all_lwps): ... this.
10285 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
10286 (add_process): Rename to ...
10287 (add_lwp): ... this. Adjust.
10288 (linux_create_inferior): Adjust.
10289 (linux_attach_lwp): Adjust.
10290 (linux_attach): Adjust.
10291 (linux_kill_one_process): Rename to ...
10292 (linux_kill_one_lwp): ... this. Adjust.
10293 (linux_kill): Adjust.
10294 (linux_detach_one_process): Rename to ...
10295 (linux_detach_one_lwp): ... this. Adjust.
10296 (linux_detach): Adjust.
10297 (check_removed_breakpoint): Adjust.
10298 (status_pending_p): Adjust.
10299 (linux_wait_for_process): Rename to ...
10300 (linux_wait_for_lwp): ... this. Adjust.
10301 (linux_wait_for_event): Adjust.
10302 (send_sigstop): Adjust.
10303 (wait_for_sigstop): Adjust.
10304 (stop_all_processes): Rename to ...
10305 (stop_all_lwps): ... this.
10306 (linux_resume_one_process): Rename to ...
10307 (linux_resume_one_lwp): ... this. Adjust.
10308 (linux_set_resume_request, linux_continue_one_thread)
10309 (linux_queue_one_thread, resume_status_pending_p)
10310 (usr_store_inferior_registers, regsets_store_inferior_registers)
10311 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
10312 Adjust.
10313 * linux-low.h (get_process): Rename to ...
10314 (get_lwp): ... this. Adjust.
10315 (get_thread_process): Rename to ...
10316 (get_thread_lwp): ... this. Adjust.
10317 (get_process_thread): Rename to ...
10318 (get_lwp_thread): ... this. Adjust.
10319 (struct process_info): Rename to ...
10320 (struct lwp_info): ... this.
10321 (all_processes): Rename to ...
10322 (all_lwps): ... this.
10323 * proc-service.c (ps_lgetregs): Adjust.
10324 * thread-db.c (thread_db_create_event, find_one_thread)
10325 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
10326
0b16c5cf
PA
103272009-03-14 Pedro Alves <pedro@codesourcery.com>
10328
10329 * server.c (handle_query): Handle "qAttached".
10330
32de4b9d
NS
103312009-03-13 Nathan Sidwell <nathan@codesourcery.com>
10332
10333 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
10334 GPLv3, update license URL.
10335
2aecd87f
DE
103362009-03-01 Doug Evans <dje@google.com>
10337
93efd302 10338 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
10339 (server_h): Add gdb_signals.h.
10340 (signals.o): Update.
10341 * server.h (target_signal_from_host,target_signal_to_host_p)
10342 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
10343
86b1f9c5
PM
103442009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
10345
10346 * remote-utils.c (getpkt): Also generate remote-debug
10347 information if noack_mode is set.
10348
4aa995e1
PA
103492009-02-06 Pedro Alves <pedro@codesourcery.com>
10350
10351 * server.c (handle_query): Report qXfer:siginfo:read and
10352 qXfer:siginfo:write as supported and handle them.
10353 * target.h (struct target_ops) <qxfer_siginfo>: New field.
10354 * linux-low.c (linux_xfer_siginfo): New.
10355 (linux_target_ops): Set it.
10356
62709adf
PA
103572009-01-26 Pedro Alves <pedro@codesourcery.com>
10358
10359 * server.c (gdbserver_usage): Mention --remote-debug.
10360 (main): Accept '--remote-debug' switch.
10361
aef93bd7
DE
103622009-01-18 Doug Evans <dje@google.com>
10363
10364 * regcache.c (new_register_cache): No need to check result of xcalloc.
10365 * server.c (handle_search_memory): Back out calls to xmalloc,
10366 result is checked and error is returned to user upon failure.
10367 (handle_query): Ditto. Add more checks for result of malloc.
10368 (handle_v_cont): Check result of malloc, report error back to
10369 user upon failure.
10370 (handle_v_run): Ditto. Call freeargv.
10371 * server.h (freeargv): Declare.
10372 * utils.c (freeargv): New fn.
10373
54363045
DE
103742009-01-15 Doug Evans <dje@google.com>
10375
f626972c
DE
10376 * gdbreplay.c (perror_with_name): Make arg const char *.
10377 * server.h (target_signal_to_name): Make return type const char *.
0842e787 10378 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 10379 * utils.c (perror_with_name): Make arg const char *.
54363045 10380
18aae699
PA
103812009-01-14 Pedro Alves <pedro@codesourcery.com>
10382
10383 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
10384 when handling a EXIT_PROCESS_DEBUG_EVENT.
10385
ff703abe
JB
103862009-01-06 Joel Brobecker <brobecker@adacore.com>
10387
10388 * gdbreplay.c (gdbreplay_version): Update copyright year.
10389 * server.c (gdbserver_version): Likewise.
10390
f21cc1a2 103912009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
10392
10393 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 10394 (handle_extended_wait): Improve comment.
0e21c1ec 10395
bca929d3
DE
103962008-12-13 Doug Evans <dje@google.com>
10397
10398 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
10399 * server.h (ATTR_MALLOC): New macro.
10400 (xmalloc,xcalloc,xstrdup): Declare.
10401 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
10402 * inferiors.c: Ditto.
10403 * linux-low.c: Ditto.
10404 * mem-break.c: Ditto.
10405 * regcache.c: Ditto.
10406 * remote-utils.c: Ditto.
10407 * server.c: Ditto.
10408 * target.c: Ditto.
10409 * win32-low.c: Ditto.
10410
97438e3f
DE
104112008-12-12 Doug Evans <dje@google.com>
10412
896c7fbb
DE
10413 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
10414 in debugging printf.
10415
97438e3f
DE
10416 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
10417
e3b886f8
DE
104182008-12-09 Doug Evans <dje@google.com>
10419
10420 * linux-low.h (struct process_info): Delete member tid, unused.
10421 * thread-db.c (find_one_thread): Update.
10422 (maybe_attach_thread): Update.
10423
07e059b5
VP
104242008-12-02 Pedro Alves <pedro@codesourcery.com>
10425
889bf7c5
PA
10426 * target.h (struct target_ops): Add qxfer_osdata member.
10427 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
10428 and dirent.h.
10429 (linux_qxfer_osdata): New functions.
10430 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
10431 callback.
10432 * server.c (handle_query): Handle "qXfer:osdata:read:".
10433 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
10434 (buffer_xml_printf): New functions.
10435 * server.h (struct buffer): New.
10436 (buffer_grow_str, buffer_grow_str0): New macros.
10437 (buffer_grow, buffer_free, buffer_init, buffer_finish)
10438 (buffer_xml_printf): Declare.
07e059b5 10439
4cab47ab
DE
104402008-11-24 Doug Evans <dje@google.com>
10441
10442 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
10443
f142445f
DJ
104442008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
10445
10446 * server.c (handle_v_run): Always use the supplied argument list.
10447
d0107bb6 104482008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 10449
d0107bb6
BW
10450 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
10451 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 10452
2c4ad781
TJB
104532008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
10454
10455 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
10456 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
10457 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
10458 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
10459 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
10460 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
10461 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
10462 XML target descriptions.
10463 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
10464 when inferior is running on an ISA 2.05 or later processor. Add
10465 special case to return offset for full 64-bit slot of FPSCR when
10466 in 32-bits.
10467
dfb64f85
DJ
104682008-11-14 Daniel Gutson <dgutson@codesourcery.com>
10469
10470 * Makefile.in (SFILES, clean): Added sparc64 files.
10471 (reg-sparc64.o, reg-sparc64.c): New.
10472 * configure.srv (sparc*-*-linux*): New configuration.
10473 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
10474 syscall arguments for SPARC.
10475 (regsets_store_inferior_registers): Likewise.
10476 * linux-sparc-low.c: New file.
10477
66b6e1dd
DE
104782008-10-21 Doug Evans <dje@google.com>
10479
10480 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
10481 (READLINE_DIR,READLINE_DEP): Delete.
10482 (INTERNAL_CFLAGS): Update.
10483 (LINTFLAGS): Update.
10484
9b710a42
PA
104852008-10-10 Pedro Alves <pedro@codesourcery.com>
10486
10487 * server.c (handle_v_run): If GDB didn't specify an argv, use the
10488 whole argv from the last run, not just argv[0].
10489
5822d809
PA
104902008-09-08 Pedro Alves <pedro@codesourcery.com>
10491
10492 * regcache.c (new_register_cache): Return NULL if the register
10493 cache size isn't known yet.
10494 (free_register_cache): Avoid dereferencing a NULL regcache.
10495
74aac56f
DJ
104962008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
10497
10498 * configure.srv: Merge MIPS and MIPS64.
10499
400b20f5
MR
105002008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
10501
10502 * Makefile.in (uninstall): Apply $(EXEEXT) too.
10503
677c5bb1
LM
105042008-08-18 Luis Machado <luisgpm@br.ibm.com>
10505
10506 * Makefile.in: Add required vsx dependencies.
10507
10508 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
10509 Declare init_registers_powerpc_vsx32l.
10510 Declare init_registers_powerpc_vsx64l.
10511 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
10512 (ppc_arch_setup): Check for VSX in hwcap.
10513 (ppc_fill_vsxregset): New function.
10514 (ppc_store_vsxregset): New function.
10515 Add new VSX entry in regset_info target_regsets.
10516
10517 * configure.srv: Add new VSX dependencies.
10518
a6f3e723
SL
105192008-08-12 Pedro Alves <pedro@codesourcery.com>
10520
10521 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
10522 (remote_open): Set or clear transport_is_reliable.
10523 (putpkt_binary): Don't expect acks in noack mode.
10524 (getpkt): Don't send ack/nac in noack mode.
10525 * server.c (handle_general_set): Handle QStartNoAckMode.
10526 (handle_query): If connected by tcp pass QStartNoAckMode+ in
10527 qSupported.
10528 (main): Reset noack_mode on every connection.
10529 * server.h (noack_mode): Declare.
10530
a417dc56
RW
105312008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
10532
10533 * Makefile.in (GDBREPLAY_OBS): New variable.
10534 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
10535
3221518c
UW
105362008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
10537 Daniel Jacobowitz <dan@codesourcery.com>
10538
10539 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
10540 (usr_store_inferior_registers): Likewise.
10541 (regsets_store_inferior_registers): Likewise.
10542
ec56be1b
PA
105432008-07-31 Rolf Jansen <rj@surtec.com>
10544 Pedro Alves <pedro@codesourcery.com>
10545
10546 * configure.ac: Check for memmem declaration.
10547 * server.c [HAVE_MALLOC_H]: Include malloc.h.
10548 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
10549 (disable_packet_qfThreadInfo): Unconditionally compile.
10550 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
10551 * configure, config.in: Regenerate.
10552
2fe5e3ff
DE
105532008-07-28 Doug Kwan <dougkwan@google.com>
10554
10555 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
10556 (linux_write_memory): Remove declaration of errno.
10557
836acd6d
UW
105582008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
10559
10560 * linux-low.c (handle_extended_wait): Do not use "status"
10561 variable uninitialized.
10562
aeba519e
PA
105632008-07-07 Pedro Alves <pedro@codesourcery.com>
10564
10565 * server.c (handle_v_attach): Inhibit reporting dll changes.
10566
db42f210
PA
105672008-06-27 Pedro Alves <pedro@codesourcery.com>
10568
10569 * remote-utils.c (prepare_resume_reply): If requested, don't
10570 output "thread:TID" in the T stop reply.
10571
10572 * server.c (disable_packet_vCont, disable_packet_Tthread)
10573 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
10574 (handle_query): If requested, disable support for qC, qfThreadInfo
10575 and qsThreadInfo.
10576 (handle_v_requests): If requested, disable support for vCont.
10577 (gdbserver_show_disableable): New.
10578 (main): Handle --disable-packet and --disable-packet=LIST.
10579
10580 * server.h (disable_packet_vCont, disable_packet_Tthread)
10581 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
10582
8e4c5421
CD
105832008-06-20 Carlos O'Donell <carlos@codesourcery.com>
10584
10585 * server.c (gdbserver_usage): Mention --version.
10586
6e23a804
DJ
105872008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
10588
10589 * Makefile.in (gdbreplay.o): New rule.
10590
90aa6a40
JM
105912008-06-06 Joseph Myers <joseph@codesourcery.com>
10592
10593 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
10594 message, not gdbserver.
10595
c16158bc 105962008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
10597 Nathan Sidwell <nathan@codesourcery.com>
10598 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
10599
10600 * acinclude.m4: Include ../../config/acx.m4.
10601 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
10602 * configure, config.in: Regenerate.
10603 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
10604 * server.c (gdbserver_version): Print PKGVERSION.
10605 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
10606 (main): Adjust gdbserver_usage calls.
10607 * gdbreplay.c (version, host_name): Add declarations.
10608 (gdbreplay_version, gdbreplay_usage): New.
10609 (main): Accept --version and --help options.
10610
aeb75bf5
DJ
106112008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
10612
10613 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
10614 (arm_breakpoint_at): Handle Thumb.
10615 (the_low_target): Add comment.
10616
76b233dd
UW
106172008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
10618
10619 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
10620
08388c79
DE
106212008-05-09 Doug Evans <dje@google.com>
10622
a3c83fae
DE
10623 * server.h (decode_search_memory_packet): Declare.
10624 * remote-utils.c (decode_search_memory_packet): New fn.
10625 * server.c (handle_search_memory_1): New fn.
08388c79
DE
10626 (handle_search_memory): New fn.
10627 (handle_query): Process qSearch:memory packets.
10628
bb9c3d36
UW
106292008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
10630
10631 * regcache.c (registers_length): Remove.
10632 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
10633 full register packet.
10634 * regcache.h (registers_length): Remove prototype.
10635 * server.h (PBUFSIZ): Define to 16384.
10636
7284e1be
UW
106372008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
10638
10639 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
10640 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
10641 powerpc-64l.o, and powerpc-altivec64l.o.
10642 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
10643 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
10644 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
10645 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
10646 rs6000/power-linux.xml, and rs6000/power64-linux.xml
10647 to srv_xmlfiles.
10648
10649 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
10650 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
10651 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
10652 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
10653 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
10654 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
10655 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
10656 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
10657 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
10658 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
10659 (clean): Update.
10660
10661 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
10662 (init_registers_powerpc_32l): ... this new prototype.
10663 (init_registers_powerpc_32): Remove, replace by ...
10664 (init_registers_powerpc_altivec32l): ... this new prototype.
10665 (init_registers_powerpc_e500): Remove, replace by ...
10666 (init_registers_powerpc_e500l): ... this new prototype.
10667 (init_registers_ppc64): Remove, replace by ...
10668 (init_registers_powerpc_64l): ... this new prototype.
10669 (init_registers_powerpc_64): Remove, replace by ...
10670 (init_registers_powerpc_altivec64l): ... this new prototype.
10671 (ppc_num_regs): Set to 73.
10672 (PT_ORIG_R3, PT_TRAP): Define if necessary.
10673 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
10674 (ppc_cannot_store_register): Handle orig_r3 and trap.
10675 (ppc_arch_setup): Update init_registers_... calls.
10676 (ppc_fill_gregset): Handle orig_r3 and trap.
10677
10678 * inferiors.c (clear_inferiors): Reset current_inferior.
10679
fdc59709
PB
106802008-04-23 Paolo Bonzini <bonzini@gnu.org>
10681
889bf7c5
PA
10682 * acinclude.m4: Add override.m4.
10683 * configure: Regenerate.
fdc59709 10684
c9b2f845
UW
106852008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
10686
10687 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
10688 initial call to init_register_ppc64.
10689
550512b8
UW
106902008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
10691
43aaf8b6
PA
10692 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
10693 single powerpc*-*-linux* case.
550512b8
UW
10694 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
10695
b6430ec3
UW
106962008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
10697
10698 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 10699 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
10700 from reg_xmlfiles.
10701 * linux-ppc-low.c: Include <elf.h>.
10702 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
10703 (ppc_hwcap): New global variable.
10704 (ppc_regmap): Remove __SPE__ #ifdef sections.
10705 (ppc_regmap_e500): New global variable.
10706 (ppc_cannot_store_register): Update __SPE__ special case.
10707 (ppc_get_hwcap): New function.
10708 (ppc_arch_setup): Use it to determine whether inferior supports
10709 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
10710 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
10711 Do not access registers if target does not support AltiVec.
10712 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
10713 Do not access registers if target does not support SPE.
10714 (target_regsets): Unconditionally include AltiVec and SPE regsets.
10715
52fa2412
UW
107162008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
10717
10718 * linux-low.c (disabled_regsets, num_regsets): New.
10719 (use_regsets_p): Delete.
10720 (linux_wait_for_process): Clear disabled_regsets.
10721 (regsets_fetch_inferior_registers): Check and set it.
10722 (regsets_store_inferior_registers): Likewise.
10723 (linux_fetch_registers, linux_store_registers): Do not use
10724 use_regsets_p.
10725 (initialize_low): Allocate disabled_regsets.
10726
e28b3332
DJ
107272008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
10728
10729 * Makefile.in (LIBOBJS): New.
10730 (OBS): Use LIBOBJS.
10731 (memmem.o): New rule.
10732 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
10733 * configure: Regenerated.
10734
4536995d
UW
107352008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
10736
10737 * server.c (handle_query): Never return "unsupported" for
10738 qXfer:features:read queries.
10739
221c031f
UW
107402008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
10741
10742 * server.c (get_features_xml): Fix inverted condition.
10743 (handle_query): Always support qXfer:feature:read.
10744
ccd213ac
DJ
107452008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
10746
10747 * server.c (wrapper_argv): New.
10748 (start_inferior): Handle wrapper_argv. If set, expect an extra
10749 trap.
10750 (gdbserver_usage): Document --wrapper.
10751 (main): Parse --wrapper.
10752
6fe305f7
UW
107532008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10754
10755 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
10756 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
10757 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
10758 (ppc_set_pc): Likewise.
10759 (ppc_arch_setup): New function.
10760 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
10761 of collect_register.
889bf7c5 10762 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 10763
5b0a002e
UW
107642008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10765
10766 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
10767 instead of linux-ppc64-low.o.
10768 * linux-ppc64-low.c: Remove file.
10769 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
10770 (linux-ppc64-low.o): Remove rule.
10771
10772 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
10773 (init_registers_powerpc_64): Likewise.
10774 (ppc_regmap): Conditionally define depending on __powerpc64__.
10775 (ppc_cannot_store_register): Do not special-case "fpscr" when
10776 compiled on __powerpc64__.
10777 (ppc_collect_ptrace_register): New function.
10778 (ppc_supply_ptrace_register): New function.
10779 (ppc_breakpoint): Change type to "unsigned int".
10780 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
10781 (the_low_target): Conditionally provide initializers for the
889bf7c5 10782 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
10783 collect_ptrace_register and supply_ptrace_register members.
10784
9b4b61c8
UW
107852008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10786
10787 * regcache.h (gdbserver_xmltarget): Add extern declaration.
10788 * server.c (gdbserver_xmltarget): Define.
10789 (get_features_xml): Use it to replace "target.xml" and arch_string.
10790
10791 * configure.srv: Remove srv_xmltarget. Add XML files that were
10792 mentioned there to srv_xmlfiles instead. Remove conditional tests
10793 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
10794 srv_xmlfiles and srv_regobj to include all possible choices.
10795 * configure.ac (srv_xmltarget): Remove.
10796 (srv_xmlfiles): Do not add "target.xml".
10797 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
10798 checks for supplementary target information.
10799 * configure: Regenerate.
10800 * Makefile.in (XML_TARGET): Remove.
10801 (target.xml): Remove rule.
10802 (clean): Do not clean up target.xml.
10803 (.PRECIOUS): Do not mention target.xml.
10804
10805 * target.h (struct target_ops): Remove arch_string member.
10806 * linux-low.c (linux_arch_string): Remove.
10807 (linux_target_ops): Remove arch_string initializer.
10808 * linux-low.h (struct linux_target_ops): Remove arch_string member.
10809 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
10810 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
10811 * spu-low.c (spu_arch_string): Remove.
10812 (spu_target_ops): Remove arch_string initializer.
10813 * win32-low.c (win32_arch_string): Remove.
10814 (win32_target_ops): Remove arch_string initializer.
10815 * win32-low.h (struct win32_target_ops): Remove arch_string member.
10816 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
10817 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
10818
ee1a7ae4
UW
108192008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
10820
10821 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
10822 by collect_ptrace_register and supply_ptrace_register hooks.
10823 * linux-low.c (fetch_register): Use supply_ptrace_register callback
10824 instead of checking for the_low_target.left_pad_xfer.
10825 (usr_store_inferior_registers): Use collect_ptrace_register callback
10826 instead of checking for the_low_target.left_pad_xfer.
10827
10828 * linux-s390-low.c (s390_collect_ptrace_register): New function.
10829 (s390_supply_ptrace_register): Likewise.
10830 (s390_fill_gregset): Call s390_collect_ptrace_register.
10831 (the_low_target): Update.
10832
10833 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
10834 (ppc_supply_ptrace_register): Likewise.
10835 (the_low_target): Update.
10836
10837 * linux-i386-low.c (the_low_target): Update.
10838 * linux-x86-64-low.c (the_low_target): Update.
10839
d61ddec4
UW
108402008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
10841
10842 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
10843 reg-s390.o and reg-s390x.o.
10844
10845 * linux-low.c (new_inferior): New global variable.
10846 (linux_create_inferior, linux_attach): Set it.
10847 (linux_wait_for_process): Call the_low_target.arch_setup after the
10848 target has stopped for the first time.
10849 (initialize_low): Do not call the_low_target.arch_setup.
10850
10851 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
10852 (s390_set_pc): Likewise.
10853 (s390_arch_setup): New function.
10854 (the_low_target): Use s390_arch_setup as arch_setup routine.
10855
10856 * regcache.c (realloc_register_cache): New function.
10857 (set_register_cache): Call it for each existing regcache.
10858
d05b4ac3
UW
108592008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
10860
10861 * server.h (init_registers): Remove prototype.
10862
10863 * linux-low.h (struct linux_target_ops): Add arch_setup field.
10864 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
10865 instead of init_registers ().
10866 * linux-arm-low.c (init_registers_arm): Add prototype.
10867 (init_registers_arm_with_iwmmxt): Likewise.
10868 (the_low_target): Add initializer for arch_setup field.
10869 * linux-cris-low.c (init_registers_cris): Add prototype.
10870 (the_low_target): Add initializer for arch_setup field.
10871 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
10872 (the_low_target): Add initializer for arch_setup field.
10873 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
10874 (the_low_target): Add initializer for arch_setup field.
10875 * linux-ia64-low.c (init_registers_ia64): Add prototype.
10876 (the_low_target): Add initializer for arch_setup field.
10877 * linux-m32r-low.c (init_registers_m32r): Add prototype.
10878 (the_low_target): Add initializer for arch_setup field.
10879 * linux-m68k-low.c (init_registers_m68k): Add prototype.
10880 (the_low_target): Add initializer for arch_setup field.
10881 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
10882 (init_registers_mips64_linux): Likewise.
10883 (the_low_target): Add initializer for arch_setup field.
10884 * linux-ppc-low.c (init_registers_ppc): Add prototype.
10885 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
10886 (the_low_target): Add initializer for arch_setup field.
10887 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
10888 (init_registers_powerpc_64): Likewise.
10889 (the_low_target): Add initializer for arch_setup field.
10890 * linux-s390-low.c (init_registers_s390): Add prototype.
10891 (init_registers_s390x): Likewise.
10892 (the_low_target): Add initializer for arch_setup field.
10893 * linux-sh-low.c (init_registers_sh): Add prototype.
10894 (the_low_target): Add initializer for arch_setup field.
10895 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
10896 (the_low_target): Add initializer for arch_setup field.
10897 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
10898 (the_low_target): Add initializer for arch_setup field.
10899
10900 * win32-low.h (struct win32_target_ops): Add arch_setup field.
10901 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
10902 instead of init_registers ().
10903 * win32-arm-low.c (init_registers_arm): Add prototype.
10904 (the_low_target): Add initializer for arch_setup field.
10905 * win32-i386-low.c (init_registers_i386): Add prototype.
10906 (the_low_target): Add initializer for arch_setup field.
10907
10908 * spu-low.c (init_registers_spu): Add prototype.
10909 (initialize_low): Call initialie_registers_spu () instead of
10910 initialize_registers ().
10911
fd96d250
PA
109122008-02-19 Pedro Alves <pedro@codesourcery.com>
10913
10914 * server.c (handle_v_requests): When handling the vRun and vAttach
10915 packets, if already debugging a process, don't kill it. Return an
10916 error instead.
10917
d41b6bb4
DJ
109182008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
10919
10920 * server.c (handle_query): Correct length check.
10921
5ac588cf
PA
109222008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
10923
10924 * win32-low.c (do_initial_child_stuff): Add process handle
10925 parameter. Set current_process_handle and current_process_id from the
10926 parameters. Clear globals.
10927 (win32_create_inferior): Don't set current_process_handle and
10928 current_process_id here. Instead pass them on the call to
10929 do_initial_child_stuff.
10930 (win32_attach): Likewise.
10931 (win32_clear_inferiors): New.
10932 (win32_kill): Don't close the current process handle or the
10933 current thread handle here. Instead call win32_clear_inferiors.
10934 (win32_detach): Don't open a new handle to the process. Call
10935 win32_clear_inferiors.
10936 (win32_join): Don't rely on current_process_handle; open a new
10937 handle using the process id.
10938 (win32_wait): Call win32_clear_inferiors when the inferior process
10939 has exited.
10940
ecd7ecbc
DJ
109412008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
10942
10943 * server.c (monitor_show_help): Add "exit".
10944
1525d545
MG
109452008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
10946
ecd7ecbc 10947 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
10948 (clean): Add reg-xtensa.c.
10949 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
10950 * configure.srv (xtensa*-*-linux*) New target.
10951 * linux-xtensa-low.c: New.
10952 * xtensa-xtregs.c: New.
1525d545 10953
59a016f0
PA
109542008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
10955
10956 * hostio.c: Don't include errno.h.
10957 (errno_to_fileio_errno): Move to hostio-errno.
10958 * hostio.c: (hostio_error): Remove the error parameter. Defer the
10959 error number outputting to the target->hostio_last_error callback.
10960 (hostio_packet_error): Use FILEIO_EINVAL directly.
10961 (handle_open, handle_pread, hostio_error, handle_unlink): Update
10962 calls to hostio_error.
10963 * hostio-errno.c: New.
10964 * server.h (hostio_last_error_from_errno): Declare.
10965 * target.h (target_ops): Add hostio_last_error member.
10966 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
10967 as hostio_last_error handler.
889bf7c5 10968 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
10969 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
10970 (wince_hostio_last_error): New functions.
10971 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
10972 as hostio_last_error handler.
10973 (win32_target_ops) [!_WIN32_WCE]: Register
10974 hostio_last_error_from_errno as hostio_last_error handler.
10975 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
10976 (hostio-errno.o): New rule.
10977 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
10978 * configure.srv (srv_hostio_err_objs): New variable. Default to
10979 hostio-errno.o.
10980 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
10981 * configure: Regenerate.
10982
2d717e4f
DJ
109832008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
10984
10985 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
10986 (linux_kill, linux_detach): Clean up the process list.
10987 * remote-utils.c (remote_open): Improve port number parsing.
10988 (putpkt_binary, input_interrupt): Only send interrupts if the target
10989 is running.
10990 * server.c (extended_protocol): Make static.
10991 (attached): Define earlier.
10992 (exit_requested, response_needed, program_argv): New variables.
10993 (target_running): New.
10994 (start_inferior): Clear attached here.
10995 (attach_inferior): Set attached here.
10996 (require_running): Define.
10997 (handle_query): Use require_running and target_running. Implement
10998 "monitor exit".
10999 (handle_v_attach, handle_v_run): New.
11000 (handle_v_requests): Use require_running. Handle vAttach and vRun.
11001 (gdbserver_usage): Update.
11002 (main): Redo argument parsing. Handle --debug and --multi. Handle
11003 --attach along with other options or after the port. Save
11004 program_argv. Support no initial program. Resynchronize
11005 communication with GDB after an error. Handle "monitor exit".
11006 Use require_running and target_running. Always allow the extended
11007 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
11008 restart in extended mode.
11009 * README: Refer to the GDB manual. Update --attach usage.
11010
7407e2de
AS
110112007-12-20 Andreas Schwab <schwab@suse.de>
11012
11013 * linux-low.c (STACK_SIZE): Define.
11014 (linux_tracefork_child): Use it. Use __clone2 on ia64.
11015 (linux_test_for_tracefork): Likewise.
11016
b65d95c5
DJ
110172007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
11018
11019 * linux-low.c (linux_wait_for_event): Update messages. Do not
11020 reinsert auto-delete breakpoints.
11021 * mem-break.c (struct breakpoint): Change return type of handler to
11022 int.
11023 (set_breakpoint_at): Update handler type.
11024 (reinsert_breakpoint_handler): Return 1 instead of calling
11025 delete_breakpoint.
11026 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
11027 setting a new one.
11028 (check_breakpoints): Delete auto-delete breakpoints and return 2.
11029 * mem-break.h (set_breakpoint_at): Update handler type.
11030 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
11031 * win32-low.c (auto_delete_breakpoint): New.
11032 (get_child_debug_event): Use it.
11033
4e799345
DJ
110342007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
11035
11036 * configure.ac: Check for pread and pwrite.
11037 * hostio.c (handle_pread): Fall back to lseek and read.
11038 (handle_pwrite): Fall back to lseek and write.
11039 * config.in, configure: Regenerated.
11040
27524b67
DJ
110412007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
11042
11043 * server.c (myresume): Add own_buf argument.
11044 (main): Update calls.
11045
a20d5e98
DJ
110462007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
11047
11048 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
11049 * remote-utils.c (remote_open): Do not call disable_async_io.
11050 (block_async_io): Delete.
11051 (unblock_async_io): Make static.
11052 (initialize_async_io): New.
11053 * server.c (handle_v_cont): Handle async I/O here.
11054 (myresume): Likewise. Move other common resume tasks here...
11055 (main): ... from here. Call initialize_async_io. Disable async
11056 I/O before the main loop.
11057 * server.h (initialize_async_io): Declare.
11058 (block_async_io, unblock_async_io): Delete prototypes.
11059 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
11060
b79d787e
DJ
110612007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
11062
11063 * remote-utils.c (readchar): Allow binary data in received messages.
11064
d97903b2
PA
110652007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11066
11067 * win32-low.c (attaching): New global.
11068 (win32_create_inferior): Clear the `attaching' global.
11069 (win32_attach): Set the `attaching' global.
11070 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
11071 attaching. Only set a breakpoint at the entry point if not
11072 attaching.
11073
311de423
PA
110742007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11075
11076 * server.c (main): Don't report dll events on the initial
11077 connection on attaches.
11078
6c2d16d2
PA
110792007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11080
11081 * server.c (main): Relax numerical bases supported for the pid of
11082 the --attach command line argument.
11083
5ca906e6
PA
110842007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11085
11086 * win32-low.c (win32_attach): Call OpenProcess before
11087 DebugActiveProcess, not after. Add last error output to error
11088 call.
11089
9c6c8194
PA
110902007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11091
11092 * win32-low.c (win32_get_thread_context)
11093 (win32_set_thread_context): New functions.
11094 (thread_rec): Use win32_get_thread_context.
11095 (continue_one_thread, win32_resume): Use win32_set_thread_context.
11096 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
11097 field.
11098
4d5d1aaa
PA
110992007-12-03 Leo Zayas
11100 Pedro Alves <pedro_alves@portugalmail.pt>
11101
11102 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
11103 global variables.
11104 (child_add_thread): Minor cleanup.
11105 (child_continue): Resume artificially suspended threads before
11106 calling ContinueDebugEvent.
11107 (suspend_one_thread): New.
11108 (fake_breakpoint_event): New.
11109 (get_child_debug_event): Change return type to int. Check here if
11110 gdb sent an interrupt request. If a soft interrupt was requested,
11111 fake a breakpoint event. Return 0 if there is no event to handle,
11112 and 1 otherwise.
11113 (win32_wait): Don't check here if gdb sent an interrupt request.
11114 Ensure there is a valid event to handle.
11115 (win32_request_interrupt): Add soft interruption method as last
11116 resort.
11117
c436e841
PA
111182007-12-03 Leo Zayas
11119 Pedro Alves <pedro_alves@portugalmail.pt>
11120
11121 * win32-low.h (win32_thread_info): Add descriptions to the
11122 structure members. Replace `suspend_count' counter by a
11123 `suspended' flag.
11124 * win32-low.c (thread_rec): Update condition of when to get the
11125 context from the inferior. Rely on ContextFlags being set if it
11126 has already been retrieved. Only suspend the inferior thread if
11127 we haven't already. Warn if that fails.
11128 (continue_one_thread): s/suspend_count/suspended/. Only call
11129 ResumeThread once. Warn if that fails.
11130
e7b5fa67
PA
111312007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
11132
11133 * win32-low.c (win32_wait): Don't read from the inferior when it
11134 has already exited.
11135
a385171d
PA
111362007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
11137
11138 * Makefile.in (win32_low_h): New variable.
11139 (win32-low.o): Add dependency on $(win32_low_h).
11140 (win32-arm-low.o, win32-i386-low.o): New rules.
11141
f80c84b3
DJ
111422007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
11143
11144 * hostio.c: Correct copyright year.
11145
a6b151f1
DJ
111462007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
11147
11148 * Makefile.in (OBS): Add hostio.o.
11149 (hostio.o): New rule.
11150 * server.h (handle_vFile): Declare.
11151 * hostio.c: New file.
11152 * server.c (handle_v_requests): Take packet_len and new_packet_len
11153 for binary packets. Call handle_vFile.
11154 (main): Update call to handle_v_requests.
11155
f9387fc3
DJ
111562007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
11157
11158 * linux-low.c: Include <sched.h>.
11159
51c2684e
DJ
111602007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
11161
11162 * linux-low.c (linux_tracefork_grandchild): New.
11163 (linux_tracefork_child): Use clone.
11164 (linux_test_for_tracefork): Use clone; allocate and free a stack.
11165
75f83163
JB
111662007-10-31 Joel Brobecker <brobecker@adacore.com>
11167
11168 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
11169
da5898ce
DJ
111702007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
11171
11172 * linux-low.c (handle_extended_wait): Handle unexpected signals.
11173
24a09b5f
DJ
111742007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
11175
11176 * inferiors.c (change_inferior_id): Delete.
11177 (add_pid_to_list, pull_pid_from_list): New.
11178 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
11179 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
11180 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
11181 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
11182 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
11183 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
11184 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
11185 (using_threads): Always set to 1.
11186 (handle_extended_wait): New.
11187 (add_process): Do not set TID.
11188 (linux_create_inferior): Set must_set_ptrace_flags.
11189 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
11190 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
11191 (linux_thread_alive): Rename TID argument to LWPID.
11192 (linux_wait_for_process): Handle unknown processes. Do not use TID.
11193 (linux_wait_for_event): Do not use TID or check using_threads. Update
11194 call to dead_thread_notify. Call handle_extended_wait.
11195 (linux_create_inferior): Use PTRACE_SETOPTIONS.
11196 (send_sigstop): Delete sigstop_sent.
11197 (wait_for_sigstop): Avoid TID.
11198 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
11199 (linux_test_for_tracefork): New.
11200 (linux_lookup_signals): Use thread_db_active and
11201 linux_supports_tracefork_flag.
11202 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
11203 * linux-low.h (get_process_thread): Avoid TID.
11204 (struct process_ifo): Move thread_known and tid to the end. Remove
11205 sigstop_sent.
11206 (linux_attach_lwp, thread_db_init): Update prototypes.
11207 * server.h (change_inferior_id): Delete prototype.
11208 (add_pid_to_list, pull_pid_from_list): New prototypes.
11209 * thread-db.c (thread_db_use_events): New.
11210 (find_first_thread): Rename to...
11211 (find_one_thread): ...this. Update callers and messages. Do not
11212 call fatal. Check thread_db_use_events. Do not call
11213 change_inferior_id or new_thread_notify.
11214 (maybe_attach_thread): Update. Do not call new_thread_notify.
11215 (thread_db_init): Set thread_db_use_events. Check use_events.
11216 * utils.c (fatal, warning): Correct message prefix.
11217
30ed0a8f
DJ
112182007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
11219
11220 * Makefile.in (clean): Remove new files.
11221 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
11222 (powerpc-64.o, powerpc-64.c): New rules.
11223 * configure.srv: Use alternate register sets for powerpc64-*-linux*
11224 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
11225 with SPE.
11226 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
11227 SPE targets.
11228 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
11229 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
11230 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
11231 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
11232 (target_regsets): Add AltiVec and SPE register sets.
11233 * configure.ac: Check for AltiVec and SPE.
11234 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
11235 (ppc_fill_vrregset, ppc_store_vrregset): New.
11236 (target_regsets): Add AltiVec register set.
11237 * configure: Regenerated.
11238
fd462a61
DJ
112392007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
11240
11241 * linux-low.c (O_LARGEFILE): Define.
11242 (linux_read_memory): Use /proc/PID/mem.
11243 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
11244 * configure, config.in: Regenerated.
11245
69f223ed
DJ
112462007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
11247
11248 * linux-low.c (linux_wait_for_event): Do not pass signals while
11249 single-stepping.
11250
aec18585
PA
112512007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
11252
11253 * win32-low.c (create_process): New.
11254 (win32_create_inferior): Use create_process instead of
11255 CreateProcess. If create_process failed retry appending an ".exe"
11256 suffix. Store the GetLastError result immediatelly after
11257 create_process calls and use it on the call to error.
11258
34d86ddd
PA
112592007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
11260
11261 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
11262
5a0e3bd0
JB
112632007-08-23 Joel Brobecker <brobecker@adacore.com>
11264
11265 * configure.ac: Switch license to GPLv3.
11266
f88c79e6
MS
112672007-08-01 Michael Snyder <msnyder@access-company.com>
11268
11269 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
11270
6b3d9b83
PA
112712007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
11272
11273 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
11274 typedef.
11275 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
11276 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
11277 CloseToolhelp32Snapshot.
11278 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
11279 CloseToolhelp32Snapshot.
11280
c588c53c
MS
112812007-07-27 Michael Snyder <michael.snyder@access-company.com>
11282
11283 * server.c (main): Check for inferior exit before main loop.
11284
aa0403d9
PA
112852007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
11286
11287 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
11288 instead of on tmp_desc.
11289
255e7678
DJ
112902007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
11291 Daniel Jacobowitz <dan@codesourcery.com>
11292
11293 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
11294 (add_thread): Minor cleanups.
11295 (clear_inferiors): Move lower in the file. Clear the DLL
11296 list.
11297 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
11298 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
11299 (xml_escape_text): New.
11300 * server.c (handle_query): Handle qXfer:libraries:read. Report it
11301 for qSupported.
11302 (handle_v_cont): Report errors.
11303 (gdbserver_version): Update.
11304 (main): Correct size of own_buf. Do not report initial DLL events.
11305 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
11306 (unloaded_dll, xml_escape_text): New.
11307 * win32-low.c (enum target_waitkind): Update comments.
11308 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
11309 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
11310 (win32_EnumProcessModules, win32_GetModuleInformation)
11311 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
11312 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
11313 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
11314 (win32_Module32First, win32_Module32Next, load_toolhelp)
11315 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
11316 (get_child_debug_event): Handle DLL events.
11317 (win32_wait): Likewise.
11318
0d37add9
DJ
113192007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
11320
11321 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
11322 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
11323
45e2715e
PA
113242007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
11325
11326 * win32-low.c (handle_output_debug_string): Ignore event if not
11327 waiting.
11328
c5674cf1
PA
113292007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
11330
11331 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
11332
2bbe3cc1
DJ
113332007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
11334
11335 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
11336
ae13219e
DJ
113372007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
11338
11339 * inferiors.c (change_inferior_id): Add comment.
11340 * linux-low.c (check_removed_breakpoint): Add an early
11341 prototype. Improve debug output.
11342 (linux_attach): Doc update.
11343 (linux_detach_one_process, linux_detach): Clean up before releasing
11344 each process.
11345 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
11346 * linux-low.h (struct process_info): Doc improvement.
11347 * mem-break.c (delete_all_breakpoints): New.
11348 * mem-break.h (delete_all_breakpoints): New prototype.
11349 * thread-db.c (find_first_thread): New.
11350 (thread_db_create_event): Call it instead of
11351 thread_db_find_new_threads. Clean up unused variables.
11352 (maybe_attach_thread): Remove first thread handling.
11353 (thread_db_find_new_threads): Use find_first_thread.
11354 (thread_db_get_tls_address): Likewise.
11355
4105de34
DJ
113562007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
11357
11358 * thread-db.c (thread_db_find_new_threads): Add prototype.
11359 (thread_db_create_event): Check for the main thread before adding
11360 a new thread.
11361 (maybe_attach_thread): Only enable event reporting if TID == 0.
11362 (thread_db_get_tls_address): Check for new threads.
11363
2b876972
DJ
113642007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
11365
11366 * linux-low.c (linux_create_inferior): Try execv before execvp.
11367 * spu-low.c (spu_create_inferior): Likewise.
11368
7a245884
DJ
113692007-06-13 Mike Frysinger <vapier@gentoo.org>
11370
11371 * linux-low.c (linux_create_inferior): Change execv to execvp.
11372 * spu-low.c (spu_create_inferior): Likewies.
11373
117ce543
DJ
113742007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
11375
11376 * Makefile.in (clean): Clean new files instead of deleted ones.
11377 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
11378 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
11379 rules.
11380 * configure.srv: Specify XML files and new regformats for MIPS and
11381 MIPS64 GNU/Linux.
11382 * linux-mips-low.c (mips_num_regs): Set to only used registers.
11383 (mips_regmap): Do not fetch $0. Remove unused registers. Add
11384 an entry for the restart register.
11385 (mips_cannot_fetch_register, mips_cannot_store_register)
11386 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
11387 register names to match the XML descriptions.
11388 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
11389 restart register instead of $0.
11390
0e7f50da
UW
113912007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
11392 Markus Deuling <deuling@de.ibm.com>
11393
11394 * remote-utils.c (decode_xfer_write): New function.
11395 * server.h (decode_xfer_write): Add prototype.
11396 * server.c (handle_query): Add PACKET_LEN argument. Support
11397 qXfer:spu:read and qXfer:spu:write packets.
11398 (main): Pass packet_len to handle_query.
11399 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
11400 * target.h (target_ops): Add qxfer_spu.
11401
374c1d38
UW
114022007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
11403
11404 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
11405 accessing non-seekable spufs files.
11406
bb63802a
UW
114072007-05-16 Markus Deuling <deuling@de.ibm.com>
11408
889bf7c5 11409 * server.c (handle_query): Add reply for qC packet.
bb63802a 11410
7390519e
PA
114112007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11412 Leo Zayas <lerele@champenstudios@com>
11413
11414 * server.h (check_remote_input_interrupt_request): New function.
11415 * remote_utils.c (INVALID_DESCRIPTOR): New define.
11416 (remote_desc): Initialize with INVALID_DESCRIPTOR.
11417 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
11418 (check_remote_input_interrupt_request): New function.
11419 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 11420 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
11421 winapi_GenerateConsoleCtrlEvent): New typedefs.
11422 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
11423 to 250 ms.
11424 (win32_wait): Check for remote interrupt request
11425 with check_remote_input_interrupt_request.
11426 (win32_request_interrupt): New function.
11427 (win32_target_op): Set request_interrupt to win32_request_interrupt.
11428
34b34921
PA
114292007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11430
11431 * win32-low.c (debug_registers_changed,
11432 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
11433 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
11434 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
11435 (thread_rec): Get context using the low target.
11436 (child_add_thread): Call thread_added on the low target,
11437 which does the same thing.
11438 (regptr): Delete.
11439 (do_initial_child_stuff): Remove debug registers references.
11440 Set context using the low target. Resume threads after
11441 setting the contexts.
11442 (child_continue): Remove dead variable. Remove debug
11443 registers references.
11444 (child_fetch_inferior_registers): Go through the low target.
11445 (do_child_store_inferior_registers): Remove.
11446 (child_store_inferior_registers): Go through the low target.
11447 (win32_resume): Remove debug registers references.
11448 Set context using the low target.
11449 (handle_exception): Change return type to void. Don't record
11450 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
11451 first chance exception.
889bf7c5 11452 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
11453 goto loop. Always return after waiting for debug event.
11454 (win32_wait): Convert to switch statement. Handle spurious
11455 events.
11456
11457 * win32-i386-low.c (debug_registers_changed,
11458 debug_registers_used): New.
11459 (initial_stuff): Rename to ...
11460 (i386_initial_stuff): ... this. Clear debug registers
11461 state variables.
11462 (store_debug_registers): Delete.
11463 (i386_get_thread_context): New.
11464 (load_debug_registers): Delete.
11465 (i386_set_thread_context): New.
11466 (i386_thread_added): New.
11467 (single_step): Rename to ...
11468 (i386_single_step): ... this.
11469 (do_fetch_inferior_registers): Rename to ...
11470 (i386_fetch_inferior_register): ... this.
11471 (i386_store_inferior_register): New.
11472 (the_low_target): Adapt to new interface.
11473
11474 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
11475 (arm_get_thread_context): New.
11476 (arm_set_thread_context): New.
11477 (regptr): New.
11478 (do_fetch_inferior_registers): Rename to ...
11479 (arm_fetch_inferior_register): ... this.
11480 (arm_store_inferior_register): New.
11481 (arm_wince_breakpoint): Reimplement as unsigned long.
11482 (arm_wince_breakpoint_len): Define.
11483 (the_low_target): Adapt to new interface.
11484
11485 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
11486 load_debug_registers. Add get_thread_context, set_thread_context,
11487 thread_added and store_inferior_register. Rename
11488 fetch_inferior_registers to fetch_inferior_register.
11489 (regptr): Remove declaration.
11490
dd6953e1
PA
114912007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11492
11493 * linux-low.c (linux_detach): Change return type to int. Return 0.
11494 * spu-low.c (spu_detach): Likewise.
11495
444d6139
PA
114962007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11497
11498 * target.h (target_ops): Change return type of detach to int.
11499 Add join.
11500 (join_inferior): New.
11501 * server.c (main): Don't skip detach support on mingw32.
11502 If the inferior doesn't support detaching return error.
11503 Call join_inferior instead of using waitpid.
11504 * linux-low.c (linux_join): New.
11505 (linux_target_op): Add linux_join.
11506 * spu-low.c (spu_join): New.
11507 (spu_target_ops): Add spu_join.
11508 * win32-low.c (win32_detach): Adapt to new interface.
11509 Reopen current_process_handle before detaching. Issue a child
11510 resume before detaching.
11511 (win32_join): New.
11512 (win32_target_op): Add win32_join.
11513
1d5315fe
PA
115142007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11515
11516 * win32-low.c (win32-attach): Fix return value.
11517 * target.h (target_ops): Describe ATTACH return values.
11518
bf914831
PA
115192007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11520
11521 * win32-low.c (GETPROCADDRESS): Define.
11522 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
11523 (winapi_DebugSetProcessKillOnExit): Likewise.
11524 (win32_create_inferior): Force usage of ansi CreateProcessA.
11525 (win32_attach): Use GETPROCADDRESS.
11526 (win32_detach): Likewise.
11527
f72f3e60
PA
115282007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11529
11530 * win32-low.c (win32_wait): Don't use WSTOPSIG.
11531
ed50f18f
PA
115322007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
11533
11534 * win32-low.c: Commit leftover changes from 2007-03-29.
11535
0c2ead7e
DJ
115362007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
11537
11538 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
11539 fields short instead of int. Add explicit padding.
11540 (i387_cache_to_fsave): Remove unnecessary casts.
11541 (i387_fsave_to_cache): Doc fix.
11542 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
11543
73725ff3
DJ
115442007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
11545
11546 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
11547 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
11548
d99f33d8
PA
115492007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
11550
11551 * configure.srv (arm*-*-mingw32ce*): Move near the other
11552 arm targets.
11553
68070c10
PA
115542007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
11555
2482afc6 11556 * configure.ac: Add errno checking.
68070c10
PA
11557 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
11558 sys/file.h and malloc.h.
11559 (AC_CHECK_DECLS): Add perror.
11560 (srv_mingwce): Handle.
2482afc6 11561 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
11562 win32-i386-low.o to srv_tgtobj.
11563 (i[34567]86-*-mingw*): Likewise.
11564 (arm*-*-mingw32ce*): Add case.
11565 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
11566 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
11567 [__MINGW32CE__] (strerror): New function.
11568 [__MINGW32CE__] (errno): Define to GetLastError.
11569 [__MINGW32CE__] (COUNTOF): New macro.
11570 (remote_open): Remove extra close call.
11571 * mem-break.c (delete_breakpoint_at): New function.
11572 * mem-break.h (delete_breakpoint_at): Declare.
11573 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
11574 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
11575 [USE_WIN32API] (read, write): Add char* casts.
11576 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
11577 * server.h: Include wincecompat.h on Windows CE.
11578 [HAVE_ERRNO_H]: Check.
11579 (perror): Declare if not declared.
11580 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
11581 (perror_with_name): Remove errno declaration.
11582 * wincecompat.h: New.
11583 * wincecompat.c: New.
11584 * win32-low.h: New.
11585 * win32-arm-low.c: New.
11586 * win32-i386-low.c: New.
11587 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
11588 (OUTMSG2): Make it safe.
11589 (_T): New macro.
11590 (COUNTOF): New macro.
11591 (NUM_REGS): Get it from the low target.
11592 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
11593 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
11594 (thread_rec): Let low target handle debug registers.
11595 (child_add_thread): Likewise.
11596 (child_init_thread_list): Likewise.
11597 (continue_one_thread): Likewise.
11598 (regptr): New.
11599 (do_child_fetch_inferior_registers): Move to ...
11600 * win32-i386-low.c: ... here, and rename to ...
11601 (do_fetch_inferior_registers): ... this.
889bf7c5 11602 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
11603 Go through the low target.
11604 (do_child_store_inferior_registers): Use regptr.
11605 (strwinerror): New function.
11606 (win32_create_inferior): Handle Windows CE.
11607 Use strwinerror instead of strerror on Windows error
11608 codes. Add program to the error output.
11609 Don't close the main thread handle on Windows CE.
11610 (win32_attach): Use coredll.dll on Windows CE.
11611 (win32_kill): Close current process and current
11612 thread handles.
11613 (win32_detach): Use coredll.dll on Windows CE.
11614 (win32_resume): Let low target handle debug registers, and
11615 step request.
11616 (handle_exception): Add/Remove initial breakpoint. Avoid
11617 non-existant WSTOPSIG on Windows CE.
11618 (win32_read_inferior_memory): Cast to remove warning.
11619 (win32_arch_string): Go through the low target.
11620 (initialize_low): Call set_breakpoint_data with the low
11621 target's breakpoint.
11622 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
11623 FOP_REGNUM, mappings): Move to ...
11624 * win32-i386-low.c: ... here.
11625 * win32-low.c (win32_thread_info): Move to ...
11626 * win32-low.h: ... here.
11627 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
11628 win32-arm-low.c and wincecompat.c.
11629 (all:): Add $EXEEXT.
11630 (install-only:): Likewise.
11631 (gdbserver:): Likewise.
11632 (gdbreplay:): Likewise.
11633 * config.in: Regenerate.
11634 * configure: Regenerate.
11635
41093d81
PA
116362007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
11637
11638 * win32-low.c: Rename typedef thread_info to
11639 win32_thread_info throughout.
11640
544afa54
PA
116412007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
11642
11643 * win32-i386-low.c: Rename to ...
11644 * win32-low.c: ... this.
11645 * configure.srv: Replace win32-i386-low.o with win32-low.o.
11646 * Makefile.in: Likewise.
11647
bce7165d
PA
116482007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
11649
11650 * remote-utils.c (monitor_output): Constify msg parameter.
11651 * server.h (monitor_output): Likewise.
11652 * win32-i386-low.c (handle_output_debug_string): New.
11653 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
11654 handle_output_debug_string.
11655 (get_child_debug_event): Likewise.
11656
506c7aa0
DJ
116572007-03-27 Mat Hostetter <mat@lcs.mit.edu>
11658
11659 * server.c (main): Correct strtoul check.
11660
42c81e2a
DJ
116612007-03-27 Jon Ringle <jon@ringle.org>
11662
11663 * linux-low.c: Check __ARCH_HAS_MMU__ also.
11664
9453113a
DJ
116652007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
11666
11667 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
11668
64a69107
DJ
116692007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
11670
11671 * terminal.h: Check HAVE_SGTTY_H.
11672
116732007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
11674
11675 * remote-utils.c (remote_open): Print out the assigned port number.
11676
c74d0ad8
DJ
116772007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
11678
11679 * remote-utils.c (monitor_output): New function.
11680 * server.c (debug_threads): Define here.
11681 (monitor_show_help): New function.
11682 (handle_query): Handle qRcmd.
11683 (main): Do not handle 'd' packet.
11684 * server.h (debug_threads, remote_debug, monitor_output): Declare.
11685 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
11686 of debug_threads.
11687
de7c3b4a
PA
116882007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11689
11690 * Makefile.in (EXEEXT): New.
11691 (clean): Use $(EXEEXT).
11692
ef57601b
PA
116932007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11694
11695 * target.h (target_ops): Rename send_signal to request_interrupt,
11696 and remove enum target_signal parameter.
11697 * linux-low.c (linux_request_interrupt): Rename from
11698 linux_send_signal, and always send SIGINT.
11699 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
11700 and always send SIGINT.
11701 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
11702 of send_signal.
11703 (input_interrupt): Likewise.
11704
820f2bda
PA
117052007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11706
11707 * server.c (get_features_xml): Check if target implemented
11708 arch_string.
11709 * win32-i386-low.c (win32_arch_string): New.
11710 (win32_target_ops): Add win32_arch_string as arch_string member.
11711
ab39bf24
UW
117122007-02-22 Markus Deuling <deuling@de.ibm.com>
11713
11714 * spu-low.c (spu_arch_string): New.
11715 (spu_target_ops): Add spu_arch_string.
11716
61ff6e04
DJ
117172007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
11718
11719 * remote-utils.c: Remove HAVE_TERMINAL_H check.
11720 * configure.ac: Do not check for terminal.h.
11721 * configure, config.in: Regenerated.
11722
fb1e4ffc
DJ
117232007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
11724
11725 * Makefile.in (OBS): Add $(XML_BUILTIN).
11726 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
11727 (clean): Update.
11728 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
11729 (arm-with-iwmmxt.c): New.
11730 * config.in, configure: Regenerate.
11731 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
11732 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
11733 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
11734 (arm*-*-linux*): Add iWMMXt and regset support.
11735 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
11736 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
11737 (arm_store_wmmxregset, target_regsets): New.
11738 * server.c (get_features_xml): Take annex argument. Check builtin
11739 XML documents.
11740 (handle_query): Handle multiple annexes.
11741
0f48aa01
DJ
117422007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11743
11744 * remote-utils.c [USE_WIN32API] (read, write): Define.
11745 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
11746 write.
11747
23181151
DJ
117482007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
11749
11750 * linux-i386-low.c (the_low_target): Set arch_string.
11751 * linux-x86-64-low.c (the_low_target): Likewise.
11752 * linux-low.c (linux_arch_string): New.
11753 (linux_target_ops): Add it.
11754 * linux-low.h (struct linux_target_ops): Add arch_string.
11755 * server.c (write_qxfer_response): Use const void * for DATA.
11756 (get_features_xml): New.
11757 (handle_query): Handle qXfer:features:read. Report it for qSupported.
11758 * target.h (struct target_ops): Add arch_string method.
11759
9d606399
DJ
117602007-01-03 Denis Pilat <denis.pilat@st.com>
11761 Daniel Jacobowitz <dan@codesourcery.com>
11762
11763 * linux-low.c (linux_kill): Handle being called with no threads.
11764 * win32-i386-low.c (win32_kill): Likewise.
11765 (get_child_debug_event): Clear current_process_handle.
11766
117672006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
11768 Daniel Jacobowitz <dan@codesourcery.com>
11769
11770 * remote-utils.c (remote_open): Check the type of specified
11771 serial port devices before opening them.
11772 * server.c (main): Kill the inferior if an error occurs during
11773 the first remote_open.
11774
a5e13d24
DJ
117752006-12-05 Markus Deuling <deuling@de.ibm.com>
11776
11777 * README: Update supported targets.
11778
186947f7
DJ
117792006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
11780
11781 * Makefile.in (clean): Remove reg-mips64.c.
11782 (reg-mips64.c, reg-mips64.o): New rules.
11783 * configure.srv: Handle mips64. Include regset support for mips.
11784 * linux-mips-low.c (union mips_register): New.
11785 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
11786 (mips_breakpoint, mips_breakpoint_at): Use int.
11787 (mips_collect_register, mips_supply_register)
11788 (mips_collect_register_32bit, mips_supply_register_32bit)
11789 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
11790 (mips_store_fpregset, target_regsets): New.
11791 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
11792
a13e2c95
UW
117932006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
11794
11795 * configure.srv: Add target "spu*-*-*".
11796 * Makefile.in (clean): Remove reg-spu.c.
11797 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
11798 * spu-low.c: New file.
11799
cb7283db
DJ
118002006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
11801
11802 * configure.ac: Correct td_thr_tls_get_addr test.
11803 * configure: Regenerated.
11804
89be2091
DJ
118052006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
11806
11807 * linux-low.c (linux_wait_for_event): Reformat. Use the
11808 pass_signals array.
11809 * remote-utils.c (decode_address_to_semicolon): New.
11810 * server.c (pass_signals, handle_general_set): New.
11811 (handle_query): Mention QPassSignals for qSupported.
11812 (main): Call handle_general_set.
11813 * server.h (pass_signals, decode_address_to_semicolon): New.
11814
000ef4f0
DJ
118152006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
11816
11817 * server.c (handle_query): Correct error handling for read_auxv.
11818
b7149293
UW
118192005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
11820
11821 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
11822 and srv_linux_thread_db to yes.
11823 * linux-s390-low.c (s390_fill_gregset): New function.
11824 (target_regsets): Define data structure.
11825
dae5f5cf
DJ
118262006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
11827
11828 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
11829 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
11830 * config.in, configure: Regenerated.
11831 * inferiors.c (gdb_id_to_thread): New function.
11832 (gdb_id_to_thread_id): Use it.
11833 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
11834 * linux-low.h (struct process_info): Add th member.
11835 (thread_db_get_tls_address): New prototype.
11836 * remote-utils.c (decode_address): Make non-static.
11837 * server.c (handle_query): Handle qGetTLSAddr.
11838 * server.h (gdb_id_to_thread, decode_address): New prototypes.
11839 * target.h (struct target_ops): Add get_tls_address.
11840 * thread-db.c (maybe_attach_thread): Save the thread handle.
11841 (thread_db_get_tls_address): New.
11842
32ca6d61
DJ
118432006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
11844
11845 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
11846 (linux_resume_one_process): Take a siginfo_t *. Update all
11847 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
11848 (struct pending_signals): Add a siginfo_t.
11849 (linux_wait_for_process): Always set last_status.
11850 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
11851 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
11852 * linux-low.h (struct process_info): Add last_status.
11853
5ffff7c1
DJ
118542006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
11855
11856 * remote-utils.c (try_rle): New function.
11857 (putpkt_binary): Use it.
11858
8695c747
DJ
118592006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
11860
11861 * Makefile.in (clean): Clean reg-x86-64-linux.c.
11862 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
11863 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
11864 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
11865 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
11866 point registers.
11867
290fadea
RS
118682006-08-08 Richard Sandiford <richard@codesourcery.com>
11869
11870 * server.c (terminal_fd): New variable.
11871 (old_foreground_pgrp): Likewise.
11872 (restore_old_foreground_pgrp): New function.
11873 (start_inferior): Record the terminal file descriptor in terminal_fd
11874 and its original foreground group in old_foreground_pgrp. Register
11875 restore_old_foreground_pgrp with atexit().
11876
9f2e1e63
DJ
118772006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
11878
11879 * server.c (handle_query): Correct qPart to qXfer.
11880
b80864fb
DJ
118812006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
11882
11883 * configure.ac: Check for more headers which are missing on
11884 Windows. Automatically supply -lwsock32 and USE_WIN32API.
11885 * configure.srv: Add Cygwin and mingw32.
11886 * remote-utils.c: Don't include headers unconditionally which
11887 are missing on mingw32. Include <winsock.h> for mingw32.
11888 (remote_open): Adjust for mingw32 support. Flush
11889 standard error after writing to it.
11890 (remote_close, putpkt_binary, input_interrupt, block_async_io)
11891 (unblock_async_io, enable_async_io, disable_async_io)
11892 (readchar, getpkt): Update for Winsock support.
11893 (prepare_resume_reply): Expect a protocol signal number.
11894 * server.c: Disable <sys/wait.h> on mingw32.
11895 (start_inferior): Adjust for mingw32 support. Flush
11896 standard error after writing to it.
11897 (attach_inferior): Likewise. Use protocol signal
11898 numbers.
11899 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
11900 and names.
11901 * win32-i386-low.c: New file.
11902 * Makefile.in (XM_CLIBS): Set.
11903 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
11904 (win32-i386-low.o): New dependency rule.
11905 * linux-low.c (linux_wait): Use target signal numbers.
11906 * target.h (struct target_ops): Doc fix.
11907 * server.h (target_signal_to_name): New prototype.
11908 * gdbreplay.c: Don't include headers unconditionally which
11909 are missing on mingw32. Include <winsock.h> for mingw32.
11910 (remote_close, remote_open): Adjust for Winsock support.
11911 * configure, config.in: Regenerated.
11912
0876f84a
DJ
119132006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
11914
11915 * server.c (decode_xfer_read, write_qxfer_response): New.
11916 (handle_query): Take a packet length argument. Handle
11917 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
11918 the qSupported response.
11919 (main): Update call to handle_query.
11920
01f9e8fa
DJ
119212006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
11922
11923 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
11924 (putpkt_binary): Renamed from putpkt and adjusted for binary
11925 data.
11926 (putpkt): New wrapper for putpkt_binary.
11927 (readchar): Don't mask off the high bit.
11928 (decode_X_packet): New function.
11929 * server.c (main): Call putpkt_binary if a handler sets the packet
11930 length. Save the length of the incoming packet. Handle 'X'.
11931 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
11932
be2a5f71
DJ
119332006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
11934
11935 * server.c (handle_query): Handle qSupported.
11936
ea025f5f
DJ
119372006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
11938
11939 * remote-utils.c (all_symbols_looked_up): New variable.
11940 (look_up_one_symbol): Check it.
11941 * server.h (look_up_one_symbol): New declaration.
11942 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
11943
9308fc88
DJ
119442006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
11945
11946 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 11947 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
11948 (PTRACE_GET_THREAD_AREA): Define.
11949 (ps_get_thread_area): New function.
11950
52fb6437
NS
119512006-05-09 Nathan Sidwell <nathan@codesourcery.com>
11952
11953 * configure.srv (m68k*-*-uclinux*): New target.
11954 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
11955 (linux_resume_one_process): Remove extraneous cast.
11956 (linux_read_offsets): New.
11957 (linux_target_op): Add linux_read_offsets on mmuless systems.
11958 * server.c (handle_query): Add qOffsets logic.
11959 * target.h (struct target_ops): Add read_offsets.
11960
21b0f40c
DJ
119612006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
11962
11963 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
11964 (PTRACE_GET_THREAD_AREA): Define.
11965 (ps_get_thread_area): New function.
11966 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
11967 (linux-x86-64-low.o): Update.
11968
0050a760
DJ
119692006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
11970
11971 * configure.ac: Remove checks for prfpregset_t.
11972 * gdb_proc_service.h: New file.
11973 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
11974 new "gdb_proc_service.h".
11975 * proc-service.c: Likewise.
11976 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
11977 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
11978 * Makefile.in (gdb_proc_service_h): Updated.
11979 * configure, config.in: Regenerated.
11980
b92a518e
DJ
119812006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
11982
11983 * remote-utils.c (prepare_resume_reply): Move declaration
11984 of gdb_id_from_wait to the top of the block.
11985
545587ee
DJ
119862006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
11987
11988 * linux-low.c (regsets_store_inferior_registers): Read the regset
11989 from the target before filling it.
11990
9db87ebd
DJ
119912006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
11992
11993 * server.c (attach_inferior): Return SIGTRAP for a successful
11994 attach.
11995
dd24457d
DJ
119962006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
11997
11998 * Makefile.in (OBS): Add version.o.
11999 (STAGESTUFF): Delete.
12000 (version.o): Add dependencies.
12001 (version.c): Replace rule.
12002 (clean): Remove version.c.
12003 * server.c (gdbserver_version): New.
12004 (gdbserver_usage): Use printf.
12005 (main): Handle --version and --help.
12006 * server.h (version, host_name): Add declarations.
12007
6f0f660e
EZ
120082005-12-23 Eli Zaretskii <eliz@gnu.org>
12009
889bf7c5
PA
12010 * linux-arm-low.c:
12011 * linux-arm-low.c:
12012 * inferiors.c:
12013 * i387-fp.h:
12014 * i387-fp.c:
12015 * gdbreplay.c:
12016 * regcache.c:
12017 * proc-service.c:
12018 * mem-break.h:
12019 * mem-break.c:
12020 * linux-x86-64-low.c:
12021 * linux-sh-low.c:
12022 * linux-s390-low.c:
12023 * linux-ppc64-low.c:
12024 * linux-ppc-low.c:
12025 * linux-mips-low.c:
12026 * linux-m68k-low.c:
12027 * linux-m32r-low.c:
12028 * linux-low.h:
12029 * linux-low.c:
12030 * linux-ia64-low.c:
12031 * linux-i386-low.c:
12032 * linux-crisv32-low.c:
12033 * thread-db.c:
12034 * terminal.h:
12035 * target.h:
12036 * target.c:
12037 * server.h:
12038 * server.c:
12039 * remote-utils.c:
12040 * regcache.h:
12041 * utils.c:
12042 * Makefile.in:
12043 * configure.ac:
6f0f660e
EZ
12044 * gdbserver.1: Add (C) after Copyright. Update the FSF
12045 address.
12046
9d1fb177
DJ
120472005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
12048
12049 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
12050 (arm_breakpoint_at): Recognize both breakpoints.
12051 (the_low_target): Use the correct breakpoint instruction.
12052
011a70c2
DJ
120532005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
12054
12055 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
12056 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
12057 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
12058 (the_low_target): Update.
12059
7fb85e41
AS
120602005-10-25 Andreas Schwab <schwab@suse.de>
12061
12062 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
12063
12064 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
12065 (ia64_num_regs): Reduce to 462.
12066
3db0444b
DJ
120672005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
12068
12069 * acinclude.m4: Correct quoting.
12070 * aclocal.m4: Regenerated.
12071
12072 Suggested by SZOKOVACS Robert <szo@ies.hu>:
12073 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
12074 (thread_db_init): Call thread_db_err_str.
12075 * configure.ac: Check for TD_VERSION.
12076 * config.in, configure: Regenerated.
12077
bee0189a
DJ
120782005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12079
12080 * server.h (error, fatal, warning): Add ATTR_FORMAT.
12081
e9d25b98
DJ
120822005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
12083
12084 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
12085 is not available. Define HAVE_PTRACE_GETREGS if it is.
12086 * config.in, configure: Regenerated.
12087 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
12088 * linux-i386-low.c, linux-m68k-low.c: Update to use
12089 HAVE_PTRACE_GETREGS.
12090 * linux-low.c (regsets_fetch_inferior_registers)
12091 (regsets_store_inferior_registers): Only return 0 if we processed
12092 GENERAL_REGS.
12093 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
12094 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
12095
a06660f7
DJ
120962005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
12097
12098 * inferiors.c (struct thread_info): Add gdb_id.
12099 (add_thread): Add gdb_id argument.
12100 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
12101 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
12102 calls to add_thread.
12103 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
12104 * server.c (handle_query): Use thread_to_gdb_id.
12105 (handle_v_cont, main): Use gdb_id_to_thread_id.
12106 * server.h (add_thread): Update prototype.
12107 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
12108 prototypes.
12109
5a1f5858
DJ
121102005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
12111
12112 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
12113 left-padded registers.
12114 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
12115 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
12116
e122f1f5
SE
121172005-07-01 Steve Ellcey <sje@cup.hp.com>
12118
12119 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
12120 * configure: Regenerate.
12121 * config.in: Regenerate.
12122 * server.h (NEED_DECLARATION_STRERROR):
12123 Replace with !HAVE_DECL_STRERROR.
12124
d592fa2f
DJ
121252005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
12126
12127 * linux-low.c (linux_wait, linux_send_signal): Don't test
12128 an unsigned long variable for > 0 if it could be MAX_ULONG.
12129 * server.c (myresume): Likewise.
12130 * target.c (set_desired_inferior): Likewise.
12131
ccbd4912
MK
121322005-06-13 Mark Kettenis <kettenis@gnu.org>
12133
12134 * configure.ac: Simplify and improve check for socklen_t.
12135 * configure, config.in: Regenerate.
12136
f450004a
DJ
121372005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
12138
12139 * acconfig.h: Remove.
12140 * configure.ac: Add a test for socklen_t. Use three-argument
12141 AC_DEFINE throughout.
12142 * config.in: Regenerated using autoheader 2.59.
12143 * configure: Regenerated.
12144
12145 * gdbreplay.c (socklen_t): Provide a default.
12146 (remote_open): Use socklen_t.
12147 * remote-utils.c (socklen_t): Provide a default.
12148 (remote_open): Use socklen_t.
12149 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
12150 unsigned char.
12151
12152 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
12153 char for buffers.
12154 * linux-low.c (linux_read_memory, linux_write_memory)
12155 (linux_read_auxv): Likewise.
12156 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
12157 (check_mem_write): Likewise.
12158 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
12159 Likewise.
12160 * regcache.c (struct inferior_rgcache_data, registers_to_string)
12161 (registers_from_string, register_data): Likewise.
12162 * server.c (handle_query, main): Likewise.
12163 * server.h (convert_ascii_to_int, convert_int_to_ascii)
12164 (decode_M_packet): Likewise.
12165 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
12166 * target.h (struct target_ops): Update read_memory, write_memory,
12167 and read_auxv.
12168 (read_inferior_memory, write_inferior_memory): Update.
12169 * linux-low.h (struct linux_target_ops): Change type of breakpoint
12170 to unsigned char *.
12171 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
12172 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
12173 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
12174 linux-s390-low.c, linux-sh-low.c: Update for changes in
12175 read_inferior_memory and the_low_target->breakpoint.
12176
eee84df1
DJ
121772005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
12178
12179 * Makefile.in (SFILES): Add linux-ppc64-low.c.
12180 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
12181 * configure.srv: Add powerpc64-*-linux*.
12182 * linux-ppc64-low.c: New file.
12183
45b134e5
OF
121842005-05-23 Orjan Friberg <orjanf@axis.com>
12185
12186 * linux-cris-low.c: New file with support for CRIS.
12187 * linux-crisv32-low.c: Ditto for CRISv32.
12188 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
12189 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 12190 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
12191 reg-crisv32.o, and reg-crisv32.c to make rules.
12192 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
12193 recognized targets.
12194
48d93c75
UW
121952005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
12196
12197 * linux-low.c (fetch_register): Ensure buffer size is a multiple
12198 of sizeof (PTRACE_XFER_TYPE).
12199 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
12200
e013ee27
OF
122012005-05-12 Orjan Friberg <orjanf@axis.com>
12202
889bf7c5 12203 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
12204 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
12205 pointers for hardware watchpoint support.
12206 * linux-low.h (struct linux_target_ops): Ditto.
12207 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
12208 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
12209 to linux_target_ops.
12210 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
12211 reply packet.
12212 * server.c (main): Recognize 'Z' and 'z' packets.
12213
b0ded00b
UW
122142005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
12215
12216 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
12217 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
12218 (the_low_target): Add new members.
12219
8643e2ad
DJ
122202005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
12221
12222 * proc-service.c (ps_lgetregs): Search all_processes instead of
12223 all_threads.
12224
fc620387
DJ
122252005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
12226
12227 * server.c (start_inferior): Change return type to int.
12228 (attach_inferior): Change sigptr to int *.
12229 (handle_v_cont, handle_v_requests): Change signal to int *.
12230 (main): Change signal to int.
12231
122322005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
12233
12234 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
12235 * configure.srv: Add m32r*-*-linux*.
12236 * linux-m32r-low.c: New file.
12237
e0e76420
DJ
122382005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
12239
12240 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
12241
a1928bad
DJ
122422005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
12243
12244 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
12245 Take unsigned long arguments for PIDs.
12246 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
12247 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
12248 (wait_for_sigstop, linux_resume_one_process)
12249 (regsets_fetch_inferior_registers, linux_send_signal)
12250 (linux_read_auxv): Likewise. Update the types of variables holding
12251 PIDs. Update format string specifiers.
12252 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
12253 * remote-utils.c (prepare_resume_reply): Likewise.
12254 * server.c (cont_thread, general_thread, step_thread)
12255 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
12256 unsigned long.
12257 (handle_query): Update format specifiers.
12258 (handle_v_cont, main): Use strtoul for thread IDs.
12259 * server.h (struct inferior_list_entry): Use unsigned long for ID.
12260 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
12261 (general_thread, step_thread, thread_from_wait)
12262 (old_thread_from_wait): Update.
12263 * target.h (struct thread_resume): Use unsigned long for THREAD.
12264 (struct target_ops): Use unsigned long for arguments to attach and
12265 thread_alive.
12266
dcdb98d2
DJ
122672005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
12268
12269 * acinclude.m4: Include bfd/bfd.m4 directly.
12270 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
12271 <agriffis@toolchain.org>.
12272 * aclocal.m4, configure: Regenerated.
12273
bec39cab
AC
122742005-01-07 Andrew Cagney <cagney@gnu.org>
12275
12276 * configure.ac: Rename configure.in, require autoconf 2.59.
12277 * configure: Re-generate.
12278
434c4c77
DJ
122792004-12-08 Daniel Jacobowitz <dan@debian.org>
12280
12281 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
12282 LIBS when finished.
12283 * aclocal.m4: Regenerated.
12284 * configure: Regenerated.
12285
db1d3e1b
AS
122862004-11-21 Andreas Schwab <schwab@suse.de>
12287
12288 * linux-m68k-low.c (m68k_num_gregs): Define.
12289 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
12290 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
12291 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
12292 (m68k_breakpoint_at): New. Add to the_low_target.
12293
12294 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
12295 srv_linux_thread_db to yes.
12296
43360365
JB
122972004-10-20 Joel Brobecker <brobecker@gnat.com>
12298
12299 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
12300 (ARCH_SET_FS): Likewise.
12301 (ARCH_GET_FS): Likewise.
12302 (ARCH_GET_GS): Likewise.
12303
fd500816
DJ
123042004-10-16 Daniel Jacobowitz <dan@debian.org>
12305
12306 * linux-i386-low.c (ps_get_thread_area): New.
12307 * linux-x86-64-low.c (ps_get_thread_area): New.
12308 * linux-low.c: Include <sys/syscall.h>.
12309 (linux_kill_one_process): Don't kill the first thread here.
12310 (linux_kill): Kill the first thread here.
12311 (kill_lwp): New function.
12312 (send_sigstop, linux_send_signal): Use it.
12313 * proc-service.c: Clean up #ifdefs.
12314 (fpregset_info): Delete.
12315 (ps_lgetregs): Update and enable implementation.
12316 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
12317 implementations.
12318 * remote-utils.c (struct sym_cache, symbol_cache): New.
12319 (input_interrupt): Print a clearer message.
12320 (async_io_enabled): New variable.
12321 (enable_async_io, disable_async_io): Use it. Update comments.
12322 (look_up_one_symbol): Use the symbol cache.
12323 * thread-db.c (thread_db_look_up_symbols): New function.
12324 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
12325
f6de3c42
DJ
123262004-10-16 Daniel Jacobowitz <dan@debian.org>
12327
12328 * configure.in: Test for -rdynamic.
12329 * configure: Regenerated.
12330 * Makefile (INTERNAL_LDFLAGS): New.
12331 (gdbserver, gdbreplay): Use it.
12332
2c0fc042
AC
123332004-09-02 Andrew Cagney <cagney@gnu.org>
12334
12335 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
12336
075b3282
DJ
123372004-03-23 Daniel Jacobowitz <drow@mvista.com>
12338
12339 * linux-low.c (linux_wait): Clear all_processes list also.
12340
fa6a77dc
DJ
123412004-03-12 Daniel Jacobowitz <drow@mvista.com>
12342
12343 * linux-low.c: Include <errno.h>. Remove extern declaration of
12344 errno.
12345
6d782a97
DJ
123462004-03-12 Daniel Jacobowitz <drow@mvista.com>
12347
12348 * gdbreplay.c, server.h, utils.c: Update copyright years.
12349
3a7fb99b
DJ
123502004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
12351
12352 * server.c (main): Print child status or termination signal from
12353 variable 'signal', not 'sig'.
12354
c3e735a6
DJ
123552004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
12356
12357 * linux-low.c (linux_read_memory): Change return type to
12358 int. Check for and return error from ptrace().
12359 * target.c (read_inferior_memory): Change return type to int. Pass
12360 back return status from the_target->read_memory().
12361 * target.h (struct target_ops): Adapt *read_memory() prototype.
12362 Update comment.
12363 (read_inferior_memory): Adapt prototype.
12364 * server.c (main): Return an error packet if
12365 read_inferior_memory() returns an error.
12366
a59d1c82
DJ
123672004-03-04 Daniel Jacobowitz <drow@mvista.com>
12368
12369 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
12370 Unify with other clean targets.
12371
dc3f8883
DJ
123722004-02-29 Daniel Jacobowitz <drow@mvista.com>
12373
12374 * server.c (handle_v_cont): Call set_desired_inferior.
12375
89a208da
DJ
123762004-02-29 Daniel Jacobowitz <drow@mvista.com>
12377
12378 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
12379
62ea82f5
DJ
123802004-02-29 Daniel Jacobowitz <drow@mvista.com>
12381
12382 * linux-low.c (linux_wait): Unblock async I/O.
12383 (linux_resume): Block and enable async I/O.
12384 * remote-utils.c (block_async_io, unblock_async_io): New functions.
12385 * server.h (block_async_io, unblock_async_io): Add prototypes.
12386
6910d122
DJ
123872004-02-29 Daniel Jacobowitz <drow@mvista.com>
12388
12389 * remote-utils.c (remote_open): Print a status notice after
12390 opening a TCP port.
12391 * server.c (attach_inferior): Print a status notice after
12392 attaching.
12393
123942004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
12395
12396 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
12397
c89dc5d4
DJ
123982004-02-26 Daniel Jacobowitz <drow@mvista.com>
12399
12400 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
12401 error packet.
12402 * server.c, target.h: Update copyright years.
12403
4b8dad4a
RM
124042004-02-25 Roland McGrath <roland@redhat.com>
12405
12406 * target.h (struct target_ops): New member `read_auxv'.
12407 * server.c (handle_query): Handle qPart:auxv:read: query using that.
12408 * linux-low.c (linux_read_auxv): New function.
12409 (linux_target_ops): Initialize `read_auxv' member to that.
12410
d7446758
JB
124112004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
12412
12413 Committed by Jim Blandy <jimb@redhat.com>.
12414
12415 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 12416 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
12417 instead of GPR_SIZE to distiguish s390 and s390x targets.
12418
5544ad89
DJ
124192004-01-31 Daniel Jacobowitz <drow@mvista.com>
12420
12421 * linux-low.c: Update copyright year.
12422 (check_removed_breakpoint): Clear pending_is_breakpoint.
12423 (linux_set_resume_request, linux_queue_one_thread)
12424 (resume_status_pending_p): New functions.
12425 (linux_continue_one_thread): Use process->resume.
12426 (linux_resume): Only resume threads if there are no pending events.
12427 * linux-low.h (struct process_info): Add resume request
12428 pointer.
12429
2a68b70e
DJ
124302004-01-30 Daniel Jacobowitz <drow@mvista.com>
12431
12432 * regcache.c (new_register_cache): Clear the allocated register
12433 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
12434
64386c31
DJ
124352003-10-13 Daniel Jacobowitz <drow@mvista.com>
12436
12437 * linux-low.c (linux_resume): Take a struct thread_resume *
12438 argument.
12439 (linux_wait): Update call.
12440 (resume_ptr): New static variable.
12441 (linux_continue_one_thread): Renamed from
12442 linux_continue_one_process. Use resume_ptr.
12443 (linux_resume): Use linux_continue_one_thread.
12444 * server.c (handle_v_cont, handle_v_requests): New functions.
12445 (myresume): New function.
12446 (main): Handle 'v' case.
12447 * target.h (struct thread_resume): New type.
12448 (struct target_ops): Change argument of "resume" to struct
12449 thread_resume *.
12450 (myresume): Delete macro.
12451
c938e9b0
L
124522003-08-08 H.J. Lu <hongjiu.lu@intel.com>
12453
12454 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
12455 (uninstall): Support DESTDIR.
12456
7f313d07
BC
12457Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
12458
12459 * configure.srv: Add xscale*linux copy of arm*linux entry.
12460
3b2fc2ea
DJ
124612003-07-24 Daniel Jacobowitz <drow@mvista.com>
12462
12463 * linux-arm-low.c (arm_reinsert_addr): New function.
12464 (the_low_target): Add arm_reinsert_addr.
12465
1c0a559e
MK
124662003-07-08 Mark Kettenis <kettenis@gnu.org>
12467
12468 * mem-break.c: Remove whitespace at end of file.
12469
43d5792c
DJ
124702003-06-28 Daniel Jacobowitz <drow@mvista.com>
12471
12472 * configure.in: Check whether we need to prototype strerror.
12473 * server.h: Optionally prototype strerror.
12474 * gdbreplay.c (perror_with_name): Use strerror.
12475 * linux-low.c (linux_attach_lwp): Use strerror.
12476 * utils.c (perror_with_name): Use strerror.
12477 * config.in, configure: Regenerated.
12478
c8a86edf
DJ
124792003-06-28 Daniel Jacobowitz <drow@mvista.com>
12480
12481 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
12482 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
12483
73d37363
DJ
124842003-06-20 Daniel Jacobowitz <drow@mvista.com>
12485
12486 * Makefile.in (SFILES): Update.
12487 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
12488 low-sun3.c: Remove files.
12489
6ad8ae5c
DJ
124902003-06-17 Daniel Jacobowitz <drow@mvista.com>
12491
12492 * linux-low.c: Move comment to linux_thread_alive where it belonged.
12493 (linux_detach_one_process, linux_detach): New functions.
12494 (linux_target_ops): Add linux_detach.
12495 * server.c (main): Handle 'D' packet.
12496 * target.h (struct target_ops): Add "detach" member.
12497 (detach_inferior): Define.
12498
1581182a
MK
124992003-06-13 Mark Kettenis <kettenis@gnu.org>
12500
12501 From Kelley Cook <kelleycook@wideopenwest.com>:
12502 * configure.srv: Accept i[34567]86 variants.
12503
e5379b03
DJ
125042003-06-05 Daniel Jacobowitz <drow@mvista.com>
12505
12506 * linux-low.c (linux_wait_for_event): Correct comment typos.
12507 (linux_resume_one_process): Call check_removed_breakpoint.
12508 (linux_send_signal): New function.
12509 (linux_target_ops): Add linux_send_signal.
12510 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
12511 of kill.
12512 * target.h (struct target_ops): Add send_signal.
12513
2ff29de4
JB
125142003-05-29 Jim Blandy <jimb@redhat.com>
12515
12516 * linux-low.c (usr_store_inferior_registers): Transfer buf in
12517 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
12518 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
12519 away part of the register's value.
12520
254787d4
DJ
125212003-03-26 Daniel Jacobowitz <drow@mvista.com>
12522
12523 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
12524 (linux_wait_for_event, linux_init_signals): Likewise.
12525
94e10508
DJ
125262003-03-17 Daniel Jacobowitz <drow@mvista.com>
12527
12528 * configure.in: Check for stdlib.h.
12529 * configure: Regenerated.
12530 * config.in: Regenerated.
12531
4c0711e0
DJ
125322003-01-04 Andreas Schwab <schwab@suse.de>
12533
12534 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
12535
ef66e766
AC
125362003-01-02 Andrew Cagney <ac131313@redhat.com>
12537
12538 * Makefile.in: Remove obsolete code.
12539
a1358604
DJ
125402002-11-20 Daniel Jacobowitz <drow@mvista.com>
12541
12542 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
12543 defined(PT_FPR0_HI).
12544
23ce3b1c
DJ
125452002-11-17 Stuart Hughes <seh@zee2.com>
12546
12547 * linux-arm-low.c (arm_num_regs): Increase.
12548 (arm_regmap): Include status register.
12549
125502002-11-17 Daniel Jacobowitz <drow@mvista.com>
12551
12552 * linux-low.c (register_addr): Remove incorrect -1 check.
12553
a9fa9f7d
DJ
125542002-08-29 Daniel Jacobowitz <drow@mvista.com>
12555
12556 * linux-low.c (linux_create_inferior): Call setpgid. Return
12557 the new PID.
12558 (unstopped_p, linux_signal_pid): Remove.
12559 (linux_target_ops): Remove linux_signal_pid.
12560 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
12561 global instead of target method.
12562 * target.h (struct target_ops): Remove signal_pid. Update comment
12563 for create_inferior.
12564 * server.c (signal_pid): New variable.
12565 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 12566 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
12567 (attach_inferior): Set signal_pid.
12568
17574093
DJ
125692002-08-23 Daniel Jacobowitz <drow@mvista.com>
12570
12571 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
12572
125732002-08-20 Jim Blandy <jimb@redhat.com>
12574
12575 * Makefile.in (LDFLAGS): Allow the configure script to establish a
12576 default for this.
12577
125782002-08-01 Andrew Cagney <cagney@redhat.com>
12579
12580 * Makefile.in: Make chill references obsolete.
12581
125822002-07-24 Kevin Buettner <kevinb@redhat.com>
12583
12584 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
12585 * configure: Regenerate.
12586 * config.in: Regenerate.
12587
125882002-07-09 David O'Brien <obrien@FreeBSD.org>
12589
12590 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
12591 (perror_with_name, remote_close, remote_open, expect, play): Static.
12592
125932002-07-04 Michal Ludvig <mludvig@suse.cz>
12594
4b8dad4a 12595 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
12596 byte offsets instead of an array of indexes.
12597 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
12598
125992002-06-13 Daniel Jacobowitz <drow@mvista.com>
12600
12601 * regcache.c: Add comment.
12602
126032002-06-11 Daniel Jacobowitz <drow@mvista.com>
12604
12605 * thread-db.c: New file.
12606 * proc-service.c: New file.
12607 * acinclude.m4: New file.
12608 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
12609 proc-service.o, and thread-db.o.
12610 (linux-low.o): Add USE_THREAD_DB.
12611 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
12612 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
12613 * aclocal.m4: Regenerated.
12614 * config.in: Regenerated.
12615 * configure: Regenerated.
12616 * configure.in: Check for proc_service.h, sys/procfs.h,
12617 thread_db.h, and linux/elf.h headrs.
12618 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
12619 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
12620 Check for -lthread_db and thread support.
12621 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
12622 PowerPC, and SuperH.
12623 * i387-fp.c: Constify arguments.
12624 * i387-fp.h: Likewise.
12625 * inferiors.c: (struct thread_info): Renamed from
12626 `struct inferior_info'. Remove PID member. Use generic inferior
12627 list header. All uses updated.
12628 (inferiors, signal_pid): Removed.
12629 (all_threads): New variable.
12630 (get_thread): Define.
12631 (add_inferior_to_list): New function.
12632 (for_each_inferior): New function.
12633 (change_inferior_id): New function.
12634 (add_inferior): Removed.
12635 (remove_inferior): New function.
12636 (add_thread): New function.
12637 (free_one_thread): New function.
12638 (remove_thread): New function.
12639 (clear_inferiors): Use for_each_inferior and free_one_thread.
12640 (find_inferior): New function.
12641 (find_inferior_id): New function.
12642 (inferior_target_data): Update argument type.
12643 (set_inferior_target_data): Likewise.
12644 (inferior_regcache_data): Likewise.
12645 (set_inferior_regcache_data): Likewise.
12646 * linux-low.c (linux_bp_reinsert): Remove.
12647 (all_processes, stopping_threads, using_thrads)
12648 (struct pending_signals, debug_threads, pid_of): New.
12649 (inferior_pid): Replace with macro.
12650 (struct inferior_linux_data): Remove.
12651 (get_stop_pc, add_process): New functions.
12652 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
12653 Use add_process and add_thread.
12654 (linux_attach_lwp): New function, based on old linux_attach. Use
12655 add_process and add_thread. Set stop_expected for new threads.
12656 (linux_attach): New function.
12657 (linux_kill_one_process): New function.
12658 (linux_kill): Kill all LWPs.
12659 (linux_thread_alive): Use find_inferior_id.
12660 (check_removed_breakpoints, status_pending_p): New functions.
12661 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
12662 Update. Use WNOHANG. Wait for cloned processes also. Update process
12663 struct for the found process.
12664 (linux_wait_for_event): New function.
12665 (linux_wait): Use it. Support LWPs.
12666 (send_sigstop, wait_for_sigstop, stop_all_processes)
12667 (linux_resume_one_process, linux_continue_one_process): New functions.
12668 (linux_resume): Support LWPs.
12669 (REGISTER_RAW_SIZE): Remove.
12670 (fetch_register): Use register_size instead. Call supply_register.
12671 (usr_store_inferior_registers): Likewise. Call collect_register.
12672 Fix recursive case.
12673 (regsets_fetch_inferior_registers): Improve error message.
12674 (regsets_store_inferior_registers): Add debugging.
12675 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
12676 (unstopped_p, linux_signal_pid): New functions.
12677 (linux_target_ops): Add linux_signal_pid.
12678 (linux_init_signals): New function.
12679 (initialize_low): Call it. Initialize using_threads.
12680 * regcache.c (inferior_regcache_data): Add valid
12681 flag.
12682 (get_regcache): Fetch registers lazily. Add fetch argument
12683 and update all callers.
12684 (regcache_invalidate_one, regcache_invalidate): New
12685 functions.
12686 (new_register_cache): Renamed from create_register_cache.
12687 Return the new regcache.
12688 (free_register_cache): Change argument to a void *.
12689 (registers_to_string, registers_from_string): Call get_regcache
12690 with fetch flag set.
12691 (register_data): Make static. Pass fetch flag to get_regcache.
12692 (supply_register): Call get_regcache with fetch flag clear.
12693 (collect_register): Call get_regcache with fetch flag set.
12694 (collect_register_as_string): New function.
12695 * regcache.h: Update.
12696 * remote-utils.c (putpkt): Flush after debug output and use
12697 stderr.
12698 Handle input interrupts while waiting for an ACK.
12699 (input_interrupt): Use signal_pid method.
12700 (getpkt): Flush after debug output and use stderr.
12701 (outreg): Use collect_register_as_string.
12702 (new_thread_notify, dead_thread_notify): New functions.
12703 (prepare_resume_reply): Check using_threads. Set thread_from_wait
12704 and general_thread.
12705 (look_up_one_symbol): Flush after debug output.
12706 * server.c (step_thread, server_waiting): New variables.
12707 (start_inferior): Don't use signal_pid. Update call to mywait.
12708 (attach_inferior): Update call to mywait.
12709 (handle_query): Handle qfThreadInfo and qsThreadInfo.
12710 (main): Don't fetch/store registers explicitly. Use
12711 set_desired_inferior. Support proposed ``Hs'' packet. Update
12712 calls to mywait.
12713 * server.h: Update.
12714 (struct inferior_list, struct_inferior_list_entry): New.
12715 * target.c (set_desired_inferior): New.
12716 (write_inferior_memory): Constify.
12717 (mywait): New function.
12718 * target.h: Update.
12719 (struct target_ops): New signal_pid method.
12720 (mywait): Removed macro, added prototype.
12721
12722 * linux-low.h (regset_func): Removed.
12723 (regset_fill_func, regset_store_func): New.
12724 (enum regset_type): New.
12725 (struct regset_info): Add type field. Use new operation types.
12726 (struct linux_target_ops): stop_pc renamed to get_pc.
12727 Add decr_pc_after_break and breakpoint_at.
12728 (get_process, get_thread_proess, get_process_thread)
12729 (strut process_info, all_processes, linux_attach_lwp)
12730 (thread_db_init): New.
12731
12732 * linux-arm-low.c (arm_get_pc, arm_set_pc,
12733 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
12734 (the_low_target): Add new members.
12735 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
12736 (i386_store_fpxregset): Constify.
12737 (target_regsets): Add new kind identifier.
12738 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
12739 (i386_set_pc): Add debugging.
12740 (i386_breakpoint_at): New function.
12741 (the_low_target): Add new members.
12742 * linux-mips-low.c (mips_get_pc, mips_set_pc)
12743 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
12744 (mips_breakpoint_at): New.
12745 (the_low_target): Add new members.
12746 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
12747 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
12748 (the_low_target): Add new members.
12749 * linux-sh-low.c (sh_get_pc, sh_set_pc)
12750 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
12751 (the_low_target): Add new members.
12752 * linux-x86-64-low.c (target_regsets): Add new kind
12753 identifier.
12754
127552002-05-15 Daniel Jacobowitz <drow@mvista.com>
12756
12757 From Martin Pool <mbp@samba.org>:
12758 * server.c (gdbserver_usage): New function.
12759 (main): Call it.
12760
127612002-05-14 Daniel Jacobowitz <drow@mvista.com>
12762
12763 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
12764 stop_at -> stop_pc.
12765
127662002-05-04 Andrew Cagney <ac131313@redhat.com>
12767
12768 * Makefile.in: Remove obsolete code.
12769
127702002-04-24 Michal Ludvig <mludvig@suse.cz>
12771
12772 * linux-low.c (regsets_fetch_inferior_registers),
12773 (regsets_store_inferior_registers): Removed cast to int from
12774 ptrace() calls.
12775 * regcache.h: Added declaration of struct inferior_info.
12776
127772002-04-20 Daniel Jacobowitz <drow@mvista.com>
12778
12779 * inferiors.c (struct inferior_info): Add regcache_data.
12780 (add_inferior): Call create_register_cache.
12781 (clear_inferiors): Call free_register_cache.
12782 (inferior_regcache_data, set_inferior_regcache_data): New functions.
12783 * regcache.c (struct inferior_regcache_data): New.
12784 (registers): Remove.
12785 (get_regcache): New function.
12786 (create_register_cache, free_register_cache): New functions.
12787 (set_register_cache): Don't initialize the register cache here.
12788 (registers_to_string, registers_from_string, register_data): Call
12789 get_regcache.
12790 * regcache.h: Add prototypes.
12791 * server.h: Likewise.
12792
127932002-04-20 Daniel Jacobowitz <drow@mvista.com>
12794
12795 * mem-break.c: New file.
12796 * mem-break.h: New file.
12797 * Makefile.in: Add mem-break.o rule; update server.h
12798 dependencies.
12799 * inferiors.c (struct inferior_info): Add target_data
12800 member.
12801 (clear_inferiors): Free target_data member if set.
12802 (inferior_target_data, set_inferior_target_data): New functions.
12803 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
12804 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
12805 * linux-low.c (linux_bp_reinsert): New variable.
12806 (struct inferior_linux_data): New.
12807 (linux_create_inferior): Use set_inferior_target_data.
12808 (linux_attach): Likewise. Call add_inferior.
12809 (linux_wait_for_one_inferior): New function.
12810 (linux_wait): Call it.
12811 (linux_write_memory): Add const.
12812 (initialize_low): Call set_breakpoint_data.
12813 * linux-low.h (struct linux_target_ops): Add breakpoint
12814 handling members.
12815 * server.c (attach_inferior): Remove extra add_inferior
12816 call.
12817 * server.h: Include mem-break.h. Update inferior.c
12818 prototypes.
12819 * target.c (read_inferior_memory)
12820 (write_inferior_memory): New functions.
12821 * target.h (read_inferior_memory)
12822 (write_inferior_memory): Change macros to prototypes.
12823 (struct target_ops): Update comments. Add const to write_memory
12824 definition.
12825
128262002-04-11 Daniel Jacobowitz <drow@mvista.com>
12827
12828 * linux-low.c (usr_store_inferior_registers): Support
12829 registers which are allowed to fail to store.
12830 * linux-low.h (linux_target_ops): Likewise.
12831 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
12832 (ppc_cannot_store_register): FPSCR may not be storable.
12833
128342002-04-09 Daniel Jacobowitz <drow@mvista.com>
12835
12836 * server.h: Include <string.h> if HAVE_STRING_H.
12837 * ChangeLog: Correct paths in last ChangeLog entry.
12838
128392002-04-09 Daniel Jacobowitz <drow@mvista.com>
12840
12841 * linux-low.h: Remove obsolete prototypes.
12842 (struct linux_target_ops): New.
12843 (extern the_low_target): New.
12844 * linux-low.c (num_regs, regmap): Remove declarations.
12845 (register_addr): Use the_low_target explicitly.
12846 (fetch_register): Likewise.
12847 (usr_fetch_inferior_registers): Likewise.
12848 (usr_store_inferior_registers): Likewise.
12849 * linux-arm-low.c (num_regs): Remove.
12850 (arm_num_regs): Define.
12851 (arm_regmap): Renamed from regmap, made static.
12852 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
12853 made static.
12854 (arm_cannot_store_register): Renamed from cannot_store_register,
12855 made static.
12856 (the_low_target): New.
12857 * linux-i386-low.c (num_regs): Remove.
12858 (i386_num_regs): Define.
12859 (i386_regmap): Renamed from regmap, made static.
12860 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
12861 made static.
12862 (i386_cannot_store_register): Renamed from cannot_store_register,
12863 made static.
12864 (the_low_target): New.
12865 * linux-ia64-low.c (num_regs): Remove.
12866 (ia64_num_regs): Define.
12867 (ia64_regmap): Renamed from regmap, made static.
12868 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
12869 made static.
12870 (ia64_cannot_store_register): Renamed from cannot_store_register,
12871 made static.
12872 (the_low_target): New.
12873 * linux-m68k-low.c (num_regs): Remove.
12874 (m68k_num_regs): Define.
12875 (m68k_regmap): Renamed from regmap, made static.
12876 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
12877 made static.
12878 (m68k_cannot_store_register): Renamed from cannot_store_register,
12879 made static.
12880 (the_low_target): New.
12881 * linux-mips-low.c (num_regs): Remove.
12882 (mips_num_regs): Define.
12883 (mips_regmap): Renamed from regmap, made static.
12884 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
12885 made static.
12886 (mips_cannot_store_register): Renamed from cannot_store_register,
12887 made static.
12888 (the_low_target): New.
12889 * linux-ppc-low.c (num_regs): Remove.
12890 (ppc_num_regs): Define.
12891 (ppc_regmap): Renamed from regmap, made static.
12892 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
12893 made static.
12894 (ppc_cannot_store_register): Renamed from cannot_store_register,
12895 made static.
12896 (the_low_target): New.
12897 * linux-s390-low.c (num_regs): Remove.
12898 (s390_num_regs): Define.
12899 (s390_regmap): Renamed from regmap, made static.
12900 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
12901 made static.
12902 (s390_cannot_store_register): Renamed from cannot_store_register,
12903 made static.
12904 (the_low_target): New.
12905 * linux-sh-low.c (num_regs): Remove.
12906 (sh_num_regs): Define.
12907 (sh_regmap): Renamed from regmap, made static.
12908 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
12909 made static.
12910 (sh_cannot_store_register): Renamed from cannot_store_register,
12911 made static.
12912 (the_low_target): New.
12913 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
12914 (the_low_target): New.
12915
129162002-04-09 Daniel Jacobowitz <drow@mvista.com>
12917
12918 * Makefile.in: Add stamp-h target.
12919 * configure.in: Create stamp-h.
12920 * configure: Regenerated.
12921
129222002-04-09 Daniel Jacobowitz <drow@mvista.com>
12923
12924 * inferiors.c: New file.
12925 * target.c: New file.
12926 * target.h: New file.
12927 * Makefile.in: Add target.o and inferiors.o. Update
12928 dependencies.
12929 * linux-low.c (inferior_pid): New static variable,
12930 moved from server.c.
12931 (linux_create_inferior): Renamed from create_inferior.
12932 Call add_inferior. Return 0 on success instead of a PID.
12933 (linux_attach): Renamed from myattach.
12934 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
12935 (linux_thread_alive): Renamed from mythread_alive.
12936 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
12937 child dies.
12938 (linux_resume): Renamed from myresume. Add missing ``return 0''.
12939 (regsets_store_inferior_registers): Correct error message.
12940 Add missing ``return 0''.
12941 (linux_fetch_registers): Renamed from fetch_inferior_registers.
12942 (linux_store_registers): Renamed from store_inferior_registers.
12943 (linux_read_memory): Renamed from read_inferior_memory.
12944 (linux_write_memory): Renamed from write_inferior_memory.
12945 (linux_target_ops): New structure.
12946 (initialize_low): Call set_target_ops ().
12947 * remote-utils.c (unhexify): New function.
12948 (hexify): New function.
12949 (input_interrupt): Send signals to ``signal_pid''.
12950 * server.c (inferior_pid): Remove.
12951 (start_inferior): Update create_inferior call.
12952 (attach_inferior): Call add_inferior.
12953 (handle_query): New function.
12954 (main): Call handle_query for `q' packets.
12955 * server.h: Include "target.h". Remove obsolete prototypes.
12956 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
12957
129582002-04-09 Daniel Jacobowitz <drow@mvista.com>
12959
12960 * Makefile.in: Add WARN_CFLAGS. Update configury
12961 dependencies.
12962 * configure.in: Check for <string.h>
12963 * configure: Regenerate.
12964 * config.in: Regenerate.
12965 * gdbreplay.c: Include needed system headers.
12966 (remote_open): Remove strchr prototype.
12967 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
12968 * regcache.c (supply_register): Change buf argument to const void *.
12969 (supply_register_by_name): Likewise.
12970 (collect_register): Change buf argument to void *.
12971 (collect_register_by_name): Likewise.
12972 * regcache.h: Add missing prototypes.
12973 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
12974 * server.c (handle_query): New function.
12975 (attached): New static variable, moved out of main.
12976 (main): Quiet longjmp clobber warnings.
12977 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
12978 * utils.c (error): Remove NORETURN.
12979 (fatal): Likewise.
This page took 1.745836 seconds and 4 git commands to generate.