gdbserver: fix killed-outside.exp
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
1 2015-11-30 Pedro Alves <palves@redhat.com>
2
3 * linux-low.c (thread_still_has_status_pending_p): Don't check
4 vCont;t here.
5 (lwp_resumed): New function.
6 (status_pending_p_callback): Return early if the LWP is not
7 supposed to be resumed.
8
9 2015-11-30 Pedro Alves <palves@redhat.com>
10
11 * linux-low.c (handle_extended_wait): Assert that the LWP's
12 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
13 thread create events, leave the new child's status pending.
14 (linux_low_filter_event): If GDB wants to hear about thread exit
15 events, leave the LWP marked dead and don't delete it.
16 (linux_wait_for_event_filtered): Don't check for thread exit.
17 (filter_exit_event): New function.
18 (linux_wait_1): Use it, when returning an exit event.
19 (linux_resume_one_lwp_throw): Assert that the LWP's
20 waitstatus is TARGET_WAITKIND_IGNORE.
21 * remote-utils.c (prepare_resume_reply): Handle
22 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
23 * server.c (report_thread_events): New global.
24 (handle_general_set): Handle QThreadEvents.
25 (handle_query) <qSupported>: Handle and report QThreadEvents+;
26 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
27 TARGET_WAITKIND_THREAD_EXITED.
28 * server.h (report_thread_events): Declare.
29
30 2015-11-30 Pedro Alves <palves@redhat.com>
31
32 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
33 the thread's last_resume_kind was resume_stop.
34
35 2015-11-30 Pedro Alves <palves@redhat.com>
36
37 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
38 before returning.
39
40 2015-11-30 Pedro Alves <palves@redhat.com>
41
42 * server.c (handle_v_requests): Handle vCtrlC.
43
44 2015-11-30 Pedro Alves <palves@redhat.com>
45
46 * gdbthread.h (find_any_thread_of_pid): Declare.
47 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
48 functions.
49 * server.c (handle_query): If current_thread is NULL, look for
50 another thread of the selected process.
51
52 2015-11-26 Daniel Colascione <dancol@dancol.org>
53 Simon Marchi <simon.marchi@ericsson.com>
54
55 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
56 * server.c (handle_qxfer_threads_worker): Refactor to include thread
57 name in reply.
58 * target.h (struct target_ops) <thread_name>: New field.
59 (target_thread_name): New macro.
60
61 2015-11-23 Joel Brobecker <brobecker@adacore.com>
62
63 * regcache.h (regcache_invalidate_pid): Add declaration.
64 * regcache.c (regcache_invalidate_pid): New function, extracted
65 from regcache_invalidate.
66 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
67 Add trivial documentation comment.
68 * lynx-low.c: Use regcache_invalidate_pid instead of
69 regcache_invalidate.
70
71 2015-11-23 Joel Brobecker <brobecker@adacore.com>
72
73 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
74 and Elf64_auxv_t if the target is Android.
75
76 2015-11-22 Doug Evans <xdje42@gmail.com>
77
78 * target.h: #include <sys/types.h>.
79
80 2015-11-19 Pedro Alves <palves@redhat.com>
81
82 * linux-low.c (linux_process_qsupported): Change prototype.
83 Adjust.
84 * linux-low.h (struct linux_target_ops) <process_qsupported>:
85 Change prototype.
86 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
87 and adjust to loop over all features.
88 * server.c (handle_query) <qSupported>: Adjust to call
89 target_process_qsupported once, passing it a vector of unprocessed
90 features.
91 * target.h (struct target_ops) <process_qsupported>: Change
92 prototype.
93 (target_process_qsupported): Adjust.
94
95 2015-11-19 Pedro Alves <palves@redhat.com>
96
97 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
98 mode.
99 * configure: Regenerate.
100
101 2015-11-19 Pedro Alves <palves@redhat.com>
102
103 * configure: Regenerate.
104
105 2015-11-19 Yao Qi <yao.qi@linaro.org>
106
107 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
108 type to uint32_t.
109
110 2015-11-19 Yao Qi <yao.qi@linaro.org>
111
112 * linux-aarch64-low.c (enum aarch64_operand_type): New.
113 (struct aarch64_operand): Move enum out.
114
115 2015-11-19 Yao Qi <yao.qi@linaro.org>
116
117 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
118 struct user_fpsimd_state *.
119 (aarch64_store_fpregset): Likewise.
120
121 2015-11-19 Yao Qi <yao.qi@linaro.org>
122
123 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
124 struct user_pt_regs *.
125 (aarch64_store_gregset): Likewise.
126
127 2015-11-18 Pedro Alves <palves@redhat.com>
128
129 * Makefile.in (all_object_files): Add $IPA_OBJS.
130
131 2015-11-17 Pedro Alves <palves@redhat.com>
132
133 * win32-low.c (win32_resume): Use gdb_signal_from_host,
134 GDB_SIGNAL_0 and gdb_signal_to_string.
135
136 2015-11-17 Pedro Alves <palves@redhat.com>
137
138 * win32-low.c (handle_output_debug_string): Remove parameter.
139 (win32_kill): Remove our_status local and adjust call to
140 handle_output_debug_string.
141 (get_child_debug_event): Adjust call to
142 handle_output_debug_string.
143
144 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
145
146 * linux-mips-low.c (mips_fill_gregset): Add cast.
147 (mips_store_gregset): Likewise.
148 (mips_fill_fpregset): Likewise.
149 (mips_store_fpregset): Likewise.
150
151 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
152
153 * linux-mips-low.c (mips_add_watchpoint): Rename private to
154 priv.
155
156 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
157
158 * linux-mips-low.c (mips_linux_new_thread): Change type of
159 watch_type to enum target_hw_bp_type.
160
161 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
162
163 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
164 Change return type to arm_hwbp_type.
165
166 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
167
168 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
169 (arm_store_gregset): Likewise.
170 * linux-arm-low.c (arm_get_hwcap): Likewise.
171 (arm_read_description): Likewise.
172
173 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
174
175 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
176
177 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
178
179 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
180 (ppc_fill_vsxregset): Likewise.
181 (ppc_store_vsxregset): Likewise.
182 (ppc_fill_vrregset): Likewise.
183 (ppc_store_vrregset): Likewise.
184 (ppc_fill_evrregset): Likewise.
185 (ppc_store_evrregset): Likewise.
186
187 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
188
189 * linux-ppc-low.c (ppc_usrregs_info): Remove
190 forward-declaration.
191 (ppc_arch_setup): Move lower in file.
192
193 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
194
195 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
196 (ps_pdwrite): Likewise.
197
198 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
199
200 * linux-arm-low.c (arm_new_thread): Move pointer dereference
201 to after assert checks.
202
203 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
204
205 * proc-service.c (ps_pdread): Add/adjust casts.
206 (ps_pdwrite): Add/adjust casts.
207
208 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
209
210 * server.c (handle_search_memory_1): Cast return value of
211 memmem.
212
213 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
214
215 * server.c (write_qxfer_response): Change type of data to
216 gdb_byte *.
217
218 2015-10-29 Pedro Alves <palves@redhat.com>
219
220 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
221
222 2015-10-29 Pedro Alves <palves@redhat.com>
223
224 * tracepoint.c (clear_installed_tracepoints): Add casts.
225
226 2015-10-29 Pedro Alves <palves@redhat.com>
227
228 * server.c (handle_v_cont, process_serial_event): Add enum
229 gdb_signal casts to signal parsing code.
230
231 2015-10-29 Pedro Alves <palves@redhat.com>
232
233 * linux-low.h (NULL_REGSET): Define.
234 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
235 * linux-arm-low.c (arm_regsets): Likewise.
236 * linux-crisv32-low.c (cris_regsets): Likewise.
237 * linux-m68k-low.c (m68k_regsets): Likewise.
238 * linux-mips-low.c (mips_regsets): Likewise.
239 * linux-nios2-low.c (nios2_regsets): Likewise.
240 * linux-ppc-low.c (ppc_regsets): Likewise.
241 * linux-s390-low.c (s390_regsets): Likewise.
242 * linux-sh-low.c (sh_regsets): Likewise.
243 * linux-sparc-low.c (sparc_regsets): Likewise.
244 * linux-tic6x-low.c (tic6x_regsets): Likewise.
245 * linux-tile-low.c (tile_regsets): Likewise.
246 * linux-x86-low.c (x86_regsets): Likewise.
247 * linux-xtensa-low.c (xtensa_regsets): Likewise.
248
249 2015-10-29 Pedro Alves <palves@redhat.com>
250
251 * linux-low.h (NULL_REGSET): Define.
252 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
253 * linux-arm-low.c (arm_regsets): Likewise.
254 * linux-crisv32-low.c (cris_regsets): Likewise.
255 * linux-m68k-low.c (m68k_regsets): Likewise.
256 * linux-mips-low.c (mips_regsets): Likewise.
257 * linux-nios2-low.c (nios2_regsets): Likewise.
258 * linux-ppc-low.c (ppc_regsets): Likewise.
259 * linux-s390-low.c (s390_regsets): Likewise.
260 * linux-sh-low.c (sh_regsets): Likewise.
261 * linux-sparc-low.c (sparc_regsets): Likewise.
262 * linux-tic6x-low.c (tic6x_regsets): Likewise.
263 * linux-tile-low.c (tile_regsets): Likewise.
264 * linux-x86-low.c (x86_regsets): Likewise.
265 * linux-xtensa-low.c (xtensa_regsets): Likewise.
266
267 2015-10-26 Doug Evans <dje@google.com>
268
269 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
270
271 2015-10-26 Doug Evans <dje@google.com>
272
273 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
274
275 2015-10-26 Doug Evans <dje@google.com>
276
277 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
278 for debug_printf.
279 (attach_thread, find_new_threads_callback): Ditto.
280
281 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
282
283 * mem-break.h (set_breakpoint_data): Remove.
284
285 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
286
287 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
288 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
289 (initialize_low): Remove set_breakpoint_data call.
290 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
291 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
292 (initialize_low): Remove set_breakpoint_data call.
293 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
294 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
295 (initialize_low): Remove set_breakpoint_data call.
296
297 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
298
299 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
300 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
301 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
302 * target.h (target_breakpoint_kind_from_pc): New macro.
303
304 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
305
306 * linux-low.c (default_breakpoint_kind_from_pc): New function.
307 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
308 the default breakpoint kind.
309
310 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
311
312 * linux-arm-low.c (arm_supports_z_point_type): Add software
313 breakpoint support.
314
315 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
316
317 * linux-arm-low.c: Refactor breakpoint definitions.
318 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
319 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
320
321 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
322
323 * Makefile.in: Add arm.c/o.
324 * configure.srv: Likewise.
325 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
326 (arm_breakpoint_kind_from_pc): New function.
327 (arm_sw_breakpoint_from_kind): Return proper kind.
328 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
329
330 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
331
332 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
333 removal.
334 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
335 (struct raw_breakpoint) <size>: Remove.
336 (struct raw_breakpoint) <kind>: Add.
337 (bp_size): New function.
338 (bp_opcode): Likewise.
339 (find_raw_breakpoint_at): Adjust for kind.
340 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
341 (remove_memory_breakpoint): Adjust for kind call bp_size.
342 (set_raw_breakpoint_at): Adjust for kind.
343 (set_breakpoint): Likewise.
344 (set_breakpoint_at): Call breakpoint_kind_from_pc.
345 (delete_raw_breakpoint): Adjust for kind.
346 (delete_breakpoint): Likewise.
347 (find_gdb_breakpoint): Likewise.
348 (set_gdb_breakpoint_1): Likewise.
349 (set_gdb_breakpoint): Likewise.
350 (delete_gdb_breakpoint_1): Likewise.
351 (delete_gdb_breakpoint): Likewise.
352 (uninsert_raw_breakpoint): Likewise.
353 (reinsert_raw_breakpoint): Likewise.
354 (set_breakpoint_data): Remove.
355 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
356 (check_mem_read): Adjust for kind call bp_size.
357 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
358 (clone_one_breakpoint): Adjust for kind.
359 * mem-break.h (set_gdb_breakpoint): Likewise.
360 (delete_gdb_breakpoint): Likewise.
361 * server.c (process_serial_event): Likewise.
362
363 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
364
365 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
366 (struct linux_target_ops) <breakpoint>: Remove.
367 (struct linux_target_ops) <breakpoint_len>: Remove.
368 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
369 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
370 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
371 (arm_sw_breakpoint_from_kind): New function.
372 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
373 (struct linux_target_ops) <breakpoint>: Remove.
374 (struct linux_target_ops) <breakpoint_len>: Remove.
375 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
376 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
377 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
378 (struct linux_target_ops) <breakpoint>: Remove.
379 (struct linux_target_ops) <breakpoint_len>: Remove.
380 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
381 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
382 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
383 (struct linux_target_ops) <breakpoint>: Remove.
384 (struct linux_target_ops) <breakpoint_len>: Remove.
385 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
386 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
387 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
388 and sw_breakpoint_from_kind to increment the pc.
389 (linux_breakpoint_kind_from_pc): New function.
390 (linux_sw_breakpoint_from_kind): New function.
391 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
392 (initialize_low): Call breakpoint_kind_from_pc and
393 sw_breakpoint_from_kind to replace breakpoint_data/len.
394 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
395 New field.
396 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
397 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
398 (struct linux_target_ops) <breakpoint>: Remove.
399 (struct linux_target_ops) <breakpoint_len>: Remove.
400 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
401 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
402 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
403 (struct linux_target_ops) <breakpoint>: Remove.
404 (struct linux_target_ops) <breakpoint_len>: Remove.
405 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
406 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
407 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
408 (struct linux_target_ops) <breakpoint>: Remove.
409 (struct linux_target_ops) <breakpoint_len>: Remove.
410 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
411 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
412 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
413 (struct linux_target_ops) <breakpoint>: Remove.
414 (struct linux_target_ops) <breakpoint_len>: Remove.
415 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
416 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
417 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
418 (struct linux_target_ops) <breakpoint>: Remove.
419 (struct linux_target_ops) <breakpoint_len>: Remove.
420 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
421 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
422 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
423 (struct linux_target_ops) <breakpoint>: Remove.
424 (struct linux_target_ops) <breakpoint_len>: Remove.
425 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
426 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
427 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
428 (struct linux_target_ops) <breakpoint>: Remove.
429 (struct linux_target_ops) <breakpoint_len>: Remove.
430 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
431 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
432 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
433 (struct linux_target_ops) <breakpoint>: Remove.
434 (struct linux_target_ops) <breakpoint_len>: Remove.
435 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
436 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
437 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
438 (struct linux_target_ops) <breakpoint>: Remove.
439 (struct linux_target_ops) <breakpoint_len>: Remove.
440 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
441 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
442 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
443 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
444 (struct linux_target_ops) <breakpoint>: Remove.
445 (struct linux_target_ops) <breakpoint_len>: Remove.
446 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
447 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
448 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
449 (struct linux_target_ops) <breakpoint>: Remove.
450 (struct linux_target_ops) <breakpoint_len>: Remove.
451 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
452 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
453
454 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
455
456 * linux-cris-low.c (cris_get_pc): Remove void arg.
457
458 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
459
460 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
461 variable name.
462
463 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
464
465 * inferiors.c (thread_pid_matches_callback): New function.
466 (find_thread_process): New function.
467 (remove_thread): Reset current_thread.
468 (remove_process): Assert threads have been removed first.
469
470 2015-10-15 Yao Qi <yao.qi@linaro.org>
471
472 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
473 if it is 3.
474 (aarch64_remove_point): Likewise.
475 * regcache.c (regcache_register_size): New function.
476
477 2015-10-12 Yao Qi <yao.qi@linaro.org>
478
479 * linux-aarch64-low.c: Update all callers as emit_load_store
480 is renamed to aarch64_emit_load_store.
481
482 2015-10-12 Yao Qi <yao.qi@linaro.org>
483
484 * linux-aarch64-low.c: Update all callers of function renaming
485 from emit_insn to aarch64_emit_insn.
486
487 2015-10-12 Yao Qi <yao.qi@linaro.org>
488
489 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
490 arch/aarch64-insn.h.
491 (struct aarch64_memory_operand): Likewise.
492 (ENCODE): Likewise.
493 (emit_insn): Move to arch/aarch64-insn.c.
494 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
495 (emit_load_store): Move to arch/aarch64-insn.c.
496 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
497 (can_encode_int32): Remove.
498
499 2015-10-12 Yao Qi <yao.qi@linaro.org>
500
501 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
502 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
503 (aarch64_relocate_instruction): Likewise.
504 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
505 (struct aarch64_insn_visitor): Likewise.
506
507 2015-10-12 Yao Qi <yao.qi@linaro.org>
508
509 * linux-aarch64-low.c (struct aarch64_insn_data): New.
510 (struct aarch64_insn_visitor): New.
511 (struct aarch64_insn_relocation_data): New.
512 (aarch64_ftrace_insn_reloc_b): New function.
513 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
514 (aarch64_ftrace_insn_reloc_cb): Likewise.
515 (aarch64_ftrace_insn_reloc_tb): Likewise.
516 (aarch64_ftrace_insn_reloc_adr): Likewise.
517 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
518 (aarch64_ftrace_insn_reloc_others): Likewise.
519 (visitor): New.
520 (aarch64_relocate_instruction): Use visitor.
521
522 2015-10-12 Yao Qi <yao.qi@linaro.org>
523
524 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
525 int. Add argument buf.
526 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
527 aarch64_relocate_instruction.
528
529 2015-10-12 Yao Qi <yao.qi@linaro.org>
530
531 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
532 argument insn. Remove local variable insn. Don't call
533 target_read_uint32.
534 (aarch64_install_fast_tracepoint_jump_pad): Call
535 target_read_uint32.
536
537 2015-09-30 Yao Qi <yao.qi@linaro.org>
538
539 * linux-aarch64-low.c (emit_movk): Shorten a long line.
540 (emit_load_store_pair): Likewise.
541
542 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
543
544 * dll.c (match_dll): Add cast(s).
545 (unloaded_dll): Likewise.
546 * linux-low.c (second_thread_of_pid_p): Likewise.
547 (delete_lwp_callback): Likewise.
548 (count_events_callback): Likewise.
549 (select_event_lwp_callback): Likewise.
550 (linux_set_resume_request): Likewise.
551 * server.c (accumulate_file_name_length): Likewise.
552 (emit_dll_description): Likewise.
553 (handle_qxfer_threads_worker): Likewise.
554 (visit_actioned_threads): Likewise.
555 * thread-db.c (any_thread_of): Likewise.
556 * tracepoint.c (same_process_p): Likewise.
557 (match_blocktype): Likewise.
558 (build_traceframe_info_xml): Likewise.
559
560 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
561
562 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
563 assignment.
564 (gdb_unparse_agent_expr): Likewise.
565 * hostio.c (require_data): Likewise.
566 (handle_pread): Likewise.
567 * linux-low.c (disable_regset): Likewise.
568 (fetch_register): Likewise.
569 (store_register): Likewise.
570 (get_dynamic): Likewise.
571 (linux_qxfer_libraries_svr4): Likewise.
572 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
573 (set_fast_tracepoint_jump): Likewise.
574 (uninsert_fast_tracepoint_jumps_at): Likewise.
575 (reinsert_fast_tracepoint_jumps_at): Likewise.
576 (validate_inserted_breakpoint): Likewise.
577 (clone_agent_expr): Likewise.
578 * regcache.c (init_register_cache): Likewise.
579 * remote-utils.c (putpkt_binary_1): Likewise.
580 (decode_M_packet): Likewise.
581 (decode_X_packet): Likewise.
582 (look_up_one_symbol): Likewise.
583 (relocate_instruction): Likewise.
584 (monitor_output): Likewise.
585 * server.c (handle_search_memory): Likewise.
586 (handle_qxfer_exec_file): Likewise.
587 (handle_qxfer_libraries): Likewise.
588 (handle_qxfer): Likewise.
589 (handle_query): Likewise.
590 (handle_v_cont): Likewise.
591 (handle_v_run): Likewise.
592 (captured_main): Likewise.
593 * target.c (write_inferior_memory): Likewise.
594 * thread-db.c (try_thread_db_load_from_dir): Likewise.
595 * tracepoint.c (init_trace_buffer): Likewise.
596 (add_tracepoint_action): Likewise.
597 (add_traceframe): Likewise.
598 (add_traceframe_block): Likewise.
599 (cmd_qtdpsrc): Likewise.
600 (cmd_qtdv): Likewise.
601 (cmd_qtstatus): Likewise.
602 (response_source): Likewise.
603 (response_tsv): Likewise.
604 (cmd_qtnotes): Likewise.
605 (gdb_collect): Likewise.
606 (initialize_tracepoint): Likewise.
607
608 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
609
610 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
611 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
612 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
613 <NOP>: New.
614 (enum aarch64_condition_codes): New enum.
615 (w0): New static global.
616 (fp): Likewise.
617 (lr): Likewise.
618 (struct aarch64_memory_operand) <type>: New
619 MEMORY_OPERAND_POSTINDEX type.
620 (postindex_memory_operand): New helper function.
621 (emit_ret): New function.
622 (emit_load_store_pair): New function, factored out of emit_stp
623 with support for MEMORY_OPERAND_POSTINDEX.
624 (emit_stp): Rewrite using emit_load_store_pair.
625 (emit_ldp): New function.
626 (emit_load_store): Likewise.
627 (emit_ldr): Mention post-index instruction in comment.
628 (emit_ldrh): New function.
629 (emit_ldrb): New function.
630 (emit_ldrsw): Mention post-index instruction in comment.
631 (emit_str): Likewise.
632 (emit_subs): New function.
633 (emit_cmp): Likewise.
634 (emit_and): Likewise.
635 (emit_orr): Likewise.
636 (emit_orn): Likewise.
637 (emit_eor): Likewise.
638 (emit_mvn): Likewise.
639 (emit_lslv): Likewise.
640 (emit_lsrv): Likewise.
641 (emit_asrv): Likewise.
642 (emit_mul): Likewise.
643 (emit_sbfm): Likewise.
644 (emit_sbfx): Likewise.
645 (emit_ubfm): Likewise.
646 (emit_ubfx): Likewise.
647 (emit_csinc): Likewise.
648 (emit_cset): Likewise.
649 (emit_nop): Likewise.
650 (emit_ops_insns): New helper function.
651 (emit_pop): Likewise.
652 (emit_push): Likewise.
653 (aarch64_emit_prologue): New function.
654 (aarch64_emit_epilogue): Likewise.
655 (aarch64_emit_add): Likewise.
656 (aarch64_emit_sub): Likewise.
657 (aarch64_emit_mul): Likewise.
658 (aarch64_emit_lsh): Likewise.
659 (aarch64_emit_rsh_signed): Likewise.
660 (aarch64_emit_rsh_unsigned): Likewise.
661 (aarch64_emit_ext): Likewise.
662 (aarch64_emit_log_not): Likewise.
663 (aarch64_emit_bit_and): Likewise.
664 (aarch64_emit_bit_or): Likewise.
665 (aarch64_emit_bit_xor): Likewise.
666 (aarch64_emit_bit_not): Likewise.
667 (aarch64_emit_equal): Likewise.
668 (aarch64_emit_less_signed): Likewise.
669 (aarch64_emit_less_unsigned): Likewise.
670 (aarch64_emit_ref): Likewise.
671 (aarch64_emit_if_goto): Likewise.
672 (aarch64_emit_goto): Likewise.
673 (aarch64_write_goto_address): Likewise.
674 (aarch64_emit_const): Likewise.
675 (aarch64_emit_call): Likewise.
676 (aarch64_emit_reg): Likewise.
677 (aarch64_emit_pop): Likewise.
678 (aarch64_emit_stack_flush): Likewise.
679 (aarch64_emit_zero_ext): Likewise.
680 (aarch64_emit_swap): Likewise.
681 (aarch64_emit_stack_adjust): Likewise.
682 (aarch64_emit_int_call_1): Likewise.
683 (aarch64_emit_void_call_2): Likewise.
684 (aarch64_emit_eq_goto): Likewise.
685 (aarch64_emit_ne_goto): Likewise.
686 (aarch64_emit_lt_goto): Likewise.
687 (aarch64_emit_le_goto): Likewise.
688 (aarch64_emit_gt_goto): Likewise.
689 (aarch64_emit_ge_got): Likewise.
690 (aarch64_emit_ops_impl): New static global variable.
691 (aarch64_emit_ops): New target function, return
692 &aarch64_emit_ops_impl.
693 (struct linux_target_ops): Install it.
694
695 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
696
697 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
698 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
699 aarch64-ipa.o.
700 * linux-aarch64-ipa.c: New file.
701 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
702 and endian.h.
703 (aarch64_get_thread_area): New target method.
704 (extract_signed_bitfield): New helper function.
705 (aarch64_decode_ldr_literal): New function.
706 (enum aarch64_opcodes): New enum.
707 (struct aarch64_register): New struct.
708 (struct aarch64_operand): New struct.
709 (x0): New static global.
710 (x1): Likewise.
711 (x2): Likewise.
712 (x3): Likewise.
713 (x4): Likewise.
714 (w2): Likewise.
715 (ip0): Likewise.
716 (sp): Likewise.
717 (xzr): Likewise.
718 (aarch64_register): New helper function.
719 (register_operand): Likewise.
720 (immediate_operand): Likewise.
721 (struct aarch64_memory_operand): New struct.
722 (offset_memory_operand): New helper function.
723 (preindex_memory_operand): Likewise.
724 (enum aarch64_system_control_registers): New enum.
725 (ENCODE): New macro.
726 (emit_insn): New helper function.
727 (emit_b): New function.
728 (emit_bcond): Likewise.
729 (emit_cb): Likewise.
730 (emit_tb): Likewise.
731 (emit_blr): Likewise.
732 (emit_stp): Likewise.
733 (emit_ldp_q_offset): Likewise.
734 (emit_stp_q_offset): Likewise.
735 (emit_load_store): Likewise.
736 (emit_ldr): Likewise.
737 (emit_ldrsw): Likewise.
738 (emit_str): Likewise.
739 (emit_ldaxr): Likewise.
740 (emit_stxr): Likewise.
741 (emit_stlr): Likewise.
742 (emit_data_processing_reg): Likewise.
743 (emit_data_processing): Likewise.
744 (emit_add): Likewise.
745 (emit_sub): Likewise.
746 (emit_mov): Likewise.
747 (emit_movk): Likewise.
748 (emit_mov_addr): Likewise.
749 (emit_mrs): Likewise.
750 (emit_msr): Likewise.
751 (emit_sevl): Likewise.
752 (emit_wfe): Likewise.
753 (append_insns): Likewise.
754 (can_encode_int32_in): New helper function.
755 (aarch64_relocate_instruction): New function.
756 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
757 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
758 (struct linux_target_ops): Install aarch64_get_thread_area,
759 aarch64_install_fast_tracepoint_jump_pad and
760 aarch64_get_min_fast_tracepoint_insn_len.
761
762 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
763
764 * Makefile.in (aarch64-insn.o): New rule.
765 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
766
767 2015-09-21 Yao Qi <yao.qi@linaro.org>
768
769 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
770
771 2015-09-21 Yao Qi <yao.qi@linaro.org>
772
773 * tracepoint.c (max_jump_pad_size): Remove.
774
775 2015-09-18 Yao Qi <yao.qi@linaro.org>
776
777 * linux-aarch64-low.c: Don't include sys/uio.h.
778 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
779
780 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
781
782 * tracepoint.c (eval_result_type): Change prototype.
783 (condition_true_at_tracepoint): Fix argument to compiled_cond.
784
785 2015-09-15 Pedro Alves <palves@redhat.com>
786
787 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
788 Check whether to report exec events instead of checking whether
789 multiprocess is enabled.
790
791 2015-09-15 Pedro Alves <palves@redhat.com>
792
793 PR remote/18965
794 * remote-utils.c (prepare_resume_reply): Merge
795 TARGET_WAITKIND_VFORK_DONE switch case with the
796 TARGET_WAITKIND_FORKED case.
797
798 2015-09-15 Yao Qi <yao.qi@linaro.org>
799
800 * server.c (handle_query): Check string comparison using
801 "else if" instead of "if".
802
803 2015-09-15 Yao Qi <yao.qi@linaro.org>
804
805 * server.c (vCont_supported): New global variable.
806 (handle_query): Set vCont_supported to 1 if "vContSupported+"
807 matches. Append ";vContSupported+" to own_buf.
808 (handle_v_requests): Append ";s;S" to own_buf if target supports
809 hardware single step or vCont_supported is false.
810 (capture_main): Set vCont_supported to zero.
811
812 2015-09-15 Yao Qi <yao.qi@linaro.org>
813
814 * linux-low.c (linux_supports_conditional_breakpoints): Rename
815 it to ...
816 (linux_supports_hardware_single_step): ... New function.
817 (linux_target_ops): Update.
818 * lynx-low.c (lynx_target_ops): Set field
819 supports_hardware_single_step to target_can_do_hardware_single_step.
820 * nto-low.c (nto_target_ops): Likewise.
821 * spu-low.c (spu_target_ops): Likewise.
822 * win32-low.c (win32_target_ops): Likewise.
823 * target.c (target_can_do_hardware_single_step): New function.
824 * target.h (struct target_ops) <supports_conditional_breakpoints>:
825 Remove. <supports_hardware_single_step>: New field.
826 (target_supports_conditional_breakpoints): Remove.
827 (target_supports_hardware_single_step): New macro.
828 (target_can_do_hardware_single_step): Declare.
829 * server.c (handle_query): Use target_supports_hardware_single_step
830 instead of target_supports_conditional_breakpoints.
831
832 2015-09-15 Yao Qi <yao.qi@linaro.org>
833
834 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
835 function.
836 (struct linux_target_ops the_low_target): Install
837 aarch64_linux_siginfo_fixup.
838
839 2015-09-11 Don Breazeal <donb@codesourcery.com>
840 Luis Machado <lgustavo@codesourcery.com>
841
842 * linux-low.c (linux_mourn): Static declaration.
843 (linux_arch_setup): Move in front of
844 handle_extended_wait.
845 (linux_arch_setup_thread): New function.
846 (handle_extended_wait): Handle exec events. Call
847 linux_arch_setup_thread. Make event_lwp argument a
848 pointer-to-a-pointer.
849 (check_zombie_leaders): Do not check stopped threads.
850 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
851 (linux_low_filter_event): Add lwp and thread for exec'ing
852 non-leader thread if leader thread has been deleted.
853 Refactor code into linux_arch_setup_thread and call it.
854 Pass child lwp pointer by reference to handle_extended_wait.
855 (linux_wait_for_event_filtered): Update comment.
856 (linux_wait_1): Prevent clobbering exec event status.
857 (linux_supports_exec_events): New function.
858 (linux_target_ops) <supports_exec_events>: Initialize new member.
859 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
860 new member.
861 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
862 * server.c (report_exec_events): New global variable.
863 (handle_query): Handle qSupported query for exec-events feature.
864 (captured_main): Initialize report_exec_events.
865 * server.h (report_exec_events): Declare new global variable.
866 * target.h (struct target_ops) <supports_exec_events>: New
867 member.
868 (target_supports_exec_events): New macro.
869 * win32-low.c (win32_target_ops) <supports_exec_events>:
870 Initialize new member.
871
872 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
873
874 * linux-low.c (linux_low_enable_btrace): Remove.
875 (linux_target_ops): Replace linux_low_enable_btrace with
876 linux_enable_btrace.
877
878 2015-09-03 Yao Qi <yao.qi@linaro.org>
879
880 * linux-aarch64-low.c (aarch64_insert_point): Call
881 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
882 returns true.
883
884 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
885
886 * linux-low.c (check_stopped_by_breakpoint): Use
887 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
888
889 2015-08-27 Pedro Alves <palves@redhat.com>
890
891 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
892
893 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
894
895 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
896 the XNEW-family equivalent.
897 (compile_bytecodes): Likewise.
898 * dll.c (loaded_dll): Likewise.
899 * event-loop.c (append_callback_event): Likewise.
900 (create_file_handler): Likewise.
901 (create_file_event): Likewise.
902 * hostio.c (handle_open): Likewise.
903 * inferiors.c (add_thread): Likewise.
904 (add_process): Likewise.
905 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
906 * linux-arm-low.c (arm_new_process): Likewise.
907 (arm_new_thread): Likewise.
908 * linux-low.c (add_to_pid_list): Likewise.
909 (linux_add_process): Likewise.
910 (handle_extended_wait): Likewise.
911 (add_lwp): Likewise.
912 (enqueue_one_deferred_signal): Likewise.
913 (enqueue_pending_signal): Likewise.
914 (linux_resume_one_lwp_throw): Likewise.
915 (linux_resume_one_thread): Likewise.
916 (linux_read_memory): Likewise.
917 (linux_write_memory): Likewise.
918 * linux-mips-low.c (mips_linux_new_process): Likewise.
919 (mips_linux_new_thread): Likewise.
920 (mips_add_watchpoint): Likewise.
921 * linux-x86-low.c (initialize_low_arch): Likewise.
922 * lynx-low.c (lynx_add_process): Likewise.
923 * mem-break.c (set_raw_breakpoint_at): Likewise.
924 (set_breakpoint): Likewise.
925 (add_condition_to_breakpoint): Likewise.
926 (add_commands_to_breakpoint): Likewise.
927 (clone_agent_expr): Likewise.
928 (clone_one_breakpoint): Likewise.
929 * regcache.c (new_register_cache): Likewise.
930 * remote-utils.c (look_up_one_symbol): Likewise.
931 * server.c (queue_stop_reply): Likewise.
932 (start_inferior): Likewise.
933 (queue_stop_reply_callback): Likewise.
934 (handle_target_event): Likewise.
935 * spu-low.c (fetch_ppc_memory): Likewise.
936 (store_ppc_memory): Likewise.
937 * target.c (set_target_ops): Likewise.
938 * thread-db.c (thread_db_load_search): Likewise.
939 (try_thread_db_load_1): Likewise.
940 * tracepoint.c (add_tracepoint): Likewise.
941 (add_tracepoint_action): Likewise.
942 (create_trace_state_variable): Likewise.
943 (cmd_qtdpsrc): Likewise.
944 (cmd_qtro): Likewise.
945 (add_while_stepping_state): Likewise.
946 * win32-low.c (child_add_thread): Likewise.
947 (get_image_name): Likewise.
948
949 2015-08-25 Yao Qi <yao.qi@linaro.org>
950
951 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
952
953 2015-08-25 Yao Qi <yao.qi@linaro.org>
954
955 * Makefile.in (aarch64-linux.o): New rule.
956 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
957 srv_tgtobj.
958 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
959 (aarch64_init_debug_reg_state): Make it extern.
960 (aarch64_linux_prepare_to_resume): Remove.
961
962 2015-08-25 Yao Qi <yao.qi@linaro.org>
963
964 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
965 lwp_arch_private_info and ptid_of_lwp.
966
967 2015-08-25 Yao Qi <yao.qi@linaro.org>
968
969 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
970 Find proc_info by find_process_pid. All callers updated.
971
972 2015-08-25 Yao Qi <yao.qi@linaro.org>
973
974 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
975 Remove.
976 (debug_reg_change_callback): Remove.
977 (aarch64_notify_debug_reg_change): Remove.
978
979 2015-08-25 Yao Qi <yao.qi@linaro.org>
980
981 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
982 Call current_lwp_ptid.
983
984 2015-08-25 Yao Qi <yao.qi@linaro.org>
985
986 * linux-aarch64-low.c (debug_reg_change_callback): Use
987 debug_printf.
988
989 2015-08-25 Yao Qi <yao.qi@linaro.org>
990
991 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
992
993 2015-08-25 Yao Qi <yao.qi@linaro.org>
994
995 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
996
997 2015-08-25 Yao Qi <yao.qi@linaro.org>
998
999 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
1000 the code.
1001
1002 2015-08-25 Yao Qi <yao.qi@linaro.org>
1003
1004 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
1005 Remove.
1006 (debug_reg_change_callback): Remove argument entry and add argument
1007 lwp. Remove local variable thread. Don't print thread id in the
1008 debugging output. Don't check whether pid of thread equals to pid.
1009 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
1010 iterate_over_lwps instead find_inferior.
1011
1012 2015-08-24 Pedro Alves <palves@redhat.com>
1013
1014 * inferiors.c (get_first_process): New function.
1015 * inferiors.h (get_first_process): New declaration.
1016 * remote-utils.c (read_ptid): Default to the first process in the
1017 list, instead of to the current thread's process.
1018
1019 2015-08-24 Pedro Alves <palves@redhat.com>
1020
1021 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
1022 * event-loop.c: Likewise.
1023 * remote-utils.c: Likewise.
1024 * tracepoint.c: Likewise.
1025
1026 2015-08-24 Pedro Alves <palves@redhat.com>
1027
1028 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
1029 ptid_get_lwp.
1030
1031 2015-08-21 Pedro Alves <palves@redhat.com>
1032
1033 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
1034 instead of literal 1.
1035
1036 2015-08-21 Pedro Alves <palves@redhat.com>
1037
1038 * tdesc.c (default_description): Explicitly zero-initialize.
1039
1040 2015-08-21 Pedro Alves <palves@redhat.com>
1041
1042 PR gdb/18749
1043 * inferiors.c (remove_thread): Discard any pending stop reply for
1044 this thread.
1045 * server.c (remove_all_on_match_pid): Rename to ...
1046 (remove_all_on_match_ptid): ... this. Work with a filter ptid
1047 instead of a pid.
1048 (discard_queued_stop_replies): Change parameter to a ptid. Now
1049 extern.
1050 (handle_v_kill, kill_inferior_callback, captured_main)
1051 (process_serial_event): Adjust.
1052 * server.h (discard_queued_stop_replies): Declare.
1053
1054 2015-08-21 Pedro Alves <palves@redhat.com>
1055
1056 * linux-low.c (wait_for_sigstop): Always switch to no thread
1057 selected if the previously current thread dies.
1058 * lynx-low.c (lynx_request_interrupt): Use the first thread's
1059 process instead of the current thread's.
1060 * remote-utils.c (input_interrupt): Don't check if there's no
1061 current thread.
1062 * server.c (gdb_read_memory, gdb_write_memory): If setting the
1063 current thread to the general thread fails, error out.
1064 (handle_qxfer_auxv, handle_qxfer_libraries)
1065 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
1066 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
1067 (handle_query): Check if there's a thread selected instead of
1068 checking whether there's any thread in the thread list.
1069 (handle_qxfer_threads, handle_qxfer_btrace)
1070 (handle_qxfer_btrace_conf): Don't error out early if there's no
1071 thread in the thread list.
1072 (handle_v_cont, myresume): Don't set the current thread to the
1073 continue thread.
1074 (process_serial_event) <Hg handling>: Also set thread_id if the
1075 previous general thread is still alive.
1076 (process_serial_event) <g/G handling>: If setting the current
1077 thread to the general thread fails, error out.
1078 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
1079 thread's lwp instead of the current thread's.
1080 * target.c (set_desired_thread): If the desired thread was not
1081 found, leave the current thread pointing to NULL. Return an int
1082 (boolean) indicating success.
1083 * target.h (set_desired_thread): Change return type to int.
1084
1085 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
1086
1087 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
1088 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
1089 #includes.
1090 (ps_get_thread_area): New function.
1091
1092 2015-08-19 Gary Benson <gbenson@redhat.com>
1093
1094 * hostio.c (handle_pread): Do not attempt to read more data
1095 than hostio_reply_with_data can fit in a packet.
1096
1097 2015-08-18 Joel Brobecker <brobecker@adacore.com>
1098
1099 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
1100
1101 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
1102
1103 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
1104
1105 2015-08-06 Pedro Alves <palves@redhat.com>
1106
1107 * tracepoint.c (expr_eval_result): Now an int.
1108
1109 2015-08-06 Pedro Alves <palves@redhat.com>
1110
1111 * gdbthread.h (struct regcache): Forward declare.
1112 (struct thread_info) <regcache_data>: Now a struct regcache
1113 pointer.
1114 * inferiors.c (inferior_regcache_data)
1115 (set_inferior_regcache_data): Now work with struct regcache
1116 pointers.
1117 * inferiors.h (struct regcache): Forward declare.
1118 (inferior_regcache_data, set_inferior_regcache_data): Now work
1119 with struct regcache pointers.
1120 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
1121 (free_register_cache_thread): Remove struct regcache pointer
1122 casts.
1123
1124 2015-08-06 Pedro Alves <palves@redhat.com>
1125
1126 * server.c (captured_main): On error, print the exception message
1127 to stderr, and if run_once is set, throw a quit.
1128
1129 2015-08-06 Pedro Alves <palves@redhat.com>
1130
1131 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
1132 the current thread.
1133
1134 2015-08-06 Pedro Alves <palves@redhat.com>
1135
1136 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
1137 reading beyond the passed in buffer length.
1138
1139 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
1140
1141 * tracepoint.c (symbol_list) <required>: Remove.
1142
1143 2015-08-06 Pedro Alves <palves@redhat.com>
1144
1145 * linux-low.c (handle_extended_wait): Set the fork child's suspend
1146 count if stopping and suspending threads.
1147 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
1148 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
1149 (linux_detach): Complete an ongoing step-over.
1150 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
1151 throughout.
1152 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
1153 (linux_wait_1): If passing a signal to the inferior after
1154 finishing a step-over, unsuspend and re-resume all lwps. If we
1155 see a single-step event but the thread should be continuing, don't
1156 pass the trap to gdb.
1157 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
1158 internal_error instead of gdb_assert.
1159 (enqueue_pending_signal): New function.
1160 (check_ptrace_stopped_lwp_gone): Add debug output.
1161 (start_step_over): Use internal_error instead of gdb_assert.
1162 (complete_ongoing_step_over): New function.
1163 (linux_resume_one_thread): Don't resume a suspended thread.
1164 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
1165 it stepping.
1166
1167 2015-08-06 Pedro Alves <palves@redhat.com>
1168
1169 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
1170 (linux_thread_alive): Use lwp_is_marked_dead.
1171 (extended_event_reported): Delete.
1172 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
1173 instead of extended_event_reported.
1174 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
1175 as well.
1176 (lwp_is_marked_dead): New function.
1177 (lwp_running): Use lwp_is_marked_dead.
1178 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
1179 comment.
1180
1181 2015-08-06 Pedro Alves <palves@redhat.com>
1182
1183 * linux-low.c (linux_wait_1): Move fork event output out of the
1184 !report_to_gdb check. Pass event_child->waitstatus to
1185 target_waitstatus_to_string instead of ourstatus.
1186
1187 2015-08-04 Yao Qi <yao.qi@linaro.org>
1188
1189 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
1190 if current_thread is 32 bit.
1191
1192 2015-08-04 Yao Qi <yao.qi@linaro.org>
1193
1194 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
1195 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
1196 * server.c (extended_protocol): Remove "static".
1197 * server.h (extended_protocol): Declare it.
1198
1199 2015-08-04 Yao Qi <yao.qi@linaro.org>
1200
1201 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
1202 both aarch64 and aarch32.
1203 (aarch64_set_pc): Likewise.
1204
1205 2015-08-04 Yao Qi <yao.qi@linaro.org>
1206
1207 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
1208 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
1209 arm-with-neon.xml to srv_xmlfiles.
1210 * linux-aarch64-low.c: Include linux-aarch32-low.h.
1211 (is_64bit_tdesc): New function.
1212 (aarch64_linux_read_description): New function.
1213 (aarch64_arch_setup): Call aarch64_linux_read_description.
1214 (regs_info): Rename to regs_info_aarch64.
1215 (aarch64_regs_info): Return right regs_info.
1216 (initialize_low_arch): Call initialize_low_arch_aarch32.
1217
1218 2015-08-04 Yao Qi <yao.qi@linaro.org>
1219
1220 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
1221 * linux-aarch32-low.c: New file.
1222 * linux-aarch32-low.h: New file.
1223 * linux-arm-low.c (arm_fill_gregset): Move it to
1224 linux-aarch32-low.c.
1225 (arm_store_gregset): Likewise.
1226 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
1227 (arm_store_vfpregset): Call arm_store_vfpregset_num.
1228 (arm_arch_setup): Check if PTRACE_GETREGSET works.
1229 (regs_info): Rename to regs_info_arm.
1230 (arm_regs_info): Return regs_info_aarch32 if
1231 have_ptrace_getregset is 1 and target description is
1232 arm_with_neon or arm_with_vfpv3.
1233 (initialize_low_arch): Don't call init_registers_arm_with_neon.
1234 Call initialize_low_arch_aarch32 instead.
1235
1236 2015-08-04 Yao Qi <yao.qi@linaro.org>
1237
1238 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
1239 * linux-low.c: ... here.
1240 * linux-low.h (have_ptrace_getregset): Declare it.
1241
1242 2015-08-04 Pedro Alves <palves@redhat.com>
1243
1244 * thread-db.c (struct thread_db): Use new typedefs.
1245 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
1246 CHK calls.
1247 (disable_thread_event_reporting): Cast result of dlsym to
1248 destination function pointer type.
1249 (thread_db_mourn): Use td_ta_delete_ftype.
1250
1251 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
1252
1253 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
1254 arch variant.
1255 (CDX_BREAKPOINT): Define for R2.
1256 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
1257 (the_low_target): Add comments.
1258
1259 2015-07-30 Yao Qi <yao.qi@linaro.org>
1260
1261 * linux-arm-low.c (arm_hwcap): Remove it.
1262 (arm_read_description): New local variable arm_hwcap. Don't
1263 set arm_hwcap to zero.
1264
1265 2015-07-30 Yao Qi <yao.qi@linaro.org>
1266
1267 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
1268 Use regcache->tdesc instead.
1269 (arm_store_wmmxregset): Likewise.
1270 (arm_fill_vfpregset): Likewise.
1271 (arm_store_vfpregset): Likewise.
1272
1273 2015-07-30 Yao Qi <yao.qi@linaro.org>
1274
1275 * linux-arm-low.c: Include arch/arm.h.
1276 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
1277 (arm_store_gregset): Likewise.
1278
1279 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
1280
1281 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
1282 ptrace's 4th parameter.
1283
1284 2015-07-27 Yao Qi <yao.qi@linaro.org>
1285
1286 * configure.srv (case aarch64*-*-linux*): Don't set
1287 srv_linux_usrregs.
1288
1289 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
1290
1291 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
1292 sys/ptrace.h.
1293 * linux-arm-low.c: Likewise.
1294 * linux-cris-low.c: Likewise.
1295 * linux-crisv32-low.c: Likewise.
1296 * linux-low.c: Likewise.
1297 * linux-m68k-low.c: Likewise.
1298 * linux-mips-low.c: Likewise.
1299 * linux-nios2-low.c: Likewise.
1300 * linux-s390-low.c: Likewise.
1301 * linux-sparc-low.c: Likewise.
1302 * linux-tic6x-low.c: Likewise.
1303 * linux-tile-low.c: Likewise.
1304 * linux-x86-low.c: Likewise.
1305
1306 2015-07-24 Pedro Alves <palves@redhat.com>
1307
1308 * config.in: Regenerate.
1309 * configure: Regenerate.
1310
1311 2015-07-24 Pedro Alves <palves@redhat.com>
1312
1313 * acinclude.m4: Include ../ptrace.m4.
1314 * configure.ac: Call GDB_AC_PTRACE.
1315 * config.in, configure: Regenerate.
1316
1317 2015-07-24 Yao Qi <yao.qi@linaro.org>
1318
1319 * linux-low.c (linux_create_inferior): Remove setting to
1320 proc->priv->new_inferior.
1321 (linux_attach): Likewise.
1322 (linux_low_filter_event): Likewise.
1323 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
1324
1325 2015-07-24 Yao Qi <yao.qi@linaro.org>
1326
1327 * linux-low.c (linux_arch_setup): New function.
1328 (linux_low_filter_event): If proc->tdesc is NULL and
1329 proc->attached is true, call the_low_target.arch_setup.
1330 Otherwise, keep status pending, and return.
1331 (linux_resume_one_lwp_throw): Don't call get_pc if
1332 thread->while_stepping isn't NULL. Don't call
1333 get_thread_regcache if proc->tdesc is NULL.
1334 (need_step_over_p): Return 0 if proc->tdesc is NULL.
1335 (linux_target_ops): Install arch_setup.
1336 * server.c (start_inferior): Call the_target->arch_setup.
1337 * target.h (struct target_ops) <arch_setup>: New field.
1338 (target_arch_setup): New marco.
1339 * lynx-low.c (lynx_target_ops): Update.
1340 * nto-low.c (nto_target_ops): Update.
1341 * spu-low.c (spu_target_ops): Update.
1342 * win32-low.c (win32_target_ops): Update.
1343
1344 2015-07-24 Yao Qi <yao.qi@linaro.org>
1345
1346 * linux-low.c (linux_add_process): Don't set
1347 proc->priv->new_inferior.
1348 (linux_create_inferior): Set proc->priv->new_inferior to 1.
1349 (linux_attach): Likewise.
1350
1351 2015-07-24 Yao Qi <yao.qi@linaro.org>
1352
1353 * server.c (start_inferior): Code refactor.
1354
1355 2015-07-24 Yao Qi <yao.qi@linaro.org>
1356
1357 * server.c (process_serial_event): Set general_thread.
1358
1359 2015-07-21 Yao Qi <yao.qi@linaro.org>
1360
1361 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
1362 aarch64_linux_get_debug_reg_capacity.
1363
1364 2015-07-17 Yao Qi <yao.qi@linaro.org>
1365
1366 * Makefile.in (aarch64-linux-hw-point.o): New rule.
1367 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
1368 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
1369 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
1370 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
1371 (AARCH64_HWP_ALIGNMENT): Likewise.
1372 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
1373 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
1374 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
1375 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
1376 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
1377 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
1378 (struct aarch64_debug_reg_state): Likewise.
1379 (struct arch_lwp_info): Likewise.
1380 (aarch64_align_watchpoint): Likewise.
1381 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
1382 (aarch64_watchpoint_length): Likewise.
1383 (aarch64_point_encode_ctrl_reg): Likewise
1384 (aarch64_point_is_aligned): Likewise.
1385 (aarch64_align_watchpoint): Likewise.
1386 (aarch64_linux_set_debug_regs):
1387 (aarch64_dr_state_insert_one_point): Likewise.
1388 (aarch64_dr_state_remove_one_point): Likewise.
1389 (aarch64_handle_breakpoint): Likewise.
1390 (aarch64_handle_aligned_watchpoint): Likewise.
1391 (aarch64_handle_unaligned_watchpoint): Likewise.
1392 (aarch64_handle_watchpoint): Likewise.
1393
1394 2015-07-17 Yao Qi <yao.qi@linaro.org>
1395
1396 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
1397 and don't aarch64_get_debug_reg_state. All callers update.
1398 (aarch64_handle_aligned_watchpoint): Likewise.
1399 (aarch64_handle_unaligned_watchpoint): Likewise.
1400 (aarch64_handle_watchpoint): Likewise.
1401 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
1402 (aarch64_remove_point): Likewise.
1403
1404 2015-07-17 Yao Qi <yao.qi@linaro.org>
1405
1406 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
1407 debug_printf.
1408 (aarch64_handle_unaligned_watchpoint): Likewise.
1409
1410 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
1411
1412 Revert the previous 3 commits:
1413 Move gdb_regex* to common/
1414 Move linux_find_memory_regions_full & co.
1415 gdbserver build-id attribute generator
1416
1417 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1418 Jan Kratochvil <jan.kratochvil@redhat.com>
1419
1420 gdbserver build-id attribute generator.
1421 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
1422 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
1423 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
1424 (find_phdr): New.
1425 (get_dynamic): Use find_pdhr to traverse program headers.
1426 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
1427 (compare_mapping_entry_range, struct find_memory_region_callback_data)
1428 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
1429 (get_hex_build_id): New.
1430 (linux_qxfer_libraries_svr4): Add optional build-id attribute
1431 to reply XML document.
1432
1433 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1434 Jan Kratochvil <jan.kratochvil@redhat.com>
1435
1436 * target.c: Include target/target-utils.h and fcntl.h.
1437 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
1438 (target_fileio_read_stralloc): New functions.
1439
1440 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
1441
1442 * Makefile.in (OBS): Add gdb_regex.o.
1443 (gdb_regex.o): New.
1444 * config.in: Rebuilt.
1445 * configure: Rebuilt.
1446
1447 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1448 Jan Kratochvil <jan.kratochvil@redhat.com>
1449
1450 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
1451 * Makefile.in (OBS): Add target-utils.o.
1452 (linux-maps.o, target-utils.o): New.
1453 * configure.srv (srv_linux_obj): Add linux-maps.o.
1454
1455 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
1456
1457 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
1458 function, return 1.
1459 (the_low_target): Install it.
1460
1461 2015-07-14 Pedro Alves <palves@redhat.com>
1462
1463 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
1464 Instead, ignore ECHILD, and throw an error for other errnos.
1465
1466 2015-07-10 Pedro Alves <palves@redhat.com>
1467
1468 * event-loop.c (struct callback_event) <data>: Change type to
1469 gdb_client_data instance instead of gdb_client_data pointer.
1470 (append_callback_event): Adjust.
1471
1472 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
1473
1474 * linux-aarch64-low.c: Add comments for each linux_target_ops
1475 method. Remove comments already covered in target_ops and
1476 linux_target_ops definitions.
1477 (the_low_target): Add comments for each unimplemented method.
1478
1479 2015-07-09 Yao Qi <yao.qi@linaro.org>
1480
1481 * linux-aarch64-low.c (aarch64_regmap): Remove.
1482 (aarch64_usrregs_info): Remove.
1483 (regs_info): Set field usrregs to NULL.
1484
1485 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
1486
1487 * linux-low.c: Include "rsp-low.h"
1488 (linux_low_encode_pt_config, linux_low_encode_raw): New.
1489 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
1490 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
1491 (handle_btrace_enable_pt): New.
1492 (handle_btrace_general_set): Support "pt".
1493 (handle_btrace_conf_general_set): Support "pt:size".
1494
1495 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
1496
1497 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
1498 Z_PACKET_SW_BP.
1499
1500 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
1501
1502 * linux-aarch64-low.c: Remove comment about endianness.
1503 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
1504 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
1505 memcmp.
1506
1507 2015-06-24 Gary Benson <gbenson@redhat.com>
1508
1509 * linux-i386-ipa.c (stdint.h): Do not include.
1510 * lynx-i386-low.c (stdint.h): Likewise.
1511 * lynx-ppc-low.c (stdint.h): Likewise.
1512 * mem-break.c (stdint.h): Likewise.
1513 * thread-db.c (stdint.h): Likewise.
1514 * tracepoint.c (stdint.h): Likewise.
1515 * win32-low.c (stdint.h): Likewise.
1516
1517 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
1518
1519 * server.c (write_qxfer_response): Update call to
1520 remote_escape_output.
1521
1522 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
1523 Jan Kratochvil <jan.kratochvil@redhat.com>
1524
1525 Merge multiple hex conversions.
1526 * gdbreplay.c (tohex): Rename to 'fromhex'.
1527 (logchar): Use fromhex.
1528
1529 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
1530
1531 * server.c (handle_qxfer_libraries): Set `version' attribute for
1532 <library-list>.
1533
1534 2015-06-10 Gary Benson <gbenson@redhat.com>
1535
1536 * target.h (struct target_ops) <multifs_open>: New field.
1537 <multifs_unlink>: Likewise.
1538 <multifs_readlink>: Likewise.
1539 * linux-low.c (nat/linux-namespaces.h): New include.
1540 (linux_target_ops): Initialize the_target->multifs_open,
1541 the_target->multifs_unlink and the_target->multifs_readlink.
1542 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
1543 * hostio.c (hostio_fs_pid): New static variable.
1544 (hostio_handle_new_gdb_connection): New function.
1545 (handle_setfs): Likewise.
1546 (handle_open): Use the_target->multifs_open as appropriate.
1547 (handle_unlink): Use the_target->multifs_unlink as appropriate.
1548 (handle_readlink): Use the_target->multifs_readlink as
1549 appropriate.
1550 (handle_vFile): Handle vFile:setfs packets.
1551 * server.c (handle_query): Call hostio_handle_new_gdb_connection
1552 after target_handle_new_gdb_connection.
1553
1554 2015-06-10 Gary Benson <gbenson@redhat.com>
1555
1556 * configure.ac (AC_CHECK_FUNCS): Add setns.
1557 * config.in: Regenerate.
1558 * configure: Likewise.
1559 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
1560 (linux-namespaces.o): New rule.
1561 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
1562
1563 2015-06-09 Gary Benson <gbenson@redhat.com>
1564
1565 * hostio.c (handle_open): Process mode argument with
1566 fileio_to_host_mode.
1567
1568 2015-06-01 Yao Qi <yao.qi@linaro.org>
1569
1570 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
1571 * linux-x86-low.c: Likewise.
1572
1573 2015-05-28 Don Breazeal <donb@codesourcery.com>
1574
1575 * linux-low.c (handle_extended_wait): Initialize
1576 thread_info.last_resume_kind for new fork children.
1577
1578 2015-05-15 Pedro Alves <palves@redhat.com>
1579
1580 * target.h (target_handle_new_gdb_connection): Rewrite using if
1581 wrapped in do/while.
1582
1583 2015-05-14 Joel Brobecker <brobecker@adacore.com>
1584
1585 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
1586 * configure, config.in: Regenerate.
1587 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
1588 Declare typedef.
1589
1590 2015-05-12 Don Breazeal <donb@codesourcery.com>
1591
1592 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
1593 PTRACE_EVENT_VFORK_DONE.
1594 (linux_low_ptrace_options, extended_event_reported): Add vfork
1595 events.
1596 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
1597 and "vforkdone" for RSP 'T' Stop Reply Packet.
1598 * server.h (report_vfork_events): Declare
1599 global variable.
1600
1601 2015-05-12 Don Breazeal <donb@codesourcery.com>
1602
1603 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
1604 (the_low_target) <new_fork>: Initialize new member.
1605 * linux-arm-low.c (arm_new_fork): New function.
1606 (the_low_target) <new_fork>: Initialize new member.
1607 * linux-low.c (handle_extended_wait): Call new target function
1608 new_fork.
1609 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
1610 * linux-mips-low.c (mips_add_watchpoint): New function
1611 extracted from mips_insert_point.
1612 (the_low_target) <new_fork>: Initialize new member.
1613 (mips_linux_new_fork): New function.
1614 (mips_insert_point): Call mips_add_watchpoint.
1615 * linux-x86-low.c (x86_linux_new_fork): New function.
1616 (the_low_target) <new_fork>: Initialize new member.
1617
1618 2015-05-12 Don Breazeal <donb@codesourcery.com>
1619
1620 * linux-low.c (handle_extended_wait): Implement return value,
1621 rename argument 'event_child' to 'event_lwp', handle
1622 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
1623 (linux_low_ptrace_options): New function.
1624 (linux_low_filter_event): Call linux_low_ptrace_options,
1625 use different argument fo linux_enable_event_reporting,
1626 use return value from handle_extended_wait.
1627 (extended_event_reported): New function.
1628 (linux_wait_1): Call extended_event_reported and set
1629 status to report fork events.
1630 (linux_write_memory): Add pid to debug message.
1631 (reset_lwp_ptrace_options_callback): New function.
1632 (linux_handle_new_gdb_connection): New function.
1633 (linux_target_ops): Initialize new structure member.
1634 * linux-low.h (struct lwp_info) <waitstatus>: New member.
1635 * lynx-low.c: Initialize new structure member.
1636 * remote-utils.c (prepare_resume_reply): Implement stop reason
1637 "fork" for "T" stop message.
1638 * server.c (handle_query): Call handle_new_gdb_connection.
1639 * server.h (report_fork_events): Declare global flag.
1640 * target.h (struct target_ops) <handle_new_gdb_connection>:
1641 New member.
1642 (target_handle_new_gdb_connection): New macro.
1643 * win32-low.c: Initialize new structure member.
1644
1645 2015-05-12 Don Breazeal <donb@codesourcery.com>
1646
1647 * mem-break.c (APPEND_TO_LIST): Define macro.
1648 (clone_agent_expr): New function.
1649 (clone_one_breakpoint): New function.
1650 (clone_all_breakpoints): New function.
1651 * mem-break.h: Declare new functions.
1652
1653 2015-05-12 Don Breazeal <donb@codesourcery.com>
1654
1655 * linux-low.c (linux_supports_fork_events): New function.
1656 (linux_supports_vfork_events): New function.
1657 (linux_target_ops): Initialize new structure members.
1658 (initialize_low): Call linux_check_ptrace_features.
1659 * lynx-low.c (lynx_target_ops): Initialize new structure
1660 members.
1661 * server.c (report_fork_events, report_vfork_events):
1662 New global flags.
1663 (handle_query): Add new features to qSupported packet and
1664 response.
1665 (captured_main): Initialize new global variables.
1666 * target.h (struct target_ops) <supports_fork_events>:
1667 New member.
1668 <supports_vfork_events>: New member.
1669 (target_supports_fork_events): New macro.
1670 (target_supports_vfork_events): New macro.
1671 * win32-low.c (win32_target_ops): Initialize new structure
1672 members.
1673
1674 2015-05-12 Gary Benson <gbenson@redhat.com>
1675
1676 * server.c (handle_qxfer_exec_file): Use current process
1677 if annex is empty.
1678
1679 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
1680
1681 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
1682 Remove HAVE_PTRACE_GETREGS conditionals.
1683 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
1684 instead of PTRACE_GETREGS and PTRACE_SETREGS.
1685
1686 2015-05-08 Yao Qi <yao.qi@linaro.org>
1687
1688 * linux-low.c (linux_supports_conditional_breakpoints): New
1689 function.
1690 (linux_target_ops): Install new target method.
1691 * lynx-low.c (lynx_target_ops): Install NULL hook for
1692 supports_conditional_breakpoints.
1693 * nto-low.c (nto_target_ops): Likewise.
1694 * spu-low.c (spu_target_ops): Likewise.
1695 * win32-low.c (win32_target_ops): Likewise.
1696 * server.c (handle_query): Check
1697 target_supports_conditional_breakpoints.
1698 * target.h (struct target_ops) <supports_conditional_breakpoints>:
1699 New field.
1700 (target_supports_conditional_breakpoints): New macro.
1701
1702 2015-05-06 Pedro Alves <palves@redhat.com>
1703
1704 PR server/18081
1705 * server.c (start_inferior): If the process exits, mourn it.
1706
1707 2015-04-21 Gary Benson <gbenson@redhat.com>
1708
1709 * hostio.c (fileio_open_flags_to_host): Factored out to
1710 fileio_to_host_openflags in common/fileio.c. Single use
1711 updated.
1712
1713 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
1714
1715 * linux-xtensa-low.c (xtensa_fill_gregset)
1716 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
1717 XCHAL_HAVE_LOOP.
1718
1719 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
1720
1721 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
1722 (regs_info): Replace usrregs pointer with NULL.
1723
1724 2015-04-17 Gary Benson <gbenson@redhat.com>
1725
1726 * target.h (struct target_ops) <pid_to_exec_file>: New field.
1727 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
1728 * server.c (handle_qxfer_exec_file): New function.
1729 (qxfer_packets): Add exec-file entry.
1730 (handle_query): Report qXfer:exec-file:read as supported packet.
1731
1732 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
1733
1734 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
1735
1736 2015-04-09 Gary Benson <gbenson@redhat.com>
1737
1738 * hostio-errno.c (errno_to_fileio_error): Remove function.
1739 Update caller to use remote_fileio_to_fio_error.
1740
1741 2015-04-09 Yao Qi <yao.qi@linaro.org>
1742
1743 * linux-low.c (linux_insert_point): Call
1744 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
1745 (linux_remove_point): Call remove_memory_breakpoint if type is
1746 raw_bkpt_type_sw.
1747 * linux-x86-low.c (x86_insert_point): Don't call
1748 insert_memory_breakpoint.
1749 (x86_remove_point): Don't call remove_memory_breakpoint.
1750
1751 2015-04-01 Pedro Alves <palves@redhat.com>
1752 Cleber Rosa <crosa@redhat.com>
1753
1754 * server.c (gdbserver_usage): Reorganize and extend the usage
1755 message.
1756
1757 2015-03-24 Pedro Alves <palves@redhat.com>
1758
1759 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
1760 output. Also dump TRAP_TRACE.
1761 (linux_low_filter_event): In debug output, distinguish a
1762 resume_stop SIGSTOP from a delayed SIGSTOP.
1763
1764 2015-03-24 Gary Benson <gbenson@redhat.com>
1765
1766 * linux-x86-low.c (x86_linux_new_thread): Moved to
1767 nat/x86-linux.c.
1768 (x86_linux_prepare_to_resume): Likewise.
1769
1770 2015-03-24 Gary Benson <gbenson@redhat.com>
1771
1772 * Makefile.in (x86-linux-dregs.o): New rule.
1773 * configure.srv: Add x86-linux-dregs.o to relevant targets.
1774 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
1775 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
1776 (x86_linux_dr_get): Likewise.
1777 (x86_linux_dr_set): Likewise.
1778 (update_debug_registers_callback): Likewise.
1779 (x86_linux_dr_set_addr): Likewise.
1780 (x86_linux_dr_get_addr): Likewise.
1781 (x86_linux_dr_set_control): Likewise.
1782 (x86_linux_dr_get_control): Likewise.
1783 (x86_linux_dr_get_status): Likewise.
1784 (x86_linux_update_debug_registers): Likewise.
1785
1786 2015-03-24 Gary Benson <gbenson@redhat.com>
1787
1788 * linux-x86-low.c (x86_linux_update_debug_registers):
1789 New function, factored out from...
1790 (x86_linux_prepare_to_resume): ...this.
1791
1792 2015-03-24 Gary Benson <gbenson@redhat.com>
1793
1794 * linux-x86-low.c (x86_linux_dr_get): Update comments.
1795 (x86_linux_dr_set): Likewise.
1796 (update_debug_registers_callback): Likewise.
1797 (x86_linux_dr_set_addr): Likewise.
1798 (x86_linux_dr_get_addr): Likewise.
1799 (x86_linux_dr_set_control): Likewise.
1800 (x86_linux_dr_get_control): Likewise.
1801 (x86_linux_dr_get_status): Likewise.
1802 (x86_linux_prepare_to_resume): Likewise.
1803
1804 2015-03-24 Gary Benson <gbenson@redhat.com>
1805
1806 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
1807 Use perror_with_name. Pass string through gettext.
1808 (x86_linux_dr_set): Likewise.
1809
1810 2015-03-24 Gary Benson <gbenson@redhat.com>
1811
1812 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
1813 (x86_linux_dr_set_addr): ...this.
1814 (x86_dr_low_get_addr): Rename to...
1815 (x86_linux_dr_get_addr): ...this.
1816 (x86_dr_low_set_control): Rename to...
1817 (x86_linux_dr_set_control): ...this.
1818 (x86_dr_low_get_control): Rename to...
1819 (x86_linux_dr_get_control): ...this.
1820 (x86_dr_low_get_status): Rename to...
1821 (x86_linux_dr_get_status): ...this.
1822 (x86_dr_low): Update with new function names.
1823
1824 2015-03-24 Gary Benson <gbenson@redhat.com>
1825
1826 * Makefile.in (x86-linux.o): New rule.
1827 * configure.srv: Add x86-linux.o to relevant targets.
1828 * linux-low.c (lwp_set_arch_private_info): New function.
1829 (lwp_arch_private_info): Likewise.
1830 * linux-x86-low.c: Include nat/x86-linux.h.
1831 (arch_lwp_info): Removed structure.
1832 (update_debug_registers_callback):
1833 Use lwp_set_debug_registers_changed.
1834 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
1835 and lwp_set_debug_registers_changed.
1836 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
1837
1838 2015-03-24 Gary Benson <gbenson@redhat.com>
1839
1840 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
1841 * linux-arm-low.c (arm_new_thread): Likewise.
1842 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
1843 * linux-mips-low.c (mips_linux_new_thread): Likewise.
1844 * linux-x86-low.c (x86_linux_new_thread): Likewise.
1845 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
1846
1847 2015-03-24 Gary Benson <gbenson@redhat.com>
1848
1849 * linux-low.c (ptid_of_lwp): New function.
1850 (lwp_is_stopped): Likewise.
1851 (lwp_stop_reason): Likewise.
1852 * linux-x86-low.c (update_debug_registers_callback):
1853 Use lwp_is_stopped.
1854 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
1855 lwp_stop_reason.
1856
1857 2015-03-24 Gary Benson <gbenson@redhat.com>
1858
1859 * linux-low.h (linux_stop_lwp): Remove declaration.
1860
1861 2015-03-24 Gary Benson <gbenson@redhat.com>
1862
1863 * linux-low.h: Include nat/linux-nat.h.
1864 * linux-low.c (iterate_over_lwps_args): New structure.
1865 (iterate_over_lwps_filter): New function.
1866 (iterate_over_lwps): Likewise.
1867 * linux-x86-low.c (update_debug_registers_callback):
1868 Update signature to what iterate_over_lwps expects.
1869 Remove PID check that iterate_over_lwps now performs.
1870 (x86_dr_low_set_addr): Use iterate_over_lwps.
1871 (x86_dr_low_set_control): Likewise.
1872
1873 2015-03-24 Gary Benson <gbenson@redhat.com>
1874
1875 * linux-x86-low.c (x86_debug_reg_state): New function.
1876 (x86_linux_prepare_to_resume): Use the above.
1877
1878 2015-03-24 Gary Benson <gbenson@redhat.com>
1879
1880 * linux-low.c (current_lwp_ptid): New function.
1881 * linux-x86-low.c: Include nat/linux-nat.h.
1882 (x86_dr_low_get_addr): Use current_lwp_ptid.
1883 (x86_dr_low_get_control): Likewise.
1884 (x86_dr_low_get_status): Likewise.
1885
1886 2015-03-20 Pedro Alves <palves@redhat.com>
1887
1888 * tracepoint.c (cmd_qtstatus): Make "str" const.
1889
1890 2015-03-20 Pedro Alves <palves@redhat.com>
1891
1892 * server.c (handle_general_set): Make "req_str" const.
1893
1894 2015-03-19 Pedro Alves <palves@redhat.com>
1895
1896 * linux-low.c (linux_resume_one_lwp): Rename to ...
1897 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
1898 instead call perror_with_name.
1899 (check_ptrace_stopped_lwp_gone): New function.
1900 (linux_resume_one_lwp): Reimplement as wrapper around
1901 linux_resume_one_lwp_throw that swallows errors if the LWP is
1902 gone.
1903
1904 2015-03-19 Pedro Alves <palves@redhat.com>
1905
1906 * linux-low.c (count_events_callback, select_event_lwp_callback):
1907 No longer check whether the thread has resume_stop as last resume
1908 kind.
1909
1910 2015-03-19 Pedro Alves <palves@redhat.com>
1911
1912 * linux-low.c (count_events_callback, select_event_lwp_callback):
1913 Use the lwp's status_pending_p field, not the thread's.
1914
1915 2015-03-19 Pedro Alves <palves@redhat.com>
1916
1917 * linux-low.c (select_event_lwp_callback): Update comments to
1918 no longer mention SIGTRAP.
1919
1920 2015-03-18 Gary Benson <gbenson@redhat.com>
1921
1922 * server.c (handle_query): Do not report vFile:fstat as supported.
1923
1924 2015-03-11 Gary Benson <gbenson@redhat.com>
1925
1926 * hostio.c (sys/types.h): New include.
1927 (sys/stat.h): Likewise.
1928 (common-remote-fileio.h): Likewise.
1929 (handle_fstat): New function.
1930 (handle_vFile): Handle vFile:fstat packets.
1931
1932 2015-03-11 Gary Benson <gbenson@redhat.com>
1933
1934 * configure.ac (AC_CHECK_MEMBERS): Add checks for
1935 struct stat.st_blocks and struct stat.st_blksize.
1936 * configure: Regenerate.
1937 * config.in: Likewise.
1938 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
1939 (OBS): Add common-remote-fileio.o.
1940 (common-remote-fileio.o): New rule.
1941
1942 2015-03-09 Pedro Alves <palves@redhat.com>
1943
1944 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
1945 'struct sockaddr' pointer in 'accept' call.
1946
1947 2015-03-09 Pedro Alves <palves@redhat.com>
1948
1949 Revert:
1950 2015-03-07 Pedro Alves <palves@redhat.com>
1951 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
1952 or <winsock2.h> here. Instead include "gdb_socket.h".
1953 (remote_open): Use union gdb_sockaddr_u.
1954 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
1955 or <winsock2.h> here. Instead include "gdb_socket.h".
1956 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
1957 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
1958 or <sys/un.h>.
1959 (init_named_socket, gdb_agent_helper_thread): Use union
1960 gdb_sockaddr_u.
1961
1962 2015-03-07 Pedro Alves <palves@redhat.com>
1963
1964 * configure.ac (build_warnings): Move
1965 -Wdeclaration-after-statement to the C-specific set.
1966 * configure: Regenerate.
1967
1968 2015-03-07 Pedro Alves <palves@redhat.com>
1969
1970 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
1971 or <winsock2.h> here. Instead include "gdb_socket.h".
1972 (remote_open): Use union gdb_sockaddr_u.
1973 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
1974 or <winsock2.h> here. Instead include "gdb_socket.h".
1975 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
1976 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
1977 or <sys/un.h>.
1978 (init_named_socket, gdb_agent_helper_thread): Use union
1979 gdb_sockaddr_u.
1980
1981 2015-03-07 Pedro Alves <palves@redhat.com>
1982
1983 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
1984 instead.
1985
1986 2015-03-06 Yao Qi <yao.qi@linaro.org>
1987
1988 * linux-aarch64-low.c (aarch64_insert_point): Use
1989 show_debug_regs as a boolean.
1990 (aarch64_remove_point): Likewise.
1991
1992 2015-03-05 Pedro Alves <palves@redhat.com>
1993
1994 * lynx-low.c (lynx_target_ops): Install NULL hooks for
1995 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
1996 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
1997 * nto-low.c (nto_target_ops): Likewise.
1998 * spu-low.c (spu_target_ops): Likewise.
1999 * win32-low.c (win32_target_ops): Likewise.
2000
2001 2015-03-04 Pedro Alves <palves@redhat.com>
2002
2003 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
2004 Decide whether a breakpoint triggered based on the SIGTRAP's
2005 siginfo.si_code.
2006 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
2007 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
2008 (linux_low_filter_event): Check for breakpoints before checking
2009 watchpoints.
2010 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
2011 siginfo.si_code.
2012 (linux_stopped_by_sw_breakpoint)
2013 (linux_supports_stopped_by_sw_breakpoint)
2014 (linux_stopped_by_hw_breakpoint)
2015 (linux_supports_stopped_by_hw_breakpoint): New functions.
2016 (linux_target_ops): Install new target methods.
2017
2018 2015-03-04 Pedro Alves <palves@redhat.com>
2019
2020 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
2021 * server.c (swbreak_feature, hwbreak_feature): New globals.
2022 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
2023 (captured_main): Clear swbreak_feature and hwbreak_feature.
2024 * server.h (swbreak_feature, hwbreak_feature): Declare.
2025 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
2026 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
2027 supports_stopped_by_hw_breakpoint>: New fields.
2028 (target_supports_stopped_by_sw_breakpoint)
2029 (target_stopped_by_sw_breakpoint)
2030 (target_supports_stopped_by_hw_breakpoint)
2031 (target_stopped_by_hw_breakpoint): Declare.
2032
2033 2015-03-04 Pedro Alves <palves@redhat.com>
2034
2035 enum lwp_stop_reason -> enum target_stop_reason
2036 * linux-low.c (check_stopped_by_breakpoint): Adjust.
2037 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
2038 (linux_wait_1, stuck_in_jump_pad_callback)
2039 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
2040 (linux_stopped_by_watchpoint):
2041 * linux-low.h (enum lwp_stop_reason): Delete.
2042 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
2043 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
2044
2045 2015-03-04 Yao Qi <yao.qi@linaro.org>
2046
2047 * Makefile.in (SFILES): Add linux-aarch64-low.c.
2048
2049 2015-03-03 Gary Benson <gbenson@redhat.com>
2050
2051 * hostio.c (handle_vFile): Fix prefix lengths.
2052
2053 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
2054
2055 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
2056 ptr_bits.
2057
2058 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
2059
2060 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
2061 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
2062 (clean): Add "rm -f" for above C files.
2063 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
2064 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
2065 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
2066 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
2067 * linux-s390-low.c (HWCAP_S390_VX): New macro.
2068 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
2069 (init_registers_s390x_vx_linux64)
2070 (init_registers_s390x_tevx_linux64)
2071 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
2072 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
2073 declarations.
2074 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
2075 (s390_store_vxrs_high): New functions.
2076 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
2077 NT_S390_VXRS_HIGH.
2078 (s390_arch_setup): Add logic for selecting one of the new target
2079 descriptions. Activate the new vector regsets if applicable.
2080 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
2081 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
2082 and init_registers_s390x_tevx_linux64.
2083
2084 2015-03-01 Pedro Alves <palves@redhat.com>
2085
2086 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
2087 parameter.
2088
2089 2015-02-27 Pedro Alves <palves@redhat.com>
2090
2091 * linux-x86-low.c (u_debugreg_offset): New function.
2092 (x86_linux_dr_get, x86_linux_dr_set): Use it.
2093
2094 2015-02-27 Pedro Alves <palves@redhat.com>
2095
2096 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
2097 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
2098 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
2099 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
2100 (ps_lsetfpregs, ps_getpid)
2101 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
2102 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
2103 (ps_lsetxregs, ps_plog): Declare.
2104
2105 2015-02-27 Pedro Alves <palves@redhat.com>
2106
2107 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
2108 IP_AGENT_EXPORT_FUNC.
2109 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
2110 IP_AGENT_EXPORT_FUNC.
2111 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
2112 (IP_AGENT_EXPORT): Delete.
2113 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
2114 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
2115 (gdb_trampoline_buffer_error, collecting, gdb_collect)
2116 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
2117 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
2118 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
2119 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
2120 (traceframe_read_count, traceframe_write_count)
2121 (traceframes_created, trace_state_variables, get_raw_reg)
2122 (get_trace_state_variable_value, set_trace_state_variable_value)
2123 (ust_loaded, helper_thread_id, cmd_buf): Use
2124 IPA_SYM_EXPORTED_NAME.
2125 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
2126 (tracepoints) Use IP_AGENT_EXPORT_VAR.
2127 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
2128 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2129 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
2130 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
2131 EXTERN_C_PUSH/EXTERN_C_POP.
2132 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
2133 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
2134 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2135 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
2136 (traceframe_write_count, traceframe_read_count)
2137 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
2138 (about_to_request_buffer_space, get_trace_state_variable_value)
2139 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
2140 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
2141 EXTERN_C_PUSH/EXTERN_C_POP.
2142 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
2143 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
2144 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
2145 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2146 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
2147 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
2148 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
2149 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
2150 Define.
2151 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
2152 (IP_AGENT_EXPORT_VAR_DECL): Define.
2153 (tracing): Declare.
2154 (gdb_agent_get_raw_reg): Declare.
2155
2156 2015-02-27 Tom Tromey <tromey@redhat.com>
2157 Pedro Alves <palves@redhat.com>
2158
2159 Rename symbols whose names are reserved C++ keywords throughout.
2160
2161 2015-02-27 Pedro Alves <palves@redhat.com>
2162
2163 * Makefile.in (COMPILER): New, get it from autoconf.
2164 (CXX): Get from autoconf instead.
2165 (COMPILE.pre): Use COMPILER.
2166 (CC-LD): Rename to ...
2167 (CC_LD): ... this. Use COMPILER.
2168 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
2169 (CXX_FOR_TARGET): Default to g++ instead of gcc.
2170 * acinclude.m4: Include build-with-cxx.m4.
2171 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
2172 Disable -Werror by default if building in C++ mode.
2173 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
2174 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
2175 the C++ compiler. Save/restore CXXFLAGS too.
2176 * configure: Regenerate.
2177
2178 2015-02-27 Pedro Alves <palves@redhat.com>
2179
2180 * acinclude.m4: Include libiberty.m4.
2181 * configure.ac: Call libiberty_INIT.
2182 * config.in, configure: Regenerate.
2183
2184 2015-02-26 Pedro Alves <palves@redhat.com>
2185
2186 * linux-low.c (linux_wait_1): When incrementing the PC past a
2187 program breakpoint always use the_low_target.breakpoint_len as
2188 increment, rather than the maximum between that and
2189 the_low_target.decr_pc_after_break.
2190
2191 2015-02-23 Pedro Alves <palves@redhat.com>
2192
2193 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
2194 thread was doing a step-over; always adjust the PC if
2195 we stepped over a permanent breakpoint.
2196 (linux_wait_1): If we stepped over breakpoint that was on top of a
2197 permanent breakpoint, manually advance the PC past it.
2198
2199 2015-02-23 Pedro Alves <palves@redhat.com>
2200
2201 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
2202 modes.
2203 (x86_fill_gregset, x86_store_gregset): Use it when handling
2204 $orig_eax.
2205
2206 2015-02-20 Pedro Alves <palves@redhat.com>
2207
2208 * thread-db.c: Include "nat/linux-procfs.h".
2209 (thread_db_init): Skip listing new threads if the kernel supports
2210 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
2211
2212 2015-02-20 Pedro Alves <palves@redhat.com>
2213
2214 * linux-low.c (status_pending_p_callback): Use ptid_match.
2215
2216 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
2217
2218 PR breakpoints/16812
2219 * linux-low.c (wstatus_maybe_breakpoint): Remove.
2220 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
2221 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
2222
2223 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
2224
2225 PR breakpoints/15956
2226 * tracepoint.c (cmd_qtinit): Add check for current_thread.
2227
2228 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2229
2230 * linux-low.c (linux_low_btrace_conf): Print size.
2231 * server.c (handle_btrace_conf_general_set): New.
2232 (hanle_general_set): Call handle_btrace_conf_general_set.
2233 (handle_query): Report Qbtrace-conf:bts:size as supported.
2234
2235 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2236
2237 * linux-low.c (linux_low_enable_btrace): Update parameters.
2238 (linux_low_btrace_conf): New.
2239 (linux_target_ops)<to_btrace_conf>: Initialize.
2240 * server.c (current_btrace_conf): New.
2241 (handle_btrace_enable): Rename to ...
2242 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
2243 to target_enable_btrace. Update comment. Update users.
2244 (handle_qxfer_btrace_conf): New.
2245 (qxfer_packets): Add btrace-conf entry.
2246 (handle_query): Report qXfer:btrace-conf:read as supported packet.
2247 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
2248 (target_ops)<read_btrace_conf>: New.
2249 (target_enable_btrace): Update parameters.
2250 (target_read_btrace_conf): New.
2251
2252 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2253
2254 * server.c (handle_btrace_general_set): Remove call to
2255 target_supports_btrace.
2256 (supported_btrace_packets): New.
2257 (handle_query): Call supported_btrace_packets.
2258 * target.h: include btrace-common.h.
2259 (btrace_target_info): Removed.
2260 (supports_btrace, target_supports_btrace): Update parameters.
2261
2262 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2263
2264 * Makefile.in (SFILES): Add common/btrace-common.c.
2265 (OBS): Add common/btrace-common.o.
2266 (btrace-common.o): Add build rules.
2267 * linux-low: Include btrace-common.h.
2268 (linux_low_read_btrace): Use struct btrace_data. Call
2269 btrace_data_init and btrace_data_fini.
2270
2271 2015-02-06 Pedro Alves <palves@redhat.com>
2272
2273 * thread-db.c (find_new_threads_callback): Add debug output.
2274
2275 2015-02-04 Pedro Alves <palves@redhat.com>
2276
2277 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
2278 (resume_stopped_resumed_lwps): New function.
2279 (linux_wait_for_event_filtered): Use it.
2280
2281 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
2282
2283 * Makefile.in (SFILES): Add linux-personality.c.
2284 (linux-personality.o): New rule.
2285 * configure.srv (srv_linux_obj): Add linux-personality.o to the
2286 list of objects to be built.
2287 * linux-low.c: Include nat/linux-personality.h.
2288 (linux_create_inferior): Remove code to disable address space
2289 randomization (moved to ../nat/linux-personality.c). Create
2290 cleanup to disable address space randomization.
2291
2292 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
2293
2294 * Makefile.in (posix-strerror.o): New rule.
2295 (mingw-strerror.o): Likewise.
2296 * configure: Regenerated.
2297 * configure.ac: Source file ../common/common.host. Initialize new
2298 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
2299
2300 2015-01-14 Yao Qi <yao@codesourcery.com>
2301
2302 * Makefile.in (SFILES): Add nat/ppc-linux.c.
2303 (ppc-linux.o): New rule.
2304 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
2305 * configure.ac: AC_CHECK_FUNCS(getauxval).
2306 * config.in: Re-generated.
2307 * configure: Re-generated.
2308 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
2309 ppc64_64bit_inferior_p
2310
2311 2015-01-14 Yao Qi <yao@codesourcery.com>
2312
2313 * linux-ppc-low.c: Include "nat/ppc-linux.h".
2314 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
2315 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
2316 (PT_ORIG_R3, PT_TRAP): Likewise.
2317 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
2318 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
2319 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
2320
2321 2015-01-10 Joel Brobecker <brobecker@adacore.com>
2322
2323 * i387-fp.c (i387_cache_to_xsave): In look over
2324 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
2325 zmmh_low_space field by use of zmmh_high_space.
2326
2327 2015-01-09 Pedro Alves <palves@redhat.com>
2328
2329 * linux-low.c (step_over_bkpt): Move higher up in the file.
2330 (handle_extended_wait): Don't store the stop_pc here.
2331 (get_stop_pc): Adjust comments and rename to ...
2332 (check_stopped_by_breakpoint): ... this. Record whether the LWP
2333 stopped for a software breakpoint or hardware breakpoint.
2334 (thread_still_has_status_pending_p): New function.
2335 (status_pending_p_callback): Use
2336 thread_still_has_status_pending_p. If the event is no longer
2337 interesting, resume the LWP.
2338 (handle_tracepoints): Add assert.
2339 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
2340 (wstatus_maybe_breakpoint): New function.
2341 (cancel_breakpoint): Delete function.
2342 (check_stopped_by_watchpoint): New function, factored out from
2343 linux_low_filter_event.
2344 (lp_status_maybe_breakpoint): Delete function.
2345 (linux_low_filter_event): Remove filter_ptid argument.
2346 Leave thread group exits pending here. Store the LWP's stop PC.
2347 Always leave events pending.
2348 (linux_wait_for_event_filtered): Pull all events out of the
2349 kernel, and leave them all pending.
2350 (count_events_callback, select_event_lwp_callback): Consider all
2351 events.
2352 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
2353 (select_event_lwp): Only give preference to the stepping LWP in
2354 all-stop mode. Adjust comments.
2355 (ignore_event): New function.
2356 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
2357 references to cancel_breakpoints. Adjust to renames. Also give
2358 equal priority to all LWPs that have had events in non-stop mode.
2359 If reporting a software breakpoint event, unadjust the LWP's PC.
2360 (linux_wait): If linux_wait_1 returned an ignored event, retry.
2361 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
2362 Adjust.
2363 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
2364 (resume_status_pending_p): Use thread_still_has_status_pending_p.
2365 (linux_stopped_by_watchpoint): Adjust.
2366 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
2367 * linux-low.h (enum lwp_stop_reason): New.
2368 (struct lwp_info) <stop_pc>: Adjust comment.
2369 <stopped_by_watchpoint>: Delete field.
2370 <stop_reason>: New field.
2371 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
2372 * mem-break.c (software_breakpoint_inserted_here)
2373 (hardware_breakpoint_inserted_here): New function.
2374 * mem-break.h (software_breakpoint_inserted_here)
2375 (hardware_breakpoint_inserted_here): Declare.
2376 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
2377 (cancel_breakpoints): Delete.
2378 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
2379 (upload_fast_traceframes): Remove references to
2380 cancel_breakpoints.
2381
2382 2015-01-09 Pedro Alves <palves@redhat.com>
2383
2384 * thread-db.c (find_new_threads_callback): Ignore thread if the
2385 kernel thread ID is -1.
2386
2387 2015-01-09 Pedro Alves <palves@redhat.com>
2388
2389 * linux-low.c (linux_attach_fail_reason_string): Move to
2390 nat/linux-ptrace.c, and rename.
2391 (linux_attach_lwp): Update comment.
2392 (attach_proc_task_lwp_callback): New function.
2393 (linux_attach): Adjust to rename and use
2394 linux_proc_attach_tgid_threads.
2395 (linux_attach_fail_reason_string): Delete declaration.
2396
2397 2015-01-01 Joel Brobecker <brobecker@adacore.com>
2398
2399 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
2400 * server.c (gdbserver_version): Likewise.
2401
2402 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
2403
2404 * remote-utils.c: Include ctype.h.
2405 (input_interrupt): Explicitly handle the case when the char
2406 received is the NUL byte. Improve the printing of non-ASCII
2407 characters.
2408
2409 2014-12-16 Joel Brobecker <brobecker@adacore.com>
2410
2411 * linux-low.c (linux_low_filter_event): Update call to
2412 linux_enable_event_reporting following the addition of
2413 a new parameter to that function.
2414
2415 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
2416
2417 PR server/17457
2418 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
2419 (AARCH64_FPCR_REGNO): Likewise.
2420 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
2421 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
2422 (aarch64_store_fpregset): Likewise.
2423
2424 2014-12-15 Joel Brobecker <brobecker@adacore.com>
2425
2426 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
2427 Remove FIXME comment about assumption about N.
2428
2429 2014-12-13 Joel Brobecker <brobecker@adacore.com>
2430
2431 * configure.ac: If large-file support is disabled in GDBserver,
2432 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
2433 * configure: Regenerate.
2434
2435 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2436
2437 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
2438 warning upon ENODATA from ptrace.
2439 * linux-s390-low.c (s390_store_tdb): New.
2440 (s390_regsets): Add regset for NT_S390_TDB.
2441
2442 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2443
2444 * linux-low.c (regsets_store_inferior_registers): Skip regsets
2445 without a fill_function.
2446 * linux-s390-low.c (s390_fill_last_break): Remove.
2447 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
2448 (s390_arch_setup): Use regset's size instead of fill_function for
2449 loop end condition.
2450
2451 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2452
2453 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
2454 the regset's store function when ptrace returned an error.
2455 * regcache.c (get_thread_regcache): Invalidate register cache
2456 before fetching inferior's registers.
2457
2458 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2459
2460 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
2461 while-loop as for-loop.
2462 (regsets_store_inferior_registers): Likewise.
2463
2464 2014-11-28 Yao Qi <yao@codesourcery.com>
2465
2466 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
2467 * config.in, configure: Re-generate.
2468 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
2469 is defined.
2470
2471 2014-11-21 Yao Qi <yao@codesourcery.com>
2472
2473 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
2474 (AC_CHECK_HEADERS): Remove malloc.h.
2475 * configure: Re-generated.
2476 * config.in: Re-generated.
2477 * server.h: Don't include alloca.h and malloc.h.
2478 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
2479 Don't include malloc.h.
2480
2481 2014-11-17 Joel Brobecker <brobecker@adacore.com>
2482
2483 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
2484 corresponding ERRNO check in same block.
2485
2486 2014-11-12 Pedro Alves <palves@redhat.com>
2487
2488 * server.c (cont_thread): Update comment.
2489 (start_inferior, attach_inferior): No longer clear cont_thread.
2490 (handle_v_cont): No longer set cont_thread.
2491 (captured_main): Clear cont_thread each time a GDB connects.
2492
2493 2014-11-12 Pedro Alves <palves@redhat.com>
2494
2495 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
2496 thread, and don't resume all threads if the Hc thread has exited.
2497
2498 2014-11-12 Pedro Alves <palves@redhat.com>
2499
2500 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
2501 the process group instead of to a specific LWP.
2502
2503 2014-10-15 Pedro Alves <palves@redhat.com>
2504
2505 PR server/17487
2506 * win32-arm-low.c (arm_set_thread_context): Remove current_event
2507 parameter.
2508 (arm_set_thread_context): Delete.
2509 (the_low_target): Adjust.
2510 * win32-i386-low.c (debug_registers_changed)
2511 (debug_registers_used): Delete.
2512 (update_debug_registers_callback): New function.
2513 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
2514 needing to update their debug registers.
2515 (win32_get_current_dr): New function.
2516 (x86_dr_low_get_addr, x86_dr_low_get_control)
2517 (x86_dr_low_get_status): Fetch the debug register from the thread
2518 record's context.
2519 (i386_initial_stuff): Adjust.
2520 (i386_get_thread_context): Remove current_event parameter. Don't
2521 clear debug_registers_changed nor copy DR values to
2522 debug_reg_state.
2523 (i386_set_thread_context): Delete.
2524 (i386_prepare_to_resume): New function.
2525 (i386_thread_added): Mark the thread as needing to update irs
2526 debug registers.
2527 (the_low_target): Remove i386_set_thread_context and install
2528 i386_prepare_to_resume.
2529 * win32-low.c (win32_get_thread_context): Adjust.
2530 (win32_set_thread_context): Use SetThreadContext
2531 directly.
2532 (win32_prepare_to_resume): New function.
2533 (win32_require_context): New function, factored out from ...
2534 (thread_rec): ... this.
2535 (continue_one_thread): Call win32_prepare_to_resume on each thread
2536 we're about to continue.
2537 (win32_resume): Call win32_prepare_to_resume on the event thread.
2538 * win32-low.h (struct win32_thread_info)
2539 <debug_registers_changed>: New field.
2540 (struct win32_target_ops): Change prototype of set_thread_context,
2541 delete set_thread_context and add prepare_to_resume.
2542 (win32_require_context): New declaration.
2543
2544 2014-10-08 Gary Benson <gbenson@redhat.com>
2545
2546 * server.h: Do not include common-exceptions.h.
2547
2548 2014-10-08 Gary Benson <gbenson@redhat.com>
2549
2550 * server.h: Do not include cleanups.h.
2551
2552 2014-09-30 James Hogan <james.hogan@imgtec.com>
2553
2554 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
2555 mips64-dsp-linux.c.
2556
2557 2014-09-23 Yao Qi <yao@codesourcery.com>
2558
2559 * linux-low.c (lp_status_maybe_breakpoint): New function.
2560 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
2561 (count_events_callback): Likewise.
2562 (select_event_lwp_callback): Likewise.
2563 (cancel_breakpoints_callback): Likewise.
2564
2565 2014-09-19 Don Breazeal <donb@codesourcery.com>
2566
2567 * linux-low.c (handle_extended_wait): Call
2568 linux_ptrace_get_extended_event.
2569 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
2570 linux_is_extended_waitstatus.
2571
2572 2014-09-16 Joel Brobecker <brobecker@adacore.com>
2573
2574 * Makefile.in (CPPFLAGS): Define.
2575 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
2576 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
2577
2578 2014-09-16 Gary Benson <gbenson@redhat.com>
2579
2580 * inferiors.h (current_inferior): Renamed as...
2581 (current_thread): New variable. All uses updated.
2582 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
2583 (maybe_move_out_of_jump_pad): Likewise.
2584 (cancel_breakpoint): Likewise.
2585 (linux_low_filter_event): Likewise.
2586 (wait_for_sigstop): Likewise.
2587 (linux_resume_one_lwp): Likewise.
2588 (need_step_over_p): Likewise.
2589 (start_step_over): Likewise.
2590 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
2591 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
2592 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
2593 and save_inferior as saved_thread.
2594 * regcache.c (get_thread_regcache): Renamed saved_inferior as
2595 saved_thread.
2596 (regcache_invalidate_thread): Likewise.
2597 * remote-utils.c (prepare_resume_reply): Likewise.
2598 * thread-db.c (thread_db_get_tls_address): Likewise.
2599 (disable_thread_event_reporting): Likewise.
2600 (remove_thread_event_breakpoints): Likewise.
2601 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
2602 as saved_thread.
2603 * target.h (set_desired_inferior): Renamed as...
2604 (set_desired_thread): New declaration. All uses updated.
2605 * server.c (myresume): Updated comment to reference thread instead
2606 of inferior.
2607 (handle_serial_event): Likewise.
2608 (handle_target_event): Likewise.
2609
2610 2014-09-12 Tom Tromey <tromey@redhat.com>
2611 Gary Benson <gbenson@redhat.com>
2612
2613 * regcache.h: Include common-regcache.h.
2614 (regcache_read_pc): Don't declare.
2615 * regcache.c (get_thread_regcache_for_ptid): New function.
2616
2617 2014-09-11 Tom Tromey <tromey@redhat.com>
2618 Gary Benson <gbenson@redhat.com>
2619
2620 * symbol.c: New file.
2621 * Makefile.in (SFILES): Add symbol.c.
2622 (OBS): Add symbol.o.
2623
2624 2014-09-11 Gary Benson <gbenson@redhat.com>
2625
2626 * target.c (target_stop_ptid, target_continue_ptid): New
2627 functions.
2628
2629 2014-09-11 Tom Tromey <tromey@redhat.com>
2630 Gary Benson <gbenson@redhat.com>
2631
2632 * target.h: Include target/target.h.
2633 * target.c (target_read_memory, target_read_uint32)
2634 (target_write_memory): New functions.
2635
2636 2014-09-11 Gary Benson <gbenson@redhat.com>
2637
2638 * server.h (debug_hw_points): Don't declare.
2639 * server.c (debug_hw_points): Don't define. Replace all uses
2640 with show_debug_regs.
2641 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
2642 all uses with show_debug_regs.
2643
2644 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
2645
2646 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
2647 endianness into account.
2648 (ppc_supply_ptrace_register): Likewise.
2649
2650 2014-09-03 James Hogan <james.hogan@imgtec.com>
2651
2652 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
2653 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
2654
2655 2014-09-03 Gary Benson <gbenson@redhat.com>
2656
2657 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
2658 ALL_DEBUG_ADDRESS_REGISTERS.
2659
2660 2014-09-02 Gary Benson <gbenson@redhat.com>
2661
2662 * i386-low.h: Renamed as...
2663 * x86-low.h: New file. All type, function and variable name
2664 prefixes changed from "i386_" to "x86_". All references updated.
2665 * i386-low.c: Renamed as...
2666 * x86-low.c: New file. All type, function and variable name
2667 prefixes changed from "i386_" to "x86_". All references updated.
2668
2669 2014-09-02 Gary Benson <gbenson@redhat.com>
2670
2671 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
2672 (x86_linux_new_thread): Likewise.
2673
2674 2014-08-29 Gary Benson <gbenson@redhat.com>
2675
2676 * server.h (setjmp.h): Do not include.
2677 (toplevel): Do not declare.
2678 (common-exceptions.h): Include.
2679 (cleanups.h): Likewise.
2680 * server.c (toplevel): Do not define.
2681 (exit_code): New static global.
2682 (detach_or_kill_for_exit_cleanup): New function.
2683 (main): New function. Original main renamed to...
2684 (captured_main): New function.
2685 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
2686
2687 2014-08-29 Gary Benson <gbenson@redhat.com>
2688
2689 * Makefile.in (SFILES): Add common/common-exceptions.c.
2690 (OBS): Add common-exceptions.o.
2691 (common-exceptions.o): New rule.
2692 * utils.c (prepare_to_throw_exception): New function.
2693
2694 2014-08-29 Gary Benson <gbenson@redhat.com>
2695
2696 * config.in: Regenerate.
2697 * configure: Likewise.
2698
2699 2014-08-29 Gary Benson <gbenson@redhat.com>
2700
2701 * Makefile.in (SFILES): Add common/cleanups.c.
2702 (OBS): cleanups.o.
2703 (cleanups.o): New rule.
2704
2705 2014-08-29 Gary Benson <gbenson@redhat.com>
2706
2707 * utils.c (internal_vwarning): New function.
2708
2709 2014-08-28 Gary Benson <gbenson@redhat.com>
2710
2711 * utils.h (fatal): Remove declaration.
2712 * utils.c (fatal): Remove function.
2713
2714 2014-08-28 Gary Benson <gbenson@redhat.com>
2715
2716 * tracepoint.c (gdb_agent_init): Replace fatal with
2717 perror_with_name.
2718 (initialize_tracepoint): Likewise.
2719
2720 2014-08-28 Gary Benson <gbenson@redhat.com>
2721
2722 * remote-utils.c (remote_prepare): Replace fatal with error.
2723
2724 2014-08-28 Gary Benson <gbenson@redhat.com>
2725
2726 * linux-low.c (linux_async): Replace fatal with warning.
2727 Tidy up and return.
2728 (linux_start_non_stop): Return -1 if linux_async failed.
2729
2730 2014-08-28 Gary Benson <gbenson@redhat.com>
2731
2732 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
2733 gdb_assert.
2734 (i386_dr_low_get_addr): Remove vague comment.
2735 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
2736 gdb_assert.
2737
2738 2014-08-28 Gary Benson <gbenson@redhat.com>
2739
2740 * inferiors.c (get_thread_process): Replace check with gdb_assert.
2741 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
2742 internal_error.
2743 (linux_resume_one_lwp): Likewise.
2744 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
2745 gdb_assert.
2746 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
2747 with internal_error.
2748 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
2749 (init_register_cache): Replace fatal with gdb_assert_not_reached.
2750 (find_register_by_name): Replace fatal with internal_error.
2751 (find_regno): Likewise.
2752 * tdesc.c (init_target_desc): Replace check with gdb_assert.
2753 * thread-db.c (thread_db_create_event): Likewise.
2754 (thread_db_load_search): Likewise.
2755 (try_thread_db_load_1): Likewise.
2756 * tracepoint.c (get_jump_space_head): Replace fatal with
2757 internal_error.
2758 (claim_trampoline_space): Likewise.
2759 (have_fast_tracepoint_trampoline_buffer): Likewise.
2760 (cmd_qtstart): Likewise.
2761 (stop_tracing): Likewise.
2762 (fast_tracepoint_collecting): Likewise.
2763 (target_malloc): Likewise.
2764 (download_tracepoint): Likewise.
2765 (download_trace_state_variables): Replace check with gdb_assert.
2766 (upload_fast_traceframes): Replace fatal with internal_error.
2767
2768 2014-08-19 Tom Tromey <tromey@redhat.com>
2769 Gary Benson <gbenson@redhat.com>
2770
2771 * Makefile.in (SFILES): Add common/common-debug.c.
2772 (OBS): Add common-debug.o.
2773 (common-debug.o): New rule.
2774 * debug.h (debug_printf): Don't declare.
2775 * debug.c (debug_printf): Renamed and rewritten as...
2776 (debug_vprintf): New function.
2777
2778 2014-08-19 Gary Benson <gbenson@redhat.com>
2779
2780 * utils.h: Do not include print-utils.h.
2781
2782 2014-08-19 Tom Tromey <tromey@redhat.com>
2783 Gary Benson <gbenson@redhat.com>
2784
2785 * server.h: Add static assertion.
2786 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
2787
2788 2014-08-19 Tom Tromey <tromey@redhat.com>
2789 Gary Benson <gbenson@redhat.com>
2790
2791 * Makefile.in (SFILES): Add common/errors.c.
2792 (OBS): Add errors.o.
2793 (IPA_OBS): Add errors-ipa.o.
2794 (errors.o): New rule.
2795 (errors-ipa.o): Likewise.
2796 * utils.h (perror_with_name, error, warning): Don't declare.
2797 * utils.c (warning): Renamed and rewritten as...
2798 (vwarning): New function.
2799 (error): Renamed and rewritten as...
2800 (verror): New function.
2801 (internal_error): Renamed and rewritten as...
2802 (internal_verror): New function.
2803
2804 2014-08-07 Gary Benson <gbenson@redhat.com>
2805
2806 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
2807 * configure: Regenerate.
2808 * config.in: Likewise.
2809 * server.h: Do not include errno.h.
2810 * event-loop.c: Likewise.
2811 * hostio-errno.c: Likewise.
2812 * linux-low.c: Likewise.
2813 * remote-utils.c: Likewise.
2814 * spu-low.c: Likewise.
2815 * utils.c: Likewise.
2816 * gdbreplay.c: Unconditionally include errno.h.
2817
2818 2014-08-07 Gary Benson <gbenson@redhat.com>
2819
2820 * server.h: Do not include string.h.
2821 * event-loop.c: Likewise.
2822 * linux-low.c: Likewise.
2823 * regcache.c: Likewise.
2824 * remote-utils.c: Likewise.
2825 * spu-low.c: Likewise.
2826 * utils.c: Likewise.
2827
2828 2014-08-07 Gary Benson <gbenson@redhat.com>
2829
2830 * server.h: Do not include gdb_assert.h.
2831
2832 2014-08-07 Gary Benson <gbenson@redhat.com>
2833
2834 * server.h: Do not include common-utils.h.
2835
2836 2014-08-07 Gary Benson <gbenson@redhat.com>
2837
2838 * server.h: Do not include ptid.h.
2839 * notif.h: Likewise.
2840
2841 2014-08-07 Gary Benson <gbenson@redhat.com>
2842
2843 * server.h: Do not include gdb_locale.h.
2844
2845 2014-08-07 Gary Benson <gbenson@redhat.com>
2846
2847 * server.h: Do not include gdb/signals.h.
2848 * win32-low.c: Likewise.
2849
2850 2014-08-07 Gary Benson <gbenson@redhat.com>
2851
2852 * server.h: Do not include pathmax.h.
2853
2854 2014-08-07 Gary Benson <gbenson@redhat.com>
2855
2856 * server.h: Do not include libiberty.h.
2857 * linux-bfin-low.c: Likewise.
2858
2859 2014-08-07 Gary Benson <gbenson@redhat.com>
2860
2861 * server.h: Do not include ansidecl.h.
2862
2863 2014-08-07 Gary Benson <gbenson@redhat.com>
2864
2865 * linux-x86-low.c: Do not include stddef.h.
2866 * lynx-ppc-low.c: Likewise.
2867 * tracepoint.c: Likewise.
2868
2869 2014-08-07 Gary Benson <gbenson@redhat.com>
2870
2871 * server.h: Do not include stdarg.h.
2872 * nto-low.c: Likewise.
2873
2874 2014-08-07 Gary Benson <gbenson@redhat.com>
2875
2876 * server.h: Do not include stdlib.h.
2877 * inferiors.c: Likewise.
2878 * linux-low.c: Likewise.
2879 * regcache.c: Likewise.
2880 * spu-low.c: Likewise.
2881 * tracepoint.c: Likewise.
2882 * utils.c: Likewise.
2883
2884 2014-08-07 Gary Benson <gbenson@redhat.com>
2885
2886 * server.h: Do not include stdio.h.
2887 * linux-low.c: Likewise.
2888 * remote-utils.c: Likewise.
2889 * spu-low.c: Likewise.
2890 * utils.c: Likewise.
2891 * wincecompat.c: Likewise.
2892
2893 2014-08-06 Gary Benson <gbenson@redhat.com>
2894
2895 * regcache.c (init_register_cache): Move conditionals inside if.
2896
2897 2014-08-06 Gary Benson <gbenson@redhat.com>
2898
2899 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
2900
2901 2014-07-31 Gary Benson <gbenson@redhat.com>
2902
2903 * ax.h: Do not include server.h.
2904 * gdbthread.h: Likewise.
2905 * lynx-low.h: Likewise.
2906 * notif.h: Likewise.
2907
2908 2014-07-30 Gary Benson <gbenson@redhat.com>
2909
2910 * server.h: Include common-defs.h.
2911 Do not include config.h or build-gnulib-gdbserver/config.h.
2912
2913 2014-07-30 Gary Benson <gbenson@redhat.com>
2914
2915 * hostio-errno.c: Move server.h to top of includes list.
2916 * inferiors.c: Likewise.
2917 * linux-x86-low.c: Likewise.
2918 * notif.c: Include server.h.
2919
2920 2014-07-24 Tom Tromey <tromey@redhat.com>
2921 Gary Benson <gbenson@redhat.com>
2922
2923 * server.h (CORE_ADDR): Now unsigned.
2924
2925 2014-07-16 Pedro Alves <palves@redhat.com>
2926
2927 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
2928
2929 2014-07-15 Pedro Alves <palves@redhat.com>
2930
2931 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
2932 copy.
2933
2934 2014-07-11 Pedro Alves <palves@redhat.com>
2935
2936 * linux-low.c (kill_wait_lwp): New function, based on
2937 kill_one_lwp_callback, but use my_waitpid directly.
2938 (kill_one_lwp_callback, linux_kill): Use it.
2939
2940 2014-06-23 Pedro Alves <palves@redhat.com>
2941
2942 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
2943 before setting DR0..DR3.
2944
2945 2014-06-20 Gary Benson <gbenson@redhat.com>
2946
2947 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
2948 * configure: Regenerated.
2949 * config.in: Likewise.
2950
2951 2014-06-20 Gary Benson <gbenson@redhat.com>
2952
2953 * Makefile.in (SFILES): Update locations for files moved
2954 from common to nat.
2955 (object file files): Reordered.
2956
2957 2014-06-20 Gary Benson <gbenson@redhat.com>
2958
2959 * i386-low.h (i386_dr_low_can_set_addr): Removed.
2960 (i386_dr_low_set_addr): Likewise.
2961 (i386_dr_low_get_addr): Likewise.
2962 (i386_dr_low_can_set_control): Likewise.
2963 (i386_dr_low_set_control): Likewise.
2964 (i386_dr_low_get_control): Likewise.
2965 (i386_dr_low_get_status): Likewise.
2966 (i386_get_debug_register_length): Likewise.
2967 * linux-x86-low.c (i386_dr_low_set_addr):
2968 Changed signature. Made static.
2969 (i386_dr_low_get_addr): Likewise.
2970 (i386_dr_low_set_control): Likewise.
2971 (i386_dr_low_get_control): Likewise.
2972 (i386_dr_low_get_status): Likewise.
2973 (i386_dr_low): New global variable.
2974 * win32-i386-low.c (i386_dr_low_set_addr):
2975 Changed signature. Made static.
2976 (i386_dr_low_get_addr): Likewise.
2977 (i386_dr_low_set_control): Likewise.
2978 (i386_dr_low_get_control): Likewise.
2979 (i386_dr_low_get_status): Likewise.
2980 (i386_dr_low): New global variable.
2981
2982 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
2983
2984 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
2985 * Makefile.in (AR, AR_FLAGS): Define.
2986 * configure: Regenerate.
2987
2988 2014-06-19 Gary Benson <gbenson@redhat.com>
2989
2990 * Makefile.in (i386-dregs.o): New rule.
2991 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
2992 * i386-low.c (target.h): Remove include.
2993 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
2994 (DR_CONTROL_SHIFT): Likewise.
2995 (DR_CONTROL_SIZE): Likewise.
2996 (DR_RW_EXECUTE): Likewise.
2997 (DR_RW_WRITE): Likewise.
2998 (DR_RW_READ): Likewise.
2999 (DR_RW_IORW): Likewise.
3000 (DR_LEN_1): Likewise.
3001 (DR_LEN_2): Likewise.
3002 (DR_LEN_4): Likewise.
3003 (DR_LEN_8): Likewise.
3004 (DR_LOCAL_ENABLE_SHIFT): Likewise.
3005 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
3006 (DR_ENABLE_SIZE): Likewise.
3007 (DR_LOCAL_SLOWDOWN): Likewise.
3008 (DR_GLOBAL_SLOWDOWN): Likewise.
3009 (DR_CONTROL_RESERVED): Likewise.
3010 (I386_DR_CONTROL_MASK): Likewise.
3011 (I386_DR_VACANT): Likewise.
3012 (I386_DR_LOCAL_ENABLE): Likewise.
3013 (I386_DR_GLOBAL_ENABLE): Likewise.
3014 (I386_DR_DISABLE): Likewise.
3015 (I386_DR_SET_RW_LEN): Likewise.
3016 (I386_DR_GET_RW_LEN): Likewise.
3017 (I386_DR_WATCH_HIT): Likewise.
3018 (i386_wp_op_t): Likewise.
3019 (i386_show_dr): Likewise.
3020 (i386_length_and_rw_bits): Likewise.
3021 (i386_insert_aligned_watchpoint): Likewise.
3022 (i386_remove_aligned_watchpoint): Likewise.
3023 (i386_handle_nonaligned_watchpoint): Likewise.
3024 i386_update_inferior_debug_regs(): Likewise.
3025 (i386_dr_insert_watchpoint): Likewise.
3026 (i386_dr_remove_watchpoint): Likewise.
3027 (i386_dr_region_ok_for_watchpoint): Likewise.
3028 (i386_dr_stopped_data_address): Likewise.
3029 (i386_dr_stopped_by_watchpoint): Likewise.
3030
3031 2014-06-19 Gary Benson <gbenson@redhat.com>
3032
3033 * i386-low.c (i386_dr_show): Renamed to
3034 i386_show_dr and made static. All uses updated.
3035 (i386_dr_length_and_rw_bits): Renamed to
3036 i386_length_and_rw_bits and made static.
3037 All uses updated.
3038 (i386_dr_insert_aligned_watchpoint): Renamed to
3039 i386_insert_aligned_watchpoint and made static.
3040 All uses updated.
3041 (i386_dr_remove_aligned_watchpoint): Renamed to
3042 i386_remove_aligned_watchpoint and made static.
3043 All uses updated.
3044 (i386_dr_update_inferior_debug_regs): Renamed to
3045 i386_update_inferior_debug_regs and made static.
3046 All uses updated.
3047
3048 2014-06-18 Gary Benson <gbenson@redhat.com>
3049
3050 * i386-low.h (i386_dr_low_can_set_addr): New macro.
3051 (i386_dr_low_can_set_control): Likewise.
3052 (i386_get_debug_register_length): Likewise.
3053 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
3054 (i386_dr_low_can_set_control): Likewise.
3055 (i386_get_debug_register_length): Likewise.
3056
3057 2014-06-17 Gary Benson <gbenson@redhat.com>
3058
3059 * i386-low.h (i386-dregs.h): New include.
3060 (DR_FIRSTADDR): Now in i386-dregs.h.
3061 (DR_LASTADDR): Likewise.
3062 (DR_NADDR): Likewise.
3063 (DR_STATUS): Likewise.
3064 (DR_CONTROL): Likewise.
3065 (i386_debug_reg_state): Likewise.
3066 (i386_dr_insert_watchpoint): Likewise.
3067 (i386_dr_remove_watchpoint): Likewise.
3068 (i386_dr_region_ok_for_watchpoint): Likewise.
3069 (i386_dr_stopped_data_address): Likewise.
3070 (i386_dr_stopped_by_watchpoint): Likewise.
3071 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
3072
3073 2014-06-18 Gary Benson <gbenson@redhat.com>
3074
3075 * i386-low.h (i386_low_insert_watchpoint): Renamed to
3076 i386_dr_insert_watchpoint.
3077 (i386_low_remove_watchpoint): Renamed to
3078 i386_dr_remove_watchpoint.
3079 (i386_low_region_ok_for_watchpoint): Renamed to
3080 i386_dr_region_ok_for_watchpoint.
3081 (i386_low_stopped_data_address): Renamed to
3082 i386_dr_stopped_data_address.
3083 (i386_low_stopped_by_watchpoint): Renamed to
3084 i386_dr_stopped_by_watchpoint.
3085 * i386-low.c (i386_show_dr): Renamed to
3086 i386_dr_show and made nonstatic. All uses updated.
3087 (i386_length_and_rw_bits): Renamed to
3088 i386_dr_length_and_rw_bits and made nonstatic.
3089 All uses updated.
3090 (i386_insert_aligned_watchpoint): Renamed to
3091 i386_dr_insert_aligned_watchpoint and made nonstatic.
3092 All uses updated.
3093 (i386_remove_aligned_watchpoint): Renamed to
3094 i386_dr_remove_aligned_watchpoint and made nonstatic.
3095 All uses updated.
3096 (i386_update_inferior_debug_regs): Renamed to
3097 i386_dr_update_inferior_debug_regs and made nonstatic.
3098 All uses updated.
3099 (i386_low_insert_watchpoint): Renamed to
3100 i386_dr_insert_watchpoint. All uses updated.
3101 (i386_low_remove_watchpoint): Renamed to
3102 i386_dr_remove_watchpoint. All uses updated.
3103 (i386_low_region_ok_for_watchpoint): Renamed to
3104 i386_dr_region_ok_for_watchpoint. All uses updated.
3105 (i386_low_stopped_data_address): Renamed to
3106 i386_dr_stopped_data_address. All uses updated.
3107 (i386_low_stopped_by_watchpoint): Renamed to
3108 i386_dr_stopped_by_watchpoint. All uses updated.
3109
3110 2014-06-18 Gary Benson <gbenson@redhat.com>
3111
3112 * i386-low.c (i386_dr_low_can_set_addr): New macro.
3113 (i386_dr_low_can_set_control): Likewise.
3114 (i386_insert_aligned_watchpoint): New check.
3115
3116 2014-06-18 Gary Benson <gbenson@redhat.com>
3117
3118 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
3119 Renamed to state.
3120
3121 2014-06-18 Gary Benson <gbenson@redhat.com>
3122
3123 * i386-low.c (i386_length_and_rw_bits): Use internal_error
3124 instead of fatal and error.
3125 (i386_handle_nonaligned_watchpoint): Likewise.
3126
3127 2014-06-18 Gary Benson <gbenson@redhat.com>
3128
3129 * i386-low.c (i386_get_debug_register_length): New macro.
3130 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
3131 (i386_show_dr): Use debug_printf instead of fprintf. Use
3132 phex to format values.
3133
3134 2014-06-18 Gary Benson <gbenson@redhat.com>
3135
3136 * i386-low.h: Comment changes.
3137 * i386-low.c: Likewise.
3138
3139 2014-06-18 Gary Benson <gbenson@redhat.com>
3140
3141 * i386-low.c: Whitespace changes.
3142
3143 2014-06-12 Tom Tromey <tromey@redhat.com>
3144
3145 * utils.c (freeargv): Remove.
3146
3147 2014-06-12 Tom Tromey <tromey@redhat.com>
3148
3149 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
3150 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
3151 (parse_debug_format_options): Likewise.
3152 (gdbserver_usage): Likewise.
3153 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
3154 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
3155 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
3156 against libiberty.
3157 ($(LIBGNU)): Depend on libiberty.
3158 (all-lib): Recurse into all subdirs.
3159 (install-only): Invoke "install" target in subdirs.
3160 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
3161 targets.
3162 * configure: Rebuild.
3163 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
3164 for vasprintf, vsnprintf, or gettimeofday.
3165 * configure.srv: Don't add safe-ctype.o or lbasename.o to
3166 srv_tgtobj.
3167
3168 2014-06-05 Joel Brobecker <brobecker@adacore.com>
3169
3170 * development.sh: Delete.
3171 * Makefile.in (config.status): Adjust dependency on development.sh.
3172 * configure.ac: Adjust development.sh source call.
3173 * configure: Regenerate.
3174
3175 2014-06-02 Pedro Alves <palves@redhat.com>
3176
3177 * ax.c (gdb_free_agent_expr): New function.
3178 * ax.h (gdb_free_agent_expr): New declaration.
3179 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
3180 list.
3181 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
3182 static.
3183 (clear_breakpoint_conditions_and_commands): New function.
3184 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
3185 (clear_breakpoint_conditions_and_commands): New declaration.
3186
3187 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
3188
3189 * linux-aarch64-low.c (asm/ptrace.h): Include.
3190
3191 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
3192
3193 Fix TLS access for -static -pthread.
3194 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
3195 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
3196 (thread_db_load_search, try_thread_db_load_1): Initialize it.
3197
3198 2014-05-20 Pedro Alves <palves@redhat.com>
3199
3200 * linux-aarch64-low.c (aarch64_insert_point)
3201 (aarch64_remove_point): No longer check whether the type is
3202 supported here. Adjust to new interface.
3203 (the_low_target): Install aarch64_supports_z_point_type as
3204 supports_z_point_type method.
3205 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
3206 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
3207 instead of a Z packet char. Adjust.
3208 (arm_supports_z_point_type): New function.
3209 (arm_insert_point, arm_remove_point): Adjust to new interface.
3210 (the_low_target): Install arm_supports_z_point_type.
3211 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
3212 (cris_insert_point, cris_remove_point): Adjust to new interface.
3213 Don't check whether the type is supported here.
3214 (the_low_target): Install cris_supports_z_point_type.
3215 * linux-low.c (linux_supports_z_point_type): New function.
3216 (linux_insert_point, linux_remove_point): Adjust to new interface.
3217 * linux-low.h (struct linux_target_ops) <insert_point,
3218 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
3219 raw_breakpoint pointer parameter.
3220 <supports_z_point_type>: New method.
3221 * linux-mips-low.c (mips_supports_z_point_type): New function.
3222 (mips_insert_point, mips_remove_point): Adjust to new interface.
3223 Use mips_supports_z_point_type.
3224 (the_low_target): Install mips_supports_z_point_type.
3225 * linux-ppc-low.c (the_low_target): Install NULL as
3226 supports_z_point_type method.
3227 * linux-s390-low.c (the_low_target): Install NULL as
3228 supports_z_point_type method.
3229 * linux-sparc-low.c (the_low_target): Install NULL as
3230 supports_z_point_type method.
3231 * linux-x86-low.c (x86_supports_z_point_type): New function.
3232 (x86_insert_point): Adjust to new insert_point interface. Use
3233 insert_memory_breakpoint. Adjust to new
3234 i386_low_insert_watchpoint interface.
3235 (x86_remove_point): Adjust to remove_point interface. Use
3236 remove_memory_breakpoint. Adjust to new
3237 i386_low_remove_watchpoint interface.
3238 (the_low_target): Install x86_supports_z_point_type.
3239 * lynx-low.c (lynx_target_ops): Install NULL as
3240 supports_z_point_type callback.
3241 * nto-low.c (nto_supports_z_point_type): New.
3242 (nto_insert_point, nto_remove_point): Adjust to new interface.
3243 (nto_target_ops): Install nto_supports_z_point_type.
3244 * mem-break.c: Adjust intro comment.
3245 (struct raw_breakpoint) <raw_type, size>: New fields.
3246 <inserted>: Update comment.
3247 <shlib_disabled>: Delete field.
3248 (enum bkpt_type) <gdb_breakpoint>: Delete value.
3249 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
3250 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
3251 (raw_bkpt_type_to_target_hw_bp_type): New function.
3252 (find_enabled_raw_code_breakpoint_at): New function.
3253 (find_raw_breakpoint_at): New type and size parameters. Use them.
3254 (insert_memory_breakpoint): New function, based off
3255 set_raw_breakpoint_at.
3256 (remove_memory_breakpoint): New function.
3257 (set_raw_breakpoint_at): Reimplement.
3258 (set_breakpoint): New, based on set_breakpoint_at.
3259 (set_breakpoint_at): Reimplement.
3260 (delete_raw_breakpoint): Go through the_target->remove_point
3261 instead of assuming memory breakpoints.
3262 (find_gdb_breakpoint_at): Delete.
3263 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
3264 (find_gdb_breakpoint): New function.
3265 (set_gdb_breakpoint_at): Delete.
3266 (z_type_supported): New function.
3267 (set_gdb_breakpoint_1): New function, loosely based off
3268 set_gdb_breakpoint_at.
3269 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
3270 (delete_gdb_breakpoint_at): Delete.
3271 (delete_gdb_breakpoint_1): New function, loosely based off
3272 delete_gdb_breakpoint_at.
3273 (delete_gdb_breakpoint): New function.
3274 (clear_gdb_breakpoint_conditions): Rename to ...
3275 (clear_breakpoint_conditions): ... this. Don't handle a NULL
3276 breakpoint.
3277 (add_condition_to_breakpoint): Make static.
3278 (add_breakpoint_condition): Take a struct breakpoint pointer
3279 instead of an address. Adjust.
3280 (gdb_condition_true_at_breakpoint): Rename to ...
3281 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
3282 z_type parameter.
3283 (gdb_condition_true_at_breakpoint): Reimplement.
3284 (add_breakpoint_commands): Take a struct breakpoint pointer
3285 instead of an address. Adjust.
3286 (gdb_no_commands_at_breakpoint): Rename to ...
3287 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
3288 parameter. Return true if no breakpoint was found. Change debug
3289 output.
3290 (gdb_no_commands_at_breakpoint): Reimplement.
3291 (run_breakpoint_commands): Rename to ...
3292 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
3293 and change return type to boolean.
3294 (run_breakpoint_commands): New function.
3295 (gdb_breakpoint_here): Also check for Z1 breakpoints.
3296 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
3297 breakpoint. Go through the_target->remove_point instead of
3298 assuming memory breakpoint.
3299 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
3300 software and hardware breakpoints.
3301 (reinsert_raw_breakpoint): Go through the_target->insert_point
3302 instead of assuming memory breakpoint.
3303 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
3304 software and hardware breakpoints.
3305 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
3306 Check both software and hardware breakpoints.
3307 (validate_inserted_breakpoint): Assert the breakpoint is a
3308 software breakpoint. Set the inserted flag to -1 instead of
3309 setting shlib_disabled.
3310 (delete_disabled_breakpoints): Adjust.
3311 (validate_breakpoints): Only validate software breakpoints.
3312 Adjust to inserted flag change.
3313 (check_mem_read, check_mem_write): Skip breakpoint types other
3314 than software breakpoints. Adjust to inserted flag change.
3315 * mem-break.h (enum raw_bkpt_type): New enum.
3316 (raw_breakpoint, struct process_info): Forward declare.
3317 (Z_packet_to_target_hw_bp_type): Delete declaration.
3318 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
3319 (set_gdb_breakpoint, delete_gdb_breakpoint)
3320 (clear_breakpoint_conditions): New declarations.
3321 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
3322 (breakpoint_inserted_here): Update comment.
3323 (add_breakpoint_condition, add_breakpoint_commands): Replace
3324 address parameter with a breakpoint pointer parameter.
3325 (gdb_breakpoint_here): Update comment.
3326 (delete_gdb_breakpoint_at): Delete.
3327 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
3328 * server.c (process_point_options): Take a struct breakpoint
3329 pointer instead of an address. Adjust.
3330 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
3331 delete_gdb_breakpoint.
3332 * spu-low.c (spu_target_ops): Install NULL as
3333 supports_z_point_type method.
3334 * target.h: Include mem-break.h.
3335 (struct target_ops) <prepare_to_access_memory>: Update comment.
3336 <supports_z_point_type>: New field.
3337 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
3338 instead of a char. Also take a raw breakpoint pointer.
3339 * win32-arm-low.c (the_low_target): Install NULL as
3340 supports_z_point_type.
3341 * win32-i386-low.c (i386_supports_z_point_type): New function.
3342 (i386_insert_point, i386_remove_point): Adjust to new interface.
3343 (the_low_target): Install i386_supports_z_point_type.
3344 * win32-low.c (win32_supports_z_point_type): New function.
3345 (win32_insert_point, win32_remove_point): Adjust to new interface.
3346 (win32_target_ops): Install win32_supports_z_point_type.
3347 * win32-low.h (struct win32_target_ops):
3348 <supports_z_point_type>: New method.
3349 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
3350 instead of a char. Also take a raw breakpoint pointer.
3351
3352 2014-05-20 Pedro Alves <palves@redhat.com>
3353
3354 * mem-break.h: Include break-common.h.
3355 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
3356 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
3357 (Z_packet_to_target_hw_bp_type): New declaration.
3358 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
3359 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
3360 (Z_PACKET_ACCESS_WP): Delete macros.
3361 (Z_packet_to_hw_type): Delete function.
3362 * i386-low.h: Don't include break-common.h here.
3363 (Z_packet_to_hw_type): Delete declaration.
3364 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
3365 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
3366 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
3367 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
3368 * linux-aarch64-low.c: Don't include break-common.h here.
3369 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
3370 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
3371 (Z_packet_to_target_hw_bp_type): Delete function.
3372 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
3373 function.
3374 (mips_insert_point, mips_remove_point): Use
3375 Z_packet_to_target_hw_bp_type.
3376
3377 2014-05-20 Pedro Alves <palves@redhat.com>
3378
3379 * linux-aarch64-low.c: Include break-common.h.
3380 (enum target_point_type): Delete.
3381 (Z_packet_to_point_type): Rename to ...
3382 (Z_packet_to_target_hw_bp_type): ... this, and return a
3383 target_hw_bp_type instead.
3384 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
3385 instead of an enum target_point_type.
3386 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
3387 breakpoint type.
3388 (aarch64_dr_state_insert_one_point)
3389 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
3390 (aarch64_handle_aligned_watchpoint)
3391 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
3392 Take an enum target_hw_bp_type instead of an enum
3393 target_point_type.
3394 (aarch64_supports_z_point_type): New function.
3395 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
3396 use Z_packet_to_target_hw_bp_type.
3397
3398 2014-05-20 Joel Brobecker <brobecker@adacore.com>
3399
3400 * configure.ac: Only use -Werror by default when DEVELOPMENT
3401 is true.
3402 * configure: Regenerate.
3403
3404 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
3405
3406 Fix gdbserver qGetTLSAddr for x86_64 -m32.
3407 * linux-x86-low.c (X86_64_USER_REGS): New.
3408 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
3409
3410 2014-04-28 Yao Qi <yao@codesourcery.com>
3411
3412 * Makefile.in (i386-avx512.c): Fix the typo of generated file
3413 name.
3414
3415 2014-04-25 Pedro Alves <palves@redhat.com>
3416
3417 PR server/16255
3418 * linux-low.c (linux_attach_fail_reason_string): New function.
3419 (linux_attach_lwp): Delete.
3420 (linux_attach_lwp_1): Rename to ...
3421 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
3422 argument. Remove "initial" parameter. Return int instead of
3423 void. Don't error or warn here.
3424 (linux_attach): Adjust to call linux_attach_lwp. Call error on
3425 failure to attach to the tgid. Call warning when failing to
3426 attach to an lwp.
3427 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
3428 argument. Remove "initial" parameter. Return int instead of
3429 void. Don't error or warn here.
3430 (linux_attach_fail_reason_string): New declaration.
3431 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
3432 interface change. Use linux_attach_fail_reason_string.
3433
3434 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
3435 Walfred Tedeschi <walfred.tedeschi@intel.com>
3436
3437 * Makefile.in: Added rules to handle new files
3438 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
3439 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
3440 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
3441 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
3442 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
3443 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
3444 x32-avx512-linux.o.
3445 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
3446 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
3447 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
3448 i386/x32-avx512.xml.
3449 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
3450 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
3451 i386/x32-avx512-linux.xml.
3452 * i387-fp.c (num_avx512_k_registers): New constant for number
3453 of K registers.
3454 (num_avx512_zmmh_low_registers): New constant for number of
3455 lower ZMM registers (0-15).
3456 (num_avx512_zmmh_high_registers): New constant for number of
3457 higher ZMM registers (16-31).
3458 (num_avx512_ymmh_registers): New contant for number of higher
3459 YMM registers (ymm16-31 added by avx521 on x86_64).
3460 (num_avx512_xmm_registers): New constant for number of higher
3461 XMM registers (xmm16-31 added by AVX512 on x86_64).
3462 (struct i387_xsave): Add space for AVX512 registers.
3463 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
3464 Add code to handle AVX512 registers.
3465 (i387_xsave_to_cache): Add code to handle AVX512 registers.
3466 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
3467 prototypei from generated file.
3468 (tdesc_amd64_avx512_linux): Likewise.
3469 (init_registers_x32_avx512_linux): Likewise.
3470 (tdesc_x32_avx512_linux): Likewise.
3471 (init_registers_i386_avx512_linux): Likewise.
3472 (tdesc_i386_avx512_linux): Likewise.
3473 (x86_64_regmap): Add AVX512 registers.
3474 (x86_linux_read_description): Add code to handle AVX512 XSTATE
3475 mask.
3476 (initialize_low_arch): Add code to initialize AVX512 registers.
3477
3478 2014-04-23 Pedro Alves <palves@redhat.com>
3479
3480 * mem-break.c (find_gdb_breakpoint_at): Make static.
3481 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
3482
3483 2014-04-23 Pedro Alves <palves@redhat.com>
3484
3485 * i386-low.c: Don't include break-common.h here.
3486 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
3487 prototype to take target_hw_bp_type as argument instead of a Z
3488 packet char.
3489 * i386-low.h: Include break-common.h here.
3490 (Z_packet_to_hw_type): Declare.
3491 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
3492 prototypes.
3493 * linux-x86-low.c (x86_insert_point): Convert the packet number to
3494 a target_hw_bp_type before calling i386_low_insert_watchpoint.
3495 (x86_remove_point): Convert the packet number to a
3496 target_hw_bp_type before calling i386_low_remove_watchpoint.
3497 * win32-i386-low.c (i386_insert_point): Convert the packet number
3498 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
3499 (i386_remove_point): Convert the packet number to a
3500 target_hw_bp_type before calling i386_low_remove_watchpoint.
3501
3502 2014-04-23 Pedro Alves <palves@redhat.com>
3503
3504 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
3505
3506 2014-04-10 Pedro Alves <palves@redhat.com>
3507
3508 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
3509 Check if the condition or command is NULL before checking if the
3510 breakpoint is known. On success, return true.
3511 * mem-break.h (add_breakpoint_condition): Document return.
3512 (add_breakpoint_commands): Add describing comment.
3513 * server.c (skip_to_semicolon): New function.
3514 (process_point_options): Use it.
3515
3516 2014-04-09 Pedro Alves <palves@redhat.com>
3517
3518 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
3519 to lwpid_of.
3520
3521 2014-02-27 Pedro Alves <palves@redhat.com>
3522
3523 PR 12702
3524 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
3525 macros.
3526 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
3527 output.
3528 (last_thread_of_process_p): Take a PID argument instead of a
3529 thread pointer.
3530 (linux_wait_for_lwp): Delete.
3531 (num_lwps, check_zombie_leaders, not_stopped_callback): New
3532 functions.
3533 (linux_low_filter_event): New function, party factored out from
3534 linux_wait_for_event.
3535 (linux_wait_for_event): Rename to ...
3536 (linux_wait_for_event_filtered): ... this. Add new filter ptid
3537 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
3538 sigsuspend. Check for zombie leaders.
3539 (linux_wait_for_event): Reimplement as wrapper around
3540 linux_wait_for_event_filtered.
3541 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
3542 a normal or signal exit is seen, it's the whole process exiting.
3543 (wait_for_sigstop): No longer a for_each_inferior callback.
3544 Rewrite on top of linux_wait_for_event_filtered.
3545 (stop_all_lwps): Call wait_for_sigstop directly.
3546 * server.c (resume, handle_target_event): Handle
3547 TARGET_WAITKIND_NO_RESUMED.
3548
3549 2014-02-26 Joel Brobecker <brobecker@adacore.com>
3550
3551 * win32-low.c (psapi_get_dll_name,
3552 * win32_CreateToolhelp32Snapshot): Delete.
3553 (win32_CreateToolhelp32Snapshot, win32_Module32First)
3554 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
3555 Delete.
3556 (handle_load_dll): Add function description.
3557 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
3558
3559 2014-02-26 Joel Brobecker <brobecker@adacore.com>
3560
3561 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
3562 Add comment.
3563 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
3564 base address when calling win32_add_one_solib.
3565 (handle_load_dll): Delete local variable load_addr.
3566 Remove 0x1000 offset applied to DLL base address when calling
3567 win32_add_one_solib.
3568 (handle_unload_dll): Add comment.
3569
3570 2014-02-26 Joel Brobecker <brobecker@adacore.com>
3571
3572 * win32-low.c (win32_add_all_dlls): Renames
3573 win32_ensure_ntdll_loaded. Rewrite function documentation.
3574 Adjust implementation to always load all DLLs.
3575 Add 0x1000 offset to DLL base address when calling
3576 win32_add_one_solib.
3577 (child_initialization_done): New static global.
3578 (do_initial_child_stuff): Set child_initialization_done to
3579 zero during child initialization, and 1 after. Replace call
3580 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
3581 Add comment.
3582 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
3583 (handle_unload_dll): Add function documentation.
3584 (get_child_debug_event): Ignore load and unload DLL events
3585 during child initialization.
3586
3587 2014-02-20 Doug Evans <dje@google.com>
3588
3589 Remove global all_lwps.
3590 * inferiors.h (ptid_of): Move here from linux-low.h.
3591 (pid_of, lwpid_of): Ditto.
3592 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
3593 parameter is a struct thread_info * now.
3594 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
3595 directly. Pass &all_threads to find_inferior instead of &all_lwps.
3596 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
3597 directly.
3598 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
3599 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
3600 * linux-arm-low.c (update_registers_callback): Update, "entry"
3601 parameter is a struct thread_info * now.
3602 Fetch lwpid from current_inferior directly.
3603 (arm_insert_point): Pass &all_threads to find_inferior instead of
3604 &all_lwps.
3605 (arm_remove_point): Ditto.
3606 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
3607 (arm_prepare_to_resume): Fetch pid from thread.
3608 (arm_read_description): Fetch lwpid from current_inferior directly.
3609 * linux-low.c (all_lwps): Delete.
3610 (delete_lwp): Delete call to remove_inferior.
3611 (handle_extended_wait): Fetch lwpid from thread.
3612 (add_lwp): Don't set lwp->entry.id. Remove call to
3613 add_inferior_to_list.
3614 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
3615 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
3616 (kill_one_lwp_callback): Ditto.
3617 (linux_kill): Don't dereference NULL pointer.
3618 Fetch ptid,lwpid from thread.
3619 (get_detach_signal): Fetch ptid from thread.
3620 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
3621 Simplify call to regcache_invalidate_thread.
3622 (delete_lwp_callback): Update, "entry" parameter is a
3623 struct thread_info * now. Fetch pid from thread.
3624 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
3625 (status_pending_p_callback): Update, "entry" parameter is a
3626 struct thread_info * now. Fetch ptid from thread.
3627 (find_lwp_pid): Update, "entry" parameter is a
3628 struct thread_info * now.
3629 (linux_wait_for_lwp): Fetch pid from thread.
3630 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
3631 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
3632 (enqueue_one_deferred_signal): Fetch lwpid from thread.
3633 (dequeue_one_deferred_signal): Ditto.
3634 (cancel_breakpoint): Fetch ptid from current_inferior.
3635 (linux_wait_for_event): Pass &all_threads to find_inferior,
3636 not &all_lwps. Fetch ptid, lwpid from thread.
3637 (count_events_callback): Update, "entry" parameter is a
3638 struct thread_info * now.
3639 (select_singlestep_lwp_callback): Ditto.
3640 (select_event_lwp_callback): Ditto.
3641 (cancel_breakpoints_callback): Ditto.
3642 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
3643 not &all_lwps.
3644 (select_event_lwp): Ditto. Fetch ptid from event_thread.
3645 (unsuspend_one_lwp): Update, "entry" parameter is a
3646 struct thread_info * now.
3647 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
3648 not &all_lwps.
3649 (linux_stabilize_threads): Ditto. And for for_each_inferior.
3650 Fetch lwpid from thread, not lwp.
3651 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
3652 Pass &all_threads to find_inferior, not &all_lwps.
3653 (send_sigstop): Fetch lwpid from thread, not lwp.
3654 (send_sigstop_callback): Update, "entry" parameter is a
3655 struct thread_info * now.
3656 (suspend_and_send_sigstop_callback): Ditto.
3657 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
3658 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
3659 struct thread_info * now.
3660 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
3661 from thread, lwp.
3662 (lwp_running): Update, "entry" parameter is a
3663 struct thread_info * now.
3664 (stop_all_lwps): Fetch ptid from thread.
3665 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
3666 (linux_resume_one_lwp): Fetch lwpid from thread.
3667 (linux_set_resume_request): Update, "entry" parameter is a
3668 struct thread_info * now. Fetch pid, lwpid from thread.
3669 (resume_status_pending_p): Update, "entry" parameter is a
3670 struct thread_info * now.
3671 (need_step_over_p): Ditto. Fetch lwpid from thread.
3672 (start_step_over): Fetch lwpid from thread.
3673 (linux_resume_one_thread): Update, "entry" parameter is a
3674 struct thread_info * now. Fetch lwpid from thread.
3675 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
3676 (proceed_one_lwp): Update, "entry" parameter is a
3677 struct thread_info * now. Fetch lwpid from thread.
3678 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
3679 struct thread_info * now.
3680 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
3681 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
3682 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
3683 directly.
3684 (regsets_store_inferior_registers): Ditto.
3685 (fetch_register, store_register): Ditto.
3686 (linux_read_memory, linux_write_memory): Ditto.
3687 (linux_request_interrupt): Ditto.
3688 (linux_read_auxv): Ditto.
3689 (linux_xfer_siginfo): Ditto.
3690 (linux_qxfer_spu): Ditto.
3691 (linux_qxfer_libraries_svr4): Ditto.
3692 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
3693 moved to inferiors.h.
3694 (get_lwp): Delete.
3695 (get_thread_lwp): Update.
3696 (struct lwp_info): Delete member "entry". Simplify comment for
3697 member "thread".
3698 (all_lwps): Delete.
3699 * linux-mips-low.c (mips_read_description): Fetch lwpid from
3700 current_inferior directly.
3701 (update_watch_registers_callback): Update, "entry" parameter is a
3702 struct thread_info * now. Fetch pid from thread.
3703 (mips_linux_prepare_to_resume): Fetch ptid from thread.
3704 (mips_insert_point): Fetch lwpid from current_inferior.
3705 Pass &all_threads to find_inferior, not &all_lwps.
3706 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
3707 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
3708 directly.
3709 (mips_stopped_data_address): Ditto.
3710 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
3711 directly.
3712 * linux-tile-low.c (tile_arch_setup): Ditto.
3713 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
3714 (update_debug_registers_callback): Update, "entry" parameter is a
3715 struct thread_info * now. Fetch pid from thread.
3716 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
3717 Pass &all_threads to find_inferior, not &all_lwps.
3718 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
3719 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
3720 Pass &all_threads to find_inferior, not &all_lwps.
3721 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
3722 (i386_dr_low_get_status): Ditto.
3723 (x86_linux_prepare_to_resume): Fetch ptid from thread.
3724 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
3725 (x86_linux_read_description): Ditto.
3726 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
3727
3728 2014-02-20 Doug Evans <dje@google.com>
3729
3730 * inferiors.c (get_first_inferior): Fix buglet.
3731
3732 2014-02-19 Doug Evans <dje@google.com>
3733
3734 * gdbthread.h (add_thread): Change result type to struct thread_info *.
3735 * inferiors.c (add_thread): Change result type to struct thread_info *.
3736 All callers updated.
3737 (add_lwp): Call add_thread here instead of in callers.
3738 All callers updated.
3739 * linux-low.h (get_lwp_thread): Rewrite.
3740 (struct lwp_info): New member "thread".
3741
3742 2014-02-19 Doug Evans <dje@google.com>
3743
3744 * linux-low.c (add_lwp): Change result to struct lwp_info *.
3745 All callers updated.
3746
3747 2014-02-19 Doug Evans <dje@google.com>
3748
3749 * inferiors.c (add_thread): Fix whitespace.
3750
3751 2014-02-19 Doug Evans <dje@google.com>
3752
3753 * dll.c (clear_dlls): Replace accessing list implemention details
3754 with API function.
3755 * gdbthread.h (get_first_thread): Declare.
3756 * inferiors.c (for_each_inferior_with_data): New function.
3757 (get_first_thread): New function.
3758 (find_thread_ptid): Simplify.
3759 (get_first_inferior): New function.
3760 (clear_list): Delete.
3761 (one_inferior_p): New function.
3762 (clear_inferior_list): New function.
3763 (clear_inferiors): Update.
3764 * inferiors.h (for_each_inferior_with_data): Declare.
3765 (clear_inferior_list): Declare.
3766 (one_inferior_p): Declare.
3767 (get_first_inferior): Declare.
3768 * linux-low.c (linux_wait_for_event): Replace accessing list
3769 implemention details with API function.
3770 * server.c (target_running): Ditto.
3771 (accumulate_file_name_length): New function.
3772 (emit_dll_description): New function.
3773 (handle_qxfer_libraries): Replace accessing list implemention
3774 details with API function.
3775 (handle_qxfer_threads_worker): New function.
3776 (handle_qxfer_threads_proper): Replace accessing list implemention
3777 details with API function.
3778 (handle_query): Ditto.
3779 (visit_actioned_threads_callback_ftype): New typedef.
3780 (visit_actioned_threads_data): New struct.
3781 (visit_actioned_threads): Rewrite to be find_inferior callback.
3782 (resume): Call find_inferior.
3783 (handle_status): Replace accessing list implemention
3784 details with API function.
3785 (process_serial_event): Replace accessing list implemention details
3786 with API function.
3787 * target.c (set_desired_inferior): Replace accessing list implemention
3788 details with API function.
3789 * tracepoint.c (same_process_p): New function.
3790 (gdb_agent_about_to_close): Replace accessing list implemention
3791 details with API function.
3792 * win32-low.c (child_delete_thread): Replace accessing list
3793 implemention details with API function.
3794 (match_dll_by_basename): New function.
3795 (dll_is_loaded_by_basename): New function.
3796 (win32_ensure_ntdll_loaded): Replace accessing list implemention
3797 details call to dll_is_loaded_by_basename.
3798
3799 2014-02-19 Doug Evans <dje@google.com>
3800
3801 * dll.h (struct dll_info): Add comment.
3802 * gdbthread.h (struct thread_info): Add comment.
3803 (current_ptid): Simplify.
3804 * inferiors.c (add_process): Update.
3805 (remove_process): Update.
3806 * inferiors.h (struct process_info): Rename member "head" to "entry".
3807 * linux-low.c (delete_lwp): Update.
3808 (add_lwp): Update.
3809 (last_thread_of_process_p): Update.
3810 (kill_one_lwp_callback, linux_kill): Update.
3811 (status_pending_p_callback): Update.
3812 (wait_for_sigstop): Update. Simplify read of ptid.
3813 (start_step_over): Update.
3814 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
3815 (get_lwp_thread): Update.
3816 (struct lwp_info): Rename member "head" to "entry".
3817 * regcache.h (inferior_list_entry): Delete.
3818 * server.c (kill_inferior_callback): Update.
3819 (detach_or_kill_inferior_callback): Update.
3820 (print_started_pid): Update.
3821 (print_attached_pid): Update.
3822 (process_serial_event): Simplify read of ptid.
3823 * thread-db.c (thread_db_create_event): Update.
3824 (thread_db_get_tls_address): Update.
3825 * win32-low.c (current_inferior_ptid): Simplify.
3826
3827 2014-02-19 Tom Tromey <tromey@redhat.com>
3828
3829 * target.h (struct target_ops) <supports_btrace>: Add target_ops
3830 argument.
3831 (target_supports_btrace): Update.
3832
3833 2014-02-14 Yao Qi <yao@codesourcery.com>
3834
3835 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
3836 (rsp-low-ipa.o): New target.
3837
3838 2014-02-12 Tom Tromey <tromey@redhat.com>
3839
3840 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
3841 convert_ascii_to_int.
3842 * regcache.c (registers_to_string): Likewise.
3843 * remote-utils.c (decode_M_packet): Likewise.
3844 * server.c (process_serial_event): Likewise.
3845
3846 2014-02-12 Tom Tromey <tromey@redhat.com>
3847
3848 * server.c (handle_query, handle_v_run): Use hex2bin, not
3849 unhexify.
3850 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
3851
3852 2014-02-12 Tom Tromey <tromey@redhat.com>
3853
3854 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
3855 convert_int_to_ascii.
3856 * regcache.c (registers_to_string, collect_register_as_string):
3857 Likewise.
3858 * remote-utils.c (look_up_one_symbol, relocate_instruction):
3859 Likewise.
3860 * server.c (process_serial_event): Likewise.
3861 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
3862 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
3863
3864 2014-02-12 Tom Tromey <tromey@redhat.com>
3865
3866 * remote-utils.c (look_up_one_symbol, monitor_output): Use
3867 bin2hex, not hexify.
3868 * tracepoint.c (cmd_qtstatus): Likewise.
3869
3870 2014-02-12 Tom Tromey <tromey@redhat.com>
3871
3872 * remote-utils.c (monitor_output): Pass explicit length to
3873 hexify.
3874
3875 2014-02-12 Tom Tromey <tromey@redhat.com>
3876
3877 * tracepoint.c: Include rsp-low.h.
3878 * server.c: Include rsp-low.h.
3879 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
3880 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
3881 declare.
3882 * remote-utils.c: Include rsp-low.h.
3883 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
3884 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
3885 (convert_int_to_ascii, convert_ascii_to_int): Move to
3886 common/rsp-low.c.
3887 * regcache.c: Include rsp-low.h.
3888 * ax.c: Include rsp-low.h.
3889 * Makefile.in (SFILES): Add common/rsp-low.c.
3890 (OBS): Add rsp-low.o.
3891 (rsp-low.o): New target.
3892
3893 2014-02-12 Tom Tromey <tromey@redhat.com>
3894
3895 * utils.h (pulongest, plongest, phex_nz): Don't declare.
3896 Include print-utils.h.
3897 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
3898 (plongest, thirty_two, phex_nz): Remove.
3899 * Makefile.in (SFILES): Add common/print-utils.c.
3900 (OBS): Add print-utils.o.
3901 (print-utils-ipa.o): New target.
3902 (print-utils.o): New target.
3903 (IPA_OBJS): Add print-utils-ipa.o.
3904
3905 2014-02-06 Tom Tromey <tromey@redhat.com>
3906
3907 * Makefile.in (SFILES): Fix indentation.
3908
3909 2014-02-05 Doug Evans <dje@google.com>
3910
3911 * linux-low.c (linux_wait_for_event): Improve comment.
3912 (linux_wait_1): Keep current_inferior in sync with event_child.
3913
3914 2014-01-22 Doug Evans <dje@google.com>
3915
3916 * gdbthread.h (gdb_id_to_thread): Delete, unused.
3917
3918 2014-01-22 Doug Evans <dje@google.com>
3919
3920 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
3921 * configure: Regenerate.
3922 * config.in: Regenerate.
3923 * Makefile.in (SFILES): Add debug.c.
3924 (OBS): Add debug.o.
3925 * debug.c: New file.
3926 * debug.h: New file.
3927 * linux-aarch64-low.c (*): Update all debugging printfs to use
3928 debug_printf instead of fprintf.
3929 * linux-arm-low.c (*): Ditto.
3930 * linux-cris-low.c (*): Ditto.
3931 * linux-crisv32-low.c (*): Ditto.
3932 * linux-m32r-low.c (*): Ditto.
3933 * linux-sparc-low.c (*): Ditto.
3934 * linux-x86.c (*): Ditto.
3935 * linux-low.c (*): Ditto.
3936 (linux_wait_1): Add calls to debug_enter, debug_exit.
3937 (linux_wait): Remove redundant debugging printf.
3938 (stop_all_lwps): Add calls to debug_enter, debug_exit.
3939 (linux_resume, unstop_all_lwps): Ditto.
3940 * mem-break.c (*): Update all debugging printfs to use
3941 debug_printf instead of fprintf.
3942 * remote-utils.c (*): Ditto.
3943 * thread-db.c (*): Ditto.
3944 * server.c #include <ctype.h>, "gdb_vecs.h".
3945 (debug_threads): Moved to debug.c.
3946 (*): Update all debugging printfs to use debug_printf instead of
3947 fprintf.
3948 (start_inferior): Replace call to fflush with call to debug_flush.
3949 (monitor_show_help): Mention set debug-format.
3950 (parse_debug_format_options): New function.
3951 (handle_monitor_command): Handle "monitor set debug-format".
3952 (gdbserver_usage): Mention --debug-format.
3953 (main): Parse --debug-format.
3954 * server.h (debug_threads): Declaration moved to debug.h.
3955 #include "debug.h".
3956 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
3957 trace_debug_1 that uses debug_printf.
3958 (tracepoint_look_up_symbols): Update all debugging printfs to use
3959 debug_printf instead of fprintf.
3960
3961 2014-01-20 Baruch Siach <baruch@tkos.co.il>
3962
3963 * linux-xtensa-low.c: Include asm/ptrace.h instead of
3964 sys/ptrace.h.
3965
3966 2014-01-17 Pedro Alves <palves@redhat.com>
3967
3968 PR build/16445
3969 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
3970 defined after including gdb_proc_service.h.
3971
3972 2014-01-16 Doug Evans <dje@google.com>
3973
3974 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
3975 (match_dll): Use it.
3976
3977 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
3978
3979 * target.h (target_ops) <read_btrace>: Change parameters and
3980 return type to allow error reporting.
3981 * server.c (handle_qxfer_btrace): Support delta reads. Pass
3982 trace reading errors on.
3983 * linux-low.c (linux_low_read_btrace): Pass trace reading
3984 errors on.
3985 (linux_low_disable_btrace): New.
3986
3987 2014-01-15 Doug Evans <dje@google.com>
3988
3989 * inferiors.c (thread_id_to_gdb_id): Delete.
3990 * inferiors.h (thread_id_to_gdb_id): Delete.
3991
3992 2014-01-13 Eli Zaretskii <eliz@gnu.org>
3993
3994 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
3995 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
3996 versions.
3997
3998 2014-01-08 Pedro Alves <palves@redhat.com>
3999
4000 * server.c (handle_status): Don't discard previous queued stop
4001 replies or thread's pending status here.
4002 (main) <disconnection>: Do it here instead.
4003
4004 2014-01-08 Pedro Alves <palves@redhat.com>
4005
4006 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
4007 * server.c (visit_actioned_threads, handle_pending_status): New
4008 function.
4009 (handle_v_cont): Factor out parts to ...
4010 (resume): ... this new function. If in all-stop, and a thread
4011 being resumed has a pending status, report it without actually
4012 resuming.
4013 (myresume): Adjust to use the new 'resume' function.
4014 (clear_pending_status_callback, set_pending_status_callback)
4015 (find_status_pending_thread_callback): New functions.
4016 (handle_status): Handle the case of multiple threads having
4017 interesting statuses to report. Report threads' real last signal
4018 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
4019 with an interesting thread to report the status for, instead of
4020 always reporting the status of the first thread.
4021
4022 2014-01-01 Joel Brobecker <brobecker@adacore.com>
4023
4024 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
4025 * gdbreplay.c (gdbreplay_version): Likewise.
4026
4027 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
4028
4029 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
4030 iov.iov_len with the real length in use.
4031
4032 2013-12-13 Joel Brobecker <brobecker@adacore.com>
4033
4034 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
4035 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
4036 for all targets that use win32-low.c.
4037 * win32-low.c (win32_ensure_ntdll_loaded): New function.
4038 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
4039
4040 2013-12-13 Pedro Alves <palves@redhat.com>
4041
4042 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
4043 if equal to TARGET_WAITKIND_LOADED.
4044 * win32-low.c (cached_status): New static global.
4045 (win32_wait): Add declaration.
4046 (do_initial_child_stuff): Flush all initial pending debug events
4047 up to the initial breakpoint.
4048 (win32_wait): If CACHED_STATUS was set, return that instead
4049 of doing a real wait. Remove the code resuming the execution
4050 of the inferior after receiving a TARGET_WAITKIND_LOADED event
4051 during the initial phase. Also remove the code changing
4052 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
4053 TARGET_WAITKIND_STOPPED.
4054
4055 2013-12-11 Yao Qi <yao@codesourcery.com>
4056
4057 * notif.c (handle_notif_ack): Return 0 if no notification
4058 matches.
4059
4060 2013-11-20 Doug Evans <dje@google.com>
4061
4062 * linux-low.c (linux_set_resume_request): Fix comment.
4063
4064 2013-11-20 Doug Evans <dje@google.com>
4065
4066 * linux-low.c (resume_status_pending_p): Tweak comment.
4067
4068 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
4069
4070 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
4071 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
4072 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
4073 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
4074 (srv_amd64_regobj): Add amd64-mpx.o.
4075 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
4076 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
4077 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
4078 * i387-fp.c (num_pl_bnd_register) Added constant.
4079 (num_pl_bnd_cfg_registers) Added constant.
4080 (struct i387_xsave) Added reserved area and MPX fields.
4081 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
4082 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
4083 function.
4084 (tdesc_i386_mpx_linux): Add MPX amd64 target.
4085 (init_registers_amd64_mpx_linux): Declare new function.
4086 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
4087 (x86_64_regmap): Add MPX registers.
4088 (x86_linux_read_description): Add MPX case.
4089 (initialize_low_arch): Initialize MPX targets.
4090
4091 2013-11-18 Tom Tromey <tromey@redhat.com>
4092
4093 * configure: Rebuild.
4094 * configure.ac: Don't check for stdlib.h.
4095 * gdbreplay.c: Unconditionally include stdlib.h.
4096
4097 2013-11-18 Tom Tromey <tromey@redhat.com>
4098
4099 * config.in: Rebuild.
4100 * configure: Rebuild.
4101 * configure.ac: Don't use AC_HEADER_DIRENT.
4102
4103 2013-11-18 Tom Tromey <tromey@redhat.com>
4104
4105 * server.h: Don't check HAVE_STRING_H.
4106 * gdbreplay.c: Don't check HAVE_STRING_H.
4107 * configure: Rebuild.
4108
4109 2013-11-18 Tom Tromey <tromey@redhat.com>
4110
4111 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
4112 LIBGNU.
4113
4114 2013-11-08 Tom Tromey <tromey@redhat.com>
4115
4116 * configure, config.in: Rebuild.
4117 * configure.ac: Remove unused configury.
4118
4119 2013-11-08 Tom Tromey <tromey@redhat.com>
4120
4121 * acinclude.m4: Include common.m4, codeset.m4.
4122 * configure, config.in: Rebuild.
4123 * configure.ac: Use GDB_AC_COMMON.
4124
4125 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
4126
4127 * linux-s390-low.c (HWCAP_S390_TE): New define.
4128 (s390_arch_setup): Consider the TE field in the HWCAP for
4129 determining 'have_regset_tdb'.
4130
4131 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
4132
4133 PR gdb/16014
4134 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
4135 call to sizeof.
4136
4137 2013-10-02 Pedro Alves <palves@redhat.com>
4138
4139 * server.c (process_serial_event): Don't output "GDBserver
4140 exiting" if GDB is connected through stdio.
4141 * target.c (mywait): Likewise, be silent if GDB is connected
4142 through stdio.
4143
4144 2013-10-01 Joel Brobecker <brobecker@adacore.com>
4145
4146 * lynx-low.c (lynx_add_threads_after_attach): New function.
4147 (lynx_attach): Remove call to add_thread. Add call to
4148 lynx_add_threads_after_attach instead.
4149
4150 2013-09-28 Mike Frysinger <vapier@gentoo.org>
4151
4152 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
4153 * config.in, configure: Regenerated.
4154
4155 2013-09-18 Yao Qi <yao@codesourcery.com>
4156
4157 PR server/15959
4158 * server.c (start_inferior): Clear 'resume_info'.
4159
4160 2013-09-16 Jiong Wang <jiwang@tilera.com>
4161
4162 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
4163 for each register.
4164
4165 2013-09-16 Jiong Wang <jiwang@tilera.com>
4166
4167 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
4168 linux-tile-low.o to srv_tgtobj.
4169
4170 2013-09-16 Will Newton <will.newton@linaro.org>
4171
4172 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
4173 out regs.
4174
4175 2013-09-06 Pedro Alves <palves@redhat.com>
4176
4177 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
4178 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
4179 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
4180 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
4181 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
4182 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
4183
4184 2013-09-06 Pedro Alves <palves@redhat.com>
4185
4186 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
4187 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
4188
4189 2013-09-06 Pedro Alves <palves@redhat.com>
4190
4191 * linux-amd64-ipa.c: Include tracepoint.h.
4192 * linux-i386-ipa.c: Include tracepoint.h.
4193
4194 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
4195
4196 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
4197 (ps_get_thread_area): New function.
4198
4199 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
4200
4201 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
4202 (initialize_low_arch): Call init_registers_crisv32 rather than
4203 init_register_crisv32.
4204
4205 2013-09-05 Pedro Alves <palves@redhat.com>
4206
4207 * server.h (handle_vFile, hostio_last_error_from_errno): Move
4208 to ...
4209 * hostio.h: ... this new file.
4210 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
4211 win32-low.c: Include hostio.h.
4212
4213 2013-09-05 Pedro Alves <palves@redhat.com>
4214
4215 * server.h (gdb_client_data, handler_func, callback_handler_func)
4216 (delete_file_handler, add_file_handler, append_callback_event)
4217 (delete_callback_event, start_event_loop, initialize_event_loop):
4218 Move to event-loop.h and include it.
4219 * event-loop.h: New file.
4220
4221 2013-09-05 Pedro Alves <palves@redhat.com>
4222
4223 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
4224 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
4225 (loaded_dll, unloaded_dll): Move to ...
4226 * dll.h: ... this new file.
4227 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
4228
4229 2013-09-05 Pedro Alves <palves@redhat.com>
4230
4231 * server.h (current_process, get_thread_process, all_processes)
4232 (add_inferior_to_list, for_each_inferior, current_inferior)
4233 (remove_inferior, add_process, remove_process, find_process_pid)
4234 (have_started_inferiors_p, have_attached_inferiors_p)
4235 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
4236 (clear_inferiors, find_inferior, find_inferior_id)
4237 (inferior_target_data, set_inferior_target_data)
4238 (inferior_regcache_data, set_inferior_regcache_data): Move to
4239 inferiors.h, and include it.
4240 * inferiors.h: New file.
4241
4242 2013-09-05 Pedro Alves <palves@redhat.com>
4243
4244 * server.h (struct emit_ops, current_insn_ptr, emit_error):
4245 Move ...
4246 * ax.h: ... here.
4247
4248 2013-09-05 Pedro Alves <palves@redhat.com>
4249
4250 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
4251 tracepoint.h.
4252 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
4253 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
4254 (handle_tracepoint_general_set, handle_tracepoint_query)
4255 (tracepoint_finished_step, tracepoint_was_hit)
4256 (release_while_stepping_state_list, current_traceframe)
4257 (in_readonly_region, traceframe_read_mem)
4258 (fetch_traceframe_registers, traceframe_read_sdata)
4259 (traceframe_read_info, struct fast_tpoint_collect_status)
4260 (fast_tracepoint_collecting, force_unlock_trace_buffer)
4261 (handle_tracepoit_bkpts, initialize_low_tracepoint)
4262 (supply_fast_tracepoint_registers)
4263 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
4264 (ipa_tdesc, claim_trampoline_space)
4265 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
4266 (agent_mem_read, agent_get_trace_state_variable_value)
4267 (agent_set_trace_state_variable_value, agent_tsv_read)
4268 (agent_mem_read_string, get_raw_reg_func_addr)
4269 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
4270 * tracepoint.h: ... this new file.
4271
4272 2013-09-05 Pedro Alves <palves@redhat.com>
4273
4274 * server.h (perror_with_name, error, fatal, warning, paddress)
4275 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
4276 include it.
4277 * utils.h: New file.
4278
4279 2013-09-05 Pedro Alves <palves@redhat.com>
4280
4281 * server.h (remote_debug, noack_mode, transport_is_reliable)
4282 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
4283 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
4284 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
4285 (write_enn, initialize_async_io, enable_async_io)
4286 (disable_async_io, check_remote_input_interrupt_request)
4287 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
4288 (dead_thread_notify, prepare_resume_reply)
4289 (decode_address_to_semicolon, decode_address, decode_m_packet)
4290 (decode_M_packet, decode_X_packet, decode_xfer_write)
4291 (decode_search_memory_packet, unhexify, hexify)
4292 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
4293 (look_up_one_symbol, relocate_instruction)
4294 (monitor_output): Move to remote-utils.h, and include it.
4295 * remote-utils.h: New file.
4296
4297 2013-09-05 Pedro Alves <palves@redhat.com>
4298
4299 * server.h (_): Delete.
4300
4301 2013-09-02 Pedro Alves <palves@redhat.com>
4302
4303 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
4304 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
4305 allocated.
4306 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
4307
4308 2013-09-02 Pierre Muller <muller@sourceware.org>
4309
4310 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
4311 or WriteProcessMemory complete successfully and handle
4312 ERROR_PARTIAL_COPY error.
4313
4314 2013-09-02 Pedro Alves <palves@redhat.com>
4315
4316 * server.c (gdb_read_memory): Return -1 on traceframe memory read
4317 error instead of EIO.
4318
4319 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4320
4321 PR server/15604
4322 * linux-low.c: Include filestuff.h.
4323 (linux_create_inferior) <pid == 0>: Call close_most_fds.
4324 * lynx-low.c: Include filestuff.h.
4325 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
4326 * server.c: Include filestuff.h.
4327 (main): Call notice_open_fds.
4328 * spu-low.c: Include filestuff.h.
4329 (spu_create_inferior) <pid == 0>: Call close_most_fds.
4330
4331 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
4332
4333 * Makefile.in: Explain why ../target and ../nat are not
4334 listed as include file search paths.
4335 (linux-waitpid.o): New object file rule.
4336 * configure.srv (srv_native_linux_obj): New variable.
4337 Replace all occurrences of linux native object files with
4338 $srv_native_linux_obj.
4339 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
4340 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
4341 (linux_enable_event_reporting): Remove declaration.
4342 (my_waitpid): Moved to common/linux-waitpid.c.
4343 (linux_wait_for_event): Pass ptid when calling
4344 linux_enable_event_reporting.
4345 (linux_supports_tracefork_flag): Remove.
4346 (linux_enable_event_reporting): Likewise.
4347 (linux_tracefork_grandchild): Remove.
4348 (STACK_SIZE): Moved to common/linux-ptrace.c.
4349 (linux_tracefork_child): Remove.
4350 (linux_test_for_tracefork): Remove.
4351 (linux_look_up_symbols): Call linux_supports_traceclone.
4352 (initialize_low): Remove call to linux_test_for_tracefork.
4353 * linux-low.h (PTRACE_TYPE_ARG3): Move to
4354 common/linux-ptrace.h.
4355 (PTRACE_TYPE_ARG4): Likewise.
4356 Include linux-ptrace.h.
4357
4358 2013-08-21 Pedro Alves <palves@redhat.com>
4359
4360 * config.in: Renegerate.
4361
4362 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
4363
4364 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
4365 (SFILES): Remove $(srcdir)/common/target-common.c and
4366 add $(srcdir)/target/waitstatus.c.
4367 (OBS): Remove target-common.o and add waitstatus.o.
4368 (server_h): Remove $(srcdir)/../common/target-common.h and
4369 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
4370 and $(srcdir)/../target/waitstatus.h.
4371 (target-common.o): Remove.
4372 (waitstatus.o): New target object file.
4373 * target.h: Do not include target-common.h and
4374 include target/resume.h, target/wait.h and
4375 target/waitstatus.h.
4376
4377 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
4378
4379 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
4380 to PTRACE_TYPE_ARG3.
4381 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
4382 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
4383 PTRACE_TYPE_ARG4.
4384 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
4385 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
4386
4387 2013-07-27 Jie Zhang <jie@codesourcery.com>
4388 Daniel Jacobowitz <dan@codesourcery.com>
4389 Yao Qi <yao@codesourcery.com>
4390
4391 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
4392 (mips-linux-watch.o): New rule.
4393 (mips_linux_watch_h): New variable.
4394 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
4395 srv_tgtobj.
4396 * linux-mips-low.c: Include mips-linux-watch.h.
4397 (struct arch_process_info, struct arch_lwp_info): New.
4398 (update_watch_registers_callback): New function.
4399 (mips_linux_new_process, mips_linux_new_thread) New functions.
4400 (mips_linux_prepare_to_resume, mips_insert_point): New
4401 functions.
4402 (mips_remove_point, mips_stopped_by_watchpoint): New
4403 functions.
4404 (rsp_bp_type_to_target_hw_bp_type): New function.
4405 (mips_stopped_data_address): New function.
4406 (the_low_target): Add watchpoint support functions.
4407
4408 2013-07-27 Yao Qi <yao@codesourcery.com>
4409
4410 * i386-low.c: Include break-common.h.
4411 (enum target_hw_bp_type): Remove.
4412
4413 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
4414
4415 * Makefile.in (SFILES): /common/target-common.c.
4416 (OBS): Add target-common.o.
4417 (server_h): Add $(srcdir)/../common/target-common.h.
4418 (target-common.o): New target.
4419 * server.c (queue_stop_reply_callback): Free
4420 status string after use.
4421 * target.c (target_waitstatus_to_string): Remove.
4422 * target.h: Include target-common.h.
4423 (resume_kind): Likewise.
4424 (target_waitkind): Likewise.
4425 (target_waitstatus): Likewise.
4426 (TARGET_WNOHANG): Likewise.
4427
4428 2013-07-04 Yao Qi <yao@codesourcery.com>
4429
4430 * Makefile.in (host_alias): Use @host_noncanonical@.
4431 (target_alias): Use @target_noncanonical@.
4432 * configure.ac: Use ACX_NONCANONICAL_TARGET and
4433 ACX_NONCANONICAL_HOST.
4434 * configure: Regenerated.
4435
4436 Revert:
4437 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
4438
4439 * configure.ac (version_host, version_target): Set and AC_SUBST them.
4440 * configure: Rebuild.
4441 * Makefile.in (version_host, version_target): Get from configure.
4442 (version.c): Use $(version_host) and $(version_target).
4443
4444 2013-07-03 Pedro Alves <palves@redhat.com>
4445
4446 * Makefile.in (config.status): Depend on development.sh.
4447 * acinclude.m4: Include libmcheck.m4.
4448 * configure: Regenerate.
4449
4450 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
4451
4452 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
4453 attribute inside the parentheses.
4454 (winapi_DebugSetProcessKillOnExit): Ditto.
4455 (winapi_DebugBreakProcess): Ditto.
4456 (winapi_GenerateConsoleCtrlEvent): Ditto.
4457
4458 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
4459
4460 * notif.h (notif_event): Add a dummy member to avoid compiler
4461 errors.
4462
4463 2013-07-01 Pedro Alves <palves@redhat.com>
4464
4465 * hostio.c (HOSTIO_PATH_MAX): Define.
4466 (require_filename, handle_open, handle_unlink, handle_readlink):
4467 Use it.
4468
4469 2013-07-01 Pedro Alves <palves@redhat.com>
4470
4471 * server.h: Include "pathmax.h".
4472 * linux-low.c: Don't include sys/param.h.
4473 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
4474 MAXPATHLEN.
4475 * win32-low.c: Don't include sys/param.h.
4476 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
4477
4478 2013-07-01 Pedro Alves <palves@redhat.com>
4479
4480 * event-loop.c: Don't check HAVE_UNISTD_H before including
4481 <unistd.h>.
4482 * gdbreplay.c: Likewise.
4483 * remote-utils.c: Likewise.
4484 * server.c: Likewise.
4485 * configure.ac: Don't check for unistd.h.
4486 * configure: Regenerate.
4487
4488 2013-06-28 Tom Tromey <tromey@redhat.com>
4489
4490 * Makefile.in (version.c): Use version.in, not
4491 common/version.in.
4492
4493 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
4494
4495 * configure.ac (version_host, version_target): Set and AC_SUBST them.
4496 * configure: Rebuild.
4497 * Makefile.in (version_host, version_target): Get from configure.
4498 (version.c): Use $(version_host) and $(version_target).
4499
4500 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
4501
4502 Fix trace-status to output user name without trailing colon.
4503 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
4504
4505 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
4506
4507 Fix trace-status to output proper start-time and stop-time.
4508 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
4509 output start time and stop time in hex as gdb expects.
4510
4511 2013-06-26 Pedro Alves <pedro@codesourcery.com>
4512
4513 * tracepoint.c (build_traceframe_info_xml): Output trace state
4514 variables present in the trace buffer.
4515
4516 2013-06-24 Tom Tromey <tromey@redhat.com>
4517
4518 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
4519 create-version.sh.
4520 (version.o): Remove.
4521 * gdbreplay.c: Include version.h.
4522 (version, host_name): Don't declare.
4523 * server.h: Include version.h.
4524 (version, host_name): Don't declare.
4525
4526 2013-06-12 Pedro Alves <palves@redhat.com>
4527
4528 * linux-x86-low.c (linux_is_elf64): Delete global.
4529 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
4530 with local linux_pid_exe_is_elf_64_file use.
4531
4532 2013-06-11 Pedro Alves <palves@redhat.com>
4533
4534 * linux-low.c (regset_disabled, disable_regset): New functions.
4535 (regsets_fetch_inferior_registers)
4536 (regsets_store_inferior_registers): Use them.
4537 (initialize_regsets_info); Don't allocate the disabled_regsets
4538 array here.
4539 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
4540 comment.
4541
4542 2013-06-11 Pedro Alves <palves@redhat.com>
4543
4544 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
4545 xmalloc.
4546
4547 2013-06-11 Pedro Alves <palves@redhat.com>
4548
4549 * linux-x86-low.c (initialize_low_arch): Call
4550 init_registers_x32_avx_linux.
4551
4552 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
4553
4554 Fix compatibility with Android Bionic.
4555 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
4556 it is not empty.
4557
4558 2013-06-07 Pedro Alves <palves@redhat.com>
4559
4560 PR server/14823
4561 * Makefile.in (OBS): Add tdesc.o.
4562 (IPA_OBJS): Add tdesc-ipa.o.
4563 (tdesc-ipa.o): New rule.
4564 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
4565 interface.
4566 * linux-low.c (new_inferior): Delete.
4567 (disabled_regsets, num_regsets): Delete.
4568 (linux_add_process): Adjust to set the new per-process
4569 new_inferior flag.
4570 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
4571 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
4572 was a stop. When calling arch_setup, switch the current inferior
4573 to the thread that got an event.
4574 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
4575 (regsets_fetch_inferior_registers)
4576 (regsets_store_inferior_registers): New regsets_info parameter.
4577 Adjust to use it.
4578 (linux_register_in_regsets): New regs_info parameter. Adjust to
4579 use it.
4580 (register_addr, fetch_register, store_register): New usrregs_info
4581 parameter. Adjust to use it.
4582 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
4583 parameter regs_info. Adjust to use it.
4584 (linux_fetch_registers): Get the current inferior's regs_info, and
4585 adjust to use it.
4586 (linux_store_registers): Ditto.
4587 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
4588 (initialize_low): Don't initialize the target_regsets here. Call
4589 initialize_low_arch.
4590 * linux-low.h (target_regsets): Delete declaration.
4591 (struct regsets_info): New.
4592 (struct usrregs_info): New.
4593 (struct regs_info): New.
4594 (struct process_info_private) <new_inferior>: New field.
4595 (struct linux_target_ops): Delete the num_regs, regmap, and
4596 regset_bitmap fields. New field regs_info.
4597 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
4598 * i387-fp.c (num_xmm_registers): Delete.
4599 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
4600 calls to new interface.
4601 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
4602 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
4603 Infer the number of xmm registers from the regcache's target
4604 description.
4605 * i387-fp.h (num_xmm_registers): Delete.
4606 * inferiors.c (add_thread): Don't install the thread's regcache
4607 here.
4608 * proc-service.c (gregset_info): Fetch the current inferior's
4609 regs_info. Adjust to use it.
4610 * regcache.c: Include tdesc.h.
4611 (register_bytes, reg_defs, num_registers)
4612 (gdbserver_expedite_regs): Delete.
4613 (get_thread_regcache): If the thread doesn't have a regcache yet,
4614 create one, instead of aborting gdbserver.
4615 (regcache_invalidate_one): Rename to ...
4616 (regcache_invalidate_thread): ... this.
4617 (regcache_invalidate_one): New.
4618 (regcache_invalidate): Only invalidate registers of the current
4619 process.
4620 (init_register_cache): Add target_desc parameter, and use it.
4621 (new_register_cache): Ditto. Assert the target description has a
4622 non zero registers_size.
4623 (regcache_cpy): Add assertions. Adjust.
4624 (realloc_register_cache, set_register_cache): Delete.
4625 (registers_to_string, registers_from_string): Adjust.
4626 (find_register_by_name, find_regno, find_register_by_number)
4627 (register_cache_size): Add target_desc parameter, and use it.
4628 (free_register_cache_thread, free_register_cache_thread_one)
4629 (regcache_release, register_cache_size): New.
4630 (register_size): Add target_desc parameter, and use it.
4631 (register_data, supply_register, supply_register_zeroed)
4632 (supply_regblock, supply_register_by_name, collect_register)
4633 (collect_register_as_string, collect_register_by_name): Adjust.
4634 * regcache.h (struct target_desc): Forward declare.
4635 (struct regcache) <tdesc>: New field.
4636 (init_register_cache, new_register_cache): Add target_desc
4637 parameter.
4638 (regcache_invalidate_thread): Declare.
4639 (regcache_invalidate_one): Delete declaration.
4640 (regcache_release): Declare.
4641 (find_register_by_number, register_cache_size, register_size)
4642 (find_regno): Add target_desc parameter.
4643 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
4644 declarations.
4645 * remote-utils.c: Include tdesc.h.
4646 (outreg, prepare_resume_reply): Adjust.
4647 * server.c: Include tdesc.h.
4648 (gdbserver_xmltarget): Delete declaration.
4649 (get_features_xml, process_serial_event): Adjust.
4650 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
4651 declare.
4652 (struct process_info) <tdesc>: New field.
4653 (ipa_tdesc): Declare.
4654 * tdesc.c: New file.
4655 * tdesc.h: New file.
4656 * tracepoint.c: Include tdesc.h.
4657 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
4658 (get_context_regcache): Adjust to pass ipa_tdesc down.
4659 (do_action_at_tracepoint): Adjust to get the register cache size
4660 from the context regcache's description.
4661 (traceframe_walk_blocks): Adjust to get the register cache size
4662 from the current trace frame's description.
4663 (traceframe_get_pc): Adjust to get current trace frame's
4664 description and pass it down.
4665 (gdb_collect): Adjust to get the register cache size from the
4666 IPA's description.
4667 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
4668 (gdbserver_xmltarget): Delete.
4669 (initialize_low_tracepoint): Set the ipa's target description.
4670 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
4671 (initialize_low_tracepoint): Set the ipa's target description.
4672 * linux-x86-low.c: Include tdesc.h.
4673 [__x86_64__] (is_64bit_tdesc): New.
4674 (ps_get_thread_area, x86_get_thread_area): Use it.
4675 (i386_cannot_store_register): Rename to ...
4676 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
4677 (i386_cannot_fetch_register): Rename to ...
4678 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
4679 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
4680 to new interface.
4681 (target_regsets): Rename to ...
4682 (x86_regsets): ... this.
4683 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
4684 interface.
4685 (x86_siginfo_fixup): Use is_64bit_tdesc.
4686 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
4687 (tdesc_x32_avx_linux, tdesc_x32_linux)
4688 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
4689 Declare.
4690 (x86_linux_update_xmltarget): Delete.
4691 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
4692 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
4693 (AMD64_LINUX_USER64_CS): New.
4694 (x86_linux_read_description): New, based on
4695 x86_linux_update_xmltarget.
4696 (same_process_callback): New.
4697 (x86_arch_setup_process_callback): New.
4698 (x86_linux_update_xmltarget): New.
4699 (x86_regsets_info): New.
4700 (amd64_linux_regs_info): New.
4701 (i386_linux_usrregs_info): New.
4702 (i386_linux_regs_info): New.
4703 (x86_linux_regs_info): New.
4704 (x86_arch_setup): Reimplement.
4705 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
4706 (x86_emit_ops): Ditto.
4707 (the_low_target): Adjust. Install x86_linux_regs_info,
4708 x86_cannot_fetch_register, and x86_cannot_store_register.
4709 (initialize_low_arch): New.
4710 * linux-ia64-low.c (tdesc_ia64): Declare.
4711 (ia64_fetch_register): Adjust.
4712 (ia64_usrregs_info, regs_info): New globals.
4713 (ia64_regs_info): New function.
4714 (the_low_target): Adjust.
4715 (initialize_low_arch): New function.
4716 * linux-sparc-low.c (tdesc_sparc64): Declare.
4717 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
4718 Adjust.
4719 (sparc_arch_setup): New function.
4720 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
4721 (the_low_target): Adjust.
4722 (initialize_low_arch): New function.
4723 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
4724 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
4725 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
4726 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
4727 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
4728 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
4729 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
4730 (tdesc_powerpc_isa205_vsx64l): Declare.
4731 (ppc_cannot_store_register, ppc_collect_ptrace_register)
4732 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
4733 (ppc_set_pc, ppc_get_hwcap): Adjust.
4734 (ppc_usrregs_info): Forward declare.
4735 (!__powerpc64__) ppc_regmap_adjusted: New global.
4736 (ppc_arch_setup): Adjust to the current process'es target
4737 description.
4738 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
4739 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
4740 (ppc_store_evrregset): Adjust.
4741 (target_regsets): Rename to ...
4742 (ppc_regsets): ... this, and make static.
4743 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
4744 (ppc_regs_info): New function.
4745 (the_low_target): Adjust.
4746 (initialize_low_arch): New function.
4747 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
4748 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
4749 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
4750 (tdesc_s390x_linux64v2): Declare.
4751 (s390_collect_ptrace_register, s390_supply_ptrace_register)
4752 (s390_fill_gregset, s390_store_last_break): Adjust.
4753 (target_regsets): Rename to ...
4754 (s390_regsets): ... this, and make static.
4755 (s390_get_pc, s390_set_pc): Adjust.
4756 (s390_get_hwcap): New target_desc parameter, and use it.
4757 [__s390x__] (have_hwcap_s390_high_gprs): New global.
4758 (s390_arch_setup): Adjust to set the current process'es target
4759 description. Don't adjust the regmap.
4760 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
4761 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
4762 (regs_info_3264): New globals.
4763 (s390_regs_info): New function.
4764 (the_low_target): Adjust.
4765 (initialize_low_arch): New function.
4766 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
4767 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
4768 [__mips64] (init_registers_mips_linux)
4769 (init_registers_mips_dsp_linux): Delete defines.
4770 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
4771 (have_dsp): New global.
4772 (mips_read_description): New, based on mips_arch_setup.
4773 (mips_arch_setup): Reimplement.
4774 (get_usrregs_info): New function.
4775 (mips_cannot_fetch_register, mips_cannot_store_register)
4776 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
4777 (mips_fill_fpregset, mips_store_fpregset): Adjust.
4778 (target_regsets): Rename to ...
4779 (mips_regsets): ... this, and make static.
4780 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
4781 (dsp_regs_info, regs_info): New globals.
4782 (mips_regs_info): New function.
4783 (the_low_target): Adjust.
4784 (initialize_low_arch): New function.
4785 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
4786 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
4787 Declare.
4788 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
4789 (arm_read_description): New, with bits factored from
4790 arm_arch_setup.
4791 (arm_arch_setup): Reimplement.
4792 (target_regsets): Rename to ...
4793 (arm_regsets): ... this, and make static.
4794 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
4795 (arm_regs_info): New function.
4796 (the_low_target): Adjust.
4797 (initialize_low_arch): New function.
4798 * linux-m68k-low.c (tdesc_m68k): Declare.
4799 (target_regsets): Rename to ...
4800 (m68k_regsets): ... this, and make static.
4801 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
4802 (m68k_regs_info): New function.
4803 (m68k_arch_setup): New function.
4804 (the_low_target): Adjust.
4805 (initialize_low_arch): New function.
4806 * linux-sh-low.c (tdesc_sharch): Declare.
4807 (target_regsets): Rename to ...
4808 (sh_regsets): ... this, and make static.
4809 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
4810 (sh_regs_info, sh_arch_setup): New functions.
4811 (the_low_target): Adjust.
4812 (initialize_low_arch): New function.
4813 * linux-bfin-low.c (tdesc_bfin): Declare.
4814 (bfin_arch_setup): New function.
4815 (bfin_usrregs_info, regs_info): New globals.
4816 (bfin_regs_info): New function.
4817 (the_low_target): Adjust.
4818 (initialize_low_arch): New function.
4819 * linux-cris-low.c (tdesc_cris): Declare.
4820 (cris_arch_setup): New function.
4821 (cris_usrregs_info, regs_info): New globals.
4822 (cris_regs_info): New function.
4823 (the_low_target): Adjust.
4824 (initialize_low_arch): New function.
4825 * linux-cris-low.c (tdesc_crisv32): Declare.
4826 (cris_arch_setup): New function.
4827 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
4828 (cris_regs_info): New function.
4829 (the_low_target): Adjust.
4830 (initialize_low_arch): New function.
4831 * linux-m32r-low.c (tdesc_m32r): Declare.
4832 (m32r_arch_setup): New function.
4833 (m32r_usrregs_info, regs_info): New globals.
4834 (m32r_regs_info): Adjust.
4835 (initialize_low_arch): New function.
4836 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
4837 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
4838 (tic6x_usrregs_info): Forward declare.
4839 (tic6x_read_description): New function, based on ...
4840 (tic6x_arch_setup): ... this. Reimplement.
4841 (target_regsets): Rename to ...
4842 (tic6x_regsets): ... this, and make static.
4843 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
4844 (tic6x_regs_info): New function.
4845 (the_low_target): Adjust.
4846 (initialize_low_arch): New function.
4847 * linux-xtensa-low.c (tdesc_xtensa): Declare.
4848 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
4849 (target_regsets): Rename to ...
4850 (xtensa_regsets): ... this, and make static.
4851 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
4852 globals.
4853 (xtensa_arch_setup, xtensa_regs_info): New functions.
4854 (the_low_target): Adjust.
4855 (initialize_low_arch): New function.
4856 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
4857 (nios2_arch_setup): Set the current process'es tdesc.
4858 (target_regsets): Rename to ...
4859 (nios2_regsets): ... this.
4860 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
4861 (nios2_regs_info): New function.
4862 (the_low_target): Adjust.
4863 (initialize_low_arch): New function.
4864 * linux-aarch64-low.c (tdesc_aarch64): Declare.
4865 (aarch64_arch_setup): Set the current process'es tdesc.
4866 (target_regsets): Rename to ...
4867 (aarch64_regsets): ... this.
4868 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
4869 (aarch64_regs_info): New function.
4870 (the_low_target): Adjust.
4871 (initialize_low_arch): New function.
4872 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
4873 globals.
4874 (target_regsets): Rename to ...
4875 (tile_regsets): ... this.
4876 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
4877 (tile_regs_info): New function.
4878 (tile_arch_setup): Set the current process'es tdesc.
4879 (the_low_target): Adjust.
4880 (initialize_low_arch): New function.
4881 * spu-low.c (tdesc_spu): Declare.
4882 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
4883 * win32-arm-low.c (tdesc_arm): Declare.
4884 (arm_arch_setup): New function.
4885 (the_low_target): Install arm_arch_setup instead of
4886 init_registers_arm.
4887 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
4888 (init_windows_x86): Rename to ...
4889 (i386_arch_setup): ... this. Set `win32_tdesc'.
4890 (the_low_target): Adjust.
4891 * win32-low.c (win32_tdesc): New global.
4892 (child_add_thread): Don't create the thread cache here.
4893 (do_initial_child_stuff): Set the new process'es tdesc.
4894 * win32-low.h (struct target_desc): Forward declare.
4895 (win32_tdesc): Declare.
4896 * lynx-i386-low.c (tdesc_i386): Declare global.
4897 (lynx_i386_arch_setup): Set `lynx_tdesc'.
4898 * lynx-low.c (lynx_tdesc): New global.
4899 (lynx_add_process): Set the new process'es tdesc.
4900 * lynx-low.h (struct target_desc): Forward declare.
4901 (lynx_tdesc): Declare global.
4902 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
4903 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
4904 * nto-low.c (nto_tdesc): New global.
4905 (do_attach): Set the new process'es tdesc.
4906 * nto-low.h (struct target_desc): Forward declare.
4907 (nto_tdesc): Declare.
4908 * nto-x86-low.c (tdesc_i386): Declare.
4909 (nto_x86_arch_setup): Set `nto_tdesc'.
4910
4911 2013-06-04 Gary Benson <gbenson@redhat.com>
4912
4913 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
4914 to qSupported response when appropriate.
4915 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
4916 with nonzero-length annex.
4917 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
4918 arguments supplied in annex.
4919
4920 2013-05-31 Doug Evans <dje@google.com>
4921
4922 PR server/15594
4923 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
4924 64 bits in 64-cross-32 environment.
4925
4926 2013-05-28 Pedro Alves <palves@redhat.com>
4927
4928 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
4929 (aarch64-without-fpu.c): Delete rule.
4930 * configure.srv (aarch64*-*-linux*): Remove references to
4931 aarch64-without-fpu.o and aarch64-without-fpu.xml.
4932 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
4933 declaration.
4934
4935 2013-05-24 Pedro Alves <palves@redhat.com>
4936
4937 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
4938 instead of strchr/decode_address. Error if the range isn't split
4939 with a ','. Don't assume there's be a ':' in the action.
4940
4941 2013-05-23 Yao Qi <yao@codesourcery.com>
4942 Pedro Alves <palves@redhat.com>
4943
4944 * linux-low.c (lwp_in_step_range): New function.
4945 (linux_wait_1): If the thread was range stepping and stopped
4946 outside the stepping range, report the stop to GDB. Otherwise,
4947 continue stepping. Add range stepping debug output.
4948 (linux_set_resume_request): Copy the step range from the resume
4949 request to the lwp.
4950 (linux_supports_range_stepping): New.
4951 (linux_target_ops) <supports_range_stepping>: Set to
4952 linux_supports_range_stepping.
4953 * linux-low.h (struct linux_target_ops)
4954 <supports_range_stepping>: New field.
4955 (struct lwp_info) <step_range_start, step_range_end>: New fields.
4956 * linux-x86-low.c (x86_supports_range_stepping): New.
4957 (the_low_target) <supports_range_stepping>: Set to
4958 x86_supports_range_stepping.
4959 * server.c (handle_v_cont): Handle 'r' action.
4960 (handle_v_requests): Append ";r" if the target supports range
4961 stepping.
4962 * target.h (struct thread_resume) <step_range_start,
4963 step_range_end>: New fields.
4964 (struct target_ops) <supports_range_stepping>:
4965 New field.
4966 (target_supports_range_stepping): New macro.
4967
4968 2013-05-17 Joel Brobecker <brobecker@adacore.com>
4969
4970 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
4971 confusion in comment.
4972
4973 2013-05-17 Joel Brobecker <brobecker@adacore.com>
4974
4975 * lynx-low.c (struct process_info_private): New type.
4976 (lynx_add_process): New function.
4977 (lynx_create_inferior, lynx_attach): Replace calls to
4978 add_process by calls to lynx_add_process.
4979 (lynx_resume): If PTID is null, then try using
4980 current_process()->private->last_wait_event_ptid.
4981 Add comments.
4982 (lynx_clear_inferiors): Delete. The contents of that function
4983 has been inlined in lynx_mourn;
4984 (lynx_wait_1): Save the ptid in the process's private data.
4985 (lynx_mourn): Free the process' private data. Replace call
4986 to lynx_clear_inferiors by call to clear_inferiors.
4987
4988 2013-05-17 Yao Qi <yao@codesourcery.com>
4989
4990 * i386-low.c (i386_length_and_rw_bits): Move the comment to
4991 the right place.
4992
4993 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
4994
4995 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
4996 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
4997 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
4998 PT_TEXT_END_ADDR guards. Update comments.
4999 (linux_target_op) <read_offsets>: Conditionally define to
5000 linux_read_offsets if the target is UCLIBC and if it defines
5001 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
5002
5003 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
5004 Andrew Jenner <andrew@codesourcery.com>
5005
5006 * Makefile.in (SFILES): Add linux-nios2-low.c.
5007 (clean): Add action to delete nios2-linux.c.
5008 (nios2-linux.c): New rule.
5009 * configure.srv: Add nios2*-*-linux*.
5010 * linux-nios2-low.c: New.
5011
5012 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
5013
5014 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
5015
5016 2013-04-25 Hui Zhu <hui@codesourcery.com>
5017
5018 PR gdb/15186
5019 * ax.c (ax_printf): Add fflush.
5020
5021 2013-04-22 Tom Tromey <tromey@redhat.com>
5022
5023 * Makefile.in (SFILES): Add filestuff.c.
5024 (OBS): Add filestuff.o.
5025 (filestuff.o): New target.
5026 * config.in, configure: Rebuild.
5027 * configure.ac: Check for fdwalk, pipe2.
5028
5029 2013-04-17 Pedro Alves <palves@redhat.com>
5030
5031 * configure.ac (USE_THREAD_DB): Delete variable.
5032 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
5033 Don't AC_SUBST USE_THREAD_DB.
5034 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
5035 * config.in, configure: Regenerate.
5036
5037 2013-04-16 Pedro Alves <palves@redhat.com>
5038
5039 * linux-low.h (struct lwp_info) <thread_known>: Move under
5040 the USE_THREAD_DB #ifdef.
5041
5042 2013-04-16 Pedro Alves <palves@redhat.com>
5043
5044 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
5045 (linux-low.o): Delete rule.
5046 * linux-low.h: Always include "gdb_thread_db.h" instead of
5047 conditionally including thread_db.h.
5048 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
5049 HAVE_THREAD_DB_H.
5050
5051 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5052
5053 * Makefile.in (install-only): Fix make install regression.
5054
5055 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
5056
5057 Convert man pages to texinfo, new gdbinit.5 texinfo page.
5058 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
5059 installation.
5060 * gdbserver.1: Remove.
5061
5062 2013-03-22 Pedro Alves <palves@redhat.com>
5063
5064 * linux-low.c (handle_extended_wait): Don't call
5065 linux_enable_event_reporting.
5066
5067 2013-03-15 Tony Theodore <tonyt@logyst.com>
5068
5069 PR build/9098:
5070 * Makefile.in (SHELL): Use @SHELL@.
5071
5072 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
5073
5074 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
5075 compiler warning.
5076
5077 2013-03-13 Joel Brobecker <brobecker@adacore.com>
5078
5079 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
5080 Remove extraneous NULL element.
5081
5082 2013-03-13 Yao Qi <yao@codesourcery.com>
5083
5084 * tracepoint.c (traceframe_read_tsv): Look for the last matched
5085 'V' block in trace frame.
5086
5087 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
5088
5089 * target.h (struct target_ops): Add btrace ops.
5090 (target_supports_btrace): New macro.
5091 (target_enable_btrace): New macro.
5092 (target_disable_btrace): New macro.
5093 (target_read_btrace): New macro.
5094 * gdbthread.h (struct thread_info): Add btrace field.
5095 * server.c: Include btrace-common.h.
5096 (handle_btrace_general_set): New function.
5097 (handle_btrace_enable): New function.
5098 (handle_btrace_disable): New function.
5099 (handle_general_set): Call handle_btrace_general_set.
5100 (handle_qxfer_btrace): New function.
5101 (struct qxfer qxfer_packets[]): Add btrace entry.
5102 * inferiors.c (remove_thread): Disable btrace.
5103 * linux-low: Include linux-btrace.h.
5104 (linux_low_enable_btrace): New function.
5105 (linux_low_read_btrace): New function.
5106 (linux_target_ops): Add btrace ops.
5107 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
5108 Add srv_linux_btrace=yes.
5109 (x86_64-*-linux*): Add linux-btrace.o.
5110 Add srv_linux_btrace=yes.
5111 * configure.ac: Define HAVE_LINUX_BTRACE.
5112 * config.in: Regenerated.
5113 * configure: Regenerated.
5114
5115 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
5116
5117 * server.c (handle_qxfer): Preserve error message if -3 is
5118 returned.
5119 (qxfer): Document the -3 return value.
5120
5121 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
5122
5123 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
5124 (linux_btrace_h): New variable.
5125 (linux-btrace.o): New rule.
5126
5127 2013-03-08 Stan Shebs <stan@codesourcery.com>
5128 Hafiz Abid Qadeer <abidh@codesourcery.com>
5129
5130 * tracepoint.c (trace_buffer_size): New global.
5131 (DEFAULT_TRACE_BUFFER_SIZE): New define.
5132 (init_trace_buffer): Change to one-argument function. Allocate
5133 trace buffer memory.
5134 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
5135 handle QTBuffer:size packet.
5136 (cmd_bigqtbuffer_size): New function.
5137 (initialize_tracepoint): Call init_trace_buffer with
5138 DEFAULT_TRACE_BUFFER_SIZE.
5139 * server.c (handle_query): Add QTBuffer:size in the
5140 supported packets.
5141
5142 2013-03-07 Yao Qi <yao@codesourcery.com>
5143
5144 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
5145 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
5146 of -1.
5147 (cmd_qtsp): Adjust condition. Do post increment.
5148 Set cur_action and cur_step_action back to 0.
5149
5150 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
5151
5152 PR server/15236
5153 * linux-low.c (linux_write_memory): Return early success if LEN is
5154 zero.
5155
5156 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
5157
5158 * configure.srv: Add x86_64-*-cygwin* as target.
5159
5160 2013-02-28 Tom Tromey <tromey@redhat.com>
5161
5162 * configure.ac: Invoke AC_SYS_LARGEFILE.
5163 * configure, config.in: Rebuild.
5164
5165 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
5166
5167 * win32-low.c: Throughout, fix format strings and casts of
5168 printf-like functions to avoid type related warnings on all
5169 platforms.
5170 (get_child_debug_event): Print dwDebugEventCode as hex since
5171 that's how it's usually documented.
5172
5173 2013-02-28 Yao Qi <yao@codesourcery.com>
5174
5175 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
5176 pulongest.
5177
5178 2013-02-27 Jiong Wang <jiwang@tilera.com>
5179
5180 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
5181 (reg-tilegx32.c): New rule.
5182 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
5183 * linux-tile-low.c (tile_arch_setup): New function. Invoke
5184 different register info initializer according to elf class.
5185 (init_registers_tilgx32): New function. The tilegx32 register info
5186 initializer.
5187 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
5188 (tile_store_gregset): Likewise.
5189
5190 2013-02-27 Yao Qi <yao@codesourcery.com>
5191
5192 * server.c (process_point_options): Print debug message when
5193 debug_threads is true.
5194
5195 2013-02-26 Yao Qi <yao@codesourcery.com>
5196
5197 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
5198
5199 2013-02-19 Pedro Alves <palves@redhat.com>
5200 Kai Tietz <ktietz@redhat.com>
5201
5202 PR gdb/15161
5203
5204 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
5205 instead of strtoul to extract address from packet.
5206 (process_serial_event) <'z'>: Likewise.
5207
5208 2013-02-18 Yao Qi <yao@codesourcery.com>
5209
5210 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
5211
5212 2013-02-14 Pedro Alves <palves@redhat.com>
5213
5214 Plug memory leak.
5215
5216 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
5217 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
5218
5219 2013-02-14 Pedro Alves <palves@redhat.com>
5220
5221 * tracepoint.c (cmd_qtdpsrc): Use savestring.
5222
5223 2013-02-14 Pedro Alves <palves@redhat.com>
5224
5225 * tracepoint.c (save_string): Delete.
5226 (add_tracepoint_action): Use savestring instead of save_string.
5227
5228 2013-02-12 Pedro Alves <palves@redhat.com>
5229
5230 * linux-xtensa-low.c: Ditto.
5231 * xtensa-xtregs.c: Ditto.
5232
5233 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
5234
5235 * thread-db.c (thread_db_get_tls_address): NULL pointer check
5236 thread_db.
5237
5238 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
5239
5240 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
5241 aarch64_num_wp_regs and aarch64_num_bp_regs to
5242 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
5243
5244 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
5245
5246 * linux-aarch64-low.c (ps_get_thread_area): Replace
5247 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
5248
5249 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
5250 Marcus Shawcroft <marcus.shawcroft@arm.com>
5251 Nigel Stephens <nigel.stephens@arm.com>
5252 Yufeng Zhang <yufeng.zhang@arm.com>
5253
5254 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
5255 (aarch64.c, aarch64-without-fpu.c): New targets.
5256 * configure.srv (aarch64*-*-linux*): New.
5257 * linux-aarch64-low.c: New file.
5258
5259 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
5260
5261 * linux-low.c (handle_extended_wait, linux_create_inferior)
5262 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
5263 (dequeue_one_deferred_signal, linux_resume_one_thread)
5264 (fetch_register, linux_write_memory, linux_enable_event_reporting)
5265 (linux_tracefork_grandchild, linux_test_for_tracefork)
5266 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
5267 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
5268 where the argument is 0.
5269
5270 2013-01-25 Yao Qi <yao@codesourcery.com>
5271
5272 * event-loop.c: Include "queue.h".
5273 (gdb_event_p): New typedef.
5274 (struct gdb_event) <next_event>: Remove.
5275 (event_queue): Change to QUEUE(gdb_event_p).
5276 (async_queue_event): Remove.
5277 (gdb_event_xfree): New.
5278 (initialize_event_loop): New.
5279 (process_event): Use API from QUEUE.
5280 (wait_for_event): Likewise.
5281 * server.c (main): Call initialize_event_loop.
5282 * server.h (initialize_event_loop): Declare.
5283
5284 2013-01-18 Yao Qi <yao@codesourcery.com>
5285
5286 * ax.h (struct eval_agent_expr_context): New.
5287 (gdb_eval_agent_expr): Update declaration.
5288 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
5289 TFRAME. Add new argument CTX.
5290 * server.h (struct eval_agent_expr_context): Declare.
5291 (agent_mem_read, agent_tsv_read): Update declaration.
5292 (agent_mem_read_string): Likewise.
5293 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
5294 (add_traceframe_block): Add new argument TPOINT.
5295 Increase TPOINT->traceframe_usage.
5296 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
5297 eval_tracepoint_agent_expr.
5298 (condition_true_at_tracepoint): Likewise.
5299 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
5300 (agent_mem_read_string, agent_tsv_read): Likewise.
5301
5302 2013-01-16 Yao Qi <yao@codesourcery.com>
5303
5304 * linux-low.c (linux_resume_one_lwp): Don't check
5305 'lwp->bp_reinsert != 0'.
5306
5307 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5308 Pedro Alves <palves@redhat.com>
5309
5310 * lynx-low.c (ptrace_request_to_str): Define a temporary
5311 macro and use it to simplify this function's implementation.
5312
5313 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5314
5315 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
5316 sets errno.
5317
5318 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5319
5320 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
5321
5322 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5323
5324 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
5325
5326 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5327
5328 * lynx-low.c (lynx_resume): Use the resume_info parameter
5329 to determine the ptid for the lynx_ptrace call, unless
5330 it is equal to minus_one_ptid, in which case we use the
5331 ptid of the current_inferior.
5332 (lynx_wait_1): After having received a thread create/exit
5333 event, resume the inferior's execution using the signaling
5334 thread's ptid, rather than the old ptid.
5335
5336 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5337
5338 * lynx-low.c (lynx_resume): Delete variable ret.
5339
5340 2013-01-01 Joel Brobecker <brobecker@adacore.com>
5341
5342 * gdbreplay.c (gdbreplay_version): Update copyright year.
5343 * server.c (gdbserver_version): Likewise.
5344
5345 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5346
5347 * lynx-low.c (lynx_wait_1): Add debug trace before adding
5348 new thread.
5349
5350 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5351
5352 * lynx-low.c (ptrace_request_to_str): Add handling for
5353 PTRACE_GETTRACESIG.
5354
5355 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5356
5357 * lynx-low.c (lynx_attach): Delete variable new_process.
5358
5359 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5360
5361 * lynx-low.c (lynx_create_inferior): Delete variable
5362 new_process.
5363
5364 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5365
5366 * lynx-low.c (ptrace_request_to_str): Do not handle
5367 PTRACE_GETTHREADLIST if this macro does not exist.
5368
5369 2012-12-15 Yao Qi <yao@codesourcery.com>
5370
5371 * Makefile.in (OBS): Add notif.o.
5372 * notif.c, notif.h: New.
5373 * server.c: Include "notif.h".
5374 (struct vstop_notif) <next>: Remove.
5375 <base>: New field.
5376 (queue_stop_reply): Update.
5377 (push_event, send_next_stop_reply): Remove.
5378 (discard_queued_stop_replies): Update.
5379 (notif_stop): New variable.
5380 (handle_v_stopped): Remove.
5381 (handle_v_requests): Don't call handle_v_stopped. Call
5382 handle_ack_notif instead.
5383 (queue_stop_reply_callback): Call notif_event_enque instead
5384 of queue_stop_reply.
5385 (handle_status): Don't call send_next_stop_reply, call
5386 notif_write_event instead.
5387 (kill_inferior_callback): Likewise.
5388 (detach_or_kill_inferior_callback): Likewise.
5389 (main): Call initialize_notif.
5390 (process_serial_event): Call QUEUE_is_empty.
5391 (handle_target_event): Call notif_push instead of push event.
5392 * server.h (push_event): Remove declaration.
5393
5394 2012-12-10 Tom Tromey <tromey@redhat.com>
5395
5396 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
5397 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
5398 macros.
5399 (.c.o): Rewrite.
5400 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
5401 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
5402 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
5403 (amd64-linux-ipa.o, ax.o): Rewrite.
5404 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
5405 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
5406 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
5407 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
5408 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
5409 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
5410 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
5411 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
5412 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
5413 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
5414 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
5415 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
5416 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
5417 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
5418 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
5419 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
5420 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
5421 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
5422 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
5423 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
5424 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
5425 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
5426 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
5427 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
5428 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
5429 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
5430 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
5431 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
5432 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
5433 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
5434 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
5435 (reg-tilegx.o): Remove.
5436 (all_object_files): New macro.
5437 Include .deps files.
5438 * aclocal.m4, configure: Rebuild.
5439 * acinclude.m4: Include depstand.m4, lead-dot.m4.
5440 * configure.ac: Invoke ZW_CREATE_DEPDIR,
5441 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
5442
5443 2012-12-05 Tom Tromey <tromey@redhat.com>
5444
5445 PR gdb/14917:
5446 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
5447
5448 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
5449
5450 * configure.ac: Check for linux/perf_event.h.
5451 * config.in: Regenerated.
5452 * configure: Regenerated.
5453
5454 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
5455
5456 * hostio.c (handle_readlink): Decrease buffer size
5457 parameter passed to readlink by one byte.
5458
5459 2012-11-26 Yao Qi <yao@codesourcery.com>
5460
5461 * configure.ac (build_warnings): Append '-Wempty-body'.
5462 * configure: Regenerated.
5463 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
5464 body.
5465
5466 2012-11-15 Pierre Muller <muller@sourceware.org>
5467
5468 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
5469 * config.in: Regenerate.
5470 * configure: Regenerate.
5471 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
5472 Use "gdb_wait.h" header instead of <sys/wait.h> header.
5473 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
5474 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
5475 header.
5476 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
5477 instead of <sys/wait.h> header.
5478 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
5479
5480 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
5481
5482 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
5483 (various make rules): Remove -DGDBSERVER
5484
5485 2012-11-09 Yao Qi <yao@codesourcery.com>
5486
5487 * spu-low.c (current_ptid): Move it to ..
5488 * gdbthread.h: ... here. New.
5489 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
5490 * server.c (myresume, process_serial_event): Likewise.
5491 * thread-db.c (thread_db_find_new_threads): Likewise.
5492 * tracepoint.c (run_inferior_command): Likewise.
5493
5494 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
5495
5496 * server.c (handle_search_memory_1): Include access length in
5497 warning message.
5498
5499 2012-09-05 Michael Brandt <michael.brandt@axis.com>
5500
5501 * linux-crisv32-low.c: Fix compile errors.
5502
5503 2012-09-04 Yao Qi <yao@codesourcery.com>
5504
5505 * tracepoint.c (cmd_qtsv): Adjust debug message.
5506 Don't check CUR_TPOINT.
5507
5508 2012-08-28 Yao Qi <yao@codesourcery.com>
5509
5510 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
5511 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
5512 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
5513 Remove declarations of xmalloc, xreallloc, xstrdup and
5514 freeargv.
5515 * Makefile.in (libiberty_h): New.
5516 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
5517 (linux-bfin-low.o): Append dependency 'libiberty.h'.
5518
5519 2012-08-23 Yao Qi <yao@codesourcery.com>
5520
5521 * server.h: Remove declaration of 'xsnprintf'.
5522
5523 2012-08-22 Keith Seitz <keiths@redhat.com>
5524
5525 * server.h: Include build-gnulib-gbserver/config.h.
5526 * gdbreplay.c: Likewise.
5527
5528 2012-08-08 Doug Evans <dje@google.com>
5529
5530 * Makefile.in (SFILES): Add gdb_vecs.c.
5531 (OBS): Add gdb_vecs.o.
5532 (gdb_vecs_h, host_defs_h): New variables.
5533 (thread-db.o): Add $(gdb_vecs_h) dependency.
5534 (gdb_vecs.o): New rule.
5535 * thread-db.c: #include "gdb_vecs.h".
5536 (thread_db_load_search): Use a vector to iterate over path elements.
5537 Handle text appearing after "$pdir".
5538
5539 * configure.ac: Add check for strstr.
5540 * config.in: Regenerate.
5541 * configure: Regenerate.
5542
5543 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
5544
5545 * hostio.c (handle_pread): If pread fails, fall back to attempting
5546 lseek/read.
5547 (handle_pwrite): Likewise for pwrite.
5548
5549 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
5550
5551 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
5552 between unsupported TYPE and unimplementable ADDR/LEN combination.
5553 (arm_insert_point): Act on new return value.
5554
5555 2012-07-31 Pedro Alves <palves@redhat.com>
5556
5557 * server.c (process_point_options): Only skip tokens if we find
5558 one that is unrecognized. Don't treat 'X' specially while
5559 skipping unrecognized tokens.
5560
5561 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
5562
5563 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
5564 to 4-byte-align HW breakpoint addresses for Thumb.
5565
5566 2012-07-27 Yao Qi <yao@codesourcery.com>
5567
5568 PR remote/14161.
5569
5570 * server.h: Declare gdb_agent_about_to_close.
5571 * target.c (kill_inferior): Include "agent.h".
5572 New. Send command 'kill'.
5573 * target.h (kill_inferior): Removed macro.
5574 * tracepoint.c (gdb_agent_about_to_close): New.
5575 (gdb_agent_helper_thread): Handle command 'close'.
5576 Wait endlessly until the inferior stops.
5577 Install gdb_agent_remove_socket to atexit hook.
5578 (agent_socket_name): New static variable.
5579 (gdb_agent_socket_init): Replace local variable 'name' with
5580 'agent_socket_name'.
5581 (gdb_agent_remove_socket): New.
5582
5583 2012-07-27 Yao Qi <yao@codesourcery.com>
5584
5585 * server.c (process_point_options): Stop at 'X' when parsing.
5586
5587 2012-07-19 Michael Eager <eager@eagercon.com>
5588
5589 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
5590 to hw_execute.
5591 * linux-x86-low.c (x86_insert_point, x86_remove_point):
5592 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
5593 hardware breakpoint.
5594
5595 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5596
5597 * gdbserver/linux-low.c (initialize_low): Call
5598 linux_ptrace_init_warnings.
5599
5600 2012-07-02 Doug Evans <dje@google.com>
5601
5602 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
5603 pointer to int.
5604
5605 2012-07-02 Stan Shebs <stan@codesourcery.com>
5606
5607 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
5608 (ax.o): Add it to build rule.
5609 (ax-ipa.o): Ditto.
5610 (OBS): Add format.o.
5611 (IPA_OBS): Add format.o.
5612 * server.c (handle_query): Claim support for breakpoint commands.
5613 (process_point_options): Add command case.
5614 (process_serial_event): Leave running if there are printfs in
5615 effect.
5616 * mem-break.h (any_persistent_commands): Declare.
5617 (add_breakpoint_commands): Declare.
5618 (gdb_no_commands_at_breakpoint): Declare.
5619 (run_breakpoint_commands): Declare.
5620 * mem-break.c (struct point_command_list): New struct.
5621 (struct breakpoint): New field command_list.
5622 (any_persistent_commands): New function.
5623 (add_commands_to_breakpoint): New function.
5624 (add_breakpoint_commands): New function.
5625 (gdb_no_commands_at_breakpoint): New function.
5626 (run_breakpoint_commands): New function.
5627 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
5628 locally.
5629 * ax.c: Include format.h.
5630 (ax_printf): New function.
5631 (gdb_eval_agent_expr): Add printf opcode.
5632
5633 2012-06-13 Yao Qi <yao@codesourcery.com>
5634
5635 * server.c (start_inferior): Remove duplicated writes to fields
5636 'last_resume_kind' and 'last_status' of 'current_inferior'.
5637
5638 2012-06-12 Yao Qi <yao@codesourcery.com>
5639 Pedro Alves <palves@redhat.com>
5640
5641 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
5642 comment.
5643 * server.c (handle_v_cont): Extend comment.
5644
5645 2012-06-11 Yao Qi <yao@codesourcery.com>
5646
5647 * linux-low.c (linux_attach): Add 'static'.
5648
5649 2012-06-06 Yao Qi <yao@codesourcery.com>
5650
5651 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
5652
5653 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
5654
5655 Fix gcc -flto compilation warning.
5656 * server.c (main): Make variable multi_mode and attach volatile.
5657
5658 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5659
5660 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
5661 if the platform doesn't know about it.
5662
5663 2012-05-30 Jeff Kenton <jkenton@tilera.com>
5664
5665 * Makefile.in (SFILES): Add linux-tile-low.c.
5666 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
5667 * configure.srv: Handle tilegx-*-linux*.
5668 * linux-tile-low.c: New file.
5669
5670 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5671
5672 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
5673
5674 2012-05-24 Pedro Alves <palves@redhat.com>
5675
5676 PR gdb/7205
5677
5678 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
5679
5680 2012-05-24 Pedro Alves <palves@redhat.com>
5681
5682 PR gdb/7205
5683
5684 Replace target_signal with gdb_signal throughout.
5685
5686 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
5687
5688 * linux-low.c (linux_store_registers): Avoid the copying sequence
5689 when no data has been retrieved by ptrace.
5690
5691 2012-05-22 Will Deacon <will.deacon@arm.com>
5692
5693 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
5694 Include asm/ptrace.h.
5695 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
5696 already defined.
5697
5698 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
5699
5700 * linux-low.c (linux_store_registers): Don't re-retrieve data
5701 with ptrace that has already been obtained from /proc. Always
5702 copy any data retrieved with ptrace to the buffer supplied.
5703
5704 2012-05-11 Yao Qi <yao@codesourcery.com>
5705 Pedro Alves <palves@redhat.com>
5706
5707 * linux-low.c (enum stopping_threads_kind): New.
5708 (stopping_threads): Change type to `enum stopping_threads_kind'.
5709 (handle_extended_wait): If stopping and suspending threads, leave
5710 the new_lwp suspended too.
5711 (linux_wait_for_event): Adjust.
5712 (stop_all_lwps): Set `stopping_threads' to
5713 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
5714 whether we're suspending threads or just stopping them. Assert no
5715 recursion happens.
5716
5717 2012-04-29 Yao Qi <yao@codesourcery.com>
5718
5719 * server.h: Move some code to ...
5720 * gdbthread.h: ... here. New.
5721 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
5722 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
5723 (nto-low.o, win32-low.o): Likewise.
5724 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
5725 * regcache.c, remote-utils.c, server.c: Likewise.
5726 * target.c, tracepoint.c, win32-low.c: Likewise.
5727
5728 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5729
5730 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
5731 (PTRACE_ARG4_TYPE): Likewise.
5732 (PTRACE_XFER_TYPE): Likewise.
5733 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
5734 ptrace to PTRACE_ARG3_TYPE.
5735 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
5736 (PTRACE_ARG4_TYPE): Likewise.
5737 (PTRACE_XFER_TYPE): Likewise.
5738 (linux_detach_one_lwp): Cast fourth argument of
5739 ptrace to long then PTRACE_ARG4_TYPE.
5740 (regsets_fetch_inferior_registers): Cast third argument of
5741 ptrace to long then PTRACE_ARG3_TYPE.
5742 (regsets_store_inferior_registers): Likewise.
5743
5744 2012-04-20 Pedro Alves <palves@redhat.com>
5745
5746 * configure: Regenerate.
5747
5748 2012-04-19 Pedro Alves <palves@redhat.com>
5749
5750 * Makefile.in (GNULIB_BUILDDIR): New.
5751 (LIBGNU, INCGNU, GNULIB_H): Adjust.
5752 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
5753 (all, install-only, uninstall, clean-info, all-lib, clean): No
5754 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
5755 (maintainer-clean realclean distclean): Use subdir_do.
5756 (subdir_do): New.
5757 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
5758 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
5759 * acinclude.m4: Include acx_configure_dir.m4.
5760 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
5761 calls. Call AC_PROG_RANLIB. Configure gnulib using
5762 ACX_CONFIGURE_DIR.
5763 (GNULIB): New.
5764 (GNULIB_STDINT_H): Adjust.
5765 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
5766 * gdbreplay.c: Include build-gnulib/config.h.
5767 * server.h: Likewise.
5768 * aclocal.m4: Regenerate.
5769 * config.in: Regenerate.
5770 * configure: Regenerate.
5771
5772 2012-04-19 Pedro Alves <palves@redhat.com>
5773
5774 * Makefile.in (LIBGNU, INCGNU): Adjust.
5775 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
5776 (all, install-only, uninstall, clean-info, all-lib, clean)
5777 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
5778 * configure.ac: Adjust AC_OUTPUT output.
5779 * aclocal.m4: Regenerate.
5780 * configure: Regenerate.
5781
5782 2012-04-19 Pedro Alves <palves@redhat.com>
5783
5784 * Makefile.in (generated_files): New.
5785 (server_h): Remove the explicit dependency on config.h, and depend
5786 on $generated_files.
5787
5788 2012-04-19 Pedro Alves <palves@redhat.com>
5789
5790 * Makefile.in (INCGNU): Add -Ignulib.
5791
5792 2012-04-19 Pedro Alves <palves@redhat.com>
5793
5794 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
5795 (INCGNU): ... this, and spell out -I here.
5796 (GNULIB_LIB): Rename to ...
5797 (LIBGNU): ... this.
5798 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
5799
5800 2012-04-19 Pedro Alves <palves@redhat.com>
5801
5802 * config.in: Regenerate.
5803
5804 2012-04-19 Pedro Alves <palves@redhat.com>
5805
5806 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
5807 * server.h (memmem): Remove declaration.
5808 * config.in: Regenerate.
5809 * configure: Regenerate.
5810
5811 2012-04-19 Yao Qi <yao@codesourcery.com>
5812
5813 * Makefile.in (SFILES): Add common/vec.c.
5814 (OBS): Add vec.o.
5815 (vec.o): New rule.
5816
5817 2012-04-19 Yao Qi <yao@codesourcery.com>
5818
5819 * remote-utils.c (prepare_resume_reply): Replace with macro
5820 target_core_of_thread.
5821 * server.c (handle_qxfer_threads_proper): Likewise.
5822 * target.h (traget_core_of_thread): New macro.
5823
5824 2012-04-18 Pedro Alves <palves@redhat.com>
5825
5826 * aclocal.m4: Regenerate.
5827 * configure: Regenerate.
5828
5829 2012-04-16 Yao Qi <yao@codesourcery.com>
5830
5831 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
5832 duplicated on address.
5833
5834 2012-04-16 Yao Qi <yao@codesourcery.com>
5835
5836 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
5837 (struct tracepoint_action_ops) <send>: New field.
5838 (m_tracepoint_action_send, r_tracepoint_action_send): New.
5839 (agent_expr_send, x_tracepoint_action_send): New.
5840 (l_tracepoint_action_send): New.
5841 (cmd_qtdp): Download and install tracepoint
5842 according to `use_agent'.
5843 (run_inferior_command): Add one more parameter `len'.
5844 Update callers.
5845 (tracepoint_send_agent): New.
5846 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
5847
5848 2012-04-16 Yao Qi <yao@codesourcery.com>
5849
5850 * tracepoint.c (download_tracepoints): Moved to ...
5851 (cmd_qtstart): ... here.
5852
5853 2012-04-14 Yao Qi <yao@codesourcery.com>
5854
5855 * tracepoint.c: Include inttypes.h.
5856 (struct collect_memory_action): Use sized types.
5857 (struct tracepoint): Likewise.
5858 (cmd_qtdp, stop_tracing): Update print specifiers.
5859 (cmd_qtp, response_tracepoint): Likewise.
5860 (collect_data_at_tracepoint): Likewise.
5861 (collect_data_at_step): Likewise.
5862
5863 2012-04-14 Yao Qi <yao@codesourcery.com>
5864
5865 Import gnulib module inttypes.
5866 * aclocal.m4, config.in, configure: Regenerated.
5867
5868 2012-04-14 Yao Qi <yao@codesourcery.com>
5869
5870 * Makefile.in (maintainer-clean, realclean, distclean): Remove
5871 Makefile and config.status at last.
5872
5873 2012-04-13 Yao Qi <yao@codesourcery.com>
5874
5875 * tracepoint.c: Include stdint.h unconditionally.
5876
5877 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5878
5879 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
5880 on BFD_HAVE_SYS_PROCFS_TYPE.
5881 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
5882 * configure: Regenerate.
5883 * config.in: Likewise.
5884
5885 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
5886
5887 * Makefile.in (clean): Also remove x32.c x32-linux.c
5888 x32-avx.c x32-avx-linux.c.
5889 (x32.o): New target.
5890 (x32.c): Likewise.
5891 (x32-linux.o): Likewise.
5892 (x32-linux.c): Likewise.
5893 (x32-avx.o): Likewise.
5894 (x32-avx.c): Likewise.
5895 (x32-avx-linux.o): Likewise.
5896 (x32-avx-linux.c): Likewise.
5897
5898 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
5899 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
5900 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
5901 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
5902 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
5903 i386/x32-avx-linux.xml.
5904
5905 * linux-x86-low.c (init_registers_x32_linux): New prototype.
5906 (init_registers_x32_avx_linux): Likwise.
5907 (x86_linux_update_xmltarget): Call init_registers_x32_linux
5908 or init_registers_x32_avx_linux if linux_is_elf64 is false.
5909
5910 2012-04-13 Pedro Alves <palves@redhat.com>
5911
5912 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
5913 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
5914 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
5915 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
5916 the sub-make.
5917
5918 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
5919
5920 * linux-x86-low.c (compat_x32_clock_t): New.
5921 (compat_x32_siginfo_t): Likewise.
5922 (compat_x32_siginfo_from_siginfo): Likewise.
5923 (siginfo_from_compat_x32_siginfo): Likewise.
5924 (linux_is_elf64): Likewise.
5925 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
5926 and siginfo_from_compat_x32_siginfo for x32.
5927 (x86_arch_setup): Set linux_is_elf64.
5928
5929 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
5930
5931 PR gdb/13969
5932 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
5933 e_machine field.
5934 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
5935 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
5936 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
5937 compatible with process.
5938
5939 2012-04-12 Yao Qi <yao@codesourcery.com>
5940
5941 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
5942 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
5943 (install-only, install-info, clean): Handle sub dir gnulib.
5944 (all-lib, am--refresh): New targets.
5945 (memmem.o): Remove target.
5946 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
5947 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
5948 (AC_REPLACE_FUNCS): Remove memmem.
5949 Invoke gl_INIT and AM_INIT_AUTOMAKE.
5950 (AC_OUTPUT): Generate Makefile in gnulib/.
5951 * aclocal.m4, config.in, configure: Regenerated.
5952
5953 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
5954
5955 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
5956
5957 2012-04-05 Pedro Alves <palves@redhat.com>
5958
5959 -Werror=strict-aliasing
5960
5961 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
5962 pointer.
5963
5964 2012-04-04 Pedro Alves <palves@redhat.com>
5965
5966 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
5967 (sparc_store_gregset_from_stack, sparc_store_gregset)
5968 (sparc_breakpoint_at): Fix formatting.
5969
5970 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5971
5972 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
5973 are available.
5974 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
5975 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
5976 * config.in: Regenerate.
5977 * configure: Likewise.
5978
5979 2012-03-29 Pedro Alves <palves@redhat.com>
5980
5981 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
5982 Correct ptrace arguments.
5983
5984 2012-03-28 Pedro Alves <palves@redhat.com>
5985
5986 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
5987 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
5988 (IA64_FR1_REGNUM): New defines.
5989 (ia64_fetch_register): New.
5990 (the_low_target): Install it.
5991 * linux-low.h (struct linux_target_ops) <fetch_register>: New
5992 field.
5993 * linux-low.c (linux_fetch_registers): Try the
5994 the_low_target.fetch_register hook first.
5995
5996 * linux-arm-low.c (the_low_target): Adjust.
5997 * linux-bfin-low.c (the_low_target): Adjust.
5998 * linux-cris-low.c (the_low_target): Adjust.
5999 * linux-crisv32-low.c (the_low_target): Adjust.
6000 * linux-m32r-low.c (the_low_target): Adjust.
6001 * linux-m68k-low.c (the_low_target): Adjust.
6002 * linux-mips-low.c (the_low_target): Adjust.
6003 * linux-ppc-low.c (the_low_target): Adjust.
6004 * linux-s390-low.c (the_low_target): Adjust.
6005 * linux-sh-low.c (the_low_target): Adjust.
6006 * linux-sparc-low.c (the_low_target): Adjust.
6007 * linux-tic6x-low.c (the_low_target): Adjust.
6008 * linux-x86-low.c (the_low_target): Adjust.
6009 * linux-xtensa-low.c (the_low_target): Adjust.
6010
6011 2012-03-26 Pedro Alves <palves@redhat.com>
6012
6013 * server.c (handle_qxfer_libraries): Don't bail early if
6014 the_target->qxfer_libraries_svr4 is not NULL.
6015
6016 2012-03-26 Pedro Alves <palves@redhat.com>
6017
6018 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
6019
6020 2012-03-23 Pedro Alves <palves@redhat.com>
6021
6022 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
6023 "library-list-svr4" element's start tag when the the DSO list is
6024 empty.
6025
6026 2012-03-23 Pedro Alves <palves@redhat.com>
6027
6028 * linux-low.c (read_one_ptr): Read the inferior's pointer through
6029 a variable whose type size is the same as the inferior's pointer
6030 size.
6031
6032 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
6033
6034 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
6035 struct siginfo.
6036 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
6037 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
6038 * linux-low.h: Include <signal.h>.
6039 (struct siginfo): Remove forward declaration.
6040 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
6041 struct siginfo.
6042
6043 2012-03-21 Mike Frysinger <vapier@gentoo.org>
6044
6045 * .gitignore: Ignore more files.
6046
6047 2012-03-19 Pedro Alves <palves@redhat.com>
6048 Jan Kratochvil <jan.kratochvil@redhat.com>
6049
6050 * server.c (cont_thread, general_thread): Add describing comments.
6051 (start_inferior): Clear `cont_thread'.
6052 (handle_v_cont): Don't set `cont_thread' if resuming all threads
6053 of a process.
6054
6055 2012-03-15 Yao Qi <yao@codesourcery.com>
6056
6057 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
6058 handling to ...
6059 (cmd_qtdp): ... here.
6060
6061 2012-03-15 Yao Qi <yao@codesourcery.com>
6062
6063 * tracepoint.c (struct tracepoint_action_ops): New.
6064 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
6065 (m_tracepoint_action_download): New.
6066 (r_tracepoint_action_download): New.
6067 (x_tracepoint_action_download): New.
6068 (l_tracepoint_action_download): New.
6069 (add_tracepoint_action): Install `action->ops' according type.
6070 (download_tracepoint_1): Move code `download' function pointer
6071 of various tracepoint_action_ops.
6072
6073 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
6074
6075 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
6076 linux_ptrace_attach_warnings.
6077
6078 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
6079
6080 * Makefile.in (linux-ptrace.o): New.
6081 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
6082 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
6083 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
6084 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
6085 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
6086 of these targets.
6087 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
6088
6089 2012-03-08 Yao Qi <yao@codesourcery.com>
6090 Pedro Alves <palves@redhat.com>
6091
6092 Fix PR server/13392.
6093 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
6094 offset of JMP insn.
6095 * tracepoint.c (remove_tracepoint): New.
6096 (cmd_qtdp): Call remove_tracepoint when failed to install.
6097
6098 2012-03-07 Pedro Alves <palves@redhat.com>
6099
6100 * linux-low.c (get_detach_signal): New.
6101 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
6102 Pass on pending signals to PTRACE_DETACH. Check the result of the
6103 ptrace call.
6104 * server.c (program_signals, program_signals_p): New.
6105 (handle_general_set): Handle QProgramSignals.
6106 * server.h (program_signals, program_signals_p): Declare.
6107
6108 2012-03-05 Pedro Alves <palves@redhat.com>
6109 Jan Kratochvil <jan.kratochvil@redhat.com>
6110
6111 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
6112 New comment why.
6113
6114 2012-03-03 Yao Qi <yao@codesourcery.com>
6115
6116 * tracepoint.c (tracepoint_look_up_symbols): Update call to
6117 agent_look_up_symbols.
6118
6119 2012-03-03 Yao Qi <yao@codesourcery.com>
6120
6121 * Makefile.in (linux-low.o): Keep dependence on agent.h.
6122 (linux-x86-low.o): Likewise.
6123 * server.h: Remove in_process_agent_loaded.
6124 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
6125 common/agent.c.
6126 Update callers.
6127
6128 2012-03-03 Yao Qi <yao@codesourcery.com>
6129
6130 * tracepoint.c (gdb_agent_capability): New global.
6131 (in_process_agent_loaded_ust): Renamed to
6132 `in_process_agent_supports_ust'.
6133 Update callers.
6134 (in_process_agent_supports_ust): Call agent_capability_check.
6135 (clear_installed_tracepoints): Assert that agent supports
6136 agent.
6137
6138 2012-03-03 Yao Qi <yao@codesourcery.com>
6139
6140 * linux-low.c (linux_supports_agent): New.
6141 (linux_target_ops): Initialize field `supports_agent' with
6142 linux_supports_agent.
6143 * target.h (struct target_ops) <supports_agent>: New.
6144 (target_supports_agent): New macro.
6145 * server.c (handle_general_set): Handle packet 'QAgent'.
6146 (handle_query): Send `QAgent+'.
6147 * Makefile.in (server.o): Depends on agent.h.
6148
6149 2012-03-03 Yao Qi <yao@codesourcery.com>
6150
6151 * Makefile.in (OBS): Add agent.o.
6152 Add new rule for agent.o.
6153 Track dependence of tracepoint.c on agent.h.
6154 * tracepoint.c (run_inferior_command_1):
6155 (run_inferior_command): Call agent_run_command.
6156 (gdb_ust_connect_sync_socket): Deleted. Move it to
6157 common/agent.c.
6158 (resume_thread, stop_thread): Likewise.
6159 (gdb_ust_socket_init): Renamed to ...
6160 (gdb_agent_socket_init): ... New.
6161 (gdb_ust_thread): Renamed to ...
6162 (gdb_agent_helper_thread): ... New.
6163 (gdb_ust_init): Move some code to ...
6164 (gdb_agent_init): ... here. New.
6165 [HAVE_UST]: Call gdb_ust_init.
6166 (initialize_tracepoint_ftlib): Call gdb_agent_init.
6167 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
6168 * config.in, configure: Regenerated.
6169
6170 2012-03-02 Pedro Alves <palves@redhat.com>
6171
6172 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
6173 * linux-low.c (struct simple_pid_list): New.
6174 (stopped_pids): New a struct simple_pid_list pointer.
6175 (add_to_pid_list, pull_pid_from_list): New.
6176 (handle_extended_wait): Don't assume the first signal new children
6177 report is SIGSTOP. Adjust call to pull_pid_from_list.
6178 (linux_wait_for_lwp): Adjust.
6179
6180 2012-03-02 Yao Qi <yao@codesourcery.com>
6181
6182 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
6183 debug log.
6184
6185 2012-03-02 Yao Qi <yao@codesourcery.com>
6186
6187 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
6188 `stop_pc' and `tpoint'. Update caller.
6189
6190 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
6191
6192 * linux-low.h (linux_target_ops): Add regset_bitmap member.
6193 * linux-low.c (use_linux_regsets): New macro.
6194 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
6195 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
6196 (linux_register_in_regsets): New function.
6197 (usr_fetch_inferior_registers): Skip registers covered by
6198 regsets.
6199 (usr_store_inferior_registers): Likewise.
6200 (usr_fetch_inferior_registers): New macro.
6201 (usr_store_inferior_registers): Likewise.
6202 (linux_fetch_registers): Handle mixed regset/non-regset targets.
6203 (linux_store_registers): Likewise.
6204 * linux-mips-low.c (init_registers_mips_dsp_linux): New
6205 prototype.
6206 (init_registers_mips64_dsp_linux): Likewise.
6207 (init_registers_mips_linux): New macro.
6208 (init_registers_mips_dsp_linux): Likewise.
6209 (mips_dsp_num_regs): Likewise.
6210 (DSP_BASE, DSP_CONTROL): New fallback macros.
6211 (mips_base_regs): New macro.
6212 (mips_regmap): Use it. Fix the size.
6213 (mips_dsp_regmap): New variable.
6214 (mips_dsp_regset_bitmap): Likewise.
6215 (mips_arch_setup): New function.
6216 (mips_cannot_fetch_register): Use the_low_target.regmap rather
6217 than mips_regmap.
6218 (mips_cannot_store_register): Likewise.
6219 (the_low_target): Update .arch_setup, .num_regs and .regmap
6220 initializers. Add .regset_bitmap initializer.
6221 * linux-arm-low.c (the_low_target): Add .regset_bitmap
6222 initializer.
6223 * linux-bfin-low.c (the_low_target): Likewise.
6224 * linux-cris-low.c (the_low_target): Likewise.
6225 * linux-crisv32-low.c (the_low_target): Likewise.
6226 * linux-ia64-low.c (the_low_target): Likewise.
6227 * linux-m32r-low.c (the_low_target): Likewise.
6228 * linux-m68k-low.c (the_low_target): Likewise.
6229 * linux-ppc-low.c (the_low_target): Likewise.
6230 * linux-s390-low.c (the_low_target): Likewise.
6231 * linux-sh-low.c (the_low_target): Likewise.
6232 * linux-sparc-low.c (the_low_target): Likewise.
6233 * linux-tic6x-low.c (the_low_target): Likewise.
6234 * linux-x86-low.c (the_low_target): Likewise.
6235 * linux-xtensa-low.c (the_low_target): Likewise.
6236 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
6237 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
6238 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
6239 srv_xmlfiles.
6240 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
6241 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
6242
6243 2012-02-29 Yao Qi <yao@codesourcery.com>
6244 Pedro Alves <palves@redhat.com>
6245
6246 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
6247 `step_over_finished' is true.
6248
6249 2012-02-27 Pedro Alves <palves@redhat.com>
6250
6251 * linux-low.c (pid_is_stopped): Delete, moved to common/.
6252 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
6253
6254 2012-02-27 Pedro Alves <palves@redhat.com>
6255
6256 PR server/9684
6257 * linux-low.c (pid_is_stopped): New.
6258 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
6259
6260 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
6261
6262 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
6263 of conditions.
6264
6265 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
6266
6267 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
6268
6269 2012-02-24 Luis Machado <lgustavo@codesourcery>
6270
6271 * server.c (handle_query): Advertise support for target-side
6272 breakpoint condition evaluation.
6273 (process_point_options): New function.
6274 (process_serial_event): When inserting a breakpoint, check for
6275 a target-side condition that should be evaluated.
6276
6277 * mem-break.c: Include regcache.h and ax.h.
6278 (point_cond_list_t): New data structure.
6279 (breakpoint) <cond_list>: New field.
6280 (find_gdb_breakpoint_at): Make non-static.
6281 (delete_gdb_breakpoint_at): Clear any target-side
6282 conditions.
6283 (clear_gdb_breakpoint_conditions): New function.
6284 (add_condition_to_breakpoint): Likewise.
6285 (add_breakpoint_condition): Likewise.
6286 (gdb_condition_true_at_breakpoint): Likewise.
6287 (gdb_breakpoint_here): Return result directly instead
6288 of going through a local variable.
6289
6290 * mem-break.h (find_gdb_breakpoint_at): New prototype.
6291 (clear_gdb_breakpoint_conditions): Likewise.
6292 (add_breakpoint_condition): Likewise.
6293 (gdb_condition_true_at_breakpoint): Likewise.
6294
6295 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
6296 (need_step_over_p): Take target-side breakpoint condition into
6297 consideration.
6298
6299 2012-02-24 Luis Machado <lgustavo@codesourcery>
6300
6301 * server.h: Include tracepoint.h.
6302 (agent_mem_read, agent_get_trace_state_variable_value,
6303 agent_set_trace_state_variable_value,
6304 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
6305 get_set_tsv_func_addr): New prototypes.
6306
6307 * ax.h: New include file.
6308 * ax.c: New source file.
6309
6310 * tracepoint.c: Include ax.h.
6311 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
6312 agent_expr, eval_result_type): Move to ax.h.
6313 (parse_agent_expr): Rename to ...
6314 (gdb_parse_agent_expr): ... this, make it non-static and move
6315 to ax.h.
6316 (unparse_agent_expr) Rename to ...
6317 (gdb_unparse_agent_expr): ... this, make it non-static and move
6318 to ax.h.
6319 (eval_agent_expr): Rename to ...
6320 (eval_tracepoint_agent_expr): ... this.
6321 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
6322 forward declarations.
6323 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
6324 (agent_get_trace_state_variable_value): New function.
6325 (agent_set_trace_state_variable_value): New function.
6326 (cmd_qtdp): Call gdb_parse_agent_expr (...).
6327 (response_tracepoint): Call gdb_unparse_agent_expr (...).
6328 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
6329 (condition_true_at_tracepoint): Likewise.
6330 (parse_agent_expr): Rename to ...
6331 (gdb_parse_agent_expr): ... this and move to ax.c.
6332 (unparse_agent_expr): Rename to ...
6333 (gdb_unparse_agent_expr): ... this and move to ax.c.
6334 (gdb_agent_op_name): Move to ax.c.
6335 (eval_agent_expr): Rename to ...
6336 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
6337 and move to ax.c.
6338 (eval_tracepoint_agent_expr): New function.
6339 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
6340 non-static.
6341 (current_insn_ptr, emit_error, struct bytecode_address): Move to
6342 ax.c.
6343 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
6344 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
6345 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
6346 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
6347 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
6348 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
6349 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
6350 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
6351 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
6352 (compile_bytecodes): Remove forward declaration.
6353 (is_goto_target): Move to ax.c.
6354 (compile_bytecodes): Move to ax.c and call
6355 agent_get_trace_state_variable_value (...) and
6356 agent_set_trace_state_variable_value (...).
6357
6358 * Makefile.in: Update ax.c and IPA dependencies.
6359
6360 2012-02-24 Pedro Alves <palves@redhat.com>
6361
6362 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
6363 (cmd_bigqtbuffer_circular): ... this. Only handle
6364 'QTBuffer:circular:'.
6365 (handle_tracepoint_general_set): Adjust.
6366
6367 2012-02-16 Yao Qi <yao@codesourcery.com>
6368
6369 * inferiors.c: Move code to ...
6370 * dll.c: .... here. New.
6371 * server.h: Declare clear_dlls.
6372 * Makefile.in (SFILES): Add dll.c.
6373 (OBS): Add dll.o
6374 (dll.o): New rule.
6375
6376 2012-02-11 Yao Qi <yao@codesourcery.com>
6377
6378 * server.c: (handle_monitor_command): Add a new parameter
6379 `own_buf'.
6380 (handle_query): Update caller.
6381
6382 2012-02-09 Joel Brobecker <brobecker@adacore.com>
6383
6384 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
6385 * configure, config.in: Regenerate.
6386 * hostio.c: Provide an alternate implementation if HAVE_READLINK
6387 is not defined.
6388
6389 2012-02-02 Pedro Alves <palves@redhat.com>
6390
6391 Try SIGKILL first, then PTRACE_KILL.
6392 * linux-low.c (linux_kill_one_lwp): New.
6393 (linux_kill_one_lwp): Rename to ...
6394 (kill_one_lwp_callback): ... this. Use the new
6395 linux_kill_one_lwp.
6396
6397 2012-02-02 Pedro Alves <palves@redhat.com>
6398
6399 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
6400 inferior.
6401
6402 2012-01-27 Pedro Alves <palves@redhat.com>
6403
6404 * linux-low.c (linux_child_pid_to_exec_file): Delete.
6405 (elf_64_file_p): Make static.
6406 (linux_pid_exe_is_elf_64_file): New.
6407 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
6408 Delete declarations.
6409 (linux_pid_exe_is_elf_64_file): Declare.
6410 * linux-x86-low.c (x86_arch_setup): Use
6411 linux_pid_exe_is_elf_64_file.
6412
6413 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
6414
6415 * linux-low.c (linux_wait_for_event_1): Rename to ...
6416 (linux_wait_for_event): ... here and merge it with former
6417 linux_wait_for_event - new variable wait_ptid, use it.
6418 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
6419
6420 2012-01-23 Pedro Alves <palves@redhat.com>
6421
6422 * server.c (main): Avoid yet another case of infinite loop while
6423 detaching/killing after a longjmp.
6424
6425 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
6426
6427 Code cleanup.
6428 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
6429
6430 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
6431
6432 * hostio.c (handle_readlink): New function.
6433 (handle_vFile): Call it to handle "vFile:readlink" packets.
6434
6435 2012-01-20 Pedro Alves <palves@redhat.com>
6436 Ulrich Weigand <ulrich.weigand@linaro.org>
6437
6438 * server.c (handle_v_requests): Only support vAttach and vRun to
6439 start multiple processes when in extended protocol mode.
6440
6441 2012-01-17 Pedro Alves <palves@redhat.com>
6442
6443 * tracepoint.c (initialize_tracepoint): Use mmap instead of
6444 memalign plus mprotect to allocate the scratch buffer.
6445
6446 2012-01-13 Pedro Alves <palves@redhat.com>
6447
6448 * server.c (attach_inferior): Clear `cont_thread'.
6449
6450 2012-01-13 Pedro Alves <palves@redhat.com>
6451
6452 * server.c (main): Avoid infinite loop while detaching/killing
6453 after a longjmp.
6454
6455 2012-01-09 Doug Evans <dje@google.com>
6456
6457 * server.c (start_inferior): Set last_ptid in --wrapper case.
6458
6459 2012-01-06 Yao Qi <yao@codesourcery.com>
6460
6461 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
6462 defined.
6463 [IN_PROCESS_AGENT] (debug_agent): New global variable.
6464
6465 2012-01-04 Yao Qi <yao@codesourcery.com>
6466
6467 * tracepoint.c (cmd_qtdp): Print debug message
6468 for static tracepoint.
6469
6470 2012-01-04 Yao Qi <yao@codesourcery.com>
6471
6472 * tracepoint.c (trace_vdebug): Differentiate debug message
6473 between gdbserver and IPA.
6474
6475 2012-01-03 Yao Qi <yao@codesourcery.com>
6476
6477 * tracepoint.c (tracepoint_was_hit): Don't collect for
6478 static tracepoint.
6479
6480 2012-01-02 Joel Brobecker <brobecker@adacore.com>
6481
6482 * terminal.h: Reformat copyright header.
6483
6484 2012-01-02 Joel Brobecker <brobecker@adacore.com>
6485
6486 * server.c (gdbserver_version): Update copyright year.
6487 * gdbreplay.c (gdbreplay_version): Likewise.
6488
6489 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
6490
6491 * linux-low.c (linux_create_inferior): Put empty if clause for write.
6492
6493 Revert:
6494 2011-12-18 Hui Zhu <teawater@gmail.com>
6495 * linux-low.c (linux_create_inferior): Save return value to ret.
6496
6497 2011-12-18 Hui Zhu <teawater@gmail.com>
6498
6499 * linux-low.c (linux_create_inferior): Save return value to ret.
6500
6501 2011-12-16 Doug Evans <dje@google.com>
6502
6503 * linux-low.c (linux_create_inferior): If stdio connection,
6504 redirect stdin from /dev/null, stdout to stderr.
6505 * remote-utils.c (remote_is_stdio): New static global.
6506 (remote_connection_is_stdio): New function.
6507 (remote_prepare): Handle stdio connection.
6508 (remote_open): Ditto.
6509 (remote_close): Don't close stdin for stdio connections.
6510 (read_prim,write_prim): New functions. Replace all calls to
6511 read/write to these.
6512 * server.c (main): Watch for "-" argument. Move call to
6513 remote_prepare before start_inferior.
6514 * server.h (STDIO_CONNECTION_NAME): New macro.
6515 (remote_connection_is_stdio): Declare.
6516
6517 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
6518 in debugging output.
6519
6520 2011-12-15 Yao Qi <yao@codesourcery.com>
6521
6522 * tracepoint.c: Include sys/syscall.h.
6523 (gdb_ust_thread): Remove preprocessor conditional.
6524
6525 2011-12-14 Pedro Alves <pedro@codesourcery.com>
6526
6527 * linux-low.c (linux_detach_one_lwp): Call
6528 the_low_target.prepare_to_resume before detaching.
6529
6530 2011-12-14 Yao Qi <yao@codesourcery.com>
6531
6532 * tracepoint.c (gdb_ust_thread): Don't ignore return value
6533 of write.
6534
6535 2011-12-14 Yao Qi <yao@codesourcery.com>
6536
6537 * i386-low.c (i386_low_stopped_data_address): Initialize local
6538 variable `control'.
6539
6540 2011-12-13 Pedro Alves <pedro@codesourcery.com>
6541
6542 PR remote/13492
6543
6544 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
6545 DR_CONTROL unless necessary. Extend comments.
6546 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
6547 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
6548
6549 2011-12-13 Yao Qi <yao@codesourcery.com>
6550
6551 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
6552 macros.
6553 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
6554
6555 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
6556
6557 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
6558 Print new debug message for such case.
6559
6560 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
6561
6562 Fix overlapping memcpy.
6563 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
6564 the read_inferior_memory transfer.
6565 (delete_fast_tracepoint_jump): New variable buf. Use it for the
6566 write_inferior_memory transfer.
6567 (set_fast_tracepoint_jump): New variable buf. Use it for the
6568 read_inferior_memory and write_inferior_memory transfers.
6569 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
6570 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
6571 Use it for the write_inferior_memory transfer.
6572 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
6573 buffers.
6574
6575 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
6576
6577 * linux-low.c (fetch_register, store_register): Make code
6578 consistent, fix formatting.
6579
6580 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
6581
6582 * linux-low.c (usr_store_inferior_registers): Factor out code
6583 to handle individual registers into...
6584 (store_register): ... this new function.
6585
6586 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
6587
6588 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
6589 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
6590 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
6591 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
6592 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
6593 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
6594 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
6595 (srv_xmlfiles): Add new XML files.
6596
6597 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
6598 and <sys/uio.h>.
6599 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
6600 (init_registers_s390_linux32v1): Add prototype.
6601 (init_registers_s390_linux32v2): Likewise.
6602 (init_registers_s390_linux64v1): Likewise.
6603 (init_registers_s390_linux64v2): Likewise.
6604 (init_registers_s390x_linux64v1): Likewise.
6605 (init_registers_s390x_linux64v2): Likewise.
6606 (s390_num_regs): Increment to 52.
6607 (s390_regmap): Add orig_r2 register.
6608 (s390_num_regs_3264): Increment to 68.
6609 (s390_regmap_3264): Add orig_r2 register.
6610 (s390_collect_ptrace_register): Handle orig_r2 register.
6611 (s390_supply_ptrace_register): Likewise.
6612 (s390_fill_last_break): New function.
6613 (s390_store_last_break): Likewise.
6614 (s390_fill_system_call): New function.
6615 (s390_store_system_call): Likewise.
6616 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
6617 register sets.
6618 (s390_check_regset): New function.
6619 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
6620 NT_S390_SYSTEM_CALL regsets and use appropriate description.
6621 Update target_regsets for available register sets.
6622
6623 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
6624 Jan Kratochvil <jan.kratochvil@redhat.com>
6625
6626 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
6627 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
6628 New.
6629 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
6630 * linux-low.h (struct process_info_private): New member r_debug.
6631 * server.c (handle_qxfer_libraries): Call
6632 the_target->qxfer_libraries_svr4.
6633 (handle_qxfer_libraries_svr4): New function.
6634 (qxfer_packets): New entry "libraries-svr4".
6635 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
6636 * target.h (struct target_ops): New member qxfer_libraries_svr4.
6637 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
6638 PACKET_qXfer_libraries_svr4.
6639
6640 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
6641
6642 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
6643 PSW address/mask between 8-byte and 16-byte formats.
6644 (s390_supply_ptrace_register): Likewise.
6645 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
6646 basic addressing mode bit.
6647
6648 2011-11-24 Stan Shebs <stan@codesourcery.com>
6649
6650 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
6651
6652 2011-11-17 Stan Shebs <stan@codesourcery.com>
6653
6654 * tracepoint.c (struct tracepoint): New field traceframe_usage.
6655 (tracing_start_time): New global.
6656 (tracing_stop_time): New global.
6657 (tracing_user_name): New global.
6658 (tracing_notes): New global.
6659 (tracing_stop_note): New global.
6660 (cmd_qtstart): Set traceframe_usage, start_time.
6661 (stop_tracing): Set stop_time.
6662 (cmd_qtstatus): Report additional status.
6663 (cmd_qtp): New function.
6664 (handle_tracepoint_query): Call it.
6665 (cmd_qtnotes): New function.
6666 (handle_tracepoint_general_set): Call it.
6667 (get_timestamp): Rename from tsv_get_timestamp.
6668
6669 2011-11-14 Stan Shebs <stan@codesourcery.com>
6670 Kwok Cheung Yeung <kcy@codesourcery.com>
6671
6672 * linux-x86-low.c (small_jump_insn): New.
6673 (i386_install_fast_tracepoint_jump_pad): Add arguments for
6674 trampoline and error message, build a trampoline and issue a small
6675 jump instruction to it.
6676 (x86_install_fast_tracepoint_jump_pad): Add arguments for
6677 trampoline and error message.
6678 (x86_get_min_fast_tracepoint_insn_len): New.
6679 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
6680 * linux-low.h (struct linux_target_ops): Add arguments to
6681 install_fast_tracepoint_jump_pad operation, add new operation.
6682 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
6683 arguments.
6684 (linux_get_min_fast_tracepoint_insn_len): New function.
6685 (linux_target_op): Add new operation.
6686 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
6687 (gdb_trampoline_buffer_end): Ditto.
6688 (gdb_trampoline_buffer_error): Ditto.
6689 (struct ipa_sym_addresses): Add fields for new IPA variables.
6690 (symbol_list): Add entries for new IPA variables.
6691 (struct tracepoint): Add fields to hold the address range of the
6692 trampoline used by the tracepoint.
6693 (trampoline_buffer_head): New static variable.
6694 (trampoline_buffer_tail): Ditto.
6695 (claim_trampoline_space): New function.
6696 (have_fast_tracepoint_trampoline_buffer): New function.
6697 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
6698 structure.
6699 (install_fast_tracepoint): Ditto, also add error buffer argument.
6700 (cmd_qtminftpilen): New function.
6701 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
6702 (fast_tracepoint_from_trampoline_address): New function.
6703 (fast_tracepoint_collecting): Handle trampoline as part of jump
6704 pad space.
6705 (set_trampoline_buffer_space): New function.
6706 (initialize_tracepoint): Initialize new IPA variables.
6707 * target.h (struct target_ops): Add arguments to
6708 install_fast_tracepoint_jump_pad operation, add new
6709 get_min_fast_tracepoint_insn_len operation.
6710 (target_get_min_fast_tracepoint_insn_len): New.
6711 (install_fast_tracepoint_jump_pad): Add arguments.
6712 * server.h (IPA_BUFSIZ): Define.
6713 * linux-i386-ipa.c: Include extra header files.
6714 (initialize_fast_tracepoint_trampoline_buffer): New function.
6715 (initialize_low_tracepoint): Call it.
6716 * server.h (set_trampoline_buffer_space): Declare.
6717 (claim_trampoline_space): Ditto.
6718 (have_fast_tracepoint_trampoline_buffer): Ditto.
6719
6720 2011-11-14 Yao Qi <yao@codesourcery.com>
6721
6722 * server.c (handle_query): Handle InstallInTrace for qSupported.
6723 * tracepoint.c (add_tracepoint): Sort list.
6724 (install_tracepoint, download_tracepoint): New.
6725 (cmd_qtdp): Call them to install and download tracepoints.
6726 (sort_tracepoints): Removed.
6727 (cmd_qtstart): Update.
6728
6729 2011-11-14 Yao Qi <yao@codesourcery.com>
6730
6731 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
6732 * mem-break.h: Declare.
6733 * tracepoint.c (cmd_qtstart): Move some code to ...
6734 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
6735 New.
6736 (download_tracepoints): Move some code to ...
6737 (download_tracepoint_1): ... here. New.
6738
6739 2011-11-08 Yao Qi <yao@codesourcery.com>
6740
6741 * remote-utils.c (relocate_instruction): A comment fix.
6742
6743 2011-11-07 Joel Brobecker <brobecker@adacore.com>
6744
6745 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
6746 (i386_dr_low_get_control, i386_dr_low_get_status): Use
6747 dr_status_mirror and dr_control_mirror from debug_reg_state.
6748 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
6749 (i386_initial_stuff): Remove use of deleted globals.
6750 (i386_get_thread_context, i386_set_thread_context,
6751 i386_thread_added): Use dr_status_mirror and dr_control_mirror
6752 from debug_reg_state.
6753
6754 2011-11-05 Yao Qi <yao@codesourcery.com>
6755
6756 * tracepoint.c (gdb_collect): Loop over tracepoints of same
6757 address as TPOINT's.
6758
6759 2011-11-02 Stan Shebs <stan@codesourcery.com>
6760
6761 * tracepoint.c (agent_mem_read_string): New function.
6762 (eval_agent_expr): Call it for tracenz.
6763 * server.c (handle_query): Report support for tracenz.
6764
6765 2011-11-02 Yao Qi <yao@codesourcery.com>
6766
6767 * tracepoint.c (cmd_qtstart): Remove unused local variables.
6768
6769 2011-11-02 Yao Qi <yao@codesourcery.com>
6770
6771 * target.h: Fix a typo in comment.
6772
6773 2011-10-31 Pedro Alves <pedro@codesourcery.com>
6774
6775 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
6776 clobber the breakpoints' shadows with fast tracepoint jumps.
6777 * mem-break.h (check_mem_write): Add `myaddr' parameter.
6778 * target.c (write_inferior_memory): Also pass MYADDR down to
6779 check_mem_write.
6780
6781 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
6782
6783 * configure.ac: Check support for personality routine.
6784 * configure: Regenerate.
6785 * config.in: Likewise.
6786 * linux-low.c: Include <sys/personality.h>.
6787 Define ADDR_NO_RANDOMIZE if necessary.
6788 (linux_create_inferior): Disable address space randomization when
6789 forking inferior, if requested.
6790 (linux_supports_disable_randomization): New function.
6791 (linux_target_ops): Install it.
6792 * server.h (disable_randomization): Declare.
6793 * server.c (disable_randomization): New global variable.
6794 (handle_general_set): Handle QDisableRandomization.
6795 (handle_query): Likewise for qSupported.
6796 (main): Support --disable-randomization and --no-disable-randomization
6797 command line arguments.
6798 * target.h (struct target_ops): Add supports_disable_randomization.
6799 (target_supports_disable_randomization): New macro.
6800
6801 2011-09-29 Mike Frysinger <vapier@gentoo.org>
6802
6803 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
6804 ifdef check.
6805 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
6806 [!PT_GETDSBT] (target_loadmap): New definition.
6807 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
6808 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
6809 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
6810 and PT_GETDSBT to LINUX_LOADMAP.
6811 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
6812 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
6813
6814 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
6815
6816 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
6817 (arm_linux_hwbp_cap): New static variable.
6818 (arm_linux_get_hwbp_cap): Replace by ...
6819 (arm_linux_init_hwbp_cap): ... this new function.
6820 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
6821 (arm_linux_get_hw_watchpoint_count): Likewise.
6822 (arm_linux_get_hw_watchpoint_max_length): Likewise.
6823 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
6824 (arm_prepare_to_resume): Use perror_with_name instead of error.
6825
6826 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
6827
6828 * linux-arm-low.c: Include <signal.h>.
6829 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
6830 (struct arm_linux_hwbp_cap): New data type.
6831 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
6832 (struct arm_linux_hw_breakpoint): New data type.
6833 (MAX_BPTS, MAX_WPTS): Define.
6834 (struct arch_process_info, struct arch_lwp_info): New data types.
6835 (arm_linux_get_hwbp_cap): New function.
6836 (arm_linux_get_hw_breakpoint_count): Likewise.
6837 (arm_linux_get_hw_watchpoint_count): Likewise.
6838 (arm_linux_get_hw_watchpoint_max_length): Likewise.
6839 (arm_hwbp_control_initialize): Likewise.
6840 (arm_hwbp_control_is_enabled): Likewise.
6841 (arm_hwbp_control_is_initialized): Likewise.
6842 (arm_hwbp_control_disable): Likewise.
6843 (arm_linux_hw_breakpoint_equal): Likewise.
6844 (arm_linux_hw_point_initialize): Likewise.
6845 (struct update_registers_data): New data structure.
6846 (update_registers_callback: New function.
6847 (arm_insert_point): Likewise.
6848 (arm_remove_point): Likewise.
6849 (arm_stopped_by_watchpoint): Likewise.
6850 (arm_stopped_data_address): Likewise.
6851 (arm_new_process): Likewise.
6852 (arm_new_thread): Likewise.
6853 (arm_prepare_to_resume): Likewise.
6854 (the_low_target): Register arm_insert_point, arm_remove_point,
6855 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
6856 arm_new_thread, and arm_prepare_to_resume.
6857
6858 2011-09-15 Stan Shebs <stan@codesourcery.com>
6859
6860 * server.h (struct emit_ops): Add compare-goto fields.
6861 * tracepoint.c (gdb_agent_op_sizes): New table.
6862 (emit_eq_goto): New function.
6863 (emit_ne_goto): New function.
6864 (emit_lt_goto): New function.
6865 (emit_le_goto): New function.
6866 (emit_gt_goto): New function.
6867 (emit_ge_goto): New function.
6868 (is_goto_target): New function.
6869 (compile_bytecodes): Recognize special cases of compare-goto
6870 combinations and call specialized emitters for them.
6871 * linux-x86-low.c (amd64_emit_eq_goto): New function.
6872 (amd64_emit_ne_goto): New function.
6873 (amd64_emit_lt_goto): New function.
6874 (amd64_emit_le_goto): New function.
6875 (amd64_emit_gt_goto): New function.
6876 (amd64_emit_ge_goto): New function.
6877 (amd64_emit_ops): Add the new functions.
6878 (i386_emit_eq_goto): New function.
6879 (i386_emit_ne_goto): New function.
6880 (i386_emit_lt_goto): New function.
6881 (i386_emit_le_goto): New function.
6882 (i386_emit_gt_goto): New function.
6883 (i386_emit_ge_goto): New function.
6884 (i386_emit_ops): Add the new functions.
6885
6886 2011-09-08 Stan Shebs <stan@codesourcery.com>
6887
6888 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
6889 (i386_emit_epilogue): Restore %ebx.
6890
6891 2011-08-31 Jie Zhang <jzhang918@gmail.com>
6892
6893 * server.c (step_thread): Remove definition.
6894 (process_serial_event): Don't handle Hs.
6895 * server.h (step_thread): Remove declaration.
6896 * target.c (set_desired_inferior): Remove use of step_thread.
6897
6898 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
6899
6900 * linux-low.c: Include linux-procfs.h.
6901 (linux_attach_lwp_1): Update comments.
6902 (linux_attach): Scan for existing threads when attaching to a
6903 process that is the tgid.
6904 * Makefile.in: Update dependencies.
6905
6906 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
6907
6908 * configure.srv: Add linux-procfs.o dependencies.
6909
6910 2011-08-14 Yao Qi <yao@codesourcery.com>
6911
6912 * target.h (struct target_ops): Fix indent.
6913 * win32-low.c (win32_target_ops): Fix comment.
6914
6915 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
6916 Yao Qi <yao@codesourcery.com>
6917
6918 * Makefile.in (clean): Remove tic6x-*.c files.
6919 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
6920 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
6921 (tic6x-c64xp-linux.c): Likewise.
6922 * configure.srv: Add support for tic6x-*-uclinux.
6923 * linux-tic6x-low.c: New.
6924 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
6925
6926 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
6927 Yao Qi <yao@codesourcery.com>
6928
6929 * target.h (struct target_ops): Add read_loadmap.
6930 * linux-low.c (struct target_loadseg): New type.
6931 (struct target_loadmap): New type.
6932 (linux_read_loadmap): New function.
6933 (linux_target_ops): Add linux_read_loadmap.
6934 * server.c (handle_query): Support qXfer:fdpic:read packet.
6935 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
6936 to NULL.
6937
6938 2011-08-05 Eli Zaretskii <eliz@gnu.org>
6939
6940 * win32-low.c: Include <stdint.h>.
6941
6942 2011-07-22 Pedro Alves <pedro@codesourcery.com>
6943
6944 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
6945 to the inferior here.
6946 (i386_remove_aligned_watchpoint): Ditto.
6947 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
6948 fit part of the watchpoint in the debug registers.
6949 (i386_update_inferior_debug_regs): New.
6950 (i386_low_insert_watchpoint): Work on a local mirror of the debug
6951 registers, and only update the inferior on success.
6952 (i386_low_remove_watchpoint): Ditto.
6953
6954 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
6955
6956 * linux-low.c (compare_ints, unique, list_threads, show_process,
6957 linux_core_of_thread): Delete.
6958 (linux_target_ops): Change linux_core_of_thread to
6959 linux_common_core_of_thread.
6960 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
6961 * utils.c (malloc_failure): Change type of argument.
6962 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
6963 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
6964 common/linux-osdata.c, common/ptid.c and common/buffer.c.
6965 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
6966 (IPA_OBJS): Add common-utils-ipa.o.
6967 (ptid_h, linux_osdata_h): New macros.
6968 (server_h): Add common/common-utils.h, common/xml-utils.h,
6969 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
6970 common/ptid.h.
6971 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
6972 ptid.o, buffer.o): New rules.
6973 (linux-low.o): Add common/linux-osdata.h as a dependency.
6974 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
6975 * configure.ac: Add AC_HEADER_DIRENT check.
6976 * config.in: Regenerate.
6977 * configure: Regenerate.
6978 * remote-utils.c (xml_escape_text): Delete.
6979 (buffer_grow, buffer_free, buffer_init, buffer_finish,
6980 buffer_xml_printf): Move to common/buffer.c.
6981 * server.c (main): Remove call to initialize_inferiors.
6982 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
6983 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
6984 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
6985 internal_error, gdb_assert, gdb_assert_fail): Delete.
6986 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
6987 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
6988 common/buffer.h.
6989 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
6990 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
6991 initialize_inferiors): Delete.
6992
6993 2011-07-20 Pedro Alves <pedro@codesourcery.com>
6994
6995 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
6996 symbol error.
6997
6998 2011-05-31 Pedro Alves <pedro@codesourcery.com>
6999
7000 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
7001 assertion.
7002 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
7003
7004 2011-05-26 Yao Qi <yao@codesourcery.com>
7005
7006 * Makefile.in (thread-db.o): Track dependence to
7007 common/gdb_thread_db.h.
7008 * thread-db.c: include gdb_thread_db.h from right place.
7009
7010 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
7011
7012 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
7013 __FILE__ and __LINE__ to internal_error.
7014
7015 2011-05-13 Doug Evans <dje@google.com>
7016
7017 * thread-db.c (try_thread_db_load_from_sdir): New function.
7018 (try_thread_db_load_from_dir): New function.
7019 (thread_db_load_search): Handle $sdir, ignore $pdir.
7020 Remove trying of system directories if search of
7021 libthread-db-search-path fails, that is now done via $sdir.
7022
7023 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
7024
7025 * server.c (handle_query): Add EnableDisableTracepoints to the list
7026 of supported features.
7027 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
7028 tracepoints.
7029 (cmd_qtenable_disable): New.
7030 (cmd_qtstart): Install tracepoints even if disabled.
7031 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
7032 receiving a QTEnable or QTDisable packet.
7033 (gdb_collect): Skip data collection if fast tracepoint is disabled.
7034 (ust_marker_to_static_tracepoint): Do not ignore disabled static
7035 tracepoints.
7036 (gdb_probe): Skip data collection if static tracepoint is disabled.
7037
7038 2011-05-10 Doug Evans <dje@google.com>
7039
7040 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
7041
7042 2011-05-04 Doug Evans <dje@google.com>
7043
7044 * linux-low.c (linux_join): Skip process lookup.
7045 * spu-low.c (spu_join): Ditto.
7046 * server.c (join_inferiors_callback): Delete.
7047 (process_serial_event): For 'D' packet (detach) call join_inferior
7048 directly.
7049
7050 2011-05-04 Joseph Myers <joseph@codesourcery.com>
7051
7052 * README: Don't mention xscale*-*-linux*.
7053 * configure.srv (xscale*-*-linux*): Don't handle target.
7054
7055 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
7056
7057 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
7058 casting pointers.
7059 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
7060 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
7061 (i386_emit_void_call_2): Likewise.
7062
7063 2011-04-26 Yao Qi <yao@codesourcery.com>
7064
7065 * linux-low.c: Move common macros to linux-ptrace.h.
7066 Include linux-ptrace.h.
7067 * Makefile.in (linux_ptrace_h): New.
7068 (linux-low.o): Depends on linux-ptrace.h.
7069
7070 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
7071
7072 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
7073 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
7074 (remote_prepare): New function with most of the TCP code from ...
7075 (remote_open): ... here. Detect PORT here unconditionally. Move also
7076 setting transport_is_reliable.
7077 * server.c (run_once): New variable.
7078 (gdbserver_usage): Document it.
7079 (main): Set run_once for `--once'. Call remote_prepare. Exit after
7080 the first run if RUN_ONCE.
7081 * server.h (run_once, remote_prepare): New declarations.
7082
7083 2011-04-19 Tom Tromey <tromey@redhat.com>
7084
7085 * win32-low.c (handle_load_dll): Remove duplicate "the".
7086
7087 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
7088
7089 Remove support for old Cygwin 1.5 versions.
7090 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
7091 function to avoid warning.
7092 (win32_add_one_solib): Use cygwin_conv_path function to avoid
7093 warning.
7094
7095 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
7096
7097 * gdbserver/server.h (Macro _): Define it if not available.
7098
7099 2011-03-14 Michael Snyder <msnyder@vmware.com>
7100
7101 * hostio.c (handle_close): Remove unnecessary null test.
7102
7103 2011-03-10 Joel Brobecker <brobecker@adacore.com>
7104
7105 * Makefile.in (maintainer-clean realclean distclean): Remove
7106 "make ... subdir_do" command.
7107
7108 2011-03-10 Michael Snyder <msnyder@vmware.com>
7109
7110 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
7111
7112 * server.c (handle_v_run): Free alloced buffer on early return.
7113
7114 2011-03-09 Yao Qi <yao@codesourcery.com>
7115
7116 Revert:
7117 2011-03-04 Yao Qi <yao@codesourcery.com>
7118
7119 * Makefile.in: Remove GNU make feature --directory.
7120
7121 2011-03-05 Yao Qi <yao@codesourcery.com>
7122
7123 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
7124 (subdir_do): New make target. Copied from gdb/Makefile.
7125 (maintainer-clean, realclean, distclean, clean): Call corresponding
7126 make targets in common/Makefile.
7127
7128 2011-02-11 Yao Qi <yao@codesourcery.com>
7129
7130 * configure.ac: Call AC_PROG_RANLIB.
7131 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
7132 * configure: Regenerate.
7133
7134 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7135
7136 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
7137
7138 2011-03-06 Yao Qi <yao@codesourcery.com>
7139
7140 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
7141
7142 2011-03-05 Yao Qi <yao@codesourcery.com>
7143
7144 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
7145 (subdir_do): New make target. Copied from gdb/Makefile.
7146 (maintainer-clean, realclean, distclean, clean): Call corresponding
7147 make targets in common/Makefile.
7148
7149 2011-03-04 Yao Qi <yao@codesourcery.com>
7150
7151 * Makefile.in: Remove GNU make feature --directory.
7152
7153 2011-03-04 Michael Snyder <msnyder@vmware.com>
7154
7155 * server.c (queue_stop_reply): Call xmalloc not malloc.
7156
7157 2011-03-02 Michael Snyder <msnyder@vmware.com>
7158
7159 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
7160
7161 2011-02-28 Michael Snyder <msnyder@vmware.com>
7162
7163 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
7164 (cmd_qtframe): Ditto.
7165 (cmd_qtbuffer): Ditto.
7166 (cmd_bigqtbuffer): Ditto.
7167
7168 * utils.c (decimal2str): Initialize 'width' to nine, then
7169 don't mess with it.
7170
7171 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
7172
7173 * hostio.c (require_data): Free *data, not data.
7174
7175 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7176
7177 * hostio.c (require_data): Use free, not xfree.
7178
7179 2011-02-27 Michael Snyder <msnyder@vmware.com>
7180
7181 * server.c (handle_query): Discard unused value.
7182
7183 * hostio.c (require_data): Free malloc memory before returning
7184 error.
7185
7186 2011-02-26 Michael Snyder <msnyder@vmware.com>
7187
7188 * linux-low.c (list_threads): Call closedir for dirent.
7189
7190 2011-02-27 Michael Snyder <msnyder@vmware.com>
7191
7192 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
7193 a case statement falls through.
7194
7195 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
7196
7197 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
7198 in comparison.
7199
7200 2011-02-26 Michael Snyder <msnyder@vmware.com>
7201
7202 * utils.c (decimal2str): Eliminate dead code and dead param.
7203 (pulongest): Drop dead param from call to decimal2str.
7204 (plongest): Ditto.
7205
7206 2011-02-24 Joel Brobecker <brobecker@adacore.com>
7207
7208 Revert the following patch (not approved yet):
7209 2011-02-21 Hui Zhu <teawater@gmail.com>
7210 * tracepoint.c (tp_printf): New function.
7211 (eval_agent_expr): Handle gdb_agent_op_printf.
7212
7213 2011-02-21 Hui Zhu <teawater@gmail.com>
7214
7215 * tracepoint.c (tp_printf): New function.
7216 (eval_agent_expr): Handle gdb_agent_op_printf.
7217
7218 2011-02-18 Tom Tromey <tromey@redhat.com>
7219
7220 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
7221 (tracepoint.o): Likewise.
7222 * tracepoint.c (enum gdb_agent_op): Use ax.def.
7223 (gdb_agent_op_names): Likewise.
7224
7225 2011-02-18 Tom Tromey <tromey@redhat.com>
7226
7227 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
7228 gdb_agent_op_rot>: New constants.
7229 (gdb_agent_op_names): Add pick and roll.
7230 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
7231 cases.
7232
7233 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
7234
7235 * aclocal.m4: Regenerated with aclocal-1.11.1.
7236
7237 2011-02-14 Pedro Alves <pedro@codesourcery.com>
7238
7239 * server.c (handle_qxfer_traceframe_info): New.
7240 (qxfer_packets): Register "traceframe-info".
7241 (handle_query): Report support for qXfer:traceframe-info:read+.
7242 * tracepoint.c (match_blocktype): New.
7243 (traceframe_find_block_type): Rename to ...
7244 (traceframe_walk_blocks): ... this. Add callback filter argument,
7245 and use it.
7246 (traceframe_find_block_type): New, reimplemented on top of
7247 traceframe_walk_blocks.
7248 (build_traceframe_info_xml): New.
7249 (traceframe_read_info): New.
7250 * server.h (traceframe_read_info): Declare.
7251
7252 2011-02-11 Yao Qi <yao@codesourcery.com>
7253
7254 * configure.ac: Call AC_PROG_RANLIB.
7255 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
7256 * configure: Regenerate.
7257
7258 2011-02-07 Pedro Alves <pedro@codesourcery.com>
7259
7260 * server.c (gdb_read_memory): Change return semantics to allow
7261 partial transfers.
7262 (handle_search_memory_1): Adjust.
7263 (process_serial_event) <'m' packet>: Handle partial transfers.
7264 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
7265
7266 2011-01-28 Pedro Alves <pedro@codesourcery.com>
7267
7268 * regcache.c (init_register_cache): Initialize
7269 regcache->register_status.
7270 (free_register_cache): Release regcache->register_status.
7271 (regcache_cpy): Copy register_status.
7272 (registers_to_string): Print 'x's for unavailable registers.
7273 (supply_register): Mark the register's status valid or
7274 unavailable, depending on whether a buffer was passed in or not.
7275 (supply_register_zeroed): New.
7276 (supply_regblock): Mark the registers' status valid or
7277 unavailable, depending on whether a buffer was passed in or not.
7278 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
7279 (struct regcache): New `register_status' field.
7280 (supply_register_zeroed): Declare.
7281 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
7282 supply_register_zeroed, rather than passing a NULL buffer to
7283 supply_register.
7284 * tracepoint.c (fetch_traceframe_registers): Update comment.
7285
7286 2011-01-28 Pedro Alves <pedro@codesourcery.com>
7287
7288 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
7289 buffer explicit.
7290
7291 2011-01-25 Pedro Alves <pedro@codesourcery.com>
7292
7293 * server.h (decode_xfer_write): Change prototype.
7294 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
7295 and don't extract the annex here.
7296 * server.c (decode_xfer_read): Remove `annex' parameter,
7297 and don't extract the annex here.
7298 (decode_xfer): New.
7299 (struct qxfer): New.
7300 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
7301 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
7302 (handle_qxfer_statictrace): New functions, abstracted out from
7303 handle_query, and made to use the struct qxfer interface.
7304 (handle_threads_qxfer_proper): Rename to ...
7305 (handle_qxfer_threads_proper): ... this.
7306 (handle_threads_qxfer): Rename to ...
7307 (handle_qxfer_threads): ... this. Adjust.
7308 (qxfer_packets): New array.
7309 (handle_qxfer): New function.
7310 (handle_query): Use handle_qxfer.
7311
7312 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
7313
7314 * gdbreplay.c: Shorten lines of >= 80 columns.
7315 * linux-low.c: Ditto.
7316 * linux-ppc-low.c: Ditto.
7317 * linux-s390-low.c: Ditto.
7318 * linux-sparc-low.c: Ditto.
7319 * linux-x86-low.c: Ditto.
7320 * linux-xtensa-low.c: Ditto.
7321 * mem-break.c: Ditto.
7322 * nto-low.c: Ditto.
7323 * regcache.h: Ditto.
7324 * remote-utils.c: Ditto.
7325 * server.c: Ditto.
7326 * server.h: Ditto.
7327 * thread-db.c: Ditto.
7328 * tracepoint.c: Ditto.
7329 * utils.c: Ditto.
7330 * win32-low.h: Ditto.
7331
7332 2011-01-05 Joel Brobecker <brobecker@adacore.com>
7333
7334 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
7335 update.
7336
7337 2011-01-01 Joel Brobecker <brobecker@adacore.com>
7338
7339 * server.c (gdbserver_version): Update copyright year in version
7340 output.
7341 * gdbreplay.c (gdbreplay_version): Ditto.
7342
7343 2010-12-29 Jie Zhang <jie.zhang@analog.com>
7344
7345 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
7346 * linux-bfin-low.c: New file.
7347 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
7348 PT_DATA_ADDR for BFIN targets.
7349 * Makefile.in (SFILES): Add linux-bfin-low.c.
7350 (clean): Remove reg-bfin.c.
7351 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
7352 * README: Mention supported Blackfin targets.
7353
7354 2010-12-23 Mike Frysinger <vapier@gentoo.org>
7355
7356 * .gitignore: New file.
7357
7358 2010-11-16 Mike Frysinger <vapier@gentoo.org>
7359
7360 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
7361
7362 2010-10-22 Jie Zhang <jie@codesourcery.com>
7363
7364 * Makefile.in: Add FLAGS_TO_PASS variable.
7365 (install): Remove dependency of install-only and recursively
7366 invoke make for install-only.
7367
7368 2010-10-04 Doug Evans <dje@google.com>
7369
7370 * Makefile.in (uninstall): Use $(DESTDIR).
7371
7372 2010-09-24 Pedro Alves <pedro@codesourcery.com>
7373
7374 PR gdb/11842
7375
7376 * linux-x86-low.c (compat_siginfo_from_siginfo)
7377 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
7378 si_code is < 0. Check for si_code == SI_TIMER before checking for
7379 si_code < 0.
7380
7381 2010-09-13 Joel Brobecker <brobecker@adacore.com>
7382
7383 * lynx-i386-low.c: New file.
7384 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
7385
7386 2010-09-13 Joel Brobecker <brobecker@adacore.com>
7387
7388 * lynx-low.c (ptrace_request_to_str): Remove handling for
7389 request values that have been removed in LynxOS 5.x.
7390
7391 2010-09-13 Joel Brobecker <brobecker@adacore.com>
7392
7393 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
7394 <ptrace.h>
7395
7396 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
7397
7398 * configure.ac: Add --enable-inprocess-agent option.
7399 * configure: Rebuilt.
7400
7401 2010-09-06 Yao Qi <yao@codesourcery.com>
7402
7403 * linux-low.c (linux_kill): Remove unused variable.
7404 (linux_stabilize_threads): Likewise.
7405 * server.c (start_inferior): Likewise.
7406 (queue_stop_reply_callback): Likewise.
7407 * tracepoint.c (do_action_at_tracepoint): Likewise.
7408
7409 2010-09-06 Yao Qi <yao@codesourcery.com>
7410
7411 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
7412 on return.
7413
7414 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
7415
7416 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
7417
7418 2010-09-06 Pedro Alves <pedro@codesourcery.com>
7419
7420 * Makefile.in (install-only): Replace $IPA_DEPFILES with
7421 "$(IPA_DEPFILES)".
7422
7423 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7424
7425 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
7426 gdbserver/lynx-ppc-low.c: New files.
7427 * Makefile.in (lynx_low_h): New variable.
7428 (lynx-low.o, lynx-ppc-low.o): New rules.
7429 * configure.ac: On LynxOS, link with -lnetinet.
7430 * configure.srv: Add handling of powerpc-*-lynxos* targets.
7431 * configure: regenerate.
7432
7433 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7434
7435 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
7436 * configure.ac: Add check for vasprintf and vsnprintf.
7437 * configure, config.in: Regenerate.
7438 * server.h (vasprintf, vsnprintf): Add conditional declarations.
7439
7440 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7441
7442 * gdbreplay.c: Move include of alloca.h up, next to include of
7443 malloc.h.
7444 * server.h: Add include of malloc.h.
7445 * mem-break.c: Remove include of malloc.h.
7446 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
7447
7448 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7449
7450 * Makefile.in (memmem.o): Build with -Wno-error.
7451
7452 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7453
7454 * utils.c (xsnprintf): Make non-static.
7455 * server.h: Add xsnprintf declaration.
7456 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
7457 replace calls to snprintf by calls to xsnprintf throughout.
7458
7459 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7460
7461 * configure.ac: Add configure check for alloca.
7462 * configure, config.in: Regenerate.
7463 * server.h: Include alloca.h if it exists.
7464 * gdbreplay.c: Include alloca.h if it exists.
7465
7466 2010-08-28 Pedro Alves <pedro@codesourcery.com>
7467
7468 * linux-low.c (__SIGRTMIN): Define if not already defined.
7469 (linux_create_inferior): Check for __ANDROID__ rather than
7470 __SIGRTMIN.
7471 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
7472 are already deferred.
7473 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
7474 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
7475 stopped and already has a pending signal to report.
7476 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
7477 a pending signal to report or is moving out of a jump pad.
7478 (linux_init_signals): Check for __ANDROID__ rather than
7479 __SIGRTMIN.
7480
7481 2010-08-28 Pedro Alves <pedro@codesourcery.com>
7482
7483 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
7484 debug_threads check. Avoid a linear search when not doing debug
7485 output.
7486
7487 2010-08-27 Pedro Alves <pedro@codesourcery.com>
7488
7489 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
7490 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
7491 (struct file_handler) <fd>: Change type to gdb_fildes_t.
7492 (process_event): Change local fd's type to gdb_fildes_t.
7493 (create_file_handler): Adjust prototype.
7494 (delete_file_handler): Adjust prototype.
7495 (handle_file_event): Adjust prototype. Use pfildes.
7496 (create_file_event): Adjsut prototype.
7497 * remote-utils.c (remote_desc, listen_desc): Change type to
7498 gdb_fildes_t.
7499 * server.h: New gdb_fildes_t typedef.
7500 [USE_WIN32API]: Include winsock2.h.
7501 (delete_file_handler, add_file_handler): Adjust prototypes.
7502 (pfildes): Declare.
7503 * utils.c (pfildes): New.
7504
7505 2010-08-27 Pedro Alves <pedro@codesourcery.com>
7506
7507 * configure.ac (build_warnings): Add -Wno-char-subscripts.
7508 * configure: Regenerate.
7509
7510 2010-08-27 Pedro Alves <pedro@codesourcery.com>
7511
7512 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
7513 (linux_done_accessing_memory): ... this.
7514 (linux_target_ops): Adjust.
7515 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
7516 * nto-low.c (nto_target_ops): Adjust comment.
7517 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
7518 * spu-low.c (spu_target_ops): Adjust comment.
7519 * target.h (target_ops): Rename unprepare_to_access_memory field
7520 to done_accessing_memory.
7521 (unprepare_to_access_memory): Rename to ...
7522 (done_accessing_memory): ... this.
7523
7524 2010-08-26 Pedro Alves <pedro@codesourcery.com>
7525
7526 * linux-low.c (linux_prepare_to_access_memory): New.
7527 (linux_unprepare_to_access_memory): New.
7528 (linux_target_ops): Install them.
7529 * server.c (read_memory): Rename to ...
7530 (gdb_read_memory): ... this. Use
7531 prepare_to_access_memory/prepare_to_access_memory.
7532 (write_memory): Rename to ...
7533 (gdb_write_memory): ... this. Use
7534 prepare_to_access_memory/prepare_to_access_memory.
7535 (handle_search_memory_1): Adjust.
7536 (process_serial_event): Adjust.
7537 * target.h (struct target_ops): New fields
7538 prepare_to_access_memory and unprepare_to_access_memory.
7539 (prepare_to_access_memory, unprepare_to_access_memory): New.
7540 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
7541 prepare_to_access_memory/prepare_to_access_memory.
7542 * nto-low.c (nto_target_ops): Adjust.
7543 * spu-low.c (spu_target_ops): Adjust.
7544 * win32-low.c (win32_target_ops): Adjust.
7545
7546 2010-08-26 Pedro Alves <pedro@codesourcery.com>
7547
7548 * Makefile.in (WARN_CFLAGS): Get it from configure.
7549 (WERROR_CFLAGS): New.
7550 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
7551 * configure.ac: Introduce --enable-werror, which adds -Werror to
7552 the compiler command line. Enabled by default. Disable with
7553 --disable-werror. Add -Wdeclaration-after-statement
7554 Wpointer-arith and -Wformat-nonliteral to warning flags.
7555 * configure: Regenerate.
7556
7557 2010-08-26 Pedro Alves <pedro@codesourcery.com>
7558
7559 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
7560
7561 2010-08-26 Pedro Alves <pedro@codesourcery.com>
7562
7563 * gdbreplay.c (remote_error): New.
7564 (gdbchar): New.
7565 (expect): Use gdbchar. Check for error reading from GDB.
7566 Clarify sync error output.
7567 (play): Check for errors writing to GDB.
7568 * linux-low.c (sigchld_handler): Really ignore `write' errors.
7569 * remote-utils.c (getpkt): Check for errors writing to the remote
7570 descriptor.
7571
7572 2010-08-25 Pedro Alves <pedro@codesourcery.com>
7573
7574 * linux-low.c (linux_wait_1): Move non-debugging code out of
7575 `debug_threads' control.
7576
7577 2010-08-25 Pedro Alves <pedro@codesourcery.com>
7578
7579 * linux-low.c (linux_wait_1): Don't set last_status here.
7580 * server.c (push_event, queue_stop_reply_callback): Assert we're
7581 not pushing a TARGET_WAITKIND_IGNORE event.
7582 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
7583 (myresume, handle_target_event): Set the thread's last_resume_kind
7584 and last_status from the target returned status.
7585
7586 2010-08-25 Pedro Alves <pedro@codesourcery.com>
7587
7588 PR threads/10729
7589
7590 * linux-x86-low.c (update_debug_registers_callback): New.
7591 (i386_dr_low_set_addr): Use it.
7592 (i386_dr_low_get_addr): New.
7593 (i386_dr_low_set_control): Use update_debug_registers_callback.
7594 (i386_dr_low_get_control): New.
7595 (i386_dr_low_get_status): Adjust.
7596 * linux-low.c (linux_stop_lwp): New.
7597 * linux-low.h (linux_stop_lwp): Declare.
7598
7599 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
7600 argument instead of a i386_debug_reg_state.
7601 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
7602 a i386_debug_reg_state.
7603 (i386_insert_aligned_watchpoint): Adjust.
7604 (i386_remove_aligned_watchpoint): Adjust.
7605 (i386_low_stopped_data_address): Read the debug registers from the
7606 inferior instead of from the mirrors.
7607 * i386-low.h (struct i386_debug_reg_state): Extend comment.
7608 (i386_dr_low_get_addr): Declare.
7609 (i386_dr_low_get_control): Declare.
7610 (i386_dr_low_get_status): Change prototype.
7611
7612 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
7613 (i386_dr_low_get_addr): New.
7614 (i386_dr_low_get_control): New.
7615 (i386_dr_low_get_status): Adjust prototype. Return
7616 dr_status_mirror.
7617 (i386_initial_stuff): Clear dr_status_mirror and
7618 dr_control_mirror.
7619 (i386_get_thread_context): Adjust.
7620 (i386_set_thread_context): Adjust.
7621 (i386_thread_added): Adjust.
7622
7623 2010-08-24 Pedro Alves <pedro@codesourcery.com>
7624
7625 * linux-low.h (linux_thread_area): Delete declaration.
7626
7627 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
7628
7629 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
7630 after its termination.
7631
7632 2010-08-09 Pedro Alves <pedro@codesourcery.com>
7633
7634 * linux-low.c (gdb_wants_lwp_stopped): Delete.
7635 (gdb_wants_all_stopped): Delete.
7636 (linux_wait_1): Don't call them.
7637 * server.c (handle_v_cont): Tag all threads as want-stopped.
7638 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
7639 stopped as "client-wants-stopped".
7640
7641 2010-07-31 Pedro Alves <pedro@codesourcery.com>
7642
7643 * Makefile.in (signals_h): New.
7644 (server_h): Depend on it.
7645 (server.o): Don't depend on $(signals_def).
7646 (signals.o): Depend on $(signals_def).
7647
7648 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
7649
7650 * Makefile.in (signals_def): New.
7651 (server_h): Append include/gdb/signals.h and signals_def.
7652 (server.o): Append signals_def.
7653
7654 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
7655
7656 * server.c (handle_target_event): Use target_signal_to_host for
7657 resume_info.sig initialization.
7658 * target.h (struct thread_resume) <sig>: New comment.
7659
7660 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
7661
7662 * server.c (handle_query): strcpy() the returned string from paddress()
7663 instead of sprintf().
7664 * utils.c (paddress): Return phex_nz().
7665
7666 2010-07-07 Joel Brobecker <brobecker@adacore.com>
7667
7668 * server.c (handle_v_cont): Call mourn_inferior if process
7669 just exited.
7670 (myresume): Likewise.
7671
7672 2010-07-01 Pedro Alves <pedro@codesourcery.com>
7673
7674 Static tracepoints, and integration with UST.
7675
7676 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
7677 * mem-break.c (uninsert_all_breakpoints)
7678 (reinsert_all_breakpoints): New.
7679 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
7680 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
7681 (gdb_agent_ust_loaded, helper_thread_id)
7682 (gdb_agent_helper_thread_id): New macros.
7683 (struct ipa_sym_addresses): Add addr_ust_loaded,
7684 addr_helper_thread_id, addr_cmd_buf.
7685 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
7686 (in_process_agent_loaded_ust): New.
7687 (write_e_ust_not_loaded): New.
7688 (maybe_write_ipa_ust_not_loaded): New.
7689 (struct collect_static_trace_data_action): New.
7690 (enum tracepoint_type) <static_tracepoint>: New.
7691 (struct tracepoint) <handle>: Mention static tracepoints.
7692 (struct static_tracepoint_ctx): New.
7693 (CMD_BUF_SIZE): New.
7694 (add_tracepoint_action): Handle static tracepoint actions.
7695 (unprobe_marker_at): New.
7696 (clear_installed_tracepoints): Handle static tracepoints.
7697 (cmd_qtdp): Handle static tracepoints.
7698 (probe_marker_at): New.
7699 (cmd_qtstart): Handle static tracepoints.
7700 (response_tracepoint): Handle static tracepoints.
7701 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
7702 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
7703 (get_context_regcache): Handle static tracepoints.
7704 (do_action_at_tracepoint): Handle static tracepoint actions.
7705 (traceframe_find_block_type): Handle static trace data blocks.
7706 (traceframe_read_sdata): New.
7707 (download_tracepoints): Download static tracepoint actions.
7708 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
7709 (GDB_PROBE_NAME): New.
7710 (ust_ops): New.
7711 (GET_UST_SYM): New.
7712 (USTF): New.
7713 (dlsym_ust): New.
7714 (ust_marker_to_static_tracepoint): New.
7715 (gdb_probe): New.
7716 (collect_ust_data_at_tracepoint): New.
7717 (gdb_ust_probe): New.
7718 (UNIX_PATH_MAX, SOCK_DIR): New.
7719 (gdb_ust_connect_sync_socket): New.
7720 (resume_thread, stop_thread): New.
7721 (run_inferior_command): New.
7722 (init_named_socket): New.
7723 (gdb_ust_socket_init): New.
7724 (cstr_to_hexstr): New.
7725 (next_st): New.
7726 (first_marker, next_marker): New.
7727 (response_ust_marker): New.
7728 (cmd_qtfstm, cmd_qtsstm): New.
7729 (unprobe_marker_at, probe_marker_at): New.
7730 (cmd_qtstmat, gdb_ust_thread): New.
7731 (gdb_ust_init): New.
7732 (initialize_tracepoint_ftlib): Call gdb_ust_init.
7733 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
7734 (ST_REGENTRY): New.
7735 (x86_64_st_collect_regmap): New.
7736 (X86_64_NUM_ST_COLLECT_GREGS): New.
7737 (AMD64_RIP_REGNUM): New.
7738 (supply_static_tracepoint_registers): New.
7739 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
7740 (ST_REGENTRY): New.
7741 (i386_st_collect_regmap): New.
7742 (i386_NUM_ST_COLLECT_GREGS): New.
7743 (supply_static_tracepoint_registers): New.
7744 * server.c (handle_query): Handle qXfer:statictrace:read.
7745 <qSupported>: Report support for StaticTracepoints, and
7746 qXfer:statictrace:read features.
7747 * server.h (traceframe_read_sdata)
7748 (supply_static_tracepoint_registers): Declare.
7749 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
7750 (unpack_varlen_hex): Include in IPA build.
7751 * Makefile.in (ustlibs, ustinc): New.
7752 (IPA_OBJS): Add remote-utils-ipa.o.
7753 ($(IPA_LIB)): Link -ldl and -lpthread.
7754 (UST_CFLAGS): New.
7755 (IPAGENT_CFLAGS): Add UST_CFLAGS.
7756 * config.in, configure: Regenerate.
7757
7758 2010-06-20 Ian Lance Taylor <iant@google.com>
7759 Pedro Alves <pedro@codesourcery.com>
7760
7761 * linux-x86-low.c (always_true): Delete.
7762 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
7763 trying to fool the compiler with always_true.
7764
7765 2010-06-20 Pedro Alves <pedro@codesourcery.com>
7766
7767 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
7768 conditions in gdbserver.
7769
7770 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
7771
7772 * spu-low.c (spu_read_memory): Wrap around local store limit.
7773 (spu_write_memory): Likewise.
7774
7775 2010-06-15 Pedro Alves <pedro@codesourcery.com>
7776
7777 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
7778 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
7779 LONGEST uses.
7780 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
7781 uses.
7782 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
7783 uses with LONGEST uses.
7784
7785 2010-06-14 Stan Shebs <stan@codesourcery.com>
7786 Pedro Alves <pedro@codesourcery.com>
7787
7788 Bytecode compiler.
7789
7790 * linux-x86-low.c: Include limits.h.
7791 (add_insns): New.
7792 (always_true): New.
7793 (EMIT_ASM): New.
7794 (EMIT_ASM32): New.
7795 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
7796 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
7797 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
7798 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
7799 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
7800 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
7801 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
7802 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
7803 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
7804 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
7805 (amd64_emit_void_call_2): New.
7806 (amd64_emit_ops): New.
7807 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
7808 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
7809 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
7810 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
7811 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
7812 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
7813 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
7814 (i386_emit_call, i386_emit_reg, i386_emit_pop)
7815 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
7816 (i386_emit_stack_adjust, i386_emit_int_call_1)
7817 (i386_emit_void_call_2): New.
7818 (i386_emit_ops): New.
7819 (x86_emit_ops): New.
7820 (the_low_target): Install x86_emit_ops.
7821 * server.h (struct emit_ops): New.
7822 (get_raw_reg_func_addr): Declare.
7823 (current_insn_ptr, emit_error): Declare.
7824 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
7825 (set_trace_state_variable_value): New defines.
7826 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
7827 addr_get_trace_state_variable_value and
7828 addr_set_trace_state_variable_value.
7829 (symbol_list): New fields for get_raw_reg,
7830 get_trace_state_variable_value and set_trace_state_variable_value.
7831 (condfn): New typedef.
7832 (struct tracepoint): New field `compiled_cond'.
7833 (do_action_at_tracepoint): Clear compiled_cond.
7834 (get_trace_state_variable_value, set_trace_state_variable_value):
7835 Export in the IPA.
7836 (condition_true_at_tracepoint): If there's a compiled condition,
7837 run that.
7838 (current_insn_ptr, emit_error): New globals.
7839 (struct bytecode_address): New.
7840 (get_raw_reg_func_addr): New.
7841 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
7842 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
7843 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
7844 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
7845 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
7846 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
7847 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
7848 (compile_tracepoint_condition, compile_bytecodes): New.
7849 * target.h (emit_ops): Forward declare.
7850 (struct target_ops): New field emit_ops.
7851 (target_emit_ops): New.
7852 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
7853 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
7854 * linux-low.c (linux_emit_ops): New.
7855 (linux_target_ops): Install it.
7856 * linux-low.h (struct linux_target_ops): New field emit_ops.
7857
7858 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
7859
7860 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
7861 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
7862
7863 2010-06-01 Pedro Alves <pedro@codesourcery.com>
7864 Stan Shebs <stan@codesourcery.com>
7865
7866 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
7867 (all): Depend on $(extra_libraries).
7868 (install-only): Install the IPA.
7869 (IPA_OBJS, IPA_LIB): New.
7870 (clean): Remove the IPA lib.
7871 (IPAGENT_CFLAGS): New.
7872 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
7873 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
7874 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
7875 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
7876 * configure.ac: Check for atomic builtins support in the compiler.
7877 (IPA_DEPFILES, extra_libraries): Define.
7878 * configure.srv (ipa_obj): Add description.
7879 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
7880 (i[34567]86-*-linux*): Set ipa_obj.
7881 (x86_64-*-linux*): Set ipa_obj.
7882 * linux-low.c (stabilizing_threads): New.
7883 (supports_fast_tracepoints): New.
7884 (linux_detach): Stabilize threads before detaching.
7885 (handle_tracepoints): Handle internal tracing breakpoints. Assert
7886 the lwp is either not stabilizing, or is moving out of a jump pad.
7887 (linux_fast_tracepoint_collecting): New.
7888 (maybe_move_out_of_jump_pad): New.
7889 (enqueue_one_deferred_signal): New.
7890 (dequeue_one_deferred_signal): New.
7891 (linux_wait_for_event_1): If moving out of a jump pad, defer
7892 pending signals to later.
7893 (linux_stabilize_threads): New.
7894 (linux_wait_1): Check if threads need moving out of jump pads, and
7895 do it if so.
7896 (stuck_in_jump_pad_callback): New.
7897 (move_out_of_jump_pad_callback): New.
7898 (lwp_running): New.
7899 (linux_resume_one_lwp): Handle moving out of jump pads.
7900 (linux_set_resume_request): Dequeue deferred signals.
7901 (need_step_over_p): Also step over fast tracepoint jumps.
7902 (start_step_over): Also uninsert fast tracepoint jumps.
7903 (finish_step_over): Also reinsert fast tracepoint jumps.
7904 (linux_install_fast_tracepoint_jump): New.
7905 (linux_target_ops): Install linux_stabilize_threads and
7906 linux_install_fast_tracepoint_jump_pad.
7907 * linux-low.h (linux_target_ops) <get_thread_area,
7908 install_fast_tracepoint_jump_pad>: New fields.
7909 (struct lwp_info) <collecting_fast_tracepoint,
7910 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
7911 (linux_get_thread_area): Declare.
7912 * linux-x86-low.c (jump_insn): New.
7913 (x86_get_thread_area): New.
7914 (append_insns): New.
7915 (push_opcode): New.
7916 (amd64_install_fast_tracepoint_jump_pad): New.
7917 (i386_install_fast_tracepoint_jump_pad): New.
7918 (x86_install_fast_tracepoint_jump_pad): New.
7919 (the_low_target): Install x86_get_thread_area and
7920 x86_install_fast_tracepoint_jump_pad.
7921 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
7922 (struct fast_tracepoint_jump): New.
7923 (fast_tracepoint_jump_insn): New.
7924 (fast_tracepoint_jump_shadow): New.
7925 (find_fast_tracepoint_jump_at): New.
7926 (fast_tracepoint_jump_here): New.
7927 (delete_fast_tracepoint_jump): New.
7928 (set_fast_tracepoint_jump): New.
7929 (uninsert_fast_tracepoint_jumps_at): New.
7930 (reinsert_fast_tracepoint_jumps_at): New.
7931 (set_breakpoint_at): Use write_inferior_memory.
7932 (uninsert_raw_breakpoint): Use write_inferior_memory.
7933 (check_mem_read): Mask out fast tracepoint jumps.
7934 (check_mem_write): Mask out fast tracepoint jumps.
7935 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
7936 (set_fast_tracepoint_jump): Declare.
7937 (delete_fast_tracepoint_jump)
7938 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
7939 (reinsert_fast_tracepoint_jumps_at): Declare.
7940 * regcache.c: Don't compile many functions when building the
7941 in-process agent library.
7942 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
7943 the register buffer in the heap.
7944 (free_register_cache): If the register buffer isn't owned by the
7945 regcache, don't free it.
7946 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
7947 pre-existing register caches.
7948 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
7949 type.
7950 (convert_ascii_to_int): : Constify `from' parameter type.
7951 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
7952 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
7953 the needed buffer in-place.
7954 (relocate_instruction): New.
7955 * server.c (handle_query) <qSymbols>: If the target supports
7956 tracepoints, give it a chance of looking up symbols. Report
7957 support for fast tracepoints.
7958 (handle_status): Stabilize threads.
7959 (process_serial_event): Adjust.
7960 * server.h (struct fast_tracepoint_jump): Forward declare.
7961 (struct process_info) <fast_tracepoint_jumps>: New field.
7962 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
7963 (decode_X_packet, decode_M_packet): Adjust.
7964 (relocate_instruction): Declare.
7965 (in_process_agent_loaded): Declare.
7966 (tracepoint_look_up_symbols): Declare.
7967 (struct fast_tpoint_collect_status): Declare.
7968 (fast_tracepoint_collecting): Declare.
7969 (force_unlock_trace_buffer): Declare.
7970 (handle_tracepoint_bkpts): Declare.
7971 (initialize_low_tracepoint)
7972 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
7973 * target.h (struct target_ops) <stabilize_threads,
7974 install_fast_tracepoint_jump_pad>: New fields.
7975 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
7976 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
7977 [HAVE_STDINT_H]: Include stdint.h.
7978 (trace_debug_1): Rename to ...
7979 (trace_vdebug): ... this.
7980 (trace_debug): Rename to ...
7981 (trace_debug_1): ... this. Add `level' parameter.
7982 (trace_debug): New.
7983 (ATTR_USED, ATTR_NOINLINE): New.
7984 (IP_AGENT_EXPORT): New.
7985 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
7986 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
7987 (about_to_request_buffer_space, trace_buffer_is_full)
7988 (stopping_tracepoint, expr_eval_result, error_tracepoint)
7989 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
7990 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
7991 (traceframe_write_count, traceframes_created)
7992 (trace_state_variables)
7993 New renaming defines.
7994 (struct ipa_sym_addresses): New.
7995 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
7996 (symbol_list): New.
7997 (ipa_sym_addrs): New.
7998 (all_tracepoint_symbols_looked_up): New.
7999 (in_process_agent_loaded): New.
8000 (write_e_ipa_not_loaded): New.
8001 (maybe_write_ipa_not_loaded): New.
8002 (tracepoint_look_up_symbols): New.
8003 (debug_threads) [IN_PROCESS_AGENT]: New.
8004 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
8005 (UNKNOWN_SIDE_EFFECTS): New.
8006 (stop_tracing): New.
8007 (flush_trace_buffer): New.
8008 (stop_tracing_bkpt): New.
8009 (flush_trace_buffer_bkpt): New.
8010 (read_inferior_integer): New.
8011 (read_inferior_uinteger): New.
8012 (read_inferior_data_pointer): New.
8013 (write_inferior_data_pointer): New.
8014 (write_inferior_integer): New.
8015 (write_inferior_uinteger): New.
8016 (struct collect_static_trace_data_action): Delete.
8017 (enum tracepoint_type): New.
8018 (struct tracepoint) <type>: New field `type'.
8019 <actions_str, step_actions, step_actions_str>: Only include in
8020 GDBserver.
8021 <orig_size, obj_addr_on_target, adjusted_insn_addr>
8022 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
8023 (tracepoints): Use IP_AGENT_EXPORT.
8024 (last_tracepoint): Don't include in the IPA.
8025 (stopping_tracepoint): Use IP_AGENT_EXPORT.
8026 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
8027 (alloced_trace_state_variables): New.
8028 (trace_state_variables): Use IP_AGENT_EXPORT.
8029 (traceframe_t): Delete unused variable.
8030 (circular_trace_buffer): Don't include in the IPA.
8031 (trace_buffer_start): Delete.
8032 (struct trace_buffer_control): New.
8033 (trace_buffer_free): Delete.
8034 (struct ipa_trace_buffer_control): New.
8035 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
8036 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
8037 New.
8038 (trace_buffer_ctrl): New.
8039 (TRACE_BUFFER_CTRL_CURR): New.
8040 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
8041 Reimplement as macros.
8042 (trace_buffer_wrap): Delete.
8043 (traceframe_write_count, traceframe_read_count)
8044 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
8045 (struct tracepoint_hit_ctx) <type>: New field.
8046 (struct fast_tracepoint_ctx): New.
8047 (memory_barrier): New.
8048 (cmpxchg): New.
8049 (record_tracepoint_error): Update atomically in the IPA.
8050 (clear_inferior_trace_buffer): New.
8051 (about_to_request_buffer_space): New.
8052 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
8053 updating the same buffer.
8054 (add_tracepoint): Default the tracepoint's type to trap
8055 tracepoint, and orig_size to -1.
8056 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
8057 internal variables.
8058 (create_trace_state_variable): New parameter `gdb'. Handle it.
8059 (clear_installed_tracepoints): Clear fast tracepoint jumps.
8060 (cmd_qtdp): Handle fast tracepoints.
8061 (cmd_qtdv): Adjust.
8062 (max_jump_pad_size): New.
8063 (gdb_jump_pad_head): New.
8064 (get_jump_space_head): New.
8065 (claim_jump_space): New.
8066 (sort_tracepoints): New.
8067 (MAX_JUMP_SIZE): New.
8068 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
8069 IPA.
8070 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
8071 support. Upload fast traceframes, and delete internal IPA
8072 breakpoints.
8073 (stop_tracing_handler): New.
8074 (flush_trace_buffer_handler): New.
8075 (cmd_qtstop): Upload fast tracepoints.
8076 (response_tracepoint): Handle fast tracepoints.
8077 (tracepoint_finished_step): Upload fast traceframes. Set the
8078 tracepoint hit context's tracepoint type.
8079 (handle_tracepoint_bkpts): New.
8080 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
8081 type. Add comment about fast tracepoints.
8082 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
8083 non-existing action_str field.
8084 (get_context_regcache): Handle fast tracepoints.
8085 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
8086 to the regcache.
8087 (fast_tracepoint_from_jump_pad_address): New.
8088 (fast_tracepoint_from_ipa_tpoint_address): New.
8089 (collecting_t): New.
8090 (force_unlock_trace_buffer): New.
8091 (fast_tracepoint_collecting): New.
8092 (collecting): New.
8093 (gdb_collect): New.
8094 (write_inferior_data_ptr): New.
8095 (target_tp_heap): New.
8096 (target_malloc): New.
8097 (download_agent_expr): New.
8098 (UALIGN): New.
8099 (download_tracepoints): New.
8100 (download_trace_state_variables): New.
8101 (upload_fast_traceframes): New.
8102 (IPA_FIRST_TRACEFRAME): New.
8103 (IPA_NEXT_TRACEFRAME_1): New.
8104 (IPA_NEXT_TRACEFRAME): New.
8105 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
8106 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
8107 (gdb_jump_pad_buffer_end): New.
8108 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
8109 (initialize_tracepoint): Adjust.
8110 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
8111 buffer. Initialize the low module.
8112 * utils.c (PREFIX, TOOLNAME): New.
8113 (malloc_failure): Use PREFIX.
8114 (error): In the IPA, an error causes an exit.
8115 (fatal, warning): Use PREFIX.
8116 (internal_error): Use TOOLNAME.
8117 (NUMCELLS): Increase to 10.
8118 * configure, config.in: Regenerate.
8119
8120 2010-06-01 Pedro Alves <pedro@codesourcery.com>
8121
8122 * server.c (handle_query) <qSupported>: Do two passes over the
8123 qSupported string to avoid nesting strtok.
8124
8125 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8126
8127 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
8128 (CDEPS): New.
8129 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
8130 -Wl,--dynamic-list.
8131 * configure: Regenerate.
8132 * proc-service.list: New.
8133
8134 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8135
8136 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
8137 New comment.
8138
8139 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
8140
8141 * gdbreplay.c (remote_open): Check error return from socket() call by
8142 its equality to -1 not by it being negative.
8143 * remote-utils.c (remote_open): Likewise.
8144
8145 2010-05-23 Pedro Alves <pedro@codesourcery.com>
8146
8147 * config.h: Regenerate.
8148
8149 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
8150
8151 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
8152 doesn't provide PTRACE_GET_THREAD_AREA.
8153
8154 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
8155
8156 * linux-m68k-low.c: Include <asm/ptrace.h>
8157 (ps_get_thread_area): Implement.
8158
8159 2010-05-03 Doug Evans <dje@google.com>
8160
8161 * event-loop.c (struct callback_event): New struct.
8162 (callback_list): New global.
8163 (append_callback_event, delete_callback_event): New functions.
8164 (process_callback): New function.
8165 (start_event_loop): Call it.
8166 * remote-utils.c (NOT_SCHEDULED): Define.
8167 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
8168 moved out of readchar.
8169 (readchar): Rewrite. Call reschedule before returning.
8170 (reset_readchar): New function.
8171 (remote_close): Call it.
8172 (process_remaining, reschedule): New functions.
8173 * server.h (callback_handler_func): New typedef.
8174 (append_callback_event, delete_callback_event): Declare.
8175
8176 2010-05-03 Pedro Alves <pedro@codesourcery.com>
8177
8178 * proc-service.c (ps_pglobal_lookup): Use
8179 thread_db_look_up_one_symbol.
8180 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
8181 parameter. Use it instead of all_symbols_looked_up.
8182 * server.h (struct process_info) <all_symbols_looked_up>: Delete
8183 field.
8184 (all_symbols_looked_up): Don't declare.
8185 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
8186 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
8187 field.
8188 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
8189 Set all_symbols_looked_up here.
8190 (thread_db_look_up_one_symbol): New.
8191 (thread_db_get_tls_address): Adjust.
8192 (thread_db_load_search, try_thread_db_load_1): Always allocate the
8193 thread_db object on the heap, and tentatively set it in the
8194 process structure.
8195 (thread_db_init): Don't set all_symbols_looked_up here.
8196 * linux-low.h (thread_db_look_up_one_symbol): Declare.
8197
8198 2010-05-03 Pedro Alves <pedro@codesourcery.com>
8199
8200 * linux-low.c (linux_kill, linux_detach): Adjust.
8201 (status_pending_p_callback): Remove redundant statement. Check
8202 for !TARGET_WAITIKIND_IGNORE, instead of
8203 TARGET_WAITKIND_STOPPED.
8204 (handle_tracepoints): Make sure LWP is locked. Adjust.
8205 (linux_wait_for_event_1): Adjust.
8206 (linux_cancel_breakpoints): New.
8207 (unsuspend_one_lwp): New.
8208 (unsuspend_all_lwps): New.
8209 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
8210 (send_sigstop_callback): Change return type to int, add new
8211 `except' parameter and handle it.
8212 (suspend_and_send_sigstop_callback): New.
8213 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
8214 pass them down. If SUSPEND, also increment the lwp's suspend
8215 count.
8216 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
8217 (need_step_over_p): Don't consider suspended LWPs.
8218 (start_step_over): Adjust.
8219 (proceed_one_lwp): Change return type to int, add new `except'
8220 parameter and handle it.
8221 (unsuspend_and_proceed_one_lwp): New.
8222 (proceed_all_lwps): Use find_inferior instead of
8223 for_each_inferior.
8224 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
8225 also decrement the suspend count of LWPs. Pass `except' down,
8226 instead of hacking its suspend count.
8227 (linux_pause_all): Add `freeze' parameter. Adjust.
8228 (linux_unpause_all): New.
8229 (linux_target_ops): Install linux_unpause_all.
8230 * server.c (handle_status): Adjust.
8231 * target.h (struct target_ops): New fields `unpause_all' and
8232 `cancel_breakpoints'. Add new parameter to `pause_all'.
8233 (pause_all): Add new `freeze' parameter.
8234 (unpause_all): New.
8235 (cancel_breakpoints): New.
8236 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
8237 cancel breakpoints.
8238 (cmd_qtstart): Pause threads.
8239 (stop_tracing): Pause threads, and cancel breakpoints.
8240 * win32-low.c (win32_target_ops): Adjust.
8241
8242 2010-05-03 Pedro Alves <pedro@codesourcery.com>
8243
8244 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
8245 the inferior right away from here...
8246 (linux_wait_1): ... to here, and adjust to check the thread's
8247 last_resume_kind instead of the lwp's step or stop_expected flags.
8248
8249 2010-05-02 Pedro Alves <pedro@codesourcery.com>
8250
8251 * README: Use consistent `GDB' and `GDBserver' spellings.
8252
8253 2010-05-02 Pedro Alves <pedro@codesourcery.com>
8254
8255 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
8256 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
8257 (linux_detach_one_lwp): Assume the lwp is stopped.
8258 (any_thread_of): Delete.
8259 (linux_detach): Stop all lwps here. Don't blindly delete all
8260 breakpoints.
8261 (delete_lwp_callback): New.
8262 (linux_mourn): Delete all lwps of the process that is gone.
8263 (linux_wait_1): Don't delete the last lwp of the process here.
8264 * mem-break.h (mark_breakpoints_out): Declare.
8265 * mem-break.c (mark_breakpoints_out): New.
8266 (free_all_breakpoints): Use it.
8267 * server.c (handle_target_event): If the process is gone, mark
8268 breakpoints out.
8269 * thread-db.c (struct thread_db) <create_bp>: New field.
8270 (thread_db_enable_reporting): Fix prototype. Store a thread event
8271 breakpoint reference in the thread_db struct.
8272 (thread_db_load_search): Clear the thread_db object.
8273 (try_thread_db_load_1): Ditto.
8274 (switch_to_process): New.
8275 (disable_thread_event_reporting): Use it.
8276 (remove_thread_event_breakpoints): New.
8277 (thread_db_detach, thread_db_mourn): Use it.
8278
8279 2010-05-01 Pedro Alves <pedro@codesourcery.com>
8280
8281 * linux-low.c (linux_enable_event_reporting): New.
8282 (linux_wait_for_event_1, handle_extended_wait): Use it.
8283
8284 2010-04-30 Pedro Alves <pedro@codesourcery.com>
8285
8286 * linux-low.c (linux_kill_one_lwp, linux_kill)
8287 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
8288 (send_sigstop): Take an lwp_info as parameter instead. Queue a
8289 SIGSTOP even if the LWP is stopped.
8290 (send_sigstop_callback): New.
8291 (stop_all_lwps): Use send_sigstop_callback instead.
8292 (linux_resume_one_thread): Adjust.
8293 (proceed_one_lwp): Still proceed an LWP that the client has
8294 requested to stop, if we haven't reported it as stopped yet. Make
8295 sure that LWPs the client want stopped, have a pending SIGSTOP.
8296
8297 2010-04-26 Doug Evans <dje@google.com>
8298
8299 * server.c (handle_general_set): Make static.
8300
8301 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
8302 Print received char after testing for error/eof instead of before.
8303 (input_interrupt): Tweak comment.
8304
8305 2010-04-23 Doug Evans <dje@google.com>
8306
8307 * server.c (start_inferior): Print inferior argv if --debug.
8308
8309 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
8310
8311 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
8312 * nto-x86-low.c: Include server.h
8313
8314 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
8315
8316 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
8317 be consistent with other sources of this directory.
8318 (init_registers_amd64): Correct name of source file of this function
8319 in the comment.
8320
8321 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8322
8323 * configure.srv (x86_64-*-mingw*): New configuration for Windows
8324 64-bit executables.
8325
8326 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8327
8328 * win32-i386-low.c: Add 64-bit support.
8329 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
8330 (init_registers_amd64): Declare.
8331 (mappings): Add 64-bit version of array.
8332 (init_windows_x86): New function.
8333 (the_low_target): Change init_arch field to init_windows_x86.
8334
8335 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8336
8337 * win32-low.c: Adapt to support also 64-bit architecture.
8338 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
8339 (get_image_name): Use SIZE_T type for local variable `done'.
8340 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
8341 (toolhelp_get_dll_name): Idem.
8342 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
8343 Use uintptr_t typecast to avoid warning.
8344 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
8345 (handle_exception): Use phex_nz to avoid warning.
8346 (win32_wait): Remove unused local variable `process'.
8347
8348 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8349
8350 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
8351 `amd64-avx.o'.
8352
8353 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
8354
8355 * configure.ac: Use `ws2_32' library for srv_mingw.
8356 * configure: Regenerate.
8357 * gdbreplay.c: Include winsock2.h instead of winsock.h.
8358 * remote-utils.c: Likewise.
8359
8360 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
8361
8362 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
8363 if __x86_64__ is defined.
8364
8365 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
8366
8367 * configure: Regenerate.
8368
8369 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
8370
8371 * server.c (handle_query): Handle 'qGetTIBAddr' query.
8372 * target.h (target_ops): New get_tib_address field.
8373 * win32-low.h (win32_thread_info): Add thread_local_base field.
8374 * win32-low.c (child_add_thread): Add tlb argument.
8375 Set thread_local_base field to TLB.
8376 (get_child_debug_event): Adapt to child_add_thread change.
8377 (win32_get_tib_address): New function.
8378 (win32_target_ops): Set get_tib_address field to
8379 win32_get_tib_address.
8380 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
8381
8382 2010-04-12 Pedro Alves <pedro@codesourcery.com>
8383
8384 * linux-low.c (linux_mourn): Also remove the process.
8385 * server.c (handle_target_event): Don't remove the process here.
8386 * nto-low.c (nto_mourn): New.
8387 (nto_target_ops): Install it.
8388 * spu-low.c (spu_mourn): New.
8389 (spu_target_ops): Install it.
8390 * win32-low.c (win32_mourn): New.
8391 (win32_target_ops): Install it.
8392
8393 2010-04-12 Pedro Alves <pedro@codesourcery.com>
8394
8395 * server.h (buffer_xml_printf): Remove redundant `;'.
8396
8397 2010-04-12 Pedro Alves <pedro@codesourcery.com>
8398
8399 * regcache.c (set_register_cache): Invalidate regcaches before
8400 changing the register cache layout.
8401 (regcache_invalidate_one): Allow a NULL regcache.
8402 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
8403 regcaches before changing the register cache layout or the target
8404 regsets.
8405
8406 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
8407
8408 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
8409 variable warning on Linux/x86-64.
8410
8411 2010-04-11 Pedro Alves <pedro@codesourcery.com>
8412
8413 GDBserver disconnected tracing support.
8414
8415 * linux-low.c (linux_remove_process): Delete.
8416 (add_lwp): Don't set last_resume_kind here.
8417 (linux_kill): Use `mourn'.
8418 (linux_detach): Use `thread_db_detach', and `mourn'.
8419 (linux_mourn): New.
8420 (linux_attach_lwp_1): Adjust comment.
8421 (linux_attach): last_resume_kind moved the thread_info; adjust.
8422 (status_pending_p_callback): Adjust.
8423 (linux_wait_for_event_1): Adjust.
8424 (count_events_callback, select_singlestep_lwp_callback)
8425 (select_event_lwp_callback, cancel_breakpoints_callback)
8426 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
8427 (proceed_one_lwp): Adjust.
8428 (linux_async): Add debug output.
8429 (linux_thread_stopped): New.
8430 (linux_pause_all): New.
8431 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
8432 linux_pause_all.
8433 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
8434 (thread_db_free): Delete declaration.
8435 (thread_db_detach, thread_db_mourn): Declare.
8436 * thread-db.c (thread_db_init): Use thread_db_mourn.
8437 (thread_db_free): Delete, split in two.
8438 (disable_thread_event_reporting): New.
8439 (thread_db_detach): New.
8440 (thread_db_mourn): New.
8441
8442 * server.h (struct thread_info) <last_resume_kind>: New field.
8443 <attached>: Add comment.
8444 <gdb_detached>: New field.
8445 (handler_func): Change return type to int.
8446 (handle_serial_event, handle_target_event): Ditto.
8447 (gdb_connected): Declare.
8448 (tracing): Delete.
8449 (disconnected_tracing): Declare.
8450 (stop_tracing): Declare.
8451
8452 * server.c (handle_query) <qSupported>: Report support for
8453 disconnected tracing.
8454 (queue_stop_reply_callback): Account for running threads.
8455 (gdb_wants_thread_stopped): New.
8456 (gdb_wants_all_threads_stopped): New.
8457 (gdb_reattached_process): New.
8458 (handle_status): Clear the `gdb_detached' flag of all processes.
8459 In all-stop, stop all threads.
8460 (main): Be sure to leave tfind mode. Handle disconnected tracing.
8461 (process_serial_event): If the remote connection breaks, or if an
8462 exit was forced with "monitor exit", force an event loop exit.
8463 Handle disconnected tracing on detach.
8464 (handle_serial_event): Adjust.
8465 (handle_target_event): If GDB isn't connected, forward events back
8466 to the inferior, unless the last process exited, in which case,
8467 exit gdbserver. Adjust interface.
8468
8469 * remote-utils.c (remote_open): Don't block in accept. Instead
8470 register an event loop source on the listen socket file
8471 descriptor. Refactor bits into ...
8472 (listen_desc): ... this new global.
8473 (gdb_connected): ... this new function.
8474 (enable_async_notification): ... this new function.
8475 (handle_accept_event): ... this new function.
8476 (remote_close): Clear remote_desc.
8477
8478 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
8479
8480 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
8481 New fields.
8482 (mourn_inferior): Define.
8483 (target_process_qsupported): Avoid the dangling else problem.
8484 (thread_stopped): Define.
8485 (pause_all): Define.
8486 (target_waitstatus_to_string): Declare.
8487 * target.c (target_waitstatus_to_string): New.
8488
8489 * tracepoint.c (tracing): Make extern.
8490 (disconnected_tracing): New.
8491 (stop_tracing): Make extern. Handle tracing stops due to GDB
8492 disconnecting.
8493 (cmd_qtdisconnected): New.
8494 (cmd_qtstatus): Report disconnected tracing status in trace reply.
8495 (handle_tracepoint_general_set): Handle QTDisconnected.
8496
8497 * event-loop.c (event_handler_func): Change return type to int.
8498 (process_event): Bail out if the event handler wants the event
8499 loop to stop.
8500 (handle_file_event): Ditto.
8501 (start_event_loop): Bail out if the event handler wants the event
8502 loop to stop.
8503
8504 * nto-low.c (nto_target_ops): Adjust.
8505 * spu-low.c (spu_wait): Don't remove the process here.
8506 (spu_target_ops): Adjust.
8507 * win32-low.c (win32_wait): Don't remove the process here.
8508 (win32_target_ops): Adjust.
8509
8510 2010-04-11 Pedro Alves <pedro@codesourcery.com>
8511
8512 * regcache.c (realloc_register_cache): Invalidate inferior's
8513 regcache before recreating it.
8514
8515 2010-04-09 Pedro Alves <pedro@codesourcery.com>
8516
8517 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
8518
8519 2010-04-09 Stan Shebs <stan@codesourcery.com>
8520 Pedro Alves <pedro@codesourcery.com>
8521
8522 * server.h (LONGEST): New.
8523 (struct thread_info) <while_stepping>: New field.
8524 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
8525 Declare.
8526 (initialize_tracepoint, handle_tracepoint_general_set)
8527 (handle_tracepoint_query, tracepoint_finished_step)
8528 (tracepoint_was_hit, release_while_stepping_state_list):
8529 (current_traceframe): Declare.
8530 * server.c (handle_general_set): Handle tracepoint packets.
8531 (read_memory): New.
8532 (write_memory): New.
8533 (handle_search_memory_1): Use read_memory.
8534 (handle_query): Report support for conditional tracepoints, trace
8535 state variables, and tracepoint sources. Handle tracepoint
8536 queries.
8537 (main): Initialize the tracepoints module.
8538 (process_serial_event): Handle traceframe reads/writes.
8539
8540 * linux-low.c (handle_tracepoints): New.
8541 (linux_wait_1): Call it.
8542 (linux_resume_one_lwp): Handle while-stepping.
8543 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
8544 (linux_target_ops): Install them.
8545 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
8546 New field.
8547 * linux-x86-low.c (x86_supports_tracepoints): New.
8548 (the_low_target). Install it.
8549
8550 * mem-break.h (delete_breakpoint): Declare.
8551 * mem-break.c (delete_breakpoint): Make external.
8552
8553 * target.h (struct target_ops): Add `supports_tracepoints',
8554 `read_pc', and `write_pc' fields.
8555 (target_supports_tracepoints): Define.
8556 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
8557 (phex_nz): New.
8558
8559 * regcache.h (struct regcache) <registers_owned>: New field.
8560 (init_register_cache, regcache_cpy): Declare.
8561 (regcache_read_pc, regcache_write_pc): Declare.
8562 (register_cache_size): Declare.
8563 (supply_regblock): Declare.
8564 * regcache.c (init_register_cache): New.
8565 (new_register_cache): Use it.
8566 (regcache_cpy): New.
8567 (register_cache_size): New.
8568 (supply_regblock): New.
8569 (regcache_read_pc, regcache_write_pc): New.
8570
8571 * tracepoint.c: New.
8572
8573 * Makefile.in (OBS): Add tracepoint.o.
8574 (tracepoint.o): New rule.
8575
8576 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
8577
8578 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
8579 (i386-mmx.o): New.
8580 (i386-mmx.c): Likewise.
8581 (i386-mmx-linux.o): Likewise.
8582 (i386-mmx-linux.c): Likewise.
8583
8584 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
8585 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
8586 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
8587 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
8588
8589 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
8590 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
8591 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
8592
8593 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
8594
8595 * Makefile.in (clean): Updated.
8596 (i386-avx.o): New.
8597 (i386-avx.c): Likewise.
8598 (i386-avx-linux.o): Likewise.
8599 (i386-avx-linux.c): Likewise.
8600 (amd64-avx.o): Likewise.
8601 (amd64-avx.c): Likewise.
8602 (amd64-avx-linux.o): Likewise.
8603 (amd64-avx-linux.c): Likewise.
8604
8605 * configure.srv (srv_i386_regobj): Add i386-avx.o.
8606 (srv_i386_linux_regobj): Add i386-avx-linux.o.
8607 (srv_amd64_regobj): Add amd64-avx.o.
8608 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
8609 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
8610 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
8611 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
8612 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
8613 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
8614 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
8615
8616 * i387-fp.c: Include "i386-xstate.h".
8617 (i387_xsave): New.
8618 (i387_cache_to_xsave): Likewise.
8619 (i387_xsave_to_cache): Likewise.
8620 (x86_xcr0): Likewise.
8621
8622 * i387-fp.h (i387_cache_to_xsave): Likewise.
8623 (i387_xsave_to_cache): Likewise.
8624 (x86_xcr0): Likewise.
8625
8626 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
8627 * linux-crisv32-low.c (target_regsets): Likewise.
8628 * linux-m68k-low.c (target_regsets): Likewise.
8629 * linux-mips-low.c (target_regsets): Likewise.
8630 * linux-ppc-low.c (target_regsets): Likewise.
8631 * linux-s390-low.c (target_regsets): Likewise.
8632 * linux-sh-low.c (target_regsets): Likewise.
8633 * linux-sparc-low.c (target_regsets): Likewise.
8634 * linux-xtensa-low.c (target_regsets): Likewise.
8635
8636 * linux-low.c: Include <sys/uio.h>.
8637 (regsets_fetch_inferior_registers): Support nt_type.
8638 (regsets_store_inferior_registers): Likewise.
8639 (linux_process_qsupported): New.
8640 (linux_target_ops): Add linux_process_qsupported.
8641
8642 * linux-low.h (regset_info): Add nt_type.
8643 (linux_target_ops): Add process_qsupported.
8644
8645 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
8646 and <sys/uio.h>.
8647 (init_registers_i386_avx_linux): New.
8648 (init_registers_amd64_avx_linux): Likewise.
8649 (xmltarget_i386_linux_no_xml): Likewise.
8650 (xmltarget_amd64_linux_no_xml): Likewise.
8651 (PTRACE_GETREGSET): Likewise.
8652 (PTRACE_SETREGSET): Likewise.
8653 (x86_fill_xstateregset): Likewise.
8654 (x86_store_xstateregset): Likewise.
8655 (use_xml): Likewise.
8656 (x86_linux_update_xmltarget): Likewise.
8657 (x86_linux_process_qsupported): Likewise.
8658 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
8659 (x86_arch_setup): Don't call init_registers_amd64_linux nor
8660 init_registers_i386_linux here. Call
8661 x86_linux_update_xmltarget.
8662 (the_low_target): Add x86_linux_process_qsupported.
8663
8664 * server.c (handle_query): Call target_process_qsupported.
8665
8666 * target.h (target_ops): Add process_qsupported.
8667 (target_process_qsupported): New.
8668
8669 2010-04-03 Pedro Alves <pedro@codesourcery.com>
8670
8671 * inferiors.c (add_thread): Set last_status kind to
8672 TARGET_WAITKIND_IGNORE.
8673 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
8674 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
8675 (linux_wait_1): Move `thread' local definition to block that uses
8676 it. Don't NULL initialize `event_child'.
8677 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
8678 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
8679 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
8680
8681 2010-04-01 Pedro Alves <pedro@codesourcery.com>
8682
8683 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
8684 an extended waitstatus, or by a watchpoint.
8685 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
8686 thread was stepping or has been stopped by a watchpoint.
8687
8688 2010-04-01 Pedro Alves <pedro@codesourcery.com>
8689
8690 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
8691 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
8692 of another, then delete the previous, and validate all
8693 breakpoints.
8694 (validate_inserted_breakpoint): New.
8695 (delete_disabled_breakpoints): New.
8696 (validate_breakpoints): New.
8697 (check_mem_read): Validate breakpoints before trusting their
8698 shadow. Delete disabled breakpoints.
8699 (check_mem_write): Validate breakpoints before trusting they
8700 should be inserted. Delete disabled breakpoints.
8701 * mem-break.h (validate_breakpoints):
8702 * server.c (handle_query): Validate breakpoints when we see a
8703 qSymbol query.
8704
8705 2010-04-01 Pedro Alves <pedro@codesourcery.com>
8706
8707 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
8708 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
8709 if we could tell there's a GDB breakpoint at stop_pc.
8710 (need_step_over_p): Don't do a step over if we find a GDB
8711 breakpoint at the resume PC.
8712
8713 * mem-break.c (struct raw_breakpoint): New.
8714 (enum bkpt_type): New type `gdb_breakpoint'.
8715 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
8716 fields. New field `raw'.
8717 (find_raw_breakpoint_at): New.
8718 (set_raw_breakpoint_at): Handle refcounting. Create a raw
8719 breakpoint instead.
8720 (set_breakpoint_at): Adjust.
8721 (delete_raw_breakpoint): New.
8722 (release_breakpoint): New.
8723 (delete_breakpoint): Rename to...
8724 (delete_breakpoint_1): ... this. Add proc parameter. Use
8725 release_breakpoint. Return ENOENT.
8726 (delete_breakpoint): Reimplement.
8727 (find_breakpoint_at): Delete.
8728 (find_gdb_breakpoint_at): New.
8729 (delete_breakpoint_at): Delete.
8730 (set_gdb_breakpoint_at): New.
8731 (delete_gdb_breakpoint_at): New.
8732 (gdb_breakpoint_here): New.
8733 (set_reinsert_breakpoint): Use release_breakpoint.
8734 (uninsert_breakpoint): Rename to ...
8735 (uninsert_raw_breakpoint): ... this.
8736 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
8737 (reinsert_raw_breakpoint): Change parameter type to
8738 raw_breakpoint.
8739 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
8740 instead.
8741 (check_breakpoints): Adjust. Use release_breakpoint.
8742 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
8743 (breakpoint_inserted_here): Ditto.
8744 (check_mem_read): Adjust to iterate over raw breakpoints instead.
8745 Don't trust the breakpoint's shadow if it is not inserted.
8746 (check_mem_write): Adjust to iterate over raw breakpoints instead.
8747 (delete_all_breakpoints): Adjust.
8748 (free_all_breakpoints): Mark all breakpoints as uninserted, and
8749 use delete_breakpoint_1.
8750
8751 * mem-break.h (breakpoints_supported): Delete declaration.
8752 (set_gdb_breakpoint_at): Declare.
8753 (gdb_breakpoint_here): Declare.
8754 (delete_breakpoint_at): Delete.
8755 (delete_gdb_breakpoint_at): Declare.
8756
8757 * server.h (struct raw_breakpoint): Forward declare.
8758 (struct process_info): New field `raw_breakpoints'.
8759
8760 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
8761 breakpoints.
8762
8763 2010-03-24 Pedro Alves <pedro@codesourcery.com>
8764
8765 * linux-low.c (status_pending_p_callback): Fix comment.
8766 (linux_wait_for_event_1): Move most of the internal breakpoint
8767 handling from here...
8768 (linux_wait_1): ... to here.
8769 (count_events_callback): New.
8770 (select_singlestep_lwp_callback): New.
8771 (select_event_lwp_callback): New.
8772 (cancel_breakpoints_callback): New.
8773 (select_event_lwp): New.
8774 (linux_wait_1): Simplify internal breakpoint handling. Give equal
8775 priority to all LWPs that have had events that should be reported
8776 to the client. Cancel breakpoints when about to reporting the
8777 event to the client, not while stopping lwps. No longer cancel
8778 finished single-steps here.
8779 (cancel_finished_single_step): Delete.
8780 (cancel_finished_single_steps): Delete.
8781
8782 2010-03-24 Pedro Alves <pedro@codesourcery.com>
8783
8784 * mem-break.c (enum bkpt_type): New.
8785 (struct breakpoint): New field `type'.
8786 (set_breakpoint_at): Change return type to struct breakpoint
8787 pointer. Set type to `other_breakpoint' by default.
8788 (delete_breakpoint): Rewrite, supporting more than one breakpoint
8789 in the breakpoint list.
8790 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
8791 (reinsert_breakpoint): Rename to ...
8792 (reinsert_raw_breakpoint): ... this.
8793 (reinsert_breakpoints_at): Adjust.
8794 * mem-break.h (struct breakpoint): Declare.
8795 (set_breakpoint_at): Change return type to struct breakpoint
8796 pointer.
8797
8798 2010-03-24 Pedro Alves <pedro@codesourcery.com>
8799
8800 * server.c (handle_query): Assign, not compare.
8801
8802 2010-03-24 Pedro Alves <pedro@codesourcery.com>
8803
8804 Teach linux gdbserver to step-over-breakpoints.
8805
8806 * linux-low.c (can_hardware_single_step): New.
8807 (supports_breakpoints): New.
8808 (handle_extended_wait): If stopping threads, read the stop pc of
8809 the new cloned LWP.
8810 (get_pc): New.
8811 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
8812 low target doesn't support retrieving the PC.
8813 (add_lwp): Set last_resume_kind to resume_continue.
8814 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
8815 (linux_attach): Don't clear stop_expected. Set the lwp's
8816 last_resume_kind to resume_stop.
8817 (linux_detach_one_lwp): Don't check for removed breakpoints.
8818 (check_removed_breakpoint): Delete.
8819 (status_pending_p): Rename to ...
8820 (status_pending_p_callback): ... this. Don't check for removed
8821 breakpoints. Don't consider threads that are stopped from GDB's
8822 perspective.
8823 (linux_wait_for_lwp): Always read the stop_pc here.
8824 (cancel_breakpoint): New.
8825 (step_over_bkpt): New global.
8826 (linux_wait_for_event_1): Implement stepping over breakpoints.
8827 (gdb_wants_lwp_stopped): New.
8828 (gdb_wants_all_stopped): New.
8829 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
8830 single-step traps here. Store the thread's last reported target
8831 wait status.
8832 (send_sigstop): Don't clear stop_expected. Always set it,
8833 instead.
8834 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
8835 (cancel_finished_single_step): New.
8836 (cancel_finished_single_steps): New.
8837 (wait_for_sigstop): Don't cancel finished single-step traps here.
8838 (linux_resume_one_lwp): Don't check for removed breakpoints.
8839 Don't set `step' on non-hardware step archs.
8840 (linux_set_resume_request): Ignore resume_stop requests if already
8841 stopping or stopped. Set the lwp's last_resume_kind.
8842 (resume_status_pending_p): Don't check for removed breakpoints.
8843 (need_step_over_p): New.
8844 (start_step_over): New.
8845 (finish_step_over): New.
8846 (linux_resume_one_thread): Always queue a sigstop for resume_stop
8847 requests. Clear the thread's last reported target waitstatus.
8848 Don't use the `suspended' flag. Don't consider pending breakpoints.
8849 (linux_resume): Start a step-over if necessary.
8850 (proceed_one_lwp): New.
8851 (proceed_all_lwps): New.
8852 (unstop_all_lwps): New.
8853 * linux-low.h (struct lwp_info): Rewrite comment for the
8854 `suspended' flag. Add the `stop_pc' field. Delete the
8855 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
8856 Add `'last_resume_kind' and `need_step_over' fields.
8857 * inferiors.c (struct thread_info): Delete, moved elsewhere.
8858 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
8859 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
8860 (set_raw_breakpoint_at): New.
8861 (set_breakpoint_at): Rewrite to use it.
8862 (reinsert_breakpoint_handler): Delete.
8863 (set_reinsert_breakpoint): New.
8864 (reinsert_breakpoint_by_bp): Delete.
8865 (delete_reinsert_breakpoints): New.
8866 (uninsert_breakpoint): Rewrite.
8867 (uninsert_breakpoints_at): New.
8868 (reinsert_breakpoint): Rewrite.
8869 (reinsert_breakpoints_at): New.
8870 (check_breakpoints): Rewrite.
8871 (breakpoint_here): New.
8872 (breakpoint_inserted_here): New.
8873 (check_mem_read): Adjust.
8874 * mem-break.h (breakpoints_supported, breakpoint_here)
8875 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
8876 (reinsert_breakpoint_by_bp): Delete declaration.
8877 (delete_reinsert_breakpoints): Declare.
8878 (reinsert_breakpoint): Delete declaration.
8879 (reinsert_breakpoints_at): Declare.
8880 (uninsert_breakpoint): Delete declaration.
8881 (uninsert_breakpoints_at): Declare.
8882 (check_breakpoints): Adjust prototype.
8883 * server.h: Adjust include order.
8884 (struct thread_info): Declare here. Add a `last_status' field.
8885
8886 2010-03-23 Michael Snyder <msnyder@vmware.com>
8887
8888 * server.c (crc32): New function.
8889 (handle_query): Add handling for 'qCRC:' request.
8890
8891 2010-03-23 Pedro Alves <pedro@codesourcery.com>
8892
8893 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
8894 lwp had been stopped by a watchpoint.
8895
8896 2010-03-16 Pedro Alves <pedro@codesourcery.com>
8897
8898 * server.h (internal_error): Declare.
8899 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
8900 * utils.c (internal_error): New function.
8901
8902 2010-03-15 Andreas Schwab <schwab@redhat.com>
8903
8904 * configure.srv: Fix typo setting srv_regobj.
8905
8906 2010-03-15 Pedro Alves <pedro@codesourcery.com>
8907
8908 * linux-low.c (fetch_register): Avoid passing a non string literal
8909 format to `error'.
8910 (usr_store_inferior_registers): Ditto.
8911
8912 2010-03-14 Pedro Alves <pedro@codesourcery.com>
8913
8914 * linux-low.c (linux_write_memory): Bail out early if peeking
8915 memory failed.
8916
8917 2010-03-14 Pedro Alves <pedro@codesourcery.com>
8918
8919 * linux-low.h (struct lwp_info): New fields
8920 `stopped_by_watchpoint' and `stopped_data_address'.
8921 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
8922 here, and cache them in the lwp object.
8923 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
8924 directly.
8925 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
8926 field.
8927 (linux_stopped_by_watchpoint): Rewrite.
8928 (linux_stopped_data_address): Rewrite.
8929
8930 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
8931
8932 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
8933 switching the current inferior, not before.
8934
8935 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
8936
8937 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
8938 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
8939 i386-linux.c and amd64-linux.c.
8940 (reg-i386.o): Removed.
8941 (reg-i386.c): Likewise.
8942 (reg-i386-linux.o): Likewise.
8943 (reg-i386-linux.c): Likewise.
8944 (reg-x86-64.o): Likewise.
8945 (reg-x86-64.c): Likewise.
8946 (reg-x86-64-linux.o): Likewise.
8947 (reg-x86-64-linux.c): Likewise.
8948 (i386.o): New.
8949 (i386.c): Likewise.
8950 (i386-linux.o): Likewise.
8951 (i386-linux.c): Likewise.
8952 (amd64.o): Likewise.
8953 (amd64.c): Likewise.
8954 (amd64-linux.o): Likewise.
8955 (amd64-linux.c): Likewise.
8956
8957 * configure.srv (srv_i386_regobj): New.
8958 (srv_i386_linux_regobj): Likewise.
8959 (srv_amd64_regobj): Likewise.
8960 (srv_amd64_linux_regobj): Likewise.
8961 (srv_i386_32bit_xmlfiles): Likewise.
8962 (srv_i386_64bit_xmlfiles): Likewise.
8963 (srv_i386_xmlfiles): Likewise.
8964 (srv_amd64_xmlfiles): Likewise.
8965 (srv_i386_linux_xmlfiles): Likewise.
8966 (srv_amd64_linux_xmlfiles): Likewise.
8967 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
8968 srv_xmlfiles to $srv_i386_xmlfiles.
8969 (i[34567]86-*-mingw32ce*): Likewise.
8970 (i[34567]86-*-mingw*): Likewise.
8971 (i[34567]86-*-nto*): Likewise.
8972 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
8973 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
8974 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
8975 (x86_64-*-linux*): Likewise.
8976
8977 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
8978 (init_registers_amd64_linux): New.
8979 (x86_arch_setup): Replace init_registers_x86_64_linux with
8980 init_registers_amd64_linux.
8981
8982 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
8983
8984 * configure.ac: Check for libdl. If it is not available link against
8985 static libthread_db.
8986 * configure: Regenerate.
8987
8988 2010-02-22 Pedro Alves <pedro@codesourcery.com>
8989
8990 PR9605
8991
8992 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
8993 handing a read watchpoint.
8994 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
8995
8996 2010-02-12 Doug Evans <dje@google.com>
8997
8998 * linux-low.c (linux_supports_tracefork_flag): Document.
8999 (linux_look_up_symbols): Add comment.
9000
9001 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
9002
9003 * regcache.c (supply_register): Clear regcache if buf is NULL.
9004
9005 2010-02-02 Nicolas Roche <roche@sourceware.org>
9006 Joel Brobecker <brobecker@adacore.com>
9007
9008 * inferiors.c (find_inferior): Add function documentation.
9009 (unloaded_dll): Handle the case where the unloaded dll has not
9010 been previously registered in the dll list.
9011
9012 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
9013
9014 * linux-arm-low.c (thumb_breakpoint_len): Delete.
9015 (thumb2_breakpoint): New.
9016 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
9017
9018 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
9019
9020 * linux-low.c (get_stop_pc): Check for SIGTRAP.
9021 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
9022 breakpoints.
9023
9024 2010-01-21 Pedro Alves <pedro@codesourcery.com>
9025
9026 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
9027
9028 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
9029
9030 * linux-s390-low.c (s390_collect_ptrace_register)
9031 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
9032
9033 2010-01-21 Doug Evans <dje@google.com>
9034
9035 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
9036 (PTRACE_ARG4_TYPE): New macro.
9037 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
9038 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
9039 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
9040 (usr_store_inferior_registers): Ditto.
9041 (linux_read_memory, linux_write_memory): Ditto.
9042 (linux_test_for_tracefork): Ditto.
9043
9044 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
9045 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
9046
9047 2010-01-21 Pedro Alves <pedro@codesourcery.com>
9048
9049 * proc-service.c (ps_lgetregs): Don't refetch registers from the
9050 target.
9051
9052 2010-01-21 Pedro Alves <pedro@codesourcery.com>
9053
9054 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
9055 prototype to take a regcache. Adjust.
9056
9057 2010-01-20 Pedro Alves <pedro@codesourcery.com>
9058
9059 * regcache.h (struct thread_info): Forward declare.
9060 (struct regcache): New.
9061 (new_register_cache): Adjust prototype.
9062 (get_thread_regcache): Declare.
9063 (free_register_cache): Adjust prototype.
9064 (registers_to_string, registers_from_string): Ditto.
9065 (supply_register, supply_register_by_name, collect_register)
9066 (collect_register_as_string, collect_register_by_name): Ditto.
9067 * regcache.c (struct inferior_regcache_data): Delete.
9068 (get_regcache): Rename to ...
9069 (get_thread_regcache): ... this. Adjust. Switch inferior before
9070 fetching registers.
9071 (regcache_invalidate_one): Adjust.
9072 (regcache_invalidate): Fix prototype.
9073 (new_register_cache): Return the new register cache.
9074 (free_register_cache): Change prototype.
9075 (realloc_register_cache): Adjust.
9076 (registers_to_string): Change prototype to take a regcache. Adjust.
9077 (registers_from_string): Ditto.
9078 (register_data): Ditto.
9079 (supply_register): Ditto.
9080 (supply_register_by_name): Ditto.
9081 (collect_register): Ditto.
9082 (collect_register_as_string): Ditto.
9083 (collect_register_by_name): Ditto.
9084 * server.c (process_serial_event): Adjust.
9085 * linux-low.h (regset_fill_func, regset_store_func): Change
9086 prototype.
9087 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
9088 Change prototype.
9089 * linux-low.c (get_stop_pc): Adjust.
9090 (check_removed_breakpoint): Adjust.
9091 (linux_wait_for_event): Adjust.
9092 (linux_resume_one_lwp): Adjust.
9093 (fetch_register): Add regcache parameter. Adjust.
9094 (usr_store_inferior_registers): Ditto.
9095 (regsets_fetch_inferior_registers): Ditto.
9096 (regsets_store_inferior_registers): Ditto.
9097 (linux_fetch_registers, linux_store_registers): Ditto.
9098 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
9099 regcache. Adjust.
9100 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
9101 Ditto.
9102 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
9103 prototype to take a regcache.
9104 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
9105 * remote-utils.c (convert_ascii_to_int, outreg)
9106 (prepare_resume_reply): Change prototype to take a regcache.
9107 Adjust.
9108 * target.h (struct target_ops) <fetch_registers, store_registers>:
9109 Change prototype to take a regcache.
9110 (fetch_inferior_registers, store_inferior_registers): Change
9111 prototype to take a regcache. Adjust.
9112 * proc-service.c (ps_lgetregs): Adjust.
9113 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
9114 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
9115 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
9116 take a regcache. Adjust.
9117 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
9118 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
9119 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
9120 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
9121 * linux-cris-low.c (cris_get_pc, cris_set_pc)
9122 (cris_cannot_fetch_register):
9123 (cris_breakpoint_at): Change prototype to take a regcache.
9124 Adjust.
9125 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
9126 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
9127 to take a regcache. Adjust.
9128 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
9129 Adjust.
9130 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
9131 take a regcache. Adjust.
9132 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
9133 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
9134 (m68k_set_pc): Change prototype to take a regcache. Adjust.
9135 * linux-mips-low.c (mips_get_pc):
9136 (mips_set_pc): Change prototype to take a regcache. Adjust.
9137 (mips_reinsert_addr): Adjust.
9138 (mips_collect_register): Change prototype to take a regcache.
9139 Adjust.
9140 (mips_supply_register):
9141 (mips_collect_register_32bit, mips_supply_register_32bit)
9142 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
9143 (mips_store_fpregset): Ditto.
9144 * linux-ppc-low.c (ppc_supply_ptrace_register)
9145 (ppc_supply_ptrace_register): Ditto.
9146 (parse_spufs_run): Adjust.
9147 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
9148 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
9149 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
9150 take a regcache. Adjust.
9151 * linux-s390-low.c (s390_collect_ptrace_register)
9152 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
9153 (s390_set_pc): Change prototype to take a regcache. Adjust.
9154 (s390_arch_setup): Adjust.
9155 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
9156 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
9157 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
9158 (sparc_fill_gregset, sparc_store_gregset_from_stack)
9159 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
9160 regcache. Adjust.
9161 (sparc_breakpoint_at): Adjust.
9162 * linux-xtensa-low.c (xtensa_fill_gregset):
9163 (xtensa_store_gregset):
9164 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
9165 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
9166 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
9167 prototype to take a regcache. Adjust.
9168 * win32-arm-low.c (arm_fetch_inferior_register)
9169 (arm_store_inferior_register): Change prototype to take a
9170 regcache. Adjust.
9171 * win32-i386-low.c (i386_fetch_inferior_register)
9172 (i386_store_inferior_register): Change prototype to take a
9173 regcache. Adjust.
9174 * win32-low.c (child_fetch_inferior_registers)
9175 (child_store_inferior_registers): Change prototype to take a
9176 regcache. Adjust.
9177 (win32_wait): Adjust.
9178 (win32_fetch_inferior_registers): Change prototype to take a
9179 regcache. Adjust.
9180 (win32_store_inferior_registers): Adjust.
9181 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
9182 store_inferior_register>: Change prototype to take a regcache.
9183
9184 2010-01-20 Doug Evans <dje@google.com>
9185
9186 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
9187 #ifdef.
9188 (linux_wait_for_event1, linux_init_signals): Ditto.
9189 (W_STOPCODE): Provide definition if missing.
9190
9191 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
9192
9193 * linux-low.c (linux_core_of_thread): New.
9194 (compare_ints, show_process, list_threads): New.
9195 (linux_qxfer_osdata): Report threads and cores.
9196 (linux_target_op): Register linux_core_of_thread.
9197 * remote-utils.c (prepare_resume_reply): Report the core.
9198 (buffer_xml_printf): Support %d specifier.
9199 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
9200 New.
9201 (handle_query): Handle qXfer:threads. Announce availability
9202 thereof.
9203 * target.h (struct target_ops): New field core_of_thread.
9204
9205 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
9206
9207 * Makefile.in (clean): Remove new generated files.
9208 (reg-s390.o, reg-s390.c): Remove rules.
9209 (reg-s390x.o, reg-s390x.c): Likewise.
9210 (s390-linux32.o, s390-linux32.c): Add rules.
9211 (s390-linux64.o, s390-linux64.c): Likewise.
9212 (s390x-linux64.o, s390x-linux64.c): Likewise.
9213 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
9214 * linux-s390-low.c: Include <elf.h>.
9215 (HWCAP_S390_HIGH_GPRS): Define if undefined.
9216 (init_registers_s390): Remove prototype.
9217 (init_registers_s390x): Likewise.
9218 (init_registers_s390_linux32): Add prototype.
9219 (init_registers_s390_linux64): Likewise.
9220 (init_registers_s390x_linux64): Likewise.
9221 (s390_num_regs_3264): New define.
9222 (s390_regmap_3264): New global variable.
9223 (s390_cannot_fetch_register): Remove obsolete check.
9224 (s390_cannot_store_register): Likewise.
9225 (s390_collect_ptrace_register): Handle upper/lower register halves.
9226 (s390_supply_ptrace_register): Likewise.
9227 (s390_fill_gregset): Update to register number changes.
9228 (s390_get_hwcap): New routine.
9229 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
9230 Install appropriate regmap and register set.
9231
9232 2010-01-01 Joel Brobecker <brobecker@adacore.com>
9233
9234 * server.c (gdbserver_version): Update copyright year to 2010.
9235 * gdbreplay.c (gdbreplay_version): Likewise.
9236
9237 2009-12-28 Doug Evans <dje@google.com>
9238
9239 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
9240 elf/external.h. Include <elf.h> instead but only if necessary.
9241
9242 2009-12-28 Pedro Alves <pedro@codesourcery.com>
9243
9244 * linux-low.c (linux_remove_process): Remove `detaching'
9245 parameter. Don't release/detach from thread_db here.
9246 (linux_kill): Release/detach from thread_db here, ...
9247 (linux_detach): ... and here, before actually detaching.
9248 (linux_wait_1): ... and here, when a process exits.
9249 * thread-db.c (any_thread_of): New.
9250 (thread_db_free): Switch the current inferior to a thread of the
9251 passed in process.
9252
9253 2009-12-21 Doug Evans <dje@google.com>
9254
9255 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
9256
9257 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
9258 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
9259 warning ifndef __NR_tkill. Move setting of errno there too.
9260 Delete unnecessary resetting of errno after syscall.
9261 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
9262
9263 * configure.ac: Check for dladdr.
9264 * config.in: Regenerate.
9265 * configure: Regenerate.
9266 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
9267 (try_thread_db_load): Update.
9268
9269 * linux-low.c (my_waitpid): Delete unnecessary prototype.
9270
9271 2009-12-18 Doug Evans <dje@google.com>
9272
9273 * event-loop.c: Include unistd.h if it exists.
9274
9275 * linux-low.c (my_waitpid): Move definition away from being in
9276 between linux_tracefork_child/linux_test_for_tracefork.
9277
9278 * gdb_proc_service.h (psaddr_t): Fix type.
9279 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
9280 signature to match glibc.
9281
9282 2009-12-16 Doug Evans <dje@google.com>
9283
9284 * linux-low.c (linux_read_memory): Fix argument to read.
9285
9286 2009-11-26 Pedro Alves <pedro@codesourcery.com>
9287
9288 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
9289 events, don't leave current_inferior pointing at null.
9290
9291 2009-11-26 Pedro Alves <pedro@codesourcery.com>
9292
9293 * win32-low.c (LOG): Delete.
9294 (OUTMSG): Output to stderr.
9295 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
9296 on compile time LOG macro.
9297 (win32_wait): Fix debug output.
9298
9299 2009-11-26 Pedro Alves <pedro@codesourcery.com>
9300
9301 * win32-low.c (win32_add_one_solib): If the dll name is
9302 "ntdll.dll", prepend the system directory to the dll path.
9303
9304 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
9305
9306 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
9307
9308 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
9309 Vladimir Prus <vladimir@codesourcery.com>
9310
9311 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
9312 * configure.ac: Check for __mcoldfire__ and set
9313 gdb_cv_m68k_is_coldfire.
9314 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
9315 reg-cf.o and reg-m68k.o.
9316 * configure: Regenerated.
9317
9318 2009-11-16 Pedro Alves <pedro@codesourcery.com>
9319
9320 * linux-low.c (linux_remove_process): Add `detaching' parameter.
9321 Pass it to thread_db_free.
9322 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
9323 proper `detaching' argument to linux_remove_process.
9324 * linux-low.h (thread_db_free): Add `detaching' parameter.
9325 * thread-db.c (thread_db_init): Pass false as `detaching' argument
9326 to thread_db_free.
9327 (thread_db_free): Add `detaching' parameter. Only
9328 call td_ta_clear_event if detaching from process.
9329
9330 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
9331
9332 * thread-db.c (thread_db_free): Fix typo.
9333
9334 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
9335
9336 PR gdb/10838
9337 * thread-db.c (thread_db_free): Call td_ta_clear_event.
9338
9339 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
9340
9341 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
9342 with an i686 compiler.
9343 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
9344 needed.
9345 * configure: Rebuilt.
9346
9347 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
9348
9349 PR gdb/10783
9350
9351 * server.c (handle_search_memory_1): Correct read_addr initialization
9352 in loop for searching subsequent chunks.
9353
9354 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
9355
9356 * configure.ac: New --with-libthread-db option.
9357 * thread-db.c: Allow direct dependence on libthread_db.
9358 (thread_db_free): Adjust.
9359 * config.in: Regenerate.
9360 * configure: Likewise.
9361
9362 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
9363
9364 PR gdb/10757
9365 * thread-db.c (attach_thread): New function.
9366 (maybe_attach_thread): Return success/failure.
9367 (find_new_threads_callback): Adjust.
9368 (thread_db_find_new_threads): Loop until no new threads.
9369
9370 2009-10-13 Pedro Alves <pedro@codesourcery.com>
9371
9372 * proc-service.c (ps_lgetregs): Formatting.
9373
9374 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
9375
9376 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
9377 * configure.ac: Adjust.
9378 * linux-low.h (struct process_info_private): Move members to struct
9379 thread_db.
9380 (thread_db_free, thread_db_handle_monitor_command): New prototype.
9381 * linux-low.c (linux_remove_process): Adjust.
9382 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
9383 * server.c (handle_query): Move code ...
9384 (handle_monitor_command): ... here. New function.
9385 * target.h (struct target_ops): New member.
9386 * thread-db.c (struct thread_db): New.
9387 (libthread_db_search_path): New variable.
9388 (thread_db_create_event, thread_db_enable_reporting)
9389 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
9390 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
9391 (try_thread_db_load_1, dladdr_to_soname): New functions.
9392 (try_thread_db_load, thread_db_load_search): New functions.
9393 (thread_db_init): Search for libthread_db.
9394 (thread_db_free): New function.
9395 (thread_db_handle_monitor_command): Likewise.
9396 * config.in: Regenerate.
9397 * configure: Regenerate.
9398
9399 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
9400
9401 * spu-low.c (spu_kill): Wait for inferior to terminate.
9402 Call clear_inferiors.
9403 (spu_detach): Call clear_inferiors.
9404
9405 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9406
9407 * aclocal.m4: Regenerate.
9408 * config.in: Likewise.
9409 * configure: Likewise.
9410
9411 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9412
9413 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
9414 (parse_spufs_run): New function.
9415 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
9416 (ppc_breakpoint_at): Handle SPU breakpoints.
9417
9418 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9419
9420 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
9421 (SPUFS_MAGIC): Define.
9422 (spu_enumerate_spu_ids): New function.
9423 (linux_qxfer_spu): New function.
9424 (linux_target_ops): Install linux_qxfer_spu.
9425
9426 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9427
9428 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
9429 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
9430 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
9431 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
9432 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
9433 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
9434 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
9435 (init_registers_powerpc_cell32l): Add prototype.
9436 (init_registers_powerpc_cell64l): Likewise.
9437 (ppc_arch_setup): Detect Cell/B.E. architecture.
9438
9439 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9440
9441 * Makefile.in (datarootdir): New variable.
9442
9443 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
9444
9445 * linux-low.c (linux_write_memory): Update debugging output.
9446 * Makefile.in (clean): Add new descriptions.
9447 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
9448 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
9449 * configure.srv: Add new files for arm*-*-linux*.
9450 * linux-arm-low.c: Add new declarations.
9451 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
9452 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
9453 (HWCAP_VFPv3D16): New.
9454 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
9455 instead of __IWMMXT__.
9456 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
9457 (arm_arch_setup): New.
9458 (target_regsets): Remove #ifdef. Add VFP regset.
9459 (the_low_target): Use arm_arch_setup.
9460
9461 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
9462
9463 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
9464 the main thread again.
9465
9466 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
9467
9468 Adding Neutrino gdbserver.
9469 * configure: Regenerated.
9470 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
9471 * configure.srv (i[34567]86-*-nto*): New target.
9472 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
9473 * remote-utils.c [__QNX__]: Include sys/iomgr.h
9474 (nto_comctrl) [__QNX__]: New function.
9475 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
9476
9477 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
9478
9479 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
9480 srv_tgtobj.
9481
9482 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
9483 Pedro Alves <pedro@codesourcery.com>
9484
9485 * win32-i386-low.c (i386_get_thread_context): Handle systems that
9486 don't support CONTEXT_EXTENDED_REGISTERS.
9487 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
9488 (the_low_target): Install them.
9489 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
9490 failing with ERROR_PIPE_NOT_CONNECTED.
9491
9492 2009-06-30 Doug Evans <dje@google.com>
9493 Pierre Muller <muller@ics.u-strasbg.fr>
9494
9495 Add h/w watchpoint support to x86-linux, win32-i386.
9496 * Makefile.in (SFILES): Add i386-low.c
9497 (i386_low_h): Define.
9498 (i386-low.o): Add dependencies.
9499 (linux-x86-low.o): Add i386-low.h dependency.
9500 (win32-i386-low.o): Ditto.
9501 * i386-low.c: New file.
9502 * i386-low.h: New file.
9503 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
9504 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
9505 * linux-low.c (linux_add_process): Initialize arch_private.
9506 (linux_remove_process): Free arch_private.
9507 (add_lwp): Initialize arch_private.
9508 (delete_lwp): Free arch_private.
9509 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
9510 provided.
9511 * linux-low.h (process_info_private): New member arch_private.
9512 (lwp_info): New member arch_private.
9513 (linux_target_ops): New members new_process, new_thread,
9514 prepare_to_resume.
9515 (ptid_of): New macro.
9516 * linux-x86-low.c: Include stddef.h, i386-low.h.
9517 (arch_process_info): New struct.
9518 (arch_lwp_info): New struct.
9519 (x86_linux_dr_get, x86_linux_dr_set): New functions.
9520 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
9521 (i386_dr_low_get_status): New function.
9522 (x86_insert_point, x86_remove_point): New functions.
9523 (x86_stopped_by_watchpoint): New function.
9524 (x86_stopped_data_address): New function.
9525 (x86_linux_new_process, x86_linux_new_thread): New functions.
9526 (x86_linux_prepare_to_resume): New function.
9527 (the_low_target): Add entries for insert_point, remove_point,
9528 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
9529 prepare_to_resume.
9530 * server.c (debug_hw_points): New global.
9531 (monitor_show_help): Document set debug-hw-points.
9532 (handle_query): Process "set debug-hw-points".
9533 * server.h (debug_hw_points): Declare.
9534 (paddress): Declare.
9535 * utils.c (NUMCELLS, CELLSIZE): New macros.
9536 (get_sell, xsnprintf, paddress): New functions.
9537 * win32-arm-low.c (the_low_target): Add entries for insert_point,
9538 remove_point, stopped_by_watchpoint, stopped_data_address.
9539 * win32-i386-low.c: Include i386-low.h.
9540 (debug_reg_state): Replaces dr.
9541 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
9542 (i386_dr_low_get_status): New function.
9543 (i386_insert_point, i386_remove_point): New functions.
9544 (i386_stopped_by_watchpoint): New function.
9545 (i386_stopped_data_address): New function.
9546 (i386_initial_stuff): Update.
9547 (get_thread_context,set_thread_context,i386_thread_added): Update.
9548 (the_low_target): Add entries for insert_point,
9549 remove_point, stopped_by_watchpoint, stopped_data_address.
9550 * win32-low.c (win32_insert_watchpoint): New function.
9551 (win32_remove_watchpoint): New function.
9552 (win32_stopped_by_watchpoint): New function.
9553 (win32_stopped_data_address): New function.
9554 (win32_target_ops): Add entries for insert_watchpoint,
9555 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
9556 * win32-low.h (win32_target_ops): New members insert_point,
9557 remove_point, stopped_by_watchpoint, stopped_data_address.
9558
9559 2009-06-25 Pedro Alves <pedro@codesourcery.com>
9560
9561 * server.c (process_serial_event): Re-return unsupported, not
9562 error, if the type isn't recognized. Re-allow supporting only
9563 insert or remove packets. Also call require_running for
9564 breakpoints. Add missing break statement to default case. Tidy.
9565 * target.h (struct target_ops): Rename insert_watchpoint to
9566 insert_point, and remove_watchpoint to remove_point.
9567
9568 * linux-low.h (struct linux_target_ops): Likewise.
9569 * linux-low.c (linux_insert_watchpoint): Rename to ...
9570 (linux_insert_point): ... this. Adjust.
9571 (linux_remove_watchpoint): Rename to ...
9572 (linux_remove_point): ... this. Adjust.
9573 (linux_target_ops): Adjust.
9574 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
9575 (cris_insert_point): ... this.
9576 (cris_remove_watchpoint): Rename to ...
9577 (cris_remove_point): ... this.
9578 (the_low_target): Adjust.
9579
9580 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
9581
9582 * server.c (handle_v_kill): Pass signal_pid to
9583 kill_inferior if multi_process is zero.
9584
9585 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
9586
9587 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
9588 * target.h (target_ops): Comment for *_watchpoint to make it clear
9589 the functions can get types '0' and '1'.
9590
9591 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
9592
9593 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
9594 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
9595 * regcache.c (get_regcache): Likewise.
9596 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
9597 * win32-low.c (child_fetch_inferior_registers): Remove check for
9598 regno 0.
9599
9600 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
9601 Pedro Alves <pedro@codesourcery.com>
9602
9603 * target.h (struct target_ops) <supports_multi_process>: New
9604 callback.
9605 (target_supports_multi_process): New.
9606 * server.c (handle_query): Even if GDB reports support, only
9607 enable multi-process if the target also supports it. Report
9608 multi-process support only if the target backend supports it.
9609 * linux-low.c (linux_supports_multi_process): New function.
9610 (linux_target_ops): Install it as target_supports_multi_process
9611 callback.
9612
9613 2009-05-24 Doug Evans <dje@google.com>
9614
9615 Global renaming of find_thread_pid to find_thread_ptid.
9616 * server.h (find_thread_ptid): Renamed from find_thread_pid.
9617 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
9618 All callers updated.
9619
9620 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
9621 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
9622 directly.
9623
9624 * linux-low.c (get_stop_pc): Print pc if debug_threads.
9625 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
9626 (linux_resume_one_lwp): Ditto.
9627
9628 2009-05-23 Doug Evans <dje@google.com>
9629
9630 * linux-low.c (linux_resume_one_lwp): Change type of first arg
9631 from struct inferior_list_entry * to struct lwp_info *.
9632 All callers updated.
9633
9634 2009-05-13 Doug Evans <dje@google.com>
9635
9636 * linux-x86-low.c: Don't include assert.h.
9637 (x86_siginfo_fixup): Use fatal, not assert.
9638 (x86_arch_setup): Fix comment.
9639
9640 2009-05-12 Doug Evans <dje@google.com>
9641
9642 Biarch support for i386/amd64 gdbserver.
9643 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
9644 Add linux-x86-low.c.
9645 (linux-i386-low.o, linux-x86-64-low.o): Delete.
9646 (linux-x86-low.o): Add.
9647 * linux-x86-64-low.c: Delete.
9648 * linux-i386-low.c: Delete.
9649 * linux-x86-low.c: New file.
9650 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
9651 linux-x86-low.o.
9652 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
9653 linux-x86-low.o.
9654 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
9655 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
9656 (linux_child_pid_to_exec_file): New function.
9657 (elf_64_header_p, elf_64_file_p): New functions.
9658 (siginfo_fixup): New function.
9659 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
9660 give target a chance to convert layout.
9661 * linux-low.h (linux_target_ops): New member siginfo_fixup.
9662 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
9663
9664 2009-05-07 Doug Evans <dje@google.com>
9665
9666 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
9667 (regsets_store_inferior_registers): Ditto.
9668
9669 2009-05-06 Pedro Alves <pedro@codesourcery.com>
9670
9671 PR server/10048
9672
9673 * linux-low.c (must_set_ptrace_flags): Delete.
9674 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
9675 of the global.
9676 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
9677 `lwp->must_set_ptrace_flags' instead.
9678 (linux_wait_for_event_1): Set ptrace options here.
9679 (linux_wait_1): ... not here.
9680
9681 2009-04-30 Doug Evans <dje@google.com>
9682
9683 * inferiors.c (started_inferior_callback): New function.
9684 (attached_inferior_callback): New function.
9685 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
9686 * server.c (print_started_pid, print_attached_pid): New functions.
9687 (detach_or_kill_for_exit): New function.
9688 (main): Call it instead of for_each_inferior (kill_inferior_callback).
9689 * server.h (have_started_inferiors_p): Declare.
9690 (have_attached_inferiors_p): Declare.
9691
9692 * inferiors.c (remove_process): Fix memory leak, free process.
9693 * linux-low.c (linux_remove_process): New function.
9694 (linux_kill): Call it instead of remove_process.
9695 (linux_detach, linux_wait_1): Ditto.
9696
9697 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
9698
9699 * configure.srv: Add x86 Windows CE target.
9700
9701 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
9702
9703 * inferiors.c (get_thread_process): Make global.
9704 * server.h (get_thread_process): Add prototype.
9705 * thread-db.c (find_one_thread): Use get_thread_process
9706 instead of current_process.
9707 (thread_db_get_tls_address): Do not crash if called when
9708 thread layer is not yet initialized.
9709
9710 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
9711
9712 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
9713 * spu-low.c (current_tid): Rename to ...
9714 (current_ptid): ... this.
9715 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
9716 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
9717 ptid_get_lwp (current_ptid) instead of current_tid.
9718 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
9719 instead of current_tid. Use find_process_pid to verify pid
9720 argument is valid. Pass proper argument to remove_process.
9721 (spu_thread_alive): Compare current_ptid instead of current_tid.
9722 (spu_resume): Likewise.
9723
9724 2009-04-02 Pedro Alves <pedro@codesourcery.com>
9725
9726 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
9727 variable.
9728
9729 2009-04-01 Pedro Alves <pedro@codesourcery.com>
9730
9731 Implement the multiprocess extensions, and add linux multiprocess
9732 support.
9733
9734 * server.h (ULONGEST): Declare.
9735 (struct ptid, ptid_t): New.
9736 (minus_one_ptid, null_ptid): Declare.
9737 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
9738 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
9739 (struct inferior_list_entry): Change `id' type from unsigned from
9740 to ptid_t.
9741 (struct sym_cache, struct breakpoint, struct
9742 process_info_private): Forward declare.
9743 (struct process_info): Declare.
9744 (current_process): Declare.
9745 (all_processes): Declare.
9746 (initialize_inferiors): Declare.
9747 (add_thread): Adjust to use ptid_t.
9748 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
9749 (add_process, remove_process, find_thread_pid): Declare.
9750 (find_inferior_id): Adjust to use ptid_t.
9751 (cont_thread, general_thread, step_thread): Change type to ptid_t.
9752 (multi_process): Declare.
9753 (push_event): Adjust to use ptid_t.
9754 (read_ptid, write_ptid): Declare.
9755 (prepare_resume_reply): Adjust to use ptid_t.
9756 (clear_symbol_cache): Declare.
9757 * inferiors.c (all_processes): New.
9758 (null_ptid, minus_one_ptid): New.
9759 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
9760 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
9761 (add_thread): Change unsigned long to ptid. Remove gdb_id
9762 parameter. Adjust.
9763 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
9764 (gdb_id_to_thread): Rename to ...
9765 (find_thread_pid): ... this. Change unsigned long to ptid.
9766 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
9767 (loaded_dll, pull_pid_from_list): Adjust.
9768 (add_process, remove_process, find_process_pid)
9769 (get_thread_process, current_process, initialize_inferiors): New.
9770 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
9771 (struct target_waitstatus) <related_pid>: Ditto.
9772 (struct target_ops) <kill, detach>: Add `pid' argument. Change
9773 return type to int.
9774 (struct target_ops) <join>: Add `pid' argument.
9775 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
9776 (struct target_ops) <wait>: Add `ptid' field. Change return type
9777 to ptid.
9778 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
9779 (mywait): Add `ptid' argument. Change return type to ptid_t.
9780 (target_pid_to_str): Declare.
9781 * target.c (set_desired_inferior): Adjust to use ptids.
9782 (mywait): Add new `ptid' argument. Adjust.
9783 (target_pid_to_str): New.
9784 * mem-break.h (free_all_breakpoints): Declare.
9785 * mem-break.c (breakpoints): Delelete.
9786 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
9787 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
9788 to use per-process breakpoint list.
9789 (free_all_breakpoints): New.
9790 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
9791 (symbol_cache, all_symbols_looked_up): Delete.
9792 (hexchars): New.
9793 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
9794 read_ptid): New.
9795 (prepare_resume_reply): Change ptid argument's type from unsigned
9796 long to ptid_t. Adjust. Implement W;process and X;process.
9797 (free_sym_cache, clear_symbol_cache): New.
9798 (look_up_one_symbol): Adjust to per-process symbol cache. *
9799 * server.c (cont_thread, general_thread, step_thread): Change type
9800 to ptid_t.
9801 (attached): Delete.
9802 (multi_process): New.
9803 (last_ptid): Change type to ptid_t.
9804 (struct vstop_notif) <ptid>: Change type to ptid_t.
9805 (queue_stop_reply, push_event): Change `ptid' argument's type to
9806 ptid_t.
9807 (discard_queued_stop_replies): Add `pid' argument.
9808 (start_inferior): Adjust to use ptids. Adjust to mywait interface
9809 changes. Don't reference the `attached' global.
9810 (attach_inferior): Adjust to mywait interface changes.
9811 (handle_query): Adjust to use ptids. Parse GDB's qSupported
9812 features. Handle and report "multiprocess+". Handle
9813 "qAttached:PID".
9814 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
9815 changes.
9816 (handle_v_kill): New.
9817 (handle_v_stopped): Adjust to use target_pid_to_str.
9818 (handle_v_requests): Allow multiple attaches and runs when
9819 multiprocess extensions are in effect. Handle "vKill".
9820 (myresume): Adjust to use ptids.
9821 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
9822 (handle_status): Adjust to discard_queued_stop_replies interface
9823 change.
9824 (first_thread_of, kill_inferior_callback)
9825 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
9826 (main): Call initialize_inferiors. Adjust to use ptids, killing
9827 and detaching from all inferiors. Handle multiprocess packet
9828 variants.
9829 * linux-low.h: Include gdb_proc_service.h.
9830 (struct process_info_private): New.
9831 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
9832 <lwpid_of>: Use ptid_get_lwp.
9833 (get_lwp_thread): Adjust.
9834 (struct lwp_info): Add `dead' member.
9835 (find_lwp_pid): Declare.
9836 * linux-low.c (thread_db_active): Delete.
9837 (new_inferior): Adjust comment.
9838 (inferior_pid): Delete.
9839 (linux_add_process): New.
9840 (handle_extended_wait): Adjust.
9841 (add_lwp): Change unsigned long to ptid.
9842 (linux_create_inferior): Add process to processes table. Adjust
9843 to use ptids. Don't set new_inferior here.
9844 (linux_attach_lwp): Rename to ...
9845 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
9846 it. Adjust to use ptids.
9847 (linux_attach_lwp): New.
9848 (linux_attach): Add process to processes table. Don't set
9849 new_inferior here.
9850 (struct counter): New.
9851 (second_thread_of_pid_p, last_thread_of_process_p): New.
9852 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
9853 multiple processes.
9854 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
9855 processes. Remove process from process table.
9856 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
9857 to multiple processes.
9858 (any_thread_of): New.
9859 (linux_detach): Add `pid' argument, and handle it. Remove process
9860 from processes table.
9861 (linux_join): Add `pid' argument. Handle it.
9862 (linux_thread_alive): Change unsighed long argument to ptid_t.
9863 Consider dead lwps as not being alive.
9864 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
9865 threads we're not interested in.
9866 (same_lwp, find_lwp_pid): New.
9867 (linux_wait_for_lwp): Change `pid' argument's type from int to
9868 ptid_t. Adjust.
9869 (linux_wait_for_event): Rename to ...
9870 (linux_wait_for_event_1): ... this. Change `pid' argument's type
9871 from int to ptid_t. Adjust.
9872 (linux_wait_for_event): New.
9873 (linux_wait_1): Add `ptid' argument. Change return type to
9874 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
9875 that exit from the process table.
9876 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
9877 Adjust.
9878 (mark_lwp_dead): New.
9879 (wait_for_sigstop): Adjust to use ptids. If a process exits while
9880 stopping all threads, mark its main lwp as dead.
9881 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
9882 ptids.
9883 (fetch_register, usr_store_inferior_registers)
9884 (regsets_fetch_inferior_registers)
9885 (regsets_store_inferior_registers, linux_read_memory)
9886 (linux_write_memory): Inline `inferior_pid'.
9887 (linux_look_up_symbols): Adjust to use per-process
9888 `thread_db_active'.
9889 (linux_request_interrupt): Adjust to use ptids.
9890 (linux_read_auxv): Inline `inferior_pid'.
9891 (initialize_low): Don't reference thread_db_active.
9892 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
9893 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
9894 (ps_getpid): Return the pid of the current inferior.
9895 * thread-db.c (proc_handle, thread_agent): Delete.
9896 (thread_db_create_event, thread_db_enable_reporting): Adjust to
9897 per-process data.
9898 (find_one_thread): Change argument type to ptid_t. Adjust to
9899 per-process data.
9900 (maybe_attach_thread): Adjust to per-process data and ptids.
9901 (thread_db_find_new_threads): Ditto.
9902 (thread_db_init): Ditto.
9903 * spu-low.c (spu_create_inferior, spu_attach): Add process to
9904 processes table. Adjust to use ptids.
9905 (spu_kill, spu_detach): Adjust interface. Remove process from
9906 processes table.
9907 (spu_join, spu_thread_alive): Adjust interface.
9908 (spu_wait): Adjust interface. Remove process from processes
9909 table. Adjust to use ptids.
9910 * win32-low.c (current_inferior_tid): Delete.
9911 (current_inferior_ptid): New.
9912 (debug_event_ptid): New.
9913 (thread_rec): Take a ptid. Adjust.
9914 (child_add_thread): Add `pid' argument. Adjust to use ptids.
9915 (child_delete_thread): Ditto.
9916 (do_initial_child_stuff): Add `attached' argument. Add process to
9917 processes table.
9918 (child_fetch_inferior_registers, child_store_inferior_registers):
9919 Adjust.
9920 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
9921 (win32_attach): Pass 1 to do_initial_child_stuff.
9922 (win32_kill): Adjust interface. Remove process from processes
9923 table.
9924 (win32_detach): Ditto.
9925 (win32_join): Adjust interface.
9926 (win32_thread_alive): Take a ptid.
9927 (win32_resume): Adjust to use ptids.
9928 (get_child_debug_event): Ditto.
9929 (win32_wait): Adjust interface. Remove exiting process from
9930 processes table.
9931
9932 2009-04-01 Pedro Alves <pedro@codesourcery.com>
9933
9934 Non-stop mode support.
9935
9936 * server.h (non_stop): Declare.
9937 (gdb_client_data, handler_func): Declare.
9938 (delete_file_handler, add_file_handler, start_event_loop):
9939 Declare.
9940 (handle_serial_event, handle_target_event, push_event)
9941 (putpkt_notif): Declare.
9942 * target.h (enum resume_kind): New.
9943 (struct thread_resume): Replace `step' field by `kind' field.
9944 (TARGET_WNOHANG): Define.
9945 (struct target_ops) <wait>: Add `options' argument.
9946 <supports_non_stop, async, start_non_stop>: New fields.
9947 (target_supports_non_stop, target_async): New.
9948 (start_non_stop): Declare.
9949 (mywait): Add `options' argument.
9950 * target.c (mywait): Add `options' argument. Print child exit
9951 notifications here.
9952 (start_non_stop): New.
9953 * server.c (non_stop, own_buf, mem_buf): New globals.
9954 (struct vstop_notif): New.
9955 (notif_queue): New global.
9956 (queue_stop_reply, push_event, discard_queued_stop_replies)
9957 (send_next_stop_reply): New.
9958 (start_inferior): Adjust to use resume_kind. Adjust to mywait
9959 interface changes.
9960 (attach_inferior): In non-stop mode, don't wait for the target
9961 here.
9962 (handle_general_set): Handle QNonStop.
9963 (handle_query): When handling qC, return the current general
9964 thread, instead of the first thread of the list.
9965 (handle_query): If the backend supports non-stop mode, include
9966 QNonStop+ in the qSupported query response.
9967 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
9968 and non-stop mode.
9969 (handle_v_attach, handle_v_run): Handle non-stop mode.
9970 (handle_v_stopped): New.
9971 (handle_v_requests): Report support for vCont;t. Handle vStopped.
9972 (myresume): Adjust to use resume_kind. Handle non-stop.
9973 (queue_stop_reply_callback): New.
9974 (handle_status): Handle non-stop mode.
9975 (main): Clear non_stop flag on reconnection. Use the event-loop.
9976 Refactor serial protocol handling from here ...
9977 (process_serial_event): ... to this new function. When GDB
9978 selects any thread, select one here. In non-stop mode, wait until
9979 GDB acks all pending events before exiting.
9980 (handle_serial_event, handle_target_event): New.
9981 * remote-utils.c (remote_open): Install remote_desc in the event
9982 loop.
9983 (remote_close): Remove remote_desc from the event loop.
9984 (putpkt_binary): Rename to...
9985 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
9986 (putpkt_binary): New as wrapper around putpkt_binary_1.
9987 (putpkt_notif): New.
9988 (prepare_resume_reply): In non-stop mode, don't change the
9989 general_thread.
9990 * event-loop.c: New.
9991 * Makefile.in (OBJ): Add event-loop.o.
9992 (event-loop.o): New rule.
9993
9994 * linux-low.h (pid_of): Moved here.
9995 (lwpid_of): New.
9996 (get_lwp_thread): Use lwpid_of.
9997 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
9998 * linux-low.c (pid_of): Delete.
9999 (inferior_pid): Use lwpid_of.
10000 (linux_event_pipe): New.
10001 (target_is_async_p): New.
10002 (delete_lwp): New.
10003 (handle_extended_wait): Use lwpid_of.
10004 (add_lwp): Don't set lwpid field.
10005 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
10006 (linux_kill_one_lwp): If killing a running lwp, stop it first.
10007 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
10008 (linux_detach_one_lwp): If detaching from a running lwp, stop it
10009 first. Adjust to linux_wait_for_event interface changes. Use
10010 lwpid_of.
10011 (linux_detach): Don't delete the main lwp here.
10012 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
10013 (status_pending_p): Don't consider explicitly suspended lwps.
10014 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
10015 pointer. Add OPTIONS argument. Change return type to int. Use
10016 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
10017 (linux_wait_for_event): Take an integer pid instead of a lwp_info
10018 pointer. Add status pointer argument. Return a pid instead of a
10019 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
10020 changes. In non-stop mode, don't switch to a random thread.
10021 (linux_wait): Rename to...
10022 (linux_wait_1): ... this. Add target_options argument, and handle
10023 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
10024 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
10025 clean exit and signal exit code. Don't stop all threads in
10026 non-stop mode. In all-stop mode, only stop all threads when
10027 reporting a stop to GDB. Handle explicit thread stop requests.
10028 (async_file_flush, async_file_mark): New.
10029 (linux_wait): New.
10030 (send_sigstop): Use lwpid_of.
10031 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
10032 interface changes. In non-stop mode, don't switch to a random
10033 thread.
10034 (linux_resume_one_lwp): Use lwpid_of.
10035 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
10036 (linux_resume_one_thread): ... this. Handle resume_stop. In
10037 non-stop mode, don't look for pending flag in all threads.
10038 (resume_status_pending_p): Don't consider explicitly suspended
10039 threads.
10040 (my_waitpid): Reimplement. Emulate __WALL.
10041 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
10042 Use lwpid_of.
10043 (sigchld_handler, linux_supports_non_stop, linux_async)
10044 (linux_start_non_stop): New.
10045 (linux_target_ops): Register linux_supports_non_stop, linux_async
10046 and linux_start_non_stop.
10047 (initialize_low): Install SIGCHLD handler.
10048 * thread-db.c (thread_db_create_event, find_one_thread)
10049 (thread_db_get_tls_address): Use lwpid_of.
10050 * win32-low.c (win32_detach): Adjust to use resume_kind.
10051 (win32_wait): Add `options' argument.
10052 * spu-low.c (spu_resume): Adjust to use resume_kind.
10053 (spu_wait): Add `options' argument.
10054
10055 2009-04-01 Pedro Alves <pedro@codesourcery.com>
10056
10057 Decouple target code from remote protocol.
10058
10059 * target.h (enum target_waitkind): New.
10060 (struct target_waitstatus): New.
10061 (struct target_ops) <wait>: Return an unsigned long. Take a
10062 target_waitstatus pointer instead of a char pointer.
10063 (mywait): Likewise.
10064 * target.c (mywait): Change prototype to return an unsigned long.
10065 Take a target_waitstatus pointer instead of a char pointer. Adjust.
10066 * server.h (thread_from_wait, old_thread_from_wait): Delete
10067 declarations.
10068 (prepare_resume_reply): Change prototype to take a
10069 target_waitstatus.
10070 * server.c (thread_from_wait, old_thread_from_wait): Delete.
10071 (last_status, last_ptid): New.
10072 (start_inferior): Remove "statusptr" argument. Adjust. Return a
10073 pid instead of a signal.
10074 (attach_inferior): Remove "status" and "signal" parameters.
10075 Adjust.
10076 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
10077 not as an address.
10078 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
10079 (handle_v_requests, myresume): Remove "status" and "signal"
10080 parameters. Adjust.
10081 (handle_status): New.
10082 (main): Delete local `status'. Adjust.
10083 * remote-utils.c: Include target.h.
10084 (prepare_resume_reply): Change prototype to take a
10085 target_waitstatus. Adjust.
10086
10087 * linux-low.c (linux_wait): Adjust to new target_ops->wait
10088 interface.
10089 * spu-low.c (spu_wait): Adjust.
10090 * win32-low.c (enum target_waitkind, struct target_waitstatus):
10091 Delete.
10092 (win32_wait): Adjust.
10093
10094 2009-04-01 Pedro Alves <pedro@codesourcery.com>
10095
10096 * target.h (struct thread_resume): Delete leave_stopped member.
10097 (struct target_ops): Add a `n' argument to the `resume' callback.
10098 * server.c (start_inferior): Adjust.
10099 (handle_v_cont, myresume): Adjust.
10100 * linux-low.c (check_removed_breakpoint): Adjust to resume
10101 interface change, and to removed leave_stopped field.
10102 (resume_ptr): Delete.
10103 (struct thread_resume_array): New.
10104 (linux_set_resume_request): Add new `arg' parameter. Adjust to
10105 resume interface change.
10106 (linux_continue_one_thread, linux_queue_one_thread)
10107 (resume_status_pending_p): Check if the resume field is NULL
10108 instead of checking the leave_stopped member.
10109 (linux_resume): Adjust to the target resume interface change.
10110 * spu-low.c (spu_resume): Adjust to the target resume interface
10111 change.
10112 * win32-low.c (win32_detach, win32_resume): Ditto.
10113
10114 2009-04-01 Pedro Alves <pedro@codesourcery.com>
10115
10116 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
10117 flag.
10118 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
10119 pending.
10120 (linux_continue_one_thread): Only preserve the stepping flag if
10121 there's a pending breakpoint.
10122
10123 2009-03-31 Pedro Alves <pedro@codesourcery.com>
10124
10125 * server.c (main): After the inferior having exited, call
10126 remote_close before exiting gdbserver.
10127
10128 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
10129
10130 Fix size of FPSCR in Power 7 processors.
10131 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
10132 (PPC_FEATURE_HAS_DFP): New #define.
10133 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
10134 size of the FPSCR.
10135
10136 2009-03-23 Pedro Alves <pedro@codesourcery.com>
10137
10138 * server.c (handle_query) Whitespace and formatting.
10139
10140 2009-03-22 Pedro Alves <pedro@codesourcery.com>
10141
10142 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
10143 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
10144 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
10145 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
10146 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
10147 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
10148 Makefile.in, configure.ac: Fix whitespace throughout.
10149 * configure: Regenerate.
10150
10151 2009-03-22 Pedro Alves <pedro@codesourcery.com>
10152
10153 * inferiors.c (find_inferior): Make it safe for the callback
10154 function to delete the currently iterated inferior.
10155
10156 2009-03-22 Pedro Alves <pedro@codesourcery.com>
10157
10158 * Makefile.in (linuw_low_h): Move higher.
10159 (thread-db.o): Depend on $(linux_low_h).
10160
10161 2009-03-17 Pedro Alves <pedro@codesourcery.com>
10162
10163 Rename "process" to "lwp" throughout.
10164
10165 * linux-low.c (all_processes): Rename to...
10166 (all_lwps): ... this.
10167 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
10168 (add_process): Rename to ...
10169 (add_lwp): ... this. Adjust.
10170 (linux_create_inferior): Adjust.
10171 (linux_attach_lwp): Adjust.
10172 (linux_attach): Adjust.
10173 (linux_kill_one_process): Rename to ...
10174 (linux_kill_one_lwp): ... this. Adjust.
10175 (linux_kill): Adjust.
10176 (linux_detach_one_process): Rename to ...
10177 (linux_detach_one_lwp): ... this. Adjust.
10178 (linux_detach): Adjust.
10179 (check_removed_breakpoint): Adjust.
10180 (status_pending_p): Adjust.
10181 (linux_wait_for_process): Rename to ...
10182 (linux_wait_for_lwp): ... this. Adjust.
10183 (linux_wait_for_event): Adjust.
10184 (send_sigstop): Adjust.
10185 (wait_for_sigstop): Adjust.
10186 (stop_all_processes): Rename to ...
10187 (stop_all_lwps): ... this.
10188 (linux_resume_one_process): Rename to ...
10189 (linux_resume_one_lwp): ... this. Adjust.
10190 (linux_set_resume_request, linux_continue_one_thread)
10191 (linux_queue_one_thread, resume_status_pending_p)
10192 (usr_store_inferior_registers, regsets_store_inferior_registers)
10193 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
10194 Adjust.
10195 * linux-low.h (get_process): Rename to ...
10196 (get_lwp): ... this. Adjust.
10197 (get_thread_process): Rename to ...
10198 (get_thread_lwp): ... this. Adjust.
10199 (get_process_thread): Rename to ...
10200 (get_lwp_thread): ... this. Adjust.
10201 (struct process_info): Rename to ...
10202 (struct lwp_info): ... this.
10203 (all_processes): Rename to ...
10204 (all_lwps): ... this.
10205 * proc-service.c (ps_lgetregs): Adjust.
10206 * thread-db.c (thread_db_create_event, find_one_thread)
10207 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
10208
10209 2009-03-14 Pedro Alves <pedro@codesourcery.com>
10210
10211 * server.c (handle_query): Handle "qAttached".
10212
10213 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
10214
10215 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
10216 GPLv3, update license URL.
10217
10218 2009-03-01 Doug Evans <dje@google.com>
10219
10220 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
10221 (server_h): Add gdb_signals.h.
10222 (signals.o): Update.
10223 * server.h (target_signal_from_host,target_signal_to_host_p)
10224 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
10225
10226 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
10227
10228 * remote-utils.c (getpkt): Also generate remote-debug
10229 information if noack_mode is set.
10230
10231 2009-02-06 Pedro Alves <pedro@codesourcery.com>
10232
10233 * server.c (handle_query): Report qXfer:siginfo:read and
10234 qXfer:siginfo:write as supported and handle them.
10235 * target.h (struct target_ops) <qxfer_siginfo>: New field.
10236 * linux-low.c (linux_xfer_siginfo): New.
10237 (linux_target_ops): Set it.
10238
10239 2009-01-26 Pedro Alves <pedro@codesourcery.com>
10240
10241 * server.c (gdbserver_usage): Mention --remote-debug.
10242 (main): Accept '--remote-debug' switch.
10243
10244 2009-01-18 Doug Evans <dje@google.com>
10245
10246 * regcache.c (new_register_cache): No need to check result of xcalloc.
10247 * server.c (handle_search_memory): Back out calls to xmalloc,
10248 result is checked and error is returned to user upon failure.
10249 (handle_query): Ditto. Add more checks for result of malloc.
10250 (handle_v_cont): Check result of malloc, report error back to
10251 user upon failure.
10252 (handle_v_run): Ditto. Call freeargv.
10253 * server.h (freeargv): Declare.
10254 * utils.c (freeargv): New fn.
10255
10256 2009-01-15 Doug Evans <dje@google.com>
10257
10258 * gdbreplay.c (perror_with_name): Make arg const char *.
10259 * server.h (target_signal_to_name): Make return type const char *.
10260 * thread-db.c (thread_db_err_str): Make return type const char *.
10261 * utils.c (perror_with_name): Make arg const char *.
10262
10263 2009-01-14 Pedro Alves <pedro@codesourcery.com>
10264
10265 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
10266 when handling a EXIT_PROCESS_DEBUG_EVENT.
10267
10268 2009-01-06 Joel Brobecker <brobecker@adacore.com>
10269
10270 * gdbreplay.c (gdbreplay_version): Update copyright year.
10271 * server.c (gdbserver_version): Likewise.
10272
10273 2009-01-05 Doug Evans <dje@google.com>
10274
10275 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
10276 (handle_extended_wait): Improve comment.
10277
10278 2008-12-13 Doug Evans <dje@google.com>
10279
10280 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
10281 * server.h (ATTR_MALLOC): New macro.
10282 (xmalloc,xcalloc,xstrdup): Declare.
10283 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
10284 * inferiors.c: Ditto.
10285 * linux-low.c: Ditto.
10286 * mem-break.c: Ditto.
10287 * regcache.c: Ditto.
10288 * remote-utils.c: Ditto.
10289 * server.c: Ditto.
10290 * target.c: Ditto.
10291 * win32-low.c: Ditto.
10292
10293 2008-12-12 Doug Evans <dje@google.com>
10294
10295 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
10296 in debugging printf.
10297
10298 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
10299
10300 2008-12-09 Doug Evans <dje@google.com>
10301
10302 * linux-low.h (struct process_info): Delete member tid, unused.
10303 * thread-db.c (find_one_thread): Update.
10304 (maybe_attach_thread): Update.
10305
10306 2008-12-02 Pedro Alves <pedro@codesourcery.com>
10307
10308 * target.h (struct target_ops): Add qxfer_osdata member.
10309 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
10310 and dirent.h.
10311 (linux_qxfer_osdata): New functions.
10312 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
10313 callback.
10314 * server.c (handle_query): Handle "qXfer:osdata:read:".
10315 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
10316 (buffer_xml_printf): New functions.
10317 * server.h (struct buffer): New.
10318 (buffer_grow_str, buffer_grow_str0): New macros.
10319 (buffer_grow, buffer_free, buffer_init, buffer_finish)
10320 (buffer_xml_printf): Declare.
10321
10322 2008-11-24 Doug Evans <dje@google.com>
10323
10324 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
10325
10326 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
10327
10328 * server.c (handle_v_run): Always use the supplied argument list.
10329
10330 2008-11-19 Bob Wilson <bob.wilson@acm.org>
10331
10332 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
10333 (xtensa_regmap_table): Add entry for scompare1.
10334
10335 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
10336
10337 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
10338 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
10339 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
10340 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
10341 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
10342 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
10343 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
10344 XML target descriptions.
10345 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
10346 when inferior is running on an ISA 2.05 or later processor. Add
10347 special case to return offset for full 64-bit slot of FPSCR when
10348 in 32-bits.
10349
10350 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
10351
10352 * Makefile.in (SFILES, clean): Added sparc64 files.
10353 (reg-sparc64.o, reg-sparc64.c): New.
10354 * configure.srv (sparc*-*-linux*): New configuration.
10355 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
10356 syscall arguments for SPARC.
10357 (regsets_store_inferior_registers): Likewise.
10358 * linux-sparc-low.c: New file.
10359
10360 2008-10-21 Doug Evans <dje@google.com>
10361
10362 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
10363 (READLINE_DIR,READLINE_DEP): Delete.
10364 (INTERNAL_CFLAGS): Update.
10365 (LINTFLAGS): Update.
10366
10367 2008-10-10 Pedro Alves <pedro@codesourcery.com>
10368
10369 * server.c (handle_v_run): If GDB didn't specify an argv, use the
10370 whole argv from the last run, not just argv[0].
10371
10372 2008-09-08 Pedro Alves <pedro@codesourcery.com>
10373
10374 * regcache.c (new_register_cache): Return NULL if the register
10375 cache size isn't known yet.
10376 (free_register_cache): Avoid dereferencing a NULL regcache.
10377
10378 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
10379
10380 * configure.srv: Merge MIPS and MIPS64.
10381
10382 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
10383
10384 * Makefile.in (uninstall): Apply $(EXEEXT) too.
10385
10386 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
10387
10388 * Makefile.in: Add required vsx dependencies.
10389
10390 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
10391 Declare init_registers_powerpc_vsx32l.
10392 Declare init_registers_powerpc_vsx64l.
10393 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
10394 (ppc_arch_setup): Check for VSX in hwcap.
10395 (ppc_fill_vsxregset): New function.
10396 (ppc_store_vsxregset): New function.
10397 Add new VSX entry in regset_info target_regsets.
10398
10399 * configure.srv: Add new VSX dependencies.
10400
10401 2008-08-12 Pedro Alves <pedro@codesourcery.com>
10402
10403 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
10404 (remote_open): Set or clear transport_is_reliable.
10405 (putpkt_binary): Don't expect acks in noack mode.
10406 (getpkt): Don't send ack/nac in noack mode.
10407 * server.c (handle_general_set): Handle QStartNoAckMode.
10408 (handle_query): If connected by tcp pass QStartNoAckMode+ in
10409 qSupported.
10410 (main): Reset noack_mode on every connection.
10411 * server.h (noack_mode): Declare.
10412
10413 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
10414
10415 * Makefile.in (GDBREPLAY_OBS): New variable.
10416 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
10417
10418 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
10419 Daniel Jacobowitz <dan@codesourcery.com>
10420
10421 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
10422 (usr_store_inferior_registers): Likewise.
10423 (regsets_store_inferior_registers): Likewise.
10424
10425 2008-07-31 Rolf Jansen <rj@surtec.com>
10426 Pedro Alves <pedro@codesourcery.com>
10427
10428 * configure.ac: Check for memmem declaration.
10429 * server.c [HAVE_MALLOC_H]: Include malloc.h.
10430 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
10431 (disable_packet_qfThreadInfo): Unconditionally compile.
10432 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
10433 * configure, config.in: Regenerate.
10434
10435 2008-07-28 Doug Kwan <dougkwan@google.com>
10436
10437 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
10438 (linux_write_memory): Remove declaration of errno.
10439
10440 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
10441
10442 * linux-low.c (handle_extended_wait): Do not use "status"
10443 variable uninitialized.
10444
10445 2008-07-07 Pedro Alves <pedro@codesourcery.com>
10446
10447 * server.c (handle_v_attach): Inhibit reporting dll changes.
10448
10449 2008-06-27 Pedro Alves <pedro@codesourcery.com>
10450
10451 * remote-utils.c (prepare_resume_reply): If requested, don't
10452 output "thread:TID" in the T stop reply.
10453
10454 * server.c (disable_packet_vCont, disable_packet_Tthread)
10455 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
10456 (handle_query): If requested, disable support for qC, qfThreadInfo
10457 and qsThreadInfo.
10458 (handle_v_requests): If requested, disable support for vCont.
10459 (gdbserver_show_disableable): New.
10460 (main): Handle --disable-packet and --disable-packet=LIST.
10461
10462 * server.h (disable_packet_vCont, disable_packet_Tthread)
10463 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
10464
10465 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
10466
10467 * server.c (gdbserver_usage): Mention --version.
10468
10469 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
10470
10471 * Makefile.in (gdbreplay.o): New rule.
10472
10473 2008-06-06 Joseph Myers <joseph@codesourcery.com>
10474
10475 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
10476 message, not gdbserver.
10477
10478 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
10479 Nathan Sidwell <nathan@codesourcery.com>
10480 Joseph Myers <joseph@codesourcery.com>
10481
10482 * acinclude.m4: Include ../../config/acx.m4.
10483 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
10484 * configure, config.in: Regenerate.
10485 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
10486 * server.c (gdbserver_version): Print PKGVERSION.
10487 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
10488 (main): Adjust gdbserver_usage calls.
10489 * gdbreplay.c (version, host_name): Add declarations.
10490 (gdbreplay_version, gdbreplay_usage): New.
10491 (main): Accept --version and --help options.
10492
10493 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
10494
10495 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
10496 (arm_breakpoint_at): Handle Thumb.
10497 (the_low_target): Add comment.
10498
10499 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
10500
10501 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
10502
10503 2008-05-09 Doug Evans <dje@google.com>
10504
10505 * server.h (decode_search_memory_packet): Declare.
10506 * remote-utils.c (decode_search_memory_packet): New fn.
10507 * server.c (handle_search_memory_1): New fn.
10508 (handle_search_memory): New fn.
10509 (handle_query): Process qSearch:memory packets.
10510
10511 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
10512
10513 * regcache.c (registers_length): Remove.
10514 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
10515 full register packet.
10516 * regcache.h (registers_length): Remove prototype.
10517 * server.h (PBUFSIZ): Define to 16384.
10518
10519 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
10520
10521 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
10522 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
10523 powerpc-64l.o, and powerpc-altivec64l.o.
10524 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
10525 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
10526 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
10527 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
10528 rs6000/power-linux.xml, and rs6000/power64-linux.xml
10529 to srv_xmlfiles.
10530
10531 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
10532 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
10533 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
10534 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
10535 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
10536 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
10537 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
10538 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
10539 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
10540 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
10541 (clean): Update.
10542
10543 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
10544 (init_registers_powerpc_32l): ... this new prototype.
10545 (init_registers_powerpc_32): Remove, replace by ...
10546 (init_registers_powerpc_altivec32l): ... this new prototype.
10547 (init_registers_powerpc_e500): Remove, replace by ...
10548 (init_registers_powerpc_e500l): ... this new prototype.
10549 (init_registers_ppc64): Remove, replace by ...
10550 (init_registers_powerpc_64l): ... this new prototype.
10551 (init_registers_powerpc_64): Remove, replace by ...
10552 (init_registers_powerpc_altivec64l): ... this new prototype.
10553 (ppc_num_regs): Set to 73.
10554 (PT_ORIG_R3, PT_TRAP): Define if necessary.
10555 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
10556 (ppc_cannot_store_register): Handle orig_r3 and trap.
10557 (ppc_arch_setup): Update init_registers_... calls.
10558 (ppc_fill_gregset): Handle orig_r3 and trap.
10559
10560 * inferiors.c (clear_inferiors): Reset current_inferior.
10561
10562 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
10563
10564 * acinclude.m4: Add override.m4.
10565 * configure: Regenerate.
10566
10567 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
10568
10569 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
10570 initial call to init_register_ppc64.
10571
10572 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
10573
10574 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
10575 single powerpc*-*-linux* case.
10576 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
10577
10578 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
10579
10580 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
10581 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
10582 from reg_xmlfiles.
10583 * linux-ppc-low.c: Include <elf.h>.
10584 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
10585 (ppc_hwcap): New global variable.
10586 (ppc_regmap): Remove __SPE__ #ifdef sections.
10587 (ppc_regmap_e500): New global variable.
10588 (ppc_cannot_store_register): Update __SPE__ special case.
10589 (ppc_get_hwcap): New function.
10590 (ppc_arch_setup): Use it to determine whether inferior supports
10591 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
10592 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
10593 Do not access registers if target does not support AltiVec.
10594 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
10595 Do not access registers if target does not support SPE.
10596 (target_regsets): Unconditionally include AltiVec and SPE regsets.
10597
10598 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
10599
10600 * linux-low.c (disabled_regsets, num_regsets): New.
10601 (use_regsets_p): Delete.
10602 (linux_wait_for_process): Clear disabled_regsets.
10603 (regsets_fetch_inferior_registers): Check and set it.
10604 (regsets_store_inferior_registers): Likewise.
10605 (linux_fetch_registers, linux_store_registers): Do not use
10606 use_regsets_p.
10607 (initialize_low): Allocate disabled_regsets.
10608
10609 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
10610
10611 * Makefile.in (LIBOBJS): New.
10612 (OBS): Use LIBOBJS.
10613 (memmem.o): New rule.
10614 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
10615 * configure: Regenerated.
10616
10617 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
10618
10619 * server.c (handle_query): Never return "unsupported" for
10620 qXfer:features:read queries.
10621
10622 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
10623
10624 * server.c (get_features_xml): Fix inverted condition.
10625 (handle_query): Always support qXfer:feature:read.
10626
10627 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
10628
10629 * server.c (wrapper_argv): New.
10630 (start_inferior): Handle wrapper_argv. If set, expect an extra
10631 trap.
10632 (gdbserver_usage): Document --wrapper.
10633 (main): Parse --wrapper.
10634
10635 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10636
10637 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
10638 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
10639 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
10640 (ppc_set_pc): Likewise.
10641 (ppc_arch_setup): New function.
10642 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
10643 of collect_register.
10644 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
10645
10646 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10647
10648 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
10649 instead of linux-ppc64-low.o.
10650 * linux-ppc64-low.c: Remove file.
10651 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
10652 (linux-ppc64-low.o): Remove rule.
10653
10654 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
10655 (init_registers_powerpc_64): Likewise.
10656 (ppc_regmap): Conditionally define depending on __powerpc64__.
10657 (ppc_cannot_store_register): Do not special-case "fpscr" when
10658 compiled on __powerpc64__.
10659 (ppc_collect_ptrace_register): New function.
10660 (ppc_supply_ptrace_register): New function.
10661 (ppc_breakpoint): Change type to "unsigned int".
10662 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
10663 (the_low_target): Conditionally provide initializers for the
10664 arch_setup member depending on __powerpc64__. Install
10665 collect_ptrace_register and supply_ptrace_register members.
10666
10667 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10668
10669 * regcache.h (gdbserver_xmltarget): Add extern declaration.
10670 * server.c (gdbserver_xmltarget): Define.
10671 (get_features_xml): Use it to replace "target.xml" and arch_string.
10672
10673 * configure.srv: Remove srv_xmltarget. Add XML files that were
10674 mentioned there to srv_xmlfiles instead. Remove conditional tests
10675 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
10676 srv_xmlfiles and srv_regobj to include all possible choices.
10677 * configure.ac (srv_xmltarget): Remove.
10678 (srv_xmlfiles): Do not add "target.xml".
10679 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
10680 checks for supplementary target information.
10681 * configure: Regenerate.
10682 * Makefile.in (XML_TARGET): Remove.
10683 (target.xml): Remove rule.
10684 (clean): Do not clean up target.xml.
10685 (.PRECIOUS): Do not mention target.xml.
10686
10687 * target.h (struct target_ops): Remove arch_string member.
10688 * linux-low.c (linux_arch_string): Remove.
10689 (linux_target_ops): Remove arch_string initializer.
10690 * linux-low.h (struct linux_target_ops): Remove arch_string member.
10691 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
10692 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
10693 * spu-low.c (spu_arch_string): Remove.
10694 (spu_target_ops): Remove arch_string initializer.
10695 * win32-low.c (win32_arch_string): Remove.
10696 (win32_target_ops): Remove arch_string initializer.
10697 * win32-low.h (struct win32_target_ops): Remove arch_string member.
10698 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
10699 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
10700
10701 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
10702
10703 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
10704 by collect_ptrace_register and supply_ptrace_register hooks.
10705 * linux-low.c (fetch_register): Use supply_ptrace_register callback
10706 instead of checking for the_low_target.left_pad_xfer.
10707 (usr_store_inferior_registers): Use collect_ptrace_register callback
10708 instead of checking for the_low_target.left_pad_xfer.
10709
10710 * linux-s390-low.c (s390_collect_ptrace_register): New function.
10711 (s390_supply_ptrace_register): Likewise.
10712 (s390_fill_gregset): Call s390_collect_ptrace_register.
10713 (the_low_target): Update.
10714
10715 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
10716 (ppc_supply_ptrace_register): Likewise.
10717 (the_low_target): Update.
10718
10719 * linux-i386-low.c (the_low_target): Update.
10720 * linux-x86-64-low.c (the_low_target): Update.
10721
10722 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
10723
10724 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
10725 reg-s390.o and reg-s390x.o.
10726
10727 * linux-low.c (new_inferior): New global variable.
10728 (linux_create_inferior, linux_attach): Set it.
10729 (linux_wait_for_process): Call the_low_target.arch_setup after the
10730 target has stopped for the first time.
10731 (initialize_low): Do not call the_low_target.arch_setup.
10732
10733 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
10734 (s390_set_pc): Likewise.
10735 (s390_arch_setup): New function.
10736 (the_low_target): Use s390_arch_setup as arch_setup routine.
10737
10738 * regcache.c (realloc_register_cache): New function.
10739 (set_register_cache): Call it for each existing regcache.
10740
10741 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
10742
10743 * server.h (init_registers): Remove prototype.
10744
10745 * linux-low.h (struct linux_target_ops): Add arch_setup field.
10746 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
10747 instead of init_registers ().
10748 * linux-arm-low.c (init_registers_arm): Add prototype.
10749 (init_registers_arm_with_iwmmxt): Likewise.
10750 (the_low_target): Add initializer for arch_setup field.
10751 * linux-cris-low.c (init_registers_cris): Add prototype.
10752 (the_low_target): Add initializer for arch_setup field.
10753 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
10754 (the_low_target): Add initializer for arch_setup field.
10755 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
10756 (the_low_target): Add initializer for arch_setup field.
10757 * linux-ia64-low.c (init_registers_ia64): Add prototype.
10758 (the_low_target): Add initializer for arch_setup field.
10759 * linux-m32r-low.c (init_registers_m32r): Add prototype.
10760 (the_low_target): Add initializer for arch_setup field.
10761 * linux-m68k-low.c (init_registers_m68k): Add prototype.
10762 (the_low_target): Add initializer for arch_setup field.
10763 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
10764 (init_registers_mips64_linux): Likewise.
10765 (the_low_target): Add initializer for arch_setup field.
10766 * linux-ppc-low.c (init_registers_ppc): Add prototype.
10767 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
10768 (the_low_target): Add initializer for arch_setup field.
10769 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
10770 (init_registers_powerpc_64): Likewise.
10771 (the_low_target): Add initializer for arch_setup field.
10772 * linux-s390-low.c (init_registers_s390): Add prototype.
10773 (init_registers_s390x): Likewise.
10774 (the_low_target): Add initializer for arch_setup field.
10775 * linux-sh-low.c (init_registers_sh): Add prototype.
10776 (the_low_target): Add initializer for arch_setup field.
10777 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
10778 (the_low_target): Add initializer for arch_setup field.
10779 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
10780 (the_low_target): Add initializer for arch_setup field.
10781
10782 * win32-low.h (struct win32_target_ops): Add arch_setup field.
10783 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
10784 instead of init_registers ().
10785 * win32-arm-low.c (init_registers_arm): Add prototype.
10786 (the_low_target): Add initializer for arch_setup field.
10787 * win32-i386-low.c (init_registers_i386): Add prototype.
10788 (the_low_target): Add initializer for arch_setup field.
10789
10790 * spu-low.c (init_registers_spu): Add prototype.
10791 (initialize_low): Call initialie_registers_spu () instead of
10792 initialize_registers ().
10793
10794 2008-02-19 Pedro Alves <pedro@codesourcery.com>
10795
10796 * server.c (handle_v_requests): When handling the vRun and vAttach
10797 packets, if already debugging a process, don't kill it. Return an
10798 error instead.
10799
10800 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
10801
10802 * server.c (handle_query): Correct length check.
10803
10804 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
10805
10806 * win32-low.c (do_initial_child_stuff): Add process handle
10807 parameter. Set current_process_handle and current_process_id from the
10808 parameters. Clear globals.
10809 (win32_create_inferior): Don't set current_process_handle and
10810 current_process_id here. Instead pass them on the call to
10811 do_initial_child_stuff.
10812 (win32_attach): Likewise.
10813 (win32_clear_inferiors): New.
10814 (win32_kill): Don't close the current process handle or the
10815 current thread handle here. Instead call win32_clear_inferiors.
10816 (win32_detach): Don't open a new handle to the process. Call
10817 win32_clear_inferiors.
10818 (win32_join): Don't rely on current_process_handle; open a new
10819 handle using the process id.
10820 (win32_wait): Call win32_clear_inferiors when the inferior process
10821 has exited.
10822
10823 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
10824
10825 * server.c (monitor_show_help): Add "exit".
10826
10827 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
10828
10829 * Makefile.in (SFILES): Add linux-xtensa-low.c.
10830 (clean): Add reg-xtensa.c.
10831 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
10832 * configure.srv (xtensa*-*-linux*) New target.
10833 * linux-xtensa-low.c: New.
10834 * xtensa-xtregs.c: New.
10835
10836 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
10837
10838 * hostio.c: Don't include errno.h.
10839 (errno_to_fileio_errno): Move to hostio-errno.
10840 * hostio.c: (hostio_error): Remove the error parameter. Defer the
10841 error number outputting to the target->hostio_last_error callback.
10842 (hostio_packet_error): Use FILEIO_EINVAL directly.
10843 (handle_open, handle_pread, hostio_error, handle_unlink): Update
10844 calls to hostio_error.
10845 * hostio-errno.c: New.
10846 * server.h (hostio_last_error_from_errno): Declare.
10847 * target.h (target_ops): Add hostio_last_error member.
10848 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
10849 as hostio_last_error handler.
10850 * spu-low.c (spu_target_ops): Likewise.
10851 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
10852 (wince_hostio_last_error): New functions.
10853 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
10854 as hostio_last_error handler.
10855 (win32_target_ops) [!_WIN32_WCE]: Register
10856 hostio_last_error_from_errno as hostio_last_error handler.
10857 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
10858 (hostio-errno.o): New rule.
10859 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
10860 * configure.srv (srv_hostio_err_objs): New variable. Default to
10861 hostio-errno.o.
10862 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
10863 * configure: Regenerate.
10864
10865 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
10866
10867 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
10868 (linux_kill, linux_detach): Clean up the process list.
10869 * remote-utils.c (remote_open): Improve port number parsing.
10870 (putpkt_binary, input_interrupt): Only send interrupts if the target
10871 is running.
10872 * server.c (extended_protocol): Make static.
10873 (attached): Define earlier.
10874 (exit_requested, response_needed, program_argv): New variables.
10875 (target_running): New.
10876 (start_inferior): Clear attached here.
10877 (attach_inferior): Set attached here.
10878 (require_running): Define.
10879 (handle_query): Use require_running and target_running. Implement
10880 "monitor exit".
10881 (handle_v_attach, handle_v_run): New.
10882 (handle_v_requests): Use require_running. Handle vAttach and vRun.
10883 (gdbserver_usage): Update.
10884 (main): Redo argument parsing. Handle --debug and --multi. Handle
10885 --attach along with other options or after the port. Save
10886 program_argv. Support no initial program. Resynchronize
10887 communication with GDB after an error. Handle "monitor exit".
10888 Use require_running and target_running. Always allow the extended
10889 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
10890 restart in extended mode.
10891 * README: Refer to the GDB manual. Update --attach usage.
10892
10893 2007-12-20 Andreas Schwab <schwab@suse.de>
10894
10895 * linux-low.c (STACK_SIZE): Define.
10896 (linux_tracefork_child): Use it. Use __clone2 on ia64.
10897 (linux_test_for_tracefork): Likewise.
10898
10899 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
10900
10901 * linux-low.c (linux_wait_for_event): Update messages. Do not
10902 reinsert auto-delete breakpoints.
10903 * mem-break.c (struct breakpoint): Change return type of handler to
10904 int.
10905 (set_breakpoint_at): Update handler type.
10906 (reinsert_breakpoint_handler): Return 1 instead of calling
10907 delete_breakpoint.
10908 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
10909 setting a new one.
10910 (check_breakpoints): Delete auto-delete breakpoints and return 2.
10911 * mem-break.h (set_breakpoint_at): Update handler type.
10912 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
10913 * win32-low.c (auto_delete_breakpoint): New.
10914 (get_child_debug_event): Use it.
10915
10916 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
10917
10918 * configure.ac: Check for pread and pwrite.
10919 * hostio.c (handle_pread): Fall back to lseek and read.
10920 (handle_pwrite): Fall back to lseek and write.
10921 * config.in, configure: Regenerated.
10922
10923 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
10924
10925 * server.c (myresume): Add own_buf argument.
10926 (main): Update calls.
10927
10928 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
10929
10930 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
10931 * remote-utils.c (remote_open): Do not call disable_async_io.
10932 (block_async_io): Delete.
10933 (unblock_async_io): Make static.
10934 (initialize_async_io): New.
10935 * server.c (handle_v_cont): Handle async I/O here.
10936 (myresume): Likewise. Move other common resume tasks here...
10937 (main): ... from here. Call initialize_async_io. Disable async
10938 I/O before the main loop.
10939 * server.h (initialize_async_io): Declare.
10940 (block_async_io, unblock_async_io): Delete prototypes.
10941 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
10942
10943 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
10944
10945 * remote-utils.c (readchar): Allow binary data in received messages.
10946
10947 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10948
10949 * win32-low.c (attaching): New global.
10950 (win32_create_inferior): Clear the `attaching' global.
10951 (win32_attach): Set the `attaching' global.
10952 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
10953 attaching. Only set a breakpoint at the entry point if not
10954 attaching.
10955
10956 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10957
10958 * server.c (main): Don't report dll events on the initial
10959 connection on attaches.
10960
10961 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10962
10963 * server.c (main): Relax numerical bases supported for the pid of
10964 the --attach command line argument.
10965
10966 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10967
10968 * win32-low.c (win32_attach): Call OpenProcess before
10969 DebugActiveProcess, not after. Add last error output to error
10970 call.
10971
10972 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10973
10974 * win32-low.c (win32_get_thread_context)
10975 (win32_set_thread_context): New functions.
10976 (thread_rec): Use win32_get_thread_context.
10977 (continue_one_thread, win32_resume): Use win32_set_thread_context.
10978 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
10979 field.
10980
10981 2007-12-03 Leo Zayas
10982 Pedro Alves <pedro_alves@portugalmail.pt>
10983
10984 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
10985 global variables.
10986 (child_add_thread): Minor cleanup.
10987 (child_continue): Resume artificially suspended threads before
10988 calling ContinueDebugEvent.
10989 (suspend_one_thread): New.
10990 (fake_breakpoint_event): New.
10991 (get_child_debug_event): Change return type to int. Check here if
10992 gdb sent an interrupt request. If a soft interrupt was requested,
10993 fake a breakpoint event. Return 0 if there is no event to handle,
10994 and 1 otherwise.
10995 (win32_wait): Don't check here if gdb sent an interrupt request.
10996 Ensure there is a valid event to handle.
10997 (win32_request_interrupt): Add soft interruption method as last
10998 resort.
10999
11000 2007-12-03 Leo Zayas
11001 Pedro Alves <pedro_alves@portugalmail.pt>
11002
11003 * win32-low.h (win32_thread_info): Add descriptions to the
11004 structure members. Replace `suspend_count' counter by a
11005 `suspended' flag.
11006 * win32-low.c (thread_rec): Update condition of when to get the
11007 context from the inferior. Rely on ContextFlags being set if it
11008 has already been retrieved. Only suspend the inferior thread if
11009 we haven't already. Warn if that fails.
11010 (continue_one_thread): s/suspend_count/suspended/. Only call
11011 ResumeThread once. Warn if that fails.
11012
11013 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
11014
11015 * win32-low.c (win32_wait): Don't read from the inferior when it
11016 has already exited.
11017
11018 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
11019
11020 * Makefile.in (win32_low_h): New variable.
11021 (win32-low.o): Add dependency on $(win32_low_h).
11022 (win32-arm-low.o, win32-i386-low.o): New rules.
11023
11024 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
11025
11026 * hostio.c: Correct copyright year.
11027
11028 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
11029
11030 * Makefile.in (OBS): Add hostio.o.
11031 (hostio.o): New rule.
11032 * server.h (handle_vFile): Declare.
11033 * hostio.c: New file.
11034 * server.c (handle_v_requests): Take packet_len and new_packet_len
11035 for binary packets. Call handle_vFile.
11036 (main): Update call to handle_v_requests.
11037
11038 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
11039
11040 * linux-low.c: Include <sched.h>.
11041
11042 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
11043
11044 * linux-low.c (linux_tracefork_grandchild): New.
11045 (linux_tracefork_child): Use clone.
11046 (linux_test_for_tracefork): Use clone; allocate and free a stack.
11047
11048 2007-10-31 Joel Brobecker <brobecker@adacore.com>
11049
11050 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
11051
11052 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
11053
11054 * linux-low.c (handle_extended_wait): Handle unexpected signals.
11055
11056 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
11057
11058 * inferiors.c (change_inferior_id): Delete.
11059 (add_pid_to_list, pull_pid_from_list): New.
11060 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
11061 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
11062 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
11063 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
11064 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
11065 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
11066 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
11067 (using_threads): Always set to 1.
11068 (handle_extended_wait): New.
11069 (add_process): Do not set TID.
11070 (linux_create_inferior): Set must_set_ptrace_flags.
11071 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
11072 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
11073 (linux_thread_alive): Rename TID argument to LWPID.
11074 (linux_wait_for_process): Handle unknown processes. Do not use TID.
11075 (linux_wait_for_event): Do not use TID or check using_threads. Update
11076 call to dead_thread_notify. Call handle_extended_wait.
11077 (linux_create_inferior): Use PTRACE_SETOPTIONS.
11078 (send_sigstop): Delete sigstop_sent.
11079 (wait_for_sigstop): Avoid TID.
11080 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
11081 (linux_test_for_tracefork): New.
11082 (linux_lookup_signals): Use thread_db_active and
11083 linux_supports_tracefork_flag.
11084 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
11085 * linux-low.h (get_process_thread): Avoid TID.
11086 (struct process_ifo): Move thread_known and tid to the end. Remove
11087 sigstop_sent.
11088 (linux_attach_lwp, thread_db_init): Update prototypes.
11089 * server.h (change_inferior_id): Delete prototype.
11090 (add_pid_to_list, pull_pid_from_list): New prototypes.
11091 * thread-db.c (thread_db_use_events): New.
11092 (find_first_thread): Rename to...
11093 (find_one_thread): ...this. Update callers and messages. Do not
11094 call fatal. Check thread_db_use_events. Do not call
11095 change_inferior_id or new_thread_notify.
11096 (maybe_attach_thread): Update. Do not call new_thread_notify.
11097 (thread_db_init): Set thread_db_use_events. Check use_events.
11098 * utils.c (fatal, warning): Correct message prefix.
11099
11100 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
11101
11102 * Makefile.in (clean): Remove new files.
11103 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
11104 (powerpc-64.o, powerpc-64.c): New rules.
11105 * configure.srv: Use alternate register sets for powerpc64-*-linux*
11106 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
11107 with SPE.
11108 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
11109 SPE targets.
11110 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
11111 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
11112 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
11113 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
11114 (target_regsets): Add AltiVec and SPE register sets.
11115 * configure.ac: Check for AltiVec and SPE.
11116 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
11117 (ppc_fill_vrregset, ppc_store_vrregset): New.
11118 (target_regsets): Add AltiVec register set.
11119 * configure: Regenerated.
11120
11121 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
11122
11123 * linux-low.c (O_LARGEFILE): Define.
11124 (linux_read_memory): Use /proc/PID/mem.
11125 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
11126 * configure, config.in: Regenerated.
11127
11128 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
11129
11130 * linux-low.c (linux_wait_for_event): Do not pass signals while
11131 single-stepping.
11132
11133 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
11134
11135 * win32-low.c (create_process): New.
11136 (win32_create_inferior): Use create_process instead of
11137 CreateProcess. If create_process failed retry appending an ".exe"
11138 suffix. Store the GetLastError result immediatelly after
11139 create_process calls and use it on the call to error.
11140
11141 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
11142
11143 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
11144
11145 2007-08-23 Joel Brobecker <brobecker@adacore.com>
11146
11147 * configure.ac: Switch license to GPLv3.
11148
11149 2007-08-01 Michael Snyder <msnyder@access-company.com>
11150
11151 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
11152
11153 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
11154
11155 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
11156 typedef.
11157 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
11158 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
11159 CloseToolhelp32Snapshot.
11160 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
11161 CloseToolhelp32Snapshot.
11162
11163 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
11164
11165 * server.c (main): Check for inferior exit before main loop.
11166
11167 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
11168
11169 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
11170 instead of on tmp_desc.
11171
11172 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
11173 Daniel Jacobowitz <dan@codesourcery.com>
11174
11175 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
11176 (add_thread): Minor cleanups.
11177 (clear_inferiors): Move lower in the file. Clear the DLL
11178 list.
11179 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
11180 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
11181 (xml_escape_text): New.
11182 * server.c (handle_query): Handle qXfer:libraries:read. Report it
11183 for qSupported.
11184 (handle_v_cont): Report errors.
11185 (gdbserver_version): Update.
11186 (main): Correct size of own_buf. Do not report initial DLL events.
11187 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
11188 (unloaded_dll, xml_escape_text): New.
11189 * win32-low.c (enum target_waitkind): Update comments.
11190 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
11191 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
11192 (win32_EnumProcessModules, win32_GetModuleInformation)
11193 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
11194 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
11195 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
11196 (win32_Module32First, win32_Module32Next, load_toolhelp)
11197 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
11198 (get_child_debug_event): Handle DLL events.
11199 (win32_wait): Likewise.
11200
11201 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
11202
11203 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
11204 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
11205
11206 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
11207
11208 * win32-low.c (handle_output_debug_string): Ignore event if not
11209 waiting.
11210
11211 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
11212
11213 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
11214
11215 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
11216
11217 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
11218
11219 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
11220
11221 * inferiors.c (change_inferior_id): Add comment.
11222 * linux-low.c (check_removed_breakpoint): Add an early
11223 prototype. Improve debug output.
11224 (linux_attach): Doc update.
11225 (linux_detach_one_process, linux_detach): Clean up before releasing
11226 each process.
11227 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
11228 * linux-low.h (struct process_info): Doc improvement.
11229 * mem-break.c (delete_all_breakpoints): New.
11230 * mem-break.h (delete_all_breakpoints): New prototype.
11231 * thread-db.c (find_first_thread): New.
11232 (thread_db_create_event): Call it instead of
11233 thread_db_find_new_threads. Clean up unused variables.
11234 (maybe_attach_thread): Remove first thread handling.
11235 (thread_db_find_new_threads): Use find_first_thread.
11236 (thread_db_get_tls_address): Likewise.
11237
11238 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
11239
11240 * thread-db.c (thread_db_find_new_threads): Add prototype.
11241 (thread_db_create_event): Check for the main thread before adding
11242 a new thread.
11243 (maybe_attach_thread): Only enable event reporting if TID == 0.
11244 (thread_db_get_tls_address): Check for new threads.
11245
11246 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
11247
11248 * linux-low.c (linux_create_inferior): Try execv before execvp.
11249 * spu-low.c (spu_create_inferior): Likewise.
11250
11251 2007-06-13 Mike Frysinger <vapier@gentoo.org>
11252
11253 * linux-low.c (linux_create_inferior): Change execv to execvp.
11254 * spu-low.c (spu_create_inferior): Likewies.
11255
11256 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
11257
11258 * Makefile.in (clean): Clean new files instead of deleted ones.
11259 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
11260 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
11261 rules.
11262 * configure.srv: Specify XML files and new regformats for MIPS and
11263 MIPS64 GNU/Linux.
11264 * linux-mips-low.c (mips_num_regs): Set to only used registers.
11265 (mips_regmap): Do not fetch $0. Remove unused registers. Add
11266 an entry for the restart register.
11267 (mips_cannot_fetch_register, mips_cannot_store_register)
11268 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
11269 register names to match the XML descriptions.
11270 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
11271 restart register instead of $0.
11272
11273 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
11274 Markus Deuling <deuling@de.ibm.com>
11275
11276 * remote-utils.c (decode_xfer_write): New function.
11277 * server.h (decode_xfer_write): Add prototype.
11278 * server.c (handle_query): Add PACKET_LEN argument. Support
11279 qXfer:spu:read and qXfer:spu:write packets.
11280 (main): Pass packet_len to handle_query.
11281 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
11282 * target.h (target_ops): Add qxfer_spu.
11283
11284 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
11285
11286 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
11287 accessing non-seekable spufs files.
11288
11289 2007-05-16 Markus Deuling <deuling@de.ibm.com>
11290
11291 * server.c (handle_query): Add reply for qC packet.
11292
11293 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11294 Leo Zayas <lerele@champenstudios@com>
11295
11296 * server.h (check_remote_input_interrupt_request): New function.
11297 * remote_utils.c (INVALID_DESCRIPTOR): New define.
11298 (remote_desc): Initialize with INVALID_DESCRIPTOR.
11299 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
11300 (check_remote_input_interrupt_request): New function.
11301 * server.h (check_remote_input_interrupt_request): Declare.
11302 * win32-low.c (winapi_DebugBreakProcess,
11303 winapi_GenerateConsoleCtrlEvent): New typedefs.
11304 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
11305 to 250 ms.
11306 (win32_wait): Check for remote interrupt request
11307 with check_remote_input_interrupt_request.
11308 (win32_request_interrupt): New function.
11309 (win32_target_op): Set request_interrupt to win32_request_interrupt.
11310
11311 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11312
11313 * win32-low.c (debug_registers_changed,
11314 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
11315 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
11316 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
11317 (thread_rec): Get context using the low target.
11318 (child_add_thread): Call thread_added on the low target,
11319 which does the same thing.
11320 (regptr): Delete.
11321 (do_initial_child_stuff): Remove debug registers references.
11322 Set context using the low target. Resume threads after
11323 setting the contexts.
11324 (child_continue): Remove dead variable. Remove debug
11325 registers references.
11326 (child_fetch_inferior_registers): Go through the low target.
11327 (do_child_store_inferior_registers): Remove.
11328 (child_store_inferior_registers): Go through the low target.
11329 (win32_resume): Remove debug registers references.
11330 Set context using the low target.
11331 (handle_exception): Change return type to void. Don't record
11332 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
11333 first chance exception.
11334 (get_child_debug_event): Change return type to void. Remove
11335 goto loop. Always return after waiting for debug event.
11336 (win32_wait): Convert to switch statement. Handle spurious
11337 events.
11338
11339 * win32-i386-low.c (debug_registers_changed,
11340 debug_registers_used): New.
11341 (initial_stuff): Rename to ...
11342 (i386_initial_stuff): ... this. Clear debug registers
11343 state variables.
11344 (store_debug_registers): Delete.
11345 (i386_get_thread_context): New.
11346 (load_debug_registers): Delete.
11347 (i386_set_thread_context): New.
11348 (i386_thread_added): New.
11349 (single_step): Rename to ...
11350 (i386_single_step): ... this.
11351 (do_fetch_inferior_registers): Rename to ...
11352 (i386_fetch_inferior_register): ... this.
11353 (i386_store_inferior_register): New.
11354 (the_low_target): Adapt to new interface.
11355
11356 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
11357 (arm_get_thread_context): New.
11358 (arm_set_thread_context): New.
11359 (regptr): New.
11360 (do_fetch_inferior_registers): Rename to ...
11361 (arm_fetch_inferior_register): ... this.
11362 (arm_store_inferior_register): New.
11363 (arm_wince_breakpoint): Reimplement as unsigned long.
11364 (arm_wince_breakpoint_len): Define.
11365 (the_low_target): Adapt to new interface.
11366
11367 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
11368 load_debug_registers. Add get_thread_context, set_thread_context,
11369 thread_added and store_inferior_register. Rename
11370 fetch_inferior_registers to fetch_inferior_register.
11371 (regptr): Remove declaration.
11372
11373 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11374
11375 * linux-low.c (linux_detach): Change return type to int. Return 0.
11376 * spu-low.c (spu_detach): Likewise.
11377
11378 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11379
11380 * target.h (target_ops): Change return type of detach to int.
11381 Add join.
11382 (join_inferior): New.
11383 * server.c (main): Don't skip detach support on mingw32.
11384 If the inferior doesn't support detaching return error.
11385 Call join_inferior instead of using waitpid.
11386 * linux-low.c (linux_join): New.
11387 (linux_target_op): Add linux_join.
11388 * spu-low.c (spu_join): New.
11389 (spu_target_ops): Add spu_join.
11390 * win32-low.c (win32_detach): Adapt to new interface.
11391 Reopen current_process_handle before detaching. Issue a child
11392 resume before detaching.
11393 (win32_join): New.
11394 (win32_target_op): Add win32_join.
11395
11396 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11397
11398 * win32-low.c (win32-attach): Fix return value.
11399 * target.h (target_ops): Describe ATTACH return values.
11400
11401 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11402
11403 * win32-low.c (GETPROCADDRESS): Define.
11404 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
11405 (winapi_DebugSetProcessKillOnExit): Likewise.
11406 (win32_create_inferior): Force usage of ansi CreateProcessA.
11407 (win32_attach): Use GETPROCADDRESS.
11408 (win32_detach): Likewise.
11409
11410 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11411
11412 * win32-low.c (win32_wait): Don't use WSTOPSIG.
11413
11414 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
11415
11416 * win32-low.c: Commit leftover changes from 2007-03-29.
11417
11418 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
11419
11420 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
11421 fields short instead of int. Add explicit padding.
11422 (i387_cache_to_fsave): Remove unnecessary casts.
11423 (i387_fsave_to_cache): Doc fix.
11424 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
11425
11426 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
11427
11428 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
11429 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
11430
11431 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
11432
11433 * configure.srv (arm*-*-mingw32ce*): Move near the other
11434 arm targets.
11435
11436 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
11437
11438 * configure.ac: Add errno checking.
11439 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
11440 sys/file.h and malloc.h.
11441 (AC_CHECK_DECLS): Add perror.
11442 (srv_mingwce): Handle.
11443 * configure.srv (i[34567]86-*-cygwin*): Add
11444 win32-i386-low.o to srv_tgtobj.
11445 (i[34567]86-*-mingw*): Likewise.
11446 (arm*-*-mingw32ce*): Add case.
11447 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
11448 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
11449 [__MINGW32CE__] (strerror): New function.
11450 [__MINGW32CE__] (errno): Define to GetLastError.
11451 [__MINGW32CE__] (COUNTOF): New macro.
11452 (remote_open): Remove extra close call.
11453 * mem-break.c (delete_breakpoint_at): New function.
11454 * mem-break.h (delete_breakpoint_at): Declare.
11455 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
11456 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
11457 [USE_WIN32API] (read, write): Add char* casts.
11458 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
11459 * server.h: Include wincecompat.h on Windows CE.
11460 [HAVE_ERRNO_H]: Check.
11461 (perror): Declare if not declared.
11462 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
11463 (perror_with_name): Remove errno declaration.
11464 * wincecompat.h: New.
11465 * wincecompat.c: New.
11466 * win32-low.h: New.
11467 * win32-arm-low.c: New.
11468 * win32-i386-low.c: New.
11469 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
11470 (OUTMSG2): Make it safe.
11471 (_T): New macro.
11472 (COUNTOF): New macro.
11473 (NUM_REGS): Get it from the low target.
11474 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
11475 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
11476 (thread_rec): Let low target handle debug registers.
11477 (child_add_thread): Likewise.
11478 (child_init_thread_list): Likewise.
11479 (continue_one_thread): Likewise.
11480 (regptr): New.
11481 (do_child_fetch_inferior_registers): Move to ...
11482 * win32-i386-low.c: ... here, and rename to ...
11483 (do_fetch_inferior_registers): ... this.
11484 * win32-low.c (child_fetch_inferior_registers):
11485 Go through the low target.
11486 (do_child_store_inferior_registers): Use regptr.
11487 (strwinerror): New function.
11488 (win32_create_inferior): Handle Windows CE.
11489 Use strwinerror instead of strerror on Windows error
11490 codes. Add program to the error output.
11491 Don't close the main thread handle on Windows CE.
11492 (win32_attach): Use coredll.dll on Windows CE.
11493 (win32_kill): Close current process and current
11494 thread handles.
11495 (win32_detach): Use coredll.dll on Windows CE.
11496 (win32_resume): Let low target handle debug registers, and
11497 step request.
11498 (handle_exception): Add/Remove initial breakpoint. Avoid
11499 non-existant WSTOPSIG on Windows CE.
11500 (win32_read_inferior_memory): Cast to remove warning.
11501 (win32_arch_string): Go through the low target.
11502 (initialize_low): Call set_breakpoint_data with the low
11503 target's breakpoint.
11504 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
11505 FOP_REGNUM, mappings): Move to ...
11506 * win32-i386-low.c: ... here.
11507 * win32-low.c (win32_thread_info): Move to ...
11508 * win32-low.h: ... here.
11509 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
11510 win32-arm-low.c and wincecompat.c.
11511 (all:): Add $EXEEXT.
11512 (install-only:): Likewise.
11513 (gdbserver:): Likewise.
11514 (gdbreplay:): Likewise.
11515 * config.in: Regenerate.
11516 * configure: Regenerate.
11517
11518 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
11519
11520 * win32-low.c: Rename typedef thread_info to
11521 win32_thread_info throughout.
11522
11523 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
11524
11525 * win32-i386-low.c: Rename to ...
11526 * win32-low.c: ... this.
11527 * configure.srv: Replace win32-i386-low.o with win32-low.o.
11528 * Makefile.in: Likewise.
11529
11530 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
11531
11532 * remote-utils.c (monitor_output): Constify msg parameter.
11533 * server.h (monitor_output): Likewise.
11534 * win32-i386-low.c (handle_output_debug_string): New.
11535 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
11536 handle_output_debug_string.
11537 (get_child_debug_event): Likewise.
11538
11539 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
11540
11541 * server.c (main): Correct strtoul check.
11542
11543 2007-03-27 Jon Ringle <jon@ringle.org>
11544
11545 * linux-low.c: Check __ARCH_HAS_MMU__ also.
11546
11547 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
11548
11549 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
11550
11551 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
11552
11553 * terminal.h: Check HAVE_SGTTY_H.
11554
11555 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
11556
11557 * remote-utils.c (remote_open): Print out the assigned port number.
11558
11559 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
11560
11561 * remote-utils.c (monitor_output): New function.
11562 * server.c (debug_threads): Define here.
11563 (monitor_show_help): New function.
11564 (handle_query): Handle qRcmd.
11565 (main): Do not handle 'd' packet.
11566 * server.h (debug_threads, remote_debug, monitor_output): Declare.
11567 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
11568 of debug_threads.
11569
11570 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11571
11572 * Makefile.in (EXEEXT): New.
11573 (clean): Use $(EXEEXT).
11574
11575 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11576
11577 * target.h (target_ops): Rename send_signal to request_interrupt,
11578 and remove enum target_signal parameter.
11579 * linux-low.c (linux_request_interrupt): Rename from
11580 linux_send_signal, and always send SIGINT.
11581 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
11582 and always send SIGINT.
11583 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
11584 of send_signal.
11585 (input_interrupt): Likewise.
11586
11587 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11588
11589 * server.c (get_features_xml): Check if target implemented
11590 arch_string.
11591 * win32-i386-low.c (win32_arch_string): New.
11592 (win32_target_ops): Add win32_arch_string as arch_string member.
11593
11594 2007-02-22 Markus Deuling <deuling@de.ibm.com>
11595
11596 * spu-low.c (spu_arch_string): New.
11597 (spu_target_ops): Add spu_arch_string.
11598
11599 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
11600
11601 * remote-utils.c: Remove HAVE_TERMINAL_H check.
11602 * configure.ac: Do not check for terminal.h.
11603 * configure, config.in: Regenerated.
11604
11605 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
11606
11607 * Makefile.in (OBS): Add $(XML_BUILTIN).
11608 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
11609 (clean): Update.
11610 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
11611 (arm-with-iwmmxt.c): New.
11612 * config.in, configure: Regenerate.
11613 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
11614 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
11615 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
11616 (arm*-*-linux*): Add iWMMXt and regset support.
11617 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
11618 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
11619 (arm_store_wmmxregset, target_regsets): New.
11620 * server.c (get_features_xml): Take annex argument. Check builtin
11621 XML documents.
11622 (handle_query): Handle multiple annexes.
11623
11624 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11625
11626 * remote-utils.c [USE_WIN32API] (read, write): Define.
11627 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
11628 write.
11629
11630 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
11631
11632 * linux-i386-low.c (the_low_target): Set arch_string.
11633 * linux-x86-64-low.c (the_low_target): Likewise.
11634 * linux-low.c (linux_arch_string): New.
11635 (linux_target_ops): Add it.
11636 * linux-low.h (struct linux_target_ops): Add arch_string.
11637 * server.c (write_qxfer_response): Use const void * for DATA.
11638 (get_features_xml): New.
11639 (handle_query): Handle qXfer:features:read. Report it for qSupported.
11640 * target.h (struct target_ops): Add arch_string method.
11641
11642 2007-01-03 Denis Pilat <denis.pilat@st.com>
11643 Daniel Jacobowitz <dan@codesourcery.com>
11644
11645 * linux-low.c (linux_kill): Handle being called with no threads.
11646 * win32-i386-low.c (win32_kill): Likewise.
11647 (get_child_debug_event): Clear current_process_handle.
11648
11649 2006-12-30 Denis PILAT <denis.pilat@st.com>
11650 Daniel Jacobowitz <dan@codesourcery.com>
11651
11652 * remote-utils.c (remote_open): Check the type of specified
11653 serial port devices before opening them.
11654 * server.c (main): Kill the inferior if an error occurs during
11655 the first remote_open.
11656
11657 2006-12-05 Markus Deuling <deuling@de.ibm.com>
11658
11659 * README: Update supported targets.
11660
11661 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
11662
11663 * Makefile.in (clean): Remove reg-mips64.c.
11664 (reg-mips64.c, reg-mips64.o): New rules.
11665 * configure.srv: Handle mips64. Include regset support for mips.
11666 * linux-mips-low.c (union mips_register): New.
11667 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
11668 (mips_breakpoint, mips_breakpoint_at): Use int.
11669 (mips_collect_register, mips_supply_register)
11670 (mips_collect_register_32bit, mips_supply_register_32bit)
11671 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
11672 (mips_store_fpregset, target_regsets): New.
11673 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
11674
11675 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
11676
11677 * configure.srv: Add target "spu*-*-*".
11678 * Makefile.in (clean): Remove reg-spu.c.
11679 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
11680 * spu-low.c: New file.
11681
11682 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
11683
11684 * configure.ac: Correct td_thr_tls_get_addr test.
11685 * configure: Regenerated.
11686
11687 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
11688
11689 * linux-low.c (linux_wait_for_event): Reformat. Use the
11690 pass_signals array.
11691 * remote-utils.c (decode_address_to_semicolon): New.
11692 * server.c (pass_signals, handle_general_set): New.
11693 (handle_query): Mention QPassSignals for qSupported.
11694 (main): Call handle_general_set.
11695 * server.h (pass_signals, decode_address_to_semicolon): New.
11696
11697 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
11698
11699 * server.c (handle_query): Correct error handling for read_auxv.
11700
11701 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
11702
11703 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
11704 and srv_linux_thread_db to yes.
11705 * linux-s390-low.c (s390_fill_gregset): New function.
11706 (target_regsets): Define data structure.
11707
11708 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
11709
11710 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
11711 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
11712 * config.in, configure: Regenerated.
11713 * inferiors.c (gdb_id_to_thread): New function.
11714 (gdb_id_to_thread_id): Use it.
11715 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
11716 * linux-low.h (struct process_info): Add th member.
11717 (thread_db_get_tls_address): New prototype.
11718 * remote-utils.c (decode_address): Make non-static.
11719 * server.c (handle_query): Handle qGetTLSAddr.
11720 * server.h (gdb_id_to_thread, decode_address): New prototypes.
11721 * target.h (struct target_ops): Add get_tls_address.
11722 * thread-db.c (maybe_attach_thread): Save the thread handle.
11723 (thread_db_get_tls_address): New.
11724
11725 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
11726
11727 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
11728 (linux_resume_one_process): Take a siginfo_t *. Update all
11729 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
11730 (struct pending_signals): Add a siginfo_t.
11731 (linux_wait_for_process): Always set last_status.
11732 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
11733 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
11734 * linux-low.h (struct process_info): Add last_status.
11735
11736 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
11737
11738 * remote-utils.c (try_rle): New function.
11739 (putpkt_binary): Use it.
11740
11741 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
11742
11743 * Makefile.in (clean): Clean reg-x86-64-linux.c.
11744 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
11745 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
11746 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
11747 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
11748 point registers.
11749
11750 2006-08-08 Richard Sandiford <richard@codesourcery.com>
11751
11752 * server.c (terminal_fd): New variable.
11753 (old_foreground_pgrp): Likewise.
11754 (restore_old_foreground_pgrp): New function.
11755 (start_inferior): Record the terminal file descriptor in terminal_fd
11756 and its original foreground group in old_foreground_pgrp. Register
11757 restore_old_foreground_pgrp with atexit().
11758
11759 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
11760
11761 * server.c (handle_query): Correct qPart to qXfer.
11762
11763 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
11764
11765 * configure.ac: Check for more headers which are missing on
11766 Windows. Automatically supply -lwsock32 and USE_WIN32API.
11767 * configure.srv: Add Cygwin and mingw32.
11768 * remote-utils.c: Don't include headers unconditionally which
11769 are missing on mingw32. Include <winsock.h> for mingw32.
11770 (remote_open): Adjust for mingw32 support. Flush
11771 standard error after writing to it.
11772 (remote_close, putpkt_binary, input_interrupt, block_async_io)
11773 (unblock_async_io, enable_async_io, disable_async_io)
11774 (readchar, getpkt): Update for Winsock support.
11775 (prepare_resume_reply): Expect a protocol signal number.
11776 * server.c: Disable <sys/wait.h> on mingw32.
11777 (start_inferior): Adjust for mingw32 support. Flush
11778 standard error after writing to it.
11779 (attach_inferior): Likewise. Use protocol signal
11780 numbers.
11781 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
11782 and names.
11783 * win32-i386-low.c: New file.
11784 * Makefile.in (XM_CLIBS): Set.
11785 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
11786 (win32-i386-low.o): New dependency rule.
11787 * linux-low.c (linux_wait): Use target signal numbers.
11788 * target.h (struct target_ops): Doc fix.
11789 * server.h (target_signal_to_name): New prototype.
11790 * gdbreplay.c: Don't include headers unconditionally which
11791 are missing on mingw32. Include <winsock.h> for mingw32.
11792 (remote_close, remote_open): Adjust for Winsock support.
11793 * configure, config.in: Regenerated.
11794
11795 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
11796
11797 * server.c (decode_xfer_read, write_qxfer_response): New.
11798 (handle_query): Take a packet length argument. Handle
11799 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
11800 the qSupported response.
11801 (main): Update call to handle_query.
11802
11803 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
11804
11805 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
11806 (putpkt_binary): Renamed from putpkt and adjusted for binary
11807 data.
11808 (putpkt): New wrapper for putpkt_binary.
11809 (readchar): Don't mask off the high bit.
11810 (decode_X_packet): New function.
11811 * server.c (main): Call putpkt_binary if a handler sets the packet
11812 length. Save the length of the incoming packet. Handle 'X'.
11813 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
11814
11815 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
11816
11817 * server.c (handle_query): Handle qSupported.
11818
11819 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
11820
11821 * remote-utils.c (all_symbols_looked_up): New variable.
11822 (look_up_one_symbol): Check it.
11823 * server.h (look_up_one_symbol): New declaration.
11824 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
11825
11826 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
11827
11828 * Makefile.in (linux-arm-low.o): Update dependencies.
11829 * linux-arm-low.c: Include "gdb_proc_service.h".
11830 (PTRACE_GET_THREAD_AREA): Define.
11831 (ps_get_thread_area): New function.
11832
11833 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
11834
11835 * configure.srv (m68k*-*-uclinux*): New target.
11836 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
11837 (linux_resume_one_process): Remove extraneous cast.
11838 (linux_read_offsets): New.
11839 (linux_target_op): Add linux_read_offsets on mmuless systems.
11840 * server.c (handle_query): Add qOffsets logic.
11841 * target.h (struct target_ops): Add read_offsets.
11842
11843 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
11844
11845 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
11846 (PTRACE_GET_THREAD_AREA): Define.
11847 (ps_get_thread_area): New function.
11848 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
11849 (linux-x86-64-low.o): Update.
11850
11851 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
11852
11853 * configure.ac: Remove checks for prfpregset_t.
11854 * gdb_proc_service.h: New file.
11855 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
11856 new "gdb_proc_service.h".
11857 * proc-service.c: Likewise.
11858 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
11859 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
11860 * Makefile.in (gdb_proc_service_h): Updated.
11861 * configure, config.in: Regenerated.
11862
11863 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
11864
11865 * remote-utils.c (prepare_resume_reply): Move declaration
11866 of gdb_id_from_wait to the top of the block.
11867
11868 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
11869
11870 * linux-low.c (regsets_store_inferior_registers): Read the regset
11871 from the target before filling it.
11872
11873 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
11874
11875 * server.c (attach_inferior): Return SIGTRAP for a successful
11876 attach.
11877
11878 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
11879
11880 * Makefile.in (OBS): Add version.o.
11881 (STAGESTUFF): Delete.
11882 (version.o): Add dependencies.
11883 (version.c): Replace rule.
11884 (clean): Remove version.c.
11885 * server.c (gdbserver_version): New.
11886 (gdbserver_usage): Use printf.
11887 (main): Handle --version and --help.
11888 * server.h (version, host_name): Add declarations.
11889
11890 2005-12-23 Eli Zaretskii <eliz@gnu.org>
11891
11892 * linux-arm-low.c:
11893 * linux-arm-low.c:
11894 * inferiors.c:
11895 * i387-fp.h:
11896 * i387-fp.c:
11897 * gdbreplay.c:
11898 * regcache.c:
11899 * proc-service.c:
11900 * mem-break.h:
11901 * mem-break.c:
11902 * linux-x86-64-low.c:
11903 * linux-sh-low.c:
11904 * linux-s390-low.c:
11905 * linux-ppc64-low.c:
11906 * linux-ppc-low.c:
11907 * linux-mips-low.c:
11908 * linux-m68k-low.c:
11909 * linux-m32r-low.c:
11910 * linux-low.h:
11911 * linux-low.c:
11912 * linux-ia64-low.c:
11913 * linux-i386-low.c:
11914 * linux-crisv32-low.c:
11915 * thread-db.c:
11916 * terminal.h:
11917 * target.h:
11918 * target.c:
11919 * server.h:
11920 * server.c:
11921 * remote-utils.c:
11922 * regcache.h:
11923 * utils.c:
11924 * Makefile.in:
11925 * configure.ac:
11926 * gdbserver.1: Add (C) after Copyright. Update the FSF
11927 address.
11928
11929 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
11930
11931 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
11932 (arm_breakpoint_at): Recognize both breakpoints.
11933 (the_low_target): Use the correct breakpoint instruction.
11934
11935 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
11936
11937 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
11938 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
11939 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
11940 (the_low_target): Update.
11941
11942 2005-10-25 Andreas Schwab <schwab@suse.de>
11943
11944 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
11945
11946 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
11947 (ia64_num_regs): Reduce to 462.
11948
11949 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
11950
11951 * acinclude.m4: Correct quoting.
11952 * aclocal.m4: Regenerated.
11953
11954 Suggested by SZOKOVACS Robert <szo@ies.hu>:
11955 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
11956 (thread_db_init): Call thread_db_err_str.
11957 * configure.ac: Check for TD_VERSION.
11958 * config.in, configure: Regenerated.
11959
11960 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11961
11962 * server.h (error, fatal, warning): Add ATTR_FORMAT.
11963
11964 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
11965
11966 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
11967 is not available. Define HAVE_PTRACE_GETREGS if it is.
11968 * config.in, configure: Regenerated.
11969 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
11970 * linux-i386-low.c, linux-m68k-low.c: Update to use
11971 HAVE_PTRACE_GETREGS.
11972 * linux-low.c (regsets_fetch_inferior_registers)
11973 (regsets_store_inferior_registers): Only return 0 if we processed
11974 GENERAL_REGS.
11975 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
11976 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
11977
11978 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
11979
11980 * inferiors.c (struct thread_info): Add gdb_id.
11981 (add_thread): Add gdb_id argument.
11982 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
11983 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
11984 calls to add_thread.
11985 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
11986 * server.c (handle_query): Use thread_to_gdb_id.
11987 (handle_v_cont, main): Use gdb_id_to_thread_id.
11988 * server.h (add_thread): Update prototype.
11989 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
11990 prototypes.
11991
11992 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
11993
11994 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
11995 left-padded registers.
11996 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
11997 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
11998
11999 2005-07-01 Steve Ellcey <sje@cup.hp.com>
12000
12001 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
12002 * configure: Regenerate.
12003 * config.in: Regenerate.
12004 * server.h (NEED_DECLARATION_STRERROR):
12005 Replace with !HAVE_DECL_STRERROR.
12006
12007 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
12008
12009 * linux-low.c (linux_wait, linux_send_signal): Don't test
12010 an unsigned long variable for > 0 if it could be MAX_ULONG.
12011 * server.c (myresume): Likewise.
12012 * target.c (set_desired_inferior): Likewise.
12013
12014 2005-06-13 Mark Kettenis <kettenis@gnu.org>
12015
12016 * configure.ac: Simplify and improve check for socklen_t.
12017 * configure, config.in: Regenerate.
12018
12019 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
12020
12021 * acconfig.h: Remove.
12022 * configure.ac: Add a test for socklen_t. Use three-argument
12023 AC_DEFINE throughout.
12024 * config.in: Regenerated using autoheader 2.59.
12025 * configure: Regenerated.
12026
12027 * gdbreplay.c (socklen_t): Provide a default.
12028 (remote_open): Use socklen_t.
12029 * remote-utils.c (socklen_t): Provide a default.
12030 (remote_open): Use socklen_t.
12031 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
12032 unsigned char.
12033
12034 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
12035 char for buffers.
12036 * linux-low.c (linux_read_memory, linux_write_memory)
12037 (linux_read_auxv): Likewise.
12038 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
12039 (check_mem_write): Likewise.
12040 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
12041 Likewise.
12042 * regcache.c (struct inferior_rgcache_data, registers_to_string)
12043 (registers_from_string, register_data): Likewise.
12044 * server.c (handle_query, main): Likewise.
12045 * server.h (convert_ascii_to_int, convert_int_to_ascii)
12046 (decode_M_packet): Likewise.
12047 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
12048 * target.h (struct target_ops): Update read_memory, write_memory,
12049 and read_auxv.
12050 (read_inferior_memory, write_inferior_memory): Update.
12051 * linux-low.h (struct linux_target_ops): Change type of breakpoint
12052 to unsigned char *.
12053 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
12054 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
12055 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
12056 linux-s390-low.c, linux-sh-low.c: Update for changes in
12057 read_inferior_memory and the_low_target->breakpoint.
12058
12059 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
12060
12061 * Makefile.in (SFILES): Add linux-ppc64-low.c.
12062 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
12063 * configure.srv: Add powerpc64-*-linux*.
12064 * linux-ppc64-low.c: New file.
12065
12066 2005-05-23 Orjan Friberg <orjanf@axis.com>
12067
12068 * linux-cris-low.c: New file with support for CRIS.
12069 * linux-crisv32-low.c: Ditto for CRISv32.
12070 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
12071 (clean): Add reg-cris.c and reg-crisv32.c.
12072 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
12073 reg-crisv32.o, and reg-crisv32.c to make rules.
12074 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
12075 recognized targets.
12076
12077 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
12078
12079 * linux-low.c (fetch_register): Ensure buffer size is a multiple
12080 of sizeof (PTRACE_XFER_TYPE).
12081 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
12082
12083 2005-05-12 Orjan Friberg <orjanf@axis.com>
12084
12085 * target.h (struct target_ops): Add insert_watchpoint,
12086 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
12087 pointers for hardware watchpoint support.
12088 * linux-low.h (struct linux_target_ops): Ditto.
12089 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
12090 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
12091 to linux_target_ops.
12092 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
12093 reply packet.
12094 * server.c (main): Recognize 'Z' and 'z' packets.
12095
12096 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
12097
12098 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
12099 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
12100 (the_low_target): Add new members.
12101
12102 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
12103
12104 * proc-service.c (ps_lgetregs): Search all_processes instead of
12105 all_threads.
12106
12107 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
12108
12109 * server.c (start_inferior): Change return type to int.
12110 (attach_inferior): Change sigptr to int *.
12111 (handle_v_cont, handle_v_requests): Change signal to int *.
12112 (main): Change signal to int.
12113
12114 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
12115
12116 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
12117 * configure.srv: Add m32r*-*-linux*.
12118 * linux-m32r-low.c: New file.
12119
12120 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
12121
12122 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
12123
12124 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
12125
12126 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
12127 Take unsigned long arguments for PIDs.
12128 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
12129 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
12130 (wait_for_sigstop, linux_resume_one_process)
12131 (regsets_fetch_inferior_registers, linux_send_signal)
12132 (linux_read_auxv): Likewise. Update the types of variables holding
12133 PIDs. Update format string specifiers.
12134 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
12135 * remote-utils.c (prepare_resume_reply): Likewise.
12136 * server.c (cont_thread, general_thread, step_thread)
12137 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
12138 unsigned long.
12139 (handle_query): Update format specifiers.
12140 (handle_v_cont, main): Use strtoul for thread IDs.
12141 * server.h (struct inferior_list_entry): Use unsigned long for ID.
12142 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
12143 (general_thread, step_thread, thread_from_wait)
12144 (old_thread_from_wait): Update.
12145 * target.h (struct thread_resume): Use unsigned long for THREAD.
12146 (struct target_ops): Use unsigned long for arguments to attach and
12147 thread_alive.
12148
12149 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
12150
12151 * acinclude.m4: Include bfd/bfd.m4 directly.
12152 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
12153 <agriffis@toolchain.org>.
12154 * aclocal.m4, configure: Regenerated.
12155
12156 2005-01-07 Andrew Cagney <cagney@gnu.org>
12157
12158 * configure.ac: Rename configure.in, require autoconf 2.59.
12159 * configure: Re-generate.
12160
12161 2004-12-08 Daniel Jacobowitz <dan@debian.org>
12162
12163 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
12164 LIBS when finished.
12165 * aclocal.m4: Regenerated.
12166 * configure: Regenerated.
12167
12168 2004-11-21 Andreas Schwab <schwab@suse.de>
12169
12170 * linux-m68k-low.c (m68k_num_gregs): Define.
12171 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
12172 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
12173 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
12174 (m68k_breakpoint_at): New. Add to the_low_target.
12175
12176 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
12177 srv_linux_thread_db to yes.
12178
12179 2004-10-20 Joel Brobecker <brobecker@gnat.com>
12180
12181 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
12182 (ARCH_SET_FS): Likewise.
12183 (ARCH_GET_FS): Likewise.
12184 (ARCH_GET_GS): Likewise.
12185
12186 2004-10-16 Daniel Jacobowitz <dan@debian.org>
12187
12188 * linux-i386-low.c (ps_get_thread_area): New.
12189 * linux-x86-64-low.c (ps_get_thread_area): New.
12190 * linux-low.c: Include <sys/syscall.h>.
12191 (linux_kill_one_process): Don't kill the first thread here.
12192 (linux_kill): Kill the first thread here.
12193 (kill_lwp): New function.
12194 (send_sigstop, linux_send_signal): Use it.
12195 * proc-service.c: Clean up #ifdefs.
12196 (fpregset_info): Delete.
12197 (ps_lgetregs): Update and enable implementation.
12198 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
12199 implementations.
12200 * remote-utils.c (struct sym_cache, symbol_cache): New.
12201 (input_interrupt): Print a clearer message.
12202 (async_io_enabled): New variable.
12203 (enable_async_io, disable_async_io): Use it. Update comments.
12204 (look_up_one_symbol): Use the symbol cache.
12205 * thread-db.c (thread_db_look_up_symbols): New function.
12206 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
12207
12208 2004-10-16 Daniel Jacobowitz <dan@debian.org>
12209
12210 * configure.in: Test for -rdynamic.
12211 * configure: Regenerated.
12212 * Makefile (INTERNAL_LDFLAGS): New.
12213 (gdbserver, gdbreplay): Use it.
12214
12215 2004-09-02 Andrew Cagney <cagney@gnu.org>
12216
12217 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
12218
12219 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
12220
12221 * linux-low.c (linux_wait): Clear all_processes list also.
12222
12223 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
12224
12225 * linux-low.c: Include <errno.h>. Remove extern declaration of
12226 errno.
12227
12228 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
12229
12230 * gdbreplay.c, server.h, utils.c: Update copyright years.
12231
12232 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
12233
12234 * server.c (main): Print child status or termination signal from
12235 variable 'signal', not 'sig'.
12236
12237 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
12238
12239 * linux-low.c (linux_read_memory): Change return type to
12240 int. Check for and return error from ptrace().
12241 * target.c (read_inferior_memory): Change return type to int. Pass
12242 back return status from the_target->read_memory().
12243 * target.h (struct target_ops): Adapt *read_memory() prototype.
12244 Update comment.
12245 (read_inferior_memory): Adapt prototype.
12246 * server.c (main): Return an error packet if
12247 read_inferior_memory() returns an error.
12248
12249 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
12250
12251 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
12252 Unify with other clean targets.
12253
12254 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
12255
12256 * server.c (handle_v_cont): Call set_desired_inferior.
12257
12258 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
12259
12260 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
12261
12262 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
12263
12264 * linux-low.c (linux_wait): Unblock async I/O.
12265 (linux_resume): Block and enable async I/O.
12266 * remote-utils.c (block_async_io, unblock_async_io): New functions.
12267 * server.h (block_async_io, unblock_async_io): Add prototypes.
12268
12269 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
12270
12271 * remote-utils.c (remote_open): Print a status notice after
12272 opening a TCP port.
12273 * server.c (attach_inferior): Print a status notice after
12274 attaching.
12275
12276 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
12277
12278 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
12279
12280 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
12281
12282 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
12283 error packet.
12284 * server.c, target.h: Update copyright years.
12285
12286 2004-02-25 Roland McGrath <roland@redhat.com>
12287
12288 * target.h (struct target_ops): New member `read_auxv'.
12289 * server.c (handle_query): Handle qPart:auxv:read: query using that.
12290 * linux-low.c (linux_read_auxv): New function.
12291 (linux_target_ops): Initialize `read_auxv' member to that.
12292
12293 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
12294
12295 Committed by Jim Blandy <jimb@redhat.com>.
12296
12297 * linux-s390-low.c (s390_num_regs): Update.
12298 (s390_regmap): Remove control registers. Use __s390x__ predefine
12299 instead of GPR_SIZE to distiguish s390 and s390x targets.
12300
12301 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
12302
12303 * linux-low.c: Update copyright year.
12304 (check_removed_breakpoint): Clear pending_is_breakpoint.
12305 (linux_set_resume_request, linux_queue_one_thread)
12306 (resume_status_pending_p): New functions.
12307 (linux_continue_one_thread): Use process->resume.
12308 (linux_resume): Only resume threads if there are no pending events.
12309 * linux-low.h (struct process_info): Add resume request
12310 pointer.
12311
12312 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
12313
12314 * regcache.c (new_register_cache): Clear the allocated register
12315 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
12316
12317 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
12318
12319 * linux-low.c (linux_resume): Take a struct thread_resume *
12320 argument.
12321 (linux_wait): Update call.
12322 (resume_ptr): New static variable.
12323 (linux_continue_one_thread): Renamed from
12324 linux_continue_one_process. Use resume_ptr.
12325 (linux_resume): Use linux_continue_one_thread.
12326 * server.c (handle_v_cont, handle_v_requests): New functions.
12327 (myresume): New function.
12328 (main): Handle 'v' case.
12329 * target.h (struct thread_resume): New type.
12330 (struct target_ops): Change argument of "resume" to struct
12331 thread_resume *.
12332 (myresume): Delete macro.
12333
12334 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
12335
12336 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
12337 (uninstall): Support DESTDIR.
12338
12339 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
12340
12341 * configure.srv: Add xscale*linux copy of arm*linux entry.
12342
12343 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
12344
12345 * linux-arm-low.c (arm_reinsert_addr): New function.
12346 (the_low_target): Add arm_reinsert_addr.
12347
12348 2003-07-08 Mark Kettenis <kettenis@gnu.org>
12349
12350 * mem-break.c: Remove whitespace at end of file.
12351
12352 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
12353
12354 * configure.in: Check whether we need to prototype strerror.
12355 * server.h: Optionally prototype strerror.
12356 * gdbreplay.c (perror_with_name): Use strerror.
12357 * linux-low.c (linux_attach_lwp): Use strerror.
12358 * utils.c (perror_with_name): Use strerror.
12359 * config.in, configure: Regenerated.
12360
12361 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
12362
12363 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
12364 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
12365
12366 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
12367
12368 * Makefile.in (SFILES): Update.
12369 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
12370 low-sun3.c: Remove files.
12371
12372 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
12373
12374 * linux-low.c: Move comment to linux_thread_alive where it belonged.
12375 (linux_detach_one_process, linux_detach): New functions.
12376 (linux_target_ops): Add linux_detach.
12377 * server.c (main): Handle 'D' packet.
12378 * target.h (struct target_ops): Add "detach" member.
12379 (detach_inferior): Define.
12380
12381 2003-06-13 Mark Kettenis <kettenis@gnu.org>
12382
12383 From Kelley Cook <kelleycook@wideopenwest.com>:
12384 * configure.srv: Accept i[34567]86 variants.
12385
12386 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
12387
12388 * linux-low.c (linux_wait_for_event): Correct comment typos.
12389 (linux_resume_one_process): Call check_removed_breakpoint.
12390 (linux_send_signal): New function.
12391 (linux_target_ops): Add linux_send_signal.
12392 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
12393 of kill.
12394 * target.h (struct target_ops): Add send_signal.
12395
12396 2003-05-29 Jim Blandy <jimb@redhat.com>
12397
12398 * linux-low.c (usr_store_inferior_registers): Transfer buf in
12399 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
12400 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
12401 away part of the register's value.
12402
12403 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
12404
12405 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
12406 (linux_wait_for_event, linux_init_signals): Likewise.
12407
12408 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
12409
12410 * configure.in: Check for stdlib.h.
12411 * configure: Regenerated.
12412 * config.in: Regenerated.
12413
12414 2003-01-04 Andreas Schwab <schwab@suse.de>
12415
12416 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
12417
12418 2003-01-02 Andrew Cagney <ac131313@redhat.com>
12419
12420 * Makefile.in: Remove obsolete code.
12421
12422 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
12423
12424 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
12425 defined(PT_FPR0_HI).
12426
12427 2002-11-17 Stuart Hughes <seh@zee2.com>
12428
12429 * linux-arm-low.c (arm_num_regs): Increase.
12430 (arm_regmap): Include status register.
12431
12432 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
12433
12434 * linux-low.c (register_addr): Remove incorrect -1 check.
12435
12436 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
12437
12438 * linux-low.c (linux_create_inferior): Call setpgid. Return
12439 the new PID.
12440 (unstopped_p, linux_signal_pid): Remove.
12441 (linux_target_ops): Remove linux_signal_pid.
12442 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
12443 global instead of target method.
12444 * target.h (struct target_ops): Remove signal_pid. Update comment
12445 for create_inferior.
12446 * server.c (signal_pid): New variable.
12447 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
12448 gdbserver. Set the child to be the foreground process group.
12449 (attach_inferior): Set signal_pid.
12450
12451 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
12452
12453 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
12454
12455 2002-08-20 Jim Blandy <jimb@redhat.com>
12456
12457 * Makefile.in (LDFLAGS): Allow the configure script to establish a
12458 default for this.
12459
12460 2002-08-01 Andrew Cagney <cagney@redhat.com>
12461
12462 * Makefile.in: Make chill references obsolete.
12463
12464 2002-07-24 Kevin Buettner <kevinb@redhat.com>
12465
12466 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
12467 * configure: Regenerate.
12468 * config.in: Regenerate.
12469
12470 2002-07-09 David O'Brien <obrien@FreeBSD.org>
12471
12472 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
12473 (perror_with_name, remote_close, remote_open, expect, play): Static.
12474
12475 2002-07-04 Michal Ludvig <mludvig@suse.cz>
12476
12477 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
12478 byte offsets instead of an array of indexes.
12479 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
12480
12481 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
12482
12483 * regcache.c: Add comment.
12484
12485 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
12486
12487 * thread-db.c: New file.
12488 * proc-service.c: New file.
12489 * acinclude.m4: New file.
12490 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
12491 proc-service.o, and thread-db.o.
12492 (linux-low.o): Add USE_THREAD_DB.
12493 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
12494 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
12495 * aclocal.m4: Regenerated.
12496 * config.in: Regenerated.
12497 * configure: Regenerated.
12498 * configure.in: Check for proc_service.h, sys/procfs.h,
12499 thread_db.h, and linux/elf.h headrs.
12500 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
12501 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
12502 Check for -lthread_db and thread support.
12503 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
12504 PowerPC, and SuperH.
12505 * i387-fp.c: Constify arguments.
12506 * i387-fp.h: Likewise.
12507 * inferiors.c: (struct thread_info): Renamed from
12508 `struct inferior_info'. Remove PID member. Use generic inferior
12509 list header. All uses updated.
12510 (inferiors, signal_pid): Removed.
12511 (all_threads): New variable.
12512 (get_thread): Define.
12513 (add_inferior_to_list): New function.
12514 (for_each_inferior): New function.
12515 (change_inferior_id): New function.
12516 (add_inferior): Removed.
12517 (remove_inferior): New function.
12518 (add_thread): New function.
12519 (free_one_thread): New function.
12520 (remove_thread): New function.
12521 (clear_inferiors): Use for_each_inferior and free_one_thread.
12522 (find_inferior): New function.
12523 (find_inferior_id): New function.
12524 (inferior_target_data): Update argument type.
12525 (set_inferior_target_data): Likewise.
12526 (inferior_regcache_data): Likewise.
12527 (set_inferior_regcache_data): Likewise.
12528 * linux-low.c (linux_bp_reinsert): Remove.
12529 (all_processes, stopping_threads, using_thrads)
12530 (struct pending_signals, debug_threads, pid_of): New.
12531 (inferior_pid): Replace with macro.
12532 (struct inferior_linux_data): Remove.
12533 (get_stop_pc, add_process): New functions.
12534 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
12535 Use add_process and add_thread.
12536 (linux_attach_lwp): New function, based on old linux_attach. Use
12537 add_process and add_thread. Set stop_expected for new threads.
12538 (linux_attach): New function.
12539 (linux_kill_one_process): New function.
12540 (linux_kill): Kill all LWPs.
12541 (linux_thread_alive): Use find_inferior_id.
12542 (check_removed_breakpoints, status_pending_p): New functions.
12543 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
12544 Update. Use WNOHANG. Wait for cloned processes also. Update process
12545 struct for the found process.
12546 (linux_wait_for_event): New function.
12547 (linux_wait): Use it. Support LWPs.
12548 (send_sigstop, wait_for_sigstop, stop_all_processes)
12549 (linux_resume_one_process, linux_continue_one_process): New functions.
12550 (linux_resume): Support LWPs.
12551 (REGISTER_RAW_SIZE): Remove.
12552 (fetch_register): Use register_size instead. Call supply_register.
12553 (usr_store_inferior_registers): Likewise. Call collect_register.
12554 Fix recursive case.
12555 (regsets_fetch_inferior_registers): Improve error message.
12556 (regsets_store_inferior_registers): Add debugging.
12557 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
12558 (unstopped_p, linux_signal_pid): New functions.
12559 (linux_target_ops): Add linux_signal_pid.
12560 (linux_init_signals): New function.
12561 (initialize_low): Call it. Initialize using_threads.
12562 * regcache.c (inferior_regcache_data): Add valid
12563 flag.
12564 (get_regcache): Fetch registers lazily. Add fetch argument
12565 and update all callers.
12566 (regcache_invalidate_one, regcache_invalidate): New
12567 functions.
12568 (new_register_cache): Renamed from create_register_cache.
12569 Return the new regcache.
12570 (free_register_cache): Change argument to a void *.
12571 (registers_to_string, registers_from_string): Call get_regcache
12572 with fetch flag set.
12573 (register_data): Make static. Pass fetch flag to get_regcache.
12574 (supply_register): Call get_regcache with fetch flag clear.
12575 (collect_register): Call get_regcache with fetch flag set.
12576 (collect_register_as_string): New function.
12577 * regcache.h: Update.
12578 * remote-utils.c (putpkt): Flush after debug output and use
12579 stderr.
12580 Handle input interrupts while waiting for an ACK.
12581 (input_interrupt): Use signal_pid method.
12582 (getpkt): Flush after debug output and use stderr.
12583 (outreg): Use collect_register_as_string.
12584 (new_thread_notify, dead_thread_notify): New functions.
12585 (prepare_resume_reply): Check using_threads. Set thread_from_wait
12586 and general_thread.
12587 (look_up_one_symbol): Flush after debug output.
12588 * server.c (step_thread, server_waiting): New variables.
12589 (start_inferior): Don't use signal_pid. Update call to mywait.
12590 (attach_inferior): Update call to mywait.
12591 (handle_query): Handle qfThreadInfo and qsThreadInfo.
12592 (main): Don't fetch/store registers explicitly. Use
12593 set_desired_inferior. Support proposed ``Hs'' packet. Update
12594 calls to mywait.
12595 * server.h: Update.
12596 (struct inferior_list, struct_inferior_list_entry): New.
12597 * target.c (set_desired_inferior): New.
12598 (write_inferior_memory): Constify.
12599 (mywait): New function.
12600 * target.h: Update.
12601 (struct target_ops): New signal_pid method.
12602 (mywait): Removed macro, added prototype.
12603
12604 * linux-low.h (regset_func): Removed.
12605 (regset_fill_func, regset_store_func): New.
12606 (enum regset_type): New.
12607 (struct regset_info): Add type field. Use new operation types.
12608 (struct linux_target_ops): stop_pc renamed to get_pc.
12609 Add decr_pc_after_break and breakpoint_at.
12610 (get_process, get_thread_proess, get_process_thread)
12611 (strut process_info, all_processes, linux_attach_lwp)
12612 (thread_db_init): New.
12613
12614 * linux-arm-low.c (arm_get_pc, arm_set_pc,
12615 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
12616 (the_low_target): Add new members.
12617 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
12618 (i386_store_fpxregset): Constify.
12619 (target_regsets): Add new kind identifier.
12620 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
12621 (i386_set_pc): Add debugging.
12622 (i386_breakpoint_at): New function.
12623 (the_low_target): Add new members.
12624 * linux-mips-low.c (mips_get_pc, mips_set_pc)
12625 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
12626 (mips_breakpoint_at): New.
12627 (the_low_target): Add new members.
12628 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
12629 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
12630 (the_low_target): Add new members.
12631 * linux-sh-low.c (sh_get_pc, sh_set_pc)
12632 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
12633 (the_low_target): Add new members.
12634 * linux-x86-64-low.c (target_regsets): Add new kind
12635 identifier.
12636
12637 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
12638
12639 From Martin Pool <mbp@samba.org>:
12640 * server.c (gdbserver_usage): New function.
12641 (main): Call it.
12642
12643 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
12644
12645 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
12646 stop_at -> stop_pc.
12647
12648 2002-05-04 Andrew Cagney <ac131313@redhat.com>
12649
12650 * Makefile.in: Remove obsolete code.
12651
12652 2002-04-24 Michal Ludvig <mludvig@suse.cz>
12653
12654 * linux-low.c (regsets_fetch_inferior_registers),
12655 (regsets_store_inferior_registers): Removed cast to int from
12656 ptrace() calls.
12657 * regcache.h: Added declaration of struct inferior_info.
12658
12659 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
12660
12661 * inferiors.c (struct inferior_info): Add regcache_data.
12662 (add_inferior): Call create_register_cache.
12663 (clear_inferiors): Call free_register_cache.
12664 (inferior_regcache_data, set_inferior_regcache_data): New functions.
12665 * regcache.c (struct inferior_regcache_data): New.
12666 (registers): Remove.
12667 (get_regcache): New function.
12668 (create_register_cache, free_register_cache): New functions.
12669 (set_register_cache): Don't initialize the register cache here.
12670 (registers_to_string, registers_from_string, register_data): Call
12671 get_regcache.
12672 * regcache.h: Add prototypes.
12673 * server.h: Likewise.
12674
12675 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
12676
12677 * mem-break.c: New file.
12678 * mem-break.h: New file.
12679 * Makefile.in: Add mem-break.o rule; update server.h
12680 dependencies.
12681 * inferiors.c (struct inferior_info): Add target_data
12682 member.
12683 (clear_inferiors): Free target_data member if set.
12684 (inferior_target_data, set_inferior_target_data): New functions.
12685 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
12686 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
12687 * linux-low.c (linux_bp_reinsert): New variable.
12688 (struct inferior_linux_data): New.
12689 (linux_create_inferior): Use set_inferior_target_data.
12690 (linux_attach): Likewise. Call add_inferior.
12691 (linux_wait_for_one_inferior): New function.
12692 (linux_wait): Call it.
12693 (linux_write_memory): Add const.
12694 (initialize_low): Call set_breakpoint_data.
12695 * linux-low.h (struct linux_target_ops): Add breakpoint
12696 handling members.
12697 * server.c (attach_inferior): Remove extra add_inferior
12698 call.
12699 * server.h: Include mem-break.h. Update inferior.c
12700 prototypes.
12701 * target.c (read_inferior_memory)
12702 (write_inferior_memory): New functions.
12703 * target.h (read_inferior_memory)
12704 (write_inferior_memory): Change macros to prototypes.
12705 (struct target_ops): Update comments. Add const to write_memory
12706 definition.
12707
12708 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
12709
12710 * linux-low.c (usr_store_inferior_registers): Support
12711 registers which are allowed to fail to store.
12712 * linux-low.h (linux_target_ops): Likewise.
12713 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
12714 (ppc_cannot_store_register): FPSCR may not be storable.
12715
12716 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
12717
12718 * server.h: Include <string.h> if HAVE_STRING_H.
12719 * ChangeLog: Correct paths in last ChangeLog entry.
12720
12721 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
12722
12723 * linux-low.h: Remove obsolete prototypes.
12724 (struct linux_target_ops): New.
12725 (extern the_low_target): New.
12726 * linux-low.c (num_regs, regmap): Remove declarations.
12727 (register_addr): Use the_low_target explicitly.
12728 (fetch_register): Likewise.
12729 (usr_fetch_inferior_registers): Likewise.
12730 (usr_store_inferior_registers): Likewise.
12731 * linux-arm-low.c (num_regs): Remove.
12732 (arm_num_regs): Define.
12733 (arm_regmap): Renamed from regmap, made static.
12734 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
12735 made static.
12736 (arm_cannot_store_register): Renamed from cannot_store_register,
12737 made static.
12738 (the_low_target): New.
12739 * linux-i386-low.c (num_regs): Remove.
12740 (i386_num_regs): Define.
12741 (i386_regmap): Renamed from regmap, made static.
12742 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
12743 made static.
12744 (i386_cannot_store_register): Renamed from cannot_store_register,
12745 made static.
12746 (the_low_target): New.
12747 * linux-ia64-low.c (num_regs): Remove.
12748 (ia64_num_regs): Define.
12749 (ia64_regmap): Renamed from regmap, made static.
12750 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
12751 made static.
12752 (ia64_cannot_store_register): Renamed from cannot_store_register,
12753 made static.
12754 (the_low_target): New.
12755 * linux-m68k-low.c (num_regs): Remove.
12756 (m68k_num_regs): Define.
12757 (m68k_regmap): Renamed from regmap, made static.
12758 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
12759 made static.
12760 (m68k_cannot_store_register): Renamed from cannot_store_register,
12761 made static.
12762 (the_low_target): New.
12763 * linux-mips-low.c (num_regs): Remove.
12764 (mips_num_regs): Define.
12765 (mips_regmap): Renamed from regmap, made static.
12766 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
12767 made static.
12768 (mips_cannot_store_register): Renamed from cannot_store_register,
12769 made static.
12770 (the_low_target): New.
12771 * linux-ppc-low.c (num_regs): Remove.
12772 (ppc_num_regs): Define.
12773 (ppc_regmap): Renamed from regmap, made static.
12774 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
12775 made static.
12776 (ppc_cannot_store_register): Renamed from cannot_store_register,
12777 made static.
12778 (the_low_target): New.
12779 * linux-s390-low.c (num_regs): Remove.
12780 (s390_num_regs): Define.
12781 (s390_regmap): Renamed from regmap, made static.
12782 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
12783 made static.
12784 (s390_cannot_store_register): Renamed from cannot_store_register,
12785 made static.
12786 (the_low_target): New.
12787 * linux-sh-low.c (num_regs): Remove.
12788 (sh_num_regs): Define.
12789 (sh_regmap): Renamed from regmap, made static.
12790 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
12791 made static.
12792 (sh_cannot_store_register): Renamed from cannot_store_register,
12793 made static.
12794 (the_low_target): New.
12795 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
12796 (the_low_target): New.
12797
12798 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
12799
12800 * Makefile.in: Add stamp-h target.
12801 * configure.in: Create stamp-h.
12802 * configure: Regenerated.
12803
12804 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
12805
12806 * inferiors.c: New file.
12807 * target.c: New file.
12808 * target.h: New file.
12809 * Makefile.in: Add target.o and inferiors.o. Update
12810 dependencies.
12811 * linux-low.c (inferior_pid): New static variable,
12812 moved from server.c.
12813 (linux_create_inferior): Renamed from create_inferior.
12814 Call add_inferior. Return 0 on success instead of a PID.
12815 (linux_attach): Renamed from myattach.
12816 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
12817 (linux_thread_alive): Renamed from mythread_alive.
12818 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
12819 child dies.
12820 (linux_resume): Renamed from myresume. Add missing ``return 0''.
12821 (regsets_store_inferior_registers): Correct error message.
12822 Add missing ``return 0''.
12823 (linux_fetch_registers): Renamed from fetch_inferior_registers.
12824 (linux_store_registers): Renamed from store_inferior_registers.
12825 (linux_read_memory): Renamed from read_inferior_memory.
12826 (linux_write_memory): Renamed from write_inferior_memory.
12827 (linux_target_ops): New structure.
12828 (initialize_low): Call set_target_ops ().
12829 * remote-utils.c (unhexify): New function.
12830 (hexify): New function.
12831 (input_interrupt): Send signals to ``signal_pid''.
12832 * server.c (inferior_pid): Remove.
12833 (start_inferior): Update create_inferior call.
12834 (attach_inferior): Call add_inferior.
12835 (handle_query): New function.
12836 (main): Call handle_query for `q' packets.
12837 * server.h: Include "target.h". Remove obsolete prototypes.
12838 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
12839
12840 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
12841
12842 * Makefile.in: Add WARN_CFLAGS. Update configury
12843 dependencies.
12844 * configure.in: Check for <string.h>
12845 * configure: Regenerate.
12846 * config.in: Regenerate.
12847 * gdbreplay.c: Include needed system headers.
12848 (remote_open): Remove strchr prototype.
12849 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
12850 * regcache.c (supply_register): Change buf argument to const void *.
12851 (supply_register_by_name): Likewise.
12852 (collect_register): Change buf argument to void *.
12853 (collect_register_by_name): Likewise.
12854 * regcache.h: Add missing prototypes.
12855 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
12856 * server.c (handle_query): New function.
12857 (attached): New static variable, moved out of main.
12858 (main): Quiet longjmp clobber warnings.
12859 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
12860 * utils.c (error): Remove NORETURN.
12861 (fatal): Likewise.
This page took 0.373654 seconds and 5 git commands to generate.