Remote thread create/exit events
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
65706a29
PA
12015-11-30 Pedro Alves <palves@redhat.com>
2
3 * linux-low.c (handle_extended_wait): Assert that the LWP's
4 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
5 thread create events, leave the new child's status pending.
6 (linux_low_filter_event): If GDB wants to hear about thread exit
7 events, leave the LWP marked dead and don't delete it.
8 (linux_wait_for_event_filtered): Don't check for thread exit.
9 (filter_exit_event): New function.
10 (linux_wait_1): Use it, when returning an exit event.
11 (linux_resume_one_lwp_throw): Assert that the LWP's
12 waitstatus is TARGET_WAITKIND_IGNORE.
13 * remote-utils.c (prepare_resume_reply): Handle
14 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
15 * server.c (report_thread_events): New global.
16 (handle_general_set): Handle QThreadEvents.
17 (handle_query) <qSupported>: Handle and report QThreadEvents+;
18 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
19 TARGET_WAITKIND_THREAD_EXITED.
20 * server.h (report_thread_events): Declare.
21
56cf4bed
PA
222015-11-30 Pedro Alves <palves@redhat.com>
23
24 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
25 the thread's last_resume_kind was resume_stop.
26
500c1d85
PA
272015-11-30 Pedro Alves <palves@redhat.com>
28
29 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
30 before returning.
31
de979965
PA
322015-11-30 Pedro Alves <palves@redhat.com>
33
34 * server.c (handle_v_requests): Handle vCtrlC.
35
34c65914
PA
362015-11-30 Pedro Alves <palves@redhat.com>
37
38 * gdbthread.h (find_any_thread_of_pid): Declare.
39 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
40 functions.
41 * server.c (handle_query): If current_thread is NULL, look for
42 another thread of the selected process.
43
79efa585 442015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 45 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
46
47 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
48 * server.c (handle_qxfer_threads_worker): Refactor to include thread
49 name in reply.
50 * target.h (struct target_ops) <thread_name>: New field.
51 (target_thread_name): New macro.
52
80d82c19
JB
532015-11-23 Joel Brobecker <brobecker@adacore.com>
54
55 * regcache.h (regcache_invalidate_pid): Add declaration.
56 * regcache.c (regcache_invalidate_pid): New function, extracted
57 from regcache_invalidate.
58 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
59 Add trivial documentation comment.
60 * lynx-low.c: Use regcache_invalidate_pid instead of
61 regcache_invalidate.
62
64da5dd5
JB
632015-11-23 Joel Brobecker <brobecker@adacore.com>
64
65 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
66 and Elf64_auxv_t if the target is Android.
67
37ce4055
DE
682015-11-22 Doug Evans <xdje42@gmail.com>
69
70 * target.h: #include <sys/types.h>.
71
06e03fff
PA
722015-11-19 Pedro Alves <palves@redhat.com>
73
74 * linux-low.c (linux_process_qsupported): Change prototype.
75 Adjust.
76 * linux-low.h (struct linux_target_ops) <process_qsupported>:
77 Change prototype.
78 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
79 and adjust to loop over all features.
80 * server.c (handle_query) <qSupported>: Adjust to call
81 target_process_qsupported once, passing it a vector of unprocessed
82 features.
83 * target.h (struct target_ops) <process_qsupported>: Change
84 prototype.
85 (target_process_qsupported): Adjust.
86
9a084706
PA
872015-11-19 Pedro Alves <palves@redhat.com>
88
89 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
90 mode.
91 * configure: Regenerate.
92
dad44a1f
PA
932015-11-19 Pedro Alves <palves@redhat.com>
94
95 * configure: Regenerate.
96
231c0592
YQ
972015-11-19 Yao Qi <yao.qi@linaro.org>
98
99 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
100 type to uint32_t.
101
6c1c9a8b
YQ
1022015-11-19 Yao Qi <yao.qi@linaro.org>
103
104 * linux-aarch64-low.c (enum aarch64_operand_type): New.
105 (struct aarch64_operand): Move enum out.
106
9caa3311
YQ
1072015-11-19 Yao Qi <yao.qi@linaro.org>
108
109 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
110 struct user_fpsimd_state *.
111 (aarch64_store_fpregset): Likewise.
112
6a69a054
YQ
1132015-11-19 Yao Qi <yao.qi@linaro.org>
114
115 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
116 struct user_pt_regs *.
117 (aarch64_store_gregset): Likewise.
118
1798301e
PA
1192015-11-18 Pedro Alves <palves@redhat.com>
120
121 * Makefile.in (all_object_files): Add $IPA_OBJS.
122
ce7715e2
PA
1232015-11-17 Pedro Alves <palves@redhat.com>
124
125 * win32-low.c (win32_resume): Use gdb_signal_from_host,
126 GDB_SIGNAL_0 and gdb_signal_to_string.
127
c0879059
PA
1282015-11-17 Pedro Alves <palves@redhat.com>
129
130 * win32-low.c (handle_output_debug_string): Remove parameter.
131 (win32_kill): Remove our_status local and adjust call to
132 handle_output_debug_string.
133 (get_child_debug_event): Adjust call to
134 handle_output_debug_string.
135
1996e237
SM
1362015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
137
138 * linux-mips-low.c (mips_fill_gregset): Add cast.
139 (mips_store_gregset): Likewise.
140 (mips_fill_fpregset): Likewise.
141 (mips_store_fpregset): Likewise.
142
cbec665b
SM
1432015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
144
145 * linux-mips-low.c (mips_add_watchpoint): Rename private to
146 priv.
147
eb3e3c67
SM
1482015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
149
150 * linux-mips-low.c (mips_linux_new_thread): Change type of
151 watch_type to enum target_hw_bp_type.
152
171de4b8
SM
1532015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
154
155 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
156 Change return type to arm_hwbp_type.
157
04248ead
SM
1582015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
159
160 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
161 (arm_store_gregset): Likewise.
162 * linux-arm-low.c (arm_get_hwcap): Likewise.
163 (arm_read_description): Likewise.
164
04b3479c
SM
1652015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
166
167 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
168
2bc84e8a
SM
1692015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
170
171 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
172 (ppc_fill_vsxregset): Likewise.
173 (ppc_store_vsxregset): Likewise.
174 (ppc_fill_vrregset): Likewise.
175 (ppc_store_vrregset): Likewise.
176 (ppc_fill_evrregset): Likewise.
177 (ppc_store_evrregset): Likewise.
178
e6c5bb05
SM
1792015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
180
181 * linux-ppc-low.c (ppc_usrregs_info): Remove
182 forward-declaration.
183 (ppc_arch_setup): Move lower in file.
184
7ea45d72
SM
1852015-10-30 Simon Marchi <simon.marchi@ericsson.com>
186
187 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
188 (ps_pdwrite): Likewise.
189
69291610
HW
1902015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
191
192 * linux-arm-low.c (arm_new_thread): Move pointer dereference
193 to after assert checks.
194
b42945fd
SM
1952015-10-29 Simon Marchi <simon.marchi@ericsson.com>
196
197 * proc-service.c (ps_pdread): Add/adjust casts.
198 (ps_pdwrite): Add/adjust casts.
199
d6f85c84
SM
2002015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
201
202 * server.c (handle_search_memory_1): Cast return value of
203 memmem.
204
f98cd059
SM
2052015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
206
207 * server.c (write_qxfer_response): Change type of data to
208 gdb_byte *.
209
d2412fa5
PA
2102015-10-29 Pedro Alves <palves@redhat.com>
211
212 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
213
c17414a2
PA
2142015-10-29 Pedro Alves <palves@redhat.com>
215
216 * tracepoint.c (clear_installed_tracepoints): Add casts.
217
e053fbc4
PA
2182015-10-29 Pedro Alves <palves@redhat.com>
219
220 * server.c (handle_v_cont, process_serial_event): Add enum
221 gdb_signal casts to signal parsing code.
222
add67df8
PA
2232015-10-29 Pedro Alves <palves@redhat.com>
224
225 * linux-low.h (NULL_REGSET): Define.
226 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
227 * linux-arm-low.c (arm_regsets): Likewise.
228 * linux-crisv32-low.c (cris_regsets): Likewise.
229 * linux-m68k-low.c (m68k_regsets): Likewise.
230 * linux-mips-low.c (mips_regsets): Likewise.
231 * linux-nios2-low.c (nios2_regsets): Likewise.
232 * linux-ppc-low.c (ppc_regsets): Likewise.
233 * linux-s390-low.c (s390_regsets): Likewise.
234 * linux-sh-low.c (sh_regsets): Likewise.
235 * linux-sparc-low.c (sparc_regsets): Likewise.
236 * linux-tic6x-low.c (tic6x_regsets): Likewise.
237 * linux-tile-low.c (tile_regsets): Likewise.
238 * linux-x86-low.c (x86_regsets): Likewise.
239 * linux-xtensa-low.c (xtensa_regsets): Likewise.
240
50bc912a
PA
2412015-10-29 Pedro Alves <palves@redhat.com>
242
243 * linux-low.h (NULL_REGSET): Define.
244 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
245 * linux-arm-low.c (arm_regsets): Likewise.
246 * linux-crisv32-low.c (cris_regsets): Likewise.
247 * linux-m68k-low.c (m68k_regsets): Likewise.
248 * linux-mips-low.c (mips_regsets): Likewise.
249 * linux-nios2-low.c (nios2_regsets): Likewise.
250 * linux-ppc-low.c (ppc_regsets): Likewise.
251 * linux-s390-low.c (s390_regsets): Likewise.
252 * linux-sh-low.c (sh_regsets): Likewise.
253 * linux-sparc-low.c (sparc_regsets): Likewise.
254 * linux-tic6x-low.c (tic6x_regsets): Likewise.
255 * linux-tile-low.c (tile_regsets): Likewise.
256 * linux-x86-low.c (x86_regsets): Likewise.
257 * linux-xtensa-low.c (xtensa_regsets): Likewise.
258
682b2546
DE
2592015-10-26 Doug Evans <dje@google.com>
260
261 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
262
963843d4
DE
2632015-10-26 Doug Evans <dje@google.com>
264
265 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
266
d41401ac
DE
2672015-10-26 Doug Evans <dje@google.com>
268
269 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
270 for debug_printf.
271 (attach_thread, find_new_threads_callback): Ditto.
272
3db28855
AT
2732015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
274
275 * mem-break.h (set_breakpoint_data): Remove.
276
fb78e89c
AT
2772015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
278
279 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
280 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
281 (initialize_low): Remove set_breakpoint_data call.
282 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
283 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
284 (initialize_low): Remove set_breakpoint_data call.
285 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
286 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
287 (initialize_low): Remove set_breakpoint_data call.
288
2e6ee069
AT
2892015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
290
291 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
292 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
293 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
294 * target.h (target_breakpoint_kind_from_pc): New macro.
295
1652a986
AT
2962015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
297
298 * linux-low.c (default_breakpoint_kind_from_pc): New function.
299 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
300 the default breakpoint kind.
301
abeead09
AT
3022015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
303
304 * linux-arm-low.c (arm_supports_z_point_type): Add software
305 breakpoint support.
306
b0b4b501
AT
3072015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
308
309 * linux-arm-low.c: Refactor breakpoint definitions.
310 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
311 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
312
8689682c
AT
3132015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
314
315 * Makefile.in: Add arm.c/o.
316 * configure.srv: Likewise.
317 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
318 (arm_breakpoint_kind_from_pc): New function.
319 (arm_sw_breakpoint_from_kind): Return proper kind.
320 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
321
27165294
AT
3222015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
323
324 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
325 removal.
326 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
327 (struct raw_breakpoint) <size>: Remove.
328 (struct raw_breakpoint) <kind>: Add.
329 (bp_size): New function.
330 (bp_opcode): Likewise.
331 (find_raw_breakpoint_at): Adjust for kind.
332 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
333 (remove_memory_breakpoint): Adjust for kind call bp_size.
334 (set_raw_breakpoint_at): Adjust for kind.
335 (set_breakpoint): Likewise.
336 (set_breakpoint_at): Call breakpoint_kind_from_pc.
337 (delete_raw_breakpoint): Adjust for kind.
338 (delete_breakpoint): Likewise.
339 (find_gdb_breakpoint): Likewise.
340 (set_gdb_breakpoint_1): Likewise.
341 (set_gdb_breakpoint): Likewise.
342 (delete_gdb_breakpoint_1): Likewise.
343 (delete_gdb_breakpoint): Likewise.
344 (uninsert_raw_breakpoint): Likewise.
345 (reinsert_raw_breakpoint): Likewise.
346 (set_breakpoint_data): Remove.
347 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
348 (check_mem_read): Adjust for kind call bp_size.
349 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
350 (clone_one_breakpoint): Adjust for kind.
351 * mem-break.h (set_gdb_breakpoint): Likewise.
352 (delete_gdb_breakpoint): Likewise.
353 * server.c (process_serial_event): Likewise.
354
dd373349
AT
3552015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
356
357 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
358 (struct linux_target_ops) <breakpoint>: Remove.
359 (struct linux_target_ops) <breakpoint_len>: Remove.
360 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
361 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
362 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
363 (arm_sw_breakpoint_from_kind): New function.
364 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
365 (struct linux_target_ops) <breakpoint>: Remove.
366 (struct linux_target_ops) <breakpoint_len>: Remove.
367 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
368 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
369 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
370 (struct linux_target_ops) <breakpoint>: Remove.
371 (struct linux_target_ops) <breakpoint_len>: Remove.
372 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
373 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
374 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
375 (struct linux_target_ops) <breakpoint>: Remove.
376 (struct linux_target_ops) <breakpoint_len>: Remove.
377 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
378 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
379 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
380 and sw_breakpoint_from_kind to increment the pc.
381 (linux_breakpoint_kind_from_pc): New function.
382 (linux_sw_breakpoint_from_kind): New function.
383 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
384 (initialize_low): Call breakpoint_kind_from_pc and
385 sw_breakpoint_from_kind to replace breakpoint_data/len.
386 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
387 New field.
388 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
389 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
390 (struct linux_target_ops) <breakpoint>: Remove.
391 (struct linux_target_ops) <breakpoint_len>: Remove.
392 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
393 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
394 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
395 (struct linux_target_ops) <breakpoint>: Remove.
396 (struct linux_target_ops) <breakpoint_len>: Remove.
397 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
398 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
399 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
400 (struct linux_target_ops) <breakpoint>: Remove.
401 (struct linux_target_ops) <breakpoint_len>: Remove.
402 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
403 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
404 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
405 (struct linux_target_ops) <breakpoint>: Remove.
406 (struct linux_target_ops) <breakpoint_len>: Remove.
407 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
408 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
409 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
410 (struct linux_target_ops) <breakpoint>: Remove.
411 (struct linux_target_ops) <breakpoint_len>: Remove.
412 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
413 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
414 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
415 (struct linux_target_ops) <breakpoint>: Remove.
416 (struct linux_target_ops) <breakpoint_len>: Remove.
417 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
418 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
419 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
420 (struct linux_target_ops) <breakpoint>: Remove.
421 (struct linux_target_ops) <breakpoint_len>: Remove.
422 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
423 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
424 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
425 (struct linux_target_ops) <breakpoint>: Remove.
426 (struct linux_target_ops) <breakpoint_len>: Remove.
427 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
428 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
429 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
430 (struct linux_target_ops) <breakpoint>: Remove.
431 (struct linux_target_ops) <breakpoint_len>: Remove.
432 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
433 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
434 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
435 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
436 (struct linux_target_ops) <breakpoint>: Remove.
437 (struct linux_target_ops) <breakpoint_len>: Remove.
438 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
439 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
440 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
441 (struct linux_target_ops) <breakpoint>: Remove.
442 (struct linux_target_ops) <breakpoint_len>: Remove.
443 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
444 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
445
4cd98a19
AT
4462015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
447
448 * linux-cris-low.c (cris_get_pc): Remove void arg.
449
774ee6d2
AR
4502015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
451
452 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
453 variable name.
454
833dcd29
AR
4552015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
456
457 * inferiors.c (thread_pid_matches_callback): New function.
458 (find_thread_process): New function.
459 (remove_thread): Reset current_thread.
460 (remove_process): Assert threads have been removed first.
461
8d689ee5
YQ
4622015-10-15 Yao Qi <yao.qi@linaro.org>
463
464 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
465 if it is 3.
466 (aarch64_remove_point): Likewise.
467 * regcache.c (regcache_register_size): New function.
468
1c2e1515
YQ
4692015-10-12 Yao Qi <yao.qi@linaro.org>
470
471 * linux-aarch64-low.c: Update all callers as emit_load_store
472 is renamed to aarch64_emit_load_store.
473
e1c587c3
YQ
4742015-10-12 Yao Qi <yao.qi@linaro.org>
475
476 * linux-aarch64-low.c: Update all callers of function renaming
477 from emit_insn to aarch64_emit_insn.
478
b6542f81
YQ
4792015-10-12 Yao Qi <yao.qi@linaro.org>
480
481 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
482 arch/aarch64-insn.h.
483 (struct aarch64_memory_operand): Likewise.
484 (ENCODE): Likewise.
485 (emit_insn): Move to arch/aarch64-insn.c.
486 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
487 (emit_load_store): Move to arch/aarch64-insn.c.
488 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
489 (can_encode_int32): Remove.
490
246994ce
YQ
4912015-10-12 Yao Qi <yao.qi@linaro.org>
492
493 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
494 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
495 (aarch64_relocate_instruction): Likewise.
496 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
497 (struct aarch64_insn_visitor): Likewise.
498
0badd99f
YQ
4992015-10-12 Yao Qi <yao.qi@linaro.org>
500
501 * linux-aarch64-low.c (struct aarch64_insn_data): New.
502 (struct aarch64_insn_visitor): New.
503 (struct aarch64_insn_relocation_data): New.
504 (aarch64_ftrace_insn_reloc_b): New function.
505 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
506 (aarch64_ftrace_insn_reloc_cb): Likewise.
507 (aarch64_ftrace_insn_reloc_tb): Likewise.
508 (aarch64_ftrace_insn_reloc_adr): Likewise.
509 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
510 (aarch64_ftrace_insn_reloc_others): Likewise.
511 (visitor): New.
512 (aarch64_relocate_instruction): Use visitor.
513
dfaffe9d
YQ
5142015-10-12 Yao Qi <yao.qi@linaro.org>
515
516 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
517 int. Add argument buf.
518 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
519 aarch64_relocate_instruction.
520
70b439f0
YQ
5212015-10-12 Yao Qi <yao.qi@linaro.org>
522
523 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
524 argument insn. Remove local variable insn. Don't call
525 target_read_uint32.
526 (aarch64_install_fast_tracepoint_jump_pad): Call
527 target_read_uint32.
528
7781c06f
YQ
5292015-09-30 Yao Qi <yao.qi@linaro.org>
530
531 * linux-aarch64-low.c (emit_movk): Shorten a long line.
532 (emit_load_store_pair): Likewise.
533
9a3c8263
SM
5342015-09-25 Simon Marchi <simon.marchi@ericsson.com>
535
536 * dll.c (match_dll): Add cast(s).
537 (unloaded_dll): Likewise.
538 * linux-low.c (second_thread_of_pid_p): Likewise.
539 (delete_lwp_callback): Likewise.
540 (count_events_callback): Likewise.
541 (select_event_lwp_callback): Likewise.
542 (linux_set_resume_request): Likewise.
543 * server.c (accumulate_file_name_length): Likewise.
544 (emit_dll_description): Likewise.
545 (handle_qxfer_threads_worker): Likewise.
546 (visit_actioned_threads): Likewise.
547 * thread-db.c (any_thread_of): Likewise.
548 * tracepoint.c (same_process_p): Likewise.
549 (match_blocktype): Likewise.
550 (build_traceframe_info_xml): Likewise.
551
224c3ddb
SM
5522015-09-25 Simon Marchi <simon.marchi@ericsson.com>
553
554 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
555 assignment.
556 (gdb_unparse_agent_expr): Likewise.
557 * hostio.c (require_data): Likewise.
558 (handle_pread): Likewise.
559 * linux-low.c (disable_regset): Likewise.
560 (fetch_register): Likewise.
561 (store_register): Likewise.
562 (get_dynamic): Likewise.
563 (linux_qxfer_libraries_svr4): Likewise.
564 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
565 (set_fast_tracepoint_jump): Likewise.
566 (uninsert_fast_tracepoint_jumps_at): Likewise.
567 (reinsert_fast_tracepoint_jumps_at): Likewise.
568 (validate_inserted_breakpoint): Likewise.
569 (clone_agent_expr): Likewise.
570 * regcache.c (init_register_cache): Likewise.
571 * remote-utils.c (putpkt_binary_1): Likewise.
572 (decode_M_packet): Likewise.
573 (decode_X_packet): Likewise.
574 (look_up_one_symbol): Likewise.
575 (relocate_instruction): Likewise.
576 (monitor_output): Likewise.
577 * server.c (handle_search_memory): Likewise.
578 (handle_qxfer_exec_file): Likewise.
579 (handle_qxfer_libraries): Likewise.
580 (handle_qxfer): Likewise.
581 (handle_query): Likewise.
582 (handle_v_cont): Likewise.
583 (handle_v_run): Likewise.
584 (captured_main): Likewise.
585 * target.c (write_inferior_memory): Likewise.
586 * thread-db.c (try_thread_db_load_from_dir): Likewise.
587 * tracepoint.c (init_trace_buffer): Likewise.
588 (add_tracepoint_action): Likewise.
589 (add_traceframe): Likewise.
590 (add_traceframe_block): Likewise.
591 (cmd_qtdpsrc): Likewise.
592 (cmd_qtdv): Likewise.
593 (cmd_qtstatus): Likewise.
594 (response_source): Likewise.
595 (response_tsv): Likewise.
596 (cmd_qtnotes): Likewise.
597 (gdb_collect): Likewise.
598 (initialize_tracepoint): Likewise.
599
afbe19f8
PL
6002015-09-21 Pierre Langlois <pierre.langlois@arm.com>
601
602 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
603 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
604 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
605 <NOP>: New.
606 (enum aarch64_condition_codes): New enum.
607 (w0): New static global.
608 (fp): Likewise.
609 (lr): Likewise.
610 (struct aarch64_memory_operand) <type>: New
611 MEMORY_OPERAND_POSTINDEX type.
612 (postindex_memory_operand): New helper function.
613 (emit_ret): New function.
614 (emit_load_store_pair): New function, factored out of emit_stp
615 with support for MEMORY_OPERAND_POSTINDEX.
616 (emit_stp): Rewrite using emit_load_store_pair.
617 (emit_ldp): New function.
618 (emit_load_store): Likewise.
619 (emit_ldr): Mention post-index instruction in comment.
620 (emit_ldrh): New function.
621 (emit_ldrb): New function.
622 (emit_ldrsw): Mention post-index instruction in comment.
623 (emit_str): Likewise.
624 (emit_subs): New function.
625 (emit_cmp): Likewise.
626 (emit_and): Likewise.
627 (emit_orr): Likewise.
628 (emit_orn): Likewise.
629 (emit_eor): Likewise.
630 (emit_mvn): Likewise.
631 (emit_lslv): Likewise.
632 (emit_lsrv): Likewise.
633 (emit_asrv): Likewise.
634 (emit_mul): Likewise.
635 (emit_sbfm): Likewise.
636 (emit_sbfx): Likewise.
637 (emit_ubfm): Likewise.
638 (emit_ubfx): Likewise.
639 (emit_csinc): Likewise.
640 (emit_cset): Likewise.
641 (emit_nop): Likewise.
642 (emit_ops_insns): New helper function.
643 (emit_pop): Likewise.
644 (emit_push): Likewise.
645 (aarch64_emit_prologue): New function.
646 (aarch64_emit_epilogue): Likewise.
647 (aarch64_emit_add): Likewise.
648 (aarch64_emit_sub): Likewise.
649 (aarch64_emit_mul): Likewise.
650 (aarch64_emit_lsh): Likewise.
651 (aarch64_emit_rsh_signed): Likewise.
652 (aarch64_emit_rsh_unsigned): Likewise.
653 (aarch64_emit_ext): Likewise.
654 (aarch64_emit_log_not): Likewise.
655 (aarch64_emit_bit_and): Likewise.
656 (aarch64_emit_bit_or): Likewise.
657 (aarch64_emit_bit_xor): Likewise.
658 (aarch64_emit_bit_not): Likewise.
659 (aarch64_emit_equal): Likewise.
660 (aarch64_emit_less_signed): Likewise.
661 (aarch64_emit_less_unsigned): Likewise.
662 (aarch64_emit_ref): Likewise.
663 (aarch64_emit_if_goto): Likewise.
664 (aarch64_emit_goto): Likewise.
665 (aarch64_write_goto_address): Likewise.
666 (aarch64_emit_const): Likewise.
667 (aarch64_emit_call): Likewise.
668 (aarch64_emit_reg): Likewise.
669 (aarch64_emit_pop): Likewise.
670 (aarch64_emit_stack_flush): Likewise.
671 (aarch64_emit_zero_ext): Likewise.
672 (aarch64_emit_swap): Likewise.
673 (aarch64_emit_stack_adjust): Likewise.
674 (aarch64_emit_int_call_1): Likewise.
675 (aarch64_emit_void_call_2): Likewise.
676 (aarch64_emit_eq_goto): Likewise.
677 (aarch64_emit_ne_goto): Likewise.
678 (aarch64_emit_lt_goto): Likewise.
679 (aarch64_emit_le_goto): Likewise.
680 (aarch64_emit_gt_goto): Likewise.
681 (aarch64_emit_ge_got): Likewise.
682 (aarch64_emit_ops_impl): New static global variable.
683 (aarch64_emit_ops): New target function, return
684 &aarch64_emit_ops_impl.
685 (struct linux_target_ops): Install it.
686
bb903df0
PL
6872015-09-21 Pierre Langlois <pierre.langlois@arm.com>
688
689 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
690 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
691 aarch64-ipa.o.
692 * linux-aarch64-ipa.c: New file.
693 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
694 and endian.h.
695 (aarch64_get_thread_area): New target method.
696 (extract_signed_bitfield): New helper function.
697 (aarch64_decode_ldr_literal): New function.
698 (enum aarch64_opcodes): New enum.
699 (struct aarch64_register): New struct.
700 (struct aarch64_operand): New struct.
701 (x0): New static global.
702 (x1): Likewise.
703 (x2): Likewise.
704 (x3): Likewise.
705 (x4): Likewise.
706 (w2): Likewise.
707 (ip0): Likewise.
708 (sp): Likewise.
709 (xzr): Likewise.
710 (aarch64_register): New helper function.
711 (register_operand): Likewise.
712 (immediate_operand): Likewise.
713 (struct aarch64_memory_operand): New struct.
714 (offset_memory_operand): New helper function.
715 (preindex_memory_operand): Likewise.
716 (enum aarch64_system_control_registers): New enum.
717 (ENCODE): New macro.
718 (emit_insn): New helper function.
719 (emit_b): New function.
720 (emit_bcond): Likewise.
721 (emit_cb): Likewise.
722 (emit_tb): Likewise.
723 (emit_blr): Likewise.
724 (emit_stp): Likewise.
725 (emit_ldp_q_offset): Likewise.
726 (emit_stp_q_offset): Likewise.
727 (emit_load_store): Likewise.
728 (emit_ldr): Likewise.
729 (emit_ldrsw): Likewise.
730 (emit_str): Likewise.
731 (emit_ldaxr): Likewise.
732 (emit_stxr): Likewise.
733 (emit_stlr): Likewise.
734 (emit_data_processing_reg): Likewise.
735 (emit_data_processing): Likewise.
736 (emit_add): Likewise.
737 (emit_sub): Likewise.
738 (emit_mov): Likewise.
739 (emit_movk): Likewise.
740 (emit_mov_addr): Likewise.
741 (emit_mrs): Likewise.
742 (emit_msr): Likewise.
743 (emit_sevl): Likewise.
744 (emit_wfe): Likewise.
745 (append_insns): Likewise.
746 (can_encode_int32_in): New helper function.
747 (aarch64_relocate_instruction): New function.
748 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
749 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
750 (struct linux_target_ops): Install aarch64_get_thread_area,
751 aarch64_install_fast_tracepoint_jump_pad and
752 aarch64_get_min_fast_tracepoint_insn_len.
753
787749ea
PL
7542015-09-21 Pierre Langlois <pierre.langlois@arm.com>
755
756 * Makefile.in (aarch64-insn.o): New rule.
757 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
758
9812b2e6
YQ
7592015-09-21 Yao Qi <yao.qi@linaro.org>
760
761 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
762
18fe412b
YQ
7632015-09-21 Yao Qi <yao.qi@linaro.org>
764
765 * tracepoint.c (max_jump_pad_size): Remove.
766
a0cc84cd
YQ
7672015-09-18 Yao Qi <yao.qi@linaro.org>
768
769 * linux-aarch64-low.c: Don't include sys/uio.h.
770 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
771
d78908cf
WW
7722015-09-16 Wei-cheng Wang <cole945@gmail.com>
773
774 * tracepoint.c (eval_result_type): Change prototype.
775 (condition_true_at_tracepoint): Fix argument to compiled_cond.
776
d57e0d50
PA
7772015-09-15 Pedro Alves <palves@redhat.com>
778
779 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
780 Check whether to report exec events instead of checking whether
781 multiprocess is enabled.
782
5a676acc
PA
7832015-09-15 Pedro Alves <palves@redhat.com>
784
785 PR remote/18965
786 * remote-utils.c (prepare_resume_reply): Merge
787 TARGET_WAITKIND_VFORK_DONE switch case with the
788 TARGET_WAITKIND_FORKED case.
789
7c5d0fad
YQ
7902015-09-15 Yao Qi <yao.qi@linaro.org>
791
792 * server.c (handle_query): Check string comparison using
793 "else if" instead of "if".
794
750ce8d1
YQ
7952015-09-15 Yao Qi <yao.qi@linaro.org>
796
797 * server.c (vCont_supported): New global variable.
798 (handle_query): Set vCont_supported to 1 if "vContSupported+"
799 matches. Append ";vContSupported+" to own_buf.
800 (handle_v_requests): Append ";s;S" to own_buf if target supports
801 hardware single step or vCont_supported is false.
802 (capture_main): Set vCont_supported to zero.
803
70b90b91
YQ
8042015-09-15 Yao Qi <yao.qi@linaro.org>
805
806 * linux-low.c (linux_supports_conditional_breakpoints): Rename
807 it to ...
808 (linux_supports_hardware_single_step): ... New function.
809 (linux_target_ops): Update.
810 * lynx-low.c (lynx_target_ops): Set field
811 supports_hardware_single_step to target_can_do_hardware_single_step.
812 * nto-low.c (nto_target_ops): Likewise.
813 * spu-low.c (spu_target_ops): Likewise.
814 * win32-low.c (win32_target_ops): Likewise.
815 * target.c (target_can_do_hardware_single_step): New function.
816 * target.h (struct target_ops) <supports_conditional_breakpoints>:
817 Remove. <supports_hardware_single_step>: New field.
818 (target_supports_conditional_breakpoints): Remove.
819 (target_supports_hardware_single_step): New macro.
820 (target_can_do_hardware_single_step): Declare.
821 * server.c (handle_query): Use target_supports_hardware_single_step
822 instead of target_supports_conditional_breakpoints.
823
ade90bde
YQ
8242015-09-15 Yao Qi <yao.qi@linaro.org>
825
826 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
827 function.
828 (struct linux_target_ops the_low_target): Install
829 aarch64_linux_siginfo_fixup.
830
94585166
DB
8312015-09-11 Don Breazeal <donb@codesourcery.com>
832 Luis Machado <lgustavo@codesourcery.com>
833
834 * linux-low.c (linux_mourn): Static declaration.
835 (linux_arch_setup): Move in front of
836 handle_extended_wait.
837 (linux_arch_setup_thread): New function.
838 (handle_extended_wait): Handle exec events. Call
839 linux_arch_setup_thread. Make event_lwp argument a
840 pointer-to-a-pointer.
841 (check_zombie_leaders): Do not check stopped threads.
842 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
843 (linux_low_filter_event): Add lwp and thread for exec'ing
844 non-leader thread if leader thread has been deleted.
845 Refactor code into linux_arch_setup_thread and call it.
846 Pass child lwp pointer by reference to handle_extended_wait.
847 (linux_wait_for_event_filtered): Update comment.
848 (linux_wait_1): Prevent clobbering exec event status.
849 (linux_supports_exec_events): New function.
850 (linux_target_ops) <supports_exec_events>: Initialize new member.
851 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
852 new member.
853 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
854 * server.c (report_exec_events): New global variable.
855 (handle_query): Handle qSupported query for exec-events feature.
856 (captured_main): Initialize report_exec_events.
857 * server.h (report_exec_events): Declare new global variable.
858 * target.h (struct target_ops) <supports_exec_events>: New
859 member.
860 (target_supports_exec_events): New macro.
861 * win32-low.c (win32_target_ops) <supports_exec_events>:
862 Initialize new member.
863
0568462b
MM
8642015-09-09 Markus Metzger <markus.t.metzger@intel.com>
865
866 * linux-low.c (linux_low_enable_btrace): Remove.
867 (linux_target_ops): Replace linux_low_enable_btrace with
868 linux_enable_btrace.
869
39edd165
YQ
8702015-09-03 Yao Qi <yao.qi@linaro.org>
871
872 * linux-aarch64-low.c (aarch64_insert_point): Call
873 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
874 returns true.
875
1db33b5a
UW
8762015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
877
878 * linux-low.c (check_stopped_by_breakpoint): Use
879 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
880
ab290430
PA
8812015-08-27 Pedro Alves <palves@redhat.com>
882
883 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
884
8d749320
SM
8852015-08-26 Simon Marchi <simon.marchi@ericsson.com>
886
6711b7f8
SM
887 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
888 the XNEW-family equivalent.
8d749320
SM
889 (compile_bytecodes): Likewise.
890 * dll.c (loaded_dll): Likewise.
891 * event-loop.c (append_callback_event): Likewise.
892 (create_file_handler): Likewise.
893 (create_file_event): Likewise.
894 * hostio.c (handle_open): Likewise.
895 * inferiors.c (add_thread): Likewise.
896 (add_process): Likewise.
897 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
898 * linux-arm-low.c (arm_new_process): Likewise.
899 (arm_new_thread): Likewise.
900 * linux-low.c (add_to_pid_list): Likewise.
901 (linux_add_process): Likewise.
902 (handle_extended_wait): Likewise.
903 (add_lwp): Likewise.
904 (enqueue_one_deferred_signal): Likewise.
905 (enqueue_pending_signal): Likewise.
906 (linux_resume_one_lwp_throw): Likewise.
907 (linux_resume_one_thread): Likewise.
908 (linux_read_memory): Likewise.
909 (linux_write_memory): Likewise.
910 * linux-mips-low.c (mips_linux_new_process): Likewise.
911 (mips_linux_new_thread): Likewise.
912 (mips_add_watchpoint): Likewise.
913 * linux-x86-low.c (initialize_low_arch): Likewise.
914 * lynx-low.c (lynx_add_process): Likewise.
915 * mem-break.c (set_raw_breakpoint_at): Likewise.
916 (set_breakpoint): Likewise.
917 (add_condition_to_breakpoint): Likewise.
918 (add_commands_to_breakpoint): Likewise.
919 (clone_agent_expr): Likewise.
920 (clone_one_breakpoint): Likewise.
921 * regcache.c (new_register_cache): Likewise.
922 * remote-utils.c (look_up_one_symbol): Likewise.
923 * server.c (queue_stop_reply): Likewise.
924 (start_inferior): Likewise.
925 (queue_stop_reply_callback): Likewise.
926 (handle_target_event): Likewise.
927 * spu-low.c (fetch_ppc_memory): Likewise.
928 (store_ppc_memory): Likewise.
929 * target.c (set_target_ops): Likewise.
930 * thread-db.c (thread_db_load_search): Likewise.
931 (try_thread_db_load_1): Likewise.
932 * tracepoint.c (add_tracepoint): Likewise.
933 (add_tracepoint_action): Likewise.
934 (create_trace_state_variable): Likewise.
935 (cmd_qtdpsrc): Likewise.
936 (cmd_qtro): Likewise.
937 (add_while_stepping_state): Likewise.
938 * win32-low.c (child_add_thread): Likewise.
939 (get_image_name): Likewise.
940
ed8b7b42
YQ
9412015-08-25 Yao Qi <yao.qi@linaro.org>
942
943 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
944
db3cb7cb
YQ
9452015-08-25 Yao Qi <yao.qi@linaro.org>
946
947 * Makefile.in (aarch64-linux.o): New rule.
948 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
949 srv_tgtobj.
950 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
951 (aarch64_init_debug_reg_state): Make it extern.
952 (aarch64_linux_prepare_to_resume): Remove.
953
f6011a1c
YQ
9542015-08-25 Yao Qi <yao.qi@linaro.org>
955
956 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
957 lwp_arch_private_info and ptid_of_lwp.
958
88e2cf7e
YQ
9592015-08-25 Yao Qi <yao.qi@linaro.org>
960
961 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
962 Find proc_info by find_process_pid. All callers updated.
963
5e35436e
YQ
9642015-08-25 Yao Qi <yao.qi@linaro.org>
965
966 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
967 Remove.
968 (debug_reg_change_callback): Remove.
969 (aarch64_notify_debug_reg_change): Remove.
970
4a8a7965
YQ
9712015-08-25 Yao Qi <yao.qi@linaro.org>
972
973 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
974 Call current_lwp_ptid.
975
32a271ee
YQ
9762015-08-25 Yao Qi <yao.qi@linaro.org>
977
978 * linux-aarch64-low.c (debug_reg_change_callback): Use
979 debug_printf.
980
0d51c8d7
YQ
9812015-08-25 Yao Qi <yao.qi@linaro.org>
982
983 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
984
31a43dd5
YQ
9852015-08-25 Yao Qi <yao.qi@linaro.org>
986
987 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
988
8ee52567
YQ
9892015-08-25 Yao Qi <yao.qi@linaro.org>
990
991 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
992 the code.
993
ff3f0f45
YQ
9942015-08-25 Yao Qi <yao.qi@linaro.org>
995
996 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
997 Remove.
998 (debug_reg_change_callback): Remove argument entry and add argument
999 lwp. Remove local variable thread. Don't print thread id in the
1000 debugging output. Don't check whether pid of thread equals to pid.
1001 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
1002 iterate_over_lwps instead find_inferior.
1003
3d40fbb5
PA
10042015-08-24 Pedro Alves <palves@redhat.com>
1005
1006 * inferiors.c (get_first_process): New function.
1007 * inferiors.h (get_first_process): New declaration.
1008 * remote-utils.c (read_ptid): Default to the first process in the
1009 list, instead of to the current thread's process.
1010
438e1e42
PA
10112015-08-24 Pedro Alves <palves@redhat.com>
1012
1013 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
1014 * event-loop.c: Likewise.
1015 * remote-utils.c: Likewise.
1016 * tracepoint.c: Likewise.
1017
a8c6d4fc
PA
10182015-08-24 Pedro Alves <palves@redhat.com>
1019
1020 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
1021 ptid_get_lwp.
1022
99b0bb12
PA
10232015-08-21 Pedro Alves <palves@redhat.com>
1024
1025 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
1026 instead of literal 1.
1027
f8904751
PA
10282015-08-21 Pedro Alves <palves@redhat.com>
1029
1030 * tdesc.c (default_description): Explicitly zero-initialize.
1031
465a859e
PA
10322015-08-21 Pedro Alves <palves@redhat.com>
1033
1034 PR gdb/18749
1035 * inferiors.c (remove_thread): Discard any pending stop reply for
1036 this thread.
1037 * server.c (remove_all_on_match_pid): Rename to ...
1038 (remove_all_on_match_ptid): ... this. Work with a filter ptid
1039 instead of a pid.
1040 (discard_queued_stop_replies): Change parameter to a ptid. Now
1041 extern.
1042 (handle_v_kill, kill_inferior_callback, captured_main)
1043 (process_serial_event): Adjust.
1044 * server.h (discard_queued_stop_replies): Declare.
1045
f0db101d
PA
10462015-08-21 Pedro Alves <palves@redhat.com>
1047
1048 * linux-low.c (wait_for_sigstop): Always switch to no thread
1049 selected if the previously current thread dies.
1050 * lynx-low.c (lynx_request_interrupt): Use the first thread's
1051 process instead of the current thread's.
1052 * remote-utils.c (input_interrupt): Don't check if there's no
1053 current thread.
1054 * server.c (gdb_read_memory, gdb_write_memory): If setting the
1055 current thread to the general thread fails, error out.
1056 (handle_qxfer_auxv, handle_qxfer_libraries)
1057 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
1058 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
1059 (handle_query): Check if there's a thread selected instead of
1060 checking whether there's any thread in the thread list.
1061 (handle_qxfer_threads, handle_qxfer_btrace)
1062 (handle_qxfer_btrace_conf): Don't error out early if there's no
1063 thread in the thread list.
1064 (handle_v_cont, myresume): Don't set the current thread to the
1065 continue thread.
1066 (process_serial_event) <Hg handling>: Also set thread_id if the
1067 previous general thread is still alive.
1068 (process_serial_event) <g/G handling>: If setting the current
1069 thread to the general thread fails, error out.
1070 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
1071 thread's lwp instead of the current thread's.
1072 * target.c (set_desired_thread): If the desired thread was not
1073 found, leave the current thread pointing to NULL. Return an int
1074 (boolean) indicating success.
1075 * target.h (set_desired_thread): Change return type to int.
1076
40045d91
MF
10772015-08-20 Max Filippov <jcmvbkbc@gmail.com>
1078
1079 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
1080 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
1081 #includes.
1082 (ps_get_thread_area): New function.
1083
45face3b
GB
10842015-08-19 Gary Benson <gbenson@redhat.com>
1085
1086 * hostio.c (handle_pread): Do not attempt to read more data
1087 than hostio_reply_with_data can fit in a packet.
1088
16d5f642
JB
10892015-08-18 Joel Brobecker <brobecker@adacore.com>
1090
1091 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
1092
a738da3a
MF
10932015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
1094
1095 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
1096
33ebda9d
PA
10972015-08-06 Pedro Alves <palves@redhat.com>
1098
1099 * tracepoint.c (expr_eval_result): Now an int.
1100
a44892be
PA
11012015-08-06 Pedro Alves <palves@redhat.com>
1102
1103 * gdbthread.h (struct regcache): Forward declare.
1104 (struct thread_info) <regcache_data>: Now a struct regcache
1105 pointer.
1106 * inferiors.c (inferior_regcache_data)
1107 (set_inferior_regcache_data): Now work with struct regcache
1108 pointers.
1109 * inferiors.h (struct regcache): Forward declare.
1110 (inferior_regcache_data, set_inferior_regcache_data): Now work
1111 with struct regcache pointers.
1112 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
1113 (free_register_cache_thread): Remove struct regcache pointer
1114 casts.
1115
608a1e46
PA
11162015-08-06 Pedro Alves <palves@redhat.com>
1117
1118 * server.c (captured_main): On error, print the exception message
1119 to stderr, and if run_once is set, throw a quit.
1120
f0ce0d3a
PA
11212015-08-06 Pedro Alves <palves@redhat.com>
1122
1123 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
1124 the current thread.
1125
bf47e248
PA
11262015-08-06 Pedro Alves <palves@redhat.com>
1127
1128 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
1129 reading beyond the passed in buffer length.
1130
b6b9ffcc
PL
11312015-08-06 Pierre Langlois <pierre.langlois@arm.com>
1132
1133 * tracepoint.c (symbol_list) <required>: Remove.
1134
863d01bd
PA
11352015-08-06 Pedro Alves <palves@redhat.com>
1136
1137 * linux-low.c (handle_extended_wait): Set the fork child's suspend
1138 count if stopping and suspending threads.
1139 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
1140 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
1141 (linux_detach): Complete an ongoing step-over.
1142 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
1143 throughout.
1144 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
1145 (linux_wait_1): If passing a signal to the inferior after
1146 finishing a step-over, unsuspend and re-resume all lwps. If we
1147 see a single-step event but the thread should be continuing, don't
1148 pass the trap to gdb.
1149 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
1150 internal_error instead of gdb_assert.
1151 (enqueue_pending_signal): New function.
1152 (check_ptrace_stopped_lwp_gone): Add debug output.
1153 (start_step_over): Use internal_error instead of gdb_assert.
1154 (complete_ongoing_step_over): New function.
1155 (linux_resume_one_thread): Don't resume a suspended thread.
1156 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
1157 it stepping.
1158
00db26fa
PA
11592015-08-06 Pedro Alves <palves@redhat.com>
1160
1161 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
1162 (linux_thread_alive): Use lwp_is_marked_dead.
1163 (extended_event_reported): Delete.
1164 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
1165 instead of extended_event_reported.
1166 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
1167 as well.
1168 (lwp_is_marked_dead): New function.
1169 (lwp_running): Use lwp_is_marked_dead.
1170 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
1171 comment.
1172
ad071a30
PA
11732015-08-06 Pedro Alves <palves@redhat.com>
1174
1175 * linux-low.c (linux_wait_1): Move fork event output out of the
1176 !report_to_gdb check. Pass event_child->waitstatus to
1177 target_waitstatus_to_string instead of ourstatus.
1178
524b57e6
YQ
11792015-08-04 Yao Qi <yao.qi@linaro.org>
1180
1181 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
1182 if current_thread is 32 bit.
1183
6085d6f6
YQ
11842015-08-04 Yao Qi <yao.qi@linaro.org>
1185
1186 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
1187 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
1188 * server.c (extended_protocol): Remove "static".
1189 * server.h (extended_protocol): Declare it.
1190
8a7e4587
YQ
11912015-08-04 Yao Qi <yao.qi@linaro.org>
1192
1193 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
1194 both aarch64 and aarch32.
1195 (aarch64_set_pc): Likewise.
1196
3b53ae99
YQ
11972015-08-04 Yao Qi <yao.qi@linaro.org>
1198
1199 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
1200 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
1201 arm-with-neon.xml to srv_xmlfiles.
1202 * linux-aarch64-low.c: Include linux-aarch32-low.h.
1203 (is_64bit_tdesc): New function.
1204 (aarch64_linux_read_description): New function.
1205 (aarch64_arch_setup): Call aarch64_linux_read_description.
1206 (regs_info): Rename to regs_info_aarch64.
1207 (aarch64_regs_info): Return right regs_info.
1208 (initialize_low_arch): Call initialize_low_arch_aarch32.
1209
bd9e6534
YQ
12102015-08-04 Yao Qi <yao.qi@linaro.org>
1211
1212 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
1213 * linux-aarch32-low.c: New file.
1214 * linux-aarch32-low.h: New file.
1215 * linux-arm-low.c (arm_fill_gregset): Move it to
1216 linux-aarch32-low.c.
1217 (arm_store_gregset): Likewise.
1218 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
1219 (arm_store_vfpregset): Call arm_store_vfpregset_num.
1220 (arm_arch_setup): Check if PTRACE_GETREGSET works.
1221 (regs_info): Rename to regs_info_arm.
1222 (arm_regs_info): Return regs_info_aarch32 if
1223 have_ptrace_getregset is 1 and target description is
1224 arm_with_neon or arm_with_vfpv3.
1225 (initialize_low_arch): Don't call init_registers_arm_with_neon.
1226 Call initialize_low_arch_aarch32 instead.
1227
ded48a5e
YQ
12282015-08-04 Yao Qi <yao.qi@linaro.org>
1229
1230 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
1231 * linux-low.c: ... here.
1232 * linux-low.h (have_ptrace_getregset): Declare it.
1233
96e9210f
PA
12342015-08-04 Pedro Alves <palves@redhat.com>
1235
1236 * thread-db.c (struct thread_db): Use new typedefs.
1237 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
1238 CHK calls.
1239 (disable_thread_event_reporting): Cast result of dlsym to
1240 destination function pointer type.
1241 (thread_db_mourn): Use td_ta_delete_ftype.
1242
af60a1ef
SL
12432015-08-03 Sandra Loosemore <sandra@codesourcery.com>
1244
1245 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
1246 arch variant.
1247 (CDX_BREAKPOINT): Define for R2.
1248 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
1249 (the_low_target): Add comments.
1250
e8b41681
YQ
12512015-07-30 Yao Qi <yao.qi@linaro.org>
1252
1253 * linux-arm-low.c (arm_hwcap): Remove it.
1254 (arm_read_description): New local variable arm_hwcap. Don't
1255 set arm_hwcap to zero.
1256
89abb039
YQ
12572015-07-30 Yao Qi <yao.qi@linaro.org>
1258
1259 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
1260 Use regcache->tdesc instead.
1261 (arm_store_wmmxregset): Likewise.
1262 (arm_fill_vfpregset): Likewise.
1263 (arm_store_vfpregset): Likewise.
1264
deca266c
YQ
12652015-07-30 Yao Qi <yao.qi@linaro.org>
1266
1267 * linux-arm-low.c: Include arch/arm.h.
1268 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
1269 (arm_store_gregset): Likewise.
1270
aa58a496
SM
12712015-07-29 Simon Marchi <simon.marchi@ericsson.com>
1272
1273 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
1274 ptrace's 4th parameter.
1275
50904b25
YQ
12762015-07-27 Yao Qi <yao.qi@linaro.org>
1277
1278 * configure.srv (case aarch64*-*-linux*): Don't set
1279 srv_linux_usrregs.
1280
5826e159
PA
12812015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
1282
1283 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
1284 sys/ptrace.h.
1285 * linux-arm-low.c: Likewise.
1286 * linux-cris-low.c: Likewise.
1287 * linux-crisv32-low.c: Likewise.
1288 * linux-low.c: Likewise.
1289 * linux-m68k-low.c: Likewise.
1290 * linux-mips-low.c: Likewise.
1291 * linux-nios2-low.c: Likewise.
1292 * linux-s390-low.c: Likewise.
1293 * linux-sparc-low.c: Likewise.
1294 * linux-tic6x-low.c: Likewise.
1295 * linux-tile-low.c: Likewise.
1296 * linux-x86-low.c: Likewise.
1297
54019719
PA
12982015-07-24 Pedro Alves <palves@redhat.com>
1299
1300 * config.in: Regenerate.
1301 * configure: Regenerate.
1302
eb7aa561
PA
13032015-07-24 Pedro Alves <palves@redhat.com>
1304
1305 * acinclude.m4: Include ../ptrace.m4.
1306 * configure.ac: Call GDB_AC_PTRACE.
1307 * config.in, configure: Regenerate.
1308
55d7b841
YQ
13092015-07-24 Yao Qi <yao.qi@linaro.org>
1310
1311 * linux-low.c (linux_create_inferior): Remove setting to
1312 proc->priv->new_inferior.
1313 (linux_attach): Likewise.
1314 (linux_low_filter_event): Likewise.
1315 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
1316
c06cbd92
YQ
13172015-07-24 Yao Qi <yao.qi@linaro.org>
1318
1319 * linux-low.c (linux_arch_setup): New function.
1320 (linux_low_filter_event): If proc->tdesc is NULL and
1321 proc->attached is true, call the_low_target.arch_setup.
1322 Otherwise, keep status pending, and return.
1323 (linux_resume_one_lwp_throw): Don't call get_pc if
1324 thread->while_stepping isn't NULL. Don't call
1325 get_thread_regcache if proc->tdesc is NULL.
1326 (need_step_over_p): Return 0 if proc->tdesc is NULL.
1327 (linux_target_ops): Install arch_setup.
1328 * server.c (start_inferior): Call the_target->arch_setup.
1329 * target.h (struct target_ops) <arch_setup>: New field.
1330 (target_arch_setup): New marco.
1331 * lynx-low.c (lynx_target_ops): Update.
1332 * nto-low.c (nto_target_ops): Update.
1333 * spu-low.c (spu_target_ops): Update.
1334 * win32-low.c (win32_target_ops): Update.
1335
5ae3ebba
YQ
13362015-07-24 Yao Qi <yao.qi@linaro.org>
1337
1338 * linux-low.c (linux_add_process): Don't set
1339 proc->priv->new_inferior.
1340 (linux_create_inferior): Set proc->priv->new_inferior to 1.
1341 (linux_attach): Likewise.
1342
eb97750b
YQ
13432015-07-24 Yao Qi <yao.qi@linaro.org>
1344
1345 * server.c (start_inferior): Code refactor.
1346
51aee833
YQ
13472015-07-24 Yao Qi <yao.qi@linaro.org>
1348
1349 * server.c (process_serial_event): Set general_thread.
1350
af1b22f3
YQ
13512015-07-21 Yao Qi <yao.qi@linaro.org>
1352
1353 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
1354 aarch64_linux_get_debug_reg_capacity.
1355
554717a3
YQ
13562015-07-17 Yao Qi <yao.qi@linaro.org>
1357
1358 * Makefile.in (aarch64-linux-hw-point.o): New rule.
1359 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
1360 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
1361 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
1362 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
1363 (AARCH64_HWP_ALIGNMENT): Likewise.
1364 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
1365 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
1366 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
1367 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
1368 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
1369 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
1370 (struct aarch64_debug_reg_state): Likewise.
1371 (struct arch_lwp_info): Likewise.
1372 (aarch64_align_watchpoint): Likewise.
1373 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
1374 (aarch64_watchpoint_length): Likewise.
1375 (aarch64_point_encode_ctrl_reg): Likewise
1376 (aarch64_point_is_aligned): Likewise.
1377 (aarch64_align_watchpoint): Likewise.
1378 (aarch64_linux_set_debug_regs):
1379 (aarch64_dr_state_insert_one_point): Likewise.
1380 (aarch64_dr_state_remove_one_point): Likewise.
1381 (aarch64_handle_breakpoint): Likewise.
1382 (aarch64_handle_aligned_watchpoint): Likewise.
1383 (aarch64_handle_unaligned_watchpoint): Likewise.
1384 (aarch64_handle_watchpoint): Likewise.
1385
c67ca4de
YQ
13862015-07-17 Yao Qi <yao.qi@linaro.org>
1387
1388 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
1389 and don't aarch64_get_debug_reg_state. All callers update.
1390 (aarch64_handle_aligned_watchpoint): Likewise.
1391 (aarch64_handle_unaligned_watchpoint): Likewise.
1392 (aarch64_handle_watchpoint): Likewise.
1393 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
1394 (aarch64_remove_point): Likewise.
1395
25abf979
YQ
13962015-07-17 Yao Qi <yao.qi@linaro.org>
1397
1398 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
1399 debug_printf.
1400 (aarch64_handle_unaligned_watchpoint): Likewise.
1401
db1ff28b
JK
14022015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
1403
1404 Revert the previous 3 commits:
1405 Move gdb_regex* to common/
1406 Move linux_find_memory_regions_full & co.
1407 gdbserver build-id attribute generator
1408
700ca40f
JK
14092015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1410 Jan Kratochvil <jan.kratochvil@redhat.com>
1411
1412 gdbserver build-id attribute generator.
1413 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
1414 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
1415 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
1416 (find_phdr): New.
1417 (get_dynamic): Use find_pdhr to traverse program headers.
1418 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
1419 (compare_mapping_entry_range, struct find_memory_region_callback_data)
1420 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
1421 (get_hex_build_id): New.
1422 (linux_qxfer_libraries_svr4): Add optional build-id attribute
1423 to reply XML document.
1424
9904185c
JK
14252015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1426 Jan Kratochvil <jan.kratochvil@redhat.com>
1427
1428 * target.c: Include target/target-utils.h and fcntl.h.
1429 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
1430 (target_fileio_read_stralloc): New functions.
1431
6e5b4429
JK
14322015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
1433
1434 * Makefile.in (OBS): Add gdb_regex.o.
1435 (gdb_regex.o): New.
1436 * config.in: Rebuilt.
1437 * configure: Rebuilt.
1438
ddc98fbf
JK
14392015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1440 Jan Kratochvil <jan.kratochvil@redhat.com>
1441
1442 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
1443 * Makefile.in (OBS): Add target-utils.o.
1444 (linux-maps.o, target-utils.o): New.
1445 * configure.srv (srv_linux_obj): Add linux-maps.o.
1446
e57bb7a0
PL
14472015-07-15 Pierre Langlois <pierre.langlois@arm.com>
1448
1449 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
1450 function, return 1.
1451 (the_low_target): Install it.
1452
586b02a9
PA
14532015-07-14 Pedro Alves <palves@redhat.com>
1454
1455 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
1456 Instead, ignore ECHILD, and throw an error for other errnos.
1457
58c1b36c
PA
14582015-07-10 Pedro Alves <palves@redhat.com>
1459
1460 * event-loop.c (struct callback_event) <data>: Change type to
1461 gdb_client_data instance instead of gdb_client_data pointer.
1462 (append_callback_event): Adjust.
1463
421530db
PL
14642015-07-10 Pierre Langlois <pierre.langlois@arm.com>
1465
1466 * linux-aarch64-low.c: Add comments for each linux_target_ops
1467 method. Remove comments already covered in target_ops and
1468 linux_target_ops definitions.
1469 (the_low_target): Add comments for each unimplemented method.
1470
c2d65f38
YQ
14712015-07-09 Yao Qi <yao.qi@linaro.org>
1472
1473 * linux-aarch64-low.c (aarch64_regmap): Remove.
1474 (aarch64_usrregs_info): Remove.
1475 (regs_info): Set field usrregs to NULL.
1476
b20a6524
MM
14772015-07-02 Markus Metzger <markus.t.metzger@intel.com>
1478
1479 * linux-low.c: Include "rsp-low.h"
1480 (linux_low_encode_pt_config, linux_low_encode_raw): New.
1481 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
1482 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
1483 (handle_btrace_enable_pt): New.
1484 (handle_btrace_general_set): Support "pt".
1485 (handle_btrace_conf_general_set): Support "pt:size".
1486
96c97461
PL
14872015-06-29 Pierre Langlois <pierre.langlois@arm.com>
1488
1489 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
1490 Z_PACKET_SW_BP.
1491
37d66942
PL
14922015-06-29 Pierre Langlois <pierre.langlois@arm.com>
1493
1494 * linux-aarch64-low.c: Remove comment about endianness.
1495 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
1496 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
1497 memcmp.
1498
dc06243f
GB
14992015-06-24 Gary Benson <gbenson@redhat.com>
1500
1501 * linux-i386-ipa.c (stdint.h): Do not include.
1502 * lynx-i386-low.c (stdint.h): Likewise.
1503 * lynx-ppc-low.c (stdint.h): Likewise.
1504 * mem-break.c (stdint.h): Likewise.
1505 * thread-db.c (stdint.h): Likewise.
1506 * tracepoint.c (stdint.h): Likewise.
1507 * win32-low.c (stdint.h): Likewise.
1508
124e13d9
SM
15092015-06-18 Simon Marchi <simon.marchi@ericsson.com>
1510
1511 * server.c (write_qxfer_response): Update call to
1512 remote_escape_output.
1513
909c2cda
JK
15142015-06-15 Aleksandar Ristovski <aristovski@qnx.com
1515 Jan Kratochvil <jan.kratochvil@redhat.com>
1516
1517 Merge multiple hex conversions.
1518 * gdbreplay.c (tohex): Rename to 'fromhex'.
1519 (logchar): Use fromhex.
1520
24c05f46
JK
15212015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
1522
1523 * server.c (handle_qxfer_libraries): Set `version' attribute for
1524 <library-list>.
1525
14d2069a
GB
15262015-06-10 Gary Benson <gbenson@redhat.com>
1527
1528 * target.h (struct target_ops) <multifs_open>: New field.
1529 <multifs_unlink>: Likewise.
1530 <multifs_readlink>: Likewise.
1531 * linux-low.c (nat/linux-namespaces.h): New include.
1532 (linux_target_ops): Initialize the_target->multifs_open,
1533 the_target->multifs_unlink and the_target->multifs_readlink.
1534 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
1535 * hostio.c (hostio_fs_pid): New static variable.
1536 (hostio_handle_new_gdb_connection): New function.
1537 (handle_setfs): Likewise.
1538 (handle_open): Use the_target->multifs_open as appropriate.
1539 (handle_unlink): Use the_target->multifs_unlink as appropriate.
1540 (handle_readlink): Use the_target->multifs_readlink as
1541 appropriate.
1542 (handle_vFile): Handle vFile:setfs packets.
1543 * server.c (handle_query): Call hostio_handle_new_gdb_connection
1544 after target_handle_new_gdb_connection.
1545
4b8b5e72
GB
15462015-06-10 Gary Benson <gbenson@redhat.com>
1547
1548 * configure.ac (AC_CHECK_FUNCS): Add setns.
1549 * config.in: Regenerate.
1550 * configure: Likewise.
1551 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
1552 (linux-namespaces.o): New rule.
1553 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
1554
3ac2e371
GB
15552015-06-09 Gary Benson <gbenson@redhat.com>
1556
1557 * hostio.c (handle_open): Process mode argument with
1558 fileio_to_host_mode.
1559
ca9b78ce
YQ
15602015-06-01 Yao Qi <yao.qi@linaro.org>
1561
1562 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
1563 * linux-x86-low.c: Likewise.
1564
bfacd19d
DB
15652015-05-28 Don Breazeal <donb@codesourcery.com>
1566
1567 * linux-low.c (handle_extended_wait): Initialize
1568 thread_info.last_resume_kind for new fork children.
1569
452003ef
PA
15702015-05-15 Pedro Alves <palves@redhat.com>
1571
1572 * target.h (target_handle_new_gdb_connection): Rewrite using if
1573 wrapped in do/while.
1574
1041a03c
JB
15752015-05-14 Joel Brobecker <brobecker@adacore.com>
1576
1577 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
1578 * configure, config.in: Regenerate.
1579 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
1580 Declare typedef.
1581
c269dbdb
DB
15822015-05-12 Don Breazeal <donb@codesourcery.com>
1583
1584 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
1585 PTRACE_EVENT_VFORK_DONE.
1586 (linux_low_ptrace_options, extended_event_reported): Add vfork
1587 events.
1588 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
1589 and "vforkdone" for RSP 'T' Stop Reply Packet.
1590 * server.h (report_vfork_events): Declare
1591 global variable.
1592
3a8a0396
DB
15932015-05-12 Don Breazeal <donb@codesourcery.com>
1594
1595 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
1596 (the_low_target) <new_fork>: Initialize new member.
1597 * linux-arm-low.c (arm_new_fork): New function.
1598 (the_low_target) <new_fork>: Initialize new member.
1599 * linux-low.c (handle_extended_wait): Call new target function
1600 new_fork.
1601 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
1602 * linux-mips-low.c (mips_add_watchpoint): New function
1603 extracted from mips_insert_point.
1604 (the_low_target) <new_fork>: Initialize new member.
1605 (mips_linux_new_fork): New function.
1606 (mips_insert_point): Call mips_add_watchpoint.
1607 * linux-x86-low.c (x86_linux_new_fork): New function.
1608 (the_low_target) <new_fork>: Initialize new member.
1609
de0d863e
DB
16102015-05-12 Don Breazeal <donb@codesourcery.com>
1611
1612 * linux-low.c (handle_extended_wait): Implement return value,
1613 rename argument 'event_child' to 'event_lwp', handle
1614 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
1615 (linux_low_ptrace_options): New function.
1616 (linux_low_filter_event): Call linux_low_ptrace_options,
1617 use different argument fo linux_enable_event_reporting,
1618 use return value from handle_extended_wait.
1619 (extended_event_reported): New function.
1620 (linux_wait_1): Call extended_event_reported and set
1621 status to report fork events.
1622 (linux_write_memory): Add pid to debug message.
1623 (reset_lwp_ptrace_options_callback): New function.
1624 (linux_handle_new_gdb_connection): New function.
1625 (linux_target_ops): Initialize new structure member.
1626 * linux-low.h (struct lwp_info) <waitstatus>: New member.
1627 * lynx-low.c: Initialize new structure member.
1628 * remote-utils.c (prepare_resume_reply): Implement stop reason
1629 "fork" for "T" stop message.
1630 * server.c (handle_query): Call handle_new_gdb_connection.
1631 * server.h (report_fork_events): Declare global flag.
1632 * target.h (struct target_ops) <handle_new_gdb_connection>:
1633 New member.
1634 (target_handle_new_gdb_connection): New macro.
1635 * win32-low.c: Initialize new structure member.
1636
ddcbc397
DB
16372015-05-12 Don Breazeal <donb@codesourcery.com>
1638
1639 * mem-break.c (APPEND_TO_LIST): Define macro.
1640 (clone_agent_expr): New function.
1641 (clone_one_breakpoint): New function.
1642 (clone_all_breakpoints): New function.
1643 * mem-break.h: Declare new functions.
1644
89245bc0
DB
16452015-05-12 Don Breazeal <donb@codesourcery.com>
1646
1647 * linux-low.c (linux_supports_fork_events): New function.
1648 (linux_supports_vfork_events): New function.
1649 (linux_target_ops): Initialize new structure members.
1650 (initialize_low): Call linux_check_ptrace_features.
1651 * lynx-low.c (lynx_target_ops): Initialize new structure
1652 members.
1653 * server.c (report_fork_events, report_vfork_events):
1654 New global flags.
1655 (handle_query): Add new features to qSupported packet and
1656 response.
1657 (captured_main): Initialize new global variables.
1658 * target.h (struct target_ops) <supports_fork_events>:
1659 New member.
1660 <supports_vfork_events>: New member.
1661 (target_supports_fork_events): New macro.
1662 (target_supports_vfork_events): New macro.
1663 * win32-low.c (win32_target_ops): Initialize new structure
1664 members.
1665
835205d0
GB
16662015-05-12 Gary Benson <gbenson@redhat.com>
1667
1668 * server.c (handle_qxfer_exec_file): Use current process
1669 if annex is empty.
1670
21e94bd9
SL
16712015-05-08 Sandra Loosemore <sandra@codesourcery.com>
1672
1673 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
1674 Remove HAVE_PTRACE_GETREGS conditionals.
1675 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
1676 instead of PTRACE_GETREGS and PTRACE_SETREGS.
1677
45614f15
YQ
16782015-05-08 Yao Qi <yao.qi@linaro.org>
1679
1680 * linux-low.c (linux_supports_conditional_breakpoints): New
1681 function.
1682 (linux_target_ops): Install new target method.
1683 * lynx-low.c (lynx_target_ops): Install NULL hook for
1684 supports_conditional_breakpoints.
1685 * nto-low.c (nto_target_ops): Likewise.
1686 * spu-low.c (spu_target_ops): Likewise.
1687 * win32-low.c (win32_target_ops): Likewise.
1688 * server.c (handle_query): Check
1689 target_supports_conditional_breakpoints.
1690 * target.h (struct target_ops) <supports_conditional_breakpoints>:
1691 New field.
1692 (target_supports_conditional_breakpoints): New macro.
1693
80ad801e
PA
16942015-05-06 Pedro Alves <palves@redhat.com>
1695
1696 PR server/18081
1697 * server.c (start_inferior): If the process exits, mourn it.
1698
819843c7
GB
16992015-04-21 Gary Benson <gbenson@redhat.com>
1700
1701 * hostio.c (fileio_open_flags_to_host): Factored out to
1702 fileio_to_host_openflags in common/fileio.c. Single use
1703 updated.
1704
a2d5a9d7
MF
17052015-04-17 Max Filippov <jcmvbkbc@gmail.com>
1706
1707 * linux-xtensa-low.c (xtensa_fill_gregset)
1708 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
1709 XCHAL_HAVE_LOOP.
1710
deb44829
MF
17112015-04-17 Max Filippov <jcmvbkbc@gmail.com>
1712
1713 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
1714 (regs_info): Replace usrregs pointer with NULL.
1715
e57f1de3
GB
17162015-04-17 Gary Benson <gbenson@redhat.com>
1717
1718 * target.h (struct target_ops) <pid_to_exec_file>: New field.
1719 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
1720 * server.c (handle_qxfer_exec_file): New function.
1721 (qxfer_packets): Add exec-file entry.
1722 (handle_query): Report qXfer:exec-file:read as supported packet.
1723
62828379
RN
17242015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
1725
1726 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
1727
b88bb450
GB
17282015-04-09 Gary Benson <gbenson@redhat.com>
1729
1730 * hostio-errno.c (errno_to_fileio_error): Remove function.
1731 Update caller to use remote_fileio_to_fio_error.
1732
c8f4bfdd
YQ
17332015-04-09 Yao Qi <yao.qi@linaro.org>
1734
1735 * linux-low.c (linux_insert_point): Call
1736 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
1737 (linux_remove_point): Call remove_memory_breakpoint if type is
1738 raw_bkpt_type_sw.
1739 * linux-x86-low.c (x86_insert_point): Don't call
1740 insert_memory_breakpoint.
1741 (x86_remove_point): Don't call remove_memory_breakpoint.
1742
41f98f02
PA
17432015-04-01 Pedro Alves <palves@redhat.com>
1744 Cleber Rosa <crosa@redhat.com>
1745
1746 * server.c (gdbserver_usage): Reorganize and extend the usage
1747 message.
1748
2bf6fb9d
PA
17492015-03-24 Pedro Alves <palves@redhat.com>
1750
1751 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
1752 output. Also dump TRAP_TRACE.
1753 (linux_low_filter_event): In debug output, distinguish a
1754 resume_stop SIGSTOP from a delayed SIGSTOP.
1755
369f6daa
GB
17562015-03-24 Gary Benson <gbenson@redhat.com>
1757
1758 * linux-x86-low.c (x86_linux_new_thread): Moved to
1759 nat/x86-linux.c.
1760 (x86_linux_prepare_to_resume): Likewise.
1761
8e5d4070
GB
17622015-03-24 Gary Benson <gbenson@redhat.com>
1763
1764 * Makefile.in (x86-linux-dregs.o): New rule.
1765 * configure.srv: Add x86-linux-dregs.o to relevant targets.
1766 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
1767 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
1768 (x86_linux_dr_get): Likewise.
1769 (x86_linux_dr_set): Likewise.
1770 (update_debug_registers_callback): Likewise.
1771 (x86_linux_dr_set_addr): Likewise.
1772 (x86_linux_dr_get_addr): Likewise.
1773 (x86_linux_dr_set_control): Likewise.
1774 (x86_linux_dr_get_control): Likewise.
1775 (x86_linux_dr_get_status): Likewise.
1776 (x86_linux_update_debug_registers): Likewise.
1777
2b95d440
GB
17782015-03-24 Gary Benson <gbenson@redhat.com>
1779
1780 * linux-x86-low.c (x86_linux_update_debug_registers):
1781 New function, factored out from...
1782 (x86_linux_prepare_to_resume): ...this.
1783
14b0bc68
GB
17842015-03-24 Gary Benson <gbenson@redhat.com>
1785
1786 * linux-x86-low.c (x86_linux_dr_get): Update comments.
1787 (x86_linux_dr_set): Likewise.
1788 (update_debug_registers_callback): Likewise.
1789 (x86_linux_dr_set_addr): Likewise.
1790 (x86_linux_dr_get_addr): Likewise.
1791 (x86_linux_dr_set_control): Likewise.
1792 (x86_linux_dr_get_control): Likewise.
1793 (x86_linux_dr_get_status): Likewise.
1794 (x86_linux_prepare_to_resume): Likewise.
1795
5dfe6ca8
GB
17962015-03-24 Gary Benson <gbenson@redhat.com>
1797
1798 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
1799 Use perror_with_name. Pass string through gettext.
1800 (x86_linux_dr_set): Likewise.
1801
d33472ad
GB
18022015-03-24 Gary Benson <gbenson@redhat.com>
1803
1804 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
1805 (x86_linux_dr_set_addr): ...this.
1806 (x86_dr_low_get_addr): Rename to...
1807 (x86_linux_dr_get_addr): ...this.
1808 (x86_dr_low_set_control): Rename to...
1809 (x86_linux_dr_set_control): ...this.
1810 (x86_dr_low_get_control): Rename to...
1811 (x86_linux_dr_get_control): ...this.
1812 (x86_dr_low_get_status): Rename to...
1813 (x86_linux_dr_get_status): ...this.
1814 (x86_dr_low): Update with new function names.
1815
4b134ca1
GB
18162015-03-24 Gary Benson <gbenson@redhat.com>
1817
1818 * Makefile.in (x86-linux.o): New rule.
1819 * configure.srv: Add x86-linux.o to relevant targets.
1820 * linux-low.c (lwp_set_arch_private_info): New function.
1821 (lwp_arch_private_info): Likewise.
1822 * linux-x86-low.c: Include nat/x86-linux.h.
1823 (arch_lwp_info): Removed structure.
1824 (update_debug_registers_callback):
1825 Use lwp_set_debug_registers_changed.
1826 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
1827 and lwp_set_debug_registers_changed.
1828 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
1829
34c703da
GB
18302015-03-24 Gary Benson <gbenson@redhat.com>
1831
1832 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
1833 * linux-arm-low.c (arm_new_thread): Likewise.
1834 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
1835 * linux-mips-low.c (mips_linux_new_thread): Likewise.
1836 * linux-x86-low.c (x86_linux_new_thread): Likewise.
1837 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
1838
cff068da
GB
18392015-03-24 Gary Benson <gbenson@redhat.com>
1840
1841 * linux-low.c (ptid_of_lwp): New function.
1842 (lwp_is_stopped): Likewise.
1843 (lwp_stop_reason): Likewise.
1844 * linux-x86-low.c (update_debug_registers_callback):
1845 Use lwp_is_stopped.
1846 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
1847 lwp_stop_reason.
1848
b2f7c7e8
GB
18492015-03-24 Gary Benson <gbenson@redhat.com>
1850
1851 * linux-low.h (linux_stop_lwp): Remove declaration.
1852
6d4ee8c6
GB
18532015-03-24 Gary Benson <gbenson@redhat.com>
1854
1855 * linux-low.h: Include nat/linux-nat.h.
1856 * linux-low.c (iterate_over_lwps_args): New structure.
1857 (iterate_over_lwps_filter): New function.
1858 (iterate_over_lwps): Likewise.
1859 * linux-x86-low.c (update_debug_registers_callback):
1860 Update signature to what iterate_over_lwps expects.
1861 Remove PID check that iterate_over_lwps now performs.
1862 (x86_dr_low_set_addr): Use iterate_over_lwps.
1863 (x86_dr_low_set_control): Likewise.
1864
70a0bb6b
GB
18652015-03-24 Gary Benson <gbenson@redhat.com>
1866
1867 * linux-x86-low.c (x86_debug_reg_state): New function.
1868 (x86_linux_prepare_to_resume): Use the above.
1869
7b669087
GB
18702015-03-24 Gary Benson <gbenson@redhat.com>
1871
1872 * linux-low.c (current_lwp_ptid): New function.
1873 * linux-x86-low.c: Include nat/linux-nat.h.
1874 (x86_dr_low_get_addr): Use current_lwp_ptid.
1875 (x86_dr_low_get_control): Likewise.
1876 (x86_dr_low_get_status): Likewise.
1877
eef49a3d
PA
18782015-03-20 Pedro Alves <palves@redhat.com>
1879
1880 * tracepoint.c (cmd_qtstatus): Make "str" const.
1881
b2333d22
PA
18822015-03-20 Pedro Alves <palves@redhat.com>
1883
1884 * server.c (handle_general_set): Make "req_str" const.
1885
23f238d3
PA
18862015-03-19 Pedro Alves <palves@redhat.com>
1887
1888 * linux-low.c (linux_resume_one_lwp): Rename to ...
1889 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
1890 instead call perror_with_name.
1891 (check_ptrace_stopped_lwp_gone): New function.
1892 (linux_resume_one_lwp): Reimplement as wrapper around
1893 linux_resume_one_lwp_throw that swallows errors if the LWP is
1894 gone.
1895
91baf43f
PA
18962015-03-19 Pedro Alves <palves@redhat.com>
1897
1898 * linux-low.c (count_events_callback, select_event_lwp_callback):
1899 No longer check whether the thread has resume_stop as last resume
1900 kind.
1901
8bf3b159
PA
19022015-03-19 Pedro Alves <palves@redhat.com>
1903
1904 * linux-low.c (count_events_callback, select_event_lwp_callback):
1905 Use the lwp's status_pending_p field, not the thread's.
1906
b90fc188
PA
19072015-03-19 Pedro Alves <palves@redhat.com>
1908
1909 * linux-low.c (select_event_lwp_callback): Update comments to
1910 no longer mention SIGTRAP.
1911
464b0089
GB
19122015-03-18 Gary Benson <gbenson@redhat.com>
1913
1914 * server.c (handle_query): Do not report vFile:fstat as supported.
1915
aa9e327f
GB
19162015-03-11 Gary Benson <gbenson@redhat.com>
1917
1918 * hostio.c (sys/types.h): New include.
1919 (sys/stat.h): Likewise.
1920 (common-remote-fileio.h): Likewise.
1921 (handle_fstat): New function.
1922 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 1923
791c0056
GB
19242015-03-11 Gary Benson <gbenson@redhat.com>
1925
1926 * configure.ac (AC_CHECK_MEMBERS): Add checks for
1927 struct stat.st_blocks and struct stat.st_blksize.
1928 * configure: Regenerate.
1929 * config.in: Likewise.
1930 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
1931 (OBS): Add common-remote-fileio.o.
1932 (common-remote-fileio.o): New rule.
1933
9a9df970
PA
19342015-03-09 Pedro Alves <palves@redhat.com>
1935
1936 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
1937 'struct sockaddr' pointer in 'accept' call.
1938
9eb1356e
PA
19392015-03-09 Pedro Alves <palves@redhat.com>
1940
1941 Revert:
1942 2015-03-07 Pedro Alves <palves@redhat.com>
1943 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
1944 or <winsock2.h> here. Instead include "gdb_socket.h".
1945 (remote_open): Use union gdb_sockaddr_u.
1946 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
1947 or <winsock2.h> here. Instead include "gdb_socket.h".
1948 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
1949 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
1950 or <sys/un.h>.
1951 (init_named_socket, gdb_agent_helper_thread): Use union
1952 gdb_sockaddr_u.
1953
aac331e4
PA
19542015-03-07 Pedro Alves <palves@redhat.com>
1955
1956 * configure.ac (build_warnings): Move
1957 -Wdeclaration-after-statement to the C-specific set.
1958 * configure: Regenerate.
1959
366c75fc
PA
19602015-03-07 Pedro Alves <palves@redhat.com>
1961
1962 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
1963 or <winsock2.h> here. Instead include "gdb_socket.h".
1964 (remote_open): Use union gdb_sockaddr_u.
1965 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
1966 or <winsock2.h> here. Instead include "gdb_socket.h".
1967 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
1968 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
1969 or <sys/un.h>.
1970 (init_named_socket, gdb_agent_helper_thread): Use union
1971 gdb_sockaddr_u.
1972
492d29ea
PA
19732015-03-07 Pedro Alves <palves@redhat.com>
1974
1975 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
1976 instead.
1977
60a191ed
YQ
19782015-03-06 Yao Qi <yao.qi@linaro.org>
1979
1980 * linux-aarch64-low.c (aarch64_insert_point): Use
1981 show_debug_regs as a boolean.
1982 (aarch64_remove_point): Likewise.
1983
f5771b1d
PA
19842015-03-05 Pedro Alves <palves@redhat.com>
1985
1986 * lynx-low.c (lynx_target_ops): Install NULL hooks for
1987 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
1988 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
1989 * nto-low.c (nto_target_ops): Likewise.
1990 * spu-low.c (spu_target_ops): Likewise.
1991 * win32-low.c (win32_target_ops): Likewise.
1992
3e572f71
PA
19932015-03-04 Pedro Alves <palves@redhat.com>
1994
72f4393d 1995 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
1996 Decide whether a breakpoint triggered based on the SIGTRAP's
1997 siginfo.si_code.
72f4393d
L
1998 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
1999 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
2000 (linux_low_filter_event): Check for breakpoints before checking
2001 watchpoints.
2002 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
2003 siginfo.si_code.
72f4393d
L
2004 (linux_stopped_by_sw_breakpoint)
2005 (linux_supports_stopped_by_sw_breakpoint)
2006 (linux_stopped_by_hw_breakpoint)
2007 (linux_supports_stopped_by_hw_breakpoint): New functions.
2008 (linux_target_ops): Install new target methods.
3e572f71 2009
1ec68e26
PA
20102015-03-04 Pedro Alves <palves@redhat.com>
2011
2012 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
2013 * server.c (swbreak_feature, hwbreak_feature): New globals.
2014 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
2015 (captured_main): Clear swbreak_feature and hwbreak_feature.
2016 * server.h (swbreak_feature, hwbreak_feature): Declare.
2017 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
2018 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
2019 supports_stopped_by_hw_breakpoint>: New fields.
2020 (target_supports_stopped_by_sw_breakpoint)
2021 (target_stopped_by_sw_breakpoint)
2022 (target_supports_stopped_by_hw_breakpoint)
2023 (target_stopped_by_hw_breakpoint): Declare.
2024
15c66dd6
PA
20252015-03-04 Pedro Alves <palves@redhat.com>
2026
2027 enum lwp_stop_reason -> enum target_stop_reason
2028 * linux-low.c (check_stopped_by_breakpoint): Adjust.
2029 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
2030 (linux_wait_1, stuck_in_jump_pad_callback)
2031 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
2032 (linux_stopped_by_watchpoint):
2033 * linux-low.h (enum lwp_stop_reason): Delete.
2034 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
2035 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
2036
98fc70d6
YQ
20372015-03-04 Yao Qi <yao.qi@linaro.org>
2038
2039 * Makefile.in (SFILES): Add linux-aarch64-low.c.
2040
dd2ac174
GB
20412015-03-03 Gary Benson <gbenson@redhat.com>
2042
2043 * hostio.c (handle_vFile): Fix prefix lengths.
2044
d68e53f4
MM
20452015-03-03 Markus Metzger <markus.t.metzger@intel.com>
2046
2047 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
2048 ptr_bits.
2049
bf2d68ab
AA
20502015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
2051
2052 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
2053 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
2054 (clean): Add "rm -f" for above C files.
2055 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
2056 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
2057 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
2058 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
2059 * linux-s390-low.c (HWCAP_S390_VX): New macro.
2060 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
2061 (init_registers_s390x_vx_linux64)
2062 (init_registers_s390x_tevx_linux64)
2063 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
2064 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
2065 declarations.
2066 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
2067 (s390_store_vxrs_high): New functions.
2068 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
2069 NT_S390_VXRS_HIGH.
2070 (s390_arch_setup): Add logic for selecting one of the new target
2071 descriptions. Activate the new vector regsets if applicable.
2072 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
2073 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
2074 and init_registers_s390x_tevx_linux64.
2075
c966a859
PA
20762015-03-01 Pedro Alves <palves@redhat.com>
2077
2078 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
2079 parameter.
2080
4180215b
PA
20812015-02-27 Pedro Alves <palves@redhat.com>
2082
2083 * linux-x86-low.c (u_debugreg_offset): New function.
2084 (x86_linux_dr_get, x86_linux_dr_set): Use it.
2085
749bab01
PA
20862015-02-27 Pedro Alves <palves@redhat.com>
2087
2088 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
2089 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
2090 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
2091 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
2092 (ps_lsetfpregs, ps_getpid)
2093 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
2094 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
2095 (ps_lsetxregs, ps_plog): Declare.
2096
3c14e5a3
PA
20972015-02-27 Pedro Alves <palves@redhat.com>
2098
2099 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
2100 IP_AGENT_EXPORT_FUNC.
2101 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
2102 IP_AGENT_EXPORT_FUNC.
2103 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
2104 (IP_AGENT_EXPORT): Delete.
2105 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
2106 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
2107 (gdb_trampoline_buffer_error, collecting, gdb_collect)
2108 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
2109 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
2110 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
2111 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
2112 (traceframe_read_count, traceframe_write_count)
2113 (traceframes_created, trace_state_variables, get_raw_reg)
2114 (get_trace_state_variable_value, set_trace_state_variable_value)
2115 (ust_loaded, helper_thread_id, cmd_buf): Use
2116 IPA_SYM_EXPORTED_NAME.
2117 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
2118 (tracepoints) Use IP_AGENT_EXPORT_VAR.
2119 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
2120 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2121 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
2122 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
2123 EXTERN_C_PUSH/EXTERN_C_POP.
2124 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
2125 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
2126 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2127 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
2128 (traceframe_write_count, traceframe_read_count)
2129 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
2130 (about_to_request_buffer_space, get_trace_state_variable_value)
2131 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
2132 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
2133 EXTERN_C_PUSH/EXTERN_C_POP.
2134 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
2135 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
2136 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
2137 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2138 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
2139 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
2140 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
2141 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
2142 Define.
2143 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
2144 (IP_AGENT_EXPORT_VAR_DECL): Define.
2145 (tracing): Declare.
2146 (gdb_agent_get_raw_reg): Declare.
2147
fe978cb0
PA
21482015-02-27 Tom Tromey <tromey@redhat.com>
2149 Pedro Alves <palves@redhat.com>
2150
2151 Rename symbols whose names are reserved C++ keywords throughout.
2152
3bc3d82a
PA
21532015-02-27 Pedro Alves <palves@redhat.com>
2154
2155 * Makefile.in (COMPILER): New, get it from autoconf.
2156 (CXX): Get from autoconf instead.
2157 (COMPILE.pre): Use COMPILER.
2158 (CC-LD): Rename to ...
2159 (CC_LD): ... this. Use COMPILER.
2160 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
2161 (CXX_FOR_TARGET): Default to g++ instead of gcc.
2162 * acinclude.m4: Include build-with-cxx.m4.
2163 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
2164 Disable -Werror by default if building in C++ mode.
2165 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
2166 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
2167 the C++ compiler. Save/restore CXXFLAGS too.
2168 * configure: Regenerate.
2169
07697489
PA
21702015-02-27 Pedro Alves <palves@redhat.com>
2171
2172 * acinclude.m4: Include libiberty.m4.
2173 * configure.ac: Call libiberty_INIT.
2174 * config.in, configure: Regenerate.
2175
9beb7c4e
PA
21762015-02-26 Pedro Alves <palves@redhat.com>
2177
2178 * linux-low.c (linux_wait_1): When incrementing the PC past a
2179 program breakpoint always use the_low_target.breakpoint_len as
2180 increment, rather than the maximum between that and
2181 the_low_target.decr_pc_after_break.
2182
8090aef2
PA
21832015-02-23 Pedro Alves <palves@redhat.com>
2184
2185 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
2186 thread was doing a step-over; always adjust the PC if
2187 we stepped over a permanent breakpoint.
2188 (linux_wait_1): If we stepped over breakpoint that was on top of a
2189 permanent breakpoint, manually advance the PC past it.
2190
bc9540e8
PA
21912015-02-23 Pedro Alves <palves@redhat.com>
2192
2193 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
2194 modes.
2195 (x86_fill_gregset, x86_store_gregset): Use it when handling
2196 $orig_eax.
2197
2db9a427
PA
21982015-02-20 Pedro Alves <palves@redhat.com>
2199
2200 * thread-db.c: Include "nat/linux-procfs.h".
2201 (thread_db_init): Skip listing new threads if the kernel supports
2202 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
2203
afa8d396
PA
22042015-02-20 Pedro Alves <palves@redhat.com>
2205
2206 * linux-low.c (status_pending_p_callback): Use ptid_match.
2207
c9587f88
AT
22082015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
2209
2210 PR breakpoints/16812
2211 * linux-low.c (wstatus_maybe_breakpoint): Remove.
2212 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
2213 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
2214
b05ec7a5
AT
22152015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
2216
2217 PR breakpoints/15956
2218 * tracepoint.c (cmd_qtinit): Add check for current_thread.
2219
d33501a5
MM
22202015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2221
2222 * linux-low.c (linux_low_btrace_conf): Print size.
2223 * server.c (handle_btrace_conf_general_set): New.
2224 (hanle_general_set): Call handle_btrace_conf_general_set.
2225 (handle_query): Report Qbtrace-conf:bts:size as supported.
2226
f4abbc16
MM
22272015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2228
2229 * linux-low.c (linux_low_enable_btrace): Update parameters.
2230 (linux_low_btrace_conf): New.
2231 (linux_target_ops)<to_btrace_conf>: Initialize.
2232 * server.c (current_btrace_conf): New.
2233 (handle_btrace_enable): Rename to ...
2234 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
2235 to target_enable_btrace. Update comment. Update users.
2236 (handle_qxfer_btrace_conf): New.
2237 (qxfer_packets): Add btrace-conf entry.
2238 (handle_query): Report qXfer:btrace-conf:read as supported packet.
2239 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
2240 (target_ops)<read_btrace_conf>: New.
2241 (target_enable_btrace): Update parameters.
2242 (target_read_btrace_conf): New.
2243
043c3577
MM
22442015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2245
2246 * server.c (handle_btrace_general_set): Remove call to
2247 target_supports_btrace.
2248 (supported_btrace_packets): New.
2249 (handle_query): Call supported_btrace_packets.
2250 * target.h: include btrace-common.h.
2251 (btrace_target_info): Removed.
2252 (supports_btrace, target_supports_btrace): Update parameters.
2253
734b0e4b
MM
22542015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2255
2256 * Makefile.in (SFILES): Add common/btrace-common.c.
2257 (OBS): Add common/btrace-common.o.
2258 (btrace-common.o): Add build rules.
2259 * linux-low: Include btrace-common.h.
2260 (linux_low_read_btrace): Use struct btrace_data. Call
2261 btrace_data_init and btrace_data_fini.
2262
d6c146e9
PA
22632015-02-06 Pedro Alves <palves@redhat.com>
2264
2265 * thread-db.c (find_new_threads_callback): Add debug output.
2266
20ba1ce6
PA
22672015-02-04 Pedro Alves <palves@redhat.com>
2268
2269 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
2270 (resume_stopped_resumed_lwps): New function.
2271 (linux_wait_for_event_filtered): Use it.
2272
8cc73a39
SDJ
22732015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
2274
2275 * Makefile.in (SFILES): Add linux-personality.c.
2276 (linux-personality.o): New rule.
2277 * configure.srv (srv_linux_obj): Add linux-personality.o to the
2278 list of objects to be built.
2279 * linux-low.c: Include nat/linux-personality.h.
2280 (linux_create_inferior): Remove code to disable address space
2281 randomization (moved to ../nat/linux-personality.c). Create
2282 cleanup to disable address space randomization.
2283
fb23d554
SDJ
22842015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
2285
2286 * Makefile.in (posix-strerror.o): New rule.
2287 (mingw-strerror.o): Likewise.
2288 * configure: Regenerated.
2289 * configure.ac: Source file ../common/common.host. Initialize new
2290 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
2291
cdf43629
YQ
22922015-01-14 Yao Qi <yao@codesourcery.com>
2293
2294 * Makefile.in (SFILES): Add nat/ppc-linux.c.
2295 (ppc-linux.o): New rule.
2296 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
2297 * configure.ac: AC_CHECK_FUNCS(getauxval).
2298 * config.in: Re-generated.
2299 * configure: Re-generated.
2300 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
2301 ppc64_64bit_inferior_p
2302
514c5338
YQ
23032015-01-14 Yao Qi <yao@codesourcery.com>
2304
2305 * linux-ppc-low.c: Include "nat/ppc-linux.h".
2306 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
2307 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
2308 (PT_ORIG_R3, PT_TRAP): Likewise.
2309 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
2310 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
2311 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
2312
3368c1e5
JB
23132015-01-10 Joel Brobecker <brobecker@adacore.com>
2314
2315 * i387-fp.c (i387_cache_to_xsave): In look over
2316 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
2317 zmmh_low_space field by use of zmmh_high_space.
2318
582511be
PA
23192015-01-09 Pedro Alves <palves@redhat.com>
2320
2321 * linux-low.c (step_over_bkpt): Move higher up in the file.
2322 (handle_extended_wait): Don't store the stop_pc here.
2323 (get_stop_pc): Adjust comments and rename to ...
2324 (check_stopped_by_breakpoint): ... this. Record whether the LWP
2325 stopped for a software breakpoint or hardware breakpoint.
2326 (thread_still_has_status_pending_p): New function.
2327 (status_pending_p_callback): Use
2328 thread_still_has_status_pending_p. If the event is no longer
2329 interesting, resume the LWP.
2330 (handle_tracepoints): Add assert.
2331 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
2332 (wstatus_maybe_breakpoint): New function.
2333 (cancel_breakpoint): Delete function.
2334 (check_stopped_by_watchpoint): New function, factored out from
2335 linux_low_filter_event.
2336 (lp_status_maybe_breakpoint): Delete function.
2337 (linux_low_filter_event): Remove filter_ptid argument.
2338 Leave thread group exits pending here. Store the LWP's stop PC.
2339 Always leave events pending.
2340 (linux_wait_for_event_filtered): Pull all events out of the
2341 kernel, and leave them all pending.
2342 (count_events_callback, select_event_lwp_callback): Consider all
2343 events.
2344 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
2345 (select_event_lwp): Only give preference to the stepping LWP in
2346 all-stop mode. Adjust comments.
2347 (ignore_event): New function.
2348 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
2349 references to cancel_breakpoints. Adjust to renames. Also give
2350 equal priority to all LWPs that have had events in non-stop mode.
2351 If reporting a software breakpoint event, unadjust the LWP's PC.
2352 (linux_wait): If linux_wait_1 returned an ignored event, retry.
2353 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
2354 Adjust.
2355 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
2356 (resume_status_pending_p): Use thread_still_has_status_pending_p.
2357 (linux_stopped_by_watchpoint): Adjust.
2358 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
2359 * linux-low.h (enum lwp_stop_reason): New.
2360 (struct lwp_info) <stop_pc>: Adjust comment.
2361 <stopped_by_watchpoint>: Delete field.
2362 <stop_reason>: New field.
2363 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
2364 * mem-break.c (software_breakpoint_inserted_here)
2365 (hardware_breakpoint_inserted_here): New function.
2366 * mem-break.h (software_breakpoint_inserted_here)
2367 (hardware_breakpoint_inserted_here): Declare.
2368 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
2369 (cancel_breakpoints): Delete.
2370 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
2371 (upload_fast_traceframes): Remove references to
2372 cancel_breakpoints.
2373
a33e3959
PA
23742015-01-09 Pedro Alves <palves@redhat.com>
2375
2376 * thread-db.c (find_new_threads_callback): Ignore thread if the
2377 kernel thread ID is -1.
2378
8784d563
PA
23792015-01-09 Pedro Alves <palves@redhat.com>
2380
2381 * linux-low.c (linux_attach_fail_reason_string): Move to
2382 nat/linux-ptrace.c, and rename.
2383 (linux_attach_lwp): Update comment.
2384 (attach_proc_task_lwp_callback): New function.
2385 (linux_attach): Adjust to rename and use
2386 linux_proc_attach_tgid_threads.
2387 (linux_attach_fail_reason_string): Delete declaration.
2388
76f2b779
JB
23892015-01-01 Joel Brobecker <brobecker@adacore.com>
2390
2391 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
2392 * server.c (gdbserver_version): Likewise.
2393
fafcc06a
SDJ
23942014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
2395
2396 * remote-utils.c: Include ctype.h.
2397 (input_interrupt): Explicitly handle the case when the char
2398 received is the NUL byte. Improve the printing of non-ASCII
2399 characters.
2400
beed38b8
JB
24012014-12-16 Joel Brobecker <brobecker@adacore.com>
2402
2403 * linux-low.c (linux_low_filter_event): Update call to
2404 linux_enable_event_reporting following the addition of
2405 a new parameter to that function.
2406
bf330350
CU
24072014-12-16 Catalin Udma <catalin.udma@freescale.com>
2408
2409 PR server/17457
2410 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
2411 (AARCH64_FPCR_REGNO): Likewise.
2412 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
2413 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
2414 (aarch64_store_fpregset): Likewise.
2415
5227d625
JB
24162014-12-15 Joel Brobecker <brobecker@adacore.com>
2417
2418 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
2419 Remove FIXME comment about assumption about N.
2420
f93b65a0
JB
24212014-12-13 Joel Brobecker <brobecker@adacore.com>
2422
2423 * configure.ac: If large-file support is disabled in GDBserver,
2424 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
2425 * configure: Regenerate.
2426
e5a9158d
AA
24272014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2428
2429 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
2430 warning upon ENODATA from ptrace.
2431 * linux-s390-low.c (s390_store_tdb): New.
2432 (s390_regsets): Add regset for NT_S390_TDB.
2433
feea5f36
AA
24342014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2435
2436 * linux-low.c (regsets_store_inferior_registers): Skip regsets
2437 without a fill_function.
2438 * linux-s390-low.c (s390_fill_last_break): Remove.
2439 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
2440 (s390_arch_setup): Use regset's size instead of fill_function for
2441 loop end condition.
2442
098dbe61
AA
24432014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2444
2445 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
2446 the regset's store function when ptrace returned an error.
2447 * regcache.c (get_thread_regcache): Invalidate register cache
2448 before fetching inferior's registers.
2449
28eef672
AA
24502014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2451
2452 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
2453 while-loop as for-loop.
2454 (regsets_store_inferior_registers): Likewise.
2455
bdca27a2
YQ
24562014-11-28 Yao Qi <yao@codesourcery.com>
2457
2458 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
2459 * config.in, configure: Re-generate.
2460 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
2461 is defined.
2462
9c232dda
YQ
24632014-11-21 Yao Qi <yao@codesourcery.com>
2464
2465 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
2466 (AC_CHECK_HEADERS): Remove malloc.h.
2467 * configure: Re-generated.
2468 * config.in: Re-generated.
2469 * server.h: Don't include alloca.h and malloc.h.
2470 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
2471 Don't include malloc.h.
2472
43968415
JB
24732014-11-17 Joel Brobecker <brobecker@adacore.com>
2474
2475 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
2476 corresponding ERRNO check in same block.
2477
40e91bc7
PA
24782014-11-12 Pedro Alves <palves@redhat.com>
2479
2480 * server.c (cont_thread): Update comment.
2481 (start_inferior, attach_inferior): No longer clear cont_thread.
2482 (handle_v_cont): No longer set cont_thread.
2483 (captured_main): Clear cont_thread each time a GDB connects.
2484
c2c118cf
PA
24852014-11-12 Pedro Alves <palves@redhat.com>
2486
2487 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
2488 thread, and don't resume all threads if the Hc thread has exited.
2489
78708b7c
PA
24902014-11-12 Pedro Alves <palves@redhat.com>
2491
2492 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
2493 the process group instead of to a specific LWP.
2494
a2abc7de
PA
24952014-10-15 Pedro Alves <palves@redhat.com>
2496
2497 PR server/17487
2498 * win32-arm-low.c (arm_set_thread_context): Remove current_event
2499 parameter.
2500 (arm_set_thread_context): Delete.
2501 (the_low_target): Adjust.
2502 * win32-i386-low.c (debug_registers_changed)
2503 (debug_registers_used): Delete.
2504 (update_debug_registers_callback): New function.
2505 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
2506 needing to update their debug registers.
2507 (win32_get_current_dr): New function.
2508 (x86_dr_low_get_addr, x86_dr_low_get_control)
2509 (x86_dr_low_get_status): Fetch the debug register from the thread
2510 record's context.
2511 (i386_initial_stuff): Adjust.
2512 (i386_get_thread_context): Remove current_event parameter. Don't
2513 clear debug_registers_changed nor copy DR values to
2514 debug_reg_state.
2515 (i386_set_thread_context): Delete.
2516 (i386_prepare_to_resume): New function.
2517 (i386_thread_added): Mark the thread as needing to update irs
2518 debug registers.
2519 (the_low_target): Remove i386_set_thread_context and install
2520 i386_prepare_to_resume.
2521 * win32-low.c (win32_get_thread_context): Adjust.
2522 (win32_set_thread_context): Use SetThreadContext
2523 directly.
2524 (win32_prepare_to_resume): New function.
2525 (win32_require_context): New function, factored out from ...
2526 (thread_rec): ... this.
2527 (continue_one_thread): Call win32_prepare_to_resume on each thread
2528 we're about to continue.
2529 (win32_resume): Call win32_prepare_to_resume on the event thread.
2530 * win32-low.h (struct win32_thread_info)
2531 <debug_registers_changed>: New field.
2532 (struct win32_target_ops): Change prototype of set_thread_context,
2533 delete set_thread_context and add prepare_to_resume.
2534 (win32_require_context): New declaration.
2535
a442d071
GB
25362014-10-08 Gary Benson <gbenson@redhat.com>
2537
2538 * server.h: Do not include common-exceptions.h.
2539
6f1947e8
GB
25402014-10-08 Gary Benson <gbenson@redhat.com>
2541
2542 * server.h: Do not include cleanups.h.
2543
63b434a4
JH
25442014-09-30 James Hogan <james.hogan@imgtec.com>
2545
2546 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
2547 mips64-dsp-linux.c.
2548
c4d9ceb6
YQ
25492014-09-23 Yao Qi <yao@codesourcery.com>
2550
2551 * linux-low.c (lp_status_maybe_breakpoint): New function.
2552 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
2553 (count_events_callback): Likewise.
2554 (select_event_lwp_callback): Likewise.
2555 (cancel_breakpoints_callback): Likewise.
2556
89a5711c
DB
25572014-09-19 Don Breazeal <donb@codesourcery.com>
2558
2559 * linux-low.c (handle_extended_wait): Call
2560 linux_ptrace_get_extended_event.
2561 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
2562 linux_is_extended_waitstatus.
2563
bffc0964
JB
25642014-09-16 Joel Brobecker <brobecker@adacore.com>
2565
2566 * Makefile.in (CPPFLAGS): Define.
2567 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
2568 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
2569
0bfdf32f
GB
25702014-09-16 Gary Benson <gbenson@redhat.com>
2571
2572 * inferiors.h (current_inferior): Renamed as...
2573 (current_thread): New variable. All uses updated.
2574 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
2575 (maybe_move_out_of_jump_pad): Likewise.
2576 (cancel_breakpoint): Likewise.
2577 (linux_low_filter_event): Likewise.
2578 (wait_for_sigstop): Likewise.
2579 (linux_resume_one_lwp): Likewise.
2580 (need_step_over_p): Likewise.
2581 (start_step_over): Likewise.
2582 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
2583 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
2584 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
2585 and save_inferior as saved_thread.
2586 * regcache.c (get_thread_regcache): Renamed saved_inferior as
2587 saved_thread.
2588 (regcache_invalidate_thread): Likewise.
2589 * remote-utils.c (prepare_resume_reply): Likewise.
2590 * thread-db.c (thread_db_get_tls_address): Likewise.
2591 (disable_thread_event_reporting): Likewise.
2592 (remove_thread_event_breakpoints): Likewise.
2593 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
2594 as saved_thread.
2595 * target.h (set_desired_inferior): Renamed as...
2596 (set_desired_thread): New declaration. All uses updated.
2597 * server.c (myresume): Updated comment to reference thread instead
2598 of inferior.
2599 (handle_serial_event): Likewise.
2600 (handle_target_event): Likewise.
2601
361c8ade
GB
26022014-09-12 Tom Tromey <tromey@redhat.com>
2603 Gary Benson <gbenson@redhat.com>
2604
2605 * regcache.h: Include common-regcache.h.
2606 (regcache_read_pc): Don't declare.
2607 * regcache.c (get_thread_regcache_for_ptid): New function.
2608
bd9269f7
GB
26092014-09-11 Tom Tromey <tromey@redhat.com>
2610 Gary Benson <gbenson@redhat.com>
2611
2612 * symbol.c: New file.
2613 * Makefile.in (SFILES): Add symbol.c.
2614 (OBS): Add symbol.o.
2615
f8c1d06b
GB
26162014-09-11 Gary Benson <gbenson@redhat.com>
2617
2618 * target.c (target_stop_ptid, target_continue_ptid): New
2619 functions.
2620
721ec300
GB
26212014-09-11 Tom Tromey <tromey@redhat.com>
2622 Gary Benson <gbenson@redhat.com>
2623
2624 * target.h: Include target/target.h.
2625 * target.c (target_read_memory, target_read_uint32)
2626 (target_write_memory): New functions.
2627
c5e92cca
GB
26282014-09-11 Gary Benson <gbenson@redhat.com>
2629
2630 * server.h (debug_hw_points): Don't declare.
2631 * server.c (debug_hw_points): Don't define. Replace all uses
2632 with show_debug_regs.
2633 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
2634 all uses with show_debug_regs.
2635
2e4bb98a
EBM
26362014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
2637
2638 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
2639 endianness into account.
2640 (ppc_supply_ptrace_register): Likewise.
2641
ac740bc7
JH
26422014-09-03 James Hogan <james.hogan@imgtec.com>
2643
2644 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
2645 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
2646
97ea6506
GB
26472014-09-03 Gary Benson <gbenson@redhat.com>
2648
2649 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
2650 ALL_DEBUG_ADDRESS_REGISTERS.
2651
df7e5265
GB
26522014-09-02 Gary Benson <gbenson@redhat.com>
2653
2654 * i386-low.h: Renamed as...
2655 * x86-low.h: New file. All type, function and variable name
2656 prefixes changed from "i386_" to "x86_". All references updated.
2657 * i386-low.c: Renamed as...
2658 * x86-low.c: New file. All type, function and variable name
2659 prefixes changed from "i386_" to "x86_". All references updated.
2660
ed859da7
GB
26612014-09-02 Gary Benson <gbenson@redhat.com>
2662
2663 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
2664 (x86_linux_new_thread): Likewise.
2665
860789c7
GB
26662014-08-29 Gary Benson <gbenson@redhat.com>
2667
2668 * server.h (setjmp.h): Do not include.
2669 (toplevel): Do not declare.
2670 (common-exceptions.h): Include.
2671 (cleanups.h): Likewise.
2672 * server.c (toplevel): Do not define.
2673 (exit_code): New static global.
2674 (detach_or_kill_for_exit_cleanup): New function.
2675 (main): New function. Original main renamed to...
2676 (captured_main): New function.
2677 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
2678
ff55e1b5
GB
26792014-08-29 Gary Benson <gbenson@redhat.com>
2680
2681 * Makefile.in (SFILES): Add common/common-exceptions.c.
2682 (OBS): Add common-exceptions.o.
2683 (common-exceptions.o): New rule.
2684 * utils.c (prepare_to_throw_exception): New function.
2685
e9bcb658
GB
26862014-08-29 Gary Benson <gbenson@redhat.com>
2687
2688 * config.in: Regenerate.
2689 * configure: Likewise.
2690
e3180625
GB
26912014-08-29 Gary Benson <gbenson@redhat.com>
2692
2693 * Makefile.in (SFILES): Add common/cleanups.c.
2694 (OBS): cleanups.o.
2695 (cleanups.o): New rule.
2696
e3d6ba5d
GB
26972014-08-29 Gary Benson <gbenson@redhat.com>
2698
2699 * utils.c (internal_vwarning): New function.
2700
7096e886
GB
27012014-08-28 Gary Benson <gbenson@redhat.com>
2702
2703 * utils.h (fatal): Remove declaration.
2704 * utils.c (fatal): Remove function.
2705
14ce3192
GB
27062014-08-28 Gary Benson <gbenson@redhat.com>
2707
2708 * tracepoint.c (gdb_agent_init): Replace fatal with
2709 perror_with_name.
2710 (initialize_tracepoint): Likewise.
2711
50278d59
GB
27122014-08-28 Gary Benson <gbenson@redhat.com>
2713
2714 * remote-utils.c (remote_prepare): Replace fatal with error.
2715
aa96c426
GB
27162014-08-28 Gary Benson <gbenson@redhat.com>
2717
2718 * linux-low.c (linux_async): Replace fatal with warning.
2719 Tidy up and return.
2720 (linux_start_non_stop): Return -1 if linux_async failed.
2721
f7160e97
GB
27222014-08-28 Gary Benson <gbenson@redhat.com>
2723
2724 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
2725 gdb_assert.
2726 (i386_dr_low_get_addr): Remove vague comment.
2727 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
2728 gdb_assert.
2729
38e08fca
GB
27302014-08-28 Gary Benson <gbenson@redhat.com>
2731
2732 * inferiors.c (get_thread_process): Replace check with gdb_assert.
2733 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
2734 internal_error.
2735 (linux_resume_one_lwp): Likewise.
2736 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
2737 gdb_assert.
2738 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
2739 with internal_error.
2740 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
2741 (init_register_cache): Replace fatal with gdb_assert_not_reached.
2742 (find_register_by_name): Replace fatal with internal_error.
2743 (find_regno): Likewise.
2744 * tdesc.c (init_target_desc): Replace check with gdb_assert.
2745 * thread-db.c (thread_db_create_event): Likewise.
2746 (thread_db_load_search): Likewise.
2747 (try_thread_db_load_1): Likewise.
2748 * tracepoint.c (get_jump_space_head): Replace fatal with
2749 internal_error.
2750 (claim_trampoline_space): Likewise.
2751 (have_fast_tracepoint_trampoline_buffer): Likewise.
2752 (cmd_qtstart): Likewise.
2753 (stop_tracing): Likewise.
2754 (fast_tracepoint_collecting): Likewise.
2755 (target_malloc): Likewise.
2756 (download_tracepoint): Likewise.
2757 (download_trace_state_variables): Replace check with gdb_assert.
2758 (upload_fast_traceframes): Replace fatal with internal_error.
2759
34abf635
GB
27602014-08-19 Tom Tromey <tromey@redhat.com>
2761 Gary Benson <gbenson@redhat.com>
2762
2763 * Makefile.in (SFILES): Add common/common-debug.c.
2764 (OBS): Add common-debug.o.
2765 (common-debug.o): New rule.
2766 * debug.h (debug_printf): Don't declare.
2767 * debug.c (debug_printf): Renamed and rewritten as...
2768 (debug_vprintf): New function.
2769
f6e94d78
GB
27702014-08-19 Gary Benson <gbenson@redhat.com>
2771
2772 * utils.h: Do not include print-utils.h.
2773
9239eeab
GB
27742014-08-19 Tom Tromey <tromey@redhat.com>
2775 Gary Benson <gbenson@redhat.com>
2776
2777 * server.h: Add static assertion.
2778 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
2779
ef87c8bb
GB
27802014-08-19 Tom Tromey <tromey@redhat.com>
2781 Gary Benson <gbenson@redhat.com>
2782
2783 * Makefile.in (SFILES): Add common/errors.c.
2784 (OBS): Add errors.o.
2785 (IPA_OBS): Add errors-ipa.o.
2786 (errors.o): New rule.
2787 (errors-ipa.o): Likewise.
2788 * utils.h (perror_with_name, error, warning): Don't declare.
2789 * utils.c (warning): Renamed and rewritten as...
2790 (vwarning): New function.
2791 (error): Renamed and rewritten as...
2792 (verror): New function.
2793 (internal_error): Renamed and rewritten as...
2794 (internal_verror): New function.
2795
bb974a24
GB
27962014-08-07 Gary Benson <gbenson@redhat.com>
2797
2798 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
2799 * configure: Regenerate.
2800 * config.in: Likewise.
2801 * server.h: Do not include errno.h.
2802 * event-loop.c: Likewise.
2803 * hostio-errno.c: Likewise.
2804 * linux-low.c: Likewise.
2805 * remote-utils.c: Likewise.
2806 * spu-low.c: Likewise.
2807 * utils.c: Likewise.
2808 * gdbreplay.c: Unconditionally include errno.h.
2809
6d3d12eb
GB
28102014-08-07 Gary Benson <gbenson@redhat.com>
2811
2812 * server.h: Do not include string.h.
2813 * event-loop.c: Likewise.
2814 * linux-low.c: Likewise.
2815 * regcache.c: Likewise.
2816 * remote-utils.c: Likewise.
2817 * spu-low.c: Likewise.
2818 * utils.c: Likewise.
2819
dccbb609
GB
28202014-08-07 Gary Benson <gbenson@redhat.com>
2821
2822 * server.h: Do not include gdb_assert.h.
2823
e76df0d0
GB
28242014-08-07 Gary Benson <gbenson@redhat.com>
2825
2826 * server.h: Do not include common-utils.h.
2827
4cb9c816
GB
28282014-08-07 Gary Benson <gbenson@redhat.com>
2829
2830 * server.h: Do not include ptid.h.
2831 * notif.h: Likewise.
2832
3995eeee
GB
28332014-08-07 Gary Benson <gbenson@redhat.com>
2834
2835 * server.h: Do not include gdb_locale.h.
2836
cb9f1a9b
GB
28372014-08-07 Gary Benson <gbenson@redhat.com>
2838
2839 * server.h: Do not include gdb/signals.h.
2840 * win32-low.c: Likewise.
2841
a5fceff8
GB
28422014-08-07 Gary Benson <gbenson@redhat.com>
2843
2844 * server.h: Do not include pathmax.h.
2845
b9391142
GB
28462014-08-07 Gary Benson <gbenson@redhat.com>
2847
2848 * server.h: Do not include libiberty.h.
2849 * linux-bfin-low.c: Likewise.
2850
0e443c87
GB
28512014-08-07 Gary Benson <gbenson@redhat.com>
2852
2853 * server.h: Do not include ansidecl.h.
2854
8ebb3f56
GB
28552014-08-07 Gary Benson <gbenson@redhat.com>
2856
2857 * linux-x86-low.c: Do not include stddef.h.
2858 * lynx-ppc-low.c: Likewise.
2859 * tracepoint.c: Likewise.
2860
8980bdf6
GB
28612014-08-07 Gary Benson <gbenson@redhat.com>
2862
2863 * server.h: Do not include stdarg.h.
2864 * nto-low.c: Likewise.
2865
d7096f71
GB
28662014-08-07 Gary Benson <gbenson@redhat.com>
2867
2868 * server.h: Do not include stdlib.h.
2869 * inferiors.c: Likewise.
2870 * linux-low.c: Likewise.
2871 * regcache.c: Likewise.
2872 * spu-low.c: Likewise.
2873 * tracepoint.c: Likewise.
2874 * utils.c: Likewise.
2875
d02f550d
GB
28762014-08-07 Gary Benson <gbenson@redhat.com>
2877
2878 * server.h: Do not include stdio.h.
2879 * linux-low.c: Likewise.
2880 * remote-utils.c: Likewise.
2881 * spu-low.c: Likewise.
2882 * utils.c: Likewise.
2883 * wincecompat.c: Likewise.
2884
87f6c4e3
GB
28852014-08-06 Gary Benson <gbenson@redhat.com>
2886
2887 * regcache.c (init_register_cache): Move conditionals inside if.
2888
7089dca4
GB
28892014-08-06 Gary Benson <gbenson@redhat.com>
2890
2891 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
2892
462f517e
GB
28932014-07-31 Gary Benson <gbenson@redhat.com>
2894
2895 * ax.h: Do not include server.h.
2896 * gdbthread.h: Likewise.
2897 * lynx-low.h: Likewise.
2898 * notif.h: Likewise.
2899
976411d6
GB
29002014-07-30 Gary Benson <gbenson@redhat.com>
2901
2902 * server.h: Include common-defs.h.
2903 Do not include config.h or build-gnulib-gdbserver/config.h.
2904
d41f6d8e
GB
29052014-07-30 Gary Benson <gbenson@redhat.com>
2906
2907 * hostio-errno.c: Move server.h to top of includes list.
2908 * inferiors.c: Likewise.
2909 * linux-x86-low.c: Likewise.
2910 * notif.c: Include server.h.
2911
314c6a35
TT
29122014-07-24 Tom Tromey <tromey@redhat.com>
2913 Gary Benson <gbenson@redhat.com>
2914
2915 * server.h (CORE_ADDR): Now unsigned.
2916
69ff6be5
PA
29172014-07-16 Pedro Alves <palves@redhat.com>
2918
2919 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
2920
ce9e3fe7
PA
29212014-07-15 Pedro Alves <palves@redhat.com>
2922
2923 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
2924 copy.
2925
e76126e8
PA
29262014-07-11 Pedro Alves <palves@redhat.com>
2927
2928 * linux-low.c (kill_wait_lwp): New function, based on
2929 kill_one_lwp_callback, but use my_waitpid directly.
2930 (kill_one_lwp_callback, linux_kill): Use it.
2931
8e9db26e
PA
29322014-06-23 Pedro Alves <palves@redhat.com>
2933
2934 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
2935 before setting DR0..DR3.
2936
698b3e08
GB
29372014-06-20 Gary Benson <gbenson@redhat.com>
2938
2939 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
2940 * configure: Regenerated.
2941 * config.in: Likewise.
2942
125f8a3d
GB
29432014-06-20 Gary Benson <gbenson@redhat.com>
2944
2945 * Makefile.in (SFILES): Update locations for files moved
2946 from common to nat.
2947 (object file files): Reordered.
2948
42995dbd
GB
29492014-06-20 Gary Benson <gbenson@redhat.com>
2950
2951 * i386-low.h (i386_dr_low_can_set_addr): Removed.
2952 (i386_dr_low_set_addr): Likewise.
2953 (i386_dr_low_get_addr): Likewise.
2954 (i386_dr_low_can_set_control): Likewise.
2955 (i386_dr_low_set_control): Likewise.
2956 (i386_dr_low_get_control): Likewise.
2957 (i386_dr_low_get_status): Likewise.
2958 (i386_get_debug_register_length): Likewise.
2959 * linux-x86-low.c (i386_dr_low_set_addr):
2960 Changed signature. Made static.
2961 (i386_dr_low_get_addr): Likewise.
2962 (i386_dr_low_set_control): Likewise.
2963 (i386_dr_low_get_control): Likewise.
2964 (i386_dr_low_get_status): Likewise.
2965 (i386_dr_low): New global variable.
2966 * win32-i386-low.c (i386_dr_low_set_addr):
2967 Changed signature. Made static.
2968 (i386_dr_low_get_addr): Likewise.
2969 (i386_dr_low_set_control): Likewise.
2970 (i386_dr_low_get_control): Likewise.
2971 (i386_dr_low_get_status): Likewise.
2972 (i386_dr_low): New global variable.
2973
e1d2394b
MS
29742014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
2975
2976 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
2977 * Makefile.in (AR, AR_FLAGS): Define.
2978 * configure: Regenerate.
2979
3a8ee006
GB
29802014-06-19 Gary Benson <gbenson@redhat.com>
2981
2982 * Makefile.in (i386-dregs.o): New rule.
2983 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
2984 * i386-low.c (target.h): Remove include.
2985 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
2986 (DR_CONTROL_SHIFT): Likewise.
2987 (DR_CONTROL_SIZE): Likewise.
2988 (DR_RW_EXECUTE): Likewise.
2989 (DR_RW_WRITE): Likewise.
2990 (DR_RW_READ): Likewise.
2991 (DR_RW_IORW): Likewise.
2992 (DR_LEN_1): Likewise.
2993 (DR_LEN_2): Likewise.
2994 (DR_LEN_4): Likewise.
2995 (DR_LEN_8): Likewise.
2996 (DR_LOCAL_ENABLE_SHIFT): Likewise.
2997 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
2998 (DR_ENABLE_SIZE): Likewise.
2999 (DR_LOCAL_SLOWDOWN): Likewise.
3000 (DR_GLOBAL_SLOWDOWN): Likewise.
3001 (DR_CONTROL_RESERVED): Likewise.
3002 (I386_DR_CONTROL_MASK): Likewise.
3003 (I386_DR_VACANT): Likewise.
3004 (I386_DR_LOCAL_ENABLE): Likewise.
3005 (I386_DR_GLOBAL_ENABLE): Likewise.
3006 (I386_DR_DISABLE): Likewise.
3007 (I386_DR_SET_RW_LEN): Likewise.
3008 (I386_DR_GET_RW_LEN): Likewise.
3009 (I386_DR_WATCH_HIT): Likewise.
3010 (i386_wp_op_t): Likewise.
3011 (i386_show_dr): Likewise.
3012 (i386_length_and_rw_bits): Likewise.
3013 (i386_insert_aligned_watchpoint): Likewise.
3014 (i386_remove_aligned_watchpoint): Likewise.
3015 (i386_handle_nonaligned_watchpoint): Likewise.
3016 i386_update_inferior_debug_regs(): Likewise.
3017 (i386_dr_insert_watchpoint): Likewise.
3018 (i386_dr_remove_watchpoint): Likewise.
3019 (i386_dr_region_ok_for_watchpoint): Likewise.
3020 (i386_dr_stopped_data_address): Likewise.
3021 (i386_dr_stopped_by_watchpoint): Likewise.
3022
8f26655c
GB
30232014-06-19 Gary Benson <gbenson@redhat.com>
3024
3025 * i386-low.c (i386_dr_show): Renamed to
3026 i386_show_dr and made static. All uses updated.
3027 (i386_dr_length_and_rw_bits): Renamed to
3028 i386_length_and_rw_bits and made static.
3029 All uses updated.
3030 (i386_dr_insert_aligned_watchpoint): Renamed to
3031 i386_insert_aligned_watchpoint and made static.
3032 All uses updated.
3033 (i386_dr_remove_aligned_watchpoint): Renamed to
3034 i386_remove_aligned_watchpoint and made static.
3035 All uses updated.
3036 (i386_dr_update_inferior_debug_regs): Renamed to
3037 i386_update_inferior_debug_regs and made static.
3038 All uses updated.
3039
b9228891
GB
30402014-06-18 Gary Benson <gbenson@redhat.com>
3041
5171def3
GB
3042 * i386-low.h (i386_dr_low_can_set_addr): New macro.
3043 (i386_dr_low_can_set_control): Likewise.
3044 (i386_get_debug_register_length): Likewise.
3045 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
3046 (i386_dr_low_can_set_control): Likewise.
3047 (i386_get_debug_register_length): Likewise.
3048
30492014-06-17 Gary Benson <gbenson@redhat.com>
3050
b9228891
GB
3051 * i386-low.h (i386-dregs.h): New include.
3052 (DR_FIRSTADDR): Now in i386-dregs.h.
3053 (DR_LASTADDR): Likewise.
3054 (DR_NADDR): Likewise.
3055 (DR_STATUS): Likewise.
3056 (DR_CONTROL): Likewise.
3057 (i386_debug_reg_state): Likewise.
3058 (i386_dr_insert_watchpoint): Likewise.
3059 (i386_dr_remove_watchpoint): Likewise.
3060 (i386_dr_region_ok_for_watchpoint): Likewise.
3061 (i386_dr_stopped_data_address): Likewise.
3062 (i386_dr_stopped_by_watchpoint): Likewise.
3063 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
3064
4be83cc2
GB
30652014-06-18 Gary Benson <gbenson@redhat.com>
3066
3067 * i386-low.h (i386_low_insert_watchpoint): Renamed to
3068 i386_dr_insert_watchpoint.
3069 (i386_low_remove_watchpoint): Renamed to
3070 i386_dr_remove_watchpoint.
3071 (i386_low_region_ok_for_watchpoint): Renamed to
3072 i386_dr_region_ok_for_watchpoint.
3073 (i386_low_stopped_data_address): Renamed to
3074 i386_dr_stopped_data_address.
3075 (i386_low_stopped_by_watchpoint): Renamed to
3076 i386_dr_stopped_by_watchpoint.
3077 * i386-low.c (i386_show_dr): Renamed to
3078 i386_dr_show and made nonstatic. All uses updated.
3079 (i386_length_and_rw_bits): Renamed to
3080 i386_dr_length_and_rw_bits and made nonstatic.
3081 All uses updated.
3082 (i386_insert_aligned_watchpoint): Renamed to
3083 i386_dr_insert_aligned_watchpoint and made nonstatic.
3084 All uses updated.
3085 (i386_remove_aligned_watchpoint): Renamed to
3086 i386_dr_remove_aligned_watchpoint and made nonstatic.
3087 All uses updated.
3088 (i386_update_inferior_debug_regs): Renamed to
3089 i386_dr_update_inferior_debug_regs and made nonstatic.
3090 All uses updated.
3091 (i386_low_insert_watchpoint): Renamed to
3092 i386_dr_insert_watchpoint. All uses updated.
3093 (i386_low_remove_watchpoint): Renamed to
3094 i386_dr_remove_watchpoint. All uses updated.
3095 (i386_low_region_ok_for_watchpoint): Renamed to
3096 i386_dr_region_ok_for_watchpoint. All uses updated.
3097 (i386_low_stopped_data_address): Renamed to
3098 i386_dr_stopped_data_address. All uses updated.
3099 (i386_low_stopped_by_watchpoint): Renamed to
3100 i386_dr_stopped_by_watchpoint. All uses updated.
3101
131aa0d4
GB
31022014-06-18 Gary Benson <gbenson@redhat.com>
3103
3104 * i386-low.c (i386_dr_low_can_set_addr): New macro.
3105 (i386_dr_low_can_set_control): Likewise.
3106 (i386_insert_aligned_watchpoint): New check.
3107
d9305f7f
GB
31082014-06-18 Gary Benson <gbenson@redhat.com>
3109
3110 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
3111 Renamed to state.
3112
e927c9fc
GB
31132014-06-18 Gary Benson <gbenson@redhat.com>
3114
3115 * i386-low.c (i386_length_and_rw_bits): Use internal_error
3116 instead of fatal and error.
3117 (i386_handle_nonaligned_watchpoint): Likewise.
3118
1b6d4134
GB
31192014-06-18 Gary Benson <gbenson@redhat.com>
3120
3121 * i386-low.c (i386_get_debug_register_length): New macro.
3122 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
3123 (i386_show_dr): Use debug_printf instead of fprintf. Use
3124 phex to format values.
3125
6e62758f
GB
31262014-06-18 Gary Benson <gbenson@redhat.com>
3127
3128 * i386-low.h: Comment changes.
3129 * i386-low.c: Likewise.
3130
fc6e2f03
GB
31312014-06-18 Gary Benson <gbenson@redhat.com>
3132
3133 * i386-low.c: Whitespace changes.
3134
f9d1eeed
TT
31352014-06-12 Tom Tromey <tromey@redhat.com>
3136
3137 * utils.c (freeargv): Remove.
3138
0b04e523
TT
31392014-06-12 Tom Tromey <tromey@redhat.com>
3140
3141 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
3142 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
3143 (parse_debug_format_options): Likewise.
3144 (gdbserver_usage): Likewise.
3145 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
3146 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
3147 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
3148 against libiberty.
3149 ($(LIBGNU)): Depend on libiberty.
3150 (all-lib): Recurse into all subdirs.
3151 (install-only): Invoke "install" target in subdirs.
3152 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
3153 targets.
3154 * configure: Rebuild.
3155 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
3156 for vasprintf, vsnprintf, or gettimeofday.
3157 * configure.srv: Don't add safe-ctype.o or lbasename.o to
3158 srv_tgtobj.
3159
270c9937
JB
31602014-06-05 Joel Brobecker <brobecker@adacore.com>
3161
3162 * development.sh: Delete.
3163 * Makefile.in (config.status): Adjust dependency on development.sh.
3164 * configure.ac: Adjust development.sh source call.
3165 * configure: Regenerate.
3166
0a261ed8
PA
31672014-06-02 Pedro Alves <palves@redhat.com>
3168
3169 * ax.c (gdb_free_agent_expr): New function.
3170 * ax.h (gdb_free_agent_expr): New declaration.
3171 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
3172 list.
3173 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
3174 static.
3175 (clear_breakpoint_conditions_and_commands): New function.
3176 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
3177 (clear_breakpoint_conditions_and_commands): New declaration.
3178
e9dae05e
RR
31792014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
3180
3181 * linux-aarch64-low.c (asm/ptrace.h): Include.
3182
5876f503
JK
31832014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
3184
3185 Fix TLS access for -static -pthread.
3186 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
3187 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
3188 (thread_db_load_search, try_thread_db_load_1): Initialize it.
3189
802e8e6d
PA
31902014-05-20 Pedro Alves <palves@redhat.com>
3191
3192 * linux-aarch64-low.c (aarch64_insert_point)
3193 (aarch64_remove_point): No longer check whether the type is
3194 supported here. Adjust to new interface.
3195 (the_low_target): Install aarch64_supports_z_point_type as
3196 supports_z_point_type method.
3197 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
3198 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
3199 instead of a Z packet char. Adjust.
3200 (arm_supports_z_point_type): New function.
3201 (arm_insert_point, arm_remove_point): Adjust to new interface.
3202 (the_low_target): Install arm_supports_z_point_type.
3203 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
3204 (cris_insert_point, cris_remove_point): Adjust to new interface.
3205 Don't check whether the type is supported here.
3206 (the_low_target): Install cris_supports_z_point_type.
3207 * linux-low.c (linux_supports_z_point_type): New function.
3208 (linux_insert_point, linux_remove_point): Adjust to new interface.
3209 * linux-low.h (struct linux_target_ops) <insert_point,
3210 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
3211 raw_breakpoint pointer parameter.
3212 <supports_z_point_type>: New method.
3213 * linux-mips-low.c (mips_supports_z_point_type): New function.
3214 (mips_insert_point, mips_remove_point): Adjust to new interface.
3215 Use mips_supports_z_point_type.
3216 (the_low_target): Install mips_supports_z_point_type.
3217 * linux-ppc-low.c (the_low_target): Install NULL as
3218 supports_z_point_type method.
3219 * linux-s390-low.c (the_low_target): Install NULL as
3220 supports_z_point_type method.
3221 * linux-sparc-low.c (the_low_target): Install NULL as
3222 supports_z_point_type method.
3223 * linux-x86-low.c (x86_supports_z_point_type): New function.
3224 (x86_insert_point): Adjust to new insert_point interface. Use
3225 insert_memory_breakpoint. Adjust to new
3226 i386_low_insert_watchpoint interface.
3227 (x86_remove_point): Adjust to remove_point interface. Use
3228 remove_memory_breakpoint. Adjust to new
3229 i386_low_remove_watchpoint interface.
3230 (the_low_target): Install x86_supports_z_point_type.
3231 * lynx-low.c (lynx_target_ops): Install NULL as
3232 supports_z_point_type callback.
3233 * nto-low.c (nto_supports_z_point_type): New.
3234 (nto_insert_point, nto_remove_point): Adjust to new interface.
3235 (nto_target_ops): Install nto_supports_z_point_type.
3236 * mem-break.c: Adjust intro comment.
3237 (struct raw_breakpoint) <raw_type, size>: New fields.
3238 <inserted>: Update comment.
3239 <shlib_disabled>: Delete field.
3240 (enum bkpt_type) <gdb_breakpoint>: Delete value.
3241 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
3242 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
3243 (raw_bkpt_type_to_target_hw_bp_type): New function.
3244 (find_enabled_raw_code_breakpoint_at): New function.
3245 (find_raw_breakpoint_at): New type and size parameters. Use them.
3246 (insert_memory_breakpoint): New function, based off
3247 set_raw_breakpoint_at.
3248 (remove_memory_breakpoint): New function.
3249 (set_raw_breakpoint_at): Reimplement.
3250 (set_breakpoint): New, based on set_breakpoint_at.
3251 (set_breakpoint_at): Reimplement.
3252 (delete_raw_breakpoint): Go through the_target->remove_point
3253 instead of assuming memory breakpoints.
3254 (find_gdb_breakpoint_at): Delete.
3255 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
3256 (find_gdb_breakpoint): New function.
3257 (set_gdb_breakpoint_at): Delete.
3258 (z_type_supported): New function.
3259 (set_gdb_breakpoint_1): New function, loosely based off
3260 set_gdb_breakpoint_at.
3261 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
3262 (delete_gdb_breakpoint_at): Delete.
3263 (delete_gdb_breakpoint_1): New function, loosely based off
3264 delete_gdb_breakpoint_at.
3265 (delete_gdb_breakpoint): New function.
3266 (clear_gdb_breakpoint_conditions): Rename to ...
3267 (clear_breakpoint_conditions): ... this. Don't handle a NULL
3268 breakpoint.
3269 (add_condition_to_breakpoint): Make static.
3270 (add_breakpoint_condition): Take a struct breakpoint pointer
3271 instead of an address. Adjust.
3272 (gdb_condition_true_at_breakpoint): Rename to ...
3273 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
3274 z_type parameter.
3275 (gdb_condition_true_at_breakpoint): Reimplement.
3276 (add_breakpoint_commands): Take a struct breakpoint pointer
3277 instead of an address. Adjust.
3278 (gdb_no_commands_at_breakpoint): Rename to ...
3279 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
3280 parameter. Return true if no breakpoint was found. Change debug
3281 output.
3282 (gdb_no_commands_at_breakpoint): Reimplement.
3283 (run_breakpoint_commands): Rename to ...
3284 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
3285 and change return type to boolean.
3286 (run_breakpoint_commands): New function.
3287 (gdb_breakpoint_here): Also check for Z1 breakpoints.
3288 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
3289 breakpoint. Go through the_target->remove_point instead of
3290 assuming memory breakpoint.
3291 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
3292 software and hardware breakpoints.
3293 (reinsert_raw_breakpoint): Go through the_target->insert_point
3294 instead of assuming memory breakpoint.
3295 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
3296 software and hardware breakpoints.
3297 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
3298 Check both software and hardware breakpoints.
3299 (validate_inserted_breakpoint): Assert the breakpoint is a
3300 software breakpoint. Set the inserted flag to -1 instead of
3301 setting shlib_disabled.
3302 (delete_disabled_breakpoints): Adjust.
3303 (validate_breakpoints): Only validate software breakpoints.
3304 Adjust to inserted flag change.
3305 (check_mem_read, check_mem_write): Skip breakpoint types other
3306 than software breakpoints. Adjust to inserted flag change.
3307 * mem-break.h (enum raw_bkpt_type): New enum.
3308 (raw_breakpoint, struct process_info): Forward declare.
3309 (Z_packet_to_target_hw_bp_type): Delete declaration.
3310 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
3311 (set_gdb_breakpoint, delete_gdb_breakpoint)
3312 (clear_breakpoint_conditions): New declarations.
3313 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
3314 (breakpoint_inserted_here): Update comment.
3315 (add_breakpoint_condition, add_breakpoint_commands): Replace
3316 address parameter with a breakpoint pointer parameter.
3317 (gdb_breakpoint_here): Update comment.
3318 (delete_gdb_breakpoint_at): Delete.
3319 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
3320 * server.c (process_point_options): Take a struct breakpoint
3321 pointer instead of an address. Adjust.
3322 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
3323 delete_gdb_breakpoint.
3324 * spu-low.c (spu_target_ops): Install NULL as
3325 supports_z_point_type method.
3326 * target.h: Include mem-break.h.
3327 (struct target_ops) <prepare_to_access_memory>: Update comment.
3328 <supports_z_point_type>: New field.
3329 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
3330 instead of a char. Also take a raw breakpoint pointer.
3331 * win32-arm-low.c (the_low_target): Install NULL as
3332 supports_z_point_type.
3333 * win32-i386-low.c (i386_supports_z_point_type): New function.
3334 (i386_insert_point, i386_remove_point): Adjust to new interface.
3335 (the_low_target): Install i386_supports_z_point_type.
3336 * win32-low.c (win32_supports_z_point_type): New function.
3337 (win32_insert_point, win32_remove_point): Adjust to new interface.
3338 (win32_target_ops): Install win32_supports_z_point_type.
3339 * win32-low.h (struct win32_target_ops):
3340 <supports_z_point_type>: New method.
3341 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
3342 instead of a char. Also take a raw breakpoint pointer.
3343
932539e3
PA
33442014-05-20 Pedro Alves <palves@redhat.com>
3345
3346 * mem-break.h: Include break-common.h.
3347 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
3348 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
3349 (Z_packet_to_target_hw_bp_type): New declaration.
3350 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
3351 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
3352 (Z_PACKET_ACCESS_WP): Delete macros.
3353 (Z_packet_to_hw_type): Delete function.
3354 * i386-low.h: Don't include break-common.h here.
3355 (Z_packet_to_hw_type): Delete declaration.
3356 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
3357 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
3358 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
3359 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
3360 * linux-aarch64-low.c: Don't include break-common.h here.
3361 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
3362 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
3363 (Z_packet_to_target_hw_bp_type): Delete function.
3364 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
3365 function.
3366 (mips_insert_point, mips_remove_point): Use
3367 Z_packet_to_target_hw_bp_type.
3368
4ff0d3d8
PA
33692014-05-20 Pedro Alves <palves@redhat.com>
3370
3371 * linux-aarch64-low.c: Include break-common.h.
3372 (enum target_point_type): Delete.
3373 (Z_packet_to_point_type): Rename to ...
3374 (Z_packet_to_target_hw_bp_type): ... this, and return a
3375 target_hw_bp_type instead.
3376 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
3377 instead of an enum target_point_type.
3378 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
3379 breakpoint type.
3380 (aarch64_dr_state_insert_one_point)
3381 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
3382 (aarch64_handle_aligned_watchpoint)
3383 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
3384 Take an enum target_hw_bp_type instead of an enum
3385 target_point_type.
3386 (aarch64_supports_z_point_type): New function.
3387 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
3388 use Z_packet_to_target_hw_bp_type.
3389
786dc519
JB
33902014-05-20 Joel Brobecker <brobecker@adacore.com>
3391
3392 * configure.ac: Only use -Werror by default when DEVELOPMENT
3393 is true.
3394 * configure: Regenerate.
3395
9e0aa64f
JK
33962014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
3397
3398 Fix gdbserver qGetTLSAddr for x86_64 -m32.
3399 * linux-x86-low.c (X86_64_USER_REGS): New.
3400 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
3401
2b577b92
YQ
34022014-04-28 Yao Qi <yao@codesourcery.com>
3403
3404 * Makefile.in (i386-avx512.c): Fix the typo of generated file
3405 name.
3406
94611da2
PA
34072014-04-25 Pedro Alves <palves@redhat.com>
3408
3409 PR server/16255
3410 * linux-low.c (linux_attach_fail_reason_string): New function.
3411 (linux_attach_lwp): Delete.
3412 (linux_attach_lwp_1): Rename to ...
3413 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
3414 argument. Remove "initial" parameter. Return int instead of
3415 void. Don't error or warn here.
3416 (linux_attach): Adjust to call linux_attach_lwp. Call error on
3417 failure to attach to the tgid. Call warning when failing to
3418 attach to an lwp.
3419 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
3420 argument. Remove "initial" parameter. Return int instead of
3421 void. Don't error or warn here.
3422 (linux_attach_fail_reason_string): New declaration.
3423 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
3424 interface change. Use linux_attach_fail_reason_string.
3425
01f9f808
MS
34262014-04-24 Michael Sturm <michael.sturm@mintel.com>
3427 Walfred Tedeschi <walfred.tedeschi@intel.com>
3428
3429 * Makefile.in: Added rules to handle new files
3430 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
3431 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
3432 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
3433 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
3434 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
3435 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
3436 x32-avx512-linux.o.
3437 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
3438 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
3439 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
3440 i386/x32-avx512.xml.
3441 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
3442 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
3443 i386/x32-avx512-linux.xml.
3444 * i387-fp.c (num_avx512_k_registers): New constant for number
3445 of K registers.
3446 (num_avx512_zmmh_low_registers): New constant for number of
3447 lower ZMM registers (0-15).
3448 (num_avx512_zmmh_high_registers): New constant for number of
3449 higher ZMM registers (16-31).
3450 (num_avx512_ymmh_registers): New contant for number of higher
3451 YMM registers (ymm16-31 added by avx521 on x86_64).
3452 (num_avx512_xmm_registers): New constant for number of higher
3453 XMM registers (xmm16-31 added by AVX512 on x86_64).
3454 (struct i387_xsave): Add space for AVX512 registers.
3455 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
3456 Add code to handle AVX512 registers.
3457 (i387_xsave_to_cache): Add code to handle AVX512 registers.
3458 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
3459 prototypei from generated file.
3460 (tdesc_amd64_avx512_linux): Likewise.
3461 (init_registers_x32_avx512_linux): Likewise.
3462 (tdesc_x32_avx512_linux): Likewise.
3463 (init_registers_i386_avx512_linux): Likewise.
3464 (tdesc_i386_avx512_linux): Likewise.
3465 (x86_64_regmap): Add AVX512 registers.
3466 (x86_linux_read_description): Add code to handle AVX512 XSTATE
3467 mask.
3468 (initialize_low_arch): Add code to initialize AVX512 registers.
3469
51aa91f9
PA
34702014-04-23 Pedro Alves <palves@redhat.com>
3471
3472 * mem-break.c (find_gdb_breakpoint_at): Make static.
3473 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
3474
a4165e94
PA
34752014-04-23 Pedro Alves <palves@redhat.com>
3476
3477 * i386-low.c: Don't include break-common.h here.
3478 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
3479 prototype to take target_hw_bp_type as argument instead of a Z
3480 packet char.
3481 * i386-low.h: Include break-common.h here.
3482 (Z_packet_to_hw_type): Declare.
3483 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
3484 prototypes.
3485 * linux-x86-low.c (x86_insert_point): Convert the packet number to
3486 a target_hw_bp_type before calling i386_low_insert_watchpoint.
3487 (x86_remove_point): Convert the packet number to a
3488 target_hw_bp_type before calling i386_low_remove_watchpoint.
3489 * win32-i386-low.c (i386_insert_point): Convert the packet number
3490 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
3491 (i386_remove_point): Convert the packet number to a
3492 target_hw_bp_type before calling i386_low_remove_watchpoint.
3493
b8acf843
PA
34942014-04-23 Pedro Alves <palves@redhat.com>
3495
3496 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
3497
d708bcd1
PA
34982014-04-10 Pedro Alves <palves@redhat.com>
3499
3500 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
3501 Check if the condition or command is NULL before checking if the
3502 breakpoint is known. On success, return true.
3503 * mem-break.h (add_breakpoint_condition): Document return.
3504 (add_breakpoint_commands): Add describing comment.
3505 * server.c (skip_to_semicolon): New function.
3506 (process_point_options): Use it.
3507
2eec7d5b
PA
35082014-04-09 Pedro Alves <palves@redhat.com>
3509
3510 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
3511 to lwpid_of.
3512
fa96cb38
PA
35132014-02-27 Pedro Alves <palves@redhat.com>
3514
3515 PR 12702
3516 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
3517 macros.
3518 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
3519 output.
3520 (last_thread_of_process_p): Take a PID argument instead of a
3521 thread pointer.
3522 (linux_wait_for_lwp): Delete.
3523 (num_lwps, check_zombie_leaders, not_stopped_callback): New
3524 functions.
3525 (linux_low_filter_event): New function, party factored out from
3526 linux_wait_for_event.
3527 (linux_wait_for_event): Rename to ...
3528 (linux_wait_for_event_filtered): ... this. Add new filter ptid
3529 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
3530 sigsuspend. Check for zombie leaders.
3531 (linux_wait_for_event): Reimplement as wrapper around
3532 linux_wait_for_event_filtered.
3533 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
3534 a normal or signal exit is seen, it's the whole process exiting.
3535 (wait_for_sigstop): No longer a for_each_inferior callback.
3536 Rewrite on top of linux_wait_for_event_filtered.
3537 (stop_all_lwps): Call wait_for_sigstop directly.
3538 * server.c (resume, handle_target_event): Handle
3539 TARGET_WAITKIND_NO_RESUMED.
3540
d763de10
JB
35412014-02-26 Joel Brobecker <brobecker@adacore.com>
3542
3543 * win32-low.c (psapi_get_dll_name,
3544 * win32_CreateToolhelp32Snapshot): Delete.
3545 (win32_CreateToolhelp32Snapshot, win32_Module32First)
3546 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
3547 Delete.
3548 (handle_load_dll): Add function description.
3549 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
3550
850a0f76
JB
35512014-02-26 Joel Brobecker <brobecker@adacore.com>
3552
3553 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
3554 Add comment.
3555 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
3556 base address when calling win32_add_one_solib.
3557 (handle_load_dll): Delete local variable load_addr.
3558 Remove 0x1000 offset applied to DLL base address when calling
3559 win32_add_one_solib.
3560 (handle_unload_dll): Add comment.
3561
f25b3fc3
JB
35622014-02-26 Joel Brobecker <brobecker@adacore.com>
3563
3564 * win32-low.c (win32_add_all_dlls): Renames
3565 win32_ensure_ntdll_loaded. Rewrite function documentation.
3566 Adjust implementation to always load all DLLs.
3567 Add 0x1000 offset to DLL base address when calling
3568 win32_add_one_solib.
3569 (child_initialization_done): New static global.
3570 (do_initial_child_stuff): Set child_initialization_done to
3571 zero during child initialization, and 1 after. Replace call
3572 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
3573 Add comment.
3574 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
3575 (handle_unload_dll): Add function documentation.
3576 (get_child_debug_event): Ignore load and unload DLL events
3577 during child initialization.
3578
d86d4aaf
DE
35792014-02-20 Doug Evans <dje@google.com>
3580
3bc32da3 3581 Remove global all_lwps.
d86d4aaf
DE
3582 * inferiors.h (ptid_of): Move here from linux-low.h.
3583 (pid_of, lwpid_of): Ditto.
3584 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
3585 parameter is a struct thread_info * now.
3586 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
3587 directly. Pass &all_threads to find_inferior instead of &all_lwps.
3588 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
3589 directly.
3590 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
3591 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
3592 * linux-arm-low.c (update_registers_callback): Update, "entry"
3593 parameter is a struct thread_info * now.
3594 Fetch lwpid from current_inferior directly.
3595 (arm_insert_point): Pass &all_threads to find_inferior instead of
3596 &all_lwps.
3597 (arm_remove_point): Ditto.
3598 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
3599 (arm_prepare_to_resume): Fetch pid from thread.
3600 (arm_read_description): Fetch lwpid from current_inferior directly.
3601 * linux-low.c (all_lwps): Delete.
3602 (delete_lwp): Delete call to remove_inferior.
3603 (handle_extended_wait): Fetch lwpid from thread.
3604 (add_lwp): Don't set lwp->entry.id. Remove call to
3605 add_inferior_to_list.
3606 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
3607 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
3608 (kill_one_lwp_callback): Ditto.
3609 (linux_kill): Don't dereference NULL pointer.
3610 Fetch ptid,lwpid from thread.
3611 (get_detach_signal): Fetch ptid from thread.
3612 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
3613 Simplify call to regcache_invalidate_thread.
3614 (delete_lwp_callback): Update, "entry" parameter is a
3615 struct thread_info * now. Fetch pid from thread.
3616 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
3617 (status_pending_p_callback): Update, "entry" parameter is a
3618 struct thread_info * now. Fetch ptid from thread.
3619 (find_lwp_pid): Update, "entry" parameter is a
3620 struct thread_info * now.
3621 (linux_wait_for_lwp): Fetch pid from thread.
3622 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
3623 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
3624 (enqueue_one_deferred_signal): Fetch lwpid from thread.
3625 (dequeue_one_deferred_signal): Ditto.
3626 (cancel_breakpoint): Fetch ptid from current_inferior.
3627 (linux_wait_for_event): Pass &all_threads to find_inferior,
3628 not &all_lwps. Fetch ptid, lwpid from thread.
3629 (count_events_callback): Update, "entry" parameter is a
3630 struct thread_info * now.
3631 (select_singlestep_lwp_callback): Ditto.
3632 (select_event_lwp_callback): Ditto.
3633 (cancel_breakpoints_callback): Ditto.
3634 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
3635 not &all_lwps.
3636 (select_event_lwp): Ditto. Fetch ptid from event_thread.
3637 (unsuspend_one_lwp): Update, "entry" parameter is a
3638 struct thread_info * now.
3639 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
3640 not &all_lwps.
3641 (linux_stabilize_threads): Ditto. And for for_each_inferior.
3642 Fetch lwpid from thread, not lwp.
3643 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
3644 Pass &all_threads to find_inferior, not &all_lwps.
3645 (send_sigstop): Fetch lwpid from thread, not lwp.
3646 (send_sigstop_callback): Update, "entry" parameter is a
3647 struct thread_info * now.
3648 (suspend_and_send_sigstop_callback): Ditto.
3649 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
3650 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
3651 struct thread_info * now.
3652 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
3653 from thread, lwp.
3654 (lwp_running): Update, "entry" parameter is a
3655 struct thread_info * now.
3656 (stop_all_lwps): Fetch ptid from thread.
3657 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
3658 (linux_resume_one_lwp): Fetch lwpid from thread.
3659 (linux_set_resume_request): Update, "entry" parameter is a
3660 struct thread_info * now. Fetch pid, lwpid from thread.
3661 (resume_status_pending_p): Update, "entry" parameter is a
3662 struct thread_info * now.
3663 (need_step_over_p): Ditto. Fetch lwpid from thread.
3664 (start_step_over): Fetch lwpid from thread.
3665 (linux_resume_one_thread): Update, "entry" parameter is a
3666 struct thread_info * now. Fetch lwpid from thread.
3667 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
3668 (proceed_one_lwp): Update, "entry" parameter is a
3669 struct thread_info * now. Fetch lwpid from thread.
3670 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
3671 struct thread_info * now.
3672 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
3673 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
3674 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
3675 directly.
3676 (regsets_store_inferior_registers): Ditto.
3677 (fetch_register, store_register): Ditto.
3678 (linux_read_memory, linux_write_memory): Ditto.
3679 (linux_request_interrupt): Ditto.
3680 (linux_read_auxv): Ditto.
3681 (linux_xfer_siginfo): Ditto.
3682 (linux_qxfer_spu): Ditto.
3683 (linux_qxfer_libraries_svr4): Ditto.
3684 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
3685 moved to inferiors.h.
3686 (get_lwp): Delete.
3687 (get_thread_lwp): Update.
3688 (struct lwp_info): Delete member "entry". Simplify comment for
3689 member "thread".
3690 (all_lwps): Delete.
3691 * linux-mips-low.c (mips_read_description): Fetch lwpid from
3692 current_inferior directly.
3693 (update_watch_registers_callback): Update, "entry" parameter is a
3694 struct thread_info * now. Fetch pid from thread.
3695 (mips_linux_prepare_to_resume): Fetch ptid from thread.
3696 (mips_insert_point): Fetch lwpid from current_inferior.
3697 Pass &all_threads to find_inferior, not &all_lwps.
3698 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
3699 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
3700 directly.
3701 (mips_stopped_data_address): Ditto.
3702 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
3703 directly.
3704 * linux-tile-low.c (tile_arch_setup): Ditto.
3705 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
3706 (update_debug_registers_callback): Update, "entry" parameter is a
3707 struct thread_info * now. Fetch pid from thread.
3708 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
3709 Pass &all_threads to find_inferior, not &all_lwps.
3710 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
3711 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
3712 Pass &all_threads to find_inferior, not &all_lwps.
3713 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
3714 (i386_dr_low_get_status): Ditto.
3715 (x86_linux_prepare_to_resume): Fetch ptid from thread.
3716 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
3717 (x86_linux_read_description): Ditto.
3718 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
3719
3b8361aa
DE
37202014-02-20 Doug Evans <dje@google.com>
3721
3722 * inferiors.c (get_first_inferior): Fix buglet.
3723
f7667f0d
DE
37242014-02-19 Doug Evans <dje@google.com>
3725
3726 * gdbthread.h (add_thread): Change result type to struct thread_info *.
3727 * inferiors.c (add_thread): Change result type to struct thread_info *.
3728 All callers updated.
3729 (add_lwp): Call add_thread here instead of in callers.
3730 All callers updated.
3731 * linux-low.h (get_lwp_thread): Rewrite.
3732 (struct lwp_info): New member "thread".
3733
b3312d80
DE
37342014-02-19 Doug Evans <dje@google.com>
3735
3736 * linux-low.c (add_lwp): Change result to struct lwp_info *.
3737 All callers updated.
3738
ecc6f45c
DE
37392014-02-19 Doug Evans <dje@google.com>
3740
3741 * inferiors.c (add_thread): Fix whitespace.
3742
649ebbca
DE
37432014-02-19 Doug Evans <dje@google.com>
3744
3745 * dll.c (clear_dlls): Replace accessing list implemention details
3746 with API function.
3747 * gdbthread.h (get_first_thread): Declare.
3748 * inferiors.c (for_each_inferior_with_data): New function.
3749 (get_first_thread): New function.
3750 (find_thread_ptid): Simplify.
3751 (get_first_inferior): New function.
3752 (clear_list): Delete.
3753 (one_inferior_p): New function.
3754 (clear_inferior_list): New function.
3755 (clear_inferiors): Update.
3756 * inferiors.h (for_each_inferior_with_data): Declare.
3757 (clear_inferior_list): Declare.
3758 (one_inferior_p): Declare.
3759 (get_first_inferior): Declare.
3760 * linux-low.c (linux_wait_for_event): Replace accessing list
3761 implemention details with API function.
3762 * server.c (target_running): Ditto.
3763 (accumulate_file_name_length): New function.
3764 (emit_dll_description): New function.
3765 (handle_qxfer_libraries): Replace accessing list implemention
3766 details with API function.
3767 (handle_qxfer_threads_worker): New function.
3768 (handle_qxfer_threads_proper): Replace accessing list implemention
3769 details with API function.
3770 (handle_query): Ditto.
3771 (visit_actioned_threads_callback_ftype): New typedef.
3772 (visit_actioned_threads_data): New struct.
3773 (visit_actioned_threads): Rewrite to be find_inferior callback.
3774 (resume): Call find_inferior.
3775 (handle_status): Replace accessing list implemention
3776 details with API function.
3777 (process_serial_event): Replace accessing list implemention details
3778 with API function.
3779 * target.c (set_desired_inferior): Replace accessing list implemention
3780 details with API function.
3781 * tracepoint.c (same_process_p): New function.
3782 (gdb_agent_about_to_close): Replace accessing list implemention
3783 details with API function.
3784 * win32-low.c (child_delete_thread): Replace accessing list
3785 implemention details with API function.
3786 (match_dll_by_basename): New function.
3787 (dll_is_loaded_by_basename): New function.
3788 (win32_ensure_ntdll_loaded): Replace accessing list implemention
3789 details call to dll_is_loaded_by_basename.
3790
80894984
DE
37912014-02-19 Doug Evans <dje@google.com>
3792
3793 * dll.h (struct dll_info): Add comment.
3794 * gdbthread.h (struct thread_info): Add comment.
3795 (current_ptid): Simplify.
3796 * inferiors.c (add_process): Update.
3797 (remove_process): Update.
3798 * inferiors.h (struct process_info): Rename member "head" to "entry".
3799 * linux-low.c (delete_lwp): Update.
3800 (add_lwp): Update.
3801 (last_thread_of_process_p): Update.
3802 (kill_one_lwp_callback, linux_kill): Update.
3803 (status_pending_p_callback): Update.
3804 (wait_for_sigstop): Update. Simplify read of ptid.
3805 (start_step_over): Update.
3806 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
3807 (get_lwp_thread): Update.
3808 (struct lwp_info): Rename member "head" to "entry".
3809 * regcache.h (inferior_list_entry): Delete.
3810 * server.c (kill_inferior_callback): Update.
3811 (detach_or_kill_inferior_callback): Update.
3812 (print_started_pid): Update.
3813 (print_attached_pid): Update.
3814 (process_serial_event): Simplify read of ptid.
3815 * thread-db.c (thread_db_create_event): Update.
3816 (thread_db_get_tls_address): Update.
3817 * win32-low.c (current_inferior_ptid): Simplify.
3818
46917d26
TT
38192014-02-19 Tom Tromey <tromey@redhat.com>
3820
3821 * target.h (struct target_ops) <supports_btrace>: Add target_ops
3822 argument.
3823 (target_supports_btrace): Update.
3824
0759a81e
YQ
38252014-02-14 Yao Qi <yao@codesourcery.com>
3826
3827 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
3828 (rsp-low-ipa.o): New target.
3829
a7191e8b
TT
38302014-02-12 Tom Tromey <tromey@redhat.com>
3831
3832 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
3833 convert_ascii_to_int.
3834 * regcache.c (registers_to_string): Likewise.
3835 * remote-utils.c (decode_M_packet): Likewise.
3836 * server.c (process_serial_event): Likewise.
3837
ff0e980e
TT
38382014-02-12 Tom Tromey <tromey@redhat.com>
3839
3840 * server.c (handle_query, handle_v_run): Use hex2bin, not
3841 unhexify.
3842 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
3843
e9371aff
TT
38442014-02-12 Tom Tromey <tromey@redhat.com>
3845
3846 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
3847 convert_int_to_ascii.
3848 * regcache.c (registers_to_string, collect_register_as_string):
3849 Likewise.
3850 * remote-utils.c (look_up_one_symbol, relocate_instruction):
3851 Likewise.
3852 * server.c (process_serial_event): Likewise.
3853 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
3854 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
3855
971dc0b8
TT
38562014-02-12 Tom Tromey <tromey@redhat.com>
3857
3858 * remote-utils.c (look_up_one_symbol, monitor_output): Use
3859 bin2hex, not hexify.
3860 * tracepoint.c (cmd_qtstatus): Likewise.
3861
0a822afb
TT
38622014-02-12 Tom Tromey <tromey@redhat.com>
3863
3864 * remote-utils.c (monitor_output): Pass explicit length to
3865 hexify.
3866
9c3d6531
TT
38672014-02-12 Tom Tromey <tromey@redhat.com>
3868
3869 * tracepoint.c: Include rsp-low.h.
3870 * server.c: Include rsp-low.h.
3871 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
3872 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
3873 declare.
3874 * remote-utils.c: Include rsp-low.h.
3875 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
3876 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
3877 (convert_int_to_ascii, convert_ascii_to_int): Move to
3878 common/rsp-low.c.
3879 * regcache.c: Include rsp-low.h.
3880 * ax.c: Include rsp-low.h.
3881 * Makefile.in (SFILES): Add common/rsp-low.c.
3882 (OBS): Add rsp-low.o.
3883 (rsp-low.o): New target.
3884
01fd3ea5
TT
38852014-02-12 Tom Tromey <tromey@redhat.com>
3886
3887 * utils.h (pulongest, plongest, phex_nz): Don't declare.
3888 Include print-utils.h.
3889 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
3890 (plongest, thirty_two, phex_nz): Remove.
3891 * Makefile.in (SFILES): Add common/print-utils.c.
3892 (OBS): Add print-utils.o.
3893 (print-utils-ipa.o): New target.
3894 (print-utils.o): New target.
3895 (IPA_OBJS): Add print-utils-ipa.o.
3896
e99dc820
TT
38972014-02-06 Tom Tromey <tromey@redhat.com>
3898
3899 * Makefile.in (SFILES): Fix indentation.
3900
ee1e2d4f
DE
39012014-02-05 Doug Evans <dje@google.com>
3902
3903 * linux-low.c (linux_wait_for_event): Improve comment.
3904 (linux_wait_1): Keep current_inferior in sync with event_child.
3905
f5a02773
DE
39062014-01-22 Doug Evans <dje@google.com>
3907
3908 * gdbthread.h (gdb_id_to_thread): Delete, unused.
3909
87ce2a04
DE
39102014-01-22 Doug Evans <dje@google.com>
3911
3912 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
3913 * configure: Regenerate.
3914 * config.in: Regenerate.
3915 * Makefile.in (SFILES): Add debug.c.
3916 (OBS): Add debug.o.
3917 * debug.c: New file.
3918 * debug.h: New file.
3919 * linux-aarch64-low.c (*): Update all debugging printfs to use
3920 debug_printf instead of fprintf.
3921 * linux-arm-low.c (*): Ditto.
3922 * linux-cris-low.c (*): Ditto.
3923 * linux-crisv32-low.c (*): Ditto.
3924 * linux-m32r-low.c (*): Ditto.
3925 * linux-sparc-low.c (*): Ditto.
3926 * linux-x86.c (*): Ditto.
3927 * linux-low.c (*): Ditto.
3928 (linux_wait_1): Add calls to debug_enter, debug_exit.
3929 (linux_wait): Remove redundant debugging printf.
3930 (stop_all_lwps): Add calls to debug_enter, debug_exit.
3931 (linux_resume, unstop_all_lwps): Ditto.
3932 * mem-break.c (*): Update all debugging printfs to use
3933 debug_printf instead of fprintf.
3934 * remote-utils.c (*): Ditto.
3935 * thread-db.c (*): Ditto.
3936 * server.c #include <ctype.h>, "gdb_vecs.h".
3937 (debug_threads): Moved to debug.c.
3938 (*): Update all debugging printfs to use debug_printf instead of
3939 fprintf.
3940 (start_inferior): Replace call to fflush with call to debug_flush.
3941 (monitor_show_help): Mention set debug-format.
3942 (parse_debug_format_options): New function.
3943 (handle_monitor_command): Handle "monitor set debug-format".
3944 (gdbserver_usage): Mention --debug-format.
3945 (main): Parse --debug-format.
3946 * server.h (debug_threads): Declaration moved to debug.h.
3947 #include "debug.h".
3948 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
3949 trace_debug_1 that uses debug_printf.
3950 (tracepoint_look_up_symbols): Update all debugging printfs to use
3951 debug_printf instead of fprintf.
3952
e671835b
BS
39532014-01-20 Baruch Siach <baruch@tkos.co.il>
3954
3955 * linux-xtensa-low.c: Include asm/ptrace.h instead of
3956 sys/ptrace.h.
3957
b5737fa9
PA
39582014-01-17 Pedro Alves <palves@redhat.com>
3959
ea38d2a9 3960 PR build/16445
c7faa97a
PA
3961 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
3962 defined after including gdb_proc_service.h.
b5737fa9 3963
40ed484e
DE
39642014-01-16 Doug Evans <dje@google.com>
3965
3966 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
3967 (match_dll): Use it.
3968
969c39fb
MM
39692014-01-16 Markus Metzger <markus.t.metzger@intel.com>
3970
3971 * target.h (target_ops) <read_btrace>: Change parameters and
3972 return type to allow error reporting.
3973 * server.c (handle_qxfer_btrace): Support delta reads. Pass
3974 trace reading errors on.
3975 * linux-low.c (linux_low_read_btrace): Pass trace reading
3976 errors on.
3977 (linux_low_disable_btrace): New.
3978
ab7f45ba
DE
39792014-01-15 Doug Evans <dje@google.com>
3980
3981 * inferiors.c (thread_id_to_gdb_id): Delete.
3982 * inferiors.h (thread_id_to_gdb_id): Delete.
3983
66af0f44
EZ
39842014-01-13 Eli Zaretskii <eliz@gnu.org>
3985
3986 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
3987 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
3988 versions.
3989
9939e131
PA
39902014-01-08 Pedro Alves <palves@redhat.com>
3991
3992 * server.c (handle_status): Don't discard previous queued stop
3993 replies or thread's pending status here.
3994 (main) <disconnection>: Do it here instead.
3995
b7ea362b
PA
39962014-01-08 Pedro Alves <palves@redhat.com>
3997
3998 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
3999 * server.c (visit_actioned_threads, handle_pending_status): New
4000 function.
4001 (handle_v_cont): Factor out parts to ...
4002 (resume): ... this new function. If in all-stop, and a thread
4003 being resumed has a pending status, report it without actually
4004 resuming.
4005 (myresume): Adjust to use the new 'resume' function.
4006 (clear_pending_status_callback, set_pending_status_callback)
4007 (find_status_pending_thread_callback): New functions.
4008 (handle_status): Handle the case of multiple threads having
4009 interesting statuses to report. Report threads' real last signal
4010 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
4011 with an interesting thread to report the status for, instead of
4012 always reporting the status of the first thread.
4013
28498c42
JB
40142014-01-01 Joel Brobecker <brobecker@adacore.com>
4015
4016 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
4017 * gdbreplay.c (gdbreplay_version): Likewise.
4018
f45c82da
YZ
40192013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
4020
4021 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
4022 iov.iov_len with the real length in use.
4023
379a5e2d
JB
40242013-12-13 Joel Brobecker <brobecker@adacore.com>
4025
4026 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
4027 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
4028 for all targets that use win32-low.c.
4029 * win32-low.c (win32_ensure_ntdll_loaded): New function.
4030 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
4031
4210d83e
PA
40322013-12-13 Pedro Alves <palves@redhat.com>
4033
4034 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
4035 if equal to TARGET_WAITKIND_LOADED.
4036 * win32-low.c (cached_status): New static global.
4037 (win32_wait): Add declaration.
4038 (do_initial_child_stuff): Flush all initial pending debug events
4039 up to the initial breakpoint.
4040 (win32_wait): If CACHED_STATUS was set, return that instead
4041 of doing a real wait. Remove the code resuming the execution
4042 of the inferior after receiving a TARGET_WAITKIND_LOADED event
4043 during the initial phase. Also remove the code changing
4044 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
4045 TARGET_WAITKIND_STOPPED.
4046
e7f0d979
YQ
40472013-12-11 Yao Qi <yao@codesourcery.com>
4048
4049 * notif.c (handle_notif_ack): Return 0 if no notification
4050 matches.
4051
ebcf782c
DE
40522013-11-20 Doug Evans <dje@google.com>
4053
4054 * linux-low.c (linux_set_resume_request): Fix comment.
4055
20ad9378
DE
40562013-11-20 Doug Evans <dje@google.com>
4057
4058 * linux-low.c (resume_status_pending_p): Tweak comment.
4059
a196ebeb
WT
40602013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
4061
4062 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
4063 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
4064 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
4065 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
4066 (srv_amd64_regobj): Add amd64-mpx.o.
4067 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
4068 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
4069 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
4070 * i387-fp.c (num_pl_bnd_register) Added constant.
4071 (num_pl_bnd_cfg_registers) Added constant.
4072 (struct i387_xsave) Added reserved area and MPX fields.
4073 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
4074 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
4075 function.
4076 (tdesc_i386_mpx_linux): Add MPX amd64 target.
4077 (init_registers_amd64_mpx_linux): Declare new function.
4078 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
4079 (x86_64_regmap): Add MPX registers.
4080 (x86_linux_read_description): Add MPX case.
4081 (initialize_low_arch): Initialize MPX targets.
4082
0080a2f6
TT
40832013-11-18 Tom Tromey <tromey@redhat.com>
4084
4085 * configure: Rebuild.
4086 * configure.ac: Don't check for stdlib.h.
4087 * gdbreplay.c: Unconditionally include stdlib.h.
4088
2978b111
TT
40892013-11-18 Tom Tromey <tromey@redhat.com>
4090
4091 * config.in: Rebuild.
4092 * configure: Rebuild.
4093 * configure.ac: Don't use AC_HEADER_DIRENT.
4094
a3d08894
TT
40952013-11-18 Tom Tromey <tromey@redhat.com>
4096
4097 * server.h: Don't check HAVE_STRING_H.
4098 * gdbreplay.c: Don't check HAVE_STRING_H.
4099 * configure: Rebuild.
4100
0a5dd17d
TT
41012013-11-18 Tom Tromey <tromey@redhat.com>
4102
4103 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
4104 LIBGNU.
4105
1bd2f0ba
TT
41062013-11-08 Tom Tromey <tromey@redhat.com>
4107
4108 * configure, config.in: Rebuild.
4109 * configure.ac: Remove unused configury.
4110
3266f10b
TT
41112013-11-08 Tom Tromey <tromey@redhat.com>
4112
4113 * acinclude.m4: Include common.m4, codeset.m4.
4114 * configure, config.in: Rebuild.
4115 * configure.ac: Use GDB_AC_COMMON.
4116
6682d959
AA
41172013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
4118
4119 * linux-s390-low.c (HWCAP_S390_TE): New define.
4120 (s390_arch_setup): Consider the TE field in the HWCAP for
4121 determining 'have_regset_tdb'.
4122
fd0a4d76
SDJ
41232013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
4124
4125 PR gdb/16014
4126 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
4127 call to sizeof.
4128
1a3d890b
PA
41292013-10-02 Pedro Alves <palves@redhat.com>
4130
4131 * server.c (process_serial_event): Don't output "GDBserver
4132 exiting" if GDB is connected through stdio.
4133 * target.c (mywait): Likewise, be silent if GDB is connected
4134 through stdio.
4135
97ad4581
JB
41362013-10-01 Joel Brobecker <brobecker@adacore.com>
4137
4138 * lynx-low.c (lynx_add_threads_after_attach): New function.
4139 (lynx_attach): Remove call to add_thread. Add call to
4140 lynx_add_threads_after_attach instead.
4141
5b4e221c
MF
41422013-09-28 Mike Frysinger <vapier@gentoo.org>
4143
4144 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
4145 * config.in, configure: Regenerated.
4146
ee47b2f8
YQ
41472013-09-18 Yao Qi <yao@codesourcery.com>
4148
4149 PR server/15959
4150 * server.c (start_inferior): Clear 'resume_info'.
4151
d6707650 41522013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 4153
d6707650
JW
4154 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
4155 for each register.
4156
9243dd0e 41572013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 4158
9243dd0e
JW
4159 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
4160 linux-tile-low.o to srv_tgtobj.
4161
c623a6ef
WN
41622013-09-16 Will Newton <will.newton@linaro.org>
4163
4164 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
4165 out regs.
4166
fb71d39e
PA
41672013-09-06 Pedro Alves <palves@redhat.com>
4168
4169 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
4170 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
4171 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
4172 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
4173 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
4174 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
4175
8e7e9910
PA
41762013-09-06 Pedro Alves <palves@redhat.com>
4177
4178 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
4179 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
4180
7c3a12ca
PA
41812013-09-06 Pedro Alves <palves@redhat.com>
4182
4183 * linux-amd64-ipa.c: Include tracepoint.h.
4184 * linux-i386-ipa.c: Include tracepoint.h.
4185
8eb3d7b6
RW
41862013-09-06 Ricard Wanderlof <ricardw@axis.com>
4187
4188 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
4189 (ps_get_thread_area): New function.
4190
eddddb9d
RW
41912013-09-06 Ricard Wanderlof <ricardw@axis.com>
4192
4193 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
4194 (initialize_low_arch): Call init_registers_crisv32 rather than
4195 init_register_crisv32.
4196
533b0600
PA
41972013-09-05 Pedro Alves <palves@redhat.com>
4198
4199 * server.h (handle_vFile, hostio_last_error_from_errno): Move
4200 to ...
4201 * hostio.h: ... this new file.
4202 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
4203 win32-low.c: Include hostio.h.
4204
0ce3d3b5
PA
42052013-09-05 Pedro Alves <palves@redhat.com>
4206
4207 * server.h (gdb_client_data, handler_func, callback_handler_func)
4208 (delete_file_handler, add_file_handler, append_callback_event)
4209 (delete_callback_event, start_event_loop, initialize_event_loop):
4210 Move to event-loop.h and include it.
4211 * event-loop.h: New file.
4212
799cdc37
PA
42132013-09-05 Pedro Alves <palves@redhat.com>
4214
4215 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
4216 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
4217 (loaded_dll, unloaded_dll): Move to ...
4218 * dll.h: ... this new file.
4219 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
4220
6a6bbd9d
PA
42212013-09-05 Pedro Alves <palves@redhat.com>
4222
4223 * server.h (current_process, get_thread_process, all_processes)
4224 (add_inferior_to_list, for_each_inferior, current_inferior)
4225 (remove_inferior, add_process, remove_process, find_process_pid)
4226 (have_started_inferiors_p, have_attached_inferiors_p)
4227 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
4228 (clear_inferiors, find_inferior, find_inferior_id)
4229 (inferior_target_data, set_inferior_target_data)
4230 (inferior_regcache_data, set_inferior_regcache_data): Move to
4231 inferiors.h, and include it.
4232 * inferiors.h: New file.
4233
f699aaba
PA
42342013-09-05 Pedro Alves <palves@redhat.com>
4235
4236 * server.h (struct emit_ops, current_insn_ptr, emit_error):
4237 Move ...
72f4393d 4238 * ax.h: ... here.
f699aaba 4239
c144c7a0
PA
42402013-09-05 Pedro Alves <palves@redhat.com>
4241
4242 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
4243 tracepoint.h.
4244 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
4245 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
4246 (handle_tracepoint_general_set, handle_tracepoint_query)
4247 (tracepoint_finished_step, tracepoint_was_hit)
4248 (release_while_stepping_state_list, current_traceframe)
4249 (in_readonly_region, traceframe_read_mem)
4250 (fetch_traceframe_registers, traceframe_read_sdata)
4251 (traceframe_read_info, struct fast_tpoint_collect_status)
4252 (fast_tracepoint_collecting, force_unlock_trace_buffer)
4253 (handle_tracepoit_bkpts, initialize_low_tracepoint)
4254 (supply_fast_tracepoint_registers)
4255 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
4256 (ipa_tdesc, claim_trampoline_space)
4257 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
4258 (agent_mem_read, agent_get_trace_state_variable_value)
4259 (agent_set_trace_state_variable_value, agent_tsv_read)
4260 (agent_mem_read_string, get_raw_reg_func_addr)
4261 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
4262 * tracepoint.h: ... this new file.
4263
ff42e6ab
PA
42642013-09-05 Pedro Alves <palves@redhat.com>
4265
4266 * server.h (perror_with_name, error, fatal, warning, paddress)
4267 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
4268 include it.
4269 * utils.h: New file.
4270
541af0f4
PA
42712013-09-05 Pedro Alves <palves@redhat.com>
4272
4273 * server.h (remote_debug, noack_mode, transport_is_reliable)
4274 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
4275 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
4276 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
4277 (write_enn, initialize_async_io, enable_async_io)
4278 (disable_async_io, check_remote_input_interrupt_request)
4279 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
4280 (dead_thread_notify, prepare_resume_reply)
4281 (decode_address_to_semicolon, decode_address, decode_m_packet)
4282 (decode_M_packet, decode_X_packet, decode_xfer_write)
4283 (decode_search_memory_packet, unhexify, hexify)
4284 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
4285 (look_up_one_symbol, relocate_instruction)
4286 (monitor_output): Move to remote-utils.h, and include it.
4287 * remote-utils.h: New file.
4288
eebdf26b
PA
42892013-09-05 Pedro Alves <palves@redhat.com>
4290
4291 * server.h (_): Delete.
4292
3aafd2ff
PA
42932013-09-02 Pedro Alves <palves@redhat.com>
4294
4295 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
4296 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
4297 allocated.
4298 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
4299
cee83bcb
PM
43002013-09-02 Pierre Muller <muller@sourceware.org>
4301
4302 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
4303 or WriteProcessMemory complete successfully and handle
4304 ERROR_PARTIAL_COPY error.
4305
9a13b2fa
PA
43062013-09-02 Pedro Alves <palves@redhat.com>
4307
4308 * server.c (gdb_read_memory): Return -1 on traceframe memory read
4309 error instead of EIO.
4310
602e3198
JK
43112013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4312
4313 PR server/15604
4314 * linux-low.c: Include filestuff.h.
4315 (linux_create_inferior) <pid == 0>: Call close_most_fds.
4316 * lynx-low.c: Include filestuff.h.
4317 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
4318 * server.c: Include filestuff.h.
4319 (main): Call notice_open_fds.
4320 * spu-low.c: Include filestuff.h.
4321 (spu_create_inferior) <pid == 0>: Call close_most_fds.
4322
96d7229d
LM
43232013-08-22 Luis Machado <lgustavo@codesourcery.com>
4324
4325 * Makefile.in: Explain why ../target and ../nat are not
4326 listed as include file search paths.
4327 (linux-waitpid.o): New object file rule.
4328 * configure.srv (srv_native_linux_obj): New variable.
4329 Replace all occurrences of linux native object files with
4330 $srv_native_linux_obj.
4331 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
4332 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
4333 (linux_enable_event_reporting): Remove declaration.
4334 (my_waitpid): Moved to common/linux-waitpid.c.
4335 (linux_wait_for_event): Pass ptid when calling
4336 linux_enable_event_reporting.
4337 (linux_supports_tracefork_flag): Remove.
4338 (linux_enable_event_reporting): Likewise.
4339 (linux_tracefork_grandchild): Remove.
4340 (STACK_SIZE): Moved to common/linux-ptrace.c.
4341 (linux_tracefork_child): Remove.
4342 (linux_test_for_tracefork): Remove.
4343 (linux_look_up_symbols): Call linux_supports_traceclone.
4344 (initialize_low): Remove call to linux_test_for_tracefork.
4345 * linux-low.h (PTRACE_TYPE_ARG3): Move to
4346 common/linux-ptrace.h.
4347 (PTRACE_TYPE_ARG4): Likewise.
4348 Include linux-ptrace.h.
4349
32940073
PA
43502013-08-21 Pedro Alves <palves@redhat.com>
4351
4352 * config.in: Renegerate.
4353
33b60d58 43542013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 4355
33b60d58
LM
4356 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
4357 (SFILES): Remove $(srcdir)/common/target-common.c and
4358 add $(srcdir)/target/waitstatus.c.
4359 (OBS): Remove target-common.o and add waitstatus.o.
4360 (server_h): Remove $(srcdir)/../common/target-common.h and
4361 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
4362 and $(srcdir)/../target/waitstatus.h.
4363 (target-common.o): Remove.
4364 (waitstatus.o): New target object file.
4365 * target.h: Do not include target-common.h and
4366 include target/resume.h, target/wait.h and
4367 target/waitstatus.h.
4368
b8e1b30e
LM
43692013-08-13 Luis Machado <lgustavo@codesourcery.com>
4370
4371 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
4372 to PTRACE_TYPE_ARG3.
4373 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
4374 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
4375 PTRACE_TYPE_ARG4.
4376 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
4377 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
4378
7a60ad40
YQ
43792013-07-27 Jie Zhang <jie@codesourcery.com>
4380 Daniel Jacobowitz <dan@codesourcery.com>
4381 Yao Qi <yao@codesourcery.com>
4382
4383 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
4384 (mips-linux-watch.o): New rule.
4385 (mips_linux_watch_h): New variable.
4386 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
4387 srv_tgtobj.
4388 * linux-mips-low.c: Include mips-linux-watch.h.
4389 (struct arch_process_info, struct arch_lwp_info): New.
4390 (update_watch_registers_callback): New function.
4391 (mips_linux_new_process, mips_linux_new_thread) New functions.
4392 (mips_linux_prepare_to_resume, mips_insert_point): New
4393 functions.
4394 (mips_remove_point, mips_stopped_by_watchpoint): New
4395 functions.
4396 (rsp_bp_type_to_target_hw_bp_type): New function.
4397 (mips_stopped_data_address): New function.
4398 (the_low_target): Add watchpoint support functions.
4399
de6f69ad
YQ
44002013-07-27 Yao Qi <yao@codesourcery.com>
4401
4402 * i386-low.c: Include break-common.h.
4403 (enum target_hw_bp_type): Remove.
4404
3360c0bf
LM
44052013-07-24 Luis Machado <lgustavo@codesourcery.com>
4406
4407 * Makefile.in (SFILES): /common/target-common.c.
4408 (OBS): Add target-common.o.
4409 (server_h): Add $(srcdir)/../common/target-common.h.
4410 (target-common.o): New target.
4411 * server.c (queue_stop_reply_callback): Free
4412 status string after use.
4413 * target.c (target_waitstatus_to_string): Remove.
4414 * target.h: Include target-common.h.
4415 (resume_kind): Likewise.
4416 (target_waitkind): Likewise.
4417 (target_waitstatus): Likewise.
4418 (TARGET_WNOHANG): Likewise.
4419
bd885420
YQ
44202013-07-04 Yao Qi <yao@codesourcery.com>
4421
4422 * Makefile.in (host_alias): Use @host_noncanonical@.
4423 (target_alias): Use @target_noncanonical@.
4424 * configure.ac: Use ACX_NONCANONICAL_TARGET and
4425 ACX_NONCANONICAL_HOST.
4426 * configure: Regenerated.
4427
4428 Revert:
4429 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
4430
4431 * configure.ac (version_host, version_target): Set and AC_SUBST them.
4432 * configure: Rebuild.
4433 * Makefile.in (version_host, version_target): Get from configure.
4434 (version.c): Use $(version_host) and $(version_target).
4435
17ef446e
PA
44362013-07-03 Pedro Alves <palves@redhat.com>
4437
4438 * Makefile.in (config.status): Depend on development.sh.
4439 * acinclude.m4: Include libmcheck.m4.
4440 * configure: Regenerate.
4441
7a9a7487
MG
44422013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
4443
4444 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
4445 attribute inside the parentheses.
4446 (winapi_DebugSetProcessKillOnExit): Ditto.
4447 (winapi_DebugBreakProcess): Ditto.
4448 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 4449
49b64de6
MG
44502013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
4451
4452 * notif.h (notif_event): Add a dummy member to avoid compiler
4453 errors.
4454
d5749ee7
PA
44552013-07-01 Pedro Alves <palves@redhat.com>
4456
4457 * hostio.c (HOSTIO_PATH_MAX): Define.
4458 (require_filename, handle_open, handle_unlink, handle_readlink):
4459 Use it.
4460
d8d2a3ee
PA
44612013-07-01 Pedro Alves <palves@redhat.com>
4462
4463 * server.h: Include "pathmax.h".
4464 * linux-low.c: Don't include sys/param.h.
4465 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
4466 MAXPATHLEN.
4467 * win32-low.c: Don't include sys/param.h.
4468 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
4469
bc7dea8d
PA
44702013-07-01 Pedro Alves <palves@redhat.com>
4471
4472 * event-loop.c: Don't check HAVE_UNISTD_H before including
4473 <unistd.h>.
4474 * gdbreplay.c: Likewise.
4475 * remote-utils.c: Likewise.
4476 * server.c: Likewise.
4477 * configure.ac: Don't check for unistd.h.
4478 * configure: Regenerate.
4479
d6c2da54
TT
44802013-06-28 Tom Tromey <tromey@redhat.com>
4481
4482 * Makefile.in (version.c): Use version.in, not
4483 common/version.in.
4484
257b6bec
MG
44852013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
4486
4487 * configure.ac (version_host, version_target): Set and AC_SUBST them.
4488 * configure: Rebuild.
4489 * Makefile.in (version_host, version_target): Get from configure.
4490 (version.c): Use $(version_host) and $(version_target).
4491
86ebe149
DK
44922013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
4493
4494 Fix trace-status to output user name without trailing colon.
4495 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
4496
f30aa5af
DK
44972013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
4498
4499 Fix trace-status to output proper start-time and stop-time.
4500 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
4501 output start time and stop time in hex as gdb expects.
4502
28a93511
YQ
45032013-06-26 Pedro Alves <pedro@codesourcery.com>
4504
4505 * tracepoint.c (build_traceframe_info_xml): Output trace state
4506 variables present in the trace buffer.
4507
01208463
TT
45082013-06-24 Tom Tromey <tromey@redhat.com>
4509
4510 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
4511 create-version.sh.
4512 (version.o): Remove.
4513 * gdbreplay.c: Include version.h.
4514 (version, host_name): Don't declare.
4515 * server.h: Include version.h.
4516 (version, host_name): Don't declare.
4517
760256f9
PA
45182013-06-12 Pedro Alves <palves@redhat.com>
4519
4520 * linux-x86-low.c (linux_is_elf64): Delete global.
4521 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
4522 with local linux_pid_exe_is_elf_64_file use.
4523
030031ee
PA
45242013-06-11 Pedro Alves <palves@redhat.com>
4525
4526 * linux-low.c (regset_disabled, disable_regset): New functions.
4527 (regsets_fetch_inferior_registers)
4528 (regsets_store_inferior_registers): Use them.
4529 (initialize_regsets_info); Don't allocate the disabled_regsets
4530 array here.
4531 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
4532 comment.
4533
5da6eb0a
PA
45342013-06-11 Pedro Alves <palves@redhat.com>
4535
4536 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
4537 xmalloc.
4538
7e5aaa09
PA
45392013-06-11 Pedro Alves <palves@redhat.com>
4540
4541 * linux-x86-low.c (initialize_low_arch): Call
4542 init_registers_x32_avx_linux.
4543
d878444c
JK
45442013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
4545
4546 Fix compatibility with Android Bionic.
4547 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
4548 it is not empty.
4549
3aee8918
PA
45502013-06-07 Pedro Alves <palves@redhat.com>
4551
5f2b57b5 4552 PR server/14823
3aee8918
PA
4553 * Makefile.in (OBS): Add tdesc.o.
4554 (IPA_OBJS): Add tdesc-ipa.o.
4555 (tdesc-ipa.o): New rule.
4556 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
4557 interface.
4558 * linux-low.c (new_inferior): Delete.
4559 (disabled_regsets, num_regsets): Delete.
4560 (linux_add_process): Adjust to set the new per-process
4561 new_inferior flag.
4562 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
4563 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
4564 was a stop. When calling arch_setup, switch the current inferior
4565 to the thread that got an event.
4566 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
4567 (regsets_fetch_inferior_registers)
4568 (regsets_store_inferior_registers): New regsets_info parameter.
4569 Adjust to use it.
4570 (linux_register_in_regsets): New regs_info parameter. Adjust to
4571 use it.
4572 (register_addr, fetch_register, store_register): New usrregs_info
4573 parameter. Adjust to use it.
4574 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
4575 parameter regs_info. Adjust to use it.
4576 (linux_fetch_registers): Get the current inferior's regs_info, and
4577 adjust to use it.
4578 (linux_store_registers): Ditto.
4579 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
4580 (initialize_low): Don't initialize the target_regsets here. Call
4581 initialize_low_arch.
4582 * linux-low.h (target_regsets): Delete declaration.
4583 (struct regsets_info): New.
4584 (struct usrregs_info): New.
4585 (struct regs_info): New.
4586 (struct process_info_private) <new_inferior>: New field.
4587 (struct linux_target_ops): Delete the num_regs, regmap, and
4588 regset_bitmap fields. New field regs_info.
4589 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
4590 * i387-fp.c (num_xmm_registers): Delete.
4591 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
4592 calls to new interface.
4593 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
4594 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
4595 Infer the number of xmm registers from the regcache's target
4596 description.
4597 * i387-fp.h (num_xmm_registers): Delete.
4598 * inferiors.c (add_thread): Don't install the thread's regcache
4599 here.
4600 * proc-service.c (gregset_info): Fetch the current inferior's
4601 regs_info. Adjust to use it.
4602 * regcache.c: Include tdesc.h.
4603 (register_bytes, reg_defs, num_registers)
4604 (gdbserver_expedite_regs): Delete.
4605 (get_thread_regcache): If the thread doesn't have a regcache yet,
4606 create one, instead of aborting gdbserver.
4607 (regcache_invalidate_one): Rename to ...
4608 (regcache_invalidate_thread): ... this.
4609 (regcache_invalidate_one): New.
4610 (regcache_invalidate): Only invalidate registers of the current
4611 process.
4612 (init_register_cache): Add target_desc parameter, and use it.
4613 (new_register_cache): Ditto. Assert the target description has a
4614 non zero registers_size.
4615 (regcache_cpy): Add assertions. Adjust.
4616 (realloc_register_cache, set_register_cache): Delete.
4617 (registers_to_string, registers_from_string): Adjust.
4618 (find_register_by_name, find_regno, find_register_by_number)
4619 (register_cache_size): Add target_desc parameter, and use it.
4620 (free_register_cache_thread, free_register_cache_thread_one)
4621 (regcache_release, register_cache_size): New.
4622 (register_size): Add target_desc parameter, and use it.
4623 (register_data, supply_register, supply_register_zeroed)
4624 (supply_regblock, supply_register_by_name, collect_register)
4625 (collect_register_as_string, collect_register_by_name): Adjust.
4626 * regcache.h (struct target_desc): Forward declare.
4627 (struct regcache) <tdesc>: New field.
4628 (init_register_cache, new_register_cache): Add target_desc
4629 parameter.
4630 (regcache_invalidate_thread): Declare.
4631 (regcache_invalidate_one): Delete declaration.
4632 (regcache_release): Declare.
4633 (find_register_by_number, register_cache_size, register_size)
4634 (find_regno): Add target_desc parameter.
4635 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
4636 declarations.
4637 * remote-utils.c: Include tdesc.h.
4638 (outreg, prepare_resume_reply): Adjust.
4639 * server.c: Include tdesc.h.
4640 (gdbserver_xmltarget): Delete declaration.
4641 (get_features_xml, process_serial_event): Adjust.
4642 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
4643 declare.
4644 (struct process_info) <tdesc>: New field.
4645 (ipa_tdesc): Declare.
4646 * tdesc.c: New file.
4647 * tdesc.h: New file.
4648 * tracepoint.c: Include tdesc.h.
4649 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
4650 (get_context_regcache): Adjust to pass ipa_tdesc down.
4651 (do_action_at_tracepoint): Adjust to get the register cache size
4652 from the context regcache's description.
4653 (traceframe_walk_blocks): Adjust to get the register cache size
4654 from the current trace frame's description.
4655 (traceframe_get_pc): Adjust to get current trace frame's
4656 description and pass it down.
4657 (gdb_collect): Adjust to get the register cache size from the
4658 IPA's description.
4659 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
4660 (gdbserver_xmltarget): Delete.
4661 (initialize_low_tracepoint): Set the ipa's target description.
4662 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
4663 (initialize_low_tracepoint): Set the ipa's target description.
4664 * linux-x86-low.c: Include tdesc.h.
4665 [__x86_64__] (is_64bit_tdesc): New.
4666 (ps_get_thread_area, x86_get_thread_area): Use it.
4667 (i386_cannot_store_register): Rename to ...
4668 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
4669 (i386_cannot_fetch_register): Rename to ...
4670 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
4671 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
4672 to new interface.
4673 (target_regsets): Rename to ...
4674 (x86_regsets): ... this.
4675 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
4676 interface.
4677 (x86_siginfo_fixup): Use is_64bit_tdesc.
4678 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
4679 (tdesc_x32_avx_linux, tdesc_x32_linux)
4680 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
4681 Declare.
4682 (x86_linux_update_xmltarget): Delete.
4683 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
4684 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
4685 (AMD64_LINUX_USER64_CS): New.
4686 (x86_linux_read_description): New, based on
4687 x86_linux_update_xmltarget.
4688 (same_process_callback): New.
4689 (x86_arch_setup_process_callback): New.
4690 (x86_linux_update_xmltarget): New.
4691 (x86_regsets_info): New.
4692 (amd64_linux_regs_info): New.
4693 (i386_linux_usrregs_info): New.
4694 (i386_linux_regs_info): New.
4695 (x86_linux_regs_info): New.
4696 (x86_arch_setup): Reimplement.
4697 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
4698 (x86_emit_ops): Ditto.
4699 (the_low_target): Adjust. Install x86_linux_regs_info,
4700 x86_cannot_fetch_register, and x86_cannot_store_register.
4701 (initialize_low_arch): New.
4702 * linux-ia64-low.c (tdesc_ia64): Declare.
4703 (ia64_fetch_register): Adjust.
4704 (ia64_usrregs_info, regs_info): New globals.
4705 (ia64_regs_info): New function.
4706 (the_low_target): Adjust.
4707 (initialize_low_arch): New function.
4708 * linux-sparc-low.c (tdesc_sparc64): Declare.
4709 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
4710 Adjust.
4711 (sparc_arch_setup): New function.
4712 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
4713 (the_low_target): Adjust.
4714 (initialize_low_arch): New function.
4715 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
4716 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
4717 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
4718 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
4719 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
4720 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
4721 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
4722 (tdesc_powerpc_isa205_vsx64l): Declare.
4723 (ppc_cannot_store_register, ppc_collect_ptrace_register)
4724 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
4725 (ppc_set_pc, ppc_get_hwcap): Adjust.
4726 (ppc_usrregs_info): Forward declare.
4727 (!__powerpc64__) ppc_regmap_adjusted: New global.
4728 (ppc_arch_setup): Adjust to the current process'es target
4729 description.
4730 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
4731 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
4732 (ppc_store_evrregset): Adjust.
4733 (target_regsets): Rename to ...
4734 (ppc_regsets): ... this, and make static.
4735 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
4736 (ppc_regs_info): New function.
4737 (the_low_target): Adjust.
4738 (initialize_low_arch): New function.
4739 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
4740 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
4741 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
4742 (tdesc_s390x_linux64v2): Declare.
4743 (s390_collect_ptrace_register, s390_supply_ptrace_register)
4744 (s390_fill_gregset, s390_store_last_break): Adjust.
4745 (target_regsets): Rename to ...
4746 (s390_regsets): ... this, and make static.
4747 (s390_get_pc, s390_set_pc): Adjust.
4748 (s390_get_hwcap): New target_desc parameter, and use it.
4749 [__s390x__] (have_hwcap_s390_high_gprs): New global.
4750 (s390_arch_setup): Adjust to set the current process'es target
4751 description. Don't adjust the regmap.
4752 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
4753 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
4754 (regs_info_3264): New globals.
4755 (s390_regs_info): New function.
4756 (the_low_target): Adjust.
4757 (initialize_low_arch): New function.
4758 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
4759 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
4760 [__mips64] (init_registers_mips_linux)
4761 (init_registers_mips_dsp_linux): Delete defines.
4762 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
4763 (have_dsp): New global.
4764 (mips_read_description): New, based on mips_arch_setup.
4765 (mips_arch_setup): Reimplement.
4766 (get_usrregs_info): New function.
4767 (mips_cannot_fetch_register, mips_cannot_store_register)
4768 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
4769 (mips_fill_fpregset, mips_store_fpregset): Adjust.
4770 (target_regsets): Rename to ...
4771 (mips_regsets): ... this, and make static.
4772 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
4773 (dsp_regs_info, regs_info): New globals.
4774 (mips_regs_info): New function.
4775 (the_low_target): Adjust.
4776 (initialize_low_arch): New function.
4777 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
4778 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
4779 Declare.
4780 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
4781 (arm_read_description): New, with bits factored from
4782 arm_arch_setup.
4783 (arm_arch_setup): Reimplement.
4784 (target_regsets): Rename to ...
4785 (arm_regsets): ... this, and make static.
4786 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
4787 (arm_regs_info): New function.
4788 (the_low_target): Adjust.
4789 (initialize_low_arch): New function.
4790 * linux-m68k-low.c (tdesc_m68k): Declare.
4791 (target_regsets): Rename to ...
4792 (m68k_regsets): ... this, and make static.
4793 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
4794 (m68k_regs_info): New function.
4795 (m68k_arch_setup): New function.
4796 (the_low_target): Adjust.
4797 (initialize_low_arch): New function.
4798 * linux-sh-low.c (tdesc_sharch): Declare.
4799 (target_regsets): Rename to ...
4800 (sh_regsets): ... this, and make static.
4801 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
4802 (sh_regs_info, sh_arch_setup): New functions.
4803 (the_low_target): Adjust.
4804 (initialize_low_arch): New function.
4805 * linux-bfin-low.c (tdesc_bfin): Declare.
4806 (bfin_arch_setup): New function.
4807 (bfin_usrregs_info, regs_info): New globals.
4808 (bfin_regs_info): New function.
4809 (the_low_target): Adjust.
4810 (initialize_low_arch): New function.
4811 * linux-cris-low.c (tdesc_cris): Declare.
4812 (cris_arch_setup): New function.
4813 (cris_usrregs_info, regs_info): New globals.
4814 (cris_regs_info): New function.
4815 (the_low_target): Adjust.
4816 (initialize_low_arch): New function.
4817 * linux-cris-low.c (tdesc_crisv32): Declare.
4818 (cris_arch_setup): New function.
4819 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
4820 (cris_regs_info): New function.
4821 (the_low_target): Adjust.
4822 (initialize_low_arch): New function.
4823 * linux-m32r-low.c (tdesc_m32r): Declare.
4824 (m32r_arch_setup): New function.
4825 (m32r_usrregs_info, regs_info): New globals.
4826 (m32r_regs_info): Adjust.
4827 (initialize_low_arch): New function.
4828 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
4829 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
4830 (tic6x_usrregs_info): Forward declare.
4831 (tic6x_read_description): New function, based on ...
4832 (tic6x_arch_setup): ... this. Reimplement.
4833 (target_regsets): Rename to ...
4834 (tic6x_regsets): ... this, and make static.
4835 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
4836 (tic6x_regs_info): New function.
4837 (the_low_target): Adjust.
4838 (initialize_low_arch): New function.
4839 * linux-xtensa-low.c (tdesc_xtensa): Declare.
4840 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
4841 (target_regsets): Rename to ...
4842 (xtensa_regsets): ... this, and make static.
4843 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
4844 globals.
4845 (xtensa_arch_setup, xtensa_regs_info): New functions.
4846 (the_low_target): Adjust.
4847 (initialize_low_arch): New function.
4848 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
4849 (nios2_arch_setup): Set the current process'es tdesc.
4850 (target_regsets): Rename to ...
4851 (nios2_regsets): ... this.
4852 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
4853 (nios2_regs_info): New function.
4854 (the_low_target): Adjust.
4855 (initialize_low_arch): New function.
a261b8f5
PA
4856 * linux-aarch64-low.c (tdesc_aarch64): Declare.
4857 (aarch64_arch_setup): Set the current process'es tdesc.
4858 (target_regsets): Rename to ...
4859 (aarch64_regsets): ... this.
4860 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
4861 (aarch64_regs_info): New function.
4862 (the_low_target): Adjust.
4863 (initialize_low_arch): New function.
3aee8918
PA
4864 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
4865 globals.
4866 (target_regsets): Rename to ...
4867 (tile_regsets): ... this.
4868 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
4869 (tile_regs_info): New function.
4870 (tile_arch_setup): Set the current process'es tdesc.
4871 (the_low_target): Adjust.
4872 (initialize_low_arch): New function.
4873 * spu-low.c (tdesc_spu): Declare.
4874 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
4875 * win32-arm-low.c (tdesc_arm): Declare.
4876 (arm_arch_setup): New function.
4877 (the_low_target): Install arm_arch_setup instead of
4878 init_registers_arm.
4879 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
4880 (init_windows_x86): Rename to ...
4881 (i386_arch_setup): ... this. Set `win32_tdesc'.
4882 (the_low_target): Adjust.
4883 * win32-low.c (win32_tdesc): New global.
4884 (child_add_thread): Don't create the thread cache here.
4885 (do_initial_child_stuff): Set the new process'es tdesc.
4886 * win32-low.h (struct target_desc): Forward declare.
4887 (win32_tdesc): Declare.
4888 * lynx-i386-low.c (tdesc_i386): Declare global.
4889 (lynx_i386_arch_setup): Set `lynx_tdesc'.
4890 * lynx-low.c (lynx_tdesc): New global.
4891 (lynx_add_process): Set the new process'es tdesc.
4892 * lynx-low.h (struct target_desc): Forward declare.
4893 (lynx_tdesc): Declare global.
4894 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
4895 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
4896 * nto-low.c (nto_tdesc): New global.
4897 (do_attach): Set the new process'es tdesc.
4898 * nto-low.h (struct target_desc): Forward declare.
4899 (nto_tdesc): Declare.
4900 * nto-x86-low.c (tdesc_i386): Declare.
4901 (nto_x86_arch_setup): Set `nto_tdesc'.
4902
b1fbec62
GB
49032013-06-04 Gary Benson <gbenson@redhat.com>
4904
4905 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
4906 to qSupported response when appropriate.
4907 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
4908 with nonzero-length annex.
4909 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
4910 arguments supplied in annex.
4911
d1ec4ce7
DE
49122013-05-31 Doug Evans <dje@google.com>
4913
ac44adcb 4914 PR server/15594
d1ec4ce7
DE
4915 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
4916 64 bits in 64-cross-32 environment.
4917
9b25f2d3
PA
49182013-05-28 Pedro Alves <palves@redhat.com>
4919
4920 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
4921 (aarch64-without-fpu.c): Delete rule.
4922 * configure.srv (aarch64*-*-linux*): Remove references to
4923 aarch64-without-fpu.o and aarch64-without-fpu.xml.
4924 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
4925 declaration.
4926
6740dc9c
PA
49272013-05-24 Pedro Alves <palves@redhat.com>
4928
4929 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
4930 instead of strchr/decode_address. Error if the range isn't split
4931 with a ','. Don't assume there's be a ':' in the action.
4932
c2d6af84
PA
49332013-05-23 Yao Qi <yao@codesourcery.com>
4934 Pedro Alves <palves@redhat.com>
4935
4936 * linux-low.c (lwp_in_step_range): New function.
4937 (linux_wait_1): If the thread was range stepping and stopped
4938 outside the stepping range, report the stop to GDB. Otherwise,
4939 continue stepping. Add range stepping debug output.
4940 (linux_set_resume_request): Copy the step range from the resume
4941 request to the lwp.
4942 (linux_supports_range_stepping): New.
4943 (linux_target_ops) <supports_range_stepping>: Set to
4944 linux_supports_range_stepping.
4945 * linux-low.h (struct linux_target_ops)
4946 <supports_range_stepping>: New field.
4947 (struct lwp_info) <step_range_start, step_range_end>: New fields.
4948 * linux-x86-low.c (x86_supports_range_stepping): New.
4949 (the_low_target) <supports_range_stepping>: Set to
4950 x86_supports_range_stepping.
4951 * server.c (handle_v_cont): Handle 'r' action.
4952 (handle_v_requests): Append ";r" if the target supports range
4953 stepping.
4954 * target.h (struct thread_resume) <step_range_start,
4955 step_range_end>: New fields.
4956 (struct target_ops) <supports_range_stepping>:
4957 New field.
4958 (target_supports_range_stepping): New macro.
4959
58794e1a
JB
49602013-05-17 Joel Brobecker <brobecker@adacore.com>
4961
4962 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
4963 confusion in comment.
4964
d631c5a7
JB
49652013-05-17 Joel Brobecker <brobecker@adacore.com>
4966
4967 * lynx-low.c (struct process_info_private): New type.
4968 (lynx_add_process): New function.
4969 (lynx_create_inferior, lynx_attach): Replace calls to
4970 add_process by calls to lynx_add_process.
4971 (lynx_resume): If PTID is null, then try using
4972 current_process()->private->last_wait_event_ptid.
4973 Add comments.
4974 (lynx_clear_inferiors): Delete. The contents of that function
4975 has been inlined in lynx_mourn;
4976 (lynx_wait_1): Save the ptid in the process's private data.
4977 (lynx_mourn): Free the process' private data. Replace call
4978 to lynx_clear_inferiors by call to clear_inferiors.
4979
96f7a20f
YQ
49802013-05-17 Yao Qi <yao@codesourcery.com>
4981
4982 * i386-low.c (i386_length_and_rw_bits): Move the comment to
4983 the right place.
4984
db0dfaa0
LM
49852013-05-16 Luis Machado <lgustavo@codesourcery.com>
4986
4987 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
4988 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
4989 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
4990 PT_TEXT_END_ADDR guards. Update comments.
4991 (linux_target_op) <read_offsets>: Conditionally define to
4992 linux_read_offsets if the target is UCLIBC and if it defines
4993 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
4994
68f5f838
SL
49952013-05-06 Sandra Loosemore <sandra@codesourcery.com>
4996 Andrew Jenner <andrew@codesourcery.com>
4997
4998 * Makefile.in (SFILES): Add linux-nios2-low.c.
4999 (clean): Add action to delete nios2-linux.c.
5000 (nios2-linux.c): New rule.
5001 * configure.srv: Add nios2*-*-linux*.
5002 * linux-nios2-low.c: New.
5003
1ebff1fd
HAQ
50042013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
5005
5006 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
5007
f6150862
HZ
50082013-04-25 Hui Zhu <hui@codesourcery.com>
5009
5010 PR gdb/15186
f6150862
HZ
5011 * ax.c (ax_printf): Add fflush.
5012
614c279d
TT
50132013-04-22 Tom Tromey <tromey@redhat.com>
5014
5015 * Makefile.in (SFILES): Add filestuff.c.
5016 (OBS): Add filestuff.o.
5017 (filestuff.o): New target.
5018 * config.in, configure: Rebuild.
5019 * configure.ac: Check for fdwalk, pipe2.
5020
7d4e5717
PA
50212013-04-17 Pedro Alves <palves@redhat.com>
5022
5023 * configure.ac (USE_THREAD_DB): Delete variable.
5024 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
5025 Don't AC_SUBST USE_THREAD_DB.
5026 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
5027 * config.in, configure: Regenerate.
5028
d5c93e41
PA
50292013-04-16 Pedro Alves <palves@redhat.com>
5030
5031 * linux-low.h (struct lwp_info) <thread_known>: Move under
5032 the USE_THREAD_DB #ifdef.
5033
04f5fe89
PA
50342013-04-16 Pedro Alves <palves@redhat.com>
5035
5036 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
5037 (linux-low.o): Delete rule.
5038 * linux-low.h: Always include "gdb_thread_db.h" instead of
5039 conditionally including thread_db.h.
5040 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
5041 HAVE_THREAD_DB_H.
5042
480b27bf
JK
50432013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5044
5045 * Makefile.in (install-only): Fix make install regression.
5046
43662968
JK
50472013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
5048
5049 Convert man pages to texinfo, new gdbinit.5 texinfo page.
5050 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
5051 installation.
5052 * gdbserver.1: Remove.
5053
3e74e146
PA
50542013-03-22 Pedro Alves <palves@redhat.com>
5055
5056 * linux-low.c (handle_extended_wait): Don't call
5057 linux_enable_event_reporting.
5058
a8347a2a
TT
50592013-03-15 Tony Theodore <tonyt@logyst.com>
5060
5061 PR build/9098:
5062 * Makefile.in (SHELL): Use @SHELL@.
5063
eeb56fa7
SDJ
50642013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
5065
5066 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
5067 compiler warning.
5068
4fa7e2ff
JB
50692013-03-13 Joel Brobecker <brobecker@adacore.com>
5070
5071 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
5072 Remove extraneous NULL element.
5073
8ddb1965
YQ
50742013-03-13 Yao Qi <yao@codesourcery.com>
5075
5076 * tracepoint.c (traceframe_read_tsv): Look for the last matched
5077 'V' block in trace frame.
5078
9accd112
MM
50792013-03-11 Markus Metzger <markus.t.metzger@intel.com>
5080
5081 * target.h (struct target_ops): Add btrace ops.
5082 (target_supports_btrace): New macro.
5083 (target_enable_btrace): New macro.
5084 (target_disable_btrace): New macro.
5085 (target_read_btrace): New macro.
5086 * gdbthread.h (struct thread_info): Add btrace field.
5087 * server.c: Include btrace-common.h.
5088 (handle_btrace_general_set): New function.
5089 (handle_btrace_enable): New function.
5090 (handle_btrace_disable): New function.
5091 (handle_general_set): Call handle_btrace_general_set.
5092 (handle_qxfer_btrace): New function.
5093 (struct qxfer qxfer_packets[]): Add btrace entry.
5094 * inferiors.c (remove_thread): Disable btrace.
5095 * linux-low: Include linux-btrace.h.
5096 (linux_low_enable_btrace): New function.
5097 (linux_low_read_btrace): New function.
5098 (linux_target_ops): Add btrace ops.
5099 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
5100 Add srv_linux_btrace=yes.
5101 (x86_64-*-linux*): Add linux-btrace.o.
5102 Add srv_linux_btrace=yes.
5103 * configure.ac: Define HAVE_LINUX_BTRACE.
5104 * config.in: Regenerated.
5105 * configure: Regenerated.
5106
5cc22e4c
MM
51072013-03-11 Markus Metzger <markus.t.metzger@intel.com>
5108
5109 * server.c (handle_qxfer): Preserve error message if -3 is
5110 returned.
5111 (qxfer): Document the -3 return value.
5112
7c97f91e
MM
51132013-03-11 Markus Metzger <markus.t.metzger@intel.com>
5114
5115 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
5116 (linux_btrace_h): New variable.
5117 (linux-btrace.o): New rule.
5118
be9a119c 51192013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
5120 Hafiz Abid Qadeer <abidh@codesourcery.com>
5121
5122 * tracepoint.c (trace_buffer_size): New global.
5123 (DEFAULT_TRACE_BUFFER_SIZE): New define.
5124 (init_trace_buffer): Change to one-argument function. Allocate
5125 trace buffer memory.
5126 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
5127 handle QTBuffer:size packet.
5128 (cmd_bigqtbuffer_size): New function.
5129 (initialize_tracepoint): Call init_trace_buffer with
5130 DEFAULT_TRACE_BUFFER_SIZE.
5131 * server.c (handle_query): Add QTBuffer:size in the
5132 supported packets.
5133
e64f7499
YQ
51342013-03-07 Yao Qi <yao@codesourcery.com>
5135
5136 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
5137 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
5138 of -1.
5139 (cmd_qtsp): Adjust condition. Do post increment.
5140 Set cur_action and cur_step_action back to 0.
5141
f0ae6fc3
PA
51422013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
5143
5144 PR server/15236
5145 * linux-low.c (linux_write_memory): Return early success if LEN is
5146 zero.
5147
b5b0b0af
CV
51482013-03-05 Corinna Vinschen <vinschen@redhat.de>
5149
334ad4a8 5150 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 5151
589bc927
TT
51522013-02-28 Tom Tromey <tromey@redhat.com>
5153
5154 * configure.ac: Invoke AC_SYS_LARGEFILE.
5155 * configure, config.in: Rebuild.
5156
dfe07582
CV
51572013-02-28 Corinna Vinschen <vinschen@redhat.com>
5158
5159 * win32-low.c: Throughout, fix format strings and casts of
5160 printf-like functions to avoid type related warnings on all
5161 platforms.
5162 (get_child_debug_event): Print dwDebugEventCode as hex since
5163 that's how it's usually documented.
5164
736cd585
YQ
51652013-02-28 Yao Qi <yao@codesourcery.com>
5166
5167 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
5168 pulongest.
5169
e1f58301
JW
51702013-02-27 Jiong Wang <jiwang@tilera.com>
5171
5172 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
5173 (reg-tilegx32.c): New rule.
5174 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
5175 * linux-tile-low.c (tile_arch_setup): New function. Invoke
5176 different register info initializer according to elf class.
5177 (init_registers_tilgx32): New function. The tilegx32 register info
5178 initializer.
5179 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
5180 (tile_store_gregset): Likewise.
5181
d171ca78
YQ
51822013-02-27 Yao Qi <yao@codesourcery.com>
5183
5184 * server.c (process_point_options): Print debug message when
5185 debug_threads is true.
5186
282bbdf3
YQ
51872013-02-26 Yao Qi <yao@codesourcery.com>
5188
5189 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
5190
aca22551
PA
51912013-02-19 Pedro Alves <palves@redhat.com>
5192 Kai Tietz <ktietz@redhat.com>
5193
5194 PR gdb/15161
5195
5196 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
5197 instead of strtoul to extract address from packet.
5198 (process_serial_event) <'z'>: Likewise.
5199
4f3cee1c
YQ
52002013-02-18 Yao Qi <yao@codesourcery.com>
5201
5202 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
5203
8e1d55a3
PA
52042013-02-14 Pedro Alves <palves@redhat.com>
5205
5206 Plug memory leak.
5207
5208 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
5209 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
5210
458820da
PA
52112013-02-14 Pedro Alves <palves@redhat.com>
5212
5213 * tracepoint.c (cmd_qtdpsrc): Use savestring.
5214
baea0dae
PA
52152013-02-14 Pedro Alves <palves@redhat.com>
5216
5217 * tracepoint.c (save_string): Delete.
5218 (add_tracepoint_action): Use savestring instead of save_string.
5219
0b1afbb3
PA
52202013-02-12 Pedro Alves <palves@redhat.com>
5221
5222 * linux-xtensa-low.c: Ditto.
5223 * xtensa-xtregs.c: Ditto.
5224
8a4ac37e
PA
52252013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
5226
5227 * thread-db.c (thread_db_get_tls_address): NULL pointer check
5228 thread_db.
5229
148de6bb
MS
52302013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
5231
5232 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
5233 aarch64_num_wp_regs and aarch64_num_bp_regs to
5234 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
5235
55fac6e0
MS
52362013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
5237
5238 * linux-aarch64-low.c (ps_get_thread_area): Replace
5239 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
5240
176eb98c
MS
52412013-02-04 Jim MacArthur <jim.macarthur@arm.com>
5242 Marcus Shawcroft <marcus.shawcroft@arm.com>
5243 Nigel Stephens <nigel.stephens@arm.com>
5244 Yufeng Zhang <yufeng.zhang@arm.com>
5245
5246 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
5247 (aarch64.c, aarch64-without-fpu.c): New targets.
5248 * configure.srv (aarch64*-*-linux*): New.
5249 * linux-aarch64-low.c: New file.
5250
56f7af9c
MS
52512013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
5252
43aaf8b6 5253 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
5254 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
5255 (dequeue_one_deferred_signal, linux_resume_one_thread)
5256 (fetch_register, linux_write_memory, linux_enable_event_reporting)
5257 (linux_tracefork_grandchild, linux_test_for_tracefork)
5258 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
5259 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
5260 where the argument is 0.
5261
60f662b0
YQ
52622013-01-25 Yao Qi <yao@codesourcery.com>
5263
5264 * event-loop.c: Include "queue.h".
5265 (gdb_event_p): New typedef.
5266 (struct gdb_event) <next_event>: Remove.
5267 (event_queue): Change to QUEUE(gdb_event_p).
5268 (async_queue_event): Remove.
5269 (gdb_event_xfree): New.
5270 (initialize_event_loop): New.
5271 (process_event): Use API from QUEUE.
5272 (wait_for_event): Likewise.
5273 * server.c (main): Call initialize_event_loop.
5274 * server.h (initialize_event_loop): Declare.
5275
5ae4861a
YQ
52762013-01-18 Yao Qi <yao@codesourcery.com>
5277
5278 * ax.h (struct eval_agent_expr_context): New.
5279 (gdb_eval_agent_expr): Update declaration.
5280 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
5281 TFRAME. Add new argument CTX.
5282 * server.h (struct eval_agent_expr_context): Declare.
5283 (agent_mem_read, agent_tsv_read): Update declaration.
5284 (agent_mem_read_string): Likewise.
5285 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
5286 (add_traceframe_block): Add new argument TPOINT.
5287 Increase TPOINT->traceframe_usage.
5288 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
5289 eval_tracepoint_agent_expr.
5290 (condition_true_at_tracepoint): Likewise.
5291 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
5292 (agent_mem_read_string, agent_tsv_read): Likewise.
5293
85e00e85
YQ
52942013-01-16 Yao Qi <yao@codesourcery.com>
5295
5296 * linux-low.c (linux_resume_one_lwp): Don't check
5297 'lwp->bp_reinsert != 0'.
5298
4039cf45
JB
52992013-01-07 Joel Brobecker <brobecker@adacore.com>
5300 Pedro Alves <palves@redhat.com>
5301
5302 * lynx-low.c (ptrace_request_to_str): Define a temporary
5303 macro and use it to simplify this function's implementation.
5304
9044dee2
JB
53052013-01-07 Joel Brobecker <brobecker@adacore.com>
5306
5307 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
5308 sets errno.
5309
e6352c8f
JB
53102013-01-07 Joel Brobecker <brobecker@adacore.com>
5311
5312 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
5313
50681a27
JB
53142013-01-07 Joel Brobecker <brobecker@adacore.com>
5315
5316 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
5317
3f6e77ef
JB
53182013-01-07 Joel Brobecker <brobecker@adacore.com>
5319
5320 * lynx-low.c (lynx_resume): Use the resume_info parameter
5321 to determine the ptid for the lynx_ptrace call, unless
5322 it is equal to minus_one_ptid, in which case we use the
5323 ptid of the current_inferior.
5324 (lynx_wait_1): After having received a thread create/exit
5325 event, resume the inferior's execution using the signaling
5326 thread's ptid, rather than the old ptid.
5327
7fda33ae
JB
53282013-01-07 Joel Brobecker <brobecker@adacore.com>
5329
5330 * lynx-low.c (lynx_resume): Delete variable ret.
5331
b9786c74
JB
53322013-01-01 Joel Brobecker <brobecker@adacore.com>
5333
5334 * gdbreplay.c (gdbreplay_version): Update copyright year.
5335 * server.c (gdbserver_version): Likewise.
5336
8b93d60f
JB
53372012-12-17 Joel Brobecker <brobecker@adacore.com>
5338
5339 * lynx-low.c (lynx_wait_1): Add debug trace before adding
5340 new thread.
5341
037335a7
JB
53422012-12-17 Joel Brobecker <brobecker@adacore.com>
5343
5344 * lynx-low.c (ptrace_request_to_str): Add handling for
5345 PTRACE_GETTRACESIG.
5346
52d4cbd8
JB
53472012-12-17 Joel Brobecker <brobecker@adacore.com>
5348
5349 * lynx-low.c (lynx_attach): Delete variable new_process.
5350
ab8f6ca9
JB
53512012-12-17 Joel Brobecker <brobecker@adacore.com>
5352
5353 * lynx-low.c (lynx_create_inferior): Delete variable
5354 new_process.
5355
78cbc024
JB
53562012-12-17 Joel Brobecker <brobecker@adacore.com>
5357
5358 * lynx-low.c (ptrace_request_to_str): Do not handle
5359 PTRACE_GETTHREADLIST if this macro does not exist.
5360
14a00470
YQ
53612012-12-15 Yao Qi <yao@codesourcery.com>
5362
5363 * Makefile.in (OBS): Add notif.o.
5364 * notif.c, notif.h: New.
5365 * server.c: Include "notif.h".
5366 (struct vstop_notif) <next>: Remove.
5367 <base>: New field.
5368 (queue_stop_reply): Update.
5369 (push_event, send_next_stop_reply): Remove.
5370 (discard_queued_stop_replies): Update.
5371 (notif_stop): New variable.
5372 (handle_v_stopped): Remove.
5373 (handle_v_requests): Don't call handle_v_stopped. Call
5374 handle_ack_notif instead.
5375 (queue_stop_reply_callback): Call notif_event_enque instead
5376 of queue_stop_reply.
5377 (handle_status): Don't call send_next_stop_reply, call
5378 notif_write_event instead.
5379 (kill_inferior_callback): Likewise.
5380 (detach_or_kill_inferior_callback): Likewise.
5381 (main): Call initialize_notif.
5382 (process_serial_event): Call QUEUE_is_empty.
5383 (handle_target_event): Call notif_push instead of push event.
5384 * server.h (push_event): Remove declaration.
5385
61c125b9
TT
53862012-12-10 Tom Tromey <tromey@redhat.com>
5387
5388 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
5389 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
5390 macros.
5391 (.c.o): Rewrite.
5392 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
5393 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
5394 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
5395 (amd64-linux-ipa.o, ax.o): Rewrite.
5396 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
5397 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
5398 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
5399 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
5400 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
5401 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
5402 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
5403 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
5404 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
5405 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
5406 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
5407 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
5408 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
5409 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
5410 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
5411 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
5412 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
5413 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
5414 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
5415 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
5416 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
5417 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
5418 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
5419 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
5420 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
5421 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
5422 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
5423 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
5424 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
5425 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
5426 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
5427 (reg-tilegx.o): Remove.
5428 (all_object_files): New macro.
5429 Include .deps files.
5430 * aclocal.m4, configure: Rebuild.
5431 * acinclude.m4: Include depstand.m4, lead-dot.m4.
5432 * configure.ac: Invoke ZW_CREATE_DEPDIR,
5433 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
5434
e90e9ad9
TT
54352012-12-05 Tom Tromey <tromey@redhat.com>
5436
5437 PR gdb/14917:
5438 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
5439
02d403bf 54402012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
5441
5442 * configure.ac: Check for linux/perf_event.h.
5443 * config.in: Regenerated.
5444 * configure: Regenerated.
5445
0270a750
PA
54462012-11-26 Maxime Villard <rustyBSD@gmx.fr>
5447
5448 * hostio.c (handle_readlink): Decrease buffer size
5449 parameter passed to readlink by one byte.
5450
8c29b58e
YQ
54512012-11-26 Yao Qi <yao@codesourcery.com>
5452
5453 * configure.ac (build_warnings): Append '-Wempty-body'.
5454 * configure: Regenerated.
5455 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
5456 body.
5457
8bdce1ff
PM
54582012-11-15 Pierre Muller <muller@sourceware.org>
5459
5460 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
5461 * config.in: Regenerate.
5462 * configure: Regenerate.
5463 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
5464 Use "gdb_wait.h" header instead of <sys/wait.h> header.
5465 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
5466 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
5467 header.
5468 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
5469 instead of <sys/wait.h> header.
5470 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
5471
02d403bf 54722012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
5473
5474 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
5475 (various make rules): Remove -DGDBSERVER
5476
fbd5db48
YQ
54772012-11-09 Yao Qi <yao@codesourcery.com>
5478
5479 * spu-low.c (current_ptid): Move it to ..
5480 * gdbthread.h: ... here. New.
5481 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
5482 * server.c (myresume, process_serial_event): Likewise.
5483 * thread-db.c (thread_db_find_new_threads): Likewise.
5484 * tracepoint.c (run_inferior_command): Likewise.
5485
b3dc46ff
AB
54862012-10-01 Andrew Burgess <aburgess@broadcom.com>
5487
5488 * server.c (handle_search_memory_1): Include access length in
5489 warning message.
5490
07c04788
HPN
54912012-09-05 Michael Brandt <michael.brandt@axis.com>
5492
5493 * linux-crisv32-low.c: Fix compile errors.
5494
918d227b
YQ
54952012-09-04 Yao Qi <yao@codesourcery.com>
5496
5497 * tracepoint.c (cmd_qtsv): Adjust debug message.
5498 Don't check CUR_TPOINT.
5499
18c1b81a
YQ
55002012-08-28 Yao Qi <yao@codesourcery.com>
5501
5502 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
5503 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
5504 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
5505 Remove declarations of xmalloc, xreallloc, xstrdup and
5506 freeargv.
5507 * Makefile.in (libiberty_h): New.
5508 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
5509 (linux-bfin-low.o): Append dependency 'libiberty.h'.
5510
dc82f37b
YQ
55112012-08-23 Yao Qi <yao@codesourcery.com>
5512
5513 * server.h: Remove declaration of 'xsnprintf'.
5514
406b1477
KS
55152012-08-22 Keith Seitz <keiths@redhat.com>
5516
5517 * server.h: Include build-gnulib-gbserver/config.h.
5518 * gdbreplay.c: Likewise.
5519
e6712ff1
DE
55202012-08-08 Doug Evans <dje@google.com>
5521
5522 * Makefile.in (SFILES): Add gdb_vecs.c.
5523 (OBS): Add gdb_vecs.o.
5524 (gdb_vecs_h, host_defs_h): New variables.
5525 (thread-db.o): Add $(gdb_vecs_h) dependency.
5526 (gdb_vecs.o): New rule.
5527 * thread-db.c: #include "gdb_vecs.h".
5528 (thread_db_load_search): Use a vector to iterate over path elements.
5529 Handle text appearing after "$pdir".
5530
5531 * configure.ac: Add check for strstr.
5532 * config.in: Regenerate.
5533 * configure: Regenerate.
5534
7c3270ae
UW
55352012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
5536
5537 * hostio.c (handle_pread): If pread fails, fall back to attempting
5538 lseek/read.
5539 (handle_pwrite): Likewise for pwrite.
5540
b62e2b27
UW
55412012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
5542
5543 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
5544 between unsupported TYPE and unimplementable ADDR/LEN combination.
5545 (arm_insert_point): Act on new return value.
5546
78a99e91
PA
55472012-07-31 Pedro Alves <palves@redhat.com>
5548
5549 * server.c (process_point_options): Only skip tokens if we find
5550 one that is unrecognized. Don't treat 'X' specially while
5551 skipping unrecognized tokens.
5552
fcf303ab
UW
55532012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
5554
5555 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
5556 to 4-byte-align HW breakpoint addresses for Thumb.
5557
7255706c
YQ
55582012-07-27 Yao Qi <yao@codesourcery.com>
5559
5560 PR remote/14161.
5561
5562 * server.h: Declare gdb_agent_about_to_close.
5563 * target.c (kill_inferior): Include "agent.h".
5564 New. Send command 'kill'.
5565 * target.h (kill_inferior): Removed macro.
5566 * tracepoint.c (gdb_agent_about_to_close): New.
5567 (gdb_agent_helper_thread): Handle command 'close'.
5568 Wait endlessly until the inferior stops.
5569 Install gdb_agent_remove_socket to atexit hook.
5570 (agent_socket_name): New static variable.
5571 (gdb_agent_socket_init): Replace local variable 'name' with
5572 'agent_socket_name'.
5573 (gdb_agent_remove_socket): New.
5574
5a3f286f
YQ
55752012-07-27 Yao Qi <yao@codesourcery.com>
5576
5577 * server.c (process_point_options): Stop at 'X' when parsing.
5578
961bd387
ME
55792012-07-19 Michael Eager <eager@eagercon.com>
5580
a261b8f5 5581 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
5582 to hw_execute.
5583 * linux-x86-low.c (x86_insert_point, x86_remove_point):
5584 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
5585 hardware breakpoint.
5586
aa7c7447
JK
55872012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5588
5589 * gdbserver/linux-low.c (initialize_low): Call
5590 linux_ptrace_init_warnings.
5591
7f216e7c
DE
55922012-07-02 Doug Evans <dje@google.com>
5593
5594 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
5595 pointer to int.
5596
d3ce09f5
SS
55972012-07-02 Stan Shebs <stan@codesourcery.com>
5598
5599 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
5600 (ax.o): Add it to build rule.
5601 (ax-ipa.o): Ditto.
5602 (OBS): Add format.o.
5603 (IPA_OBS): Add format.o.
5604 * server.c (handle_query): Claim support for breakpoint commands.
5605 (process_point_options): Add command case.
5606 (process_serial_event): Leave running if there are printfs in
5607 effect.
5608 * mem-break.h (any_persistent_commands): Declare.
5609 (add_breakpoint_commands): Declare.
5610 (gdb_no_commands_at_breakpoint): Declare.
5611 (run_breakpoint_commands): Declare.
5612 * mem-break.c (struct point_command_list): New struct.
5613 (struct breakpoint): New field command_list.
5614 (any_persistent_commands): New function.
5615 (add_commands_to_breakpoint): New function.
5616 (add_breakpoint_commands): New function.
5617 (gdb_no_commands_at_breakpoint): New function.
5618 (run_breakpoint_commands): New function.
5619 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
5620 locally.
5621 * ax.c: Include format.h.
5622 (ax_printf): New function.
5623 (gdb_eval_agent_expr): Add printf opcode.
5624
2f8f6aed
YQ
56252012-06-13 Yao Qi <yao@codesourcery.com>
5626
5627 * server.c (start_inferior): Remove duplicated writes to fields
5628 'last_resume_kind' and 'last_status' of 'current_inferior'.
5629
0c9070b3
YQ
56302012-06-12 Yao Qi <yao@codesourcery.com>
5631 Pedro Alves <palves@redhat.com>
5632
5633 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
5634 comment.
5635 * server.c (handle_v_cont): Extend comment.
5636
c52daf70
YQ
56372012-06-11 Yao Qi <yao@codesourcery.com>
5638
5639 * linux-low.c (linux_attach): Add 'static'.
5640
d38bbb0a
YQ
56412012-06-06 Yao Qi <yao@codesourcery.com>
5642
5643 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
5644
89dc0afd
JK
56452012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
5646
5647 Fix gcc -flto compilation warning.
5648 * server.c (main): Make variable multi_mode and attach volatile.
5649
75f62ce7
TJB
56502012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5651
5652 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
5653 if the platform doesn't know about it.
5654
65f479b6
PA
56552012-05-30 Jeff Kenton <jkenton@tilera.com>
5656
5657 * Makefile.in (SFILES): Add linux-tile-low.c.
5658 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
5659 * configure.srv: Handle tilegx-*-linux*.
5660 * linux-tile-low.c: New file.
5661
0c5bf5a9
JK
56622012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5663
5664 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
5665
a493e3e2
PA
56662012-05-24 Pedro Alves <palves@redhat.com>
5667
5668 PR gdb/7205
5669
43aaf8b6 5670 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 5671
2ea28649
PA
56722012-05-24 Pedro Alves <palves@redhat.com>
5673
5674 PR gdb/7205
5675
5676 Replace target_signal with gdb_signal throughout.
5677
8d409d16
MR
56782012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
5679
5680 * linux-low.c (linux_store_registers): Avoid the copying sequence
5681 when no data has been retrieved by ptrace.
5682
23512c01
MGD
56832012-05-22 Will Deacon <will.deacon@arm.com>
5684
5685 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
5686 Include asm/ptrace.h.
5687 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
5688 already defined.
5689
4934b29e
MR
56902012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
5691
5692 * linux-low.c (linux_store_registers): Don't re-retrieve data
5693 with ptrace that has already been obtained from /proc. Always
5694 copy any data retrieved with ptrace to the buffer supplied.
5695
bde24c0a
PA
56962012-05-11 Yao Qi <yao@codesourcery.com>
5697 Pedro Alves <palves@redhat.com>
5698
5699 * linux-low.c (enum stopping_threads_kind): New.
5700 (stopping_threads): Change type to `enum stopping_threads_kind'.
5701 (handle_extended_wait): If stopping and suspending threads, leave
5702 the new_lwp suspended too.
5703 (linux_wait_for_event): Adjust.
5704 (stop_all_lwps): Set `stopping_threads' to
5705 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
5706 whether we're suspending threads or just stopping them. Assert no
5707 recursion happens.
5708
623b6bdf
YQ
57092012-04-29 Yao Qi <yao@codesourcery.com>
5710
5711 * server.h: Move some code to ...
5712 * gdbthread.h: ... here. New.
5713 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
5714 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
5715 (nto-low.o, win32-low.o): Likewise.
5716 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
5717 * regcache.c, remote-utils.c, server.c: Likewise.
5718 * target.c, tracepoint.c, win32-low.c: Likewise.
5719
f15f9948
TJB
57202012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5721
5722 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
5723 (PTRACE_ARG4_TYPE): Likewise.
5724 (PTRACE_XFER_TYPE): Likewise.
5725 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
5726 ptrace to PTRACE_ARG3_TYPE.
5727 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
5728 (PTRACE_ARG4_TYPE): Likewise.
5729 (PTRACE_XFER_TYPE): Likewise.
5730 (linux_detach_one_lwp): Cast fourth argument of
5731 ptrace to long then PTRACE_ARG4_TYPE.
5732 (regsets_fetch_inferior_registers): Cast third argument of
5733 ptrace to long then PTRACE_ARG3_TYPE.
5734 (regsets_store_inferior_registers): Likewise.
5735
38ea300a
PA
57362012-04-20 Pedro Alves <palves@redhat.com>
5737
5738 * configure: Regenerate.
5739
c971b7fa
PA
57402012-04-19 Pedro Alves <palves@redhat.com>
5741
43aaf8b6 5742 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 5743 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
5744 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
5745 (all, install-only, uninstall, clean-info, all-lib, clean): No
5746 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
5747 (maintainer-clean realclean distclean): Use subdir_do.
5748 (subdir_do): New.
5749 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 5750 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
5751 * acinclude.m4: Include acx_configure_dir.m4.
5752 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
5753 calls. Call AC_PROG_RANLIB. Configure gnulib using
5754 ACX_CONFIGURE_DIR.
5755 (GNULIB): New.
5756 (GNULIB_STDINT_H): Adjust.
5757 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
5758 * gdbreplay.c: Include build-gnulib/config.h.
5759 * server.h: Likewise.
5760 * aclocal.m4: Regenerate.
5761 * config.in: Regenerate.
5762 * configure: Regenerate.
c971b7fa 5763
809277f8
PA
57642012-04-19 Pedro Alves <palves@redhat.com>
5765
5766 * Makefile.in (LIBGNU, INCGNU): Adjust.
5767 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
5768 (all, install-only, uninstall, clean-info, all-lib, clean)
5769 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
5770 * configure.ac: Adjust AC_OUTPUT output.
5771 * aclocal.m4: Regenerate.
5772 * configure: Regenerate.
5773
fd9bb8b8
PA
57742012-04-19 Pedro Alves <palves@redhat.com>
5775
5776 * Makefile.in (generated_files): New.
5777 (server_h): Remove the explicit dependency on config.h, and depend
5778 on $generated_files.
5779
1c298c66
PA
57802012-04-19 Pedro Alves <palves@redhat.com>
5781
5782 * Makefile.in (INCGNU): Add -Ignulib.
5783
57c4b50b
PA
57842012-04-19 Pedro Alves <palves@redhat.com>
5785
5786 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
5787 (INCGNU): ... this, and spell out -I here.
5788 (GNULIB_LIB): Rename to ...
5789 (LIBGNU): ... this.
5790 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
5791
1030e047
PA
57922012-04-19 Pedro Alves <palves@redhat.com>
5793
5794 * config.in: Regenerate.
5795
447d4319
PA
57962012-04-19 Pedro Alves <palves@redhat.com>
5797
5798 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
5799 * server.h (memmem): Remove declaration.
5800 * config.in: Regenerate.
5801 * configure: Regenerate.
5802
aad9eab9
YQ
58032012-04-19 Yao Qi <yao@codesourcery.com>
5804
5805 * Makefile.in (SFILES): Add common/vec.c.
5806 (OBS): Add vec.o.
5807 (vec.o): New rule.
5808
3e10640f
YQ
58092012-04-19 Yao Qi <yao@codesourcery.com>
5810
5811 * remote-utils.c (prepare_resume_reply): Replace with macro
5812 target_core_of_thread.
5813 * server.c (handle_qxfer_threads_proper): Likewise.
5814 * target.h (traget_core_of_thread): New macro.
5815
71622373
PA
58162012-04-18 Pedro Alves <palves@redhat.com>
5817
5818 * aclocal.m4: Regenerate.
5819 * configure: Regenerate.
5820
80d26939
YQ
58212012-04-16 Yao Qi <yao@codesourcery.com>
5822
5823 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
5824 duplicated on address.
5825
42476b70
YQ
58262012-04-16 Yao Qi <yao@codesourcery.com>
5827
5828 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
5829 (struct tracepoint_action_ops) <send>: New field.
5830 (m_tracepoint_action_send, r_tracepoint_action_send): New.
5831 (agent_expr_send, x_tracepoint_action_send): New.
5832 (l_tracepoint_action_send): New.
5833 (cmd_qtdp): Download and install tracepoint
5834 according to `use_agent'.
5835 (run_inferior_command): Add one more parameter `len'.
5836 Update callers.
5837 (tracepoint_send_agent): New.
5838 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
5839
7bc83639
YQ
58402012-04-16 Yao Qi <yao@codesourcery.com>
5841
5842 * tracepoint.c (download_tracepoints): Moved to ...
5843 (cmd_qtstart): ... here.
5844
5f18041e
YQ
58452012-04-14 Yao Qi <yao@codesourcery.com>
5846
5847 * tracepoint.c: Include inttypes.h.
5848 (struct collect_memory_action): Use sized types.
5849 (struct tracepoint): Likewise.
5850 (cmd_qtdp, stop_tracing): Update print specifiers.
5851 (cmd_qtp, response_tracepoint): Likewise.
5852 (collect_data_at_tracepoint): Likewise.
5853 (collect_data_at_step): Likewise.
5854
55a8c076
YQ
58552012-04-14 Yao Qi <yao@codesourcery.com>
5856
5857 Import gnulib module inttypes.
5858 * aclocal.m4, config.in, configure: Regenerated.
5859
dc750257
YQ
58602012-04-14 Yao Qi <yao@codesourcery.com>
5861
5862 * Makefile.in (maintainer-clean, realclean, distclean): Remove
5863 Makefile and config.status at last.
5864
0ab5faf9
YQ
58652012-04-13 Yao Qi <yao@codesourcery.com>
5866
5867 * tracepoint.c: Include stdint.h unconditionally.
5868
18f5fd81
TJB
58692012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5870
5871 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
5872 on BFD_HAVE_SYS_PROCFS_TYPE.
5873 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
5874 * configure: Regenerate.
5875 * config.in: Likewise.
5876
4d47af5c
L
58772012-04-13 H.J. Lu <hongjiu.lu@intel.com>
5878
5879 * Makefile.in (clean): Also remove x32.c x32-linux.c
5880 x32-avx.c x32-avx-linux.c.
5881 (x32.o): New target.
5882 (x32.c): Likewise.
5883 (x32-linux.o): Likewise.
5884 (x32-linux.c): Likewise.
5885 (x32-avx.o): Likewise.
5886 (x32-avx.c): Likewise.
5887 (x32-avx-linux.o): Likewise.
5888 (x32-avx-linux.c): Likewise.
5889
5890 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
5891 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
5892 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
5893 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
5894 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
5895 i386/x32-avx-linux.xml.
5896
5897 * linux-x86-low.c (init_registers_x32_linux): New prototype.
5898 (init_registers_x32_avx_linux): Likwise.
5899 (x86_linux_update_xmltarget): Call init_registers_x32_linux
5900 or init_registers_x32_avx_linux if linux_is_elf64 is false.
5901
ecedbe58
PA
59022012-04-13 Pedro Alves <palves@redhat.com>
5903
5904 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
5905 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
5906 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
5907 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
5908 the sub-make.
5909
c92b5177
L
59102012-04-12 H.J. Lu <hongjiu.lu@intel.com>
5911
5912 * linux-x86-low.c (compat_x32_clock_t): New.
5913 (compat_x32_siginfo_t): Likewise.
5914 (compat_x32_siginfo_from_siginfo): Likewise.
5915 (siginfo_from_compat_x32_siginfo): Likewise.
5916 (linux_is_elf64): Likewise.
5917 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
5918 and siginfo_from_compat_x32_siginfo for x32.
5919 (x86_arch_setup): Set linux_is_elf64.
5920
214d508e
L
59212012-04-12 H.J. Lu <hongjiu.lu@intel.com>
5922
5923 PR gdb/13969
5924 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
5925 e_machine field.
5926 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
5927 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
5928 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
5929 compatible with process.
5930
c9a1864a
YQ
59312012-04-12 Yao Qi <yao@codesourcery.com>
5932
5933 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
5934 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
5935 (install-only, install-info, clean): Handle sub dir gnulib.
5936 (all-lib, am--refresh): New targets.
5937 (memmem.o): Remove target.
5938 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
5939 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
5940 (AC_REPLACE_FUNCS): Remove memmem.
5941 Invoke gl_INIT and AM_INIT_AUTOMAKE.
5942 (AC_OUTPUT): Generate Makefile in gnulib/.
5943 * aclocal.m4, config.in, configure: Regenerated.
5944
367ba2c2
MR
59452012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
5946
5947 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
5948
9d236627
PA
59492012-04-05 Pedro Alves <palves@redhat.com>
5950
5951 -Werror=strict-aliasing
5952
5953 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
5954 pointer.
5955
111217b3
PA
59562012-04-04 Pedro Alves <palves@redhat.com>
5957
5958 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
5959 (sparc_store_gregset_from_stack, sparc_store_gregset)
5960 (sparc_breakpoint_at): Fix formatting.
5961
8365dcf5
TJB
59622012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5963
5964 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
5965 are available.
5966 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
5967 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
5968 * config.in: Regenerate.
5969 * configure: Likewise.
5970
689cc2ae
PA
59712012-03-29 Pedro Alves <palves@redhat.com>
5972
5973 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
5974 Correct ptrace arguments.
5975
c14dfd32
PA
59762012-03-28 Pedro Alves <palves@redhat.com>
5977
5978 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
5979 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
5980 (IA64_FR1_REGNUM): New defines.
5981 (ia64_fetch_register): New.
5982 (the_low_target): Install it.
5983 * linux-low.h (struct linux_target_ops) <fetch_register>: New
5984 field.
5985 * linux-low.c (linux_fetch_registers): Try the
5986 the_low_target.fetch_register hook first.
5987
5988 * linux-arm-low.c (the_low_target): Adjust.
5989 * linux-bfin-low.c (the_low_target): Adjust.
5990 * linux-cris-low.c (the_low_target): Adjust.
5991 * linux-crisv32-low.c (the_low_target): Adjust.
5992 * linux-m32r-low.c (the_low_target): Adjust.
5993 * linux-m68k-low.c (the_low_target): Adjust.
5994 * linux-mips-low.c (the_low_target): Adjust.
5995 * linux-ppc-low.c (the_low_target): Adjust.
5996 * linux-s390-low.c (the_low_target): Adjust.
5997 * linux-sh-low.c (the_low_target): Adjust.
5998 * linux-sparc-low.c (the_low_target): Adjust.
5999 * linux-tic6x-low.c (the_low_target): Adjust.
6000 * linux-x86-low.c (the_low_target): Adjust.
6001 * linux-xtensa-low.c (the_low_target): Adjust.
6002
63c88e13
PA
60032012-03-26 Pedro Alves <palves@redhat.com>
6004
6005 * server.c (handle_qxfer_libraries): Don't bail early if
6006 the_target->qxfer_libraries_svr4 is not NULL.
6007
fb723180
PA
60082012-03-26 Pedro Alves <palves@redhat.com>
6009
6010 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
6011
0afae3cf
PA
60122012-03-23 Pedro Alves <palves@redhat.com>
6013
6014 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
6015 "library-list-svr4" element's start tag when the the DSO list is
6016 empty.
6017
485f1ee4
PA
60182012-03-23 Pedro Alves <palves@redhat.com>
6019
6020 * linux-low.c (read_one_ptr): Read the inferior's pointer through
6021 a variable whose type size is the same as the inferior's pointer
6022 size.
6023
a5362b9a
TS
60242012-03-21 Thomas Schwinge <thomas@codesourcery.com>
6025
6026 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
6027 struct siginfo.
6028 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
6029 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
6030 * linux-low.h: Include <signal.h>.
6031 (struct siginfo): Remove forward declaration.
6032 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
6033 struct siginfo.
6034
d226c142
MF
60352012-03-21 Mike Frysinger <vapier@gentoo.org>
6036
6037 * .gitignore: Ignore more files.
6038
122f36ef
PA
60392012-03-19 Pedro Alves <palves@redhat.com>
6040 Jan Kratochvil <jan.kratochvil@redhat.com>
6041
6042 * server.c (cont_thread, general_thread): Add describing comments.
6043 (start_inferior): Clear `cont_thread'.
6044 (handle_v_cont): Don't set `cont_thread' if resuming all threads
6045 of a process.
6046
fc3e5175
YQ
60472012-03-15 Yao Qi <yao@codesourcery.com>
6048
6049 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
6050 handling to ...
6051 (cmd_qtdp): ... here.
6052
8d0d92cd
YQ
60532012-03-15 Yao Qi <yao@codesourcery.com>
6054
6055 * tracepoint.c (struct tracepoint_action_ops): New.
6056 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
6057 (m_tracepoint_action_download): New.
6058 (r_tracepoint_action_download): New.
6059 (x_tracepoint_action_download): New.
6060 (l_tracepoint_action_download): New.
6061 (add_tracepoint_action): Install `action->ops' according type.
6062 (download_tracepoint_1): Move code `download' function pointer
6063 of various tracepoint_action_ops.
6064
87b0bb13
JK
60652012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
6066
6067 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
6068 linux_ptrace_attach_warnings.
6069
5f572dec
JK
60702012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
6071
6072 * Makefile.in (linux-ptrace.o): New.
6073 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
6074 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
6075 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
6076 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
6077 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
6078 of these targets.
6079 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
6080
f4647387
YQ
60812012-03-08 Yao Qi <yao@codesourcery.com>
6082 Pedro Alves <palves@redhat.com>
6083
6084 Fix PR server/13392.
6085 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
6086 offset of JMP insn.
6087 * tracepoint.c (remove_tracepoint): New.
6088 (cmd_qtdp): Call remove_tracepoint when failed to install.
6089
9b224c5e
PA
60902012-03-07 Pedro Alves <palves@redhat.com>
6091
6092 * linux-low.c (get_detach_signal): New.
6093 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
6094 Pass on pending signals to PTRACE_DETACH. Check the result of the
6095 ptrace call.
6096 * server.c (program_signals, program_signals_p): New.
6097 (handle_general_set): Handle QProgramSignals.
6098 * server.h (program_signals, program_signals_p): Declare.
6099
e237a7e2
JK
61002012-03-05 Pedro Alves <palves@redhat.com>
6101 Jan Kratochvil <jan.kratochvil@redhat.com>
6102
6103 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
6104 New comment why.
6105
5808517f
YQ
61062012-03-03 Yao Qi <yao@codesourcery.com>
6107
6108 * tracepoint.c (tracepoint_look_up_symbols): Update call to
6109 agent_look_up_symbols.
6110
58b4daa5
YQ
61112012-03-03 Yao Qi <yao@codesourcery.com>
6112
6113 * Makefile.in (linux-low.o): Keep dependence on agent.h.
6114 (linux-x86-low.o): Likewise.
6115 * server.h: Remove in_process_agent_loaded.
6116 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
6117 common/agent.c.
6118 Update callers.
6119
8ffcbaaf
YQ
61202012-03-03 Yao Qi <yao@codesourcery.com>
6121
6122 * tracepoint.c (gdb_agent_capability): New global.
6123 (in_process_agent_loaded_ust): Renamed to
6124 `in_process_agent_supports_ust'.
6125 Update callers.
6126 (in_process_agent_supports_ust): Call agent_capability_check.
6127 (clear_installed_tracepoints): Assert that agent supports
6128 agent.
6129
d1feda86
YQ
61302012-03-03 Yao Qi <yao@codesourcery.com>
6131
6132 * linux-low.c (linux_supports_agent): New.
6133 (linux_target_ops): Initialize field `supports_agent' with
6134 linux_supports_agent.
6135 * target.h (struct target_ops) <supports_agent>: New.
6136 (target_supports_agent): New macro.
6137 * server.c (handle_general_set): Handle packet 'QAgent'.
6138 (handle_query): Send `QAgent+'.
6139 * Makefile.in (server.o): Depends on agent.h.
6140
2fa291ac
YQ
61412012-03-03 Yao Qi <yao@codesourcery.com>
6142
6143 * Makefile.in (OBS): Add agent.o.
6144 Add new rule for agent.o.
6145 Track dependence of tracepoint.c on agent.h.
6146 * tracepoint.c (run_inferior_command_1):
6147 (run_inferior_command): Call agent_run_command.
6148 (gdb_ust_connect_sync_socket): Deleted. Move it to
6149 common/agent.c.
6150 (resume_thread, stop_thread): Likewise.
6151 (gdb_ust_socket_init): Renamed to ...
6152 (gdb_agent_socket_init): ... New.
6153 (gdb_ust_thread): Renamed to ...
6154 (gdb_agent_helper_thread): ... New.
6155 (gdb_ust_init): Move some code to ...
6156 (gdb_agent_init): ... here. New.
6157 [HAVE_UST]: Call gdb_ust_init.
6158 (initialize_tracepoint_ftlib): Call gdb_agent_init.
6159 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
6160 * config.in, configure: Regenerated.
6161
05044653
PA
61622012-03-02 Pedro Alves <palves@redhat.com>
6163
6164 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
6165 * linux-low.c (struct simple_pid_list): New.
6166 (stopped_pids): New a struct simple_pid_list pointer.
6167 (add_to_pid_list, pull_pid_from_list): New.
6168 (handle_extended_wait): Don't assume the first signal new children
6169 report is SIGSTOP. Adjust call to pull_pid_from_list.
6170 (linux_wait_for_lwp): Adjust.
6171
8d00225b
YQ
61722012-03-02 Yao Qi <yao@codesourcery.com>
6173
6174 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
6175 debug log.
6176
19560ba5
YQ
61772012-03-02 Yao Qi <yao@codesourcery.com>
6178
6179 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
6180 `stop_pc' and `tpoint'. Update caller.
6181
1faeff08
MR
61822012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
6183
6184 * linux-low.h (linux_target_ops): Add regset_bitmap member.
6185 * linux-low.c (use_linux_regsets): New macro.
6186 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
6187 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
6188 (linux_register_in_regsets): New function.
6189 (usr_fetch_inferior_registers): Skip registers covered by
6190 regsets.
6191 (usr_store_inferior_registers): Likewise.
6192 (usr_fetch_inferior_registers): New macro.
6193 (usr_store_inferior_registers): Likewise.
6194 (linux_fetch_registers): Handle mixed regset/non-regset targets.
6195 (linux_store_registers): Likewise.
6196 * linux-mips-low.c (init_registers_mips_dsp_linux): New
6197 prototype.
6198 (init_registers_mips64_dsp_linux): Likewise.
6199 (init_registers_mips_linux): New macro.
6200 (init_registers_mips_dsp_linux): Likewise.
6201 (mips_dsp_num_regs): Likewise.
6202 (DSP_BASE, DSP_CONTROL): New fallback macros.
6203 (mips_base_regs): New macro.
6204 (mips_regmap): Use it. Fix the size.
6205 (mips_dsp_regmap): New variable.
6206 (mips_dsp_regset_bitmap): Likewise.
6207 (mips_arch_setup): New function.
6208 (mips_cannot_fetch_register): Use the_low_target.regmap rather
6209 than mips_regmap.
6210 (mips_cannot_store_register): Likewise.
6211 (the_low_target): Update .arch_setup, .num_regs and .regmap
6212 initializers. Add .regset_bitmap initializer.
6213 * linux-arm-low.c (the_low_target): Add .regset_bitmap
6214 initializer.
6215 * linux-bfin-low.c (the_low_target): Likewise.
6216 * linux-cris-low.c (the_low_target): Likewise.
6217 * linux-crisv32-low.c (the_low_target): Likewise.
6218 * linux-ia64-low.c (the_low_target): Likewise.
6219 * linux-m32r-low.c (the_low_target): Likewise.
6220 * linux-m68k-low.c (the_low_target): Likewise.
6221 * linux-ppc-low.c (the_low_target): Likewise.
6222 * linux-s390-low.c (the_low_target): Likewise.
6223 * linux-sh-low.c (the_low_target): Likewise.
6224 * linux-sparc-low.c (the_low_target): Likewise.
6225 * linux-tic6x-low.c (the_low_target): Likewise.
6226 * linux-x86-low.c (the_low_target): Likewise.
6227 * linux-xtensa-low.c (the_low_target): Likewise.
6228 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
6229 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
6230 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
6231 srv_xmlfiles.
6232 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
6233 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
6234
c03e6ccc
YQ
62352012-02-29 Yao Qi <yao@codesourcery.com>
6236 Pedro Alves <palves@redhat.com>
6237
6238 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
6239 `step_over_finished' is true.
6240
644cebc9
PA
62412012-02-27 Pedro Alves <palves@redhat.com>
6242
6243 * linux-low.c (pid_is_stopped): Delete, moved to common/.
6244 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
6245
c14d7ab2
PA
62462012-02-27 Pedro Alves <palves@redhat.com>
6247
6248 PR server/9684
6249 * linux-low.c (pid_is_stopped): New.
6250 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
6251
412c89dd
LM
62522012-02-25 Luis Machado <lgustavo@codesourcery.com>
6253
6254 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
6255 of conditions.
6256
b745defe
MR
62572012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
6258
6259 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
6260
9f3a5c85
LM
62612012-02-24 Luis Machado <lgustavo@codesourcery>
6262
6263 * server.c (handle_query): Advertise support for target-side
6264 breakpoint condition evaluation.
6265 (process_point_options): New function.
6266 (process_serial_event): When inserting a breakpoint, check for
6267 a target-side condition that should be evaluated.
6268
6269 * mem-break.c: Include regcache.h and ax.h.
6270 (point_cond_list_t): New data structure.
6271 (breakpoint) <cond_list>: New field.
6272 (find_gdb_breakpoint_at): Make non-static.
6273 (delete_gdb_breakpoint_at): Clear any target-side
6274 conditions.
6275 (clear_gdb_breakpoint_conditions): New function.
6276 (add_condition_to_breakpoint): Likewise.
6277 (add_breakpoint_condition): Likewise.
6278 (gdb_condition_true_at_breakpoint): Likewise.
6279 (gdb_breakpoint_here): Return result directly instead
6280 of going through a local variable.
6281
6282 * mem-break.h (find_gdb_breakpoint_at): New prototype.
6283 (clear_gdb_breakpoint_conditions): Likewise.
6284 (add_breakpoint_condition): Likewise.
6285 (gdb_condition_true_at_breakpoint): Likewise.
6286
6287 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
6288 (need_step_over_p): Take target-side breakpoint condition into
6289 consideration.
6290
5e1dc496
LM
62912012-02-24 Luis Machado <lgustavo@codesourcery>
6292
6293 * server.h: Include tracepoint.h.
6294 (agent_mem_read, agent_get_trace_state_variable_value,
6295 agent_set_trace_state_variable_value,
6296 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
6297 get_set_tsv_func_addr): New prototypes.
6298
6299 * ax.h: New include file.
6300 * ax.c: New source file.
6301
6302 * tracepoint.c: Include ax.h.
6303 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
6304 agent_expr, eval_result_type): Move to ax.h.
6305 (parse_agent_expr): Rename to ...
6306 (gdb_parse_agent_expr): ... this, make it non-static and move
6307 to ax.h.
6308 (unparse_agent_expr) Rename to ...
6309 (gdb_unparse_agent_expr): ... this, make it non-static and move
6310 to ax.h.
6311 (eval_agent_expr): Rename to ...
6312 (eval_tracepoint_agent_expr): ... this.
6313 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
6314 forward declarations.
6315 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
6316 (agent_get_trace_state_variable_value): New function.
6317 (agent_set_trace_state_variable_value): New function.
6318 (cmd_qtdp): Call gdb_parse_agent_expr (...).
6319 (response_tracepoint): Call gdb_unparse_agent_expr (...).
6320 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
6321 (condition_true_at_tracepoint): Likewise.
6322 (parse_agent_expr): Rename to ...
6323 (gdb_parse_agent_expr): ... this and move to ax.c.
6324 (unparse_agent_expr): Rename to ...
6325 (gdb_unparse_agent_expr): ... this and move to ax.c.
6326 (gdb_agent_op_name): Move to ax.c.
6327 (eval_agent_expr): Rename to ...
6328 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
6329 and move to ax.c.
6330 (eval_tracepoint_agent_expr): New function.
6331 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 6332 non-static.
5e1dc496
LM
6333 (current_insn_ptr, emit_error, struct bytecode_address): Move to
6334 ax.c.
6335 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
6336 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
6337 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
6338 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
6339 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
6340 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
6341 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
6342 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
6343 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
6344 (compile_bytecodes): Remove forward declaration.
6345 (is_goto_target): Move to ax.c.
6346 (compile_bytecodes): Move to ax.c and call
6347 agent_get_trace_state_variable_value (...) and
6348 agent_set_trace_state_variable_value (...).
6349
6350 * Makefile.in: Update ax.c and IPA dependencies.
6351
277e4e52
PA
63522012-02-24 Pedro Alves <palves@redhat.com>
6353
6354 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
6355 (cmd_bigqtbuffer_circular): ... this. Only handle
6356 'QTBuffer:circular:'.
6357 (handle_tracepoint_general_set): Adjust.
6358
bf4c19f7
YQ
63592012-02-16 Yao Qi <yao@codesourcery.com>
6360
6361 * inferiors.c: Move code to ...
6362 * dll.c: .... here. New.
6363 * server.h: Declare clear_dlls.
6364 * Makefile.in (SFILES): Add dll.c.
6365 (OBS): Add dll.o
6366 (dll.o): New rule.
6367
d73f2619
YQ
63682012-02-11 Yao Qi <yao@codesourcery.com>
6369
6370 * server.c: (handle_monitor_command): Add a new parameter
6371 `own_buf'.
6372 (handle_query): Update caller.
6373
f8255c2a
JB
63742012-02-09 Joel Brobecker <brobecker@adacore.com>
6375
6376 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
6377 * configure, config.in: Regenerate.
6378 * hostio.c: Provide an alternate implementation if HAVE_READLINK
6379 is not defined.
6380
da84f473
PA
63812012-02-02 Pedro Alves <palves@redhat.com>
6382
6383 Try SIGKILL first, then PTRACE_KILL.
6384 * linux-low.c (linux_kill_one_lwp): New.
6385 (linux_kill_one_lwp): Rename to ...
6386 (kill_one_lwp_callback): ... this. Use the new
6387 linux_kill_one_lwp.
6388
e886a173
PA
63892012-02-02 Pedro Alves <palves@redhat.com>
6390
6391 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
6392 inferior.
6393
be07f1a2
PA
63942012-01-27 Pedro Alves <palves@redhat.com>
6395
6396 * linux-low.c (linux_child_pid_to_exec_file): Delete.
6397 (elf_64_file_p): Make static.
6398 (linux_pid_exe_is_elf_64_file): New.
6399 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
6400 Delete declarations.
6401 (linux_pid_exe_is_elf_64_file): Declare.
6402 * linux-x86-low.c (x86_arch_setup): Use
6403 linux_pid_exe_is_elf_64_file.
6404
d8301ad1
JK
64052012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
6406
6407 * linux-low.c (linux_wait_for_event_1): Rename to ...
6408 (linux_wait_for_event): ... here and merge it with former
6409 linux_wait_for_event - new variable wait_ptid, use it.
6410 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
6411
01b17894
PA
64122012-01-23 Pedro Alves <palves@redhat.com>
6413
6414 * server.c (main): Avoid yet another case of infinite loop while
6415 detaching/killing after a longjmp.
6416
e825046f
JK
64172012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
6418
6419 Code cleanup.
6420 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
6421
b9e7b9c3
UW
64222012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
6423
6424 * hostio.c (handle_readlink): New function.
6425 (handle_vFile): Call it to handle "vFile:readlink" packets.
6426
901f9912
UW
64272012-01-20 Pedro Alves <palves@redhat.com>
6428 Ulrich Weigand <ulrich.weigand@linaro.org>
6429
6430 * server.c (handle_v_requests): Only support vAttach and vRun to
6431 start multiple processes when in extended protocol mode.
6432
fc1ab1a0
PA
64332012-01-17 Pedro Alves <palves@redhat.com>
6434
6435 * tracepoint.c (initialize_tracepoint): Use mmap instead of
6436 memalign plus mprotect to allocate the scratch buffer.
6437
7d5d4e98
PA
64382012-01-13 Pedro Alves <palves@redhat.com>
6439
6440 * server.c (attach_inferior): Clear `cont_thread'.
6441
f128d5e9
PA
64422012-01-13 Pedro Alves <palves@redhat.com>
6443
6444 * server.c (main): Avoid infinite loop while detaching/killing
6445 after a longjmp.
6446
06db92f0
DE
64472012-01-09 Doug Evans <dje@google.com>
6448
6449 * server.c (start_inferior): Set last_ptid in --wrapper case.
6450
32d92999
YQ
64512012-01-06 Yao Qi <yao@codesourcery.com>
6452
6453 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
6454 defined.
6455 [IN_PROCESS_AGENT] (debug_agent): New global variable.
6456
5e0a92a9
YQ
64572012-01-04 Yao Qi <yao@codesourcery.com>
6458
6459 * tracepoint.c (cmd_qtdp): Print debug message
6460 for static tracepoint.
6461
ae639e8c
YQ
64622012-01-04 Yao Qi <yao@codesourcery.com>
6463
6464 * tracepoint.c (trace_vdebug): Differentiate debug message
6465 between gdbserver and IPA.
6466
f72429c5
YQ
64672012-01-03 Yao Qi <yao@codesourcery.com>
6468
6469 * tracepoint.c (tracepoint_was_hit): Don't collect for
6470 static tracepoint.
6471
12c3e59c
JB
64722012-01-02 Joel Brobecker <brobecker@adacore.com>
6473
6474 * terminal.h: Reformat copyright header.
6475
67827812
JB
64762012-01-02 Joel Brobecker <brobecker@adacore.com>
6477
6478 * server.c (gdbserver_version): Update copyright year.
6479 * gdbreplay.c (gdbreplay_version): Likewise.
6480
3e52c33d
JK
64812011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
6482
6483 * linux-low.c (linux_create_inferior): Put empty if clause for write.
6484
6485 Revert:
6486 2011-12-18 Hui Zhu <teawater@gmail.com>
6487 * linux-low.c (linux_create_inferior): Save return value to ret.
6488
66f1260e
HZ
64892011-12-18 Hui Zhu <teawater@gmail.com>
6490
6491 * linux-low.c (linux_create_inferior): Save return value to ret.
6492
e77616d7
DE
64932011-12-16 Doug Evans <dje@google.com>
6494
e7b06c57
DE
6495 * linux-low.c (linux_create_inferior): If stdio connection,
6496 redirect stdin from /dev/null, stdout to stderr.
6497 * remote-utils.c (remote_is_stdio): New static global.
6498 (remote_connection_is_stdio): New function.
6499 (remote_prepare): Handle stdio connection.
6500 (remote_open): Ditto.
6501 (remote_close): Don't close stdin for stdio connections.
6502 (read_prim,write_prim): New functions. Replace all calls to
6503 read/write to these.
6504 * server.c (main): Watch for "-" argument. Move call to
6505 remote_prepare before start_inferior.
6506 * server.h (STDIO_CONNECTION_NAME): New macro.
6507 (remote_connection_is_stdio): Declare.
6508
e77616d7
DE
6509 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
6510 in debugging output.
6511
82067193
YQ
65122011-12-15 Yao Qi <yao@codesourcery.com>
6513
6514 * tracepoint.c: Include sys/syscall.h.
6515 (gdb_ust_thread): Remove preprocessor conditional.
6516
82bfbe7e
PA
65172011-12-14 Pedro Alves <pedro@codesourcery.com>
6518
6519 * linux-low.c (linux_detach_one_lwp): Call
6520 the_low_target.prepare_to_resume before detaching.
6521
712c6575
YQ
65222011-12-14 Yao Qi <yao@codesourcery.com>
6523
6524 * tracepoint.c (gdb_ust_thread): Don't ignore return value
6525 of write.
6526
d54d1edf
YQ
65272011-12-14 Yao Qi <yao@codesourcery.com>
6528
6529 * i386-low.c (i386_low_stopped_data_address): Initialize local
6530 variable `control'.
6531
6210a125
PA
65322011-12-13 Pedro Alves <pedro@codesourcery.com>
6533
6534 PR remote/13492
6535
6536 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
6537 DR_CONTROL unless necessary. Extend comments.
6538 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
6539 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
6540
2ece8244
YQ
65412011-12-13 Yao Qi <yao@codesourcery.com>
6542
6543 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
6544 macros.
6545 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
6546
784867a5
JK
65472011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
6548
6549 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
6550 Print new debug message for such case.
6551
6bf36717
JK
65522011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
6553
6554 Fix overlapping memcpy.
6555 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
6556 the read_inferior_memory transfer.
6557 (delete_fast_tracepoint_jump): New variable buf. Use it for the
6558 write_inferior_memory transfer.
6559 (set_fast_tracepoint_jump): New variable buf. Use it for the
6560 read_inferior_memory and write_inferior_memory transfers.
6561 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
6562 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
6563 Use it for the write_inferior_memory transfer.
6564 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
6565 buffers.
6566
50275556
MR
65672011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
6568
6569 * linux-low.c (fetch_register, store_register): Make code
6570 consistent, fix formatting.
6571
7325beb4
MR
65722011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
6573
6574 * linux-low.c (usr_store_inferior_registers): Factor out code
6575 to handle individual registers into...
6576 (store_register): ... this new function.
6577
c642a434
UW
65782011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
6579
6580 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
6581 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
6582 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
6583 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
6584 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
6585 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
6586 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
6587 (srv_xmlfiles): Add new XML files.
6588
6589 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
6590 and <sys/uio.h>.
6591 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
6592 (init_registers_s390_linux32v1): Add prototype.
6593 (init_registers_s390_linux32v2): Likewise.
6594 (init_registers_s390_linux64v1): Likewise.
6595 (init_registers_s390_linux64v2): Likewise.
6596 (init_registers_s390x_linux64v1): Likewise.
6597 (init_registers_s390x_linux64v2): Likewise.
6598 (s390_num_regs): Increment to 52.
6599 (s390_regmap): Add orig_r2 register.
6600 (s390_num_regs_3264): Increment to 68.
6601 (s390_regmap_3264): Add orig_r2 register.
6602 (s390_collect_ptrace_register): Handle orig_r2 register.
6603 (s390_supply_ptrace_register): Likewise.
6604 (s390_fill_last_break): New function.
6605 (s390_store_last_break): Likewise.
6606 (s390_fill_system_call): New function.
6607 (s390_store_system_call): Likewise.
6608 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
6609 register sets.
6610 (s390_check_regset): New function.
6611 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
6612 NT_S390_SYSTEM_CALL regsets and use appropriate description.
6613 Update target_regsets for available register sets.
6614
2268b414
JK
66152011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
6616 Jan Kratochvil <jan.kratochvil@redhat.com>
6617
6618 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
6619 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
6620 New.
6621 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
6622 * linux-low.h (struct process_info_private): New member r_debug.
6623 * server.c (handle_qxfer_libraries): Call
6624 the_target->qxfer_libraries_svr4.
6625 (handle_qxfer_libraries_svr4): New function.
6626 (qxfer_packets): New entry "libraries-svr4".
6627 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
6628 * target.h (struct target_ops): New member qxfer_libraries_svr4.
6629 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
6630 PACKET_qXfer_libraries_svr4.
6631
d6db1fab
UW
66322011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
6633
6634 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
6635 PSW address/mask between 8-byte and 16-byte formats.
6636 (s390_supply_ptrace_register): Likewise.
6637 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
6638 basic addressing mode bit.
6639
242f5f1c
SS
66402011-11-24 Stan Shebs <stan@codesourcery.com>
6641
6642 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
6643
f196051f
SS
66442011-11-17 Stan Shebs <stan@codesourcery.com>
6645
6646 * tracepoint.c (struct tracepoint): New field traceframe_usage.
6647 (tracing_start_time): New global.
6648 (tracing_stop_time): New global.
6649 (tracing_user_name): New global.
6650 (tracing_notes): New global.
6651 (tracing_stop_note): New global.
6652 (cmd_qtstart): Set traceframe_usage, start_time.
6653 (stop_tracing): Set stop_time.
6654 (cmd_qtstatus): Report additional status.
6655 (cmd_qtp): New function.
6656 (handle_tracepoint_query): Call it.
6657 (cmd_qtnotes): New function.
6658 (handle_tracepoint_general_set): Call it.
6659 (get_timestamp): Rename from tsv_get_timestamp.
6660
405f8e94
SS
66612011-11-14 Stan Shebs <stan@codesourcery.com>
6662 Kwok Cheung Yeung <kcy@codesourcery.com>
6663
6664 * linux-x86-low.c (small_jump_insn): New.
6665 (i386_install_fast_tracepoint_jump_pad): Add arguments for
6666 trampoline and error message, build a trampoline and issue a small
6667 jump instruction to it.
6668 (x86_install_fast_tracepoint_jump_pad): Add arguments for
6669 trampoline and error message.
6670 (x86_get_min_fast_tracepoint_insn_len): New.
6671 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
6672 * linux-low.h (struct linux_target_ops): Add arguments to
6673 install_fast_tracepoint_jump_pad operation, add new operation.
6674 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
6675 arguments.
6676 (linux_get_min_fast_tracepoint_insn_len): New function.
6677 (linux_target_op): Add new operation.
6678 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
6679 (gdb_trampoline_buffer_end): Ditto.
6680 (gdb_trampoline_buffer_error): Ditto.
6681 (struct ipa_sym_addresses): Add fields for new IPA variables.
6682 (symbol_list): Add entries for new IPA variables.
6683 (struct tracepoint): Add fields to hold the address range of the
6684 trampoline used by the tracepoint.
6685 (trampoline_buffer_head): New static variable.
6686 (trampoline_buffer_tail): Ditto.
6687 (claim_trampoline_space): New function.
6688 (have_fast_tracepoint_trampoline_buffer): New function.
6689 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
6690 structure.
6691 (install_fast_tracepoint): Ditto, also add error buffer argument.
6692 (cmd_qtminftpilen): New function.
6693 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
6694 (fast_tracepoint_from_trampoline_address): New function.
6695 (fast_tracepoint_collecting): Handle trampoline as part of jump
6696 pad space.
6697 (set_trampoline_buffer_space): New function.
6698 (initialize_tracepoint): Initialize new IPA variables.
6699 * target.h (struct target_ops): Add arguments to
6700 install_fast_tracepoint_jump_pad operation, add new
6701 get_min_fast_tracepoint_insn_len operation.
6702 (target_get_min_fast_tracepoint_insn_len): New.
6703 (install_fast_tracepoint_jump_pad): Add arguments.
6704 * server.h (IPA_BUFSIZ): Define.
6705 * linux-i386-ipa.c: Include extra header files.
6706 (initialize_fast_tracepoint_trampoline_buffer): New function.
6707 (initialize_low_tracepoint): Call it.
6708 * server.h (set_trampoline_buffer_space): Declare.
6709 (claim_trampoline_space): Ditto.
6710 (have_fast_tracepoint_trampoline_buffer): Ditto.
6711
1e4d1764
YQ
67122011-11-14 Yao Qi <yao@codesourcery.com>
6713
6714 * server.c (handle_query): Handle InstallInTrace for qSupported.
6715 * tracepoint.c (add_tracepoint): Sort list.
6716 (install_tracepoint, download_tracepoint): New.
6717 (cmd_qtdp): Call them to install and download tracepoints.
6718 (sort_tracepoints): Removed.
6719 (cmd_qtstart): Update.
6720
5c73ff4e
YQ
67212011-11-14 Yao Qi <yao@codesourcery.com>
6722
6723 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
6724 * mem-break.h: Declare.
6725 * tracepoint.c (cmd_qtstart): Move some code to ...
6726 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
6727 New.
6728 (download_tracepoints): Move some code to ...
6729 (download_tracepoint_1): ... here. New.
6730
86a30030
YQ
67312011-11-08 Yao Qi <yao@codesourcery.com>
6732
6733 * remote-utils.c (relocate_instruction): A comment fix.
6734
8d26e50c
JB
67352011-11-07 Joel Brobecker <brobecker@adacore.com>
6736
6737 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
6738 (i386_dr_low_get_control, i386_dr_low_get_status): Use
6739 dr_status_mirror and dr_control_mirror from debug_reg_state.
6740 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
6741 (i386_initial_stuff): Remove use of deleted globals.
6742 (i386_get_thread_context, i386_set_thread_context,
6743 i386_thread_added): Use dr_status_mirror and dr_control_mirror
6744 from debug_reg_state.
6745
a59306a3
YQ
67462011-11-05 Yao Qi <yao@codesourcery.com>
6747
6748 * tracepoint.c (gdb_collect): Loop over tracepoints of same
6749 address as TPOINT's.
6750
3065dfb6
SS
67512011-11-02 Stan Shebs <stan@codesourcery.com>
6752
6753 * tracepoint.c (agent_mem_read_string): New function.
6754 (eval_agent_expr): Call it for tracenz.
6755 * server.c (handle_query): Report support for tracenz.
6756
fd0d8c7c
YQ
67572011-11-02 Yao Qi <yao@codesourcery.com>
6758
6759 * tracepoint.c (cmd_qtstart): Remove unused local variables.
6760
609086b1
YQ
67612011-11-02 Yao Qi <yao@codesourcery.com>
6762
6763 * target.h: Fix a typo in comment.
6764
b9fd1791
PA
67652011-10-31 Pedro Alves <pedro@codesourcery.com>
6766
6767 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
6768 clobber the breakpoints' shadows with fast tracepoint jumps.
6769 * mem-break.h (check_mem_write): Add `myaddr' parameter.
6770 * target.c (write_inferior_memory): Also pass MYADDR down to
6771 check_mem_write.
6772
03583c20
UW
67732011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
6774
6775 * configure.ac: Check support for personality routine.
6776 * configure: Regenerate.
6777 * config.in: Likewise.
6778 * linux-low.c: Include <sys/personality.h>.
6779 Define ADDR_NO_RANDOMIZE if necessary.
6780 (linux_create_inferior): Disable address space randomization when
6781 forking inferior, if requested.
6782 (linux_supports_disable_randomization): New function.
6783 (linux_target_ops): Install it.
6784 * server.h (disable_randomization): Declare.
6785 * server.c (disable_randomization): New global variable.
6786 (handle_general_set): Handle QDisableRandomization.
6787 (handle_query): Likewise for qSupported.
6788 (main): Support --disable-randomization and --no-disable-randomization
6789 command line arguments.
6790 * target.h (struct target_ops): Add supports_disable_randomization.
6791 (target_supports_disable_randomization): New macro.
6792
723b724b
MF
67932011-09-29 Mike Frysinger <vapier@gentoo.org>
6794
6795 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
6796 ifdef check.
6797 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
6798 [!PT_GETDSBT] (target_loadmap): New definition.
6799 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
6800 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
6801 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
6802 and PT_GETDSBT to LINUX_LOADMAP.
6803 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
6804 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
6805
55329a5c 68062011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
6807
6808 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
6809 (arm_linux_hwbp_cap): New static variable.
6810 (arm_linux_get_hwbp_cap): Replace by ...
6811 (arm_linux_init_hwbp_cap): ... this new function.
6812 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
6813 (arm_linux_get_hw_watchpoint_count): Likewise.
6814 (arm_linux_get_hw_watchpoint_max_length): Likewise.
6815 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
6816 (arm_prepare_to_resume): Use perror_with_name instead of error.
6817
55329a5c 68182011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
6819
6820 * linux-arm-low.c: Include <signal.h>.
6821 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
6822 (struct arm_linux_hwbp_cap): New data type.
6823 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
6824 (struct arm_linux_hw_breakpoint): New data type.
6825 (MAX_BPTS, MAX_WPTS): Define.
6826 (struct arch_process_info, struct arch_lwp_info): New data types.
6827 (arm_linux_get_hwbp_cap): New function.
6828 (arm_linux_get_hw_breakpoint_count): Likewise.
6829 (arm_linux_get_hw_watchpoint_count): Likewise.
6830 (arm_linux_get_hw_watchpoint_max_length): Likewise.
6831 (arm_hwbp_control_initialize): Likewise.
6832 (arm_hwbp_control_is_enabled): Likewise.
6833 (arm_hwbp_control_is_initialized): Likewise.
6834 (arm_hwbp_control_disable): Likewise.
6835 (arm_linux_hw_breakpoint_equal): Likewise.
6836 (arm_linux_hw_point_initialize): Likewise.
6837 (struct update_registers_data): New data structure.
6838 (update_registers_callback: New function.
6839 (arm_insert_point): Likewise.
6840 (arm_remove_point): Likewise.
6841 (arm_stopped_by_watchpoint): Likewise.
6842 (arm_stopped_data_address): Likewise.
6843 (arm_new_process): Likewise.
6844 (arm_new_thread): Likewise.
6845 (arm_prepare_to_resume): Likewise.
6846 (the_low_target): Register arm_insert_point, arm_remove_point,
6847 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
6848 arm_new_thread, and arm_prepare_to_resume.
6849
6b9801d4
SS
68502011-09-15 Stan Shebs <stan@codesourcery.com>
6851
6852 * server.h (struct emit_ops): Add compare-goto fields.
6853 * tracepoint.c (gdb_agent_op_sizes): New table.
6854 (emit_eq_goto): New function.
6855 (emit_ne_goto): New function.
6856 (emit_lt_goto): New function.
6857 (emit_le_goto): New function.
6858 (emit_gt_goto): New function.
6859 (emit_ge_goto): New function.
6860 (is_goto_target): New function.
6861 (compile_bytecodes): Recognize special cases of compare-goto
6862 combinations and call specialized emitters for them.
6863 * linux-x86-low.c (amd64_emit_eq_goto): New function.
6864 (amd64_emit_ne_goto): New function.
6865 (amd64_emit_lt_goto): New function.
6866 (amd64_emit_le_goto): New function.
6867 (amd64_emit_gt_goto): New function.
6868 (amd64_emit_ge_goto): New function.
6869 (amd64_emit_ops): Add the new functions.
6870 (i386_emit_eq_goto): New function.
6871 (i386_emit_ne_goto): New function.
6872 (i386_emit_lt_goto): New function.
6873 (i386_emit_le_goto): New function.
6874 (i386_emit_gt_goto): New function.
6875 (i386_emit_ge_goto): New function.
6876 (i386_emit_ops): Add the new functions.
6877
bf15cbda
SS
68782011-09-08 Stan Shebs <stan@codesourcery.com>
6879
6880 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
6881 (i386_emit_epilogue): Restore %ebx.
6882
943ca1dd
JZ
68832011-08-31 Jie Zhang <jzhang918@gmail.com>
6884
6885 * server.c (step_thread): Remove definition.
6886 (process_serial_event): Don't handle Hs.
6887 * server.h (step_thread): Remove declaration.
6888 * target.c (set_desired_inferior): Remove use of step_thread.
6889
e3deef73
LM
68902011-08-24 Luis Machado <lgustavo@codesourcery.com>
6891
6892 * linux-low.c: Include linux-procfs.h.
6893 (linux_attach_lwp_1): Update comments.
6894 (linux_attach): Scan for existing threads when attaching to a
6895 process that is the tgid.
6896 * Makefile.in: Update dependencies.
6897
13da1c97
LM
68982011-08-24 Luis Machado <lgustavo@codesourcery.com>
6899
6900 * configure.srv: Add linux-procfs.o dependencies.
6901
881127c9
YQ
69022011-08-14 Yao Qi <yao@codesourcery.com>
6903
6904 * target.h (struct target_ops): Fix indent.
6905 * win32-low.c (win32_target_ops): Fix comment.
6906
58dbd541
YQ
69072011-08-14 Andrew Jenner <andrew@codesourcery.com>
6908 Yao Qi <yao@codesourcery.com>
6909
6910 * Makefile.in (clean): Remove tic6x-*.c files.
6911 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
6912 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
6913 (tic6x-c64xp-linux.c): Likewise.
6914 * configure.srv: Add support for tic6x-*-uclinux.
6915 * linux-tic6x-low.c: New.
6916 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
6917
78d85199
YQ
69182011-08-14 Andrew Stubbs <ams@codesourcery.com>
6919 Yao Qi <yao@codesourcery.com>
6920
6921 * target.h (struct target_ops): Add read_loadmap.
6922 * linux-low.c (struct target_loadseg): New type.
6923 (struct target_loadmap): New type.
6924 (linux_read_loadmap): New function.
6925 (linux_target_ops): Add linux_read_loadmap.
6926 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
6927 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
6928 to NULL.
78d85199 6929
a959a88d
EZ
69302011-08-05 Eli Zaretskii <eliz@gnu.org>
6931
6932 * win32-low.c: Include <stdint.h>.
6933
1ced966e
PA
69342011-07-22 Pedro Alves <pedro@codesourcery.com>
6935
6936 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
6937 to the inferior here.
6938 (i386_remove_aligned_watchpoint): Ditto.
6939 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
6940 fit part of the watchpoint in the debug registers.
6941 (i386_update_inferior_debug_regs): New.
6942 (i386_low_insert_watchpoint): Work on a local mirror of the debug
6943 registers, and only update the inferior on success.
6944 (i386_low_remove_watchpoint): Ditto.
6945
d26e3629
KY
69462011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
6947
6948 * linux-low.c (compare_ints, unique, list_threads, show_process,
6949 linux_core_of_thread): Delete.
6950 (linux_target_ops): Change linux_core_of_thread to
6951 linux_common_core_of_thread.
6952 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
6953 * utils.c (malloc_failure): Change type of argument.
6954 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
6955 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
6956 common/linux-osdata.c, common/ptid.c and common/buffer.c.
6957 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
6958 (IPA_OBJS): Add common-utils-ipa.o.
6959 (ptid_h, linux_osdata_h): New macros.
6960 (server_h): Add common/common-utils.h, common/xml-utils.h,
6961 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
6962 common/ptid.h.
6963 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
6964 ptid.o, buffer.o): New rules.
6965 (linux-low.o): Add common/linux-osdata.h as a dependency.
6966 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
6967 * configure.ac: Add AC_HEADER_DIRENT check.
6968 * config.in: Regenerate.
6969 * configure: Regenerate.
6970 * remote-utils.c (xml_escape_text): Delete.
6971 (buffer_grow, buffer_free, buffer_init, buffer_finish,
6972 buffer_xml_printf): Move to common/buffer.c.
6973 * server.c (main): Remove call to initialize_inferiors.
6974 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
6975 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
6976 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
6977 internal_error, gdb_assert, gdb_assert_fail): Delete.
6978 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
6979 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
6980 common/buffer.h.
6981 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
6982 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
6983 initialize_inferiors): Delete.
6984
2275a1a7
PA
69852011-07-20 Pedro Alves <pedro@codesourcery.com>
6986
6987 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
6988 symbol error.
6989
0a5b1e09
PA
69902011-05-31 Pedro Alves <pedro@codesourcery.com>
6991
6992 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
6993 assertion.
6994 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
6995
6938fd34
YQ
69962011-05-26 Yao Qi <yao@codesourcery.com>
6997
6998 * Makefile.in (thread-db.o): Track dependence to
6999 common/gdb_thread_db.h.
7000 * thread-db.c: include gdb_thread_db.h from right place.
7001
b481f9e0
TT
70022011-05-16 Adrian Cornish <gnu@bluedreamer.com>
7003
7004 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
7005 __FILE__ and __LINE__ to internal_error.
7006
98a5dd13
DE
70072011-05-13 Doug Evans <dje@google.com>
7008
7009 * thread-db.c (try_thread_db_load_from_sdir): New function.
7010 (try_thread_db_load_from_dir): New function.
7011 (thread_db_load_search): Handle $sdir, ignore $pdir.
7012 Remove trying of system directories if search of
7013 libthread-db-search-path fails, that is now done via $sdir.
7014
d248b706
KY
70152011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
7016
7017 * server.c (handle_query): Add EnableDisableTracepoints to the list
7018 of supported features.
43aaf8b6 7019 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 7020 tracepoints.
43aaf8b6
PA
7021 (cmd_qtenable_disable): New.
7022 (cmd_qtstart): Install tracepoints even if disabled.
7023 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
7024 receiving a QTEnable or QTDisable packet.
7025 (gdb_collect): Skip data collection if fast tracepoint is disabled.
7026 (ust_marker_to_static_tracepoint): Do not ignore disabled static
7027 tracepoints.
7028 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 7029
84e578fb
DE
70302011-05-10 Doug Evans <dje@google.com>
7031
7032 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
7033
71f55dd8
DE
70342011-05-04 Doug Evans <dje@google.com>
7035
7036 * linux-low.c (linux_join): Skip process lookup.
7037 * spu-low.c (spu_join): Ditto.
7038 * server.c (join_inferiors_callback): Delete.
7039 (process_serial_event): For 'D' packet (detach) call join_inferior
7040 directly.
7041
4d393d60
JM
70422011-05-04 Joseph Myers <joseph@codesourcery.com>
7043
7044 * README: Don't mention xscale*-*-linux*.
7045 * configure.srv (xscale*-*-linux*): Don't handle target.
7046
b00ad6ff
NF
70472011-04-27 Nathan Froyd <froydnj@codesourcery.com>
7048
7049 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
7050 casting pointers.
7051 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
7052 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
7053 (i386_emit_void_call_2): Likewise.
7054
af96c192
YQ
70552011-04-26 Yao Qi <yao@codesourcery.com>
7056
43aaf8b6
PA
7057 * linux-low.c: Move common macros to linux-ptrace.h.
7058 Include linux-ptrace.h.
af96c192
YQ
7059 * Makefile.in (linux_ptrace_h): New.
7060 (linux-low.o): Depends on linux-ptrace.h.
7061
03f2bd59
JK
70622011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
7063
7064 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
7065 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
7066 (remote_prepare): New function with most of the TCP code from ...
7067 (remote_open): ... here. Detect PORT here unconditionally. Move also
7068 setting transport_is_reliable.
7069 * server.c (run_once): New variable.
7070 (gdbserver_usage): Document it.
7071 (main): Set run_once for `--once'. Call remote_prepare. Exit after
7072 the first run if RUN_ONCE.
7073 * server.h (run_once, remote_prepare): New declarations.
7074
7a9dd1b2
TT
70752011-04-19 Tom Tromey <tromey@redhat.com>
7076
7077 * win32-low.c (handle_load_dll): Remove duplicate "the".
7078
81239425
PM
70792011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
7080
7081 Remove support for old Cygwin 1.5 versions.
7082 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
7083 function to avoid warning.
7084 (win32_add_one_solib): Use cygwin_conv_path function to avoid
7085 warning.
7086
9e0627f1
PM
70872011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
7088
7089 * gdbserver/server.h (Macro _): Define it if not available.
7090
588eebee
MS
70912011-03-14 Michael Snyder <msnyder@vmware.com>
7092
348af9f7 7093 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 7094
43f70d4c
JB
70952011-03-10 Joel Brobecker <brobecker@adacore.com>
7096
7097 * Makefile.in (maintainer-clean realclean distclean): Remove
7098 "make ... subdir_do" command.
7099
348af9f7
MS
71002011-03-10 Michael Snyder <msnyder@vmware.com>
7101
7102 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
7103
7104 * server.c (handle_v_run): Free alloced buffer on early return.
7105
e637a4f5
YQ
71062011-03-09 Yao Qi <yao@codesourcery.com>
7107
7108 Revert:
7109 2011-03-04 Yao Qi <yao@codesourcery.com>
7110
7111 * Makefile.in: Remove GNU make feature --directory.
7112
7113 2011-03-05 Yao Qi <yao@codesourcery.com>
7114
7115 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
7116 (subdir_do): New make target. Copied from gdb/Makefile.
7117 (maintainer-clean, realclean, distclean, clean): Call corresponding
7118 make targets in common/Makefile.
7119
7120 2011-02-11 Yao Qi <yao@codesourcery.com>
7121
7122 * configure.ac: Call AC_PROG_RANLIB.
7123 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
7124 * configure: Regenerate.
7125
e6edda56
JK
71262011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7127
7128 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
7129
e5141119
JB
71302011-03-06 Yao Qi <yao@codesourcery.com>
7131
7132 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
7133
64794aa4
JB
71342011-03-05 Yao Qi <yao@codesourcery.com>
7135
7136 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
7137 (subdir_do): New make target. Copied from gdb/Makefile.
7138 (maintainer-clean, realclean, distclean, clean): Call corresponding
7139 make targets in common/Makefile.
7140
7a762829
YQ
71412011-03-04 Yao Qi <yao@codesourcery.com>
7142
7143 * Makefile.in: Remove GNU make feature --directory.
7144
348af9f7
MS
71452011-03-04 Michael Snyder <msnyder@vmware.com>
7146
7147 * server.c (queue_stop_reply): Call xmalloc not malloc.
7148
71492011-03-02 Michael Snyder <msnyder@vmware.com>
7150
7151 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
7152
9f72fee2
MS
71532011-02-28 Michael Snyder <msnyder@vmware.com>
7154
588eebee
MS
7155 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
7156 (cmd_qtframe): Ditto.
7157 (cmd_qtbuffer): Ditto.
7158 (cmd_bigqtbuffer): Ditto.
7159
9f72fee2
MS
7160 * utils.c (decimal2str): Initialize 'width' to nine, then
7161 don't mess with it.
7162
8040bd49
UW
71632011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
7164
7165 * hostio.c (require_data): Free *data, not data.
7166
7e52cbd0
JK
71672011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7168
7169 * hostio.c (require_data): Use free, not xfree.
7170
9130f83e
MS
71712011-02-27 Michael Snyder <msnyder@vmware.com>
7172
4b812f4e
MS
7173 * server.c (handle_query): Discard unused value.
7174
9130f83e
MS
7175 * hostio.c (require_data): Free malloc memory before returning
7176 error.
7177
69d37113
MS
71782011-02-26 Michael Snyder <msnyder@vmware.com>
7179
7180 * linux-low.c (list_threads): Call closedir for dirent.
7181
35f5825a
MS
71822011-02-27 Michael Snyder <msnyder@vmware.com>
7183
2a589cef
MS
7184 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
7185 a case statement falls through.
7186
0adea5f7
MS
7187 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
7188
35f5825a
MS
7189 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
7190 in comparison.
7191
238f1c74
MS
71922011-02-26 Michael Snyder <msnyder@vmware.com>
7193
7194 * utils.c (decimal2str): Eliminate dead code and dead param.
7195 (pulongest): Drop dead param from call to decimal2str.
7196 (plongest): Ditto.
7197
633ff500
JB
71982011-02-24 Joel Brobecker <brobecker@adacore.com>
7199
7200 Revert the following patch (not approved yet):
7201 2011-02-21 Hui Zhu <teawater@gmail.com>
7202 * tracepoint.c (tp_printf): New function.
7203 (eval_agent_expr): Handle gdb_agent_op_printf.
7204
f9c6ff72
HZ
72052011-02-21 Hui Zhu <teawater@gmail.com>
7206
7207 * tracepoint.c (tp_printf): New function.
7208 (eval_agent_expr): Handle gdb_agent_op_printf.
7209
94d5e490
TT
72102011-02-18 Tom Tromey <tromey@redhat.com>
7211
7212 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
7213 (tracepoint.o): Likewise.
7214 * tracepoint.c (enum gdb_agent_op): Use ax.def.
7215 (gdb_agent_op_names): Likewise.
7216
c7f96d2b
TT
72172011-02-18 Tom Tromey <tromey@redhat.com>
7218
7219 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
7220 gdb_agent_op_rot>: New constants.
7221 (gdb_agent_op_names): Add pick and roll.
7222 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
7223 cases.
7224
0feedb2c
JK
72252011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
7226
7227 * aclocal.m4: Regenerated with aclocal-1.11.1.
7228
b3b9301e
PA
72292011-02-14 Pedro Alves <pedro@codesourcery.com>
7230
7231 * server.c (handle_qxfer_traceframe_info): New.
7232 (qxfer_packets): Register "traceframe-info".
7233 (handle_query): Report support for qXfer:traceframe-info:read+.
7234 * tracepoint.c (match_blocktype): New.
7235 (traceframe_find_block_type): Rename to ...
7236 (traceframe_walk_blocks): ... this. Add callback filter argument,
7237 and use it.
7238 (traceframe_find_block_type): New, reimplemented on top of
7239 traceframe_walk_blocks.
7240 (build_traceframe_info_xml): New.
7241 (traceframe_read_info): New.
7242 * server.h (traceframe_read_info): Declare.
7243
4f3e6fb7
YQ
72442011-02-11 Yao Qi <yao@codesourcery.com>
7245
7246 * configure.ac: Call AC_PROG_RANLIB.
7247 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
7248 * configure: Regenerate.
7249
764880b7
PA
72502011-02-07 Pedro Alves <pedro@codesourcery.com>
7251
7252 * server.c (gdb_read_memory): Change return semantics to allow
7253 partial transfers.
7254 (handle_search_memory_1): Adjust.
7255 (process_serial_event) <'m' packet>: Handle partial transfers.
7256 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
7257
1c79eb8a
PA
72582011-01-28 Pedro Alves <pedro@codesourcery.com>
7259
7260 * regcache.c (init_register_cache): Initialize
7261 regcache->register_status.
7262 (free_register_cache): Release regcache->register_status.
7263 (regcache_cpy): Copy register_status.
7264 (registers_to_string): Print 'x's for unavailable registers.
7265 (supply_register): Mark the register's status valid or
7266 unavailable, depending on whether a buffer was passed in or not.
7267 (supply_register_zeroed): New.
7268 (supply_regblock): Mark the registers' status valid or
7269 unavailable, depending on whether a buffer was passed in or not.
7270 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
7271 (struct regcache): New `register_status' field.
7272 (supply_register_zeroed): Declare.
7273 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
7274 supply_register_zeroed, rather than passing a NULL buffer to
7275 supply_register.
7276 * tracepoint.c (fetch_traceframe_registers): Update comment.
7277
85724a0e
PA
72782011-01-28 Pedro Alves <pedro@codesourcery.com>
7279
7280 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
7281 buffer explicit.
7282
d08aafef
PA
72832011-01-25 Pedro Alves <pedro@codesourcery.com>
7284
7285 * server.h (decode_xfer_write): Change prototype.
7286 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
7287 and don't extract the annex here.
7288 * server.c (decode_xfer_read): Remove `annex' parameter,
7289 and don't extract the annex here.
7290 (decode_xfer): New.
7291 (struct qxfer): New.
7292 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
7293 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
7294 (handle_qxfer_statictrace): New functions, abstracted out from
7295 handle_query, and made to use the struct qxfer interface.
7296 (handle_threads_qxfer_proper): Rename to ...
7297 (handle_qxfer_threads_proper): ... this.
7298 (handle_threads_qxfer): Rename to ...
7299 (handle_qxfer_threads): ... this. Adjust.
7300 (qxfer_packets): New array.
7301 (handle_qxfer): New function.
7302 (handle_query): Use handle_qxfer.
7303
493e2a69
MS
73042011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
7305
7306 * gdbreplay.c: Shorten lines of >= 80 columns.
7307 * linux-low.c: Ditto.
7308 * linux-ppc-low.c: Ditto.
7309 * linux-s390-low.c: Ditto.
7310 * linux-sparc-low.c: Ditto.
7311 * linux-x86-low.c: Ditto.
7312 * linux-xtensa-low.c: Ditto.
7313 * mem-break.c: Ditto.
7314 * nto-low.c: Ditto.
7315 * regcache.h: Ditto.
7316 * remote-utils.c: Ditto.
7317 * server.c: Ditto.
7318 * server.h: Ditto.
7319 * thread-db.c: Ditto.
7320 * tracepoint.c: Ditto.
7321 * utils.c: Ditto.
7322 * win32-low.h: Ditto.
7323
44944448
JB
73242011-01-05 Joel Brobecker <brobecker@adacore.com>
7325
7326 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
7327 update.
7328
71ce852c
JB
73292011-01-01 Joel Brobecker <brobecker@adacore.com>
7330
7331 * server.c (gdbserver_version): Update copyright year in version
7332 output.
7333 * gdbreplay.c (gdbreplay_version): Ditto.
7334
eb826dc6
MF
73352010-12-29 Jie Zhang <jie.zhang@analog.com>
7336
7337 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
7338 * linux-bfin-low.c: New file.
7339 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
7340 PT_DATA_ADDR for BFIN targets.
7341 * Makefile.in (SFILES): Add linux-bfin-low.c.
7342 (clean): Remove reg-bfin.c.
7343 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
7344 * README: Mention supported Blackfin targets.
7345
39ab222a
MF
73462010-12-23 Mike Frysinger <vapier@gentoo.org>
7347
7348 * .gitignore: New file.
7349
a1f2ce7d
MF
73502010-11-16 Mike Frysinger <vapier@gentoo.org>
7351
7352 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
7353
f474844c
JZ
73542010-10-22 Jie Zhang <jie@codesourcery.com>
7355
7356 * Makefile.in: Add FLAGS_TO_PASS variable.
7357 (install): Remove dependency of install-only and recursively
7358 invoke make for install-only.
7359
f1048712
DE
73602010-10-04 Doug Evans <dje@google.com>
7361
7362 * Makefile.in (uninstall): Use $(DESTDIR).
7363
b53a1623
PA
73642010-09-24 Pedro Alves <pedro@codesourcery.com>
7365
e6ee044d
PA
7366 PR gdb/11842
7367
b53a1623
PA
7368 * linux-x86-low.c (compat_siginfo_from_siginfo)
7369 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
7370 si_code is < 0. Check for si_code == SI_TIMER before checking for
7371 si_code < 0.
7372
fa1bd1e4
JB
73732010-09-13 Joel Brobecker <brobecker@adacore.com>
7374
7375 * lynx-i386-low.c: New file.
7376 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
7377
47fac8f8
JB
73782010-09-13 Joel Brobecker <brobecker@adacore.com>
7379
7380 * lynx-low.c (ptrace_request_to_str): Remove handling for
7381 request values that have been removed in LynxOS 5.x.
7382
1adfc54d
JB
73832010-09-13 Joel Brobecker <brobecker@adacore.com>
7384
7385 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
7386 <ptrace.h>
7387
c2a66c29
NS
73882010-09-09 Nathan Sidwell <nathan@codesourcery.com>
7389
7390 * configure.ac: Add --enable-inprocess-agent option.
7391 * configure: Rebuilt.
7392
32fcada3
YQ
73932010-09-06 Yao Qi <yao@codesourcery.com>
7394
7395 * linux-low.c (linux_kill): Remove unused variable.
7396 (linux_stabilize_threads): Likewise.
7397 * server.c (start_inferior): Likewise.
7398 (queue_stop_reply_callback): Likewise.
7399 * tracepoint.c (do_action_at_tracepoint): Likewise.
7400
0cccb683
YQ
74012010-09-06 Yao Qi <yao@codesourcery.com>
7402
7403 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
7404 on return.
7405
423ec54c
JK
74062010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
7407
7408 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
7409
12ac6819
PA
74102010-09-06 Pedro Alves <pedro@codesourcery.com>
7411
7412 * Makefile.in (install-only): Replace $IPA_DEPFILES with
7413 "$(IPA_DEPFILES)".
7414
8ed54b31
JB
74152010-09-01 Joel Brobecker <brobecker@adacore.com>
7416
7417 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
7418 gdbserver/lynx-ppc-low.c: New files.
7419 * Makefile.in (lynx_low_h): New variable.
7420 (lynx-low.o, lynx-ppc-low.o): New rules.
7421 * configure.ac: On LynxOS, link with -lnetinet.
7422 * configure.srv: Add handling of powerpc-*-lynxos* targets.
7423 * configure: regenerate.
7424
bb0116a4
JB
74252010-09-01 Joel Brobecker <brobecker@adacore.com>
7426
7427 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
7428 * configure.ac: Add check for vasprintf and vsnprintf.
7429 * configure, config.in: Regenerate.
7430 * server.h (vasprintf, vsnprintf): Add conditional declarations.
7431
a778ab81 74322010-09-01 Joel Brobecker <brobecker@adacore.com>
7433
7434 * gdbreplay.c: Move include of alloca.h up, next to include of
7435 malloc.h.
7436 * server.h: Add include of malloc.h.
7437 * mem-break.c: Remove include of malloc.h.
7438 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
7439
8b034a19 74402010-09-01 Joel Brobecker <brobecker@adacore.com>
7441
7442 * Makefile.in (memmem.o): Build with -Wno-error.
7443
74442010-09-01 Joel Brobecker <brobecker@adacore.com>
7445
7446 * utils.c (xsnprintf): Make non-static.
7447 * server.h: Add xsnprintf declaration.
7448 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
7449 replace calls to snprintf by calls to xsnprintf throughout.
7450
74512010-09-01 Joel Brobecker <brobecker@adacore.com>
7452
7453 * configure.ac: Add configure check for alloca.
7454 * configure, config.in: Regenerate.
7455 * server.h: Include alloca.h if it exists.
7456 * gdbreplay.c: Include alloca.h if it exists.
7457
1a981360
PA
74582010-08-28 Pedro Alves <pedro@codesourcery.com>
7459
7460 * linux-low.c (__SIGRTMIN): Define if not already defined.
7461 (linux_create_inferior): Check for __ANDROID__ rather than
7462 __SIGRTMIN.
7463 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
7464 are already deferred.
7465 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
7466 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
7467 stopped and already has a pending signal to report.
7468 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
7469 a pending signal to report or is moving out of a jump pad.
7470 (linux_init_signals): Check for __ANDROID__ rather than
7471 __SIGRTMIN.
7472
b4d51a55
PA
74732010-08-28 Pedro Alves <pedro@codesourcery.com>
7474
7475 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
7476 debug_threads check. Avoid a linear search when not doing debug
7477 output.
7478
ec48365d
PA
74792010-08-27 Pedro Alves <pedro@codesourcery.com>
7480
7481 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
7482 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
7483 (struct file_handler) <fd>: Change type to gdb_fildes_t.
7484 (process_event): Change local fd's type to gdb_fildes_t.
7485 (create_file_handler): Adjust prototype.
7486 (delete_file_handler): Adjust prototype.
7487 (handle_file_event): Adjust prototype. Use pfildes.
7488 (create_file_event): Adjsut prototype.
7489 * remote-utils.c (remote_desc, listen_desc): Change type to
7490 gdb_fildes_t.
7491 * server.h: New gdb_fildes_t typedef.
7492 [USE_WIN32API]: Include winsock2.h.
7493 (delete_file_handler, add_file_handler): Adjust prototypes.
7494 (pfildes): Declare.
7495 * utils.c (pfildes): New.
7496
854d88f0
PA
74972010-08-27 Pedro Alves <pedro@codesourcery.com>
7498
7499 * configure.ac (build_warnings): Add -Wno-char-subscripts.
7500 * configure: Regenerate.
7501
0146f85b
PA
75022010-08-27 Pedro Alves <pedro@codesourcery.com>
7503
7504 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
7505 (linux_done_accessing_memory): ... this.
7506 (linux_target_ops): Adjust.
7507 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
7508 * nto-low.c (nto_target_ops): Adjust comment.
7509 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
7510 * spu-low.c (spu_target_ops): Adjust comment.
7511 * target.h (target_ops): Rename unprepare_to_access_memory field
7512 to done_accessing_memory.
7513 (unprepare_to_access_memory): Rename to ...
7514 (done_accessing_memory): ... this.
7515
90d74c30
PA
75162010-08-26 Pedro Alves <pedro@codesourcery.com>
7517
7518 * linux-low.c (linux_prepare_to_access_memory): New.
7519 (linux_unprepare_to_access_memory): New.
7520 (linux_target_ops): Install them.
7521 * server.c (read_memory): Rename to ...
7522 (gdb_read_memory): ... this. Use
7523 prepare_to_access_memory/prepare_to_access_memory.
7524 (write_memory): Rename to ...
7525 (gdb_write_memory): ... this. Use
7526 prepare_to_access_memory/prepare_to_access_memory.
7527 (handle_search_memory_1): Adjust.
7528 (process_serial_event): Adjust.
7529 * target.h (struct target_ops): New fields
7530 prepare_to_access_memory and unprepare_to_access_memory.
7531 (prepare_to_access_memory, unprepare_to_access_memory): New.
7532 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
7533 prepare_to_access_memory/prepare_to_access_memory.
7534 * nto-low.c (nto_target_ops): Adjust.
7535 * spu-low.c (spu_target_ops): Adjust.
7536 * win32-low.c (win32_target_ops): Adjust.
7537
fd467969
PA
75382010-08-26 Pedro Alves <pedro@codesourcery.com>
7539
7540 * Makefile.in (WARN_CFLAGS): Get it from configure.
7541 (WERROR_CFLAGS): New.
7542 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
7543 * configure.ac: Introduce --enable-werror, which adds -Werror to
7544 the compiler command line. Enabled by default. Disable with
7545 --disable-werror. Add -Wdeclaration-after-statement
7546 Wpointer-arith and -Wformat-nonliteral to warning flags.
7547 * configure: Regenerate.
7548
331e2f5f
PA
75492010-08-26 Pedro Alves <pedro@codesourcery.com>
7550
7551 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
7552
e581f2b4
PA
75532010-08-26 Pedro Alves <pedro@codesourcery.com>
7554
7555 * gdbreplay.c (remote_error): New.
7556 (gdbchar): New.
7557 (expect): Use gdbchar. Check for error reading from GDB.
7558 Clarify sync error output.
7559 (play): Check for errors writing to GDB.
7560 * linux-low.c (sigchld_handler): Really ignore `write' errors.
7561 * remote-utils.c (getpkt): Check for errors writing to the remote
7562 descriptor.
7563
3c11dd79
PA
75642010-08-25 Pedro Alves <pedro@codesourcery.com>
7565
7566 * linux-low.c (linux_wait_1): Move non-debugging code out of
7567 `debug_threads' control.
7568
d20a8ad9
PA
75692010-08-25 Pedro Alves <pedro@codesourcery.com>
7570
7571 * linux-low.c (linux_wait_1): Don't set last_status here.
7572 * server.c (push_event, queue_stop_reply_callback): Assert we're
7573 not pushing a TARGET_WAITKIND_IGNORE event.
7574 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
7575 (myresume, handle_target_event): Set the thread's last_resume_kind
7576 and last_status from the target returned status.
7577
964e4306
PA
75782010-08-25 Pedro Alves <pedro@codesourcery.com>
7579
7580 PR threads/10729
7581
7582 * linux-x86-low.c (update_debug_registers_callback): New.
7583 (i386_dr_low_set_addr): Use it.
7584 (i386_dr_low_get_addr): New.
7585 (i386_dr_low_set_control): Use update_debug_registers_callback.
7586 (i386_dr_low_get_control): New.
7587 (i386_dr_low_get_status): Adjust.
7588 * linux-low.c (linux_stop_lwp): New.
7589 * linux-low.h (linux_stop_lwp): Declare.
7590
7591 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
7592 argument instead of a i386_debug_reg_state.
7593 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
7594 a i386_debug_reg_state.
7595 (i386_insert_aligned_watchpoint): Adjust.
7596 (i386_remove_aligned_watchpoint): Adjust.
7597 (i386_low_stopped_data_address): Read the debug registers from the
7598 inferior instead of from the mirrors.
7599 * i386-low.h (struct i386_debug_reg_state): Extend comment.
7600 (i386_dr_low_get_addr): Declare.
7601 (i386_dr_low_get_control): Declare.
7602 (i386_dr_low_get_status): Change prototype.
7603
7604 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
7605 (i386_dr_low_get_addr): New.
7606 (i386_dr_low_get_control): New.
7607 (i386_dr_low_get_status): Adjust prototype. Return
7608 dr_status_mirror.
7609 (i386_initial_stuff): Clear dr_status_mirror and
7610 dr_control_mirror.
7611 (i386_get_thread_context): Adjust.
7612 (i386_set_thread_context): Adjust.
7613 (i386_thread_added): Adjust.
7614
5f21a75b
PA
76152010-08-24 Pedro Alves <pedro@codesourcery.com>
7616
7617 * linux-low.h (linux_thread_area): Delete declaration.
7618
3e4c1235
TS
76192010-08-11 Thomas Schwinge <thomas@codesourcery.com>
7620
7621 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
7622 after its termination.
7623
1971b033
PA
76242010-08-09 Pedro Alves <pedro@codesourcery.com>
7625
7626 * linux-low.c (gdb_wants_lwp_stopped): Delete.
7627 (gdb_wants_all_stopped): Delete.
7628 (linux_wait_1): Don't call them.
7629 * server.c (handle_v_cont): Tag all threads as want-stopped.
7630 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
7631 stopped as "client-wants-stopped".
7632
310444ac
PA
76332010-07-31 Pedro Alves <pedro@codesourcery.com>
7634
7635 * Makefile.in (signals_h): New.
7636 (server_h): Depend on it.
7637 (server.o): Don't depend on $(signals_def).
7638 (signals.o): Depend on $(signals_def).
7639
a19cae16
JK
76402010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
7641
7642 * Makefile.in (signals_def): New.
7643 (server_h): Append include/gdb/signals.h and signals_def.
7644 (server.o): Append signals_def.
7645
30d50328
JK
76462010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
7647
7648 * server.c (handle_target_event): Use target_signal_to_host for
7649 resume_info.sig initialization.
7650 * target.h (struct thread_resume) <sig>: New comment.
7651
5c3216e2
OS
76522010-07-20 Ozkan Sezer <sezeroz@gmail.com>
7653
c6f46ca0
OS
7654 * server.c (handle_query): strcpy() the returned string from paddress()
7655 instead of sprintf().
5c3216e2
OS
7656 * utils.c (paddress): Return phex_nz().
7657
6bd31874
JB
76582010-07-07 Joel Brobecker <brobecker@adacore.com>
7659
7660 * server.c (handle_v_cont): Call mourn_inferior if process
7661 just exited.
7662 (myresume): Likewise.
7663
0fb4aa4b
PA
76642010-07-01 Pedro Alves <pedro@codesourcery.com>
7665
7666 Static tracepoints, and integration with UST.
7667
7668 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
7669 * mem-break.c (uninsert_all_breakpoints)
7670 (reinsert_all_breakpoints): New.
7671 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
7672 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
7673 (gdb_agent_ust_loaded, helper_thread_id)
7674 (gdb_agent_helper_thread_id): New macros.
7675 (struct ipa_sym_addresses): Add addr_ust_loaded,
7676 addr_helper_thread_id, addr_cmd_buf.
7677 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
7678 (in_process_agent_loaded_ust): New.
7679 (write_e_ust_not_loaded): New.
7680 (maybe_write_ipa_ust_not_loaded): New.
7681 (struct collect_static_trace_data_action): New.
7682 (enum tracepoint_type) <static_tracepoint>: New.
7683 (struct tracepoint) <handle>: Mention static tracepoints.
7684 (struct static_tracepoint_ctx): New.
7685 (CMD_BUF_SIZE): New.
7686 (add_tracepoint_action): Handle static tracepoint actions.
7687 (unprobe_marker_at): New.
7688 (clear_installed_tracepoints): Handle static tracepoints.
7689 (cmd_qtdp): Handle static tracepoints.
7690 (probe_marker_at): New.
7691 (cmd_qtstart): Handle static tracepoints.
7692 (response_tracepoint): Handle static tracepoints.
7693 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
7694 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
7695 (get_context_regcache): Handle static tracepoints.
7696 (do_action_at_tracepoint): Handle static tracepoint actions.
7697 (traceframe_find_block_type): Handle static trace data blocks.
7698 (traceframe_read_sdata): New.
7699 (download_tracepoints): Download static tracepoint actions.
7700 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
7701 (GDB_PROBE_NAME): New.
7702 (ust_ops): New.
7703 (GET_UST_SYM): New.
7704 (USTF): New.
7705 (dlsym_ust): New.
7706 (ust_marker_to_static_tracepoint): New.
7707 (gdb_probe): New.
7708 (collect_ust_data_at_tracepoint): New.
7709 (gdb_ust_probe): New.
7710 (UNIX_PATH_MAX, SOCK_DIR): New.
7711 (gdb_ust_connect_sync_socket): New.
7712 (resume_thread, stop_thread): New.
7713 (run_inferior_command): New.
7714 (init_named_socket): New.
7715 (gdb_ust_socket_init): New.
7716 (cstr_to_hexstr): New.
7717 (next_st): New.
7718 (first_marker, next_marker): New.
7719 (response_ust_marker): New.
7720 (cmd_qtfstm, cmd_qtsstm): New.
7721 (unprobe_marker_at, probe_marker_at): New.
7722 (cmd_qtstmat, gdb_ust_thread): New.
7723 (gdb_ust_init): New.
7724 (initialize_tracepoint_ftlib): Call gdb_ust_init.
7725 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
7726 (ST_REGENTRY): New.
7727 (x86_64_st_collect_regmap): New.
7728 (X86_64_NUM_ST_COLLECT_GREGS): New.
7729 (AMD64_RIP_REGNUM): New.
7730 (supply_static_tracepoint_registers): New.
7731 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
7732 (ST_REGENTRY): New.
7733 (i386_st_collect_regmap): New.
7734 (i386_NUM_ST_COLLECT_GREGS): New.
7735 (supply_static_tracepoint_registers): New.
7736 * server.c (handle_query): Handle qXfer:statictrace:read.
7737 <qSupported>: Report support for StaticTracepoints, and
7738 qXfer:statictrace:read features.
7739 * server.h (traceframe_read_sdata)
7740 (supply_static_tracepoint_registers): Declare.
7741 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
7742 (unpack_varlen_hex): Include in IPA build.
7743 * Makefile.in (ustlibs, ustinc): New.
7744 (IPA_OBJS): Add remote-utils-ipa.o.
7745 ($(IPA_LIB)): Link -ldl and -lpthread.
7746 (UST_CFLAGS): New.
7747 (IPAGENT_CFLAGS): Add UST_CFLAGS.
7748 * config.in, configure: Regenerate.
7749
9e4344e5
PA
77502010-06-20 Ian Lance Taylor <iant@google.com>
7751 Pedro Alves <pedro@codesourcery.com>
7752
7753 * linux-x86-low.c (always_true): Delete.
7754 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
7755 trying to fool the compiler with always_true.
7756
c6beb2cb
PA
77572010-06-20 Pedro Alves <pedro@codesourcery.com>
7758
7759 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
7760 conditions in gdbserver.
7761
d2ed6730
UW
77622010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
7763
7764 * spu-low.c (spu_read_memory): Wrap around local store limit.
7765 (spu_write_memory): Likewise.
7766
4e29fb54
PA
77672010-06-15 Pedro Alves <pedro@codesourcery.com>
7768
7769 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
7770 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
7771 LONGEST uses.
7772 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
7773 uses.
7774 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
7775 uses with LONGEST uses.
7776
6a271cae
PA
77772010-06-14 Stan Shebs <stan@codesourcery.com>
7778 Pedro Alves <pedro@codesourcery.com>
7779
7780 Bytecode compiler.
7781
7782 * linux-x86-low.c: Include limits.h.
7783 (add_insns): New.
7784 (always_true): New.
7785 (EMIT_ASM): New.
7786 (EMIT_ASM32): New.
7787 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
7788 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
7789 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
7790 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
7791 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
7792 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
7793 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
7794 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
7795 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
7796 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
7797 (amd64_emit_void_call_2): New.
7798 (amd64_emit_ops): New.
7799 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
7800 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
7801 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
7802 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
7803 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
7804 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
7805 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
7806 (i386_emit_call, i386_emit_reg, i386_emit_pop)
7807 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
7808 (i386_emit_stack_adjust, i386_emit_int_call_1)
7809 (i386_emit_void_call_2): New.
7810 (i386_emit_ops): New.
7811 (x86_emit_ops): New.
7812 (the_low_target): Install x86_emit_ops.
7813 * server.h (struct emit_ops): New.
7814 (get_raw_reg_func_addr): Declare.
7815 (current_insn_ptr, emit_error): Declare.
7816 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
7817 (set_trace_state_variable_value): New defines.
7818 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
7819 addr_get_trace_state_variable_value and
7820 addr_set_trace_state_variable_value.
7821 (symbol_list): New fields for get_raw_reg,
7822 get_trace_state_variable_value and set_trace_state_variable_value.
7823 (condfn): New typedef.
7824 (struct tracepoint): New field `compiled_cond'.
7825 (do_action_at_tracepoint): Clear compiled_cond.
7826 (get_trace_state_variable_value, set_trace_state_variable_value):
7827 Export in the IPA.
7828 (condition_true_at_tracepoint): If there's a compiled condition,
7829 run that.
7830 (current_insn_ptr, emit_error): New globals.
7831 (struct bytecode_address): New.
7832 (get_raw_reg_func_addr): New.
7833 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
7834 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
7835 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
7836 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
7837 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
7838 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
7839 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
7840 (compile_tracepoint_condition, compile_bytecodes): New.
7841 * target.h (emit_ops): Forward declare.
7842 (struct target_ops): New field emit_ops.
7843 (target_emit_ops): New.
7844 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
7845 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
7846 * linux-low.c (linux_emit_ops): New.
7847 (linux_target_ops): Install it.
7848 * linux-low.h (struct linux_target_ops): New field emit_ops.
7849
92b72907
UW
78502010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
7851
7852 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
7853 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
7854
fa593d66
PA
78552010-06-01 Pedro Alves <pedro@codesourcery.com>
7856 Stan Shebs <stan@codesourcery.com>
7857
7858 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
7859 (all): Depend on $(extra_libraries).
7860 (install-only): Install the IPA.
7861 (IPA_OBJS, IPA_LIB): New.
7862 (clean): Remove the IPA lib.
7863 (IPAGENT_CFLAGS): New.
7864 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
7865 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
7866 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
7867 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
7868 * configure.ac: Check for atomic builtins support in the compiler.
7869 (IPA_DEPFILES, extra_libraries): Define.
7870 * configure.srv (ipa_obj): Add description.
7871 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
7872 (i[34567]86-*-linux*): Set ipa_obj.
7873 (x86_64-*-linux*): Set ipa_obj.
7874 * linux-low.c (stabilizing_threads): New.
7875 (supports_fast_tracepoints): New.
7876 (linux_detach): Stabilize threads before detaching.
7877 (handle_tracepoints): Handle internal tracing breakpoints. Assert
7878 the lwp is either not stabilizing, or is moving out of a jump pad.
7879 (linux_fast_tracepoint_collecting): New.
7880 (maybe_move_out_of_jump_pad): New.
7881 (enqueue_one_deferred_signal): New.
7882 (dequeue_one_deferred_signal): New.
7883 (linux_wait_for_event_1): If moving out of a jump pad, defer
7884 pending signals to later.
7885 (linux_stabilize_threads): New.
7886 (linux_wait_1): Check if threads need moving out of jump pads, and
7887 do it if so.
7888 (stuck_in_jump_pad_callback): New.
7889 (move_out_of_jump_pad_callback): New.
7890 (lwp_running): New.
7891 (linux_resume_one_lwp): Handle moving out of jump pads.
7892 (linux_set_resume_request): Dequeue deferred signals.
7893 (need_step_over_p): Also step over fast tracepoint jumps.
7894 (start_step_over): Also uninsert fast tracepoint jumps.
7895 (finish_step_over): Also reinsert fast tracepoint jumps.
7896 (linux_install_fast_tracepoint_jump): New.
7897 (linux_target_ops): Install linux_stabilize_threads and
7898 linux_install_fast_tracepoint_jump_pad.
7899 * linux-low.h (linux_target_ops) <get_thread_area,
7900 install_fast_tracepoint_jump_pad>: New fields.
7901 (struct lwp_info) <collecting_fast_tracepoint,
7902 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
7903 (linux_get_thread_area): Declare.
7904 * linux-x86-low.c (jump_insn): New.
7905 (x86_get_thread_area): New.
7906 (append_insns): New.
7907 (push_opcode): New.
7908 (amd64_install_fast_tracepoint_jump_pad): New.
7909 (i386_install_fast_tracepoint_jump_pad): New.
7910 (x86_install_fast_tracepoint_jump_pad): New.
7911 (the_low_target): Install x86_get_thread_area and
7912 x86_install_fast_tracepoint_jump_pad.
7913 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
7914 (struct fast_tracepoint_jump): New.
7915 (fast_tracepoint_jump_insn): New.
7916 (fast_tracepoint_jump_shadow): New.
7917 (find_fast_tracepoint_jump_at): New.
7918 (fast_tracepoint_jump_here): New.
7919 (delete_fast_tracepoint_jump): New.
7920 (set_fast_tracepoint_jump): New.
7921 (uninsert_fast_tracepoint_jumps_at): New.
7922 (reinsert_fast_tracepoint_jumps_at): New.
7923 (set_breakpoint_at): Use write_inferior_memory.
7924 (uninsert_raw_breakpoint): Use write_inferior_memory.
7925 (check_mem_read): Mask out fast tracepoint jumps.
7926 (check_mem_write): Mask out fast tracepoint jumps.
7927 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
7928 (set_fast_tracepoint_jump): Declare.
7929 (delete_fast_tracepoint_jump)
7930 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
7931 (reinsert_fast_tracepoint_jumps_at): Declare.
7932 * regcache.c: Don't compile many functions when building the
7933 in-process agent library.
7934 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
7935 the register buffer in the heap.
7936 (free_register_cache): If the register buffer isn't owned by the
7937 regcache, don't free it.
7938 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
7939 pre-existing register caches.
7940 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
7941 type.
7942 (convert_ascii_to_int): : Constify `from' parameter type.
7943 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
7944 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
7945 the needed buffer in-place.
7946 (relocate_instruction): New.
7947 * server.c (handle_query) <qSymbols>: If the target supports
7948 tracepoints, give it a chance of looking up symbols. Report
7949 support for fast tracepoints.
7950 (handle_status): Stabilize threads.
7951 (process_serial_event): Adjust.
7952 * server.h (struct fast_tracepoint_jump): Forward declare.
7953 (struct process_info) <fast_tracepoint_jumps>: New field.
7954 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
7955 (decode_X_packet, decode_M_packet): Adjust.
7956 (relocate_instruction): Declare.
7957 (in_process_agent_loaded): Declare.
7958 (tracepoint_look_up_symbols): Declare.
7959 (struct fast_tpoint_collect_status): Declare.
7960 (fast_tracepoint_collecting): Declare.
7961 (force_unlock_trace_buffer): Declare.
7962 (handle_tracepoint_bkpts): Declare.
7963 (initialize_low_tracepoint)
7964 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
7965 * target.h (struct target_ops) <stabilize_threads,
7966 install_fast_tracepoint_jump_pad>: New fields.
7967 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
7968 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
7969 [HAVE_STDINT_H]: Include stdint.h.
7970 (trace_debug_1): Rename to ...
7971 (trace_vdebug): ... this.
7972 (trace_debug): Rename to ...
7973 (trace_debug_1): ... this. Add `level' parameter.
7974 (trace_debug): New.
7975 (ATTR_USED, ATTR_NOINLINE): New.
7976 (IP_AGENT_EXPORT): New.
7977 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
7978 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
7979 (about_to_request_buffer_space, trace_buffer_is_full)
7980 (stopping_tracepoint, expr_eval_result, error_tracepoint)
7981 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
7982 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
7983 (traceframe_write_count, traceframes_created)
7984 (trace_state_variables)
7985 New renaming defines.
7986 (struct ipa_sym_addresses): New.
7987 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
7988 (symbol_list): New.
7989 (ipa_sym_addrs): New.
7990 (all_tracepoint_symbols_looked_up): New.
7991 (in_process_agent_loaded): New.
7992 (write_e_ipa_not_loaded): New.
7993 (maybe_write_ipa_not_loaded): New.
7994 (tracepoint_look_up_symbols): New.
7995 (debug_threads) [IN_PROCESS_AGENT]: New.
7996 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
7997 (UNKNOWN_SIDE_EFFECTS): New.
7998 (stop_tracing): New.
7999 (flush_trace_buffer): New.
8000 (stop_tracing_bkpt): New.
8001 (flush_trace_buffer_bkpt): New.
8002 (read_inferior_integer): New.
8003 (read_inferior_uinteger): New.
8004 (read_inferior_data_pointer): New.
8005 (write_inferior_data_pointer): New.
8006 (write_inferior_integer): New.
8007 (write_inferior_uinteger): New.
8008 (struct collect_static_trace_data_action): Delete.
8009 (enum tracepoint_type): New.
8010 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
8011 <actions_str, step_actions, step_actions_str>: Only include in
8012 GDBserver.
fa593d66
PA
8013 <orig_size, obj_addr_on_target, adjusted_insn_addr>
8014 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
8015 (tracepoints): Use IP_AGENT_EXPORT.
8016 (last_tracepoint): Don't include in the IPA.
8017 (stopping_tracepoint): Use IP_AGENT_EXPORT.
8018 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
8019 (alloced_trace_state_variables): New.
8020 (trace_state_variables): Use IP_AGENT_EXPORT.
8021 (traceframe_t): Delete unused variable.
8022 (circular_trace_buffer): Don't include in the IPA.
8023 (trace_buffer_start): Delete.
8024 (struct trace_buffer_control): New.
8025 (trace_buffer_free): Delete.
8026 (struct ipa_trace_buffer_control): New.
8027 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
8028 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
8029 New.
8030 (trace_buffer_ctrl): New.
8031 (TRACE_BUFFER_CTRL_CURR): New.
8032 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
8033 Reimplement as macros.
8034 (trace_buffer_wrap): Delete.
8035 (traceframe_write_count, traceframe_read_count)
8036 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
8037 (struct tracepoint_hit_ctx) <type>: New field.
8038 (struct fast_tracepoint_ctx): New.
8039 (memory_barrier): New.
8040 (cmpxchg): New.
8041 (record_tracepoint_error): Update atomically in the IPA.
8042 (clear_inferior_trace_buffer): New.
8043 (about_to_request_buffer_space): New.
8044 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
8045 updating the same buffer.
8046 (add_tracepoint): Default the tracepoint's type to trap
8047 tracepoint, and orig_size to -1.
8048 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
8049 internal variables.
8050 (create_trace_state_variable): New parameter `gdb'. Handle it.
8051 (clear_installed_tracepoints): Clear fast tracepoint jumps.
8052 (cmd_qtdp): Handle fast tracepoints.
8053 (cmd_qtdv): Adjust.
8054 (max_jump_pad_size): New.
8055 (gdb_jump_pad_head): New.
8056 (get_jump_space_head): New.
8057 (claim_jump_space): New.
8058 (sort_tracepoints): New.
8059 (MAX_JUMP_SIZE): New.
8060 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
8061 IPA.
8062 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
8063 support. Upload fast traceframes, and delete internal IPA
8064 breakpoints.
8065 (stop_tracing_handler): New.
8066 (flush_trace_buffer_handler): New.
8067 (cmd_qtstop): Upload fast tracepoints.
8068 (response_tracepoint): Handle fast tracepoints.
8069 (tracepoint_finished_step): Upload fast traceframes. Set the
8070 tracepoint hit context's tracepoint type.
8071 (handle_tracepoint_bkpts): New.
8072 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
8073 type. Add comment about fast tracepoints.
8074 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
8075 non-existing action_str field.
8076 (get_context_regcache): Handle fast tracepoints.
8077 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
8078 to the regcache.
8079 (fast_tracepoint_from_jump_pad_address): New.
8080 (fast_tracepoint_from_ipa_tpoint_address): New.
8081 (collecting_t): New.
8082 (force_unlock_trace_buffer): New.
8083 (fast_tracepoint_collecting): New.
8084 (collecting): New.
8085 (gdb_collect): New.
8086 (write_inferior_data_ptr): New.
8087 (target_tp_heap): New.
8088 (target_malloc): New.
8089 (download_agent_expr): New.
8090 (UALIGN): New.
8091 (download_tracepoints): New.
8092 (download_trace_state_variables): New.
8093 (upload_fast_traceframes): New.
8094 (IPA_FIRST_TRACEFRAME): New.
8095 (IPA_NEXT_TRACEFRAME_1): New.
8096 (IPA_NEXT_TRACEFRAME): New.
8097 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
8098 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
8099 (gdb_jump_pad_buffer_end): New.
8100 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
8101 (initialize_tracepoint): Adjust.
8102 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
8103 buffer. Initialize the low module.
8104 * utils.c (PREFIX, TOOLNAME): New.
8105 (malloc_failure): Use PREFIX.
8106 (error): In the IPA, an error causes an exit.
8107 (fatal, warning): Use PREFIX.
8108 (internal_error): Use TOOLNAME.
8109 (NUMCELLS): Increase to 10.
8110 * configure, config.in: Regenerate.
8111
d149dd1d
PA
81122010-06-01 Pedro Alves <pedro@codesourcery.com>
8113
8114 * server.c (handle_query) <qSupported>: Do two passes over the
8115 qSupported string to avoid nesting strtok.
8116
f6528abd
JK
81172010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8118
8119 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
8120 (CDEPS): New.
8121 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
8122 -Wl,--dynamic-list.
8123 * configure: Regenerate.
8124 * proc-service.list: New.
8125
ca2a87a0
JK
81262010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8127
8128 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
8129 New comment.
8130
363a6e9f
OS
81312010-05-26 Ozkan Sezer <sezeroz@gmail.com>
8132
8133 * gdbreplay.c (remote_open): Check error return from socket() call by
8134 its equality to -1 not by it being negative.
8135 * remote-utils.c (remote_open): Likewise.
8136
d23b6cb1
PA
81372010-05-23 Pedro Alves <pedro@codesourcery.com>
8138
8139 * config.h: Regenerate.
8140
28d3cf85
MK
81412010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
8142
8143 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
8144 doesn't provide PTRACE_GET_THREAD_AREA.
8145
fea36a59
MK
81462010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
8147
8148 * linux-m68k-low.c: Include <asm/ptrace.h>
8149 (ps_get_thread_area): Implement.
8150
24b066ba
DE
81512010-05-03 Doug Evans <dje@google.com>
8152
8153 * event-loop.c (struct callback_event): New struct.
8154 (callback_list): New global.
8155 (append_callback_event, delete_callback_event): New functions.
8156 (process_callback): New function.
8157 (start_event_loop): Call it.
8158 * remote-utils.c (NOT_SCHEDULED): Define.
8159 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
8160 moved out of readchar.
8161 (readchar): Rewrite. Call reschedule before returning.
8162 (reset_readchar): New function.
8163 (remote_close): Call it.
8164 (process_remaining, reschedule): New functions.
8165 * server.h (callback_handler_func): New typedef.
8166 (append_callback_event, delete_callback_event): Declare.
8167
9836d6ea
PA
81682010-05-03 Pedro Alves <pedro@codesourcery.com>
8169
8170 * proc-service.c (ps_pglobal_lookup): Use
8171 thread_db_look_up_one_symbol.
8172 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
8173 parameter. Use it instead of all_symbols_looked_up.
8174 * server.h (struct process_info) <all_symbols_looked_up>: Delete
8175 field.
8176 (all_symbols_looked_up): Don't declare.
8177 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
8178 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
8179 field.
8180 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
8181 Set all_symbols_looked_up here.
8182 (thread_db_look_up_one_symbol): New.
8183 (thread_db_get_tls_address): Adjust.
8184 (thread_db_load_search, try_thread_db_load_1): Always allocate the
8185 thread_db object on the heap, and tentatively set it in the
8186 process structure.
8187 (thread_db_init): Don't set all_symbols_looked_up here.
8188 * linux-low.h (thread_db_look_up_one_symbol): Declare.
8189
7984d532
PA
81902010-05-03 Pedro Alves <pedro@codesourcery.com>
8191
8192 * linux-low.c (linux_kill, linux_detach): Adjust.
8193 (status_pending_p_callback): Remove redundant statement. Check
8194 for !TARGET_WAITIKIND_IGNORE, instead of
8195 TARGET_WAITKIND_STOPPED.
8196 (handle_tracepoints): Make sure LWP is locked. Adjust.
8197 (linux_wait_for_event_1): Adjust.
8198 (linux_cancel_breakpoints): New.
8199 (unsuspend_one_lwp): New.
8200 (unsuspend_all_lwps): New.
8201 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
8202 (send_sigstop_callback): Change return type to int, add new
8203 `except' parameter and handle it.
8204 (suspend_and_send_sigstop_callback): New.
8205 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
8206 pass them down. If SUSPEND, also increment the lwp's suspend
8207 count.
8208 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
8209 (need_step_over_p): Don't consider suspended LWPs.
8210 (start_step_over): Adjust.
8211 (proceed_one_lwp): Change return type to int, add new `except'
8212 parameter and handle it.
8213 (unsuspend_and_proceed_one_lwp): New.
8214 (proceed_all_lwps): Use find_inferior instead of
8215 for_each_inferior.
8216 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
8217 also decrement the suspend count of LWPs. Pass `except' down,
8218 instead of hacking its suspend count.
8219 (linux_pause_all): Add `freeze' parameter. Adjust.
8220 (linux_unpause_all): New.
8221 (linux_target_ops): Install linux_unpause_all.
8222 * server.c (handle_status): Adjust.
8223 * target.h (struct target_ops): New fields `unpause_all' and
8224 `cancel_breakpoints'. Add new parameter to `pause_all'.
8225 (pause_all): Add new `freeze' parameter.
8226 (unpause_all): New.
8227 (cancel_breakpoints): New.
8228 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
8229 cancel breakpoints.
8230 (cmd_qtstart): Pause threads.
8231 (stop_tracing): Pause threads, and cancel breakpoints.
8232 * win32-low.c (win32_target_ops): Adjust.
8233
e471f25b
PA
82342010-05-03 Pedro Alves <pedro@codesourcery.com>
8235
8236 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
8237 the inferior right away from here...
8238 (linux_wait_1): ... to here, and adjust to check the thread's
8239 last_resume_kind instead of the lwp's step or stop_expected flags.
8240
1915ef4f
PA
82412010-05-02 Pedro Alves <pedro@codesourcery.com>
8242
8243 * README: Use consistent `GDB' and `GDBserver' spellings.
8244
f9e39928
PA
82452010-05-02 Pedro Alves <pedro@codesourcery.com>
8246
8247 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
8248 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
8249 (linux_detach_one_lwp): Assume the lwp is stopped.
8250 (any_thread_of): Delete.
8251 (linux_detach): Stop all lwps here. Don't blindly delete all
8252 breakpoints.
8253 (delete_lwp_callback): New.
8254 (linux_mourn): Delete all lwps of the process that is gone.
8255 (linux_wait_1): Don't delete the last lwp of the process here.
8256 * mem-break.h (mark_breakpoints_out): Declare.
8257 * mem-break.c (mark_breakpoints_out): New.
8258 (free_all_breakpoints): Use it.
8259 * server.c (handle_target_event): If the process is gone, mark
8260 breakpoints out.
8261 * thread-db.c (struct thread_db) <create_bp>: New field.
8262 (thread_db_enable_reporting): Fix prototype. Store a thread event
8263 breakpoint reference in the thread_db struct.
8264 (thread_db_load_search): Clear the thread_db object.
8265 (try_thread_db_load_1): Ditto.
8266 (switch_to_process): New.
8267 (disable_thread_event_reporting): Use it.
8268 (remove_thread_event_breakpoints): New.
8269 (thread_db_detach, thread_db_mourn): Use it.
8270
1e7fc18c
PA
82712010-05-01 Pedro Alves <pedro@codesourcery.com>
8272
8273 * linux-low.c (linux_enable_event_reporting): New.
8274 (linux_wait_for_event_1, handle_extended_wait): Use it.
8275
02fc4de7
PA
82762010-04-30 Pedro Alves <pedro@codesourcery.com>
8277
8278 * linux-low.c (linux_kill_one_lwp, linux_kill)
8279 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
8280 (send_sigstop): Take an lwp_info as parameter instead. Queue a
8281 SIGSTOP even if the LWP is stopped.
8282 (send_sigstop_callback): New.
8283 (stop_all_lwps): Use send_sigstop_callback instead.
8284 (linux_resume_one_thread): Adjust.
8285 (proceed_one_lwp): Still proceed an LWP that the client has
8286 requested to stop, if we haven't reported it as stopped yet. Make
8287 sure that LWPs the client want stopped, have a pending SIGSTOP.
8288
bc3b5632
DE
82892010-04-26 Doug Evans <dje@google.com>
8290
ae1ada35
DE
8291 * server.c (handle_general_set): Make static.
8292
bc3b5632
DE
8293 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
8294 Print received char after testing for error/eof instead of before.
8295 (input_interrupt): Tweak comment.
8296
65730243
DE
82972010-04-23 Doug Evans <dje@google.com>
8298
8299 * server.c (start_inferior): Print inferior argv if --debug.
8300
a8ae7dc0
AR
83012010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
8302
8303 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
8304 * nto-x86-low.c: Include server.h
8305
1c07cc19
PM
83062010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
8307
8308 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
8309 be consistent with other sources of this directory.
8310 (init_registers_amd64): Correct name of source file of this function
8311 in the comment.
8312
e0a61e09
PM
83132010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8314
8315 * configure.srv (x86_64-*-mingw*): New configuration for Windows
8316 64-bit executables.
8317
54709339
PM
83182010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8319
8320 * win32-i386-low.c: Add 64-bit support.
8321 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
8322 (init_registers_amd64): Declare.
8323 (mappings): Add 64-bit version of array.
8324 (init_windows_x86): New function.
8325 (the_low_target): Change init_arch field to init_windows_x86.
8326
e8f0053d
PM
83272010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8328
8329 * win32-low.c: Adapt to support also 64-bit architecture.
8330 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
8331 (get_image_name): Use SIZE_T type for local variable `done'.
8332 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
8333 (toolhelp_get_dll_name): Idem.
8334 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
8335 Use uintptr_t typecast to avoid warning.
8336 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
8337 (handle_exception): Use phex_nz to avoid warning.
8338 (win32_wait): Remove unused local variable `process'.
8339
c481e77e
PM
83402010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8341
8342 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
8343 `amd64-avx.o'.
8344
12ea4b69
PM
83452010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
8346
8347 * configure.ac: Use `ws2_32' library for srv_mingw.
8348 * configure: Regenerate.
8349 * gdbreplay.c: Include winsock2.h instead of winsock.h.
8350 * remote-utils.c: Likewise.
8351
f6d1620c
L
83522010-04-17 H.J. Lu <hongjiu.lu@intel.com>
8353
8354 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
8355 if __x86_64__ is defined.
8356
8e642873
PM
83572010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
8358
8359 * configure: Regenerate.
8360
711e434b
PM
83612010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
8362
8363 * server.c (handle_query): Handle 'qGetTIBAddr' query.
8364 * target.h (target_ops): New get_tib_address field.
8365 * win32-low.h (win32_thread_info): Add thread_local_base field.
8366 * win32-low.c (child_add_thread): Add tlb argument.
8367 Set thread_local_base field to TLB.
8368 (get_child_debug_event): Adapt to child_add_thread change.
8369 (win32_get_tib_address): New function.
8370 (win32_target_ops): Set get_tib_address field to
8371 win32_get_tib_address.
8372 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
8373
505106cd
PA
83742010-04-12 Pedro Alves <pedro@codesourcery.com>
8375
505106cd
PA
8376 * linux-low.c (linux_mourn): Also remove the process.
8377 * server.c (handle_target_event): Don't remove the process here.
8378 * nto-low.c (nto_mourn): New.
8379 (nto_target_ops): Install it.
8380 * spu-low.c (spu_mourn): New.
8381 (spu_target_ops): Install it.
8382 * win32-low.c (win32_mourn): New.
8383 (win32_target_ops): Install it.
8384
e8470a06
PA
83852010-04-12 Pedro Alves <pedro@codesourcery.com>
8386
8387 * server.h (buffer_xml_printf): Remove redundant `;'.
8388
45ba0d02
PA
83892010-04-12 Pedro Alves <pedro@codesourcery.com>
8390
8391 * regcache.c (set_register_cache): Invalidate regcaches before
8392 changing the register cache layout.
8393 (regcache_invalidate_one): Allow a NULL regcache.
8394 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
8395 regcaches before changing the register cache layout or the target
8396 regsets.
8397
59e04013
L
83982010-04-12 H.J. Lu <hongjiu.lu@intel.com>
8399
8400 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
8401 variable warning on Linux/x86-64.
8402
8336d594
PA
84032010-04-11 Pedro Alves <pedro@codesourcery.com>
8404
8405 GDBserver disconnected tracing support.
8406
8407 * linux-low.c (linux_remove_process): Delete.
8408 (add_lwp): Don't set last_resume_kind here.
8409 (linux_kill): Use `mourn'.
8410 (linux_detach): Use `thread_db_detach', and `mourn'.
8411 (linux_mourn): New.
8412 (linux_attach_lwp_1): Adjust comment.
8413 (linux_attach): last_resume_kind moved the thread_info; adjust.
8414 (status_pending_p_callback): Adjust.
8415 (linux_wait_for_event_1): Adjust.
8416 (count_events_callback, select_singlestep_lwp_callback)
8417 (select_event_lwp_callback, cancel_breakpoints_callback)
8418 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
8419 (proceed_one_lwp): Adjust.
8420 (linux_async): Add debug output.
8421 (linux_thread_stopped): New.
8422 (linux_pause_all): New.
8423 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
8424 linux_pause_all.
8425 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
8426 (thread_db_free): Delete declaration.
8427 (thread_db_detach, thread_db_mourn): Declare.
8428 * thread-db.c (thread_db_init): Use thread_db_mourn.
8429 (thread_db_free): Delete, split in two.
8430 (disable_thread_event_reporting): New.
8431 (thread_db_detach): New.
8432 (thread_db_mourn): New.
8433
8434 * server.h (struct thread_info) <last_resume_kind>: New field.
8435 <attached>: Add comment.
8436 <gdb_detached>: New field.
8437 (handler_func): Change return type to int.
8438 (handle_serial_event, handle_target_event): Ditto.
8439 (gdb_connected): Declare.
8440 (tracing): Delete.
8441 (disconnected_tracing): Declare.
8442 (stop_tracing): Declare.
8443
8444 * server.c (handle_query) <qSupported>: Report support for
8445 disconnected tracing.
8446 (queue_stop_reply_callback): Account for running threads.
8447 (gdb_wants_thread_stopped): New.
8448 (gdb_wants_all_threads_stopped): New.
8449 (gdb_reattached_process): New.
8450 (handle_status): Clear the `gdb_detached' flag of all processes.
8451 In all-stop, stop all threads.
8452 (main): Be sure to leave tfind mode. Handle disconnected tracing.
8453 (process_serial_event): If the remote connection breaks, or if an
8454 exit was forced with "monitor exit", force an event loop exit.
8455 Handle disconnected tracing on detach.
8456 (handle_serial_event): Adjust.
8457 (handle_target_event): If GDB isn't connected, forward events back
8458 to the inferior, unless the last process exited, in which case,
8459 exit gdbserver. Adjust interface.
8460
8461 * remote-utils.c (remote_open): Don't block in accept. Instead
8462 register an event loop source on the listen socket file
8463 descriptor. Refactor bits into ...
8464 (listen_desc): ... this new global.
8465 (gdb_connected): ... this new function.
8466 (enable_async_notification): ... this new function.
8467 (handle_accept_event): ... this new function.
8468 (remote_close): Clear remote_desc.
8469
8470 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
8471
8472 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
8473 New fields.
8474 (mourn_inferior): Define.
8475 (target_process_qsupported): Avoid the dangling else problem.
8476 (thread_stopped): Define.
8477 (pause_all): Define.
8478 (target_waitstatus_to_string): Declare.
8479 * target.c (target_waitstatus_to_string): New.
8480
8481 * tracepoint.c (tracing): Make extern.
8482 (disconnected_tracing): New.
8483 (stop_tracing): Make extern. Handle tracing stops due to GDB
8484 disconnecting.
8485 (cmd_qtdisconnected): New.
8486 (cmd_qtstatus): Report disconnected tracing status in trace reply.
8487 (handle_tracepoint_general_set): Handle QTDisconnected.
8488
8489 * event-loop.c (event_handler_func): Change return type to int.
8490 (process_event): Bail out if the event handler wants the event
8491 loop to stop.
8492 (handle_file_event): Ditto.
8493 (start_event_loop): Bail out if the event handler wants the event
8494 loop to stop.
8495
8496 * nto-low.c (nto_target_ops): Adjust.
8497 * spu-low.c (spu_wait): Don't remove the process here.
8498 (spu_target_ops): Adjust.
8499 * win32-low.c (win32_wait): Don't remove the process here.
8500 (win32_target_ops): Adjust.
8501
5d267c4c
PA
85022010-04-11 Pedro Alves <pedro@codesourcery.com>
8503
8504 * regcache.c (realloc_register_cache): Invalidate inferior's
8505 regcache before recreating it.
8506
623ccd72
PA
85072010-04-09 Pedro Alves <pedro@codesourcery.com>
8508
8509 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
8510
219f2f23
PA
85112010-04-09 Stan Shebs <stan@codesourcery.com>
8512 Pedro Alves <pedro@codesourcery.com>
8513
8514 * server.h (LONGEST): New.
8515 (struct thread_info) <while_stepping>: New field.
8516 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
8517 Declare.
8518 (initialize_tracepoint, handle_tracepoint_general_set)
8519 (handle_tracepoint_query, tracepoint_finished_step)
8520 (tracepoint_was_hit, release_while_stepping_state_list):
8521 (current_traceframe): Declare.
8522 * server.c (handle_general_set): Handle tracepoint packets.
8523 (read_memory): New.
8524 (write_memory): New.
8525 (handle_search_memory_1): Use read_memory.
8526 (handle_query): Report support for conditional tracepoints, trace
8527 state variables, and tracepoint sources. Handle tracepoint
8528 queries.
8529 (main): Initialize the tracepoints module.
8530 (process_serial_event): Handle traceframe reads/writes.
8531
8532 * linux-low.c (handle_tracepoints): New.
8533 (linux_wait_1): Call it.
8534 (linux_resume_one_lwp): Handle while-stepping.
8535 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
8536 (linux_target_ops): Install them.
8537 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
8538 New field.
8539 * linux-x86-low.c (x86_supports_tracepoints): New.
8540 (the_low_target). Install it.
8541
8542 * mem-break.h (delete_breakpoint): Declare.
8543 * mem-break.c (delete_breakpoint): Make external.
8544
8545 * target.h (struct target_ops): Add `supports_tracepoints',
8546 `read_pc', and `write_pc' fields.
8547 (target_supports_tracepoints): Define.
8548 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
8549 (phex_nz): New.
8550
8551 * regcache.h (struct regcache) <registers_owned>: New field.
8552 (init_register_cache, regcache_cpy): Declare.
8553 (regcache_read_pc, regcache_write_pc): Declare.
8554 (register_cache_size): Declare.
8555 (supply_regblock): Declare.
8556 * regcache.c (init_register_cache): New.
8557 (new_register_cache): Use it.
8558 (regcache_cpy): New.
8559 (register_cache_size): New.
8560 (supply_regblock): New.
8561 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 8562
219f2f23
PA
8563 * tracepoint.c: New.
8564
8565 * Makefile.in (OBS): Add tracepoint.o.
8566 (tracepoint.o): New rule.
8567
3a13a53b
L
85682010-04-08 H.J. Lu <hongjiu.lu@intel.com>
8569
8570 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
8571 (i386-mmx.o): New.
8572 (i386-mmx.c): Likewise.
8573 (i386-mmx-linux.o): Likewise.
8574 (i386-mmx-linux.c): Likewise.
8575
8576 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
8577 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
8578 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
8579 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
8580
8581 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
8582 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
8583 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
8584
1570b33e
L
85852010-04-07 H.J. Lu <hongjiu.lu@intel.com>
8586
8587 * Makefile.in (clean): Updated.
8588 (i386-avx.o): New.
8589 (i386-avx.c): Likewise.
8590 (i386-avx-linux.o): Likewise.
8591 (i386-avx-linux.c): Likewise.
8592 (amd64-avx.o): Likewise.
8593 (amd64-avx.c): Likewise.
8594 (amd64-avx-linux.o): Likewise.
8595 (amd64-avx-linux.c): Likewise.
8596
8597 * configure.srv (srv_i386_regobj): Add i386-avx.o.
8598 (srv_i386_linux_regobj): Add i386-avx-linux.o.
8599 (srv_amd64_regobj): Add amd64-avx.o.
8600 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
8601 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
8602 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
8603 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
8604 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
8605 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
8606 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
8607
8608 * i387-fp.c: Include "i386-xstate.h".
8609 (i387_xsave): New.
8610 (i387_cache_to_xsave): Likewise.
8611 (i387_xsave_to_cache): Likewise.
8612 (x86_xcr0): Likewise.
8613
8614 * i387-fp.h (i387_cache_to_xsave): Likewise.
8615 (i387_xsave_to_cache): Likewise.
8616 (x86_xcr0): Likewise.
8617
8618 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
8619 * linux-crisv32-low.c (target_regsets): Likewise.
8620 * linux-m68k-low.c (target_regsets): Likewise.
8621 * linux-mips-low.c (target_regsets): Likewise.
8622 * linux-ppc-low.c (target_regsets): Likewise.
8623 * linux-s390-low.c (target_regsets): Likewise.
8624 * linux-sh-low.c (target_regsets): Likewise.
8625 * linux-sparc-low.c (target_regsets): Likewise.
8626 * linux-xtensa-low.c (target_regsets): Likewise.
8627
8628 * linux-low.c: Include <sys/uio.h>.
8629 (regsets_fetch_inferior_registers): Support nt_type.
8630 (regsets_store_inferior_registers): Likewise.
8631 (linux_process_qsupported): New.
8632 (linux_target_ops): Add linux_process_qsupported.
8633
8634 * linux-low.h (regset_info): Add nt_type.
8635 (linux_target_ops): Add process_qsupported.
8636
8637 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
8638 and <sys/uio.h>.
8639 (init_registers_i386_avx_linux): New.
8640 (init_registers_amd64_avx_linux): Likewise.
8641 (xmltarget_i386_linux_no_xml): Likewise.
8642 (xmltarget_amd64_linux_no_xml): Likewise.
8643 (PTRACE_GETREGSET): Likewise.
8644 (PTRACE_SETREGSET): Likewise.
8645 (x86_fill_xstateregset): Likewise.
8646 (x86_store_xstateregset): Likewise.
8647 (use_xml): Likewise.
8648 (x86_linux_update_xmltarget): Likewise.
8649 (x86_linux_process_qsupported): Likewise.
8650 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
8651 (x86_arch_setup): Don't call init_registers_amd64_linux nor
8652 init_registers_i386_linux here. Call
8653 x86_linux_update_xmltarget.
8654 (the_low_target): Add x86_linux_process_qsupported.
8655
8656 * server.c (handle_query): Call target_process_qsupported.
8657
8658 * target.h (target_ops): Add process_qsupported.
8659 (target_process_qsupported): New.
8660
fc7238bb
PA
86612010-04-03 Pedro Alves <pedro@codesourcery.com>
8662
8663 * inferiors.c (add_thread): Set last_status kind to
8664 TARGET_WAITKIND_IGNORE.
8665 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
8666 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
8667 (linux_wait_1): Move `thread' local definition to block that uses
8668 it. Don't NULL initialize `event_child'.
8669 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
8670 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
8671 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
8672
bdabb078
PA
86732010-04-01 Pedro Alves <pedro@codesourcery.com>
8674
8675 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
8676 an extended waitstatus, or by a watchpoint.
8677 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
8678 thread was stepping or has been stopped by a watchpoint.
8679
d3bbe7a0
PA
86802010-04-01 Pedro Alves <pedro@codesourcery.com>
8681
8682 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
8683 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
8684 of another, then delete the previous, and validate all
8685 breakpoints.
8686 (validate_inserted_breakpoint): New.
8687 (delete_disabled_breakpoints): New.
8688 (validate_breakpoints): New.
8689 (check_mem_read): Validate breakpoints before trusting their
8690 shadow. Delete disabled breakpoints.
8691 (check_mem_write): Validate breakpoints before trusting they
8692 should be inserted. Delete disabled breakpoints.
8693 * mem-break.h (validate_breakpoints):
8694 * server.c (handle_query): Validate breakpoints when we see a
8695 qSymbol query.
8696
8b07ae33
PA
86972010-04-01 Pedro Alves <pedro@codesourcery.com>
8698
8699 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
8700 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
8701 if we could tell there's a GDB breakpoint at stop_pc.
8702 (need_step_over_p): Don't do a step over if we find a GDB
8703 breakpoint at the resume PC.
8704
8705 * mem-break.c (struct raw_breakpoint): New.
8706 (enum bkpt_type): New type `gdb_breakpoint'.
8707 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
8708 fields. New field `raw'.
8709 (find_raw_breakpoint_at): New.
8710 (set_raw_breakpoint_at): Handle refcounting. Create a raw
8711 breakpoint instead.
8712 (set_breakpoint_at): Adjust.
8713 (delete_raw_breakpoint): New.
8714 (release_breakpoint): New.
8715 (delete_breakpoint): Rename to...
8716 (delete_breakpoint_1): ... this. Add proc parameter. Use
8717 release_breakpoint. Return ENOENT.
8718 (delete_breakpoint): Reimplement.
8719 (find_breakpoint_at): Delete.
8720 (find_gdb_breakpoint_at): New.
8721 (delete_breakpoint_at): Delete.
8722 (set_gdb_breakpoint_at): New.
8723 (delete_gdb_breakpoint_at): New.
8724 (gdb_breakpoint_here): New.
8725 (set_reinsert_breakpoint): Use release_breakpoint.
8726 (uninsert_breakpoint): Rename to ...
8727 (uninsert_raw_breakpoint): ... this.
8728 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
8729 (reinsert_raw_breakpoint): Change parameter type to
8730 raw_breakpoint.
8731 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
8732 instead.
8733 (check_breakpoints): Adjust. Use release_breakpoint.
8734 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
8735 (breakpoint_inserted_here): Ditto.
8736 (check_mem_read): Adjust to iterate over raw breakpoints instead.
8737 Don't trust the breakpoint's shadow if it is not inserted.
8738 (check_mem_write): Adjust to iterate over raw breakpoints instead.
8739 (delete_all_breakpoints): Adjust.
8740 (free_all_breakpoints): Mark all breakpoints as uninserted, and
8741 use delete_breakpoint_1.
8742
8743 * mem-break.h (breakpoints_supported): Delete declaration.
8744 (set_gdb_breakpoint_at): Declare.
8745 (gdb_breakpoint_here): Declare.
8746 (delete_breakpoint_at): Delete.
8747 (delete_gdb_breakpoint_at): Declare.
8748
8749 * server.h (struct raw_breakpoint): Forward declare.
8750 (struct process_info): New field `raw_breakpoints'.
8751
8752 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
8753 breakpoints.
8754
6bf5e0ba
PA
87552010-03-24 Pedro Alves <pedro@codesourcery.com>
8756
8757 * linux-low.c (status_pending_p_callback): Fix comment.
8758 (linux_wait_for_event_1): Move most of the internal breakpoint
8759 handling from here...
8760 (linux_wait_1): ... to here.
8761 (count_events_callback): New.
8762 (select_singlestep_lwp_callback): New.
8763 (select_event_lwp_callback): New.
8764 (cancel_breakpoints_callback): New.
8765 (select_event_lwp): New.
8766 (linux_wait_1): Simplify internal breakpoint handling. Give equal
8767 priority to all LWPs that have had events that should be reported
8768 to the client. Cancel breakpoints when about to reporting the
8769 event to the client, not while stopping lwps. No longer cancel
8770 finished single-steps here.
8771 (cancel_finished_single_step): Delete.
8772 (cancel_finished_single_steps): Delete.
8773
414a389f
PA
87742010-03-24 Pedro Alves <pedro@codesourcery.com>
8775
8776 * mem-break.c (enum bkpt_type): New.
8777 (struct breakpoint): New field `type'.
8778 (set_breakpoint_at): Change return type to struct breakpoint
8779 pointer. Set type to `other_breakpoint' by default.
8780 (delete_breakpoint): Rewrite, supporting more than one breakpoint
8781 in the breakpoint list.
8782 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
8783 (reinsert_breakpoint): Rename to ...
8784 (reinsert_raw_breakpoint): ... this.
8785 (reinsert_breakpoints_at): Adjust.
8786 * mem-break.h (struct breakpoint): Declare.
8787 (set_breakpoint_at): Change return type to struct breakpoint
8788 pointer.
8789
2280c721
PA
87902010-03-24 Pedro Alves <pedro@codesourcery.com>
8791
8792 * server.c (handle_query): Assign, not compare.
8793
d50171e4
PA
87942010-03-24 Pedro Alves <pedro@codesourcery.com>
8795
8796 Teach linux gdbserver to step-over-breakpoints.
8797
8798 * linux-low.c (can_hardware_single_step): New.
8799 (supports_breakpoints): New.
8800 (handle_extended_wait): If stopping threads, read the stop pc of
8801 the new cloned LWP.
8802 (get_pc): New.
8803 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
8804 low target doesn't support retrieving the PC.
8805 (add_lwp): Set last_resume_kind to resume_continue.
8806 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
8807 (linux_attach): Don't clear stop_expected. Set the lwp's
8808 last_resume_kind to resume_stop.
8809 (linux_detach_one_lwp): Don't check for removed breakpoints.
8810 (check_removed_breakpoint): Delete.
8811 (status_pending_p): Rename to ...
8812 (status_pending_p_callback): ... this. Don't check for removed
8813 breakpoints. Don't consider threads that are stopped from GDB's
8814 perspective.
8815 (linux_wait_for_lwp): Always read the stop_pc here.
8816 (cancel_breakpoint): New.
8817 (step_over_bkpt): New global.
8818 (linux_wait_for_event_1): Implement stepping over breakpoints.
8819 (gdb_wants_lwp_stopped): New.
8820 (gdb_wants_all_stopped): New.
8821 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
8822 single-step traps here. Store the thread's last reported target
8823 wait status.
8824 (send_sigstop): Don't clear stop_expected. Always set it,
8825 instead.
8826 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
8827 (cancel_finished_single_step): New.
8828 (cancel_finished_single_steps): New.
8829 (wait_for_sigstop): Don't cancel finished single-step traps here.
8830 (linux_resume_one_lwp): Don't check for removed breakpoints.
8831 Don't set `step' on non-hardware step archs.
8832 (linux_set_resume_request): Ignore resume_stop requests if already
8833 stopping or stopped. Set the lwp's last_resume_kind.
8834 (resume_status_pending_p): Don't check for removed breakpoints.
8835 (need_step_over_p): New.
8836 (start_step_over): New.
8837 (finish_step_over): New.
8838 (linux_resume_one_thread): Always queue a sigstop for resume_stop
8839 requests. Clear the thread's last reported target waitstatus.
8840 Don't use the `suspended' flag. Don't consider pending breakpoints.
8841 (linux_resume): Start a step-over if necessary.
8842 (proceed_one_lwp): New.
8843 (proceed_all_lwps): New.
8844 (unstop_all_lwps): New.
8845 * linux-low.h (struct lwp_info): Rewrite comment for the
8846 `suspended' flag. Add the `stop_pc' field. Delete the
8847 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
8848 Add `'last_resume_kind' and `need_step_over' fields.
8849 * inferiors.c (struct thread_info): Delete, moved elsewhere.
8850 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
8851 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
8852 (set_raw_breakpoint_at): New.
8853 (set_breakpoint_at): Rewrite to use it.
8854 (reinsert_breakpoint_handler): Delete.
8855 (set_reinsert_breakpoint): New.
8856 (reinsert_breakpoint_by_bp): Delete.
8857 (delete_reinsert_breakpoints): New.
8858 (uninsert_breakpoint): Rewrite.
8859 (uninsert_breakpoints_at): New.
8860 (reinsert_breakpoint): Rewrite.
8861 (reinsert_breakpoints_at): New.
8862 (check_breakpoints): Rewrite.
8863 (breakpoint_here): New.
8864 (breakpoint_inserted_here): New.
8865 (check_mem_read): Adjust.
8866 * mem-break.h (breakpoints_supported, breakpoint_here)
8867 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
8868 (reinsert_breakpoint_by_bp): Delete declaration.
8869 (delete_reinsert_breakpoints): Declare.
8870 (reinsert_breakpoint): Delete declaration.
8871 (reinsert_breakpoints_at): Declare.
8872 (uninsert_breakpoint): Delete declaration.
8873 (uninsert_breakpoints_at): Declare.
8874 (check_breakpoints): Adjust prototype.
8875 * server.h: Adjust include order.
8876 (struct thread_info): Declare here. Add a `last_status' field.
8877
30ba68cb
MS
88782010-03-23 Michael Snyder <msnyder@vmware.com>
8879
8880 * server.c (crc32): New function.
8881 (handle_query): Add handling for 'qCRC:' request.
8882
b9a881c2
PA
88832010-03-23 Pedro Alves <pedro@codesourcery.com>
8884
8885 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
8886 lwp had been stopped by a watchpoint.
8887
e92d13d5
PA
88882010-03-16 Pedro Alves <pedro@codesourcery.com>
8889
8890 * server.h (internal_error): Declare.
8891 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
8892 * utils.c (internal_error): New function.
8893
64daa791
AS
88942010-03-15 Andreas Schwab <schwab@redhat.com>
8895
8896 * configure.srv: Fix typo setting srv_regobj.
8897
f52cd8cd
PA
88982010-03-15 Pedro Alves <pedro@codesourcery.com>
8899
8900 * linux-low.c (fetch_register): Avoid passing a non string literal
8901 format to `error'.
8902 (usr_store_inferior_registers): Ditto.
8903
93ae6fdc
PA
89042010-03-14 Pedro Alves <pedro@codesourcery.com>
8905
8906 * linux-low.c (linux_write_memory): Bail out early if peeking
8907 memory failed.
8908
c3adc08c
PA
89092010-03-14 Pedro Alves <pedro@codesourcery.com>
8910
8911 * linux-low.h (struct lwp_info): New fields
8912 `stopped_by_watchpoint' and `stopped_data_address'.
8913 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
8914 here, and cache them in the lwp object.
8915 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
8916 directly.
8917 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
8918 field.
8919 (linux_stopped_by_watchpoint): Rewrite.
8920 (linux_stopped_data_address): Rewrite.
8921
bce522a2
PA
89222010-03-06 Simo Melenius <simo.melenius@iki.fi>
8923
8924 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
8925 switching the current inferior, not before.
8926
90884b2b
L
89272010-03-01 H.J. Lu <hongjiu.lu@intel.com>
8928
8929 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
8930 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
8931 i386-linux.c and amd64-linux.c.
8932 (reg-i386.o): Removed.
8933 (reg-i386.c): Likewise.
8934 (reg-i386-linux.o): Likewise.
8935 (reg-i386-linux.c): Likewise.
8936 (reg-x86-64.o): Likewise.
8937 (reg-x86-64.c): Likewise.
8938 (reg-x86-64-linux.o): Likewise.
8939 (reg-x86-64-linux.c): Likewise.
8940 (i386.o): New.
8941 (i386.c): Likewise.
8942 (i386-linux.o): Likewise.
8943 (i386-linux.c): Likewise.
8944 (amd64.o): Likewise.
8945 (amd64.c): Likewise.
8946 (amd64-linux.o): Likewise.
8947 (amd64-linux.c): Likewise.
8948
8949 * configure.srv (srv_i386_regobj): New.
8950 (srv_i386_linux_regobj): Likewise.
8951 (srv_amd64_regobj): Likewise.
8952 (srv_amd64_linux_regobj): Likewise.
8953 (srv_i386_32bit_xmlfiles): Likewise.
8954 (srv_i386_64bit_xmlfiles): Likewise.
8955 (srv_i386_xmlfiles): Likewise.
8956 (srv_amd64_xmlfiles): Likewise.
8957 (srv_i386_linux_xmlfiles): Likewise.
8958 (srv_amd64_linux_xmlfiles): Likewise.
8959 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
8960 srv_xmlfiles to $srv_i386_xmlfiles.
8961 (i[34567]86-*-mingw32ce*): Likewise.
8962 (i[34567]86-*-mingw*): Likewise.
8963 (i[34567]86-*-nto*): Likewise.
8964 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
8965 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
8966 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
8967 (x86_64-*-linux*): Likewise.
8968
8969 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
8970 (init_registers_amd64_linux): New.
8971 (x86_arch_setup): Replace init_registers_x86_64_linux with
8972 init_registers_amd64_linux.
8973
193f13e6
MK
89742010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
8975
8976 * configure.ac: Check for libdl. If it is not available link against
8977 static libthread_db.
8978 * configure: Regenerate.
8979
85d721b8
PA
89802010-02-22 Pedro Alves <pedro@codesourcery.com>
8981
8982 PR9605
8983
8984 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
8985 handing a read watchpoint.
8986 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
8987
6076632b
DE
89882010-02-12 Doug Evans <dje@google.com>
8989
8990 * linux-low.c (linux_supports_tracefork_flag): Document.
8991 (linux_look_up_symbols): Add comment.
8992
3327ccf7
L
89932010-02-03 H.J. Lu <hongjiu.lu@intel.com>
8994
8995 * regcache.c (supply_register): Clear regcache if buf is NULL.
8996
0718675c 89972010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 8998 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
8999
9000 * inferiors.c (find_inferior): Add function documentation.
9001 (unloaded_dll): Handle the case where the unloaded dll has not
9002 been previously registered in the dll list.
9003
177321bd
DJ
90042010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
9005
9006 * linux-arm-low.c (thumb_breakpoint_len): Delete.
9007 (thumb2_breakpoint): New.
9008 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
9009
2b009048
DJ
90102010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
9011
9012 * linux-low.c (get_stop_pc): Check for SIGTRAP.
9013 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
9014 breakpoints.
9015
3be029c7
PA
90162010-01-21 Pedro Alves <pedro@codesourcery.com>
9017
9018 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
9019
18f5de3b
JK
90202010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
9021
9022 * linux-s390-low.c (s390_collect_ptrace_register)
9023 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
9024
3743bb4f
DE
90252010-01-21 Doug Evans <dje@google.com>
9026
14ce3065
DE
9027 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
9028 (PTRACE_ARG4_TYPE): New macro.
9029 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
9030 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
9031 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
9032 (usr_store_inferior_registers): Ditto.
9033 (linux_read_memory, linux_write_memory): Ditto.
9034 (linux_test_for_tracefork): Ditto.
9035
3743bb4f
DE
9036 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
9037 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
9038
8b315be5
PA
90392010-01-21 Pedro Alves <pedro@codesourcery.com>
9040
9041 * proc-service.c (ps_lgetregs): Don't refetch registers from the
9042 target.
9043
85492558
PA
90442010-01-21 Pedro Alves <pedro@codesourcery.com>
9045
9046 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
9047 prototype to take a regcache. Adjust.
9048
442ea881
PA
90492010-01-20 Pedro Alves <pedro@codesourcery.com>
9050
9051 * regcache.h (struct thread_info): Forward declare.
9052 (struct regcache): New.
9053 (new_register_cache): Adjust prototype.
9054 (get_thread_regcache): Declare.
9055 (free_register_cache): Adjust prototype.
9056 (registers_to_string, registers_from_string): Ditto.
9057 (supply_register, supply_register_by_name, collect_register)
9058 (collect_register_as_string, collect_register_by_name): Ditto.
9059 * regcache.c (struct inferior_regcache_data): Delete.
9060 (get_regcache): Rename to ...
9061 (get_thread_regcache): ... this. Adjust. Switch inferior before
9062 fetching registers.
9063 (regcache_invalidate_one): Adjust.
9064 (regcache_invalidate): Fix prototype.
9065 (new_register_cache): Return the new register cache.
9066 (free_register_cache): Change prototype.
9067 (realloc_register_cache): Adjust.
9068 (registers_to_string): Change prototype to take a regcache. Adjust.
9069 (registers_from_string): Ditto.
9070 (register_data): Ditto.
9071 (supply_register): Ditto.
9072 (supply_register_by_name): Ditto.
9073 (collect_register): Ditto.
9074 (collect_register_as_string): Ditto.
9075 (collect_register_by_name): Ditto.
9076 * server.c (process_serial_event): Adjust.
9077 * linux-low.h (regset_fill_func, regset_store_func): Change
9078 prototype.
9079 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
9080 Change prototype.
9081 * linux-low.c (get_stop_pc): Adjust.
9082 (check_removed_breakpoint): Adjust.
9083 (linux_wait_for_event): Adjust.
9084 (linux_resume_one_lwp): Adjust.
9085 (fetch_register): Add regcache parameter. Adjust.
9086 (usr_store_inferior_registers): Ditto.
9087 (regsets_fetch_inferior_registers): Ditto.
9088 (regsets_store_inferior_registers): Ditto.
9089 (linux_fetch_registers, linux_store_registers): Ditto.
9090 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
9091 regcache. Adjust.
43aaf8b6
PA
9092 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
9093 Ditto.
442ea881
PA
9094 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
9095 prototype to take a regcache.
9096 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
9097 * remote-utils.c (convert_ascii_to_int, outreg)
9098 (prepare_resume_reply): Change prototype to take a regcache.
9099 Adjust.
9100 * target.h (struct target_ops) <fetch_registers, store_registers>:
9101 Change prototype to take a regcache.
9102 (fetch_inferior_registers, store_inferior_registers): Change
9103 prototype to take a regcache. Adjust.
9104 * proc-service.c (ps_lgetregs): Adjust.
9105 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
9106 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
9107 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
9108 take a regcache. Adjust.
9109 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
9110 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
9111 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
9112 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
9113 * linux-cris-low.c (cris_get_pc, cris_set_pc)
9114 (cris_cannot_fetch_register):
9115 (cris_breakpoint_at): Change prototype to take a regcache.
9116 Adjust.
9117 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
9118 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
9119 to take a regcache. Adjust.
9120 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
9121 Adjust.
9122 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
9123 take a regcache. Adjust.
9124 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
9125 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
9126 (m68k_set_pc): Change prototype to take a regcache. Adjust.
9127 * linux-mips-low.c (mips_get_pc):
9128 (mips_set_pc): Change prototype to take a regcache. Adjust.
9129 (mips_reinsert_addr): Adjust.
9130 (mips_collect_register): Change prototype to take a regcache.
9131 Adjust.
9132 (mips_supply_register):
9133 (mips_collect_register_32bit, mips_supply_register_32bit)
9134 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
9135 (mips_store_fpregset): Ditto.
43aaf8b6
PA
9136 * linux-ppc-low.c (ppc_supply_ptrace_register)
9137 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
9138 (parse_spufs_run): Adjust.
9139 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
9140 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
9141 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
9142 take a regcache. Adjust.
9143 * linux-s390-low.c (s390_collect_ptrace_register)
9144 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
9145 (s390_set_pc): Change prototype to take a regcache. Adjust.
9146 (s390_arch_setup): Adjust.
9147 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
9148 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
9149 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
9150 (sparc_fill_gregset, sparc_store_gregset_from_stack)
9151 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
9152 regcache. Adjust.
9153 (sparc_breakpoint_at): Adjust.
9154 * linux-xtensa-low.c (xtensa_fill_gregset):
9155 (xtensa_store_gregset):
9156 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
9157 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
9158 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
9159 prototype to take a regcache. Adjust.
9160 * win32-arm-low.c (arm_fetch_inferior_register)
9161 (arm_store_inferior_register): Change prototype to take a
9162 regcache. Adjust.
9163 * win32-i386-low.c (i386_fetch_inferior_register)
9164 (i386_store_inferior_register): Change prototype to take a
9165 regcache. Adjust.
9166 * win32-low.c (child_fetch_inferior_registers)
9167 (child_store_inferior_registers): Change prototype to take a
9168 regcache. Adjust.
9169 (win32_wait): Adjust.
9170 (win32_fetch_inferior_registers): Change prototype to take a
9171 regcache. Adjust.
9172 (win32_store_inferior_registers): Adjust.
9173 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
9174 store_inferior_register>: Change prototype to take a regcache.
9175
60c3d7b0
DE
91762010-01-20 Doug Evans <dje@google.com>
9177
9178 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
9179 #ifdef.
9180 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 9181 (W_STOPCODE): Provide definition if missing.
60c3d7b0 9182
dc146f7c
VP
91832010-01-13 Vladimir Prus <vladimir@codesourcery.com>
9184
9185 * linux-low.c (linux_core_of_thread): New.
9186 (compare_ints, show_process, list_threads): New.
9187 (linux_qxfer_osdata): Report threads and cores.
9188 (linux_target_op): Register linux_core_of_thread.
9189 * remote-utils.c (prepare_resume_reply): Report the core.
9190 (buffer_xml_printf): Support %d specifier.
9191 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
9192 New.
9193 (handle_query): Handle qXfer:threads. Announce availability
9194 thereof.
9195 * target.h (struct target_ops): New field core_of_thread.
9196
7803799a
UW
91972010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
9198
9199 * Makefile.in (clean): Remove new generated files.
9200 (reg-s390.o, reg-s390.c): Remove rules.
9201 (reg-s390x.o, reg-s390x.c): Likewise.
9202 (s390-linux32.o, s390-linux32.c): Add rules.
9203 (s390-linux64.o, s390-linux64.c): Likewise.
9204 (s390x-linux64.o, s390x-linux64.c): Likewise.
9205 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
9206 * linux-s390-low.c: Include <elf.h>.
9207 (HWCAP_S390_HIGH_GPRS): Define if undefined.
9208 (init_registers_s390): Remove prototype.
9209 (init_registers_s390x): Likewise.
9210 (init_registers_s390_linux32): Add prototype.
9211 (init_registers_s390_linux64): Likewise.
9212 (init_registers_s390x_linux64): Likewise.
9213 (s390_num_regs_3264): New define.
9214 (s390_regmap_3264): New global variable.
9215 (s390_cannot_fetch_register): Remove obsolete check.
9216 (s390_cannot_store_register): Likewise.
9217 (s390_collect_ptrace_register): Handle upper/lower register halves.
9218 (s390_supply_ptrace_register): Likewise.
9219 (s390_fill_gregset): Update to register number changes.
9220 (s390_get_hwcap): New routine.
9221 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
9222 Install appropriate regmap and register set.
9223
6e7ffa39
JB
92242010-01-01 Joel Brobecker <brobecker@adacore.com>
9225
9226 * server.c (gdbserver_version): Update copyright year to 2010.
9227 * gdbreplay.c (gdbreplay_version): Likewise.
9228
957f3f49
DE
92292009-12-28 Doug Evans <dje@google.com>
9230
9231 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
9232 elf/external.h. Include <elf.h> instead but only if necessary.
9233
ca5c370d
PA
92342009-12-28 Pedro Alves <pedro@codesourcery.com>
9235
9236 * linux-low.c (linux_remove_process): Remove `detaching'
9237 parameter. Don't release/detach from thread_db here.
9238 (linux_kill): Release/detach from thread_db here, ...
9239 (linux_detach): ... and here, before actually detaching.
9240 (linux_wait_1): ... and here, when a process exits.
9241 * thread-db.c (any_thread_of): New.
9242 (thread_db_free): Switch the current inferior to a thread of the
9243 passed in process.
9244
4ee62156
DE
92452009-12-21 Doug Evans <dje@google.com>
9246
d90e6a88
DE
9247 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
9248
c5f62d5f
DE
9249 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
9250 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
9251 warning ifndef __NR_tkill. Move setting of errno there too.
9252 Delete unnecessary resetting of errno after syscall.
9253 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
9254
10e86dd7
DE
9255 * configure.ac: Check for dladdr.
9256 * config.in: Regenerate.
9257 * configure: Regenerate.
9258 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
9259 (try_thread_db_load): Update.
9260
4ee62156
DE
9261 * linux-low.c (my_waitpid): Delete unnecessary prototype.
9262
00f515da
DE
92632009-12-18 Doug Evans <dje@google.com>
9264
e9464885
DE
9265 * event-loop.c: Include unistd.h if it exists.
9266
07d4f67e
DE
9267 * linux-low.c (my_waitpid): Move definition away from being in
9268 between linux_tracefork_child/linux_test_for_tracefork.
9269
00f515da
DE
9270 * gdb_proc_service.h (psaddr_t): Fix type.
9271 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
9272 signature to match glibc.
9273
1de1badb
DE
92742009-12-16 Doug Evans <dje@google.com>
9275
9276 * linux-low.c (linux_read_memory): Fix argument to read.
9277
aeeb81d1
PA
92782009-11-26 Pedro Alves <pedro@codesourcery.com>
9279
9280 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
9281 events, don't leave current_inferior pointing at null.
9282
10357975
PA
92832009-11-26 Pedro Alves <pedro@codesourcery.com>
9284
9285 * win32-low.c (LOG): Delete.
9286 (OUTMSG): Output to stderr.
9287 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
9288 on compile time LOG macro.
9289 (win32_wait): Fix debug output.
9290
cf6e3471
PA
92912009-11-26 Pedro Alves <pedro@codesourcery.com>
9292
9293 * win32-low.c (win32_add_one_solib): If the dll name is
9294 "ntdll.dll", prepend the system directory to the dll path.
9295
0c85e18e
MK
92962009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
9297
9298 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
9299
9ac544ce 93002009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 9301 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
9302
9303 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
9304 * configure.ac: Check for __mcoldfire__ and set
9305 gdb_cv_m68k_is_coldfire.
9306 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
9307 reg-cf.o and reg-m68k.o.
9308 * configure: Regenerated.
9309
fd7dd3e6
PA
93102009-11-16 Pedro Alves <pedro@codesourcery.com>
9311
9312 * linux-low.c (linux_remove_process): Add `detaching' parameter.
9313 Pass it to thread_db_free.
9314 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
9315 proper `detaching' argument to linux_remove_process.
9316 * linux-low.h (thread_db_free): Add `detaching' parameter.
9317 * thread-db.c (thread_db_init): Pass false as `detaching' argument
9318 to thread_db_free.
9319 (thread_db_free): Add `detaching' parameter. Only
9320 call td_ta_clear_event if detaching from process.
9321
75aa492e
MK
93222009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
9323
9324 * thread-db.c (thread_db_free): Fix typo.
9325
21e1bee4
PP
93262009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
9327
9328 PR gdb/10838
9329 * thread-db.c (thread_db_free): Call td_ta_clear_event.
9330
8838b45e
NS
93312009-11-03 Nathan Sidwell <nathan@codesourcery.com>
9332
9333 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
9334 with an i686 compiler.
9335 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
9336 needed.
9337 * configure: Rebuilt.
9338
8a35fb51
SL
93392009-10-29 Sandra Loosemore <sandra@codesourcery.com>
9340
9341 PR gdb/10783
9342
9343 * server.c (handle_search_memory_1): Correct read_addr initialization
9344 in loop for searching subsequent chunks.
9345
96f15937
PP
93462009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
9347
9348 * configure.ac: New --with-libthread-db option.
9349 * thread-db.c: Allow direct dependence on libthread_db.
9350 (thread_db_free): Adjust.
9351 * config.in: Regenerate.
9352 * configure: Likewise.
889bf7c5 9353
5f7d1694
PP
93542009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
9355
9356 PR gdb/10757
9357 * thread-db.c (attach_thread): New function.
9358 (maybe_attach_thread): Return success/failure.
9359 (find_new_threads_callback): Adjust.
889bf7c5
PA
9360 (thread_db_find_new_threads): Loop until no new threads.
9361
88e3b899
PA
93622009-10-13 Pedro Alves <pedro@codesourcery.com>
9363
9364 * proc-service.c (ps_lgetregs): Formatting.
9365
cdbfd419
PP
93662009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
9367
9368 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
9369 * configure.ac: Adjust.
9370 * linux-low.h (struct process_info_private): Move members to struct
9371 thread_db.
9372 (thread_db_free, thread_db_handle_monitor_command): New prototype.
9373 * linux-low.c (linux_remove_process): Adjust.
9374 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
9375 * server.c (handle_query): Move code ...
9376 (handle_monitor_command): ... here. New function.
9377 * target.h (struct target_ops): New member.
9378 * thread-db.c (struct thread_db): New.
9379 (libthread_db_search_path): New variable.
9380 (thread_db_create_event, thread_db_enable_reporting)
9381 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
9382 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
9383 (try_thread_db_load_1, dladdr_to_soname): New functions.
9384 (try_thread_db_load, thread_db_load_search): New functions.
9385 (thread_db_init): Search for libthread_db.
9386 (thread_db_free): New function.
9387 (thread_db_handle_monitor_command): Likewise.
9388 * config.in: Regenerate.
9389 * configure: Regenerate.
889bf7c5 9390
4168d2d6
UW
93912009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
9392
9393 * spu-low.c (spu_kill): Wait for inferior to terminate.
9394 Call clear_inferiors.
9395 (spu_detach): Call clear_inferiors.
9396
81ecdfbb
RW
93972009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9398
9399 * aclocal.m4: Regenerate.
9400 * config.in: Likewise.
9401 * configure: Likewise.
9402
0b9ff2c0
UW
94032009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9404
9405 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
9406 (parse_spufs_run): New function.
9407 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
9408 (ppc_breakpoint_at): Handle SPU breakpoints.
9409
efcbbd14
UW
94102009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9411
9412 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
9413 (SPUFS_MAGIC): Define.
9414 (spu_enumerate_spu_ids): New function.
9415 (linux_qxfer_spu): New function.
9416 (linux_target_ops): Install linux_qxfer_spu.
9417
f4d9bade
UW
94182009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9419
9420 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
9421 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
9422 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
9423 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
9424 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
9425 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
9426 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
9427 (init_registers_powerpc_cell32l): Add prototype.
9428 (init_registers_powerpc_cell64l): Likewise.
9429 (ppc_arch_setup): Detect Cell/B.E. architecture.
9430
96e946ca
RW
94312009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9432
9433 * Makefile.in (datarootdir): New variable.
9434
58d6951d
DJ
94352009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
9436
9437 * linux-low.c (linux_write_memory): Update debugging output.
9438 * Makefile.in (clean): Add new descriptions.
9439 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
9440 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
9441 * configure.srv: Add new files for arm*-*-linux*.
9442 * linux-arm-low.c: Add new declarations.
9443 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
9444 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
9445 (HWCAP_VFPv3D16): New.
9446 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
9447 instead of __IWMMXT__.
9448 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
9449 (arm_arch_setup): New.
9450 (target_regsets): Remove #ifdef. Add VFP regset.
9451 (the_low_target): Use arm_arch_setup.
9452
12b42a12
DJ
94532009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
9454
9455 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
9456 the main thread again.
9457
ac8c974e
AR
94582009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
9459
9460 Adding Neutrino gdbserver.
9461 * configure: Regenerated.
9462 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
9463 * configure.srv (i[34567]86-*-nto*): New target.
9464 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
9465 * remote-utils.c [__QNX__]: Include sys/iomgr.h
9466 (nto_comctrl) [__QNX__]: New function.
9467 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
9468
4424e0c3 94692009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
9470
9471 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
9472 srv_tgtobj.
9473
912cf4ba
PA
94742009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
9475 Pedro Alves <pedro@codesourcery.com>
9476
9477 * win32-i386-low.c (i386_get_thread_context): Handle systems that
9478 don't support CONTEXT_EXTENDED_REGISTERS.
9479 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
9480 (the_low_target): Install them.
9481 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
9482 failing with ERROR_PIPE_NOT_CONNECTED.
9483
aa5ca48f
DE
94842009-06-30 Doug Evans <dje@google.com>
9485 Pierre Muller <muller@ics.u-strasbg.fr>
9486
9487 Add h/w watchpoint support to x86-linux, win32-i386.
9488 * Makefile.in (SFILES): Add i386-low.c
9489 (i386_low_h): Define.
9490 (i386-low.o): Add dependencies.
9491 (linux-x86-low.o): Add i386-low.h dependency.
9492 (win32-i386-low.o): Ditto.
9493 * i386-low.c: New file.
9494 * i386-low.h: New file.
9495 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
9496 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
9497 * linux-low.c (linux_add_process): Initialize arch_private.
9498 (linux_remove_process): Free arch_private.
9499 (add_lwp): Initialize arch_private.
9500 (delete_lwp): Free arch_private.
9501 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
9502 provided.
9503 * linux-low.h (process_info_private): New member arch_private.
9504 (lwp_info): New member arch_private.
9505 (linux_target_ops): New members new_process, new_thread,
9506 prepare_to_resume.
9507 (ptid_of): New macro.
9508 * linux-x86-low.c: Include stddef.h, i386-low.h.
9509 (arch_process_info): New struct.
9510 (arch_lwp_info): New struct.
9511 (x86_linux_dr_get, x86_linux_dr_set): New functions.
9512 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
9513 (i386_dr_low_get_status): New function.
9514 (x86_insert_point, x86_remove_point): New functions.
9515 (x86_stopped_by_watchpoint): New function.
9516 (x86_stopped_data_address): New function.
9517 (x86_linux_new_process, x86_linux_new_thread): New functions.
9518 (x86_linux_prepare_to_resume): New function.
9519 (the_low_target): Add entries for insert_point, remove_point,
9520 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
9521 prepare_to_resume.
9522 * server.c (debug_hw_points): New global.
9523 (monitor_show_help): Document set debug-hw-points.
9524 (handle_query): Process "set debug-hw-points".
9525 * server.h (debug_hw_points): Declare.
9526 (paddress): Declare.
9527 * utils.c (NUMCELLS, CELLSIZE): New macros.
9528 (get_sell, xsnprintf, paddress): New functions.
9529 * win32-arm-low.c (the_low_target): Add entries for insert_point,
9530 remove_point, stopped_by_watchpoint, stopped_data_address.
9531 * win32-i386-low.c: Include i386-low.h.
9532 (debug_reg_state): Replaces dr.
9533 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
9534 (i386_dr_low_get_status): New function.
9535 (i386_insert_point, i386_remove_point): New functions.
9536 (i386_stopped_by_watchpoint): New function.
9537 (i386_stopped_data_address): New function.
9538 (i386_initial_stuff): Update.
9539 (get_thread_context,set_thread_context,i386_thread_added): Update.
9540 (the_low_target): Add entries for insert_point,
9541 remove_point, stopped_by_watchpoint, stopped_data_address.
9542 * win32-low.c (win32_insert_watchpoint): New function.
9543 (win32_remove_watchpoint): New function.
9544 (win32_stopped_by_watchpoint): New function.
9545 (win32_stopped_data_address): New function.
9546 (win32_target_ops): Add entries for insert_watchpoint,
9547 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
9548 * win32-low.h (win32_target_ops): New members insert_point,
9549 remove_point, stopped_by_watchpoint, stopped_data_address.
9550
d993e290
PA
95512009-06-25 Pedro Alves <pedro@codesourcery.com>
9552
9553 * server.c (process_serial_event): Re-return unsupported, not
9554 error, if the type isn't recognized. Re-allow supporting only
9555 insert or remove packets. Also call require_running for
9556 breakpoints. Add missing break statement to default case. Tidy.
9557 * target.h (struct target_ops): Rename insert_watchpoint to
9558 insert_point, and remove_watchpoint to remove_point.
9559
9560 * linux-low.h (struct linux_target_ops): Likewise.
9561 * linux-low.c (linux_insert_watchpoint): Rename to ...
9562 (linux_insert_point): ... this. Adjust.
9563 (linux_remove_watchpoint): Rename to ...
9564 (linux_remove_point): ... this. Adjust.
9565 (linux_target_ops): Adjust.
9566 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
9567 (cris_insert_point): ... this.
9568 (cris_remove_watchpoint): Rename to ...
9569 (cris_remove_point): ... this.
9570 (the_low_target): Adjust.
9571
0f54c268
PM
95722009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
9573
9574 * server.c (handle_v_kill): Pass signal_pid to
9575 kill_inferior if multi_process is zero.
9576
c6314022
AR
95772009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
9578
9579 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
9580 * target.h (target_ops): Comment for *_watchpoint to make it clear
9581 the functions can get types '0' and '1'.
9582
4463ce24
AR
95832009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
9584
9585 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
9586 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
9587 * regcache.c (get_regcache): Likewise.
9588 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
9589 * win32-low.c (child_fetch_inferior_registers): Remove check for
9590 regno 0.
9591
cf8fd78b
PA
95922009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
9593 Pedro Alves <pedro@codesourcery.com>
9594
9595 * target.h (struct target_ops) <supports_multi_process>: New
9596 callback.
9597 (target_supports_multi_process): New.
9598 * server.c (handle_query): Even if GDB reports support, only
9599 enable multi-process if the target also supports it. Report
9600 multi-process support only if the target backend supports it.
9601 * linux-low.c (linux_supports_multi_process): New function.
9602 (linux_target_ops): Install it as target_supports_multi_process
9603 callback.
9604
47c0c975
DE
96052009-05-24 Doug Evans <dje@google.com>
9606
e09875d4
DE
9607 Global renaming of find_thread_pid to find_thread_ptid.
9608 * server.h (find_thread_ptid): Renamed from find_thread_pid.
9609 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
9610 All callers updated.
9611
e27d73f6
DE
9612 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
9613 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
9614 directly.
9615
47c0c975
DE
9616 * linux-low.c (get_stop_pc): Print pc if debug_threads.
9617 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
9618 (linux_resume_one_lwp): Ditto.
9619
2acc282a
DE
96202009-05-23 Doug Evans <dje@google.com>
9621
9622 * linux-low.c (linux_resume_one_lwp): Change type of first arg
9623 from struct inferior_list_entry * to struct lwp_info *.
9624 All callers updated.
9625
9f1036c1
DE
96262009-05-13 Doug Evans <dje@google.com>
9627
9628 * linux-x86-low.c: Don't include assert.h.
9629 (x86_siginfo_fixup): Use fatal, not assert.
9630 (x86_arch_setup): Fix comment.
9631
d0722149
DE
96322009-05-12 Doug Evans <dje@google.com>
9633
9634 Biarch support for i386/amd64 gdbserver.
9635 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
9636 Add linux-x86-low.c.
9637 (linux-i386-low.o, linux-x86-64-low.o): Delete.
9638 (linux-x86-low.o): Add.
9639 * linux-x86-64-low.c: Delete.
9640 * linux-i386-low.c: Delete.
9641 * linux-x86-low.c: New file.
9642 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
9643 linux-x86-low.o.
9644 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
9645 linux-x86-low.o.
9646 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
9647 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
9648 (linux_child_pid_to_exec_file): New function.
9649 (elf_64_header_p, elf_64_file_p): New functions.
9650 (siginfo_fixup): New function.
9651 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
9652 give target a chance to convert layout.
9653 * linux-low.h (linux_target_ops): New member siginfo_fixup.
9654 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
9655
fdeb2a12
DE
96562009-05-07 Doug Evans <dje@google.com>
9657
9658 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
9659 (regsets_store_inferior_registers): Ditto.
9660
a6dbe5df
PA
96612009-05-06 Pedro Alves <pedro@codesourcery.com>
9662
9663 PR server/10048
9664
9665 * linux-low.c (must_set_ptrace_flags): Delete.
9666 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
9667 of the global.
9668 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
9669 `lwp->must_set_ptrace_flags' instead.
ba42693b 9670 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
9671 (linux_wait_1): ... not here.
9672
5091eb23
DE
96732009-04-30 Doug Evans <dje@google.com>
9674
9f767825
DE
9675 * inferiors.c (started_inferior_callback): New function.
9676 (attached_inferior_callback): New function.
9677 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
9678 * server.c (print_started_pid, print_attached_pid): New functions.
9679 (detach_or_kill_for_exit): New function.
9680 (main): Call it instead of for_each_inferior (kill_inferior_callback).
9681 * server.h (have_started_inferiors_p): Declare.
9682 (have_attached_inferiors_p): Declare.
9683
5091eb23
DE
9684 * inferiors.c (remove_process): Fix memory leak, free process.
9685 * linux-low.c (linux_remove_process): New function.
9686 (linux_kill): Call it instead of remove_process.
9687 (linux_detach, linux_wait_1): Ditto.
9688
155c8968
PA
96892009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
9690
9691 * configure.srv: Add x86 Windows CE target.
9692
7fe519cb
UW
96932009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
9694
9695 * inferiors.c (get_thread_process): Make global.
9696 * server.h (get_thread_process): Add prototype.
9697 * thread-db.c (find_one_thread): Use get_thread_process
9698 instead of current_process.
9699 (thread_db_get_tls_address): Do not crash if called when
9700 thread layer is not yet initialized.
9701
5472f405
UW
97022009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
9703
9704 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
9705 * spu-low.c (current_tid): Rename to ...
9706 (current_ptid): ... this.
9707 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
9708 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
9709 ptid_get_lwp (current_ptid) instead of current_tid.
9710 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
9711 instead of current_tid. Use find_process_pid to verify pid
9712 argument is valid. Pass proper argument to remove_process.
9713 (spu_thread_alive): Compare current_ptid instead of current_tid.
9714 (spu_resume): Likewise.
9715
55ac2b99
PA
97162009-04-02 Pedro Alves <pedro@codesourcery.com>
9717
9718 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
9719 variable.
9720
95954743
PA
97212009-04-01 Pedro Alves <pedro@codesourcery.com>
9722
9723 Implement the multiprocess extensions, and add linux multiprocess
9724 support.
9725
9726 * server.h (ULONGEST): Declare.
9727 (struct ptid, ptid_t): New.
9728 (minus_one_ptid, null_ptid): Declare.
9729 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
9730 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
9731 (struct inferior_list_entry): Change `id' type from unsigned from
9732 to ptid_t.
9733 (struct sym_cache, struct breakpoint, struct
9734 process_info_private): Forward declare.
9735 (struct process_info): Declare.
9736 (current_process): Declare.
9737 (all_processes): Declare.
9738 (initialize_inferiors): Declare.
9739 (add_thread): Adjust to use ptid_t.
9740 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
9741 (add_process, remove_process, find_thread_pid): Declare.
9742 (find_inferior_id): Adjust to use ptid_t.
9743 (cont_thread, general_thread, step_thread): Change type to ptid_t.
9744 (multi_process): Declare.
9745 (push_event): Adjust to use ptid_t.
9746 (read_ptid, write_ptid): Declare.
9747 (prepare_resume_reply): Adjust to use ptid_t.
9748 (clear_symbol_cache): Declare.
9749 * inferiors.c (all_processes): New.
9750 (null_ptid, minus_one_ptid): New.
9751 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
9752 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
9753 (add_thread): Change unsigned long to ptid. Remove gdb_id
9754 parameter. Adjust.
9755 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
9756 (gdb_id_to_thread): Rename to ...
9757 (find_thread_pid): ... this. Change unsigned long to ptid.
9758 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
9759 (loaded_dll, pull_pid_from_list): Adjust.
9760 (add_process, remove_process, find_process_pid)
9761 (get_thread_process, current_process, initialize_inferiors): New.
9762 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
9763 (struct target_waitstatus) <related_pid>: Ditto.
9764 (struct target_ops) <kill, detach>: Add `pid' argument. Change
9765 return type to int.
9766 (struct target_ops) <join>: Add `pid' argument.
9767 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
9768 (struct target_ops) <wait>: Add `ptid' field. Change return type
9769 to ptid.
9770 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
9771 (mywait): Add `ptid' argument. Change return type to ptid_t.
9772 (target_pid_to_str): Declare.
9773 * target.c (set_desired_inferior): Adjust to use ptids.
9774 (mywait): Add new `ptid' argument. Adjust.
9775 (target_pid_to_str): New.
9776 * mem-break.h (free_all_breakpoints): Declare.
9777 * mem-break.c (breakpoints): Delelete.
9778 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
9779 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
9780 to use per-process breakpoint list.
9781 (free_all_breakpoints): New.
9782 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
9783 (symbol_cache, all_symbols_looked_up): Delete.
9784 (hexchars): New.
9785 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
9786 read_ptid): New.
9787 (prepare_resume_reply): Change ptid argument's type from unsigned
9788 long to ptid_t. Adjust. Implement W;process and X;process.
9789 (free_sym_cache, clear_symbol_cache): New.
9790 (look_up_one_symbol): Adjust to per-process symbol cache. *
9791 * server.c (cont_thread, general_thread, step_thread): Change type
9792 to ptid_t.
9793 (attached): Delete.
9794 (multi_process): New.
9795 (last_ptid): Change type to ptid_t.
9796 (struct vstop_notif) <ptid>: Change type to ptid_t.
9797 (queue_stop_reply, push_event): Change `ptid' argument's type to
9798 ptid_t.
9799 (discard_queued_stop_replies): Add `pid' argument.
9800 (start_inferior): Adjust to use ptids. Adjust to mywait interface
9801 changes. Don't reference the `attached' global.
9802 (attach_inferior): Adjust to mywait interface changes.
9803 (handle_query): Adjust to use ptids. Parse GDB's qSupported
9804 features. Handle and report "multiprocess+". Handle
9805 "qAttached:PID".
9806 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
9807 changes.
9808 (handle_v_kill): New.
9809 (handle_v_stopped): Adjust to use target_pid_to_str.
9810 (handle_v_requests): Allow multiple attaches and runs when
9811 multiprocess extensions are in effect. Handle "vKill".
9812 (myresume): Adjust to use ptids.
9813 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
9814 (handle_status): Adjust to discard_queued_stop_replies interface
9815 change.
9816 (first_thread_of, kill_inferior_callback)
9817 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
9818 (main): Call initialize_inferiors. Adjust to use ptids, killing
9819 and detaching from all inferiors. Handle multiprocess packet
9820 variants.
9821 * linux-low.h: Include gdb_proc_service.h.
9822 (struct process_info_private): New.
9823 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
9824 <lwpid_of>: Use ptid_get_lwp.
9825 (get_lwp_thread): Adjust.
9826 (struct lwp_info): Add `dead' member.
9827 (find_lwp_pid): Declare.
9828 * linux-low.c (thread_db_active): Delete.
9829 (new_inferior): Adjust comment.
9830 (inferior_pid): Delete.
9831 (linux_add_process): New.
9832 (handle_extended_wait): Adjust.
9833 (add_lwp): Change unsigned long to ptid.
9834 (linux_create_inferior): Add process to processes table. Adjust
9835 to use ptids. Don't set new_inferior here.
9836 (linux_attach_lwp): Rename to ...
9837 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
9838 it. Adjust to use ptids.
9839 (linux_attach_lwp): New.
9840 (linux_attach): Add process to processes table. Don't set
9841 new_inferior here.
9842 (struct counter): New.
9843 (second_thread_of_pid_p, last_thread_of_process_p): New.
9844 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
9845 multiple processes.
9846 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
9847 processes. Remove process from process table.
9848 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
9849 to multiple processes.
9850 (any_thread_of): New.
9851 (linux_detach): Add `pid' argument, and handle it. Remove process
9852 from processes table.
9853 (linux_join): Add `pid' argument. Handle it.
9854 (linux_thread_alive): Change unsighed long argument to ptid_t.
9855 Consider dead lwps as not being alive.
9856 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
9857 threads we're not interested in.
9858 (same_lwp, find_lwp_pid): New.
9859 (linux_wait_for_lwp): Change `pid' argument's type from int to
9860 ptid_t. Adjust.
9861 (linux_wait_for_event): Rename to ...
9862 (linux_wait_for_event_1): ... this. Change `pid' argument's type
9863 from int to ptid_t. Adjust.
9864 (linux_wait_for_event): New.
9865 (linux_wait_1): Add `ptid' argument. Change return type to
9866 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
9867 that exit from the process table.
9868 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
9869 Adjust.
9870 (mark_lwp_dead): New.
9871 (wait_for_sigstop): Adjust to use ptids. If a process exits while
9872 stopping all threads, mark its main lwp as dead.
9873 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
9874 ptids.
9875 (fetch_register, usr_store_inferior_registers)
9876 (regsets_fetch_inferior_registers)
9877 (regsets_store_inferior_registers, linux_read_memory)
9878 (linux_write_memory): Inline `inferior_pid'.
9879 (linux_look_up_symbols): Adjust to use per-process
9880 `thread_db_active'.
9881 (linux_request_interrupt): Adjust to use ptids.
9882 (linux_read_auxv): Inline `inferior_pid'.
9883 (initialize_low): Don't reference thread_db_active.
9884 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
9885 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
9886 (ps_getpid): Return the pid of the current inferior.
9887 * thread-db.c (proc_handle, thread_agent): Delete.
9888 (thread_db_create_event, thread_db_enable_reporting): Adjust to
9889 per-process data.
9890 (find_one_thread): Change argument type to ptid_t. Adjust to
9891 per-process data.
9892 (maybe_attach_thread): Adjust to per-process data and ptids.
9893 (thread_db_find_new_threads): Ditto.
9894 (thread_db_init): Ditto.
9895 * spu-low.c (spu_create_inferior, spu_attach): Add process to
9896 processes table. Adjust to use ptids.
9897 (spu_kill, spu_detach): Adjust interface. Remove process from
9898 processes table.
9899 (spu_join, spu_thread_alive): Adjust interface.
9900 (spu_wait): Adjust interface. Remove process from processes
9901 table. Adjust to use ptids.
9902 * win32-low.c (current_inferior_tid): Delete.
9903 (current_inferior_ptid): New.
9904 (debug_event_ptid): New.
9905 (thread_rec): Take a ptid. Adjust.
9906 (child_add_thread): Add `pid' argument. Adjust to use ptids.
9907 (child_delete_thread): Ditto.
9908 (do_initial_child_stuff): Add `attached' argument. Add process to
9909 processes table.
9910 (child_fetch_inferior_registers, child_store_inferior_registers):
9911 Adjust.
9912 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
9913 (win32_attach): Pass 1 to do_initial_child_stuff.
9914 (win32_kill): Adjust interface. Remove process from processes
9915 table.
9916 (win32_detach): Ditto.
9917 (win32_join): Adjust interface.
9918 (win32_thread_alive): Take a ptid.
9919 (win32_resume): Adjust to use ptids.
9920 (get_child_debug_event): Ditto.
9921 (win32_wait): Adjust interface. Remove exiting process from
9922 processes table.
9923
bd99dc85
PA
99242009-04-01 Pedro Alves <pedro@codesourcery.com>
9925
9926 Non-stop mode support.
9927
9928 * server.h (non_stop): Declare.
9929 (gdb_client_data, handler_func): Declare.
9930 (delete_file_handler, add_file_handler, start_event_loop):
9931 Declare.
9932 (handle_serial_event, handle_target_event, push_event)
9933 (putpkt_notif): Declare.
9934 * target.h (enum resume_kind): New.
9935 (struct thread_resume): Replace `step' field by `kind' field.
9936 (TARGET_WNOHANG): Define.
9937 (struct target_ops) <wait>: Add `options' argument.
9938 <supports_non_stop, async, start_non_stop>: New fields.
9939 (target_supports_non_stop, target_async): New.
9940 (start_non_stop): Declare.
9941 (mywait): Add `options' argument.
9942 * target.c (mywait): Add `options' argument. Print child exit
9943 notifications here.
9944 (start_non_stop): New.
9945 * server.c (non_stop, own_buf, mem_buf): New globals.
9946 (struct vstop_notif): New.
9947 (notif_queue): New global.
9948 (queue_stop_reply, push_event, discard_queued_stop_replies)
9949 (send_next_stop_reply): New.
9950 (start_inferior): Adjust to use resume_kind. Adjust to mywait
9951 interface changes.
9952 (attach_inferior): In non-stop mode, don't wait for the target
9953 here.
9954 (handle_general_set): Handle QNonStop.
9955 (handle_query): When handling qC, return the current general
9956 thread, instead of the first thread of the list.
9957 (handle_query): If the backend supports non-stop mode, include
9958 QNonStop+ in the qSupported query response.
9959 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
9960 and non-stop mode.
9961 (handle_v_attach, handle_v_run): Handle non-stop mode.
9962 (handle_v_stopped): New.
9963 (handle_v_requests): Report support for vCont;t. Handle vStopped.
9964 (myresume): Adjust to use resume_kind. Handle non-stop.
9965 (queue_stop_reply_callback): New.
9966 (handle_status): Handle non-stop mode.
9967 (main): Clear non_stop flag on reconnection. Use the event-loop.
9968 Refactor serial protocol handling from here ...
9969 (process_serial_event): ... to this new function. When GDB
9970 selects any thread, select one here. In non-stop mode, wait until
9971 GDB acks all pending events before exiting.
9972 (handle_serial_event, handle_target_event): New.
9973 * remote-utils.c (remote_open): Install remote_desc in the event
9974 loop.
9975 (remote_close): Remove remote_desc from the event loop.
9976 (putpkt_binary): Rename to...
9977 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
9978 (putpkt_binary): New as wrapper around putpkt_binary_1.
9979 (putpkt_notif): New.
9980 (prepare_resume_reply): In non-stop mode, don't change the
9981 general_thread.
9982 * event-loop.c: New.
9983 * Makefile.in (OBJ): Add event-loop.o.
9984 (event-loop.o): New rule.
9985
9986 * linux-low.h (pid_of): Moved here.
9987 (lwpid_of): New.
9988 (get_lwp_thread): Use lwpid_of.
9989 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
9990 * linux-low.c (pid_of): Delete.
9991 (inferior_pid): Use lwpid_of.
9992 (linux_event_pipe): New.
9993 (target_is_async_p): New.
9994 (delete_lwp): New.
9995 (handle_extended_wait): Use lwpid_of.
9996 (add_lwp): Don't set lwpid field.
9997 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
9998 (linux_kill_one_lwp): If killing a running lwp, stop it first.
9999 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
10000 (linux_detach_one_lwp): If detaching from a running lwp, stop it
10001 first. Adjust to linux_wait_for_event interface changes. Use
10002 lwpid_of.
10003 (linux_detach): Don't delete the main lwp here.
10004 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
10005 (status_pending_p): Don't consider explicitly suspended lwps.
10006 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
10007 pointer. Add OPTIONS argument. Change return type to int. Use
10008 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
10009 (linux_wait_for_event): Take an integer pid instead of a lwp_info
10010 pointer. Add status pointer argument. Return a pid instead of a
10011 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
10012 changes. In non-stop mode, don't switch to a random thread.
10013 (linux_wait): Rename to...
10014 (linux_wait_1): ... this. Add target_options argument, and handle
10015 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
10016 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
10017 clean exit and signal exit code. Don't stop all threads in
10018 non-stop mode. In all-stop mode, only stop all threads when
10019 reporting a stop to GDB. Handle explicit thread stop requests.
10020 (async_file_flush, async_file_mark): New.
10021 (linux_wait): New.
10022 (send_sigstop): Use lwpid_of.
10023 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
10024 interface changes. In non-stop mode, don't switch to a random
10025 thread.
10026 (linux_resume_one_lwp): Use lwpid_of.
10027 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
10028 (linux_resume_one_thread): ... this. Handle resume_stop. In
10029 non-stop mode, don't look for pending flag in all threads.
10030 (resume_status_pending_p): Don't consider explicitly suspended
10031 threads.
10032 (my_waitpid): Reimplement. Emulate __WALL.
10033 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
10034 Use lwpid_of.
10035 (sigchld_handler, linux_supports_non_stop, linux_async)
10036 (linux_start_non_stop): New.
10037 (linux_target_ops): Register linux_supports_non_stop, linux_async
10038 and linux_start_non_stop.
10039 (initialize_low): Install SIGCHLD handler.
10040 * thread-db.c (thread_db_create_event, find_one_thread)
10041 (thread_db_get_tls_address): Use lwpid_of.
10042 * win32-low.c (win32_detach): Adjust to use resume_kind.
10043 (win32_wait): Add `options' argument.
10044 * spu-low.c (spu_resume): Adjust to use resume_kind.
10045 (spu_wait): Add `options' argument.
10046
5b1c542e
PA
100472009-04-01 Pedro Alves <pedro@codesourcery.com>
10048
10049 Decouple target code from remote protocol.
10050
10051 * target.h (enum target_waitkind): New.
10052 (struct target_waitstatus): New.
10053 (struct target_ops) <wait>: Return an unsigned long. Take a
10054 target_waitstatus pointer instead of a char pointer.
10055 (mywait): Likewise.
10056 * target.c (mywait): Change prototype to return an unsigned long.
10057 Take a target_waitstatus pointer instead of a char pointer. Adjust.
10058 * server.h (thread_from_wait, old_thread_from_wait): Delete
10059 declarations.
10060 (prepare_resume_reply): Change prototype to take a
10061 target_waitstatus.
10062 * server.c (thread_from_wait, old_thread_from_wait): Delete.
10063 (last_status, last_ptid): New.
10064 (start_inferior): Remove "statusptr" argument. Adjust. Return a
10065 pid instead of a signal.
10066 (attach_inferior): Remove "status" and "signal" parameters.
10067 Adjust.
10068 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
10069 not as an address.
10070 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
10071 (handle_v_requests, myresume): Remove "status" and "signal"
10072 parameters. Adjust.
10073 (handle_status): New.
10074 (main): Delete local `status'. Adjust.
10075 * remote-utils.c: Include target.h.
10076 (prepare_resume_reply): Change prototype to take a
10077 target_waitstatus. Adjust.
10078
10079 * linux-low.c (linux_wait): Adjust to new target_ops->wait
10080 interface.
10081 * spu-low.c (spu_wait): Adjust.
10082 * win32-low.c (enum target_waitkind, struct target_waitstatus):
10083 Delete.
10084 (win32_wait): Adjust.
10085
2bd7c093
PA
100862009-04-01 Pedro Alves <pedro@codesourcery.com>
10087
10088 * target.h (struct thread_resume): Delete leave_stopped member.
10089 (struct target_ops): Add a `n' argument to the `resume' callback.
10090 * server.c (start_inferior): Adjust.
10091 (handle_v_cont, myresume): Adjust.
10092 * linux-low.c (check_removed_breakpoint): Adjust to resume
10093 interface change, and to removed leave_stopped field.
10094 (resume_ptr): Delete.
10095 (struct thread_resume_array): New.
10096 (linux_set_resume_request): Add new `arg' parameter. Adjust to
10097 resume interface change.
10098 (linux_continue_one_thread, linux_queue_one_thread)
10099 (resume_status_pending_p): Check if the resume field is NULL
10100 instead of checking the leave_stopped member.
10101 (linux_resume): Adjust to the target resume interface change.
10102 * spu-low.c (spu_resume): Adjust to the target resume interface
10103 change.
10104 * win32-low.c (win32_detach, win32_resume): Ditto.
10105
c35fafde
PA
101062009-04-01 Pedro Alves <pedro@codesourcery.com>
10107
10108 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
10109 flag.
10110 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
10111 pending.
10112 (linux_continue_one_thread): Only preserve the stepping flag if
10113 there's a pending breakpoint.
10114
0a59d50b
PA
101152009-03-31 Pedro Alves <pedro@codesourcery.com>
10116
10117 * server.c (main): After the inferior having exited, call
10118 remote_close before exiting gdbserver.
10119
f04c6d38
TJB
101202009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
10121
10122 Fix size of FPSCR in Power 7 processors.
10123 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
10124 (PPC_FEATURE_HAS_DFP): New #define.
10125 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
10126 size of the FPSCR.
10127
78e5cee6
PA
101282009-03-23 Pedro Alves <pedro@codesourcery.com>
10129
10130 * server.c (handle_query) Whitespace and formatting.
10131
1b3f6016
PA
101322009-03-22 Pedro Alves <pedro@codesourcery.com>
10133
10134 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
10135 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
10136 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
10137 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
10138 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
10139 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
10140 Makefile.in, configure.ac: Fix whitespace throughout.
10141 * configure: Regenerate.
10142
a07b2135
PA
101432009-03-22 Pedro Alves <pedro@codesourcery.com>
10144
10145 * inferiors.c (find_inferior): Make it safe for the callback
10146 function to delete the currently iterated inferior.
10147
67cc2626
PA
101482009-03-22 Pedro Alves <pedro@codesourcery.com>
10149
10150 * Makefile.in (linuw_low_h): Move higher.
10151 (thread-db.o): Depend on $(linux_low_h).
10152
54a0b537
PA
101532009-03-17 Pedro Alves <pedro@codesourcery.com>
10154
10155 Rename "process" to "lwp" throughout.
10156
10157 * linux-low.c (all_processes): Rename to...
10158 (all_lwps): ... this.
10159 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
10160 (add_process): Rename to ...
10161 (add_lwp): ... this. Adjust.
10162 (linux_create_inferior): Adjust.
10163 (linux_attach_lwp): Adjust.
10164 (linux_attach): Adjust.
10165 (linux_kill_one_process): Rename to ...
10166 (linux_kill_one_lwp): ... this. Adjust.
10167 (linux_kill): Adjust.
10168 (linux_detach_one_process): Rename to ...
10169 (linux_detach_one_lwp): ... this. Adjust.
10170 (linux_detach): Adjust.
10171 (check_removed_breakpoint): Adjust.
10172 (status_pending_p): Adjust.
10173 (linux_wait_for_process): Rename to ...
10174 (linux_wait_for_lwp): ... this. Adjust.
10175 (linux_wait_for_event): Adjust.
10176 (send_sigstop): Adjust.
10177 (wait_for_sigstop): Adjust.
10178 (stop_all_processes): Rename to ...
10179 (stop_all_lwps): ... this.
10180 (linux_resume_one_process): Rename to ...
10181 (linux_resume_one_lwp): ... this. Adjust.
10182 (linux_set_resume_request, linux_continue_one_thread)
10183 (linux_queue_one_thread, resume_status_pending_p)
10184 (usr_store_inferior_registers, regsets_store_inferior_registers)
10185 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
10186 Adjust.
10187 * linux-low.h (get_process): Rename to ...
10188 (get_lwp): ... this. Adjust.
10189 (get_thread_process): Rename to ...
10190 (get_thread_lwp): ... this. Adjust.
10191 (get_process_thread): Rename to ...
10192 (get_lwp_thread): ... this. Adjust.
10193 (struct process_info): Rename to ...
10194 (struct lwp_info): ... this.
10195 (all_processes): Rename to ...
10196 (all_lwps): ... this.
10197 * proc-service.c (ps_lgetregs): Adjust.
10198 * thread-db.c (thread_db_create_event, find_one_thread)
10199 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
10200
0b16c5cf
PA
102012009-03-14 Pedro Alves <pedro@codesourcery.com>
10202
10203 * server.c (handle_query): Handle "qAttached".
10204
32de4b9d
NS
102052009-03-13 Nathan Sidwell <nathan@codesourcery.com>
10206
10207 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
10208 GPLv3, update license URL.
10209
2aecd87f
DE
102102009-03-01 Doug Evans <dje@google.com>
10211
93efd302 10212 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
10213 (server_h): Add gdb_signals.h.
10214 (signals.o): Update.
10215 * server.h (target_signal_from_host,target_signal_to_host_p)
10216 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
10217
86b1f9c5
PM
102182009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
10219
10220 * remote-utils.c (getpkt): Also generate remote-debug
10221 information if noack_mode is set.
10222
4aa995e1
PA
102232009-02-06 Pedro Alves <pedro@codesourcery.com>
10224
10225 * server.c (handle_query): Report qXfer:siginfo:read and
10226 qXfer:siginfo:write as supported and handle them.
10227 * target.h (struct target_ops) <qxfer_siginfo>: New field.
10228 * linux-low.c (linux_xfer_siginfo): New.
10229 (linux_target_ops): Set it.
10230
62709adf
PA
102312009-01-26 Pedro Alves <pedro@codesourcery.com>
10232
10233 * server.c (gdbserver_usage): Mention --remote-debug.
10234 (main): Accept '--remote-debug' switch.
10235
aef93bd7
DE
102362009-01-18 Doug Evans <dje@google.com>
10237
10238 * regcache.c (new_register_cache): No need to check result of xcalloc.
10239 * server.c (handle_search_memory): Back out calls to xmalloc,
10240 result is checked and error is returned to user upon failure.
10241 (handle_query): Ditto. Add more checks for result of malloc.
10242 (handle_v_cont): Check result of malloc, report error back to
10243 user upon failure.
10244 (handle_v_run): Ditto. Call freeargv.
10245 * server.h (freeargv): Declare.
10246 * utils.c (freeargv): New fn.
10247
54363045
DE
102482009-01-15 Doug Evans <dje@google.com>
10249
f626972c
DE
10250 * gdbreplay.c (perror_with_name): Make arg const char *.
10251 * server.h (target_signal_to_name): Make return type const char *.
0842e787 10252 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 10253 * utils.c (perror_with_name): Make arg const char *.
54363045 10254
18aae699
PA
102552009-01-14 Pedro Alves <pedro@codesourcery.com>
10256
10257 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
10258 when handling a EXIT_PROCESS_DEBUG_EVENT.
10259
ff703abe
JB
102602009-01-06 Joel Brobecker <brobecker@adacore.com>
10261
10262 * gdbreplay.c (gdbreplay_version): Update copyright year.
10263 * server.c (gdbserver_version): Likewise.
10264
f21cc1a2 102652009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
10266
10267 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 10268 (handle_extended_wait): Improve comment.
0e21c1ec 10269
bca929d3
DE
102702008-12-13 Doug Evans <dje@google.com>
10271
10272 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
10273 * server.h (ATTR_MALLOC): New macro.
10274 (xmalloc,xcalloc,xstrdup): Declare.
10275 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
10276 * inferiors.c: Ditto.
10277 * linux-low.c: Ditto.
10278 * mem-break.c: Ditto.
10279 * regcache.c: Ditto.
10280 * remote-utils.c: Ditto.
10281 * server.c: Ditto.
10282 * target.c: Ditto.
10283 * win32-low.c: Ditto.
10284
97438e3f
DE
102852008-12-12 Doug Evans <dje@google.com>
10286
896c7fbb
DE
10287 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
10288 in debugging printf.
10289
97438e3f
DE
10290 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
10291
e3b886f8
DE
102922008-12-09 Doug Evans <dje@google.com>
10293
10294 * linux-low.h (struct process_info): Delete member tid, unused.
10295 * thread-db.c (find_one_thread): Update.
10296 (maybe_attach_thread): Update.
10297
07e059b5
VP
102982008-12-02 Pedro Alves <pedro@codesourcery.com>
10299
889bf7c5
PA
10300 * target.h (struct target_ops): Add qxfer_osdata member.
10301 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
10302 and dirent.h.
10303 (linux_qxfer_osdata): New functions.
10304 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
10305 callback.
10306 * server.c (handle_query): Handle "qXfer:osdata:read:".
10307 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
10308 (buffer_xml_printf): New functions.
10309 * server.h (struct buffer): New.
10310 (buffer_grow_str, buffer_grow_str0): New macros.
10311 (buffer_grow, buffer_free, buffer_init, buffer_finish)
10312 (buffer_xml_printf): Declare.
07e059b5 10313
4cab47ab
DE
103142008-11-24 Doug Evans <dje@google.com>
10315
10316 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
10317
f142445f
DJ
103182008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
10319
10320 * server.c (handle_v_run): Always use the supplied argument list.
10321
d0107bb6 103222008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 10323
d0107bb6
BW
10324 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
10325 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 10326
2c4ad781
TJB
103272008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
10328
10329 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
10330 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
10331 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
10332 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
10333 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
10334 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
10335 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
10336 XML target descriptions.
10337 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
10338 when inferior is running on an ISA 2.05 or later processor. Add
10339 special case to return offset for full 64-bit slot of FPSCR when
10340 in 32-bits.
10341
dfb64f85
DJ
103422008-11-14 Daniel Gutson <dgutson@codesourcery.com>
10343
10344 * Makefile.in (SFILES, clean): Added sparc64 files.
10345 (reg-sparc64.o, reg-sparc64.c): New.
10346 * configure.srv (sparc*-*-linux*): New configuration.
10347 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
10348 syscall arguments for SPARC.
10349 (regsets_store_inferior_registers): Likewise.
10350 * linux-sparc-low.c: New file.
10351
66b6e1dd
DE
103522008-10-21 Doug Evans <dje@google.com>
10353
10354 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
10355 (READLINE_DIR,READLINE_DEP): Delete.
10356 (INTERNAL_CFLAGS): Update.
10357 (LINTFLAGS): Update.
10358
9b710a42
PA
103592008-10-10 Pedro Alves <pedro@codesourcery.com>
10360
10361 * server.c (handle_v_run): If GDB didn't specify an argv, use the
10362 whole argv from the last run, not just argv[0].
10363
5822d809
PA
103642008-09-08 Pedro Alves <pedro@codesourcery.com>
10365
10366 * regcache.c (new_register_cache): Return NULL if the register
10367 cache size isn't known yet.
10368 (free_register_cache): Avoid dereferencing a NULL regcache.
10369
74aac56f
DJ
103702008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
10371
10372 * configure.srv: Merge MIPS and MIPS64.
10373
400b20f5
MR
103742008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
10375
10376 * Makefile.in (uninstall): Apply $(EXEEXT) too.
10377
677c5bb1
LM
103782008-08-18 Luis Machado <luisgpm@br.ibm.com>
10379
10380 * Makefile.in: Add required vsx dependencies.
10381
10382 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
10383 Declare init_registers_powerpc_vsx32l.
10384 Declare init_registers_powerpc_vsx64l.
10385 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
10386 (ppc_arch_setup): Check for VSX in hwcap.
10387 (ppc_fill_vsxregset): New function.
10388 (ppc_store_vsxregset): New function.
10389 Add new VSX entry in regset_info target_regsets.
10390
10391 * configure.srv: Add new VSX dependencies.
10392
a6f3e723
SL
103932008-08-12 Pedro Alves <pedro@codesourcery.com>
10394
10395 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
10396 (remote_open): Set or clear transport_is_reliable.
10397 (putpkt_binary): Don't expect acks in noack mode.
10398 (getpkt): Don't send ack/nac in noack mode.
10399 * server.c (handle_general_set): Handle QStartNoAckMode.
10400 (handle_query): If connected by tcp pass QStartNoAckMode+ in
10401 qSupported.
10402 (main): Reset noack_mode on every connection.
10403 * server.h (noack_mode): Declare.
10404
a417dc56
RW
104052008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
10406
10407 * Makefile.in (GDBREPLAY_OBS): New variable.
10408 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
10409
3221518c
UW
104102008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
10411 Daniel Jacobowitz <dan@codesourcery.com>
10412
10413 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
10414 (usr_store_inferior_registers): Likewise.
10415 (regsets_store_inferior_registers): Likewise.
10416
ec56be1b
PA
104172008-07-31 Rolf Jansen <rj@surtec.com>
10418 Pedro Alves <pedro@codesourcery.com>
10419
10420 * configure.ac: Check for memmem declaration.
10421 * server.c [HAVE_MALLOC_H]: Include malloc.h.
10422 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
10423 (disable_packet_qfThreadInfo): Unconditionally compile.
10424 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
10425 * configure, config.in: Regenerate.
10426
2fe5e3ff
DE
104272008-07-28 Doug Kwan <dougkwan@google.com>
10428
10429 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
10430 (linux_write_memory): Remove declaration of errno.
10431
836acd6d
UW
104322008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
10433
10434 * linux-low.c (handle_extended_wait): Do not use "status"
10435 variable uninitialized.
10436
aeba519e
PA
104372008-07-07 Pedro Alves <pedro@codesourcery.com>
10438
10439 * server.c (handle_v_attach): Inhibit reporting dll changes.
10440
db42f210
PA
104412008-06-27 Pedro Alves <pedro@codesourcery.com>
10442
10443 * remote-utils.c (prepare_resume_reply): If requested, don't
10444 output "thread:TID" in the T stop reply.
10445
10446 * server.c (disable_packet_vCont, disable_packet_Tthread)
10447 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
10448 (handle_query): If requested, disable support for qC, qfThreadInfo
10449 and qsThreadInfo.
10450 (handle_v_requests): If requested, disable support for vCont.
10451 (gdbserver_show_disableable): New.
10452 (main): Handle --disable-packet and --disable-packet=LIST.
10453
10454 * server.h (disable_packet_vCont, disable_packet_Tthread)
10455 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
10456
8e4c5421
CD
104572008-06-20 Carlos O'Donell <carlos@codesourcery.com>
10458
10459 * server.c (gdbserver_usage): Mention --version.
10460
6e23a804
DJ
104612008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
10462
10463 * Makefile.in (gdbreplay.o): New rule.
10464
90aa6a40
JM
104652008-06-06 Joseph Myers <joseph@codesourcery.com>
10466
10467 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
10468 message, not gdbserver.
10469
c16158bc 104702008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
10471 Nathan Sidwell <nathan@codesourcery.com>
10472 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
10473
10474 * acinclude.m4: Include ../../config/acx.m4.
10475 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
10476 * configure, config.in: Regenerate.
10477 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
10478 * server.c (gdbserver_version): Print PKGVERSION.
10479 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
10480 (main): Adjust gdbserver_usage calls.
10481 * gdbreplay.c (version, host_name): Add declarations.
10482 (gdbreplay_version, gdbreplay_usage): New.
10483 (main): Accept --version and --help options.
10484
aeb75bf5
DJ
104852008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
10486
10487 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
10488 (arm_breakpoint_at): Handle Thumb.
10489 (the_low_target): Add comment.
10490
76b233dd
UW
104912008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
10492
10493 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
10494
08388c79
DE
104952008-05-09 Doug Evans <dje@google.com>
10496
a3c83fae
DE
10497 * server.h (decode_search_memory_packet): Declare.
10498 * remote-utils.c (decode_search_memory_packet): New fn.
10499 * server.c (handle_search_memory_1): New fn.
08388c79
DE
10500 (handle_search_memory): New fn.
10501 (handle_query): Process qSearch:memory packets.
10502
bb9c3d36
UW
105032008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
10504
10505 * regcache.c (registers_length): Remove.
10506 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
10507 full register packet.
10508 * regcache.h (registers_length): Remove prototype.
10509 * server.h (PBUFSIZ): Define to 16384.
10510
7284e1be
UW
105112008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
10512
10513 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
10514 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
10515 powerpc-64l.o, and powerpc-altivec64l.o.
10516 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
10517 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
10518 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
10519 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
10520 rs6000/power-linux.xml, and rs6000/power64-linux.xml
10521 to srv_xmlfiles.
10522
10523 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
10524 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
10525 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
10526 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
10527 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
10528 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
10529 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
10530 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
10531 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
10532 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
10533 (clean): Update.
10534
10535 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
10536 (init_registers_powerpc_32l): ... this new prototype.
10537 (init_registers_powerpc_32): Remove, replace by ...
10538 (init_registers_powerpc_altivec32l): ... this new prototype.
10539 (init_registers_powerpc_e500): Remove, replace by ...
10540 (init_registers_powerpc_e500l): ... this new prototype.
10541 (init_registers_ppc64): Remove, replace by ...
10542 (init_registers_powerpc_64l): ... this new prototype.
10543 (init_registers_powerpc_64): Remove, replace by ...
10544 (init_registers_powerpc_altivec64l): ... this new prototype.
10545 (ppc_num_regs): Set to 73.
10546 (PT_ORIG_R3, PT_TRAP): Define if necessary.
10547 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
10548 (ppc_cannot_store_register): Handle orig_r3 and trap.
10549 (ppc_arch_setup): Update init_registers_... calls.
10550 (ppc_fill_gregset): Handle orig_r3 and trap.
10551
10552 * inferiors.c (clear_inferiors): Reset current_inferior.
10553
fdc59709
PB
105542008-04-23 Paolo Bonzini <bonzini@gnu.org>
10555
889bf7c5
PA
10556 * acinclude.m4: Add override.m4.
10557 * configure: Regenerate.
fdc59709 10558
c9b2f845
UW
105592008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
10560
10561 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
10562 initial call to init_register_ppc64.
10563
550512b8
UW
105642008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
10565
43aaf8b6
PA
10566 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
10567 single powerpc*-*-linux* case.
550512b8
UW
10568 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
10569
b6430ec3
UW
105702008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
10571
10572 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 10573 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
10574 from reg_xmlfiles.
10575 * linux-ppc-low.c: Include <elf.h>.
10576 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
10577 (ppc_hwcap): New global variable.
10578 (ppc_regmap): Remove __SPE__ #ifdef sections.
10579 (ppc_regmap_e500): New global variable.
10580 (ppc_cannot_store_register): Update __SPE__ special case.
10581 (ppc_get_hwcap): New function.
10582 (ppc_arch_setup): Use it to determine whether inferior supports
10583 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
10584 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
10585 Do not access registers if target does not support AltiVec.
10586 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
10587 Do not access registers if target does not support SPE.
10588 (target_regsets): Unconditionally include AltiVec and SPE regsets.
10589
52fa2412
UW
105902008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
10591
10592 * linux-low.c (disabled_regsets, num_regsets): New.
10593 (use_regsets_p): Delete.
10594 (linux_wait_for_process): Clear disabled_regsets.
10595 (regsets_fetch_inferior_registers): Check and set it.
10596 (regsets_store_inferior_registers): Likewise.
10597 (linux_fetch_registers, linux_store_registers): Do not use
10598 use_regsets_p.
10599 (initialize_low): Allocate disabled_regsets.
10600
e28b3332
DJ
106012008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
10602
10603 * Makefile.in (LIBOBJS): New.
10604 (OBS): Use LIBOBJS.
10605 (memmem.o): New rule.
10606 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
10607 * configure: Regenerated.
10608
4536995d
UW
106092008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
10610
10611 * server.c (handle_query): Never return "unsupported" for
10612 qXfer:features:read queries.
10613
221c031f
UW
106142008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
10615
10616 * server.c (get_features_xml): Fix inverted condition.
10617 (handle_query): Always support qXfer:feature:read.
10618
ccd213ac
DJ
106192008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
10620
10621 * server.c (wrapper_argv): New.
10622 (start_inferior): Handle wrapper_argv. If set, expect an extra
10623 trap.
10624 (gdbserver_usage): Document --wrapper.
10625 (main): Parse --wrapper.
10626
6fe305f7
UW
106272008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10628
10629 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
10630 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
10631 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
10632 (ppc_set_pc): Likewise.
10633 (ppc_arch_setup): New function.
10634 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
10635 of collect_register.
889bf7c5 10636 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 10637
5b0a002e
UW
106382008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10639
10640 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
10641 instead of linux-ppc64-low.o.
10642 * linux-ppc64-low.c: Remove file.
10643 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
10644 (linux-ppc64-low.o): Remove rule.
10645
10646 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
10647 (init_registers_powerpc_64): Likewise.
10648 (ppc_regmap): Conditionally define depending on __powerpc64__.
10649 (ppc_cannot_store_register): Do not special-case "fpscr" when
10650 compiled on __powerpc64__.
10651 (ppc_collect_ptrace_register): New function.
10652 (ppc_supply_ptrace_register): New function.
10653 (ppc_breakpoint): Change type to "unsigned int".
10654 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
10655 (the_low_target): Conditionally provide initializers for the
889bf7c5 10656 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
10657 collect_ptrace_register and supply_ptrace_register members.
10658
9b4b61c8
UW
106592008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10660
10661 * regcache.h (gdbserver_xmltarget): Add extern declaration.
10662 * server.c (gdbserver_xmltarget): Define.
10663 (get_features_xml): Use it to replace "target.xml" and arch_string.
10664
10665 * configure.srv: Remove srv_xmltarget. Add XML files that were
10666 mentioned there to srv_xmlfiles instead. Remove conditional tests
10667 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
10668 srv_xmlfiles and srv_regobj to include all possible choices.
10669 * configure.ac (srv_xmltarget): Remove.
10670 (srv_xmlfiles): Do not add "target.xml".
10671 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
10672 checks for supplementary target information.
10673 * configure: Regenerate.
10674 * Makefile.in (XML_TARGET): Remove.
10675 (target.xml): Remove rule.
10676 (clean): Do not clean up target.xml.
10677 (.PRECIOUS): Do not mention target.xml.
10678
10679 * target.h (struct target_ops): Remove arch_string member.
10680 * linux-low.c (linux_arch_string): Remove.
10681 (linux_target_ops): Remove arch_string initializer.
10682 * linux-low.h (struct linux_target_ops): Remove arch_string member.
10683 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
10684 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
10685 * spu-low.c (spu_arch_string): Remove.
10686 (spu_target_ops): Remove arch_string initializer.
10687 * win32-low.c (win32_arch_string): Remove.
10688 (win32_target_ops): Remove arch_string initializer.
10689 * win32-low.h (struct win32_target_ops): Remove arch_string member.
10690 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
10691 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
10692
ee1a7ae4
UW
106932008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
10694
10695 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
10696 by collect_ptrace_register and supply_ptrace_register hooks.
10697 * linux-low.c (fetch_register): Use supply_ptrace_register callback
10698 instead of checking for the_low_target.left_pad_xfer.
10699 (usr_store_inferior_registers): Use collect_ptrace_register callback
10700 instead of checking for the_low_target.left_pad_xfer.
10701
10702 * linux-s390-low.c (s390_collect_ptrace_register): New function.
10703 (s390_supply_ptrace_register): Likewise.
10704 (s390_fill_gregset): Call s390_collect_ptrace_register.
10705 (the_low_target): Update.
10706
10707 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
10708 (ppc_supply_ptrace_register): Likewise.
10709 (the_low_target): Update.
10710
10711 * linux-i386-low.c (the_low_target): Update.
10712 * linux-x86-64-low.c (the_low_target): Update.
10713
d61ddec4
UW
107142008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
10715
10716 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
10717 reg-s390.o and reg-s390x.o.
10718
10719 * linux-low.c (new_inferior): New global variable.
10720 (linux_create_inferior, linux_attach): Set it.
10721 (linux_wait_for_process): Call the_low_target.arch_setup after the
10722 target has stopped for the first time.
10723 (initialize_low): Do not call the_low_target.arch_setup.
10724
10725 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
10726 (s390_set_pc): Likewise.
10727 (s390_arch_setup): New function.
10728 (the_low_target): Use s390_arch_setup as arch_setup routine.
10729
10730 * regcache.c (realloc_register_cache): New function.
10731 (set_register_cache): Call it for each existing regcache.
10732
d05b4ac3
UW
107332008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
10734
10735 * server.h (init_registers): Remove prototype.
10736
10737 * linux-low.h (struct linux_target_ops): Add arch_setup field.
10738 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
10739 instead of init_registers ().
10740 * linux-arm-low.c (init_registers_arm): Add prototype.
10741 (init_registers_arm_with_iwmmxt): Likewise.
10742 (the_low_target): Add initializer for arch_setup field.
10743 * linux-cris-low.c (init_registers_cris): Add prototype.
10744 (the_low_target): Add initializer for arch_setup field.
10745 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
10746 (the_low_target): Add initializer for arch_setup field.
10747 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
10748 (the_low_target): Add initializer for arch_setup field.
10749 * linux-ia64-low.c (init_registers_ia64): Add prototype.
10750 (the_low_target): Add initializer for arch_setup field.
10751 * linux-m32r-low.c (init_registers_m32r): Add prototype.
10752 (the_low_target): Add initializer for arch_setup field.
10753 * linux-m68k-low.c (init_registers_m68k): Add prototype.
10754 (the_low_target): Add initializer for arch_setup field.
10755 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
10756 (init_registers_mips64_linux): Likewise.
10757 (the_low_target): Add initializer for arch_setup field.
10758 * linux-ppc-low.c (init_registers_ppc): Add prototype.
10759 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
10760 (the_low_target): Add initializer for arch_setup field.
10761 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
10762 (init_registers_powerpc_64): Likewise.
10763 (the_low_target): Add initializer for arch_setup field.
10764 * linux-s390-low.c (init_registers_s390): Add prototype.
10765 (init_registers_s390x): Likewise.
10766 (the_low_target): Add initializer for arch_setup field.
10767 * linux-sh-low.c (init_registers_sh): Add prototype.
10768 (the_low_target): Add initializer for arch_setup field.
10769 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
10770 (the_low_target): Add initializer for arch_setup field.
10771 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
10772 (the_low_target): Add initializer for arch_setup field.
10773
10774 * win32-low.h (struct win32_target_ops): Add arch_setup field.
10775 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
10776 instead of init_registers ().
10777 * win32-arm-low.c (init_registers_arm): Add prototype.
10778 (the_low_target): Add initializer for arch_setup field.
10779 * win32-i386-low.c (init_registers_i386): Add prototype.
10780 (the_low_target): Add initializer for arch_setup field.
10781
10782 * spu-low.c (init_registers_spu): Add prototype.
10783 (initialize_low): Call initialie_registers_spu () instead of
10784 initialize_registers ().
10785
fd96d250
PA
107862008-02-19 Pedro Alves <pedro@codesourcery.com>
10787
10788 * server.c (handle_v_requests): When handling the vRun and vAttach
10789 packets, if already debugging a process, don't kill it. Return an
10790 error instead.
10791
d41b6bb4
DJ
107922008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
10793
10794 * server.c (handle_query): Correct length check.
10795
5ac588cf
PA
107962008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
10797
10798 * win32-low.c (do_initial_child_stuff): Add process handle
10799 parameter. Set current_process_handle and current_process_id from the
10800 parameters. Clear globals.
10801 (win32_create_inferior): Don't set current_process_handle and
10802 current_process_id here. Instead pass them on the call to
10803 do_initial_child_stuff.
10804 (win32_attach): Likewise.
10805 (win32_clear_inferiors): New.
10806 (win32_kill): Don't close the current process handle or the
10807 current thread handle here. Instead call win32_clear_inferiors.
10808 (win32_detach): Don't open a new handle to the process. Call
10809 win32_clear_inferiors.
10810 (win32_join): Don't rely on current_process_handle; open a new
10811 handle using the process id.
10812 (win32_wait): Call win32_clear_inferiors when the inferior process
10813 has exited.
10814
ecd7ecbc
DJ
108152008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
10816
10817 * server.c (monitor_show_help): Add "exit".
10818
1525d545
MG
108192008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
10820
ecd7ecbc 10821 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
10822 (clean): Add reg-xtensa.c.
10823 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
10824 * configure.srv (xtensa*-*-linux*) New target.
10825 * linux-xtensa-low.c: New.
10826 * xtensa-xtregs.c: New.
1525d545 10827
59a016f0
PA
108282008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
10829
10830 * hostio.c: Don't include errno.h.
10831 (errno_to_fileio_errno): Move to hostio-errno.
10832 * hostio.c: (hostio_error): Remove the error parameter. Defer the
10833 error number outputting to the target->hostio_last_error callback.
10834 (hostio_packet_error): Use FILEIO_EINVAL directly.
10835 (handle_open, handle_pread, hostio_error, handle_unlink): Update
10836 calls to hostio_error.
10837 * hostio-errno.c: New.
10838 * server.h (hostio_last_error_from_errno): Declare.
10839 * target.h (target_ops): Add hostio_last_error member.
10840 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
10841 as hostio_last_error handler.
889bf7c5 10842 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
10843 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
10844 (wince_hostio_last_error): New functions.
10845 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
10846 as hostio_last_error handler.
10847 (win32_target_ops) [!_WIN32_WCE]: Register
10848 hostio_last_error_from_errno as hostio_last_error handler.
10849 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
10850 (hostio-errno.o): New rule.
10851 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
10852 * configure.srv (srv_hostio_err_objs): New variable. Default to
10853 hostio-errno.o.
10854 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
10855 * configure: Regenerate.
10856
2d717e4f
DJ
108572008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
10858
10859 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
10860 (linux_kill, linux_detach): Clean up the process list.
10861 * remote-utils.c (remote_open): Improve port number parsing.
10862 (putpkt_binary, input_interrupt): Only send interrupts if the target
10863 is running.
10864 * server.c (extended_protocol): Make static.
10865 (attached): Define earlier.
10866 (exit_requested, response_needed, program_argv): New variables.
10867 (target_running): New.
10868 (start_inferior): Clear attached here.
10869 (attach_inferior): Set attached here.
10870 (require_running): Define.
10871 (handle_query): Use require_running and target_running. Implement
10872 "monitor exit".
10873 (handle_v_attach, handle_v_run): New.
10874 (handle_v_requests): Use require_running. Handle vAttach and vRun.
10875 (gdbserver_usage): Update.
10876 (main): Redo argument parsing. Handle --debug and --multi. Handle
10877 --attach along with other options or after the port. Save
10878 program_argv. Support no initial program. Resynchronize
10879 communication with GDB after an error. Handle "monitor exit".
10880 Use require_running and target_running. Always allow the extended
10881 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
10882 restart in extended mode.
10883 * README: Refer to the GDB manual. Update --attach usage.
10884
7407e2de
AS
108852007-12-20 Andreas Schwab <schwab@suse.de>
10886
10887 * linux-low.c (STACK_SIZE): Define.
10888 (linux_tracefork_child): Use it. Use __clone2 on ia64.
10889 (linux_test_for_tracefork): Likewise.
10890
b65d95c5
DJ
108912007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
10892
10893 * linux-low.c (linux_wait_for_event): Update messages. Do not
10894 reinsert auto-delete breakpoints.
10895 * mem-break.c (struct breakpoint): Change return type of handler to
10896 int.
10897 (set_breakpoint_at): Update handler type.
10898 (reinsert_breakpoint_handler): Return 1 instead of calling
10899 delete_breakpoint.
10900 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
10901 setting a new one.
10902 (check_breakpoints): Delete auto-delete breakpoints and return 2.
10903 * mem-break.h (set_breakpoint_at): Update handler type.
10904 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
10905 * win32-low.c (auto_delete_breakpoint): New.
10906 (get_child_debug_event): Use it.
10907
4e799345
DJ
109082007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
10909
10910 * configure.ac: Check for pread and pwrite.
10911 * hostio.c (handle_pread): Fall back to lseek and read.
10912 (handle_pwrite): Fall back to lseek and write.
10913 * config.in, configure: Regenerated.
10914
27524b67
DJ
109152007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
10916
10917 * server.c (myresume): Add own_buf argument.
10918 (main): Update calls.
10919
a20d5e98
DJ
109202007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
10921
10922 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
10923 * remote-utils.c (remote_open): Do not call disable_async_io.
10924 (block_async_io): Delete.
10925 (unblock_async_io): Make static.
10926 (initialize_async_io): New.
10927 * server.c (handle_v_cont): Handle async I/O here.
10928 (myresume): Likewise. Move other common resume tasks here...
10929 (main): ... from here. Call initialize_async_io. Disable async
10930 I/O before the main loop.
10931 * server.h (initialize_async_io): Declare.
10932 (block_async_io, unblock_async_io): Delete prototypes.
10933 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
10934
b79d787e
DJ
109352007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
10936
10937 * remote-utils.c (readchar): Allow binary data in received messages.
10938
d97903b2
PA
109392007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10940
10941 * win32-low.c (attaching): New global.
10942 (win32_create_inferior): Clear the `attaching' global.
10943 (win32_attach): Set the `attaching' global.
10944 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
10945 attaching. Only set a breakpoint at the entry point if not
10946 attaching.
10947
311de423
PA
109482007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10949
10950 * server.c (main): Don't report dll events on the initial
10951 connection on attaches.
10952
6c2d16d2
PA
109532007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10954
10955 * server.c (main): Relax numerical bases supported for the pid of
10956 the --attach command line argument.
10957
5ca906e6
PA
109582007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10959
10960 * win32-low.c (win32_attach): Call OpenProcess before
10961 DebugActiveProcess, not after. Add last error output to error
10962 call.
10963
9c6c8194
PA
109642007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10965
10966 * win32-low.c (win32_get_thread_context)
10967 (win32_set_thread_context): New functions.
10968 (thread_rec): Use win32_get_thread_context.
10969 (continue_one_thread, win32_resume): Use win32_set_thread_context.
10970 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
10971 field.
10972
4d5d1aaa
PA
109732007-12-03 Leo Zayas
10974 Pedro Alves <pedro_alves@portugalmail.pt>
10975
10976 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
10977 global variables.
10978 (child_add_thread): Minor cleanup.
10979 (child_continue): Resume artificially suspended threads before
10980 calling ContinueDebugEvent.
10981 (suspend_one_thread): New.
10982 (fake_breakpoint_event): New.
10983 (get_child_debug_event): Change return type to int. Check here if
10984 gdb sent an interrupt request. If a soft interrupt was requested,
10985 fake a breakpoint event. Return 0 if there is no event to handle,
10986 and 1 otherwise.
10987 (win32_wait): Don't check here if gdb sent an interrupt request.
10988 Ensure there is a valid event to handle.
10989 (win32_request_interrupt): Add soft interruption method as last
10990 resort.
10991
c436e841
PA
109922007-12-03 Leo Zayas
10993 Pedro Alves <pedro_alves@portugalmail.pt>
10994
10995 * win32-low.h (win32_thread_info): Add descriptions to the
10996 structure members. Replace `suspend_count' counter by a
10997 `suspended' flag.
10998 * win32-low.c (thread_rec): Update condition of when to get the
10999 context from the inferior. Rely on ContextFlags being set if it
11000 has already been retrieved. Only suspend the inferior thread if
11001 we haven't already. Warn if that fails.
11002 (continue_one_thread): s/suspend_count/suspended/. Only call
11003 ResumeThread once. Warn if that fails.
11004
e7b5fa67
PA
110052007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
11006
11007 * win32-low.c (win32_wait): Don't read from the inferior when it
11008 has already exited.
11009
a385171d
PA
110102007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
11011
11012 * Makefile.in (win32_low_h): New variable.
11013 (win32-low.o): Add dependency on $(win32_low_h).
11014 (win32-arm-low.o, win32-i386-low.o): New rules.
11015
f80c84b3
DJ
110162007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
11017
11018 * hostio.c: Correct copyright year.
11019
a6b151f1
DJ
110202007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
11021
11022 * Makefile.in (OBS): Add hostio.o.
11023 (hostio.o): New rule.
11024 * server.h (handle_vFile): Declare.
11025 * hostio.c: New file.
11026 * server.c (handle_v_requests): Take packet_len and new_packet_len
11027 for binary packets. Call handle_vFile.
11028 (main): Update call to handle_v_requests.
11029
f9387fc3
DJ
110302007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
11031
11032 * linux-low.c: Include <sched.h>.
11033
51c2684e
DJ
110342007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
11035
11036 * linux-low.c (linux_tracefork_grandchild): New.
11037 (linux_tracefork_child): Use clone.
11038 (linux_test_for_tracefork): Use clone; allocate and free a stack.
11039
75f83163
JB
110402007-10-31 Joel Brobecker <brobecker@adacore.com>
11041
11042 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
11043
da5898ce
DJ
110442007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
11045
11046 * linux-low.c (handle_extended_wait): Handle unexpected signals.
11047
24a09b5f
DJ
110482007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
11049
11050 * inferiors.c (change_inferior_id): Delete.
11051 (add_pid_to_list, pull_pid_from_list): New.
11052 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
11053 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
11054 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
11055 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
11056 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
11057 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
11058 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
11059 (using_threads): Always set to 1.
11060 (handle_extended_wait): New.
11061 (add_process): Do not set TID.
11062 (linux_create_inferior): Set must_set_ptrace_flags.
11063 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
11064 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
11065 (linux_thread_alive): Rename TID argument to LWPID.
11066 (linux_wait_for_process): Handle unknown processes. Do not use TID.
11067 (linux_wait_for_event): Do not use TID or check using_threads. Update
11068 call to dead_thread_notify. Call handle_extended_wait.
11069 (linux_create_inferior): Use PTRACE_SETOPTIONS.
11070 (send_sigstop): Delete sigstop_sent.
11071 (wait_for_sigstop): Avoid TID.
11072 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
11073 (linux_test_for_tracefork): New.
11074 (linux_lookup_signals): Use thread_db_active and
11075 linux_supports_tracefork_flag.
11076 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
11077 * linux-low.h (get_process_thread): Avoid TID.
11078 (struct process_ifo): Move thread_known and tid to the end. Remove
11079 sigstop_sent.
11080 (linux_attach_lwp, thread_db_init): Update prototypes.
11081 * server.h (change_inferior_id): Delete prototype.
11082 (add_pid_to_list, pull_pid_from_list): New prototypes.
11083 * thread-db.c (thread_db_use_events): New.
11084 (find_first_thread): Rename to...
11085 (find_one_thread): ...this. Update callers and messages. Do not
11086 call fatal. Check thread_db_use_events. Do not call
11087 change_inferior_id or new_thread_notify.
11088 (maybe_attach_thread): Update. Do not call new_thread_notify.
11089 (thread_db_init): Set thread_db_use_events. Check use_events.
11090 * utils.c (fatal, warning): Correct message prefix.
11091
30ed0a8f
DJ
110922007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
11093
11094 * Makefile.in (clean): Remove new files.
11095 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
11096 (powerpc-64.o, powerpc-64.c): New rules.
11097 * configure.srv: Use alternate register sets for powerpc64-*-linux*
11098 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
11099 with SPE.
11100 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
11101 SPE targets.
11102 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
11103 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
11104 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
11105 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
11106 (target_regsets): Add AltiVec and SPE register sets.
11107 * configure.ac: Check for AltiVec and SPE.
11108 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
11109 (ppc_fill_vrregset, ppc_store_vrregset): New.
11110 (target_regsets): Add AltiVec register set.
11111 * configure: Regenerated.
11112
fd462a61
DJ
111132007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
11114
11115 * linux-low.c (O_LARGEFILE): Define.
11116 (linux_read_memory): Use /proc/PID/mem.
11117 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
11118 * configure, config.in: Regenerated.
11119
69f223ed
DJ
111202007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
11121
11122 * linux-low.c (linux_wait_for_event): Do not pass signals while
11123 single-stepping.
11124
aec18585
PA
111252007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
11126
11127 * win32-low.c (create_process): New.
11128 (win32_create_inferior): Use create_process instead of
11129 CreateProcess. If create_process failed retry appending an ".exe"
11130 suffix. Store the GetLastError result immediatelly after
11131 create_process calls and use it on the call to error.
11132
34d86ddd
PA
111332007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
11134
11135 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
11136
5a0e3bd0
JB
111372007-08-23 Joel Brobecker <brobecker@adacore.com>
11138
11139 * configure.ac: Switch license to GPLv3.
11140
f88c79e6
MS
111412007-08-01 Michael Snyder <msnyder@access-company.com>
11142
11143 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
11144
6b3d9b83
PA
111452007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
11146
11147 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
11148 typedef.
11149 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
11150 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
11151 CloseToolhelp32Snapshot.
11152 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
11153 CloseToolhelp32Snapshot.
11154
c588c53c
MS
111552007-07-27 Michael Snyder <michael.snyder@access-company.com>
11156
11157 * server.c (main): Check for inferior exit before main loop.
11158
aa0403d9
PA
111592007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
11160
11161 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
11162 instead of on tmp_desc.
11163
255e7678
DJ
111642007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
11165 Daniel Jacobowitz <dan@codesourcery.com>
11166
11167 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
11168 (add_thread): Minor cleanups.
11169 (clear_inferiors): Move lower in the file. Clear the DLL
11170 list.
11171 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
11172 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
11173 (xml_escape_text): New.
11174 * server.c (handle_query): Handle qXfer:libraries:read. Report it
11175 for qSupported.
11176 (handle_v_cont): Report errors.
11177 (gdbserver_version): Update.
11178 (main): Correct size of own_buf. Do not report initial DLL events.
11179 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
11180 (unloaded_dll, xml_escape_text): New.
11181 * win32-low.c (enum target_waitkind): Update comments.
11182 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
11183 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
11184 (win32_EnumProcessModules, win32_GetModuleInformation)
11185 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
11186 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
11187 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
11188 (win32_Module32First, win32_Module32Next, load_toolhelp)
11189 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
11190 (get_child_debug_event): Handle DLL events.
11191 (win32_wait): Likewise.
11192
0d37add9
DJ
111932007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
11194
11195 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
11196 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
11197
45e2715e
PA
111982007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
11199
11200 * win32-low.c (handle_output_debug_string): Ignore event if not
11201 waiting.
11202
c5674cf1
PA
112032007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
11204
11205 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
11206
2bbe3cc1
DJ
112072007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
11208
11209 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
11210
ae13219e
DJ
112112007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
11212
11213 * inferiors.c (change_inferior_id): Add comment.
11214 * linux-low.c (check_removed_breakpoint): Add an early
11215 prototype. Improve debug output.
11216 (linux_attach): Doc update.
11217 (linux_detach_one_process, linux_detach): Clean up before releasing
11218 each process.
11219 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
11220 * linux-low.h (struct process_info): Doc improvement.
11221 * mem-break.c (delete_all_breakpoints): New.
11222 * mem-break.h (delete_all_breakpoints): New prototype.
11223 * thread-db.c (find_first_thread): New.
11224 (thread_db_create_event): Call it instead of
11225 thread_db_find_new_threads. Clean up unused variables.
11226 (maybe_attach_thread): Remove first thread handling.
11227 (thread_db_find_new_threads): Use find_first_thread.
11228 (thread_db_get_tls_address): Likewise.
11229
4105de34
DJ
112302007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
11231
11232 * thread-db.c (thread_db_find_new_threads): Add prototype.
11233 (thread_db_create_event): Check for the main thread before adding
11234 a new thread.
11235 (maybe_attach_thread): Only enable event reporting if TID == 0.
11236 (thread_db_get_tls_address): Check for new threads.
11237
2b876972
DJ
112382007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
11239
11240 * linux-low.c (linux_create_inferior): Try execv before execvp.
11241 * spu-low.c (spu_create_inferior): Likewise.
11242
7a245884
DJ
112432007-06-13 Mike Frysinger <vapier@gentoo.org>
11244
11245 * linux-low.c (linux_create_inferior): Change execv to execvp.
11246 * spu-low.c (spu_create_inferior): Likewies.
11247
117ce543
DJ
112482007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
11249
11250 * Makefile.in (clean): Clean new files instead of deleted ones.
11251 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
11252 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
11253 rules.
11254 * configure.srv: Specify XML files and new regformats for MIPS and
11255 MIPS64 GNU/Linux.
11256 * linux-mips-low.c (mips_num_regs): Set to only used registers.
11257 (mips_regmap): Do not fetch $0. Remove unused registers. Add
11258 an entry for the restart register.
11259 (mips_cannot_fetch_register, mips_cannot_store_register)
11260 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
11261 register names to match the XML descriptions.
11262 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
11263 restart register instead of $0.
11264
0e7f50da
UW
112652007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
11266 Markus Deuling <deuling@de.ibm.com>
11267
11268 * remote-utils.c (decode_xfer_write): New function.
11269 * server.h (decode_xfer_write): Add prototype.
11270 * server.c (handle_query): Add PACKET_LEN argument. Support
11271 qXfer:spu:read and qXfer:spu:write packets.
11272 (main): Pass packet_len to handle_query.
11273 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
11274 * target.h (target_ops): Add qxfer_spu.
11275
374c1d38
UW
112762007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
11277
11278 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
11279 accessing non-seekable spufs files.
11280
bb63802a
UW
112812007-05-16 Markus Deuling <deuling@de.ibm.com>
11282
889bf7c5 11283 * server.c (handle_query): Add reply for qC packet.
bb63802a 11284
7390519e
PA
112852007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11286 Leo Zayas <lerele@champenstudios@com>
11287
11288 * server.h (check_remote_input_interrupt_request): New function.
11289 * remote_utils.c (INVALID_DESCRIPTOR): New define.
11290 (remote_desc): Initialize with INVALID_DESCRIPTOR.
11291 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
11292 (check_remote_input_interrupt_request): New function.
11293 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 11294 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
11295 winapi_GenerateConsoleCtrlEvent): New typedefs.
11296 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
11297 to 250 ms.
11298 (win32_wait): Check for remote interrupt request
11299 with check_remote_input_interrupt_request.
11300 (win32_request_interrupt): New function.
11301 (win32_target_op): Set request_interrupt to win32_request_interrupt.
11302
34b34921
PA
113032007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11304
11305 * win32-low.c (debug_registers_changed,
11306 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
11307 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
11308 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
11309 (thread_rec): Get context using the low target.
11310 (child_add_thread): Call thread_added on the low target,
11311 which does the same thing.
11312 (regptr): Delete.
11313 (do_initial_child_stuff): Remove debug registers references.
11314 Set context using the low target. Resume threads after
11315 setting the contexts.
11316 (child_continue): Remove dead variable. Remove debug
11317 registers references.
11318 (child_fetch_inferior_registers): Go through the low target.
11319 (do_child_store_inferior_registers): Remove.
11320 (child_store_inferior_registers): Go through the low target.
11321 (win32_resume): Remove debug registers references.
11322 Set context using the low target.
11323 (handle_exception): Change return type to void. Don't record
11324 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
11325 first chance exception.
889bf7c5 11326 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
11327 goto loop. Always return after waiting for debug event.
11328 (win32_wait): Convert to switch statement. Handle spurious
11329 events.
11330
11331 * win32-i386-low.c (debug_registers_changed,
11332 debug_registers_used): New.
11333 (initial_stuff): Rename to ...
11334 (i386_initial_stuff): ... this. Clear debug registers
11335 state variables.
11336 (store_debug_registers): Delete.
11337 (i386_get_thread_context): New.
11338 (load_debug_registers): Delete.
11339 (i386_set_thread_context): New.
11340 (i386_thread_added): New.
11341 (single_step): Rename to ...
11342 (i386_single_step): ... this.
11343 (do_fetch_inferior_registers): Rename to ...
11344 (i386_fetch_inferior_register): ... this.
11345 (i386_store_inferior_register): New.
11346 (the_low_target): Adapt to new interface.
11347
11348 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
11349 (arm_get_thread_context): New.
11350 (arm_set_thread_context): New.
11351 (regptr): New.
11352 (do_fetch_inferior_registers): Rename to ...
11353 (arm_fetch_inferior_register): ... this.
11354 (arm_store_inferior_register): New.
11355 (arm_wince_breakpoint): Reimplement as unsigned long.
11356 (arm_wince_breakpoint_len): Define.
11357 (the_low_target): Adapt to new interface.
11358
11359 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
11360 load_debug_registers. Add get_thread_context, set_thread_context,
11361 thread_added and store_inferior_register. Rename
11362 fetch_inferior_registers to fetch_inferior_register.
11363 (regptr): Remove declaration.
11364
dd6953e1
PA
113652007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11366
11367 * linux-low.c (linux_detach): Change return type to int. Return 0.
11368 * spu-low.c (spu_detach): Likewise.
11369
444d6139
PA
113702007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11371
11372 * target.h (target_ops): Change return type of detach to int.
11373 Add join.
11374 (join_inferior): New.
11375 * server.c (main): Don't skip detach support on mingw32.
11376 If the inferior doesn't support detaching return error.
11377 Call join_inferior instead of using waitpid.
11378 * linux-low.c (linux_join): New.
11379 (linux_target_op): Add linux_join.
11380 * spu-low.c (spu_join): New.
11381 (spu_target_ops): Add spu_join.
11382 * win32-low.c (win32_detach): Adapt to new interface.
11383 Reopen current_process_handle before detaching. Issue a child
11384 resume before detaching.
11385 (win32_join): New.
11386 (win32_target_op): Add win32_join.
11387
1d5315fe
PA
113882007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11389
11390 * win32-low.c (win32-attach): Fix return value.
11391 * target.h (target_ops): Describe ATTACH return values.
11392
bf914831
PA
113932007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11394
11395 * win32-low.c (GETPROCADDRESS): Define.
11396 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
11397 (winapi_DebugSetProcessKillOnExit): Likewise.
11398 (win32_create_inferior): Force usage of ansi CreateProcessA.
11399 (win32_attach): Use GETPROCADDRESS.
11400 (win32_detach): Likewise.
11401
f72f3e60
PA
114022007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11403
11404 * win32-low.c (win32_wait): Don't use WSTOPSIG.
11405
ed50f18f
PA
114062007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
11407
11408 * win32-low.c: Commit leftover changes from 2007-03-29.
11409
0c2ead7e
DJ
114102007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
11411
11412 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
11413 fields short instead of int. Add explicit padding.
11414 (i387_cache_to_fsave): Remove unnecessary casts.
11415 (i387_fsave_to_cache): Doc fix.
11416 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
11417
73725ff3
DJ
114182007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
11419
11420 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
11421 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
11422
d99f33d8
PA
114232007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
11424
11425 * configure.srv (arm*-*-mingw32ce*): Move near the other
11426 arm targets.
11427
68070c10
PA
114282007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
11429
2482afc6 11430 * configure.ac: Add errno checking.
68070c10
PA
11431 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
11432 sys/file.h and malloc.h.
11433 (AC_CHECK_DECLS): Add perror.
11434 (srv_mingwce): Handle.
2482afc6 11435 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
11436 win32-i386-low.o to srv_tgtobj.
11437 (i[34567]86-*-mingw*): Likewise.
11438 (arm*-*-mingw32ce*): Add case.
11439 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
11440 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
11441 [__MINGW32CE__] (strerror): New function.
11442 [__MINGW32CE__] (errno): Define to GetLastError.
11443 [__MINGW32CE__] (COUNTOF): New macro.
11444 (remote_open): Remove extra close call.
11445 * mem-break.c (delete_breakpoint_at): New function.
11446 * mem-break.h (delete_breakpoint_at): Declare.
11447 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
11448 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
11449 [USE_WIN32API] (read, write): Add char* casts.
11450 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
11451 * server.h: Include wincecompat.h on Windows CE.
11452 [HAVE_ERRNO_H]: Check.
11453 (perror): Declare if not declared.
11454 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
11455 (perror_with_name): Remove errno declaration.
11456 * wincecompat.h: New.
11457 * wincecompat.c: New.
11458 * win32-low.h: New.
11459 * win32-arm-low.c: New.
11460 * win32-i386-low.c: New.
11461 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
11462 (OUTMSG2): Make it safe.
11463 (_T): New macro.
11464 (COUNTOF): New macro.
11465 (NUM_REGS): Get it from the low target.
11466 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
11467 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
11468 (thread_rec): Let low target handle debug registers.
11469 (child_add_thread): Likewise.
11470 (child_init_thread_list): Likewise.
11471 (continue_one_thread): Likewise.
11472 (regptr): New.
11473 (do_child_fetch_inferior_registers): Move to ...
11474 * win32-i386-low.c: ... here, and rename to ...
11475 (do_fetch_inferior_registers): ... this.
889bf7c5 11476 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
11477 Go through the low target.
11478 (do_child_store_inferior_registers): Use regptr.
11479 (strwinerror): New function.
11480 (win32_create_inferior): Handle Windows CE.
11481 Use strwinerror instead of strerror on Windows error
11482 codes. Add program to the error output.
11483 Don't close the main thread handle on Windows CE.
11484 (win32_attach): Use coredll.dll on Windows CE.
11485 (win32_kill): Close current process and current
11486 thread handles.
11487 (win32_detach): Use coredll.dll on Windows CE.
11488 (win32_resume): Let low target handle debug registers, and
11489 step request.
11490 (handle_exception): Add/Remove initial breakpoint. Avoid
11491 non-existant WSTOPSIG on Windows CE.
11492 (win32_read_inferior_memory): Cast to remove warning.
11493 (win32_arch_string): Go through the low target.
11494 (initialize_low): Call set_breakpoint_data with the low
11495 target's breakpoint.
11496 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
11497 FOP_REGNUM, mappings): Move to ...
11498 * win32-i386-low.c: ... here.
11499 * win32-low.c (win32_thread_info): Move to ...
11500 * win32-low.h: ... here.
11501 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
11502 win32-arm-low.c and wincecompat.c.
11503 (all:): Add $EXEEXT.
11504 (install-only:): Likewise.
11505 (gdbserver:): Likewise.
11506 (gdbreplay:): Likewise.
11507 * config.in: Regenerate.
11508 * configure: Regenerate.
11509
41093d81
PA
115102007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
11511
11512 * win32-low.c: Rename typedef thread_info to
11513 win32_thread_info throughout.
11514
544afa54
PA
115152007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
11516
11517 * win32-i386-low.c: Rename to ...
11518 * win32-low.c: ... this.
11519 * configure.srv: Replace win32-i386-low.o with win32-low.o.
11520 * Makefile.in: Likewise.
11521
bce7165d
PA
115222007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
11523
11524 * remote-utils.c (monitor_output): Constify msg parameter.
11525 * server.h (monitor_output): Likewise.
11526 * win32-i386-low.c (handle_output_debug_string): New.
11527 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
11528 handle_output_debug_string.
11529 (get_child_debug_event): Likewise.
11530
506c7aa0
DJ
115312007-03-27 Mat Hostetter <mat@lcs.mit.edu>
11532
11533 * server.c (main): Correct strtoul check.
11534
42c81e2a
DJ
115352007-03-27 Jon Ringle <jon@ringle.org>
11536
11537 * linux-low.c: Check __ARCH_HAS_MMU__ also.
11538
9453113a
DJ
115392007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
11540
11541 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
11542
64a69107
DJ
115432007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
11544
11545 * terminal.h: Check HAVE_SGTTY_H.
11546
115472007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
11548
11549 * remote-utils.c (remote_open): Print out the assigned port number.
11550
c74d0ad8
DJ
115512007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
11552
11553 * remote-utils.c (monitor_output): New function.
11554 * server.c (debug_threads): Define here.
11555 (monitor_show_help): New function.
11556 (handle_query): Handle qRcmd.
11557 (main): Do not handle 'd' packet.
11558 * server.h (debug_threads, remote_debug, monitor_output): Declare.
11559 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
11560 of debug_threads.
11561
de7c3b4a
PA
115622007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11563
11564 * Makefile.in (EXEEXT): New.
11565 (clean): Use $(EXEEXT).
11566
ef57601b
PA
115672007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11568
11569 * target.h (target_ops): Rename send_signal to request_interrupt,
11570 and remove enum target_signal parameter.
11571 * linux-low.c (linux_request_interrupt): Rename from
11572 linux_send_signal, and always send SIGINT.
11573 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
11574 and always send SIGINT.
11575 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
11576 of send_signal.
11577 (input_interrupt): Likewise.
11578
820f2bda
PA
115792007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11580
11581 * server.c (get_features_xml): Check if target implemented
11582 arch_string.
11583 * win32-i386-low.c (win32_arch_string): New.
11584 (win32_target_ops): Add win32_arch_string as arch_string member.
11585
ab39bf24
UW
115862007-02-22 Markus Deuling <deuling@de.ibm.com>
11587
11588 * spu-low.c (spu_arch_string): New.
11589 (spu_target_ops): Add spu_arch_string.
11590
61ff6e04
DJ
115912007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
11592
11593 * remote-utils.c: Remove HAVE_TERMINAL_H check.
11594 * configure.ac: Do not check for terminal.h.
11595 * configure, config.in: Regenerated.
11596
fb1e4ffc
DJ
115972007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
11598
11599 * Makefile.in (OBS): Add $(XML_BUILTIN).
11600 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
11601 (clean): Update.
11602 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
11603 (arm-with-iwmmxt.c): New.
11604 * config.in, configure: Regenerate.
11605 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
11606 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
11607 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
11608 (arm*-*-linux*): Add iWMMXt and regset support.
11609 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
11610 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
11611 (arm_store_wmmxregset, target_regsets): New.
11612 * server.c (get_features_xml): Take annex argument. Check builtin
11613 XML documents.
11614 (handle_query): Handle multiple annexes.
11615
0f48aa01
DJ
116162007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11617
11618 * remote-utils.c [USE_WIN32API] (read, write): Define.
11619 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
11620 write.
11621
23181151
DJ
116222007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
11623
11624 * linux-i386-low.c (the_low_target): Set arch_string.
11625 * linux-x86-64-low.c (the_low_target): Likewise.
11626 * linux-low.c (linux_arch_string): New.
11627 (linux_target_ops): Add it.
11628 * linux-low.h (struct linux_target_ops): Add arch_string.
11629 * server.c (write_qxfer_response): Use const void * for DATA.
11630 (get_features_xml): New.
11631 (handle_query): Handle qXfer:features:read. Report it for qSupported.
11632 * target.h (struct target_ops): Add arch_string method.
11633
9d606399
DJ
116342007-01-03 Denis Pilat <denis.pilat@st.com>
11635 Daniel Jacobowitz <dan@codesourcery.com>
11636
11637 * linux-low.c (linux_kill): Handle being called with no threads.
11638 * win32-i386-low.c (win32_kill): Likewise.
11639 (get_child_debug_event): Clear current_process_handle.
11640
116412006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
11642 Daniel Jacobowitz <dan@codesourcery.com>
11643
11644 * remote-utils.c (remote_open): Check the type of specified
11645 serial port devices before opening them.
11646 * server.c (main): Kill the inferior if an error occurs during
11647 the first remote_open.
11648
a5e13d24
DJ
116492006-12-05 Markus Deuling <deuling@de.ibm.com>
11650
11651 * README: Update supported targets.
11652
186947f7
DJ
116532006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
11654
11655 * Makefile.in (clean): Remove reg-mips64.c.
11656 (reg-mips64.c, reg-mips64.o): New rules.
11657 * configure.srv: Handle mips64. Include regset support for mips.
11658 * linux-mips-low.c (union mips_register): New.
11659 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
11660 (mips_breakpoint, mips_breakpoint_at): Use int.
11661 (mips_collect_register, mips_supply_register)
11662 (mips_collect_register_32bit, mips_supply_register_32bit)
11663 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
11664 (mips_store_fpregset, target_regsets): New.
11665 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
11666
a13e2c95
UW
116672006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
11668
11669 * configure.srv: Add target "spu*-*-*".
11670 * Makefile.in (clean): Remove reg-spu.c.
11671 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
11672 * spu-low.c: New file.
11673
cb7283db
DJ
116742006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
11675
11676 * configure.ac: Correct td_thr_tls_get_addr test.
11677 * configure: Regenerated.
11678
89be2091
DJ
116792006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
11680
11681 * linux-low.c (linux_wait_for_event): Reformat. Use the
11682 pass_signals array.
11683 * remote-utils.c (decode_address_to_semicolon): New.
11684 * server.c (pass_signals, handle_general_set): New.
11685 (handle_query): Mention QPassSignals for qSupported.
11686 (main): Call handle_general_set.
11687 * server.h (pass_signals, decode_address_to_semicolon): New.
11688
000ef4f0
DJ
116892006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
11690
11691 * server.c (handle_query): Correct error handling for read_auxv.
11692
b7149293
UW
116932005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
11694
11695 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
11696 and srv_linux_thread_db to yes.
11697 * linux-s390-low.c (s390_fill_gregset): New function.
11698 (target_regsets): Define data structure.
11699
dae5f5cf
DJ
117002006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
11701
11702 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
11703 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
11704 * config.in, configure: Regenerated.
11705 * inferiors.c (gdb_id_to_thread): New function.
11706 (gdb_id_to_thread_id): Use it.
11707 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
11708 * linux-low.h (struct process_info): Add th member.
11709 (thread_db_get_tls_address): New prototype.
11710 * remote-utils.c (decode_address): Make non-static.
11711 * server.c (handle_query): Handle qGetTLSAddr.
11712 * server.h (gdb_id_to_thread, decode_address): New prototypes.
11713 * target.h (struct target_ops): Add get_tls_address.
11714 * thread-db.c (maybe_attach_thread): Save the thread handle.
11715 (thread_db_get_tls_address): New.
11716
32ca6d61
DJ
117172006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
11718
11719 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
11720 (linux_resume_one_process): Take a siginfo_t *. Update all
11721 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
11722 (struct pending_signals): Add a siginfo_t.
11723 (linux_wait_for_process): Always set last_status.
11724 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
11725 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
11726 * linux-low.h (struct process_info): Add last_status.
11727
5ffff7c1
DJ
117282006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
11729
11730 * remote-utils.c (try_rle): New function.
11731 (putpkt_binary): Use it.
11732
8695c747
DJ
117332006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
11734
11735 * Makefile.in (clean): Clean reg-x86-64-linux.c.
11736 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
11737 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
11738 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
11739 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
11740 point registers.
11741
290fadea
RS
117422006-08-08 Richard Sandiford <richard@codesourcery.com>
11743
11744 * server.c (terminal_fd): New variable.
11745 (old_foreground_pgrp): Likewise.
11746 (restore_old_foreground_pgrp): New function.
11747 (start_inferior): Record the terminal file descriptor in terminal_fd
11748 and its original foreground group in old_foreground_pgrp. Register
11749 restore_old_foreground_pgrp with atexit().
11750
9f2e1e63
DJ
117512006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
11752
11753 * server.c (handle_query): Correct qPart to qXfer.
11754
b80864fb
DJ
117552006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
11756
11757 * configure.ac: Check for more headers which are missing on
11758 Windows. Automatically supply -lwsock32 and USE_WIN32API.
11759 * configure.srv: Add Cygwin and mingw32.
11760 * remote-utils.c: Don't include headers unconditionally which
11761 are missing on mingw32. Include <winsock.h> for mingw32.
11762 (remote_open): Adjust for mingw32 support. Flush
11763 standard error after writing to it.
11764 (remote_close, putpkt_binary, input_interrupt, block_async_io)
11765 (unblock_async_io, enable_async_io, disable_async_io)
11766 (readchar, getpkt): Update for Winsock support.
11767 (prepare_resume_reply): Expect a protocol signal number.
11768 * server.c: Disable <sys/wait.h> on mingw32.
11769 (start_inferior): Adjust for mingw32 support. Flush
11770 standard error after writing to it.
11771 (attach_inferior): Likewise. Use protocol signal
11772 numbers.
11773 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
11774 and names.
11775 * win32-i386-low.c: New file.
11776 * Makefile.in (XM_CLIBS): Set.
11777 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
11778 (win32-i386-low.o): New dependency rule.
11779 * linux-low.c (linux_wait): Use target signal numbers.
11780 * target.h (struct target_ops): Doc fix.
11781 * server.h (target_signal_to_name): New prototype.
11782 * gdbreplay.c: Don't include headers unconditionally which
11783 are missing on mingw32. Include <winsock.h> for mingw32.
11784 (remote_close, remote_open): Adjust for Winsock support.
11785 * configure, config.in: Regenerated.
11786
0876f84a
DJ
117872006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
11788
11789 * server.c (decode_xfer_read, write_qxfer_response): New.
11790 (handle_query): Take a packet length argument. Handle
11791 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
11792 the qSupported response.
11793 (main): Update call to handle_query.
11794
01f9e8fa
DJ
117952006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
11796
11797 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
11798 (putpkt_binary): Renamed from putpkt and adjusted for binary
11799 data.
11800 (putpkt): New wrapper for putpkt_binary.
11801 (readchar): Don't mask off the high bit.
11802 (decode_X_packet): New function.
11803 * server.c (main): Call putpkt_binary if a handler sets the packet
11804 length. Save the length of the incoming packet. Handle 'X'.
11805 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
11806
be2a5f71
DJ
118072006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
11808
11809 * server.c (handle_query): Handle qSupported.
11810
ea025f5f
DJ
118112006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
11812
11813 * remote-utils.c (all_symbols_looked_up): New variable.
11814 (look_up_one_symbol): Check it.
11815 * server.h (look_up_one_symbol): New declaration.
11816 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
11817
9308fc88
DJ
118182006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
11819
11820 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 11821 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
11822 (PTRACE_GET_THREAD_AREA): Define.
11823 (ps_get_thread_area): New function.
11824
52fb6437
NS
118252006-05-09 Nathan Sidwell <nathan@codesourcery.com>
11826
11827 * configure.srv (m68k*-*-uclinux*): New target.
11828 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
11829 (linux_resume_one_process): Remove extraneous cast.
11830 (linux_read_offsets): New.
11831 (linux_target_op): Add linux_read_offsets on mmuless systems.
11832 * server.c (handle_query): Add qOffsets logic.
11833 * target.h (struct target_ops): Add read_offsets.
11834
21b0f40c
DJ
118352006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
11836
11837 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
11838 (PTRACE_GET_THREAD_AREA): Define.
11839 (ps_get_thread_area): New function.
11840 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
11841 (linux-x86-64-low.o): Update.
11842
0050a760
DJ
118432006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
11844
11845 * configure.ac: Remove checks for prfpregset_t.
11846 * gdb_proc_service.h: New file.
11847 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
11848 new "gdb_proc_service.h".
11849 * proc-service.c: Likewise.
11850 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
11851 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
11852 * Makefile.in (gdb_proc_service_h): Updated.
11853 * configure, config.in: Regenerated.
11854
b92a518e
DJ
118552006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
11856
11857 * remote-utils.c (prepare_resume_reply): Move declaration
11858 of gdb_id_from_wait to the top of the block.
11859
545587ee
DJ
118602006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
11861
11862 * linux-low.c (regsets_store_inferior_registers): Read the regset
11863 from the target before filling it.
11864
9db87ebd
DJ
118652006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
11866
11867 * server.c (attach_inferior): Return SIGTRAP for a successful
11868 attach.
11869
dd24457d
DJ
118702006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
11871
11872 * Makefile.in (OBS): Add version.o.
11873 (STAGESTUFF): Delete.
11874 (version.o): Add dependencies.
11875 (version.c): Replace rule.
11876 (clean): Remove version.c.
11877 * server.c (gdbserver_version): New.
11878 (gdbserver_usage): Use printf.
11879 (main): Handle --version and --help.
11880 * server.h (version, host_name): Add declarations.
11881
6f0f660e
EZ
118822005-12-23 Eli Zaretskii <eliz@gnu.org>
11883
889bf7c5
PA
11884 * linux-arm-low.c:
11885 * linux-arm-low.c:
11886 * inferiors.c:
11887 * i387-fp.h:
11888 * i387-fp.c:
11889 * gdbreplay.c:
11890 * regcache.c:
11891 * proc-service.c:
11892 * mem-break.h:
11893 * mem-break.c:
11894 * linux-x86-64-low.c:
11895 * linux-sh-low.c:
11896 * linux-s390-low.c:
11897 * linux-ppc64-low.c:
11898 * linux-ppc-low.c:
11899 * linux-mips-low.c:
11900 * linux-m68k-low.c:
11901 * linux-m32r-low.c:
11902 * linux-low.h:
11903 * linux-low.c:
11904 * linux-ia64-low.c:
11905 * linux-i386-low.c:
11906 * linux-crisv32-low.c:
11907 * thread-db.c:
11908 * terminal.h:
11909 * target.h:
11910 * target.c:
11911 * server.h:
11912 * server.c:
11913 * remote-utils.c:
11914 * regcache.h:
11915 * utils.c:
11916 * Makefile.in:
11917 * configure.ac:
6f0f660e
EZ
11918 * gdbserver.1: Add (C) after Copyright. Update the FSF
11919 address.
11920
9d1fb177
DJ
119212005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
11922
11923 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
11924 (arm_breakpoint_at): Recognize both breakpoints.
11925 (the_low_target): Use the correct breakpoint instruction.
11926
011a70c2
DJ
119272005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
11928
11929 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
11930 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
11931 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
11932 (the_low_target): Update.
11933
7fb85e41
AS
119342005-10-25 Andreas Schwab <schwab@suse.de>
11935
11936 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
11937
11938 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
11939 (ia64_num_regs): Reduce to 462.
11940
3db0444b
DJ
119412005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
11942
11943 * acinclude.m4: Correct quoting.
11944 * aclocal.m4: Regenerated.
11945
11946 Suggested by SZOKOVACS Robert <szo@ies.hu>:
11947 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
11948 (thread_db_init): Call thread_db_err_str.
11949 * configure.ac: Check for TD_VERSION.
11950 * config.in, configure: Regenerated.
11951
bee0189a
DJ
119522005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11953
11954 * server.h (error, fatal, warning): Add ATTR_FORMAT.
11955
e9d25b98
DJ
119562005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
11957
11958 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
11959 is not available. Define HAVE_PTRACE_GETREGS if it is.
11960 * config.in, configure: Regenerated.
11961 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
11962 * linux-i386-low.c, linux-m68k-low.c: Update to use
11963 HAVE_PTRACE_GETREGS.
11964 * linux-low.c (regsets_fetch_inferior_registers)
11965 (regsets_store_inferior_registers): Only return 0 if we processed
11966 GENERAL_REGS.
11967 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
11968 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
11969
a06660f7
DJ
119702005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
11971
11972 * inferiors.c (struct thread_info): Add gdb_id.
11973 (add_thread): Add gdb_id argument.
11974 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
11975 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
11976 calls to add_thread.
11977 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
11978 * server.c (handle_query): Use thread_to_gdb_id.
11979 (handle_v_cont, main): Use gdb_id_to_thread_id.
11980 * server.h (add_thread): Update prototype.
11981 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
11982 prototypes.
11983
5a1f5858
DJ
119842005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
11985
11986 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
11987 left-padded registers.
11988 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
11989 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
11990
e122f1f5
SE
119912005-07-01 Steve Ellcey <sje@cup.hp.com>
11992
11993 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
11994 * configure: Regenerate.
11995 * config.in: Regenerate.
11996 * server.h (NEED_DECLARATION_STRERROR):
11997 Replace with !HAVE_DECL_STRERROR.
11998
d592fa2f
DJ
119992005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
12000
12001 * linux-low.c (linux_wait, linux_send_signal): Don't test
12002 an unsigned long variable for > 0 if it could be MAX_ULONG.
12003 * server.c (myresume): Likewise.
12004 * target.c (set_desired_inferior): Likewise.
12005
ccbd4912
MK
120062005-06-13 Mark Kettenis <kettenis@gnu.org>
12007
12008 * configure.ac: Simplify and improve check for socklen_t.
12009 * configure, config.in: Regenerate.
12010
f450004a
DJ
120112005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
12012
12013 * acconfig.h: Remove.
12014 * configure.ac: Add a test for socklen_t. Use three-argument
12015 AC_DEFINE throughout.
12016 * config.in: Regenerated using autoheader 2.59.
12017 * configure: Regenerated.
12018
12019 * gdbreplay.c (socklen_t): Provide a default.
12020 (remote_open): Use socklen_t.
12021 * remote-utils.c (socklen_t): Provide a default.
12022 (remote_open): Use socklen_t.
12023 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
12024 unsigned char.
12025
12026 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
12027 char for buffers.
12028 * linux-low.c (linux_read_memory, linux_write_memory)
12029 (linux_read_auxv): Likewise.
12030 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
12031 (check_mem_write): Likewise.
12032 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
12033 Likewise.
12034 * regcache.c (struct inferior_rgcache_data, registers_to_string)
12035 (registers_from_string, register_data): Likewise.
12036 * server.c (handle_query, main): Likewise.
12037 * server.h (convert_ascii_to_int, convert_int_to_ascii)
12038 (decode_M_packet): Likewise.
12039 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
12040 * target.h (struct target_ops): Update read_memory, write_memory,
12041 and read_auxv.
12042 (read_inferior_memory, write_inferior_memory): Update.
12043 * linux-low.h (struct linux_target_ops): Change type of breakpoint
12044 to unsigned char *.
12045 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
12046 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
12047 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
12048 linux-s390-low.c, linux-sh-low.c: Update for changes in
12049 read_inferior_memory and the_low_target->breakpoint.
12050
eee84df1
DJ
120512005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
12052
12053 * Makefile.in (SFILES): Add linux-ppc64-low.c.
12054 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
12055 * configure.srv: Add powerpc64-*-linux*.
12056 * linux-ppc64-low.c: New file.
12057
45b134e5
OF
120582005-05-23 Orjan Friberg <orjanf@axis.com>
12059
12060 * linux-cris-low.c: New file with support for CRIS.
12061 * linux-crisv32-low.c: Ditto for CRISv32.
12062 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
12063 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 12064 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
12065 reg-crisv32.o, and reg-crisv32.c to make rules.
12066 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
12067 recognized targets.
12068
48d93c75
UW
120692005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
12070
12071 * linux-low.c (fetch_register): Ensure buffer size is a multiple
12072 of sizeof (PTRACE_XFER_TYPE).
12073 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
12074
e013ee27
OF
120752005-05-12 Orjan Friberg <orjanf@axis.com>
12076
889bf7c5 12077 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
12078 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
12079 pointers for hardware watchpoint support.
12080 * linux-low.h (struct linux_target_ops): Ditto.
12081 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
12082 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
12083 to linux_target_ops.
12084 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
12085 reply packet.
12086 * server.c (main): Recognize 'Z' and 'z' packets.
12087
b0ded00b
UW
120882005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
12089
12090 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
12091 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
12092 (the_low_target): Add new members.
12093
8643e2ad
DJ
120942005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
12095
12096 * proc-service.c (ps_lgetregs): Search all_processes instead of
12097 all_threads.
12098
fc620387
DJ
120992005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
12100
12101 * server.c (start_inferior): Change return type to int.
12102 (attach_inferior): Change sigptr to int *.
12103 (handle_v_cont, handle_v_requests): Change signal to int *.
12104 (main): Change signal to int.
12105
121062005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
12107
12108 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
12109 * configure.srv: Add m32r*-*-linux*.
12110 * linux-m32r-low.c: New file.
12111
e0e76420
DJ
121122005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
12113
12114 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
12115
a1928bad
DJ
121162005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
12117
12118 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
12119 Take unsigned long arguments for PIDs.
12120 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
12121 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
12122 (wait_for_sigstop, linux_resume_one_process)
12123 (regsets_fetch_inferior_registers, linux_send_signal)
12124 (linux_read_auxv): Likewise. Update the types of variables holding
12125 PIDs. Update format string specifiers.
12126 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
12127 * remote-utils.c (prepare_resume_reply): Likewise.
12128 * server.c (cont_thread, general_thread, step_thread)
12129 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
12130 unsigned long.
12131 (handle_query): Update format specifiers.
12132 (handle_v_cont, main): Use strtoul for thread IDs.
12133 * server.h (struct inferior_list_entry): Use unsigned long for ID.
12134 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
12135 (general_thread, step_thread, thread_from_wait)
12136 (old_thread_from_wait): Update.
12137 * target.h (struct thread_resume): Use unsigned long for THREAD.
12138 (struct target_ops): Use unsigned long for arguments to attach and
12139 thread_alive.
12140
dcdb98d2
DJ
121412005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
12142
12143 * acinclude.m4: Include bfd/bfd.m4 directly.
12144 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
12145 <agriffis@toolchain.org>.
12146 * aclocal.m4, configure: Regenerated.
12147
bec39cab
AC
121482005-01-07 Andrew Cagney <cagney@gnu.org>
12149
12150 * configure.ac: Rename configure.in, require autoconf 2.59.
12151 * configure: Re-generate.
12152
434c4c77
DJ
121532004-12-08 Daniel Jacobowitz <dan@debian.org>
12154
12155 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
12156 LIBS when finished.
12157 * aclocal.m4: Regenerated.
12158 * configure: Regenerated.
12159
db1d3e1b
AS
121602004-11-21 Andreas Schwab <schwab@suse.de>
12161
12162 * linux-m68k-low.c (m68k_num_gregs): Define.
12163 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
12164 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
12165 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
12166 (m68k_breakpoint_at): New. Add to the_low_target.
12167
12168 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
12169 srv_linux_thread_db to yes.
12170
43360365
JB
121712004-10-20 Joel Brobecker <brobecker@gnat.com>
12172
12173 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
12174 (ARCH_SET_FS): Likewise.
12175 (ARCH_GET_FS): Likewise.
12176 (ARCH_GET_GS): Likewise.
12177
fd500816
DJ
121782004-10-16 Daniel Jacobowitz <dan@debian.org>
12179
12180 * linux-i386-low.c (ps_get_thread_area): New.
12181 * linux-x86-64-low.c (ps_get_thread_area): New.
12182 * linux-low.c: Include <sys/syscall.h>.
12183 (linux_kill_one_process): Don't kill the first thread here.
12184 (linux_kill): Kill the first thread here.
12185 (kill_lwp): New function.
12186 (send_sigstop, linux_send_signal): Use it.
12187 * proc-service.c: Clean up #ifdefs.
12188 (fpregset_info): Delete.
12189 (ps_lgetregs): Update and enable implementation.
12190 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
12191 implementations.
12192 * remote-utils.c (struct sym_cache, symbol_cache): New.
12193 (input_interrupt): Print a clearer message.
12194 (async_io_enabled): New variable.
12195 (enable_async_io, disable_async_io): Use it. Update comments.
12196 (look_up_one_symbol): Use the symbol cache.
12197 * thread-db.c (thread_db_look_up_symbols): New function.
12198 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
12199
f6de3c42
DJ
122002004-10-16 Daniel Jacobowitz <dan@debian.org>
12201
12202 * configure.in: Test for -rdynamic.
12203 * configure: Regenerated.
12204 * Makefile (INTERNAL_LDFLAGS): New.
12205 (gdbserver, gdbreplay): Use it.
12206
2c0fc042
AC
122072004-09-02 Andrew Cagney <cagney@gnu.org>
12208
12209 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
12210
075b3282
DJ
122112004-03-23 Daniel Jacobowitz <drow@mvista.com>
12212
12213 * linux-low.c (linux_wait): Clear all_processes list also.
12214
fa6a77dc
DJ
122152004-03-12 Daniel Jacobowitz <drow@mvista.com>
12216
12217 * linux-low.c: Include <errno.h>. Remove extern declaration of
12218 errno.
12219
6d782a97
DJ
122202004-03-12 Daniel Jacobowitz <drow@mvista.com>
12221
12222 * gdbreplay.c, server.h, utils.c: Update copyright years.
12223
3a7fb99b
DJ
122242004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
12225
12226 * server.c (main): Print child status or termination signal from
12227 variable 'signal', not 'sig'.
12228
c3e735a6
DJ
122292004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
12230
12231 * linux-low.c (linux_read_memory): Change return type to
12232 int. Check for and return error from ptrace().
12233 * target.c (read_inferior_memory): Change return type to int. Pass
12234 back return status from the_target->read_memory().
12235 * target.h (struct target_ops): Adapt *read_memory() prototype.
12236 Update comment.
12237 (read_inferior_memory): Adapt prototype.
12238 * server.c (main): Return an error packet if
12239 read_inferior_memory() returns an error.
12240
a59d1c82
DJ
122412004-03-04 Daniel Jacobowitz <drow@mvista.com>
12242
12243 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
12244 Unify with other clean targets.
12245
dc3f8883
DJ
122462004-02-29 Daniel Jacobowitz <drow@mvista.com>
12247
12248 * server.c (handle_v_cont): Call set_desired_inferior.
12249
89a208da
DJ
122502004-02-29 Daniel Jacobowitz <drow@mvista.com>
12251
12252 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
12253
62ea82f5
DJ
122542004-02-29 Daniel Jacobowitz <drow@mvista.com>
12255
12256 * linux-low.c (linux_wait): Unblock async I/O.
12257 (linux_resume): Block and enable async I/O.
12258 * remote-utils.c (block_async_io, unblock_async_io): New functions.
12259 * server.h (block_async_io, unblock_async_io): Add prototypes.
12260
6910d122
DJ
122612004-02-29 Daniel Jacobowitz <drow@mvista.com>
12262
12263 * remote-utils.c (remote_open): Print a status notice after
12264 opening a TCP port.
12265 * server.c (attach_inferior): Print a status notice after
12266 attaching.
12267
122682004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
12269
12270 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
12271
c89dc5d4
DJ
122722004-02-26 Daniel Jacobowitz <drow@mvista.com>
12273
12274 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
12275 error packet.
12276 * server.c, target.h: Update copyright years.
12277
4b8dad4a
RM
122782004-02-25 Roland McGrath <roland@redhat.com>
12279
12280 * target.h (struct target_ops): New member `read_auxv'.
12281 * server.c (handle_query): Handle qPart:auxv:read: query using that.
12282 * linux-low.c (linux_read_auxv): New function.
12283 (linux_target_ops): Initialize `read_auxv' member to that.
12284
d7446758
JB
122852004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
12286
12287 Committed by Jim Blandy <jimb@redhat.com>.
12288
12289 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 12290 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
12291 instead of GPR_SIZE to distiguish s390 and s390x targets.
12292
5544ad89
DJ
122932004-01-31 Daniel Jacobowitz <drow@mvista.com>
12294
12295 * linux-low.c: Update copyright year.
12296 (check_removed_breakpoint): Clear pending_is_breakpoint.
12297 (linux_set_resume_request, linux_queue_one_thread)
12298 (resume_status_pending_p): New functions.
12299 (linux_continue_one_thread): Use process->resume.
12300 (linux_resume): Only resume threads if there are no pending events.
12301 * linux-low.h (struct process_info): Add resume request
12302 pointer.
12303
2a68b70e
DJ
123042004-01-30 Daniel Jacobowitz <drow@mvista.com>
12305
12306 * regcache.c (new_register_cache): Clear the allocated register
12307 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
12308
64386c31
DJ
123092003-10-13 Daniel Jacobowitz <drow@mvista.com>
12310
12311 * linux-low.c (linux_resume): Take a struct thread_resume *
12312 argument.
12313 (linux_wait): Update call.
12314 (resume_ptr): New static variable.
12315 (linux_continue_one_thread): Renamed from
12316 linux_continue_one_process. Use resume_ptr.
12317 (linux_resume): Use linux_continue_one_thread.
12318 * server.c (handle_v_cont, handle_v_requests): New functions.
12319 (myresume): New function.
12320 (main): Handle 'v' case.
12321 * target.h (struct thread_resume): New type.
12322 (struct target_ops): Change argument of "resume" to struct
12323 thread_resume *.
12324 (myresume): Delete macro.
12325
c938e9b0
L
123262003-08-08 H.J. Lu <hongjiu.lu@intel.com>
12327
12328 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
12329 (uninstall): Support DESTDIR.
12330
7f313d07
BC
12331Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
12332
12333 * configure.srv: Add xscale*linux copy of arm*linux entry.
12334
3b2fc2ea
DJ
123352003-07-24 Daniel Jacobowitz <drow@mvista.com>
12336
12337 * linux-arm-low.c (arm_reinsert_addr): New function.
12338 (the_low_target): Add arm_reinsert_addr.
12339
1c0a559e
MK
123402003-07-08 Mark Kettenis <kettenis@gnu.org>
12341
12342 * mem-break.c: Remove whitespace at end of file.
12343
43d5792c
DJ
123442003-06-28 Daniel Jacobowitz <drow@mvista.com>
12345
12346 * configure.in: Check whether we need to prototype strerror.
12347 * server.h: Optionally prototype strerror.
12348 * gdbreplay.c (perror_with_name): Use strerror.
12349 * linux-low.c (linux_attach_lwp): Use strerror.
12350 * utils.c (perror_with_name): Use strerror.
12351 * config.in, configure: Regenerated.
12352
c8a86edf
DJ
123532003-06-28 Daniel Jacobowitz <drow@mvista.com>
12354
12355 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
12356 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
12357
73d37363
DJ
123582003-06-20 Daniel Jacobowitz <drow@mvista.com>
12359
12360 * Makefile.in (SFILES): Update.
12361 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
12362 low-sun3.c: Remove files.
12363
6ad8ae5c
DJ
123642003-06-17 Daniel Jacobowitz <drow@mvista.com>
12365
12366 * linux-low.c: Move comment to linux_thread_alive where it belonged.
12367 (linux_detach_one_process, linux_detach): New functions.
12368 (linux_target_ops): Add linux_detach.
12369 * server.c (main): Handle 'D' packet.
12370 * target.h (struct target_ops): Add "detach" member.
12371 (detach_inferior): Define.
12372
1581182a
MK
123732003-06-13 Mark Kettenis <kettenis@gnu.org>
12374
12375 From Kelley Cook <kelleycook@wideopenwest.com>:
12376 * configure.srv: Accept i[34567]86 variants.
12377
e5379b03
DJ
123782003-06-05 Daniel Jacobowitz <drow@mvista.com>
12379
12380 * linux-low.c (linux_wait_for_event): Correct comment typos.
12381 (linux_resume_one_process): Call check_removed_breakpoint.
12382 (linux_send_signal): New function.
12383 (linux_target_ops): Add linux_send_signal.
12384 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
12385 of kill.
12386 * target.h (struct target_ops): Add send_signal.
12387
2ff29de4
JB
123882003-05-29 Jim Blandy <jimb@redhat.com>
12389
12390 * linux-low.c (usr_store_inferior_registers): Transfer buf in
12391 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
12392 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
12393 away part of the register's value.
12394
254787d4
DJ
123952003-03-26 Daniel Jacobowitz <drow@mvista.com>
12396
12397 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
12398 (linux_wait_for_event, linux_init_signals): Likewise.
12399
94e10508
DJ
124002003-03-17 Daniel Jacobowitz <drow@mvista.com>
12401
12402 * configure.in: Check for stdlib.h.
12403 * configure: Regenerated.
12404 * config.in: Regenerated.
12405
4c0711e0
DJ
124062003-01-04 Andreas Schwab <schwab@suse.de>
12407
12408 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
12409
ef66e766
AC
124102003-01-02 Andrew Cagney <ac131313@redhat.com>
12411
12412 * Makefile.in: Remove obsolete code.
12413
a1358604
DJ
124142002-11-20 Daniel Jacobowitz <drow@mvista.com>
12415
12416 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
12417 defined(PT_FPR0_HI).
12418
23ce3b1c
DJ
124192002-11-17 Stuart Hughes <seh@zee2.com>
12420
12421 * linux-arm-low.c (arm_num_regs): Increase.
12422 (arm_regmap): Include status register.
12423
124242002-11-17 Daniel Jacobowitz <drow@mvista.com>
12425
12426 * linux-low.c (register_addr): Remove incorrect -1 check.
12427
a9fa9f7d
DJ
124282002-08-29 Daniel Jacobowitz <drow@mvista.com>
12429
12430 * linux-low.c (linux_create_inferior): Call setpgid. Return
12431 the new PID.
12432 (unstopped_p, linux_signal_pid): Remove.
12433 (linux_target_ops): Remove linux_signal_pid.
12434 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
12435 global instead of target method.
12436 * target.h (struct target_ops): Remove signal_pid. Update comment
12437 for create_inferior.
12438 * server.c (signal_pid): New variable.
12439 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 12440 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
12441 (attach_inferior): Set signal_pid.
12442
17574093
DJ
124432002-08-23 Daniel Jacobowitz <drow@mvista.com>
12444
12445 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
12446
124472002-08-20 Jim Blandy <jimb@redhat.com>
12448
12449 * Makefile.in (LDFLAGS): Allow the configure script to establish a
12450 default for this.
12451
124522002-08-01 Andrew Cagney <cagney@redhat.com>
12453
12454 * Makefile.in: Make chill references obsolete.
12455
124562002-07-24 Kevin Buettner <kevinb@redhat.com>
12457
12458 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
12459 * configure: Regenerate.
12460 * config.in: Regenerate.
12461
124622002-07-09 David O'Brien <obrien@FreeBSD.org>
12463
12464 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
12465 (perror_with_name, remote_close, remote_open, expect, play): Static.
12466
124672002-07-04 Michal Ludvig <mludvig@suse.cz>
12468
4b8dad4a 12469 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
12470 byte offsets instead of an array of indexes.
12471 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
12472
124732002-06-13 Daniel Jacobowitz <drow@mvista.com>
12474
12475 * regcache.c: Add comment.
12476
124772002-06-11 Daniel Jacobowitz <drow@mvista.com>
12478
12479 * thread-db.c: New file.
12480 * proc-service.c: New file.
12481 * acinclude.m4: New file.
12482 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
12483 proc-service.o, and thread-db.o.
12484 (linux-low.o): Add USE_THREAD_DB.
12485 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
12486 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
12487 * aclocal.m4: Regenerated.
12488 * config.in: Regenerated.
12489 * configure: Regenerated.
12490 * configure.in: Check for proc_service.h, sys/procfs.h,
12491 thread_db.h, and linux/elf.h headrs.
12492 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
12493 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
12494 Check for -lthread_db and thread support.
12495 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
12496 PowerPC, and SuperH.
12497 * i387-fp.c: Constify arguments.
12498 * i387-fp.h: Likewise.
12499 * inferiors.c: (struct thread_info): Renamed from
12500 `struct inferior_info'. Remove PID member. Use generic inferior
12501 list header. All uses updated.
12502 (inferiors, signal_pid): Removed.
12503 (all_threads): New variable.
12504 (get_thread): Define.
12505 (add_inferior_to_list): New function.
12506 (for_each_inferior): New function.
12507 (change_inferior_id): New function.
12508 (add_inferior): Removed.
12509 (remove_inferior): New function.
12510 (add_thread): New function.
12511 (free_one_thread): New function.
12512 (remove_thread): New function.
12513 (clear_inferiors): Use for_each_inferior and free_one_thread.
12514 (find_inferior): New function.
12515 (find_inferior_id): New function.
12516 (inferior_target_data): Update argument type.
12517 (set_inferior_target_data): Likewise.
12518 (inferior_regcache_data): Likewise.
12519 (set_inferior_regcache_data): Likewise.
12520 * linux-low.c (linux_bp_reinsert): Remove.
12521 (all_processes, stopping_threads, using_thrads)
12522 (struct pending_signals, debug_threads, pid_of): New.
12523 (inferior_pid): Replace with macro.
12524 (struct inferior_linux_data): Remove.
12525 (get_stop_pc, add_process): New functions.
12526 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
12527 Use add_process and add_thread.
12528 (linux_attach_lwp): New function, based on old linux_attach. Use
12529 add_process and add_thread. Set stop_expected for new threads.
12530 (linux_attach): New function.
12531 (linux_kill_one_process): New function.
12532 (linux_kill): Kill all LWPs.
12533 (linux_thread_alive): Use find_inferior_id.
12534 (check_removed_breakpoints, status_pending_p): New functions.
12535 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
12536 Update. Use WNOHANG. Wait for cloned processes also. Update process
12537 struct for the found process.
12538 (linux_wait_for_event): New function.
12539 (linux_wait): Use it. Support LWPs.
12540 (send_sigstop, wait_for_sigstop, stop_all_processes)
12541 (linux_resume_one_process, linux_continue_one_process): New functions.
12542 (linux_resume): Support LWPs.
12543 (REGISTER_RAW_SIZE): Remove.
12544 (fetch_register): Use register_size instead. Call supply_register.
12545 (usr_store_inferior_registers): Likewise. Call collect_register.
12546 Fix recursive case.
12547 (regsets_fetch_inferior_registers): Improve error message.
12548 (regsets_store_inferior_registers): Add debugging.
12549 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
12550 (unstopped_p, linux_signal_pid): New functions.
12551 (linux_target_ops): Add linux_signal_pid.
12552 (linux_init_signals): New function.
12553 (initialize_low): Call it. Initialize using_threads.
12554 * regcache.c (inferior_regcache_data): Add valid
12555 flag.
12556 (get_regcache): Fetch registers lazily. Add fetch argument
12557 and update all callers.
12558 (regcache_invalidate_one, regcache_invalidate): New
12559 functions.
12560 (new_register_cache): Renamed from create_register_cache.
12561 Return the new regcache.
12562 (free_register_cache): Change argument to a void *.
12563 (registers_to_string, registers_from_string): Call get_regcache
12564 with fetch flag set.
12565 (register_data): Make static. Pass fetch flag to get_regcache.
12566 (supply_register): Call get_regcache with fetch flag clear.
12567 (collect_register): Call get_regcache with fetch flag set.
12568 (collect_register_as_string): New function.
12569 * regcache.h: Update.
12570 * remote-utils.c (putpkt): Flush after debug output and use
12571 stderr.
12572 Handle input interrupts while waiting for an ACK.
12573 (input_interrupt): Use signal_pid method.
12574 (getpkt): Flush after debug output and use stderr.
12575 (outreg): Use collect_register_as_string.
12576 (new_thread_notify, dead_thread_notify): New functions.
12577 (prepare_resume_reply): Check using_threads. Set thread_from_wait
12578 and general_thread.
12579 (look_up_one_symbol): Flush after debug output.
12580 * server.c (step_thread, server_waiting): New variables.
12581 (start_inferior): Don't use signal_pid. Update call to mywait.
12582 (attach_inferior): Update call to mywait.
12583 (handle_query): Handle qfThreadInfo and qsThreadInfo.
12584 (main): Don't fetch/store registers explicitly. Use
12585 set_desired_inferior. Support proposed ``Hs'' packet. Update
12586 calls to mywait.
12587 * server.h: Update.
12588 (struct inferior_list, struct_inferior_list_entry): New.
12589 * target.c (set_desired_inferior): New.
12590 (write_inferior_memory): Constify.
12591 (mywait): New function.
12592 * target.h: Update.
12593 (struct target_ops): New signal_pid method.
12594 (mywait): Removed macro, added prototype.
12595
12596 * linux-low.h (regset_func): Removed.
12597 (regset_fill_func, regset_store_func): New.
12598 (enum regset_type): New.
12599 (struct regset_info): Add type field. Use new operation types.
12600 (struct linux_target_ops): stop_pc renamed to get_pc.
12601 Add decr_pc_after_break and breakpoint_at.
12602 (get_process, get_thread_proess, get_process_thread)
12603 (strut process_info, all_processes, linux_attach_lwp)
12604 (thread_db_init): New.
12605
12606 * linux-arm-low.c (arm_get_pc, arm_set_pc,
12607 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
12608 (the_low_target): Add new members.
12609 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
12610 (i386_store_fpxregset): Constify.
12611 (target_regsets): Add new kind identifier.
12612 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
12613 (i386_set_pc): Add debugging.
12614 (i386_breakpoint_at): New function.
12615 (the_low_target): Add new members.
12616 * linux-mips-low.c (mips_get_pc, mips_set_pc)
12617 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
12618 (mips_breakpoint_at): New.
12619 (the_low_target): Add new members.
12620 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
12621 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
12622 (the_low_target): Add new members.
12623 * linux-sh-low.c (sh_get_pc, sh_set_pc)
12624 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
12625 (the_low_target): Add new members.
12626 * linux-x86-64-low.c (target_regsets): Add new kind
12627 identifier.
12628
126292002-05-15 Daniel Jacobowitz <drow@mvista.com>
12630
12631 From Martin Pool <mbp@samba.org>:
12632 * server.c (gdbserver_usage): New function.
12633 (main): Call it.
12634
126352002-05-14 Daniel Jacobowitz <drow@mvista.com>
12636
12637 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
12638 stop_at -> stop_pc.
12639
126402002-05-04 Andrew Cagney <ac131313@redhat.com>
12641
12642 * Makefile.in: Remove obsolete code.
12643
126442002-04-24 Michal Ludvig <mludvig@suse.cz>
12645
12646 * linux-low.c (regsets_fetch_inferior_registers),
12647 (regsets_store_inferior_registers): Removed cast to int from
12648 ptrace() calls.
12649 * regcache.h: Added declaration of struct inferior_info.
12650
126512002-04-20 Daniel Jacobowitz <drow@mvista.com>
12652
12653 * inferiors.c (struct inferior_info): Add regcache_data.
12654 (add_inferior): Call create_register_cache.
12655 (clear_inferiors): Call free_register_cache.
12656 (inferior_regcache_data, set_inferior_regcache_data): New functions.
12657 * regcache.c (struct inferior_regcache_data): New.
12658 (registers): Remove.
12659 (get_regcache): New function.
12660 (create_register_cache, free_register_cache): New functions.
12661 (set_register_cache): Don't initialize the register cache here.
12662 (registers_to_string, registers_from_string, register_data): Call
12663 get_regcache.
12664 * regcache.h: Add prototypes.
12665 * server.h: Likewise.
12666
126672002-04-20 Daniel Jacobowitz <drow@mvista.com>
12668
12669 * mem-break.c: New file.
12670 * mem-break.h: New file.
12671 * Makefile.in: Add mem-break.o rule; update server.h
12672 dependencies.
12673 * inferiors.c (struct inferior_info): Add target_data
12674 member.
12675 (clear_inferiors): Free target_data member if set.
12676 (inferior_target_data, set_inferior_target_data): New functions.
12677 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
12678 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
12679 * linux-low.c (linux_bp_reinsert): New variable.
12680 (struct inferior_linux_data): New.
12681 (linux_create_inferior): Use set_inferior_target_data.
12682 (linux_attach): Likewise. Call add_inferior.
12683 (linux_wait_for_one_inferior): New function.
12684 (linux_wait): Call it.
12685 (linux_write_memory): Add const.
12686 (initialize_low): Call set_breakpoint_data.
12687 * linux-low.h (struct linux_target_ops): Add breakpoint
12688 handling members.
12689 * server.c (attach_inferior): Remove extra add_inferior
12690 call.
12691 * server.h: Include mem-break.h. Update inferior.c
12692 prototypes.
12693 * target.c (read_inferior_memory)
12694 (write_inferior_memory): New functions.
12695 * target.h (read_inferior_memory)
12696 (write_inferior_memory): Change macros to prototypes.
12697 (struct target_ops): Update comments. Add const to write_memory
12698 definition.
12699
127002002-04-11 Daniel Jacobowitz <drow@mvista.com>
12701
12702 * linux-low.c (usr_store_inferior_registers): Support
12703 registers which are allowed to fail to store.
12704 * linux-low.h (linux_target_ops): Likewise.
12705 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
12706 (ppc_cannot_store_register): FPSCR may not be storable.
12707
127082002-04-09 Daniel Jacobowitz <drow@mvista.com>
12709
12710 * server.h: Include <string.h> if HAVE_STRING_H.
12711 * ChangeLog: Correct paths in last ChangeLog entry.
12712
127132002-04-09 Daniel Jacobowitz <drow@mvista.com>
12714
12715 * linux-low.h: Remove obsolete prototypes.
12716 (struct linux_target_ops): New.
12717 (extern the_low_target): New.
12718 * linux-low.c (num_regs, regmap): Remove declarations.
12719 (register_addr): Use the_low_target explicitly.
12720 (fetch_register): Likewise.
12721 (usr_fetch_inferior_registers): Likewise.
12722 (usr_store_inferior_registers): Likewise.
12723 * linux-arm-low.c (num_regs): Remove.
12724 (arm_num_regs): Define.
12725 (arm_regmap): Renamed from regmap, made static.
12726 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
12727 made static.
12728 (arm_cannot_store_register): Renamed from cannot_store_register,
12729 made static.
12730 (the_low_target): New.
12731 * linux-i386-low.c (num_regs): Remove.
12732 (i386_num_regs): Define.
12733 (i386_regmap): Renamed from regmap, made static.
12734 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
12735 made static.
12736 (i386_cannot_store_register): Renamed from cannot_store_register,
12737 made static.
12738 (the_low_target): New.
12739 * linux-ia64-low.c (num_regs): Remove.
12740 (ia64_num_regs): Define.
12741 (ia64_regmap): Renamed from regmap, made static.
12742 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
12743 made static.
12744 (ia64_cannot_store_register): Renamed from cannot_store_register,
12745 made static.
12746 (the_low_target): New.
12747 * linux-m68k-low.c (num_regs): Remove.
12748 (m68k_num_regs): Define.
12749 (m68k_regmap): Renamed from regmap, made static.
12750 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
12751 made static.
12752 (m68k_cannot_store_register): Renamed from cannot_store_register,
12753 made static.
12754 (the_low_target): New.
12755 * linux-mips-low.c (num_regs): Remove.
12756 (mips_num_regs): Define.
12757 (mips_regmap): Renamed from regmap, made static.
12758 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
12759 made static.
12760 (mips_cannot_store_register): Renamed from cannot_store_register,
12761 made static.
12762 (the_low_target): New.
12763 * linux-ppc-low.c (num_regs): Remove.
12764 (ppc_num_regs): Define.
12765 (ppc_regmap): Renamed from regmap, made static.
12766 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
12767 made static.
12768 (ppc_cannot_store_register): Renamed from cannot_store_register,
12769 made static.
12770 (the_low_target): New.
12771 * linux-s390-low.c (num_regs): Remove.
12772 (s390_num_regs): Define.
12773 (s390_regmap): Renamed from regmap, made static.
12774 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
12775 made static.
12776 (s390_cannot_store_register): Renamed from cannot_store_register,
12777 made static.
12778 (the_low_target): New.
12779 * linux-sh-low.c (num_regs): Remove.
12780 (sh_num_regs): Define.
12781 (sh_regmap): Renamed from regmap, made static.
12782 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
12783 made static.
12784 (sh_cannot_store_register): Renamed from cannot_store_register,
12785 made static.
12786 (the_low_target): New.
12787 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
12788 (the_low_target): New.
12789
127902002-04-09 Daniel Jacobowitz <drow@mvista.com>
12791
12792 * Makefile.in: Add stamp-h target.
12793 * configure.in: Create stamp-h.
12794 * configure: Regenerated.
12795
127962002-04-09 Daniel Jacobowitz <drow@mvista.com>
12797
12798 * inferiors.c: New file.
12799 * target.c: New file.
12800 * target.h: New file.
12801 * Makefile.in: Add target.o and inferiors.o. Update
12802 dependencies.
12803 * linux-low.c (inferior_pid): New static variable,
12804 moved from server.c.
12805 (linux_create_inferior): Renamed from create_inferior.
12806 Call add_inferior. Return 0 on success instead of a PID.
12807 (linux_attach): Renamed from myattach.
12808 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
12809 (linux_thread_alive): Renamed from mythread_alive.
12810 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
12811 child dies.
12812 (linux_resume): Renamed from myresume. Add missing ``return 0''.
12813 (regsets_store_inferior_registers): Correct error message.
12814 Add missing ``return 0''.
12815 (linux_fetch_registers): Renamed from fetch_inferior_registers.
12816 (linux_store_registers): Renamed from store_inferior_registers.
12817 (linux_read_memory): Renamed from read_inferior_memory.
12818 (linux_write_memory): Renamed from write_inferior_memory.
12819 (linux_target_ops): New structure.
12820 (initialize_low): Call set_target_ops ().
12821 * remote-utils.c (unhexify): New function.
12822 (hexify): New function.
12823 (input_interrupt): Send signals to ``signal_pid''.
12824 * server.c (inferior_pid): Remove.
12825 (start_inferior): Update create_inferior call.
12826 (attach_inferior): Call add_inferior.
12827 (handle_query): New function.
12828 (main): Call handle_query for `q' packets.
12829 * server.h: Include "target.h". Remove obsolete prototypes.
12830 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
12831
128322002-04-09 Daniel Jacobowitz <drow@mvista.com>
12833
12834 * Makefile.in: Add WARN_CFLAGS. Update configury
12835 dependencies.
12836 * configure.in: Check for <string.h>
12837 * configure: Regenerate.
12838 * config.in: Regenerate.
12839 * gdbreplay.c: Include needed system headers.
12840 (remote_open): Remove strchr prototype.
12841 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
12842 * regcache.c (supply_register): Change buf argument to const void *.
12843 (supply_register_by_name): Likewise.
12844 (collect_register): Change buf argument to void *.
12845 (collect_register_by_name): Likewise.
12846 * regcache.h: Add missing prototypes.
12847 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
12848 * server.c (handle_query): New function.
12849 (attached): New static variable, moved out of main.
12850 (main): Quiet longjmp clobber warnings.
12851 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
12852 * utils.c (error): Remove NORETURN.
12853 (fatal): Likewise.
This page took 2.05468 seconds and 4 git commands to generate.