]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/gdbserver/ChangeLog
Run gdb.base/sizeof.exp with board having gdb,noinferiorio
[thirdparty/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
fbec8956
AT
12015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2
3 * linux-arm-low.c (arm_reinsert_addr): Remove function.
4 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
5 * linux-cris-low.c (cris_reinsert_addr> Remove function.
6 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
7 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
8 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
9 * linux-mips-low.c (mips_reinsert_addr): Remove function.
10 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
11 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
12 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
13 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
14 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
15
9b4c5f87
AT
162015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
17
18 * linux-low.c (linux_look_up_symbols): Don't call
19 linux_supports_traceclone.
20 * linux-low.h (thread_db_init): Remove use_events argument.
21 * thread-db.c (thread_db_use_event): Remove global variable.
22 (struct thread_db) <td_thr_event_enable_p>: Remove field.
23 (struct thread_db) <td_create_bp>: Remove field.
24 (thread_db_create_event): Remove function.
25 (thread_db_enable_reporting): Likewise.
26 (find_one_thread): Don't check for thread_db_use_events.
27 (attach_thread): Likewise.
28 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
29 (try_thread_db_load_1): Don't check for thread_db_use_events.
30 (thread_db_init): Remove use_events argument and thread events
31 handling.
32 (remove_thread_event_breakpoints): Remove function.
33 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
34
7d00775e
AT
352015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
36
37 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
38 New function.
39 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
40 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
41 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
42 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
43 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
44 Initialize.
45 * linux-crisv32-low.c (cris_supports_hardware_single_step):
46 New function.
47 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
48 * linux-low.c (can_hardware_single_step): Use
49 supports_hardware_single_step.
50 (can_software_single_step): New function.
51 (start_step_over): Call can_software_single_step.
52 (linux_supports_hardware_single_step): New function.
53 (struct target_ops) <supports_software_single_step>: Initialize.
54 * linux-low.h (struct linux_target_ops)
55 <supports_hardware_single_step>: Initialize.
56 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
57 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
58 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
59 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
60 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
61 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
62 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
63 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
64 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
65 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
66 Initialize.
67 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
68 (struct linux_target_ops) <tile_supports_hardware_single_step>:
69 Initialize.
70 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
71 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
72 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
73 New function.
74 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
75 * target.h (struct target_ops): <supports_software_single_step>:
76 New field.
77 (target_supports_software_single_step): New macro.
78
2d97cd35
AT
792015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
80
81 * linux-low.c (linux_wait_1): Fix pc advance condition.
82 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
83 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
84
769ef81f
AT
852015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
86
87 * linux-arm-low.c (arm_is_thumb_mode): New function.
88 (arm_breakpoint_at): Use arm_is_thumb_mode.
89 (arm_breakpoint_kind_from_current_state): New function.
90 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
91 Initialize.
92 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
93 (linux_breakpoint_kind_from_current_state): New function.
94 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
95 * linux-low.h (struct linux_target_ops)
96 <breakpoint_kind_from_current_state>: New field.
97 * target.h (struct target_ops): Likewise.
98 (target_breakpoint_kind_from_current_state): New macro.
99
1bebeeca
PA
1002015-11-30 Pedro Alves <palves@redhat.com>
101
102 * linux-low.c (linux_resume): Wake up the event loop before
103 returning.
104
a67a9fae
PA
1052015-11-30 Pedro Alves <palves@redhat.com>
106
107 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
108 check.
109 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
110 to -1.
111 * target.c (struct thread_search): New structure.
112 (thread_search_callback): New function.
113 (prev_general_thread): New global.
114 (prepare_to_access_memory, done_accessing_memory): New functions.
115 * target.h (prepare_to_access_memory, done_accessing_memory):
116 Replace macros with function declarations.
117
f2faf941
PA
1182015-11-30 Pedro Alves <palves@redhat.com>
119
120 PR 14618
121 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
122 report TARGET_WAITKIND_NO_RESUMED.
123 * remote-utils.c (prepare_resume_reply): Handle
124 TARGET_WAITKIND_NO_RESUMED.
125 * server.c (report_no_resumed): New global.
126 (handle_query) <qSupported>: Handle "no-resumed+". Report
127 "no-resumed+" support.
128 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
129 return error if the client doesn't support no-resumed events.
130 (push_stop_notification): New function.
131 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
132 events if the client supports them.
133
a681f9c9
PA
1342015-11-30 Pedro Alves <palves@redhat.com>
135
136 * linux-low.c (thread_still_has_status_pending_p): Don't check
137 vCont;t here.
138 (lwp_resumed): New function.
139 (status_pending_p_callback): Return early if the LWP is not
140 supposed to be resumed.
141
65706a29
PA
1422015-11-30 Pedro Alves <palves@redhat.com>
143
144 * linux-low.c (handle_extended_wait): Assert that the LWP's
145 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
146 thread create events, leave the new child's status pending.
147 (linux_low_filter_event): If GDB wants to hear about thread exit
148 events, leave the LWP marked dead and don't delete it.
149 (linux_wait_for_event_filtered): Don't check for thread exit.
150 (filter_exit_event): New function.
151 (linux_wait_1): Use it, when returning an exit event.
152 (linux_resume_one_lwp_throw): Assert that the LWP's
153 waitstatus is TARGET_WAITKIND_IGNORE.
154 * remote-utils.c (prepare_resume_reply): Handle
155 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
156 * server.c (report_thread_events): New global.
157 (handle_general_set): Handle QThreadEvents.
158 (handle_query) <qSupported>: Handle and report QThreadEvents+;
159 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
160 TARGET_WAITKIND_THREAD_EXITED.
161 * server.h (report_thread_events): Declare.
162
56cf4bed
PA
1632015-11-30 Pedro Alves <palves@redhat.com>
164
165 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
166 the thread's last_resume_kind was resume_stop.
167
500c1d85
PA
1682015-11-30 Pedro Alves <palves@redhat.com>
169
170 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
171 before returning.
172
de979965
PA
1732015-11-30 Pedro Alves <palves@redhat.com>
174
175 * server.c (handle_v_requests): Handle vCtrlC.
176
34c65914
PA
1772015-11-30 Pedro Alves <palves@redhat.com>
178
179 * gdbthread.h (find_any_thread_of_pid): Declare.
180 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
181 functions.
182 * server.c (handle_query): If current_thread is NULL, look for
183 another thread of the selected process.
184
79efa585 1852015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 186 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
187
188 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
189 * server.c (handle_qxfer_threads_worker): Refactor to include thread
190 name in reply.
191 * target.h (struct target_ops) <thread_name>: New field.
192 (target_thread_name): New macro.
193
80d82c19
JB
1942015-11-23 Joel Brobecker <brobecker@adacore.com>
195
196 * regcache.h (regcache_invalidate_pid): Add declaration.
197 * regcache.c (regcache_invalidate_pid): New function, extracted
198 from regcache_invalidate.
199 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
200 Add trivial documentation comment.
201 * lynx-low.c: Use regcache_invalidate_pid instead of
202 regcache_invalidate.
203
64da5dd5
JB
2042015-11-23 Joel Brobecker <brobecker@adacore.com>
205
206 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
207 and Elf64_auxv_t if the target is Android.
208
37ce4055
DE
2092015-11-22 Doug Evans <xdje42@gmail.com>
210
211 * target.h: #include <sys/types.h>.
212
06e03fff
PA
2132015-11-19 Pedro Alves <palves@redhat.com>
214
215 * linux-low.c (linux_process_qsupported): Change prototype.
216 Adjust.
217 * linux-low.h (struct linux_target_ops) <process_qsupported>:
218 Change prototype.
219 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
220 and adjust to loop over all features.
221 * server.c (handle_query) <qSupported>: Adjust to call
222 target_process_qsupported once, passing it a vector of unprocessed
223 features.
224 * target.h (struct target_ops) <process_qsupported>: Change
225 prototype.
226 (target_process_qsupported): Adjust.
227
9a084706
PA
2282015-11-19 Pedro Alves <palves@redhat.com>
229
230 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
231 mode.
232 * configure: Regenerate.
233
dad44a1f
PA
2342015-11-19 Pedro Alves <palves@redhat.com>
235
236 * configure: Regenerate.
237
231c0592
YQ
2382015-11-19 Yao Qi <yao.qi@linaro.org>
239
240 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
241 type to uint32_t.
242
6c1c9a8b
YQ
2432015-11-19 Yao Qi <yao.qi@linaro.org>
244
245 * linux-aarch64-low.c (enum aarch64_operand_type): New.
246 (struct aarch64_operand): Move enum out.
247
9caa3311
YQ
2482015-11-19 Yao Qi <yao.qi@linaro.org>
249
250 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
251 struct user_fpsimd_state *.
252 (aarch64_store_fpregset): Likewise.
253
6a69a054
YQ
2542015-11-19 Yao Qi <yao.qi@linaro.org>
255
256 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
257 struct user_pt_regs *.
258 (aarch64_store_gregset): Likewise.
259
1798301e
PA
2602015-11-18 Pedro Alves <palves@redhat.com>
261
262 * Makefile.in (all_object_files): Add $IPA_OBJS.
263
ce7715e2
PA
2642015-11-17 Pedro Alves <palves@redhat.com>
265
266 * win32-low.c (win32_resume): Use gdb_signal_from_host,
267 GDB_SIGNAL_0 and gdb_signal_to_string.
268
c0879059
PA
2692015-11-17 Pedro Alves <palves@redhat.com>
270
271 * win32-low.c (handle_output_debug_string): Remove parameter.
272 (win32_kill): Remove our_status local and adjust call to
273 handle_output_debug_string.
274 (get_child_debug_event): Adjust call to
275 handle_output_debug_string.
276
1996e237
SM
2772015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
278
279 * linux-mips-low.c (mips_fill_gregset): Add cast.
280 (mips_store_gregset): Likewise.
281 (mips_fill_fpregset): Likewise.
282 (mips_store_fpregset): Likewise.
283
cbec665b
SM
2842015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
285
286 * linux-mips-low.c (mips_add_watchpoint): Rename private to
287 priv.
288
eb3e3c67
SM
2892015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
290
291 * linux-mips-low.c (mips_linux_new_thread): Change type of
292 watch_type to enum target_hw_bp_type.
293
171de4b8
SM
2942015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
295
296 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
297 Change return type to arm_hwbp_type.
298
04248ead
SM
2992015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
300
301 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
302 (arm_store_gregset): Likewise.
303 * linux-arm-low.c (arm_get_hwcap): Likewise.
304 (arm_read_description): Likewise.
305
04b3479c
SM
3062015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
307
308 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
309
2bc84e8a
SM
3102015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
311
312 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
313 (ppc_fill_vsxregset): Likewise.
314 (ppc_store_vsxregset): Likewise.
315 (ppc_fill_vrregset): Likewise.
316 (ppc_store_vrregset): Likewise.
317 (ppc_fill_evrregset): Likewise.
318 (ppc_store_evrregset): Likewise.
319
e6c5bb05
SM
3202015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
321
322 * linux-ppc-low.c (ppc_usrregs_info): Remove
323 forward-declaration.
324 (ppc_arch_setup): Move lower in file.
325
7ea45d72
SM
3262015-10-30 Simon Marchi <simon.marchi@ericsson.com>
327
328 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
329 (ps_pdwrite): Likewise.
330
69291610
HW
3312015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
332
333 * linux-arm-low.c (arm_new_thread): Move pointer dereference
334 to after assert checks.
335
b42945fd
SM
3362015-10-29 Simon Marchi <simon.marchi@ericsson.com>
337
338 * proc-service.c (ps_pdread): Add/adjust casts.
339 (ps_pdwrite): Add/adjust casts.
340
d6f85c84
SM
3412015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
342
343 * server.c (handle_search_memory_1): Cast return value of
344 memmem.
345
f98cd059
SM
3462015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
347
348 * server.c (write_qxfer_response): Change type of data to
349 gdb_byte *.
350
d2412fa5
PA
3512015-10-29 Pedro Alves <palves@redhat.com>
352
353 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
354
c17414a2
PA
3552015-10-29 Pedro Alves <palves@redhat.com>
356
357 * tracepoint.c (clear_installed_tracepoints): Add casts.
358
e053fbc4
PA
3592015-10-29 Pedro Alves <palves@redhat.com>
360
361 * server.c (handle_v_cont, process_serial_event): Add enum
362 gdb_signal casts to signal parsing code.
363
add67df8
PA
3642015-10-29 Pedro Alves <palves@redhat.com>
365
366 * linux-low.h (NULL_REGSET): Define.
367 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
368 * linux-arm-low.c (arm_regsets): Likewise.
369 * linux-crisv32-low.c (cris_regsets): Likewise.
370 * linux-m68k-low.c (m68k_regsets): Likewise.
371 * linux-mips-low.c (mips_regsets): Likewise.
372 * linux-nios2-low.c (nios2_regsets): Likewise.
373 * linux-ppc-low.c (ppc_regsets): Likewise.
374 * linux-s390-low.c (s390_regsets): Likewise.
375 * linux-sh-low.c (sh_regsets): Likewise.
376 * linux-sparc-low.c (sparc_regsets): Likewise.
377 * linux-tic6x-low.c (tic6x_regsets): Likewise.
378 * linux-tile-low.c (tile_regsets): Likewise.
379 * linux-x86-low.c (x86_regsets): Likewise.
380 * linux-xtensa-low.c (xtensa_regsets): Likewise.
381
50bc912a
PA
3822015-10-29 Pedro Alves <palves@redhat.com>
383
384 * linux-low.h (NULL_REGSET): Define.
385 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
386 * linux-arm-low.c (arm_regsets): Likewise.
387 * linux-crisv32-low.c (cris_regsets): Likewise.
388 * linux-m68k-low.c (m68k_regsets): Likewise.
389 * linux-mips-low.c (mips_regsets): Likewise.
390 * linux-nios2-low.c (nios2_regsets): Likewise.
391 * linux-ppc-low.c (ppc_regsets): Likewise.
392 * linux-s390-low.c (s390_regsets): Likewise.
393 * linux-sh-low.c (sh_regsets): Likewise.
394 * linux-sparc-low.c (sparc_regsets): Likewise.
395 * linux-tic6x-low.c (tic6x_regsets): Likewise.
396 * linux-tile-low.c (tile_regsets): Likewise.
397 * linux-x86-low.c (x86_regsets): Likewise.
398 * linux-xtensa-low.c (xtensa_regsets): Likewise.
399
682b2546
DE
4002015-10-26 Doug Evans <dje@google.com>
401
402 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
403
963843d4
DE
4042015-10-26 Doug Evans <dje@google.com>
405
406 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
407
d41401ac
DE
4082015-10-26 Doug Evans <dje@google.com>
409
410 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
411 for debug_printf.
412 (attach_thread, find_new_threads_callback): Ditto.
413
3db28855
AT
4142015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
415
416 * mem-break.h (set_breakpoint_data): Remove.
417
fb78e89c
AT
4182015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
419
420 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
421 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
422 (initialize_low): Remove set_breakpoint_data call.
423 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
424 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
425 (initialize_low): Remove set_breakpoint_data call.
426 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
427 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
428 (initialize_low): Remove set_breakpoint_data call.
429
2e6ee069
AT
4302015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
431
432 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
433 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
434 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
435 * target.h (target_breakpoint_kind_from_pc): New macro.
436
1652a986
AT
4372015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
438
439 * linux-low.c (default_breakpoint_kind_from_pc): New function.
440 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
441 the default breakpoint kind.
442
abeead09
AT
4432015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
444
445 * linux-arm-low.c (arm_supports_z_point_type): Add software
446 breakpoint support.
447
b0b4b501
AT
4482015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
449
450 * linux-arm-low.c: Refactor breakpoint definitions.
451 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
452 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
453
8689682c
AT
4542015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
455
456 * Makefile.in: Add arm.c/o.
457 * configure.srv: Likewise.
458 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
459 (arm_breakpoint_kind_from_pc): New function.
460 (arm_sw_breakpoint_from_kind): Return proper kind.
461 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
462
27165294
AT
4632015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
464
465 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
466 removal.
467 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
468 (struct raw_breakpoint) <size>: Remove.
469 (struct raw_breakpoint) <kind>: Add.
470 (bp_size): New function.
471 (bp_opcode): Likewise.
472 (find_raw_breakpoint_at): Adjust for kind.
473 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
474 (remove_memory_breakpoint): Adjust for kind call bp_size.
475 (set_raw_breakpoint_at): Adjust for kind.
476 (set_breakpoint): Likewise.
477 (set_breakpoint_at): Call breakpoint_kind_from_pc.
478 (delete_raw_breakpoint): Adjust for kind.
479 (delete_breakpoint): Likewise.
480 (find_gdb_breakpoint): Likewise.
481 (set_gdb_breakpoint_1): Likewise.
482 (set_gdb_breakpoint): Likewise.
483 (delete_gdb_breakpoint_1): Likewise.
484 (delete_gdb_breakpoint): Likewise.
485 (uninsert_raw_breakpoint): Likewise.
486 (reinsert_raw_breakpoint): Likewise.
487 (set_breakpoint_data): Remove.
488 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
489 (check_mem_read): Adjust for kind call bp_size.
490 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
491 (clone_one_breakpoint): Adjust for kind.
492 * mem-break.h (set_gdb_breakpoint): Likewise.
493 (delete_gdb_breakpoint): Likewise.
494 * server.c (process_serial_event): Likewise.
495
dd373349
AT
4962015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
497
498 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
499 (struct linux_target_ops) <breakpoint>: Remove.
500 (struct linux_target_ops) <breakpoint_len>: Remove.
501 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
502 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
503 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
504 (arm_sw_breakpoint_from_kind): New function.
505 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
506 (struct linux_target_ops) <breakpoint>: Remove.
507 (struct linux_target_ops) <breakpoint_len>: Remove.
508 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
509 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
510 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
511 (struct linux_target_ops) <breakpoint>: Remove.
512 (struct linux_target_ops) <breakpoint_len>: Remove.
513 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
514 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
515 * linux-crisv32-low.c (cris_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-low.c (linux_wait_1): Call breakpoint_kind_from_pc
521 and sw_breakpoint_from_kind to increment the pc.
522 (linux_breakpoint_kind_from_pc): New function.
523 (linux_sw_breakpoint_from_kind): New function.
524 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
525 (initialize_low): Call breakpoint_kind_from_pc and
526 sw_breakpoint_from_kind to replace breakpoint_data/len.
527 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
528 New field.
529 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
530 * linux-m32r-low.c (m32r_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-m68k-low.c (m68k_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-mips-low.c (mips_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-nios2-low.c (nios2_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-ppc-low.c (ppc_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-s390-low.c (s390_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-sh-low.c (sh_sw_breakpoint_from_kind): New function.
561 (struct linux_target_ops) <breakpoint>: Remove.
562 (struct linux_target_ops) <breakpoint_len>: Remove.
563 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
564 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
565 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
566 (struct linux_target_ops) <breakpoint>: Remove.
567 (struct linux_target_ops) <breakpoint_len>: Remove.
568 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
569 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
570 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
571 (struct linux_target_ops) <breakpoint>: Remove.
572 (struct linux_target_ops) <breakpoint_len>: Remove.
573 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
574 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
575 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
576 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
577 (struct linux_target_ops) <breakpoint>: Remove.
578 (struct linux_target_ops) <breakpoint_len>: Remove.
579 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
580 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
581 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
582 (struct linux_target_ops) <breakpoint>: Remove.
583 (struct linux_target_ops) <breakpoint_len>: Remove.
584 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
585 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
586
4cd98a19
AT
5872015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
588
589 * linux-cris-low.c (cris_get_pc): Remove void arg.
590
774ee6d2
AR
5912015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
592
593 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
594 variable name.
595
833dcd29
AR
5962015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
597
598 * inferiors.c (thread_pid_matches_callback): New function.
599 (find_thread_process): New function.
600 (remove_thread): Reset current_thread.
601 (remove_process): Assert threads have been removed first.
602
8d689ee5
YQ
6032015-10-15 Yao Qi <yao.qi@linaro.org>
604
605 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
606 if it is 3.
607 (aarch64_remove_point): Likewise.
608 * regcache.c (regcache_register_size): New function.
609
1c2e1515
YQ
6102015-10-12 Yao Qi <yao.qi@linaro.org>
611
612 * linux-aarch64-low.c: Update all callers as emit_load_store
613 is renamed to aarch64_emit_load_store.
614
e1c587c3
YQ
6152015-10-12 Yao Qi <yao.qi@linaro.org>
616
617 * linux-aarch64-low.c: Update all callers of function renaming
618 from emit_insn to aarch64_emit_insn.
619
b6542f81
YQ
6202015-10-12 Yao Qi <yao.qi@linaro.org>
621
622 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
623 arch/aarch64-insn.h.
624 (struct aarch64_memory_operand): Likewise.
625 (ENCODE): Likewise.
626 (emit_insn): Move to arch/aarch64-insn.c.
627 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
628 (emit_load_store): Move to arch/aarch64-insn.c.
629 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
630 (can_encode_int32): Remove.
631
246994ce
YQ
6322015-10-12 Yao Qi <yao.qi@linaro.org>
633
634 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
635 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
636 (aarch64_relocate_instruction): Likewise.
637 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
638 (struct aarch64_insn_visitor): Likewise.
639
0badd99f
YQ
6402015-10-12 Yao Qi <yao.qi@linaro.org>
641
642 * linux-aarch64-low.c (struct aarch64_insn_data): New.
643 (struct aarch64_insn_visitor): New.
644 (struct aarch64_insn_relocation_data): New.
645 (aarch64_ftrace_insn_reloc_b): New function.
646 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
647 (aarch64_ftrace_insn_reloc_cb): Likewise.
648 (aarch64_ftrace_insn_reloc_tb): Likewise.
649 (aarch64_ftrace_insn_reloc_adr): Likewise.
650 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
651 (aarch64_ftrace_insn_reloc_others): Likewise.
652 (visitor): New.
653 (aarch64_relocate_instruction): Use visitor.
654
dfaffe9d
YQ
6552015-10-12 Yao Qi <yao.qi@linaro.org>
656
657 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
658 int. Add argument buf.
659 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
660 aarch64_relocate_instruction.
661
70b439f0
YQ
6622015-10-12 Yao Qi <yao.qi@linaro.org>
663
664 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
665 argument insn. Remove local variable insn. Don't call
666 target_read_uint32.
667 (aarch64_install_fast_tracepoint_jump_pad): Call
668 target_read_uint32.
669
7781c06f
YQ
6702015-09-30 Yao Qi <yao.qi@linaro.org>
671
672 * linux-aarch64-low.c (emit_movk): Shorten a long line.
673 (emit_load_store_pair): Likewise.
674
9a3c8263
SM
6752015-09-25 Simon Marchi <simon.marchi@ericsson.com>
676
677 * dll.c (match_dll): Add cast(s).
678 (unloaded_dll): Likewise.
679 * linux-low.c (second_thread_of_pid_p): Likewise.
680 (delete_lwp_callback): Likewise.
681 (count_events_callback): Likewise.
682 (select_event_lwp_callback): Likewise.
683 (linux_set_resume_request): Likewise.
684 * server.c (accumulate_file_name_length): Likewise.
685 (emit_dll_description): Likewise.
686 (handle_qxfer_threads_worker): Likewise.
687 (visit_actioned_threads): Likewise.
688 * thread-db.c (any_thread_of): Likewise.
689 * tracepoint.c (same_process_p): Likewise.
690 (match_blocktype): Likewise.
691 (build_traceframe_info_xml): Likewise.
692
224c3ddb
SM
6932015-09-25 Simon Marchi <simon.marchi@ericsson.com>
694
695 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
696 assignment.
697 (gdb_unparse_agent_expr): Likewise.
698 * hostio.c (require_data): Likewise.
699 (handle_pread): Likewise.
700 * linux-low.c (disable_regset): Likewise.
701 (fetch_register): Likewise.
702 (store_register): Likewise.
703 (get_dynamic): Likewise.
704 (linux_qxfer_libraries_svr4): Likewise.
705 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
706 (set_fast_tracepoint_jump): Likewise.
707 (uninsert_fast_tracepoint_jumps_at): Likewise.
708 (reinsert_fast_tracepoint_jumps_at): Likewise.
709 (validate_inserted_breakpoint): Likewise.
710 (clone_agent_expr): Likewise.
711 * regcache.c (init_register_cache): Likewise.
712 * remote-utils.c (putpkt_binary_1): Likewise.
713 (decode_M_packet): Likewise.
714 (decode_X_packet): Likewise.
715 (look_up_one_symbol): Likewise.
716 (relocate_instruction): Likewise.
717 (monitor_output): Likewise.
718 * server.c (handle_search_memory): Likewise.
719 (handle_qxfer_exec_file): Likewise.
720 (handle_qxfer_libraries): Likewise.
721 (handle_qxfer): Likewise.
722 (handle_query): Likewise.
723 (handle_v_cont): Likewise.
724 (handle_v_run): Likewise.
725 (captured_main): Likewise.
726 * target.c (write_inferior_memory): Likewise.
727 * thread-db.c (try_thread_db_load_from_dir): Likewise.
728 * tracepoint.c (init_trace_buffer): Likewise.
729 (add_tracepoint_action): Likewise.
730 (add_traceframe): Likewise.
731 (add_traceframe_block): Likewise.
732 (cmd_qtdpsrc): Likewise.
733 (cmd_qtdv): Likewise.
734 (cmd_qtstatus): Likewise.
735 (response_source): Likewise.
736 (response_tsv): Likewise.
737 (cmd_qtnotes): Likewise.
738 (gdb_collect): Likewise.
739 (initialize_tracepoint): Likewise.
740
afbe19f8
PL
7412015-09-21 Pierre Langlois <pierre.langlois@arm.com>
742
743 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
744 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
745 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
746 <NOP>: New.
747 (enum aarch64_condition_codes): New enum.
748 (w0): New static global.
749 (fp): Likewise.
750 (lr): Likewise.
751 (struct aarch64_memory_operand) <type>: New
752 MEMORY_OPERAND_POSTINDEX type.
753 (postindex_memory_operand): New helper function.
754 (emit_ret): New function.
755 (emit_load_store_pair): New function, factored out of emit_stp
756 with support for MEMORY_OPERAND_POSTINDEX.
757 (emit_stp): Rewrite using emit_load_store_pair.
758 (emit_ldp): New function.
759 (emit_load_store): Likewise.
760 (emit_ldr): Mention post-index instruction in comment.
761 (emit_ldrh): New function.
762 (emit_ldrb): New function.
763 (emit_ldrsw): Mention post-index instruction in comment.
764 (emit_str): Likewise.
765 (emit_subs): New function.
766 (emit_cmp): Likewise.
767 (emit_and): Likewise.
768 (emit_orr): Likewise.
769 (emit_orn): Likewise.
770 (emit_eor): Likewise.
771 (emit_mvn): Likewise.
772 (emit_lslv): Likewise.
773 (emit_lsrv): Likewise.
774 (emit_asrv): Likewise.
775 (emit_mul): Likewise.
776 (emit_sbfm): Likewise.
777 (emit_sbfx): Likewise.
778 (emit_ubfm): Likewise.
779 (emit_ubfx): Likewise.
780 (emit_csinc): Likewise.
781 (emit_cset): Likewise.
782 (emit_nop): Likewise.
783 (emit_ops_insns): New helper function.
784 (emit_pop): Likewise.
785 (emit_push): Likewise.
786 (aarch64_emit_prologue): New function.
787 (aarch64_emit_epilogue): Likewise.
788 (aarch64_emit_add): Likewise.
789 (aarch64_emit_sub): Likewise.
790 (aarch64_emit_mul): Likewise.
791 (aarch64_emit_lsh): Likewise.
792 (aarch64_emit_rsh_signed): Likewise.
793 (aarch64_emit_rsh_unsigned): Likewise.
794 (aarch64_emit_ext): Likewise.
795 (aarch64_emit_log_not): Likewise.
796 (aarch64_emit_bit_and): Likewise.
797 (aarch64_emit_bit_or): Likewise.
798 (aarch64_emit_bit_xor): Likewise.
799 (aarch64_emit_bit_not): Likewise.
800 (aarch64_emit_equal): Likewise.
801 (aarch64_emit_less_signed): Likewise.
802 (aarch64_emit_less_unsigned): Likewise.
803 (aarch64_emit_ref): Likewise.
804 (aarch64_emit_if_goto): Likewise.
805 (aarch64_emit_goto): Likewise.
806 (aarch64_write_goto_address): Likewise.
807 (aarch64_emit_const): Likewise.
808 (aarch64_emit_call): Likewise.
809 (aarch64_emit_reg): Likewise.
810 (aarch64_emit_pop): Likewise.
811 (aarch64_emit_stack_flush): Likewise.
812 (aarch64_emit_zero_ext): Likewise.
813 (aarch64_emit_swap): Likewise.
814 (aarch64_emit_stack_adjust): Likewise.
815 (aarch64_emit_int_call_1): Likewise.
816 (aarch64_emit_void_call_2): Likewise.
817 (aarch64_emit_eq_goto): Likewise.
818 (aarch64_emit_ne_goto): Likewise.
819 (aarch64_emit_lt_goto): Likewise.
820 (aarch64_emit_le_goto): Likewise.
821 (aarch64_emit_gt_goto): Likewise.
822 (aarch64_emit_ge_got): Likewise.
823 (aarch64_emit_ops_impl): New static global variable.
824 (aarch64_emit_ops): New target function, return
825 &aarch64_emit_ops_impl.
826 (struct linux_target_ops): Install it.
827
bb903df0
PL
8282015-09-21 Pierre Langlois <pierre.langlois@arm.com>
829
830 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
831 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
832 aarch64-ipa.o.
833 * linux-aarch64-ipa.c: New file.
834 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
835 and endian.h.
836 (aarch64_get_thread_area): New target method.
837 (extract_signed_bitfield): New helper function.
838 (aarch64_decode_ldr_literal): New function.
839 (enum aarch64_opcodes): New enum.
840 (struct aarch64_register): New struct.
841 (struct aarch64_operand): New struct.
842 (x0): New static global.
843 (x1): Likewise.
844 (x2): Likewise.
845 (x3): Likewise.
846 (x4): Likewise.
847 (w2): Likewise.
848 (ip0): Likewise.
849 (sp): Likewise.
850 (xzr): Likewise.
851 (aarch64_register): New helper function.
852 (register_operand): Likewise.
853 (immediate_operand): Likewise.
854 (struct aarch64_memory_operand): New struct.
855 (offset_memory_operand): New helper function.
856 (preindex_memory_operand): Likewise.
857 (enum aarch64_system_control_registers): New enum.
858 (ENCODE): New macro.
859 (emit_insn): New helper function.
860 (emit_b): New function.
861 (emit_bcond): Likewise.
862 (emit_cb): Likewise.
863 (emit_tb): Likewise.
864 (emit_blr): Likewise.
865 (emit_stp): Likewise.
866 (emit_ldp_q_offset): Likewise.
867 (emit_stp_q_offset): Likewise.
868 (emit_load_store): Likewise.
869 (emit_ldr): Likewise.
870 (emit_ldrsw): Likewise.
871 (emit_str): Likewise.
872 (emit_ldaxr): Likewise.
873 (emit_stxr): Likewise.
874 (emit_stlr): Likewise.
875 (emit_data_processing_reg): Likewise.
876 (emit_data_processing): Likewise.
877 (emit_add): Likewise.
878 (emit_sub): Likewise.
879 (emit_mov): Likewise.
880 (emit_movk): Likewise.
881 (emit_mov_addr): Likewise.
882 (emit_mrs): Likewise.
883 (emit_msr): Likewise.
884 (emit_sevl): Likewise.
885 (emit_wfe): Likewise.
886 (append_insns): Likewise.
887 (can_encode_int32_in): New helper function.
888 (aarch64_relocate_instruction): New function.
889 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
890 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
891 (struct linux_target_ops): Install aarch64_get_thread_area,
892 aarch64_install_fast_tracepoint_jump_pad and
893 aarch64_get_min_fast_tracepoint_insn_len.
894
787749ea
PL
8952015-09-21 Pierre Langlois <pierre.langlois@arm.com>
896
897 * Makefile.in (aarch64-insn.o): New rule.
898 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
899
9812b2e6
YQ
9002015-09-21 Yao Qi <yao.qi@linaro.org>
901
902 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
903
18fe412b
YQ
9042015-09-21 Yao Qi <yao.qi@linaro.org>
905
906 * tracepoint.c (max_jump_pad_size): Remove.
907
a0cc84cd
YQ
9082015-09-18 Yao Qi <yao.qi@linaro.org>
909
910 * linux-aarch64-low.c: Don't include sys/uio.h.
911 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
912
d78908cf
WW
9132015-09-16 Wei-cheng Wang <cole945@gmail.com>
914
915 * tracepoint.c (eval_result_type): Change prototype.
916 (condition_true_at_tracepoint): Fix argument to compiled_cond.
917
d57e0d50
PA
9182015-09-15 Pedro Alves <palves@redhat.com>
919
920 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
921 Check whether to report exec events instead of checking whether
922 multiprocess is enabled.
923
5a676acc
PA
9242015-09-15 Pedro Alves <palves@redhat.com>
925
926 PR remote/18965
927 * remote-utils.c (prepare_resume_reply): Merge
928 TARGET_WAITKIND_VFORK_DONE switch case with the
929 TARGET_WAITKIND_FORKED case.
930
7c5d0fad
YQ
9312015-09-15 Yao Qi <yao.qi@linaro.org>
932
933 * server.c (handle_query): Check string comparison using
934 "else if" instead of "if".
935
750ce8d1
YQ
9362015-09-15 Yao Qi <yao.qi@linaro.org>
937
938 * server.c (vCont_supported): New global variable.
939 (handle_query): Set vCont_supported to 1 if "vContSupported+"
940 matches. Append ";vContSupported+" to own_buf.
941 (handle_v_requests): Append ";s;S" to own_buf if target supports
942 hardware single step or vCont_supported is false.
943 (capture_main): Set vCont_supported to zero.
944
70b90b91
YQ
9452015-09-15 Yao Qi <yao.qi@linaro.org>
946
947 * linux-low.c (linux_supports_conditional_breakpoints): Rename
948 it to ...
949 (linux_supports_hardware_single_step): ... New function.
950 (linux_target_ops): Update.
951 * lynx-low.c (lynx_target_ops): Set field
952 supports_hardware_single_step to target_can_do_hardware_single_step.
953 * nto-low.c (nto_target_ops): Likewise.
954 * spu-low.c (spu_target_ops): Likewise.
955 * win32-low.c (win32_target_ops): Likewise.
956 * target.c (target_can_do_hardware_single_step): New function.
957 * target.h (struct target_ops) <supports_conditional_breakpoints>:
958 Remove. <supports_hardware_single_step>: New field.
959 (target_supports_conditional_breakpoints): Remove.
960 (target_supports_hardware_single_step): New macro.
961 (target_can_do_hardware_single_step): Declare.
962 * server.c (handle_query): Use target_supports_hardware_single_step
963 instead of target_supports_conditional_breakpoints.
964
ade90bde
YQ
9652015-09-15 Yao Qi <yao.qi@linaro.org>
966
967 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
968 function.
969 (struct linux_target_ops the_low_target): Install
970 aarch64_linux_siginfo_fixup.
971
94585166
DB
9722015-09-11 Don Breazeal <donb@codesourcery.com>
973 Luis Machado <lgustavo@codesourcery.com>
974
975 * linux-low.c (linux_mourn): Static declaration.
976 (linux_arch_setup): Move in front of
977 handle_extended_wait.
978 (linux_arch_setup_thread): New function.
979 (handle_extended_wait): Handle exec events. Call
980 linux_arch_setup_thread. Make event_lwp argument a
981 pointer-to-a-pointer.
982 (check_zombie_leaders): Do not check stopped threads.
983 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
984 (linux_low_filter_event): Add lwp and thread for exec'ing
985 non-leader thread if leader thread has been deleted.
986 Refactor code into linux_arch_setup_thread and call it.
987 Pass child lwp pointer by reference to handle_extended_wait.
988 (linux_wait_for_event_filtered): Update comment.
989 (linux_wait_1): Prevent clobbering exec event status.
990 (linux_supports_exec_events): New function.
991 (linux_target_ops) <supports_exec_events>: Initialize new member.
992 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
993 new member.
994 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
995 * server.c (report_exec_events): New global variable.
996 (handle_query): Handle qSupported query for exec-events feature.
997 (captured_main): Initialize report_exec_events.
998 * server.h (report_exec_events): Declare new global variable.
999 * target.h (struct target_ops) <supports_exec_events>: New
1000 member.
1001 (target_supports_exec_events): New macro.
1002 * win32-low.c (win32_target_ops) <supports_exec_events>:
1003 Initialize new member.
1004
0568462b
MM
10052015-09-09 Markus Metzger <markus.t.metzger@intel.com>
1006
1007 * linux-low.c (linux_low_enable_btrace): Remove.
1008 (linux_target_ops): Replace linux_low_enable_btrace with
1009 linux_enable_btrace.
1010
39edd165
YQ
10112015-09-03 Yao Qi <yao.qi@linaro.org>
1012
1013 * linux-aarch64-low.c (aarch64_insert_point): Call
1014 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
1015 returns true.
1016
1db33b5a
UW
10172015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1018
1019 * linux-low.c (check_stopped_by_breakpoint): Use
1020 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
1021
ab290430
PA
10222015-08-27 Pedro Alves <palves@redhat.com>
1023
1024 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
1025
8d749320
SM
10262015-08-26 Simon Marchi <simon.marchi@ericsson.com>
1027
6711b7f8
SM
1028 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
1029 the XNEW-family equivalent.
8d749320
SM
1030 (compile_bytecodes): Likewise.
1031 * dll.c (loaded_dll): Likewise.
1032 * event-loop.c (append_callback_event): Likewise.
1033 (create_file_handler): Likewise.
1034 (create_file_event): Likewise.
1035 * hostio.c (handle_open): Likewise.
1036 * inferiors.c (add_thread): Likewise.
1037 (add_process): Likewise.
1038 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
1039 * linux-arm-low.c (arm_new_process): Likewise.
1040 (arm_new_thread): Likewise.
1041 * linux-low.c (add_to_pid_list): Likewise.
1042 (linux_add_process): Likewise.
1043 (handle_extended_wait): Likewise.
1044 (add_lwp): Likewise.
1045 (enqueue_one_deferred_signal): Likewise.
1046 (enqueue_pending_signal): Likewise.
1047 (linux_resume_one_lwp_throw): Likewise.
1048 (linux_resume_one_thread): Likewise.
1049 (linux_read_memory): Likewise.
1050 (linux_write_memory): Likewise.
1051 * linux-mips-low.c (mips_linux_new_process): Likewise.
1052 (mips_linux_new_thread): Likewise.
1053 (mips_add_watchpoint): Likewise.
1054 * linux-x86-low.c (initialize_low_arch): Likewise.
1055 * lynx-low.c (lynx_add_process): Likewise.
1056 * mem-break.c (set_raw_breakpoint_at): Likewise.
1057 (set_breakpoint): Likewise.
1058 (add_condition_to_breakpoint): Likewise.
1059 (add_commands_to_breakpoint): Likewise.
1060 (clone_agent_expr): Likewise.
1061 (clone_one_breakpoint): Likewise.
1062 * regcache.c (new_register_cache): Likewise.
1063 * remote-utils.c (look_up_one_symbol): Likewise.
1064 * server.c (queue_stop_reply): Likewise.
1065 (start_inferior): Likewise.
1066 (queue_stop_reply_callback): Likewise.
1067 (handle_target_event): Likewise.
1068 * spu-low.c (fetch_ppc_memory): Likewise.
1069 (store_ppc_memory): Likewise.
1070 * target.c (set_target_ops): Likewise.
1071 * thread-db.c (thread_db_load_search): Likewise.
1072 (try_thread_db_load_1): Likewise.
1073 * tracepoint.c (add_tracepoint): Likewise.
1074 (add_tracepoint_action): Likewise.
1075 (create_trace_state_variable): Likewise.
1076 (cmd_qtdpsrc): Likewise.
1077 (cmd_qtro): Likewise.
1078 (add_while_stepping_state): Likewise.
1079 * win32-low.c (child_add_thread): Likewise.
1080 (get_image_name): Likewise.
1081
ed8b7b42
YQ
10822015-08-25 Yao Qi <yao.qi@linaro.org>
1083
1084 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
1085
db3cb7cb
YQ
10862015-08-25 Yao Qi <yao.qi@linaro.org>
1087
1088 * Makefile.in (aarch64-linux.o): New rule.
1089 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
1090 srv_tgtobj.
1091 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
1092 (aarch64_init_debug_reg_state): Make it extern.
1093 (aarch64_linux_prepare_to_resume): Remove.
1094
f6011a1c
YQ
10952015-08-25 Yao Qi <yao.qi@linaro.org>
1096
1097 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
1098 lwp_arch_private_info and ptid_of_lwp.
1099
88e2cf7e
YQ
11002015-08-25 Yao Qi <yao.qi@linaro.org>
1101
1102 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
1103 Find proc_info by find_process_pid. All callers updated.
1104
5e35436e
YQ
11052015-08-25 Yao Qi <yao.qi@linaro.org>
1106
1107 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
1108 Remove.
1109 (debug_reg_change_callback): Remove.
1110 (aarch64_notify_debug_reg_change): Remove.
1111
4a8a7965
YQ
11122015-08-25 Yao Qi <yao.qi@linaro.org>
1113
1114 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
1115 Call current_lwp_ptid.
1116
32a271ee
YQ
11172015-08-25 Yao Qi <yao.qi@linaro.org>
1118
1119 * linux-aarch64-low.c (debug_reg_change_callback): Use
1120 debug_printf.
1121
0d51c8d7
YQ
11222015-08-25 Yao Qi <yao.qi@linaro.org>
1123
1124 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
1125
31a43dd5
YQ
11262015-08-25 Yao Qi <yao.qi@linaro.org>
1127
1128 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
1129
8ee52567
YQ
11302015-08-25 Yao Qi <yao.qi@linaro.org>
1131
1132 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
1133 the code.
1134
ff3f0f45
YQ
11352015-08-25 Yao Qi <yao.qi@linaro.org>
1136
1137 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
1138 Remove.
1139 (debug_reg_change_callback): Remove argument entry and add argument
1140 lwp. Remove local variable thread. Don't print thread id in the
1141 debugging output. Don't check whether pid of thread equals to pid.
1142 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
1143 iterate_over_lwps instead find_inferior.
1144
3d40fbb5
PA
11452015-08-24 Pedro Alves <palves@redhat.com>
1146
1147 * inferiors.c (get_first_process): New function.
1148 * inferiors.h (get_first_process): New declaration.
1149 * remote-utils.c (read_ptid): Default to the first process in the
1150 list, instead of to the current thread's process.
1151
438e1e42
PA
11522015-08-24 Pedro Alves <palves@redhat.com>
1153
1154 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
1155 * event-loop.c: Likewise.
1156 * remote-utils.c: Likewise.
1157 * tracepoint.c: Likewise.
1158
a8c6d4fc
PA
11592015-08-24 Pedro Alves <palves@redhat.com>
1160
1161 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
1162 ptid_get_lwp.
1163
99b0bb12
PA
11642015-08-21 Pedro Alves <palves@redhat.com>
1165
1166 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
1167 instead of literal 1.
1168
f8904751
PA
11692015-08-21 Pedro Alves <palves@redhat.com>
1170
1171 * tdesc.c (default_description): Explicitly zero-initialize.
1172
465a859e
PA
11732015-08-21 Pedro Alves <palves@redhat.com>
1174
1175 PR gdb/18749
1176 * inferiors.c (remove_thread): Discard any pending stop reply for
1177 this thread.
1178 * server.c (remove_all_on_match_pid): Rename to ...
1179 (remove_all_on_match_ptid): ... this. Work with a filter ptid
1180 instead of a pid.
1181 (discard_queued_stop_replies): Change parameter to a ptid. Now
1182 extern.
1183 (handle_v_kill, kill_inferior_callback, captured_main)
1184 (process_serial_event): Adjust.
1185 * server.h (discard_queued_stop_replies): Declare.
1186
f0db101d
PA
11872015-08-21 Pedro Alves <palves@redhat.com>
1188
1189 * linux-low.c (wait_for_sigstop): Always switch to no thread
1190 selected if the previously current thread dies.
1191 * lynx-low.c (lynx_request_interrupt): Use the first thread's
1192 process instead of the current thread's.
1193 * remote-utils.c (input_interrupt): Don't check if there's no
1194 current thread.
1195 * server.c (gdb_read_memory, gdb_write_memory): If setting the
1196 current thread to the general thread fails, error out.
1197 (handle_qxfer_auxv, handle_qxfer_libraries)
1198 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
1199 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
1200 (handle_query): Check if there's a thread selected instead of
1201 checking whether there's any thread in the thread list.
1202 (handle_qxfer_threads, handle_qxfer_btrace)
1203 (handle_qxfer_btrace_conf): Don't error out early if there's no
1204 thread in the thread list.
1205 (handle_v_cont, myresume): Don't set the current thread to the
1206 continue thread.
1207 (process_serial_event) <Hg handling>: Also set thread_id if the
1208 previous general thread is still alive.
1209 (process_serial_event) <g/G handling>: If setting the current
1210 thread to the general thread fails, error out.
1211 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
1212 thread's lwp instead of the current thread's.
1213 * target.c (set_desired_thread): If the desired thread was not
1214 found, leave the current thread pointing to NULL. Return an int
1215 (boolean) indicating success.
1216 * target.h (set_desired_thread): Change return type to int.
1217
40045d91
MF
12182015-08-20 Max Filippov <jcmvbkbc@gmail.com>
1219
1220 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
1221 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
1222 #includes.
1223 (ps_get_thread_area): New function.
1224
45face3b
GB
12252015-08-19 Gary Benson <gbenson@redhat.com>
1226
1227 * hostio.c (handle_pread): Do not attempt to read more data
1228 than hostio_reply_with_data can fit in a packet.
1229
16d5f642
JB
12302015-08-18 Joel Brobecker <brobecker@adacore.com>
1231
1232 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
1233
a738da3a
MF
12342015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
1235
1236 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
1237
33ebda9d
PA
12382015-08-06 Pedro Alves <palves@redhat.com>
1239
1240 * tracepoint.c (expr_eval_result): Now an int.
1241
a44892be
PA
12422015-08-06 Pedro Alves <palves@redhat.com>
1243
1244 * gdbthread.h (struct regcache): Forward declare.
1245 (struct thread_info) <regcache_data>: Now a struct regcache
1246 pointer.
1247 * inferiors.c (inferior_regcache_data)
1248 (set_inferior_regcache_data): Now work with struct regcache
1249 pointers.
1250 * inferiors.h (struct regcache): Forward declare.
1251 (inferior_regcache_data, set_inferior_regcache_data): Now work
1252 with struct regcache pointers.
1253 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
1254 (free_register_cache_thread): Remove struct regcache pointer
1255 casts.
1256
608a1e46
PA
12572015-08-06 Pedro Alves <palves@redhat.com>
1258
1259 * server.c (captured_main): On error, print the exception message
1260 to stderr, and if run_once is set, throw a quit.
1261
f0ce0d3a
PA
12622015-08-06 Pedro Alves <palves@redhat.com>
1263
1264 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
1265 the current thread.
1266
bf47e248
PA
12672015-08-06 Pedro Alves <palves@redhat.com>
1268
1269 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
1270 reading beyond the passed in buffer length.
1271
b6b9ffcc
PL
12722015-08-06 Pierre Langlois <pierre.langlois@arm.com>
1273
1274 * tracepoint.c (symbol_list) <required>: Remove.
1275
863d01bd
PA
12762015-08-06 Pedro Alves <palves@redhat.com>
1277
1278 * linux-low.c (handle_extended_wait): Set the fork child's suspend
1279 count if stopping and suspending threads.
1280 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
1281 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
1282 (linux_detach): Complete an ongoing step-over.
1283 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
1284 throughout.
1285 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
1286 (linux_wait_1): If passing a signal to the inferior after
1287 finishing a step-over, unsuspend and re-resume all lwps. If we
1288 see a single-step event but the thread should be continuing, don't
1289 pass the trap to gdb.
1290 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
1291 internal_error instead of gdb_assert.
1292 (enqueue_pending_signal): New function.
1293 (check_ptrace_stopped_lwp_gone): Add debug output.
1294 (start_step_over): Use internal_error instead of gdb_assert.
1295 (complete_ongoing_step_over): New function.
1296 (linux_resume_one_thread): Don't resume a suspended thread.
1297 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
1298 it stepping.
1299
00db26fa
PA
13002015-08-06 Pedro Alves <palves@redhat.com>
1301
1302 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
1303 (linux_thread_alive): Use lwp_is_marked_dead.
1304 (extended_event_reported): Delete.
1305 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
1306 instead of extended_event_reported.
1307 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
1308 as well.
1309 (lwp_is_marked_dead): New function.
1310 (lwp_running): Use lwp_is_marked_dead.
1311 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
1312 comment.
1313
ad071a30
PA
13142015-08-06 Pedro Alves <palves@redhat.com>
1315
1316 * linux-low.c (linux_wait_1): Move fork event output out of the
1317 !report_to_gdb check. Pass event_child->waitstatus to
1318 target_waitstatus_to_string instead of ourstatus.
1319
524b57e6
YQ
13202015-08-04 Yao Qi <yao.qi@linaro.org>
1321
1322 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
1323 if current_thread is 32 bit.
1324
6085d6f6
YQ
13252015-08-04 Yao Qi <yao.qi@linaro.org>
1326
1327 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
1328 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
1329 * server.c (extended_protocol): Remove "static".
1330 * server.h (extended_protocol): Declare it.
1331
8a7e4587
YQ
13322015-08-04 Yao Qi <yao.qi@linaro.org>
1333
1334 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
1335 both aarch64 and aarch32.
1336 (aarch64_set_pc): Likewise.
1337
3b53ae99
YQ
13382015-08-04 Yao Qi <yao.qi@linaro.org>
1339
1340 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
1341 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
1342 arm-with-neon.xml to srv_xmlfiles.
1343 * linux-aarch64-low.c: Include linux-aarch32-low.h.
1344 (is_64bit_tdesc): New function.
1345 (aarch64_linux_read_description): New function.
1346 (aarch64_arch_setup): Call aarch64_linux_read_description.
1347 (regs_info): Rename to regs_info_aarch64.
1348 (aarch64_regs_info): Return right regs_info.
1349 (initialize_low_arch): Call initialize_low_arch_aarch32.
1350
bd9e6534
YQ
13512015-08-04 Yao Qi <yao.qi@linaro.org>
1352
1353 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
1354 * linux-aarch32-low.c: New file.
1355 * linux-aarch32-low.h: New file.
1356 * linux-arm-low.c (arm_fill_gregset): Move it to
1357 linux-aarch32-low.c.
1358 (arm_store_gregset): Likewise.
1359 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
1360 (arm_store_vfpregset): Call arm_store_vfpregset_num.
1361 (arm_arch_setup): Check if PTRACE_GETREGSET works.
1362 (regs_info): Rename to regs_info_arm.
1363 (arm_regs_info): Return regs_info_aarch32 if
1364 have_ptrace_getregset is 1 and target description is
1365 arm_with_neon or arm_with_vfpv3.
1366 (initialize_low_arch): Don't call init_registers_arm_with_neon.
1367 Call initialize_low_arch_aarch32 instead.
1368
ded48a5e
YQ
13692015-08-04 Yao Qi <yao.qi@linaro.org>
1370
1371 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
1372 * linux-low.c: ... here.
1373 * linux-low.h (have_ptrace_getregset): Declare it.
1374
96e9210f
PA
13752015-08-04 Pedro Alves <palves@redhat.com>
1376
1377 * thread-db.c (struct thread_db): Use new typedefs.
1378 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
1379 CHK calls.
1380 (disable_thread_event_reporting): Cast result of dlsym to
1381 destination function pointer type.
1382 (thread_db_mourn): Use td_ta_delete_ftype.
1383
af60a1ef
SL
13842015-08-03 Sandra Loosemore <sandra@codesourcery.com>
1385
1386 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
1387 arch variant.
1388 (CDX_BREAKPOINT): Define for R2.
1389 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
1390 (the_low_target): Add comments.
1391
e8b41681
YQ
13922015-07-30 Yao Qi <yao.qi@linaro.org>
1393
1394 * linux-arm-low.c (arm_hwcap): Remove it.
1395 (arm_read_description): New local variable arm_hwcap. Don't
1396 set arm_hwcap to zero.
1397
89abb039
YQ
13982015-07-30 Yao Qi <yao.qi@linaro.org>
1399
1400 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
1401 Use regcache->tdesc instead.
1402 (arm_store_wmmxregset): Likewise.
1403 (arm_fill_vfpregset): Likewise.
1404 (arm_store_vfpregset): Likewise.
1405
deca266c
YQ
14062015-07-30 Yao Qi <yao.qi@linaro.org>
1407
1408 * linux-arm-low.c: Include arch/arm.h.
1409 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
1410 (arm_store_gregset): Likewise.
1411
aa58a496
SM
14122015-07-29 Simon Marchi <simon.marchi@ericsson.com>
1413
1414 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
1415 ptrace's 4th parameter.
1416
50904b25
YQ
14172015-07-27 Yao Qi <yao.qi@linaro.org>
1418
1419 * configure.srv (case aarch64*-*-linux*): Don't set
1420 srv_linux_usrregs.
1421
5826e159
PA
14222015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
1423
1424 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
1425 sys/ptrace.h.
1426 * linux-arm-low.c: Likewise.
1427 * linux-cris-low.c: Likewise.
1428 * linux-crisv32-low.c: Likewise.
1429 * linux-low.c: Likewise.
1430 * linux-m68k-low.c: Likewise.
1431 * linux-mips-low.c: Likewise.
1432 * linux-nios2-low.c: Likewise.
1433 * linux-s390-low.c: Likewise.
1434 * linux-sparc-low.c: Likewise.
1435 * linux-tic6x-low.c: Likewise.
1436 * linux-tile-low.c: Likewise.
1437 * linux-x86-low.c: Likewise.
1438
54019719
PA
14392015-07-24 Pedro Alves <palves@redhat.com>
1440
1441 * config.in: Regenerate.
1442 * configure: Regenerate.
1443
eb7aa561
PA
14442015-07-24 Pedro Alves <palves@redhat.com>
1445
1446 * acinclude.m4: Include ../ptrace.m4.
1447 * configure.ac: Call GDB_AC_PTRACE.
1448 * config.in, configure: Regenerate.
1449
55d7b841
YQ
14502015-07-24 Yao Qi <yao.qi@linaro.org>
1451
1452 * linux-low.c (linux_create_inferior): Remove setting to
1453 proc->priv->new_inferior.
1454 (linux_attach): Likewise.
1455 (linux_low_filter_event): Likewise.
1456 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
1457
c06cbd92
YQ
14582015-07-24 Yao Qi <yao.qi@linaro.org>
1459
1460 * linux-low.c (linux_arch_setup): New function.
1461 (linux_low_filter_event): If proc->tdesc is NULL and
1462 proc->attached is true, call the_low_target.arch_setup.
1463 Otherwise, keep status pending, and return.
1464 (linux_resume_one_lwp_throw): Don't call get_pc if
1465 thread->while_stepping isn't NULL. Don't call
1466 get_thread_regcache if proc->tdesc is NULL.
1467 (need_step_over_p): Return 0 if proc->tdesc is NULL.
1468 (linux_target_ops): Install arch_setup.
1469 * server.c (start_inferior): Call the_target->arch_setup.
1470 * target.h (struct target_ops) <arch_setup>: New field.
1471 (target_arch_setup): New marco.
1472 * lynx-low.c (lynx_target_ops): Update.
1473 * nto-low.c (nto_target_ops): Update.
1474 * spu-low.c (spu_target_ops): Update.
1475 * win32-low.c (win32_target_ops): Update.
1476
5ae3ebba
YQ
14772015-07-24 Yao Qi <yao.qi@linaro.org>
1478
1479 * linux-low.c (linux_add_process): Don't set
1480 proc->priv->new_inferior.
1481 (linux_create_inferior): Set proc->priv->new_inferior to 1.
1482 (linux_attach): Likewise.
1483
eb97750b
YQ
14842015-07-24 Yao Qi <yao.qi@linaro.org>
1485
1486 * server.c (start_inferior): Code refactor.
1487
51aee833
YQ
14882015-07-24 Yao Qi <yao.qi@linaro.org>
1489
1490 * server.c (process_serial_event): Set general_thread.
1491
af1b22f3
YQ
14922015-07-21 Yao Qi <yao.qi@linaro.org>
1493
1494 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
1495 aarch64_linux_get_debug_reg_capacity.
1496
554717a3
YQ
14972015-07-17 Yao Qi <yao.qi@linaro.org>
1498
1499 * Makefile.in (aarch64-linux-hw-point.o): New rule.
1500 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
1501 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
1502 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
1503 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
1504 (AARCH64_HWP_ALIGNMENT): Likewise.
1505 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
1506 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
1507 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
1508 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
1509 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
1510 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
1511 (struct aarch64_debug_reg_state): Likewise.
1512 (struct arch_lwp_info): Likewise.
1513 (aarch64_align_watchpoint): Likewise.
1514 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
1515 (aarch64_watchpoint_length): Likewise.
1516 (aarch64_point_encode_ctrl_reg): Likewise
1517 (aarch64_point_is_aligned): Likewise.
1518 (aarch64_align_watchpoint): Likewise.
1519 (aarch64_linux_set_debug_regs):
1520 (aarch64_dr_state_insert_one_point): Likewise.
1521 (aarch64_dr_state_remove_one_point): Likewise.
1522 (aarch64_handle_breakpoint): Likewise.
1523 (aarch64_handle_aligned_watchpoint): Likewise.
1524 (aarch64_handle_unaligned_watchpoint): Likewise.
1525 (aarch64_handle_watchpoint): Likewise.
1526
c67ca4de
YQ
15272015-07-17 Yao Qi <yao.qi@linaro.org>
1528
1529 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
1530 and don't aarch64_get_debug_reg_state. All callers update.
1531 (aarch64_handle_aligned_watchpoint): Likewise.
1532 (aarch64_handle_unaligned_watchpoint): Likewise.
1533 (aarch64_handle_watchpoint): Likewise.
1534 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
1535 (aarch64_remove_point): Likewise.
1536
25abf979
YQ
15372015-07-17 Yao Qi <yao.qi@linaro.org>
1538
1539 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
1540 debug_printf.
1541 (aarch64_handle_unaligned_watchpoint): Likewise.
1542
db1ff28b
JK
15432015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
1544
1545 Revert the previous 3 commits:
1546 Move gdb_regex* to common/
1547 Move linux_find_memory_regions_full & co.
1548 gdbserver build-id attribute generator
1549
700ca40f
JK
15502015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1551 Jan Kratochvil <jan.kratochvil@redhat.com>
1552
1553 gdbserver build-id attribute generator.
1554 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
1555 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
1556 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
1557 (find_phdr): New.
1558 (get_dynamic): Use find_pdhr to traverse program headers.
1559 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
1560 (compare_mapping_entry_range, struct find_memory_region_callback_data)
1561 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
1562 (get_hex_build_id): New.
1563 (linux_qxfer_libraries_svr4): Add optional build-id attribute
1564 to reply XML document.
1565
9904185c
JK
15662015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1567 Jan Kratochvil <jan.kratochvil@redhat.com>
1568
1569 * target.c: Include target/target-utils.h and fcntl.h.
1570 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
1571 (target_fileio_read_stralloc): New functions.
1572
6e5b4429
JK
15732015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
1574
1575 * Makefile.in (OBS): Add gdb_regex.o.
1576 (gdb_regex.o): New.
1577 * config.in: Rebuilt.
1578 * configure: Rebuilt.
1579
ddc98fbf
JK
15802015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1581 Jan Kratochvil <jan.kratochvil@redhat.com>
1582
1583 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
1584 * Makefile.in (OBS): Add target-utils.o.
1585 (linux-maps.o, target-utils.o): New.
1586 * configure.srv (srv_linux_obj): Add linux-maps.o.
1587
e57bb7a0
PL
15882015-07-15 Pierre Langlois <pierre.langlois@arm.com>
1589
1590 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
1591 function, return 1.
1592 (the_low_target): Install it.
1593
586b02a9
PA
15942015-07-14 Pedro Alves <palves@redhat.com>
1595
1596 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
1597 Instead, ignore ECHILD, and throw an error for other errnos.
1598
58c1b36c
PA
15992015-07-10 Pedro Alves <palves@redhat.com>
1600
1601 * event-loop.c (struct callback_event) <data>: Change type to
1602 gdb_client_data instance instead of gdb_client_data pointer.
1603 (append_callback_event): Adjust.
1604
421530db
PL
16052015-07-10 Pierre Langlois <pierre.langlois@arm.com>
1606
1607 * linux-aarch64-low.c: Add comments for each linux_target_ops
1608 method. Remove comments already covered in target_ops and
1609 linux_target_ops definitions.
1610 (the_low_target): Add comments for each unimplemented method.
1611
c2d65f38
YQ
16122015-07-09 Yao Qi <yao.qi@linaro.org>
1613
1614 * linux-aarch64-low.c (aarch64_regmap): Remove.
1615 (aarch64_usrregs_info): Remove.
1616 (regs_info): Set field usrregs to NULL.
1617
b20a6524
MM
16182015-07-02 Markus Metzger <markus.t.metzger@intel.com>
1619
1620 * linux-low.c: Include "rsp-low.h"
1621 (linux_low_encode_pt_config, linux_low_encode_raw): New.
1622 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
1623 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
1624 (handle_btrace_enable_pt): New.
1625 (handle_btrace_general_set): Support "pt".
1626 (handle_btrace_conf_general_set): Support "pt:size".
1627
96c97461
PL
16282015-06-29 Pierre Langlois <pierre.langlois@arm.com>
1629
1630 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
1631 Z_PACKET_SW_BP.
1632
37d66942
PL
16332015-06-29 Pierre Langlois <pierre.langlois@arm.com>
1634
1635 * linux-aarch64-low.c: Remove comment about endianness.
1636 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
1637 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
1638 memcmp.
1639
dc06243f
GB
16402015-06-24 Gary Benson <gbenson@redhat.com>
1641
1642 * linux-i386-ipa.c (stdint.h): Do not include.
1643 * lynx-i386-low.c (stdint.h): Likewise.
1644 * lynx-ppc-low.c (stdint.h): Likewise.
1645 * mem-break.c (stdint.h): Likewise.
1646 * thread-db.c (stdint.h): Likewise.
1647 * tracepoint.c (stdint.h): Likewise.
1648 * win32-low.c (stdint.h): Likewise.
1649
124e13d9
SM
16502015-06-18 Simon Marchi <simon.marchi@ericsson.com>
1651
1652 * server.c (write_qxfer_response): Update call to
1653 remote_escape_output.
1654
909c2cda
JK
16552015-06-15 Aleksandar Ristovski <aristovski@qnx.com
1656 Jan Kratochvil <jan.kratochvil@redhat.com>
1657
1658 Merge multiple hex conversions.
1659 * gdbreplay.c (tohex): Rename to 'fromhex'.
1660 (logchar): Use fromhex.
1661
24c05f46
JK
16622015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
1663
1664 * server.c (handle_qxfer_libraries): Set `version' attribute for
1665 <library-list>.
1666
14d2069a
GB
16672015-06-10 Gary Benson <gbenson@redhat.com>
1668
1669 * target.h (struct target_ops) <multifs_open>: New field.
1670 <multifs_unlink>: Likewise.
1671 <multifs_readlink>: Likewise.
1672 * linux-low.c (nat/linux-namespaces.h): New include.
1673 (linux_target_ops): Initialize the_target->multifs_open,
1674 the_target->multifs_unlink and the_target->multifs_readlink.
1675 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
1676 * hostio.c (hostio_fs_pid): New static variable.
1677 (hostio_handle_new_gdb_connection): New function.
1678 (handle_setfs): Likewise.
1679 (handle_open): Use the_target->multifs_open as appropriate.
1680 (handle_unlink): Use the_target->multifs_unlink as appropriate.
1681 (handle_readlink): Use the_target->multifs_readlink as
1682 appropriate.
1683 (handle_vFile): Handle vFile:setfs packets.
1684 * server.c (handle_query): Call hostio_handle_new_gdb_connection
1685 after target_handle_new_gdb_connection.
1686
4b8b5e72
GB
16872015-06-10 Gary Benson <gbenson@redhat.com>
1688
1689 * configure.ac (AC_CHECK_FUNCS): Add setns.
1690 * config.in: Regenerate.
1691 * configure: Likewise.
1692 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
1693 (linux-namespaces.o): New rule.
1694 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
1695
3ac2e371
GB
16962015-06-09 Gary Benson <gbenson@redhat.com>
1697
1698 * hostio.c (handle_open): Process mode argument with
1699 fileio_to_host_mode.
1700
ca9b78ce
YQ
17012015-06-01 Yao Qi <yao.qi@linaro.org>
1702
1703 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
1704 * linux-x86-low.c: Likewise.
1705
bfacd19d
DB
17062015-05-28 Don Breazeal <donb@codesourcery.com>
1707
1708 * linux-low.c (handle_extended_wait): Initialize
1709 thread_info.last_resume_kind for new fork children.
1710
452003ef
PA
17112015-05-15 Pedro Alves <palves@redhat.com>
1712
1713 * target.h (target_handle_new_gdb_connection): Rewrite using if
1714 wrapped in do/while.
1715
1041a03c
JB
17162015-05-14 Joel Brobecker <brobecker@adacore.com>
1717
1718 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
1719 * configure, config.in: Regenerate.
1720 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
1721 Declare typedef.
1722
c269dbdb
DB
17232015-05-12 Don Breazeal <donb@codesourcery.com>
1724
1725 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
1726 PTRACE_EVENT_VFORK_DONE.
1727 (linux_low_ptrace_options, extended_event_reported): Add vfork
1728 events.
1729 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
1730 and "vforkdone" for RSP 'T' Stop Reply Packet.
1731 * server.h (report_vfork_events): Declare
1732 global variable.
1733
3a8a0396
DB
17342015-05-12 Don Breazeal <donb@codesourcery.com>
1735
1736 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
1737 (the_low_target) <new_fork>: Initialize new member.
1738 * linux-arm-low.c (arm_new_fork): New function.
1739 (the_low_target) <new_fork>: Initialize new member.
1740 * linux-low.c (handle_extended_wait): Call new target function
1741 new_fork.
1742 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
1743 * linux-mips-low.c (mips_add_watchpoint): New function
1744 extracted from mips_insert_point.
1745 (the_low_target) <new_fork>: Initialize new member.
1746 (mips_linux_new_fork): New function.
1747 (mips_insert_point): Call mips_add_watchpoint.
1748 * linux-x86-low.c (x86_linux_new_fork): New function.
1749 (the_low_target) <new_fork>: Initialize new member.
1750
de0d863e
DB
17512015-05-12 Don Breazeal <donb@codesourcery.com>
1752
1753 * linux-low.c (handle_extended_wait): Implement return value,
1754 rename argument 'event_child' to 'event_lwp', handle
1755 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
1756 (linux_low_ptrace_options): New function.
1757 (linux_low_filter_event): Call linux_low_ptrace_options,
1758 use different argument fo linux_enable_event_reporting,
1759 use return value from handle_extended_wait.
1760 (extended_event_reported): New function.
1761 (linux_wait_1): Call extended_event_reported and set
1762 status to report fork events.
1763 (linux_write_memory): Add pid to debug message.
1764 (reset_lwp_ptrace_options_callback): New function.
1765 (linux_handle_new_gdb_connection): New function.
1766 (linux_target_ops): Initialize new structure member.
1767 * linux-low.h (struct lwp_info) <waitstatus>: New member.
1768 * lynx-low.c: Initialize new structure member.
1769 * remote-utils.c (prepare_resume_reply): Implement stop reason
1770 "fork" for "T" stop message.
1771 * server.c (handle_query): Call handle_new_gdb_connection.
1772 * server.h (report_fork_events): Declare global flag.
1773 * target.h (struct target_ops) <handle_new_gdb_connection>:
1774 New member.
1775 (target_handle_new_gdb_connection): New macro.
1776 * win32-low.c: Initialize new structure member.
1777
ddcbc397
DB
17782015-05-12 Don Breazeal <donb@codesourcery.com>
1779
1780 * mem-break.c (APPEND_TO_LIST): Define macro.
1781 (clone_agent_expr): New function.
1782 (clone_one_breakpoint): New function.
1783 (clone_all_breakpoints): New function.
1784 * mem-break.h: Declare new functions.
1785
89245bc0
DB
17862015-05-12 Don Breazeal <donb@codesourcery.com>
1787
1788 * linux-low.c (linux_supports_fork_events): New function.
1789 (linux_supports_vfork_events): New function.
1790 (linux_target_ops): Initialize new structure members.
1791 (initialize_low): Call linux_check_ptrace_features.
1792 * lynx-low.c (lynx_target_ops): Initialize new structure
1793 members.
1794 * server.c (report_fork_events, report_vfork_events):
1795 New global flags.
1796 (handle_query): Add new features to qSupported packet and
1797 response.
1798 (captured_main): Initialize new global variables.
1799 * target.h (struct target_ops) <supports_fork_events>:
1800 New member.
1801 <supports_vfork_events>: New member.
1802 (target_supports_fork_events): New macro.
1803 (target_supports_vfork_events): New macro.
1804 * win32-low.c (win32_target_ops): Initialize new structure
1805 members.
1806
835205d0
GB
18072015-05-12 Gary Benson <gbenson@redhat.com>
1808
1809 * server.c (handle_qxfer_exec_file): Use current process
1810 if annex is empty.
1811
21e94bd9
SL
18122015-05-08 Sandra Loosemore <sandra@codesourcery.com>
1813
1814 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
1815 Remove HAVE_PTRACE_GETREGS conditionals.
1816 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
1817 instead of PTRACE_GETREGS and PTRACE_SETREGS.
1818
45614f15
YQ
18192015-05-08 Yao Qi <yao.qi@linaro.org>
1820
1821 * linux-low.c (linux_supports_conditional_breakpoints): New
1822 function.
1823 (linux_target_ops): Install new target method.
1824 * lynx-low.c (lynx_target_ops): Install NULL hook for
1825 supports_conditional_breakpoints.
1826 * nto-low.c (nto_target_ops): Likewise.
1827 * spu-low.c (spu_target_ops): Likewise.
1828 * win32-low.c (win32_target_ops): Likewise.
1829 * server.c (handle_query): Check
1830 target_supports_conditional_breakpoints.
1831 * target.h (struct target_ops) <supports_conditional_breakpoints>:
1832 New field.
1833 (target_supports_conditional_breakpoints): New macro.
1834
80ad801e
PA
18352015-05-06 Pedro Alves <palves@redhat.com>
1836
1837 PR server/18081
1838 * server.c (start_inferior): If the process exits, mourn it.
1839
819843c7
GB
18402015-04-21 Gary Benson <gbenson@redhat.com>
1841
1842 * hostio.c (fileio_open_flags_to_host): Factored out to
1843 fileio_to_host_openflags in common/fileio.c. Single use
1844 updated.
1845
a2d5a9d7
MF
18462015-04-17 Max Filippov <jcmvbkbc@gmail.com>
1847
1848 * linux-xtensa-low.c (xtensa_fill_gregset)
1849 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
1850 XCHAL_HAVE_LOOP.
1851
deb44829
MF
18522015-04-17 Max Filippov <jcmvbkbc@gmail.com>
1853
1854 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
1855 (regs_info): Replace usrregs pointer with NULL.
1856
e57f1de3
GB
18572015-04-17 Gary Benson <gbenson@redhat.com>
1858
1859 * target.h (struct target_ops) <pid_to_exec_file>: New field.
1860 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
1861 * server.c (handle_qxfer_exec_file): New function.
1862 (qxfer_packets): Add exec-file entry.
1863 (handle_query): Report qXfer:exec-file:read as supported packet.
1864
62828379
RN
18652015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
1866
1867 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
1868
b88bb450
GB
18692015-04-09 Gary Benson <gbenson@redhat.com>
1870
1871 * hostio-errno.c (errno_to_fileio_error): Remove function.
1872 Update caller to use remote_fileio_to_fio_error.
1873
c8f4bfdd
YQ
18742015-04-09 Yao Qi <yao.qi@linaro.org>
1875
1876 * linux-low.c (linux_insert_point): Call
1877 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
1878 (linux_remove_point): Call remove_memory_breakpoint if type is
1879 raw_bkpt_type_sw.
1880 * linux-x86-low.c (x86_insert_point): Don't call
1881 insert_memory_breakpoint.
1882 (x86_remove_point): Don't call remove_memory_breakpoint.
1883
41f98f02
PA
18842015-04-01 Pedro Alves <palves@redhat.com>
1885 Cleber Rosa <crosa@redhat.com>
1886
1887 * server.c (gdbserver_usage): Reorganize and extend the usage
1888 message.
1889
2bf6fb9d
PA
18902015-03-24 Pedro Alves <palves@redhat.com>
1891
1892 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
1893 output. Also dump TRAP_TRACE.
1894 (linux_low_filter_event): In debug output, distinguish a
1895 resume_stop SIGSTOP from a delayed SIGSTOP.
1896
369f6daa
GB
18972015-03-24 Gary Benson <gbenson@redhat.com>
1898
1899 * linux-x86-low.c (x86_linux_new_thread): Moved to
1900 nat/x86-linux.c.
1901 (x86_linux_prepare_to_resume): Likewise.
1902
8e5d4070
GB
19032015-03-24 Gary Benson <gbenson@redhat.com>
1904
1905 * Makefile.in (x86-linux-dregs.o): New rule.
1906 * configure.srv: Add x86-linux-dregs.o to relevant targets.
1907 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
1908 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
1909 (x86_linux_dr_get): Likewise.
1910 (x86_linux_dr_set): Likewise.
1911 (update_debug_registers_callback): Likewise.
1912 (x86_linux_dr_set_addr): Likewise.
1913 (x86_linux_dr_get_addr): Likewise.
1914 (x86_linux_dr_set_control): Likewise.
1915 (x86_linux_dr_get_control): Likewise.
1916 (x86_linux_dr_get_status): Likewise.
1917 (x86_linux_update_debug_registers): Likewise.
1918
2b95d440
GB
19192015-03-24 Gary Benson <gbenson@redhat.com>
1920
1921 * linux-x86-low.c (x86_linux_update_debug_registers):
1922 New function, factored out from...
1923 (x86_linux_prepare_to_resume): ...this.
1924
14b0bc68
GB
19252015-03-24 Gary Benson <gbenson@redhat.com>
1926
1927 * linux-x86-low.c (x86_linux_dr_get): Update comments.
1928 (x86_linux_dr_set): Likewise.
1929 (update_debug_registers_callback): Likewise.
1930 (x86_linux_dr_set_addr): Likewise.
1931 (x86_linux_dr_get_addr): Likewise.
1932 (x86_linux_dr_set_control): Likewise.
1933 (x86_linux_dr_get_control): Likewise.
1934 (x86_linux_dr_get_status): Likewise.
1935 (x86_linux_prepare_to_resume): Likewise.
1936
5dfe6ca8
GB
19372015-03-24 Gary Benson <gbenson@redhat.com>
1938
1939 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
1940 Use perror_with_name. Pass string through gettext.
1941 (x86_linux_dr_set): Likewise.
1942
d33472ad
GB
19432015-03-24 Gary Benson <gbenson@redhat.com>
1944
1945 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
1946 (x86_linux_dr_set_addr): ...this.
1947 (x86_dr_low_get_addr): Rename to...
1948 (x86_linux_dr_get_addr): ...this.
1949 (x86_dr_low_set_control): Rename to...
1950 (x86_linux_dr_set_control): ...this.
1951 (x86_dr_low_get_control): Rename to...
1952 (x86_linux_dr_get_control): ...this.
1953 (x86_dr_low_get_status): Rename to...
1954 (x86_linux_dr_get_status): ...this.
1955 (x86_dr_low): Update with new function names.
1956
4b134ca1
GB
19572015-03-24 Gary Benson <gbenson@redhat.com>
1958
1959 * Makefile.in (x86-linux.o): New rule.
1960 * configure.srv: Add x86-linux.o to relevant targets.
1961 * linux-low.c (lwp_set_arch_private_info): New function.
1962 (lwp_arch_private_info): Likewise.
1963 * linux-x86-low.c: Include nat/x86-linux.h.
1964 (arch_lwp_info): Removed structure.
1965 (update_debug_registers_callback):
1966 Use lwp_set_debug_registers_changed.
1967 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
1968 and lwp_set_debug_registers_changed.
1969 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
1970
34c703da
GB
19712015-03-24 Gary Benson <gbenson@redhat.com>
1972
1973 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
1974 * linux-arm-low.c (arm_new_thread): Likewise.
1975 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
1976 * linux-mips-low.c (mips_linux_new_thread): Likewise.
1977 * linux-x86-low.c (x86_linux_new_thread): Likewise.
1978 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
1979
cff068da
GB
19802015-03-24 Gary Benson <gbenson@redhat.com>
1981
1982 * linux-low.c (ptid_of_lwp): New function.
1983 (lwp_is_stopped): Likewise.
1984 (lwp_stop_reason): Likewise.
1985 * linux-x86-low.c (update_debug_registers_callback):
1986 Use lwp_is_stopped.
1987 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
1988 lwp_stop_reason.
1989
b2f7c7e8
GB
19902015-03-24 Gary Benson <gbenson@redhat.com>
1991
1992 * linux-low.h (linux_stop_lwp): Remove declaration.
1993
6d4ee8c6
GB
19942015-03-24 Gary Benson <gbenson@redhat.com>
1995
1996 * linux-low.h: Include nat/linux-nat.h.
1997 * linux-low.c (iterate_over_lwps_args): New structure.
1998 (iterate_over_lwps_filter): New function.
1999 (iterate_over_lwps): Likewise.
2000 * linux-x86-low.c (update_debug_registers_callback):
2001 Update signature to what iterate_over_lwps expects.
2002 Remove PID check that iterate_over_lwps now performs.
2003 (x86_dr_low_set_addr): Use iterate_over_lwps.
2004 (x86_dr_low_set_control): Likewise.
2005
70a0bb6b
GB
20062015-03-24 Gary Benson <gbenson@redhat.com>
2007
2008 * linux-x86-low.c (x86_debug_reg_state): New function.
2009 (x86_linux_prepare_to_resume): Use the above.
2010
7b669087
GB
20112015-03-24 Gary Benson <gbenson@redhat.com>
2012
2013 * linux-low.c (current_lwp_ptid): New function.
2014 * linux-x86-low.c: Include nat/linux-nat.h.
2015 (x86_dr_low_get_addr): Use current_lwp_ptid.
2016 (x86_dr_low_get_control): Likewise.
2017 (x86_dr_low_get_status): Likewise.
2018
eef49a3d
PA
20192015-03-20 Pedro Alves <palves@redhat.com>
2020
2021 * tracepoint.c (cmd_qtstatus): Make "str" const.
2022
b2333d22
PA
20232015-03-20 Pedro Alves <palves@redhat.com>
2024
2025 * server.c (handle_general_set): Make "req_str" const.
2026
23f238d3
PA
20272015-03-19 Pedro Alves <palves@redhat.com>
2028
2029 * linux-low.c (linux_resume_one_lwp): Rename to ...
2030 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
2031 instead call perror_with_name.
2032 (check_ptrace_stopped_lwp_gone): New function.
2033 (linux_resume_one_lwp): Reimplement as wrapper around
2034 linux_resume_one_lwp_throw that swallows errors if the LWP is
2035 gone.
2036
91baf43f
PA
20372015-03-19 Pedro Alves <palves@redhat.com>
2038
2039 * linux-low.c (count_events_callback, select_event_lwp_callback):
2040 No longer check whether the thread has resume_stop as last resume
2041 kind.
2042
8bf3b159
PA
20432015-03-19 Pedro Alves <palves@redhat.com>
2044
2045 * linux-low.c (count_events_callback, select_event_lwp_callback):
2046 Use the lwp's status_pending_p field, not the thread's.
2047
b90fc188
PA
20482015-03-19 Pedro Alves <palves@redhat.com>
2049
2050 * linux-low.c (select_event_lwp_callback): Update comments to
2051 no longer mention SIGTRAP.
2052
464b0089
GB
20532015-03-18 Gary Benson <gbenson@redhat.com>
2054
2055 * server.c (handle_query): Do not report vFile:fstat as supported.
2056
aa9e327f
GB
20572015-03-11 Gary Benson <gbenson@redhat.com>
2058
2059 * hostio.c (sys/types.h): New include.
2060 (sys/stat.h): Likewise.
2061 (common-remote-fileio.h): Likewise.
2062 (handle_fstat): New function.
2063 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 2064
791c0056
GB
20652015-03-11 Gary Benson <gbenson@redhat.com>
2066
2067 * configure.ac (AC_CHECK_MEMBERS): Add checks for
2068 struct stat.st_blocks and struct stat.st_blksize.
2069 * configure: Regenerate.
2070 * config.in: Likewise.
2071 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
2072 (OBS): Add common-remote-fileio.o.
2073 (common-remote-fileio.o): New rule.
2074
9a9df970
PA
20752015-03-09 Pedro Alves <palves@redhat.com>
2076
2077 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
2078 'struct sockaddr' pointer in 'accept' call.
2079
9eb1356e
PA
20802015-03-09 Pedro Alves <palves@redhat.com>
2081
2082 Revert:
2083 2015-03-07 Pedro Alves <palves@redhat.com>
2084 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
2085 or <winsock2.h> here. Instead include "gdb_socket.h".
2086 (remote_open): Use union gdb_sockaddr_u.
2087 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
2088 or <winsock2.h> here. Instead include "gdb_socket.h".
2089 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
2090 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
2091 or <sys/un.h>.
2092 (init_named_socket, gdb_agent_helper_thread): Use union
2093 gdb_sockaddr_u.
2094
aac331e4
PA
20952015-03-07 Pedro Alves <palves@redhat.com>
2096
2097 * configure.ac (build_warnings): Move
2098 -Wdeclaration-after-statement to the C-specific set.
2099 * configure: Regenerate.
2100
366c75fc
PA
21012015-03-07 Pedro Alves <palves@redhat.com>
2102
2103 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
2104 or <winsock2.h> here. Instead include "gdb_socket.h".
2105 (remote_open): Use union gdb_sockaddr_u.
2106 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
2107 or <winsock2.h> here. Instead include "gdb_socket.h".
2108 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
2109 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
2110 or <sys/un.h>.
2111 (init_named_socket, gdb_agent_helper_thread): Use union
2112 gdb_sockaddr_u.
2113
492d29ea
PA
21142015-03-07 Pedro Alves <palves@redhat.com>
2115
2116 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
2117 instead.
2118
60a191ed
YQ
21192015-03-06 Yao Qi <yao.qi@linaro.org>
2120
2121 * linux-aarch64-low.c (aarch64_insert_point): Use
2122 show_debug_regs as a boolean.
2123 (aarch64_remove_point): Likewise.
2124
f5771b1d
PA
21252015-03-05 Pedro Alves <palves@redhat.com>
2126
2127 * lynx-low.c (lynx_target_ops): Install NULL hooks for
2128 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
2129 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
2130 * nto-low.c (nto_target_ops): Likewise.
2131 * spu-low.c (spu_target_ops): Likewise.
2132 * win32-low.c (win32_target_ops): Likewise.
2133
3e572f71
PA
21342015-03-04 Pedro Alves <palves@redhat.com>
2135
72f4393d 2136 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
2137 Decide whether a breakpoint triggered based on the SIGTRAP's
2138 siginfo.si_code.
72f4393d
L
2139 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
2140 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
2141 (linux_low_filter_event): Check for breakpoints before checking
2142 watchpoints.
2143 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
2144 siginfo.si_code.
72f4393d
L
2145 (linux_stopped_by_sw_breakpoint)
2146 (linux_supports_stopped_by_sw_breakpoint)
2147 (linux_stopped_by_hw_breakpoint)
2148 (linux_supports_stopped_by_hw_breakpoint): New functions.
2149 (linux_target_ops): Install new target methods.
3e572f71 2150
1ec68e26
PA
21512015-03-04 Pedro Alves <palves@redhat.com>
2152
2153 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
2154 * server.c (swbreak_feature, hwbreak_feature): New globals.
2155 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
2156 (captured_main): Clear swbreak_feature and hwbreak_feature.
2157 * server.h (swbreak_feature, hwbreak_feature): Declare.
2158 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
2159 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
2160 supports_stopped_by_hw_breakpoint>: New fields.
2161 (target_supports_stopped_by_sw_breakpoint)
2162 (target_stopped_by_sw_breakpoint)
2163 (target_supports_stopped_by_hw_breakpoint)
2164 (target_stopped_by_hw_breakpoint): Declare.
2165
15c66dd6
PA
21662015-03-04 Pedro Alves <palves@redhat.com>
2167
2168 enum lwp_stop_reason -> enum target_stop_reason
2169 * linux-low.c (check_stopped_by_breakpoint): Adjust.
2170 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
2171 (linux_wait_1, stuck_in_jump_pad_callback)
2172 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
2173 (linux_stopped_by_watchpoint):
2174 * linux-low.h (enum lwp_stop_reason): Delete.
2175 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
2176 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
2177
98fc70d6
YQ
21782015-03-04 Yao Qi <yao.qi@linaro.org>
2179
2180 * Makefile.in (SFILES): Add linux-aarch64-low.c.
2181
dd2ac174
GB
21822015-03-03 Gary Benson <gbenson@redhat.com>
2183
2184 * hostio.c (handle_vFile): Fix prefix lengths.
2185
d68e53f4
MM
21862015-03-03 Markus Metzger <markus.t.metzger@intel.com>
2187
2188 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
2189 ptr_bits.
2190
bf2d68ab
AA
21912015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
2192
2193 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
2194 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
2195 (clean): Add "rm -f" for above C files.
2196 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
2197 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
2198 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
2199 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
2200 * linux-s390-low.c (HWCAP_S390_VX): New macro.
2201 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
2202 (init_registers_s390x_vx_linux64)
2203 (init_registers_s390x_tevx_linux64)
2204 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
2205 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
2206 declarations.
2207 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
2208 (s390_store_vxrs_high): New functions.
2209 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
2210 NT_S390_VXRS_HIGH.
2211 (s390_arch_setup): Add logic for selecting one of the new target
2212 descriptions. Activate the new vector regsets if applicable.
2213 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
2214 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
2215 and init_registers_s390x_tevx_linux64.
2216
c966a859
PA
22172015-03-01 Pedro Alves <palves@redhat.com>
2218
2219 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
2220 parameter.
2221
4180215b
PA
22222015-02-27 Pedro Alves <palves@redhat.com>
2223
2224 * linux-x86-low.c (u_debugreg_offset): New function.
2225 (x86_linux_dr_get, x86_linux_dr_set): Use it.
2226
749bab01
PA
22272015-02-27 Pedro Alves <palves@redhat.com>
2228
2229 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
2230 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
2231 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
2232 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
2233 (ps_lsetfpregs, ps_getpid)
2234 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
2235 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
2236 (ps_lsetxregs, ps_plog): Declare.
2237
3c14e5a3
PA
22382015-02-27 Pedro Alves <palves@redhat.com>
2239
2240 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
2241 IP_AGENT_EXPORT_FUNC.
2242 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
2243 IP_AGENT_EXPORT_FUNC.
2244 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
2245 (IP_AGENT_EXPORT): Delete.
2246 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
2247 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
2248 (gdb_trampoline_buffer_error, collecting, gdb_collect)
2249 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
2250 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
2251 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
2252 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
2253 (traceframe_read_count, traceframe_write_count)
2254 (traceframes_created, trace_state_variables, get_raw_reg)
2255 (get_trace_state_variable_value, set_trace_state_variable_value)
2256 (ust_loaded, helper_thread_id, cmd_buf): Use
2257 IPA_SYM_EXPORTED_NAME.
2258 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
2259 (tracepoints) Use IP_AGENT_EXPORT_VAR.
2260 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
2261 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2262 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
2263 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
2264 EXTERN_C_PUSH/EXTERN_C_POP.
2265 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
2266 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
2267 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2268 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
2269 (traceframe_write_count, traceframe_read_count)
2270 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
2271 (about_to_request_buffer_space, get_trace_state_variable_value)
2272 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
2273 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
2274 EXTERN_C_PUSH/EXTERN_C_POP.
2275 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
2276 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
2277 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
2278 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2279 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
2280 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
2281 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
2282 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
2283 Define.
2284 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
2285 (IP_AGENT_EXPORT_VAR_DECL): Define.
2286 (tracing): Declare.
2287 (gdb_agent_get_raw_reg): Declare.
2288
fe978cb0
PA
22892015-02-27 Tom Tromey <tromey@redhat.com>
2290 Pedro Alves <palves@redhat.com>
2291
2292 Rename symbols whose names are reserved C++ keywords throughout.
2293
3bc3d82a
PA
22942015-02-27 Pedro Alves <palves@redhat.com>
2295
2296 * Makefile.in (COMPILER): New, get it from autoconf.
2297 (CXX): Get from autoconf instead.
2298 (COMPILE.pre): Use COMPILER.
2299 (CC-LD): Rename to ...
2300 (CC_LD): ... this. Use COMPILER.
2301 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
2302 (CXX_FOR_TARGET): Default to g++ instead of gcc.
2303 * acinclude.m4: Include build-with-cxx.m4.
2304 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
2305 Disable -Werror by default if building in C++ mode.
2306 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
2307 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
2308 the C++ compiler. Save/restore CXXFLAGS too.
2309 * configure: Regenerate.
2310
07697489
PA
23112015-02-27 Pedro Alves <palves@redhat.com>
2312
2313 * acinclude.m4: Include libiberty.m4.
2314 * configure.ac: Call libiberty_INIT.
2315 * config.in, configure: Regenerate.
2316
9beb7c4e
PA
23172015-02-26 Pedro Alves <palves@redhat.com>
2318
2319 * linux-low.c (linux_wait_1): When incrementing the PC past a
2320 program breakpoint always use the_low_target.breakpoint_len as
2321 increment, rather than the maximum between that and
2322 the_low_target.decr_pc_after_break.
2323
8090aef2
PA
23242015-02-23 Pedro Alves <palves@redhat.com>
2325
2326 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
2327 thread was doing a step-over; always adjust the PC if
2328 we stepped over a permanent breakpoint.
2329 (linux_wait_1): If we stepped over breakpoint that was on top of a
2330 permanent breakpoint, manually advance the PC past it.
2331
bc9540e8
PA
23322015-02-23 Pedro Alves <palves@redhat.com>
2333
2334 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
2335 modes.
2336 (x86_fill_gregset, x86_store_gregset): Use it when handling
2337 $orig_eax.
2338
2db9a427
PA
23392015-02-20 Pedro Alves <palves@redhat.com>
2340
2341 * thread-db.c: Include "nat/linux-procfs.h".
2342 (thread_db_init): Skip listing new threads if the kernel supports
2343 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
2344
afa8d396
PA
23452015-02-20 Pedro Alves <palves@redhat.com>
2346
2347 * linux-low.c (status_pending_p_callback): Use ptid_match.
2348
c9587f88
AT
23492015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
2350
2351 PR breakpoints/16812
2352 * linux-low.c (wstatus_maybe_breakpoint): Remove.
2353 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
2354 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
2355
b05ec7a5
AT
23562015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
2357
2358 PR breakpoints/15956
2359 * tracepoint.c (cmd_qtinit): Add check for current_thread.
2360
d33501a5
MM
23612015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2362
2363 * linux-low.c (linux_low_btrace_conf): Print size.
2364 * server.c (handle_btrace_conf_general_set): New.
2365 (hanle_general_set): Call handle_btrace_conf_general_set.
2366 (handle_query): Report Qbtrace-conf:bts:size as supported.
2367
f4abbc16
MM
23682015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2369
2370 * linux-low.c (linux_low_enable_btrace): Update parameters.
2371 (linux_low_btrace_conf): New.
2372 (linux_target_ops)<to_btrace_conf>: Initialize.
2373 * server.c (current_btrace_conf): New.
2374 (handle_btrace_enable): Rename to ...
2375 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
2376 to target_enable_btrace. Update comment. Update users.
2377 (handle_qxfer_btrace_conf): New.
2378 (qxfer_packets): Add btrace-conf entry.
2379 (handle_query): Report qXfer:btrace-conf:read as supported packet.
2380 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
2381 (target_ops)<read_btrace_conf>: New.
2382 (target_enable_btrace): Update parameters.
2383 (target_read_btrace_conf): New.
2384
043c3577
MM
23852015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2386
2387 * server.c (handle_btrace_general_set): Remove call to
2388 target_supports_btrace.
2389 (supported_btrace_packets): New.
2390 (handle_query): Call supported_btrace_packets.
2391 * target.h: include btrace-common.h.
2392 (btrace_target_info): Removed.
2393 (supports_btrace, target_supports_btrace): Update parameters.
2394
734b0e4b
MM
23952015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2396
2397 * Makefile.in (SFILES): Add common/btrace-common.c.
2398 (OBS): Add common/btrace-common.o.
2399 (btrace-common.o): Add build rules.
2400 * linux-low: Include btrace-common.h.
2401 (linux_low_read_btrace): Use struct btrace_data. Call
2402 btrace_data_init and btrace_data_fini.
2403
d6c146e9
PA
24042015-02-06 Pedro Alves <palves@redhat.com>
2405
2406 * thread-db.c (find_new_threads_callback): Add debug output.
2407
20ba1ce6
PA
24082015-02-04 Pedro Alves <palves@redhat.com>
2409
2410 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
2411 (resume_stopped_resumed_lwps): New function.
2412 (linux_wait_for_event_filtered): Use it.
2413
8cc73a39
SDJ
24142015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
2415
2416 * Makefile.in (SFILES): Add linux-personality.c.
2417 (linux-personality.o): New rule.
2418 * configure.srv (srv_linux_obj): Add linux-personality.o to the
2419 list of objects to be built.
2420 * linux-low.c: Include nat/linux-personality.h.
2421 (linux_create_inferior): Remove code to disable address space
2422 randomization (moved to ../nat/linux-personality.c). Create
2423 cleanup to disable address space randomization.
2424
fb23d554
SDJ
24252015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
2426
2427 * Makefile.in (posix-strerror.o): New rule.
2428 (mingw-strerror.o): Likewise.
2429 * configure: Regenerated.
2430 * configure.ac: Source file ../common/common.host. Initialize new
2431 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
2432
cdf43629
YQ
24332015-01-14 Yao Qi <yao@codesourcery.com>
2434
2435 * Makefile.in (SFILES): Add nat/ppc-linux.c.
2436 (ppc-linux.o): New rule.
2437 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
2438 * configure.ac: AC_CHECK_FUNCS(getauxval).
2439 * config.in: Re-generated.
2440 * configure: Re-generated.
2441 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
2442 ppc64_64bit_inferior_p
2443
514c5338
YQ
24442015-01-14 Yao Qi <yao@codesourcery.com>
2445
2446 * linux-ppc-low.c: Include "nat/ppc-linux.h".
2447 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
2448 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
2449 (PT_ORIG_R3, PT_TRAP): Likewise.
2450 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
2451 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
2452 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
2453
3368c1e5
JB
24542015-01-10 Joel Brobecker <brobecker@adacore.com>
2455
2456 * i387-fp.c (i387_cache_to_xsave): In look over
2457 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
2458 zmmh_low_space field by use of zmmh_high_space.
2459
582511be
PA
24602015-01-09 Pedro Alves <palves@redhat.com>
2461
2462 * linux-low.c (step_over_bkpt): Move higher up in the file.
2463 (handle_extended_wait): Don't store the stop_pc here.
2464 (get_stop_pc): Adjust comments and rename to ...
2465 (check_stopped_by_breakpoint): ... this. Record whether the LWP
2466 stopped for a software breakpoint or hardware breakpoint.
2467 (thread_still_has_status_pending_p): New function.
2468 (status_pending_p_callback): Use
2469 thread_still_has_status_pending_p. If the event is no longer
2470 interesting, resume the LWP.
2471 (handle_tracepoints): Add assert.
2472 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
2473 (wstatus_maybe_breakpoint): New function.
2474 (cancel_breakpoint): Delete function.
2475 (check_stopped_by_watchpoint): New function, factored out from
2476 linux_low_filter_event.
2477 (lp_status_maybe_breakpoint): Delete function.
2478 (linux_low_filter_event): Remove filter_ptid argument.
2479 Leave thread group exits pending here. Store the LWP's stop PC.
2480 Always leave events pending.
2481 (linux_wait_for_event_filtered): Pull all events out of the
2482 kernel, and leave them all pending.
2483 (count_events_callback, select_event_lwp_callback): Consider all
2484 events.
2485 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
2486 (select_event_lwp): Only give preference to the stepping LWP in
2487 all-stop mode. Adjust comments.
2488 (ignore_event): New function.
2489 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
2490 references to cancel_breakpoints. Adjust to renames. Also give
2491 equal priority to all LWPs that have had events in non-stop mode.
2492 If reporting a software breakpoint event, unadjust the LWP's PC.
2493 (linux_wait): If linux_wait_1 returned an ignored event, retry.
2494 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
2495 Adjust.
2496 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
2497 (resume_status_pending_p): Use thread_still_has_status_pending_p.
2498 (linux_stopped_by_watchpoint): Adjust.
2499 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
2500 * linux-low.h (enum lwp_stop_reason): New.
2501 (struct lwp_info) <stop_pc>: Adjust comment.
2502 <stopped_by_watchpoint>: Delete field.
2503 <stop_reason>: New field.
2504 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
2505 * mem-break.c (software_breakpoint_inserted_here)
2506 (hardware_breakpoint_inserted_here): New function.
2507 * mem-break.h (software_breakpoint_inserted_here)
2508 (hardware_breakpoint_inserted_here): Declare.
2509 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
2510 (cancel_breakpoints): Delete.
2511 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
2512 (upload_fast_traceframes): Remove references to
2513 cancel_breakpoints.
2514
a33e3959
PA
25152015-01-09 Pedro Alves <palves@redhat.com>
2516
2517 * thread-db.c (find_new_threads_callback): Ignore thread if the
2518 kernel thread ID is -1.
2519
8784d563
PA
25202015-01-09 Pedro Alves <palves@redhat.com>
2521
2522 * linux-low.c (linux_attach_fail_reason_string): Move to
2523 nat/linux-ptrace.c, and rename.
2524 (linux_attach_lwp): Update comment.
2525 (attach_proc_task_lwp_callback): New function.
2526 (linux_attach): Adjust to rename and use
2527 linux_proc_attach_tgid_threads.
2528 (linux_attach_fail_reason_string): Delete declaration.
2529
76f2b779
JB
25302015-01-01 Joel Brobecker <brobecker@adacore.com>
2531
2532 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
2533 * server.c (gdbserver_version): Likewise.
2534
fafcc06a
SDJ
25352014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
2536
2537 * remote-utils.c: Include ctype.h.
2538 (input_interrupt): Explicitly handle the case when the char
2539 received is the NUL byte. Improve the printing of non-ASCII
2540 characters.
2541
beed38b8
JB
25422014-12-16 Joel Brobecker <brobecker@adacore.com>
2543
2544 * linux-low.c (linux_low_filter_event): Update call to
2545 linux_enable_event_reporting following the addition of
2546 a new parameter to that function.
2547
bf330350
CU
25482014-12-16 Catalin Udma <catalin.udma@freescale.com>
2549
2550 PR server/17457
2551 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
2552 (AARCH64_FPCR_REGNO): Likewise.
2553 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
2554 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
2555 (aarch64_store_fpregset): Likewise.
2556
5227d625
JB
25572014-12-15 Joel Brobecker <brobecker@adacore.com>
2558
2559 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
2560 Remove FIXME comment about assumption about N.
2561
f93b65a0
JB
25622014-12-13 Joel Brobecker <brobecker@adacore.com>
2563
2564 * configure.ac: If large-file support is disabled in GDBserver,
2565 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
2566 * configure: Regenerate.
2567
e5a9158d
AA
25682014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2569
2570 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
2571 warning upon ENODATA from ptrace.
2572 * linux-s390-low.c (s390_store_tdb): New.
2573 (s390_regsets): Add regset for NT_S390_TDB.
2574
feea5f36
AA
25752014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2576
2577 * linux-low.c (regsets_store_inferior_registers): Skip regsets
2578 without a fill_function.
2579 * linux-s390-low.c (s390_fill_last_break): Remove.
2580 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
2581 (s390_arch_setup): Use regset's size instead of fill_function for
2582 loop end condition.
2583
098dbe61
AA
25842014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2585
2586 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
2587 the regset's store function when ptrace returned an error.
2588 * regcache.c (get_thread_regcache): Invalidate register cache
2589 before fetching inferior's registers.
2590
28eef672
AA
25912014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2592
2593 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
2594 while-loop as for-loop.
2595 (regsets_store_inferior_registers): Likewise.
2596
bdca27a2
YQ
25972014-11-28 Yao Qi <yao@codesourcery.com>
2598
2599 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
2600 * config.in, configure: Re-generate.
2601 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
2602 is defined.
2603
9c232dda
YQ
26042014-11-21 Yao Qi <yao@codesourcery.com>
2605
2606 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
2607 (AC_CHECK_HEADERS): Remove malloc.h.
2608 * configure: Re-generated.
2609 * config.in: Re-generated.
2610 * server.h: Don't include alloca.h and malloc.h.
2611 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
2612 Don't include malloc.h.
2613
43968415
JB
26142014-11-17 Joel Brobecker <brobecker@adacore.com>
2615
2616 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
2617 corresponding ERRNO check in same block.
2618
40e91bc7
PA
26192014-11-12 Pedro Alves <palves@redhat.com>
2620
2621 * server.c (cont_thread): Update comment.
2622 (start_inferior, attach_inferior): No longer clear cont_thread.
2623 (handle_v_cont): No longer set cont_thread.
2624 (captured_main): Clear cont_thread each time a GDB connects.
2625
c2c118cf
PA
26262014-11-12 Pedro Alves <palves@redhat.com>
2627
2628 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
2629 thread, and don't resume all threads if the Hc thread has exited.
2630
78708b7c
PA
26312014-11-12 Pedro Alves <palves@redhat.com>
2632
2633 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
2634 the process group instead of to a specific LWP.
2635
a2abc7de
PA
26362014-10-15 Pedro Alves <palves@redhat.com>
2637
2638 PR server/17487
2639 * win32-arm-low.c (arm_set_thread_context): Remove current_event
2640 parameter.
2641 (arm_set_thread_context): Delete.
2642 (the_low_target): Adjust.
2643 * win32-i386-low.c (debug_registers_changed)
2644 (debug_registers_used): Delete.
2645 (update_debug_registers_callback): New function.
2646 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
2647 needing to update their debug registers.
2648 (win32_get_current_dr): New function.
2649 (x86_dr_low_get_addr, x86_dr_low_get_control)
2650 (x86_dr_low_get_status): Fetch the debug register from the thread
2651 record's context.
2652 (i386_initial_stuff): Adjust.
2653 (i386_get_thread_context): Remove current_event parameter. Don't
2654 clear debug_registers_changed nor copy DR values to
2655 debug_reg_state.
2656 (i386_set_thread_context): Delete.
2657 (i386_prepare_to_resume): New function.
2658 (i386_thread_added): Mark the thread as needing to update irs
2659 debug registers.
2660 (the_low_target): Remove i386_set_thread_context and install
2661 i386_prepare_to_resume.
2662 * win32-low.c (win32_get_thread_context): Adjust.
2663 (win32_set_thread_context): Use SetThreadContext
2664 directly.
2665 (win32_prepare_to_resume): New function.
2666 (win32_require_context): New function, factored out from ...
2667 (thread_rec): ... this.
2668 (continue_one_thread): Call win32_prepare_to_resume on each thread
2669 we're about to continue.
2670 (win32_resume): Call win32_prepare_to_resume on the event thread.
2671 * win32-low.h (struct win32_thread_info)
2672 <debug_registers_changed>: New field.
2673 (struct win32_target_ops): Change prototype of set_thread_context,
2674 delete set_thread_context and add prepare_to_resume.
2675 (win32_require_context): New declaration.
2676
a442d071
GB
26772014-10-08 Gary Benson <gbenson@redhat.com>
2678
2679 * server.h: Do not include common-exceptions.h.
2680
6f1947e8
GB
26812014-10-08 Gary Benson <gbenson@redhat.com>
2682
2683 * server.h: Do not include cleanups.h.
2684
63b434a4
JH
26852014-09-30 James Hogan <james.hogan@imgtec.com>
2686
2687 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
2688 mips64-dsp-linux.c.
2689
c4d9ceb6
YQ
26902014-09-23 Yao Qi <yao@codesourcery.com>
2691
2692 * linux-low.c (lp_status_maybe_breakpoint): New function.
2693 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
2694 (count_events_callback): Likewise.
2695 (select_event_lwp_callback): Likewise.
2696 (cancel_breakpoints_callback): Likewise.
2697
89a5711c
DB
26982014-09-19 Don Breazeal <donb@codesourcery.com>
2699
2700 * linux-low.c (handle_extended_wait): Call
2701 linux_ptrace_get_extended_event.
2702 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
2703 linux_is_extended_waitstatus.
2704
bffc0964
JB
27052014-09-16 Joel Brobecker <brobecker@adacore.com>
2706
2707 * Makefile.in (CPPFLAGS): Define.
2708 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
2709 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
2710
0bfdf32f
GB
27112014-09-16 Gary Benson <gbenson@redhat.com>
2712
2713 * inferiors.h (current_inferior): Renamed as...
2714 (current_thread): New variable. All uses updated.
2715 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
2716 (maybe_move_out_of_jump_pad): Likewise.
2717 (cancel_breakpoint): Likewise.
2718 (linux_low_filter_event): Likewise.
2719 (wait_for_sigstop): Likewise.
2720 (linux_resume_one_lwp): Likewise.
2721 (need_step_over_p): Likewise.
2722 (start_step_over): Likewise.
2723 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
2724 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
2725 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
2726 and save_inferior as saved_thread.
2727 * regcache.c (get_thread_regcache): Renamed saved_inferior as
2728 saved_thread.
2729 (regcache_invalidate_thread): Likewise.
2730 * remote-utils.c (prepare_resume_reply): Likewise.
2731 * thread-db.c (thread_db_get_tls_address): Likewise.
2732 (disable_thread_event_reporting): Likewise.
2733 (remove_thread_event_breakpoints): Likewise.
2734 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
2735 as saved_thread.
2736 * target.h (set_desired_inferior): Renamed as...
2737 (set_desired_thread): New declaration. All uses updated.
2738 * server.c (myresume): Updated comment to reference thread instead
2739 of inferior.
2740 (handle_serial_event): Likewise.
2741 (handle_target_event): Likewise.
2742
361c8ade
GB
27432014-09-12 Tom Tromey <tromey@redhat.com>
2744 Gary Benson <gbenson@redhat.com>
2745
2746 * regcache.h: Include common-regcache.h.
2747 (regcache_read_pc): Don't declare.
2748 * regcache.c (get_thread_regcache_for_ptid): New function.
2749
bd9269f7
GB
27502014-09-11 Tom Tromey <tromey@redhat.com>
2751 Gary Benson <gbenson@redhat.com>
2752
2753 * symbol.c: New file.
2754 * Makefile.in (SFILES): Add symbol.c.
2755 (OBS): Add symbol.o.
2756
f8c1d06b
GB
27572014-09-11 Gary Benson <gbenson@redhat.com>
2758
2759 * target.c (target_stop_ptid, target_continue_ptid): New
2760 functions.
2761
721ec300
GB
27622014-09-11 Tom Tromey <tromey@redhat.com>
2763 Gary Benson <gbenson@redhat.com>
2764
2765 * target.h: Include target/target.h.
2766 * target.c (target_read_memory, target_read_uint32)
2767 (target_write_memory): New functions.
2768
c5e92cca
GB
27692014-09-11 Gary Benson <gbenson@redhat.com>
2770
2771 * server.h (debug_hw_points): Don't declare.
2772 * server.c (debug_hw_points): Don't define. Replace all uses
2773 with show_debug_regs.
2774 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
2775 all uses with show_debug_regs.
2776
2e4bb98a
EBM
27772014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
2778
2779 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
2780 endianness into account.
2781 (ppc_supply_ptrace_register): Likewise.
2782
ac740bc7
JH
27832014-09-03 James Hogan <james.hogan@imgtec.com>
2784
2785 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
2786 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
2787
97ea6506
GB
27882014-09-03 Gary Benson <gbenson@redhat.com>
2789
2790 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
2791 ALL_DEBUG_ADDRESS_REGISTERS.
2792
df7e5265
GB
27932014-09-02 Gary Benson <gbenson@redhat.com>
2794
2795 * i386-low.h: Renamed as...
2796 * x86-low.h: New file. All type, function and variable name
2797 prefixes changed from "i386_" to "x86_". All references updated.
2798 * i386-low.c: Renamed as...
2799 * x86-low.c: New file. All type, function and variable name
2800 prefixes changed from "i386_" to "x86_". All references updated.
2801
ed859da7
GB
28022014-09-02 Gary Benson <gbenson@redhat.com>
2803
2804 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
2805 (x86_linux_new_thread): Likewise.
2806
860789c7
GB
28072014-08-29 Gary Benson <gbenson@redhat.com>
2808
2809 * server.h (setjmp.h): Do not include.
2810 (toplevel): Do not declare.
2811 (common-exceptions.h): Include.
2812 (cleanups.h): Likewise.
2813 * server.c (toplevel): Do not define.
2814 (exit_code): New static global.
2815 (detach_or_kill_for_exit_cleanup): New function.
2816 (main): New function. Original main renamed to...
2817 (captured_main): New function.
2818 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
2819
ff55e1b5
GB
28202014-08-29 Gary Benson <gbenson@redhat.com>
2821
2822 * Makefile.in (SFILES): Add common/common-exceptions.c.
2823 (OBS): Add common-exceptions.o.
2824 (common-exceptions.o): New rule.
2825 * utils.c (prepare_to_throw_exception): New function.
2826
e9bcb658
GB
28272014-08-29 Gary Benson <gbenson@redhat.com>
2828
2829 * config.in: Regenerate.
2830 * configure: Likewise.
2831
e3180625
GB
28322014-08-29 Gary Benson <gbenson@redhat.com>
2833
2834 * Makefile.in (SFILES): Add common/cleanups.c.
2835 (OBS): cleanups.o.
2836 (cleanups.o): New rule.
2837
e3d6ba5d
GB
28382014-08-29 Gary Benson <gbenson@redhat.com>
2839
2840 * utils.c (internal_vwarning): New function.
2841
7096e886
GB
28422014-08-28 Gary Benson <gbenson@redhat.com>
2843
2844 * utils.h (fatal): Remove declaration.
2845 * utils.c (fatal): Remove function.
2846
14ce3192
GB
28472014-08-28 Gary Benson <gbenson@redhat.com>
2848
2849 * tracepoint.c (gdb_agent_init): Replace fatal with
2850 perror_with_name.
2851 (initialize_tracepoint): Likewise.
2852
50278d59
GB
28532014-08-28 Gary Benson <gbenson@redhat.com>
2854
2855 * remote-utils.c (remote_prepare): Replace fatal with error.
2856
aa96c426
GB
28572014-08-28 Gary Benson <gbenson@redhat.com>
2858
2859 * linux-low.c (linux_async): Replace fatal with warning.
2860 Tidy up and return.
2861 (linux_start_non_stop): Return -1 if linux_async failed.
2862
f7160e97
GB
28632014-08-28 Gary Benson <gbenson@redhat.com>
2864
2865 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
2866 gdb_assert.
2867 (i386_dr_low_get_addr): Remove vague comment.
2868 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
2869 gdb_assert.
2870
38e08fca
GB
28712014-08-28 Gary Benson <gbenson@redhat.com>
2872
2873 * inferiors.c (get_thread_process): Replace check with gdb_assert.
2874 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
2875 internal_error.
2876 (linux_resume_one_lwp): Likewise.
2877 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
2878 gdb_assert.
2879 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
2880 with internal_error.
2881 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
2882 (init_register_cache): Replace fatal with gdb_assert_not_reached.
2883 (find_register_by_name): Replace fatal with internal_error.
2884 (find_regno): Likewise.
2885 * tdesc.c (init_target_desc): Replace check with gdb_assert.
2886 * thread-db.c (thread_db_create_event): Likewise.
2887 (thread_db_load_search): Likewise.
2888 (try_thread_db_load_1): Likewise.
2889 * tracepoint.c (get_jump_space_head): Replace fatal with
2890 internal_error.
2891 (claim_trampoline_space): Likewise.
2892 (have_fast_tracepoint_trampoline_buffer): Likewise.
2893 (cmd_qtstart): Likewise.
2894 (stop_tracing): Likewise.
2895 (fast_tracepoint_collecting): Likewise.
2896 (target_malloc): Likewise.
2897 (download_tracepoint): Likewise.
2898 (download_trace_state_variables): Replace check with gdb_assert.
2899 (upload_fast_traceframes): Replace fatal with internal_error.
2900
34abf635
GB
29012014-08-19 Tom Tromey <tromey@redhat.com>
2902 Gary Benson <gbenson@redhat.com>
2903
2904 * Makefile.in (SFILES): Add common/common-debug.c.
2905 (OBS): Add common-debug.o.
2906 (common-debug.o): New rule.
2907 * debug.h (debug_printf): Don't declare.
2908 * debug.c (debug_printf): Renamed and rewritten as...
2909 (debug_vprintf): New function.
2910
f6e94d78
GB
29112014-08-19 Gary Benson <gbenson@redhat.com>
2912
2913 * utils.h: Do not include print-utils.h.
2914
9239eeab
GB
29152014-08-19 Tom Tromey <tromey@redhat.com>
2916 Gary Benson <gbenson@redhat.com>
2917
2918 * server.h: Add static assertion.
2919 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
2920
ef87c8bb
GB
29212014-08-19 Tom Tromey <tromey@redhat.com>
2922 Gary Benson <gbenson@redhat.com>
2923
2924 * Makefile.in (SFILES): Add common/errors.c.
2925 (OBS): Add errors.o.
2926 (IPA_OBS): Add errors-ipa.o.
2927 (errors.o): New rule.
2928 (errors-ipa.o): Likewise.
2929 * utils.h (perror_with_name, error, warning): Don't declare.
2930 * utils.c (warning): Renamed and rewritten as...
2931 (vwarning): New function.
2932 (error): Renamed and rewritten as...
2933 (verror): New function.
2934 (internal_error): Renamed and rewritten as...
2935 (internal_verror): New function.
2936
bb974a24
GB
29372014-08-07 Gary Benson <gbenson@redhat.com>
2938
2939 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
2940 * configure: Regenerate.
2941 * config.in: Likewise.
2942 * server.h: Do not include errno.h.
2943 * event-loop.c: Likewise.
2944 * hostio-errno.c: Likewise.
2945 * linux-low.c: Likewise.
2946 * remote-utils.c: Likewise.
2947 * spu-low.c: Likewise.
2948 * utils.c: Likewise.
2949 * gdbreplay.c: Unconditionally include errno.h.
2950
6d3d12eb
GB
29512014-08-07 Gary Benson <gbenson@redhat.com>
2952
2953 * server.h: Do not include string.h.
2954 * event-loop.c: Likewise.
2955 * linux-low.c: Likewise.
2956 * regcache.c: Likewise.
2957 * remote-utils.c: Likewise.
2958 * spu-low.c: Likewise.
2959 * utils.c: Likewise.
2960
dccbb609
GB
29612014-08-07 Gary Benson <gbenson@redhat.com>
2962
2963 * server.h: Do not include gdb_assert.h.
2964
e76df0d0
GB
29652014-08-07 Gary Benson <gbenson@redhat.com>
2966
2967 * server.h: Do not include common-utils.h.
2968
4cb9c816
GB
29692014-08-07 Gary Benson <gbenson@redhat.com>
2970
2971 * server.h: Do not include ptid.h.
2972 * notif.h: Likewise.
2973
3995eeee
GB
29742014-08-07 Gary Benson <gbenson@redhat.com>
2975
2976 * server.h: Do not include gdb_locale.h.
2977
cb9f1a9b
GB
29782014-08-07 Gary Benson <gbenson@redhat.com>
2979
2980 * server.h: Do not include gdb/signals.h.
2981 * win32-low.c: Likewise.
2982
a5fceff8
GB
29832014-08-07 Gary Benson <gbenson@redhat.com>
2984
2985 * server.h: Do not include pathmax.h.
2986
b9391142
GB
29872014-08-07 Gary Benson <gbenson@redhat.com>
2988
2989 * server.h: Do not include libiberty.h.
2990 * linux-bfin-low.c: Likewise.
2991
0e443c87
GB
29922014-08-07 Gary Benson <gbenson@redhat.com>
2993
2994 * server.h: Do not include ansidecl.h.
2995
8ebb3f56
GB
29962014-08-07 Gary Benson <gbenson@redhat.com>
2997
2998 * linux-x86-low.c: Do not include stddef.h.
2999 * lynx-ppc-low.c: Likewise.
3000 * tracepoint.c: Likewise.
3001
8980bdf6
GB
30022014-08-07 Gary Benson <gbenson@redhat.com>
3003
3004 * server.h: Do not include stdarg.h.
3005 * nto-low.c: Likewise.
3006
d7096f71
GB
30072014-08-07 Gary Benson <gbenson@redhat.com>
3008
3009 * server.h: Do not include stdlib.h.
3010 * inferiors.c: Likewise.
3011 * linux-low.c: Likewise.
3012 * regcache.c: Likewise.
3013 * spu-low.c: Likewise.
3014 * tracepoint.c: Likewise.
3015 * utils.c: Likewise.
3016
d02f550d
GB
30172014-08-07 Gary Benson <gbenson@redhat.com>
3018
3019 * server.h: Do not include stdio.h.
3020 * linux-low.c: Likewise.
3021 * remote-utils.c: Likewise.
3022 * spu-low.c: Likewise.
3023 * utils.c: Likewise.
3024 * wincecompat.c: Likewise.
3025
87f6c4e3
GB
30262014-08-06 Gary Benson <gbenson@redhat.com>
3027
3028 * regcache.c (init_register_cache): Move conditionals inside if.
3029
7089dca4
GB
30302014-08-06 Gary Benson <gbenson@redhat.com>
3031
3032 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
3033
462f517e
GB
30342014-07-31 Gary Benson <gbenson@redhat.com>
3035
3036 * ax.h: Do not include server.h.
3037 * gdbthread.h: Likewise.
3038 * lynx-low.h: Likewise.
3039 * notif.h: Likewise.
3040
976411d6
GB
30412014-07-30 Gary Benson <gbenson@redhat.com>
3042
3043 * server.h: Include common-defs.h.
3044 Do not include config.h or build-gnulib-gdbserver/config.h.
3045
d41f6d8e
GB
30462014-07-30 Gary Benson <gbenson@redhat.com>
3047
3048 * hostio-errno.c: Move server.h to top of includes list.
3049 * inferiors.c: Likewise.
3050 * linux-x86-low.c: Likewise.
3051 * notif.c: Include server.h.
3052
314c6a35
TT
30532014-07-24 Tom Tromey <tromey@redhat.com>
3054 Gary Benson <gbenson@redhat.com>
3055
3056 * server.h (CORE_ADDR): Now unsigned.
3057
69ff6be5
PA
30582014-07-16 Pedro Alves <palves@redhat.com>
3059
3060 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
3061
ce9e3fe7
PA
30622014-07-15 Pedro Alves <palves@redhat.com>
3063
3064 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
3065 copy.
3066
e76126e8
PA
30672014-07-11 Pedro Alves <palves@redhat.com>
3068
3069 * linux-low.c (kill_wait_lwp): New function, based on
3070 kill_one_lwp_callback, but use my_waitpid directly.
3071 (kill_one_lwp_callback, linux_kill): Use it.
3072
8e9db26e
PA
30732014-06-23 Pedro Alves <palves@redhat.com>
3074
3075 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
3076 before setting DR0..DR3.
3077
698b3e08
GB
30782014-06-20 Gary Benson <gbenson@redhat.com>
3079
3080 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
3081 * configure: Regenerated.
3082 * config.in: Likewise.
3083
125f8a3d
GB
30842014-06-20 Gary Benson <gbenson@redhat.com>
3085
3086 * Makefile.in (SFILES): Update locations for files moved
3087 from common to nat.
3088 (object file files): Reordered.
3089
42995dbd
GB
30902014-06-20 Gary Benson <gbenson@redhat.com>
3091
3092 * i386-low.h (i386_dr_low_can_set_addr): Removed.
3093 (i386_dr_low_set_addr): Likewise.
3094 (i386_dr_low_get_addr): Likewise.
3095 (i386_dr_low_can_set_control): Likewise.
3096 (i386_dr_low_set_control): Likewise.
3097 (i386_dr_low_get_control): Likewise.
3098 (i386_dr_low_get_status): Likewise.
3099 (i386_get_debug_register_length): Likewise.
3100 * linux-x86-low.c (i386_dr_low_set_addr):
3101 Changed signature. Made static.
3102 (i386_dr_low_get_addr): Likewise.
3103 (i386_dr_low_set_control): Likewise.
3104 (i386_dr_low_get_control): Likewise.
3105 (i386_dr_low_get_status): Likewise.
3106 (i386_dr_low): New global variable.
3107 * win32-i386-low.c (i386_dr_low_set_addr):
3108 Changed signature. Made static.
3109 (i386_dr_low_get_addr): Likewise.
3110 (i386_dr_low_set_control): Likewise.
3111 (i386_dr_low_get_control): Likewise.
3112 (i386_dr_low_get_status): Likewise.
3113 (i386_dr_low): New global variable.
3114
e1d2394b
MS
31152014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
3116
3117 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
3118 * Makefile.in (AR, AR_FLAGS): Define.
3119 * configure: Regenerate.
3120
3a8ee006
GB
31212014-06-19 Gary Benson <gbenson@redhat.com>
3122
3123 * Makefile.in (i386-dregs.o): New rule.
3124 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
3125 * i386-low.c (target.h): Remove include.
3126 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
3127 (DR_CONTROL_SHIFT): Likewise.
3128 (DR_CONTROL_SIZE): Likewise.
3129 (DR_RW_EXECUTE): Likewise.
3130 (DR_RW_WRITE): Likewise.
3131 (DR_RW_READ): Likewise.
3132 (DR_RW_IORW): Likewise.
3133 (DR_LEN_1): Likewise.
3134 (DR_LEN_2): Likewise.
3135 (DR_LEN_4): Likewise.
3136 (DR_LEN_8): Likewise.
3137 (DR_LOCAL_ENABLE_SHIFT): Likewise.
3138 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
3139 (DR_ENABLE_SIZE): Likewise.
3140 (DR_LOCAL_SLOWDOWN): Likewise.
3141 (DR_GLOBAL_SLOWDOWN): Likewise.
3142 (DR_CONTROL_RESERVED): Likewise.
3143 (I386_DR_CONTROL_MASK): Likewise.
3144 (I386_DR_VACANT): Likewise.
3145 (I386_DR_LOCAL_ENABLE): Likewise.
3146 (I386_DR_GLOBAL_ENABLE): Likewise.
3147 (I386_DR_DISABLE): Likewise.
3148 (I386_DR_SET_RW_LEN): Likewise.
3149 (I386_DR_GET_RW_LEN): Likewise.
3150 (I386_DR_WATCH_HIT): Likewise.
3151 (i386_wp_op_t): Likewise.
3152 (i386_show_dr): Likewise.
3153 (i386_length_and_rw_bits): Likewise.
3154 (i386_insert_aligned_watchpoint): Likewise.
3155 (i386_remove_aligned_watchpoint): Likewise.
3156 (i386_handle_nonaligned_watchpoint): Likewise.
3157 i386_update_inferior_debug_regs(): Likewise.
3158 (i386_dr_insert_watchpoint): Likewise.
3159 (i386_dr_remove_watchpoint): Likewise.
3160 (i386_dr_region_ok_for_watchpoint): Likewise.
3161 (i386_dr_stopped_data_address): Likewise.
3162 (i386_dr_stopped_by_watchpoint): Likewise.
3163
8f26655c
GB
31642014-06-19 Gary Benson <gbenson@redhat.com>
3165
3166 * i386-low.c (i386_dr_show): Renamed to
3167 i386_show_dr and made static. All uses updated.
3168 (i386_dr_length_and_rw_bits): Renamed to
3169 i386_length_and_rw_bits and made static.
3170 All uses updated.
3171 (i386_dr_insert_aligned_watchpoint): Renamed to
3172 i386_insert_aligned_watchpoint and made static.
3173 All uses updated.
3174 (i386_dr_remove_aligned_watchpoint): Renamed to
3175 i386_remove_aligned_watchpoint and made static.
3176 All uses updated.
3177 (i386_dr_update_inferior_debug_regs): Renamed to
3178 i386_update_inferior_debug_regs and made static.
3179 All uses updated.
3180
b9228891
GB
31812014-06-18 Gary Benson <gbenson@redhat.com>
3182
5171def3
GB
3183 * i386-low.h (i386_dr_low_can_set_addr): New macro.
3184 (i386_dr_low_can_set_control): Likewise.
3185 (i386_get_debug_register_length): Likewise.
3186 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
3187 (i386_dr_low_can_set_control): Likewise.
3188 (i386_get_debug_register_length): Likewise.
3189
31902014-06-17 Gary Benson <gbenson@redhat.com>
3191
b9228891
GB
3192 * i386-low.h (i386-dregs.h): New include.
3193 (DR_FIRSTADDR): Now in i386-dregs.h.
3194 (DR_LASTADDR): Likewise.
3195 (DR_NADDR): Likewise.
3196 (DR_STATUS): Likewise.
3197 (DR_CONTROL): Likewise.
3198 (i386_debug_reg_state): Likewise.
3199 (i386_dr_insert_watchpoint): Likewise.
3200 (i386_dr_remove_watchpoint): Likewise.
3201 (i386_dr_region_ok_for_watchpoint): Likewise.
3202 (i386_dr_stopped_data_address): Likewise.
3203 (i386_dr_stopped_by_watchpoint): Likewise.
3204 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
3205
4be83cc2
GB
32062014-06-18 Gary Benson <gbenson@redhat.com>
3207
3208 * i386-low.h (i386_low_insert_watchpoint): Renamed to
3209 i386_dr_insert_watchpoint.
3210 (i386_low_remove_watchpoint): Renamed to
3211 i386_dr_remove_watchpoint.
3212 (i386_low_region_ok_for_watchpoint): Renamed to
3213 i386_dr_region_ok_for_watchpoint.
3214 (i386_low_stopped_data_address): Renamed to
3215 i386_dr_stopped_data_address.
3216 (i386_low_stopped_by_watchpoint): Renamed to
3217 i386_dr_stopped_by_watchpoint.
3218 * i386-low.c (i386_show_dr): Renamed to
3219 i386_dr_show and made nonstatic. All uses updated.
3220 (i386_length_and_rw_bits): Renamed to
3221 i386_dr_length_and_rw_bits and made nonstatic.
3222 All uses updated.
3223 (i386_insert_aligned_watchpoint): Renamed to
3224 i386_dr_insert_aligned_watchpoint and made nonstatic.
3225 All uses updated.
3226 (i386_remove_aligned_watchpoint): Renamed to
3227 i386_dr_remove_aligned_watchpoint and made nonstatic.
3228 All uses updated.
3229 (i386_update_inferior_debug_regs): Renamed to
3230 i386_dr_update_inferior_debug_regs and made nonstatic.
3231 All uses updated.
3232 (i386_low_insert_watchpoint): Renamed to
3233 i386_dr_insert_watchpoint. All uses updated.
3234 (i386_low_remove_watchpoint): Renamed to
3235 i386_dr_remove_watchpoint. All uses updated.
3236 (i386_low_region_ok_for_watchpoint): Renamed to
3237 i386_dr_region_ok_for_watchpoint. All uses updated.
3238 (i386_low_stopped_data_address): Renamed to
3239 i386_dr_stopped_data_address. All uses updated.
3240 (i386_low_stopped_by_watchpoint): Renamed to
3241 i386_dr_stopped_by_watchpoint. All uses updated.
3242
131aa0d4
GB
32432014-06-18 Gary Benson <gbenson@redhat.com>
3244
3245 * i386-low.c (i386_dr_low_can_set_addr): New macro.
3246 (i386_dr_low_can_set_control): Likewise.
3247 (i386_insert_aligned_watchpoint): New check.
3248
d9305f7f
GB
32492014-06-18 Gary Benson <gbenson@redhat.com>
3250
3251 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
3252 Renamed to state.
3253
e927c9fc
GB
32542014-06-18 Gary Benson <gbenson@redhat.com>
3255
3256 * i386-low.c (i386_length_and_rw_bits): Use internal_error
3257 instead of fatal and error.
3258 (i386_handle_nonaligned_watchpoint): Likewise.
3259
1b6d4134
GB
32602014-06-18 Gary Benson <gbenson@redhat.com>
3261
3262 * i386-low.c (i386_get_debug_register_length): New macro.
3263 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
3264 (i386_show_dr): Use debug_printf instead of fprintf. Use
3265 phex to format values.
3266
6e62758f
GB
32672014-06-18 Gary Benson <gbenson@redhat.com>
3268
3269 * i386-low.h: Comment changes.
3270 * i386-low.c: Likewise.
3271
fc6e2f03
GB
32722014-06-18 Gary Benson <gbenson@redhat.com>
3273
3274 * i386-low.c: Whitespace changes.
3275
f9d1eeed
TT
32762014-06-12 Tom Tromey <tromey@redhat.com>
3277
3278 * utils.c (freeargv): Remove.
3279
0b04e523
TT
32802014-06-12 Tom Tromey <tromey@redhat.com>
3281
3282 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
3283 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
3284 (parse_debug_format_options): Likewise.
3285 (gdbserver_usage): Likewise.
3286 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
3287 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
3288 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
3289 against libiberty.
3290 ($(LIBGNU)): Depend on libiberty.
3291 (all-lib): Recurse into all subdirs.
3292 (install-only): Invoke "install" target in subdirs.
3293 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
3294 targets.
3295 * configure: Rebuild.
3296 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
3297 for vasprintf, vsnprintf, or gettimeofday.
3298 * configure.srv: Don't add safe-ctype.o or lbasename.o to
3299 srv_tgtobj.
3300
270c9937
JB
33012014-06-05 Joel Brobecker <brobecker@adacore.com>
3302
3303 * development.sh: Delete.
3304 * Makefile.in (config.status): Adjust dependency on development.sh.
3305 * configure.ac: Adjust development.sh source call.
3306 * configure: Regenerate.
3307
0a261ed8
PA
33082014-06-02 Pedro Alves <palves@redhat.com>
3309
3310 * ax.c (gdb_free_agent_expr): New function.
3311 * ax.h (gdb_free_agent_expr): New declaration.
3312 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
3313 list.
3314 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
3315 static.
3316 (clear_breakpoint_conditions_and_commands): New function.
3317 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
3318 (clear_breakpoint_conditions_and_commands): New declaration.
3319
e9dae05e
RR
33202014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
3321
3322 * linux-aarch64-low.c (asm/ptrace.h): Include.
3323
5876f503
JK
33242014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
3325
3326 Fix TLS access for -static -pthread.
3327 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
3328 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
3329 (thread_db_load_search, try_thread_db_load_1): Initialize it.
3330
802e8e6d
PA
33312014-05-20 Pedro Alves <palves@redhat.com>
3332
3333 * linux-aarch64-low.c (aarch64_insert_point)
3334 (aarch64_remove_point): No longer check whether the type is
3335 supported here. Adjust to new interface.
3336 (the_low_target): Install aarch64_supports_z_point_type as
3337 supports_z_point_type method.
3338 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
3339 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
3340 instead of a Z packet char. Adjust.
3341 (arm_supports_z_point_type): New function.
3342 (arm_insert_point, arm_remove_point): Adjust to new interface.
3343 (the_low_target): Install arm_supports_z_point_type.
3344 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
3345 (cris_insert_point, cris_remove_point): Adjust to new interface.
3346 Don't check whether the type is supported here.
3347 (the_low_target): Install cris_supports_z_point_type.
3348 * linux-low.c (linux_supports_z_point_type): New function.
3349 (linux_insert_point, linux_remove_point): Adjust to new interface.
3350 * linux-low.h (struct linux_target_ops) <insert_point,
3351 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
3352 raw_breakpoint pointer parameter.
3353 <supports_z_point_type>: New method.
3354 * linux-mips-low.c (mips_supports_z_point_type): New function.
3355 (mips_insert_point, mips_remove_point): Adjust to new interface.
3356 Use mips_supports_z_point_type.
3357 (the_low_target): Install mips_supports_z_point_type.
3358 * linux-ppc-low.c (the_low_target): Install NULL as
3359 supports_z_point_type method.
3360 * linux-s390-low.c (the_low_target): Install NULL as
3361 supports_z_point_type method.
3362 * linux-sparc-low.c (the_low_target): Install NULL as
3363 supports_z_point_type method.
3364 * linux-x86-low.c (x86_supports_z_point_type): New function.
3365 (x86_insert_point): Adjust to new insert_point interface. Use
3366 insert_memory_breakpoint. Adjust to new
3367 i386_low_insert_watchpoint interface.
3368 (x86_remove_point): Adjust to remove_point interface. Use
3369 remove_memory_breakpoint. Adjust to new
3370 i386_low_remove_watchpoint interface.
3371 (the_low_target): Install x86_supports_z_point_type.
3372 * lynx-low.c (lynx_target_ops): Install NULL as
3373 supports_z_point_type callback.
3374 * nto-low.c (nto_supports_z_point_type): New.
3375 (nto_insert_point, nto_remove_point): Adjust to new interface.
3376 (nto_target_ops): Install nto_supports_z_point_type.
3377 * mem-break.c: Adjust intro comment.
3378 (struct raw_breakpoint) <raw_type, size>: New fields.
3379 <inserted>: Update comment.
3380 <shlib_disabled>: Delete field.
3381 (enum bkpt_type) <gdb_breakpoint>: Delete value.
3382 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
3383 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
3384 (raw_bkpt_type_to_target_hw_bp_type): New function.
3385 (find_enabled_raw_code_breakpoint_at): New function.
3386 (find_raw_breakpoint_at): New type and size parameters. Use them.
3387 (insert_memory_breakpoint): New function, based off
3388 set_raw_breakpoint_at.
3389 (remove_memory_breakpoint): New function.
3390 (set_raw_breakpoint_at): Reimplement.
3391 (set_breakpoint): New, based on set_breakpoint_at.
3392 (set_breakpoint_at): Reimplement.
3393 (delete_raw_breakpoint): Go through the_target->remove_point
3394 instead of assuming memory breakpoints.
3395 (find_gdb_breakpoint_at): Delete.
3396 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
3397 (find_gdb_breakpoint): New function.
3398 (set_gdb_breakpoint_at): Delete.
3399 (z_type_supported): New function.
3400 (set_gdb_breakpoint_1): New function, loosely based off
3401 set_gdb_breakpoint_at.
3402 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
3403 (delete_gdb_breakpoint_at): Delete.
3404 (delete_gdb_breakpoint_1): New function, loosely based off
3405 delete_gdb_breakpoint_at.
3406 (delete_gdb_breakpoint): New function.
3407 (clear_gdb_breakpoint_conditions): Rename to ...
3408 (clear_breakpoint_conditions): ... this. Don't handle a NULL
3409 breakpoint.
3410 (add_condition_to_breakpoint): Make static.
3411 (add_breakpoint_condition): Take a struct breakpoint pointer
3412 instead of an address. Adjust.
3413 (gdb_condition_true_at_breakpoint): Rename to ...
3414 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
3415 z_type parameter.
3416 (gdb_condition_true_at_breakpoint): Reimplement.
3417 (add_breakpoint_commands): Take a struct breakpoint pointer
3418 instead of an address. Adjust.
3419 (gdb_no_commands_at_breakpoint): Rename to ...
3420 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
3421 parameter. Return true if no breakpoint was found. Change debug
3422 output.
3423 (gdb_no_commands_at_breakpoint): Reimplement.
3424 (run_breakpoint_commands): Rename to ...
3425 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
3426 and change return type to boolean.
3427 (run_breakpoint_commands): New function.
3428 (gdb_breakpoint_here): Also check for Z1 breakpoints.
3429 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
3430 breakpoint. Go through the_target->remove_point instead of
3431 assuming memory breakpoint.
3432 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
3433 software and hardware breakpoints.
3434 (reinsert_raw_breakpoint): Go through the_target->insert_point
3435 instead of assuming memory breakpoint.
3436 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
3437 software and hardware breakpoints.
3438 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
3439 Check both software and hardware breakpoints.
3440 (validate_inserted_breakpoint): Assert the breakpoint is a
3441 software breakpoint. Set the inserted flag to -1 instead of
3442 setting shlib_disabled.
3443 (delete_disabled_breakpoints): Adjust.
3444 (validate_breakpoints): Only validate software breakpoints.
3445 Adjust to inserted flag change.
3446 (check_mem_read, check_mem_write): Skip breakpoint types other
3447 than software breakpoints. Adjust to inserted flag change.
3448 * mem-break.h (enum raw_bkpt_type): New enum.
3449 (raw_breakpoint, struct process_info): Forward declare.
3450 (Z_packet_to_target_hw_bp_type): Delete declaration.
3451 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
3452 (set_gdb_breakpoint, delete_gdb_breakpoint)
3453 (clear_breakpoint_conditions): New declarations.
3454 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
3455 (breakpoint_inserted_here): Update comment.
3456 (add_breakpoint_condition, add_breakpoint_commands): Replace
3457 address parameter with a breakpoint pointer parameter.
3458 (gdb_breakpoint_here): Update comment.
3459 (delete_gdb_breakpoint_at): Delete.
3460 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
3461 * server.c (process_point_options): Take a struct breakpoint
3462 pointer instead of an address. Adjust.
3463 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
3464 delete_gdb_breakpoint.
3465 * spu-low.c (spu_target_ops): Install NULL as
3466 supports_z_point_type method.
3467 * target.h: Include mem-break.h.
3468 (struct target_ops) <prepare_to_access_memory>: Update comment.
3469 <supports_z_point_type>: New field.
3470 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
3471 instead of a char. Also take a raw breakpoint pointer.
3472 * win32-arm-low.c (the_low_target): Install NULL as
3473 supports_z_point_type.
3474 * win32-i386-low.c (i386_supports_z_point_type): New function.
3475 (i386_insert_point, i386_remove_point): Adjust to new interface.
3476 (the_low_target): Install i386_supports_z_point_type.
3477 * win32-low.c (win32_supports_z_point_type): New function.
3478 (win32_insert_point, win32_remove_point): Adjust to new interface.
3479 (win32_target_ops): Install win32_supports_z_point_type.
3480 * win32-low.h (struct win32_target_ops):
3481 <supports_z_point_type>: New method.
3482 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
3483 instead of a char. Also take a raw breakpoint pointer.
3484
932539e3
PA
34852014-05-20 Pedro Alves <palves@redhat.com>
3486
3487 * mem-break.h: Include break-common.h.
3488 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
3489 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
3490 (Z_packet_to_target_hw_bp_type): New declaration.
3491 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
3492 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
3493 (Z_PACKET_ACCESS_WP): Delete macros.
3494 (Z_packet_to_hw_type): Delete function.
3495 * i386-low.h: Don't include break-common.h here.
3496 (Z_packet_to_hw_type): Delete declaration.
3497 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
3498 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
3499 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
3500 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
3501 * linux-aarch64-low.c: Don't include break-common.h here.
3502 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
3503 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
3504 (Z_packet_to_target_hw_bp_type): Delete function.
3505 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
3506 function.
3507 (mips_insert_point, mips_remove_point): Use
3508 Z_packet_to_target_hw_bp_type.
3509
4ff0d3d8
PA
35102014-05-20 Pedro Alves <palves@redhat.com>
3511
3512 * linux-aarch64-low.c: Include break-common.h.
3513 (enum target_point_type): Delete.
3514 (Z_packet_to_point_type): Rename to ...
3515 (Z_packet_to_target_hw_bp_type): ... this, and return a
3516 target_hw_bp_type instead.
3517 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
3518 instead of an enum target_point_type.
3519 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
3520 breakpoint type.
3521 (aarch64_dr_state_insert_one_point)
3522 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
3523 (aarch64_handle_aligned_watchpoint)
3524 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
3525 Take an enum target_hw_bp_type instead of an enum
3526 target_point_type.
3527 (aarch64_supports_z_point_type): New function.
3528 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
3529 use Z_packet_to_target_hw_bp_type.
3530
786dc519
JB
35312014-05-20 Joel Brobecker <brobecker@adacore.com>
3532
3533 * configure.ac: Only use -Werror by default when DEVELOPMENT
3534 is true.
3535 * configure: Regenerate.
3536
9e0aa64f
JK
35372014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
3538
3539 Fix gdbserver qGetTLSAddr for x86_64 -m32.
3540 * linux-x86-low.c (X86_64_USER_REGS): New.
3541 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
3542
2b577b92
YQ
35432014-04-28 Yao Qi <yao@codesourcery.com>
3544
3545 * Makefile.in (i386-avx512.c): Fix the typo of generated file
3546 name.
3547
94611da2
PA
35482014-04-25 Pedro Alves <palves@redhat.com>
3549
3550 PR server/16255
3551 * linux-low.c (linux_attach_fail_reason_string): New function.
3552 (linux_attach_lwp): Delete.
3553 (linux_attach_lwp_1): Rename to ...
3554 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
3555 argument. Remove "initial" parameter. Return int instead of
3556 void. Don't error or warn here.
3557 (linux_attach): Adjust to call linux_attach_lwp. Call error on
3558 failure to attach to the tgid. Call warning when failing to
3559 attach to an lwp.
3560 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
3561 argument. Remove "initial" parameter. Return int instead of
3562 void. Don't error or warn here.
3563 (linux_attach_fail_reason_string): New declaration.
3564 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
3565 interface change. Use linux_attach_fail_reason_string.
3566
01f9f808
MS
35672014-04-24 Michael Sturm <michael.sturm@mintel.com>
3568 Walfred Tedeschi <walfred.tedeschi@intel.com>
3569
3570 * Makefile.in: Added rules to handle new files
3571 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
3572 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
3573 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
3574 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
3575 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
3576 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
3577 x32-avx512-linux.o.
3578 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
3579 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
3580 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
3581 i386/x32-avx512.xml.
3582 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
3583 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
3584 i386/x32-avx512-linux.xml.
3585 * i387-fp.c (num_avx512_k_registers): New constant for number
3586 of K registers.
3587 (num_avx512_zmmh_low_registers): New constant for number of
3588 lower ZMM registers (0-15).
3589 (num_avx512_zmmh_high_registers): New constant for number of
3590 higher ZMM registers (16-31).
3591 (num_avx512_ymmh_registers): New contant for number of higher
3592 YMM registers (ymm16-31 added by avx521 on x86_64).
3593 (num_avx512_xmm_registers): New constant for number of higher
3594 XMM registers (xmm16-31 added by AVX512 on x86_64).
3595 (struct i387_xsave): Add space for AVX512 registers.
3596 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
3597 Add code to handle AVX512 registers.
3598 (i387_xsave_to_cache): Add code to handle AVX512 registers.
3599 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
3600 prototypei from generated file.
3601 (tdesc_amd64_avx512_linux): Likewise.
3602 (init_registers_x32_avx512_linux): Likewise.
3603 (tdesc_x32_avx512_linux): Likewise.
3604 (init_registers_i386_avx512_linux): Likewise.
3605 (tdesc_i386_avx512_linux): Likewise.
3606 (x86_64_regmap): Add AVX512 registers.
3607 (x86_linux_read_description): Add code to handle AVX512 XSTATE
3608 mask.
3609 (initialize_low_arch): Add code to initialize AVX512 registers.
3610
51aa91f9
PA
36112014-04-23 Pedro Alves <palves@redhat.com>
3612
3613 * mem-break.c (find_gdb_breakpoint_at): Make static.
3614 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
3615
a4165e94
PA
36162014-04-23 Pedro Alves <palves@redhat.com>
3617
3618 * i386-low.c: Don't include break-common.h here.
3619 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
3620 prototype to take target_hw_bp_type as argument instead of a Z
3621 packet char.
3622 * i386-low.h: Include break-common.h here.
3623 (Z_packet_to_hw_type): Declare.
3624 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
3625 prototypes.
3626 * linux-x86-low.c (x86_insert_point): Convert the packet number to
3627 a target_hw_bp_type before calling i386_low_insert_watchpoint.
3628 (x86_remove_point): Convert the packet number to a
3629 target_hw_bp_type before calling i386_low_remove_watchpoint.
3630 * win32-i386-low.c (i386_insert_point): Convert the packet number
3631 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
3632 (i386_remove_point): Convert the packet number to a
3633 target_hw_bp_type before calling i386_low_remove_watchpoint.
3634
b8acf843
PA
36352014-04-23 Pedro Alves <palves@redhat.com>
3636
3637 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
3638
d708bcd1
PA
36392014-04-10 Pedro Alves <palves@redhat.com>
3640
3641 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
3642 Check if the condition or command is NULL before checking if the
3643 breakpoint is known. On success, return true.
3644 * mem-break.h (add_breakpoint_condition): Document return.
3645 (add_breakpoint_commands): Add describing comment.
3646 * server.c (skip_to_semicolon): New function.
3647 (process_point_options): Use it.
3648
2eec7d5b
PA
36492014-04-09 Pedro Alves <palves@redhat.com>
3650
3651 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
3652 to lwpid_of.
3653
fa96cb38
PA
36542014-02-27 Pedro Alves <palves@redhat.com>
3655
3656 PR 12702
3657 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
3658 macros.
3659 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
3660 output.
3661 (last_thread_of_process_p): Take a PID argument instead of a
3662 thread pointer.
3663 (linux_wait_for_lwp): Delete.
3664 (num_lwps, check_zombie_leaders, not_stopped_callback): New
3665 functions.
3666 (linux_low_filter_event): New function, party factored out from
3667 linux_wait_for_event.
3668 (linux_wait_for_event): Rename to ...
3669 (linux_wait_for_event_filtered): ... this. Add new filter ptid
3670 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
3671 sigsuspend. Check for zombie leaders.
3672 (linux_wait_for_event): Reimplement as wrapper around
3673 linux_wait_for_event_filtered.
3674 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
3675 a normal or signal exit is seen, it's the whole process exiting.
3676 (wait_for_sigstop): No longer a for_each_inferior callback.
3677 Rewrite on top of linux_wait_for_event_filtered.
3678 (stop_all_lwps): Call wait_for_sigstop directly.
3679 * server.c (resume, handle_target_event): Handle
3680 TARGET_WAITKIND_NO_RESUMED.
3681
d763de10
JB
36822014-02-26 Joel Brobecker <brobecker@adacore.com>
3683
3684 * win32-low.c (psapi_get_dll_name,
3685 * win32_CreateToolhelp32Snapshot): Delete.
3686 (win32_CreateToolhelp32Snapshot, win32_Module32First)
3687 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
3688 Delete.
3689 (handle_load_dll): Add function description.
3690 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
3691
850a0f76
JB
36922014-02-26 Joel Brobecker <brobecker@adacore.com>
3693
3694 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
3695 Add comment.
3696 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
3697 base address when calling win32_add_one_solib.
3698 (handle_load_dll): Delete local variable load_addr.
3699 Remove 0x1000 offset applied to DLL base address when calling
3700 win32_add_one_solib.
3701 (handle_unload_dll): Add comment.
3702
f25b3fc3
JB
37032014-02-26 Joel Brobecker <brobecker@adacore.com>
3704
3705 * win32-low.c (win32_add_all_dlls): Renames
3706 win32_ensure_ntdll_loaded. Rewrite function documentation.
3707 Adjust implementation to always load all DLLs.
3708 Add 0x1000 offset to DLL base address when calling
3709 win32_add_one_solib.
3710 (child_initialization_done): New static global.
3711 (do_initial_child_stuff): Set child_initialization_done to
3712 zero during child initialization, and 1 after. Replace call
3713 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
3714 Add comment.
3715 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
3716 (handle_unload_dll): Add function documentation.
3717 (get_child_debug_event): Ignore load and unload DLL events
3718 during child initialization.
3719
d86d4aaf
DE
37202014-02-20 Doug Evans <dje@google.com>
3721
3bc32da3 3722 Remove global all_lwps.
d86d4aaf
DE
3723 * inferiors.h (ptid_of): Move here from linux-low.h.
3724 (pid_of, lwpid_of): Ditto.
3725 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
3726 parameter is a struct thread_info * now.
3727 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
3728 directly. Pass &all_threads to find_inferior instead of &all_lwps.
3729 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
3730 directly.
3731 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
3732 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
3733 * linux-arm-low.c (update_registers_callback): Update, "entry"
3734 parameter is a struct thread_info * now.
3735 Fetch lwpid from current_inferior directly.
3736 (arm_insert_point): Pass &all_threads to find_inferior instead of
3737 &all_lwps.
3738 (arm_remove_point): Ditto.
3739 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
3740 (arm_prepare_to_resume): Fetch pid from thread.
3741 (arm_read_description): Fetch lwpid from current_inferior directly.
3742 * linux-low.c (all_lwps): Delete.
3743 (delete_lwp): Delete call to remove_inferior.
3744 (handle_extended_wait): Fetch lwpid from thread.
3745 (add_lwp): Don't set lwp->entry.id. Remove call to
3746 add_inferior_to_list.
3747 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
3748 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
3749 (kill_one_lwp_callback): Ditto.
3750 (linux_kill): Don't dereference NULL pointer.
3751 Fetch ptid,lwpid from thread.
3752 (get_detach_signal): Fetch ptid from thread.
3753 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
3754 Simplify call to regcache_invalidate_thread.
3755 (delete_lwp_callback): Update, "entry" parameter is a
3756 struct thread_info * now. Fetch pid from thread.
3757 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
3758 (status_pending_p_callback): Update, "entry" parameter is a
3759 struct thread_info * now. Fetch ptid from thread.
3760 (find_lwp_pid): Update, "entry" parameter is a
3761 struct thread_info * now.
3762 (linux_wait_for_lwp): Fetch pid from thread.
3763 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
3764 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
3765 (enqueue_one_deferred_signal): Fetch lwpid from thread.
3766 (dequeue_one_deferred_signal): Ditto.
3767 (cancel_breakpoint): Fetch ptid from current_inferior.
3768 (linux_wait_for_event): Pass &all_threads to find_inferior,
3769 not &all_lwps. Fetch ptid, lwpid from thread.
3770 (count_events_callback): Update, "entry" parameter is a
3771 struct thread_info * now.
3772 (select_singlestep_lwp_callback): Ditto.
3773 (select_event_lwp_callback): Ditto.
3774 (cancel_breakpoints_callback): Ditto.
3775 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
3776 not &all_lwps.
3777 (select_event_lwp): Ditto. Fetch ptid from event_thread.
3778 (unsuspend_one_lwp): Update, "entry" parameter is a
3779 struct thread_info * now.
3780 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
3781 not &all_lwps.
3782 (linux_stabilize_threads): Ditto. And for for_each_inferior.
3783 Fetch lwpid from thread, not lwp.
3784 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
3785 Pass &all_threads to find_inferior, not &all_lwps.
3786 (send_sigstop): Fetch lwpid from thread, not lwp.
3787 (send_sigstop_callback): Update, "entry" parameter is a
3788 struct thread_info * now.
3789 (suspend_and_send_sigstop_callback): Ditto.
3790 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
3791 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
3792 struct thread_info * now.
3793 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
3794 from thread, lwp.
3795 (lwp_running): Update, "entry" parameter is a
3796 struct thread_info * now.
3797 (stop_all_lwps): Fetch ptid from thread.
3798 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
3799 (linux_resume_one_lwp): Fetch lwpid from thread.
3800 (linux_set_resume_request): Update, "entry" parameter is a
3801 struct thread_info * now. Fetch pid, lwpid from thread.
3802 (resume_status_pending_p): Update, "entry" parameter is a
3803 struct thread_info * now.
3804 (need_step_over_p): Ditto. Fetch lwpid from thread.
3805 (start_step_over): Fetch lwpid from thread.
3806 (linux_resume_one_thread): Update, "entry" parameter is a
3807 struct thread_info * now. Fetch lwpid from thread.
3808 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
3809 (proceed_one_lwp): Update, "entry" parameter is a
3810 struct thread_info * now. Fetch lwpid from thread.
3811 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
3812 struct thread_info * now.
3813 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
3814 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
3815 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
3816 directly.
3817 (regsets_store_inferior_registers): Ditto.
3818 (fetch_register, store_register): Ditto.
3819 (linux_read_memory, linux_write_memory): Ditto.
3820 (linux_request_interrupt): Ditto.
3821 (linux_read_auxv): Ditto.
3822 (linux_xfer_siginfo): Ditto.
3823 (linux_qxfer_spu): Ditto.
3824 (linux_qxfer_libraries_svr4): Ditto.
3825 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
3826 moved to inferiors.h.
3827 (get_lwp): Delete.
3828 (get_thread_lwp): Update.
3829 (struct lwp_info): Delete member "entry". Simplify comment for
3830 member "thread".
3831 (all_lwps): Delete.
3832 * linux-mips-low.c (mips_read_description): Fetch lwpid from
3833 current_inferior directly.
3834 (update_watch_registers_callback): Update, "entry" parameter is a
3835 struct thread_info * now. Fetch pid from thread.
3836 (mips_linux_prepare_to_resume): Fetch ptid from thread.
3837 (mips_insert_point): Fetch lwpid from current_inferior.
3838 Pass &all_threads to find_inferior, not &all_lwps.
3839 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
3840 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
3841 directly.
3842 (mips_stopped_data_address): Ditto.
3843 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
3844 directly.
3845 * linux-tile-low.c (tile_arch_setup): Ditto.
3846 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
3847 (update_debug_registers_callback): Update, "entry" parameter is a
3848 struct thread_info * now. Fetch pid from thread.
3849 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
3850 Pass &all_threads to find_inferior, not &all_lwps.
3851 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
3852 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
3853 Pass &all_threads to find_inferior, not &all_lwps.
3854 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
3855 (i386_dr_low_get_status): Ditto.
3856 (x86_linux_prepare_to_resume): Fetch ptid from thread.
3857 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
3858 (x86_linux_read_description): Ditto.
3859 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
3860
3b8361aa
DE
38612014-02-20 Doug Evans <dje@google.com>
3862
3863 * inferiors.c (get_first_inferior): Fix buglet.
3864
f7667f0d
DE
38652014-02-19 Doug Evans <dje@google.com>
3866
3867 * gdbthread.h (add_thread): Change result type to struct thread_info *.
3868 * inferiors.c (add_thread): Change result type to struct thread_info *.
3869 All callers updated.
3870 (add_lwp): Call add_thread here instead of in callers.
3871 All callers updated.
3872 * linux-low.h (get_lwp_thread): Rewrite.
3873 (struct lwp_info): New member "thread".
3874
b3312d80
DE
38752014-02-19 Doug Evans <dje@google.com>
3876
3877 * linux-low.c (add_lwp): Change result to struct lwp_info *.
3878 All callers updated.
3879
ecc6f45c
DE
38802014-02-19 Doug Evans <dje@google.com>
3881
3882 * inferiors.c (add_thread): Fix whitespace.
3883
649ebbca
DE
38842014-02-19 Doug Evans <dje@google.com>
3885
3886 * dll.c (clear_dlls): Replace accessing list implemention details
3887 with API function.
3888 * gdbthread.h (get_first_thread): Declare.
3889 * inferiors.c (for_each_inferior_with_data): New function.
3890 (get_first_thread): New function.
3891 (find_thread_ptid): Simplify.
3892 (get_first_inferior): New function.
3893 (clear_list): Delete.
3894 (one_inferior_p): New function.
3895 (clear_inferior_list): New function.
3896 (clear_inferiors): Update.
3897 * inferiors.h (for_each_inferior_with_data): Declare.
3898 (clear_inferior_list): Declare.
3899 (one_inferior_p): Declare.
3900 (get_first_inferior): Declare.
3901 * linux-low.c (linux_wait_for_event): Replace accessing list
3902 implemention details with API function.
3903 * server.c (target_running): Ditto.
3904 (accumulate_file_name_length): New function.
3905 (emit_dll_description): New function.
3906 (handle_qxfer_libraries): Replace accessing list implemention
3907 details with API function.
3908 (handle_qxfer_threads_worker): New function.
3909 (handle_qxfer_threads_proper): Replace accessing list implemention
3910 details with API function.
3911 (handle_query): Ditto.
3912 (visit_actioned_threads_callback_ftype): New typedef.
3913 (visit_actioned_threads_data): New struct.
3914 (visit_actioned_threads): Rewrite to be find_inferior callback.
3915 (resume): Call find_inferior.
3916 (handle_status): Replace accessing list implemention
3917 details with API function.
3918 (process_serial_event): Replace accessing list implemention details
3919 with API function.
3920 * target.c (set_desired_inferior): Replace accessing list implemention
3921 details with API function.
3922 * tracepoint.c (same_process_p): New function.
3923 (gdb_agent_about_to_close): Replace accessing list implemention
3924 details with API function.
3925 * win32-low.c (child_delete_thread): Replace accessing list
3926 implemention details with API function.
3927 (match_dll_by_basename): New function.
3928 (dll_is_loaded_by_basename): New function.
3929 (win32_ensure_ntdll_loaded): Replace accessing list implemention
3930 details call to dll_is_loaded_by_basename.
3931
80894984
DE
39322014-02-19 Doug Evans <dje@google.com>
3933
3934 * dll.h (struct dll_info): Add comment.
3935 * gdbthread.h (struct thread_info): Add comment.
3936 (current_ptid): Simplify.
3937 * inferiors.c (add_process): Update.
3938 (remove_process): Update.
3939 * inferiors.h (struct process_info): Rename member "head" to "entry".
3940 * linux-low.c (delete_lwp): Update.
3941 (add_lwp): Update.
3942 (last_thread_of_process_p): Update.
3943 (kill_one_lwp_callback, linux_kill): Update.
3944 (status_pending_p_callback): Update.
3945 (wait_for_sigstop): Update. Simplify read of ptid.
3946 (start_step_over): Update.
3947 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
3948 (get_lwp_thread): Update.
3949 (struct lwp_info): Rename member "head" to "entry".
3950 * regcache.h (inferior_list_entry): Delete.
3951 * server.c (kill_inferior_callback): Update.
3952 (detach_or_kill_inferior_callback): Update.
3953 (print_started_pid): Update.
3954 (print_attached_pid): Update.
3955 (process_serial_event): Simplify read of ptid.
3956 * thread-db.c (thread_db_create_event): Update.
3957 (thread_db_get_tls_address): Update.
3958 * win32-low.c (current_inferior_ptid): Simplify.
3959
46917d26
TT
39602014-02-19 Tom Tromey <tromey@redhat.com>
3961
3962 * target.h (struct target_ops) <supports_btrace>: Add target_ops
3963 argument.
3964 (target_supports_btrace): Update.
3965
0759a81e
YQ
39662014-02-14 Yao Qi <yao@codesourcery.com>
3967
3968 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
3969 (rsp-low-ipa.o): New target.
3970
a7191e8b
TT
39712014-02-12 Tom Tromey <tromey@redhat.com>
3972
3973 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
3974 convert_ascii_to_int.
3975 * regcache.c (registers_to_string): Likewise.
3976 * remote-utils.c (decode_M_packet): Likewise.
3977 * server.c (process_serial_event): Likewise.
3978
ff0e980e
TT
39792014-02-12 Tom Tromey <tromey@redhat.com>
3980
3981 * server.c (handle_query, handle_v_run): Use hex2bin, not
3982 unhexify.
3983 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
3984
e9371aff
TT
39852014-02-12 Tom Tromey <tromey@redhat.com>
3986
3987 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
3988 convert_int_to_ascii.
3989 * regcache.c (registers_to_string, collect_register_as_string):
3990 Likewise.
3991 * remote-utils.c (look_up_one_symbol, relocate_instruction):
3992 Likewise.
3993 * server.c (process_serial_event): Likewise.
3994 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
3995 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
3996
971dc0b8
TT
39972014-02-12 Tom Tromey <tromey@redhat.com>
3998
3999 * remote-utils.c (look_up_one_symbol, monitor_output): Use
4000 bin2hex, not hexify.
4001 * tracepoint.c (cmd_qtstatus): Likewise.
4002
0a822afb
TT
40032014-02-12 Tom Tromey <tromey@redhat.com>
4004
4005 * remote-utils.c (monitor_output): Pass explicit length to
4006 hexify.
4007
9c3d6531
TT
40082014-02-12 Tom Tromey <tromey@redhat.com>
4009
4010 * tracepoint.c: Include rsp-low.h.
4011 * server.c: Include rsp-low.h.
4012 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
4013 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
4014 declare.
4015 * remote-utils.c: Include rsp-low.h.
4016 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
4017 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
4018 (convert_int_to_ascii, convert_ascii_to_int): Move to
4019 common/rsp-low.c.
4020 * regcache.c: Include rsp-low.h.
4021 * ax.c: Include rsp-low.h.
4022 * Makefile.in (SFILES): Add common/rsp-low.c.
4023 (OBS): Add rsp-low.o.
4024 (rsp-low.o): New target.
4025
01fd3ea5
TT
40262014-02-12 Tom Tromey <tromey@redhat.com>
4027
4028 * utils.h (pulongest, plongest, phex_nz): Don't declare.
4029 Include print-utils.h.
4030 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
4031 (plongest, thirty_two, phex_nz): Remove.
4032 * Makefile.in (SFILES): Add common/print-utils.c.
4033 (OBS): Add print-utils.o.
4034 (print-utils-ipa.o): New target.
4035 (print-utils.o): New target.
4036 (IPA_OBJS): Add print-utils-ipa.o.
4037
e99dc820
TT
40382014-02-06 Tom Tromey <tromey@redhat.com>
4039
4040 * Makefile.in (SFILES): Fix indentation.
4041
ee1e2d4f
DE
40422014-02-05 Doug Evans <dje@google.com>
4043
4044 * linux-low.c (linux_wait_for_event): Improve comment.
4045 (linux_wait_1): Keep current_inferior in sync with event_child.
4046
f5a02773
DE
40472014-01-22 Doug Evans <dje@google.com>
4048
4049 * gdbthread.h (gdb_id_to_thread): Delete, unused.
4050
87ce2a04
DE
40512014-01-22 Doug Evans <dje@google.com>
4052
4053 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
4054 * configure: Regenerate.
4055 * config.in: Regenerate.
4056 * Makefile.in (SFILES): Add debug.c.
4057 (OBS): Add debug.o.
4058 * debug.c: New file.
4059 * debug.h: New file.
4060 * linux-aarch64-low.c (*): Update all debugging printfs to use
4061 debug_printf instead of fprintf.
4062 * linux-arm-low.c (*): Ditto.
4063 * linux-cris-low.c (*): Ditto.
4064 * linux-crisv32-low.c (*): Ditto.
4065 * linux-m32r-low.c (*): Ditto.
4066 * linux-sparc-low.c (*): Ditto.
4067 * linux-x86.c (*): Ditto.
4068 * linux-low.c (*): Ditto.
4069 (linux_wait_1): Add calls to debug_enter, debug_exit.
4070 (linux_wait): Remove redundant debugging printf.
4071 (stop_all_lwps): Add calls to debug_enter, debug_exit.
4072 (linux_resume, unstop_all_lwps): Ditto.
4073 * mem-break.c (*): Update all debugging printfs to use
4074 debug_printf instead of fprintf.
4075 * remote-utils.c (*): Ditto.
4076 * thread-db.c (*): Ditto.
4077 * server.c #include <ctype.h>, "gdb_vecs.h".
4078 (debug_threads): Moved to debug.c.
4079 (*): Update all debugging printfs to use debug_printf instead of
4080 fprintf.
4081 (start_inferior): Replace call to fflush with call to debug_flush.
4082 (monitor_show_help): Mention set debug-format.
4083 (parse_debug_format_options): New function.
4084 (handle_monitor_command): Handle "monitor set debug-format".
4085 (gdbserver_usage): Mention --debug-format.
4086 (main): Parse --debug-format.
4087 * server.h (debug_threads): Declaration moved to debug.h.
4088 #include "debug.h".
4089 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
4090 trace_debug_1 that uses debug_printf.
4091 (tracepoint_look_up_symbols): Update all debugging printfs to use
4092 debug_printf instead of fprintf.
4093
e671835b
BS
40942014-01-20 Baruch Siach <baruch@tkos.co.il>
4095
4096 * linux-xtensa-low.c: Include asm/ptrace.h instead of
4097 sys/ptrace.h.
4098
b5737fa9
PA
40992014-01-17 Pedro Alves <palves@redhat.com>
4100
ea38d2a9 4101 PR build/16445
c7faa97a
PA
4102 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
4103 defined after including gdb_proc_service.h.
b5737fa9 4104
40ed484e
DE
41052014-01-16 Doug Evans <dje@google.com>
4106
4107 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
4108 (match_dll): Use it.
4109
969c39fb
MM
41102014-01-16 Markus Metzger <markus.t.metzger@intel.com>
4111
4112 * target.h (target_ops) <read_btrace>: Change parameters and
4113 return type to allow error reporting.
4114 * server.c (handle_qxfer_btrace): Support delta reads. Pass
4115 trace reading errors on.
4116 * linux-low.c (linux_low_read_btrace): Pass trace reading
4117 errors on.
4118 (linux_low_disable_btrace): New.
4119
ab7f45ba
DE
41202014-01-15 Doug Evans <dje@google.com>
4121
4122 * inferiors.c (thread_id_to_gdb_id): Delete.
4123 * inferiors.h (thread_id_to_gdb_id): Delete.
4124
66af0f44
EZ
41252014-01-13 Eli Zaretskii <eliz@gnu.org>
4126
4127 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
4128 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
4129 versions.
4130
9939e131
PA
41312014-01-08 Pedro Alves <palves@redhat.com>
4132
4133 * server.c (handle_status): Don't discard previous queued stop
4134 replies or thread's pending status here.
4135 (main) <disconnection>: Do it here instead.
4136
b7ea362b
PA
41372014-01-08 Pedro Alves <palves@redhat.com>
4138
4139 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
4140 * server.c (visit_actioned_threads, handle_pending_status): New
4141 function.
4142 (handle_v_cont): Factor out parts to ...
4143 (resume): ... this new function. If in all-stop, and a thread
4144 being resumed has a pending status, report it without actually
4145 resuming.
4146 (myresume): Adjust to use the new 'resume' function.
4147 (clear_pending_status_callback, set_pending_status_callback)
4148 (find_status_pending_thread_callback): New functions.
4149 (handle_status): Handle the case of multiple threads having
4150 interesting statuses to report. Report threads' real last signal
4151 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
4152 with an interesting thread to report the status for, instead of
4153 always reporting the status of the first thread.
4154
28498c42
JB
41552014-01-01 Joel Brobecker <brobecker@adacore.com>
4156
4157 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
4158 * gdbreplay.c (gdbreplay_version): Likewise.
4159
f45c82da
YZ
41602013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
4161
4162 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
4163 iov.iov_len with the real length in use.
4164
379a5e2d
JB
41652013-12-13 Joel Brobecker <brobecker@adacore.com>
4166
4167 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
4168 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
4169 for all targets that use win32-low.c.
4170 * win32-low.c (win32_ensure_ntdll_loaded): New function.
4171 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
4172
4210d83e
PA
41732013-12-13 Pedro Alves <palves@redhat.com>
4174
4175 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
4176 if equal to TARGET_WAITKIND_LOADED.
4177 * win32-low.c (cached_status): New static global.
4178 (win32_wait): Add declaration.
4179 (do_initial_child_stuff): Flush all initial pending debug events
4180 up to the initial breakpoint.
4181 (win32_wait): If CACHED_STATUS was set, return that instead
4182 of doing a real wait. Remove the code resuming the execution
4183 of the inferior after receiving a TARGET_WAITKIND_LOADED event
4184 during the initial phase. Also remove the code changing
4185 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
4186 TARGET_WAITKIND_STOPPED.
4187
e7f0d979
YQ
41882013-12-11 Yao Qi <yao@codesourcery.com>
4189
4190 * notif.c (handle_notif_ack): Return 0 if no notification
4191 matches.
4192
ebcf782c
DE
41932013-11-20 Doug Evans <dje@google.com>
4194
4195 * linux-low.c (linux_set_resume_request): Fix comment.
4196
20ad9378
DE
41972013-11-20 Doug Evans <dje@google.com>
4198
4199 * linux-low.c (resume_status_pending_p): Tweak comment.
4200
a196ebeb
WT
42012013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
4202
4203 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
4204 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
4205 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
4206 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
4207 (srv_amd64_regobj): Add amd64-mpx.o.
4208 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
4209 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
4210 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
4211 * i387-fp.c (num_pl_bnd_register) Added constant.
4212 (num_pl_bnd_cfg_registers) Added constant.
4213 (struct i387_xsave) Added reserved area and MPX fields.
4214 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
4215 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
4216 function.
4217 (tdesc_i386_mpx_linux): Add MPX amd64 target.
4218 (init_registers_amd64_mpx_linux): Declare new function.
4219 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
4220 (x86_64_regmap): Add MPX registers.
4221 (x86_linux_read_description): Add MPX case.
4222 (initialize_low_arch): Initialize MPX targets.
4223
0080a2f6
TT
42242013-11-18 Tom Tromey <tromey@redhat.com>
4225
4226 * configure: Rebuild.
4227 * configure.ac: Don't check for stdlib.h.
4228 * gdbreplay.c: Unconditionally include stdlib.h.
4229
2978b111
TT
42302013-11-18 Tom Tromey <tromey@redhat.com>
4231
4232 * config.in: Rebuild.
4233 * configure: Rebuild.
4234 * configure.ac: Don't use AC_HEADER_DIRENT.
4235
a3d08894
TT
42362013-11-18 Tom Tromey <tromey@redhat.com>
4237
4238 * server.h: Don't check HAVE_STRING_H.
4239 * gdbreplay.c: Don't check HAVE_STRING_H.
4240 * configure: Rebuild.
4241
0a5dd17d
TT
42422013-11-18 Tom Tromey <tromey@redhat.com>
4243
4244 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
4245 LIBGNU.
4246
1bd2f0ba
TT
42472013-11-08 Tom Tromey <tromey@redhat.com>
4248
4249 * configure, config.in: Rebuild.
4250 * configure.ac: Remove unused configury.
4251
3266f10b
TT
42522013-11-08 Tom Tromey <tromey@redhat.com>
4253
4254 * acinclude.m4: Include common.m4, codeset.m4.
4255 * configure, config.in: Rebuild.
4256 * configure.ac: Use GDB_AC_COMMON.
4257
6682d959
AA
42582013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
4259
4260 * linux-s390-low.c (HWCAP_S390_TE): New define.
4261 (s390_arch_setup): Consider the TE field in the HWCAP for
4262 determining 'have_regset_tdb'.
4263
fd0a4d76
SDJ
42642013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
4265
4266 PR gdb/16014
4267 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
4268 call to sizeof.
4269
1a3d890b
PA
42702013-10-02 Pedro Alves <palves@redhat.com>
4271
4272 * server.c (process_serial_event): Don't output "GDBserver
4273 exiting" if GDB is connected through stdio.
4274 * target.c (mywait): Likewise, be silent if GDB is connected
4275 through stdio.
4276
97ad4581
JB
42772013-10-01 Joel Brobecker <brobecker@adacore.com>
4278
4279 * lynx-low.c (lynx_add_threads_after_attach): New function.
4280 (lynx_attach): Remove call to add_thread. Add call to
4281 lynx_add_threads_after_attach instead.
4282
5b4e221c
MF
42832013-09-28 Mike Frysinger <vapier@gentoo.org>
4284
4285 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
4286 * config.in, configure: Regenerated.
4287
ee47b2f8
YQ
42882013-09-18 Yao Qi <yao@codesourcery.com>
4289
4290 PR server/15959
4291 * server.c (start_inferior): Clear 'resume_info'.
4292
d6707650 42932013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 4294
d6707650
JW
4295 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
4296 for each register.
4297
9243dd0e 42982013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 4299
9243dd0e
JW
4300 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
4301 linux-tile-low.o to srv_tgtobj.
4302
c623a6ef
WN
43032013-09-16 Will Newton <will.newton@linaro.org>
4304
4305 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
4306 out regs.
4307
fb71d39e
PA
43082013-09-06 Pedro Alves <palves@redhat.com>
4309
4310 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
4311 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
4312 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
4313 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
4314 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
4315 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
4316
8e7e9910
PA
43172013-09-06 Pedro Alves <palves@redhat.com>
4318
4319 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
4320 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
4321
7c3a12ca
PA
43222013-09-06 Pedro Alves <palves@redhat.com>
4323
4324 * linux-amd64-ipa.c: Include tracepoint.h.
4325 * linux-i386-ipa.c: Include tracepoint.h.
4326
8eb3d7b6
RW
43272013-09-06 Ricard Wanderlof <ricardw@axis.com>
4328
4329 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
4330 (ps_get_thread_area): New function.
4331
eddddb9d
RW
43322013-09-06 Ricard Wanderlof <ricardw@axis.com>
4333
4334 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
4335 (initialize_low_arch): Call init_registers_crisv32 rather than
4336 init_register_crisv32.
4337
533b0600
PA
43382013-09-05 Pedro Alves <palves@redhat.com>
4339
4340 * server.h (handle_vFile, hostio_last_error_from_errno): Move
4341 to ...
4342 * hostio.h: ... this new file.
4343 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
4344 win32-low.c: Include hostio.h.
4345
0ce3d3b5
PA
43462013-09-05 Pedro Alves <palves@redhat.com>
4347
4348 * server.h (gdb_client_data, handler_func, callback_handler_func)
4349 (delete_file_handler, add_file_handler, append_callback_event)
4350 (delete_callback_event, start_event_loop, initialize_event_loop):
4351 Move to event-loop.h and include it.
4352 * event-loop.h: New file.
4353
799cdc37
PA
43542013-09-05 Pedro Alves <palves@redhat.com>
4355
4356 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
4357 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
4358 (loaded_dll, unloaded_dll): Move to ...
4359 * dll.h: ... this new file.
4360 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
4361
6a6bbd9d
PA
43622013-09-05 Pedro Alves <palves@redhat.com>
4363
4364 * server.h (current_process, get_thread_process, all_processes)
4365 (add_inferior_to_list, for_each_inferior, current_inferior)
4366 (remove_inferior, add_process, remove_process, find_process_pid)
4367 (have_started_inferiors_p, have_attached_inferiors_p)
4368 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
4369 (clear_inferiors, find_inferior, find_inferior_id)
4370 (inferior_target_data, set_inferior_target_data)
4371 (inferior_regcache_data, set_inferior_regcache_data): Move to
4372 inferiors.h, and include it.
4373 * inferiors.h: New file.
4374
f699aaba
PA
43752013-09-05 Pedro Alves <palves@redhat.com>
4376
4377 * server.h (struct emit_ops, current_insn_ptr, emit_error):
4378 Move ...
72f4393d 4379 * ax.h: ... here.
f699aaba 4380
c144c7a0
PA
43812013-09-05 Pedro Alves <palves@redhat.com>
4382
4383 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
4384 tracepoint.h.
4385 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
4386 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
4387 (handle_tracepoint_general_set, handle_tracepoint_query)
4388 (tracepoint_finished_step, tracepoint_was_hit)
4389 (release_while_stepping_state_list, current_traceframe)
4390 (in_readonly_region, traceframe_read_mem)
4391 (fetch_traceframe_registers, traceframe_read_sdata)
4392 (traceframe_read_info, struct fast_tpoint_collect_status)
4393 (fast_tracepoint_collecting, force_unlock_trace_buffer)
4394 (handle_tracepoit_bkpts, initialize_low_tracepoint)
4395 (supply_fast_tracepoint_registers)
4396 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
4397 (ipa_tdesc, claim_trampoline_space)
4398 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
4399 (agent_mem_read, agent_get_trace_state_variable_value)
4400 (agent_set_trace_state_variable_value, agent_tsv_read)
4401 (agent_mem_read_string, get_raw_reg_func_addr)
4402 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
4403 * tracepoint.h: ... this new file.
4404
ff42e6ab
PA
44052013-09-05 Pedro Alves <palves@redhat.com>
4406
4407 * server.h (perror_with_name, error, fatal, warning, paddress)
4408 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
4409 include it.
4410 * utils.h: New file.
4411
541af0f4
PA
44122013-09-05 Pedro Alves <palves@redhat.com>
4413
4414 * server.h (remote_debug, noack_mode, transport_is_reliable)
4415 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
4416 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
4417 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
4418 (write_enn, initialize_async_io, enable_async_io)
4419 (disable_async_io, check_remote_input_interrupt_request)
4420 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
4421 (dead_thread_notify, prepare_resume_reply)
4422 (decode_address_to_semicolon, decode_address, decode_m_packet)
4423 (decode_M_packet, decode_X_packet, decode_xfer_write)
4424 (decode_search_memory_packet, unhexify, hexify)
4425 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
4426 (look_up_one_symbol, relocate_instruction)
4427 (monitor_output): Move to remote-utils.h, and include it.
4428 * remote-utils.h: New file.
4429
eebdf26b
PA
44302013-09-05 Pedro Alves <palves@redhat.com>
4431
4432 * server.h (_): Delete.
4433
3aafd2ff
PA
44342013-09-02 Pedro Alves <palves@redhat.com>
4435
4436 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
4437 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
4438 allocated.
4439 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
4440
cee83bcb
PM
44412013-09-02 Pierre Muller <muller@sourceware.org>
4442
4443 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
4444 or WriteProcessMemory complete successfully and handle
4445 ERROR_PARTIAL_COPY error.
4446
9a13b2fa
PA
44472013-09-02 Pedro Alves <palves@redhat.com>
4448
4449 * server.c (gdb_read_memory): Return -1 on traceframe memory read
4450 error instead of EIO.
4451
602e3198
JK
44522013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4453
4454 PR server/15604
4455 * linux-low.c: Include filestuff.h.
4456 (linux_create_inferior) <pid == 0>: Call close_most_fds.
4457 * lynx-low.c: Include filestuff.h.
4458 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
4459 * server.c: Include filestuff.h.
4460 (main): Call notice_open_fds.
4461 * spu-low.c: Include filestuff.h.
4462 (spu_create_inferior) <pid == 0>: Call close_most_fds.
4463
96d7229d
LM
44642013-08-22 Luis Machado <lgustavo@codesourcery.com>
4465
4466 * Makefile.in: Explain why ../target and ../nat are not
4467 listed as include file search paths.
4468 (linux-waitpid.o): New object file rule.
4469 * configure.srv (srv_native_linux_obj): New variable.
4470 Replace all occurrences of linux native object files with
4471 $srv_native_linux_obj.
4472 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
4473 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
4474 (linux_enable_event_reporting): Remove declaration.
4475 (my_waitpid): Moved to common/linux-waitpid.c.
4476 (linux_wait_for_event): Pass ptid when calling
4477 linux_enable_event_reporting.
4478 (linux_supports_tracefork_flag): Remove.
4479 (linux_enable_event_reporting): Likewise.
4480 (linux_tracefork_grandchild): Remove.
4481 (STACK_SIZE): Moved to common/linux-ptrace.c.
4482 (linux_tracefork_child): Remove.
4483 (linux_test_for_tracefork): Remove.
4484 (linux_look_up_symbols): Call linux_supports_traceclone.
4485 (initialize_low): Remove call to linux_test_for_tracefork.
4486 * linux-low.h (PTRACE_TYPE_ARG3): Move to
4487 common/linux-ptrace.h.
4488 (PTRACE_TYPE_ARG4): Likewise.
4489 Include linux-ptrace.h.
4490
32940073
PA
44912013-08-21 Pedro Alves <palves@redhat.com>
4492
4493 * config.in: Renegerate.
4494
33b60d58 44952013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 4496
33b60d58
LM
4497 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
4498 (SFILES): Remove $(srcdir)/common/target-common.c and
4499 add $(srcdir)/target/waitstatus.c.
4500 (OBS): Remove target-common.o and add waitstatus.o.
4501 (server_h): Remove $(srcdir)/../common/target-common.h and
4502 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
4503 and $(srcdir)/../target/waitstatus.h.
4504 (target-common.o): Remove.
4505 (waitstatus.o): New target object file.
4506 * target.h: Do not include target-common.h and
4507 include target/resume.h, target/wait.h and
4508 target/waitstatus.h.
4509
b8e1b30e
LM
45102013-08-13 Luis Machado <lgustavo@codesourcery.com>
4511
4512 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
4513 to PTRACE_TYPE_ARG3.
4514 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
4515 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
4516 PTRACE_TYPE_ARG4.
4517 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
4518 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
4519
7a60ad40
YQ
45202013-07-27 Jie Zhang <jie@codesourcery.com>
4521 Daniel Jacobowitz <dan@codesourcery.com>
4522 Yao Qi <yao@codesourcery.com>
4523
4524 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
4525 (mips-linux-watch.o): New rule.
4526 (mips_linux_watch_h): New variable.
4527 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
4528 srv_tgtobj.
4529 * linux-mips-low.c: Include mips-linux-watch.h.
4530 (struct arch_process_info, struct arch_lwp_info): New.
4531 (update_watch_registers_callback): New function.
4532 (mips_linux_new_process, mips_linux_new_thread) New functions.
4533 (mips_linux_prepare_to_resume, mips_insert_point): New
4534 functions.
4535 (mips_remove_point, mips_stopped_by_watchpoint): New
4536 functions.
4537 (rsp_bp_type_to_target_hw_bp_type): New function.
4538 (mips_stopped_data_address): New function.
4539 (the_low_target): Add watchpoint support functions.
4540
de6f69ad
YQ
45412013-07-27 Yao Qi <yao@codesourcery.com>
4542
4543 * i386-low.c: Include break-common.h.
4544 (enum target_hw_bp_type): Remove.
4545
3360c0bf
LM
45462013-07-24 Luis Machado <lgustavo@codesourcery.com>
4547
4548 * Makefile.in (SFILES): /common/target-common.c.
4549 (OBS): Add target-common.o.
4550 (server_h): Add $(srcdir)/../common/target-common.h.
4551 (target-common.o): New target.
4552 * server.c (queue_stop_reply_callback): Free
4553 status string after use.
4554 * target.c (target_waitstatus_to_string): Remove.
4555 * target.h: Include target-common.h.
4556 (resume_kind): Likewise.
4557 (target_waitkind): Likewise.
4558 (target_waitstatus): Likewise.
4559 (TARGET_WNOHANG): Likewise.
4560
bd885420
YQ
45612013-07-04 Yao Qi <yao@codesourcery.com>
4562
4563 * Makefile.in (host_alias): Use @host_noncanonical@.
4564 (target_alias): Use @target_noncanonical@.
4565 * configure.ac: Use ACX_NONCANONICAL_TARGET and
4566 ACX_NONCANONICAL_HOST.
4567 * configure: Regenerated.
4568
4569 Revert:
4570 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
4571
4572 * configure.ac (version_host, version_target): Set and AC_SUBST them.
4573 * configure: Rebuild.
4574 * Makefile.in (version_host, version_target): Get from configure.
4575 (version.c): Use $(version_host) and $(version_target).
4576
17ef446e
PA
45772013-07-03 Pedro Alves <palves@redhat.com>
4578
4579 * Makefile.in (config.status): Depend on development.sh.
4580 * acinclude.m4: Include libmcheck.m4.
4581 * configure: Regenerate.
4582
7a9a7487
MG
45832013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
4584
4585 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
4586 attribute inside the parentheses.
4587 (winapi_DebugSetProcessKillOnExit): Ditto.
4588 (winapi_DebugBreakProcess): Ditto.
4589 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 4590
49b64de6
MG
45912013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
4592
4593 * notif.h (notif_event): Add a dummy member to avoid compiler
4594 errors.
4595
d5749ee7
PA
45962013-07-01 Pedro Alves <palves@redhat.com>
4597
4598 * hostio.c (HOSTIO_PATH_MAX): Define.
4599 (require_filename, handle_open, handle_unlink, handle_readlink):
4600 Use it.
4601
d8d2a3ee
PA
46022013-07-01 Pedro Alves <palves@redhat.com>
4603
4604 * server.h: Include "pathmax.h".
4605 * linux-low.c: Don't include sys/param.h.
4606 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
4607 MAXPATHLEN.
4608 * win32-low.c: Don't include sys/param.h.
4609 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
4610
bc7dea8d
PA
46112013-07-01 Pedro Alves <palves@redhat.com>
4612
4613 * event-loop.c: Don't check HAVE_UNISTD_H before including
4614 <unistd.h>.
4615 * gdbreplay.c: Likewise.
4616 * remote-utils.c: Likewise.
4617 * server.c: Likewise.
4618 * configure.ac: Don't check for unistd.h.
4619 * configure: Regenerate.
4620
d6c2da54
TT
46212013-06-28 Tom Tromey <tromey@redhat.com>
4622
4623 * Makefile.in (version.c): Use version.in, not
4624 common/version.in.
4625
257b6bec
MG
46262013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
4627
4628 * configure.ac (version_host, version_target): Set and AC_SUBST them.
4629 * configure: Rebuild.
4630 * Makefile.in (version_host, version_target): Get from configure.
4631 (version.c): Use $(version_host) and $(version_target).
4632
86ebe149
DK
46332013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
4634
4635 Fix trace-status to output user name without trailing colon.
4636 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
4637
f30aa5af
DK
46382013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
4639
4640 Fix trace-status to output proper start-time and stop-time.
4641 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
4642 output start time and stop time in hex as gdb expects.
4643
28a93511
YQ
46442013-06-26 Pedro Alves <pedro@codesourcery.com>
4645
4646 * tracepoint.c (build_traceframe_info_xml): Output trace state
4647 variables present in the trace buffer.
4648
01208463
TT
46492013-06-24 Tom Tromey <tromey@redhat.com>
4650
4651 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
4652 create-version.sh.
4653 (version.o): Remove.
4654 * gdbreplay.c: Include version.h.
4655 (version, host_name): Don't declare.
4656 * server.h: Include version.h.
4657 (version, host_name): Don't declare.
4658
760256f9
PA
46592013-06-12 Pedro Alves <palves@redhat.com>
4660
4661 * linux-x86-low.c (linux_is_elf64): Delete global.
4662 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
4663 with local linux_pid_exe_is_elf_64_file use.
4664
030031ee
PA
46652013-06-11 Pedro Alves <palves@redhat.com>
4666
4667 * linux-low.c (regset_disabled, disable_regset): New functions.
4668 (regsets_fetch_inferior_registers)
4669 (regsets_store_inferior_registers): Use them.
4670 (initialize_regsets_info); Don't allocate the disabled_regsets
4671 array here.
4672 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
4673 comment.
4674
5da6eb0a
PA
46752013-06-11 Pedro Alves <palves@redhat.com>
4676
4677 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
4678 xmalloc.
4679
7e5aaa09
PA
46802013-06-11 Pedro Alves <palves@redhat.com>
4681
4682 * linux-x86-low.c (initialize_low_arch): Call
4683 init_registers_x32_avx_linux.
4684
d878444c
JK
46852013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
4686
4687 Fix compatibility with Android Bionic.
4688 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
4689 it is not empty.
4690
3aee8918
PA
46912013-06-07 Pedro Alves <palves@redhat.com>
4692
5f2b57b5 4693 PR server/14823
3aee8918
PA
4694 * Makefile.in (OBS): Add tdesc.o.
4695 (IPA_OBJS): Add tdesc-ipa.o.
4696 (tdesc-ipa.o): New rule.
4697 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
4698 interface.
4699 * linux-low.c (new_inferior): Delete.
4700 (disabled_regsets, num_regsets): Delete.
4701 (linux_add_process): Adjust to set the new per-process
4702 new_inferior flag.
4703 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
4704 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
4705 was a stop. When calling arch_setup, switch the current inferior
4706 to the thread that got an event.
4707 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
4708 (regsets_fetch_inferior_registers)
4709 (regsets_store_inferior_registers): New regsets_info parameter.
4710 Adjust to use it.
4711 (linux_register_in_regsets): New regs_info parameter. Adjust to
4712 use it.
4713 (register_addr, fetch_register, store_register): New usrregs_info
4714 parameter. Adjust to use it.
4715 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
4716 parameter regs_info. Adjust to use it.
4717 (linux_fetch_registers): Get the current inferior's regs_info, and
4718 adjust to use it.
4719 (linux_store_registers): Ditto.
4720 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
4721 (initialize_low): Don't initialize the target_regsets here. Call
4722 initialize_low_arch.
4723 * linux-low.h (target_regsets): Delete declaration.
4724 (struct regsets_info): New.
4725 (struct usrregs_info): New.
4726 (struct regs_info): New.
4727 (struct process_info_private) <new_inferior>: New field.
4728 (struct linux_target_ops): Delete the num_regs, regmap, and
4729 regset_bitmap fields. New field regs_info.
4730 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
4731 * i387-fp.c (num_xmm_registers): Delete.
4732 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
4733 calls to new interface.
4734 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
4735 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
4736 Infer the number of xmm registers from the regcache's target
4737 description.
4738 * i387-fp.h (num_xmm_registers): Delete.
4739 * inferiors.c (add_thread): Don't install the thread's regcache
4740 here.
4741 * proc-service.c (gregset_info): Fetch the current inferior's
4742 regs_info. Adjust to use it.
4743 * regcache.c: Include tdesc.h.
4744 (register_bytes, reg_defs, num_registers)
4745 (gdbserver_expedite_regs): Delete.
4746 (get_thread_regcache): If the thread doesn't have a regcache yet,
4747 create one, instead of aborting gdbserver.
4748 (regcache_invalidate_one): Rename to ...
4749 (regcache_invalidate_thread): ... this.
4750 (regcache_invalidate_one): New.
4751 (regcache_invalidate): Only invalidate registers of the current
4752 process.
4753 (init_register_cache): Add target_desc parameter, and use it.
4754 (new_register_cache): Ditto. Assert the target description has a
4755 non zero registers_size.
4756 (regcache_cpy): Add assertions. Adjust.
4757 (realloc_register_cache, set_register_cache): Delete.
4758 (registers_to_string, registers_from_string): Adjust.
4759 (find_register_by_name, find_regno, find_register_by_number)
4760 (register_cache_size): Add target_desc parameter, and use it.
4761 (free_register_cache_thread, free_register_cache_thread_one)
4762 (regcache_release, register_cache_size): New.
4763 (register_size): Add target_desc parameter, and use it.
4764 (register_data, supply_register, supply_register_zeroed)
4765 (supply_regblock, supply_register_by_name, collect_register)
4766 (collect_register_as_string, collect_register_by_name): Adjust.
4767 * regcache.h (struct target_desc): Forward declare.
4768 (struct regcache) <tdesc>: New field.
4769 (init_register_cache, new_register_cache): Add target_desc
4770 parameter.
4771 (regcache_invalidate_thread): Declare.
4772 (regcache_invalidate_one): Delete declaration.
4773 (regcache_release): Declare.
4774 (find_register_by_number, register_cache_size, register_size)
4775 (find_regno): Add target_desc parameter.
4776 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
4777 declarations.
4778 * remote-utils.c: Include tdesc.h.
4779 (outreg, prepare_resume_reply): Adjust.
4780 * server.c: Include tdesc.h.
4781 (gdbserver_xmltarget): Delete declaration.
4782 (get_features_xml, process_serial_event): Adjust.
4783 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
4784 declare.
4785 (struct process_info) <tdesc>: New field.
4786 (ipa_tdesc): Declare.
4787 * tdesc.c: New file.
4788 * tdesc.h: New file.
4789 * tracepoint.c: Include tdesc.h.
4790 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
4791 (get_context_regcache): Adjust to pass ipa_tdesc down.
4792 (do_action_at_tracepoint): Adjust to get the register cache size
4793 from the context regcache's description.
4794 (traceframe_walk_blocks): Adjust to get the register cache size
4795 from the current trace frame's description.
4796 (traceframe_get_pc): Adjust to get current trace frame's
4797 description and pass it down.
4798 (gdb_collect): Adjust to get the register cache size from the
4799 IPA's description.
4800 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
4801 (gdbserver_xmltarget): Delete.
4802 (initialize_low_tracepoint): Set the ipa's target description.
4803 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
4804 (initialize_low_tracepoint): Set the ipa's target description.
4805 * linux-x86-low.c: Include tdesc.h.
4806 [__x86_64__] (is_64bit_tdesc): New.
4807 (ps_get_thread_area, x86_get_thread_area): Use it.
4808 (i386_cannot_store_register): Rename to ...
4809 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
4810 (i386_cannot_fetch_register): Rename to ...
4811 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
4812 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
4813 to new interface.
4814 (target_regsets): Rename to ...
4815 (x86_regsets): ... this.
4816 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
4817 interface.
4818 (x86_siginfo_fixup): Use is_64bit_tdesc.
4819 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
4820 (tdesc_x32_avx_linux, tdesc_x32_linux)
4821 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
4822 Declare.
4823 (x86_linux_update_xmltarget): Delete.
4824 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
4825 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
4826 (AMD64_LINUX_USER64_CS): New.
4827 (x86_linux_read_description): New, based on
4828 x86_linux_update_xmltarget.
4829 (same_process_callback): New.
4830 (x86_arch_setup_process_callback): New.
4831 (x86_linux_update_xmltarget): New.
4832 (x86_regsets_info): New.
4833 (amd64_linux_regs_info): New.
4834 (i386_linux_usrregs_info): New.
4835 (i386_linux_regs_info): New.
4836 (x86_linux_regs_info): New.
4837 (x86_arch_setup): Reimplement.
4838 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
4839 (x86_emit_ops): Ditto.
4840 (the_low_target): Adjust. Install x86_linux_regs_info,
4841 x86_cannot_fetch_register, and x86_cannot_store_register.
4842 (initialize_low_arch): New.
4843 * linux-ia64-low.c (tdesc_ia64): Declare.
4844 (ia64_fetch_register): Adjust.
4845 (ia64_usrregs_info, regs_info): New globals.
4846 (ia64_regs_info): New function.
4847 (the_low_target): Adjust.
4848 (initialize_low_arch): New function.
4849 * linux-sparc-low.c (tdesc_sparc64): Declare.
4850 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
4851 Adjust.
4852 (sparc_arch_setup): New function.
4853 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
4854 (the_low_target): Adjust.
4855 (initialize_low_arch): New function.
4856 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
4857 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
4858 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
4859 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
4860 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
4861 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
4862 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
4863 (tdesc_powerpc_isa205_vsx64l): Declare.
4864 (ppc_cannot_store_register, ppc_collect_ptrace_register)
4865 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
4866 (ppc_set_pc, ppc_get_hwcap): Adjust.
4867 (ppc_usrregs_info): Forward declare.
4868 (!__powerpc64__) ppc_regmap_adjusted: New global.
4869 (ppc_arch_setup): Adjust to the current process'es target
4870 description.
4871 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
4872 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
4873 (ppc_store_evrregset): Adjust.
4874 (target_regsets): Rename to ...
4875 (ppc_regsets): ... this, and make static.
4876 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
4877 (ppc_regs_info): New function.
4878 (the_low_target): Adjust.
4879 (initialize_low_arch): New function.
4880 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
4881 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
4882 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
4883 (tdesc_s390x_linux64v2): Declare.
4884 (s390_collect_ptrace_register, s390_supply_ptrace_register)
4885 (s390_fill_gregset, s390_store_last_break): Adjust.
4886 (target_regsets): Rename to ...
4887 (s390_regsets): ... this, and make static.
4888 (s390_get_pc, s390_set_pc): Adjust.
4889 (s390_get_hwcap): New target_desc parameter, and use it.
4890 [__s390x__] (have_hwcap_s390_high_gprs): New global.
4891 (s390_arch_setup): Adjust to set the current process'es target
4892 description. Don't adjust the regmap.
4893 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
4894 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
4895 (regs_info_3264): New globals.
4896 (s390_regs_info): New function.
4897 (the_low_target): Adjust.
4898 (initialize_low_arch): New function.
4899 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
4900 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
4901 [__mips64] (init_registers_mips_linux)
4902 (init_registers_mips_dsp_linux): Delete defines.
4903 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
4904 (have_dsp): New global.
4905 (mips_read_description): New, based on mips_arch_setup.
4906 (mips_arch_setup): Reimplement.
4907 (get_usrregs_info): New function.
4908 (mips_cannot_fetch_register, mips_cannot_store_register)
4909 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
4910 (mips_fill_fpregset, mips_store_fpregset): Adjust.
4911 (target_regsets): Rename to ...
4912 (mips_regsets): ... this, and make static.
4913 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
4914 (dsp_regs_info, regs_info): New globals.
4915 (mips_regs_info): New function.
4916 (the_low_target): Adjust.
4917 (initialize_low_arch): New function.
4918 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
4919 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
4920 Declare.
4921 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
4922 (arm_read_description): New, with bits factored from
4923 arm_arch_setup.
4924 (arm_arch_setup): Reimplement.
4925 (target_regsets): Rename to ...
4926 (arm_regsets): ... this, and make static.
4927 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
4928 (arm_regs_info): New function.
4929 (the_low_target): Adjust.
4930 (initialize_low_arch): New function.
4931 * linux-m68k-low.c (tdesc_m68k): Declare.
4932 (target_regsets): Rename to ...
4933 (m68k_regsets): ... this, and make static.
4934 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
4935 (m68k_regs_info): New function.
4936 (m68k_arch_setup): New function.
4937 (the_low_target): Adjust.
4938 (initialize_low_arch): New function.
4939 * linux-sh-low.c (tdesc_sharch): Declare.
4940 (target_regsets): Rename to ...
4941 (sh_regsets): ... this, and make static.
4942 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
4943 (sh_regs_info, sh_arch_setup): New functions.
4944 (the_low_target): Adjust.
4945 (initialize_low_arch): New function.
4946 * linux-bfin-low.c (tdesc_bfin): Declare.
4947 (bfin_arch_setup): New function.
4948 (bfin_usrregs_info, regs_info): New globals.
4949 (bfin_regs_info): New function.
4950 (the_low_target): Adjust.
4951 (initialize_low_arch): New function.
4952 * linux-cris-low.c (tdesc_cris): Declare.
4953 (cris_arch_setup): New function.
4954 (cris_usrregs_info, regs_info): New globals.
4955 (cris_regs_info): New function.
4956 (the_low_target): Adjust.
4957 (initialize_low_arch): New function.
4958 * linux-cris-low.c (tdesc_crisv32): Declare.
4959 (cris_arch_setup): New function.
4960 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
4961 (cris_regs_info): New function.
4962 (the_low_target): Adjust.
4963 (initialize_low_arch): New function.
4964 * linux-m32r-low.c (tdesc_m32r): Declare.
4965 (m32r_arch_setup): New function.
4966 (m32r_usrregs_info, regs_info): New globals.
4967 (m32r_regs_info): Adjust.
4968 (initialize_low_arch): New function.
4969 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
4970 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
4971 (tic6x_usrregs_info): Forward declare.
4972 (tic6x_read_description): New function, based on ...
4973 (tic6x_arch_setup): ... this. Reimplement.
4974 (target_regsets): Rename to ...
4975 (tic6x_regsets): ... this, and make static.
4976 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
4977 (tic6x_regs_info): New function.
4978 (the_low_target): Adjust.
4979 (initialize_low_arch): New function.
4980 * linux-xtensa-low.c (tdesc_xtensa): Declare.
4981 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
4982 (target_regsets): Rename to ...
4983 (xtensa_regsets): ... this, and make static.
4984 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
4985 globals.
4986 (xtensa_arch_setup, xtensa_regs_info): New functions.
4987 (the_low_target): Adjust.
4988 (initialize_low_arch): New function.
4989 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
4990 (nios2_arch_setup): Set the current process'es tdesc.
4991 (target_regsets): Rename to ...
4992 (nios2_regsets): ... this.
4993 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
4994 (nios2_regs_info): New function.
4995 (the_low_target): Adjust.
4996 (initialize_low_arch): New function.
a261b8f5
PA
4997 * linux-aarch64-low.c (tdesc_aarch64): Declare.
4998 (aarch64_arch_setup): Set the current process'es tdesc.
4999 (target_regsets): Rename to ...
5000 (aarch64_regsets): ... this.
5001 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
5002 (aarch64_regs_info): New function.
5003 (the_low_target): Adjust.
5004 (initialize_low_arch): New function.
3aee8918
PA
5005 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
5006 globals.
5007 (target_regsets): Rename to ...
5008 (tile_regsets): ... this.
5009 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
5010 (tile_regs_info): New function.
5011 (tile_arch_setup): Set the current process'es tdesc.
5012 (the_low_target): Adjust.
5013 (initialize_low_arch): New function.
5014 * spu-low.c (tdesc_spu): Declare.
5015 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
5016 * win32-arm-low.c (tdesc_arm): Declare.
5017 (arm_arch_setup): New function.
5018 (the_low_target): Install arm_arch_setup instead of
5019 init_registers_arm.
5020 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
5021 (init_windows_x86): Rename to ...
5022 (i386_arch_setup): ... this. Set `win32_tdesc'.
5023 (the_low_target): Adjust.
5024 * win32-low.c (win32_tdesc): New global.
5025 (child_add_thread): Don't create the thread cache here.
5026 (do_initial_child_stuff): Set the new process'es tdesc.
5027 * win32-low.h (struct target_desc): Forward declare.
5028 (win32_tdesc): Declare.
5029 * lynx-i386-low.c (tdesc_i386): Declare global.
5030 (lynx_i386_arch_setup): Set `lynx_tdesc'.
5031 * lynx-low.c (lynx_tdesc): New global.
5032 (lynx_add_process): Set the new process'es tdesc.
5033 * lynx-low.h (struct target_desc): Forward declare.
5034 (lynx_tdesc): Declare global.
5035 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
5036 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
5037 * nto-low.c (nto_tdesc): New global.
5038 (do_attach): Set the new process'es tdesc.
5039 * nto-low.h (struct target_desc): Forward declare.
5040 (nto_tdesc): Declare.
5041 * nto-x86-low.c (tdesc_i386): Declare.
5042 (nto_x86_arch_setup): Set `nto_tdesc'.
5043
b1fbec62
GB
50442013-06-04 Gary Benson <gbenson@redhat.com>
5045
5046 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
5047 to qSupported response when appropriate.
5048 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
5049 with nonzero-length annex.
5050 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
5051 arguments supplied in annex.
5052
d1ec4ce7
DE
50532013-05-31 Doug Evans <dje@google.com>
5054
ac44adcb 5055 PR server/15594
d1ec4ce7
DE
5056 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
5057 64 bits in 64-cross-32 environment.
5058
9b25f2d3
PA
50592013-05-28 Pedro Alves <palves@redhat.com>
5060
5061 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
5062 (aarch64-without-fpu.c): Delete rule.
5063 * configure.srv (aarch64*-*-linux*): Remove references to
5064 aarch64-without-fpu.o and aarch64-without-fpu.xml.
5065 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
5066 declaration.
5067
6740dc9c
PA
50682013-05-24 Pedro Alves <palves@redhat.com>
5069
5070 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
5071 instead of strchr/decode_address. Error if the range isn't split
5072 with a ','. Don't assume there's be a ':' in the action.
5073
c2d6af84
PA
50742013-05-23 Yao Qi <yao@codesourcery.com>
5075 Pedro Alves <palves@redhat.com>
5076
5077 * linux-low.c (lwp_in_step_range): New function.
5078 (linux_wait_1): If the thread was range stepping and stopped
5079 outside the stepping range, report the stop to GDB. Otherwise,
5080 continue stepping. Add range stepping debug output.
5081 (linux_set_resume_request): Copy the step range from the resume
5082 request to the lwp.
5083 (linux_supports_range_stepping): New.
5084 (linux_target_ops) <supports_range_stepping>: Set to
5085 linux_supports_range_stepping.
5086 * linux-low.h (struct linux_target_ops)
5087 <supports_range_stepping>: New field.
5088 (struct lwp_info) <step_range_start, step_range_end>: New fields.
5089 * linux-x86-low.c (x86_supports_range_stepping): New.
5090 (the_low_target) <supports_range_stepping>: Set to
5091 x86_supports_range_stepping.
5092 * server.c (handle_v_cont): Handle 'r' action.
5093 (handle_v_requests): Append ";r" if the target supports range
5094 stepping.
5095 * target.h (struct thread_resume) <step_range_start,
5096 step_range_end>: New fields.
5097 (struct target_ops) <supports_range_stepping>:
5098 New field.
5099 (target_supports_range_stepping): New macro.
5100
58794e1a
JB
51012013-05-17 Joel Brobecker <brobecker@adacore.com>
5102
5103 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
5104 confusion in comment.
5105
d631c5a7
JB
51062013-05-17 Joel Brobecker <brobecker@adacore.com>
5107
5108 * lynx-low.c (struct process_info_private): New type.
5109 (lynx_add_process): New function.
5110 (lynx_create_inferior, lynx_attach): Replace calls to
5111 add_process by calls to lynx_add_process.
5112 (lynx_resume): If PTID is null, then try using
5113 current_process()->private->last_wait_event_ptid.
5114 Add comments.
5115 (lynx_clear_inferiors): Delete. The contents of that function
5116 has been inlined in lynx_mourn;
5117 (lynx_wait_1): Save the ptid in the process's private data.
5118 (lynx_mourn): Free the process' private data. Replace call
5119 to lynx_clear_inferiors by call to clear_inferiors.
5120
96f7a20f
YQ
51212013-05-17 Yao Qi <yao@codesourcery.com>
5122
5123 * i386-low.c (i386_length_and_rw_bits): Move the comment to
5124 the right place.
5125
db0dfaa0
LM
51262013-05-16 Luis Machado <lgustavo@codesourcery.com>
5127
5128 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
5129 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
5130 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
5131 PT_TEXT_END_ADDR guards. Update comments.
5132 (linux_target_op) <read_offsets>: Conditionally define to
5133 linux_read_offsets if the target is UCLIBC and if it defines
5134 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
5135
68f5f838
SL
51362013-05-06 Sandra Loosemore <sandra@codesourcery.com>
5137 Andrew Jenner <andrew@codesourcery.com>
5138
5139 * Makefile.in (SFILES): Add linux-nios2-low.c.
5140 (clean): Add action to delete nios2-linux.c.
5141 (nios2-linux.c): New rule.
5142 * configure.srv: Add nios2*-*-linux*.
5143 * linux-nios2-low.c: New.
5144
1ebff1fd
HAQ
51452013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
5146
5147 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
5148
f6150862
HZ
51492013-04-25 Hui Zhu <hui@codesourcery.com>
5150
5151 PR gdb/15186
f6150862
HZ
5152 * ax.c (ax_printf): Add fflush.
5153
614c279d
TT
51542013-04-22 Tom Tromey <tromey@redhat.com>
5155
5156 * Makefile.in (SFILES): Add filestuff.c.
5157 (OBS): Add filestuff.o.
5158 (filestuff.o): New target.
5159 * config.in, configure: Rebuild.
5160 * configure.ac: Check for fdwalk, pipe2.
5161
7d4e5717
PA
51622013-04-17 Pedro Alves <palves@redhat.com>
5163
5164 * configure.ac (USE_THREAD_DB): Delete variable.
5165 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
5166 Don't AC_SUBST USE_THREAD_DB.
5167 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
5168 * config.in, configure: Regenerate.
5169
d5c93e41
PA
51702013-04-16 Pedro Alves <palves@redhat.com>
5171
5172 * linux-low.h (struct lwp_info) <thread_known>: Move under
5173 the USE_THREAD_DB #ifdef.
5174
04f5fe89
PA
51752013-04-16 Pedro Alves <palves@redhat.com>
5176
5177 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
5178 (linux-low.o): Delete rule.
5179 * linux-low.h: Always include "gdb_thread_db.h" instead of
5180 conditionally including thread_db.h.
5181 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
5182 HAVE_THREAD_DB_H.
5183
480b27bf
JK
51842013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5185
5186 * Makefile.in (install-only): Fix make install regression.
5187
43662968
JK
51882013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
5189
5190 Convert man pages to texinfo, new gdbinit.5 texinfo page.
5191 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
5192 installation.
5193 * gdbserver.1: Remove.
5194
3e74e146
PA
51952013-03-22 Pedro Alves <palves@redhat.com>
5196
5197 * linux-low.c (handle_extended_wait): Don't call
5198 linux_enable_event_reporting.
5199
a8347a2a
TT
52002013-03-15 Tony Theodore <tonyt@logyst.com>
5201
5202 PR build/9098:
5203 * Makefile.in (SHELL): Use @SHELL@.
5204
eeb56fa7
SDJ
52052013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
5206
5207 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
5208 compiler warning.
5209
4fa7e2ff
JB
52102013-03-13 Joel Brobecker <brobecker@adacore.com>
5211
5212 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
5213 Remove extraneous NULL element.
5214
8ddb1965
YQ
52152013-03-13 Yao Qi <yao@codesourcery.com>
5216
5217 * tracepoint.c (traceframe_read_tsv): Look for the last matched
5218 'V' block in trace frame.
5219
9accd112
MM
52202013-03-11 Markus Metzger <markus.t.metzger@intel.com>
5221
5222 * target.h (struct target_ops): Add btrace ops.
5223 (target_supports_btrace): New macro.
5224 (target_enable_btrace): New macro.
5225 (target_disable_btrace): New macro.
5226 (target_read_btrace): New macro.
5227 * gdbthread.h (struct thread_info): Add btrace field.
5228 * server.c: Include btrace-common.h.
5229 (handle_btrace_general_set): New function.
5230 (handle_btrace_enable): New function.
5231 (handle_btrace_disable): New function.
5232 (handle_general_set): Call handle_btrace_general_set.
5233 (handle_qxfer_btrace): New function.
5234 (struct qxfer qxfer_packets[]): Add btrace entry.
5235 * inferiors.c (remove_thread): Disable btrace.
5236 * linux-low: Include linux-btrace.h.
5237 (linux_low_enable_btrace): New function.
5238 (linux_low_read_btrace): New function.
5239 (linux_target_ops): Add btrace ops.
5240 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
5241 Add srv_linux_btrace=yes.
5242 (x86_64-*-linux*): Add linux-btrace.o.
5243 Add srv_linux_btrace=yes.
5244 * configure.ac: Define HAVE_LINUX_BTRACE.
5245 * config.in: Regenerated.
5246 * configure: Regenerated.
5247
5cc22e4c
MM
52482013-03-11 Markus Metzger <markus.t.metzger@intel.com>
5249
5250 * server.c (handle_qxfer): Preserve error message if -3 is
5251 returned.
5252 (qxfer): Document the -3 return value.
5253
7c97f91e
MM
52542013-03-11 Markus Metzger <markus.t.metzger@intel.com>
5255
5256 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
5257 (linux_btrace_h): New variable.
5258 (linux-btrace.o): New rule.
5259
be9a119c 52602013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
5261 Hafiz Abid Qadeer <abidh@codesourcery.com>
5262
5263 * tracepoint.c (trace_buffer_size): New global.
5264 (DEFAULT_TRACE_BUFFER_SIZE): New define.
5265 (init_trace_buffer): Change to one-argument function. Allocate
5266 trace buffer memory.
5267 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
5268 handle QTBuffer:size packet.
5269 (cmd_bigqtbuffer_size): New function.
5270 (initialize_tracepoint): Call init_trace_buffer with
5271 DEFAULT_TRACE_BUFFER_SIZE.
5272 * server.c (handle_query): Add QTBuffer:size in the
5273 supported packets.
5274
e64f7499
YQ
52752013-03-07 Yao Qi <yao@codesourcery.com>
5276
5277 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
5278 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
5279 of -1.
5280 (cmd_qtsp): Adjust condition. Do post increment.
5281 Set cur_action and cur_step_action back to 0.
5282
f0ae6fc3
PA
52832013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
5284
5285 PR server/15236
5286 * linux-low.c (linux_write_memory): Return early success if LEN is
5287 zero.
5288
b5b0b0af
CV
52892013-03-05 Corinna Vinschen <vinschen@redhat.de>
5290
334ad4a8 5291 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 5292
589bc927
TT
52932013-02-28 Tom Tromey <tromey@redhat.com>
5294
5295 * configure.ac: Invoke AC_SYS_LARGEFILE.
5296 * configure, config.in: Rebuild.
5297
dfe07582
CV
52982013-02-28 Corinna Vinschen <vinschen@redhat.com>
5299
5300 * win32-low.c: Throughout, fix format strings and casts of
5301 printf-like functions to avoid type related warnings on all
5302 platforms.
5303 (get_child_debug_event): Print dwDebugEventCode as hex since
5304 that's how it's usually documented.
5305
736cd585
YQ
53062013-02-28 Yao Qi <yao@codesourcery.com>
5307
5308 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
5309 pulongest.
5310
e1f58301
JW
53112013-02-27 Jiong Wang <jiwang@tilera.com>
5312
5313 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
5314 (reg-tilegx32.c): New rule.
5315 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
5316 * linux-tile-low.c (tile_arch_setup): New function. Invoke
5317 different register info initializer according to elf class.
5318 (init_registers_tilgx32): New function. The tilegx32 register info
5319 initializer.
5320 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
5321 (tile_store_gregset): Likewise.
5322
d171ca78
YQ
53232013-02-27 Yao Qi <yao@codesourcery.com>
5324
5325 * server.c (process_point_options): Print debug message when
5326 debug_threads is true.
5327
282bbdf3
YQ
53282013-02-26 Yao Qi <yao@codesourcery.com>
5329
5330 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
5331
aca22551
PA
53322013-02-19 Pedro Alves <palves@redhat.com>
5333 Kai Tietz <ktietz@redhat.com>
5334
5335 PR gdb/15161
5336
5337 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
5338 instead of strtoul to extract address from packet.
5339 (process_serial_event) <'z'>: Likewise.
5340
4f3cee1c
YQ
53412013-02-18 Yao Qi <yao@codesourcery.com>
5342
5343 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
5344
8e1d55a3
PA
53452013-02-14 Pedro Alves <palves@redhat.com>
5346
5347 Plug memory leak.
5348
5349 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
5350 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
5351
458820da
PA
53522013-02-14 Pedro Alves <palves@redhat.com>
5353
5354 * tracepoint.c (cmd_qtdpsrc): Use savestring.
5355
baea0dae
PA
53562013-02-14 Pedro Alves <palves@redhat.com>
5357
5358 * tracepoint.c (save_string): Delete.
5359 (add_tracepoint_action): Use savestring instead of save_string.
5360
0b1afbb3
PA
53612013-02-12 Pedro Alves <palves@redhat.com>
5362
5363 * linux-xtensa-low.c: Ditto.
5364 * xtensa-xtregs.c: Ditto.
5365
8a4ac37e
PA
53662013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
5367
5368 * thread-db.c (thread_db_get_tls_address): NULL pointer check
5369 thread_db.
5370
148de6bb
MS
53712013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
5372
5373 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
5374 aarch64_num_wp_regs and aarch64_num_bp_regs to
5375 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
5376
55fac6e0
MS
53772013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
5378
5379 * linux-aarch64-low.c (ps_get_thread_area): Replace
5380 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
5381
176eb98c
MS
53822013-02-04 Jim MacArthur <jim.macarthur@arm.com>
5383 Marcus Shawcroft <marcus.shawcroft@arm.com>
5384 Nigel Stephens <nigel.stephens@arm.com>
5385 Yufeng Zhang <yufeng.zhang@arm.com>
5386
5387 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
5388 (aarch64.c, aarch64-without-fpu.c): New targets.
5389 * configure.srv (aarch64*-*-linux*): New.
5390 * linux-aarch64-low.c: New file.
5391
56f7af9c
MS
53922013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
5393
43aaf8b6 5394 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
5395 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
5396 (dequeue_one_deferred_signal, linux_resume_one_thread)
5397 (fetch_register, linux_write_memory, linux_enable_event_reporting)
5398 (linux_tracefork_grandchild, linux_test_for_tracefork)
5399 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
5400 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
5401 where the argument is 0.
5402
60f662b0
YQ
54032013-01-25 Yao Qi <yao@codesourcery.com>
5404
5405 * event-loop.c: Include "queue.h".
5406 (gdb_event_p): New typedef.
5407 (struct gdb_event) <next_event>: Remove.
5408 (event_queue): Change to QUEUE(gdb_event_p).
5409 (async_queue_event): Remove.
5410 (gdb_event_xfree): New.
5411 (initialize_event_loop): New.
5412 (process_event): Use API from QUEUE.
5413 (wait_for_event): Likewise.
5414 * server.c (main): Call initialize_event_loop.
5415 * server.h (initialize_event_loop): Declare.
5416
5ae4861a
YQ
54172013-01-18 Yao Qi <yao@codesourcery.com>
5418
5419 * ax.h (struct eval_agent_expr_context): New.
5420 (gdb_eval_agent_expr): Update declaration.
5421 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
5422 TFRAME. Add new argument CTX.
5423 * server.h (struct eval_agent_expr_context): Declare.
5424 (agent_mem_read, agent_tsv_read): Update declaration.
5425 (agent_mem_read_string): Likewise.
5426 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
5427 (add_traceframe_block): Add new argument TPOINT.
5428 Increase TPOINT->traceframe_usage.
5429 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
5430 eval_tracepoint_agent_expr.
5431 (condition_true_at_tracepoint): Likewise.
5432 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
5433 (agent_mem_read_string, agent_tsv_read): Likewise.
5434
85e00e85
YQ
54352013-01-16 Yao Qi <yao@codesourcery.com>
5436
5437 * linux-low.c (linux_resume_one_lwp): Don't check
5438 'lwp->bp_reinsert != 0'.
5439
4039cf45
JB
54402013-01-07 Joel Brobecker <brobecker@adacore.com>
5441 Pedro Alves <palves@redhat.com>
5442
5443 * lynx-low.c (ptrace_request_to_str): Define a temporary
5444 macro and use it to simplify this function's implementation.
5445
9044dee2
JB
54462013-01-07 Joel Brobecker <brobecker@adacore.com>
5447
5448 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
5449 sets errno.
5450
e6352c8f
JB
54512013-01-07 Joel Brobecker <brobecker@adacore.com>
5452
5453 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
5454
50681a27
JB
54552013-01-07 Joel Brobecker <brobecker@adacore.com>
5456
5457 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
5458
3f6e77ef
JB
54592013-01-07 Joel Brobecker <brobecker@adacore.com>
5460
5461 * lynx-low.c (lynx_resume): Use the resume_info parameter
5462 to determine the ptid for the lynx_ptrace call, unless
5463 it is equal to minus_one_ptid, in which case we use the
5464 ptid of the current_inferior.
5465 (lynx_wait_1): After having received a thread create/exit
5466 event, resume the inferior's execution using the signaling
5467 thread's ptid, rather than the old ptid.
5468
7fda33ae
JB
54692013-01-07 Joel Brobecker <brobecker@adacore.com>
5470
5471 * lynx-low.c (lynx_resume): Delete variable ret.
5472
b9786c74
JB
54732013-01-01 Joel Brobecker <brobecker@adacore.com>
5474
5475 * gdbreplay.c (gdbreplay_version): Update copyright year.
5476 * server.c (gdbserver_version): Likewise.
5477
8b93d60f
JB
54782012-12-17 Joel Brobecker <brobecker@adacore.com>
5479
5480 * lynx-low.c (lynx_wait_1): Add debug trace before adding
5481 new thread.
5482
037335a7
JB
54832012-12-17 Joel Brobecker <brobecker@adacore.com>
5484
5485 * lynx-low.c (ptrace_request_to_str): Add handling for
5486 PTRACE_GETTRACESIG.
5487
52d4cbd8
JB
54882012-12-17 Joel Brobecker <brobecker@adacore.com>
5489
5490 * lynx-low.c (lynx_attach): Delete variable new_process.
5491
ab8f6ca9
JB
54922012-12-17 Joel Brobecker <brobecker@adacore.com>
5493
5494 * lynx-low.c (lynx_create_inferior): Delete variable
5495 new_process.
5496
78cbc024
JB
54972012-12-17 Joel Brobecker <brobecker@adacore.com>
5498
5499 * lynx-low.c (ptrace_request_to_str): Do not handle
5500 PTRACE_GETTHREADLIST if this macro does not exist.
5501
14a00470
YQ
55022012-12-15 Yao Qi <yao@codesourcery.com>
5503
5504 * Makefile.in (OBS): Add notif.o.
5505 * notif.c, notif.h: New.
5506 * server.c: Include "notif.h".
5507 (struct vstop_notif) <next>: Remove.
5508 <base>: New field.
5509 (queue_stop_reply): Update.
5510 (push_event, send_next_stop_reply): Remove.
5511 (discard_queued_stop_replies): Update.
5512 (notif_stop): New variable.
5513 (handle_v_stopped): Remove.
5514 (handle_v_requests): Don't call handle_v_stopped. Call
5515 handle_ack_notif instead.
5516 (queue_stop_reply_callback): Call notif_event_enque instead
5517 of queue_stop_reply.
5518 (handle_status): Don't call send_next_stop_reply, call
5519 notif_write_event instead.
5520 (kill_inferior_callback): Likewise.
5521 (detach_or_kill_inferior_callback): Likewise.
5522 (main): Call initialize_notif.
5523 (process_serial_event): Call QUEUE_is_empty.
5524 (handle_target_event): Call notif_push instead of push event.
5525 * server.h (push_event): Remove declaration.
5526
61c125b9
TT
55272012-12-10 Tom Tromey <tromey@redhat.com>
5528
5529 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
5530 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
5531 macros.
5532 (.c.o): Rewrite.
5533 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
5534 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
5535 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
5536 (amd64-linux-ipa.o, ax.o): Rewrite.
5537 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
5538 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
5539 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
5540 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
5541 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
5542 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
5543 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
5544 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
5545 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
5546 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
5547 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
5548 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
5549 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
5550 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
5551 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
5552 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
5553 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
5554 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
5555 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
5556 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
5557 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
5558 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
5559 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
5560 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
5561 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
5562 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
5563 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
5564 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
5565 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
5566 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
5567 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
5568 (reg-tilegx.o): Remove.
5569 (all_object_files): New macro.
5570 Include .deps files.
5571 * aclocal.m4, configure: Rebuild.
5572 * acinclude.m4: Include depstand.m4, lead-dot.m4.
5573 * configure.ac: Invoke ZW_CREATE_DEPDIR,
5574 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
5575
e90e9ad9
TT
55762012-12-05 Tom Tromey <tromey@redhat.com>
5577
5578 PR gdb/14917:
5579 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
5580
02d403bf 55812012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
5582
5583 * configure.ac: Check for linux/perf_event.h.
5584 * config.in: Regenerated.
5585 * configure: Regenerated.
5586
0270a750
PA
55872012-11-26 Maxime Villard <rustyBSD@gmx.fr>
5588
5589 * hostio.c (handle_readlink): Decrease buffer size
5590 parameter passed to readlink by one byte.
5591
8c29b58e
YQ
55922012-11-26 Yao Qi <yao@codesourcery.com>
5593
5594 * configure.ac (build_warnings): Append '-Wempty-body'.
5595 * configure: Regenerated.
5596 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
5597 body.
5598
8bdce1ff
PM
55992012-11-15 Pierre Muller <muller@sourceware.org>
5600
5601 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
5602 * config.in: Regenerate.
5603 * configure: Regenerate.
5604 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
5605 Use "gdb_wait.h" header instead of <sys/wait.h> header.
5606 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
5607 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
5608 header.
5609 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
5610 instead of <sys/wait.h> header.
5611 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
5612
02d403bf 56132012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
5614
5615 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
5616 (various make rules): Remove -DGDBSERVER
5617
fbd5db48
YQ
56182012-11-09 Yao Qi <yao@codesourcery.com>
5619
5620 * spu-low.c (current_ptid): Move it to ..
5621 * gdbthread.h: ... here. New.
5622 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
5623 * server.c (myresume, process_serial_event): Likewise.
5624 * thread-db.c (thread_db_find_new_threads): Likewise.
5625 * tracepoint.c (run_inferior_command): Likewise.
5626
b3dc46ff
AB
56272012-10-01 Andrew Burgess <aburgess@broadcom.com>
5628
5629 * server.c (handle_search_memory_1): Include access length in
5630 warning message.
5631
07c04788
HPN
56322012-09-05 Michael Brandt <michael.brandt@axis.com>
5633
5634 * linux-crisv32-low.c: Fix compile errors.
5635
918d227b
YQ
56362012-09-04 Yao Qi <yao@codesourcery.com>
5637
5638 * tracepoint.c (cmd_qtsv): Adjust debug message.
5639 Don't check CUR_TPOINT.
5640
18c1b81a
YQ
56412012-08-28 Yao Qi <yao@codesourcery.com>
5642
5643 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
5644 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
5645 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
5646 Remove declarations of xmalloc, xreallloc, xstrdup and
5647 freeargv.
5648 * Makefile.in (libiberty_h): New.
5649 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
5650 (linux-bfin-low.o): Append dependency 'libiberty.h'.
5651
dc82f37b
YQ
56522012-08-23 Yao Qi <yao@codesourcery.com>
5653
5654 * server.h: Remove declaration of 'xsnprintf'.
5655
406b1477
KS
56562012-08-22 Keith Seitz <keiths@redhat.com>
5657
5658 * server.h: Include build-gnulib-gbserver/config.h.
5659 * gdbreplay.c: Likewise.
5660
e6712ff1
DE
56612012-08-08 Doug Evans <dje@google.com>
5662
5663 * Makefile.in (SFILES): Add gdb_vecs.c.
5664 (OBS): Add gdb_vecs.o.
5665 (gdb_vecs_h, host_defs_h): New variables.
5666 (thread-db.o): Add $(gdb_vecs_h) dependency.
5667 (gdb_vecs.o): New rule.
5668 * thread-db.c: #include "gdb_vecs.h".
5669 (thread_db_load_search): Use a vector to iterate over path elements.
5670 Handle text appearing after "$pdir".
5671
5672 * configure.ac: Add check for strstr.
5673 * config.in: Regenerate.
5674 * configure: Regenerate.
5675
7c3270ae
UW
56762012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
5677
5678 * hostio.c (handle_pread): If pread fails, fall back to attempting
5679 lseek/read.
5680 (handle_pwrite): Likewise for pwrite.
5681
b62e2b27
UW
56822012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
5683
5684 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
5685 between unsupported TYPE and unimplementable ADDR/LEN combination.
5686 (arm_insert_point): Act on new return value.
5687
78a99e91
PA
56882012-07-31 Pedro Alves <palves@redhat.com>
5689
5690 * server.c (process_point_options): Only skip tokens if we find
5691 one that is unrecognized. Don't treat 'X' specially while
5692 skipping unrecognized tokens.
5693
fcf303ab
UW
56942012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
5695
5696 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
5697 to 4-byte-align HW breakpoint addresses for Thumb.
5698
7255706c
YQ
56992012-07-27 Yao Qi <yao@codesourcery.com>
5700
5701 PR remote/14161.
5702
5703 * server.h: Declare gdb_agent_about_to_close.
5704 * target.c (kill_inferior): Include "agent.h".
5705 New. Send command 'kill'.
5706 * target.h (kill_inferior): Removed macro.
5707 * tracepoint.c (gdb_agent_about_to_close): New.
5708 (gdb_agent_helper_thread): Handle command 'close'.
5709 Wait endlessly until the inferior stops.
5710 Install gdb_agent_remove_socket to atexit hook.
5711 (agent_socket_name): New static variable.
5712 (gdb_agent_socket_init): Replace local variable 'name' with
5713 'agent_socket_name'.
5714 (gdb_agent_remove_socket): New.
5715
5a3f286f
YQ
57162012-07-27 Yao Qi <yao@codesourcery.com>
5717
5718 * server.c (process_point_options): Stop at 'X' when parsing.
5719
961bd387
ME
57202012-07-19 Michael Eager <eager@eagercon.com>
5721
a261b8f5 5722 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
5723 to hw_execute.
5724 * linux-x86-low.c (x86_insert_point, x86_remove_point):
5725 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
5726 hardware breakpoint.
5727
aa7c7447
JK
57282012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5729
5730 * gdbserver/linux-low.c (initialize_low): Call
5731 linux_ptrace_init_warnings.
5732
7f216e7c
DE
57332012-07-02 Doug Evans <dje@google.com>
5734
5735 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
5736 pointer to int.
5737
d3ce09f5
SS
57382012-07-02 Stan Shebs <stan@codesourcery.com>
5739
5740 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
5741 (ax.o): Add it to build rule.
5742 (ax-ipa.o): Ditto.
5743 (OBS): Add format.o.
5744 (IPA_OBS): Add format.o.
5745 * server.c (handle_query): Claim support for breakpoint commands.
5746 (process_point_options): Add command case.
5747 (process_serial_event): Leave running if there are printfs in
5748 effect.
5749 * mem-break.h (any_persistent_commands): Declare.
5750 (add_breakpoint_commands): Declare.
5751 (gdb_no_commands_at_breakpoint): Declare.
5752 (run_breakpoint_commands): Declare.
5753 * mem-break.c (struct point_command_list): New struct.
5754 (struct breakpoint): New field command_list.
5755 (any_persistent_commands): New function.
5756 (add_commands_to_breakpoint): New function.
5757 (add_breakpoint_commands): New function.
5758 (gdb_no_commands_at_breakpoint): New function.
5759 (run_breakpoint_commands): New function.
5760 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
5761 locally.
5762 * ax.c: Include format.h.
5763 (ax_printf): New function.
5764 (gdb_eval_agent_expr): Add printf opcode.
5765
2f8f6aed
YQ
57662012-06-13 Yao Qi <yao@codesourcery.com>
5767
5768 * server.c (start_inferior): Remove duplicated writes to fields
5769 'last_resume_kind' and 'last_status' of 'current_inferior'.
5770
0c9070b3
YQ
57712012-06-12 Yao Qi <yao@codesourcery.com>
5772 Pedro Alves <palves@redhat.com>
5773
5774 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
5775 comment.
5776 * server.c (handle_v_cont): Extend comment.
5777
c52daf70
YQ
57782012-06-11 Yao Qi <yao@codesourcery.com>
5779
5780 * linux-low.c (linux_attach): Add 'static'.
5781
d38bbb0a
YQ
57822012-06-06 Yao Qi <yao@codesourcery.com>
5783
5784 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
5785
89dc0afd
JK
57862012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
5787
5788 Fix gcc -flto compilation warning.
5789 * server.c (main): Make variable multi_mode and attach volatile.
5790
75f62ce7
TJB
57912012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5792
5793 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
5794 if the platform doesn't know about it.
5795
65f479b6
PA
57962012-05-30 Jeff Kenton <jkenton@tilera.com>
5797
5798 * Makefile.in (SFILES): Add linux-tile-low.c.
5799 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
5800 * configure.srv: Handle tilegx-*-linux*.
5801 * linux-tile-low.c: New file.
5802
0c5bf5a9
JK
58032012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5804
5805 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
5806
a493e3e2
PA
58072012-05-24 Pedro Alves <palves@redhat.com>
5808
5809 PR gdb/7205
5810
43aaf8b6 5811 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 5812
2ea28649
PA
58132012-05-24 Pedro Alves <palves@redhat.com>
5814
5815 PR gdb/7205
5816
5817 Replace target_signal with gdb_signal throughout.
5818
8d409d16
MR
58192012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
5820
5821 * linux-low.c (linux_store_registers): Avoid the copying sequence
5822 when no data has been retrieved by ptrace.
5823
23512c01
MGD
58242012-05-22 Will Deacon <will.deacon@arm.com>
5825
5826 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
5827 Include asm/ptrace.h.
5828 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
5829 already defined.
5830
4934b29e
MR
58312012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
5832
5833 * linux-low.c (linux_store_registers): Don't re-retrieve data
5834 with ptrace that has already been obtained from /proc. Always
5835 copy any data retrieved with ptrace to the buffer supplied.
5836
bde24c0a
PA
58372012-05-11 Yao Qi <yao@codesourcery.com>
5838 Pedro Alves <palves@redhat.com>
5839
5840 * linux-low.c (enum stopping_threads_kind): New.
5841 (stopping_threads): Change type to `enum stopping_threads_kind'.
5842 (handle_extended_wait): If stopping and suspending threads, leave
5843 the new_lwp suspended too.
5844 (linux_wait_for_event): Adjust.
5845 (stop_all_lwps): Set `stopping_threads' to
5846 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
5847 whether we're suspending threads or just stopping them. Assert no
5848 recursion happens.
5849
623b6bdf
YQ
58502012-04-29 Yao Qi <yao@codesourcery.com>
5851
5852 * server.h: Move some code to ...
5853 * gdbthread.h: ... here. New.
5854 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
5855 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
5856 (nto-low.o, win32-low.o): Likewise.
5857 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
5858 * regcache.c, remote-utils.c, server.c: Likewise.
5859 * target.c, tracepoint.c, win32-low.c: Likewise.
5860
f15f9948
TJB
58612012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5862
5863 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
5864 (PTRACE_ARG4_TYPE): Likewise.
5865 (PTRACE_XFER_TYPE): Likewise.
5866 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
5867 ptrace to PTRACE_ARG3_TYPE.
5868 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
5869 (PTRACE_ARG4_TYPE): Likewise.
5870 (PTRACE_XFER_TYPE): Likewise.
5871 (linux_detach_one_lwp): Cast fourth argument of
5872 ptrace to long then PTRACE_ARG4_TYPE.
5873 (regsets_fetch_inferior_registers): Cast third argument of
5874 ptrace to long then PTRACE_ARG3_TYPE.
5875 (regsets_store_inferior_registers): Likewise.
5876
38ea300a
PA
58772012-04-20 Pedro Alves <palves@redhat.com>
5878
5879 * configure: Regenerate.
5880
c971b7fa
PA
58812012-04-19 Pedro Alves <palves@redhat.com>
5882
43aaf8b6 5883 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 5884 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
5885 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
5886 (all, install-only, uninstall, clean-info, all-lib, clean): No
5887 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
5888 (maintainer-clean realclean distclean): Use subdir_do.
5889 (subdir_do): New.
5890 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 5891 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
5892 * acinclude.m4: Include acx_configure_dir.m4.
5893 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
5894 calls. Call AC_PROG_RANLIB. Configure gnulib using
5895 ACX_CONFIGURE_DIR.
5896 (GNULIB): New.
5897 (GNULIB_STDINT_H): Adjust.
5898 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
5899 * gdbreplay.c: Include build-gnulib/config.h.
5900 * server.h: Likewise.
5901 * aclocal.m4: Regenerate.
5902 * config.in: Regenerate.
5903 * configure: Regenerate.
c971b7fa 5904
809277f8
PA
59052012-04-19 Pedro Alves <palves@redhat.com>
5906
5907 * Makefile.in (LIBGNU, INCGNU): Adjust.
5908 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
5909 (all, install-only, uninstall, clean-info, all-lib, clean)
5910 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
5911 * configure.ac: Adjust AC_OUTPUT output.
5912 * aclocal.m4: Regenerate.
5913 * configure: Regenerate.
5914
fd9bb8b8
PA
59152012-04-19 Pedro Alves <palves@redhat.com>
5916
5917 * Makefile.in (generated_files): New.
5918 (server_h): Remove the explicit dependency on config.h, and depend
5919 on $generated_files.
5920
1c298c66
PA
59212012-04-19 Pedro Alves <palves@redhat.com>
5922
5923 * Makefile.in (INCGNU): Add -Ignulib.
5924
57c4b50b
PA
59252012-04-19 Pedro Alves <palves@redhat.com>
5926
5927 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
5928 (INCGNU): ... this, and spell out -I here.
5929 (GNULIB_LIB): Rename to ...
5930 (LIBGNU): ... this.
5931 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
5932
1030e047
PA
59332012-04-19 Pedro Alves <palves@redhat.com>
5934
5935 * config.in: Regenerate.
5936
447d4319
PA
59372012-04-19 Pedro Alves <palves@redhat.com>
5938
5939 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
5940 * server.h (memmem): Remove declaration.
5941 * config.in: Regenerate.
5942 * configure: Regenerate.
5943
aad9eab9
YQ
59442012-04-19 Yao Qi <yao@codesourcery.com>
5945
5946 * Makefile.in (SFILES): Add common/vec.c.
5947 (OBS): Add vec.o.
5948 (vec.o): New rule.
5949
3e10640f
YQ
59502012-04-19 Yao Qi <yao@codesourcery.com>
5951
5952 * remote-utils.c (prepare_resume_reply): Replace with macro
5953 target_core_of_thread.
5954 * server.c (handle_qxfer_threads_proper): Likewise.
5955 * target.h (traget_core_of_thread): New macro.
5956
71622373
PA
59572012-04-18 Pedro Alves <palves@redhat.com>
5958
5959 * aclocal.m4: Regenerate.
5960 * configure: Regenerate.
5961
80d26939
YQ
59622012-04-16 Yao Qi <yao@codesourcery.com>
5963
5964 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
5965 duplicated on address.
5966
42476b70
YQ
59672012-04-16 Yao Qi <yao@codesourcery.com>
5968
5969 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
5970 (struct tracepoint_action_ops) <send>: New field.
5971 (m_tracepoint_action_send, r_tracepoint_action_send): New.
5972 (agent_expr_send, x_tracepoint_action_send): New.
5973 (l_tracepoint_action_send): New.
5974 (cmd_qtdp): Download and install tracepoint
5975 according to `use_agent'.
5976 (run_inferior_command): Add one more parameter `len'.
5977 Update callers.
5978 (tracepoint_send_agent): New.
5979 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
5980
7bc83639
YQ
59812012-04-16 Yao Qi <yao@codesourcery.com>
5982
5983 * tracepoint.c (download_tracepoints): Moved to ...
5984 (cmd_qtstart): ... here.
5985
5f18041e
YQ
59862012-04-14 Yao Qi <yao@codesourcery.com>
5987
5988 * tracepoint.c: Include inttypes.h.
5989 (struct collect_memory_action): Use sized types.
5990 (struct tracepoint): Likewise.
5991 (cmd_qtdp, stop_tracing): Update print specifiers.
5992 (cmd_qtp, response_tracepoint): Likewise.
5993 (collect_data_at_tracepoint): Likewise.
5994 (collect_data_at_step): Likewise.
5995
55a8c076
YQ
59962012-04-14 Yao Qi <yao@codesourcery.com>
5997
5998 Import gnulib module inttypes.
5999 * aclocal.m4, config.in, configure: Regenerated.
6000
dc750257
YQ
60012012-04-14 Yao Qi <yao@codesourcery.com>
6002
6003 * Makefile.in (maintainer-clean, realclean, distclean): Remove
6004 Makefile and config.status at last.
6005
0ab5faf9
YQ
60062012-04-13 Yao Qi <yao@codesourcery.com>
6007
6008 * tracepoint.c: Include stdint.h unconditionally.
6009
18f5fd81
TJB
60102012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
6011
6012 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
6013 on BFD_HAVE_SYS_PROCFS_TYPE.
6014 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
6015 * configure: Regenerate.
6016 * config.in: Likewise.
6017
4d47af5c
L
60182012-04-13 H.J. Lu <hongjiu.lu@intel.com>
6019
6020 * Makefile.in (clean): Also remove x32.c x32-linux.c
6021 x32-avx.c x32-avx-linux.c.
6022 (x32.o): New target.
6023 (x32.c): Likewise.
6024 (x32-linux.o): Likewise.
6025 (x32-linux.c): Likewise.
6026 (x32-avx.o): Likewise.
6027 (x32-avx.c): Likewise.
6028 (x32-avx-linux.o): Likewise.
6029 (x32-avx-linux.c): Likewise.
6030
6031 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
6032 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
6033 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
6034 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
6035 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
6036 i386/x32-avx-linux.xml.
6037
6038 * linux-x86-low.c (init_registers_x32_linux): New prototype.
6039 (init_registers_x32_avx_linux): Likwise.
6040 (x86_linux_update_xmltarget): Call init_registers_x32_linux
6041 or init_registers_x32_avx_linux if linux_is_elf64 is false.
6042
ecedbe58
PA
60432012-04-13 Pedro Alves <palves@redhat.com>
6044
6045 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
6046 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
6047 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
6048 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
6049 the sub-make.
6050
c92b5177
L
60512012-04-12 H.J. Lu <hongjiu.lu@intel.com>
6052
6053 * linux-x86-low.c (compat_x32_clock_t): New.
6054 (compat_x32_siginfo_t): Likewise.
6055 (compat_x32_siginfo_from_siginfo): Likewise.
6056 (siginfo_from_compat_x32_siginfo): Likewise.
6057 (linux_is_elf64): Likewise.
6058 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
6059 and siginfo_from_compat_x32_siginfo for x32.
6060 (x86_arch_setup): Set linux_is_elf64.
6061
214d508e
L
60622012-04-12 H.J. Lu <hongjiu.lu@intel.com>
6063
6064 PR gdb/13969
6065 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
6066 e_machine field.
6067 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
6068 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
6069 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
6070 compatible with process.
6071
c9a1864a
YQ
60722012-04-12 Yao Qi <yao@codesourcery.com>
6073
6074 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
6075 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
6076 (install-only, install-info, clean): Handle sub dir gnulib.
6077 (all-lib, am--refresh): New targets.
6078 (memmem.o): Remove target.
6079 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
6080 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
6081 (AC_REPLACE_FUNCS): Remove memmem.
6082 Invoke gl_INIT and AM_INIT_AUTOMAKE.
6083 (AC_OUTPUT): Generate Makefile in gnulib/.
6084 * aclocal.m4, config.in, configure: Regenerated.
6085
367ba2c2
MR
60862012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
6087
6088 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
6089
9d236627
PA
60902012-04-05 Pedro Alves <palves@redhat.com>
6091
6092 -Werror=strict-aliasing
6093
6094 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
6095 pointer.
6096
111217b3
PA
60972012-04-04 Pedro Alves <palves@redhat.com>
6098
6099 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
6100 (sparc_store_gregset_from_stack, sparc_store_gregset)
6101 (sparc_breakpoint_at): Fix formatting.
6102
8365dcf5
TJB
61032012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
6104
6105 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
6106 are available.
6107 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
6108 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
6109 * config.in: Regenerate.
6110 * configure: Likewise.
6111
689cc2ae
PA
61122012-03-29 Pedro Alves <palves@redhat.com>
6113
6114 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
6115 Correct ptrace arguments.
6116
c14dfd32
PA
61172012-03-28 Pedro Alves <palves@redhat.com>
6118
6119 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
6120 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
6121 (IA64_FR1_REGNUM): New defines.
6122 (ia64_fetch_register): New.
6123 (the_low_target): Install it.
6124 * linux-low.h (struct linux_target_ops) <fetch_register>: New
6125 field.
6126 * linux-low.c (linux_fetch_registers): Try the
6127 the_low_target.fetch_register hook first.
6128
6129 * linux-arm-low.c (the_low_target): Adjust.
6130 * linux-bfin-low.c (the_low_target): Adjust.
6131 * linux-cris-low.c (the_low_target): Adjust.
6132 * linux-crisv32-low.c (the_low_target): Adjust.
6133 * linux-m32r-low.c (the_low_target): Adjust.
6134 * linux-m68k-low.c (the_low_target): Adjust.
6135 * linux-mips-low.c (the_low_target): Adjust.
6136 * linux-ppc-low.c (the_low_target): Adjust.
6137 * linux-s390-low.c (the_low_target): Adjust.
6138 * linux-sh-low.c (the_low_target): Adjust.
6139 * linux-sparc-low.c (the_low_target): Adjust.
6140 * linux-tic6x-low.c (the_low_target): Adjust.
6141 * linux-x86-low.c (the_low_target): Adjust.
6142 * linux-xtensa-low.c (the_low_target): Adjust.
6143
63c88e13
PA
61442012-03-26 Pedro Alves <palves@redhat.com>
6145
6146 * server.c (handle_qxfer_libraries): Don't bail early if
6147 the_target->qxfer_libraries_svr4 is not NULL.
6148
fb723180
PA
61492012-03-26 Pedro Alves <palves@redhat.com>
6150
6151 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
6152
0afae3cf
PA
61532012-03-23 Pedro Alves <palves@redhat.com>
6154
6155 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
6156 "library-list-svr4" element's start tag when the the DSO list is
6157 empty.
6158
485f1ee4
PA
61592012-03-23 Pedro Alves <palves@redhat.com>
6160
6161 * linux-low.c (read_one_ptr): Read the inferior's pointer through
6162 a variable whose type size is the same as the inferior's pointer
6163 size.
6164
a5362b9a
TS
61652012-03-21 Thomas Schwinge <thomas@codesourcery.com>
6166
6167 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
6168 struct siginfo.
6169 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
6170 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
6171 * linux-low.h: Include <signal.h>.
6172 (struct siginfo): Remove forward declaration.
6173 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
6174 struct siginfo.
6175
d226c142
MF
61762012-03-21 Mike Frysinger <vapier@gentoo.org>
6177
6178 * .gitignore: Ignore more files.
6179
122f36ef
PA
61802012-03-19 Pedro Alves <palves@redhat.com>
6181 Jan Kratochvil <jan.kratochvil@redhat.com>
6182
6183 * server.c (cont_thread, general_thread): Add describing comments.
6184 (start_inferior): Clear `cont_thread'.
6185 (handle_v_cont): Don't set `cont_thread' if resuming all threads
6186 of a process.
6187
fc3e5175
YQ
61882012-03-15 Yao Qi <yao@codesourcery.com>
6189
6190 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
6191 handling to ...
6192 (cmd_qtdp): ... here.
6193
8d0d92cd
YQ
61942012-03-15 Yao Qi <yao@codesourcery.com>
6195
6196 * tracepoint.c (struct tracepoint_action_ops): New.
6197 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
6198 (m_tracepoint_action_download): New.
6199 (r_tracepoint_action_download): New.
6200 (x_tracepoint_action_download): New.
6201 (l_tracepoint_action_download): New.
6202 (add_tracepoint_action): Install `action->ops' according type.
6203 (download_tracepoint_1): Move code `download' function pointer
6204 of various tracepoint_action_ops.
6205
87b0bb13
JK
62062012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
6207
6208 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
6209 linux_ptrace_attach_warnings.
6210
5f572dec
JK
62112012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
6212
6213 * Makefile.in (linux-ptrace.o): New.
6214 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
6215 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
6216 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
6217 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
6218 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
6219 of these targets.
6220 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
6221
f4647387
YQ
62222012-03-08 Yao Qi <yao@codesourcery.com>
6223 Pedro Alves <palves@redhat.com>
6224
6225 Fix PR server/13392.
6226 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
6227 offset of JMP insn.
6228 * tracepoint.c (remove_tracepoint): New.
6229 (cmd_qtdp): Call remove_tracepoint when failed to install.
6230
9b224c5e
PA
62312012-03-07 Pedro Alves <palves@redhat.com>
6232
6233 * linux-low.c (get_detach_signal): New.
6234 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
6235 Pass on pending signals to PTRACE_DETACH. Check the result of the
6236 ptrace call.
6237 * server.c (program_signals, program_signals_p): New.
6238 (handle_general_set): Handle QProgramSignals.
6239 * server.h (program_signals, program_signals_p): Declare.
6240
e237a7e2
JK
62412012-03-05 Pedro Alves <palves@redhat.com>
6242 Jan Kratochvil <jan.kratochvil@redhat.com>
6243
6244 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
6245 New comment why.
6246
5808517f
YQ
62472012-03-03 Yao Qi <yao@codesourcery.com>
6248
6249 * tracepoint.c (tracepoint_look_up_symbols): Update call to
6250 agent_look_up_symbols.
6251
58b4daa5
YQ
62522012-03-03 Yao Qi <yao@codesourcery.com>
6253
6254 * Makefile.in (linux-low.o): Keep dependence on agent.h.
6255 (linux-x86-low.o): Likewise.
6256 * server.h: Remove in_process_agent_loaded.
6257 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
6258 common/agent.c.
6259 Update callers.
6260
8ffcbaaf
YQ
62612012-03-03 Yao Qi <yao@codesourcery.com>
6262
6263 * tracepoint.c (gdb_agent_capability): New global.
6264 (in_process_agent_loaded_ust): Renamed to
6265 `in_process_agent_supports_ust'.
6266 Update callers.
6267 (in_process_agent_supports_ust): Call agent_capability_check.
6268 (clear_installed_tracepoints): Assert that agent supports
6269 agent.
6270
d1feda86
YQ
62712012-03-03 Yao Qi <yao@codesourcery.com>
6272
6273 * linux-low.c (linux_supports_agent): New.
6274 (linux_target_ops): Initialize field `supports_agent' with
6275 linux_supports_agent.
6276 * target.h (struct target_ops) <supports_agent>: New.
6277 (target_supports_agent): New macro.
6278 * server.c (handle_general_set): Handle packet 'QAgent'.
6279 (handle_query): Send `QAgent+'.
6280 * Makefile.in (server.o): Depends on agent.h.
6281
2fa291ac
YQ
62822012-03-03 Yao Qi <yao@codesourcery.com>
6283
6284 * Makefile.in (OBS): Add agent.o.
6285 Add new rule for agent.o.
6286 Track dependence of tracepoint.c on agent.h.
6287 * tracepoint.c (run_inferior_command_1):
6288 (run_inferior_command): Call agent_run_command.
6289 (gdb_ust_connect_sync_socket): Deleted. Move it to
6290 common/agent.c.
6291 (resume_thread, stop_thread): Likewise.
6292 (gdb_ust_socket_init): Renamed to ...
6293 (gdb_agent_socket_init): ... New.
6294 (gdb_ust_thread): Renamed to ...
6295 (gdb_agent_helper_thread): ... New.
6296 (gdb_ust_init): Move some code to ...
6297 (gdb_agent_init): ... here. New.
6298 [HAVE_UST]: Call gdb_ust_init.
6299 (initialize_tracepoint_ftlib): Call gdb_agent_init.
6300 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
6301 * config.in, configure: Regenerated.
6302
05044653
PA
63032012-03-02 Pedro Alves <palves@redhat.com>
6304
6305 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
6306 * linux-low.c (struct simple_pid_list): New.
6307 (stopped_pids): New a struct simple_pid_list pointer.
6308 (add_to_pid_list, pull_pid_from_list): New.
6309 (handle_extended_wait): Don't assume the first signal new children
6310 report is SIGSTOP. Adjust call to pull_pid_from_list.
6311 (linux_wait_for_lwp): Adjust.
6312
8d00225b
YQ
63132012-03-02 Yao Qi <yao@codesourcery.com>
6314
6315 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
6316 debug log.
6317
19560ba5
YQ
63182012-03-02 Yao Qi <yao@codesourcery.com>
6319
6320 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
6321 `stop_pc' and `tpoint'. Update caller.
6322
1faeff08
MR
63232012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
6324
6325 * linux-low.h (linux_target_ops): Add regset_bitmap member.
6326 * linux-low.c (use_linux_regsets): New macro.
6327 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
6328 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
6329 (linux_register_in_regsets): New function.
6330 (usr_fetch_inferior_registers): Skip registers covered by
6331 regsets.
6332 (usr_store_inferior_registers): Likewise.
6333 (usr_fetch_inferior_registers): New macro.
6334 (usr_store_inferior_registers): Likewise.
6335 (linux_fetch_registers): Handle mixed regset/non-regset targets.
6336 (linux_store_registers): Likewise.
6337 * linux-mips-low.c (init_registers_mips_dsp_linux): New
6338 prototype.
6339 (init_registers_mips64_dsp_linux): Likewise.
6340 (init_registers_mips_linux): New macro.
6341 (init_registers_mips_dsp_linux): Likewise.
6342 (mips_dsp_num_regs): Likewise.
6343 (DSP_BASE, DSP_CONTROL): New fallback macros.
6344 (mips_base_regs): New macro.
6345 (mips_regmap): Use it. Fix the size.
6346 (mips_dsp_regmap): New variable.
6347 (mips_dsp_regset_bitmap): Likewise.
6348 (mips_arch_setup): New function.
6349 (mips_cannot_fetch_register): Use the_low_target.regmap rather
6350 than mips_regmap.
6351 (mips_cannot_store_register): Likewise.
6352 (the_low_target): Update .arch_setup, .num_regs and .regmap
6353 initializers. Add .regset_bitmap initializer.
6354 * linux-arm-low.c (the_low_target): Add .regset_bitmap
6355 initializer.
6356 * linux-bfin-low.c (the_low_target): Likewise.
6357 * linux-cris-low.c (the_low_target): Likewise.
6358 * linux-crisv32-low.c (the_low_target): Likewise.
6359 * linux-ia64-low.c (the_low_target): Likewise.
6360 * linux-m32r-low.c (the_low_target): Likewise.
6361 * linux-m68k-low.c (the_low_target): Likewise.
6362 * linux-ppc-low.c (the_low_target): Likewise.
6363 * linux-s390-low.c (the_low_target): Likewise.
6364 * linux-sh-low.c (the_low_target): Likewise.
6365 * linux-sparc-low.c (the_low_target): Likewise.
6366 * linux-tic6x-low.c (the_low_target): Likewise.
6367 * linux-x86-low.c (the_low_target): Likewise.
6368 * linux-xtensa-low.c (the_low_target): Likewise.
6369 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
6370 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
6371 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
6372 srv_xmlfiles.
6373 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
6374 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
6375
c03e6ccc
YQ
63762012-02-29 Yao Qi <yao@codesourcery.com>
6377 Pedro Alves <palves@redhat.com>
6378
6379 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
6380 `step_over_finished' is true.
6381
644cebc9
PA
63822012-02-27 Pedro Alves <palves@redhat.com>
6383
6384 * linux-low.c (pid_is_stopped): Delete, moved to common/.
6385 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
6386
c14d7ab2
PA
63872012-02-27 Pedro Alves <palves@redhat.com>
6388
6389 PR server/9684
6390 * linux-low.c (pid_is_stopped): New.
6391 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
6392
412c89dd
LM
63932012-02-25 Luis Machado <lgustavo@codesourcery.com>
6394
6395 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
6396 of conditions.
6397
b745defe
MR
63982012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
6399
6400 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
6401
9f3a5c85
LM
64022012-02-24 Luis Machado <lgustavo@codesourcery>
6403
6404 * server.c (handle_query): Advertise support for target-side
6405 breakpoint condition evaluation.
6406 (process_point_options): New function.
6407 (process_serial_event): When inserting a breakpoint, check for
6408 a target-side condition that should be evaluated.
6409
6410 * mem-break.c: Include regcache.h and ax.h.
6411 (point_cond_list_t): New data structure.
6412 (breakpoint) <cond_list>: New field.
6413 (find_gdb_breakpoint_at): Make non-static.
6414 (delete_gdb_breakpoint_at): Clear any target-side
6415 conditions.
6416 (clear_gdb_breakpoint_conditions): New function.
6417 (add_condition_to_breakpoint): Likewise.
6418 (add_breakpoint_condition): Likewise.
6419 (gdb_condition_true_at_breakpoint): Likewise.
6420 (gdb_breakpoint_here): Return result directly instead
6421 of going through a local variable.
6422
6423 * mem-break.h (find_gdb_breakpoint_at): New prototype.
6424 (clear_gdb_breakpoint_conditions): Likewise.
6425 (add_breakpoint_condition): Likewise.
6426 (gdb_condition_true_at_breakpoint): Likewise.
6427
6428 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
6429 (need_step_over_p): Take target-side breakpoint condition into
6430 consideration.
6431
5e1dc496
LM
64322012-02-24 Luis Machado <lgustavo@codesourcery>
6433
6434 * server.h: Include tracepoint.h.
6435 (agent_mem_read, agent_get_trace_state_variable_value,
6436 agent_set_trace_state_variable_value,
6437 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
6438 get_set_tsv_func_addr): New prototypes.
6439
6440 * ax.h: New include file.
6441 * ax.c: New source file.
6442
6443 * tracepoint.c: Include ax.h.
6444 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
6445 agent_expr, eval_result_type): Move to ax.h.
6446 (parse_agent_expr): Rename to ...
6447 (gdb_parse_agent_expr): ... this, make it non-static and move
6448 to ax.h.
6449 (unparse_agent_expr) Rename to ...
6450 (gdb_unparse_agent_expr): ... this, make it non-static and move
6451 to ax.h.
6452 (eval_agent_expr): Rename to ...
6453 (eval_tracepoint_agent_expr): ... this.
6454 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
6455 forward declarations.
6456 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
6457 (agent_get_trace_state_variable_value): New function.
6458 (agent_set_trace_state_variable_value): New function.
6459 (cmd_qtdp): Call gdb_parse_agent_expr (...).
6460 (response_tracepoint): Call gdb_unparse_agent_expr (...).
6461 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
6462 (condition_true_at_tracepoint): Likewise.
6463 (parse_agent_expr): Rename to ...
6464 (gdb_parse_agent_expr): ... this and move to ax.c.
6465 (unparse_agent_expr): Rename to ...
6466 (gdb_unparse_agent_expr): ... this and move to ax.c.
6467 (gdb_agent_op_name): Move to ax.c.
6468 (eval_agent_expr): Rename to ...
6469 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
6470 and move to ax.c.
6471 (eval_tracepoint_agent_expr): New function.
6472 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 6473 non-static.
5e1dc496
LM
6474 (current_insn_ptr, emit_error, struct bytecode_address): Move to
6475 ax.c.
6476 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
6477 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
6478 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
6479 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
6480 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
6481 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
6482 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
6483 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
6484 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
6485 (compile_bytecodes): Remove forward declaration.
6486 (is_goto_target): Move to ax.c.
6487 (compile_bytecodes): Move to ax.c and call
6488 agent_get_trace_state_variable_value (...) and
6489 agent_set_trace_state_variable_value (...).
6490
6491 * Makefile.in: Update ax.c and IPA dependencies.
6492
277e4e52
PA
64932012-02-24 Pedro Alves <palves@redhat.com>
6494
6495 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
6496 (cmd_bigqtbuffer_circular): ... this. Only handle
6497 'QTBuffer:circular:'.
6498 (handle_tracepoint_general_set): Adjust.
6499
bf4c19f7
YQ
65002012-02-16 Yao Qi <yao@codesourcery.com>
6501
6502 * inferiors.c: Move code to ...
6503 * dll.c: .... here. New.
6504 * server.h: Declare clear_dlls.
6505 * Makefile.in (SFILES): Add dll.c.
6506 (OBS): Add dll.o
6507 (dll.o): New rule.
6508
d73f2619
YQ
65092012-02-11 Yao Qi <yao@codesourcery.com>
6510
6511 * server.c: (handle_monitor_command): Add a new parameter
6512 `own_buf'.
6513 (handle_query): Update caller.
6514
f8255c2a
JB
65152012-02-09 Joel Brobecker <brobecker@adacore.com>
6516
6517 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
6518 * configure, config.in: Regenerate.
6519 * hostio.c: Provide an alternate implementation if HAVE_READLINK
6520 is not defined.
6521
da84f473
PA
65222012-02-02 Pedro Alves <palves@redhat.com>
6523
6524 Try SIGKILL first, then PTRACE_KILL.
6525 * linux-low.c (linux_kill_one_lwp): New.
6526 (linux_kill_one_lwp): Rename to ...
6527 (kill_one_lwp_callback): ... this. Use the new
6528 linux_kill_one_lwp.
6529
e886a173
PA
65302012-02-02 Pedro Alves <palves@redhat.com>
6531
6532 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
6533 inferior.
6534
be07f1a2
PA
65352012-01-27 Pedro Alves <palves@redhat.com>
6536
6537 * linux-low.c (linux_child_pid_to_exec_file): Delete.
6538 (elf_64_file_p): Make static.
6539 (linux_pid_exe_is_elf_64_file): New.
6540 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
6541 Delete declarations.
6542 (linux_pid_exe_is_elf_64_file): Declare.
6543 * linux-x86-low.c (x86_arch_setup): Use
6544 linux_pid_exe_is_elf_64_file.
6545
d8301ad1
JK
65462012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
6547
6548 * linux-low.c (linux_wait_for_event_1): Rename to ...
6549 (linux_wait_for_event): ... here and merge it with former
6550 linux_wait_for_event - new variable wait_ptid, use it.
6551 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
6552
01b17894
PA
65532012-01-23 Pedro Alves <palves@redhat.com>
6554
6555 * server.c (main): Avoid yet another case of infinite loop while
6556 detaching/killing after a longjmp.
6557
e825046f
JK
65582012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
6559
6560 Code cleanup.
6561 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
6562
b9e7b9c3
UW
65632012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
6564
6565 * hostio.c (handle_readlink): New function.
6566 (handle_vFile): Call it to handle "vFile:readlink" packets.
6567
901f9912
UW
65682012-01-20 Pedro Alves <palves@redhat.com>
6569 Ulrich Weigand <ulrich.weigand@linaro.org>
6570
6571 * server.c (handle_v_requests): Only support vAttach and vRun to
6572 start multiple processes when in extended protocol mode.
6573
fc1ab1a0
PA
65742012-01-17 Pedro Alves <palves@redhat.com>
6575
6576 * tracepoint.c (initialize_tracepoint): Use mmap instead of
6577 memalign plus mprotect to allocate the scratch buffer.
6578
7d5d4e98
PA
65792012-01-13 Pedro Alves <palves@redhat.com>
6580
6581 * server.c (attach_inferior): Clear `cont_thread'.
6582
f128d5e9
PA
65832012-01-13 Pedro Alves <palves@redhat.com>
6584
6585 * server.c (main): Avoid infinite loop while detaching/killing
6586 after a longjmp.
6587
06db92f0
DE
65882012-01-09 Doug Evans <dje@google.com>
6589
6590 * server.c (start_inferior): Set last_ptid in --wrapper case.
6591
32d92999
YQ
65922012-01-06 Yao Qi <yao@codesourcery.com>
6593
6594 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
6595 defined.
6596 [IN_PROCESS_AGENT] (debug_agent): New global variable.
6597
5e0a92a9
YQ
65982012-01-04 Yao Qi <yao@codesourcery.com>
6599
6600 * tracepoint.c (cmd_qtdp): Print debug message
6601 for static tracepoint.
6602
ae639e8c
YQ
66032012-01-04 Yao Qi <yao@codesourcery.com>
6604
6605 * tracepoint.c (trace_vdebug): Differentiate debug message
6606 between gdbserver and IPA.
6607
f72429c5
YQ
66082012-01-03 Yao Qi <yao@codesourcery.com>
6609
6610 * tracepoint.c (tracepoint_was_hit): Don't collect for
6611 static tracepoint.
6612
12c3e59c
JB
66132012-01-02 Joel Brobecker <brobecker@adacore.com>
6614
6615 * terminal.h: Reformat copyright header.
6616
67827812
JB
66172012-01-02 Joel Brobecker <brobecker@adacore.com>
6618
6619 * server.c (gdbserver_version): Update copyright year.
6620 * gdbreplay.c (gdbreplay_version): Likewise.
6621
3e52c33d
JK
66222011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
6623
6624 * linux-low.c (linux_create_inferior): Put empty if clause for write.
6625
6626 Revert:
6627 2011-12-18 Hui Zhu <teawater@gmail.com>
6628 * linux-low.c (linux_create_inferior): Save return value to ret.
6629
66f1260e
HZ
66302011-12-18 Hui Zhu <teawater@gmail.com>
6631
6632 * linux-low.c (linux_create_inferior): Save return value to ret.
6633
e77616d7
DE
66342011-12-16 Doug Evans <dje@google.com>
6635
e7b06c57
DE
6636 * linux-low.c (linux_create_inferior): If stdio connection,
6637 redirect stdin from /dev/null, stdout to stderr.
6638 * remote-utils.c (remote_is_stdio): New static global.
6639 (remote_connection_is_stdio): New function.
6640 (remote_prepare): Handle stdio connection.
6641 (remote_open): Ditto.
6642 (remote_close): Don't close stdin for stdio connections.
6643 (read_prim,write_prim): New functions. Replace all calls to
6644 read/write to these.
6645 * server.c (main): Watch for "-" argument. Move call to
6646 remote_prepare before start_inferior.
6647 * server.h (STDIO_CONNECTION_NAME): New macro.
6648 (remote_connection_is_stdio): Declare.
6649
e77616d7
DE
6650 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
6651 in debugging output.
6652
82067193
YQ
66532011-12-15 Yao Qi <yao@codesourcery.com>
6654
6655 * tracepoint.c: Include sys/syscall.h.
6656 (gdb_ust_thread): Remove preprocessor conditional.
6657
82bfbe7e
PA
66582011-12-14 Pedro Alves <pedro@codesourcery.com>
6659
6660 * linux-low.c (linux_detach_one_lwp): Call
6661 the_low_target.prepare_to_resume before detaching.
6662
712c6575
YQ
66632011-12-14 Yao Qi <yao@codesourcery.com>
6664
6665 * tracepoint.c (gdb_ust_thread): Don't ignore return value
6666 of write.
6667
d54d1edf
YQ
66682011-12-14 Yao Qi <yao@codesourcery.com>
6669
6670 * i386-low.c (i386_low_stopped_data_address): Initialize local
6671 variable `control'.
6672
6210a125
PA
66732011-12-13 Pedro Alves <pedro@codesourcery.com>
6674
6675 PR remote/13492
6676
6677 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
6678 DR_CONTROL unless necessary. Extend comments.
6679 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
6680 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
6681
2ece8244
YQ
66822011-12-13 Yao Qi <yao@codesourcery.com>
6683
6684 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
6685 macros.
6686 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
6687
784867a5
JK
66882011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
6689
6690 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
6691 Print new debug message for such case.
6692
6bf36717
JK
66932011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
6694
6695 Fix overlapping memcpy.
6696 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
6697 the read_inferior_memory transfer.
6698 (delete_fast_tracepoint_jump): New variable buf. Use it for the
6699 write_inferior_memory transfer.
6700 (set_fast_tracepoint_jump): New variable buf. Use it for the
6701 read_inferior_memory and write_inferior_memory transfers.
6702 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
6703 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
6704 Use it for the write_inferior_memory transfer.
6705 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
6706 buffers.
6707
50275556
MR
67082011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
6709
6710 * linux-low.c (fetch_register, store_register): Make code
6711 consistent, fix formatting.
6712
7325beb4
MR
67132011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
6714
6715 * linux-low.c (usr_store_inferior_registers): Factor out code
6716 to handle individual registers into...
6717 (store_register): ... this new function.
6718
c642a434
UW
67192011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
6720
6721 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
6722 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
6723 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
6724 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
6725 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
6726 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
6727 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
6728 (srv_xmlfiles): Add new XML files.
6729
6730 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
6731 and <sys/uio.h>.
6732 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
6733 (init_registers_s390_linux32v1): Add prototype.
6734 (init_registers_s390_linux32v2): Likewise.
6735 (init_registers_s390_linux64v1): Likewise.
6736 (init_registers_s390_linux64v2): Likewise.
6737 (init_registers_s390x_linux64v1): Likewise.
6738 (init_registers_s390x_linux64v2): Likewise.
6739 (s390_num_regs): Increment to 52.
6740 (s390_regmap): Add orig_r2 register.
6741 (s390_num_regs_3264): Increment to 68.
6742 (s390_regmap_3264): Add orig_r2 register.
6743 (s390_collect_ptrace_register): Handle orig_r2 register.
6744 (s390_supply_ptrace_register): Likewise.
6745 (s390_fill_last_break): New function.
6746 (s390_store_last_break): Likewise.
6747 (s390_fill_system_call): New function.
6748 (s390_store_system_call): Likewise.
6749 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
6750 register sets.
6751 (s390_check_regset): New function.
6752 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
6753 NT_S390_SYSTEM_CALL regsets and use appropriate description.
6754 Update target_regsets for available register sets.
6755
2268b414
JK
67562011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
6757 Jan Kratochvil <jan.kratochvil@redhat.com>
6758
6759 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
6760 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
6761 New.
6762 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
6763 * linux-low.h (struct process_info_private): New member r_debug.
6764 * server.c (handle_qxfer_libraries): Call
6765 the_target->qxfer_libraries_svr4.
6766 (handle_qxfer_libraries_svr4): New function.
6767 (qxfer_packets): New entry "libraries-svr4".
6768 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
6769 * target.h (struct target_ops): New member qxfer_libraries_svr4.
6770 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
6771 PACKET_qXfer_libraries_svr4.
6772
d6db1fab
UW
67732011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
6774
6775 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
6776 PSW address/mask between 8-byte and 16-byte formats.
6777 (s390_supply_ptrace_register): Likewise.
6778 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
6779 basic addressing mode bit.
6780
242f5f1c
SS
67812011-11-24 Stan Shebs <stan@codesourcery.com>
6782
6783 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
6784
f196051f
SS
67852011-11-17 Stan Shebs <stan@codesourcery.com>
6786
6787 * tracepoint.c (struct tracepoint): New field traceframe_usage.
6788 (tracing_start_time): New global.
6789 (tracing_stop_time): New global.
6790 (tracing_user_name): New global.
6791 (tracing_notes): New global.
6792 (tracing_stop_note): New global.
6793 (cmd_qtstart): Set traceframe_usage, start_time.
6794 (stop_tracing): Set stop_time.
6795 (cmd_qtstatus): Report additional status.
6796 (cmd_qtp): New function.
6797 (handle_tracepoint_query): Call it.
6798 (cmd_qtnotes): New function.
6799 (handle_tracepoint_general_set): Call it.
6800 (get_timestamp): Rename from tsv_get_timestamp.
6801
405f8e94
SS
68022011-11-14 Stan Shebs <stan@codesourcery.com>
6803 Kwok Cheung Yeung <kcy@codesourcery.com>
6804
6805 * linux-x86-low.c (small_jump_insn): New.
6806 (i386_install_fast_tracepoint_jump_pad): Add arguments for
6807 trampoline and error message, build a trampoline and issue a small
6808 jump instruction to it.
6809 (x86_install_fast_tracepoint_jump_pad): Add arguments for
6810 trampoline and error message.
6811 (x86_get_min_fast_tracepoint_insn_len): New.
6812 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
6813 * linux-low.h (struct linux_target_ops): Add arguments to
6814 install_fast_tracepoint_jump_pad operation, add new operation.
6815 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
6816 arguments.
6817 (linux_get_min_fast_tracepoint_insn_len): New function.
6818 (linux_target_op): Add new operation.
6819 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
6820 (gdb_trampoline_buffer_end): Ditto.
6821 (gdb_trampoline_buffer_error): Ditto.
6822 (struct ipa_sym_addresses): Add fields for new IPA variables.
6823 (symbol_list): Add entries for new IPA variables.
6824 (struct tracepoint): Add fields to hold the address range of the
6825 trampoline used by the tracepoint.
6826 (trampoline_buffer_head): New static variable.
6827 (trampoline_buffer_tail): Ditto.
6828 (claim_trampoline_space): New function.
6829 (have_fast_tracepoint_trampoline_buffer): New function.
6830 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
6831 structure.
6832 (install_fast_tracepoint): Ditto, also add error buffer argument.
6833 (cmd_qtminftpilen): New function.
6834 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
6835 (fast_tracepoint_from_trampoline_address): New function.
6836 (fast_tracepoint_collecting): Handle trampoline as part of jump
6837 pad space.
6838 (set_trampoline_buffer_space): New function.
6839 (initialize_tracepoint): Initialize new IPA variables.
6840 * target.h (struct target_ops): Add arguments to
6841 install_fast_tracepoint_jump_pad operation, add new
6842 get_min_fast_tracepoint_insn_len operation.
6843 (target_get_min_fast_tracepoint_insn_len): New.
6844 (install_fast_tracepoint_jump_pad): Add arguments.
6845 * server.h (IPA_BUFSIZ): Define.
6846 * linux-i386-ipa.c: Include extra header files.
6847 (initialize_fast_tracepoint_trampoline_buffer): New function.
6848 (initialize_low_tracepoint): Call it.
6849 * server.h (set_trampoline_buffer_space): Declare.
6850 (claim_trampoline_space): Ditto.
6851 (have_fast_tracepoint_trampoline_buffer): Ditto.
6852
1e4d1764
YQ
68532011-11-14 Yao Qi <yao@codesourcery.com>
6854
6855 * server.c (handle_query): Handle InstallInTrace for qSupported.
6856 * tracepoint.c (add_tracepoint): Sort list.
6857 (install_tracepoint, download_tracepoint): New.
6858 (cmd_qtdp): Call them to install and download tracepoints.
6859 (sort_tracepoints): Removed.
6860 (cmd_qtstart): Update.
6861
5c73ff4e
YQ
68622011-11-14 Yao Qi <yao@codesourcery.com>
6863
6864 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
6865 * mem-break.h: Declare.
6866 * tracepoint.c (cmd_qtstart): Move some code to ...
6867 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
6868 New.
6869 (download_tracepoints): Move some code to ...
6870 (download_tracepoint_1): ... here. New.
6871
86a30030
YQ
68722011-11-08 Yao Qi <yao@codesourcery.com>
6873
6874 * remote-utils.c (relocate_instruction): A comment fix.
6875
8d26e50c
JB
68762011-11-07 Joel Brobecker <brobecker@adacore.com>
6877
6878 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
6879 (i386_dr_low_get_control, i386_dr_low_get_status): Use
6880 dr_status_mirror and dr_control_mirror from debug_reg_state.
6881 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
6882 (i386_initial_stuff): Remove use of deleted globals.
6883 (i386_get_thread_context, i386_set_thread_context,
6884 i386_thread_added): Use dr_status_mirror and dr_control_mirror
6885 from debug_reg_state.
6886
a59306a3
YQ
68872011-11-05 Yao Qi <yao@codesourcery.com>
6888
6889 * tracepoint.c (gdb_collect): Loop over tracepoints of same
6890 address as TPOINT's.
6891
3065dfb6
SS
68922011-11-02 Stan Shebs <stan@codesourcery.com>
6893
6894 * tracepoint.c (agent_mem_read_string): New function.
6895 (eval_agent_expr): Call it for tracenz.
6896 * server.c (handle_query): Report support for tracenz.
6897
fd0d8c7c
YQ
68982011-11-02 Yao Qi <yao@codesourcery.com>
6899
6900 * tracepoint.c (cmd_qtstart): Remove unused local variables.
6901
609086b1
YQ
69022011-11-02 Yao Qi <yao@codesourcery.com>
6903
6904 * target.h: Fix a typo in comment.
6905
b9fd1791
PA
69062011-10-31 Pedro Alves <pedro@codesourcery.com>
6907
6908 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
6909 clobber the breakpoints' shadows with fast tracepoint jumps.
6910 * mem-break.h (check_mem_write): Add `myaddr' parameter.
6911 * target.c (write_inferior_memory): Also pass MYADDR down to
6912 check_mem_write.
6913
03583c20
UW
69142011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
6915
6916 * configure.ac: Check support for personality routine.
6917 * configure: Regenerate.
6918 * config.in: Likewise.
6919 * linux-low.c: Include <sys/personality.h>.
6920 Define ADDR_NO_RANDOMIZE if necessary.
6921 (linux_create_inferior): Disable address space randomization when
6922 forking inferior, if requested.
6923 (linux_supports_disable_randomization): New function.
6924 (linux_target_ops): Install it.
6925 * server.h (disable_randomization): Declare.
6926 * server.c (disable_randomization): New global variable.
6927 (handle_general_set): Handle QDisableRandomization.
6928 (handle_query): Likewise for qSupported.
6929 (main): Support --disable-randomization and --no-disable-randomization
6930 command line arguments.
6931 * target.h (struct target_ops): Add supports_disable_randomization.
6932 (target_supports_disable_randomization): New macro.
6933
723b724b
MF
69342011-09-29 Mike Frysinger <vapier@gentoo.org>
6935
6936 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
6937 ifdef check.
6938 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
6939 [!PT_GETDSBT] (target_loadmap): New definition.
6940 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
6941 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
6942 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
6943 and PT_GETDSBT to LINUX_LOADMAP.
6944 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
6945 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
6946
55329a5c 69472011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
6948
6949 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
6950 (arm_linux_hwbp_cap): New static variable.
6951 (arm_linux_get_hwbp_cap): Replace by ...
6952 (arm_linux_init_hwbp_cap): ... this new function.
6953 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
6954 (arm_linux_get_hw_watchpoint_count): Likewise.
6955 (arm_linux_get_hw_watchpoint_max_length): Likewise.
6956 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
6957 (arm_prepare_to_resume): Use perror_with_name instead of error.
6958
55329a5c 69592011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
6960
6961 * linux-arm-low.c: Include <signal.h>.
6962 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
6963 (struct arm_linux_hwbp_cap): New data type.
6964 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
6965 (struct arm_linux_hw_breakpoint): New data type.
6966 (MAX_BPTS, MAX_WPTS): Define.
6967 (struct arch_process_info, struct arch_lwp_info): New data types.
6968 (arm_linux_get_hwbp_cap): New function.
6969 (arm_linux_get_hw_breakpoint_count): Likewise.
6970 (arm_linux_get_hw_watchpoint_count): Likewise.
6971 (arm_linux_get_hw_watchpoint_max_length): Likewise.
6972 (arm_hwbp_control_initialize): Likewise.
6973 (arm_hwbp_control_is_enabled): Likewise.
6974 (arm_hwbp_control_is_initialized): Likewise.
6975 (arm_hwbp_control_disable): Likewise.
6976 (arm_linux_hw_breakpoint_equal): Likewise.
6977 (arm_linux_hw_point_initialize): Likewise.
6978 (struct update_registers_data): New data structure.
6979 (update_registers_callback: New function.
6980 (arm_insert_point): Likewise.
6981 (arm_remove_point): Likewise.
6982 (arm_stopped_by_watchpoint): Likewise.
6983 (arm_stopped_data_address): Likewise.
6984 (arm_new_process): Likewise.
6985 (arm_new_thread): Likewise.
6986 (arm_prepare_to_resume): Likewise.
6987 (the_low_target): Register arm_insert_point, arm_remove_point,
6988 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
6989 arm_new_thread, and arm_prepare_to_resume.
6990
6b9801d4
SS
69912011-09-15 Stan Shebs <stan@codesourcery.com>
6992
6993 * server.h (struct emit_ops): Add compare-goto fields.
6994 * tracepoint.c (gdb_agent_op_sizes): New table.
6995 (emit_eq_goto): New function.
6996 (emit_ne_goto): New function.
6997 (emit_lt_goto): New function.
6998 (emit_le_goto): New function.
6999 (emit_gt_goto): New function.
7000 (emit_ge_goto): New function.
7001 (is_goto_target): New function.
7002 (compile_bytecodes): Recognize special cases of compare-goto
7003 combinations and call specialized emitters for them.
7004 * linux-x86-low.c (amd64_emit_eq_goto): New function.
7005 (amd64_emit_ne_goto): New function.
7006 (amd64_emit_lt_goto): New function.
7007 (amd64_emit_le_goto): New function.
7008 (amd64_emit_gt_goto): New function.
7009 (amd64_emit_ge_goto): New function.
7010 (amd64_emit_ops): Add the new functions.
7011 (i386_emit_eq_goto): New function.
7012 (i386_emit_ne_goto): New function.
7013 (i386_emit_lt_goto): New function.
7014 (i386_emit_le_goto): New function.
7015 (i386_emit_gt_goto): New function.
7016 (i386_emit_ge_goto): New function.
7017 (i386_emit_ops): Add the new functions.
7018
bf15cbda
SS
70192011-09-08 Stan Shebs <stan@codesourcery.com>
7020
7021 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
7022 (i386_emit_epilogue): Restore %ebx.
7023
943ca1dd
JZ
70242011-08-31 Jie Zhang <jzhang918@gmail.com>
7025
7026 * server.c (step_thread): Remove definition.
7027 (process_serial_event): Don't handle Hs.
7028 * server.h (step_thread): Remove declaration.
7029 * target.c (set_desired_inferior): Remove use of step_thread.
7030
e3deef73
LM
70312011-08-24 Luis Machado <lgustavo@codesourcery.com>
7032
7033 * linux-low.c: Include linux-procfs.h.
7034 (linux_attach_lwp_1): Update comments.
7035 (linux_attach): Scan for existing threads when attaching to a
7036 process that is the tgid.
7037 * Makefile.in: Update dependencies.
7038
13da1c97
LM
70392011-08-24 Luis Machado <lgustavo@codesourcery.com>
7040
7041 * configure.srv: Add linux-procfs.o dependencies.
7042
881127c9
YQ
70432011-08-14 Yao Qi <yao@codesourcery.com>
7044
7045 * target.h (struct target_ops): Fix indent.
7046 * win32-low.c (win32_target_ops): Fix comment.
7047
58dbd541
YQ
70482011-08-14 Andrew Jenner <andrew@codesourcery.com>
7049 Yao Qi <yao@codesourcery.com>
7050
7051 * Makefile.in (clean): Remove tic6x-*.c files.
7052 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
7053 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
7054 (tic6x-c64xp-linux.c): Likewise.
7055 * configure.srv: Add support for tic6x-*-uclinux.
7056 * linux-tic6x-low.c: New.
7057 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
7058
78d85199
YQ
70592011-08-14 Andrew Stubbs <ams@codesourcery.com>
7060 Yao Qi <yao@codesourcery.com>
7061
7062 * target.h (struct target_ops): Add read_loadmap.
7063 * linux-low.c (struct target_loadseg): New type.
7064 (struct target_loadmap): New type.
7065 (linux_read_loadmap): New function.
7066 (linux_target_ops): Add linux_read_loadmap.
7067 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
7068 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
7069 to NULL.
78d85199 7070
a959a88d
EZ
70712011-08-05 Eli Zaretskii <eliz@gnu.org>
7072
7073 * win32-low.c: Include <stdint.h>.
7074
1ced966e
PA
70752011-07-22 Pedro Alves <pedro@codesourcery.com>
7076
7077 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
7078 to the inferior here.
7079 (i386_remove_aligned_watchpoint): Ditto.
7080 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
7081 fit part of the watchpoint in the debug registers.
7082 (i386_update_inferior_debug_regs): New.
7083 (i386_low_insert_watchpoint): Work on a local mirror of the debug
7084 registers, and only update the inferior on success.
7085 (i386_low_remove_watchpoint): Ditto.
7086
d26e3629
KY
70872011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
7088
7089 * linux-low.c (compare_ints, unique, list_threads, show_process,
7090 linux_core_of_thread): Delete.
7091 (linux_target_ops): Change linux_core_of_thread to
7092 linux_common_core_of_thread.
7093 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
7094 * utils.c (malloc_failure): Change type of argument.
7095 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
7096 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
7097 common/linux-osdata.c, common/ptid.c and common/buffer.c.
7098 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
7099 (IPA_OBJS): Add common-utils-ipa.o.
7100 (ptid_h, linux_osdata_h): New macros.
7101 (server_h): Add common/common-utils.h, common/xml-utils.h,
7102 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
7103 common/ptid.h.
7104 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
7105 ptid.o, buffer.o): New rules.
7106 (linux-low.o): Add common/linux-osdata.h as a dependency.
7107 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
7108 * configure.ac: Add AC_HEADER_DIRENT check.
7109 * config.in: Regenerate.
7110 * configure: Regenerate.
7111 * remote-utils.c (xml_escape_text): Delete.
7112 (buffer_grow, buffer_free, buffer_init, buffer_finish,
7113 buffer_xml_printf): Move to common/buffer.c.
7114 * server.c (main): Remove call to initialize_inferiors.
7115 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
7116 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
7117 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
7118 internal_error, gdb_assert, gdb_assert_fail): Delete.
7119 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
7120 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
7121 common/buffer.h.
7122 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
7123 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
7124 initialize_inferiors): Delete.
7125
2275a1a7
PA
71262011-07-20 Pedro Alves <pedro@codesourcery.com>
7127
7128 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
7129 symbol error.
7130
0a5b1e09
PA
71312011-05-31 Pedro Alves <pedro@codesourcery.com>
7132
7133 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
7134 assertion.
7135 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
7136
6938fd34
YQ
71372011-05-26 Yao Qi <yao@codesourcery.com>
7138
7139 * Makefile.in (thread-db.o): Track dependence to
7140 common/gdb_thread_db.h.
7141 * thread-db.c: include gdb_thread_db.h from right place.
7142
b481f9e0
TT
71432011-05-16 Adrian Cornish <gnu@bluedreamer.com>
7144
7145 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
7146 __FILE__ and __LINE__ to internal_error.
7147
98a5dd13
DE
71482011-05-13 Doug Evans <dje@google.com>
7149
7150 * thread-db.c (try_thread_db_load_from_sdir): New function.
7151 (try_thread_db_load_from_dir): New function.
7152 (thread_db_load_search): Handle $sdir, ignore $pdir.
7153 Remove trying of system directories if search of
7154 libthread-db-search-path fails, that is now done via $sdir.
7155
d248b706
KY
71562011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
7157
7158 * server.c (handle_query): Add EnableDisableTracepoints to the list
7159 of supported features.
43aaf8b6 7160 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 7161 tracepoints.
43aaf8b6
PA
7162 (cmd_qtenable_disable): New.
7163 (cmd_qtstart): Install tracepoints even if disabled.
7164 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
7165 receiving a QTEnable or QTDisable packet.
7166 (gdb_collect): Skip data collection if fast tracepoint is disabled.
7167 (ust_marker_to_static_tracepoint): Do not ignore disabled static
7168 tracepoints.
7169 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 7170
84e578fb
DE
71712011-05-10 Doug Evans <dje@google.com>
7172
7173 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
7174
71f55dd8
DE
71752011-05-04 Doug Evans <dje@google.com>
7176
7177 * linux-low.c (linux_join): Skip process lookup.
7178 * spu-low.c (spu_join): Ditto.
7179 * server.c (join_inferiors_callback): Delete.
7180 (process_serial_event): For 'D' packet (detach) call join_inferior
7181 directly.
7182
4d393d60
JM
71832011-05-04 Joseph Myers <joseph@codesourcery.com>
7184
7185 * README: Don't mention xscale*-*-linux*.
7186 * configure.srv (xscale*-*-linux*): Don't handle target.
7187
b00ad6ff
NF
71882011-04-27 Nathan Froyd <froydnj@codesourcery.com>
7189
7190 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
7191 casting pointers.
7192 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
7193 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
7194 (i386_emit_void_call_2): Likewise.
7195
af96c192
YQ
71962011-04-26 Yao Qi <yao@codesourcery.com>
7197
43aaf8b6
PA
7198 * linux-low.c: Move common macros to linux-ptrace.h.
7199 Include linux-ptrace.h.
af96c192
YQ
7200 * Makefile.in (linux_ptrace_h): New.
7201 (linux-low.o): Depends on linux-ptrace.h.
7202
03f2bd59
JK
72032011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
7204
7205 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
7206 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
7207 (remote_prepare): New function with most of the TCP code from ...
7208 (remote_open): ... here. Detect PORT here unconditionally. Move also
7209 setting transport_is_reliable.
7210 * server.c (run_once): New variable.
7211 (gdbserver_usage): Document it.
7212 (main): Set run_once for `--once'. Call remote_prepare. Exit after
7213 the first run if RUN_ONCE.
7214 * server.h (run_once, remote_prepare): New declarations.
7215
7a9dd1b2
TT
72162011-04-19 Tom Tromey <tromey@redhat.com>
7217
7218 * win32-low.c (handle_load_dll): Remove duplicate "the".
7219
81239425
PM
72202011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
7221
7222 Remove support for old Cygwin 1.5 versions.
7223 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
7224 function to avoid warning.
7225 (win32_add_one_solib): Use cygwin_conv_path function to avoid
7226 warning.
7227
9e0627f1
PM
72282011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
7229
7230 * gdbserver/server.h (Macro _): Define it if not available.
7231
588eebee
MS
72322011-03-14 Michael Snyder <msnyder@vmware.com>
7233
348af9f7 7234 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 7235
43f70d4c
JB
72362011-03-10 Joel Brobecker <brobecker@adacore.com>
7237
7238 * Makefile.in (maintainer-clean realclean distclean): Remove
7239 "make ... subdir_do" command.
7240
348af9f7
MS
72412011-03-10 Michael Snyder <msnyder@vmware.com>
7242
7243 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
7244
7245 * server.c (handle_v_run): Free alloced buffer on early return.
7246
e637a4f5
YQ
72472011-03-09 Yao Qi <yao@codesourcery.com>
7248
7249 Revert:
7250 2011-03-04 Yao Qi <yao@codesourcery.com>
7251
7252 * Makefile.in: Remove GNU make feature --directory.
7253
7254 2011-03-05 Yao Qi <yao@codesourcery.com>
7255
7256 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
7257 (subdir_do): New make target. Copied from gdb/Makefile.
7258 (maintainer-clean, realclean, distclean, clean): Call corresponding
7259 make targets in common/Makefile.
7260
7261 2011-02-11 Yao Qi <yao@codesourcery.com>
7262
7263 * configure.ac: Call AC_PROG_RANLIB.
7264 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
7265 * configure: Regenerate.
7266
e6edda56
JK
72672011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7268
7269 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
7270
e5141119
JB
72712011-03-06 Yao Qi <yao@codesourcery.com>
7272
7273 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
7274
64794aa4
JB
72752011-03-05 Yao Qi <yao@codesourcery.com>
7276
7277 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
7278 (subdir_do): New make target. Copied from gdb/Makefile.
7279 (maintainer-clean, realclean, distclean, clean): Call corresponding
7280 make targets in common/Makefile.
7281
7a762829
YQ
72822011-03-04 Yao Qi <yao@codesourcery.com>
7283
7284 * Makefile.in: Remove GNU make feature --directory.
7285
348af9f7
MS
72862011-03-04 Michael Snyder <msnyder@vmware.com>
7287
7288 * server.c (queue_stop_reply): Call xmalloc not malloc.
7289
72902011-03-02 Michael Snyder <msnyder@vmware.com>
7291
7292 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
7293
9f72fee2
MS
72942011-02-28 Michael Snyder <msnyder@vmware.com>
7295
588eebee
MS
7296 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
7297 (cmd_qtframe): Ditto.
7298 (cmd_qtbuffer): Ditto.
7299 (cmd_bigqtbuffer): Ditto.
7300
9f72fee2
MS
7301 * utils.c (decimal2str): Initialize 'width' to nine, then
7302 don't mess with it.
7303
8040bd49
UW
73042011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
7305
7306 * hostio.c (require_data): Free *data, not data.
7307
7e52cbd0
JK
73082011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7309
7310 * hostio.c (require_data): Use free, not xfree.
7311
9130f83e
MS
73122011-02-27 Michael Snyder <msnyder@vmware.com>
7313
4b812f4e
MS
7314 * server.c (handle_query): Discard unused value.
7315
9130f83e
MS
7316 * hostio.c (require_data): Free malloc memory before returning
7317 error.
7318
69d37113
MS
73192011-02-26 Michael Snyder <msnyder@vmware.com>
7320
7321 * linux-low.c (list_threads): Call closedir for dirent.
7322
35f5825a
MS
73232011-02-27 Michael Snyder <msnyder@vmware.com>
7324
2a589cef
MS
7325 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
7326 a case statement falls through.
7327
0adea5f7
MS
7328 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
7329
35f5825a
MS
7330 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
7331 in comparison.
7332
238f1c74
MS
73332011-02-26 Michael Snyder <msnyder@vmware.com>
7334
7335 * utils.c (decimal2str): Eliminate dead code and dead param.
7336 (pulongest): Drop dead param from call to decimal2str.
7337 (plongest): Ditto.
7338
633ff500
JB
73392011-02-24 Joel Brobecker <brobecker@adacore.com>
7340
7341 Revert the following patch (not approved yet):
7342 2011-02-21 Hui Zhu <teawater@gmail.com>
7343 * tracepoint.c (tp_printf): New function.
7344 (eval_agent_expr): Handle gdb_agent_op_printf.
7345
f9c6ff72
HZ
73462011-02-21 Hui Zhu <teawater@gmail.com>
7347
7348 * tracepoint.c (tp_printf): New function.
7349 (eval_agent_expr): Handle gdb_agent_op_printf.
7350
94d5e490
TT
73512011-02-18 Tom Tromey <tromey@redhat.com>
7352
7353 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
7354 (tracepoint.o): Likewise.
7355 * tracepoint.c (enum gdb_agent_op): Use ax.def.
7356 (gdb_agent_op_names): Likewise.
7357
c7f96d2b
TT
73582011-02-18 Tom Tromey <tromey@redhat.com>
7359
7360 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
7361 gdb_agent_op_rot>: New constants.
7362 (gdb_agent_op_names): Add pick and roll.
7363 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
7364 cases.
7365
0feedb2c
JK
73662011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
7367
7368 * aclocal.m4: Regenerated with aclocal-1.11.1.
7369
b3b9301e
PA
73702011-02-14 Pedro Alves <pedro@codesourcery.com>
7371
7372 * server.c (handle_qxfer_traceframe_info): New.
7373 (qxfer_packets): Register "traceframe-info".
7374 (handle_query): Report support for qXfer:traceframe-info:read+.
7375 * tracepoint.c (match_blocktype): New.
7376 (traceframe_find_block_type): Rename to ...
7377 (traceframe_walk_blocks): ... this. Add callback filter argument,
7378 and use it.
7379 (traceframe_find_block_type): New, reimplemented on top of
7380 traceframe_walk_blocks.
7381 (build_traceframe_info_xml): New.
7382 (traceframe_read_info): New.
7383 * server.h (traceframe_read_info): Declare.
7384
4f3e6fb7
YQ
73852011-02-11 Yao Qi <yao@codesourcery.com>
7386
7387 * configure.ac: Call AC_PROG_RANLIB.
7388 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
7389 * configure: Regenerate.
7390
764880b7
PA
73912011-02-07 Pedro Alves <pedro@codesourcery.com>
7392
7393 * server.c (gdb_read_memory): Change return semantics to allow
7394 partial transfers.
7395 (handle_search_memory_1): Adjust.
7396 (process_serial_event) <'m' packet>: Handle partial transfers.
7397 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
7398
1c79eb8a
PA
73992011-01-28 Pedro Alves <pedro@codesourcery.com>
7400
7401 * regcache.c (init_register_cache): Initialize
7402 regcache->register_status.
7403 (free_register_cache): Release regcache->register_status.
7404 (regcache_cpy): Copy register_status.
7405 (registers_to_string): Print 'x's for unavailable registers.
7406 (supply_register): Mark the register's status valid or
7407 unavailable, depending on whether a buffer was passed in or not.
7408 (supply_register_zeroed): New.
7409 (supply_regblock): Mark the registers' status valid or
7410 unavailable, depending on whether a buffer was passed in or not.
7411 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
7412 (struct regcache): New `register_status' field.
7413 (supply_register_zeroed): Declare.
7414 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
7415 supply_register_zeroed, rather than passing a NULL buffer to
7416 supply_register.
7417 * tracepoint.c (fetch_traceframe_registers): Update comment.
7418
85724a0e
PA
74192011-01-28 Pedro Alves <pedro@codesourcery.com>
7420
7421 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
7422 buffer explicit.
7423
d08aafef
PA
74242011-01-25 Pedro Alves <pedro@codesourcery.com>
7425
7426 * server.h (decode_xfer_write): Change prototype.
7427 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
7428 and don't extract the annex here.
7429 * server.c (decode_xfer_read): Remove `annex' parameter,
7430 and don't extract the annex here.
7431 (decode_xfer): New.
7432 (struct qxfer): New.
7433 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
7434 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
7435 (handle_qxfer_statictrace): New functions, abstracted out from
7436 handle_query, and made to use the struct qxfer interface.
7437 (handle_threads_qxfer_proper): Rename to ...
7438 (handle_qxfer_threads_proper): ... this.
7439 (handle_threads_qxfer): Rename to ...
7440 (handle_qxfer_threads): ... this. Adjust.
7441 (qxfer_packets): New array.
7442 (handle_qxfer): New function.
7443 (handle_query): Use handle_qxfer.
7444
493e2a69
MS
74452011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
7446
7447 * gdbreplay.c: Shorten lines of >= 80 columns.
7448 * linux-low.c: Ditto.
7449 * linux-ppc-low.c: Ditto.
7450 * linux-s390-low.c: Ditto.
7451 * linux-sparc-low.c: Ditto.
7452 * linux-x86-low.c: Ditto.
7453 * linux-xtensa-low.c: Ditto.
7454 * mem-break.c: Ditto.
7455 * nto-low.c: Ditto.
7456 * regcache.h: Ditto.
7457 * remote-utils.c: Ditto.
7458 * server.c: Ditto.
7459 * server.h: Ditto.
7460 * thread-db.c: Ditto.
7461 * tracepoint.c: Ditto.
7462 * utils.c: Ditto.
7463 * win32-low.h: Ditto.
7464
44944448
JB
74652011-01-05 Joel Brobecker <brobecker@adacore.com>
7466
7467 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
7468 update.
7469
71ce852c
JB
74702011-01-01 Joel Brobecker <brobecker@adacore.com>
7471
7472 * server.c (gdbserver_version): Update copyright year in version
7473 output.
7474 * gdbreplay.c (gdbreplay_version): Ditto.
7475
eb826dc6
MF
74762010-12-29 Jie Zhang <jie.zhang@analog.com>
7477
7478 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
7479 * linux-bfin-low.c: New file.
7480 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
7481 PT_DATA_ADDR for BFIN targets.
7482 * Makefile.in (SFILES): Add linux-bfin-low.c.
7483 (clean): Remove reg-bfin.c.
7484 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
7485 * README: Mention supported Blackfin targets.
7486
39ab222a
MF
74872010-12-23 Mike Frysinger <vapier@gentoo.org>
7488
7489 * .gitignore: New file.
7490
a1f2ce7d
MF
74912010-11-16 Mike Frysinger <vapier@gentoo.org>
7492
7493 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
7494
f474844c
JZ
74952010-10-22 Jie Zhang <jie@codesourcery.com>
7496
7497 * Makefile.in: Add FLAGS_TO_PASS variable.
7498 (install): Remove dependency of install-only and recursively
7499 invoke make for install-only.
7500
f1048712
DE
75012010-10-04 Doug Evans <dje@google.com>
7502
7503 * Makefile.in (uninstall): Use $(DESTDIR).
7504
b53a1623
PA
75052010-09-24 Pedro Alves <pedro@codesourcery.com>
7506
e6ee044d
PA
7507 PR gdb/11842
7508
b53a1623
PA
7509 * linux-x86-low.c (compat_siginfo_from_siginfo)
7510 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
7511 si_code is < 0. Check for si_code == SI_TIMER before checking for
7512 si_code < 0.
7513
fa1bd1e4
JB
75142010-09-13 Joel Brobecker <brobecker@adacore.com>
7515
7516 * lynx-i386-low.c: New file.
7517 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
7518
47fac8f8
JB
75192010-09-13 Joel Brobecker <brobecker@adacore.com>
7520
7521 * lynx-low.c (ptrace_request_to_str): Remove handling for
7522 request values that have been removed in LynxOS 5.x.
7523
1adfc54d
JB
75242010-09-13 Joel Brobecker <brobecker@adacore.com>
7525
7526 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
7527 <ptrace.h>
7528
c2a66c29
NS
75292010-09-09 Nathan Sidwell <nathan@codesourcery.com>
7530
7531 * configure.ac: Add --enable-inprocess-agent option.
7532 * configure: Rebuilt.
7533
32fcada3
YQ
75342010-09-06 Yao Qi <yao@codesourcery.com>
7535
7536 * linux-low.c (linux_kill): Remove unused variable.
7537 (linux_stabilize_threads): Likewise.
7538 * server.c (start_inferior): Likewise.
7539 (queue_stop_reply_callback): Likewise.
7540 * tracepoint.c (do_action_at_tracepoint): Likewise.
7541
0cccb683
YQ
75422010-09-06 Yao Qi <yao@codesourcery.com>
7543
7544 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
7545 on return.
7546
423ec54c
JK
75472010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
7548
7549 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
7550
12ac6819
PA
75512010-09-06 Pedro Alves <pedro@codesourcery.com>
7552
7553 * Makefile.in (install-only): Replace $IPA_DEPFILES with
7554 "$(IPA_DEPFILES)".
7555
8ed54b31
JB
75562010-09-01 Joel Brobecker <brobecker@adacore.com>
7557
7558 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
7559 gdbserver/lynx-ppc-low.c: New files.
7560 * Makefile.in (lynx_low_h): New variable.
7561 (lynx-low.o, lynx-ppc-low.o): New rules.
7562 * configure.ac: On LynxOS, link with -lnetinet.
7563 * configure.srv: Add handling of powerpc-*-lynxos* targets.
7564 * configure: regenerate.
7565
bb0116a4
JB
75662010-09-01 Joel Brobecker <brobecker@adacore.com>
7567
7568 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
7569 * configure.ac: Add check for vasprintf and vsnprintf.
7570 * configure, config.in: Regenerate.
7571 * server.h (vasprintf, vsnprintf): Add conditional declarations.
7572
a778ab81 75732010-09-01 Joel Brobecker <brobecker@adacore.com>
7574
7575 * gdbreplay.c: Move include of alloca.h up, next to include of
7576 malloc.h.
7577 * server.h: Add include of malloc.h.
7578 * mem-break.c: Remove include of malloc.h.
7579 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
7580
8b034a19 75812010-09-01 Joel Brobecker <brobecker@adacore.com>
7582
7583 * Makefile.in (memmem.o): Build with -Wno-error.
7584
75852010-09-01 Joel Brobecker <brobecker@adacore.com>
7586
7587 * utils.c (xsnprintf): Make non-static.
7588 * server.h: Add xsnprintf declaration.
7589 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
7590 replace calls to snprintf by calls to xsnprintf throughout.
7591
75922010-09-01 Joel Brobecker <brobecker@adacore.com>
7593
7594 * configure.ac: Add configure check for alloca.
7595 * configure, config.in: Regenerate.
7596 * server.h: Include alloca.h if it exists.
7597 * gdbreplay.c: Include alloca.h if it exists.
7598
1a981360
PA
75992010-08-28 Pedro Alves <pedro@codesourcery.com>
7600
7601 * linux-low.c (__SIGRTMIN): Define if not already defined.
7602 (linux_create_inferior): Check for __ANDROID__ rather than
7603 __SIGRTMIN.
7604 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
7605 are already deferred.
7606 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
7607 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
7608 stopped and already has a pending signal to report.
7609 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
7610 a pending signal to report or is moving out of a jump pad.
7611 (linux_init_signals): Check for __ANDROID__ rather than
7612 __SIGRTMIN.
7613
b4d51a55
PA
76142010-08-28 Pedro Alves <pedro@codesourcery.com>
7615
7616 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
7617 debug_threads check. Avoid a linear search when not doing debug
7618 output.
7619
ec48365d
PA
76202010-08-27 Pedro Alves <pedro@codesourcery.com>
7621
7622 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
7623 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
7624 (struct file_handler) <fd>: Change type to gdb_fildes_t.
7625 (process_event): Change local fd's type to gdb_fildes_t.
7626 (create_file_handler): Adjust prototype.
7627 (delete_file_handler): Adjust prototype.
7628 (handle_file_event): Adjust prototype. Use pfildes.
7629 (create_file_event): Adjsut prototype.
7630 * remote-utils.c (remote_desc, listen_desc): Change type to
7631 gdb_fildes_t.
7632 * server.h: New gdb_fildes_t typedef.
7633 [USE_WIN32API]: Include winsock2.h.
7634 (delete_file_handler, add_file_handler): Adjust prototypes.
7635 (pfildes): Declare.
7636 * utils.c (pfildes): New.
7637
854d88f0
PA
76382010-08-27 Pedro Alves <pedro@codesourcery.com>
7639
7640 * configure.ac (build_warnings): Add -Wno-char-subscripts.
7641 * configure: Regenerate.
7642
0146f85b
PA
76432010-08-27 Pedro Alves <pedro@codesourcery.com>
7644
7645 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
7646 (linux_done_accessing_memory): ... this.
7647 (linux_target_ops): Adjust.
7648 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
7649 * nto-low.c (nto_target_ops): Adjust comment.
7650 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
7651 * spu-low.c (spu_target_ops): Adjust comment.
7652 * target.h (target_ops): Rename unprepare_to_access_memory field
7653 to done_accessing_memory.
7654 (unprepare_to_access_memory): Rename to ...
7655 (done_accessing_memory): ... this.
7656
90d74c30
PA
76572010-08-26 Pedro Alves <pedro@codesourcery.com>
7658
7659 * linux-low.c (linux_prepare_to_access_memory): New.
7660 (linux_unprepare_to_access_memory): New.
7661 (linux_target_ops): Install them.
7662 * server.c (read_memory): Rename to ...
7663 (gdb_read_memory): ... this. Use
7664 prepare_to_access_memory/prepare_to_access_memory.
7665 (write_memory): Rename to ...
7666 (gdb_write_memory): ... this. Use
7667 prepare_to_access_memory/prepare_to_access_memory.
7668 (handle_search_memory_1): Adjust.
7669 (process_serial_event): Adjust.
7670 * target.h (struct target_ops): New fields
7671 prepare_to_access_memory and unprepare_to_access_memory.
7672 (prepare_to_access_memory, unprepare_to_access_memory): New.
7673 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
7674 prepare_to_access_memory/prepare_to_access_memory.
7675 * nto-low.c (nto_target_ops): Adjust.
7676 * spu-low.c (spu_target_ops): Adjust.
7677 * win32-low.c (win32_target_ops): Adjust.
7678
fd467969
PA
76792010-08-26 Pedro Alves <pedro@codesourcery.com>
7680
7681 * Makefile.in (WARN_CFLAGS): Get it from configure.
7682 (WERROR_CFLAGS): New.
7683 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
7684 * configure.ac: Introduce --enable-werror, which adds -Werror to
7685 the compiler command line. Enabled by default. Disable with
7686 --disable-werror. Add -Wdeclaration-after-statement
7687 Wpointer-arith and -Wformat-nonliteral to warning flags.
7688 * configure: Regenerate.
7689
331e2f5f
PA
76902010-08-26 Pedro Alves <pedro@codesourcery.com>
7691
7692 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
7693
e581f2b4
PA
76942010-08-26 Pedro Alves <pedro@codesourcery.com>
7695
7696 * gdbreplay.c (remote_error): New.
7697 (gdbchar): New.
7698 (expect): Use gdbchar. Check for error reading from GDB.
7699 Clarify sync error output.
7700 (play): Check for errors writing to GDB.
7701 * linux-low.c (sigchld_handler): Really ignore `write' errors.
7702 * remote-utils.c (getpkt): Check for errors writing to the remote
7703 descriptor.
7704
3c11dd79
PA
77052010-08-25 Pedro Alves <pedro@codesourcery.com>
7706
7707 * linux-low.c (linux_wait_1): Move non-debugging code out of
7708 `debug_threads' control.
7709
d20a8ad9
PA
77102010-08-25 Pedro Alves <pedro@codesourcery.com>
7711
7712 * linux-low.c (linux_wait_1): Don't set last_status here.
7713 * server.c (push_event, queue_stop_reply_callback): Assert we're
7714 not pushing a TARGET_WAITKIND_IGNORE event.
7715 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
7716 (myresume, handle_target_event): Set the thread's last_resume_kind
7717 and last_status from the target returned status.
7718
964e4306
PA
77192010-08-25 Pedro Alves <pedro@codesourcery.com>
7720
7721 PR threads/10729
7722
7723 * linux-x86-low.c (update_debug_registers_callback): New.
7724 (i386_dr_low_set_addr): Use it.
7725 (i386_dr_low_get_addr): New.
7726 (i386_dr_low_set_control): Use update_debug_registers_callback.
7727 (i386_dr_low_get_control): New.
7728 (i386_dr_low_get_status): Adjust.
7729 * linux-low.c (linux_stop_lwp): New.
7730 * linux-low.h (linux_stop_lwp): Declare.
7731
7732 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
7733 argument instead of a i386_debug_reg_state.
7734 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
7735 a i386_debug_reg_state.
7736 (i386_insert_aligned_watchpoint): Adjust.
7737 (i386_remove_aligned_watchpoint): Adjust.
7738 (i386_low_stopped_data_address): Read the debug registers from the
7739 inferior instead of from the mirrors.
7740 * i386-low.h (struct i386_debug_reg_state): Extend comment.
7741 (i386_dr_low_get_addr): Declare.
7742 (i386_dr_low_get_control): Declare.
7743 (i386_dr_low_get_status): Change prototype.
7744
7745 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
7746 (i386_dr_low_get_addr): New.
7747 (i386_dr_low_get_control): New.
7748 (i386_dr_low_get_status): Adjust prototype. Return
7749 dr_status_mirror.
7750 (i386_initial_stuff): Clear dr_status_mirror and
7751 dr_control_mirror.
7752 (i386_get_thread_context): Adjust.
7753 (i386_set_thread_context): Adjust.
7754 (i386_thread_added): Adjust.
7755
5f21a75b
PA
77562010-08-24 Pedro Alves <pedro@codesourcery.com>
7757
7758 * linux-low.h (linux_thread_area): Delete declaration.
7759
3e4c1235
TS
77602010-08-11 Thomas Schwinge <thomas@codesourcery.com>
7761
7762 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
7763 after its termination.
7764
1971b033
PA
77652010-08-09 Pedro Alves <pedro@codesourcery.com>
7766
7767 * linux-low.c (gdb_wants_lwp_stopped): Delete.
7768 (gdb_wants_all_stopped): Delete.
7769 (linux_wait_1): Don't call them.
7770 * server.c (handle_v_cont): Tag all threads as want-stopped.
7771 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
7772 stopped as "client-wants-stopped".
7773
310444ac
PA
77742010-07-31 Pedro Alves <pedro@codesourcery.com>
7775
7776 * Makefile.in (signals_h): New.
7777 (server_h): Depend on it.
7778 (server.o): Don't depend on $(signals_def).
7779 (signals.o): Depend on $(signals_def).
7780
a19cae16
JK
77812010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
7782
7783 * Makefile.in (signals_def): New.
7784 (server_h): Append include/gdb/signals.h and signals_def.
7785 (server.o): Append signals_def.
7786
30d50328
JK
77872010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
7788
7789 * server.c (handle_target_event): Use target_signal_to_host for
7790 resume_info.sig initialization.
7791 * target.h (struct thread_resume) <sig>: New comment.
7792
5c3216e2
OS
77932010-07-20 Ozkan Sezer <sezeroz@gmail.com>
7794
c6f46ca0
OS
7795 * server.c (handle_query): strcpy() the returned string from paddress()
7796 instead of sprintf().
5c3216e2
OS
7797 * utils.c (paddress): Return phex_nz().
7798
6bd31874
JB
77992010-07-07 Joel Brobecker <brobecker@adacore.com>
7800
7801 * server.c (handle_v_cont): Call mourn_inferior if process
7802 just exited.
7803 (myresume): Likewise.
7804
0fb4aa4b
PA
78052010-07-01 Pedro Alves <pedro@codesourcery.com>
7806
7807 Static tracepoints, and integration with UST.
7808
7809 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
7810 * mem-break.c (uninsert_all_breakpoints)
7811 (reinsert_all_breakpoints): New.
7812 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
7813 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
7814 (gdb_agent_ust_loaded, helper_thread_id)
7815 (gdb_agent_helper_thread_id): New macros.
7816 (struct ipa_sym_addresses): Add addr_ust_loaded,
7817 addr_helper_thread_id, addr_cmd_buf.
7818 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
7819 (in_process_agent_loaded_ust): New.
7820 (write_e_ust_not_loaded): New.
7821 (maybe_write_ipa_ust_not_loaded): New.
7822 (struct collect_static_trace_data_action): New.
7823 (enum tracepoint_type) <static_tracepoint>: New.
7824 (struct tracepoint) <handle>: Mention static tracepoints.
7825 (struct static_tracepoint_ctx): New.
7826 (CMD_BUF_SIZE): New.
7827 (add_tracepoint_action): Handle static tracepoint actions.
7828 (unprobe_marker_at): New.
7829 (clear_installed_tracepoints): Handle static tracepoints.
7830 (cmd_qtdp): Handle static tracepoints.
7831 (probe_marker_at): New.
7832 (cmd_qtstart): Handle static tracepoints.
7833 (response_tracepoint): Handle static tracepoints.
7834 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
7835 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
7836 (get_context_regcache): Handle static tracepoints.
7837 (do_action_at_tracepoint): Handle static tracepoint actions.
7838 (traceframe_find_block_type): Handle static trace data blocks.
7839 (traceframe_read_sdata): New.
7840 (download_tracepoints): Download static tracepoint actions.
7841 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
7842 (GDB_PROBE_NAME): New.
7843 (ust_ops): New.
7844 (GET_UST_SYM): New.
7845 (USTF): New.
7846 (dlsym_ust): New.
7847 (ust_marker_to_static_tracepoint): New.
7848 (gdb_probe): New.
7849 (collect_ust_data_at_tracepoint): New.
7850 (gdb_ust_probe): New.
7851 (UNIX_PATH_MAX, SOCK_DIR): New.
7852 (gdb_ust_connect_sync_socket): New.
7853 (resume_thread, stop_thread): New.
7854 (run_inferior_command): New.
7855 (init_named_socket): New.
7856 (gdb_ust_socket_init): New.
7857 (cstr_to_hexstr): New.
7858 (next_st): New.
7859 (first_marker, next_marker): New.
7860 (response_ust_marker): New.
7861 (cmd_qtfstm, cmd_qtsstm): New.
7862 (unprobe_marker_at, probe_marker_at): New.
7863 (cmd_qtstmat, gdb_ust_thread): New.
7864 (gdb_ust_init): New.
7865 (initialize_tracepoint_ftlib): Call gdb_ust_init.
7866 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
7867 (ST_REGENTRY): New.
7868 (x86_64_st_collect_regmap): New.
7869 (X86_64_NUM_ST_COLLECT_GREGS): New.
7870 (AMD64_RIP_REGNUM): New.
7871 (supply_static_tracepoint_registers): New.
7872 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
7873 (ST_REGENTRY): New.
7874 (i386_st_collect_regmap): New.
7875 (i386_NUM_ST_COLLECT_GREGS): New.
7876 (supply_static_tracepoint_registers): New.
7877 * server.c (handle_query): Handle qXfer:statictrace:read.
7878 <qSupported>: Report support for StaticTracepoints, and
7879 qXfer:statictrace:read features.
7880 * server.h (traceframe_read_sdata)
7881 (supply_static_tracepoint_registers): Declare.
7882 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
7883 (unpack_varlen_hex): Include in IPA build.
7884 * Makefile.in (ustlibs, ustinc): New.
7885 (IPA_OBJS): Add remote-utils-ipa.o.
7886 ($(IPA_LIB)): Link -ldl and -lpthread.
7887 (UST_CFLAGS): New.
7888 (IPAGENT_CFLAGS): Add UST_CFLAGS.
7889 * config.in, configure: Regenerate.
7890
9e4344e5
PA
78912010-06-20 Ian Lance Taylor <iant@google.com>
7892 Pedro Alves <pedro@codesourcery.com>
7893
7894 * linux-x86-low.c (always_true): Delete.
7895 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
7896 trying to fool the compiler with always_true.
7897
c6beb2cb
PA
78982010-06-20 Pedro Alves <pedro@codesourcery.com>
7899
7900 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
7901 conditions in gdbserver.
7902
d2ed6730
UW
79032010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
7904
7905 * spu-low.c (spu_read_memory): Wrap around local store limit.
7906 (spu_write_memory): Likewise.
7907
4e29fb54
PA
79082010-06-15 Pedro Alves <pedro@codesourcery.com>
7909
7910 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
7911 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
7912 LONGEST uses.
7913 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
7914 uses.
7915 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
7916 uses with LONGEST uses.
7917
6a271cae
PA
79182010-06-14 Stan Shebs <stan@codesourcery.com>
7919 Pedro Alves <pedro@codesourcery.com>
7920
7921 Bytecode compiler.
7922
7923 * linux-x86-low.c: Include limits.h.
7924 (add_insns): New.
7925 (always_true): New.
7926 (EMIT_ASM): New.
7927 (EMIT_ASM32): New.
7928 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
7929 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
7930 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
7931 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
7932 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
7933 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
7934 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
7935 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
7936 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
7937 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
7938 (amd64_emit_void_call_2): New.
7939 (amd64_emit_ops): New.
7940 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
7941 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
7942 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
7943 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
7944 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
7945 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
7946 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
7947 (i386_emit_call, i386_emit_reg, i386_emit_pop)
7948 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
7949 (i386_emit_stack_adjust, i386_emit_int_call_1)
7950 (i386_emit_void_call_2): New.
7951 (i386_emit_ops): New.
7952 (x86_emit_ops): New.
7953 (the_low_target): Install x86_emit_ops.
7954 * server.h (struct emit_ops): New.
7955 (get_raw_reg_func_addr): Declare.
7956 (current_insn_ptr, emit_error): Declare.
7957 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
7958 (set_trace_state_variable_value): New defines.
7959 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
7960 addr_get_trace_state_variable_value and
7961 addr_set_trace_state_variable_value.
7962 (symbol_list): New fields for get_raw_reg,
7963 get_trace_state_variable_value and set_trace_state_variable_value.
7964 (condfn): New typedef.
7965 (struct tracepoint): New field `compiled_cond'.
7966 (do_action_at_tracepoint): Clear compiled_cond.
7967 (get_trace_state_variable_value, set_trace_state_variable_value):
7968 Export in the IPA.
7969 (condition_true_at_tracepoint): If there's a compiled condition,
7970 run that.
7971 (current_insn_ptr, emit_error): New globals.
7972 (struct bytecode_address): New.
7973 (get_raw_reg_func_addr): New.
7974 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
7975 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
7976 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
7977 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
7978 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
7979 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
7980 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
7981 (compile_tracepoint_condition, compile_bytecodes): New.
7982 * target.h (emit_ops): Forward declare.
7983 (struct target_ops): New field emit_ops.
7984 (target_emit_ops): New.
7985 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
7986 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
7987 * linux-low.c (linux_emit_ops): New.
7988 (linux_target_ops): Install it.
7989 * linux-low.h (struct linux_target_ops): New field emit_ops.
7990
92b72907
UW
79912010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
7992
7993 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
7994 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
7995
fa593d66
PA
79962010-06-01 Pedro Alves <pedro@codesourcery.com>
7997 Stan Shebs <stan@codesourcery.com>
7998
7999 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
8000 (all): Depend on $(extra_libraries).
8001 (install-only): Install the IPA.
8002 (IPA_OBJS, IPA_LIB): New.
8003 (clean): Remove the IPA lib.
8004 (IPAGENT_CFLAGS): New.
8005 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
8006 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
8007 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
8008 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
8009 * configure.ac: Check for atomic builtins support in the compiler.
8010 (IPA_DEPFILES, extra_libraries): Define.
8011 * configure.srv (ipa_obj): Add description.
8012 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
8013 (i[34567]86-*-linux*): Set ipa_obj.
8014 (x86_64-*-linux*): Set ipa_obj.
8015 * linux-low.c (stabilizing_threads): New.
8016 (supports_fast_tracepoints): New.
8017 (linux_detach): Stabilize threads before detaching.
8018 (handle_tracepoints): Handle internal tracing breakpoints. Assert
8019 the lwp is either not stabilizing, or is moving out of a jump pad.
8020 (linux_fast_tracepoint_collecting): New.
8021 (maybe_move_out_of_jump_pad): New.
8022 (enqueue_one_deferred_signal): New.
8023 (dequeue_one_deferred_signal): New.
8024 (linux_wait_for_event_1): If moving out of a jump pad, defer
8025 pending signals to later.
8026 (linux_stabilize_threads): New.
8027 (linux_wait_1): Check if threads need moving out of jump pads, and
8028 do it if so.
8029 (stuck_in_jump_pad_callback): New.
8030 (move_out_of_jump_pad_callback): New.
8031 (lwp_running): New.
8032 (linux_resume_one_lwp): Handle moving out of jump pads.
8033 (linux_set_resume_request): Dequeue deferred signals.
8034 (need_step_over_p): Also step over fast tracepoint jumps.
8035 (start_step_over): Also uninsert fast tracepoint jumps.
8036 (finish_step_over): Also reinsert fast tracepoint jumps.
8037 (linux_install_fast_tracepoint_jump): New.
8038 (linux_target_ops): Install linux_stabilize_threads and
8039 linux_install_fast_tracepoint_jump_pad.
8040 * linux-low.h (linux_target_ops) <get_thread_area,
8041 install_fast_tracepoint_jump_pad>: New fields.
8042 (struct lwp_info) <collecting_fast_tracepoint,
8043 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
8044 (linux_get_thread_area): Declare.
8045 * linux-x86-low.c (jump_insn): New.
8046 (x86_get_thread_area): New.
8047 (append_insns): New.
8048 (push_opcode): New.
8049 (amd64_install_fast_tracepoint_jump_pad): New.
8050 (i386_install_fast_tracepoint_jump_pad): New.
8051 (x86_install_fast_tracepoint_jump_pad): New.
8052 (the_low_target): Install x86_get_thread_area and
8053 x86_install_fast_tracepoint_jump_pad.
8054 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
8055 (struct fast_tracepoint_jump): New.
8056 (fast_tracepoint_jump_insn): New.
8057 (fast_tracepoint_jump_shadow): New.
8058 (find_fast_tracepoint_jump_at): New.
8059 (fast_tracepoint_jump_here): New.
8060 (delete_fast_tracepoint_jump): New.
8061 (set_fast_tracepoint_jump): New.
8062 (uninsert_fast_tracepoint_jumps_at): New.
8063 (reinsert_fast_tracepoint_jumps_at): New.
8064 (set_breakpoint_at): Use write_inferior_memory.
8065 (uninsert_raw_breakpoint): Use write_inferior_memory.
8066 (check_mem_read): Mask out fast tracepoint jumps.
8067 (check_mem_write): Mask out fast tracepoint jumps.
8068 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
8069 (set_fast_tracepoint_jump): Declare.
8070 (delete_fast_tracepoint_jump)
8071 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
8072 (reinsert_fast_tracepoint_jumps_at): Declare.
8073 * regcache.c: Don't compile many functions when building the
8074 in-process agent library.
8075 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
8076 the register buffer in the heap.
8077 (free_register_cache): If the register buffer isn't owned by the
8078 regcache, don't free it.
8079 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
8080 pre-existing register caches.
8081 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
8082 type.
8083 (convert_ascii_to_int): : Constify `from' parameter type.
8084 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
8085 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
8086 the needed buffer in-place.
8087 (relocate_instruction): New.
8088 * server.c (handle_query) <qSymbols>: If the target supports
8089 tracepoints, give it a chance of looking up symbols. Report
8090 support for fast tracepoints.
8091 (handle_status): Stabilize threads.
8092 (process_serial_event): Adjust.
8093 * server.h (struct fast_tracepoint_jump): Forward declare.
8094 (struct process_info) <fast_tracepoint_jumps>: New field.
8095 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
8096 (decode_X_packet, decode_M_packet): Adjust.
8097 (relocate_instruction): Declare.
8098 (in_process_agent_loaded): Declare.
8099 (tracepoint_look_up_symbols): Declare.
8100 (struct fast_tpoint_collect_status): Declare.
8101 (fast_tracepoint_collecting): Declare.
8102 (force_unlock_trace_buffer): Declare.
8103 (handle_tracepoint_bkpts): Declare.
8104 (initialize_low_tracepoint)
8105 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
8106 * target.h (struct target_ops) <stabilize_threads,
8107 install_fast_tracepoint_jump_pad>: New fields.
8108 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
8109 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
8110 [HAVE_STDINT_H]: Include stdint.h.
8111 (trace_debug_1): Rename to ...
8112 (trace_vdebug): ... this.
8113 (trace_debug): Rename to ...
8114 (trace_debug_1): ... this. Add `level' parameter.
8115 (trace_debug): New.
8116 (ATTR_USED, ATTR_NOINLINE): New.
8117 (IP_AGENT_EXPORT): New.
8118 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
8119 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
8120 (about_to_request_buffer_space, trace_buffer_is_full)
8121 (stopping_tracepoint, expr_eval_result, error_tracepoint)
8122 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
8123 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
8124 (traceframe_write_count, traceframes_created)
8125 (trace_state_variables)
8126 New renaming defines.
8127 (struct ipa_sym_addresses): New.
8128 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
8129 (symbol_list): New.
8130 (ipa_sym_addrs): New.
8131 (all_tracepoint_symbols_looked_up): New.
8132 (in_process_agent_loaded): New.
8133 (write_e_ipa_not_loaded): New.
8134 (maybe_write_ipa_not_loaded): New.
8135 (tracepoint_look_up_symbols): New.
8136 (debug_threads) [IN_PROCESS_AGENT]: New.
8137 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
8138 (UNKNOWN_SIDE_EFFECTS): New.
8139 (stop_tracing): New.
8140 (flush_trace_buffer): New.
8141 (stop_tracing_bkpt): New.
8142 (flush_trace_buffer_bkpt): New.
8143 (read_inferior_integer): New.
8144 (read_inferior_uinteger): New.
8145 (read_inferior_data_pointer): New.
8146 (write_inferior_data_pointer): New.
8147 (write_inferior_integer): New.
8148 (write_inferior_uinteger): New.
8149 (struct collect_static_trace_data_action): Delete.
8150 (enum tracepoint_type): New.
8151 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
8152 <actions_str, step_actions, step_actions_str>: Only include in
8153 GDBserver.
fa593d66
PA
8154 <orig_size, obj_addr_on_target, adjusted_insn_addr>
8155 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
8156 (tracepoints): Use IP_AGENT_EXPORT.
8157 (last_tracepoint): Don't include in the IPA.
8158 (stopping_tracepoint): Use IP_AGENT_EXPORT.
8159 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
8160 (alloced_trace_state_variables): New.
8161 (trace_state_variables): Use IP_AGENT_EXPORT.
8162 (traceframe_t): Delete unused variable.
8163 (circular_trace_buffer): Don't include in the IPA.
8164 (trace_buffer_start): Delete.
8165 (struct trace_buffer_control): New.
8166 (trace_buffer_free): Delete.
8167 (struct ipa_trace_buffer_control): New.
8168 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
8169 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
8170 New.
8171 (trace_buffer_ctrl): New.
8172 (TRACE_BUFFER_CTRL_CURR): New.
8173 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
8174 Reimplement as macros.
8175 (trace_buffer_wrap): Delete.
8176 (traceframe_write_count, traceframe_read_count)
8177 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
8178 (struct tracepoint_hit_ctx) <type>: New field.
8179 (struct fast_tracepoint_ctx): New.
8180 (memory_barrier): New.
8181 (cmpxchg): New.
8182 (record_tracepoint_error): Update atomically in the IPA.
8183 (clear_inferior_trace_buffer): New.
8184 (about_to_request_buffer_space): New.
8185 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
8186 updating the same buffer.
8187 (add_tracepoint): Default the tracepoint's type to trap
8188 tracepoint, and orig_size to -1.
8189 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
8190 internal variables.
8191 (create_trace_state_variable): New parameter `gdb'. Handle it.
8192 (clear_installed_tracepoints): Clear fast tracepoint jumps.
8193 (cmd_qtdp): Handle fast tracepoints.
8194 (cmd_qtdv): Adjust.
8195 (max_jump_pad_size): New.
8196 (gdb_jump_pad_head): New.
8197 (get_jump_space_head): New.
8198 (claim_jump_space): New.
8199 (sort_tracepoints): New.
8200 (MAX_JUMP_SIZE): New.
8201 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
8202 IPA.
8203 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
8204 support. Upload fast traceframes, and delete internal IPA
8205 breakpoints.
8206 (stop_tracing_handler): New.
8207 (flush_trace_buffer_handler): New.
8208 (cmd_qtstop): Upload fast tracepoints.
8209 (response_tracepoint): Handle fast tracepoints.
8210 (tracepoint_finished_step): Upload fast traceframes. Set the
8211 tracepoint hit context's tracepoint type.
8212 (handle_tracepoint_bkpts): New.
8213 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
8214 type. Add comment about fast tracepoints.
8215 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
8216 non-existing action_str field.
8217 (get_context_regcache): Handle fast tracepoints.
8218 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
8219 to the regcache.
8220 (fast_tracepoint_from_jump_pad_address): New.
8221 (fast_tracepoint_from_ipa_tpoint_address): New.
8222 (collecting_t): New.
8223 (force_unlock_trace_buffer): New.
8224 (fast_tracepoint_collecting): New.
8225 (collecting): New.
8226 (gdb_collect): New.
8227 (write_inferior_data_ptr): New.
8228 (target_tp_heap): New.
8229 (target_malloc): New.
8230 (download_agent_expr): New.
8231 (UALIGN): New.
8232 (download_tracepoints): New.
8233 (download_trace_state_variables): New.
8234 (upload_fast_traceframes): New.
8235 (IPA_FIRST_TRACEFRAME): New.
8236 (IPA_NEXT_TRACEFRAME_1): New.
8237 (IPA_NEXT_TRACEFRAME): New.
8238 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
8239 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
8240 (gdb_jump_pad_buffer_end): New.
8241 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
8242 (initialize_tracepoint): Adjust.
8243 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
8244 buffer. Initialize the low module.
8245 * utils.c (PREFIX, TOOLNAME): New.
8246 (malloc_failure): Use PREFIX.
8247 (error): In the IPA, an error causes an exit.
8248 (fatal, warning): Use PREFIX.
8249 (internal_error): Use TOOLNAME.
8250 (NUMCELLS): Increase to 10.
8251 * configure, config.in: Regenerate.
8252
d149dd1d
PA
82532010-06-01 Pedro Alves <pedro@codesourcery.com>
8254
8255 * server.c (handle_query) <qSupported>: Do two passes over the
8256 qSupported string to avoid nesting strtok.
8257
f6528abd
JK
82582010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8259
8260 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
8261 (CDEPS): New.
8262 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
8263 -Wl,--dynamic-list.
8264 * configure: Regenerate.
8265 * proc-service.list: New.
8266
ca2a87a0
JK
82672010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8268
8269 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
8270 New comment.
8271
363a6e9f
OS
82722010-05-26 Ozkan Sezer <sezeroz@gmail.com>
8273
8274 * gdbreplay.c (remote_open): Check error return from socket() call by
8275 its equality to -1 not by it being negative.
8276 * remote-utils.c (remote_open): Likewise.
8277
d23b6cb1
PA
82782010-05-23 Pedro Alves <pedro@codesourcery.com>
8279
8280 * config.h: Regenerate.
8281
28d3cf85
MK
82822010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
8283
8284 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
8285 doesn't provide PTRACE_GET_THREAD_AREA.
8286
fea36a59
MK
82872010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
8288
8289 * linux-m68k-low.c: Include <asm/ptrace.h>
8290 (ps_get_thread_area): Implement.
8291
24b066ba
DE
82922010-05-03 Doug Evans <dje@google.com>
8293
8294 * event-loop.c (struct callback_event): New struct.
8295 (callback_list): New global.
8296 (append_callback_event, delete_callback_event): New functions.
8297 (process_callback): New function.
8298 (start_event_loop): Call it.
8299 * remote-utils.c (NOT_SCHEDULED): Define.
8300 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
8301 moved out of readchar.
8302 (readchar): Rewrite. Call reschedule before returning.
8303 (reset_readchar): New function.
8304 (remote_close): Call it.
8305 (process_remaining, reschedule): New functions.
8306 * server.h (callback_handler_func): New typedef.
8307 (append_callback_event, delete_callback_event): Declare.
8308
9836d6ea
PA
83092010-05-03 Pedro Alves <pedro@codesourcery.com>
8310
8311 * proc-service.c (ps_pglobal_lookup): Use
8312 thread_db_look_up_one_symbol.
8313 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
8314 parameter. Use it instead of all_symbols_looked_up.
8315 * server.h (struct process_info) <all_symbols_looked_up>: Delete
8316 field.
8317 (all_symbols_looked_up): Don't declare.
8318 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
8319 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
8320 field.
8321 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
8322 Set all_symbols_looked_up here.
8323 (thread_db_look_up_one_symbol): New.
8324 (thread_db_get_tls_address): Adjust.
8325 (thread_db_load_search, try_thread_db_load_1): Always allocate the
8326 thread_db object on the heap, and tentatively set it in the
8327 process structure.
8328 (thread_db_init): Don't set all_symbols_looked_up here.
8329 * linux-low.h (thread_db_look_up_one_symbol): Declare.
8330
7984d532
PA
83312010-05-03 Pedro Alves <pedro@codesourcery.com>
8332
8333 * linux-low.c (linux_kill, linux_detach): Adjust.
8334 (status_pending_p_callback): Remove redundant statement. Check
8335 for !TARGET_WAITIKIND_IGNORE, instead of
8336 TARGET_WAITKIND_STOPPED.
8337 (handle_tracepoints): Make sure LWP is locked. Adjust.
8338 (linux_wait_for_event_1): Adjust.
8339 (linux_cancel_breakpoints): New.
8340 (unsuspend_one_lwp): New.
8341 (unsuspend_all_lwps): New.
8342 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
8343 (send_sigstop_callback): Change return type to int, add new
8344 `except' parameter and handle it.
8345 (suspend_and_send_sigstop_callback): New.
8346 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
8347 pass them down. If SUSPEND, also increment the lwp's suspend
8348 count.
8349 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
8350 (need_step_over_p): Don't consider suspended LWPs.
8351 (start_step_over): Adjust.
8352 (proceed_one_lwp): Change return type to int, add new `except'
8353 parameter and handle it.
8354 (unsuspend_and_proceed_one_lwp): New.
8355 (proceed_all_lwps): Use find_inferior instead of
8356 for_each_inferior.
8357 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
8358 also decrement the suspend count of LWPs. Pass `except' down,
8359 instead of hacking its suspend count.
8360 (linux_pause_all): Add `freeze' parameter. Adjust.
8361 (linux_unpause_all): New.
8362 (linux_target_ops): Install linux_unpause_all.
8363 * server.c (handle_status): Adjust.
8364 * target.h (struct target_ops): New fields `unpause_all' and
8365 `cancel_breakpoints'. Add new parameter to `pause_all'.
8366 (pause_all): Add new `freeze' parameter.
8367 (unpause_all): New.
8368 (cancel_breakpoints): New.
8369 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
8370 cancel breakpoints.
8371 (cmd_qtstart): Pause threads.
8372 (stop_tracing): Pause threads, and cancel breakpoints.
8373 * win32-low.c (win32_target_ops): Adjust.
8374
e471f25b
PA
83752010-05-03 Pedro Alves <pedro@codesourcery.com>
8376
8377 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
8378 the inferior right away from here...
8379 (linux_wait_1): ... to here, and adjust to check the thread's
8380 last_resume_kind instead of the lwp's step or stop_expected flags.
8381
1915ef4f
PA
83822010-05-02 Pedro Alves <pedro@codesourcery.com>
8383
8384 * README: Use consistent `GDB' and `GDBserver' spellings.
8385
f9e39928
PA
83862010-05-02 Pedro Alves <pedro@codesourcery.com>
8387
8388 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
8389 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
8390 (linux_detach_one_lwp): Assume the lwp is stopped.
8391 (any_thread_of): Delete.
8392 (linux_detach): Stop all lwps here. Don't blindly delete all
8393 breakpoints.
8394 (delete_lwp_callback): New.
8395 (linux_mourn): Delete all lwps of the process that is gone.
8396 (linux_wait_1): Don't delete the last lwp of the process here.
8397 * mem-break.h (mark_breakpoints_out): Declare.
8398 * mem-break.c (mark_breakpoints_out): New.
8399 (free_all_breakpoints): Use it.
8400 * server.c (handle_target_event): If the process is gone, mark
8401 breakpoints out.
8402 * thread-db.c (struct thread_db) <create_bp>: New field.
8403 (thread_db_enable_reporting): Fix prototype. Store a thread event
8404 breakpoint reference in the thread_db struct.
8405 (thread_db_load_search): Clear the thread_db object.
8406 (try_thread_db_load_1): Ditto.
8407 (switch_to_process): New.
8408 (disable_thread_event_reporting): Use it.
8409 (remove_thread_event_breakpoints): New.
8410 (thread_db_detach, thread_db_mourn): Use it.
8411
1e7fc18c
PA
84122010-05-01 Pedro Alves <pedro@codesourcery.com>
8413
8414 * linux-low.c (linux_enable_event_reporting): New.
8415 (linux_wait_for_event_1, handle_extended_wait): Use it.
8416
02fc4de7
PA
84172010-04-30 Pedro Alves <pedro@codesourcery.com>
8418
8419 * linux-low.c (linux_kill_one_lwp, linux_kill)
8420 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
8421 (send_sigstop): Take an lwp_info as parameter instead. Queue a
8422 SIGSTOP even if the LWP is stopped.
8423 (send_sigstop_callback): New.
8424 (stop_all_lwps): Use send_sigstop_callback instead.
8425 (linux_resume_one_thread): Adjust.
8426 (proceed_one_lwp): Still proceed an LWP that the client has
8427 requested to stop, if we haven't reported it as stopped yet. Make
8428 sure that LWPs the client want stopped, have a pending SIGSTOP.
8429
bc3b5632
DE
84302010-04-26 Doug Evans <dje@google.com>
8431
ae1ada35
DE
8432 * server.c (handle_general_set): Make static.
8433
bc3b5632
DE
8434 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
8435 Print received char after testing for error/eof instead of before.
8436 (input_interrupt): Tweak comment.
8437
65730243
DE
84382010-04-23 Doug Evans <dje@google.com>
8439
8440 * server.c (start_inferior): Print inferior argv if --debug.
8441
a8ae7dc0
AR
84422010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
8443
8444 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
8445 * nto-x86-low.c: Include server.h
8446
1c07cc19
PM
84472010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
8448
8449 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
8450 be consistent with other sources of this directory.
8451 (init_registers_amd64): Correct name of source file of this function
8452 in the comment.
8453
e0a61e09
PM
84542010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8455
8456 * configure.srv (x86_64-*-mingw*): New configuration for Windows
8457 64-bit executables.
8458
54709339
PM
84592010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8460
8461 * win32-i386-low.c: Add 64-bit support.
8462 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
8463 (init_registers_amd64): Declare.
8464 (mappings): Add 64-bit version of array.
8465 (init_windows_x86): New function.
8466 (the_low_target): Change init_arch field to init_windows_x86.
8467
e8f0053d
PM
84682010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8469
8470 * win32-low.c: Adapt to support also 64-bit architecture.
8471 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
8472 (get_image_name): Use SIZE_T type for local variable `done'.
8473 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
8474 (toolhelp_get_dll_name): Idem.
8475 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
8476 Use uintptr_t typecast to avoid warning.
8477 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
8478 (handle_exception): Use phex_nz to avoid warning.
8479 (win32_wait): Remove unused local variable `process'.
8480
c481e77e
PM
84812010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8482
8483 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
8484 `amd64-avx.o'.
8485
12ea4b69
PM
84862010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
8487
8488 * configure.ac: Use `ws2_32' library for srv_mingw.
8489 * configure: Regenerate.
8490 * gdbreplay.c: Include winsock2.h instead of winsock.h.
8491 * remote-utils.c: Likewise.
8492
f6d1620c
L
84932010-04-17 H.J. Lu <hongjiu.lu@intel.com>
8494
8495 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
8496 if __x86_64__ is defined.
8497
8e642873
PM
84982010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
8499
8500 * configure: Regenerate.
8501
711e434b
PM
85022010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
8503
8504 * server.c (handle_query): Handle 'qGetTIBAddr' query.
8505 * target.h (target_ops): New get_tib_address field.
8506 * win32-low.h (win32_thread_info): Add thread_local_base field.
8507 * win32-low.c (child_add_thread): Add tlb argument.
8508 Set thread_local_base field to TLB.
8509 (get_child_debug_event): Adapt to child_add_thread change.
8510 (win32_get_tib_address): New function.
8511 (win32_target_ops): Set get_tib_address field to
8512 win32_get_tib_address.
8513 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
8514
505106cd
PA
85152010-04-12 Pedro Alves <pedro@codesourcery.com>
8516
505106cd
PA
8517 * linux-low.c (linux_mourn): Also remove the process.
8518 * server.c (handle_target_event): Don't remove the process here.
8519 * nto-low.c (nto_mourn): New.
8520 (nto_target_ops): Install it.
8521 * spu-low.c (spu_mourn): New.
8522 (spu_target_ops): Install it.
8523 * win32-low.c (win32_mourn): New.
8524 (win32_target_ops): Install it.
8525
e8470a06
PA
85262010-04-12 Pedro Alves <pedro@codesourcery.com>
8527
8528 * server.h (buffer_xml_printf): Remove redundant `;'.
8529
45ba0d02
PA
85302010-04-12 Pedro Alves <pedro@codesourcery.com>
8531
8532 * regcache.c (set_register_cache): Invalidate regcaches before
8533 changing the register cache layout.
8534 (regcache_invalidate_one): Allow a NULL regcache.
8535 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
8536 regcaches before changing the register cache layout or the target
8537 regsets.
8538
59e04013
L
85392010-04-12 H.J. Lu <hongjiu.lu@intel.com>
8540
8541 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
8542 variable warning on Linux/x86-64.
8543
8336d594
PA
85442010-04-11 Pedro Alves <pedro@codesourcery.com>
8545
8546 GDBserver disconnected tracing support.
8547
8548 * linux-low.c (linux_remove_process): Delete.
8549 (add_lwp): Don't set last_resume_kind here.
8550 (linux_kill): Use `mourn'.
8551 (linux_detach): Use `thread_db_detach', and `mourn'.
8552 (linux_mourn): New.
8553 (linux_attach_lwp_1): Adjust comment.
8554 (linux_attach): last_resume_kind moved the thread_info; adjust.
8555 (status_pending_p_callback): Adjust.
8556 (linux_wait_for_event_1): Adjust.
8557 (count_events_callback, select_singlestep_lwp_callback)
8558 (select_event_lwp_callback, cancel_breakpoints_callback)
8559 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
8560 (proceed_one_lwp): Adjust.
8561 (linux_async): Add debug output.
8562 (linux_thread_stopped): New.
8563 (linux_pause_all): New.
8564 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
8565 linux_pause_all.
8566 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
8567 (thread_db_free): Delete declaration.
8568 (thread_db_detach, thread_db_mourn): Declare.
8569 * thread-db.c (thread_db_init): Use thread_db_mourn.
8570 (thread_db_free): Delete, split in two.
8571 (disable_thread_event_reporting): New.
8572 (thread_db_detach): New.
8573 (thread_db_mourn): New.
8574
8575 * server.h (struct thread_info) <last_resume_kind>: New field.
8576 <attached>: Add comment.
8577 <gdb_detached>: New field.
8578 (handler_func): Change return type to int.
8579 (handle_serial_event, handle_target_event): Ditto.
8580 (gdb_connected): Declare.
8581 (tracing): Delete.
8582 (disconnected_tracing): Declare.
8583 (stop_tracing): Declare.
8584
8585 * server.c (handle_query) <qSupported>: Report support for
8586 disconnected tracing.
8587 (queue_stop_reply_callback): Account for running threads.
8588 (gdb_wants_thread_stopped): New.
8589 (gdb_wants_all_threads_stopped): New.
8590 (gdb_reattached_process): New.
8591 (handle_status): Clear the `gdb_detached' flag of all processes.
8592 In all-stop, stop all threads.
8593 (main): Be sure to leave tfind mode. Handle disconnected tracing.
8594 (process_serial_event): If the remote connection breaks, or if an
8595 exit was forced with "monitor exit", force an event loop exit.
8596 Handle disconnected tracing on detach.
8597 (handle_serial_event): Adjust.
8598 (handle_target_event): If GDB isn't connected, forward events back
8599 to the inferior, unless the last process exited, in which case,
8600 exit gdbserver. Adjust interface.
8601
8602 * remote-utils.c (remote_open): Don't block in accept. Instead
8603 register an event loop source on the listen socket file
8604 descriptor. Refactor bits into ...
8605 (listen_desc): ... this new global.
8606 (gdb_connected): ... this new function.
8607 (enable_async_notification): ... this new function.
8608 (handle_accept_event): ... this new function.
8609 (remote_close): Clear remote_desc.
8610
8611 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
8612
8613 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
8614 New fields.
8615 (mourn_inferior): Define.
8616 (target_process_qsupported): Avoid the dangling else problem.
8617 (thread_stopped): Define.
8618 (pause_all): Define.
8619 (target_waitstatus_to_string): Declare.
8620 * target.c (target_waitstatus_to_string): New.
8621
8622 * tracepoint.c (tracing): Make extern.
8623 (disconnected_tracing): New.
8624 (stop_tracing): Make extern. Handle tracing stops due to GDB
8625 disconnecting.
8626 (cmd_qtdisconnected): New.
8627 (cmd_qtstatus): Report disconnected tracing status in trace reply.
8628 (handle_tracepoint_general_set): Handle QTDisconnected.
8629
8630 * event-loop.c (event_handler_func): Change return type to int.
8631 (process_event): Bail out if the event handler wants the event
8632 loop to stop.
8633 (handle_file_event): Ditto.
8634 (start_event_loop): Bail out if the event handler wants the event
8635 loop to stop.
8636
8637 * nto-low.c (nto_target_ops): Adjust.
8638 * spu-low.c (spu_wait): Don't remove the process here.
8639 (spu_target_ops): Adjust.
8640 * win32-low.c (win32_wait): Don't remove the process here.
8641 (win32_target_ops): Adjust.
8642
5d267c4c
PA
86432010-04-11 Pedro Alves <pedro@codesourcery.com>
8644
8645 * regcache.c (realloc_register_cache): Invalidate inferior's
8646 regcache before recreating it.
8647
623ccd72
PA
86482010-04-09 Pedro Alves <pedro@codesourcery.com>
8649
8650 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
8651
219f2f23
PA
86522010-04-09 Stan Shebs <stan@codesourcery.com>
8653 Pedro Alves <pedro@codesourcery.com>
8654
8655 * server.h (LONGEST): New.
8656 (struct thread_info) <while_stepping>: New field.
8657 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
8658 Declare.
8659 (initialize_tracepoint, handle_tracepoint_general_set)
8660 (handle_tracepoint_query, tracepoint_finished_step)
8661 (tracepoint_was_hit, release_while_stepping_state_list):
8662 (current_traceframe): Declare.
8663 * server.c (handle_general_set): Handle tracepoint packets.
8664 (read_memory): New.
8665 (write_memory): New.
8666 (handle_search_memory_1): Use read_memory.
8667 (handle_query): Report support for conditional tracepoints, trace
8668 state variables, and tracepoint sources. Handle tracepoint
8669 queries.
8670 (main): Initialize the tracepoints module.
8671 (process_serial_event): Handle traceframe reads/writes.
8672
8673 * linux-low.c (handle_tracepoints): New.
8674 (linux_wait_1): Call it.
8675 (linux_resume_one_lwp): Handle while-stepping.
8676 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
8677 (linux_target_ops): Install them.
8678 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
8679 New field.
8680 * linux-x86-low.c (x86_supports_tracepoints): New.
8681 (the_low_target). Install it.
8682
8683 * mem-break.h (delete_breakpoint): Declare.
8684 * mem-break.c (delete_breakpoint): Make external.
8685
8686 * target.h (struct target_ops): Add `supports_tracepoints',
8687 `read_pc', and `write_pc' fields.
8688 (target_supports_tracepoints): Define.
8689 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
8690 (phex_nz): New.
8691
8692 * regcache.h (struct regcache) <registers_owned>: New field.
8693 (init_register_cache, regcache_cpy): Declare.
8694 (regcache_read_pc, regcache_write_pc): Declare.
8695 (register_cache_size): Declare.
8696 (supply_regblock): Declare.
8697 * regcache.c (init_register_cache): New.
8698 (new_register_cache): Use it.
8699 (regcache_cpy): New.
8700 (register_cache_size): New.
8701 (supply_regblock): New.
8702 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 8703
219f2f23
PA
8704 * tracepoint.c: New.
8705
8706 * Makefile.in (OBS): Add tracepoint.o.
8707 (tracepoint.o): New rule.
8708
3a13a53b
L
87092010-04-08 H.J. Lu <hongjiu.lu@intel.com>
8710
8711 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
8712 (i386-mmx.o): New.
8713 (i386-mmx.c): Likewise.
8714 (i386-mmx-linux.o): Likewise.
8715 (i386-mmx-linux.c): Likewise.
8716
8717 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
8718 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
8719 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
8720 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
8721
8722 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
8723 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
8724 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
8725
1570b33e
L
87262010-04-07 H.J. Lu <hongjiu.lu@intel.com>
8727
8728 * Makefile.in (clean): Updated.
8729 (i386-avx.o): New.
8730 (i386-avx.c): Likewise.
8731 (i386-avx-linux.o): Likewise.
8732 (i386-avx-linux.c): Likewise.
8733 (amd64-avx.o): Likewise.
8734 (amd64-avx.c): Likewise.
8735 (amd64-avx-linux.o): Likewise.
8736 (amd64-avx-linux.c): Likewise.
8737
8738 * configure.srv (srv_i386_regobj): Add i386-avx.o.
8739 (srv_i386_linux_regobj): Add i386-avx-linux.o.
8740 (srv_amd64_regobj): Add amd64-avx.o.
8741 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
8742 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
8743 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
8744 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
8745 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
8746 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
8747 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
8748
8749 * i387-fp.c: Include "i386-xstate.h".
8750 (i387_xsave): New.
8751 (i387_cache_to_xsave): Likewise.
8752 (i387_xsave_to_cache): Likewise.
8753 (x86_xcr0): Likewise.
8754
8755 * i387-fp.h (i387_cache_to_xsave): Likewise.
8756 (i387_xsave_to_cache): Likewise.
8757 (x86_xcr0): Likewise.
8758
8759 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
8760 * linux-crisv32-low.c (target_regsets): Likewise.
8761 * linux-m68k-low.c (target_regsets): Likewise.
8762 * linux-mips-low.c (target_regsets): Likewise.
8763 * linux-ppc-low.c (target_regsets): Likewise.
8764 * linux-s390-low.c (target_regsets): Likewise.
8765 * linux-sh-low.c (target_regsets): Likewise.
8766 * linux-sparc-low.c (target_regsets): Likewise.
8767 * linux-xtensa-low.c (target_regsets): Likewise.
8768
8769 * linux-low.c: Include <sys/uio.h>.
8770 (regsets_fetch_inferior_registers): Support nt_type.
8771 (regsets_store_inferior_registers): Likewise.
8772 (linux_process_qsupported): New.
8773 (linux_target_ops): Add linux_process_qsupported.
8774
8775 * linux-low.h (regset_info): Add nt_type.
8776 (linux_target_ops): Add process_qsupported.
8777
8778 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
8779 and <sys/uio.h>.
8780 (init_registers_i386_avx_linux): New.
8781 (init_registers_amd64_avx_linux): Likewise.
8782 (xmltarget_i386_linux_no_xml): Likewise.
8783 (xmltarget_amd64_linux_no_xml): Likewise.
8784 (PTRACE_GETREGSET): Likewise.
8785 (PTRACE_SETREGSET): Likewise.
8786 (x86_fill_xstateregset): Likewise.
8787 (x86_store_xstateregset): Likewise.
8788 (use_xml): Likewise.
8789 (x86_linux_update_xmltarget): Likewise.
8790 (x86_linux_process_qsupported): Likewise.
8791 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
8792 (x86_arch_setup): Don't call init_registers_amd64_linux nor
8793 init_registers_i386_linux here. Call
8794 x86_linux_update_xmltarget.
8795 (the_low_target): Add x86_linux_process_qsupported.
8796
8797 * server.c (handle_query): Call target_process_qsupported.
8798
8799 * target.h (target_ops): Add process_qsupported.
8800 (target_process_qsupported): New.
8801
fc7238bb
PA
88022010-04-03 Pedro Alves <pedro@codesourcery.com>
8803
8804 * inferiors.c (add_thread): Set last_status kind to
8805 TARGET_WAITKIND_IGNORE.
8806 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
8807 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
8808 (linux_wait_1): Move `thread' local definition to block that uses
8809 it. Don't NULL initialize `event_child'.
8810 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
8811 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
8812 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
8813
bdabb078
PA
88142010-04-01 Pedro Alves <pedro@codesourcery.com>
8815
8816 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
8817 an extended waitstatus, or by a watchpoint.
8818 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
8819 thread was stepping or has been stopped by a watchpoint.
8820
d3bbe7a0
PA
88212010-04-01 Pedro Alves <pedro@codesourcery.com>
8822
8823 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
8824 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
8825 of another, then delete the previous, and validate all
8826 breakpoints.
8827 (validate_inserted_breakpoint): New.
8828 (delete_disabled_breakpoints): New.
8829 (validate_breakpoints): New.
8830 (check_mem_read): Validate breakpoints before trusting their
8831 shadow. Delete disabled breakpoints.
8832 (check_mem_write): Validate breakpoints before trusting they
8833 should be inserted. Delete disabled breakpoints.
8834 * mem-break.h (validate_breakpoints):
8835 * server.c (handle_query): Validate breakpoints when we see a
8836 qSymbol query.
8837
8b07ae33
PA
88382010-04-01 Pedro Alves <pedro@codesourcery.com>
8839
8840 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
8841 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
8842 if we could tell there's a GDB breakpoint at stop_pc.
8843 (need_step_over_p): Don't do a step over if we find a GDB
8844 breakpoint at the resume PC.
8845
8846 * mem-break.c (struct raw_breakpoint): New.
8847 (enum bkpt_type): New type `gdb_breakpoint'.
8848 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
8849 fields. New field `raw'.
8850 (find_raw_breakpoint_at): New.
8851 (set_raw_breakpoint_at): Handle refcounting. Create a raw
8852 breakpoint instead.
8853 (set_breakpoint_at): Adjust.
8854 (delete_raw_breakpoint): New.
8855 (release_breakpoint): New.
8856 (delete_breakpoint): Rename to...
8857 (delete_breakpoint_1): ... this. Add proc parameter. Use
8858 release_breakpoint. Return ENOENT.
8859 (delete_breakpoint): Reimplement.
8860 (find_breakpoint_at): Delete.
8861 (find_gdb_breakpoint_at): New.
8862 (delete_breakpoint_at): Delete.
8863 (set_gdb_breakpoint_at): New.
8864 (delete_gdb_breakpoint_at): New.
8865 (gdb_breakpoint_here): New.
8866 (set_reinsert_breakpoint): Use release_breakpoint.
8867 (uninsert_breakpoint): Rename to ...
8868 (uninsert_raw_breakpoint): ... this.
8869 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
8870 (reinsert_raw_breakpoint): Change parameter type to
8871 raw_breakpoint.
8872 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
8873 instead.
8874 (check_breakpoints): Adjust. Use release_breakpoint.
8875 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
8876 (breakpoint_inserted_here): Ditto.
8877 (check_mem_read): Adjust to iterate over raw breakpoints instead.
8878 Don't trust the breakpoint's shadow if it is not inserted.
8879 (check_mem_write): Adjust to iterate over raw breakpoints instead.
8880 (delete_all_breakpoints): Adjust.
8881 (free_all_breakpoints): Mark all breakpoints as uninserted, and
8882 use delete_breakpoint_1.
8883
8884 * mem-break.h (breakpoints_supported): Delete declaration.
8885 (set_gdb_breakpoint_at): Declare.
8886 (gdb_breakpoint_here): Declare.
8887 (delete_breakpoint_at): Delete.
8888 (delete_gdb_breakpoint_at): Declare.
8889
8890 * server.h (struct raw_breakpoint): Forward declare.
8891 (struct process_info): New field `raw_breakpoints'.
8892
8893 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
8894 breakpoints.
8895
6bf5e0ba
PA
88962010-03-24 Pedro Alves <pedro@codesourcery.com>
8897
8898 * linux-low.c (status_pending_p_callback): Fix comment.
8899 (linux_wait_for_event_1): Move most of the internal breakpoint
8900 handling from here...
8901 (linux_wait_1): ... to here.
8902 (count_events_callback): New.
8903 (select_singlestep_lwp_callback): New.
8904 (select_event_lwp_callback): New.
8905 (cancel_breakpoints_callback): New.
8906 (select_event_lwp): New.
8907 (linux_wait_1): Simplify internal breakpoint handling. Give equal
8908 priority to all LWPs that have had events that should be reported
8909 to the client. Cancel breakpoints when about to reporting the
8910 event to the client, not while stopping lwps. No longer cancel
8911 finished single-steps here.
8912 (cancel_finished_single_step): Delete.
8913 (cancel_finished_single_steps): Delete.
8914
414a389f
PA
89152010-03-24 Pedro Alves <pedro@codesourcery.com>
8916
8917 * mem-break.c (enum bkpt_type): New.
8918 (struct breakpoint): New field `type'.
8919 (set_breakpoint_at): Change return type to struct breakpoint
8920 pointer. Set type to `other_breakpoint' by default.
8921 (delete_breakpoint): Rewrite, supporting more than one breakpoint
8922 in the breakpoint list.
8923 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
8924 (reinsert_breakpoint): Rename to ...
8925 (reinsert_raw_breakpoint): ... this.
8926 (reinsert_breakpoints_at): Adjust.
8927 * mem-break.h (struct breakpoint): Declare.
8928 (set_breakpoint_at): Change return type to struct breakpoint
8929 pointer.
8930
2280c721
PA
89312010-03-24 Pedro Alves <pedro@codesourcery.com>
8932
8933 * server.c (handle_query): Assign, not compare.
8934
d50171e4
PA
89352010-03-24 Pedro Alves <pedro@codesourcery.com>
8936
8937 Teach linux gdbserver to step-over-breakpoints.
8938
8939 * linux-low.c (can_hardware_single_step): New.
8940 (supports_breakpoints): New.
8941 (handle_extended_wait): If stopping threads, read the stop pc of
8942 the new cloned LWP.
8943 (get_pc): New.
8944 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
8945 low target doesn't support retrieving the PC.
8946 (add_lwp): Set last_resume_kind to resume_continue.
8947 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
8948 (linux_attach): Don't clear stop_expected. Set the lwp's
8949 last_resume_kind to resume_stop.
8950 (linux_detach_one_lwp): Don't check for removed breakpoints.
8951 (check_removed_breakpoint): Delete.
8952 (status_pending_p): Rename to ...
8953 (status_pending_p_callback): ... this. Don't check for removed
8954 breakpoints. Don't consider threads that are stopped from GDB's
8955 perspective.
8956 (linux_wait_for_lwp): Always read the stop_pc here.
8957 (cancel_breakpoint): New.
8958 (step_over_bkpt): New global.
8959 (linux_wait_for_event_1): Implement stepping over breakpoints.
8960 (gdb_wants_lwp_stopped): New.
8961 (gdb_wants_all_stopped): New.
8962 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
8963 single-step traps here. Store the thread's last reported target
8964 wait status.
8965 (send_sigstop): Don't clear stop_expected. Always set it,
8966 instead.
8967 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
8968 (cancel_finished_single_step): New.
8969 (cancel_finished_single_steps): New.
8970 (wait_for_sigstop): Don't cancel finished single-step traps here.
8971 (linux_resume_one_lwp): Don't check for removed breakpoints.
8972 Don't set `step' on non-hardware step archs.
8973 (linux_set_resume_request): Ignore resume_stop requests if already
8974 stopping or stopped. Set the lwp's last_resume_kind.
8975 (resume_status_pending_p): Don't check for removed breakpoints.
8976 (need_step_over_p): New.
8977 (start_step_over): New.
8978 (finish_step_over): New.
8979 (linux_resume_one_thread): Always queue a sigstop for resume_stop
8980 requests. Clear the thread's last reported target waitstatus.
8981 Don't use the `suspended' flag. Don't consider pending breakpoints.
8982 (linux_resume): Start a step-over if necessary.
8983 (proceed_one_lwp): New.
8984 (proceed_all_lwps): New.
8985 (unstop_all_lwps): New.
8986 * linux-low.h (struct lwp_info): Rewrite comment for the
8987 `suspended' flag. Add the `stop_pc' field. Delete the
8988 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
8989 Add `'last_resume_kind' and `need_step_over' fields.
8990 * inferiors.c (struct thread_info): Delete, moved elsewhere.
8991 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
8992 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
8993 (set_raw_breakpoint_at): New.
8994 (set_breakpoint_at): Rewrite to use it.
8995 (reinsert_breakpoint_handler): Delete.
8996 (set_reinsert_breakpoint): New.
8997 (reinsert_breakpoint_by_bp): Delete.
8998 (delete_reinsert_breakpoints): New.
8999 (uninsert_breakpoint): Rewrite.
9000 (uninsert_breakpoints_at): New.
9001 (reinsert_breakpoint): Rewrite.
9002 (reinsert_breakpoints_at): New.
9003 (check_breakpoints): Rewrite.
9004 (breakpoint_here): New.
9005 (breakpoint_inserted_here): New.
9006 (check_mem_read): Adjust.
9007 * mem-break.h (breakpoints_supported, breakpoint_here)
9008 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
9009 (reinsert_breakpoint_by_bp): Delete declaration.
9010 (delete_reinsert_breakpoints): Declare.
9011 (reinsert_breakpoint): Delete declaration.
9012 (reinsert_breakpoints_at): Declare.
9013 (uninsert_breakpoint): Delete declaration.
9014 (uninsert_breakpoints_at): Declare.
9015 (check_breakpoints): Adjust prototype.
9016 * server.h: Adjust include order.
9017 (struct thread_info): Declare here. Add a `last_status' field.
9018
30ba68cb
MS
90192010-03-23 Michael Snyder <msnyder@vmware.com>
9020
9021 * server.c (crc32): New function.
9022 (handle_query): Add handling for 'qCRC:' request.
9023
b9a881c2
PA
90242010-03-23 Pedro Alves <pedro@codesourcery.com>
9025
9026 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
9027 lwp had been stopped by a watchpoint.
9028
e92d13d5
PA
90292010-03-16 Pedro Alves <pedro@codesourcery.com>
9030
9031 * server.h (internal_error): Declare.
9032 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
9033 * utils.c (internal_error): New function.
9034
64daa791
AS
90352010-03-15 Andreas Schwab <schwab@redhat.com>
9036
9037 * configure.srv: Fix typo setting srv_regobj.
9038
f52cd8cd
PA
90392010-03-15 Pedro Alves <pedro@codesourcery.com>
9040
9041 * linux-low.c (fetch_register): Avoid passing a non string literal
9042 format to `error'.
9043 (usr_store_inferior_registers): Ditto.
9044
93ae6fdc
PA
90452010-03-14 Pedro Alves <pedro@codesourcery.com>
9046
9047 * linux-low.c (linux_write_memory): Bail out early if peeking
9048 memory failed.
9049
c3adc08c
PA
90502010-03-14 Pedro Alves <pedro@codesourcery.com>
9051
9052 * linux-low.h (struct lwp_info): New fields
9053 `stopped_by_watchpoint' and `stopped_data_address'.
9054 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
9055 here, and cache them in the lwp object.
9056 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
9057 directly.
9058 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
9059 field.
9060 (linux_stopped_by_watchpoint): Rewrite.
9061 (linux_stopped_data_address): Rewrite.
9062
bce522a2
PA
90632010-03-06 Simo Melenius <simo.melenius@iki.fi>
9064
9065 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
9066 switching the current inferior, not before.
9067
90884b2b
L
90682010-03-01 H.J. Lu <hongjiu.lu@intel.com>
9069
9070 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
9071 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
9072 i386-linux.c and amd64-linux.c.
9073 (reg-i386.o): Removed.
9074 (reg-i386.c): Likewise.
9075 (reg-i386-linux.o): Likewise.
9076 (reg-i386-linux.c): Likewise.
9077 (reg-x86-64.o): Likewise.
9078 (reg-x86-64.c): Likewise.
9079 (reg-x86-64-linux.o): Likewise.
9080 (reg-x86-64-linux.c): Likewise.
9081 (i386.o): New.
9082 (i386.c): Likewise.
9083 (i386-linux.o): Likewise.
9084 (i386-linux.c): Likewise.
9085 (amd64.o): Likewise.
9086 (amd64.c): Likewise.
9087 (amd64-linux.o): Likewise.
9088 (amd64-linux.c): Likewise.
9089
9090 * configure.srv (srv_i386_regobj): New.
9091 (srv_i386_linux_regobj): Likewise.
9092 (srv_amd64_regobj): Likewise.
9093 (srv_amd64_linux_regobj): Likewise.
9094 (srv_i386_32bit_xmlfiles): Likewise.
9095 (srv_i386_64bit_xmlfiles): Likewise.
9096 (srv_i386_xmlfiles): Likewise.
9097 (srv_amd64_xmlfiles): Likewise.
9098 (srv_i386_linux_xmlfiles): Likewise.
9099 (srv_amd64_linux_xmlfiles): Likewise.
9100 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
9101 srv_xmlfiles to $srv_i386_xmlfiles.
9102 (i[34567]86-*-mingw32ce*): Likewise.
9103 (i[34567]86-*-mingw*): Likewise.
9104 (i[34567]86-*-nto*): Likewise.
9105 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
9106 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
9107 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
9108 (x86_64-*-linux*): Likewise.
9109
9110 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
9111 (init_registers_amd64_linux): New.
9112 (x86_arch_setup): Replace init_registers_x86_64_linux with
9113 init_registers_amd64_linux.
9114
193f13e6
MK
91152010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
9116
9117 * configure.ac: Check for libdl. If it is not available link against
9118 static libthread_db.
9119 * configure: Regenerate.
9120
85d721b8
PA
91212010-02-22 Pedro Alves <pedro@codesourcery.com>
9122
9123 PR9605
9124
9125 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
9126 handing a read watchpoint.
9127 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
9128
6076632b
DE
91292010-02-12 Doug Evans <dje@google.com>
9130
9131 * linux-low.c (linux_supports_tracefork_flag): Document.
9132 (linux_look_up_symbols): Add comment.
9133
3327ccf7
L
91342010-02-03 H.J. Lu <hongjiu.lu@intel.com>
9135
9136 * regcache.c (supply_register): Clear regcache if buf is NULL.
9137
0718675c 91382010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 9139 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
9140
9141 * inferiors.c (find_inferior): Add function documentation.
9142 (unloaded_dll): Handle the case where the unloaded dll has not
9143 been previously registered in the dll list.
9144
177321bd
DJ
91452010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
9146
9147 * linux-arm-low.c (thumb_breakpoint_len): Delete.
9148 (thumb2_breakpoint): New.
9149 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
9150
2b009048
DJ
91512010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
9152
9153 * linux-low.c (get_stop_pc): Check for SIGTRAP.
9154 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
9155 breakpoints.
9156
3be029c7
PA
91572010-01-21 Pedro Alves <pedro@codesourcery.com>
9158
9159 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
9160
18f5de3b
JK
91612010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
9162
9163 * linux-s390-low.c (s390_collect_ptrace_register)
9164 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
9165
3743bb4f
DE
91662010-01-21 Doug Evans <dje@google.com>
9167
14ce3065
DE
9168 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
9169 (PTRACE_ARG4_TYPE): New macro.
9170 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
9171 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
9172 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
9173 (usr_store_inferior_registers): Ditto.
9174 (linux_read_memory, linux_write_memory): Ditto.
9175 (linux_test_for_tracefork): Ditto.
9176
3743bb4f
DE
9177 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
9178 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
9179
8b315be5
PA
91802010-01-21 Pedro Alves <pedro@codesourcery.com>
9181
9182 * proc-service.c (ps_lgetregs): Don't refetch registers from the
9183 target.
9184
85492558
PA
91852010-01-21 Pedro Alves <pedro@codesourcery.com>
9186
9187 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
9188 prototype to take a regcache. Adjust.
9189
442ea881
PA
91902010-01-20 Pedro Alves <pedro@codesourcery.com>
9191
9192 * regcache.h (struct thread_info): Forward declare.
9193 (struct regcache): New.
9194 (new_register_cache): Adjust prototype.
9195 (get_thread_regcache): Declare.
9196 (free_register_cache): Adjust prototype.
9197 (registers_to_string, registers_from_string): Ditto.
9198 (supply_register, supply_register_by_name, collect_register)
9199 (collect_register_as_string, collect_register_by_name): Ditto.
9200 * regcache.c (struct inferior_regcache_data): Delete.
9201 (get_regcache): Rename to ...
9202 (get_thread_regcache): ... this. Adjust. Switch inferior before
9203 fetching registers.
9204 (regcache_invalidate_one): Adjust.
9205 (regcache_invalidate): Fix prototype.
9206 (new_register_cache): Return the new register cache.
9207 (free_register_cache): Change prototype.
9208 (realloc_register_cache): Adjust.
9209 (registers_to_string): Change prototype to take a regcache. Adjust.
9210 (registers_from_string): Ditto.
9211 (register_data): Ditto.
9212 (supply_register): Ditto.
9213 (supply_register_by_name): Ditto.
9214 (collect_register): Ditto.
9215 (collect_register_as_string): Ditto.
9216 (collect_register_by_name): Ditto.
9217 * server.c (process_serial_event): Adjust.
9218 * linux-low.h (regset_fill_func, regset_store_func): Change
9219 prototype.
9220 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
9221 Change prototype.
9222 * linux-low.c (get_stop_pc): Adjust.
9223 (check_removed_breakpoint): Adjust.
9224 (linux_wait_for_event): Adjust.
9225 (linux_resume_one_lwp): Adjust.
9226 (fetch_register): Add regcache parameter. Adjust.
9227 (usr_store_inferior_registers): Ditto.
9228 (regsets_fetch_inferior_registers): Ditto.
9229 (regsets_store_inferior_registers): Ditto.
9230 (linux_fetch_registers, linux_store_registers): Ditto.
9231 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
9232 regcache. Adjust.
43aaf8b6
PA
9233 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
9234 Ditto.
442ea881
PA
9235 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
9236 prototype to take a regcache.
9237 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
9238 * remote-utils.c (convert_ascii_to_int, outreg)
9239 (prepare_resume_reply): Change prototype to take a regcache.
9240 Adjust.
9241 * target.h (struct target_ops) <fetch_registers, store_registers>:
9242 Change prototype to take a regcache.
9243 (fetch_inferior_registers, store_inferior_registers): Change
9244 prototype to take a regcache. Adjust.
9245 * proc-service.c (ps_lgetregs): Adjust.
9246 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
9247 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
9248 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
9249 take a regcache. Adjust.
9250 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
9251 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
9252 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
9253 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
9254 * linux-cris-low.c (cris_get_pc, cris_set_pc)
9255 (cris_cannot_fetch_register):
9256 (cris_breakpoint_at): Change prototype to take a regcache.
9257 Adjust.
9258 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
9259 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
9260 to take a regcache. Adjust.
9261 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
9262 Adjust.
9263 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
9264 take a regcache. Adjust.
9265 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
9266 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
9267 (m68k_set_pc): Change prototype to take a regcache. Adjust.
9268 * linux-mips-low.c (mips_get_pc):
9269 (mips_set_pc): Change prototype to take a regcache. Adjust.
9270 (mips_reinsert_addr): Adjust.
9271 (mips_collect_register): Change prototype to take a regcache.
9272 Adjust.
9273 (mips_supply_register):
9274 (mips_collect_register_32bit, mips_supply_register_32bit)
9275 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
9276 (mips_store_fpregset): Ditto.
43aaf8b6
PA
9277 * linux-ppc-low.c (ppc_supply_ptrace_register)
9278 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
9279 (parse_spufs_run): Adjust.
9280 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
9281 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
9282 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
9283 take a regcache. Adjust.
9284 * linux-s390-low.c (s390_collect_ptrace_register)
9285 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
9286 (s390_set_pc): Change prototype to take a regcache. Adjust.
9287 (s390_arch_setup): Adjust.
9288 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
9289 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
9290 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
9291 (sparc_fill_gregset, sparc_store_gregset_from_stack)
9292 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
9293 regcache. Adjust.
9294 (sparc_breakpoint_at): Adjust.
9295 * linux-xtensa-low.c (xtensa_fill_gregset):
9296 (xtensa_store_gregset):
9297 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
9298 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
9299 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
9300 prototype to take a regcache. Adjust.
9301 * win32-arm-low.c (arm_fetch_inferior_register)
9302 (arm_store_inferior_register): Change prototype to take a
9303 regcache. Adjust.
9304 * win32-i386-low.c (i386_fetch_inferior_register)
9305 (i386_store_inferior_register): Change prototype to take a
9306 regcache. Adjust.
9307 * win32-low.c (child_fetch_inferior_registers)
9308 (child_store_inferior_registers): Change prototype to take a
9309 regcache. Adjust.
9310 (win32_wait): Adjust.
9311 (win32_fetch_inferior_registers): Change prototype to take a
9312 regcache. Adjust.
9313 (win32_store_inferior_registers): Adjust.
9314 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
9315 store_inferior_register>: Change prototype to take a regcache.
9316
60c3d7b0
DE
93172010-01-20 Doug Evans <dje@google.com>
9318
9319 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
9320 #ifdef.
9321 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 9322 (W_STOPCODE): Provide definition if missing.
60c3d7b0 9323
dc146f7c
VP
93242010-01-13 Vladimir Prus <vladimir@codesourcery.com>
9325
9326 * linux-low.c (linux_core_of_thread): New.
9327 (compare_ints, show_process, list_threads): New.
9328 (linux_qxfer_osdata): Report threads and cores.
9329 (linux_target_op): Register linux_core_of_thread.
9330 * remote-utils.c (prepare_resume_reply): Report the core.
9331 (buffer_xml_printf): Support %d specifier.
9332 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
9333 New.
9334 (handle_query): Handle qXfer:threads. Announce availability
9335 thereof.
9336 * target.h (struct target_ops): New field core_of_thread.
9337
7803799a
UW
93382010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
9339
9340 * Makefile.in (clean): Remove new generated files.
9341 (reg-s390.o, reg-s390.c): Remove rules.
9342 (reg-s390x.o, reg-s390x.c): Likewise.
9343 (s390-linux32.o, s390-linux32.c): Add rules.
9344 (s390-linux64.o, s390-linux64.c): Likewise.
9345 (s390x-linux64.o, s390x-linux64.c): Likewise.
9346 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
9347 * linux-s390-low.c: Include <elf.h>.
9348 (HWCAP_S390_HIGH_GPRS): Define if undefined.
9349 (init_registers_s390): Remove prototype.
9350 (init_registers_s390x): Likewise.
9351 (init_registers_s390_linux32): Add prototype.
9352 (init_registers_s390_linux64): Likewise.
9353 (init_registers_s390x_linux64): Likewise.
9354 (s390_num_regs_3264): New define.
9355 (s390_regmap_3264): New global variable.
9356 (s390_cannot_fetch_register): Remove obsolete check.
9357 (s390_cannot_store_register): Likewise.
9358 (s390_collect_ptrace_register): Handle upper/lower register halves.
9359 (s390_supply_ptrace_register): Likewise.
9360 (s390_fill_gregset): Update to register number changes.
9361 (s390_get_hwcap): New routine.
9362 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
9363 Install appropriate regmap and register set.
9364
6e7ffa39
JB
93652010-01-01 Joel Brobecker <brobecker@adacore.com>
9366
9367 * server.c (gdbserver_version): Update copyright year to 2010.
9368 * gdbreplay.c (gdbreplay_version): Likewise.
9369
957f3f49
DE
93702009-12-28 Doug Evans <dje@google.com>
9371
9372 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
9373 elf/external.h. Include <elf.h> instead but only if necessary.
9374
ca5c370d
PA
93752009-12-28 Pedro Alves <pedro@codesourcery.com>
9376
9377 * linux-low.c (linux_remove_process): Remove `detaching'
9378 parameter. Don't release/detach from thread_db here.
9379 (linux_kill): Release/detach from thread_db here, ...
9380 (linux_detach): ... and here, before actually detaching.
9381 (linux_wait_1): ... and here, when a process exits.
9382 * thread-db.c (any_thread_of): New.
9383 (thread_db_free): Switch the current inferior to a thread of the
9384 passed in process.
9385
4ee62156
DE
93862009-12-21 Doug Evans <dje@google.com>
9387
d90e6a88
DE
9388 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
9389
c5f62d5f
DE
9390 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
9391 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
9392 warning ifndef __NR_tkill. Move setting of errno there too.
9393 Delete unnecessary resetting of errno after syscall.
9394 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
9395
10e86dd7
DE
9396 * configure.ac: Check for dladdr.
9397 * config.in: Regenerate.
9398 * configure: Regenerate.
9399 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
9400 (try_thread_db_load): Update.
9401
4ee62156
DE
9402 * linux-low.c (my_waitpid): Delete unnecessary prototype.
9403
00f515da
DE
94042009-12-18 Doug Evans <dje@google.com>
9405
e9464885
DE
9406 * event-loop.c: Include unistd.h if it exists.
9407
07d4f67e
DE
9408 * linux-low.c (my_waitpid): Move definition away from being in
9409 between linux_tracefork_child/linux_test_for_tracefork.
9410
00f515da
DE
9411 * gdb_proc_service.h (psaddr_t): Fix type.
9412 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
9413 signature to match glibc.
9414
1de1badb
DE
94152009-12-16 Doug Evans <dje@google.com>
9416
9417 * linux-low.c (linux_read_memory): Fix argument to read.
9418
aeeb81d1
PA
94192009-11-26 Pedro Alves <pedro@codesourcery.com>
9420
9421 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
9422 events, don't leave current_inferior pointing at null.
9423
10357975
PA
94242009-11-26 Pedro Alves <pedro@codesourcery.com>
9425
9426 * win32-low.c (LOG): Delete.
9427 (OUTMSG): Output to stderr.
9428 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
9429 on compile time LOG macro.
9430 (win32_wait): Fix debug output.
9431
cf6e3471
PA
94322009-11-26 Pedro Alves <pedro@codesourcery.com>
9433
9434 * win32-low.c (win32_add_one_solib): If the dll name is
9435 "ntdll.dll", prepend the system directory to the dll path.
9436
0c85e18e
MK
94372009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
9438
9439 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
9440
9ac544ce 94412009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 9442 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
9443
9444 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
9445 * configure.ac: Check for __mcoldfire__ and set
9446 gdb_cv_m68k_is_coldfire.
9447 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
9448 reg-cf.o and reg-m68k.o.
9449 * configure: Regenerated.
9450
fd7dd3e6
PA
94512009-11-16 Pedro Alves <pedro@codesourcery.com>
9452
9453 * linux-low.c (linux_remove_process): Add `detaching' parameter.
9454 Pass it to thread_db_free.
9455 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
9456 proper `detaching' argument to linux_remove_process.
9457 * linux-low.h (thread_db_free): Add `detaching' parameter.
9458 * thread-db.c (thread_db_init): Pass false as `detaching' argument
9459 to thread_db_free.
9460 (thread_db_free): Add `detaching' parameter. Only
9461 call td_ta_clear_event if detaching from process.
9462
75aa492e
MK
94632009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
9464
9465 * thread-db.c (thread_db_free): Fix typo.
9466
21e1bee4
PP
94672009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
9468
9469 PR gdb/10838
9470 * thread-db.c (thread_db_free): Call td_ta_clear_event.
9471
8838b45e
NS
94722009-11-03 Nathan Sidwell <nathan@codesourcery.com>
9473
9474 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
9475 with an i686 compiler.
9476 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
9477 needed.
9478 * configure: Rebuilt.
9479
8a35fb51
SL
94802009-10-29 Sandra Loosemore <sandra@codesourcery.com>
9481
9482 PR gdb/10783
9483
9484 * server.c (handle_search_memory_1): Correct read_addr initialization
9485 in loop for searching subsequent chunks.
9486
96f15937
PP
94872009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
9488
9489 * configure.ac: New --with-libthread-db option.
9490 * thread-db.c: Allow direct dependence on libthread_db.
9491 (thread_db_free): Adjust.
9492 * config.in: Regenerate.
9493 * configure: Likewise.
889bf7c5 9494
5f7d1694
PP
94952009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
9496
9497 PR gdb/10757
9498 * thread-db.c (attach_thread): New function.
9499 (maybe_attach_thread): Return success/failure.
9500 (find_new_threads_callback): Adjust.
889bf7c5
PA
9501 (thread_db_find_new_threads): Loop until no new threads.
9502
88e3b899
PA
95032009-10-13 Pedro Alves <pedro@codesourcery.com>
9504
9505 * proc-service.c (ps_lgetregs): Formatting.
9506
cdbfd419
PP
95072009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
9508
9509 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
9510 * configure.ac: Adjust.
9511 * linux-low.h (struct process_info_private): Move members to struct
9512 thread_db.
9513 (thread_db_free, thread_db_handle_monitor_command): New prototype.
9514 * linux-low.c (linux_remove_process): Adjust.
9515 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
9516 * server.c (handle_query): Move code ...
9517 (handle_monitor_command): ... here. New function.
9518 * target.h (struct target_ops): New member.
9519 * thread-db.c (struct thread_db): New.
9520 (libthread_db_search_path): New variable.
9521 (thread_db_create_event, thread_db_enable_reporting)
9522 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
9523 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
9524 (try_thread_db_load_1, dladdr_to_soname): New functions.
9525 (try_thread_db_load, thread_db_load_search): New functions.
9526 (thread_db_init): Search for libthread_db.
9527 (thread_db_free): New function.
9528 (thread_db_handle_monitor_command): Likewise.
9529 * config.in: Regenerate.
9530 * configure: Regenerate.
889bf7c5 9531
4168d2d6
UW
95322009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
9533
9534 * spu-low.c (spu_kill): Wait for inferior to terminate.
9535 Call clear_inferiors.
9536 (spu_detach): Call clear_inferiors.
9537
81ecdfbb
RW
95382009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9539
9540 * aclocal.m4: Regenerate.
9541 * config.in: Likewise.
9542 * configure: Likewise.
9543
0b9ff2c0
UW
95442009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9545
9546 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
9547 (parse_spufs_run): New function.
9548 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
9549 (ppc_breakpoint_at): Handle SPU breakpoints.
9550
efcbbd14
UW
95512009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9552
9553 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
9554 (SPUFS_MAGIC): Define.
9555 (spu_enumerate_spu_ids): New function.
9556 (linux_qxfer_spu): New function.
9557 (linux_target_ops): Install linux_qxfer_spu.
9558
f4d9bade
UW
95592009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9560
9561 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
9562 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
9563 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
9564 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
9565 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
9566 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
9567 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
9568 (init_registers_powerpc_cell32l): Add prototype.
9569 (init_registers_powerpc_cell64l): Likewise.
9570 (ppc_arch_setup): Detect Cell/B.E. architecture.
9571
96e946ca
RW
95722009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9573
9574 * Makefile.in (datarootdir): New variable.
9575
58d6951d
DJ
95762009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
9577
9578 * linux-low.c (linux_write_memory): Update debugging output.
9579 * Makefile.in (clean): Add new descriptions.
9580 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
9581 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
9582 * configure.srv: Add new files for arm*-*-linux*.
9583 * linux-arm-low.c: Add new declarations.
9584 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
9585 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
9586 (HWCAP_VFPv3D16): New.
9587 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
9588 instead of __IWMMXT__.
9589 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
9590 (arm_arch_setup): New.
9591 (target_regsets): Remove #ifdef. Add VFP regset.
9592 (the_low_target): Use arm_arch_setup.
9593
12b42a12
DJ
95942009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
9595
9596 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
9597 the main thread again.
9598
ac8c974e
AR
95992009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
9600
9601 Adding Neutrino gdbserver.
9602 * configure: Regenerated.
9603 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
9604 * configure.srv (i[34567]86-*-nto*): New target.
9605 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
9606 * remote-utils.c [__QNX__]: Include sys/iomgr.h
9607 (nto_comctrl) [__QNX__]: New function.
9608 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
9609
4424e0c3 96102009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
9611
9612 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
9613 srv_tgtobj.
9614
912cf4ba
PA
96152009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
9616 Pedro Alves <pedro@codesourcery.com>
9617
9618 * win32-i386-low.c (i386_get_thread_context): Handle systems that
9619 don't support CONTEXT_EXTENDED_REGISTERS.
9620 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
9621 (the_low_target): Install them.
9622 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
9623 failing with ERROR_PIPE_NOT_CONNECTED.
9624
aa5ca48f
DE
96252009-06-30 Doug Evans <dje@google.com>
9626 Pierre Muller <muller@ics.u-strasbg.fr>
9627
9628 Add h/w watchpoint support to x86-linux, win32-i386.
9629 * Makefile.in (SFILES): Add i386-low.c
9630 (i386_low_h): Define.
9631 (i386-low.o): Add dependencies.
9632 (linux-x86-low.o): Add i386-low.h dependency.
9633 (win32-i386-low.o): Ditto.
9634 * i386-low.c: New file.
9635 * i386-low.h: New file.
9636 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
9637 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
9638 * linux-low.c (linux_add_process): Initialize arch_private.
9639 (linux_remove_process): Free arch_private.
9640 (add_lwp): Initialize arch_private.
9641 (delete_lwp): Free arch_private.
9642 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
9643 provided.
9644 * linux-low.h (process_info_private): New member arch_private.
9645 (lwp_info): New member arch_private.
9646 (linux_target_ops): New members new_process, new_thread,
9647 prepare_to_resume.
9648 (ptid_of): New macro.
9649 * linux-x86-low.c: Include stddef.h, i386-low.h.
9650 (arch_process_info): New struct.
9651 (arch_lwp_info): New struct.
9652 (x86_linux_dr_get, x86_linux_dr_set): New functions.
9653 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
9654 (i386_dr_low_get_status): New function.
9655 (x86_insert_point, x86_remove_point): New functions.
9656 (x86_stopped_by_watchpoint): New function.
9657 (x86_stopped_data_address): New function.
9658 (x86_linux_new_process, x86_linux_new_thread): New functions.
9659 (x86_linux_prepare_to_resume): New function.
9660 (the_low_target): Add entries for insert_point, remove_point,
9661 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
9662 prepare_to_resume.
9663 * server.c (debug_hw_points): New global.
9664 (monitor_show_help): Document set debug-hw-points.
9665 (handle_query): Process "set debug-hw-points".
9666 * server.h (debug_hw_points): Declare.
9667 (paddress): Declare.
9668 * utils.c (NUMCELLS, CELLSIZE): New macros.
9669 (get_sell, xsnprintf, paddress): New functions.
9670 * win32-arm-low.c (the_low_target): Add entries for insert_point,
9671 remove_point, stopped_by_watchpoint, stopped_data_address.
9672 * win32-i386-low.c: Include i386-low.h.
9673 (debug_reg_state): Replaces dr.
9674 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
9675 (i386_dr_low_get_status): New function.
9676 (i386_insert_point, i386_remove_point): New functions.
9677 (i386_stopped_by_watchpoint): New function.
9678 (i386_stopped_data_address): New function.
9679 (i386_initial_stuff): Update.
9680 (get_thread_context,set_thread_context,i386_thread_added): Update.
9681 (the_low_target): Add entries for insert_point,
9682 remove_point, stopped_by_watchpoint, stopped_data_address.
9683 * win32-low.c (win32_insert_watchpoint): New function.
9684 (win32_remove_watchpoint): New function.
9685 (win32_stopped_by_watchpoint): New function.
9686 (win32_stopped_data_address): New function.
9687 (win32_target_ops): Add entries for insert_watchpoint,
9688 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
9689 * win32-low.h (win32_target_ops): New members insert_point,
9690 remove_point, stopped_by_watchpoint, stopped_data_address.
9691
d993e290
PA
96922009-06-25 Pedro Alves <pedro@codesourcery.com>
9693
9694 * server.c (process_serial_event): Re-return unsupported, not
9695 error, if the type isn't recognized. Re-allow supporting only
9696 insert or remove packets. Also call require_running for
9697 breakpoints. Add missing break statement to default case. Tidy.
9698 * target.h (struct target_ops): Rename insert_watchpoint to
9699 insert_point, and remove_watchpoint to remove_point.
9700
9701 * linux-low.h (struct linux_target_ops): Likewise.
9702 * linux-low.c (linux_insert_watchpoint): Rename to ...
9703 (linux_insert_point): ... this. Adjust.
9704 (linux_remove_watchpoint): Rename to ...
9705 (linux_remove_point): ... this. Adjust.
9706 (linux_target_ops): Adjust.
9707 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
9708 (cris_insert_point): ... this.
9709 (cris_remove_watchpoint): Rename to ...
9710 (cris_remove_point): ... this.
9711 (the_low_target): Adjust.
9712
0f54c268
PM
97132009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
9714
9715 * server.c (handle_v_kill): Pass signal_pid to
9716 kill_inferior if multi_process is zero.
9717
c6314022
AR
97182009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
9719
9720 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
9721 * target.h (target_ops): Comment for *_watchpoint to make it clear
9722 the functions can get types '0' and '1'.
9723
4463ce24
AR
97242009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
9725
9726 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
9727 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
9728 * regcache.c (get_regcache): Likewise.
9729 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
9730 * win32-low.c (child_fetch_inferior_registers): Remove check for
9731 regno 0.
9732
cf8fd78b
PA
97332009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
9734 Pedro Alves <pedro@codesourcery.com>
9735
9736 * target.h (struct target_ops) <supports_multi_process>: New
9737 callback.
9738 (target_supports_multi_process): New.
9739 * server.c (handle_query): Even if GDB reports support, only
9740 enable multi-process if the target also supports it. Report
9741 multi-process support only if the target backend supports it.
9742 * linux-low.c (linux_supports_multi_process): New function.
9743 (linux_target_ops): Install it as target_supports_multi_process
9744 callback.
9745
47c0c975
DE
97462009-05-24 Doug Evans <dje@google.com>
9747
e09875d4
DE
9748 Global renaming of find_thread_pid to find_thread_ptid.
9749 * server.h (find_thread_ptid): Renamed from find_thread_pid.
9750 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
9751 All callers updated.
9752
e27d73f6
DE
9753 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
9754 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
9755 directly.
9756
47c0c975
DE
9757 * linux-low.c (get_stop_pc): Print pc if debug_threads.
9758 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
9759 (linux_resume_one_lwp): Ditto.
9760
2acc282a
DE
97612009-05-23 Doug Evans <dje@google.com>
9762
9763 * linux-low.c (linux_resume_one_lwp): Change type of first arg
9764 from struct inferior_list_entry * to struct lwp_info *.
9765 All callers updated.
9766
9f1036c1
DE
97672009-05-13 Doug Evans <dje@google.com>
9768
9769 * linux-x86-low.c: Don't include assert.h.
9770 (x86_siginfo_fixup): Use fatal, not assert.
9771 (x86_arch_setup): Fix comment.
9772
d0722149
DE
97732009-05-12 Doug Evans <dje@google.com>
9774
9775 Biarch support for i386/amd64 gdbserver.
9776 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
9777 Add linux-x86-low.c.
9778 (linux-i386-low.o, linux-x86-64-low.o): Delete.
9779 (linux-x86-low.o): Add.
9780 * linux-x86-64-low.c: Delete.
9781 * linux-i386-low.c: Delete.
9782 * linux-x86-low.c: New file.
9783 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
9784 linux-x86-low.o.
9785 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
9786 linux-x86-low.o.
9787 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
9788 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
9789 (linux_child_pid_to_exec_file): New function.
9790 (elf_64_header_p, elf_64_file_p): New functions.
9791 (siginfo_fixup): New function.
9792 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
9793 give target a chance to convert layout.
9794 * linux-low.h (linux_target_ops): New member siginfo_fixup.
9795 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
9796
fdeb2a12
DE
97972009-05-07 Doug Evans <dje@google.com>
9798
9799 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
9800 (regsets_store_inferior_registers): Ditto.
9801
a6dbe5df
PA
98022009-05-06 Pedro Alves <pedro@codesourcery.com>
9803
9804 PR server/10048
9805
9806 * linux-low.c (must_set_ptrace_flags): Delete.
9807 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
9808 of the global.
9809 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
9810 `lwp->must_set_ptrace_flags' instead.
ba42693b 9811 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
9812 (linux_wait_1): ... not here.
9813
5091eb23
DE
98142009-04-30 Doug Evans <dje@google.com>
9815
9f767825
DE
9816 * inferiors.c (started_inferior_callback): New function.
9817 (attached_inferior_callback): New function.
9818 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
9819 * server.c (print_started_pid, print_attached_pid): New functions.
9820 (detach_or_kill_for_exit): New function.
9821 (main): Call it instead of for_each_inferior (kill_inferior_callback).
9822 * server.h (have_started_inferiors_p): Declare.
9823 (have_attached_inferiors_p): Declare.
9824
5091eb23
DE
9825 * inferiors.c (remove_process): Fix memory leak, free process.
9826 * linux-low.c (linux_remove_process): New function.
9827 (linux_kill): Call it instead of remove_process.
9828 (linux_detach, linux_wait_1): Ditto.
9829
155c8968
PA
98302009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
9831
9832 * configure.srv: Add x86 Windows CE target.
9833
7fe519cb
UW
98342009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
9835
9836 * inferiors.c (get_thread_process): Make global.
9837 * server.h (get_thread_process): Add prototype.
9838 * thread-db.c (find_one_thread): Use get_thread_process
9839 instead of current_process.
9840 (thread_db_get_tls_address): Do not crash if called when
9841 thread layer is not yet initialized.
9842
5472f405
UW
98432009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
9844
9845 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
9846 * spu-low.c (current_tid): Rename to ...
9847 (current_ptid): ... this.
9848 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
9849 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
9850 ptid_get_lwp (current_ptid) instead of current_tid.
9851 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
9852 instead of current_tid. Use find_process_pid to verify pid
9853 argument is valid. Pass proper argument to remove_process.
9854 (spu_thread_alive): Compare current_ptid instead of current_tid.
9855 (spu_resume): Likewise.
9856
55ac2b99
PA
98572009-04-02 Pedro Alves <pedro@codesourcery.com>
9858
9859 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
9860 variable.
9861
95954743
PA
98622009-04-01 Pedro Alves <pedro@codesourcery.com>
9863
9864 Implement the multiprocess extensions, and add linux multiprocess
9865 support.
9866
9867 * server.h (ULONGEST): Declare.
9868 (struct ptid, ptid_t): New.
9869 (minus_one_ptid, null_ptid): Declare.
9870 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
9871 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
9872 (struct inferior_list_entry): Change `id' type from unsigned from
9873 to ptid_t.
9874 (struct sym_cache, struct breakpoint, struct
9875 process_info_private): Forward declare.
9876 (struct process_info): Declare.
9877 (current_process): Declare.
9878 (all_processes): Declare.
9879 (initialize_inferiors): Declare.
9880 (add_thread): Adjust to use ptid_t.
9881 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
9882 (add_process, remove_process, find_thread_pid): Declare.
9883 (find_inferior_id): Adjust to use ptid_t.
9884 (cont_thread, general_thread, step_thread): Change type to ptid_t.
9885 (multi_process): Declare.
9886 (push_event): Adjust to use ptid_t.
9887 (read_ptid, write_ptid): Declare.
9888 (prepare_resume_reply): Adjust to use ptid_t.
9889 (clear_symbol_cache): Declare.
9890 * inferiors.c (all_processes): New.
9891 (null_ptid, minus_one_ptid): New.
9892 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
9893 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
9894 (add_thread): Change unsigned long to ptid. Remove gdb_id
9895 parameter. Adjust.
9896 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
9897 (gdb_id_to_thread): Rename to ...
9898 (find_thread_pid): ... this. Change unsigned long to ptid.
9899 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
9900 (loaded_dll, pull_pid_from_list): Adjust.
9901 (add_process, remove_process, find_process_pid)
9902 (get_thread_process, current_process, initialize_inferiors): New.
9903 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
9904 (struct target_waitstatus) <related_pid>: Ditto.
9905 (struct target_ops) <kill, detach>: Add `pid' argument. Change
9906 return type to int.
9907 (struct target_ops) <join>: Add `pid' argument.
9908 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
9909 (struct target_ops) <wait>: Add `ptid' field. Change return type
9910 to ptid.
9911 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
9912 (mywait): Add `ptid' argument. Change return type to ptid_t.
9913 (target_pid_to_str): Declare.
9914 * target.c (set_desired_inferior): Adjust to use ptids.
9915 (mywait): Add new `ptid' argument. Adjust.
9916 (target_pid_to_str): New.
9917 * mem-break.h (free_all_breakpoints): Declare.
9918 * mem-break.c (breakpoints): Delelete.
9919 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
9920 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
9921 to use per-process breakpoint list.
9922 (free_all_breakpoints): New.
9923 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
9924 (symbol_cache, all_symbols_looked_up): Delete.
9925 (hexchars): New.
9926 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
9927 read_ptid): New.
9928 (prepare_resume_reply): Change ptid argument's type from unsigned
9929 long to ptid_t. Adjust. Implement W;process and X;process.
9930 (free_sym_cache, clear_symbol_cache): New.
9931 (look_up_one_symbol): Adjust to per-process symbol cache. *
9932 * server.c (cont_thread, general_thread, step_thread): Change type
9933 to ptid_t.
9934 (attached): Delete.
9935 (multi_process): New.
9936 (last_ptid): Change type to ptid_t.
9937 (struct vstop_notif) <ptid>: Change type to ptid_t.
9938 (queue_stop_reply, push_event): Change `ptid' argument's type to
9939 ptid_t.
9940 (discard_queued_stop_replies): Add `pid' argument.
9941 (start_inferior): Adjust to use ptids. Adjust to mywait interface
9942 changes. Don't reference the `attached' global.
9943 (attach_inferior): Adjust to mywait interface changes.
9944 (handle_query): Adjust to use ptids. Parse GDB's qSupported
9945 features. Handle and report "multiprocess+". Handle
9946 "qAttached:PID".
9947 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
9948 changes.
9949 (handle_v_kill): New.
9950 (handle_v_stopped): Adjust to use target_pid_to_str.
9951 (handle_v_requests): Allow multiple attaches and runs when
9952 multiprocess extensions are in effect. Handle "vKill".
9953 (myresume): Adjust to use ptids.
9954 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
9955 (handle_status): Adjust to discard_queued_stop_replies interface
9956 change.
9957 (first_thread_of, kill_inferior_callback)
9958 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
9959 (main): Call initialize_inferiors. Adjust to use ptids, killing
9960 and detaching from all inferiors. Handle multiprocess packet
9961 variants.
9962 * linux-low.h: Include gdb_proc_service.h.
9963 (struct process_info_private): New.
9964 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
9965 <lwpid_of>: Use ptid_get_lwp.
9966 (get_lwp_thread): Adjust.
9967 (struct lwp_info): Add `dead' member.
9968 (find_lwp_pid): Declare.
9969 * linux-low.c (thread_db_active): Delete.
9970 (new_inferior): Adjust comment.
9971 (inferior_pid): Delete.
9972 (linux_add_process): New.
9973 (handle_extended_wait): Adjust.
9974 (add_lwp): Change unsigned long to ptid.
9975 (linux_create_inferior): Add process to processes table. Adjust
9976 to use ptids. Don't set new_inferior here.
9977 (linux_attach_lwp): Rename to ...
9978 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
9979 it. Adjust to use ptids.
9980 (linux_attach_lwp): New.
9981 (linux_attach): Add process to processes table. Don't set
9982 new_inferior here.
9983 (struct counter): New.
9984 (second_thread_of_pid_p, last_thread_of_process_p): New.
9985 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
9986 multiple processes.
9987 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
9988 processes. Remove process from process table.
9989 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
9990 to multiple processes.
9991 (any_thread_of): New.
9992 (linux_detach): Add `pid' argument, and handle it. Remove process
9993 from processes table.
9994 (linux_join): Add `pid' argument. Handle it.
9995 (linux_thread_alive): Change unsighed long argument to ptid_t.
9996 Consider dead lwps as not being alive.
9997 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
9998 threads we're not interested in.
9999 (same_lwp, find_lwp_pid): New.
10000 (linux_wait_for_lwp): Change `pid' argument's type from int to
10001 ptid_t. Adjust.
10002 (linux_wait_for_event): Rename to ...
10003 (linux_wait_for_event_1): ... this. Change `pid' argument's type
10004 from int to ptid_t. Adjust.
10005 (linux_wait_for_event): New.
10006 (linux_wait_1): Add `ptid' argument. Change return type to
10007 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
10008 that exit from the process table.
10009 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
10010 Adjust.
10011 (mark_lwp_dead): New.
10012 (wait_for_sigstop): Adjust to use ptids. If a process exits while
10013 stopping all threads, mark its main lwp as dead.
10014 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
10015 ptids.
10016 (fetch_register, usr_store_inferior_registers)
10017 (regsets_fetch_inferior_registers)
10018 (regsets_store_inferior_registers, linux_read_memory)
10019 (linux_write_memory): Inline `inferior_pid'.
10020 (linux_look_up_symbols): Adjust to use per-process
10021 `thread_db_active'.
10022 (linux_request_interrupt): Adjust to use ptids.
10023 (linux_read_auxv): Inline `inferior_pid'.
10024 (initialize_low): Don't reference thread_db_active.
10025 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
10026 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
10027 (ps_getpid): Return the pid of the current inferior.
10028 * thread-db.c (proc_handle, thread_agent): Delete.
10029 (thread_db_create_event, thread_db_enable_reporting): Adjust to
10030 per-process data.
10031 (find_one_thread): Change argument type to ptid_t. Adjust to
10032 per-process data.
10033 (maybe_attach_thread): Adjust to per-process data and ptids.
10034 (thread_db_find_new_threads): Ditto.
10035 (thread_db_init): Ditto.
10036 * spu-low.c (spu_create_inferior, spu_attach): Add process to
10037 processes table. Adjust to use ptids.
10038 (spu_kill, spu_detach): Adjust interface. Remove process from
10039 processes table.
10040 (spu_join, spu_thread_alive): Adjust interface.
10041 (spu_wait): Adjust interface. Remove process from processes
10042 table. Adjust to use ptids.
10043 * win32-low.c (current_inferior_tid): Delete.
10044 (current_inferior_ptid): New.
10045 (debug_event_ptid): New.
10046 (thread_rec): Take a ptid. Adjust.
10047 (child_add_thread): Add `pid' argument. Adjust to use ptids.
10048 (child_delete_thread): Ditto.
10049 (do_initial_child_stuff): Add `attached' argument. Add process to
10050 processes table.
10051 (child_fetch_inferior_registers, child_store_inferior_registers):
10052 Adjust.
10053 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
10054 (win32_attach): Pass 1 to do_initial_child_stuff.
10055 (win32_kill): Adjust interface. Remove process from processes
10056 table.
10057 (win32_detach): Ditto.
10058 (win32_join): Adjust interface.
10059 (win32_thread_alive): Take a ptid.
10060 (win32_resume): Adjust to use ptids.
10061 (get_child_debug_event): Ditto.
10062 (win32_wait): Adjust interface. Remove exiting process from
10063 processes table.
10064
bd99dc85
PA
100652009-04-01 Pedro Alves <pedro@codesourcery.com>
10066
10067 Non-stop mode support.
10068
10069 * server.h (non_stop): Declare.
10070 (gdb_client_data, handler_func): Declare.
10071 (delete_file_handler, add_file_handler, start_event_loop):
10072 Declare.
10073 (handle_serial_event, handle_target_event, push_event)
10074 (putpkt_notif): Declare.
10075 * target.h (enum resume_kind): New.
10076 (struct thread_resume): Replace `step' field by `kind' field.
10077 (TARGET_WNOHANG): Define.
10078 (struct target_ops) <wait>: Add `options' argument.
10079 <supports_non_stop, async, start_non_stop>: New fields.
10080 (target_supports_non_stop, target_async): New.
10081 (start_non_stop): Declare.
10082 (mywait): Add `options' argument.
10083 * target.c (mywait): Add `options' argument. Print child exit
10084 notifications here.
10085 (start_non_stop): New.
10086 * server.c (non_stop, own_buf, mem_buf): New globals.
10087 (struct vstop_notif): New.
10088 (notif_queue): New global.
10089 (queue_stop_reply, push_event, discard_queued_stop_replies)
10090 (send_next_stop_reply): New.
10091 (start_inferior): Adjust to use resume_kind. Adjust to mywait
10092 interface changes.
10093 (attach_inferior): In non-stop mode, don't wait for the target
10094 here.
10095 (handle_general_set): Handle QNonStop.
10096 (handle_query): When handling qC, return the current general
10097 thread, instead of the first thread of the list.
10098 (handle_query): If the backend supports non-stop mode, include
10099 QNonStop+ in the qSupported query response.
10100 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
10101 and non-stop mode.
10102 (handle_v_attach, handle_v_run): Handle non-stop mode.
10103 (handle_v_stopped): New.
10104 (handle_v_requests): Report support for vCont;t. Handle vStopped.
10105 (myresume): Adjust to use resume_kind. Handle non-stop.
10106 (queue_stop_reply_callback): New.
10107 (handle_status): Handle non-stop mode.
10108 (main): Clear non_stop flag on reconnection. Use the event-loop.
10109 Refactor serial protocol handling from here ...
10110 (process_serial_event): ... to this new function. When GDB
10111 selects any thread, select one here. In non-stop mode, wait until
10112 GDB acks all pending events before exiting.
10113 (handle_serial_event, handle_target_event): New.
10114 * remote-utils.c (remote_open): Install remote_desc in the event
10115 loop.
10116 (remote_close): Remove remote_desc from the event loop.
10117 (putpkt_binary): Rename to...
10118 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
10119 (putpkt_binary): New as wrapper around putpkt_binary_1.
10120 (putpkt_notif): New.
10121 (prepare_resume_reply): In non-stop mode, don't change the
10122 general_thread.
10123 * event-loop.c: New.
10124 * Makefile.in (OBJ): Add event-loop.o.
10125 (event-loop.o): New rule.
10126
10127 * linux-low.h (pid_of): Moved here.
10128 (lwpid_of): New.
10129 (get_lwp_thread): Use lwpid_of.
10130 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
10131 * linux-low.c (pid_of): Delete.
10132 (inferior_pid): Use lwpid_of.
10133 (linux_event_pipe): New.
10134 (target_is_async_p): New.
10135 (delete_lwp): New.
10136 (handle_extended_wait): Use lwpid_of.
10137 (add_lwp): Don't set lwpid field.
10138 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
10139 (linux_kill_one_lwp): If killing a running lwp, stop it first.
10140 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
10141 (linux_detach_one_lwp): If detaching from a running lwp, stop it
10142 first. Adjust to linux_wait_for_event interface changes. Use
10143 lwpid_of.
10144 (linux_detach): Don't delete the main lwp here.
10145 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
10146 (status_pending_p): Don't consider explicitly suspended lwps.
10147 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
10148 pointer. Add OPTIONS argument. Change return type to int. Use
10149 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
10150 (linux_wait_for_event): Take an integer pid instead of a lwp_info
10151 pointer. Add status pointer argument. Return a pid instead of a
10152 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
10153 changes. In non-stop mode, don't switch to a random thread.
10154 (linux_wait): Rename to...
10155 (linux_wait_1): ... this. Add target_options argument, and handle
10156 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
10157 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
10158 clean exit and signal exit code. Don't stop all threads in
10159 non-stop mode. In all-stop mode, only stop all threads when
10160 reporting a stop to GDB. Handle explicit thread stop requests.
10161 (async_file_flush, async_file_mark): New.
10162 (linux_wait): New.
10163 (send_sigstop): Use lwpid_of.
10164 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
10165 interface changes. In non-stop mode, don't switch to a random
10166 thread.
10167 (linux_resume_one_lwp): Use lwpid_of.
10168 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
10169 (linux_resume_one_thread): ... this. Handle resume_stop. In
10170 non-stop mode, don't look for pending flag in all threads.
10171 (resume_status_pending_p): Don't consider explicitly suspended
10172 threads.
10173 (my_waitpid): Reimplement. Emulate __WALL.
10174 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
10175 Use lwpid_of.
10176 (sigchld_handler, linux_supports_non_stop, linux_async)
10177 (linux_start_non_stop): New.
10178 (linux_target_ops): Register linux_supports_non_stop, linux_async
10179 and linux_start_non_stop.
10180 (initialize_low): Install SIGCHLD handler.
10181 * thread-db.c (thread_db_create_event, find_one_thread)
10182 (thread_db_get_tls_address): Use lwpid_of.
10183 * win32-low.c (win32_detach): Adjust to use resume_kind.
10184 (win32_wait): Add `options' argument.
10185 * spu-low.c (spu_resume): Adjust to use resume_kind.
10186 (spu_wait): Add `options' argument.
10187
5b1c542e
PA
101882009-04-01 Pedro Alves <pedro@codesourcery.com>
10189
10190 Decouple target code from remote protocol.
10191
10192 * target.h (enum target_waitkind): New.
10193 (struct target_waitstatus): New.
10194 (struct target_ops) <wait>: Return an unsigned long. Take a
10195 target_waitstatus pointer instead of a char pointer.
10196 (mywait): Likewise.
10197 * target.c (mywait): Change prototype to return an unsigned long.
10198 Take a target_waitstatus pointer instead of a char pointer. Adjust.
10199 * server.h (thread_from_wait, old_thread_from_wait): Delete
10200 declarations.
10201 (prepare_resume_reply): Change prototype to take a
10202 target_waitstatus.
10203 * server.c (thread_from_wait, old_thread_from_wait): Delete.
10204 (last_status, last_ptid): New.
10205 (start_inferior): Remove "statusptr" argument. Adjust. Return a
10206 pid instead of a signal.
10207 (attach_inferior): Remove "status" and "signal" parameters.
10208 Adjust.
10209 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
10210 not as an address.
10211 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
10212 (handle_v_requests, myresume): Remove "status" and "signal"
10213 parameters. Adjust.
10214 (handle_status): New.
10215 (main): Delete local `status'. Adjust.
10216 * remote-utils.c: Include target.h.
10217 (prepare_resume_reply): Change prototype to take a
10218 target_waitstatus. Adjust.
10219
10220 * linux-low.c (linux_wait): Adjust to new target_ops->wait
10221 interface.
10222 * spu-low.c (spu_wait): Adjust.
10223 * win32-low.c (enum target_waitkind, struct target_waitstatus):
10224 Delete.
10225 (win32_wait): Adjust.
10226
2bd7c093
PA
102272009-04-01 Pedro Alves <pedro@codesourcery.com>
10228
10229 * target.h (struct thread_resume): Delete leave_stopped member.
10230 (struct target_ops): Add a `n' argument to the `resume' callback.
10231 * server.c (start_inferior): Adjust.
10232 (handle_v_cont, myresume): Adjust.
10233 * linux-low.c (check_removed_breakpoint): Adjust to resume
10234 interface change, and to removed leave_stopped field.
10235 (resume_ptr): Delete.
10236 (struct thread_resume_array): New.
10237 (linux_set_resume_request): Add new `arg' parameter. Adjust to
10238 resume interface change.
10239 (linux_continue_one_thread, linux_queue_one_thread)
10240 (resume_status_pending_p): Check if the resume field is NULL
10241 instead of checking the leave_stopped member.
10242 (linux_resume): Adjust to the target resume interface change.
10243 * spu-low.c (spu_resume): Adjust to the target resume interface
10244 change.
10245 * win32-low.c (win32_detach, win32_resume): Ditto.
10246
c35fafde
PA
102472009-04-01 Pedro Alves <pedro@codesourcery.com>
10248
10249 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
10250 flag.
10251 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
10252 pending.
10253 (linux_continue_one_thread): Only preserve the stepping flag if
10254 there's a pending breakpoint.
10255
0a59d50b
PA
102562009-03-31 Pedro Alves <pedro@codesourcery.com>
10257
10258 * server.c (main): After the inferior having exited, call
10259 remote_close before exiting gdbserver.
10260
f04c6d38
TJB
102612009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
10262
10263 Fix size of FPSCR in Power 7 processors.
10264 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
10265 (PPC_FEATURE_HAS_DFP): New #define.
10266 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
10267 size of the FPSCR.
10268
78e5cee6
PA
102692009-03-23 Pedro Alves <pedro@codesourcery.com>
10270
10271 * server.c (handle_query) Whitespace and formatting.
10272
1b3f6016
PA
102732009-03-22 Pedro Alves <pedro@codesourcery.com>
10274
10275 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
10276 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
10277 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
10278 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
10279 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
10280 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
10281 Makefile.in, configure.ac: Fix whitespace throughout.
10282 * configure: Regenerate.
10283
a07b2135
PA
102842009-03-22 Pedro Alves <pedro@codesourcery.com>
10285
10286 * inferiors.c (find_inferior): Make it safe for the callback
10287 function to delete the currently iterated inferior.
10288
67cc2626
PA
102892009-03-22 Pedro Alves <pedro@codesourcery.com>
10290
10291 * Makefile.in (linuw_low_h): Move higher.
10292 (thread-db.o): Depend on $(linux_low_h).
10293
54a0b537
PA
102942009-03-17 Pedro Alves <pedro@codesourcery.com>
10295
10296 Rename "process" to "lwp" throughout.
10297
10298 * linux-low.c (all_processes): Rename to...
10299 (all_lwps): ... this.
10300 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
10301 (add_process): Rename to ...
10302 (add_lwp): ... this. Adjust.
10303 (linux_create_inferior): Adjust.
10304 (linux_attach_lwp): Adjust.
10305 (linux_attach): Adjust.
10306 (linux_kill_one_process): Rename to ...
10307 (linux_kill_one_lwp): ... this. Adjust.
10308 (linux_kill): Adjust.
10309 (linux_detach_one_process): Rename to ...
10310 (linux_detach_one_lwp): ... this. Adjust.
10311 (linux_detach): Adjust.
10312 (check_removed_breakpoint): Adjust.
10313 (status_pending_p): Adjust.
10314 (linux_wait_for_process): Rename to ...
10315 (linux_wait_for_lwp): ... this. Adjust.
10316 (linux_wait_for_event): Adjust.
10317 (send_sigstop): Adjust.
10318 (wait_for_sigstop): Adjust.
10319 (stop_all_processes): Rename to ...
10320 (stop_all_lwps): ... this.
10321 (linux_resume_one_process): Rename to ...
10322 (linux_resume_one_lwp): ... this. Adjust.
10323 (linux_set_resume_request, linux_continue_one_thread)
10324 (linux_queue_one_thread, resume_status_pending_p)
10325 (usr_store_inferior_registers, regsets_store_inferior_registers)
10326 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
10327 Adjust.
10328 * linux-low.h (get_process): Rename to ...
10329 (get_lwp): ... this. Adjust.
10330 (get_thread_process): Rename to ...
10331 (get_thread_lwp): ... this. Adjust.
10332 (get_process_thread): Rename to ...
10333 (get_lwp_thread): ... this. Adjust.
10334 (struct process_info): Rename to ...
10335 (struct lwp_info): ... this.
10336 (all_processes): Rename to ...
10337 (all_lwps): ... this.
10338 * proc-service.c (ps_lgetregs): Adjust.
10339 * thread-db.c (thread_db_create_event, find_one_thread)
10340 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
10341
0b16c5cf
PA
103422009-03-14 Pedro Alves <pedro@codesourcery.com>
10343
10344 * server.c (handle_query): Handle "qAttached".
10345
32de4b9d
NS
103462009-03-13 Nathan Sidwell <nathan@codesourcery.com>
10347
10348 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
10349 GPLv3, update license URL.
10350
2aecd87f
DE
103512009-03-01 Doug Evans <dje@google.com>
10352
93efd302 10353 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
10354 (server_h): Add gdb_signals.h.
10355 (signals.o): Update.
10356 * server.h (target_signal_from_host,target_signal_to_host_p)
10357 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
10358
86b1f9c5
PM
103592009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
10360
10361 * remote-utils.c (getpkt): Also generate remote-debug
10362 information if noack_mode is set.
10363
4aa995e1
PA
103642009-02-06 Pedro Alves <pedro@codesourcery.com>
10365
10366 * server.c (handle_query): Report qXfer:siginfo:read and
10367 qXfer:siginfo:write as supported and handle them.
10368 * target.h (struct target_ops) <qxfer_siginfo>: New field.
10369 * linux-low.c (linux_xfer_siginfo): New.
10370 (linux_target_ops): Set it.
10371
62709adf
PA
103722009-01-26 Pedro Alves <pedro@codesourcery.com>
10373
10374 * server.c (gdbserver_usage): Mention --remote-debug.
10375 (main): Accept '--remote-debug' switch.
10376
aef93bd7
DE
103772009-01-18 Doug Evans <dje@google.com>
10378
10379 * regcache.c (new_register_cache): No need to check result of xcalloc.
10380 * server.c (handle_search_memory): Back out calls to xmalloc,
10381 result is checked and error is returned to user upon failure.
10382 (handle_query): Ditto. Add more checks for result of malloc.
10383 (handle_v_cont): Check result of malloc, report error back to
10384 user upon failure.
10385 (handle_v_run): Ditto. Call freeargv.
10386 * server.h (freeargv): Declare.
10387 * utils.c (freeargv): New fn.
10388
54363045
DE
103892009-01-15 Doug Evans <dje@google.com>
10390
f626972c
DE
10391 * gdbreplay.c (perror_with_name): Make arg const char *.
10392 * server.h (target_signal_to_name): Make return type const char *.
0842e787 10393 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 10394 * utils.c (perror_with_name): Make arg const char *.
54363045 10395
18aae699
PA
103962009-01-14 Pedro Alves <pedro@codesourcery.com>
10397
10398 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
10399 when handling a EXIT_PROCESS_DEBUG_EVENT.
10400
ff703abe
JB
104012009-01-06 Joel Brobecker <brobecker@adacore.com>
10402
10403 * gdbreplay.c (gdbreplay_version): Update copyright year.
10404 * server.c (gdbserver_version): Likewise.
10405
f21cc1a2 104062009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
10407
10408 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 10409 (handle_extended_wait): Improve comment.
0e21c1ec 10410
bca929d3
DE
104112008-12-13 Doug Evans <dje@google.com>
10412
10413 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
10414 * server.h (ATTR_MALLOC): New macro.
10415 (xmalloc,xcalloc,xstrdup): Declare.
10416 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
10417 * inferiors.c: Ditto.
10418 * linux-low.c: Ditto.
10419 * mem-break.c: Ditto.
10420 * regcache.c: Ditto.
10421 * remote-utils.c: Ditto.
10422 * server.c: Ditto.
10423 * target.c: Ditto.
10424 * win32-low.c: Ditto.
10425
97438e3f
DE
104262008-12-12 Doug Evans <dje@google.com>
10427
896c7fbb
DE
10428 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
10429 in debugging printf.
10430
97438e3f
DE
10431 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
10432
e3b886f8
DE
104332008-12-09 Doug Evans <dje@google.com>
10434
10435 * linux-low.h (struct process_info): Delete member tid, unused.
10436 * thread-db.c (find_one_thread): Update.
10437 (maybe_attach_thread): Update.
10438
07e059b5
VP
104392008-12-02 Pedro Alves <pedro@codesourcery.com>
10440
889bf7c5
PA
10441 * target.h (struct target_ops): Add qxfer_osdata member.
10442 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
10443 and dirent.h.
10444 (linux_qxfer_osdata): New functions.
10445 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
10446 callback.
10447 * server.c (handle_query): Handle "qXfer:osdata:read:".
10448 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
10449 (buffer_xml_printf): New functions.
10450 * server.h (struct buffer): New.
10451 (buffer_grow_str, buffer_grow_str0): New macros.
10452 (buffer_grow, buffer_free, buffer_init, buffer_finish)
10453 (buffer_xml_printf): Declare.
07e059b5 10454
4cab47ab
DE
104552008-11-24 Doug Evans <dje@google.com>
10456
10457 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
10458
f142445f
DJ
104592008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
10460
10461 * server.c (handle_v_run): Always use the supplied argument list.
10462
d0107bb6 104632008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 10464
d0107bb6
BW
10465 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
10466 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 10467
2c4ad781
TJB
104682008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
10469
10470 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
10471 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
10472 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
10473 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
10474 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
10475 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
10476 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
10477 XML target descriptions.
10478 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
10479 when inferior is running on an ISA 2.05 or later processor. Add
10480 special case to return offset for full 64-bit slot of FPSCR when
10481 in 32-bits.
10482
dfb64f85
DJ
104832008-11-14 Daniel Gutson <dgutson@codesourcery.com>
10484
10485 * Makefile.in (SFILES, clean): Added sparc64 files.
10486 (reg-sparc64.o, reg-sparc64.c): New.
10487 * configure.srv (sparc*-*-linux*): New configuration.
10488 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
10489 syscall arguments for SPARC.
10490 (regsets_store_inferior_registers): Likewise.
10491 * linux-sparc-low.c: New file.
10492
66b6e1dd
DE
104932008-10-21 Doug Evans <dje@google.com>
10494
10495 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
10496 (READLINE_DIR,READLINE_DEP): Delete.
10497 (INTERNAL_CFLAGS): Update.
10498 (LINTFLAGS): Update.
10499
9b710a42
PA
105002008-10-10 Pedro Alves <pedro@codesourcery.com>
10501
10502 * server.c (handle_v_run): If GDB didn't specify an argv, use the
10503 whole argv from the last run, not just argv[0].
10504
5822d809
PA
105052008-09-08 Pedro Alves <pedro@codesourcery.com>
10506
10507 * regcache.c (new_register_cache): Return NULL if the register
10508 cache size isn't known yet.
10509 (free_register_cache): Avoid dereferencing a NULL regcache.
10510
74aac56f
DJ
105112008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
10512
10513 * configure.srv: Merge MIPS and MIPS64.
10514
400b20f5
MR
105152008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
10516
10517 * Makefile.in (uninstall): Apply $(EXEEXT) too.
10518
677c5bb1
LM
105192008-08-18 Luis Machado <luisgpm@br.ibm.com>
10520
10521 * Makefile.in: Add required vsx dependencies.
10522
10523 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
10524 Declare init_registers_powerpc_vsx32l.
10525 Declare init_registers_powerpc_vsx64l.
10526 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
10527 (ppc_arch_setup): Check for VSX in hwcap.
10528 (ppc_fill_vsxregset): New function.
10529 (ppc_store_vsxregset): New function.
10530 Add new VSX entry in regset_info target_regsets.
10531
10532 * configure.srv: Add new VSX dependencies.
10533
a6f3e723
SL
105342008-08-12 Pedro Alves <pedro@codesourcery.com>
10535
10536 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
10537 (remote_open): Set or clear transport_is_reliable.
10538 (putpkt_binary): Don't expect acks in noack mode.
10539 (getpkt): Don't send ack/nac in noack mode.
10540 * server.c (handle_general_set): Handle QStartNoAckMode.
10541 (handle_query): If connected by tcp pass QStartNoAckMode+ in
10542 qSupported.
10543 (main): Reset noack_mode on every connection.
10544 * server.h (noack_mode): Declare.
10545
a417dc56
RW
105462008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
10547
10548 * Makefile.in (GDBREPLAY_OBS): New variable.
10549 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
10550
3221518c
UW
105512008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
10552 Daniel Jacobowitz <dan@codesourcery.com>
10553
10554 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
10555 (usr_store_inferior_registers): Likewise.
10556 (regsets_store_inferior_registers): Likewise.
10557
ec56be1b
PA
105582008-07-31 Rolf Jansen <rj@surtec.com>
10559 Pedro Alves <pedro@codesourcery.com>
10560
10561 * configure.ac: Check for memmem declaration.
10562 * server.c [HAVE_MALLOC_H]: Include malloc.h.
10563 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
10564 (disable_packet_qfThreadInfo): Unconditionally compile.
10565 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
10566 * configure, config.in: Regenerate.
10567
2fe5e3ff
DE
105682008-07-28 Doug Kwan <dougkwan@google.com>
10569
10570 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
10571 (linux_write_memory): Remove declaration of errno.
10572
836acd6d
UW
105732008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
10574
10575 * linux-low.c (handle_extended_wait): Do not use "status"
10576 variable uninitialized.
10577
aeba519e
PA
105782008-07-07 Pedro Alves <pedro@codesourcery.com>
10579
10580 * server.c (handle_v_attach): Inhibit reporting dll changes.
10581
db42f210
PA
105822008-06-27 Pedro Alves <pedro@codesourcery.com>
10583
10584 * remote-utils.c (prepare_resume_reply): If requested, don't
10585 output "thread:TID" in the T stop reply.
10586
10587 * server.c (disable_packet_vCont, disable_packet_Tthread)
10588 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
10589 (handle_query): If requested, disable support for qC, qfThreadInfo
10590 and qsThreadInfo.
10591 (handle_v_requests): If requested, disable support for vCont.
10592 (gdbserver_show_disableable): New.
10593 (main): Handle --disable-packet and --disable-packet=LIST.
10594
10595 * server.h (disable_packet_vCont, disable_packet_Tthread)
10596 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
10597
8e4c5421
CD
105982008-06-20 Carlos O'Donell <carlos@codesourcery.com>
10599
10600 * server.c (gdbserver_usage): Mention --version.
10601
6e23a804
DJ
106022008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
10603
10604 * Makefile.in (gdbreplay.o): New rule.
10605
90aa6a40
JM
106062008-06-06 Joseph Myers <joseph@codesourcery.com>
10607
10608 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
10609 message, not gdbserver.
10610
c16158bc 106112008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
10612 Nathan Sidwell <nathan@codesourcery.com>
10613 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
10614
10615 * acinclude.m4: Include ../../config/acx.m4.
10616 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
10617 * configure, config.in: Regenerate.
10618 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
10619 * server.c (gdbserver_version): Print PKGVERSION.
10620 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
10621 (main): Adjust gdbserver_usage calls.
10622 * gdbreplay.c (version, host_name): Add declarations.
10623 (gdbreplay_version, gdbreplay_usage): New.
10624 (main): Accept --version and --help options.
10625
aeb75bf5
DJ
106262008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
10627
10628 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
10629 (arm_breakpoint_at): Handle Thumb.
10630 (the_low_target): Add comment.
10631
76b233dd
UW
106322008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
10633
10634 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
10635
08388c79
DE
106362008-05-09 Doug Evans <dje@google.com>
10637
a3c83fae
DE
10638 * server.h (decode_search_memory_packet): Declare.
10639 * remote-utils.c (decode_search_memory_packet): New fn.
10640 * server.c (handle_search_memory_1): New fn.
08388c79
DE
10641 (handle_search_memory): New fn.
10642 (handle_query): Process qSearch:memory packets.
10643
bb9c3d36
UW
106442008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
10645
10646 * regcache.c (registers_length): Remove.
10647 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
10648 full register packet.
10649 * regcache.h (registers_length): Remove prototype.
10650 * server.h (PBUFSIZ): Define to 16384.
10651
7284e1be
UW
106522008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
10653
10654 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
10655 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
10656 powerpc-64l.o, and powerpc-altivec64l.o.
10657 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
10658 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
10659 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
10660 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
10661 rs6000/power-linux.xml, and rs6000/power64-linux.xml
10662 to srv_xmlfiles.
10663
10664 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
10665 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
10666 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
10667 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
10668 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
10669 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
10670 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
10671 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
10672 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
10673 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
10674 (clean): Update.
10675
10676 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
10677 (init_registers_powerpc_32l): ... this new prototype.
10678 (init_registers_powerpc_32): Remove, replace by ...
10679 (init_registers_powerpc_altivec32l): ... this new prototype.
10680 (init_registers_powerpc_e500): Remove, replace by ...
10681 (init_registers_powerpc_e500l): ... this new prototype.
10682 (init_registers_ppc64): Remove, replace by ...
10683 (init_registers_powerpc_64l): ... this new prototype.
10684 (init_registers_powerpc_64): Remove, replace by ...
10685 (init_registers_powerpc_altivec64l): ... this new prototype.
10686 (ppc_num_regs): Set to 73.
10687 (PT_ORIG_R3, PT_TRAP): Define if necessary.
10688 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
10689 (ppc_cannot_store_register): Handle orig_r3 and trap.
10690 (ppc_arch_setup): Update init_registers_... calls.
10691 (ppc_fill_gregset): Handle orig_r3 and trap.
10692
10693 * inferiors.c (clear_inferiors): Reset current_inferior.
10694
fdc59709
PB
106952008-04-23 Paolo Bonzini <bonzini@gnu.org>
10696
889bf7c5
PA
10697 * acinclude.m4: Add override.m4.
10698 * configure: Regenerate.
fdc59709 10699
c9b2f845
UW
107002008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
10701
10702 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
10703 initial call to init_register_ppc64.
10704
550512b8
UW
107052008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
10706
43aaf8b6
PA
10707 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
10708 single powerpc*-*-linux* case.
550512b8
UW
10709 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
10710
b6430ec3
UW
107112008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
10712
10713 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 10714 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
10715 from reg_xmlfiles.
10716 * linux-ppc-low.c: Include <elf.h>.
10717 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
10718 (ppc_hwcap): New global variable.
10719 (ppc_regmap): Remove __SPE__ #ifdef sections.
10720 (ppc_regmap_e500): New global variable.
10721 (ppc_cannot_store_register): Update __SPE__ special case.
10722 (ppc_get_hwcap): New function.
10723 (ppc_arch_setup): Use it to determine whether inferior supports
10724 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
10725 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
10726 Do not access registers if target does not support AltiVec.
10727 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
10728 Do not access registers if target does not support SPE.
10729 (target_regsets): Unconditionally include AltiVec and SPE regsets.
10730
52fa2412
UW
107312008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
10732
10733 * linux-low.c (disabled_regsets, num_regsets): New.
10734 (use_regsets_p): Delete.
10735 (linux_wait_for_process): Clear disabled_regsets.
10736 (regsets_fetch_inferior_registers): Check and set it.
10737 (regsets_store_inferior_registers): Likewise.
10738 (linux_fetch_registers, linux_store_registers): Do not use
10739 use_regsets_p.
10740 (initialize_low): Allocate disabled_regsets.
10741
e28b3332
DJ
107422008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
10743
10744 * Makefile.in (LIBOBJS): New.
10745 (OBS): Use LIBOBJS.
10746 (memmem.o): New rule.
10747 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
10748 * configure: Regenerated.
10749
4536995d
UW
107502008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
10751
10752 * server.c (handle_query): Never return "unsupported" for
10753 qXfer:features:read queries.
10754
221c031f
UW
107552008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
10756
10757 * server.c (get_features_xml): Fix inverted condition.
10758 (handle_query): Always support qXfer:feature:read.
10759
ccd213ac
DJ
107602008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
10761
10762 * server.c (wrapper_argv): New.
10763 (start_inferior): Handle wrapper_argv. If set, expect an extra
10764 trap.
10765 (gdbserver_usage): Document --wrapper.
10766 (main): Parse --wrapper.
10767
6fe305f7
UW
107682008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10769
10770 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
10771 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
10772 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
10773 (ppc_set_pc): Likewise.
10774 (ppc_arch_setup): New function.
10775 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
10776 of collect_register.
889bf7c5 10777 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 10778
5b0a002e
UW
107792008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10780
10781 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
10782 instead of linux-ppc64-low.o.
10783 * linux-ppc64-low.c: Remove file.
10784 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
10785 (linux-ppc64-low.o): Remove rule.
10786
10787 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
10788 (init_registers_powerpc_64): Likewise.
10789 (ppc_regmap): Conditionally define depending on __powerpc64__.
10790 (ppc_cannot_store_register): Do not special-case "fpscr" when
10791 compiled on __powerpc64__.
10792 (ppc_collect_ptrace_register): New function.
10793 (ppc_supply_ptrace_register): New function.
10794 (ppc_breakpoint): Change type to "unsigned int".
10795 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
10796 (the_low_target): Conditionally provide initializers for the
889bf7c5 10797 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
10798 collect_ptrace_register and supply_ptrace_register members.
10799
9b4b61c8
UW
108002008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10801
10802 * regcache.h (gdbserver_xmltarget): Add extern declaration.
10803 * server.c (gdbserver_xmltarget): Define.
10804 (get_features_xml): Use it to replace "target.xml" and arch_string.
10805
10806 * configure.srv: Remove srv_xmltarget. Add XML files that were
10807 mentioned there to srv_xmlfiles instead. Remove conditional tests
10808 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
10809 srv_xmlfiles and srv_regobj to include all possible choices.
10810 * configure.ac (srv_xmltarget): Remove.
10811 (srv_xmlfiles): Do not add "target.xml".
10812 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
10813 checks for supplementary target information.
10814 * configure: Regenerate.
10815 * Makefile.in (XML_TARGET): Remove.
10816 (target.xml): Remove rule.
10817 (clean): Do not clean up target.xml.
10818 (.PRECIOUS): Do not mention target.xml.
10819
10820 * target.h (struct target_ops): Remove arch_string member.
10821 * linux-low.c (linux_arch_string): Remove.
10822 (linux_target_ops): Remove arch_string initializer.
10823 * linux-low.h (struct linux_target_ops): Remove arch_string member.
10824 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
10825 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
10826 * spu-low.c (spu_arch_string): Remove.
10827 (spu_target_ops): Remove arch_string initializer.
10828 * win32-low.c (win32_arch_string): Remove.
10829 (win32_target_ops): Remove arch_string initializer.
10830 * win32-low.h (struct win32_target_ops): Remove arch_string member.
10831 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
10832 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
10833
ee1a7ae4
UW
108342008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
10835
10836 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
10837 by collect_ptrace_register and supply_ptrace_register hooks.
10838 * linux-low.c (fetch_register): Use supply_ptrace_register callback
10839 instead of checking for the_low_target.left_pad_xfer.
10840 (usr_store_inferior_registers): Use collect_ptrace_register callback
10841 instead of checking for the_low_target.left_pad_xfer.
10842
10843 * linux-s390-low.c (s390_collect_ptrace_register): New function.
10844 (s390_supply_ptrace_register): Likewise.
10845 (s390_fill_gregset): Call s390_collect_ptrace_register.
10846 (the_low_target): Update.
10847
10848 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
10849 (ppc_supply_ptrace_register): Likewise.
10850 (the_low_target): Update.
10851
10852 * linux-i386-low.c (the_low_target): Update.
10853 * linux-x86-64-low.c (the_low_target): Update.
10854
d61ddec4
UW
108552008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
10856
10857 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
10858 reg-s390.o and reg-s390x.o.
10859
10860 * linux-low.c (new_inferior): New global variable.
10861 (linux_create_inferior, linux_attach): Set it.
10862 (linux_wait_for_process): Call the_low_target.arch_setup after the
10863 target has stopped for the first time.
10864 (initialize_low): Do not call the_low_target.arch_setup.
10865
10866 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
10867 (s390_set_pc): Likewise.
10868 (s390_arch_setup): New function.
10869 (the_low_target): Use s390_arch_setup as arch_setup routine.
10870
10871 * regcache.c (realloc_register_cache): New function.
10872 (set_register_cache): Call it for each existing regcache.
10873
d05b4ac3
UW
108742008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
10875
10876 * server.h (init_registers): Remove prototype.
10877
10878 * linux-low.h (struct linux_target_ops): Add arch_setup field.
10879 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
10880 instead of init_registers ().
10881 * linux-arm-low.c (init_registers_arm): Add prototype.
10882 (init_registers_arm_with_iwmmxt): Likewise.
10883 (the_low_target): Add initializer for arch_setup field.
10884 * linux-cris-low.c (init_registers_cris): Add prototype.
10885 (the_low_target): Add initializer for arch_setup field.
10886 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
10887 (the_low_target): Add initializer for arch_setup field.
10888 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
10889 (the_low_target): Add initializer for arch_setup field.
10890 * linux-ia64-low.c (init_registers_ia64): Add prototype.
10891 (the_low_target): Add initializer for arch_setup field.
10892 * linux-m32r-low.c (init_registers_m32r): Add prototype.
10893 (the_low_target): Add initializer for arch_setup field.
10894 * linux-m68k-low.c (init_registers_m68k): Add prototype.
10895 (the_low_target): Add initializer for arch_setup field.
10896 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
10897 (init_registers_mips64_linux): Likewise.
10898 (the_low_target): Add initializer for arch_setup field.
10899 * linux-ppc-low.c (init_registers_ppc): Add prototype.
10900 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
10901 (the_low_target): Add initializer for arch_setup field.
10902 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
10903 (init_registers_powerpc_64): Likewise.
10904 (the_low_target): Add initializer for arch_setup field.
10905 * linux-s390-low.c (init_registers_s390): Add prototype.
10906 (init_registers_s390x): Likewise.
10907 (the_low_target): Add initializer for arch_setup field.
10908 * linux-sh-low.c (init_registers_sh): Add prototype.
10909 (the_low_target): Add initializer for arch_setup field.
10910 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
10911 (the_low_target): Add initializer for arch_setup field.
10912 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
10913 (the_low_target): Add initializer for arch_setup field.
10914
10915 * win32-low.h (struct win32_target_ops): Add arch_setup field.
10916 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
10917 instead of init_registers ().
10918 * win32-arm-low.c (init_registers_arm): Add prototype.
10919 (the_low_target): Add initializer for arch_setup field.
10920 * win32-i386-low.c (init_registers_i386): Add prototype.
10921 (the_low_target): Add initializer for arch_setup field.
10922
10923 * spu-low.c (init_registers_spu): Add prototype.
10924 (initialize_low): Call initialie_registers_spu () instead of
10925 initialize_registers ().
10926
fd96d250
PA
109272008-02-19 Pedro Alves <pedro@codesourcery.com>
10928
10929 * server.c (handle_v_requests): When handling the vRun and vAttach
10930 packets, if already debugging a process, don't kill it. Return an
10931 error instead.
10932
d41b6bb4
DJ
109332008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
10934
10935 * server.c (handle_query): Correct length check.
10936
5ac588cf
PA
109372008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
10938
10939 * win32-low.c (do_initial_child_stuff): Add process handle
10940 parameter. Set current_process_handle and current_process_id from the
10941 parameters. Clear globals.
10942 (win32_create_inferior): Don't set current_process_handle and
10943 current_process_id here. Instead pass them on the call to
10944 do_initial_child_stuff.
10945 (win32_attach): Likewise.
10946 (win32_clear_inferiors): New.
10947 (win32_kill): Don't close the current process handle or the
10948 current thread handle here. Instead call win32_clear_inferiors.
10949 (win32_detach): Don't open a new handle to the process. Call
10950 win32_clear_inferiors.
10951 (win32_join): Don't rely on current_process_handle; open a new
10952 handle using the process id.
10953 (win32_wait): Call win32_clear_inferiors when the inferior process
10954 has exited.
10955
ecd7ecbc
DJ
109562008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
10957
10958 * server.c (monitor_show_help): Add "exit".
10959
1525d545
MG
109602008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
10961
ecd7ecbc 10962 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
10963 (clean): Add reg-xtensa.c.
10964 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
10965 * configure.srv (xtensa*-*-linux*) New target.
10966 * linux-xtensa-low.c: New.
10967 * xtensa-xtregs.c: New.
1525d545 10968
59a016f0
PA
109692008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
10970
10971 * hostio.c: Don't include errno.h.
10972 (errno_to_fileio_errno): Move to hostio-errno.
10973 * hostio.c: (hostio_error): Remove the error parameter. Defer the
10974 error number outputting to the target->hostio_last_error callback.
10975 (hostio_packet_error): Use FILEIO_EINVAL directly.
10976 (handle_open, handle_pread, hostio_error, handle_unlink): Update
10977 calls to hostio_error.
10978 * hostio-errno.c: New.
10979 * server.h (hostio_last_error_from_errno): Declare.
10980 * target.h (target_ops): Add hostio_last_error member.
10981 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
10982 as hostio_last_error handler.
889bf7c5 10983 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
10984 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
10985 (wince_hostio_last_error): New functions.
10986 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
10987 as hostio_last_error handler.
10988 (win32_target_ops) [!_WIN32_WCE]: Register
10989 hostio_last_error_from_errno as hostio_last_error handler.
10990 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
10991 (hostio-errno.o): New rule.
10992 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
10993 * configure.srv (srv_hostio_err_objs): New variable. Default to
10994 hostio-errno.o.
10995 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
10996 * configure: Regenerate.
10997
2d717e4f
DJ
109982008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
10999
11000 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
11001 (linux_kill, linux_detach): Clean up the process list.
11002 * remote-utils.c (remote_open): Improve port number parsing.
11003 (putpkt_binary, input_interrupt): Only send interrupts if the target
11004 is running.
11005 * server.c (extended_protocol): Make static.
11006 (attached): Define earlier.
11007 (exit_requested, response_needed, program_argv): New variables.
11008 (target_running): New.
11009 (start_inferior): Clear attached here.
11010 (attach_inferior): Set attached here.
11011 (require_running): Define.
11012 (handle_query): Use require_running and target_running. Implement
11013 "monitor exit".
11014 (handle_v_attach, handle_v_run): New.
11015 (handle_v_requests): Use require_running. Handle vAttach and vRun.
11016 (gdbserver_usage): Update.
11017 (main): Redo argument parsing. Handle --debug and --multi. Handle
11018 --attach along with other options or after the port. Save
11019 program_argv. Support no initial program. Resynchronize
11020 communication with GDB after an error. Handle "monitor exit".
11021 Use require_running and target_running. Always allow the extended
11022 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
11023 restart in extended mode.
11024 * README: Refer to the GDB manual. Update --attach usage.
11025
7407e2de
AS
110262007-12-20 Andreas Schwab <schwab@suse.de>
11027
11028 * linux-low.c (STACK_SIZE): Define.
11029 (linux_tracefork_child): Use it. Use __clone2 on ia64.
11030 (linux_test_for_tracefork): Likewise.
11031
b65d95c5
DJ
110322007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
11033
11034 * linux-low.c (linux_wait_for_event): Update messages. Do not
11035 reinsert auto-delete breakpoints.
11036 * mem-break.c (struct breakpoint): Change return type of handler to
11037 int.
11038 (set_breakpoint_at): Update handler type.
11039 (reinsert_breakpoint_handler): Return 1 instead of calling
11040 delete_breakpoint.
11041 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
11042 setting a new one.
11043 (check_breakpoints): Delete auto-delete breakpoints and return 2.
11044 * mem-break.h (set_breakpoint_at): Update handler type.
11045 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
11046 * win32-low.c (auto_delete_breakpoint): New.
11047 (get_child_debug_event): Use it.
11048
4e799345
DJ
110492007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
11050
11051 * configure.ac: Check for pread and pwrite.
11052 * hostio.c (handle_pread): Fall back to lseek and read.
11053 (handle_pwrite): Fall back to lseek and write.
11054 * config.in, configure: Regenerated.
11055
27524b67
DJ
110562007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
11057
11058 * server.c (myresume): Add own_buf argument.
11059 (main): Update calls.
11060
a20d5e98
DJ
110612007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
11062
11063 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
11064 * remote-utils.c (remote_open): Do not call disable_async_io.
11065 (block_async_io): Delete.
11066 (unblock_async_io): Make static.
11067 (initialize_async_io): New.
11068 * server.c (handle_v_cont): Handle async I/O here.
11069 (myresume): Likewise. Move other common resume tasks here...
11070 (main): ... from here. Call initialize_async_io. Disable async
11071 I/O before the main loop.
11072 * server.h (initialize_async_io): Declare.
11073 (block_async_io, unblock_async_io): Delete prototypes.
11074 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
11075
b79d787e
DJ
110762007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
11077
11078 * remote-utils.c (readchar): Allow binary data in received messages.
11079
d97903b2
PA
110802007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11081
11082 * win32-low.c (attaching): New global.
11083 (win32_create_inferior): Clear the `attaching' global.
11084 (win32_attach): Set the `attaching' global.
11085 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
11086 attaching. Only set a breakpoint at the entry point if not
11087 attaching.
11088
311de423
PA
110892007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11090
11091 * server.c (main): Don't report dll events on the initial
11092 connection on attaches.
11093
6c2d16d2
PA
110942007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11095
11096 * server.c (main): Relax numerical bases supported for the pid of
11097 the --attach command line argument.
11098
5ca906e6
PA
110992007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11100
11101 * win32-low.c (win32_attach): Call OpenProcess before
11102 DebugActiveProcess, not after. Add last error output to error
11103 call.
11104
9c6c8194
PA
111052007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11106
11107 * win32-low.c (win32_get_thread_context)
11108 (win32_set_thread_context): New functions.
11109 (thread_rec): Use win32_get_thread_context.
11110 (continue_one_thread, win32_resume): Use win32_set_thread_context.
11111 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
11112 field.
11113
4d5d1aaa
PA
111142007-12-03 Leo Zayas
11115 Pedro Alves <pedro_alves@portugalmail.pt>
11116
11117 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
11118 global variables.
11119 (child_add_thread): Minor cleanup.
11120 (child_continue): Resume artificially suspended threads before
11121 calling ContinueDebugEvent.
11122 (suspend_one_thread): New.
11123 (fake_breakpoint_event): New.
11124 (get_child_debug_event): Change return type to int. Check here if
11125 gdb sent an interrupt request. If a soft interrupt was requested,
11126 fake a breakpoint event. Return 0 if there is no event to handle,
11127 and 1 otherwise.
11128 (win32_wait): Don't check here if gdb sent an interrupt request.
11129 Ensure there is a valid event to handle.
11130 (win32_request_interrupt): Add soft interruption method as last
11131 resort.
11132
c436e841
PA
111332007-12-03 Leo Zayas
11134 Pedro Alves <pedro_alves@portugalmail.pt>
11135
11136 * win32-low.h (win32_thread_info): Add descriptions to the
11137 structure members. Replace `suspend_count' counter by a
11138 `suspended' flag.
11139 * win32-low.c (thread_rec): Update condition of when to get the
11140 context from the inferior. Rely on ContextFlags being set if it
11141 has already been retrieved. Only suspend the inferior thread if
11142 we haven't already. Warn if that fails.
11143 (continue_one_thread): s/suspend_count/suspended/. Only call
11144 ResumeThread once. Warn if that fails.
11145
e7b5fa67
PA
111462007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
11147
11148 * win32-low.c (win32_wait): Don't read from the inferior when it
11149 has already exited.
11150
a385171d
PA
111512007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
11152
11153 * Makefile.in (win32_low_h): New variable.
11154 (win32-low.o): Add dependency on $(win32_low_h).
11155 (win32-arm-low.o, win32-i386-low.o): New rules.
11156
f80c84b3
DJ
111572007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
11158
11159 * hostio.c: Correct copyright year.
11160
a6b151f1
DJ
111612007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
11162
11163 * Makefile.in (OBS): Add hostio.o.
11164 (hostio.o): New rule.
11165 * server.h (handle_vFile): Declare.
11166 * hostio.c: New file.
11167 * server.c (handle_v_requests): Take packet_len and new_packet_len
11168 for binary packets. Call handle_vFile.
11169 (main): Update call to handle_v_requests.
11170
f9387fc3
DJ
111712007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
11172
11173 * linux-low.c: Include <sched.h>.
11174
51c2684e
DJ
111752007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
11176
11177 * linux-low.c (linux_tracefork_grandchild): New.
11178 (linux_tracefork_child): Use clone.
11179 (linux_test_for_tracefork): Use clone; allocate and free a stack.
11180
75f83163
JB
111812007-10-31 Joel Brobecker <brobecker@adacore.com>
11182
11183 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
11184
da5898ce
DJ
111852007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
11186
11187 * linux-low.c (handle_extended_wait): Handle unexpected signals.
11188
24a09b5f
DJ
111892007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
11190
11191 * inferiors.c (change_inferior_id): Delete.
11192 (add_pid_to_list, pull_pid_from_list): New.
11193 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
11194 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
11195 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
11196 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
11197 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
11198 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
11199 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
11200 (using_threads): Always set to 1.
11201 (handle_extended_wait): New.
11202 (add_process): Do not set TID.
11203 (linux_create_inferior): Set must_set_ptrace_flags.
11204 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
11205 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
11206 (linux_thread_alive): Rename TID argument to LWPID.
11207 (linux_wait_for_process): Handle unknown processes. Do not use TID.
11208 (linux_wait_for_event): Do not use TID or check using_threads. Update
11209 call to dead_thread_notify. Call handle_extended_wait.
11210 (linux_create_inferior): Use PTRACE_SETOPTIONS.
11211 (send_sigstop): Delete sigstop_sent.
11212 (wait_for_sigstop): Avoid TID.
11213 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
11214 (linux_test_for_tracefork): New.
11215 (linux_lookup_signals): Use thread_db_active and
11216 linux_supports_tracefork_flag.
11217 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
11218 * linux-low.h (get_process_thread): Avoid TID.
11219 (struct process_ifo): Move thread_known and tid to the end. Remove
11220 sigstop_sent.
11221 (linux_attach_lwp, thread_db_init): Update prototypes.
11222 * server.h (change_inferior_id): Delete prototype.
11223 (add_pid_to_list, pull_pid_from_list): New prototypes.
11224 * thread-db.c (thread_db_use_events): New.
11225 (find_first_thread): Rename to...
11226 (find_one_thread): ...this. Update callers and messages. Do not
11227 call fatal. Check thread_db_use_events. Do not call
11228 change_inferior_id or new_thread_notify.
11229 (maybe_attach_thread): Update. Do not call new_thread_notify.
11230 (thread_db_init): Set thread_db_use_events. Check use_events.
11231 * utils.c (fatal, warning): Correct message prefix.
11232
30ed0a8f
DJ
112332007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
11234
11235 * Makefile.in (clean): Remove new files.
11236 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
11237 (powerpc-64.o, powerpc-64.c): New rules.
11238 * configure.srv: Use alternate register sets for powerpc64-*-linux*
11239 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
11240 with SPE.
11241 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
11242 SPE targets.
11243 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
11244 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
11245 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
11246 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
11247 (target_regsets): Add AltiVec and SPE register sets.
11248 * configure.ac: Check for AltiVec and SPE.
11249 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
11250 (ppc_fill_vrregset, ppc_store_vrregset): New.
11251 (target_regsets): Add AltiVec register set.
11252 * configure: Regenerated.
11253
fd462a61
DJ
112542007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
11255
11256 * linux-low.c (O_LARGEFILE): Define.
11257 (linux_read_memory): Use /proc/PID/mem.
11258 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
11259 * configure, config.in: Regenerated.
11260
69f223ed
DJ
112612007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
11262
11263 * linux-low.c (linux_wait_for_event): Do not pass signals while
11264 single-stepping.
11265
aec18585
PA
112662007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
11267
11268 * win32-low.c (create_process): New.
11269 (win32_create_inferior): Use create_process instead of
11270 CreateProcess. If create_process failed retry appending an ".exe"
11271 suffix. Store the GetLastError result immediatelly after
11272 create_process calls and use it on the call to error.
11273
34d86ddd
PA
112742007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
11275
11276 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
11277
5a0e3bd0
JB
112782007-08-23 Joel Brobecker <brobecker@adacore.com>
11279
11280 * configure.ac: Switch license to GPLv3.
11281
f88c79e6
MS
112822007-08-01 Michael Snyder <msnyder@access-company.com>
11283
11284 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
11285
6b3d9b83
PA
112862007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
11287
11288 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
11289 typedef.
11290 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
11291 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
11292 CloseToolhelp32Snapshot.
11293 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
11294 CloseToolhelp32Snapshot.
11295
c588c53c
MS
112962007-07-27 Michael Snyder <michael.snyder@access-company.com>
11297
11298 * server.c (main): Check for inferior exit before main loop.
11299
aa0403d9
PA
113002007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
11301
11302 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
11303 instead of on tmp_desc.
11304
255e7678
DJ
113052007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
11306 Daniel Jacobowitz <dan@codesourcery.com>
11307
11308 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
11309 (add_thread): Minor cleanups.
11310 (clear_inferiors): Move lower in the file. Clear the DLL
11311 list.
11312 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
11313 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
11314 (xml_escape_text): New.
11315 * server.c (handle_query): Handle qXfer:libraries:read. Report it
11316 for qSupported.
11317 (handle_v_cont): Report errors.
11318 (gdbserver_version): Update.
11319 (main): Correct size of own_buf. Do not report initial DLL events.
11320 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
11321 (unloaded_dll, xml_escape_text): New.
11322 * win32-low.c (enum target_waitkind): Update comments.
11323 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
11324 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
11325 (win32_EnumProcessModules, win32_GetModuleInformation)
11326 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
11327 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
11328 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
11329 (win32_Module32First, win32_Module32Next, load_toolhelp)
11330 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
11331 (get_child_debug_event): Handle DLL events.
11332 (win32_wait): Likewise.
11333
0d37add9
DJ
113342007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
11335
11336 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
11337 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
11338
45e2715e
PA
113392007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
11340
11341 * win32-low.c (handle_output_debug_string): Ignore event if not
11342 waiting.
11343
c5674cf1
PA
113442007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
11345
11346 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
11347
2bbe3cc1
DJ
113482007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
11349
11350 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
11351
ae13219e
DJ
113522007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
11353
11354 * inferiors.c (change_inferior_id): Add comment.
11355 * linux-low.c (check_removed_breakpoint): Add an early
11356 prototype. Improve debug output.
11357 (linux_attach): Doc update.
11358 (linux_detach_one_process, linux_detach): Clean up before releasing
11359 each process.
11360 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
11361 * linux-low.h (struct process_info): Doc improvement.
11362 * mem-break.c (delete_all_breakpoints): New.
11363 * mem-break.h (delete_all_breakpoints): New prototype.
11364 * thread-db.c (find_first_thread): New.
11365 (thread_db_create_event): Call it instead of
11366 thread_db_find_new_threads. Clean up unused variables.
11367 (maybe_attach_thread): Remove first thread handling.
11368 (thread_db_find_new_threads): Use find_first_thread.
11369 (thread_db_get_tls_address): Likewise.
11370
4105de34
DJ
113712007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
11372
11373 * thread-db.c (thread_db_find_new_threads): Add prototype.
11374 (thread_db_create_event): Check for the main thread before adding
11375 a new thread.
11376 (maybe_attach_thread): Only enable event reporting if TID == 0.
11377 (thread_db_get_tls_address): Check for new threads.
11378
2b876972
DJ
113792007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
11380
11381 * linux-low.c (linux_create_inferior): Try execv before execvp.
11382 * spu-low.c (spu_create_inferior): Likewise.
11383
7a245884
DJ
113842007-06-13 Mike Frysinger <vapier@gentoo.org>
11385
11386 * linux-low.c (linux_create_inferior): Change execv to execvp.
11387 * spu-low.c (spu_create_inferior): Likewies.
11388
117ce543
DJ
113892007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
11390
11391 * Makefile.in (clean): Clean new files instead of deleted ones.
11392 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
11393 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
11394 rules.
11395 * configure.srv: Specify XML files and new regformats for MIPS and
11396 MIPS64 GNU/Linux.
11397 * linux-mips-low.c (mips_num_regs): Set to only used registers.
11398 (mips_regmap): Do not fetch $0. Remove unused registers. Add
11399 an entry for the restart register.
11400 (mips_cannot_fetch_register, mips_cannot_store_register)
11401 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
11402 register names to match the XML descriptions.
11403 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
11404 restart register instead of $0.
11405
0e7f50da
UW
114062007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
11407 Markus Deuling <deuling@de.ibm.com>
11408
11409 * remote-utils.c (decode_xfer_write): New function.
11410 * server.h (decode_xfer_write): Add prototype.
11411 * server.c (handle_query): Add PACKET_LEN argument. Support
11412 qXfer:spu:read and qXfer:spu:write packets.
11413 (main): Pass packet_len to handle_query.
11414 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
11415 * target.h (target_ops): Add qxfer_spu.
11416
374c1d38
UW
114172007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
11418
11419 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
11420 accessing non-seekable spufs files.
11421
bb63802a
UW
114222007-05-16 Markus Deuling <deuling@de.ibm.com>
11423
889bf7c5 11424 * server.c (handle_query): Add reply for qC packet.
bb63802a 11425
7390519e
PA
114262007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11427 Leo Zayas <lerele@champenstudios@com>
11428
11429 * server.h (check_remote_input_interrupt_request): New function.
11430 * remote_utils.c (INVALID_DESCRIPTOR): New define.
11431 (remote_desc): Initialize with INVALID_DESCRIPTOR.
11432 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
11433 (check_remote_input_interrupt_request): New function.
11434 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 11435 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
11436 winapi_GenerateConsoleCtrlEvent): New typedefs.
11437 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
11438 to 250 ms.
11439 (win32_wait): Check for remote interrupt request
11440 with check_remote_input_interrupt_request.
11441 (win32_request_interrupt): New function.
11442 (win32_target_op): Set request_interrupt to win32_request_interrupt.
11443
34b34921
PA
114442007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11445
11446 * win32-low.c (debug_registers_changed,
11447 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
11448 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
11449 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
11450 (thread_rec): Get context using the low target.
11451 (child_add_thread): Call thread_added on the low target,
11452 which does the same thing.
11453 (regptr): Delete.
11454 (do_initial_child_stuff): Remove debug registers references.
11455 Set context using the low target. Resume threads after
11456 setting the contexts.
11457 (child_continue): Remove dead variable. Remove debug
11458 registers references.
11459 (child_fetch_inferior_registers): Go through the low target.
11460 (do_child_store_inferior_registers): Remove.
11461 (child_store_inferior_registers): Go through the low target.
11462 (win32_resume): Remove debug registers references.
11463 Set context using the low target.
11464 (handle_exception): Change return type to void. Don't record
11465 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
11466 first chance exception.
889bf7c5 11467 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
11468 goto loop. Always return after waiting for debug event.
11469 (win32_wait): Convert to switch statement. Handle spurious
11470 events.
11471
11472 * win32-i386-low.c (debug_registers_changed,
11473 debug_registers_used): New.
11474 (initial_stuff): Rename to ...
11475 (i386_initial_stuff): ... this. Clear debug registers
11476 state variables.
11477 (store_debug_registers): Delete.
11478 (i386_get_thread_context): New.
11479 (load_debug_registers): Delete.
11480 (i386_set_thread_context): New.
11481 (i386_thread_added): New.
11482 (single_step): Rename to ...
11483 (i386_single_step): ... this.
11484 (do_fetch_inferior_registers): Rename to ...
11485 (i386_fetch_inferior_register): ... this.
11486 (i386_store_inferior_register): New.
11487 (the_low_target): Adapt to new interface.
11488
11489 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
11490 (arm_get_thread_context): New.
11491 (arm_set_thread_context): New.
11492 (regptr): New.
11493 (do_fetch_inferior_registers): Rename to ...
11494 (arm_fetch_inferior_register): ... this.
11495 (arm_store_inferior_register): New.
11496 (arm_wince_breakpoint): Reimplement as unsigned long.
11497 (arm_wince_breakpoint_len): Define.
11498 (the_low_target): Adapt to new interface.
11499
11500 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
11501 load_debug_registers. Add get_thread_context, set_thread_context,
11502 thread_added and store_inferior_register. Rename
11503 fetch_inferior_registers to fetch_inferior_register.
11504 (regptr): Remove declaration.
11505
dd6953e1
PA
115062007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11507
11508 * linux-low.c (linux_detach): Change return type to int. Return 0.
11509 * spu-low.c (spu_detach): Likewise.
11510
444d6139
PA
115112007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11512
11513 * target.h (target_ops): Change return type of detach to int.
11514 Add join.
11515 (join_inferior): New.
11516 * server.c (main): Don't skip detach support on mingw32.
11517 If the inferior doesn't support detaching return error.
11518 Call join_inferior instead of using waitpid.
11519 * linux-low.c (linux_join): New.
11520 (linux_target_op): Add linux_join.
11521 * spu-low.c (spu_join): New.
11522 (spu_target_ops): Add spu_join.
11523 * win32-low.c (win32_detach): Adapt to new interface.
11524 Reopen current_process_handle before detaching. Issue a child
11525 resume before detaching.
11526 (win32_join): New.
11527 (win32_target_op): Add win32_join.
11528
1d5315fe
PA
115292007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11530
11531 * win32-low.c (win32-attach): Fix return value.
11532 * target.h (target_ops): Describe ATTACH return values.
11533
bf914831
PA
115342007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11535
11536 * win32-low.c (GETPROCADDRESS): Define.
11537 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
11538 (winapi_DebugSetProcessKillOnExit): Likewise.
11539 (win32_create_inferior): Force usage of ansi CreateProcessA.
11540 (win32_attach): Use GETPROCADDRESS.
11541 (win32_detach): Likewise.
11542
f72f3e60
PA
115432007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11544
11545 * win32-low.c (win32_wait): Don't use WSTOPSIG.
11546
ed50f18f
PA
115472007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
11548
11549 * win32-low.c: Commit leftover changes from 2007-03-29.
11550
0c2ead7e
DJ
115512007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
11552
11553 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
11554 fields short instead of int. Add explicit padding.
11555 (i387_cache_to_fsave): Remove unnecessary casts.
11556 (i387_fsave_to_cache): Doc fix.
11557 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
11558
73725ff3
DJ
115592007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
11560
11561 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
11562 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
11563
d99f33d8
PA
115642007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
11565
11566 * configure.srv (arm*-*-mingw32ce*): Move near the other
11567 arm targets.
11568
68070c10
PA
115692007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
11570
2482afc6 11571 * configure.ac: Add errno checking.
68070c10
PA
11572 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
11573 sys/file.h and malloc.h.
11574 (AC_CHECK_DECLS): Add perror.
11575 (srv_mingwce): Handle.
2482afc6 11576 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
11577 win32-i386-low.o to srv_tgtobj.
11578 (i[34567]86-*-mingw*): Likewise.
11579 (arm*-*-mingw32ce*): Add case.
11580 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
11581 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
11582 [__MINGW32CE__] (strerror): New function.
11583 [__MINGW32CE__] (errno): Define to GetLastError.
11584 [__MINGW32CE__] (COUNTOF): New macro.
11585 (remote_open): Remove extra close call.
11586 * mem-break.c (delete_breakpoint_at): New function.
11587 * mem-break.h (delete_breakpoint_at): Declare.
11588 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
11589 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
11590 [USE_WIN32API] (read, write): Add char* casts.
11591 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
11592 * server.h: Include wincecompat.h on Windows CE.
11593 [HAVE_ERRNO_H]: Check.
11594 (perror): Declare if not declared.
11595 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
11596 (perror_with_name): Remove errno declaration.
11597 * wincecompat.h: New.
11598 * wincecompat.c: New.
11599 * win32-low.h: New.
11600 * win32-arm-low.c: New.
11601 * win32-i386-low.c: New.
11602 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
11603 (OUTMSG2): Make it safe.
11604 (_T): New macro.
11605 (COUNTOF): New macro.
11606 (NUM_REGS): Get it from the low target.
11607 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
11608 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
11609 (thread_rec): Let low target handle debug registers.
11610 (child_add_thread): Likewise.
11611 (child_init_thread_list): Likewise.
11612 (continue_one_thread): Likewise.
11613 (regptr): New.
11614 (do_child_fetch_inferior_registers): Move to ...
11615 * win32-i386-low.c: ... here, and rename to ...
11616 (do_fetch_inferior_registers): ... this.
889bf7c5 11617 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
11618 Go through the low target.
11619 (do_child_store_inferior_registers): Use regptr.
11620 (strwinerror): New function.
11621 (win32_create_inferior): Handle Windows CE.
11622 Use strwinerror instead of strerror on Windows error
11623 codes. Add program to the error output.
11624 Don't close the main thread handle on Windows CE.
11625 (win32_attach): Use coredll.dll on Windows CE.
11626 (win32_kill): Close current process and current
11627 thread handles.
11628 (win32_detach): Use coredll.dll on Windows CE.
11629 (win32_resume): Let low target handle debug registers, and
11630 step request.
11631 (handle_exception): Add/Remove initial breakpoint. Avoid
11632 non-existant WSTOPSIG on Windows CE.
11633 (win32_read_inferior_memory): Cast to remove warning.
11634 (win32_arch_string): Go through the low target.
11635 (initialize_low): Call set_breakpoint_data with the low
11636 target's breakpoint.
11637 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
11638 FOP_REGNUM, mappings): Move to ...
11639 * win32-i386-low.c: ... here.
11640 * win32-low.c (win32_thread_info): Move to ...
11641 * win32-low.h: ... here.
11642 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
11643 win32-arm-low.c and wincecompat.c.
11644 (all:): Add $EXEEXT.
11645 (install-only:): Likewise.
11646 (gdbserver:): Likewise.
11647 (gdbreplay:): Likewise.
11648 * config.in: Regenerate.
11649 * configure: Regenerate.
11650
41093d81
PA
116512007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
11652
11653 * win32-low.c: Rename typedef thread_info to
11654 win32_thread_info throughout.
11655
544afa54
PA
116562007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
11657
11658 * win32-i386-low.c: Rename to ...
11659 * win32-low.c: ... this.
11660 * configure.srv: Replace win32-i386-low.o with win32-low.o.
11661 * Makefile.in: Likewise.
11662
bce7165d
PA
116632007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
11664
11665 * remote-utils.c (monitor_output): Constify msg parameter.
11666 * server.h (monitor_output): Likewise.
11667 * win32-i386-low.c (handle_output_debug_string): New.
11668 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
11669 handle_output_debug_string.
11670 (get_child_debug_event): Likewise.
11671
506c7aa0
DJ
116722007-03-27 Mat Hostetter <mat@lcs.mit.edu>
11673
11674 * server.c (main): Correct strtoul check.
11675
42c81e2a
DJ
116762007-03-27 Jon Ringle <jon@ringle.org>
11677
11678 * linux-low.c: Check __ARCH_HAS_MMU__ also.
11679
9453113a
DJ
116802007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
11681
11682 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
11683
64a69107
DJ
116842007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
11685
11686 * terminal.h: Check HAVE_SGTTY_H.
11687
116882007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
11689
11690 * remote-utils.c (remote_open): Print out the assigned port number.
11691
c74d0ad8
DJ
116922007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
11693
11694 * remote-utils.c (monitor_output): New function.
11695 * server.c (debug_threads): Define here.
11696 (monitor_show_help): New function.
11697 (handle_query): Handle qRcmd.
11698 (main): Do not handle 'd' packet.
11699 * server.h (debug_threads, remote_debug, monitor_output): Declare.
11700 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
11701 of debug_threads.
11702
de7c3b4a
PA
117032007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11704
11705 * Makefile.in (EXEEXT): New.
11706 (clean): Use $(EXEEXT).
11707
ef57601b
PA
117082007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11709
11710 * target.h (target_ops): Rename send_signal to request_interrupt,
11711 and remove enum target_signal parameter.
11712 * linux-low.c (linux_request_interrupt): Rename from
11713 linux_send_signal, and always send SIGINT.
11714 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
11715 and always send SIGINT.
11716 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
11717 of send_signal.
11718 (input_interrupt): Likewise.
11719
820f2bda
PA
117202007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11721
11722 * server.c (get_features_xml): Check if target implemented
11723 arch_string.
11724 * win32-i386-low.c (win32_arch_string): New.
11725 (win32_target_ops): Add win32_arch_string as arch_string member.
11726
ab39bf24
UW
117272007-02-22 Markus Deuling <deuling@de.ibm.com>
11728
11729 * spu-low.c (spu_arch_string): New.
11730 (spu_target_ops): Add spu_arch_string.
11731
61ff6e04
DJ
117322007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
11733
11734 * remote-utils.c: Remove HAVE_TERMINAL_H check.
11735 * configure.ac: Do not check for terminal.h.
11736 * configure, config.in: Regenerated.
11737
fb1e4ffc
DJ
117382007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
11739
11740 * Makefile.in (OBS): Add $(XML_BUILTIN).
11741 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
11742 (clean): Update.
11743 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
11744 (arm-with-iwmmxt.c): New.
11745 * config.in, configure: Regenerate.
11746 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
11747 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
11748 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
11749 (arm*-*-linux*): Add iWMMXt and regset support.
11750 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
11751 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
11752 (arm_store_wmmxregset, target_regsets): New.
11753 * server.c (get_features_xml): Take annex argument. Check builtin
11754 XML documents.
11755 (handle_query): Handle multiple annexes.
11756
0f48aa01
DJ
117572007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11758
11759 * remote-utils.c [USE_WIN32API] (read, write): Define.
11760 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
11761 write.
11762
23181151
DJ
117632007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
11764
11765 * linux-i386-low.c (the_low_target): Set arch_string.
11766 * linux-x86-64-low.c (the_low_target): Likewise.
11767 * linux-low.c (linux_arch_string): New.
11768 (linux_target_ops): Add it.
11769 * linux-low.h (struct linux_target_ops): Add arch_string.
11770 * server.c (write_qxfer_response): Use const void * for DATA.
11771 (get_features_xml): New.
11772 (handle_query): Handle qXfer:features:read. Report it for qSupported.
11773 * target.h (struct target_ops): Add arch_string method.
11774
9d606399
DJ
117752007-01-03 Denis Pilat <denis.pilat@st.com>
11776 Daniel Jacobowitz <dan@codesourcery.com>
11777
11778 * linux-low.c (linux_kill): Handle being called with no threads.
11779 * win32-i386-low.c (win32_kill): Likewise.
11780 (get_child_debug_event): Clear current_process_handle.
11781
117822006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
11783 Daniel Jacobowitz <dan@codesourcery.com>
11784
11785 * remote-utils.c (remote_open): Check the type of specified
11786 serial port devices before opening them.
11787 * server.c (main): Kill the inferior if an error occurs during
11788 the first remote_open.
11789
a5e13d24
DJ
117902006-12-05 Markus Deuling <deuling@de.ibm.com>
11791
11792 * README: Update supported targets.
11793
186947f7
DJ
117942006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
11795
11796 * Makefile.in (clean): Remove reg-mips64.c.
11797 (reg-mips64.c, reg-mips64.o): New rules.
11798 * configure.srv: Handle mips64. Include regset support for mips.
11799 * linux-mips-low.c (union mips_register): New.
11800 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
11801 (mips_breakpoint, mips_breakpoint_at): Use int.
11802 (mips_collect_register, mips_supply_register)
11803 (mips_collect_register_32bit, mips_supply_register_32bit)
11804 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
11805 (mips_store_fpregset, target_regsets): New.
11806 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
11807
a13e2c95
UW
118082006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
11809
11810 * configure.srv: Add target "spu*-*-*".
11811 * Makefile.in (clean): Remove reg-spu.c.
11812 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
11813 * spu-low.c: New file.
11814
cb7283db
DJ
118152006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
11816
11817 * configure.ac: Correct td_thr_tls_get_addr test.
11818 * configure: Regenerated.
11819
89be2091
DJ
118202006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
11821
11822 * linux-low.c (linux_wait_for_event): Reformat. Use the
11823 pass_signals array.
11824 * remote-utils.c (decode_address_to_semicolon): New.
11825 * server.c (pass_signals, handle_general_set): New.
11826 (handle_query): Mention QPassSignals for qSupported.
11827 (main): Call handle_general_set.
11828 * server.h (pass_signals, decode_address_to_semicolon): New.
11829
000ef4f0
DJ
118302006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
11831
11832 * server.c (handle_query): Correct error handling for read_auxv.
11833
b7149293
UW
118342005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
11835
11836 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
11837 and srv_linux_thread_db to yes.
11838 * linux-s390-low.c (s390_fill_gregset): New function.
11839 (target_regsets): Define data structure.
11840
dae5f5cf
DJ
118412006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
11842
11843 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
11844 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
11845 * config.in, configure: Regenerated.
11846 * inferiors.c (gdb_id_to_thread): New function.
11847 (gdb_id_to_thread_id): Use it.
11848 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
11849 * linux-low.h (struct process_info): Add th member.
11850 (thread_db_get_tls_address): New prototype.
11851 * remote-utils.c (decode_address): Make non-static.
11852 * server.c (handle_query): Handle qGetTLSAddr.
11853 * server.h (gdb_id_to_thread, decode_address): New prototypes.
11854 * target.h (struct target_ops): Add get_tls_address.
11855 * thread-db.c (maybe_attach_thread): Save the thread handle.
11856 (thread_db_get_tls_address): New.
11857
32ca6d61
DJ
118582006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
11859
11860 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
11861 (linux_resume_one_process): Take a siginfo_t *. Update all
11862 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
11863 (struct pending_signals): Add a siginfo_t.
11864 (linux_wait_for_process): Always set last_status.
11865 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
11866 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
11867 * linux-low.h (struct process_info): Add last_status.
11868
5ffff7c1
DJ
118692006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
11870
11871 * remote-utils.c (try_rle): New function.
11872 (putpkt_binary): Use it.
11873
8695c747
DJ
118742006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
11875
11876 * Makefile.in (clean): Clean reg-x86-64-linux.c.
11877 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
11878 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
11879 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
11880 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
11881 point registers.
11882
290fadea
RS
118832006-08-08 Richard Sandiford <richard@codesourcery.com>
11884
11885 * server.c (terminal_fd): New variable.
11886 (old_foreground_pgrp): Likewise.
11887 (restore_old_foreground_pgrp): New function.
11888 (start_inferior): Record the terminal file descriptor in terminal_fd
11889 and its original foreground group in old_foreground_pgrp. Register
11890 restore_old_foreground_pgrp with atexit().
11891
9f2e1e63
DJ
118922006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
11893
11894 * server.c (handle_query): Correct qPart to qXfer.
11895
b80864fb
DJ
118962006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
11897
11898 * configure.ac: Check for more headers which are missing on
11899 Windows. Automatically supply -lwsock32 and USE_WIN32API.
11900 * configure.srv: Add Cygwin and mingw32.
11901 * remote-utils.c: Don't include headers unconditionally which
11902 are missing on mingw32. Include <winsock.h> for mingw32.
11903 (remote_open): Adjust for mingw32 support. Flush
11904 standard error after writing to it.
11905 (remote_close, putpkt_binary, input_interrupt, block_async_io)
11906 (unblock_async_io, enable_async_io, disable_async_io)
11907 (readchar, getpkt): Update for Winsock support.
11908 (prepare_resume_reply): Expect a protocol signal number.
11909 * server.c: Disable <sys/wait.h> on mingw32.
11910 (start_inferior): Adjust for mingw32 support. Flush
11911 standard error after writing to it.
11912 (attach_inferior): Likewise. Use protocol signal
11913 numbers.
11914 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
11915 and names.
11916 * win32-i386-low.c: New file.
11917 * Makefile.in (XM_CLIBS): Set.
11918 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
11919 (win32-i386-low.o): New dependency rule.
11920 * linux-low.c (linux_wait): Use target signal numbers.
11921 * target.h (struct target_ops): Doc fix.
11922 * server.h (target_signal_to_name): New prototype.
11923 * gdbreplay.c: Don't include headers unconditionally which
11924 are missing on mingw32. Include <winsock.h> for mingw32.
11925 (remote_close, remote_open): Adjust for Winsock support.
11926 * configure, config.in: Regenerated.
11927
0876f84a
DJ
119282006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
11929
11930 * server.c (decode_xfer_read, write_qxfer_response): New.
11931 (handle_query): Take a packet length argument. Handle
11932 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
11933 the qSupported response.
11934 (main): Update call to handle_query.
11935
01f9e8fa
DJ
119362006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
11937
11938 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
11939 (putpkt_binary): Renamed from putpkt and adjusted for binary
11940 data.
11941 (putpkt): New wrapper for putpkt_binary.
11942 (readchar): Don't mask off the high bit.
11943 (decode_X_packet): New function.
11944 * server.c (main): Call putpkt_binary if a handler sets the packet
11945 length. Save the length of the incoming packet. Handle 'X'.
11946 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
11947
be2a5f71
DJ
119482006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
11949
11950 * server.c (handle_query): Handle qSupported.
11951
ea025f5f
DJ
119522006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
11953
11954 * remote-utils.c (all_symbols_looked_up): New variable.
11955 (look_up_one_symbol): Check it.
11956 * server.h (look_up_one_symbol): New declaration.
11957 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
11958
9308fc88
DJ
119592006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
11960
11961 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 11962 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
11963 (PTRACE_GET_THREAD_AREA): Define.
11964 (ps_get_thread_area): New function.
11965
52fb6437
NS
119662006-05-09 Nathan Sidwell <nathan@codesourcery.com>
11967
11968 * configure.srv (m68k*-*-uclinux*): New target.
11969 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
11970 (linux_resume_one_process): Remove extraneous cast.
11971 (linux_read_offsets): New.
11972 (linux_target_op): Add linux_read_offsets on mmuless systems.
11973 * server.c (handle_query): Add qOffsets logic.
11974 * target.h (struct target_ops): Add read_offsets.
11975
21b0f40c
DJ
119762006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
11977
11978 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
11979 (PTRACE_GET_THREAD_AREA): Define.
11980 (ps_get_thread_area): New function.
11981 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
11982 (linux-x86-64-low.o): Update.
11983
0050a760
DJ
119842006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
11985
11986 * configure.ac: Remove checks for prfpregset_t.
11987 * gdb_proc_service.h: New file.
11988 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
11989 new "gdb_proc_service.h".
11990 * proc-service.c: Likewise.
11991 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
11992 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
11993 * Makefile.in (gdb_proc_service_h): Updated.
11994 * configure, config.in: Regenerated.
11995
b92a518e
DJ
119962006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
11997
11998 * remote-utils.c (prepare_resume_reply): Move declaration
11999 of gdb_id_from_wait to the top of the block.
12000
545587ee
DJ
120012006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
12002
12003 * linux-low.c (regsets_store_inferior_registers): Read the regset
12004 from the target before filling it.
12005
9db87ebd
DJ
120062006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
12007
12008 * server.c (attach_inferior): Return SIGTRAP for a successful
12009 attach.
12010
dd24457d
DJ
120112006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
12012
12013 * Makefile.in (OBS): Add version.o.
12014 (STAGESTUFF): Delete.
12015 (version.o): Add dependencies.
12016 (version.c): Replace rule.
12017 (clean): Remove version.c.
12018 * server.c (gdbserver_version): New.
12019 (gdbserver_usage): Use printf.
12020 (main): Handle --version and --help.
12021 * server.h (version, host_name): Add declarations.
12022
6f0f660e
EZ
120232005-12-23 Eli Zaretskii <eliz@gnu.org>
12024
889bf7c5
PA
12025 * linux-arm-low.c:
12026 * linux-arm-low.c:
12027 * inferiors.c:
12028 * i387-fp.h:
12029 * i387-fp.c:
12030 * gdbreplay.c:
12031 * regcache.c:
12032 * proc-service.c:
12033 * mem-break.h:
12034 * mem-break.c:
12035 * linux-x86-64-low.c:
12036 * linux-sh-low.c:
12037 * linux-s390-low.c:
12038 * linux-ppc64-low.c:
12039 * linux-ppc-low.c:
12040 * linux-mips-low.c:
12041 * linux-m68k-low.c:
12042 * linux-m32r-low.c:
12043 * linux-low.h:
12044 * linux-low.c:
12045 * linux-ia64-low.c:
12046 * linux-i386-low.c:
12047 * linux-crisv32-low.c:
12048 * thread-db.c:
12049 * terminal.h:
12050 * target.h:
12051 * target.c:
12052 * server.h:
12053 * server.c:
12054 * remote-utils.c:
12055 * regcache.h:
12056 * utils.c:
12057 * Makefile.in:
12058 * configure.ac:
6f0f660e
EZ
12059 * gdbserver.1: Add (C) after Copyright. Update the FSF
12060 address.
12061
9d1fb177
DJ
120622005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
12063
12064 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
12065 (arm_breakpoint_at): Recognize both breakpoints.
12066 (the_low_target): Use the correct breakpoint instruction.
12067
011a70c2
DJ
120682005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
12069
12070 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
12071 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
12072 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
12073 (the_low_target): Update.
12074
7fb85e41
AS
120752005-10-25 Andreas Schwab <schwab@suse.de>
12076
12077 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
12078
12079 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
12080 (ia64_num_regs): Reduce to 462.
12081
3db0444b
DJ
120822005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
12083
12084 * acinclude.m4: Correct quoting.
12085 * aclocal.m4: Regenerated.
12086
12087 Suggested by SZOKOVACS Robert <szo@ies.hu>:
12088 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
12089 (thread_db_init): Call thread_db_err_str.
12090 * configure.ac: Check for TD_VERSION.
12091 * config.in, configure: Regenerated.
12092
bee0189a
DJ
120932005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12094
12095 * server.h (error, fatal, warning): Add ATTR_FORMAT.
12096
e9d25b98
DJ
120972005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
12098
12099 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
12100 is not available. Define HAVE_PTRACE_GETREGS if it is.
12101 * config.in, configure: Regenerated.
12102 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
12103 * linux-i386-low.c, linux-m68k-low.c: Update to use
12104 HAVE_PTRACE_GETREGS.
12105 * linux-low.c (regsets_fetch_inferior_registers)
12106 (regsets_store_inferior_registers): Only return 0 if we processed
12107 GENERAL_REGS.
12108 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
12109 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
12110
a06660f7
DJ
121112005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
12112
12113 * inferiors.c (struct thread_info): Add gdb_id.
12114 (add_thread): Add gdb_id argument.
12115 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
12116 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
12117 calls to add_thread.
12118 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
12119 * server.c (handle_query): Use thread_to_gdb_id.
12120 (handle_v_cont, main): Use gdb_id_to_thread_id.
12121 * server.h (add_thread): Update prototype.
12122 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
12123 prototypes.
12124
5a1f5858
DJ
121252005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
12126
12127 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
12128 left-padded registers.
12129 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
12130 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
12131
e122f1f5
SE
121322005-07-01 Steve Ellcey <sje@cup.hp.com>
12133
12134 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
12135 * configure: Regenerate.
12136 * config.in: Regenerate.
12137 * server.h (NEED_DECLARATION_STRERROR):
12138 Replace with !HAVE_DECL_STRERROR.
12139
d592fa2f
DJ
121402005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
12141
12142 * linux-low.c (linux_wait, linux_send_signal): Don't test
12143 an unsigned long variable for > 0 if it could be MAX_ULONG.
12144 * server.c (myresume): Likewise.
12145 * target.c (set_desired_inferior): Likewise.
12146
ccbd4912
MK
121472005-06-13 Mark Kettenis <kettenis@gnu.org>
12148
12149 * configure.ac: Simplify and improve check for socklen_t.
12150 * configure, config.in: Regenerate.
12151
f450004a
DJ
121522005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
12153
12154 * acconfig.h: Remove.
12155 * configure.ac: Add a test for socklen_t. Use three-argument
12156 AC_DEFINE throughout.
12157 * config.in: Regenerated using autoheader 2.59.
12158 * configure: Regenerated.
12159
12160 * gdbreplay.c (socklen_t): Provide a default.
12161 (remote_open): Use socklen_t.
12162 * remote-utils.c (socklen_t): Provide a default.
12163 (remote_open): Use socklen_t.
12164 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
12165 unsigned char.
12166
12167 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
12168 char for buffers.
12169 * linux-low.c (linux_read_memory, linux_write_memory)
12170 (linux_read_auxv): Likewise.
12171 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
12172 (check_mem_write): Likewise.
12173 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
12174 Likewise.
12175 * regcache.c (struct inferior_rgcache_data, registers_to_string)
12176 (registers_from_string, register_data): Likewise.
12177 * server.c (handle_query, main): Likewise.
12178 * server.h (convert_ascii_to_int, convert_int_to_ascii)
12179 (decode_M_packet): Likewise.
12180 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
12181 * target.h (struct target_ops): Update read_memory, write_memory,
12182 and read_auxv.
12183 (read_inferior_memory, write_inferior_memory): Update.
12184 * linux-low.h (struct linux_target_ops): Change type of breakpoint
12185 to unsigned char *.
12186 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
12187 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
12188 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
12189 linux-s390-low.c, linux-sh-low.c: Update for changes in
12190 read_inferior_memory and the_low_target->breakpoint.
12191
eee84df1
DJ
121922005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
12193
12194 * Makefile.in (SFILES): Add linux-ppc64-low.c.
12195 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
12196 * configure.srv: Add powerpc64-*-linux*.
12197 * linux-ppc64-low.c: New file.
12198
45b134e5
OF
121992005-05-23 Orjan Friberg <orjanf@axis.com>
12200
12201 * linux-cris-low.c: New file with support for CRIS.
12202 * linux-crisv32-low.c: Ditto for CRISv32.
12203 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
12204 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 12205 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
12206 reg-crisv32.o, and reg-crisv32.c to make rules.
12207 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
12208 recognized targets.
12209
48d93c75
UW
122102005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
12211
12212 * linux-low.c (fetch_register): Ensure buffer size is a multiple
12213 of sizeof (PTRACE_XFER_TYPE).
12214 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
12215
e013ee27
OF
122162005-05-12 Orjan Friberg <orjanf@axis.com>
12217
889bf7c5 12218 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
12219 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
12220 pointers for hardware watchpoint support.
12221 * linux-low.h (struct linux_target_ops): Ditto.
12222 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
12223 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
12224 to linux_target_ops.
12225 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
12226 reply packet.
12227 * server.c (main): Recognize 'Z' and 'z' packets.
12228
b0ded00b
UW
122292005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
12230
12231 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
12232 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
12233 (the_low_target): Add new members.
12234
8643e2ad
DJ
122352005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
12236
12237 * proc-service.c (ps_lgetregs): Search all_processes instead of
12238 all_threads.
12239
fc620387
DJ
122402005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
12241
12242 * server.c (start_inferior): Change return type to int.
12243 (attach_inferior): Change sigptr to int *.
12244 (handle_v_cont, handle_v_requests): Change signal to int *.
12245 (main): Change signal to int.
12246
122472005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
12248
12249 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
12250 * configure.srv: Add m32r*-*-linux*.
12251 * linux-m32r-low.c: New file.
12252
e0e76420
DJ
122532005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
12254
12255 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
12256
a1928bad
DJ
122572005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
12258
12259 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
12260 Take unsigned long arguments for PIDs.
12261 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
12262 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
12263 (wait_for_sigstop, linux_resume_one_process)
12264 (regsets_fetch_inferior_registers, linux_send_signal)
12265 (linux_read_auxv): Likewise. Update the types of variables holding
12266 PIDs. Update format string specifiers.
12267 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
12268 * remote-utils.c (prepare_resume_reply): Likewise.
12269 * server.c (cont_thread, general_thread, step_thread)
12270 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
12271 unsigned long.
12272 (handle_query): Update format specifiers.
12273 (handle_v_cont, main): Use strtoul for thread IDs.
12274 * server.h (struct inferior_list_entry): Use unsigned long for ID.
12275 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
12276 (general_thread, step_thread, thread_from_wait)
12277 (old_thread_from_wait): Update.
12278 * target.h (struct thread_resume): Use unsigned long for THREAD.
12279 (struct target_ops): Use unsigned long for arguments to attach and
12280 thread_alive.
12281
dcdb98d2
DJ
122822005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
12283
12284 * acinclude.m4: Include bfd/bfd.m4 directly.
12285 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
12286 <agriffis@toolchain.org>.
12287 * aclocal.m4, configure: Regenerated.
12288
bec39cab
AC
122892005-01-07 Andrew Cagney <cagney@gnu.org>
12290
12291 * configure.ac: Rename configure.in, require autoconf 2.59.
12292 * configure: Re-generate.
12293
434c4c77
DJ
122942004-12-08 Daniel Jacobowitz <dan@debian.org>
12295
12296 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
12297 LIBS when finished.
12298 * aclocal.m4: Regenerated.
12299 * configure: Regenerated.
12300
db1d3e1b
AS
123012004-11-21 Andreas Schwab <schwab@suse.de>
12302
12303 * linux-m68k-low.c (m68k_num_gregs): Define.
12304 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
12305 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
12306 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
12307 (m68k_breakpoint_at): New. Add to the_low_target.
12308
12309 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
12310 srv_linux_thread_db to yes.
12311
43360365
JB
123122004-10-20 Joel Brobecker <brobecker@gnat.com>
12313
12314 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
12315 (ARCH_SET_FS): Likewise.
12316 (ARCH_GET_FS): Likewise.
12317 (ARCH_GET_GS): Likewise.
12318
fd500816
DJ
123192004-10-16 Daniel Jacobowitz <dan@debian.org>
12320
12321 * linux-i386-low.c (ps_get_thread_area): New.
12322 * linux-x86-64-low.c (ps_get_thread_area): New.
12323 * linux-low.c: Include <sys/syscall.h>.
12324 (linux_kill_one_process): Don't kill the first thread here.
12325 (linux_kill): Kill the first thread here.
12326 (kill_lwp): New function.
12327 (send_sigstop, linux_send_signal): Use it.
12328 * proc-service.c: Clean up #ifdefs.
12329 (fpregset_info): Delete.
12330 (ps_lgetregs): Update and enable implementation.
12331 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
12332 implementations.
12333 * remote-utils.c (struct sym_cache, symbol_cache): New.
12334 (input_interrupt): Print a clearer message.
12335 (async_io_enabled): New variable.
12336 (enable_async_io, disable_async_io): Use it. Update comments.
12337 (look_up_one_symbol): Use the symbol cache.
12338 * thread-db.c (thread_db_look_up_symbols): New function.
12339 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
12340
f6de3c42
DJ
123412004-10-16 Daniel Jacobowitz <dan@debian.org>
12342
12343 * configure.in: Test for -rdynamic.
12344 * configure: Regenerated.
12345 * Makefile (INTERNAL_LDFLAGS): New.
12346 (gdbserver, gdbreplay): Use it.
12347
2c0fc042
AC
123482004-09-02 Andrew Cagney <cagney@gnu.org>
12349
12350 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
12351
075b3282
DJ
123522004-03-23 Daniel Jacobowitz <drow@mvista.com>
12353
12354 * linux-low.c (linux_wait): Clear all_processes list also.
12355
fa6a77dc
DJ
123562004-03-12 Daniel Jacobowitz <drow@mvista.com>
12357
12358 * linux-low.c: Include <errno.h>. Remove extern declaration of
12359 errno.
12360
6d782a97
DJ
123612004-03-12 Daniel Jacobowitz <drow@mvista.com>
12362
12363 * gdbreplay.c, server.h, utils.c: Update copyright years.
12364
3a7fb99b
DJ
123652004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
12366
12367 * server.c (main): Print child status or termination signal from
12368 variable 'signal', not 'sig'.
12369
c3e735a6
DJ
123702004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
12371
12372 * linux-low.c (linux_read_memory): Change return type to
12373 int. Check for and return error from ptrace().
12374 * target.c (read_inferior_memory): Change return type to int. Pass
12375 back return status from the_target->read_memory().
12376 * target.h (struct target_ops): Adapt *read_memory() prototype.
12377 Update comment.
12378 (read_inferior_memory): Adapt prototype.
12379 * server.c (main): Return an error packet if
12380 read_inferior_memory() returns an error.
12381
a59d1c82
DJ
123822004-03-04 Daniel Jacobowitz <drow@mvista.com>
12383
12384 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
12385 Unify with other clean targets.
12386
dc3f8883
DJ
123872004-02-29 Daniel Jacobowitz <drow@mvista.com>
12388
12389 * server.c (handle_v_cont): Call set_desired_inferior.
12390
89a208da
DJ
123912004-02-29 Daniel Jacobowitz <drow@mvista.com>
12392
12393 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
12394
62ea82f5
DJ
123952004-02-29 Daniel Jacobowitz <drow@mvista.com>
12396
12397 * linux-low.c (linux_wait): Unblock async I/O.
12398 (linux_resume): Block and enable async I/O.
12399 * remote-utils.c (block_async_io, unblock_async_io): New functions.
12400 * server.h (block_async_io, unblock_async_io): Add prototypes.
12401
6910d122
DJ
124022004-02-29 Daniel Jacobowitz <drow@mvista.com>
12403
12404 * remote-utils.c (remote_open): Print a status notice after
12405 opening a TCP port.
12406 * server.c (attach_inferior): Print a status notice after
12407 attaching.
12408
124092004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
12410
12411 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
12412
c89dc5d4
DJ
124132004-02-26 Daniel Jacobowitz <drow@mvista.com>
12414
12415 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
12416 error packet.
12417 * server.c, target.h: Update copyright years.
12418
4b8dad4a
RM
124192004-02-25 Roland McGrath <roland@redhat.com>
12420
12421 * target.h (struct target_ops): New member `read_auxv'.
12422 * server.c (handle_query): Handle qPart:auxv:read: query using that.
12423 * linux-low.c (linux_read_auxv): New function.
12424 (linux_target_ops): Initialize `read_auxv' member to that.
12425
d7446758
JB
124262004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
12427
12428 Committed by Jim Blandy <jimb@redhat.com>.
12429
12430 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 12431 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
12432 instead of GPR_SIZE to distiguish s390 and s390x targets.
12433
5544ad89
DJ
124342004-01-31 Daniel Jacobowitz <drow@mvista.com>
12435
12436 * linux-low.c: Update copyright year.
12437 (check_removed_breakpoint): Clear pending_is_breakpoint.
12438 (linux_set_resume_request, linux_queue_one_thread)
12439 (resume_status_pending_p): New functions.
12440 (linux_continue_one_thread): Use process->resume.
12441 (linux_resume): Only resume threads if there are no pending events.
12442 * linux-low.h (struct process_info): Add resume request
12443 pointer.
12444
2a68b70e
DJ
124452004-01-30 Daniel Jacobowitz <drow@mvista.com>
12446
12447 * regcache.c (new_register_cache): Clear the allocated register
12448 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
12449
64386c31
DJ
124502003-10-13 Daniel Jacobowitz <drow@mvista.com>
12451
12452 * linux-low.c (linux_resume): Take a struct thread_resume *
12453 argument.
12454 (linux_wait): Update call.
12455 (resume_ptr): New static variable.
12456 (linux_continue_one_thread): Renamed from
12457 linux_continue_one_process. Use resume_ptr.
12458 (linux_resume): Use linux_continue_one_thread.
12459 * server.c (handle_v_cont, handle_v_requests): New functions.
12460 (myresume): New function.
12461 (main): Handle 'v' case.
12462 * target.h (struct thread_resume): New type.
12463 (struct target_ops): Change argument of "resume" to struct
12464 thread_resume *.
12465 (myresume): Delete macro.
12466
c938e9b0
L
124672003-08-08 H.J. Lu <hongjiu.lu@intel.com>
12468
12469 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
12470 (uninstall): Support DESTDIR.
12471
7f313d07
BC
12472Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
12473
12474 * configure.srv: Add xscale*linux copy of arm*linux entry.
12475
3b2fc2ea
DJ
124762003-07-24 Daniel Jacobowitz <drow@mvista.com>
12477
12478 * linux-arm-low.c (arm_reinsert_addr): New function.
12479 (the_low_target): Add arm_reinsert_addr.
12480
1c0a559e
MK
124812003-07-08 Mark Kettenis <kettenis@gnu.org>
12482
12483 * mem-break.c: Remove whitespace at end of file.
12484
43d5792c
DJ
124852003-06-28 Daniel Jacobowitz <drow@mvista.com>
12486
12487 * configure.in: Check whether we need to prototype strerror.
12488 * server.h: Optionally prototype strerror.
12489 * gdbreplay.c (perror_with_name): Use strerror.
12490 * linux-low.c (linux_attach_lwp): Use strerror.
12491 * utils.c (perror_with_name): Use strerror.
12492 * config.in, configure: Regenerated.
12493
c8a86edf
DJ
124942003-06-28 Daniel Jacobowitz <drow@mvista.com>
12495
12496 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
12497 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
12498
73d37363
DJ
124992003-06-20 Daniel Jacobowitz <drow@mvista.com>
12500
12501 * Makefile.in (SFILES): Update.
12502 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
12503 low-sun3.c: Remove files.
12504
6ad8ae5c
DJ
125052003-06-17 Daniel Jacobowitz <drow@mvista.com>
12506
12507 * linux-low.c: Move comment to linux_thread_alive where it belonged.
12508 (linux_detach_one_process, linux_detach): New functions.
12509 (linux_target_ops): Add linux_detach.
12510 * server.c (main): Handle 'D' packet.
12511 * target.h (struct target_ops): Add "detach" member.
12512 (detach_inferior): Define.
12513
1581182a
MK
125142003-06-13 Mark Kettenis <kettenis@gnu.org>
12515
12516 From Kelley Cook <kelleycook@wideopenwest.com>:
12517 * configure.srv: Accept i[34567]86 variants.
12518
e5379b03
DJ
125192003-06-05 Daniel Jacobowitz <drow@mvista.com>
12520
12521 * linux-low.c (linux_wait_for_event): Correct comment typos.
12522 (linux_resume_one_process): Call check_removed_breakpoint.
12523 (linux_send_signal): New function.
12524 (linux_target_ops): Add linux_send_signal.
12525 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
12526 of kill.
12527 * target.h (struct target_ops): Add send_signal.
12528
2ff29de4
JB
125292003-05-29 Jim Blandy <jimb@redhat.com>
12530
12531 * linux-low.c (usr_store_inferior_registers): Transfer buf in
12532 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
12533 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
12534 away part of the register's value.
12535
254787d4
DJ
125362003-03-26 Daniel Jacobowitz <drow@mvista.com>
12537
12538 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
12539 (linux_wait_for_event, linux_init_signals): Likewise.
12540
94e10508
DJ
125412003-03-17 Daniel Jacobowitz <drow@mvista.com>
12542
12543 * configure.in: Check for stdlib.h.
12544 * configure: Regenerated.
12545 * config.in: Regenerated.
12546
4c0711e0
DJ
125472003-01-04 Andreas Schwab <schwab@suse.de>
12548
12549 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
12550
ef66e766
AC
125512003-01-02 Andrew Cagney <ac131313@redhat.com>
12552
12553 * Makefile.in: Remove obsolete code.
12554
a1358604
DJ
125552002-11-20 Daniel Jacobowitz <drow@mvista.com>
12556
12557 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
12558 defined(PT_FPR0_HI).
12559
23ce3b1c
DJ
125602002-11-17 Stuart Hughes <seh@zee2.com>
12561
12562 * linux-arm-low.c (arm_num_regs): Increase.
12563 (arm_regmap): Include status register.
12564
125652002-11-17 Daniel Jacobowitz <drow@mvista.com>
12566
12567 * linux-low.c (register_addr): Remove incorrect -1 check.
12568
a9fa9f7d
DJ
125692002-08-29 Daniel Jacobowitz <drow@mvista.com>
12570
12571 * linux-low.c (linux_create_inferior): Call setpgid. Return
12572 the new PID.
12573 (unstopped_p, linux_signal_pid): Remove.
12574 (linux_target_ops): Remove linux_signal_pid.
12575 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
12576 global instead of target method.
12577 * target.h (struct target_ops): Remove signal_pid. Update comment
12578 for create_inferior.
12579 * server.c (signal_pid): New variable.
12580 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 12581 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
12582 (attach_inferior): Set signal_pid.
12583
17574093
DJ
125842002-08-23 Daniel Jacobowitz <drow@mvista.com>
12585
12586 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
12587
125882002-08-20 Jim Blandy <jimb@redhat.com>
12589
12590 * Makefile.in (LDFLAGS): Allow the configure script to establish a
12591 default for this.
12592
125932002-08-01 Andrew Cagney <cagney@redhat.com>
12594
12595 * Makefile.in: Make chill references obsolete.
12596
125972002-07-24 Kevin Buettner <kevinb@redhat.com>
12598
12599 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
12600 * configure: Regenerate.
12601 * config.in: Regenerate.
12602
126032002-07-09 David O'Brien <obrien@FreeBSD.org>
12604
12605 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
12606 (perror_with_name, remote_close, remote_open, expect, play): Static.
12607
126082002-07-04 Michal Ludvig <mludvig@suse.cz>
12609
4b8dad4a 12610 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
12611 byte offsets instead of an array of indexes.
12612 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
12613
126142002-06-13 Daniel Jacobowitz <drow@mvista.com>
12615
12616 * regcache.c: Add comment.
12617
126182002-06-11 Daniel Jacobowitz <drow@mvista.com>
12619
12620 * thread-db.c: New file.
12621 * proc-service.c: New file.
12622 * acinclude.m4: New file.
12623 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
12624 proc-service.o, and thread-db.o.
12625 (linux-low.o): Add USE_THREAD_DB.
12626 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
12627 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
12628 * aclocal.m4: Regenerated.
12629 * config.in: Regenerated.
12630 * configure: Regenerated.
12631 * configure.in: Check for proc_service.h, sys/procfs.h,
12632 thread_db.h, and linux/elf.h headrs.
12633 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
12634 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
12635 Check for -lthread_db and thread support.
12636 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
12637 PowerPC, and SuperH.
12638 * i387-fp.c: Constify arguments.
12639 * i387-fp.h: Likewise.
12640 * inferiors.c: (struct thread_info): Renamed from
12641 `struct inferior_info'. Remove PID member. Use generic inferior
12642 list header. All uses updated.
12643 (inferiors, signal_pid): Removed.
12644 (all_threads): New variable.
12645 (get_thread): Define.
12646 (add_inferior_to_list): New function.
12647 (for_each_inferior): New function.
12648 (change_inferior_id): New function.
12649 (add_inferior): Removed.
12650 (remove_inferior): New function.
12651 (add_thread): New function.
12652 (free_one_thread): New function.
12653 (remove_thread): New function.
12654 (clear_inferiors): Use for_each_inferior and free_one_thread.
12655 (find_inferior): New function.
12656 (find_inferior_id): New function.
12657 (inferior_target_data): Update argument type.
12658 (set_inferior_target_data): Likewise.
12659 (inferior_regcache_data): Likewise.
12660 (set_inferior_regcache_data): Likewise.
12661 * linux-low.c (linux_bp_reinsert): Remove.
12662 (all_processes, stopping_threads, using_thrads)
12663 (struct pending_signals, debug_threads, pid_of): New.
12664 (inferior_pid): Replace with macro.
12665 (struct inferior_linux_data): Remove.
12666 (get_stop_pc, add_process): New functions.
12667 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
12668 Use add_process and add_thread.
12669 (linux_attach_lwp): New function, based on old linux_attach. Use
12670 add_process and add_thread. Set stop_expected for new threads.
12671 (linux_attach): New function.
12672 (linux_kill_one_process): New function.
12673 (linux_kill): Kill all LWPs.
12674 (linux_thread_alive): Use find_inferior_id.
12675 (check_removed_breakpoints, status_pending_p): New functions.
12676 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
12677 Update. Use WNOHANG. Wait for cloned processes also. Update process
12678 struct for the found process.
12679 (linux_wait_for_event): New function.
12680 (linux_wait): Use it. Support LWPs.
12681 (send_sigstop, wait_for_sigstop, stop_all_processes)
12682 (linux_resume_one_process, linux_continue_one_process): New functions.
12683 (linux_resume): Support LWPs.
12684 (REGISTER_RAW_SIZE): Remove.
12685 (fetch_register): Use register_size instead. Call supply_register.
12686 (usr_store_inferior_registers): Likewise. Call collect_register.
12687 Fix recursive case.
12688 (regsets_fetch_inferior_registers): Improve error message.
12689 (regsets_store_inferior_registers): Add debugging.
12690 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
12691 (unstopped_p, linux_signal_pid): New functions.
12692 (linux_target_ops): Add linux_signal_pid.
12693 (linux_init_signals): New function.
12694 (initialize_low): Call it. Initialize using_threads.
12695 * regcache.c (inferior_regcache_data): Add valid
12696 flag.
12697 (get_regcache): Fetch registers lazily. Add fetch argument
12698 and update all callers.
12699 (regcache_invalidate_one, regcache_invalidate): New
12700 functions.
12701 (new_register_cache): Renamed from create_register_cache.
12702 Return the new regcache.
12703 (free_register_cache): Change argument to a void *.
12704 (registers_to_string, registers_from_string): Call get_regcache
12705 with fetch flag set.
12706 (register_data): Make static. Pass fetch flag to get_regcache.
12707 (supply_register): Call get_regcache with fetch flag clear.
12708 (collect_register): Call get_regcache with fetch flag set.
12709 (collect_register_as_string): New function.
12710 * regcache.h: Update.
12711 * remote-utils.c (putpkt): Flush after debug output and use
12712 stderr.
12713 Handle input interrupts while waiting for an ACK.
12714 (input_interrupt): Use signal_pid method.
12715 (getpkt): Flush after debug output and use stderr.
12716 (outreg): Use collect_register_as_string.
12717 (new_thread_notify, dead_thread_notify): New functions.
12718 (prepare_resume_reply): Check using_threads. Set thread_from_wait
12719 and general_thread.
12720 (look_up_one_symbol): Flush after debug output.
12721 * server.c (step_thread, server_waiting): New variables.
12722 (start_inferior): Don't use signal_pid. Update call to mywait.
12723 (attach_inferior): Update call to mywait.
12724 (handle_query): Handle qfThreadInfo and qsThreadInfo.
12725 (main): Don't fetch/store registers explicitly. Use
12726 set_desired_inferior. Support proposed ``Hs'' packet. Update
12727 calls to mywait.
12728 * server.h: Update.
12729 (struct inferior_list, struct_inferior_list_entry): New.
12730 * target.c (set_desired_inferior): New.
12731 (write_inferior_memory): Constify.
12732 (mywait): New function.
12733 * target.h: Update.
12734 (struct target_ops): New signal_pid method.
12735 (mywait): Removed macro, added prototype.
12736
12737 * linux-low.h (regset_func): Removed.
12738 (regset_fill_func, regset_store_func): New.
12739 (enum regset_type): New.
12740 (struct regset_info): Add type field. Use new operation types.
12741 (struct linux_target_ops): stop_pc renamed to get_pc.
12742 Add decr_pc_after_break and breakpoint_at.
12743 (get_process, get_thread_proess, get_process_thread)
12744 (strut process_info, all_processes, linux_attach_lwp)
12745 (thread_db_init): New.
12746
12747 * linux-arm-low.c (arm_get_pc, arm_set_pc,
12748 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
12749 (the_low_target): Add new members.
12750 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
12751 (i386_store_fpxregset): Constify.
12752 (target_regsets): Add new kind identifier.
12753 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
12754 (i386_set_pc): Add debugging.
12755 (i386_breakpoint_at): New function.
12756 (the_low_target): Add new members.
12757 * linux-mips-low.c (mips_get_pc, mips_set_pc)
12758 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
12759 (mips_breakpoint_at): New.
12760 (the_low_target): Add new members.
12761 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
12762 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
12763 (the_low_target): Add new members.
12764 * linux-sh-low.c (sh_get_pc, sh_set_pc)
12765 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
12766 (the_low_target): Add new members.
12767 * linux-x86-64-low.c (target_regsets): Add new kind
12768 identifier.
12769
127702002-05-15 Daniel Jacobowitz <drow@mvista.com>
12771
12772 From Martin Pool <mbp@samba.org>:
12773 * server.c (gdbserver_usage): New function.
12774 (main): Call it.
12775
127762002-05-14 Daniel Jacobowitz <drow@mvista.com>
12777
12778 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
12779 stop_at -> stop_pc.
12780
127812002-05-04 Andrew Cagney <ac131313@redhat.com>
12782
12783 * Makefile.in: Remove obsolete code.
12784
127852002-04-24 Michal Ludvig <mludvig@suse.cz>
12786
12787 * linux-low.c (regsets_fetch_inferior_registers),
12788 (regsets_store_inferior_registers): Removed cast to int from
12789 ptrace() calls.
12790 * regcache.h: Added declaration of struct inferior_info.
12791
127922002-04-20 Daniel Jacobowitz <drow@mvista.com>
12793
12794 * inferiors.c (struct inferior_info): Add regcache_data.
12795 (add_inferior): Call create_register_cache.
12796 (clear_inferiors): Call free_register_cache.
12797 (inferior_regcache_data, set_inferior_regcache_data): New functions.
12798 * regcache.c (struct inferior_regcache_data): New.
12799 (registers): Remove.
12800 (get_regcache): New function.
12801 (create_register_cache, free_register_cache): New functions.
12802 (set_register_cache): Don't initialize the register cache here.
12803 (registers_to_string, registers_from_string, register_data): Call
12804 get_regcache.
12805 * regcache.h: Add prototypes.
12806 * server.h: Likewise.
12807
128082002-04-20 Daniel Jacobowitz <drow@mvista.com>
12809
12810 * mem-break.c: New file.
12811 * mem-break.h: New file.
12812 * Makefile.in: Add mem-break.o rule; update server.h
12813 dependencies.
12814 * inferiors.c (struct inferior_info): Add target_data
12815 member.
12816 (clear_inferiors): Free target_data member if set.
12817 (inferior_target_data, set_inferior_target_data): New functions.
12818 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
12819 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
12820 * linux-low.c (linux_bp_reinsert): New variable.
12821 (struct inferior_linux_data): New.
12822 (linux_create_inferior): Use set_inferior_target_data.
12823 (linux_attach): Likewise. Call add_inferior.
12824 (linux_wait_for_one_inferior): New function.
12825 (linux_wait): Call it.
12826 (linux_write_memory): Add const.
12827 (initialize_low): Call set_breakpoint_data.
12828 * linux-low.h (struct linux_target_ops): Add breakpoint
12829 handling members.
12830 * server.c (attach_inferior): Remove extra add_inferior
12831 call.
12832 * server.h: Include mem-break.h. Update inferior.c
12833 prototypes.
12834 * target.c (read_inferior_memory)
12835 (write_inferior_memory): New functions.
12836 * target.h (read_inferior_memory)
12837 (write_inferior_memory): Change macros to prototypes.
12838 (struct target_ops): Update comments. Add const to write_memory
12839 definition.
12840
128412002-04-11 Daniel Jacobowitz <drow@mvista.com>
12842
12843 * linux-low.c (usr_store_inferior_registers): Support
12844 registers which are allowed to fail to store.
12845 * linux-low.h (linux_target_ops): Likewise.
12846 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
12847 (ppc_cannot_store_register): FPSCR may not be storable.
12848
128492002-04-09 Daniel Jacobowitz <drow@mvista.com>
12850
12851 * server.h: Include <string.h> if HAVE_STRING_H.
12852 * ChangeLog: Correct paths in last ChangeLog entry.
12853
128542002-04-09 Daniel Jacobowitz <drow@mvista.com>
12855
12856 * linux-low.h: Remove obsolete prototypes.
12857 (struct linux_target_ops): New.
12858 (extern the_low_target): New.
12859 * linux-low.c (num_regs, regmap): Remove declarations.
12860 (register_addr): Use the_low_target explicitly.
12861 (fetch_register): Likewise.
12862 (usr_fetch_inferior_registers): Likewise.
12863 (usr_store_inferior_registers): Likewise.
12864 * linux-arm-low.c (num_regs): Remove.
12865 (arm_num_regs): Define.
12866 (arm_regmap): Renamed from regmap, made static.
12867 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
12868 made static.
12869 (arm_cannot_store_register): Renamed from cannot_store_register,
12870 made static.
12871 (the_low_target): New.
12872 * linux-i386-low.c (num_regs): Remove.
12873 (i386_num_regs): Define.
12874 (i386_regmap): Renamed from regmap, made static.
12875 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
12876 made static.
12877 (i386_cannot_store_register): Renamed from cannot_store_register,
12878 made static.
12879 (the_low_target): New.
12880 * linux-ia64-low.c (num_regs): Remove.
12881 (ia64_num_regs): Define.
12882 (ia64_regmap): Renamed from regmap, made static.
12883 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
12884 made static.
12885 (ia64_cannot_store_register): Renamed from cannot_store_register,
12886 made static.
12887 (the_low_target): New.
12888 * linux-m68k-low.c (num_regs): Remove.
12889 (m68k_num_regs): Define.
12890 (m68k_regmap): Renamed from regmap, made static.
12891 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
12892 made static.
12893 (m68k_cannot_store_register): Renamed from cannot_store_register,
12894 made static.
12895 (the_low_target): New.
12896 * linux-mips-low.c (num_regs): Remove.
12897 (mips_num_regs): Define.
12898 (mips_regmap): Renamed from regmap, made static.
12899 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
12900 made static.
12901 (mips_cannot_store_register): Renamed from cannot_store_register,
12902 made static.
12903 (the_low_target): New.
12904 * linux-ppc-low.c (num_regs): Remove.
12905 (ppc_num_regs): Define.
12906 (ppc_regmap): Renamed from regmap, made static.
12907 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
12908 made static.
12909 (ppc_cannot_store_register): Renamed from cannot_store_register,
12910 made static.
12911 (the_low_target): New.
12912 * linux-s390-low.c (num_regs): Remove.
12913 (s390_num_regs): Define.
12914 (s390_regmap): Renamed from regmap, made static.
12915 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
12916 made static.
12917 (s390_cannot_store_register): Renamed from cannot_store_register,
12918 made static.
12919 (the_low_target): New.
12920 * linux-sh-low.c (num_regs): Remove.
12921 (sh_num_regs): Define.
12922 (sh_regmap): Renamed from regmap, made static.
12923 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
12924 made static.
12925 (sh_cannot_store_register): Renamed from cannot_store_register,
12926 made static.
12927 (the_low_target): New.
12928 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
12929 (the_low_target): New.
12930
129312002-04-09 Daniel Jacobowitz <drow@mvista.com>
12932
12933 * Makefile.in: Add stamp-h target.
12934 * configure.in: Create stamp-h.
12935 * configure: Regenerated.
12936
129372002-04-09 Daniel Jacobowitz <drow@mvista.com>
12938
12939 * inferiors.c: New file.
12940 * target.c: New file.
12941 * target.h: New file.
12942 * Makefile.in: Add target.o and inferiors.o. Update
12943 dependencies.
12944 * linux-low.c (inferior_pid): New static variable,
12945 moved from server.c.
12946 (linux_create_inferior): Renamed from create_inferior.
12947 Call add_inferior. Return 0 on success instead of a PID.
12948 (linux_attach): Renamed from myattach.
12949 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
12950 (linux_thread_alive): Renamed from mythread_alive.
12951 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
12952 child dies.
12953 (linux_resume): Renamed from myresume. Add missing ``return 0''.
12954 (regsets_store_inferior_registers): Correct error message.
12955 Add missing ``return 0''.
12956 (linux_fetch_registers): Renamed from fetch_inferior_registers.
12957 (linux_store_registers): Renamed from store_inferior_registers.
12958 (linux_read_memory): Renamed from read_inferior_memory.
12959 (linux_write_memory): Renamed from write_inferior_memory.
12960 (linux_target_ops): New structure.
12961 (initialize_low): Call set_target_ops ().
12962 * remote-utils.c (unhexify): New function.
12963 (hexify): New function.
12964 (input_interrupt): Send signals to ``signal_pid''.
12965 * server.c (inferior_pid): Remove.
12966 (start_inferior): Update create_inferior call.
12967 (attach_inferior): Call add_inferior.
12968 (handle_query): New function.
12969 (main): Call handle_query for `q' packets.
12970 * server.h: Include "target.h". Remove obsolete prototypes.
12971 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
12972
129732002-04-09 Daniel Jacobowitz <drow@mvista.com>
12974
12975 * Makefile.in: Add WARN_CFLAGS. Update configury
12976 dependencies.
12977 * configure.in: Check for <string.h>
12978 * configure: Regenerate.
12979 * config.in: Regenerate.
12980 * gdbreplay.c: Include needed system headers.
12981 (remote_open): Remove strchr prototype.
12982 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
12983 * regcache.c (supply_register): Change buf argument to const void *.
12984 (supply_register_by_name): Likewise.
12985 (collect_register): Change buf argument to void *.
12986 (collect_register_by_name): Likewise.
12987 * regcache.h: Add missing prototypes.
12988 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
12989 * server.c (handle_query): New function.
12990 (attached): New static variable, moved out of main.
12991 (main): Quiet longjmp clobber warnings.
12992 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
12993 * utils.c (error): Remove NORETURN.
12994 (fatal): Likewise.