[C++/mingw] gdbserver: gdb/host signal mixup
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
1 2015-11-17 Pedro Alves <palves@redhat.com>
2
3 * win32-low.c (win32_resume): Use gdb_signal_from_host,
4 GDB_SIGNAL_0 and gdb_signal_to_string.
5
6 2015-11-17 Pedro Alves <palves@redhat.com>
7
8 * win32-low.c (handle_output_debug_string): Remove parameter.
9 (win32_kill): Remove our_status local and adjust call to
10 handle_output_debug_string.
11 (get_child_debug_event): Adjust call to
12 handle_output_debug_string.
13
14 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
15
16 * linux-mips-low.c (mips_fill_gregset): Add cast.
17 (mips_store_gregset): Likewise.
18 (mips_fill_fpregset): Likewise.
19 (mips_store_fpregset): Likewise.
20
21 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
22
23 * linux-mips-low.c (mips_add_watchpoint): Rename private to
24 priv.
25
26 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
27
28 * linux-mips-low.c (mips_linux_new_thread): Change type of
29 watch_type to enum target_hw_bp_type.
30
31 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
32
33 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
34 Change return type to arm_hwbp_type.
35
36 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
37
38 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
39 (arm_store_gregset): Likewise.
40 * linux-arm-low.c (arm_get_hwcap): Likewise.
41 (arm_read_description): Likewise.
42
43 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
44
45 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
46
47 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
48
49 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
50 (ppc_fill_vsxregset): Likewise.
51 (ppc_store_vsxregset): Likewise.
52 (ppc_fill_vrregset): Likewise.
53 (ppc_store_vrregset): Likewise.
54 (ppc_fill_evrregset): Likewise.
55 (ppc_store_evrregset): Likewise.
56
57 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
58
59 * linux-ppc-low.c (ppc_usrregs_info): Remove
60 forward-declaration.
61 (ppc_arch_setup): Move lower in file.
62
63 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
64
65 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
66 (ps_pdwrite): Likewise.
67
68 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
69
70 * linux-arm-low.c (arm_new_thread): Move pointer dereference
71 to after assert checks.
72
73 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
74
75 * proc-service.c (ps_pdread): Add/adjust casts.
76 (ps_pdwrite): Add/adjust casts.
77
78 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
79
80 * server.c (handle_search_memory_1): Cast return value of
81 memmem.
82
83 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
84
85 * server.c (write_qxfer_response): Change type of data to
86 gdb_byte *.
87
88 2015-10-29 Pedro Alves <palves@redhat.com>
89
90 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
91
92 2015-10-29 Pedro Alves <palves@redhat.com>
93
94 * tracepoint.c (clear_installed_tracepoints): Add casts.
95
96 2015-10-29 Pedro Alves <palves@redhat.com>
97
98 * server.c (handle_v_cont, process_serial_event): Add enum
99 gdb_signal casts to signal parsing code.
100
101 2015-10-29 Pedro Alves <palves@redhat.com>
102
103 * linux-low.h (NULL_REGSET): Define.
104 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
105 * linux-arm-low.c (arm_regsets): Likewise.
106 * linux-crisv32-low.c (cris_regsets): Likewise.
107 * linux-m68k-low.c (m68k_regsets): Likewise.
108 * linux-mips-low.c (mips_regsets): Likewise.
109 * linux-nios2-low.c (nios2_regsets): Likewise.
110 * linux-ppc-low.c (ppc_regsets): Likewise.
111 * linux-s390-low.c (s390_regsets): Likewise.
112 * linux-sh-low.c (sh_regsets): Likewise.
113 * linux-sparc-low.c (sparc_regsets): Likewise.
114 * linux-tic6x-low.c (tic6x_regsets): Likewise.
115 * linux-tile-low.c (tile_regsets): Likewise.
116 * linux-x86-low.c (x86_regsets): Likewise.
117 * linux-xtensa-low.c (xtensa_regsets): Likewise.
118
119 2015-10-29 Pedro Alves <palves@redhat.com>
120
121 * linux-low.h (NULL_REGSET): Define.
122 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
123 * linux-arm-low.c (arm_regsets): Likewise.
124 * linux-crisv32-low.c (cris_regsets): Likewise.
125 * linux-m68k-low.c (m68k_regsets): Likewise.
126 * linux-mips-low.c (mips_regsets): Likewise.
127 * linux-nios2-low.c (nios2_regsets): Likewise.
128 * linux-ppc-low.c (ppc_regsets): Likewise.
129 * linux-s390-low.c (s390_regsets): Likewise.
130 * linux-sh-low.c (sh_regsets): Likewise.
131 * linux-sparc-low.c (sparc_regsets): Likewise.
132 * linux-tic6x-low.c (tic6x_regsets): Likewise.
133 * linux-tile-low.c (tile_regsets): Likewise.
134 * linux-x86-low.c (x86_regsets): Likewise.
135 * linux-xtensa-low.c (xtensa_regsets): Likewise.
136
137 2015-10-26 Doug Evans <dje@google.com>
138
139 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
140
141 2015-10-26 Doug Evans <dje@google.com>
142
143 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
144
145 2015-10-26 Doug Evans <dje@google.com>
146
147 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
148 for debug_printf.
149 (attach_thread, find_new_threads_callback): Ditto.
150
151 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
152
153 * mem-break.h (set_breakpoint_data): Remove.
154
155 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
156
157 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
158 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
159 (initialize_low): Remove set_breakpoint_data call.
160 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
161 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
162 (initialize_low): Remove set_breakpoint_data call.
163 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
164 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
165 (initialize_low): Remove set_breakpoint_data call.
166
167 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
168
169 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
170 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
171 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
172 * target.h (target_breakpoint_kind_from_pc): New macro.
173
174 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
175
176 * linux-low.c (default_breakpoint_kind_from_pc): New function.
177 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
178 the default breakpoint kind.
179
180 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
181
182 * linux-arm-low.c (arm_supports_z_point_type): Add software
183 breakpoint support.
184
185 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
186
187 * linux-arm-low.c: Refactor breakpoint definitions.
188 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
189 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
190
191 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
192
193 * Makefile.in: Add arm.c/o.
194 * configure.srv: Likewise.
195 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
196 (arm_breakpoint_kind_from_pc): New function.
197 (arm_sw_breakpoint_from_kind): Return proper kind.
198 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
199
200 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
201
202 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
203 removal.
204 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
205 (struct raw_breakpoint) <size>: Remove.
206 (struct raw_breakpoint) <kind>: Add.
207 (bp_size): New function.
208 (bp_opcode): Likewise.
209 (find_raw_breakpoint_at): Adjust for kind.
210 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
211 (remove_memory_breakpoint): Adjust for kind call bp_size.
212 (set_raw_breakpoint_at): Adjust for kind.
213 (set_breakpoint): Likewise.
214 (set_breakpoint_at): Call breakpoint_kind_from_pc.
215 (delete_raw_breakpoint): Adjust for kind.
216 (delete_breakpoint): Likewise.
217 (find_gdb_breakpoint): Likewise.
218 (set_gdb_breakpoint_1): Likewise.
219 (set_gdb_breakpoint): Likewise.
220 (delete_gdb_breakpoint_1): Likewise.
221 (delete_gdb_breakpoint): Likewise.
222 (uninsert_raw_breakpoint): Likewise.
223 (reinsert_raw_breakpoint): Likewise.
224 (set_breakpoint_data): Remove.
225 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
226 (check_mem_read): Adjust for kind call bp_size.
227 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
228 (clone_one_breakpoint): Adjust for kind.
229 * mem-break.h (set_gdb_breakpoint): Likewise.
230 (delete_gdb_breakpoint): Likewise.
231 * server.c (process_serial_event): Likewise.
232
233 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
234
235 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
236 (struct linux_target_ops) <breakpoint>: Remove.
237 (struct linux_target_ops) <breakpoint_len>: Remove.
238 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
239 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
240 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
241 (arm_sw_breakpoint_from_kind): New function.
242 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
243 (struct linux_target_ops) <breakpoint>: Remove.
244 (struct linux_target_ops) <breakpoint_len>: Remove.
245 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
246 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
247 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
248 (struct linux_target_ops) <breakpoint>: Remove.
249 (struct linux_target_ops) <breakpoint_len>: Remove.
250 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
251 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
252 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
253 (struct linux_target_ops) <breakpoint>: Remove.
254 (struct linux_target_ops) <breakpoint_len>: Remove.
255 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
256 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
257 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
258 and sw_breakpoint_from_kind to increment the pc.
259 (linux_breakpoint_kind_from_pc): New function.
260 (linux_sw_breakpoint_from_kind): New function.
261 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
262 (initialize_low): Call breakpoint_kind_from_pc and
263 sw_breakpoint_from_kind to replace breakpoint_data/len.
264 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
265 New field.
266 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
267 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
268 (struct linux_target_ops) <breakpoint>: Remove.
269 (struct linux_target_ops) <breakpoint_len>: Remove.
270 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
271 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
272 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
273 (struct linux_target_ops) <breakpoint>: Remove.
274 (struct linux_target_ops) <breakpoint_len>: Remove.
275 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
276 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
277 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
278 (struct linux_target_ops) <breakpoint>: Remove.
279 (struct linux_target_ops) <breakpoint_len>: Remove.
280 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
281 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
282 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
283 (struct linux_target_ops) <breakpoint>: Remove.
284 (struct linux_target_ops) <breakpoint_len>: Remove.
285 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
286 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
287 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
288 (struct linux_target_ops) <breakpoint>: Remove.
289 (struct linux_target_ops) <breakpoint_len>: Remove.
290 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
291 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
292 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
293 (struct linux_target_ops) <breakpoint>: Remove.
294 (struct linux_target_ops) <breakpoint_len>: Remove.
295 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
296 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
297 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
298 (struct linux_target_ops) <breakpoint>: Remove.
299 (struct linux_target_ops) <breakpoint_len>: Remove.
300 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
301 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
302 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
303 (struct linux_target_ops) <breakpoint>: Remove.
304 (struct linux_target_ops) <breakpoint_len>: Remove.
305 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
306 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
307 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
308 (struct linux_target_ops) <breakpoint>: Remove.
309 (struct linux_target_ops) <breakpoint_len>: Remove.
310 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
311 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
312 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
313 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
314 (struct linux_target_ops) <breakpoint>: Remove.
315 (struct linux_target_ops) <breakpoint_len>: Remove.
316 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
317 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
318 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
319 (struct linux_target_ops) <breakpoint>: Remove.
320 (struct linux_target_ops) <breakpoint_len>: Remove.
321 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
322 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
323
324 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
325
326 * linux-cris-low.c (cris_get_pc): Remove void arg.
327
328 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
329
330 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
331 variable name.
332
333 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
334
335 * inferiors.c (thread_pid_matches_callback): New function.
336 (find_thread_process): New function.
337 (remove_thread): Reset current_thread.
338 (remove_process): Assert threads have been removed first.
339
340 2015-10-15 Yao Qi <yao.qi@linaro.org>
341
342 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
343 if it is 3.
344 (aarch64_remove_point): Likewise.
345 * regcache.c (regcache_register_size): New function.
346
347 2015-10-12 Yao Qi <yao.qi@linaro.org>
348
349 * linux-aarch64-low.c: Update all callers as emit_load_store
350 is renamed to aarch64_emit_load_store.
351
352 2015-10-12 Yao Qi <yao.qi@linaro.org>
353
354 * linux-aarch64-low.c: Update all callers of function renaming
355 from emit_insn to aarch64_emit_insn.
356
357 2015-10-12 Yao Qi <yao.qi@linaro.org>
358
359 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
360 arch/aarch64-insn.h.
361 (struct aarch64_memory_operand): Likewise.
362 (ENCODE): Likewise.
363 (emit_insn): Move to arch/aarch64-insn.c.
364 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
365 (emit_load_store): Move to arch/aarch64-insn.c.
366 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
367 (can_encode_int32): Remove.
368
369 2015-10-12 Yao Qi <yao.qi@linaro.org>
370
371 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
372 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
373 (aarch64_relocate_instruction): Likewise.
374 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
375 (struct aarch64_insn_visitor): Likewise.
376
377 2015-10-12 Yao Qi <yao.qi@linaro.org>
378
379 * linux-aarch64-low.c (struct aarch64_insn_data): New.
380 (struct aarch64_insn_visitor): New.
381 (struct aarch64_insn_relocation_data): New.
382 (aarch64_ftrace_insn_reloc_b): New function.
383 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
384 (aarch64_ftrace_insn_reloc_cb): Likewise.
385 (aarch64_ftrace_insn_reloc_tb): Likewise.
386 (aarch64_ftrace_insn_reloc_adr): Likewise.
387 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
388 (aarch64_ftrace_insn_reloc_others): Likewise.
389 (visitor): New.
390 (aarch64_relocate_instruction): Use visitor.
391
392 2015-10-12 Yao Qi <yao.qi@linaro.org>
393
394 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
395 int. Add argument buf.
396 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
397 aarch64_relocate_instruction.
398
399 2015-10-12 Yao Qi <yao.qi@linaro.org>
400
401 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
402 argument insn. Remove local variable insn. Don't call
403 target_read_uint32.
404 (aarch64_install_fast_tracepoint_jump_pad): Call
405 target_read_uint32.
406
407 2015-09-30 Yao Qi <yao.qi@linaro.org>
408
409 * linux-aarch64-low.c (emit_movk): Shorten a long line.
410 (emit_load_store_pair): Likewise.
411
412 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
413
414 * dll.c (match_dll): Add cast(s).
415 (unloaded_dll): Likewise.
416 * linux-low.c (second_thread_of_pid_p): Likewise.
417 (delete_lwp_callback): Likewise.
418 (count_events_callback): Likewise.
419 (select_event_lwp_callback): Likewise.
420 (linux_set_resume_request): Likewise.
421 * server.c (accumulate_file_name_length): Likewise.
422 (emit_dll_description): Likewise.
423 (handle_qxfer_threads_worker): Likewise.
424 (visit_actioned_threads): Likewise.
425 * thread-db.c (any_thread_of): Likewise.
426 * tracepoint.c (same_process_p): Likewise.
427 (match_blocktype): Likewise.
428 (build_traceframe_info_xml): Likewise.
429
430 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
431
432 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
433 assignment.
434 (gdb_unparse_agent_expr): Likewise.
435 * hostio.c (require_data): Likewise.
436 (handle_pread): Likewise.
437 * linux-low.c (disable_regset): Likewise.
438 (fetch_register): Likewise.
439 (store_register): Likewise.
440 (get_dynamic): Likewise.
441 (linux_qxfer_libraries_svr4): Likewise.
442 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
443 (set_fast_tracepoint_jump): Likewise.
444 (uninsert_fast_tracepoint_jumps_at): Likewise.
445 (reinsert_fast_tracepoint_jumps_at): Likewise.
446 (validate_inserted_breakpoint): Likewise.
447 (clone_agent_expr): Likewise.
448 * regcache.c (init_register_cache): Likewise.
449 * remote-utils.c (putpkt_binary_1): Likewise.
450 (decode_M_packet): Likewise.
451 (decode_X_packet): Likewise.
452 (look_up_one_symbol): Likewise.
453 (relocate_instruction): Likewise.
454 (monitor_output): Likewise.
455 * server.c (handle_search_memory): Likewise.
456 (handle_qxfer_exec_file): Likewise.
457 (handle_qxfer_libraries): Likewise.
458 (handle_qxfer): Likewise.
459 (handle_query): Likewise.
460 (handle_v_cont): Likewise.
461 (handle_v_run): Likewise.
462 (captured_main): Likewise.
463 * target.c (write_inferior_memory): Likewise.
464 * thread-db.c (try_thread_db_load_from_dir): Likewise.
465 * tracepoint.c (init_trace_buffer): Likewise.
466 (add_tracepoint_action): Likewise.
467 (add_traceframe): Likewise.
468 (add_traceframe_block): Likewise.
469 (cmd_qtdpsrc): Likewise.
470 (cmd_qtdv): Likewise.
471 (cmd_qtstatus): Likewise.
472 (response_source): Likewise.
473 (response_tsv): Likewise.
474 (cmd_qtnotes): Likewise.
475 (gdb_collect): Likewise.
476 (initialize_tracepoint): Likewise.
477
478 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
479
480 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
481 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
482 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
483 <NOP>: New.
484 (enum aarch64_condition_codes): New enum.
485 (w0): New static global.
486 (fp): Likewise.
487 (lr): Likewise.
488 (struct aarch64_memory_operand) <type>: New
489 MEMORY_OPERAND_POSTINDEX type.
490 (postindex_memory_operand): New helper function.
491 (emit_ret): New function.
492 (emit_load_store_pair): New function, factored out of emit_stp
493 with support for MEMORY_OPERAND_POSTINDEX.
494 (emit_stp): Rewrite using emit_load_store_pair.
495 (emit_ldp): New function.
496 (emit_load_store): Likewise.
497 (emit_ldr): Mention post-index instruction in comment.
498 (emit_ldrh): New function.
499 (emit_ldrb): New function.
500 (emit_ldrsw): Mention post-index instruction in comment.
501 (emit_str): Likewise.
502 (emit_subs): New function.
503 (emit_cmp): Likewise.
504 (emit_and): Likewise.
505 (emit_orr): Likewise.
506 (emit_orn): Likewise.
507 (emit_eor): Likewise.
508 (emit_mvn): Likewise.
509 (emit_lslv): Likewise.
510 (emit_lsrv): Likewise.
511 (emit_asrv): Likewise.
512 (emit_mul): Likewise.
513 (emit_sbfm): Likewise.
514 (emit_sbfx): Likewise.
515 (emit_ubfm): Likewise.
516 (emit_ubfx): Likewise.
517 (emit_csinc): Likewise.
518 (emit_cset): Likewise.
519 (emit_nop): Likewise.
520 (emit_ops_insns): New helper function.
521 (emit_pop): Likewise.
522 (emit_push): Likewise.
523 (aarch64_emit_prologue): New function.
524 (aarch64_emit_epilogue): Likewise.
525 (aarch64_emit_add): Likewise.
526 (aarch64_emit_sub): Likewise.
527 (aarch64_emit_mul): Likewise.
528 (aarch64_emit_lsh): Likewise.
529 (aarch64_emit_rsh_signed): Likewise.
530 (aarch64_emit_rsh_unsigned): Likewise.
531 (aarch64_emit_ext): Likewise.
532 (aarch64_emit_log_not): Likewise.
533 (aarch64_emit_bit_and): Likewise.
534 (aarch64_emit_bit_or): Likewise.
535 (aarch64_emit_bit_xor): Likewise.
536 (aarch64_emit_bit_not): Likewise.
537 (aarch64_emit_equal): Likewise.
538 (aarch64_emit_less_signed): Likewise.
539 (aarch64_emit_less_unsigned): Likewise.
540 (aarch64_emit_ref): Likewise.
541 (aarch64_emit_if_goto): Likewise.
542 (aarch64_emit_goto): Likewise.
543 (aarch64_write_goto_address): Likewise.
544 (aarch64_emit_const): Likewise.
545 (aarch64_emit_call): Likewise.
546 (aarch64_emit_reg): Likewise.
547 (aarch64_emit_pop): Likewise.
548 (aarch64_emit_stack_flush): Likewise.
549 (aarch64_emit_zero_ext): Likewise.
550 (aarch64_emit_swap): Likewise.
551 (aarch64_emit_stack_adjust): Likewise.
552 (aarch64_emit_int_call_1): Likewise.
553 (aarch64_emit_void_call_2): Likewise.
554 (aarch64_emit_eq_goto): Likewise.
555 (aarch64_emit_ne_goto): Likewise.
556 (aarch64_emit_lt_goto): Likewise.
557 (aarch64_emit_le_goto): Likewise.
558 (aarch64_emit_gt_goto): Likewise.
559 (aarch64_emit_ge_got): Likewise.
560 (aarch64_emit_ops_impl): New static global variable.
561 (aarch64_emit_ops): New target function, return
562 &aarch64_emit_ops_impl.
563 (struct linux_target_ops): Install it.
564
565 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
566
567 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
568 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
569 aarch64-ipa.o.
570 * linux-aarch64-ipa.c: New file.
571 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
572 and endian.h.
573 (aarch64_get_thread_area): New target method.
574 (extract_signed_bitfield): New helper function.
575 (aarch64_decode_ldr_literal): New function.
576 (enum aarch64_opcodes): New enum.
577 (struct aarch64_register): New struct.
578 (struct aarch64_operand): New struct.
579 (x0): New static global.
580 (x1): Likewise.
581 (x2): Likewise.
582 (x3): Likewise.
583 (x4): Likewise.
584 (w2): Likewise.
585 (ip0): Likewise.
586 (sp): Likewise.
587 (xzr): Likewise.
588 (aarch64_register): New helper function.
589 (register_operand): Likewise.
590 (immediate_operand): Likewise.
591 (struct aarch64_memory_operand): New struct.
592 (offset_memory_operand): New helper function.
593 (preindex_memory_operand): Likewise.
594 (enum aarch64_system_control_registers): New enum.
595 (ENCODE): New macro.
596 (emit_insn): New helper function.
597 (emit_b): New function.
598 (emit_bcond): Likewise.
599 (emit_cb): Likewise.
600 (emit_tb): Likewise.
601 (emit_blr): Likewise.
602 (emit_stp): Likewise.
603 (emit_ldp_q_offset): Likewise.
604 (emit_stp_q_offset): Likewise.
605 (emit_load_store): Likewise.
606 (emit_ldr): Likewise.
607 (emit_ldrsw): Likewise.
608 (emit_str): Likewise.
609 (emit_ldaxr): Likewise.
610 (emit_stxr): Likewise.
611 (emit_stlr): Likewise.
612 (emit_data_processing_reg): Likewise.
613 (emit_data_processing): Likewise.
614 (emit_add): Likewise.
615 (emit_sub): Likewise.
616 (emit_mov): Likewise.
617 (emit_movk): Likewise.
618 (emit_mov_addr): Likewise.
619 (emit_mrs): Likewise.
620 (emit_msr): Likewise.
621 (emit_sevl): Likewise.
622 (emit_wfe): Likewise.
623 (append_insns): Likewise.
624 (can_encode_int32_in): New helper function.
625 (aarch64_relocate_instruction): New function.
626 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
627 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
628 (struct linux_target_ops): Install aarch64_get_thread_area,
629 aarch64_install_fast_tracepoint_jump_pad and
630 aarch64_get_min_fast_tracepoint_insn_len.
631
632 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
633
634 * Makefile.in (aarch64-insn.o): New rule.
635 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
636
637 2015-09-21 Yao Qi <yao.qi@linaro.org>
638
639 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
640
641 2015-09-21 Yao Qi <yao.qi@linaro.org>
642
643 * tracepoint.c (max_jump_pad_size): Remove.
644
645 2015-09-18 Yao Qi <yao.qi@linaro.org>
646
647 * linux-aarch64-low.c: Don't include sys/uio.h.
648 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
649
650 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
651
652 * tracepoint.c (eval_result_type): Change prototype.
653 (condition_true_at_tracepoint): Fix argument to compiled_cond.
654
655 2015-09-15 Pedro Alves <palves@redhat.com>
656
657 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
658 Check whether to report exec events instead of checking whether
659 multiprocess is enabled.
660
661 2015-09-15 Pedro Alves <palves@redhat.com>
662
663 PR remote/18965
664 * remote-utils.c (prepare_resume_reply): Merge
665 TARGET_WAITKIND_VFORK_DONE switch case with the
666 TARGET_WAITKIND_FORKED case.
667
668 2015-09-15 Yao Qi <yao.qi@linaro.org>
669
670 * server.c (handle_query): Check string comparison using
671 "else if" instead of "if".
672
673 2015-09-15 Yao Qi <yao.qi@linaro.org>
674
675 * server.c (vCont_supported): New global variable.
676 (handle_query): Set vCont_supported to 1 if "vContSupported+"
677 matches. Append ";vContSupported+" to own_buf.
678 (handle_v_requests): Append ";s;S" to own_buf if target supports
679 hardware single step or vCont_supported is false.
680 (capture_main): Set vCont_supported to zero.
681
682 2015-09-15 Yao Qi <yao.qi@linaro.org>
683
684 * linux-low.c (linux_supports_conditional_breakpoints): Rename
685 it to ...
686 (linux_supports_hardware_single_step): ... New function.
687 (linux_target_ops): Update.
688 * lynx-low.c (lynx_target_ops): Set field
689 supports_hardware_single_step to target_can_do_hardware_single_step.
690 * nto-low.c (nto_target_ops): Likewise.
691 * spu-low.c (spu_target_ops): Likewise.
692 * win32-low.c (win32_target_ops): Likewise.
693 * target.c (target_can_do_hardware_single_step): New function.
694 * target.h (struct target_ops) <supports_conditional_breakpoints>:
695 Remove. <supports_hardware_single_step>: New field.
696 (target_supports_conditional_breakpoints): Remove.
697 (target_supports_hardware_single_step): New macro.
698 (target_can_do_hardware_single_step): Declare.
699 * server.c (handle_query): Use target_supports_hardware_single_step
700 instead of target_supports_conditional_breakpoints.
701
702 2015-09-15 Yao Qi <yao.qi@linaro.org>
703
704 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
705 function.
706 (struct linux_target_ops the_low_target): Install
707 aarch64_linux_siginfo_fixup.
708
709 2015-09-11 Don Breazeal <donb@codesourcery.com>
710 Luis Machado <lgustavo@codesourcery.com>
711
712 * linux-low.c (linux_mourn): Static declaration.
713 (linux_arch_setup): Move in front of
714 handle_extended_wait.
715 (linux_arch_setup_thread): New function.
716 (handle_extended_wait): Handle exec events. Call
717 linux_arch_setup_thread. Make event_lwp argument a
718 pointer-to-a-pointer.
719 (check_zombie_leaders): Do not check stopped threads.
720 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
721 (linux_low_filter_event): Add lwp and thread for exec'ing
722 non-leader thread if leader thread has been deleted.
723 Refactor code into linux_arch_setup_thread and call it.
724 Pass child lwp pointer by reference to handle_extended_wait.
725 (linux_wait_for_event_filtered): Update comment.
726 (linux_wait_1): Prevent clobbering exec event status.
727 (linux_supports_exec_events): New function.
728 (linux_target_ops) <supports_exec_events>: Initialize new member.
729 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
730 new member.
731 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
732 * server.c (report_exec_events): New global variable.
733 (handle_query): Handle qSupported query for exec-events feature.
734 (captured_main): Initialize report_exec_events.
735 * server.h (report_exec_events): Declare new global variable.
736 * target.h (struct target_ops) <supports_exec_events>: New
737 member.
738 (target_supports_exec_events): New macro.
739 * win32-low.c (win32_target_ops) <supports_exec_events>:
740 Initialize new member.
741
742 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
743
744 * linux-low.c (linux_low_enable_btrace): Remove.
745 (linux_target_ops): Replace linux_low_enable_btrace with
746 linux_enable_btrace.
747
748 2015-09-03 Yao Qi <yao.qi@linaro.org>
749
750 * linux-aarch64-low.c (aarch64_insert_point): Call
751 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
752 returns true.
753
754 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
755
756 * linux-low.c (check_stopped_by_breakpoint): Use
757 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
758
759 2015-08-27 Pedro Alves <palves@redhat.com>
760
761 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
762
763 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
764
765 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
766 the XNEW-family equivalent.
767 (compile_bytecodes): Likewise.
768 * dll.c (loaded_dll): Likewise.
769 * event-loop.c (append_callback_event): Likewise.
770 (create_file_handler): Likewise.
771 (create_file_event): Likewise.
772 * hostio.c (handle_open): Likewise.
773 * inferiors.c (add_thread): Likewise.
774 (add_process): Likewise.
775 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
776 * linux-arm-low.c (arm_new_process): Likewise.
777 (arm_new_thread): Likewise.
778 * linux-low.c (add_to_pid_list): Likewise.
779 (linux_add_process): Likewise.
780 (handle_extended_wait): Likewise.
781 (add_lwp): Likewise.
782 (enqueue_one_deferred_signal): Likewise.
783 (enqueue_pending_signal): Likewise.
784 (linux_resume_one_lwp_throw): Likewise.
785 (linux_resume_one_thread): Likewise.
786 (linux_read_memory): Likewise.
787 (linux_write_memory): Likewise.
788 * linux-mips-low.c (mips_linux_new_process): Likewise.
789 (mips_linux_new_thread): Likewise.
790 (mips_add_watchpoint): Likewise.
791 * linux-x86-low.c (initialize_low_arch): Likewise.
792 * lynx-low.c (lynx_add_process): Likewise.
793 * mem-break.c (set_raw_breakpoint_at): Likewise.
794 (set_breakpoint): Likewise.
795 (add_condition_to_breakpoint): Likewise.
796 (add_commands_to_breakpoint): Likewise.
797 (clone_agent_expr): Likewise.
798 (clone_one_breakpoint): Likewise.
799 * regcache.c (new_register_cache): Likewise.
800 * remote-utils.c (look_up_one_symbol): Likewise.
801 * server.c (queue_stop_reply): Likewise.
802 (start_inferior): Likewise.
803 (queue_stop_reply_callback): Likewise.
804 (handle_target_event): Likewise.
805 * spu-low.c (fetch_ppc_memory): Likewise.
806 (store_ppc_memory): Likewise.
807 * target.c (set_target_ops): Likewise.
808 * thread-db.c (thread_db_load_search): Likewise.
809 (try_thread_db_load_1): Likewise.
810 * tracepoint.c (add_tracepoint): Likewise.
811 (add_tracepoint_action): Likewise.
812 (create_trace_state_variable): Likewise.
813 (cmd_qtdpsrc): Likewise.
814 (cmd_qtro): Likewise.
815 (add_while_stepping_state): Likewise.
816 * win32-low.c (child_add_thread): Likewise.
817 (get_image_name): Likewise.
818
819 2015-08-25 Yao Qi <yao.qi@linaro.org>
820
821 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
822
823 2015-08-25 Yao Qi <yao.qi@linaro.org>
824
825 * Makefile.in (aarch64-linux.o): New rule.
826 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
827 srv_tgtobj.
828 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
829 (aarch64_init_debug_reg_state): Make it extern.
830 (aarch64_linux_prepare_to_resume): Remove.
831
832 2015-08-25 Yao Qi <yao.qi@linaro.org>
833
834 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
835 lwp_arch_private_info and ptid_of_lwp.
836
837 2015-08-25 Yao Qi <yao.qi@linaro.org>
838
839 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
840 Find proc_info by find_process_pid. All callers updated.
841
842 2015-08-25 Yao Qi <yao.qi@linaro.org>
843
844 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
845 Remove.
846 (debug_reg_change_callback): Remove.
847 (aarch64_notify_debug_reg_change): Remove.
848
849 2015-08-25 Yao Qi <yao.qi@linaro.org>
850
851 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
852 Call current_lwp_ptid.
853
854 2015-08-25 Yao Qi <yao.qi@linaro.org>
855
856 * linux-aarch64-low.c (debug_reg_change_callback): Use
857 debug_printf.
858
859 2015-08-25 Yao Qi <yao.qi@linaro.org>
860
861 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
862
863 2015-08-25 Yao Qi <yao.qi@linaro.org>
864
865 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
866
867 2015-08-25 Yao Qi <yao.qi@linaro.org>
868
869 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
870 the code.
871
872 2015-08-25 Yao Qi <yao.qi@linaro.org>
873
874 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
875 Remove.
876 (debug_reg_change_callback): Remove argument entry and add argument
877 lwp. Remove local variable thread. Don't print thread id in the
878 debugging output. Don't check whether pid of thread equals to pid.
879 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
880 iterate_over_lwps instead find_inferior.
881
882 2015-08-24 Pedro Alves <palves@redhat.com>
883
884 * inferiors.c (get_first_process): New function.
885 * inferiors.h (get_first_process): New declaration.
886 * remote-utils.c (read_ptid): Default to the first process in the
887 list, instead of to the current thread's process.
888
889 2015-08-24 Pedro Alves <palves@redhat.com>
890
891 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
892 * event-loop.c: Likewise.
893 * remote-utils.c: Likewise.
894 * tracepoint.c: Likewise.
895
896 2015-08-24 Pedro Alves <palves@redhat.com>
897
898 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
899 ptid_get_lwp.
900
901 2015-08-21 Pedro Alves <palves@redhat.com>
902
903 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
904 instead of literal 1.
905
906 2015-08-21 Pedro Alves <palves@redhat.com>
907
908 * tdesc.c (default_description): Explicitly zero-initialize.
909
910 2015-08-21 Pedro Alves <palves@redhat.com>
911
912 PR gdb/18749
913 * inferiors.c (remove_thread): Discard any pending stop reply for
914 this thread.
915 * server.c (remove_all_on_match_pid): Rename to ...
916 (remove_all_on_match_ptid): ... this. Work with a filter ptid
917 instead of a pid.
918 (discard_queued_stop_replies): Change parameter to a ptid. Now
919 extern.
920 (handle_v_kill, kill_inferior_callback, captured_main)
921 (process_serial_event): Adjust.
922 * server.h (discard_queued_stop_replies): Declare.
923
924 2015-08-21 Pedro Alves <palves@redhat.com>
925
926 * linux-low.c (wait_for_sigstop): Always switch to no thread
927 selected if the previously current thread dies.
928 * lynx-low.c (lynx_request_interrupt): Use the first thread's
929 process instead of the current thread's.
930 * remote-utils.c (input_interrupt): Don't check if there's no
931 current thread.
932 * server.c (gdb_read_memory, gdb_write_memory): If setting the
933 current thread to the general thread fails, error out.
934 (handle_qxfer_auxv, handle_qxfer_libraries)
935 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
936 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
937 (handle_query): Check if there's a thread selected instead of
938 checking whether there's any thread in the thread list.
939 (handle_qxfer_threads, handle_qxfer_btrace)
940 (handle_qxfer_btrace_conf): Don't error out early if there's no
941 thread in the thread list.
942 (handle_v_cont, myresume): Don't set the current thread to the
943 continue thread.
944 (process_serial_event) <Hg handling>: Also set thread_id if the
945 previous general thread is still alive.
946 (process_serial_event) <g/G handling>: If setting the current
947 thread to the general thread fails, error out.
948 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
949 thread's lwp instead of the current thread's.
950 * target.c (set_desired_thread): If the desired thread was not
951 found, leave the current thread pointing to NULL. Return an int
952 (boolean) indicating success.
953 * target.h (set_desired_thread): Change return type to int.
954
955 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
956
957 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
958 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
959 #includes.
960 (ps_get_thread_area): New function.
961
962 2015-08-19 Gary Benson <gbenson@redhat.com>
963
964 * hostio.c (handle_pread): Do not attempt to read more data
965 than hostio_reply_with_data can fit in a packet.
966
967 2015-08-18 Joel Brobecker <brobecker@adacore.com>
968
969 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
970
971 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
972
973 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
974
975 2015-08-06 Pedro Alves <palves@redhat.com>
976
977 * tracepoint.c (expr_eval_result): Now an int.
978
979 2015-08-06 Pedro Alves <palves@redhat.com>
980
981 * gdbthread.h (struct regcache): Forward declare.
982 (struct thread_info) <regcache_data>: Now a struct regcache
983 pointer.
984 * inferiors.c (inferior_regcache_data)
985 (set_inferior_regcache_data): Now work with struct regcache
986 pointers.
987 * inferiors.h (struct regcache): Forward declare.
988 (inferior_regcache_data, set_inferior_regcache_data): Now work
989 with struct regcache pointers.
990 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
991 (free_register_cache_thread): Remove struct regcache pointer
992 casts.
993
994 2015-08-06 Pedro Alves <palves@redhat.com>
995
996 * server.c (captured_main): On error, print the exception message
997 to stderr, and if run_once is set, throw a quit.
998
999 2015-08-06 Pedro Alves <palves@redhat.com>
1000
1001 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
1002 the current thread.
1003
1004 2015-08-06 Pedro Alves <palves@redhat.com>
1005
1006 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
1007 reading beyond the passed in buffer length.
1008
1009 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
1010
1011 * tracepoint.c (symbol_list) <required>: Remove.
1012
1013 2015-08-06 Pedro Alves <palves@redhat.com>
1014
1015 * linux-low.c (handle_extended_wait): Set the fork child's suspend
1016 count if stopping and suspending threads.
1017 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
1018 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
1019 (linux_detach): Complete an ongoing step-over.
1020 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
1021 throughout.
1022 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
1023 (linux_wait_1): If passing a signal to the inferior after
1024 finishing a step-over, unsuspend and re-resume all lwps. If we
1025 see a single-step event but the thread should be continuing, don't
1026 pass the trap to gdb.
1027 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
1028 internal_error instead of gdb_assert.
1029 (enqueue_pending_signal): New function.
1030 (check_ptrace_stopped_lwp_gone): Add debug output.
1031 (start_step_over): Use internal_error instead of gdb_assert.
1032 (complete_ongoing_step_over): New function.
1033 (linux_resume_one_thread): Don't resume a suspended thread.
1034 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
1035 it stepping.
1036
1037 2015-08-06 Pedro Alves <palves@redhat.com>
1038
1039 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
1040 (linux_thread_alive): Use lwp_is_marked_dead.
1041 (extended_event_reported): Delete.
1042 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
1043 instead of extended_event_reported.
1044 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
1045 as well.
1046 (lwp_is_marked_dead): New function.
1047 (lwp_running): Use lwp_is_marked_dead.
1048 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
1049 comment.
1050
1051 2015-08-06 Pedro Alves <palves@redhat.com>
1052
1053 * linux-low.c (linux_wait_1): Move fork event output out of the
1054 !report_to_gdb check. Pass event_child->waitstatus to
1055 target_waitstatus_to_string instead of ourstatus.
1056
1057 2015-08-04 Yao Qi <yao.qi@linaro.org>
1058
1059 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
1060 if current_thread is 32 bit.
1061
1062 2015-08-04 Yao Qi <yao.qi@linaro.org>
1063
1064 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
1065 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
1066 * server.c (extended_protocol): Remove "static".
1067 * server.h (extended_protocol): Declare it.
1068
1069 2015-08-04 Yao Qi <yao.qi@linaro.org>
1070
1071 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
1072 both aarch64 and aarch32.
1073 (aarch64_set_pc): Likewise.
1074
1075 2015-08-04 Yao Qi <yao.qi@linaro.org>
1076
1077 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
1078 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
1079 arm-with-neon.xml to srv_xmlfiles.
1080 * linux-aarch64-low.c: Include linux-aarch32-low.h.
1081 (is_64bit_tdesc): New function.
1082 (aarch64_linux_read_description): New function.
1083 (aarch64_arch_setup): Call aarch64_linux_read_description.
1084 (regs_info): Rename to regs_info_aarch64.
1085 (aarch64_regs_info): Return right regs_info.
1086 (initialize_low_arch): Call initialize_low_arch_aarch32.
1087
1088 2015-08-04 Yao Qi <yao.qi@linaro.org>
1089
1090 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
1091 * linux-aarch32-low.c: New file.
1092 * linux-aarch32-low.h: New file.
1093 * linux-arm-low.c (arm_fill_gregset): Move it to
1094 linux-aarch32-low.c.
1095 (arm_store_gregset): Likewise.
1096 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
1097 (arm_store_vfpregset): Call arm_store_vfpregset_num.
1098 (arm_arch_setup): Check if PTRACE_GETREGSET works.
1099 (regs_info): Rename to regs_info_arm.
1100 (arm_regs_info): Return regs_info_aarch32 if
1101 have_ptrace_getregset is 1 and target description is
1102 arm_with_neon or arm_with_vfpv3.
1103 (initialize_low_arch): Don't call init_registers_arm_with_neon.
1104 Call initialize_low_arch_aarch32 instead.
1105
1106 2015-08-04 Yao Qi <yao.qi@linaro.org>
1107
1108 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
1109 * linux-low.c: ... here.
1110 * linux-low.h (have_ptrace_getregset): Declare it.
1111
1112 2015-08-04 Pedro Alves <palves@redhat.com>
1113
1114 * thread-db.c (struct thread_db): Use new typedefs.
1115 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
1116 CHK calls.
1117 (disable_thread_event_reporting): Cast result of dlsym to
1118 destination function pointer type.
1119 (thread_db_mourn): Use td_ta_delete_ftype.
1120
1121 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
1122
1123 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
1124 arch variant.
1125 (CDX_BREAKPOINT): Define for R2.
1126 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
1127 (the_low_target): Add comments.
1128
1129 2015-07-30 Yao Qi <yao.qi@linaro.org>
1130
1131 * linux-arm-low.c (arm_hwcap): Remove it.
1132 (arm_read_description): New local variable arm_hwcap. Don't
1133 set arm_hwcap to zero.
1134
1135 2015-07-30 Yao Qi <yao.qi@linaro.org>
1136
1137 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
1138 Use regcache->tdesc instead.
1139 (arm_store_wmmxregset): Likewise.
1140 (arm_fill_vfpregset): Likewise.
1141 (arm_store_vfpregset): Likewise.
1142
1143 2015-07-30 Yao Qi <yao.qi@linaro.org>
1144
1145 * linux-arm-low.c: Include arch/arm.h.
1146 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
1147 (arm_store_gregset): Likewise.
1148
1149 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
1150
1151 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
1152 ptrace's 4th parameter.
1153
1154 2015-07-27 Yao Qi <yao.qi@linaro.org>
1155
1156 * configure.srv (case aarch64*-*-linux*): Don't set
1157 srv_linux_usrregs.
1158
1159 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
1160
1161 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
1162 sys/ptrace.h.
1163 * linux-arm-low.c: Likewise.
1164 * linux-cris-low.c: Likewise.
1165 * linux-crisv32-low.c: Likewise.
1166 * linux-low.c: Likewise.
1167 * linux-m68k-low.c: Likewise.
1168 * linux-mips-low.c: Likewise.
1169 * linux-nios2-low.c: Likewise.
1170 * linux-s390-low.c: Likewise.
1171 * linux-sparc-low.c: Likewise.
1172 * linux-tic6x-low.c: Likewise.
1173 * linux-tile-low.c: Likewise.
1174 * linux-x86-low.c: Likewise.
1175
1176 2015-07-24 Pedro Alves <palves@redhat.com>
1177
1178 * config.in: Regenerate.
1179 * configure: Regenerate.
1180
1181 2015-07-24 Pedro Alves <palves@redhat.com>
1182
1183 * acinclude.m4: Include ../ptrace.m4.
1184 * configure.ac: Call GDB_AC_PTRACE.
1185 * config.in, configure: Regenerate.
1186
1187 2015-07-24 Yao Qi <yao.qi@linaro.org>
1188
1189 * linux-low.c (linux_create_inferior): Remove setting to
1190 proc->priv->new_inferior.
1191 (linux_attach): Likewise.
1192 (linux_low_filter_event): Likewise.
1193 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
1194
1195 2015-07-24 Yao Qi <yao.qi@linaro.org>
1196
1197 * linux-low.c (linux_arch_setup): New function.
1198 (linux_low_filter_event): If proc->tdesc is NULL and
1199 proc->attached is true, call the_low_target.arch_setup.
1200 Otherwise, keep status pending, and return.
1201 (linux_resume_one_lwp_throw): Don't call get_pc if
1202 thread->while_stepping isn't NULL. Don't call
1203 get_thread_regcache if proc->tdesc is NULL.
1204 (need_step_over_p): Return 0 if proc->tdesc is NULL.
1205 (linux_target_ops): Install arch_setup.
1206 * server.c (start_inferior): Call the_target->arch_setup.
1207 * target.h (struct target_ops) <arch_setup>: New field.
1208 (target_arch_setup): New marco.
1209 * lynx-low.c (lynx_target_ops): Update.
1210 * nto-low.c (nto_target_ops): Update.
1211 * spu-low.c (spu_target_ops): Update.
1212 * win32-low.c (win32_target_ops): Update.
1213
1214 2015-07-24 Yao Qi <yao.qi@linaro.org>
1215
1216 * linux-low.c (linux_add_process): Don't set
1217 proc->priv->new_inferior.
1218 (linux_create_inferior): Set proc->priv->new_inferior to 1.
1219 (linux_attach): Likewise.
1220
1221 2015-07-24 Yao Qi <yao.qi@linaro.org>
1222
1223 * server.c (start_inferior): Code refactor.
1224
1225 2015-07-24 Yao Qi <yao.qi@linaro.org>
1226
1227 * server.c (process_serial_event): Set general_thread.
1228
1229 2015-07-21 Yao Qi <yao.qi@linaro.org>
1230
1231 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
1232 aarch64_linux_get_debug_reg_capacity.
1233
1234 2015-07-17 Yao Qi <yao.qi@linaro.org>
1235
1236 * Makefile.in (aarch64-linux-hw-point.o): New rule.
1237 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
1238 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
1239 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
1240 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
1241 (AARCH64_HWP_ALIGNMENT): Likewise.
1242 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
1243 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
1244 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
1245 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
1246 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
1247 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
1248 (struct aarch64_debug_reg_state): Likewise.
1249 (struct arch_lwp_info): Likewise.
1250 (aarch64_align_watchpoint): Likewise.
1251 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
1252 (aarch64_watchpoint_length): Likewise.
1253 (aarch64_point_encode_ctrl_reg): Likewise
1254 (aarch64_point_is_aligned): Likewise.
1255 (aarch64_align_watchpoint): Likewise.
1256 (aarch64_linux_set_debug_regs):
1257 (aarch64_dr_state_insert_one_point): Likewise.
1258 (aarch64_dr_state_remove_one_point): Likewise.
1259 (aarch64_handle_breakpoint): Likewise.
1260 (aarch64_handle_aligned_watchpoint): Likewise.
1261 (aarch64_handle_unaligned_watchpoint): Likewise.
1262 (aarch64_handle_watchpoint): Likewise.
1263
1264 2015-07-17 Yao Qi <yao.qi@linaro.org>
1265
1266 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
1267 and don't aarch64_get_debug_reg_state. All callers update.
1268 (aarch64_handle_aligned_watchpoint): Likewise.
1269 (aarch64_handle_unaligned_watchpoint): Likewise.
1270 (aarch64_handle_watchpoint): Likewise.
1271 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
1272 (aarch64_remove_point): Likewise.
1273
1274 2015-07-17 Yao Qi <yao.qi@linaro.org>
1275
1276 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
1277 debug_printf.
1278 (aarch64_handle_unaligned_watchpoint): Likewise.
1279
1280 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
1281
1282 Revert the previous 3 commits:
1283 Move gdb_regex* to common/
1284 Move linux_find_memory_regions_full & co.
1285 gdbserver build-id attribute generator
1286
1287 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1288 Jan Kratochvil <jan.kratochvil@redhat.com>
1289
1290 gdbserver build-id attribute generator.
1291 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
1292 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
1293 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
1294 (find_phdr): New.
1295 (get_dynamic): Use find_pdhr to traverse program headers.
1296 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
1297 (compare_mapping_entry_range, struct find_memory_region_callback_data)
1298 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
1299 (get_hex_build_id): New.
1300 (linux_qxfer_libraries_svr4): Add optional build-id attribute
1301 to reply XML document.
1302
1303 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1304 Jan Kratochvil <jan.kratochvil@redhat.com>
1305
1306 * target.c: Include target/target-utils.h and fcntl.h.
1307 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
1308 (target_fileio_read_stralloc): New functions.
1309
1310 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
1311
1312 * Makefile.in (OBS): Add gdb_regex.o.
1313 (gdb_regex.o): New.
1314 * config.in: Rebuilt.
1315 * configure: Rebuilt.
1316
1317 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1318 Jan Kratochvil <jan.kratochvil@redhat.com>
1319
1320 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
1321 * Makefile.in (OBS): Add target-utils.o.
1322 (linux-maps.o, target-utils.o): New.
1323 * configure.srv (srv_linux_obj): Add linux-maps.o.
1324
1325 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
1326
1327 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
1328 function, return 1.
1329 (the_low_target): Install it.
1330
1331 2015-07-14 Pedro Alves <palves@redhat.com>
1332
1333 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
1334 Instead, ignore ECHILD, and throw an error for other errnos.
1335
1336 2015-07-10 Pedro Alves <palves@redhat.com>
1337
1338 * event-loop.c (struct callback_event) <data>: Change type to
1339 gdb_client_data instance instead of gdb_client_data pointer.
1340 (append_callback_event): Adjust.
1341
1342 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
1343
1344 * linux-aarch64-low.c: Add comments for each linux_target_ops
1345 method. Remove comments already covered in target_ops and
1346 linux_target_ops definitions.
1347 (the_low_target): Add comments for each unimplemented method.
1348
1349 2015-07-09 Yao Qi <yao.qi@linaro.org>
1350
1351 * linux-aarch64-low.c (aarch64_regmap): Remove.
1352 (aarch64_usrregs_info): Remove.
1353 (regs_info): Set field usrregs to NULL.
1354
1355 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
1356
1357 * linux-low.c: Include "rsp-low.h"
1358 (linux_low_encode_pt_config, linux_low_encode_raw): New.
1359 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
1360 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
1361 (handle_btrace_enable_pt): New.
1362 (handle_btrace_general_set): Support "pt".
1363 (handle_btrace_conf_general_set): Support "pt:size".
1364
1365 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
1366
1367 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
1368 Z_PACKET_SW_BP.
1369
1370 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
1371
1372 * linux-aarch64-low.c: Remove comment about endianness.
1373 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
1374 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
1375 memcmp.
1376
1377 2015-06-24 Gary Benson <gbenson@redhat.com>
1378
1379 * linux-i386-ipa.c (stdint.h): Do not include.
1380 * lynx-i386-low.c (stdint.h): Likewise.
1381 * lynx-ppc-low.c (stdint.h): Likewise.
1382 * mem-break.c (stdint.h): Likewise.
1383 * thread-db.c (stdint.h): Likewise.
1384 * tracepoint.c (stdint.h): Likewise.
1385 * win32-low.c (stdint.h): Likewise.
1386
1387 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
1388
1389 * server.c (write_qxfer_response): Update call to
1390 remote_escape_output.
1391
1392 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
1393 Jan Kratochvil <jan.kratochvil@redhat.com>
1394
1395 Merge multiple hex conversions.
1396 * gdbreplay.c (tohex): Rename to 'fromhex'.
1397 (logchar): Use fromhex.
1398
1399 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
1400
1401 * server.c (handle_qxfer_libraries): Set `version' attribute for
1402 <library-list>.
1403
1404 2015-06-10 Gary Benson <gbenson@redhat.com>
1405
1406 * target.h (struct target_ops) <multifs_open>: New field.
1407 <multifs_unlink>: Likewise.
1408 <multifs_readlink>: Likewise.
1409 * linux-low.c (nat/linux-namespaces.h): New include.
1410 (linux_target_ops): Initialize the_target->multifs_open,
1411 the_target->multifs_unlink and the_target->multifs_readlink.
1412 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
1413 * hostio.c (hostio_fs_pid): New static variable.
1414 (hostio_handle_new_gdb_connection): New function.
1415 (handle_setfs): Likewise.
1416 (handle_open): Use the_target->multifs_open as appropriate.
1417 (handle_unlink): Use the_target->multifs_unlink as appropriate.
1418 (handle_readlink): Use the_target->multifs_readlink as
1419 appropriate.
1420 (handle_vFile): Handle vFile:setfs packets.
1421 * server.c (handle_query): Call hostio_handle_new_gdb_connection
1422 after target_handle_new_gdb_connection.
1423
1424 2015-06-10 Gary Benson <gbenson@redhat.com>
1425
1426 * configure.ac (AC_CHECK_FUNCS): Add setns.
1427 * config.in: Regenerate.
1428 * configure: Likewise.
1429 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
1430 (linux-namespaces.o): New rule.
1431 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
1432
1433 2015-06-09 Gary Benson <gbenson@redhat.com>
1434
1435 * hostio.c (handle_open): Process mode argument with
1436 fileio_to_host_mode.
1437
1438 2015-06-01 Yao Qi <yao.qi@linaro.org>
1439
1440 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
1441 * linux-x86-low.c: Likewise.
1442
1443 2015-05-28 Don Breazeal <donb@codesourcery.com>
1444
1445 * linux-low.c (handle_extended_wait): Initialize
1446 thread_info.last_resume_kind for new fork children.
1447
1448 2015-05-15 Pedro Alves <palves@redhat.com>
1449
1450 * target.h (target_handle_new_gdb_connection): Rewrite using if
1451 wrapped in do/while.
1452
1453 2015-05-14 Joel Brobecker <brobecker@adacore.com>
1454
1455 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
1456 * configure, config.in: Regenerate.
1457 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
1458 Declare typedef.
1459
1460 2015-05-12 Don Breazeal <donb@codesourcery.com>
1461
1462 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
1463 PTRACE_EVENT_VFORK_DONE.
1464 (linux_low_ptrace_options, extended_event_reported): Add vfork
1465 events.
1466 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
1467 and "vforkdone" for RSP 'T' Stop Reply Packet.
1468 * server.h (report_vfork_events): Declare
1469 global variable.
1470
1471 2015-05-12 Don Breazeal <donb@codesourcery.com>
1472
1473 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
1474 (the_low_target) <new_fork>: Initialize new member.
1475 * linux-arm-low.c (arm_new_fork): New function.
1476 (the_low_target) <new_fork>: Initialize new member.
1477 * linux-low.c (handle_extended_wait): Call new target function
1478 new_fork.
1479 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
1480 * linux-mips-low.c (mips_add_watchpoint): New function
1481 extracted from mips_insert_point.
1482 (the_low_target) <new_fork>: Initialize new member.
1483 (mips_linux_new_fork): New function.
1484 (mips_insert_point): Call mips_add_watchpoint.
1485 * linux-x86-low.c (x86_linux_new_fork): New function.
1486 (the_low_target) <new_fork>: Initialize new member.
1487
1488 2015-05-12 Don Breazeal <donb@codesourcery.com>
1489
1490 * linux-low.c (handle_extended_wait): Implement return value,
1491 rename argument 'event_child' to 'event_lwp', handle
1492 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
1493 (linux_low_ptrace_options): New function.
1494 (linux_low_filter_event): Call linux_low_ptrace_options,
1495 use different argument fo linux_enable_event_reporting,
1496 use return value from handle_extended_wait.
1497 (extended_event_reported): New function.
1498 (linux_wait_1): Call extended_event_reported and set
1499 status to report fork events.
1500 (linux_write_memory): Add pid to debug message.
1501 (reset_lwp_ptrace_options_callback): New function.
1502 (linux_handle_new_gdb_connection): New function.
1503 (linux_target_ops): Initialize new structure member.
1504 * linux-low.h (struct lwp_info) <waitstatus>: New member.
1505 * lynx-low.c: Initialize new structure member.
1506 * remote-utils.c (prepare_resume_reply): Implement stop reason
1507 "fork" for "T" stop message.
1508 * server.c (handle_query): Call handle_new_gdb_connection.
1509 * server.h (report_fork_events): Declare global flag.
1510 * target.h (struct target_ops) <handle_new_gdb_connection>:
1511 New member.
1512 (target_handle_new_gdb_connection): New macro.
1513 * win32-low.c: Initialize new structure member.
1514
1515 2015-05-12 Don Breazeal <donb@codesourcery.com>
1516
1517 * mem-break.c (APPEND_TO_LIST): Define macro.
1518 (clone_agent_expr): New function.
1519 (clone_one_breakpoint): New function.
1520 (clone_all_breakpoints): New function.
1521 * mem-break.h: Declare new functions.
1522
1523 2015-05-12 Don Breazeal <donb@codesourcery.com>
1524
1525 * linux-low.c (linux_supports_fork_events): New function.
1526 (linux_supports_vfork_events): New function.
1527 (linux_target_ops): Initialize new structure members.
1528 (initialize_low): Call linux_check_ptrace_features.
1529 * lynx-low.c (lynx_target_ops): Initialize new structure
1530 members.
1531 * server.c (report_fork_events, report_vfork_events):
1532 New global flags.
1533 (handle_query): Add new features to qSupported packet and
1534 response.
1535 (captured_main): Initialize new global variables.
1536 * target.h (struct target_ops) <supports_fork_events>:
1537 New member.
1538 <supports_vfork_events>: New member.
1539 (target_supports_fork_events): New macro.
1540 (target_supports_vfork_events): New macro.
1541 * win32-low.c (win32_target_ops): Initialize new structure
1542 members.
1543
1544 2015-05-12 Gary Benson <gbenson@redhat.com>
1545
1546 * server.c (handle_qxfer_exec_file): Use current process
1547 if annex is empty.
1548
1549 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
1550
1551 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
1552 Remove HAVE_PTRACE_GETREGS conditionals.
1553 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
1554 instead of PTRACE_GETREGS and PTRACE_SETREGS.
1555
1556 2015-05-08 Yao Qi <yao.qi@linaro.org>
1557
1558 * linux-low.c (linux_supports_conditional_breakpoints): New
1559 function.
1560 (linux_target_ops): Install new target method.
1561 * lynx-low.c (lynx_target_ops): Install NULL hook for
1562 supports_conditional_breakpoints.
1563 * nto-low.c (nto_target_ops): Likewise.
1564 * spu-low.c (spu_target_ops): Likewise.
1565 * win32-low.c (win32_target_ops): Likewise.
1566 * server.c (handle_query): Check
1567 target_supports_conditional_breakpoints.
1568 * target.h (struct target_ops) <supports_conditional_breakpoints>:
1569 New field.
1570 (target_supports_conditional_breakpoints): New macro.
1571
1572 2015-05-06 Pedro Alves <palves@redhat.com>
1573
1574 PR server/18081
1575 * server.c (start_inferior): If the process exits, mourn it.
1576
1577 2015-04-21 Gary Benson <gbenson@redhat.com>
1578
1579 * hostio.c (fileio_open_flags_to_host): Factored out to
1580 fileio_to_host_openflags in common/fileio.c. Single use
1581 updated.
1582
1583 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
1584
1585 * linux-xtensa-low.c (xtensa_fill_gregset)
1586 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
1587 XCHAL_HAVE_LOOP.
1588
1589 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
1590
1591 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
1592 (regs_info): Replace usrregs pointer with NULL.
1593
1594 2015-04-17 Gary Benson <gbenson@redhat.com>
1595
1596 * target.h (struct target_ops) <pid_to_exec_file>: New field.
1597 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
1598 * server.c (handle_qxfer_exec_file): New function.
1599 (qxfer_packets): Add exec-file entry.
1600 (handle_query): Report qXfer:exec-file:read as supported packet.
1601
1602 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
1603
1604 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
1605
1606 2015-04-09 Gary Benson <gbenson@redhat.com>
1607
1608 * hostio-errno.c (errno_to_fileio_error): Remove function.
1609 Update caller to use remote_fileio_to_fio_error.
1610
1611 2015-04-09 Yao Qi <yao.qi@linaro.org>
1612
1613 * linux-low.c (linux_insert_point): Call
1614 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
1615 (linux_remove_point): Call remove_memory_breakpoint if type is
1616 raw_bkpt_type_sw.
1617 * linux-x86-low.c (x86_insert_point): Don't call
1618 insert_memory_breakpoint.
1619 (x86_remove_point): Don't call remove_memory_breakpoint.
1620
1621 2015-04-01 Pedro Alves <palves@redhat.com>
1622 Cleber Rosa <crosa@redhat.com>
1623
1624 * server.c (gdbserver_usage): Reorganize and extend the usage
1625 message.
1626
1627 2015-03-24 Pedro Alves <palves@redhat.com>
1628
1629 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
1630 output. Also dump TRAP_TRACE.
1631 (linux_low_filter_event): In debug output, distinguish a
1632 resume_stop SIGSTOP from a delayed SIGSTOP.
1633
1634 2015-03-24 Gary Benson <gbenson@redhat.com>
1635
1636 * linux-x86-low.c (x86_linux_new_thread): Moved to
1637 nat/x86-linux.c.
1638 (x86_linux_prepare_to_resume): Likewise.
1639
1640 2015-03-24 Gary Benson <gbenson@redhat.com>
1641
1642 * Makefile.in (x86-linux-dregs.o): New rule.
1643 * configure.srv: Add x86-linux-dregs.o to relevant targets.
1644 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
1645 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
1646 (x86_linux_dr_get): Likewise.
1647 (x86_linux_dr_set): Likewise.
1648 (update_debug_registers_callback): Likewise.
1649 (x86_linux_dr_set_addr): Likewise.
1650 (x86_linux_dr_get_addr): Likewise.
1651 (x86_linux_dr_set_control): Likewise.
1652 (x86_linux_dr_get_control): Likewise.
1653 (x86_linux_dr_get_status): Likewise.
1654 (x86_linux_update_debug_registers): Likewise.
1655
1656 2015-03-24 Gary Benson <gbenson@redhat.com>
1657
1658 * linux-x86-low.c (x86_linux_update_debug_registers):
1659 New function, factored out from...
1660 (x86_linux_prepare_to_resume): ...this.
1661
1662 2015-03-24 Gary Benson <gbenson@redhat.com>
1663
1664 * linux-x86-low.c (x86_linux_dr_get): Update comments.
1665 (x86_linux_dr_set): Likewise.
1666 (update_debug_registers_callback): Likewise.
1667 (x86_linux_dr_set_addr): Likewise.
1668 (x86_linux_dr_get_addr): Likewise.
1669 (x86_linux_dr_set_control): Likewise.
1670 (x86_linux_dr_get_control): Likewise.
1671 (x86_linux_dr_get_status): Likewise.
1672 (x86_linux_prepare_to_resume): Likewise.
1673
1674 2015-03-24 Gary Benson <gbenson@redhat.com>
1675
1676 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
1677 Use perror_with_name. Pass string through gettext.
1678 (x86_linux_dr_set): Likewise.
1679
1680 2015-03-24 Gary Benson <gbenson@redhat.com>
1681
1682 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
1683 (x86_linux_dr_set_addr): ...this.
1684 (x86_dr_low_get_addr): Rename to...
1685 (x86_linux_dr_get_addr): ...this.
1686 (x86_dr_low_set_control): Rename to...
1687 (x86_linux_dr_set_control): ...this.
1688 (x86_dr_low_get_control): Rename to...
1689 (x86_linux_dr_get_control): ...this.
1690 (x86_dr_low_get_status): Rename to...
1691 (x86_linux_dr_get_status): ...this.
1692 (x86_dr_low): Update with new function names.
1693
1694 2015-03-24 Gary Benson <gbenson@redhat.com>
1695
1696 * Makefile.in (x86-linux.o): New rule.
1697 * configure.srv: Add x86-linux.o to relevant targets.
1698 * linux-low.c (lwp_set_arch_private_info): New function.
1699 (lwp_arch_private_info): Likewise.
1700 * linux-x86-low.c: Include nat/x86-linux.h.
1701 (arch_lwp_info): Removed structure.
1702 (update_debug_registers_callback):
1703 Use lwp_set_debug_registers_changed.
1704 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
1705 and lwp_set_debug_registers_changed.
1706 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
1707
1708 2015-03-24 Gary Benson <gbenson@redhat.com>
1709
1710 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
1711 * linux-arm-low.c (arm_new_thread): Likewise.
1712 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
1713 * linux-mips-low.c (mips_linux_new_thread): Likewise.
1714 * linux-x86-low.c (x86_linux_new_thread): Likewise.
1715 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
1716
1717 2015-03-24 Gary Benson <gbenson@redhat.com>
1718
1719 * linux-low.c (ptid_of_lwp): New function.
1720 (lwp_is_stopped): Likewise.
1721 (lwp_stop_reason): Likewise.
1722 * linux-x86-low.c (update_debug_registers_callback):
1723 Use lwp_is_stopped.
1724 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
1725 lwp_stop_reason.
1726
1727 2015-03-24 Gary Benson <gbenson@redhat.com>
1728
1729 * linux-low.h (linux_stop_lwp): Remove declaration.
1730
1731 2015-03-24 Gary Benson <gbenson@redhat.com>
1732
1733 * linux-low.h: Include nat/linux-nat.h.
1734 * linux-low.c (iterate_over_lwps_args): New structure.
1735 (iterate_over_lwps_filter): New function.
1736 (iterate_over_lwps): Likewise.
1737 * linux-x86-low.c (update_debug_registers_callback):
1738 Update signature to what iterate_over_lwps expects.
1739 Remove PID check that iterate_over_lwps now performs.
1740 (x86_dr_low_set_addr): Use iterate_over_lwps.
1741 (x86_dr_low_set_control): Likewise.
1742
1743 2015-03-24 Gary Benson <gbenson@redhat.com>
1744
1745 * linux-x86-low.c (x86_debug_reg_state): New function.
1746 (x86_linux_prepare_to_resume): Use the above.
1747
1748 2015-03-24 Gary Benson <gbenson@redhat.com>
1749
1750 * linux-low.c (current_lwp_ptid): New function.
1751 * linux-x86-low.c: Include nat/linux-nat.h.
1752 (x86_dr_low_get_addr): Use current_lwp_ptid.
1753 (x86_dr_low_get_control): Likewise.
1754 (x86_dr_low_get_status): Likewise.
1755
1756 2015-03-20 Pedro Alves <palves@redhat.com>
1757
1758 * tracepoint.c (cmd_qtstatus): Make "str" const.
1759
1760 2015-03-20 Pedro Alves <palves@redhat.com>
1761
1762 * server.c (handle_general_set): Make "req_str" const.
1763
1764 2015-03-19 Pedro Alves <palves@redhat.com>
1765
1766 * linux-low.c (linux_resume_one_lwp): Rename to ...
1767 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
1768 instead call perror_with_name.
1769 (check_ptrace_stopped_lwp_gone): New function.
1770 (linux_resume_one_lwp): Reimplement as wrapper around
1771 linux_resume_one_lwp_throw that swallows errors if the LWP is
1772 gone.
1773
1774 2015-03-19 Pedro Alves <palves@redhat.com>
1775
1776 * linux-low.c (count_events_callback, select_event_lwp_callback):
1777 No longer check whether the thread has resume_stop as last resume
1778 kind.
1779
1780 2015-03-19 Pedro Alves <palves@redhat.com>
1781
1782 * linux-low.c (count_events_callback, select_event_lwp_callback):
1783 Use the lwp's status_pending_p field, not the thread's.
1784
1785 2015-03-19 Pedro Alves <palves@redhat.com>
1786
1787 * linux-low.c (select_event_lwp_callback): Update comments to
1788 no longer mention SIGTRAP.
1789
1790 2015-03-18 Gary Benson <gbenson@redhat.com>
1791
1792 * server.c (handle_query): Do not report vFile:fstat as supported.
1793
1794 2015-03-11 Gary Benson <gbenson@redhat.com>
1795
1796 * hostio.c (sys/types.h): New include.
1797 (sys/stat.h): Likewise.
1798 (common-remote-fileio.h): Likewise.
1799 (handle_fstat): New function.
1800 (handle_vFile): Handle vFile:fstat packets.
1801
1802 2015-03-11 Gary Benson <gbenson@redhat.com>
1803
1804 * configure.ac (AC_CHECK_MEMBERS): Add checks for
1805 struct stat.st_blocks and struct stat.st_blksize.
1806 * configure: Regenerate.
1807 * config.in: Likewise.
1808 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
1809 (OBS): Add common-remote-fileio.o.
1810 (common-remote-fileio.o): New rule.
1811
1812 2015-03-09 Pedro Alves <palves@redhat.com>
1813
1814 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
1815 'struct sockaddr' pointer in 'accept' call.
1816
1817 2015-03-09 Pedro Alves <palves@redhat.com>
1818
1819 Revert:
1820 2015-03-07 Pedro Alves <palves@redhat.com>
1821 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
1822 or <winsock2.h> here. Instead include "gdb_socket.h".
1823 (remote_open): Use union gdb_sockaddr_u.
1824 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
1825 or <winsock2.h> here. Instead include "gdb_socket.h".
1826 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
1827 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
1828 or <sys/un.h>.
1829 (init_named_socket, gdb_agent_helper_thread): Use union
1830 gdb_sockaddr_u.
1831
1832 2015-03-07 Pedro Alves <palves@redhat.com>
1833
1834 * configure.ac (build_warnings): Move
1835 -Wdeclaration-after-statement to the C-specific set.
1836 * configure: Regenerate.
1837
1838 2015-03-07 Pedro Alves <palves@redhat.com>
1839
1840 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
1841 or <winsock2.h> here. Instead include "gdb_socket.h".
1842 (remote_open): Use union gdb_sockaddr_u.
1843 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
1844 or <winsock2.h> here. Instead include "gdb_socket.h".
1845 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
1846 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
1847 or <sys/un.h>.
1848 (init_named_socket, gdb_agent_helper_thread): Use union
1849 gdb_sockaddr_u.
1850
1851 2015-03-07 Pedro Alves <palves@redhat.com>
1852
1853 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
1854 instead.
1855
1856 2015-03-06 Yao Qi <yao.qi@linaro.org>
1857
1858 * linux-aarch64-low.c (aarch64_insert_point): Use
1859 show_debug_regs as a boolean.
1860 (aarch64_remove_point): Likewise.
1861
1862 2015-03-05 Pedro Alves <palves@redhat.com>
1863
1864 * lynx-low.c (lynx_target_ops): Install NULL hooks for
1865 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
1866 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
1867 * nto-low.c (nto_target_ops): Likewise.
1868 * spu-low.c (spu_target_ops): Likewise.
1869 * win32-low.c (win32_target_ops): Likewise.
1870
1871 2015-03-04 Pedro Alves <palves@redhat.com>
1872
1873 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
1874 Decide whether a breakpoint triggered based on the SIGTRAP's
1875 siginfo.si_code.
1876 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
1877 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
1878 (linux_low_filter_event): Check for breakpoints before checking
1879 watchpoints.
1880 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
1881 siginfo.si_code.
1882 (linux_stopped_by_sw_breakpoint)
1883 (linux_supports_stopped_by_sw_breakpoint)
1884 (linux_stopped_by_hw_breakpoint)
1885 (linux_supports_stopped_by_hw_breakpoint): New functions.
1886 (linux_target_ops): Install new target methods.
1887
1888 2015-03-04 Pedro Alves <palves@redhat.com>
1889
1890 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
1891 * server.c (swbreak_feature, hwbreak_feature): New globals.
1892 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
1893 (captured_main): Clear swbreak_feature and hwbreak_feature.
1894 * server.h (swbreak_feature, hwbreak_feature): Declare.
1895 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
1896 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
1897 supports_stopped_by_hw_breakpoint>: New fields.
1898 (target_supports_stopped_by_sw_breakpoint)
1899 (target_stopped_by_sw_breakpoint)
1900 (target_supports_stopped_by_hw_breakpoint)
1901 (target_stopped_by_hw_breakpoint): Declare.
1902
1903 2015-03-04 Pedro Alves <palves@redhat.com>
1904
1905 enum lwp_stop_reason -> enum target_stop_reason
1906 * linux-low.c (check_stopped_by_breakpoint): Adjust.
1907 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
1908 (linux_wait_1, stuck_in_jump_pad_callback)
1909 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
1910 (linux_stopped_by_watchpoint):
1911 * linux-low.h (enum lwp_stop_reason): Delete.
1912 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
1913 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
1914
1915 2015-03-04 Yao Qi <yao.qi@linaro.org>
1916
1917 * Makefile.in (SFILES): Add linux-aarch64-low.c.
1918
1919 2015-03-03 Gary Benson <gbenson@redhat.com>
1920
1921 * hostio.c (handle_vFile): Fix prefix lengths.
1922
1923 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
1924
1925 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
1926 ptr_bits.
1927
1928 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
1929
1930 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
1931 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
1932 (clean): Add "rm -f" for above C files.
1933 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
1934 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
1935 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
1936 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
1937 * linux-s390-low.c (HWCAP_S390_VX): New macro.
1938 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
1939 (init_registers_s390x_vx_linux64)
1940 (init_registers_s390x_tevx_linux64)
1941 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
1942 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
1943 declarations.
1944 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
1945 (s390_store_vxrs_high): New functions.
1946 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
1947 NT_S390_VXRS_HIGH.
1948 (s390_arch_setup): Add logic for selecting one of the new target
1949 descriptions. Activate the new vector regsets if applicable.
1950 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
1951 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
1952 and init_registers_s390x_tevx_linux64.
1953
1954 2015-03-01 Pedro Alves <palves@redhat.com>
1955
1956 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
1957 parameter.
1958
1959 2015-02-27 Pedro Alves <palves@redhat.com>
1960
1961 * linux-x86-low.c (u_debugreg_offset): New function.
1962 (x86_linux_dr_get, x86_linux_dr_set): Use it.
1963
1964 2015-02-27 Pedro Alves <palves@redhat.com>
1965
1966 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
1967 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
1968 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
1969 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
1970 (ps_lsetfpregs, ps_getpid)
1971 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
1972 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
1973 (ps_lsetxregs, ps_plog): Declare.
1974
1975 2015-02-27 Pedro Alves <palves@redhat.com>
1976
1977 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
1978 IP_AGENT_EXPORT_FUNC.
1979 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
1980 IP_AGENT_EXPORT_FUNC.
1981 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
1982 (IP_AGENT_EXPORT): Delete.
1983 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
1984 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
1985 (gdb_trampoline_buffer_error, collecting, gdb_collect)
1986 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
1987 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
1988 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
1989 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
1990 (traceframe_read_count, traceframe_write_count)
1991 (traceframes_created, trace_state_variables, get_raw_reg)
1992 (get_trace_state_variable_value, set_trace_state_variable_value)
1993 (ust_loaded, helper_thread_id, cmd_buf): Use
1994 IPA_SYM_EXPORTED_NAME.
1995 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
1996 (tracepoints) Use IP_AGENT_EXPORT_VAR.
1997 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
1998 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
1999 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
2000 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
2001 EXTERN_C_PUSH/EXTERN_C_POP.
2002 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
2003 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
2004 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2005 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
2006 (traceframe_write_count, traceframe_read_count)
2007 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
2008 (about_to_request_buffer_space, get_trace_state_variable_value)
2009 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
2010 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
2011 EXTERN_C_PUSH/EXTERN_C_POP.
2012 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
2013 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
2014 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
2015 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2016 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
2017 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
2018 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
2019 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
2020 Define.
2021 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
2022 (IP_AGENT_EXPORT_VAR_DECL): Define.
2023 (tracing): Declare.
2024 (gdb_agent_get_raw_reg): Declare.
2025
2026 2015-02-27 Tom Tromey <tromey@redhat.com>
2027 Pedro Alves <palves@redhat.com>
2028
2029 Rename symbols whose names are reserved C++ keywords throughout.
2030
2031 2015-02-27 Pedro Alves <palves@redhat.com>
2032
2033 * Makefile.in (COMPILER): New, get it from autoconf.
2034 (CXX): Get from autoconf instead.
2035 (COMPILE.pre): Use COMPILER.
2036 (CC-LD): Rename to ...
2037 (CC_LD): ... this. Use COMPILER.
2038 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
2039 (CXX_FOR_TARGET): Default to g++ instead of gcc.
2040 * acinclude.m4: Include build-with-cxx.m4.
2041 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
2042 Disable -Werror by default if building in C++ mode.
2043 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
2044 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
2045 the C++ compiler. Save/restore CXXFLAGS too.
2046 * configure: Regenerate.
2047
2048 2015-02-27 Pedro Alves <palves@redhat.com>
2049
2050 * acinclude.m4: Include libiberty.m4.
2051 * configure.ac: Call libiberty_INIT.
2052 * config.in, configure: Regenerate.
2053
2054 2015-02-26 Pedro Alves <palves@redhat.com>
2055
2056 * linux-low.c (linux_wait_1): When incrementing the PC past a
2057 program breakpoint always use the_low_target.breakpoint_len as
2058 increment, rather than the maximum between that and
2059 the_low_target.decr_pc_after_break.
2060
2061 2015-02-23 Pedro Alves <palves@redhat.com>
2062
2063 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
2064 thread was doing a step-over; always adjust the PC if
2065 we stepped over a permanent breakpoint.
2066 (linux_wait_1): If we stepped over breakpoint that was on top of a
2067 permanent breakpoint, manually advance the PC past it.
2068
2069 2015-02-23 Pedro Alves <palves@redhat.com>
2070
2071 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
2072 modes.
2073 (x86_fill_gregset, x86_store_gregset): Use it when handling
2074 $orig_eax.
2075
2076 2015-02-20 Pedro Alves <palves@redhat.com>
2077
2078 * thread-db.c: Include "nat/linux-procfs.h".
2079 (thread_db_init): Skip listing new threads if the kernel supports
2080 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
2081
2082 2015-02-20 Pedro Alves <palves@redhat.com>
2083
2084 * linux-low.c (status_pending_p_callback): Use ptid_match.
2085
2086 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
2087
2088 PR breakpoints/16812
2089 * linux-low.c (wstatus_maybe_breakpoint): Remove.
2090 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
2091 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
2092
2093 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
2094
2095 PR breakpoints/15956
2096 * tracepoint.c (cmd_qtinit): Add check for current_thread.
2097
2098 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2099
2100 * linux-low.c (linux_low_btrace_conf): Print size.
2101 * server.c (handle_btrace_conf_general_set): New.
2102 (hanle_general_set): Call handle_btrace_conf_general_set.
2103 (handle_query): Report Qbtrace-conf:bts:size as supported.
2104
2105 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2106
2107 * linux-low.c (linux_low_enable_btrace): Update parameters.
2108 (linux_low_btrace_conf): New.
2109 (linux_target_ops)<to_btrace_conf>: Initialize.
2110 * server.c (current_btrace_conf): New.
2111 (handle_btrace_enable): Rename to ...
2112 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
2113 to target_enable_btrace. Update comment. Update users.
2114 (handle_qxfer_btrace_conf): New.
2115 (qxfer_packets): Add btrace-conf entry.
2116 (handle_query): Report qXfer:btrace-conf:read as supported packet.
2117 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
2118 (target_ops)<read_btrace_conf>: New.
2119 (target_enable_btrace): Update parameters.
2120 (target_read_btrace_conf): New.
2121
2122 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2123
2124 * server.c (handle_btrace_general_set): Remove call to
2125 target_supports_btrace.
2126 (supported_btrace_packets): New.
2127 (handle_query): Call supported_btrace_packets.
2128 * target.h: include btrace-common.h.
2129 (btrace_target_info): Removed.
2130 (supports_btrace, target_supports_btrace): Update parameters.
2131
2132 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2133
2134 * Makefile.in (SFILES): Add common/btrace-common.c.
2135 (OBS): Add common/btrace-common.o.
2136 (btrace-common.o): Add build rules.
2137 * linux-low: Include btrace-common.h.
2138 (linux_low_read_btrace): Use struct btrace_data. Call
2139 btrace_data_init and btrace_data_fini.
2140
2141 2015-02-06 Pedro Alves <palves@redhat.com>
2142
2143 * thread-db.c (find_new_threads_callback): Add debug output.
2144
2145 2015-02-04 Pedro Alves <palves@redhat.com>
2146
2147 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
2148 (resume_stopped_resumed_lwps): New function.
2149 (linux_wait_for_event_filtered): Use it.
2150
2151 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
2152
2153 * Makefile.in (SFILES): Add linux-personality.c.
2154 (linux-personality.o): New rule.
2155 * configure.srv (srv_linux_obj): Add linux-personality.o to the
2156 list of objects to be built.
2157 * linux-low.c: Include nat/linux-personality.h.
2158 (linux_create_inferior): Remove code to disable address space
2159 randomization (moved to ../nat/linux-personality.c). Create
2160 cleanup to disable address space randomization.
2161
2162 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
2163
2164 * Makefile.in (posix-strerror.o): New rule.
2165 (mingw-strerror.o): Likewise.
2166 * configure: Regenerated.
2167 * configure.ac: Source file ../common/common.host. Initialize new
2168 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
2169
2170 2015-01-14 Yao Qi <yao@codesourcery.com>
2171
2172 * Makefile.in (SFILES): Add nat/ppc-linux.c.
2173 (ppc-linux.o): New rule.
2174 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
2175 * configure.ac: AC_CHECK_FUNCS(getauxval).
2176 * config.in: Re-generated.
2177 * configure: Re-generated.
2178 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
2179 ppc64_64bit_inferior_p
2180
2181 2015-01-14 Yao Qi <yao@codesourcery.com>
2182
2183 * linux-ppc-low.c: Include "nat/ppc-linux.h".
2184 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
2185 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
2186 (PT_ORIG_R3, PT_TRAP): Likewise.
2187 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
2188 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
2189 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
2190
2191 2015-01-10 Joel Brobecker <brobecker@adacore.com>
2192
2193 * i387-fp.c (i387_cache_to_xsave): In look over
2194 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
2195 zmmh_low_space field by use of zmmh_high_space.
2196
2197 2015-01-09 Pedro Alves <palves@redhat.com>
2198
2199 * linux-low.c (step_over_bkpt): Move higher up in the file.
2200 (handle_extended_wait): Don't store the stop_pc here.
2201 (get_stop_pc): Adjust comments and rename to ...
2202 (check_stopped_by_breakpoint): ... this. Record whether the LWP
2203 stopped for a software breakpoint or hardware breakpoint.
2204 (thread_still_has_status_pending_p): New function.
2205 (status_pending_p_callback): Use
2206 thread_still_has_status_pending_p. If the event is no longer
2207 interesting, resume the LWP.
2208 (handle_tracepoints): Add assert.
2209 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
2210 (wstatus_maybe_breakpoint): New function.
2211 (cancel_breakpoint): Delete function.
2212 (check_stopped_by_watchpoint): New function, factored out from
2213 linux_low_filter_event.
2214 (lp_status_maybe_breakpoint): Delete function.
2215 (linux_low_filter_event): Remove filter_ptid argument.
2216 Leave thread group exits pending here. Store the LWP's stop PC.
2217 Always leave events pending.
2218 (linux_wait_for_event_filtered): Pull all events out of the
2219 kernel, and leave them all pending.
2220 (count_events_callback, select_event_lwp_callback): Consider all
2221 events.
2222 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
2223 (select_event_lwp): Only give preference to the stepping LWP in
2224 all-stop mode. Adjust comments.
2225 (ignore_event): New function.
2226 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
2227 references to cancel_breakpoints. Adjust to renames. Also give
2228 equal priority to all LWPs that have had events in non-stop mode.
2229 If reporting a software breakpoint event, unadjust the LWP's PC.
2230 (linux_wait): If linux_wait_1 returned an ignored event, retry.
2231 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
2232 Adjust.
2233 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
2234 (resume_status_pending_p): Use thread_still_has_status_pending_p.
2235 (linux_stopped_by_watchpoint): Adjust.
2236 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
2237 * linux-low.h (enum lwp_stop_reason): New.
2238 (struct lwp_info) <stop_pc>: Adjust comment.
2239 <stopped_by_watchpoint>: Delete field.
2240 <stop_reason>: New field.
2241 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
2242 * mem-break.c (software_breakpoint_inserted_here)
2243 (hardware_breakpoint_inserted_here): New function.
2244 * mem-break.h (software_breakpoint_inserted_here)
2245 (hardware_breakpoint_inserted_here): Declare.
2246 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
2247 (cancel_breakpoints): Delete.
2248 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
2249 (upload_fast_traceframes): Remove references to
2250 cancel_breakpoints.
2251
2252 2015-01-09 Pedro Alves <palves@redhat.com>
2253
2254 * thread-db.c (find_new_threads_callback): Ignore thread if the
2255 kernel thread ID is -1.
2256
2257 2015-01-09 Pedro Alves <palves@redhat.com>
2258
2259 * linux-low.c (linux_attach_fail_reason_string): Move to
2260 nat/linux-ptrace.c, and rename.
2261 (linux_attach_lwp): Update comment.
2262 (attach_proc_task_lwp_callback): New function.
2263 (linux_attach): Adjust to rename and use
2264 linux_proc_attach_tgid_threads.
2265 (linux_attach_fail_reason_string): Delete declaration.
2266
2267 2015-01-01 Joel Brobecker <brobecker@adacore.com>
2268
2269 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
2270 * server.c (gdbserver_version): Likewise.
2271
2272 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
2273
2274 * remote-utils.c: Include ctype.h.
2275 (input_interrupt): Explicitly handle the case when the char
2276 received is the NUL byte. Improve the printing of non-ASCII
2277 characters.
2278
2279 2014-12-16 Joel Brobecker <brobecker@adacore.com>
2280
2281 * linux-low.c (linux_low_filter_event): Update call to
2282 linux_enable_event_reporting following the addition of
2283 a new parameter to that function.
2284
2285 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
2286
2287 PR server/17457
2288 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
2289 (AARCH64_FPCR_REGNO): Likewise.
2290 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
2291 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
2292 (aarch64_store_fpregset): Likewise.
2293
2294 2014-12-15 Joel Brobecker <brobecker@adacore.com>
2295
2296 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
2297 Remove FIXME comment about assumption about N.
2298
2299 2014-12-13 Joel Brobecker <brobecker@adacore.com>
2300
2301 * configure.ac: If large-file support is disabled in GDBserver,
2302 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
2303 * configure: Regenerate.
2304
2305 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2306
2307 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
2308 warning upon ENODATA from ptrace.
2309 * linux-s390-low.c (s390_store_tdb): New.
2310 (s390_regsets): Add regset for NT_S390_TDB.
2311
2312 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2313
2314 * linux-low.c (regsets_store_inferior_registers): Skip regsets
2315 without a fill_function.
2316 * linux-s390-low.c (s390_fill_last_break): Remove.
2317 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
2318 (s390_arch_setup): Use regset's size instead of fill_function for
2319 loop end condition.
2320
2321 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2322
2323 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
2324 the regset's store function when ptrace returned an error.
2325 * regcache.c (get_thread_regcache): Invalidate register cache
2326 before fetching inferior's registers.
2327
2328 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2329
2330 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
2331 while-loop as for-loop.
2332 (regsets_store_inferior_registers): Likewise.
2333
2334 2014-11-28 Yao Qi <yao@codesourcery.com>
2335
2336 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
2337 * config.in, configure: Re-generate.
2338 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
2339 is defined.
2340
2341 2014-11-21 Yao Qi <yao@codesourcery.com>
2342
2343 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
2344 (AC_CHECK_HEADERS): Remove malloc.h.
2345 * configure: Re-generated.
2346 * config.in: Re-generated.
2347 * server.h: Don't include alloca.h and malloc.h.
2348 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
2349 Don't include malloc.h.
2350
2351 2014-11-17 Joel Brobecker <brobecker@adacore.com>
2352
2353 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
2354 corresponding ERRNO check in same block.
2355
2356 2014-11-12 Pedro Alves <palves@redhat.com>
2357
2358 * server.c (cont_thread): Update comment.
2359 (start_inferior, attach_inferior): No longer clear cont_thread.
2360 (handle_v_cont): No longer set cont_thread.
2361 (captured_main): Clear cont_thread each time a GDB connects.
2362
2363 2014-11-12 Pedro Alves <palves@redhat.com>
2364
2365 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
2366 thread, and don't resume all threads if the Hc thread has exited.
2367
2368 2014-11-12 Pedro Alves <palves@redhat.com>
2369
2370 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
2371 the process group instead of to a specific LWP.
2372
2373 2014-10-15 Pedro Alves <palves@redhat.com>
2374
2375 PR server/17487
2376 * win32-arm-low.c (arm_set_thread_context): Remove current_event
2377 parameter.
2378 (arm_set_thread_context): Delete.
2379 (the_low_target): Adjust.
2380 * win32-i386-low.c (debug_registers_changed)
2381 (debug_registers_used): Delete.
2382 (update_debug_registers_callback): New function.
2383 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
2384 needing to update their debug registers.
2385 (win32_get_current_dr): New function.
2386 (x86_dr_low_get_addr, x86_dr_low_get_control)
2387 (x86_dr_low_get_status): Fetch the debug register from the thread
2388 record's context.
2389 (i386_initial_stuff): Adjust.
2390 (i386_get_thread_context): Remove current_event parameter. Don't
2391 clear debug_registers_changed nor copy DR values to
2392 debug_reg_state.
2393 (i386_set_thread_context): Delete.
2394 (i386_prepare_to_resume): New function.
2395 (i386_thread_added): Mark the thread as needing to update irs
2396 debug registers.
2397 (the_low_target): Remove i386_set_thread_context and install
2398 i386_prepare_to_resume.
2399 * win32-low.c (win32_get_thread_context): Adjust.
2400 (win32_set_thread_context): Use SetThreadContext
2401 directly.
2402 (win32_prepare_to_resume): New function.
2403 (win32_require_context): New function, factored out from ...
2404 (thread_rec): ... this.
2405 (continue_one_thread): Call win32_prepare_to_resume on each thread
2406 we're about to continue.
2407 (win32_resume): Call win32_prepare_to_resume on the event thread.
2408 * win32-low.h (struct win32_thread_info)
2409 <debug_registers_changed>: New field.
2410 (struct win32_target_ops): Change prototype of set_thread_context,
2411 delete set_thread_context and add prepare_to_resume.
2412 (win32_require_context): New declaration.
2413
2414 2014-10-08 Gary Benson <gbenson@redhat.com>
2415
2416 * server.h: Do not include common-exceptions.h.
2417
2418 2014-10-08 Gary Benson <gbenson@redhat.com>
2419
2420 * server.h: Do not include cleanups.h.
2421
2422 2014-09-30 James Hogan <james.hogan@imgtec.com>
2423
2424 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
2425 mips64-dsp-linux.c.
2426
2427 2014-09-23 Yao Qi <yao@codesourcery.com>
2428
2429 * linux-low.c (lp_status_maybe_breakpoint): New function.
2430 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
2431 (count_events_callback): Likewise.
2432 (select_event_lwp_callback): Likewise.
2433 (cancel_breakpoints_callback): Likewise.
2434
2435 2014-09-19 Don Breazeal <donb@codesourcery.com>
2436
2437 * linux-low.c (handle_extended_wait): Call
2438 linux_ptrace_get_extended_event.
2439 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
2440 linux_is_extended_waitstatus.
2441
2442 2014-09-16 Joel Brobecker <brobecker@adacore.com>
2443
2444 * Makefile.in (CPPFLAGS): Define.
2445 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
2446 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
2447
2448 2014-09-16 Gary Benson <gbenson@redhat.com>
2449
2450 * inferiors.h (current_inferior): Renamed as...
2451 (current_thread): New variable. All uses updated.
2452 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
2453 (maybe_move_out_of_jump_pad): Likewise.
2454 (cancel_breakpoint): Likewise.
2455 (linux_low_filter_event): Likewise.
2456 (wait_for_sigstop): Likewise.
2457 (linux_resume_one_lwp): Likewise.
2458 (need_step_over_p): Likewise.
2459 (start_step_over): Likewise.
2460 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
2461 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
2462 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
2463 and save_inferior as saved_thread.
2464 * regcache.c (get_thread_regcache): Renamed saved_inferior as
2465 saved_thread.
2466 (regcache_invalidate_thread): Likewise.
2467 * remote-utils.c (prepare_resume_reply): Likewise.
2468 * thread-db.c (thread_db_get_tls_address): Likewise.
2469 (disable_thread_event_reporting): Likewise.
2470 (remove_thread_event_breakpoints): Likewise.
2471 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
2472 as saved_thread.
2473 * target.h (set_desired_inferior): Renamed as...
2474 (set_desired_thread): New declaration. All uses updated.
2475 * server.c (myresume): Updated comment to reference thread instead
2476 of inferior.
2477 (handle_serial_event): Likewise.
2478 (handle_target_event): Likewise.
2479
2480 2014-09-12 Tom Tromey <tromey@redhat.com>
2481 Gary Benson <gbenson@redhat.com>
2482
2483 * regcache.h: Include common-regcache.h.
2484 (regcache_read_pc): Don't declare.
2485 * regcache.c (get_thread_regcache_for_ptid): New function.
2486
2487 2014-09-11 Tom Tromey <tromey@redhat.com>
2488 Gary Benson <gbenson@redhat.com>
2489
2490 * symbol.c: New file.
2491 * Makefile.in (SFILES): Add symbol.c.
2492 (OBS): Add symbol.o.
2493
2494 2014-09-11 Gary Benson <gbenson@redhat.com>
2495
2496 * target.c (target_stop_ptid, target_continue_ptid): New
2497 functions.
2498
2499 2014-09-11 Tom Tromey <tromey@redhat.com>
2500 Gary Benson <gbenson@redhat.com>
2501
2502 * target.h: Include target/target.h.
2503 * target.c (target_read_memory, target_read_uint32)
2504 (target_write_memory): New functions.
2505
2506 2014-09-11 Gary Benson <gbenson@redhat.com>
2507
2508 * server.h (debug_hw_points): Don't declare.
2509 * server.c (debug_hw_points): Don't define. Replace all uses
2510 with show_debug_regs.
2511 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
2512 all uses with show_debug_regs.
2513
2514 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
2515
2516 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
2517 endianness into account.
2518 (ppc_supply_ptrace_register): Likewise.
2519
2520 2014-09-03 James Hogan <james.hogan@imgtec.com>
2521
2522 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
2523 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
2524
2525 2014-09-03 Gary Benson <gbenson@redhat.com>
2526
2527 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
2528 ALL_DEBUG_ADDRESS_REGISTERS.
2529
2530 2014-09-02 Gary Benson <gbenson@redhat.com>
2531
2532 * i386-low.h: Renamed as...
2533 * x86-low.h: New file. All type, function and variable name
2534 prefixes changed from "i386_" to "x86_". All references updated.
2535 * i386-low.c: Renamed as...
2536 * x86-low.c: New file. All type, function and variable name
2537 prefixes changed from "i386_" to "x86_". All references updated.
2538
2539 2014-09-02 Gary Benson <gbenson@redhat.com>
2540
2541 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
2542 (x86_linux_new_thread): Likewise.
2543
2544 2014-08-29 Gary Benson <gbenson@redhat.com>
2545
2546 * server.h (setjmp.h): Do not include.
2547 (toplevel): Do not declare.
2548 (common-exceptions.h): Include.
2549 (cleanups.h): Likewise.
2550 * server.c (toplevel): Do not define.
2551 (exit_code): New static global.
2552 (detach_or_kill_for_exit_cleanup): New function.
2553 (main): New function. Original main renamed to...
2554 (captured_main): New function.
2555 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
2556
2557 2014-08-29 Gary Benson <gbenson@redhat.com>
2558
2559 * Makefile.in (SFILES): Add common/common-exceptions.c.
2560 (OBS): Add common-exceptions.o.
2561 (common-exceptions.o): New rule.
2562 * utils.c (prepare_to_throw_exception): New function.
2563
2564 2014-08-29 Gary Benson <gbenson@redhat.com>
2565
2566 * config.in: Regenerate.
2567 * configure: Likewise.
2568
2569 2014-08-29 Gary Benson <gbenson@redhat.com>
2570
2571 * Makefile.in (SFILES): Add common/cleanups.c.
2572 (OBS): cleanups.o.
2573 (cleanups.o): New rule.
2574
2575 2014-08-29 Gary Benson <gbenson@redhat.com>
2576
2577 * utils.c (internal_vwarning): New function.
2578
2579 2014-08-28 Gary Benson <gbenson@redhat.com>
2580
2581 * utils.h (fatal): Remove declaration.
2582 * utils.c (fatal): Remove function.
2583
2584 2014-08-28 Gary Benson <gbenson@redhat.com>
2585
2586 * tracepoint.c (gdb_agent_init): Replace fatal with
2587 perror_with_name.
2588 (initialize_tracepoint): Likewise.
2589
2590 2014-08-28 Gary Benson <gbenson@redhat.com>
2591
2592 * remote-utils.c (remote_prepare): Replace fatal with error.
2593
2594 2014-08-28 Gary Benson <gbenson@redhat.com>
2595
2596 * linux-low.c (linux_async): Replace fatal with warning.
2597 Tidy up and return.
2598 (linux_start_non_stop): Return -1 if linux_async failed.
2599
2600 2014-08-28 Gary Benson <gbenson@redhat.com>
2601
2602 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
2603 gdb_assert.
2604 (i386_dr_low_get_addr): Remove vague comment.
2605 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
2606 gdb_assert.
2607
2608 2014-08-28 Gary Benson <gbenson@redhat.com>
2609
2610 * inferiors.c (get_thread_process): Replace check with gdb_assert.
2611 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
2612 internal_error.
2613 (linux_resume_one_lwp): Likewise.
2614 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
2615 gdb_assert.
2616 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
2617 with internal_error.
2618 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
2619 (init_register_cache): Replace fatal with gdb_assert_not_reached.
2620 (find_register_by_name): Replace fatal with internal_error.
2621 (find_regno): Likewise.
2622 * tdesc.c (init_target_desc): Replace check with gdb_assert.
2623 * thread-db.c (thread_db_create_event): Likewise.
2624 (thread_db_load_search): Likewise.
2625 (try_thread_db_load_1): Likewise.
2626 * tracepoint.c (get_jump_space_head): Replace fatal with
2627 internal_error.
2628 (claim_trampoline_space): Likewise.
2629 (have_fast_tracepoint_trampoline_buffer): Likewise.
2630 (cmd_qtstart): Likewise.
2631 (stop_tracing): Likewise.
2632 (fast_tracepoint_collecting): Likewise.
2633 (target_malloc): Likewise.
2634 (download_tracepoint): Likewise.
2635 (download_trace_state_variables): Replace check with gdb_assert.
2636 (upload_fast_traceframes): Replace fatal with internal_error.
2637
2638 2014-08-19 Tom Tromey <tromey@redhat.com>
2639 Gary Benson <gbenson@redhat.com>
2640
2641 * Makefile.in (SFILES): Add common/common-debug.c.
2642 (OBS): Add common-debug.o.
2643 (common-debug.o): New rule.
2644 * debug.h (debug_printf): Don't declare.
2645 * debug.c (debug_printf): Renamed and rewritten as...
2646 (debug_vprintf): New function.
2647
2648 2014-08-19 Gary Benson <gbenson@redhat.com>
2649
2650 * utils.h: Do not include print-utils.h.
2651
2652 2014-08-19 Tom Tromey <tromey@redhat.com>
2653 Gary Benson <gbenson@redhat.com>
2654
2655 * server.h: Add static assertion.
2656 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
2657
2658 2014-08-19 Tom Tromey <tromey@redhat.com>
2659 Gary Benson <gbenson@redhat.com>
2660
2661 * Makefile.in (SFILES): Add common/errors.c.
2662 (OBS): Add errors.o.
2663 (IPA_OBS): Add errors-ipa.o.
2664 (errors.o): New rule.
2665 (errors-ipa.o): Likewise.
2666 * utils.h (perror_with_name, error, warning): Don't declare.
2667 * utils.c (warning): Renamed and rewritten as...
2668 (vwarning): New function.
2669 (error): Renamed and rewritten as...
2670 (verror): New function.
2671 (internal_error): Renamed and rewritten as...
2672 (internal_verror): New function.
2673
2674 2014-08-07 Gary Benson <gbenson@redhat.com>
2675
2676 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
2677 * configure: Regenerate.
2678 * config.in: Likewise.
2679 * server.h: Do not include errno.h.
2680 * event-loop.c: Likewise.
2681 * hostio-errno.c: Likewise.
2682 * linux-low.c: Likewise.
2683 * remote-utils.c: Likewise.
2684 * spu-low.c: Likewise.
2685 * utils.c: Likewise.
2686 * gdbreplay.c: Unconditionally include errno.h.
2687
2688 2014-08-07 Gary Benson <gbenson@redhat.com>
2689
2690 * server.h: Do not include string.h.
2691 * event-loop.c: Likewise.
2692 * linux-low.c: Likewise.
2693 * regcache.c: Likewise.
2694 * remote-utils.c: Likewise.
2695 * spu-low.c: Likewise.
2696 * utils.c: Likewise.
2697
2698 2014-08-07 Gary Benson <gbenson@redhat.com>
2699
2700 * server.h: Do not include gdb_assert.h.
2701
2702 2014-08-07 Gary Benson <gbenson@redhat.com>
2703
2704 * server.h: Do not include common-utils.h.
2705
2706 2014-08-07 Gary Benson <gbenson@redhat.com>
2707
2708 * server.h: Do not include ptid.h.
2709 * notif.h: Likewise.
2710
2711 2014-08-07 Gary Benson <gbenson@redhat.com>
2712
2713 * server.h: Do not include gdb_locale.h.
2714
2715 2014-08-07 Gary Benson <gbenson@redhat.com>
2716
2717 * server.h: Do not include gdb/signals.h.
2718 * win32-low.c: Likewise.
2719
2720 2014-08-07 Gary Benson <gbenson@redhat.com>
2721
2722 * server.h: Do not include pathmax.h.
2723
2724 2014-08-07 Gary Benson <gbenson@redhat.com>
2725
2726 * server.h: Do not include libiberty.h.
2727 * linux-bfin-low.c: Likewise.
2728
2729 2014-08-07 Gary Benson <gbenson@redhat.com>
2730
2731 * server.h: Do not include ansidecl.h.
2732
2733 2014-08-07 Gary Benson <gbenson@redhat.com>
2734
2735 * linux-x86-low.c: Do not include stddef.h.
2736 * lynx-ppc-low.c: Likewise.
2737 * tracepoint.c: Likewise.
2738
2739 2014-08-07 Gary Benson <gbenson@redhat.com>
2740
2741 * server.h: Do not include stdarg.h.
2742 * nto-low.c: Likewise.
2743
2744 2014-08-07 Gary Benson <gbenson@redhat.com>
2745
2746 * server.h: Do not include stdlib.h.
2747 * inferiors.c: Likewise.
2748 * linux-low.c: Likewise.
2749 * regcache.c: Likewise.
2750 * spu-low.c: Likewise.
2751 * tracepoint.c: Likewise.
2752 * utils.c: Likewise.
2753
2754 2014-08-07 Gary Benson <gbenson@redhat.com>
2755
2756 * server.h: Do not include stdio.h.
2757 * linux-low.c: Likewise.
2758 * remote-utils.c: Likewise.
2759 * spu-low.c: Likewise.
2760 * utils.c: Likewise.
2761 * wincecompat.c: Likewise.
2762
2763 2014-08-06 Gary Benson <gbenson@redhat.com>
2764
2765 * regcache.c (init_register_cache): Move conditionals inside if.
2766
2767 2014-08-06 Gary Benson <gbenson@redhat.com>
2768
2769 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
2770
2771 2014-07-31 Gary Benson <gbenson@redhat.com>
2772
2773 * ax.h: Do not include server.h.
2774 * gdbthread.h: Likewise.
2775 * lynx-low.h: Likewise.
2776 * notif.h: Likewise.
2777
2778 2014-07-30 Gary Benson <gbenson@redhat.com>
2779
2780 * server.h: Include common-defs.h.
2781 Do not include config.h or build-gnulib-gdbserver/config.h.
2782
2783 2014-07-30 Gary Benson <gbenson@redhat.com>
2784
2785 * hostio-errno.c: Move server.h to top of includes list.
2786 * inferiors.c: Likewise.
2787 * linux-x86-low.c: Likewise.
2788 * notif.c: Include server.h.
2789
2790 2014-07-24 Tom Tromey <tromey@redhat.com>
2791 Gary Benson <gbenson@redhat.com>
2792
2793 * server.h (CORE_ADDR): Now unsigned.
2794
2795 2014-07-16 Pedro Alves <palves@redhat.com>
2796
2797 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
2798
2799 2014-07-15 Pedro Alves <palves@redhat.com>
2800
2801 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
2802 copy.
2803
2804 2014-07-11 Pedro Alves <palves@redhat.com>
2805
2806 * linux-low.c (kill_wait_lwp): New function, based on
2807 kill_one_lwp_callback, but use my_waitpid directly.
2808 (kill_one_lwp_callback, linux_kill): Use it.
2809
2810 2014-06-23 Pedro Alves <palves@redhat.com>
2811
2812 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
2813 before setting DR0..DR3.
2814
2815 2014-06-20 Gary Benson <gbenson@redhat.com>
2816
2817 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
2818 * configure: Regenerated.
2819 * config.in: Likewise.
2820
2821 2014-06-20 Gary Benson <gbenson@redhat.com>
2822
2823 * Makefile.in (SFILES): Update locations for files moved
2824 from common to nat.
2825 (object file files): Reordered.
2826
2827 2014-06-20 Gary Benson <gbenson@redhat.com>
2828
2829 * i386-low.h (i386_dr_low_can_set_addr): Removed.
2830 (i386_dr_low_set_addr): Likewise.
2831 (i386_dr_low_get_addr): Likewise.
2832 (i386_dr_low_can_set_control): Likewise.
2833 (i386_dr_low_set_control): Likewise.
2834 (i386_dr_low_get_control): Likewise.
2835 (i386_dr_low_get_status): Likewise.
2836 (i386_get_debug_register_length): Likewise.
2837 * linux-x86-low.c (i386_dr_low_set_addr):
2838 Changed signature. Made static.
2839 (i386_dr_low_get_addr): Likewise.
2840 (i386_dr_low_set_control): Likewise.
2841 (i386_dr_low_get_control): Likewise.
2842 (i386_dr_low_get_status): Likewise.
2843 (i386_dr_low): New global variable.
2844 * win32-i386-low.c (i386_dr_low_set_addr):
2845 Changed signature. Made static.
2846 (i386_dr_low_get_addr): Likewise.
2847 (i386_dr_low_set_control): Likewise.
2848 (i386_dr_low_get_control): Likewise.
2849 (i386_dr_low_get_status): Likewise.
2850 (i386_dr_low): New global variable.
2851
2852 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
2853
2854 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
2855 * Makefile.in (AR, AR_FLAGS): Define.
2856 * configure: Regenerate.
2857
2858 2014-06-19 Gary Benson <gbenson@redhat.com>
2859
2860 * Makefile.in (i386-dregs.o): New rule.
2861 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
2862 * i386-low.c (target.h): Remove include.
2863 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
2864 (DR_CONTROL_SHIFT): Likewise.
2865 (DR_CONTROL_SIZE): Likewise.
2866 (DR_RW_EXECUTE): Likewise.
2867 (DR_RW_WRITE): Likewise.
2868 (DR_RW_READ): Likewise.
2869 (DR_RW_IORW): Likewise.
2870 (DR_LEN_1): Likewise.
2871 (DR_LEN_2): Likewise.
2872 (DR_LEN_4): Likewise.
2873 (DR_LEN_8): Likewise.
2874 (DR_LOCAL_ENABLE_SHIFT): Likewise.
2875 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
2876 (DR_ENABLE_SIZE): Likewise.
2877 (DR_LOCAL_SLOWDOWN): Likewise.
2878 (DR_GLOBAL_SLOWDOWN): Likewise.
2879 (DR_CONTROL_RESERVED): Likewise.
2880 (I386_DR_CONTROL_MASK): Likewise.
2881 (I386_DR_VACANT): Likewise.
2882 (I386_DR_LOCAL_ENABLE): Likewise.
2883 (I386_DR_GLOBAL_ENABLE): Likewise.
2884 (I386_DR_DISABLE): Likewise.
2885 (I386_DR_SET_RW_LEN): Likewise.
2886 (I386_DR_GET_RW_LEN): Likewise.
2887 (I386_DR_WATCH_HIT): Likewise.
2888 (i386_wp_op_t): Likewise.
2889 (i386_show_dr): Likewise.
2890 (i386_length_and_rw_bits): Likewise.
2891 (i386_insert_aligned_watchpoint): Likewise.
2892 (i386_remove_aligned_watchpoint): Likewise.
2893 (i386_handle_nonaligned_watchpoint): Likewise.
2894 i386_update_inferior_debug_regs(): Likewise.
2895 (i386_dr_insert_watchpoint): Likewise.
2896 (i386_dr_remove_watchpoint): Likewise.
2897 (i386_dr_region_ok_for_watchpoint): Likewise.
2898 (i386_dr_stopped_data_address): Likewise.
2899 (i386_dr_stopped_by_watchpoint): Likewise.
2900
2901 2014-06-19 Gary Benson <gbenson@redhat.com>
2902
2903 * i386-low.c (i386_dr_show): Renamed to
2904 i386_show_dr and made static. All uses updated.
2905 (i386_dr_length_and_rw_bits): Renamed to
2906 i386_length_and_rw_bits and made static.
2907 All uses updated.
2908 (i386_dr_insert_aligned_watchpoint): Renamed to
2909 i386_insert_aligned_watchpoint and made static.
2910 All uses updated.
2911 (i386_dr_remove_aligned_watchpoint): Renamed to
2912 i386_remove_aligned_watchpoint and made static.
2913 All uses updated.
2914 (i386_dr_update_inferior_debug_regs): Renamed to
2915 i386_update_inferior_debug_regs and made static.
2916 All uses updated.
2917
2918 2014-06-18 Gary Benson <gbenson@redhat.com>
2919
2920 * i386-low.h (i386_dr_low_can_set_addr): New macro.
2921 (i386_dr_low_can_set_control): Likewise.
2922 (i386_get_debug_register_length): Likewise.
2923 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
2924 (i386_dr_low_can_set_control): Likewise.
2925 (i386_get_debug_register_length): Likewise.
2926
2927 2014-06-17 Gary Benson <gbenson@redhat.com>
2928
2929 * i386-low.h (i386-dregs.h): New include.
2930 (DR_FIRSTADDR): Now in i386-dregs.h.
2931 (DR_LASTADDR): Likewise.
2932 (DR_NADDR): Likewise.
2933 (DR_STATUS): Likewise.
2934 (DR_CONTROL): Likewise.
2935 (i386_debug_reg_state): Likewise.
2936 (i386_dr_insert_watchpoint): Likewise.
2937 (i386_dr_remove_watchpoint): Likewise.
2938 (i386_dr_region_ok_for_watchpoint): Likewise.
2939 (i386_dr_stopped_data_address): Likewise.
2940 (i386_dr_stopped_by_watchpoint): Likewise.
2941 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
2942
2943 2014-06-18 Gary Benson <gbenson@redhat.com>
2944
2945 * i386-low.h (i386_low_insert_watchpoint): Renamed to
2946 i386_dr_insert_watchpoint.
2947 (i386_low_remove_watchpoint): Renamed to
2948 i386_dr_remove_watchpoint.
2949 (i386_low_region_ok_for_watchpoint): Renamed to
2950 i386_dr_region_ok_for_watchpoint.
2951 (i386_low_stopped_data_address): Renamed to
2952 i386_dr_stopped_data_address.
2953 (i386_low_stopped_by_watchpoint): Renamed to
2954 i386_dr_stopped_by_watchpoint.
2955 * i386-low.c (i386_show_dr): Renamed to
2956 i386_dr_show and made nonstatic. All uses updated.
2957 (i386_length_and_rw_bits): Renamed to
2958 i386_dr_length_and_rw_bits and made nonstatic.
2959 All uses updated.
2960 (i386_insert_aligned_watchpoint): Renamed to
2961 i386_dr_insert_aligned_watchpoint and made nonstatic.
2962 All uses updated.
2963 (i386_remove_aligned_watchpoint): Renamed to
2964 i386_dr_remove_aligned_watchpoint and made nonstatic.
2965 All uses updated.
2966 (i386_update_inferior_debug_regs): Renamed to
2967 i386_dr_update_inferior_debug_regs and made nonstatic.
2968 All uses updated.
2969 (i386_low_insert_watchpoint): Renamed to
2970 i386_dr_insert_watchpoint. All uses updated.
2971 (i386_low_remove_watchpoint): Renamed to
2972 i386_dr_remove_watchpoint. All uses updated.
2973 (i386_low_region_ok_for_watchpoint): Renamed to
2974 i386_dr_region_ok_for_watchpoint. All uses updated.
2975 (i386_low_stopped_data_address): Renamed to
2976 i386_dr_stopped_data_address. All uses updated.
2977 (i386_low_stopped_by_watchpoint): Renamed to
2978 i386_dr_stopped_by_watchpoint. All uses updated.
2979
2980 2014-06-18 Gary Benson <gbenson@redhat.com>
2981
2982 * i386-low.c (i386_dr_low_can_set_addr): New macro.
2983 (i386_dr_low_can_set_control): Likewise.
2984 (i386_insert_aligned_watchpoint): New check.
2985
2986 2014-06-18 Gary Benson <gbenson@redhat.com>
2987
2988 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
2989 Renamed to state.
2990
2991 2014-06-18 Gary Benson <gbenson@redhat.com>
2992
2993 * i386-low.c (i386_length_and_rw_bits): Use internal_error
2994 instead of fatal and error.
2995 (i386_handle_nonaligned_watchpoint): Likewise.
2996
2997 2014-06-18 Gary Benson <gbenson@redhat.com>
2998
2999 * i386-low.c (i386_get_debug_register_length): New macro.
3000 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
3001 (i386_show_dr): Use debug_printf instead of fprintf. Use
3002 phex to format values.
3003
3004 2014-06-18 Gary Benson <gbenson@redhat.com>
3005
3006 * i386-low.h: Comment changes.
3007 * i386-low.c: Likewise.
3008
3009 2014-06-18 Gary Benson <gbenson@redhat.com>
3010
3011 * i386-low.c: Whitespace changes.
3012
3013 2014-06-12 Tom Tromey <tromey@redhat.com>
3014
3015 * utils.c (freeargv): Remove.
3016
3017 2014-06-12 Tom Tromey <tromey@redhat.com>
3018
3019 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
3020 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
3021 (parse_debug_format_options): Likewise.
3022 (gdbserver_usage): Likewise.
3023 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
3024 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
3025 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
3026 against libiberty.
3027 ($(LIBGNU)): Depend on libiberty.
3028 (all-lib): Recurse into all subdirs.
3029 (install-only): Invoke "install" target in subdirs.
3030 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
3031 targets.
3032 * configure: Rebuild.
3033 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
3034 for vasprintf, vsnprintf, or gettimeofday.
3035 * configure.srv: Don't add safe-ctype.o or lbasename.o to
3036 srv_tgtobj.
3037
3038 2014-06-05 Joel Brobecker <brobecker@adacore.com>
3039
3040 * development.sh: Delete.
3041 * Makefile.in (config.status): Adjust dependency on development.sh.
3042 * configure.ac: Adjust development.sh source call.
3043 * configure: Regenerate.
3044
3045 2014-06-02 Pedro Alves <palves@redhat.com>
3046
3047 * ax.c (gdb_free_agent_expr): New function.
3048 * ax.h (gdb_free_agent_expr): New declaration.
3049 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
3050 list.
3051 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
3052 static.
3053 (clear_breakpoint_conditions_and_commands): New function.
3054 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
3055 (clear_breakpoint_conditions_and_commands): New declaration.
3056
3057 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
3058
3059 * linux-aarch64-low.c (asm/ptrace.h): Include.
3060
3061 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
3062
3063 Fix TLS access for -static -pthread.
3064 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
3065 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
3066 (thread_db_load_search, try_thread_db_load_1): Initialize it.
3067
3068 2014-05-20 Pedro Alves <palves@redhat.com>
3069
3070 * linux-aarch64-low.c (aarch64_insert_point)
3071 (aarch64_remove_point): No longer check whether the type is
3072 supported here. Adjust to new interface.
3073 (the_low_target): Install aarch64_supports_z_point_type as
3074 supports_z_point_type method.
3075 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
3076 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
3077 instead of a Z packet char. Adjust.
3078 (arm_supports_z_point_type): New function.
3079 (arm_insert_point, arm_remove_point): Adjust to new interface.
3080 (the_low_target): Install arm_supports_z_point_type.
3081 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
3082 (cris_insert_point, cris_remove_point): Adjust to new interface.
3083 Don't check whether the type is supported here.
3084 (the_low_target): Install cris_supports_z_point_type.
3085 * linux-low.c (linux_supports_z_point_type): New function.
3086 (linux_insert_point, linux_remove_point): Adjust to new interface.
3087 * linux-low.h (struct linux_target_ops) <insert_point,
3088 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
3089 raw_breakpoint pointer parameter.
3090 <supports_z_point_type>: New method.
3091 * linux-mips-low.c (mips_supports_z_point_type): New function.
3092 (mips_insert_point, mips_remove_point): Adjust to new interface.
3093 Use mips_supports_z_point_type.
3094 (the_low_target): Install mips_supports_z_point_type.
3095 * linux-ppc-low.c (the_low_target): Install NULL as
3096 supports_z_point_type method.
3097 * linux-s390-low.c (the_low_target): Install NULL as
3098 supports_z_point_type method.
3099 * linux-sparc-low.c (the_low_target): Install NULL as
3100 supports_z_point_type method.
3101 * linux-x86-low.c (x86_supports_z_point_type): New function.
3102 (x86_insert_point): Adjust to new insert_point interface. Use
3103 insert_memory_breakpoint. Adjust to new
3104 i386_low_insert_watchpoint interface.
3105 (x86_remove_point): Adjust to remove_point interface. Use
3106 remove_memory_breakpoint. Adjust to new
3107 i386_low_remove_watchpoint interface.
3108 (the_low_target): Install x86_supports_z_point_type.
3109 * lynx-low.c (lynx_target_ops): Install NULL as
3110 supports_z_point_type callback.
3111 * nto-low.c (nto_supports_z_point_type): New.
3112 (nto_insert_point, nto_remove_point): Adjust to new interface.
3113 (nto_target_ops): Install nto_supports_z_point_type.
3114 * mem-break.c: Adjust intro comment.
3115 (struct raw_breakpoint) <raw_type, size>: New fields.
3116 <inserted>: Update comment.
3117 <shlib_disabled>: Delete field.
3118 (enum bkpt_type) <gdb_breakpoint>: Delete value.
3119 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
3120 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
3121 (raw_bkpt_type_to_target_hw_bp_type): New function.
3122 (find_enabled_raw_code_breakpoint_at): New function.
3123 (find_raw_breakpoint_at): New type and size parameters. Use them.
3124 (insert_memory_breakpoint): New function, based off
3125 set_raw_breakpoint_at.
3126 (remove_memory_breakpoint): New function.
3127 (set_raw_breakpoint_at): Reimplement.
3128 (set_breakpoint): New, based on set_breakpoint_at.
3129 (set_breakpoint_at): Reimplement.
3130 (delete_raw_breakpoint): Go through the_target->remove_point
3131 instead of assuming memory breakpoints.
3132 (find_gdb_breakpoint_at): Delete.
3133 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
3134 (find_gdb_breakpoint): New function.
3135 (set_gdb_breakpoint_at): Delete.
3136 (z_type_supported): New function.
3137 (set_gdb_breakpoint_1): New function, loosely based off
3138 set_gdb_breakpoint_at.
3139 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
3140 (delete_gdb_breakpoint_at): Delete.
3141 (delete_gdb_breakpoint_1): New function, loosely based off
3142 delete_gdb_breakpoint_at.
3143 (delete_gdb_breakpoint): New function.
3144 (clear_gdb_breakpoint_conditions): Rename to ...
3145 (clear_breakpoint_conditions): ... this. Don't handle a NULL
3146 breakpoint.
3147 (add_condition_to_breakpoint): Make static.
3148 (add_breakpoint_condition): Take a struct breakpoint pointer
3149 instead of an address. Adjust.
3150 (gdb_condition_true_at_breakpoint): Rename to ...
3151 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
3152 z_type parameter.
3153 (gdb_condition_true_at_breakpoint): Reimplement.
3154 (add_breakpoint_commands): Take a struct breakpoint pointer
3155 instead of an address. Adjust.
3156 (gdb_no_commands_at_breakpoint): Rename to ...
3157 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
3158 parameter. Return true if no breakpoint was found. Change debug
3159 output.
3160 (gdb_no_commands_at_breakpoint): Reimplement.
3161 (run_breakpoint_commands): Rename to ...
3162 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
3163 and change return type to boolean.
3164 (run_breakpoint_commands): New function.
3165 (gdb_breakpoint_here): Also check for Z1 breakpoints.
3166 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
3167 breakpoint. Go through the_target->remove_point instead of
3168 assuming memory breakpoint.
3169 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
3170 software and hardware breakpoints.
3171 (reinsert_raw_breakpoint): Go through the_target->insert_point
3172 instead of assuming memory breakpoint.
3173 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
3174 software and hardware breakpoints.
3175 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
3176 Check both software and hardware breakpoints.
3177 (validate_inserted_breakpoint): Assert the breakpoint is a
3178 software breakpoint. Set the inserted flag to -1 instead of
3179 setting shlib_disabled.
3180 (delete_disabled_breakpoints): Adjust.
3181 (validate_breakpoints): Only validate software breakpoints.
3182 Adjust to inserted flag change.
3183 (check_mem_read, check_mem_write): Skip breakpoint types other
3184 than software breakpoints. Adjust to inserted flag change.
3185 * mem-break.h (enum raw_bkpt_type): New enum.
3186 (raw_breakpoint, struct process_info): Forward declare.
3187 (Z_packet_to_target_hw_bp_type): Delete declaration.
3188 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
3189 (set_gdb_breakpoint, delete_gdb_breakpoint)
3190 (clear_breakpoint_conditions): New declarations.
3191 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
3192 (breakpoint_inserted_here): Update comment.
3193 (add_breakpoint_condition, add_breakpoint_commands): Replace
3194 address parameter with a breakpoint pointer parameter.
3195 (gdb_breakpoint_here): Update comment.
3196 (delete_gdb_breakpoint_at): Delete.
3197 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
3198 * server.c (process_point_options): Take a struct breakpoint
3199 pointer instead of an address. Adjust.
3200 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
3201 delete_gdb_breakpoint.
3202 * spu-low.c (spu_target_ops): Install NULL as
3203 supports_z_point_type method.
3204 * target.h: Include mem-break.h.
3205 (struct target_ops) <prepare_to_access_memory>: Update comment.
3206 <supports_z_point_type>: New field.
3207 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
3208 instead of a char. Also take a raw breakpoint pointer.
3209 * win32-arm-low.c (the_low_target): Install NULL as
3210 supports_z_point_type.
3211 * win32-i386-low.c (i386_supports_z_point_type): New function.
3212 (i386_insert_point, i386_remove_point): Adjust to new interface.
3213 (the_low_target): Install i386_supports_z_point_type.
3214 * win32-low.c (win32_supports_z_point_type): New function.
3215 (win32_insert_point, win32_remove_point): Adjust to new interface.
3216 (win32_target_ops): Install win32_supports_z_point_type.
3217 * win32-low.h (struct win32_target_ops):
3218 <supports_z_point_type>: New method.
3219 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
3220 instead of a char. Also take a raw breakpoint pointer.
3221
3222 2014-05-20 Pedro Alves <palves@redhat.com>
3223
3224 * mem-break.h: Include break-common.h.
3225 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
3226 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
3227 (Z_packet_to_target_hw_bp_type): New declaration.
3228 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
3229 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
3230 (Z_PACKET_ACCESS_WP): Delete macros.
3231 (Z_packet_to_hw_type): Delete function.
3232 * i386-low.h: Don't include break-common.h here.
3233 (Z_packet_to_hw_type): Delete declaration.
3234 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
3235 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
3236 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
3237 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
3238 * linux-aarch64-low.c: Don't include break-common.h here.
3239 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
3240 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
3241 (Z_packet_to_target_hw_bp_type): Delete function.
3242 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
3243 function.
3244 (mips_insert_point, mips_remove_point): Use
3245 Z_packet_to_target_hw_bp_type.
3246
3247 2014-05-20 Pedro Alves <palves@redhat.com>
3248
3249 * linux-aarch64-low.c: Include break-common.h.
3250 (enum target_point_type): Delete.
3251 (Z_packet_to_point_type): Rename to ...
3252 (Z_packet_to_target_hw_bp_type): ... this, and return a
3253 target_hw_bp_type instead.
3254 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
3255 instead of an enum target_point_type.
3256 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
3257 breakpoint type.
3258 (aarch64_dr_state_insert_one_point)
3259 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
3260 (aarch64_handle_aligned_watchpoint)
3261 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
3262 Take an enum target_hw_bp_type instead of an enum
3263 target_point_type.
3264 (aarch64_supports_z_point_type): New function.
3265 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
3266 use Z_packet_to_target_hw_bp_type.
3267
3268 2014-05-20 Joel Brobecker <brobecker@adacore.com>
3269
3270 * configure.ac: Only use -Werror by default when DEVELOPMENT
3271 is true.
3272 * configure: Regenerate.
3273
3274 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
3275
3276 Fix gdbserver qGetTLSAddr for x86_64 -m32.
3277 * linux-x86-low.c (X86_64_USER_REGS): New.
3278 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
3279
3280 2014-04-28 Yao Qi <yao@codesourcery.com>
3281
3282 * Makefile.in (i386-avx512.c): Fix the typo of generated file
3283 name.
3284
3285 2014-04-25 Pedro Alves <palves@redhat.com>
3286
3287 PR server/16255
3288 * linux-low.c (linux_attach_fail_reason_string): New function.
3289 (linux_attach_lwp): Delete.
3290 (linux_attach_lwp_1): Rename to ...
3291 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
3292 argument. Remove "initial" parameter. Return int instead of
3293 void. Don't error or warn here.
3294 (linux_attach): Adjust to call linux_attach_lwp. Call error on
3295 failure to attach to the tgid. Call warning when failing to
3296 attach to an lwp.
3297 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
3298 argument. Remove "initial" parameter. Return int instead of
3299 void. Don't error or warn here.
3300 (linux_attach_fail_reason_string): New declaration.
3301 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
3302 interface change. Use linux_attach_fail_reason_string.
3303
3304 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
3305 Walfred Tedeschi <walfred.tedeschi@intel.com>
3306
3307 * Makefile.in: Added rules to handle new files
3308 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
3309 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
3310 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
3311 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
3312 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
3313 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
3314 x32-avx512-linux.o.
3315 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
3316 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
3317 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
3318 i386/x32-avx512.xml.
3319 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
3320 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
3321 i386/x32-avx512-linux.xml.
3322 * i387-fp.c (num_avx512_k_registers): New constant for number
3323 of K registers.
3324 (num_avx512_zmmh_low_registers): New constant for number of
3325 lower ZMM registers (0-15).
3326 (num_avx512_zmmh_high_registers): New constant for number of
3327 higher ZMM registers (16-31).
3328 (num_avx512_ymmh_registers): New contant for number of higher
3329 YMM registers (ymm16-31 added by avx521 on x86_64).
3330 (num_avx512_xmm_registers): New constant for number of higher
3331 XMM registers (xmm16-31 added by AVX512 on x86_64).
3332 (struct i387_xsave): Add space for AVX512 registers.
3333 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
3334 Add code to handle AVX512 registers.
3335 (i387_xsave_to_cache): Add code to handle AVX512 registers.
3336 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
3337 prototypei from generated file.
3338 (tdesc_amd64_avx512_linux): Likewise.
3339 (init_registers_x32_avx512_linux): Likewise.
3340 (tdesc_x32_avx512_linux): Likewise.
3341 (init_registers_i386_avx512_linux): Likewise.
3342 (tdesc_i386_avx512_linux): Likewise.
3343 (x86_64_regmap): Add AVX512 registers.
3344 (x86_linux_read_description): Add code to handle AVX512 XSTATE
3345 mask.
3346 (initialize_low_arch): Add code to initialize AVX512 registers.
3347
3348 2014-04-23 Pedro Alves <palves@redhat.com>
3349
3350 * mem-break.c (find_gdb_breakpoint_at): Make static.
3351 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
3352
3353 2014-04-23 Pedro Alves <palves@redhat.com>
3354
3355 * i386-low.c: Don't include break-common.h here.
3356 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
3357 prototype to take target_hw_bp_type as argument instead of a Z
3358 packet char.
3359 * i386-low.h: Include break-common.h here.
3360 (Z_packet_to_hw_type): Declare.
3361 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
3362 prototypes.
3363 * linux-x86-low.c (x86_insert_point): Convert the packet number to
3364 a target_hw_bp_type before calling i386_low_insert_watchpoint.
3365 (x86_remove_point): Convert the packet number to a
3366 target_hw_bp_type before calling i386_low_remove_watchpoint.
3367 * win32-i386-low.c (i386_insert_point): Convert the packet number
3368 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
3369 (i386_remove_point): Convert the packet number to a
3370 target_hw_bp_type before calling i386_low_remove_watchpoint.
3371
3372 2014-04-23 Pedro Alves <palves@redhat.com>
3373
3374 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
3375
3376 2014-04-10 Pedro Alves <palves@redhat.com>
3377
3378 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
3379 Check if the condition or command is NULL before checking if the
3380 breakpoint is known. On success, return true.
3381 * mem-break.h (add_breakpoint_condition): Document return.
3382 (add_breakpoint_commands): Add describing comment.
3383 * server.c (skip_to_semicolon): New function.
3384 (process_point_options): Use it.
3385
3386 2014-04-09 Pedro Alves <palves@redhat.com>
3387
3388 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
3389 to lwpid_of.
3390
3391 2014-02-27 Pedro Alves <palves@redhat.com>
3392
3393 PR 12702
3394 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
3395 macros.
3396 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
3397 output.
3398 (last_thread_of_process_p): Take a PID argument instead of a
3399 thread pointer.
3400 (linux_wait_for_lwp): Delete.
3401 (num_lwps, check_zombie_leaders, not_stopped_callback): New
3402 functions.
3403 (linux_low_filter_event): New function, party factored out from
3404 linux_wait_for_event.
3405 (linux_wait_for_event): Rename to ...
3406 (linux_wait_for_event_filtered): ... this. Add new filter ptid
3407 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
3408 sigsuspend. Check for zombie leaders.
3409 (linux_wait_for_event): Reimplement as wrapper around
3410 linux_wait_for_event_filtered.
3411 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
3412 a normal or signal exit is seen, it's the whole process exiting.
3413 (wait_for_sigstop): No longer a for_each_inferior callback.
3414 Rewrite on top of linux_wait_for_event_filtered.
3415 (stop_all_lwps): Call wait_for_sigstop directly.
3416 * server.c (resume, handle_target_event): Handle
3417 TARGET_WAITKIND_NO_RESUMED.
3418
3419 2014-02-26 Joel Brobecker <brobecker@adacore.com>
3420
3421 * win32-low.c (psapi_get_dll_name,
3422 * win32_CreateToolhelp32Snapshot): Delete.
3423 (win32_CreateToolhelp32Snapshot, win32_Module32First)
3424 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
3425 Delete.
3426 (handle_load_dll): Add function description.
3427 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
3428
3429 2014-02-26 Joel Brobecker <brobecker@adacore.com>
3430
3431 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
3432 Add comment.
3433 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
3434 base address when calling win32_add_one_solib.
3435 (handle_load_dll): Delete local variable load_addr.
3436 Remove 0x1000 offset applied to DLL base address when calling
3437 win32_add_one_solib.
3438 (handle_unload_dll): Add comment.
3439
3440 2014-02-26 Joel Brobecker <brobecker@adacore.com>
3441
3442 * win32-low.c (win32_add_all_dlls): Renames
3443 win32_ensure_ntdll_loaded. Rewrite function documentation.
3444 Adjust implementation to always load all DLLs.
3445 Add 0x1000 offset to DLL base address when calling
3446 win32_add_one_solib.
3447 (child_initialization_done): New static global.
3448 (do_initial_child_stuff): Set child_initialization_done to
3449 zero during child initialization, and 1 after. Replace call
3450 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
3451 Add comment.
3452 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
3453 (handle_unload_dll): Add function documentation.
3454 (get_child_debug_event): Ignore load and unload DLL events
3455 during child initialization.
3456
3457 2014-02-20 Doug Evans <dje@google.com>
3458
3459 Remove global all_lwps.
3460 * inferiors.h (ptid_of): Move here from linux-low.h.
3461 (pid_of, lwpid_of): Ditto.
3462 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
3463 parameter is a struct thread_info * now.
3464 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
3465 directly. Pass &all_threads to find_inferior instead of &all_lwps.
3466 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
3467 directly.
3468 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
3469 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
3470 * linux-arm-low.c (update_registers_callback): Update, "entry"
3471 parameter is a struct thread_info * now.
3472 Fetch lwpid from current_inferior directly.
3473 (arm_insert_point): Pass &all_threads to find_inferior instead of
3474 &all_lwps.
3475 (arm_remove_point): Ditto.
3476 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
3477 (arm_prepare_to_resume): Fetch pid from thread.
3478 (arm_read_description): Fetch lwpid from current_inferior directly.
3479 * linux-low.c (all_lwps): Delete.
3480 (delete_lwp): Delete call to remove_inferior.
3481 (handle_extended_wait): Fetch lwpid from thread.
3482 (add_lwp): Don't set lwp->entry.id. Remove call to
3483 add_inferior_to_list.
3484 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
3485 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
3486 (kill_one_lwp_callback): Ditto.
3487 (linux_kill): Don't dereference NULL pointer.
3488 Fetch ptid,lwpid from thread.
3489 (get_detach_signal): Fetch ptid from thread.
3490 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
3491 Simplify call to regcache_invalidate_thread.
3492 (delete_lwp_callback): Update, "entry" parameter is a
3493 struct thread_info * now. Fetch pid from thread.
3494 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
3495 (status_pending_p_callback): Update, "entry" parameter is a
3496 struct thread_info * now. Fetch ptid from thread.
3497 (find_lwp_pid): Update, "entry" parameter is a
3498 struct thread_info * now.
3499 (linux_wait_for_lwp): Fetch pid from thread.
3500 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
3501 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
3502 (enqueue_one_deferred_signal): Fetch lwpid from thread.
3503 (dequeue_one_deferred_signal): Ditto.
3504 (cancel_breakpoint): Fetch ptid from current_inferior.
3505 (linux_wait_for_event): Pass &all_threads to find_inferior,
3506 not &all_lwps. Fetch ptid, lwpid from thread.
3507 (count_events_callback): Update, "entry" parameter is a
3508 struct thread_info * now.
3509 (select_singlestep_lwp_callback): Ditto.
3510 (select_event_lwp_callback): Ditto.
3511 (cancel_breakpoints_callback): Ditto.
3512 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
3513 not &all_lwps.
3514 (select_event_lwp): Ditto. Fetch ptid from event_thread.
3515 (unsuspend_one_lwp): Update, "entry" parameter is a
3516 struct thread_info * now.
3517 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
3518 not &all_lwps.
3519 (linux_stabilize_threads): Ditto. And for for_each_inferior.
3520 Fetch lwpid from thread, not lwp.
3521 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
3522 Pass &all_threads to find_inferior, not &all_lwps.
3523 (send_sigstop): Fetch lwpid from thread, not lwp.
3524 (send_sigstop_callback): Update, "entry" parameter is a
3525 struct thread_info * now.
3526 (suspend_and_send_sigstop_callback): Ditto.
3527 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
3528 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
3529 struct thread_info * now.
3530 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
3531 from thread, lwp.
3532 (lwp_running): Update, "entry" parameter is a
3533 struct thread_info * now.
3534 (stop_all_lwps): Fetch ptid from thread.
3535 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
3536 (linux_resume_one_lwp): Fetch lwpid from thread.
3537 (linux_set_resume_request): Update, "entry" parameter is a
3538 struct thread_info * now. Fetch pid, lwpid from thread.
3539 (resume_status_pending_p): Update, "entry" parameter is a
3540 struct thread_info * now.
3541 (need_step_over_p): Ditto. Fetch lwpid from thread.
3542 (start_step_over): Fetch lwpid from thread.
3543 (linux_resume_one_thread): Update, "entry" parameter is a
3544 struct thread_info * now. Fetch lwpid from thread.
3545 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
3546 (proceed_one_lwp): Update, "entry" parameter is a
3547 struct thread_info * now. Fetch lwpid from thread.
3548 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
3549 struct thread_info * now.
3550 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
3551 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
3552 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
3553 directly.
3554 (regsets_store_inferior_registers): Ditto.
3555 (fetch_register, store_register): Ditto.
3556 (linux_read_memory, linux_write_memory): Ditto.
3557 (linux_request_interrupt): Ditto.
3558 (linux_read_auxv): Ditto.
3559 (linux_xfer_siginfo): Ditto.
3560 (linux_qxfer_spu): Ditto.
3561 (linux_qxfer_libraries_svr4): Ditto.
3562 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
3563 moved to inferiors.h.
3564 (get_lwp): Delete.
3565 (get_thread_lwp): Update.
3566 (struct lwp_info): Delete member "entry". Simplify comment for
3567 member "thread".
3568 (all_lwps): Delete.
3569 * linux-mips-low.c (mips_read_description): Fetch lwpid from
3570 current_inferior directly.
3571 (update_watch_registers_callback): Update, "entry" parameter is a
3572 struct thread_info * now. Fetch pid from thread.
3573 (mips_linux_prepare_to_resume): Fetch ptid from thread.
3574 (mips_insert_point): Fetch lwpid from current_inferior.
3575 Pass &all_threads to find_inferior, not &all_lwps.
3576 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
3577 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
3578 directly.
3579 (mips_stopped_data_address): Ditto.
3580 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
3581 directly.
3582 * linux-tile-low.c (tile_arch_setup): Ditto.
3583 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
3584 (update_debug_registers_callback): Update, "entry" parameter is a
3585 struct thread_info * now. Fetch pid from thread.
3586 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
3587 Pass &all_threads to find_inferior, not &all_lwps.
3588 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
3589 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
3590 Pass &all_threads to find_inferior, not &all_lwps.
3591 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
3592 (i386_dr_low_get_status): Ditto.
3593 (x86_linux_prepare_to_resume): Fetch ptid from thread.
3594 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
3595 (x86_linux_read_description): Ditto.
3596 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
3597
3598 2014-02-20 Doug Evans <dje@google.com>
3599
3600 * inferiors.c (get_first_inferior): Fix buglet.
3601
3602 2014-02-19 Doug Evans <dje@google.com>
3603
3604 * gdbthread.h (add_thread): Change result type to struct thread_info *.
3605 * inferiors.c (add_thread): Change result type to struct thread_info *.
3606 All callers updated.
3607 (add_lwp): Call add_thread here instead of in callers.
3608 All callers updated.
3609 * linux-low.h (get_lwp_thread): Rewrite.
3610 (struct lwp_info): New member "thread".
3611
3612 2014-02-19 Doug Evans <dje@google.com>
3613
3614 * linux-low.c (add_lwp): Change result to struct lwp_info *.
3615 All callers updated.
3616
3617 2014-02-19 Doug Evans <dje@google.com>
3618
3619 * inferiors.c (add_thread): Fix whitespace.
3620
3621 2014-02-19 Doug Evans <dje@google.com>
3622
3623 * dll.c (clear_dlls): Replace accessing list implemention details
3624 with API function.
3625 * gdbthread.h (get_first_thread): Declare.
3626 * inferiors.c (for_each_inferior_with_data): New function.
3627 (get_first_thread): New function.
3628 (find_thread_ptid): Simplify.
3629 (get_first_inferior): New function.
3630 (clear_list): Delete.
3631 (one_inferior_p): New function.
3632 (clear_inferior_list): New function.
3633 (clear_inferiors): Update.
3634 * inferiors.h (for_each_inferior_with_data): Declare.
3635 (clear_inferior_list): Declare.
3636 (one_inferior_p): Declare.
3637 (get_first_inferior): Declare.
3638 * linux-low.c (linux_wait_for_event): Replace accessing list
3639 implemention details with API function.
3640 * server.c (target_running): Ditto.
3641 (accumulate_file_name_length): New function.
3642 (emit_dll_description): New function.
3643 (handle_qxfer_libraries): Replace accessing list implemention
3644 details with API function.
3645 (handle_qxfer_threads_worker): New function.
3646 (handle_qxfer_threads_proper): Replace accessing list implemention
3647 details with API function.
3648 (handle_query): Ditto.
3649 (visit_actioned_threads_callback_ftype): New typedef.
3650 (visit_actioned_threads_data): New struct.
3651 (visit_actioned_threads): Rewrite to be find_inferior callback.
3652 (resume): Call find_inferior.
3653 (handle_status): Replace accessing list implemention
3654 details with API function.
3655 (process_serial_event): Replace accessing list implemention details
3656 with API function.
3657 * target.c (set_desired_inferior): Replace accessing list implemention
3658 details with API function.
3659 * tracepoint.c (same_process_p): New function.
3660 (gdb_agent_about_to_close): Replace accessing list implemention
3661 details with API function.
3662 * win32-low.c (child_delete_thread): Replace accessing list
3663 implemention details with API function.
3664 (match_dll_by_basename): New function.
3665 (dll_is_loaded_by_basename): New function.
3666 (win32_ensure_ntdll_loaded): Replace accessing list implemention
3667 details call to dll_is_loaded_by_basename.
3668
3669 2014-02-19 Doug Evans <dje@google.com>
3670
3671 * dll.h (struct dll_info): Add comment.
3672 * gdbthread.h (struct thread_info): Add comment.
3673 (current_ptid): Simplify.
3674 * inferiors.c (add_process): Update.
3675 (remove_process): Update.
3676 * inferiors.h (struct process_info): Rename member "head" to "entry".
3677 * linux-low.c (delete_lwp): Update.
3678 (add_lwp): Update.
3679 (last_thread_of_process_p): Update.
3680 (kill_one_lwp_callback, linux_kill): Update.
3681 (status_pending_p_callback): Update.
3682 (wait_for_sigstop): Update. Simplify read of ptid.
3683 (start_step_over): Update.
3684 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
3685 (get_lwp_thread): Update.
3686 (struct lwp_info): Rename member "head" to "entry".
3687 * regcache.h (inferior_list_entry): Delete.
3688 * server.c (kill_inferior_callback): Update.
3689 (detach_or_kill_inferior_callback): Update.
3690 (print_started_pid): Update.
3691 (print_attached_pid): Update.
3692 (process_serial_event): Simplify read of ptid.
3693 * thread-db.c (thread_db_create_event): Update.
3694 (thread_db_get_tls_address): Update.
3695 * win32-low.c (current_inferior_ptid): Simplify.
3696
3697 2014-02-19 Tom Tromey <tromey@redhat.com>
3698
3699 * target.h (struct target_ops) <supports_btrace>: Add target_ops
3700 argument.
3701 (target_supports_btrace): Update.
3702
3703 2014-02-14 Yao Qi <yao@codesourcery.com>
3704
3705 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
3706 (rsp-low-ipa.o): New target.
3707
3708 2014-02-12 Tom Tromey <tromey@redhat.com>
3709
3710 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
3711 convert_ascii_to_int.
3712 * regcache.c (registers_to_string): Likewise.
3713 * remote-utils.c (decode_M_packet): Likewise.
3714 * server.c (process_serial_event): Likewise.
3715
3716 2014-02-12 Tom Tromey <tromey@redhat.com>
3717
3718 * server.c (handle_query, handle_v_run): Use hex2bin, not
3719 unhexify.
3720 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
3721
3722 2014-02-12 Tom Tromey <tromey@redhat.com>
3723
3724 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
3725 convert_int_to_ascii.
3726 * regcache.c (registers_to_string, collect_register_as_string):
3727 Likewise.
3728 * remote-utils.c (look_up_one_symbol, relocate_instruction):
3729 Likewise.
3730 * server.c (process_serial_event): Likewise.
3731 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
3732 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
3733
3734 2014-02-12 Tom Tromey <tromey@redhat.com>
3735
3736 * remote-utils.c (look_up_one_symbol, monitor_output): Use
3737 bin2hex, not hexify.
3738 * tracepoint.c (cmd_qtstatus): Likewise.
3739
3740 2014-02-12 Tom Tromey <tromey@redhat.com>
3741
3742 * remote-utils.c (monitor_output): Pass explicit length to
3743 hexify.
3744
3745 2014-02-12 Tom Tromey <tromey@redhat.com>
3746
3747 * tracepoint.c: Include rsp-low.h.
3748 * server.c: Include rsp-low.h.
3749 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
3750 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
3751 declare.
3752 * remote-utils.c: Include rsp-low.h.
3753 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
3754 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
3755 (convert_int_to_ascii, convert_ascii_to_int): Move to
3756 common/rsp-low.c.
3757 * regcache.c: Include rsp-low.h.
3758 * ax.c: Include rsp-low.h.
3759 * Makefile.in (SFILES): Add common/rsp-low.c.
3760 (OBS): Add rsp-low.o.
3761 (rsp-low.o): New target.
3762
3763 2014-02-12 Tom Tromey <tromey@redhat.com>
3764
3765 * utils.h (pulongest, plongest, phex_nz): Don't declare.
3766 Include print-utils.h.
3767 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
3768 (plongest, thirty_two, phex_nz): Remove.
3769 * Makefile.in (SFILES): Add common/print-utils.c.
3770 (OBS): Add print-utils.o.
3771 (print-utils-ipa.o): New target.
3772 (print-utils.o): New target.
3773 (IPA_OBJS): Add print-utils-ipa.o.
3774
3775 2014-02-06 Tom Tromey <tromey@redhat.com>
3776
3777 * Makefile.in (SFILES): Fix indentation.
3778
3779 2014-02-05 Doug Evans <dje@google.com>
3780
3781 * linux-low.c (linux_wait_for_event): Improve comment.
3782 (linux_wait_1): Keep current_inferior in sync with event_child.
3783
3784 2014-01-22 Doug Evans <dje@google.com>
3785
3786 * gdbthread.h (gdb_id_to_thread): Delete, unused.
3787
3788 2014-01-22 Doug Evans <dje@google.com>
3789
3790 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
3791 * configure: Regenerate.
3792 * config.in: Regenerate.
3793 * Makefile.in (SFILES): Add debug.c.
3794 (OBS): Add debug.o.
3795 * debug.c: New file.
3796 * debug.h: New file.
3797 * linux-aarch64-low.c (*): Update all debugging printfs to use
3798 debug_printf instead of fprintf.
3799 * linux-arm-low.c (*): Ditto.
3800 * linux-cris-low.c (*): Ditto.
3801 * linux-crisv32-low.c (*): Ditto.
3802 * linux-m32r-low.c (*): Ditto.
3803 * linux-sparc-low.c (*): Ditto.
3804 * linux-x86.c (*): Ditto.
3805 * linux-low.c (*): Ditto.
3806 (linux_wait_1): Add calls to debug_enter, debug_exit.
3807 (linux_wait): Remove redundant debugging printf.
3808 (stop_all_lwps): Add calls to debug_enter, debug_exit.
3809 (linux_resume, unstop_all_lwps): Ditto.
3810 * mem-break.c (*): Update all debugging printfs to use
3811 debug_printf instead of fprintf.
3812 * remote-utils.c (*): Ditto.
3813 * thread-db.c (*): Ditto.
3814 * server.c #include <ctype.h>, "gdb_vecs.h".
3815 (debug_threads): Moved to debug.c.
3816 (*): Update all debugging printfs to use debug_printf instead of
3817 fprintf.
3818 (start_inferior): Replace call to fflush with call to debug_flush.
3819 (monitor_show_help): Mention set debug-format.
3820 (parse_debug_format_options): New function.
3821 (handle_monitor_command): Handle "monitor set debug-format".
3822 (gdbserver_usage): Mention --debug-format.
3823 (main): Parse --debug-format.
3824 * server.h (debug_threads): Declaration moved to debug.h.
3825 #include "debug.h".
3826 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
3827 trace_debug_1 that uses debug_printf.
3828 (tracepoint_look_up_symbols): Update all debugging printfs to use
3829 debug_printf instead of fprintf.
3830
3831 2014-01-20 Baruch Siach <baruch@tkos.co.il>
3832
3833 * linux-xtensa-low.c: Include asm/ptrace.h instead of
3834 sys/ptrace.h.
3835
3836 2014-01-17 Pedro Alves <palves@redhat.com>
3837
3838 PR build/16445
3839 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
3840 defined after including gdb_proc_service.h.
3841
3842 2014-01-16 Doug Evans <dje@google.com>
3843
3844 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
3845 (match_dll): Use it.
3846
3847 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
3848
3849 * target.h (target_ops) <read_btrace>: Change parameters and
3850 return type to allow error reporting.
3851 * server.c (handle_qxfer_btrace): Support delta reads. Pass
3852 trace reading errors on.
3853 * linux-low.c (linux_low_read_btrace): Pass trace reading
3854 errors on.
3855 (linux_low_disable_btrace): New.
3856
3857 2014-01-15 Doug Evans <dje@google.com>
3858
3859 * inferiors.c (thread_id_to_gdb_id): Delete.
3860 * inferiors.h (thread_id_to_gdb_id): Delete.
3861
3862 2014-01-13 Eli Zaretskii <eliz@gnu.org>
3863
3864 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
3865 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
3866 versions.
3867
3868 2014-01-08 Pedro Alves <palves@redhat.com>
3869
3870 * server.c (handle_status): Don't discard previous queued stop
3871 replies or thread's pending status here.
3872 (main) <disconnection>: Do it here instead.
3873
3874 2014-01-08 Pedro Alves <palves@redhat.com>
3875
3876 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
3877 * server.c (visit_actioned_threads, handle_pending_status): New
3878 function.
3879 (handle_v_cont): Factor out parts to ...
3880 (resume): ... this new function. If in all-stop, and a thread
3881 being resumed has a pending status, report it without actually
3882 resuming.
3883 (myresume): Adjust to use the new 'resume' function.
3884 (clear_pending_status_callback, set_pending_status_callback)
3885 (find_status_pending_thread_callback): New functions.
3886 (handle_status): Handle the case of multiple threads having
3887 interesting statuses to report. Report threads' real last signal
3888 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
3889 with an interesting thread to report the status for, instead of
3890 always reporting the status of the first thread.
3891
3892 2014-01-01 Joel Brobecker <brobecker@adacore.com>
3893
3894 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
3895 * gdbreplay.c (gdbreplay_version): Likewise.
3896
3897 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
3898
3899 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
3900 iov.iov_len with the real length in use.
3901
3902 2013-12-13 Joel Brobecker <brobecker@adacore.com>
3903
3904 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
3905 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
3906 for all targets that use win32-low.c.
3907 * win32-low.c (win32_ensure_ntdll_loaded): New function.
3908 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
3909
3910 2013-12-13 Pedro Alves <palves@redhat.com>
3911
3912 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
3913 if equal to TARGET_WAITKIND_LOADED.
3914 * win32-low.c (cached_status): New static global.
3915 (win32_wait): Add declaration.
3916 (do_initial_child_stuff): Flush all initial pending debug events
3917 up to the initial breakpoint.
3918 (win32_wait): If CACHED_STATUS was set, return that instead
3919 of doing a real wait. Remove the code resuming the execution
3920 of the inferior after receiving a TARGET_WAITKIND_LOADED event
3921 during the initial phase. Also remove the code changing
3922 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
3923 TARGET_WAITKIND_STOPPED.
3924
3925 2013-12-11 Yao Qi <yao@codesourcery.com>
3926
3927 * notif.c (handle_notif_ack): Return 0 if no notification
3928 matches.
3929
3930 2013-11-20 Doug Evans <dje@google.com>
3931
3932 * linux-low.c (linux_set_resume_request): Fix comment.
3933
3934 2013-11-20 Doug Evans <dje@google.com>
3935
3936 * linux-low.c (resume_status_pending_p): Tweak comment.
3937
3938 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
3939
3940 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
3941 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
3942 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
3943 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
3944 (srv_amd64_regobj): Add amd64-mpx.o.
3945 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
3946 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
3947 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
3948 * i387-fp.c (num_pl_bnd_register) Added constant.
3949 (num_pl_bnd_cfg_registers) Added constant.
3950 (struct i387_xsave) Added reserved area and MPX fields.
3951 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
3952 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
3953 function.
3954 (tdesc_i386_mpx_linux): Add MPX amd64 target.
3955 (init_registers_amd64_mpx_linux): Declare new function.
3956 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
3957 (x86_64_regmap): Add MPX registers.
3958 (x86_linux_read_description): Add MPX case.
3959 (initialize_low_arch): Initialize MPX targets.
3960
3961 2013-11-18 Tom Tromey <tromey@redhat.com>
3962
3963 * configure: Rebuild.
3964 * configure.ac: Don't check for stdlib.h.
3965 * gdbreplay.c: Unconditionally include stdlib.h.
3966
3967 2013-11-18 Tom Tromey <tromey@redhat.com>
3968
3969 * config.in: Rebuild.
3970 * configure: Rebuild.
3971 * configure.ac: Don't use AC_HEADER_DIRENT.
3972
3973 2013-11-18 Tom Tromey <tromey@redhat.com>
3974
3975 * server.h: Don't check HAVE_STRING_H.
3976 * gdbreplay.c: Don't check HAVE_STRING_H.
3977 * configure: Rebuild.
3978
3979 2013-11-18 Tom Tromey <tromey@redhat.com>
3980
3981 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
3982 LIBGNU.
3983
3984 2013-11-08 Tom Tromey <tromey@redhat.com>
3985
3986 * configure, config.in: Rebuild.
3987 * configure.ac: Remove unused configury.
3988
3989 2013-11-08 Tom Tromey <tromey@redhat.com>
3990
3991 * acinclude.m4: Include common.m4, codeset.m4.
3992 * configure, config.in: Rebuild.
3993 * configure.ac: Use GDB_AC_COMMON.
3994
3995 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
3996
3997 * linux-s390-low.c (HWCAP_S390_TE): New define.
3998 (s390_arch_setup): Consider the TE field in the HWCAP for
3999 determining 'have_regset_tdb'.
4000
4001 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
4002
4003 PR gdb/16014
4004 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
4005 call to sizeof.
4006
4007 2013-10-02 Pedro Alves <palves@redhat.com>
4008
4009 * server.c (process_serial_event): Don't output "GDBserver
4010 exiting" if GDB is connected through stdio.
4011 * target.c (mywait): Likewise, be silent if GDB is connected
4012 through stdio.
4013
4014 2013-10-01 Joel Brobecker <brobecker@adacore.com>
4015
4016 * lynx-low.c (lynx_add_threads_after_attach): New function.
4017 (lynx_attach): Remove call to add_thread. Add call to
4018 lynx_add_threads_after_attach instead.
4019
4020 2013-09-28 Mike Frysinger <vapier@gentoo.org>
4021
4022 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
4023 * config.in, configure: Regenerated.
4024
4025 2013-09-18 Yao Qi <yao@codesourcery.com>
4026
4027 PR server/15959
4028 * server.c (start_inferior): Clear 'resume_info'.
4029
4030 2013-09-16 Jiong Wang <jiwang@tilera.com>
4031
4032 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
4033 for each register.
4034
4035 2013-09-16 Jiong Wang <jiwang@tilera.com>
4036
4037 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
4038 linux-tile-low.o to srv_tgtobj.
4039
4040 2013-09-16 Will Newton <will.newton@linaro.org>
4041
4042 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
4043 out regs.
4044
4045 2013-09-06 Pedro Alves <palves@redhat.com>
4046
4047 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
4048 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
4049 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
4050 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
4051 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
4052 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
4053
4054 2013-09-06 Pedro Alves <palves@redhat.com>
4055
4056 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
4057 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
4058
4059 2013-09-06 Pedro Alves <palves@redhat.com>
4060
4061 * linux-amd64-ipa.c: Include tracepoint.h.
4062 * linux-i386-ipa.c: Include tracepoint.h.
4063
4064 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
4065
4066 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
4067 (ps_get_thread_area): New function.
4068
4069 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
4070
4071 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
4072 (initialize_low_arch): Call init_registers_crisv32 rather than
4073 init_register_crisv32.
4074
4075 2013-09-05 Pedro Alves <palves@redhat.com>
4076
4077 * server.h (handle_vFile, hostio_last_error_from_errno): Move
4078 to ...
4079 * hostio.h: ... this new file.
4080 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
4081 win32-low.c: Include hostio.h.
4082
4083 2013-09-05 Pedro Alves <palves@redhat.com>
4084
4085 * server.h (gdb_client_data, handler_func, callback_handler_func)
4086 (delete_file_handler, add_file_handler, append_callback_event)
4087 (delete_callback_event, start_event_loop, initialize_event_loop):
4088 Move to event-loop.h and include it.
4089 * event-loop.h: New file.
4090
4091 2013-09-05 Pedro Alves <palves@redhat.com>
4092
4093 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
4094 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
4095 (loaded_dll, unloaded_dll): Move to ...
4096 * dll.h: ... this new file.
4097 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
4098
4099 2013-09-05 Pedro Alves <palves@redhat.com>
4100
4101 * server.h (current_process, get_thread_process, all_processes)
4102 (add_inferior_to_list, for_each_inferior, current_inferior)
4103 (remove_inferior, add_process, remove_process, find_process_pid)
4104 (have_started_inferiors_p, have_attached_inferiors_p)
4105 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
4106 (clear_inferiors, find_inferior, find_inferior_id)
4107 (inferior_target_data, set_inferior_target_data)
4108 (inferior_regcache_data, set_inferior_regcache_data): Move to
4109 inferiors.h, and include it.
4110 * inferiors.h: New file.
4111
4112 2013-09-05 Pedro Alves <palves@redhat.com>
4113
4114 * server.h (struct emit_ops, current_insn_ptr, emit_error):
4115 Move ...
4116 * ax.h: ... here.
4117
4118 2013-09-05 Pedro Alves <palves@redhat.com>
4119
4120 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
4121 tracepoint.h.
4122 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
4123 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
4124 (handle_tracepoint_general_set, handle_tracepoint_query)
4125 (tracepoint_finished_step, tracepoint_was_hit)
4126 (release_while_stepping_state_list, current_traceframe)
4127 (in_readonly_region, traceframe_read_mem)
4128 (fetch_traceframe_registers, traceframe_read_sdata)
4129 (traceframe_read_info, struct fast_tpoint_collect_status)
4130 (fast_tracepoint_collecting, force_unlock_trace_buffer)
4131 (handle_tracepoit_bkpts, initialize_low_tracepoint)
4132 (supply_fast_tracepoint_registers)
4133 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
4134 (ipa_tdesc, claim_trampoline_space)
4135 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
4136 (agent_mem_read, agent_get_trace_state_variable_value)
4137 (agent_set_trace_state_variable_value, agent_tsv_read)
4138 (agent_mem_read_string, get_raw_reg_func_addr)
4139 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
4140 * tracepoint.h: ... this new file.
4141
4142 2013-09-05 Pedro Alves <palves@redhat.com>
4143
4144 * server.h (perror_with_name, error, fatal, warning, paddress)
4145 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
4146 include it.
4147 * utils.h: New file.
4148
4149 2013-09-05 Pedro Alves <palves@redhat.com>
4150
4151 * server.h (remote_debug, noack_mode, transport_is_reliable)
4152 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
4153 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
4154 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
4155 (write_enn, initialize_async_io, enable_async_io)
4156 (disable_async_io, check_remote_input_interrupt_request)
4157 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
4158 (dead_thread_notify, prepare_resume_reply)
4159 (decode_address_to_semicolon, decode_address, decode_m_packet)
4160 (decode_M_packet, decode_X_packet, decode_xfer_write)
4161 (decode_search_memory_packet, unhexify, hexify)
4162 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
4163 (look_up_one_symbol, relocate_instruction)
4164 (monitor_output): Move to remote-utils.h, and include it.
4165 * remote-utils.h: New file.
4166
4167 2013-09-05 Pedro Alves <palves@redhat.com>
4168
4169 * server.h (_): Delete.
4170
4171 2013-09-02 Pedro Alves <palves@redhat.com>
4172
4173 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
4174 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
4175 allocated.
4176 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
4177
4178 2013-09-02 Pierre Muller <muller@sourceware.org>
4179
4180 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
4181 or WriteProcessMemory complete successfully and handle
4182 ERROR_PARTIAL_COPY error.
4183
4184 2013-09-02 Pedro Alves <palves@redhat.com>
4185
4186 * server.c (gdb_read_memory): Return -1 on traceframe memory read
4187 error instead of EIO.
4188
4189 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4190
4191 PR server/15604
4192 * linux-low.c: Include filestuff.h.
4193 (linux_create_inferior) <pid == 0>: Call close_most_fds.
4194 * lynx-low.c: Include filestuff.h.
4195 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
4196 * server.c: Include filestuff.h.
4197 (main): Call notice_open_fds.
4198 * spu-low.c: Include filestuff.h.
4199 (spu_create_inferior) <pid == 0>: Call close_most_fds.
4200
4201 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
4202
4203 * Makefile.in: Explain why ../target and ../nat are not
4204 listed as include file search paths.
4205 (linux-waitpid.o): New object file rule.
4206 * configure.srv (srv_native_linux_obj): New variable.
4207 Replace all occurrences of linux native object files with
4208 $srv_native_linux_obj.
4209 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
4210 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
4211 (linux_enable_event_reporting): Remove declaration.
4212 (my_waitpid): Moved to common/linux-waitpid.c.
4213 (linux_wait_for_event): Pass ptid when calling
4214 linux_enable_event_reporting.
4215 (linux_supports_tracefork_flag): Remove.
4216 (linux_enable_event_reporting): Likewise.
4217 (linux_tracefork_grandchild): Remove.
4218 (STACK_SIZE): Moved to common/linux-ptrace.c.
4219 (linux_tracefork_child): Remove.
4220 (linux_test_for_tracefork): Remove.
4221 (linux_look_up_symbols): Call linux_supports_traceclone.
4222 (initialize_low): Remove call to linux_test_for_tracefork.
4223 * linux-low.h (PTRACE_TYPE_ARG3): Move to
4224 common/linux-ptrace.h.
4225 (PTRACE_TYPE_ARG4): Likewise.
4226 Include linux-ptrace.h.
4227
4228 2013-08-21 Pedro Alves <palves@redhat.com>
4229
4230 * config.in: Renegerate.
4231
4232 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
4233
4234 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
4235 (SFILES): Remove $(srcdir)/common/target-common.c and
4236 add $(srcdir)/target/waitstatus.c.
4237 (OBS): Remove target-common.o and add waitstatus.o.
4238 (server_h): Remove $(srcdir)/../common/target-common.h and
4239 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
4240 and $(srcdir)/../target/waitstatus.h.
4241 (target-common.o): Remove.
4242 (waitstatus.o): New target object file.
4243 * target.h: Do not include target-common.h and
4244 include target/resume.h, target/wait.h and
4245 target/waitstatus.h.
4246
4247 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
4248
4249 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
4250 to PTRACE_TYPE_ARG3.
4251 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
4252 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
4253 PTRACE_TYPE_ARG4.
4254 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
4255 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
4256
4257 2013-07-27 Jie Zhang <jie@codesourcery.com>
4258 Daniel Jacobowitz <dan@codesourcery.com>
4259 Yao Qi <yao@codesourcery.com>
4260
4261 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
4262 (mips-linux-watch.o): New rule.
4263 (mips_linux_watch_h): New variable.
4264 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
4265 srv_tgtobj.
4266 * linux-mips-low.c: Include mips-linux-watch.h.
4267 (struct arch_process_info, struct arch_lwp_info): New.
4268 (update_watch_registers_callback): New function.
4269 (mips_linux_new_process, mips_linux_new_thread) New functions.
4270 (mips_linux_prepare_to_resume, mips_insert_point): New
4271 functions.
4272 (mips_remove_point, mips_stopped_by_watchpoint): New
4273 functions.
4274 (rsp_bp_type_to_target_hw_bp_type): New function.
4275 (mips_stopped_data_address): New function.
4276 (the_low_target): Add watchpoint support functions.
4277
4278 2013-07-27 Yao Qi <yao@codesourcery.com>
4279
4280 * i386-low.c: Include break-common.h.
4281 (enum target_hw_bp_type): Remove.
4282
4283 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
4284
4285 * Makefile.in (SFILES): /common/target-common.c.
4286 (OBS): Add target-common.o.
4287 (server_h): Add $(srcdir)/../common/target-common.h.
4288 (target-common.o): New target.
4289 * server.c (queue_stop_reply_callback): Free
4290 status string after use.
4291 * target.c (target_waitstatus_to_string): Remove.
4292 * target.h: Include target-common.h.
4293 (resume_kind): Likewise.
4294 (target_waitkind): Likewise.
4295 (target_waitstatus): Likewise.
4296 (TARGET_WNOHANG): Likewise.
4297
4298 2013-07-04 Yao Qi <yao@codesourcery.com>
4299
4300 * Makefile.in (host_alias): Use @host_noncanonical@.
4301 (target_alias): Use @target_noncanonical@.
4302 * configure.ac: Use ACX_NONCANONICAL_TARGET and
4303 ACX_NONCANONICAL_HOST.
4304 * configure: Regenerated.
4305
4306 Revert:
4307 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
4308
4309 * configure.ac (version_host, version_target): Set and AC_SUBST them.
4310 * configure: Rebuild.
4311 * Makefile.in (version_host, version_target): Get from configure.
4312 (version.c): Use $(version_host) and $(version_target).
4313
4314 2013-07-03 Pedro Alves <palves@redhat.com>
4315
4316 * Makefile.in (config.status): Depend on development.sh.
4317 * acinclude.m4: Include libmcheck.m4.
4318 * configure: Regenerate.
4319
4320 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
4321
4322 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
4323 attribute inside the parentheses.
4324 (winapi_DebugSetProcessKillOnExit): Ditto.
4325 (winapi_DebugBreakProcess): Ditto.
4326 (winapi_GenerateConsoleCtrlEvent): Ditto.
4327
4328 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
4329
4330 * notif.h (notif_event): Add a dummy member to avoid compiler
4331 errors.
4332
4333 2013-07-01 Pedro Alves <palves@redhat.com>
4334
4335 * hostio.c (HOSTIO_PATH_MAX): Define.
4336 (require_filename, handle_open, handle_unlink, handle_readlink):
4337 Use it.
4338
4339 2013-07-01 Pedro Alves <palves@redhat.com>
4340
4341 * server.h: Include "pathmax.h".
4342 * linux-low.c: Don't include sys/param.h.
4343 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
4344 MAXPATHLEN.
4345 * win32-low.c: Don't include sys/param.h.
4346 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
4347
4348 2013-07-01 Pedro Alves <palves@redhat.com>
4349
4350 * event-loop.c: Don't check HAVE_UNISTD_H before including
4351 <unistd.h>.
4352 * gdbreplay.c: Likewise.
4353 * remote-utils.c: Likewise.
4354 * server.c: Likewise.
4355 * configure.ac: Don't check for unistd.h.
4356 * configure: Regenerate.
4357
4358 2013-06-28 Tom Tromey <tromey@redhat.com>
4359
4360 * Makefile.in (version.c): Use version.in, not
4361 common/version.in.
4362
4363 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
4364
4365 * configure.ac (version_host, version_target): Set and AC_SUBST them.
4366 * configure: Rebuild.
4367 * Makefile.in (version_host, version_target): Get from configure.
4368 (version.c): Use $(version_host) and $(version_target).
4369
4370 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
4371
4372 Fix trace-status to output user name without trailing colon.
4373 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
4374
4375 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
4376
4377 Fix trace-status to output proper start-time and stop-time.
4378 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
4379 output start time and stop time in hex as gdb expects.
4380
4381 2013-06-26 Pedro Alves <pedro@codesourcery.com>
4382
4383 * tracepoint.c (build_traceframe_info_xml): Output trace state
4384 variables present in the trace buffer.
4385
4386 2013-06-24 Tom Tromey <tromey@redhat.com>
4387
4388 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
4389 create-version.sh.
4390 (version.o): Remove.
4391 * gdbreplay.c: Include version.h.
4392 (version, host_name): Don't declare.
4393 * server.h: Include version.h.
4394 (version, host_name): Don't declare.
4395
4396 2013-06-12 Pedro Alves <palves@redhat.com>
4397
4398 * linux-x86-low.c (linux_is_elf64): Delete global.
4399 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
4400 with local linux_pid_exe_is_elf_64_file use.
4401
4402 2013-06-11 Pedro Alves <palves@redhat.com>
4403
4404 * linux-low.c (regset_disabled, disable_regset): New functions.
4405 (regsets_fetch_inferior_registers)
4406 (regsets_store_inferior_registers): Use them.
4407 (initialize_regsets_info); Don't allocate the disabled_regsets
4408 array here.
4409 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
4410 comment.
4411
4412 2013-06-11 Pedro Alves <palves@redhat.com>
4413
4414 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
4415 xmalloc.
4416
4417 2013-06-11 Pedro Alves <palves@redhat.com>
4418
4419 * linux-x86-low.c (initialize_low_arch): Call
4420 init_registers_x32_avx_linux.
4421
4422 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
4423
4424 Fix compatibility with Android Bionic.
4425 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
4426 it is not empty.
4427
4428 2013-06-07 Pedro Alves <palves@redhat.com>
4429
4430 PR server/14823
4431 * Makefile.in (OBS): Add tdesc.o.
4432 (IPA_OBJS): Add tdesc-ipa.o.
4433 (tdesc-ipa.o): New rule.
4434 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
4435 interface.
4436 * linux-low.c (new_inferior): Delete.
4437 (disabled_regsets, num_regsets): Delete.
4438 (linux_add_process): Adjust to set the new per-process
4439 new_inferior flag.
4440 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
4441 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
4442 was a stop. When calling arch_setup, switch the current inferior
4443 to the thread that got an event.
4444 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
4445 (regsets_fetch_inferior_registers)
4446 (regsets_store_inferior_registers): New regsets_info parameter.
4447 Adjust to use it.
4448 (linux_register_in_regsets): New regs_info parameter. Adjust to
4449 use it.
4450 (register_addr, fetch_register, store_register): New usrregs_info
4451 parameter. Adjust to use it.
4452 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
4453 parameter regs_info. Adjust to use it.
4454 (linux_fetch_registers): Get the current inferior's regs_info, and
4455 adjust to use it.
4456 (linux_store_registers): Ditto.
4457 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
4458 (initialize_low): Don't initialize the target_regsets here. Call
4459 initialize_low_arch.
4460 * linux-low.h (target_regsets): Delete declaration.
4461 (struct regsets_info): New.
4462 (struct usrregs_info): New.
4463 (struct regs_info): New.
4464 (struct process_info_private) <new_inferior>: New field.
4465 (struct linux_target_ops): Delete the num_regs, regmap, and
4466 regset_bitmap fields. New field regs_info.
4467 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
4468 * i387-fp.c (num_xmm_registers): Delete.
4469 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
4470 calls to new interface.
4471 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
4472 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
4473 Infer the number of xmm registers from the regcache's target
4474 description.
4475 * i387-fp.h (num_xmm_registers): Delete.
4476 * inferiors.c (add_thread): Don't install the thread's regcache
4477 here.
4478 * proc-service.c (gregset_info): Fetch the current inferior's
4479 regs_info. Adjust to use it.
4480 * regcache.c: Include tdesc.h.
4481 (register_bytes, reg_defs, num_registers)
4482 (gdbserver_expedite_regs): Delete.
4483 (get_thread_regcache): If the thread doesn't have a regcache yet,
4484 create one, instead of aborting gdbserver.
4485 (regcache_invalidate_one): Rename to ...
4486 (regcache_invalidate_thread): ... this.
4487 (regcache_invalidate_one): New.
4488 (regcache_invalidate): Only invalidate registers of the current
4489 process.
4490 (init_register_cache): Add target_desc parameter, and use it.
4491 (new_register_cache): Ditto. Assert the target description has a
4492 non zero registers_size.
4493 (regcache_cpy): Add assertions. Adjust.
4494 (realloc_register_cache, set_register_cache): Delete.
4495 (registers_to_string, registers_from_string): Adjust.
4496 (find_register_by_name, find_regno, find_register_by_number)
4497 (register_cache_size): Add target_desc parameter, and use it.
4498 (free_register_cache_thread, free_register_cache_thread_one)
4499 (regcache_release, register_cache_size): New.
4500 (register_size): Add target_desc parameter, and use it.
4501 (register_data, supply_register, supply_register_zeroed)
4502 (supply_regblock, supply_register_by_name, collect_register)
4503 (collect_register_as_string, collect_register_by_name): Adjust.
4504 * regcache.h (struct target_desc): Forward declare.
4505 (struct regcache) <tdesc>: New field.
4506 (init_register_cache, new_register_cache): Add target_desc
4507 parameter.
4508 (regcache_invalidate_thread): Declare.
4509 (regcache_invalidate_one): Delete declaration.
4510 (regcache_release): Declare.
4511 (find_register_by_number, register_cache_size, register_size)
4512 (find_regno): Add target_desc parameter.
4513 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
4514 declarations.
4515 * remote-utils.c: Include tdesc.h.
4516 (outreg, prepare_resume_reply): Adjust.
4517 * server.c: Include tdesc.h.
4518 (gdbserver_xmltarget): Delete declaration.
4519 (get_features_xml, process_serial_event): Adjust.
4520 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
4521 declare.
4522 (struct process_info) <tdesc>: New field.
4523 (ipa_tdesc): Declare.
4524 * tdesc.c: New file.
4525 * tdesc.h: New file.
4526 * tracepoint.c: Include tdesc.h.
4527 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
4528 (get_context_regcache): Adjust to pass ipa_tdesc down.
4529 (do_action_at_tracepoint): Adjust to get the register cache size
4530 from the context regcache's description.
4531 (traceframe_walk_blocks): Adjust to get the register cache size
4532 from the current trace frame's description.
4533 (traceframe_get_pc): Adjust to get current trace frame's
4534 description and pass it down.
4535 (gdb_collect): Adjust to get the register cache size from the
4536 IPA's description.
4537 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
4538 (gdbserver_xmltarget): Delete.
4539 (initialize_low_tracepoint): Set the ipa's target description.
4540 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
4541 (initialize_low_tracepoint): Set the ipa's target description.
4542 * linux-x86-low.c: Include tdesc.h.
4543 [__x86_64__] (is_64bit_tdesc): New.
4544 (ps_get_thread_area, x86_get_thread_area): Use it.
4545 (i386_cannot_store_register): Rename to ...
4546 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
4547 (i386_cannot_fetch_register): Rename to ...
4548 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
4549 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
4550 to new interface.
4551 (target_regsets): Rename to ...
4552 (x86_regsets): ... this.
4553 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
4554 interface.
4555 (x86_siginfo_fixup): Use is_64bit_tdesc.
4556 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
4557 (tdesc_x32_avx_linux, tdesc_x32_linux)
4558 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
4559 Declare.
4560 (x86_linux_update_xmltarget): Delete.
4561 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
4562 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
4563 (AMD64_LINUX_USER64_CS): New.
4564 (x86_linux_read_description): New, based on
4565 x86_linux_update_xmltarget.
4566 (same_process_callback): New.
4567 (x86_arch_setup_process_callback): New.
4568 (x86_linux_update_xmltarget): New.
4569 (x86_regsets_info): New.
4570 (amd64_linux_regs_info): New.
4571 (i386_linux_usrregs_info): New.
4572 (i386_linux_regs_info): New.
4573 (x86_linux_regs_info): New.
4574 (x86_arch_setup): Reimplement.
4575 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
4576 (x86_emit_ops): Ditto.
4577 (the_low_target): Adjust. Install x86_linux_regs_info,
4578 x86_cannot_fetch_register, and x86_cannot_store_register.
4579 (initialize_low_arch): New.
4580 * linux-ia64-low.c (tdesc_ia64): Declare.
4581 (ia64_fetch_register): Adjust.
4582 (ia64_usrregs_info, regs_info): New globals.
4583 (ia64_regs_info): New function.
4584 (the_low_target): Adjust.
4585 (initialize_low_arch): New function.
4586 * linux-sparc-low.c (tdesc_sparc64): Declare.
4587 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
4588 Adjust.
4589 (sparc_arch_setup): New function.
4590 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
4591 (the_low_target): Adjust.
4592 (initialize_low_arch): New function.
4593 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
4594 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
4595 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
4596 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
4597 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
4598 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
4599 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
4600 (tdesc_powerpc_isa205_vsx64l): Declare.
4601 (ppc_cannot_store_register, ppc_collect_ptrace_register)
4602 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
4603 (ppc_set_pc, ppc_get_hwcap): Adjust.
4604 (ppc_usrregs_info): Forward declare.
4605 (!__powerpc64__) ppc_regmap_adjusted: New global.
4606 (ppc_arch_setup): Adjust to the current process'es target
4607 description.
4608 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
4609 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
4610 (ppc_store_evrregset): Adjust.
4611 (target_regsets): Rename to ...
4612 (ppc_regsets): ... this, and make static.
4613 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
4614 (ppc_regs_info): New function.
4615 (the_low_target): Adjust.
4616 (initialize_low_arch): New function.
4617 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
4618 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
4619 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
4620 (tdesc_s390x_linux64v2): Declare.
4621 (s390_collect_ptrace_register, s390_supply_ptrace_register)
4622 (s390_fill_gregset, s390_store_last_break): Adjust.
4623 (target_regsets): Rename to ...
4624 (s390_regsets): ... this, and make static.
4625 (s390_get_pc, s390_set_pc): Adjust.
4626 (s390_get_hwcap): New target_desc parameter, and use it.
4627 [__s390x__] (have_hwcap_s390_high_gprs): New global.
4628 (s390_arch_setup): Adjust to set the current process'es target
4629 description. Don't adjust the regmap.
4630 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
4631 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
4632 (regs_info_3264): New globals.
4633 (s390_regs_info): New function.
4634 (the_low_target): Adjust.
4635 (initialize_low_arch): New function.
4636 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
4637 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
4638 [__mips64] (init_registers_mips_linux)
4639 (init_registers_mips_dsp_linux): Delete defines.
4640 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
4641 (have_dsp): New global.
4642 (mips_read_description): New, based on mips_arch_setup.
4643 (mips_arch_setup): Reimplement.
4644 (get_usrregs_info): New function.
4645 (mips_cannot_fetch_register, mips_cannot_store_register)
4646 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
4647 (mips_fill_fpregset, mips_store_fpregset): Adjust.
4648 (target_regsets): Rename to ...
4649 (mips_regsets): ... this, and make static.
4650 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
4651 (dsp_regs_info, regs_info): New globals.
4652 (mips_regs_info): New function.
4653 (the_low_target): Adjust.
4654 (initialize_low_arch): New function.
4655 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
4656 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
4657 Declare.
4658 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
4659 (arm_read_description): New, with bits factored from
4660 arm_arch_setup.
4661 (arm_arch_setup): Reimplement.
4662 (target_regsets): Rename to ...
4663 (arm_regsets): ... this, and make static.
4664 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
4665 (arm_regs_info): New function.
4666 (the_low_target): Adjust.
4667 (initialize_low_arch): New function.
4668 * linux-m68k-low.c (tdesc_m68k): Declare.
4669 (target_regsets): Rename to ...
4670 (m68k_regsets): ... this, and make static.
4671 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
4672 (m68k_regs_info): New function.
4673 (m68k_arch_setup): New function.
4674 (the_low_target): Adjust.
4675 (initialize_low_arch): New function.
4676 * linux-sh-low.c (tdesc_sharch): Declare.
4677 (target_regsets): Rename to ...
4678 (sh_regsets): ... this, and make static.
4679 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
4680 (sh_regs_info, sh_arch_setup): New functions.
4681 (the_low_target): Adjust.
4682 (initialize_low_arch): New function.
4683 * linux-bfin-low.c (tdesc_bfin): Declare.
4684 (bfin_arch_setup): New function.
4685 (bfin_usrregs_info, regs_info): New globals.
4686 (bfin_regs_info): New function.
4687 (the_low_target): Adjust.
4688 (initialize_low_arch): New function.
4689 * linux-cris-low.c (tdesc_cris): Declare.
4690 (cris_arch_setup): New function.
4691 (cris_usrregs_info, regs_info): New globals.
4692 (cris_regs_info): New function.
4693 (the_low_target): Adjust.
4694 (initialize_low_arch): New function.
4695 * linux-cris-low.c (tdesc_crisv32): Declare.
4696 (cris_arch_setup): New function.
4697 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
4698 (cris_regs_info): New function.
4699 (the_low_target): Adjust.
4700 (initialize_low_arch): New function.
4701 * linux-m32r-low.c (tdesc_m32r): Declare.
4702 (m32r_arch_setup): New function.
4703 (m32r_usrregs_info, regs_info): New globals.
4704 (m32r_regs_info): Adjust.
4705 (initialize_low_arch): New function.
4706 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
4707 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
4708 (tic6x_usrregs_info): Forward declare.
4709 (tic6x_read_description): New function, based on ...
4710 (tic6x_arch_setup): ... this. Reimplement.
4711 (target_regsets): Rename to ...
4712 (tic6x_regsets): ... this, and make static.
4713 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
4714 (tic6x_regs_info): New function.
4715 (the_low_target): Adjust.
4716 (initialize_low_arch): New function.
4717 * linux-xtensa-low.c (tdesc_xtensa): Declare.
4718 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
4719 (target_regsets): Rename to ...
4720 (xtensa_regsets): ... this, and make static.
4721 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
4722 globals.
4723 (xtensa_arch_setup, xtensa_regs_info): New functions.
4724 (the_low_target): Adjust.
4725 (initialize_low_arch): New function.
4726 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
4727 (nios2_arch_setup): Set the current process'es tdesc.
4728 (target_regsets): Rename to ...
4729 (nios2_regsets): ... this.
4730 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
4731 (nios2_regs_info): New function.
4732 (the_low_target): Adjust.
4733 (initialize_low_arch): New function.
4734 * linux-aarch64-low.c (tdesc_aarch64): Declare.
4735 (aarch64_arch_setup): Set the current process'es tdesc.
4736 (target_regsets): Rename to ...
4737 (aarch64_regsets): ... this.
4738 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
4739 (aarch64_regs_info): New function.
4740 (the_low_target): Adjust.
4741 (initialize_low_arch): New function.
4742 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
4743 globals.
4744 (target_regsets): Rename to ...
4745 (tile_regsets): ... this.
4746 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
4747 (tile_regs_info): New function.
4748 (tile_arch_setup): Set the current process'es tdesc.
4749 (the_low_target): Adjust.
4750 (initialize_low_arch): New function.
4751 * spu-low.c (tdesc_spu): Declare.
4752 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
4753 * win32-arm-low.c (tdesc_arm): Declare.
4754 (arm_arch_setup): New function.
4755 (the_low_target): Install arm_arch_setup instead of
4756 init_registers_arm.
4757 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
4758 (init_windows_x86): Rename to ...
4759 (i386_arch_setup): ... this. Set `win32_tdesc'.
4760 (the_low_target): Adjust.
4761 * win32-low.c (win32_tdesc): New global.
4762 (child_add_thread): Don't create the thread cache here.
4763 (do_initial_child_stuff): Set the new process'es tdesc.
4764 * win32-low.h (struct target_desc): Forward declare.
4765 (win32_tdesc): Declare.
4766 * lynx-i386-low.c (tdesc_i386): Declare global.
4767 (lynx_i386_arch_setup): Set `lynx_tdesc'.
4768 * lynx-low.c (lynx_tdesc): New global.
4769 (lynx_add_process): Set the new process'es tdesc.
4770 * lynx-low.h (struct target_desc): Forward declare.
4771 (lynx_tdesc): Declare global.
4772 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
4773 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
4774 * nto-low.c (nto_tdesc): New global.
4775 (do_attach): Set the new process'es tdesc.
4776 * nto-low.h (struct target_desc): Forward declare.
4777 (nto_tdesc): Declare.
4778 * nto-x86-low.c (tdesc_i386): Declare.
4779 (nto_x86_arch_setup): Set `nto_tdesc'.
4780
4781 2013-06-04 Gary Benson <gbenson@redhat.com>
4782
4783 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
4784 to qSupported response when appropriate.
4785 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
4786 with nonzero-length annex.
4787 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
4788 arguments supplied in annex.
4789
4790 2013-05-31 Doug Evans <dje@google.com>
4791
4792 PR server/15594
4793 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
4794 64 bits in 64-cross-32 environment.
4795
4796 2013-05-28 Pedro Alves <palves@redhat.com>
4797
4798 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
4799 (aarch64-without-fpu.c): Delete rule.
4800 * configure.srv (aarch64*-*-linux*): Remove references to
4801 aarch64-without-fpu.o and aarch64-without-fpu.xml.
4802 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
4803 declaration.
4804
4805 2013-05-24 Pedro Alves <palves@redhat.com>
4806
4807 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
4808 instead of strchr/decode_address. Error if the range isn't split
4809 with a ','. Don't assume there's be a ':' in the action.
4810
4811 2013-05-23 Yao Qi <yao@codesourcery.com>
4812 Pedro Alves <palves@redhat.com>
4813
4814 * linux-low.c (lwp_in_step_range): New function.
4815 (linux_wait_1): If the thread was range stepping and stopped
4816 outside the stepping range, report the stop to GDB. Otherwise,
4817 continue stepping. Add range stepping debug output.
4818 (linux_set_resume_request): Copy the step range from the resume
4819 request to the lwp.
4820 (linux_supports_range_stepping): New.
4821 (linux_target_ops) <supports_range_stepping>: Set to
4822 linux_supports_range_stepping.
4823 * linux-low.h (struct linux_target_ops)
4824 <supports_range_stepping>: New field.
4825 (struct lwp_info) <step_range_start, step_range_end>: New fields.
4826 * linux-x86-low.c (x86_supports_range_stepping): New.
4827 (the_low_target) <supports_range_stepping>: Set to
4828 x86_supports_range_stepping.
4829 * server.c (handle_v_cont): Handle 'r' action.
4830 (handle_v_requests): Append ";r" if the target supports range
4831 stepping.
4832 * target.h (struct thread_resume) <step_range_start,
4833 step_range_end>: New fields.
4834 (struct target_ops) <supports_range_stepping>:
4835 New field.
4836 (target_supports_range_stepping): New macro.
4837
4838 2013-05-17 Joel Brobecker <brobecker@adacore.com>
4839
4840 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
4841 confusion in comment.
4842
4843 2013-05-17 Joel Brobecker <brobecker@adacore.com>
4844
4845 * lynx-low.c (struct process_info_private): New type.
4846 (lynx_add_process): New function.
4847 (lynx_create_inferior, lynx_attach): Replace calls to
4848 add_process by calls to lynx_add_process.
4849 (lynx_resume): If PTID is null, then try using
4850 current_process()->private->last_wait_event_ptid.
4851 Add comments.
4852 (lynx_clear_inferiors): Delete. The contents of that function
4853 has been inlined in lynx_mourn;
4854 (lynx_wait_1): Save the ptid in the process's private data.
4855 (lynx_mourn): Free the process' private data. Replace call
4856 to lynx_clear_inferiors by call to clear_inferiors.
4857
4858 2013-05-17 Yao Qi <yao@codesourcery.com>
4859
4860 * i386-low.c (i386_length_and_rw_bits): Move the comment to
4861 the right place.
4862
4863 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
4864
4865 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
4866 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
4867 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
4868 PT_TEXT_END_ADDR guards. Update comments.
4869 (linux_target_op) <read_offsets>: Conditionally define to
4870 linux_read_offsets if the target is UCLIBC and if it defines
4871 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
4872
4873 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
4874 Andrew Jenner <andrew@codesourcery.com>
4875
4876 * Makefile.in (SFILES): Add linux-nios2-low.c.
4877 (clean): Add action to delete nios2-linux.c.
4878 (nios2-linux.c): New rule.
4879 * configure.srv: Add nios2*-*-linux*.
4880 * linux-nios2-low.c: New.
4881
4882 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
4883
4884 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
4885
4886 2013-04-25 Hui Zhu <hui@codesourcery.com>
4887
4888 PR gdb/15186
4889 * ax.c (ax_printf): Add fflush.
4890
4891 2013-04-22 Tom Tromey <tromey@redhat.com>
4892
4893 * Makefile.in (SFILES): Add filestuff.c.
4894 (OBS): Add filestuff.o.
4895 (filestuff.o): New target.
4896 * config.in, configure: Rebuild.
4897 * configure.ac: Check for fdwalk, pipe2.
4898
4899 2013-04-17 Pedro Alves <palves@redhat.com>
4900
4901 * configure.ac (USE_THREAD_DB): Delete variable.
4902 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
4903 Don't AC_SUBST USE_THREAD_DB.
4904 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
4905 * config.in, configure: Regenerate.
4906
4907 2013-04-16 Pedro Alves <palves@redhat.com>
4908
4909 * linux-low.h (struct lwp_info) <thread_known>: Move under
4910 the USE_THREAD_DB #ifdef.
4911
4912 2013-04-16 Pedro Alves <palves@redhat.com>
4913
4914 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
4915 (linux-low.o): Delete rule.
4916 * linux-low.h: Always include "gdb_thread_db.h" instead of
4917 conditionally including thread_db.h.
4918 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
4919 HAVE_THREAD_DB_H.
4920
4921 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
4922
4923 * Makefile.in (install-only): Fix make install regression.
4924
4925 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
4926
4927 Convert man pages to texinfo, new gdbinit.5 texinfo page.
4928 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
4929 installation.
4930 * gdbserver.1: Remove.
4931
4932 2013-03-22 Pedro Alves <palves@redhat.com>
4933
4934 * linux-low.c (handle_extended_wait): Don't call
4935 linux_enable_event_reporting.
4936
4937 2013-03-15 Tony Theodore <tonyt@logyst.com>
4938
4939 PR build/9098:
4940 * Makefile.in (SHELL): Use @SHELL@.
4941
4942 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
4943
4944 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
4945 compiler warning.
4946
4947 2013-03-13 Joel Brobecker <brobecker@adacore.com>
4948
4949 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
4950 Remove extraneous NULL element.
4951
4952 2013-03-13 Yao Qi <yao@codesourcery.com>
4953
4954 * tracepoint.c (traceframe_read_tsv): Look for the last matched
4955 'V' block in trace frame.
4956
4957 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4958
4959 * target.h (struct target_ops): Add btrace ops.
4960 (target_supports_btrace): New macro.
4961 (target_enable_btrace): New macro.
4962 (target_disable_btrace): New macro.
4963 (target_read_btrace): New macro.
4964 * gdbthread.h (struct thread_info): Add btrace field.
4965 * server.c: Include btrace-common.h.
4966 (handle_btrace_general_set): New function.
4967 (handle_btrace_enable): New function.
4968 (handle_btrace_disable): New function.
4969 (handle_general_set): Call handle_btrace_general_set.
4970 (handle_qxfer_btrace): New function.
4971 (struct qxfer qxfer_packets[]): Add btrace entry.
4972 * inferiors.c (remove_thread): Disable btrace.
4973 * linux-low: Include linux-btrace.h.
4974 (linux_low_enable_btrace): New function.
4975 (linux_low_read_btrace): New function.
4976 (linux_target_ops): Add btrace ops.
4977 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
4978 Add srv_linux_btrace=yes.
4979 (x86_64-*-linux*): Add linux-btrace.o.
4980 Add srv_linux_btrace=yes.
4981 * configure.ac: Define HAVE_LINUX_BTRACE.
4982 * config.in: Regenerated.
4983 * configure: Regenerated.
4984
4985 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4986
4987 * server.c (handle_qxfer): Preserve error message if -3 is
4988 returned.
4989 (qxfer): Document the -3 return value.
4990
4991 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4992
4993 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
4994 (linux_btrace_h): New variable.
4995 (linux-btrace.o): New rule.
4996
4997 2013-03-08 Stan Shebs <stan@codesourcery.com>
4998 Hafiz Abid Qadeer <abidh@codesourcery.com>
4999
5000 * tracepoint.c (trace_buffer_size): New global.
5001 (DEFAULT_TRACE_BUFFER_SIZE): New define.
5002 (init_trace_buffer): Change to one-argument function. Allocate
5003 trace buffer memory.
5004 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
5005 handle QTBuffer:size packet.
5006 (cmd_bigqtbuffer_size): New function.
5007 (initialize_tracepoint): Call init_trace_buffer with
5008 DEFAULT_TRACE_BUFFER_SIZE.
5009 * server.c (handle_query): Add QTBuffer:size in the
5010 supported packets.
5011
5012 2013-03-07 Yao Qi <yao@codesourcery.com>
5013
5014 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
5015 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
5016 of -1.
5017 (cmd_qtsp): Adjust condition. Do post increment.
5018 Set cur_action and cur_step_action back to 0.
5019
5020 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
5021
5022 PR server/15236
5023 * linux-low.c (linux_write_memory): Return early success if LEN is
5024 zero.
5025
5026 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
5027
5028 * configure.srv: Add x86_64-*-cygwin* as target.
5029
5030 2013-02-28 Tom Tromey <tromey@redhat.com>
5031
5032 * configure.ac: Invoke AC_SYS_LARGEFILE.
5033 * configure, config.in: Rebuild.
5034
5035 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
5036
5037 * win32-low.c: Throughout, fix format strings and casts of
5038 printf-like functions to avoid type related warnings on all
5039 platforms.
5040 (get_child_debug_event): Print dwDebugEventCode as hex since
5041 that's how it's usually documented.
5042
5043 2013-02-28 Yao Qi <yao@codesourcery.com>
5044
5045 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
5046 pulongest.
5047
5048 2013-02-27 Jiong Wang <jiwang@tilera.com>
5049
5050 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
5051 (reg-tilegx32.c): New rule.
5052 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
5053 * linux-tile-low.c (tile_arch_setup): New function. Invoke
5054 different register info initializer according to elf class.
5055 (init_registers_tilgx32): New function. The tilegx32 register info
5056 initializer.
5057 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
5058 (tile_store_gregset): Likewise.
5059
5060 2013-02-27 Yao Qi <yao@codesourcery.com>
5061
5062 * server.c (process_point_options): Print debug message when
5063 debug_threads is true.
5064
5065 2013-02-26 Yao Qi <yao@codesourcery.com>
5066
5067 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
5068
5069 2013-02-19 Pedro Alves <palves@redhat.com>
5070 Kai Tietz <ktietz@redhat.com>
5071
5072 PR gdb/15161
5073
5074 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
5075 instead of strtoul to extract address from packet.
5076 (process_serial_event) <'z'>: Likewise.
5077
5078 2013-02-18 Yao Qi <yao@codesourcery.com>
5079
5080 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
5081
5082 2013-02-14 Pedro Alves <palves@redhat.com>
5083
5084 Plug memory leak.
5085
5086 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
5087 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
5088
5089 2013-02-14 Pedro Alves <palves@redhat.com>
5090
5091 * tracepoint.c (cmd_qtdpsrc): Use savestring.
5092
5093 2013-02-14 Pedro Alves <palves@redhat.com>
5094
5095 * tracepoint.c (save_string): Delete.
5096 (add_tracepoint_action): Use savestring instead of save_string.
5097
5098 2013-02-12 Pedro Alves <palves@redhat.com>
5099
5100 * linux-xtensa-low.c: Ditto.
5101 * xtensa-xtregs.c: Ditto.
5102
5103 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
5104
5105 * thread-db.c (thread_db_get_tls_address): NULL pointer check
5106 thread_db.
5107
5108 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
5109
5110 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
5111 aarch64_num_wp_regs and aarch64_num_bp_regs to
5112 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
5113
5114 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
5115
5116 * linux-aarch64-low.c (ps_get_thread_area): Replace
5117 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
5118
5119 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
5120 Marcus Shawcroft <marcus.shawcroft@arm.com>
5121 Nigel Stephens <nigel.stephens@arm.com>
5122 Yufeng Zhang <yufeng.zhang@arm.com>
5123
5124 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
5125 (aarch64.c, aarch64-without-fpu.c): New targets.
5126 * configure.srv (aarch64*-*-linux*): New.
5127 * linux-aarch64-low.c: New file.
5128
5129 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
5130
5131 * linux-low.c (handle_extended_wait, linux_create_inferior)
5132 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
5133 (dequeue_one_deferred_signal, linux_resume_one_thread)
5134 (fetch_register, linux_write_memory, linux_enable_event_reporting)
5135 (linux_tracefork_grandchild, linux_test_for_tracefork)
5136 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
5137 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
5138 where the argument is 0.
5139
5140 2013-01-25 Yao Qi <yao@codesourcery.com>
5141
5142 * event-loop.c: Include "queue.h".
5143 (gdb_event_p): New typedef.
5144 (struct gdb_event) <next_event>: Remove.
5145 (event_queue): Change to QUEUE(gdb_event_p).
5146 (async_queue_event): Remove.
5147 (gdb_event_xfree): New.
5148 (initialize_event_loop): New.
5149 (process_event): Use API from QUEUE.
5150 (wait_for_event): Likewise.
5151 * server.c (main): Call initialize_event_loop.
5152 * server.h (initialize_event_loop): Declare.
5153
5154 2013-01-18 Yao Qi <yao@codesourcery.com>
5155
5156 * ax.h (struct eval_agent_expr_context): New.
5157 (gdb_eval_agent_expr): Update declaration.
5158 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
5159 TFRAME. Add new argument CTX.
5160 * server.h (struct eval_agent_expr_context): Declare.
5161 (agent_mem_read, agent_tsv_read): Update declaration.
5162 (agent_mem_read_string): Likewise.
5163 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
5164 (add_traceframe_block): Add new argument TPOINT.
5165 Increase TPOINT->traceframe_usage.
5166 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
5167 eval_tracepoint_agent_expr.
5168 (condition_true_at_tracepoint): Likewise.
5169 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
5170 (agent_mem_read_string, agent_tsv_read): Likewise.
5171
5172 2013-01-16 Yao Qi <yao@codesourcery.com>
5173
5174 * linux-low.c (linux_resume_one_lwp): Don't check
5175 'lwp->bp_reinsert != 0'.
5176
5177 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5178 Pedro Alves <palves@redhat.com>
5179
5180 * lynx-low.c (ptrace_request_to_str): Define a temporary
5181 macro and use it to simplify this function's implementation.
5182
5183 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5184
5185 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
5186 sets errno.
5187
5188 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5189
5190 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
5191
5192 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5193
5194 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
5195
5196 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5197
5198 * lynx-low.c (lynx_resume): Use the resume_info parameter
5199 to determine the ptid for the lynx_ptrace call, unless
5200 it is equal to minus_one_ptid, in which case we use the
5201 ptid of the current_inferior.
5202 (lynx_wait_1): After having received a thread create/exit
5203 event, resume the inferior's execution using the signaling
5204 thread's ptid, rather than the old ptid.
5205
5206 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5207
5208 * lynx-low.c (lynx_resume): Delete variable ret.
5209
5210 2013-01-01 Joel Brobecker <brobecker@adacore.com>
5211
5212 * gdbreplay.c (gdbreplay_version): Update copyright year.
5213 * server.c (gdbserver_version): Likewise.
5214
5215 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5216
5217 * lynx-low.c (lynx_wait_1): Add debug trace before adding
5218 new thread.
5219
5220 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5221
5222 * lynx-low.c (ptrace_request_to_str): Add handling for
5223 PTRACE_GETTRACESIG.
5224
5225 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5226
5227 * lynx-low.c (lynx_attach): Delete variable new_process.
5228
5229 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5230
5231 * lynx-low.c (lynx_create_inferior): Delete variable
5232 new_process.
5233
5234 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5235
5236 * lynx-low.c (ptrace_request_to_str): Do not handle
5237 PTRACE_GETTHREADLIST if this macro does not exist.
5238
5239 2012-12-15 Yao Qi <yao@codesourcery.com>
5240
5241 * Makefile.in (OBS): Add notif.o.
5242 * notif.c, notif.h: New.
5243 * server.c: Include "notif.h".
5244 (struct vstop_notif) <next>: Remove.
5245 <base>: New field.
5246 (queue_stop_reply): Update.
5247 (push_event, send_next_stop_reply): Remove.
5248 (discard_queued_stop_replies): Update.
5249 (notif_stop): New variable.
5250 (handle_v_stopped): Remove.
5251 (handle_v_requests): Don't call handle_v_stopped. Call
5252 handle_ack_notif instead.
5253 (queue_stop_reply_callback): Call notif_event_enque instead
5254 of queue_stop_reply.
5255 (handle_status): Don't call send_next_stop_reply, call
5256 notif_write_event instead.
5257 (kill_inferior_callback): Likewise.
5258 (detach_or_kill_inferior_callback): Likewise.
5259 (main): Call initialize_notif.
5260 (process_serial_event): Call QUEUE_is_empty.
5261 (handle_target_event): Call notif_push instead of push event.
5262 * server.h (push_event): Remove declaration.
5263
5264 2012-12-10 Tom Tromey <tromey@redhat.com>
5265
5266 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
5267 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
5268 macros.
5269 (.c.o): Rewrite.
5270 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
5271 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
5272 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
5273 (amd64-linux-ipa.o, ax.o): Rewrite.
5274 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
5275 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
5276 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
5277 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
5278 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
5279 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
5280 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
5281 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
5282 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
5283 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
5284 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
5285 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
5286 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
5287 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
5288 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
5289 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
5290 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
5291 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
5292 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
5293 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
5294 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
5295 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
5296 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
5297 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
5298 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
5299 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
5300 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
5301 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
5302 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
5303 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
5304 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
5305 (reg-tilegx.o): Remove.
5306 (all_object_files): New macro.
5307 Include .deps files.
5308 * aclocal.m4, configure: Rebuild.
5309 * acinclude.m4: Include depstand.m4, lead-dot.m4.
5310 * configure.ac: Invoke ZW_CREATE_DEPDIR,
5311 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
5312
5313 2012-12-05 Tom Tromey <tromey@redhat.com>
5314
5315 PR gdb/14917:
5316 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
5317
5318 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
5319
5320 * configure.ac: Check for linux/perf_event.h.
5321 * config.in: Regenerated.
5322 * configure: Regenerated.
5323
5324 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
5325
5326 * hostio.c (handle_readlink): Decrease buffer size
5327 parameter passed to readlink by one byte.
5328
5329 2012-11-26 Yao Qi <yao@codesourcery.com>
5330
5331 * configure.ac (build_warnings): Append '-Wempty-body'.
5332 * configure: Regenerated.
5333 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
5334 body.
5335
5336 2012-11-15 Pierre Muller <muller@sourceware.org>
5337
5338 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
5339 * config.in: Regenerate.
5340 * configure: Regenerate.
5341 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
5342 Use "gdb_wait.h" header instead of <sys/wait.h> header.
5343 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
5344 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
5345 header.
5346 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
5347 instead of <sys/wait.h> header.
5348 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
5349
5350 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
5351
5352 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
5353 (various make rules): Remove -DGDBSERVER
5354
5355 2012-11-09 Yao Qi <yao@codesourcery.com>
5356
5357 * spu-low.c (current_ptid): Move it to ..
5358 * gdbthread.h: ... here. New.
5359 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
5360 * server.c (myresume, process_serial_event): Likewise.
5361 * thread-db.c (thread_db_find_new_threads): Likewise.
5362 * tracepoint.c (run_inferior_command): Likewise.
5363
5364 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
5365
5366 * server.c (handle_search_memory_1): Include access length in
5367 warning message.
5368
5369 2012-09-05 Michael Brandt <michael.brandt@axis.com>
5370
5371 * linux-crisv32-low.c: Fix compile errors.
5372
5373 2012-09-04 Yao Qi <yao@codesourcery.com>
5374
5375 * tracepoint.c (cmd_qtsv): Adjust debug message.
5376 Don't check CUR_TPOINT.
5377
5378 2012-08-28 Yao Qi <yao@codesourcery.com>
5379
5380 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
5381 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
5382 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
5383 Remove declarations of xmalloc, xreallloc, xstrdup and
5384 freeargv.
5385 * Makefile.in (libiberty_h): New.
5386 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
5387 (linux-bfin-low.o): Append dependency 'libiberty.h'.
5388
5389 2012-08-23 Yao Qi <yao@codesourcery.com>
5390
5391 * server.h: Remove declaration of 'xsnprintf'.
5392
5393 2012-08-22 Keith Seitz <keiths@redhat.com>
5394
5395 * server.h: Include build-gnulib-gbserver/config.h.
5396 * gdbreplay.c: Likewise.
5397
5398 2012-08-08 Doug Evans <dje@google.com>
5399
5400 * Makefile.in (SFILES): Add gdb_vecs.c.
5401 (OBS): Add gdb_vecs.o.
5402 (gdb_vecs_h, host_defs_h): New variables.
5403 (thread-db.o): Add $(gdb_vecs_h) dependency.
5404 (gdb_vecs.o): New rule.
5405 * thread-db.c: #include "gdb_vecs.h".
5406 (thread_db_load_search): Use a vector to iterate over path elements.
5407 Handle text appearing after "$pdir".
5408
5409 * configure.ac: Add check for strstr.
5410 * config.in: Regenerate.
5411 * configure: Regenerate.
5412
5413 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
5414
5415 * hostio.c (handle_pread): If pread fails, fall back to attempting
5416 lseek/read.
5417 (handle_pwrite): Likewise for pwrite.
5418
5419 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
5420
5421 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
5422 between unsupported TYPE and unimplementable ADDR/LEN combination.
5423 (arm_insert_point): Act on new return value.
5424
5425 2012-07-31 Pedro Alves <palves@redhat.com>
5426
5427 * server.c (process_point_options): Only skip tokens if we find
5428 one that is unrecognized. Don't treat 'X' specially while
5429 skipping unrecognized tokens.
5430
5431 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
5432
5433 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
5434 to 4-byte-align HW breakpoint addresses for Thumb.
5435
5436 2012-07-27 Yao Qi <yao@codesourcery.com>
5437
5438 PR remote/14161.
5439
5440 * server.h: Declare gdb_agent_about_to_close.
5441 * target.c (kill_inferior): Include "agent.h".
5442 New. Send command 'kill'.
5443 * target.h (kill_inferior): Removed macro.
5444 * tracepoint.c (gdb_agent_about_to_close): New.
5445 (gdb_agent_helper_thread): Handle command 'close'.
5446 Wait endlessly until the inferior stops.
5447 Install gdb_agent_remove_socket to atexit hook.
5448 (agent_socket_name): New static variable.
5449 (gdb_agent_socket_init): Replace local variable 'name' with
5450 'agent_socket_name'.
5451 (gdb_agent_remove_socket): New.
5452
5453 2012-07-27 Yao Qi <yao@codesourcery.com>
5454
5455 * server.c (process_point_options): Stop at 'X' when parsing.
5456
5457 2012-07-19 Michael Eager <eager@eagercon.com>
5458
5459 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
5460 to hw_execute.
5461 * linux-x86-low.c (x86_insert_point, x86_remove_point):
5462 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
5463 hardware breakpoint.
5464
5465 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5466
5467 * gdbserver/linux-low.c (initialize_low): Call
5468 linux_ptrace_init_warnings.
5469
5470 2012-07-02 Doug Evans <dje@google.com>
5471
5472 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
5473 pointer to int.
5474
5475 2012-07-02 Stan Shebs <stan@codesourcery.com>
5476
5477 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
5478 (ax.o): Add it to build rule.
5479 (ax-ipa.o): Ditto.
5480 (OBS): Add format.o.
5481 (IPA_OBS): Add format.o.
5482 * server.c (handle_query): Claim support for breakpoint commands.
5483 (process_point_options): Add command case.
5484 (process_serial_event): Leave running if there are printfs in
5485 effect.
5486 * mem-break.h (any_persistent_commands): Declare.
5487 (add_breakpoint_commands): Declare.
5488 (gdb_no_commands_at_breakpoint): Declare.
5489 (run_breakpoint_commands): Declare.
5490 * mem-break.c (struct point_command_list): New struct.
5491 (struct breakpoint): New field command_list.
5492 (any_persistent_commands): New function.
5493 (add_commands_to_breakpoint): New function.
5494 (add_breakpoint_commands): New function.
5495 (gdb_no_commands_at_breakpoint): New function.
5496 (run_breakpoint_commands): New function.
5497 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
5498 locally.
5499 * ax.c: Include format.h.
5500 (ax_printf): New function.
5501 (gdb_eval_agent_expr): Add printf opcode.
5502
5503 2012-06-13 Yao Qi <yao@codesourcery.com>
5504
5505 * server.c (start_inferior): Remove duplicated writes to fields
5506 'last_resume_kind' and 'last_status' of 'current_inferior'.
5507
5508 2012-06-12 Yao Qi <yao@codesourcery.com>
5509 Pedro Alves <palves@redhat.com>
5510
5511 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
5512 comment.
5513 * server.c (handle_v_cont): Extend comment.
5514
5515 2012-06-11 Yao Qi <yao@codesourcery.com>
5516
5517 * linux-low.c (linux_attach): Add 'static'.
5518
5519 2012-06-06 Yao Qi <yao@codesourcery.com>
5520
5521 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
5522
5523 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
5524
5525 Fix gcc -flto compilation warning.
5526 * server.c (main): Make variable multi_mode and attach volatile.
5527
5528 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5529
5530 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
5531 if the platform doesn't know about it.
5532
5533 2012-05-30 Jeff Kenton <jkenton@tilera.com>
5534
5535 * Makefile.in (SFILES): Add linux-tile-low.c.
5536 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
5537 * configure.srv: Handle tilegx-*-linux*.
5538 * linux-tile-low.c: New file.
5539
5540 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5541
5542 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
5543
5544 2012-05-24 Pedro Alves <palves@redhat.com>
5545
5546 PR gdb/7205
5547
5548 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
5549
5550 2012-05-24 Pedro Alves <palves@redhat.com>
5551
5552 PR gdb/7205
5553
5554 Replace target_signal with gdb_signal throughout.
5555
5556 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
5557
5558 * linux-low.c (linux_store_registers): Avoid the copying sequence
5559 when no data has been retrieved by ptrace.
5560
5561 2012-05-22 Will Deacon <will.deacon@arm.com>
5562
5563 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
5564 Include asm/ptrace.h.
5565 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
5566 already defined.
5567
5568 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
5569
5570 * linux-low.c (linux_store_registers): Don't re-retrieve data
5571 with ptrace that has already been obtained from /proc. Always
5572 copy any data retrieved with ptrace to the buffer supplied.
5573
5574 2012-05-11 Yao Qi <yao@codesourcery.com>
5575 Pedro Alves <palves@redhat.com>
5576
5577 * linux-low.c (enum stopping_threads_kind): New.
5578 (stopping_threads): Change type to `enum stopping_threads_kind'.
5579 (handle_extended_wait): If stopping and suspending threads, leave
5580 the new_lwp suspended too.
5581 (linux_wait_for_event): Adjust.
5582 (stop_all_lwps): Set `stopping_threads' to
5583 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
5584 whether we're suspending threads or just stopping them. Assert no
5585 recursion happens.
5586
5587 2012-04-29 Yao Qi <yao@codesourcery.com>
5588
5589 * server.h: Move some code to ...
5590 * gdbthread.h: ... here. New.
5591 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
5592 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
5593 (nto-low.o, win32-low.o): Likewise.
5594 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
5595 * regcache.c, remote-utils.c, server.c: Likewise.
5596 * target.c, tracepoint.c, win32-low.c: Likewise.
5597
5598 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5599
5600 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
5601 (PTRACE_ARG4_TYPE): Likewise.
5602 (PTRACE_XFER_TYPE): Likewise.
5603 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
5604 ptrace to PTRACE_ARG3_TYPE.
5605 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
5606 (PTRACE_ARG4_TYPE): Likewise.
5607 (PTRACE_XFER_TYPE): Likewise.
5608 (linux_detach_one_lwp): Cast fourth argument of
5609 ptrace to long then PTRACE_ARG4_TYPE.
5610 (regsets_fetch_inferior_registers): Cast third argument of
5611 ptrace to long then PTRACE_ARG3_TYPE.
5612 (regsets_store_inferior_registers): Likewise.
5613
5614 2012-04-20 Pedro Alves <palves@redhat.com>
5615
5616 * configure: Regenerate.
5617
5618 2012-04-19 Pedro Alves <palves@redhat.com>
5619
5620 * Makefile.in (GNULIB_BUILDDIR): New.
5621 (LIBGNU, INCGNU, GNULIB_H): Adjust.
5622 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
5623 (all, install-only, uninstall, clean-info, all-lib, clean): No
5624 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
5625 (maintainer-clean realclean distclean): Use subdir_do.
5626 (subdir_do): New.
5627 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
5628 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
5629 * acinclude.m4: Include acx_configure_dir.m4.
5630 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
5631 calls. Call AC_PROG_RANLIB. Configure gnulib using
5632 ACX_CONFIGURE_DIR.
5633 (GNULIB): New.
5634 (GNULIB_STDINT_H): Adjust.
5635 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
5636 * gdbreplay.c: Include build-gnulib/config.h.
5637 * server.h: Likewise.
5638 * aclocal.m4: Regenerate.
5639 * config.in: Regenerate.
5640 * configure: Regenerate.
5641
5642 2012-04-19 Pedro Alves <palves@redhat.com>
5643
5644 * Makefile.in (LIBGNU, INCGNU): Adjust.
5645 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
5646 (all, install-only, uninstall, clean-info, all-lib, clean)
5647 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
5648 * configure.ac: Adjust AC_OUTPUT output.
5649 * aclocal.m4: Regenerate.
5650 * configure: Regenerate.
5651
5652 2012-04-19 Pedro Alves <palves@redhat.com>
5653
5654 * Makefile.in (generated_files): New.
5655 (server_h): Remove the explicit dependency on config.h, and depend
5656 on $generated_files.
5657
5658 2012-04-19 Pedro Alves <palves@redhat.com>
5659
5660 * Makefile.in (INCGNU): Add -Ignulib.
5661
5662 2012-04-19 Pedro Alves <palves@redhat.com>
5663
5664 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
5665 (INCGNU): ... this, and spell out -I here.
5666 (GNULIB_LIB): Rename to ...
5667 (LIBGNU): ... this.
5668 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
5669
5670 2012-04-19 Pedro Alves <palves@redhat.com>
5671
5672 * config.in: Regenerate.
5673
5674 2012-04-19 Pedro Alves <palves@redhat.com>
5675
5676 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
5677 * server.h (memmem): Remove declaration.
5678 * config.in: Regenerate.
5679 * configure: Regenerate.
5680
5681 2012-04-19 Yao Qi <yao@codesourcery.com>
5682
5683 * Makefile.in (SFILES): Add common/vec.c.
5684 (OBS): Add vec.o.
5685 (vec.o): New rule.
5686
5687 2012-04-19 Yao Qi <yao@codesourcery.com>
5688
5689 * remote-utils.c (prepare_resume_reply): Replace with macro
5690 target_core_of_thread.
5691 * server.c (handle_qxfer_threads_proper): Likewise.
5692 * target.h (traget_core_of_thread): New macro.
5693
5694 2012-04-18 Pedro Alves <palves@redhat.com>
5695
5696 * aclocal.m4: Regenerate.
5697 * configure: Regenerate.
5698
5699 2012-04-16 Yao Qi <yao@codesourcery.com>
5700
5701 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
5702 duplicated on address.
5703
5704 2012-04-16 Yao Qi <yao@codesourcery.com>
5705
5706 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
5707 (struct tracepoint_action_ops) <send>: New field.
5708 (m_tracepoint_action_send, r_tracepoint_action_send): New.
5709 (agent_expr_send, x_tracepoint_action_send): New.
5710 (l_tracepoint_action_send): New.
5711 (cmd_qtdp): Download and install tracepoint
5712 according to `use_agent'.
5713 (run_inferior_command): Add one more parameter `len'.
5714 Update callers.
5715 (tracepoint_send_agent): New.
5716 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
5717
5718 2012-04-16 Yao Qi <yao@codesourcery.com>
5719
5720 * tracepoint.c (download_tracepoints): Moved to ...
5721 (cmd_qtstart): ... here.
5722
5723 2012-04-14 Yao Qi <yao@codesourcery.com>
5724
5725 * tracepoint.c: Include inttypes.h.
5726 (struct collect_memory_action): Use sized types.
5727 (struct tracepoint): Likewise.
5728 (cmd_qtdp, stop_tracing): Update print specifiers.
5729 (cmd_qtp, response_tracepoint): Likewise.
5730 (collect_data_at_tracepoint): Likewise.
5731 (collect_data_at_step): Likewise.
5732
5733 2012-04-14 Yao Qi <yao@codesourcery.com>
5734
5735 Import gnulib module inttypes.
5736 * aclocal.m4, config.in, configure: Regenerated.
5737
5738 2012-04-14 Yao Qi <yao@codesourcery.com>
5739
5740 * Makefile.in (maintainer-clean, realclean, distclean): Remove
5741 Makefile and config.status at last.
5742
5743 2012-04-13 Yao Qi <yao@codesourcery.com>
5744
5745 * tracepoint.c: Include stdint.h unconditionally.
5746
5747 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5748
5749 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
5750 on BFD_HAVE_SYS_PROCFS_TYPE.
5751 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
5752 * configure: Regenerate.
5753 * config.in: Likewise.
5754
5755 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
5756
5757 * Makefile.in (clean): Also remove x32.c x32-linux.c
5758 x32-avx.c x32-avx-linux.c.
5759 (x32.o): New target.
5760 (x32.c): Likewise.
5761 (x32-linux.o): Likewise.
5762 (x32-linux.c): Likewise.
5763 (x32-avx.o): Likewise.
5764 (x32-avx.c): Likewise.
5765 (x32-avx-linux.o): Likewise.
5766 (x32-avx-linux.c): Likewise.
5767
5768 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
5769 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
5770 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
5771 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
5772 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
5773 i386/x32-avx-linux.xml.
5774
5775 * linux-x86-low.c (init_registers_x32_linux): New prototype.
5776 (init_registers_x32_avx_linux): Likwise.
5777 (x86_linux_update_xmltarget): Call init_registers_x32_linux
5778 or init_registers_x32_avx_linux if linux_is_elf64 is false.
5779
5780 2012-04-13 Pedro Alves <palves@redhat.com>
5781
5782 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
5783 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
5784 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
5785 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
5786 the sub-make.
5787
5788 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
5789
5790 * linux-x86-low.c (compat_x32_clock_t): New.
5791 (compat_x32_siginfo_t): Likewise.
5792 (compat_x32_siginfo_from_siginfo): Likewise.
5793 (siginfo_from_compat_x32_siginfo): Likewise.
5794 (linux_is_elf64): Likewise.
5795 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
5796 and siginfo_from_compat_x32_siginfo for x32.
5797 (x86_arch_setup): Set linux_is_elf64.
5798
5799 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
5800
5801 PR gdb/13969
5802 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
5803 e_machine field.
5804 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
5805 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
5806 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
5807 compatible with process.
5808
5809 2012-04-12 Yao Qi <yao@codesourcery.com>
5810
5811 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
5812 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
5813 (install-only, install-info, clean): Handle sub dir gnulib.
5814 (all-lib, am--refresh): New targets.
5815 (memmem.o): Remove target.
5816 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
5817 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
5818 (AC_REPLACE_FUNCS): Remove memmem.
5819 Invoke gl_INIT and AM_INIT_AUTOMAKE.
5820 (AC_OUTPUT): Generate Makefile in gnulib/.
5821 * aclocal.m4, config.in, configure: Regenerated.
5822
5823 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
5824
5825 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
5826
5827 2012-04-05 Pedro Alves <palves@redhat.com>
5828
5829 -Werror=strict-aliasing
5830
5831 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
5832 pointer.
5833
5834 2012-04-04 Pedro Alves <palves@redhat.com>
5835
5836 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
5837 (sparc_store_gregset_from_stack, sparc_store_gregset)
5838 (sparc_breakpoint_at): Fix formatting.
5839
5840 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5841
5842 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
5843 are available.
5844 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
5845 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
5846 * config.in: Regenerate.
5847 * configure: Likewise.
5848
5849 2012-03-29 Pedro Alves <palves@redhat.com>
5850
5851 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
5852 Correct ptrace arguments.
5853
5854 2012-03-28 Pedro Alves <palves@redhat.com>
5855
5856 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
5857 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
5858 (IA64_FR1_REGNUM): New defines.
5859 (ia64_fetch_register): New.
5860 (the_low_target): Install it.
5861 * linux-low.h (struct linux_target_ops) <fetch_register>: New
5862 field.
5863 * linux-low.c (linux_fetch_registers): Try the
5864 the_low_target.fetch_register hook first.
5865
5866 * linux-arm-low.c (the_low_target): Adjust.
5867 * linux-bfin-low.c (the_low_target): Adjust.
5868 * linux-cris-low.c (the_low_target): Adjust.
5869 * linux-crisv32-low.c (the_low_target): Adjust.
5870 * linux-m32r-low.c (the_low_target): Adjust.
5871 * linux-m68k-low.c (the_low_target): Adjust.
5872 * linux-mips-low.c (the_low_target): Adjust.
5873 * linux-ppc-low.c (the_low_target): Adjust.
5874 * linux-s390-low.c (the_low_target): Adjust.
5875 * linux-sh-low.c (the_low_target): Adjust.
5876 * linux-sparc-low.c (the_low_target): Adjust.
5877 * linux-tic6x-low.c (the_low_target): Adjust.
5878 * linux-x86-low.c (the_low_target): Adjust.
5879 * linux-xtensa-low.c (the_low_target): Adjust.
5880
5881 2012-03-26 Pedro Alves <palves@redhat.com>
5882
5883 * server.c (handle_qxfer_libraries): Don't bail early if
5884 the_target->qxfer_libraries_svr4 is not NULL.
5885
5886 2012-03-26 Pedro Alves <palves@redhat.com>
5887
5888 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
5889
5890 2012-03-23 Pedro Alves <palves@redhat.com>
5891
5892 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
5893 "library-list-svr4" element's start tag when the the DSO list is
5894 empty.
5895
5896 2012-03-23 Pedro Alves <palves@redhat.com>
5897
5898 * linux-low.c (read_one_ptr): Read the inferior's pointer through
5899 a variable whose type size is the same as the inferior's pointer
5900 size.
5901
5902 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
5903
5904 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
5905 struct siginfo.
5906 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
5907 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
5908 * linux-low.h: Include <signal.h>.
5909 (struct siginfo): Remove forward declaration.
5910 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
5911 struct siginfo.
5912
5913 2012-03-21 Mike Frysinger <vapier@gentoo.org>
5914
5915 * .gitignore: Ignore more files.
5916
5917 2012-03-19 Pedro Alves <palves@redhat.com>
5918 Jan Kratochvil <jan.kratochvil@redhat.com>
5919
5920 * server.c (cont_thread, general_thread): Add describing comments.
5921 (start_inferior): Clear `cont_thread'.
5922 (handle_v_cont): Don't set `cont_thread' if resuming all threads
5923 of a process.
5924
5925 2012-03-15 Yao Qi <yao@codesourcery.com>
5926
5927 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
5928 handling to ...
5929 (cmd_qtdp): ... here.
5930
5931 2012-03-15 Yao Qi <yao@codesourcery.com>
5932
5933 * tracepoint.c (struct tracepoint_action_ops): New.
5934 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
5935 (m_tracepoint_action_download): New.
5936 (r_tracepoint_action_download): New.
5937 (x_tracepoint_action_download): New.
5938 (l_tracepoint_action_download): New.
5939 (add_tracepoint_action): Install `action->ops' according type.
5940 (download_tracepoint_1): Move code `download' function pointer
5941 of various tracepoint_action_ops.
5942
5943 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
5944
5945 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
5946 linux_ptrace_attach_warnings.
5947
5948 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
5949
5950 * Makefile.in (linux-ptrace.o): New.
5951 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
5952 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
5953 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
5954 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
5955 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
5956 of these targets.
5957 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
5958
5959 2012-03-08 Yao Qi <yao@codesourcery.com>
5960 Pedro Alves <palves@redhat.com>
5961
5962 Fix PR server/13392.
5963 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
5964 offset of JMP insn.
5965 * tracepoint.c (remove_tracepoint): New.
5966 (cmd_qtdp): Call remove_tracepoint when failed to install.
5967
5968 2012-03-07 Pedro Alves <palves@redhat.com>
5969
5970 * linux-low.c (get_detach_signal): New.
5971 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
5972 Pass on pending signals to PTRACE_DETACH. Check the result of the
5973 ptrace call.
5974 * server.c (program_signals, program_signals_p): New.
5975 (handle_general_set): Handle QProgramSignals.
5976 * server.h (program_signals, program_signals_p): Declare.
5977
5978 2012-03-05 Pedro Alves <palves@redhat.com>
5979 Jan Kratochvil <jan.kratochvil@redhat.com>
5980
5981 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
5982 New comment why.
5983
5984 2012-03-03 Yao Qi <yao@codesourcery.com>
5985
5986 * tracepoint.c (tracepoint_look_up_symbols): Update call to
5987 agent_look_up_symbols.
5988
5989 2012-03-03 Yao Qi <yao@codesourcery.com>
5990
5991 * Makefile.in (linux-low.o): Keep dependence on agent.h.
5992 (linux-x86-low.o): Likewise.
5993 * server.h: Remove in_process_agent_loaded.
5994 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
5995 common/agent.c.
5996 Update callers.
5997
5998 2012-03-03 Yao Qi <yao@codesourcery.com>
5999
6000 * tracepoint.c (gdb_agent_capability): New global.
6001 (in_process_agent_loaded_ust): Renamed to
6002 `in_process_agent_supports_ust'.
6003 Update callers.
6004 (in_process_agent_supports_ust): Call agent_capability_check.
6005 (clear_installed_tracepoints): Assert that agent supports
6006 agent.
6007
6008 2012-03-03 Yao Qi <yao@codesourcery.com>
6009
6010 * linux-low.c (linux_supports_agent): New.
6011 (linux_target_ops): Initialize field `supports_agent' with
6012 linux_supports_agent.
6013 * target.h (struct target_ops) <supports_agent>: New.
6014 (target_supports_agent): New macro.
6015 * server.c (handle_general_set): Handle packet 'QAgent'.
6016 (handle_query): Send `QAgent+'.
6017 * Makefile.in (server.o): Depends on agent.h.
6018
6019 2012-03-03 Yao Qi <yao@codesourcery.com>
6020
6021 * Makefile.in (OBS): Add agent.o.
6022 Add new rule for agent.o.
6023 Track dependence of tracepoint.c on agent.h.
6024 * tracepoint.c (run_inferior_command_1):
6025 (run_inferior_command): Call agent_run_command.
6026 (gdb_ust_connect_sync_socket): Deleted. Move it to
6027 common/agent.c.
6028 (resume_thread, stop_thread): Likewise.
6029 (gdb_ust_socket_init): Renamed to ...
6030 (gdb_agent_socket_init): ... New.
6031 (gdb_ust_thread): Renamed to ...
6032 (gdb_agent_helper_thread): ... New.
6033 (gdb_ust_init): Move some code to ...
6034 (gdb_agent_init): ... here. New.
6035 [HAVE_UST]: Call gdb_ust_init.
6036 (initialize_tracepoint_ftlib): Call gdb_agent_init.
6037 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
6038 * config.in, configure: Regenerated.
6039
6040 2012-03-02 Pedro Alves <palves@redhat.com>
6041
6042 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
6043 * linux-low.c (struct simple_pid_list): New.
6044 (stopped_pids): New a struct simple_pid_list pointer.
6045 (add_to_pid_list, pull_pid_from_list): New.
6046 (handle_extended_wait): Don't assume the first signal new children
6047 report is SIGSTOP. Adjust call to pull_pid_from_list.
6048 (linux_wait_for_lwp): Adjust.
6049
6050 2012-03-02 Yao Qi <yao@codesourcery.com>
6051
6052 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
6053 debug log.
6054
6055 2012-03-02 Yao Qi <yao@codesourcery.com>
6056
6057 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
6058 `stop_pc' and `tpoint'. Update caller.
6059
6060 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
6061
6062 * linux-low.h (linux_target_ops): Add regset_bitmap member.
6063 * linux-low.c (use_linux_regsets): New macro.
6064 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
6065 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
6066 (linux_register_in_regsets): New function.
6067 (usr_fetch_inferior_registers): Skip registers covered by
6068 regsets.
6069 (usr_store_inferior_registers): Likewise.
6070 (usr_fetch_inferior_registers): New macro.
6071 (usr_store_inferior_registers): Likewise.
6072 (linux_fetch_registers): Handle mixed regset/non-regset targets.
6073 (linux_store_registers): Likewise.
6074 * linux-mips-low.c (init_registers_mips_dsp_linux): New
6075 prototype.
6076 (init_registers_mips64_dsp_linux): Likewise.
6077 (init_registers_mips_linux): New macro.
6078 (init_registers_mips_dsp_linux): Likewise.
6079 (mips_dsp_num_regs): Likewise.
6080 (DSP_BASE, DSP_CONTROL): New fallback macros.
6081 (mips_base_regs): New macro.
6082 (mips_regmap): Use it. Fix the size.
6083 (mips_dsp_regmap): New variable.
6084 (mips_dsp_regset_bitmap): Likewise.
6085 (mips_arch_setup): New function.
6086 (mips_cannot_fetch_register): Use the_low_target.regmap rather
6087 than mips_regmap.
6088 (mips_cannot_store_register): Likewise.
6089 (the_low_target): Update .arch_setup, .num_regs and .regmap
6090 initializers. Add .regset_bitmap initializer.
6091 * linux-arm-low.c (the_low_target): Add .regset_bitmap
6092 initializer.
6093 * linux-bfin-low.c (the_low_target): Likewise.
6094 * linux-cris-low.c (the_low_target): Likewise.
6095 * linux-crisv32-low.c (the_low_target): Likewise.
6096 * linux-ia64-low.c (the_low_target): Likewise.
6097 * linux-m32r-low.c (the_low_target): Likewise.
6098 * linux-m68k-low.c (the_low_target): Likewise.
6099 * linux-ppc-low.c (the_low_target): Likewise.
6100 * linux-s390-low.c (the_low_target): Likewise.
6101 * linux-sh-low.c (the_low_target): Likewise.
6102 * linux-sparc-low.c (the_low_target): Likewise.
6103 * linux-tic6x-low.c (the_low_target): Likewise.
6104 * linux-x86-low.c (the_low_target): Likewise.
6105 * linux-xtensa-low.c (the_low_target): Likewise.
6106 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
6107 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
6108 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
6109 srv_xmlfiles.
6110 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
6111 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
6112
6113 2012-02-29 Yao Qi <yao@codesourcery.com>
6114 Pedro Alves <palves@redhat.com>
6115
6116 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
6117 `step_over_finished' is true.
6118
6119 2012-02-27 Pedro Alves <palves@redhat.com>
6120
6121 * linux-low.c (pid_is_stopped): Delete, moved to common/.
6122 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
6123
6124 2012-02-27 Pedro Alves <palves@redhat.com>
6125
6126 PR server/9684
6127 * linux-low.c (pid_is_stopped): New.
6128 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
6129
6130 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
6131
6132 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
6133 of conditions.
6134
6135 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
6136
6137 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
6138
6139 2012-02-24 Luis Machado <lgustavo@codesourcery>
6140
6141 * server.c (handle_query): Advertise support for target-side
6142 breakpoint condition evaluation.
6143 (process_point_options): New function.
6144 (process_serial_event): When inserting a breakpoint, check for
6145 a target-side condition that should be evaluated.
6146
6147 * mem-break.c: Include regcache.h and ax.h.
6148 (point_cond_list_t): New data structure.
6149 (breakpoint) <cond_list>: New field.
6150 (find_gdb_breakpoint_at): Make non-static.
6151 (delete_gdb_breakpoint_at): Clear any target-side
6152 conditions.
6153 (clear_gdb_breakpoint_conditions): New function.
6154 (add_condition_to_breakpoint): Likewise.
6155 (add_breakpoint_condition): Likewise.
6156 (gdb_condition_true_at_breakpoint): Likewise.
6157 (gdb_breakpoint_here): Return result directly instead
6158 of going through a local variable.
6159
6160 * mem-break.h (find_gdb_breakpoint_at): New prototype.
6161 (clear_gdb_breakpoint_conditions): Likewise.
6162 (add_breakpoint_condition): Likewise.
6163 (gdb_condition_true_at_breakpoint): Likewise.
6164
6165 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
6166 (need_step_over_p): Take target-side breakpoint condition into
6167 consideration.
6168
6169 2012-02-24 Luis Machado <lgustavo@codesourcery>
6170
6171 * server.h: Include tracepoint.h.
6172 (agent_mem_read, agent_get_trace_state_variable_value,
6173 agent_set_trace_state_variable_value,
6174 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
6175 get_set_tsv_func_addr): New prototypes.
6176
6177 * ax.h: New include file.
6178 * ax.c: New source file.
6179
6180 * tracepoint.c: Include ax.h.
6181 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
6182 agent_expr, eval_result_type): Move to ax.h.
6183 (parse_agent_expr): Rename to ...
6184 (gdb_parse_agent_expr): ... this, make it non-static and move
6185 to ax.h.
6186 (unparse_agent_expr) Rename to ...
6187 (gdb_unparse_agent_expr): ... this, make it non-static and move
6188 to ax.h.
6189 (eval_agent_expr): Rename to ...
6190 (eval_tracepoint_agent_expr): ... this.
6191 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
6192 forward declarations.
6193 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
6194 (agent_get_trace_state_variable_value): New function.
6195 (agent_set_trace_state_variable_value): New function.
6196 (cmd_qtdp): Call gdb_parse_agent_expr (...).
6197 (response_tracepoint): Call gdb_unparse_agent_expr (...).
6198 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
6199 (condition_true_at_tracepoint): Likewise.
6200 (parse_agent_expr): Rename to ...
6201 (gdb_parse_agent_expr): ... this and move to ax.c.
6202 (unparse_agent_expr): Rename to ...
6203 (gdb_unparse_agent_expr): ... this and move to ax.c.
6204 (gdb_agent_op_name): Move to ax.c.
6205 (eval_agent_expr): Rename to ...
6206 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
6207 and move to ax.c.
6208 (eval_tracepoint_agent_expr): New function.
6209 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
6210 non-static.
6211 (current_insn_ptr, emit_error, struct bytecode_address): Move to
6212 ax.c.
6213 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
6214 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
6215 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
6216 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
6217 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
6218 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
6219 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
6220 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
6221 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
6222 (compile_bytecodes): Remove forward declaration.
6223 (is_goto_target): Move to ax.c.
6224 (compile_bytecodes): Move to ax.c and call
6225 agent_get_trace_state_variable_value (...) and
6226 agent_set_trace_state_variable_value (...).
6227
6228 * Makefile.in: Update ax.c and IPA dependencies.
6229
6230 2012-02-24 Pedro Alves <palves@redhat.com>
6231
6232 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
6233 (cmd_bigqtbuffer_circular): ... this. Only handle
6234 'QTBuffer:circular:'.
6235 (handle_tracepoint_general_set): Adjust.
6236
6237 2012-02-16 Yao Qi <yao@codesourcery.com>
6238
6239 * inferiors.c: Move code to ...
6240 * dll.c: .... here. New.
6241 * server.h: Declare clear_dlls.
6242 * Makefile.in (SFILES): Add dll.c.
6243 (OBS): Add dll.o
6244 (dll.o): New rule.
6245
6246 2012-02-11 Yao Qi <yao@codesourcery.com>
6247
6248 * server.c: (handle_monitor_command): Add a new parameter
6249 `own_buf'.
6250 (handle_query): Update caller.
6251
6252 2012-02-09 Joel Brobecker <brobecker@adacore.com>
6253
6254 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
6255 * configure, config.in: Regenerate.
6256 * hostio.c: Provide an alternate implementation if HAVE_READLINK
6257 is not defined.
6258
6259 2012-02-02 Pedro Alves <palves@redhat.com>
6260
6261 Try SIGKILL first, then PTRACE_KILL.
6262 * linux-low.c (linux_kill_one_lwp): New.
6263 (linux_kill_one_lwp): Rename to ...
6264 (kill_one_lwp_callback): ... this. Use the new
6265 linux_kill_one_lwp.
6266
6267 2012-02-02 Pedro Alves <palves@redhat.com>
6268
6269 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
6270 inferior.
6271
6272 2012-01-27 Pedro Alves <palves@redhat.com>
6273
6274 * linux-low.c (linux_child_pid_to_exec_file): Delete.
6275 (elf_64_file_p): Make static.
6276 (linux_pid_exe_is_elf_64_file): New.
6277 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
6278 Delete declarations.
6279 (linux_pid_exe_is_elf_64_file): Declare.
6280 * linux-x86-low.c (x86_arch_setup): Use
6281 linux_pid_exe_is_elf_64_file.
6282
6283 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
6284
6285 * linux-low.c (linux_wait_for_event_1): Rename to ...
6286 (linux_wait_for_event): ... here and merge it with former
6287 linux_wait_for_event - new variable wait_ptid, use it.
6288 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
6289
6290 2012-01-23 Pedro Alves <palves@redhat.com>
6291
6292 * server.c (main): Avoid yet another case of infinite loop while
6293 detaching/killing after a longjmp.
6294
6295 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
6296
6297 Code cleanup.
6298 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
6299
6300 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
6301
6302 * hostio.c (handle_readlink): New function.
6303 (handle_vFile): Call it to handle "vFile:readlink" packets.
6304
6305 2012-01-20 Pedro Alves <palves@redhat.com>
6306 Ulrich Weigand <ulrich.weigand@linaro.org>
6307
6308 * server.c (handle_v_requests): Only support vAttach and vRun to
6309 start multiple processes when in extended protocol mode.
6310
6311 2012-01-17 Pedro Alves <palves@redhat.com>
6312
6313 * tracepoint.c (initialize_tracepoint): Use mmap instead of
6314 memalign plus mprotect to allocate the scratch buffer.
6315
6316 2012-01-13 Pedro Alves <palves@redhat.com>
6317
6318 * server.c (attach_inferior): Clear `cont_thread'.
6319
6320 2012-01-13 Pedro Alves <palves@redhat.com>
6321
6322 * server.c (main): Avoid infinite loop while detaching/killing
6323 after a longjmp.
6324
6325 2012-01-09 Doug Evans <dje@google.com>
6326
6327 * server.c (start_inferior): Set last_ptid in --wrapper case.
6328
6329 2012-01-06 Yao Qi <yao@codesourcery.com>
6330
6331 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
6332 defined.
6333 [IN_PROCESS_AGENT] (debug_agent): New global variable.
6334
6335 2012-01-04 Yao Qi <yao@codesourcery.com>
6336
6337 * tracepoint.c (cmd_qtdp): Print debug message
6338 for static tracepoint.
6339
6340 2012-01-04 Yao Qi <yao@codesourcery.com>
6341
6342 * tracepoint.c (trace_vdebug): Differentiate debug message
6343 between gdbserver and IPA.
6344
6345 2012-01-03 Yao Qi <yao@codesourcery.com>
6346
6347 * tracepoint.c (tracepoint_was_hit): Don't collect for
6348 static tracepoint.
6349
6350 2012-01-02 Joel Brobecker <brobecker@adacore.com>
6351
6352 * terminal.h: Reformat copyright header.
6353
6354 2012-01-02 Joel Brobecker <brobecker@adacore.com>
6355
6356 * server.c (gdbserver_version): Update copyright year.
6357 * gdbreplay.c (gdbreplay_version): Likewise.
6358
6359 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
6360
6361 * linux-low.c (linux_create_inferior): Put empty if clause for write.
6362
6363 Revert:
6364 2011-12-18 Hui Zhu <teawater@gmail.com>
6365 * linux-low.c (linux_create_inferior): Save return value to ret.
6366
6367 2011-12-18 Hui Zhu <teawater@gmail.com>
6368
6369 * linux-low.c (linux_create_inferior): Save return value to ret.
6370
6371 2011-12-16 Doug Evans <dje@google.com>
6372
6373 * linux-low.c (linux_create_inferior): If stdio connection,
6374 redirect stdin from /dev/null, stdout to stderr.
6375 * remote-utils.c (remote_is_stdio): New static global.
6376 (remote_connection_is_stdio): New function.
6377 (remote_prepare): Handle stdio connection.
6378 (remote_open): Ditto.
6379 (remote_close): Don't close stdin for stdio connections.
6380 (read_prim,write_prim): New functions. Replace all calls to
6381 read/write to these.
6382 * server.c (main): Watch for "-" argument. Move call to
6383 remote_prepare before start_inferior.
6384 * server.h (STDIO_CONNECTION_NAME): New macro.
6385 (remote_connection_is_stdio): Declare.
6386
6387 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
6388 in debugging output.
6389
6390 2011-12-15 Yao Qi <yao@codesourcery.com>
6391
6392 * tracepoint.c: Include sys/syscall.h.
6393 (gdb_ust_thread): Remove preprocessor conditional.
6394
6395 2011-12-14 Pedro Alves <pedro@codesourcery.com>
6396
6397 * linux-low.c (linux_detach_one_lwp): Call
6398 the_low_target.prepare_to_resume before detaching.
6399
6400 2011-12-14 Yao Qi <yao@codesourcery.com>
6401
6402 * tracepoint.c (gdb_ust_thread): Don't ignore return value
6403 of write.
6404
6405 2011-12-14 Yao Qi <yao@codesourcery.com>
6406
6407 * i386-low.c (i386_low_stopped_data_address): Initialize local
6408 variable `control'.
6409
6410 2011-12-13 Pedro Alves <pedro@codesourcery.com>
6411
6412 PR remote/13492
6413
6414 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
6415 DR_CONTROL unless necessary. Extend comments.
6416 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
6417 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
6418
6419 2011-12-13 Yao Qi <yao@codesourcery.com>
6420
6421 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
6422 macros.
6423 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
6424
6425 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
6426
6427 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
6428 Print new debug message for such case.
6429
6430 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
6431
6432 Fix overlapping memcpy.
6433 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
6434 the read_inferior_memory transfer.
6435 (delete_fast_tracepoint_jump): New variable buf. Use it for the
6436 write_inferior_memory transfer.
6437 (set_fast_tracepoint_jump): New variable buf. Use it for the
6438 read_inferior_memory and write_inferior_memory transfers.
6439 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
6440 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
6441 Use it for the write_inferior_memory transfer.
6442 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
6443 buffers.
6444
6445 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
6446
6447 * linux-low.c (fetch_register, store_register): Make code
6448 consistent, fix formatting.
6449
6450 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
6451
6452 * linux-low.c (usr_store_inferior_registers): Factor out code
6453 to handle individual registers into...
6454 (store_register): ... this new function.
6455
6456 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
6457
6458 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
6459 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
6460 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
6461 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
6462 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
6463 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
6464 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
6465 (srv_xmlfiles): Add new XML files.
6466
6467 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
6468 and <sys/uio.h>.
6469 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
6470 (init_registers_s390_linux32v1): Add prototype.
6471 (init_registers_s390_linux32v2): Likewise.
6472 (init_registers_s390_linux64v1): Likewise.
6473 (init_registers_s390_linux64v2): Likewise.
6474 (init_registers_s390x_linux64v1): Likewise.
6475 (init_registers_s390x_linux64v2): Likewise.
6476 (s390_num_regs): Increment to 52.
6477 (s390_regmap): Add orig_r2 register.
6478 (s390_num_regs_3264): Increment to 68.
6479 (s390_regmap_3264): Add orig_r2 register.
6480 (s390_collect_ptrace_register): Handle orig_r2 register.
6481 (s390_supply_ptrace_register): Likewise.
6482 (s390_fill_last_break): New function.
6483 (s390_store_last_break): Likewise.
6484 (s390_fill_system_call): New function.
6485 (s390_store_system_call): Likewise.
6486 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
6487 register sets.
6488 (s390_check_regset): New function.
6489 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
6490 NT_S390_SYSTEM_CALL regsets and use appropriate description.
6491 Update target_regsets for available register sets.
6492
6493 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
6494 Jan Kratochvil <jan.kratochvil@redhat.com>
6495
6496 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
6497 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
6498 New.
6499 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
6500 * linux-low.h (struct process_info_private): New member r_debug.
6501 * server.c (handle_qxfer_libraries): Call
6502 the_target->qxfer_libraries_svr4.
6503 (handle_qxfer_libraries_svr4): New function.
6504 (qxfer_packets): New entry "libraries-svr4".
6505 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
6506 * target.h (struct target_ops): New member qxfer_libraries_svr4.
6507 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
6508 PACKET_qXfer_libraries_svr4.
6509
6510 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
6511
6512 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
6513 PSW address/mask between 8-byte and 16-byte formats.
6514 (s390_supply_ptrace_register): Likewise.
6515 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
6516 basic addressing mode bit.
6517
6518 2011-11-24 Stan Shebs <stan@codesourcery.com>
6519
6520 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
6521
6522 2011-11-17 Stan Shebs <stan@codesourcery.com>
6523
6524 * tracepoint.c (struct tracepoint): New field traceframe_usage.
6525 (tracing_start_time): New global.
6526 (tracing_stop_time): New global.
6527 (tracing_user_name): New global.
6528 (tracing_notes): New global.
6529 (tracing_stop_note): New global.
6530 (cmd_qtstart): Set traceframe_usage, start_time.
6531 (stop_tracing): Set stop_time.
6532 (cmd_qtstatus): Report additional status.
6533 (cmd_qtp): New function.
6534 (handle_tracepoint_query): Call it.
6535 (cmd_qtnotes): New function.
6536 (handle_tracepoint_general_set): Call it.
6537 (get_timestamp): Rename from tsv_get_timestamp.
6538
6539 2011-11-14 Stan Shebs <stan@codesourcery.com>
6540 Kwok Cheung Yeung <kcy@codesourcery.com>
6541
6542 * linux-x86-low.c (small_jump_insn): New.
6543 (i386_install_fast_tracepoint_jump_pad): Add arguments for
6544 trampoline and error message, build a trampoline and issue a small
6545 jump instruction to it.
6546 (x86_install_fast_tracepoint_jump_pad): Add arguments for
6547 trampoline and error message.
6548 (x86_get_min_fast_tracepoint_insn_len): New.
6549 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
6550 * linux-low.h (struct linux_target_ops): Add arguments to
6551 install_fast_tracepoint_jump_pad operation, add new operation.
6552 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
6553 arguments.
6554 (linux_get_min_fast_tracepoint_insn_len): New function.
6555 (linux_target_op): Add new operation.
6556 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
6557 (gdb_trampoline_buffer_end): Ditto.
6558 (gdb_trampoline_buffer_error): Ditto.
6559 (struct ipa_sym_addresses): Add fields for new IPA variables.
6560 (symbol_list): Add entries for new IPA variables.
6561 (struct tracepoint): Add fields to hold the address range of the
6562 trampoline used by the tracepoint.
6563 (trampoline_buffer_head): New static variable.
6564 (trampoline_buffer_tail): Ditto.
6565 (claim_trampoline_space): New function.
6566 (have_fast_tracepoint_trampoline_buffer): New function.
6567 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
6568 structure.
6569 (install_fast_tracepoint): Ditto, also add error buffer argument.
6570 (cmd_qtminftpilen): New function.
6571 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
6572 (fast_tracepoint_from_trampoline_address): New function.
6573 (fast_tracepoint_collecting): Handle trampoline as part of jump
6574 pad space.
6575 (set_trampoline_buffer_space): New function.
6576 (initialize_tracepoint): Initialize new IPA variables.
6577 * target.h (struct target_ops): Add arguments to
6578 install_fast_tracepoint_jump_pad operation, add new
6579 get_min_fast_tracepoint_insn_len operation.
6580 (target_get_min_fast_tracepoint_insn_len): New.
6581 (install_fast_tracepoint_jump_pad): Add arguments.
6582 * server.h (IPA_BUFSIZ): Define.
6583 * linux-i386-ipa.c: Include extra header files.
6584 (initialize_fast_tracepoint_trampoline_buffer): New function.
6585 (initialize_low_tracepoint): Call it.
6586 * server.h (set_trampoline_buffer_space): Declare.
6587 (claim_trampoline_space): Ditto.
6588 (have_fast_tracepoint_trampoline_buffer): Ditto.
6589
6590 2011-11-14 Yao Qi <yao@codesourcery.com>
6591
6592 * server.c (handle_query): Handle InstallInTrace for qSupported.
6593 * tracepoint.c (add_tracepoint): Sort list.
6594 (install_tracepoint, download_tracepoint): New.
6595 (cmd_qtdp): Call them to install and download tracepoints.
6596 (sort_tracepoints): Removed.
6597 (cmd_qtstart): Update.
6598
6599 2011-11-14 Yao Qi <yao@codesourcery.com>
6600
6601 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
6602 * mem-break.h: Declare.
6603 * tracepoint.c (cmd_qtstart): Move some code to ...
6604 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
6605 New.
6606 (download_tracepoints): Move some code to ...
6607 (download_tracepoint_1): ... here. New.
6608
6609 2011-11-08 Yao Qi <yao@codesourcery.com>
6610
6611 * remote-utils.c (relocate_instruction): A comment fix.
6612
6613 2011-11-07 Joel Brobecker <brobecker@adacore.com>
6614
6615 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
6616 (i386_dr_low_get_control, i386_dr_low_get_status): Use
6617 dr_status_mirror and dr_control_mirror from debug_reg_state.
6618 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
6619 (i386_initial_stuff): Remove use of deleted globals.
6620 (i386_get_thread_context, i386_set_thread_context,
6621 i386_thread_added): Use dr_status_mirror and dr_control_mirror
6622 from debug_reg_state.
6623
6624 2011-11-05 Yao Qi <yao@codesourcery.com>
6625
6626 * tracepoint.c (gdb_collect): Loop over tracepoints of same
6627 address as TPOINT's.
6628
6629 2011-11-02 Stan Shebs <stan@codesourcery.com>
6630
6631 * tracepoint.c (agent_mem_read_string): New function.
6632 (eval_agent_expr): Call it for tracenz.
6633 * server.c (handle_query): Report support for tracenz.
6634
6635 2011-11-02 Yao Qi <yao@codesourcery.com>
6636
6637 * tracepoint.c (cmd_qtstart): Remove unused local variables.
6638
6639 2011-11-02 Yao Qi <yao@codesourcery.com>
6640
6641 * target.h: Fix a typo in comment.
6642
6643 2011-10-31 Pedro Alves <pedro@codesourcery.com>
6644
6645 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
6646 clobber the breakpoints' shadows with fast tracepoint jumps.
6647 * mem-break.h (check_mem_write): Add `myaddr' parameter.
6648 * target.c (write_inferior_memory): Also pass MYADDR down to
6649 check_mem_write.
6650
6651 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
6652
6653 * configure.ac: Check support for personality routine.
6654 * configure: Regenerate.
6655 * config.in: Likewise.
6656 * linux-low.c: Include <sys/personality.h>.
6657 Define ADDR_NO_RANDOMIZE if necessary.
6658 (linux_create_inferior): Disable address space randomization when
6659 forking inferior, if requested.
6660 (linux_supports_disable_randomization): New function.
6661 (linux_target_ops): Install it.
6662 * server.h (disable_randomization): Declare.
6663 * server.c (disable_randomization): New global variable.
6664 (handle_general_set): Handle QDisableRandomization.
6665 (handle_query): Likewise for qSupported.
6666 (main): Support --disable-randomization and --no-disable-randomization
6667 command line arguments.
6668 * target.h (struct target_ops): Add supports_disable_randomization.
6669 (target_supports_disable_randomization): New macro.
6670
6671 2011-09-29 Mike Frysinger <vapier@gentoo.org>
6672
6673 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
6674 ifdef check.
6675 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
6676 [!PT_GETDSBT] (target_loadmap): New definition.
6677 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
6678 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
6679 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
6680 and PT_GETDSBT to LINUX_LOADMAP.
6681 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
6682 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
6683
6684 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
6685
6686 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
6687 (arm_linux_hwbp_cap): New static variable.
6688 (arm_linux_get_hwbp_cap): Replace by ...
6689 (arm_linux_init_hwbp_cap): ... this new function.
6690 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
6691 (arm_linux_get_hw_watchpoint_count): Likewise.
6692 (arm_linux_get_hw_watchpoint_max_length): Likewise.
6693 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
6694 (arm_prepare_to_resume): Use perror_with_name instead of error.
6695
6696 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
6697
6698 * linux-arm-low.c: Include <signal.h>.
6699 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
6700 (struct arm_linux_hwbp_cap): New data type.
6701 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
6702 (struct arm_linux_hw_breakpoint): New data type.
6703 (MAX_BPTS, MAX_WPTS): Define.
6704 (struct arch_process_info, struct arch_lwp_info): New data types.
6705 (arm_linux_get_hwbp_cap): New function.
6706 (arm_linux_get_hw_breakpoint_count): Likewise.
6707 (arm_linux_get_hw_watchpoint_count): Likewise.
6708 (arm_linux_get_hw_watchpoint_max_length): Likewise.
6709 (arm_hwbp_control_initialize): Likewise.
6710 (arm_hwbp_control_is_enabled): Likewise.
6711 (arm_hwbp_control_is_initialized): Likewise.
6712 (arm_hwbp_control_disable): Likewise.
6713 (arm_linux_hw_breakpoint_equal): Likewise.
6714 (arm_linux_hw_point_initialize): Likewise.
6715 (struct update_registers_data): New data structure.
6716 (update_registers_callback: New function.
6717 (arm_insert_point): Likewise.
6718 (arm_remove_point): Likewise.
6719 (arm_stopped_by_watchpoint): Likewise.
6720 (arm_stopped_data_address): Likewise.
6721 (arm_new_process): Likewise.
6722 (arm_new_thread): Likewise.
6723 (arm_prepare_to_resume): Likewise.
6724 (the_low_target): Register arm_insert_point, arm_remove_point,
6725 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
6726 arm_new_thread, and arm_prepare_to_resume.
6727
6728 2011-09-15 Stan Shebs <stan@codesourcery.com>
6729
6730 * server.h (struct emit_ops): Add compare-goto fields.
6731 * tracepoint.c (gdb_agent_op_sizes): New table.
6732 (emit_eq_goto): New function.
6733 (emit_ne_goto): New function.
6734 (emit_lt_goto): New function.
6735 (emit_le_goto): New function.
6736 (emit_gt_goto): New function.
6737 (emit_ge_goto): New function.
6738 (is_goto_target): New function.
6739 (compile_bytecodes): Recognize special cases of compare-goto
6740 combinations and call specialized emitters for them.
6741 * linux-x86-low.c (amd64_emit_eq_goto): New function.
6742 (amd64_emit_ne_goto): New function.
6743 (amd64_emit_lt_goto): New function.
6744 (amd64_emit_le_goto): New function.
6745 (amd64_emit_gt_goto): New function.
6746 (amd64_emit_ge_goto): New function.
6747 (amd64_emit_ops): Add the new functions.
6748 (i386_emit_eq_goto): New function.
6749 (i386_emit_ne_goto): New function.
6750 (i386_emit_lt_goto): New function.
6751 (i386_emit_le_goto): New function.
6752 (i386_emit_gt_goto): New function.
6753 (i386_emit_ge_goto): New function.
6754 (i386_emit_ops): Add the new functions.
6755
6756 2011-09-08 Stan Shebs <stan@codesourcery.com>
6757
6758 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
6759 (i386_emit_epilogue): Restore %ebx.
6760
6761 2011-08-31 Jie Zhang <jzhang918@gmail.com>
6762
6763 * server.c (step_thread): Remove definition.
6764 (process_serial_event): Don't handle Hs.
6765 * server.h (step_thread): Remove declaration.
6766 * target.c (set_desired_inferior): Remove use of step_thread.
6767
6768 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
6769
6770 * linux-low.c: Include linux-procfs.h.
6771 (linux_attach_lwp_1): Update comments.
6772 (linux_attach): Scan for existing threads when attaching to a
6773 process that is the tgid.
6774 * Makefile.in: Update dependencies.
6775
6776 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
6777
6778 * configure.srv: Add linux-procfs.o dependencies.
6779
6780 2011-08-14 Yao Qi <yao@codesourcery.com>
6781
6782 * target.h (struct target_ops): Fix indent.
6783 * win32-low.c (win32_target_ops): Fix comment.
6784
6785 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
6786 Yao Qi <yao@codesourcery.com>
6787
6788 * Makefile.in (clean): Remove tic6x-*.c files.
6789 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
6790 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
6791 (tic6x-c64xp-linux.c): Likewise.
6792 * configure.srv: Add support for tic6x-*-uclinux.
6793 * linux-tic6x-low.c: New.
6794 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
6795
6796 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
6797 Yao Qi <yao@codesourcery.com>
6798
6799 * target.h (struct target_ops): Add read_loadmap.
6800 * linux-low.c (struct target_loadseg): New type.
6801 (struct target_loadmap): New type.
6802 (linux_read_loadmap): New function.
6803 (linux_target_ops): Add linux_read_loadmap.
6804 * server.c (handle_query): Support qXfer:fdpic:read packet.
6805 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
6806 to NULL.
6807
6808 2011-08-05 Eli Zaretskii <eliz@gnu.org>
6809
6810 * win32-low.c: Include <stdint.h>.
6811
6812 2011-07-22 Pedro Alves <pedro@codesourcery.com>
6813
6814 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
6815 to the inferior here.
6816 (i386_remove_aligned_watchpoint): Ditto.
6817 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
6818 fit part of the watchpoint in the debug registers.
6819 (i386_update_inferior_debug_regs): New.
6820 (i386_low_insert_watchpoint): Work on a local mirror of the debug
6821 registers, and only update the inferior on success.
6822 (i386_low_remove_watchpoint): Ditto.
6823
6824 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
6825
6826 * linux-low.c (compare_ints, unique, list_threads, show_process,
6827 linux_core_of_thread): Delete.
6828 (linux_target_ops): Change linux_core_of_thread to
6829 linux_common_core_of_thread.
6830 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
6831 * utils.c (malloc_failure): Change type of argument.
6832 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
6833 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
6834 common/linux-osdata.c, common/ptid.c and common/buffer.c.
6835 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
6836 (IPA_OBJS): Add common-utils-ipa.o.
6837 (ptid_h, linux_osdata_h): New macros.
6838 (server_h): Add common/common-utils.h, common/xml-utils.h,
6839 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
6840 common/ptid.h.
6841 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
6842 ptid.o, buffer.o): New rules.
6843 (linux-low.o): Add common/linux-osdata.h as a dependency.
6844 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
6845 * configure.ac: Add AC_HEADER_DIRENT check.
6846 * config.in: Regenerate.
6847 * configure: Regenerate.
6848 * remote-utils.c (xml_escape_text): Delete.
6849 (buffer_grow, buffer_free, buffer_init, buffer_finish,
6850 buffer_xml_printf): Move to common/buffer.c.
6851 * server.c (main): Remove call to initialize_inferiors.
6852 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
6853 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
6854 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
6855 internal_error, gdb_assert, gdb_assert_fail): Delete.
6856 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
6857 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
6858 common/buffer.h.
6859 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
6860 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
6861 initialize_inferiors): Delete.
6862
6863 2011-07-20 Pedro Alves <pedro@codesourcery.com>
6864
6865 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
6866 symbol error.
6867
6868 2011-05-31 Pedro Alves <pedro@codesourcery.com>
6869
6870 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
6871 assertion.
6872 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
6873
6874 2011-05-26 Yao Qi <yao@codesourcery.com>
6875
6876 * Makefile.in (thread-db.o): Track dependence to
6877 common/gdb_thread_db.h.
6878 * thread-db.c: include gdb_thread_db.h from right place.
6879
6880 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
6881
6882 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
6883 __FILE__ and __LINE__ to internal_error.
6884
6885 2011-05-13 Doug Evans <dje@google.com>
6886
6887 * thread-db.c (try_thread_db_load_from_sdir): New function.
6888 (try_thread_db_load_from_dir): New function.
6889 (thread_db_load_search): Handle $sdir, ignore $pdir.
6890 Remove trying of system directories if search of
6891 libthread-db-search-path fails, that is now done via $sdir.
6892
6893 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
6894
6895 * server.c (handle_query): Add EnableDisableTracepoints to the list
6896 of supported features.
6897 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
6898 tracepoints.
6899 (cmd_qtenable_disable): New.
6900 (cmd_qtstart): Install tracepoints even if disabled.
6901 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
6902 receiving a QTEnable or QTDisable packet.
6903 (gdb_collect): Skip data collection if fast tracepoint is disabled.
6904 (ust_marker_to_static_tracepoint): Do not ignore disabled static
6905 tracepoints.
6906 (gdb_probe): Skip data collection if static tracepoint is disabled.
6907
6908 2011-05-10 Doug Evans <dje@google.com>
6909
6910 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
6911
6912 2011-05-04 Doug Evans <dje@google.com>
6913
6914 * linux-low.c (linux_join): Skip process lookup.
6915 * spu-low.c (spu_join): Ditto.
6916 * server.c (join_inferiors_callback): Delete.
6917 (process_serial_event): For 'D' packet (detach) call join_inferior
6918 directly.
6919
6920 2011-05-04 Joseph Myers <joseph@codesourcery.com>
6921
6922 * README: Don't mention xscale*-*-linux*.
6923 * configure.srv (xscale*-*-linux*): Don't handle target.
6924
6925 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
6926
6927 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
6928 casting pointers.
6929 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
6930 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
6931 (i386_emit_void_call_2): Likewise.
6932
6933 2011-04-26 Yao Qi <yao@codesourcery.com>
6934
6935 * linux-low.c: Move common macros to linux-ptrace.h.
6936 Include linux-ptrace.h.
6937 * Makefile.in (linux_ptrace_h): New.
6938 (linux-low.o): Depends on linux-ptrace.h.
6939
6940 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
6941
6942 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
6943 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
6944 (remote_prepare): New function with most of the TCP code from ...
6945 (remote_open): ... here. Detect PORT here unconditionally. Move also
6946 setting transport_is_reliable.
6947 * server.c (run_once): New variable.
6948 (gdbserver_usage): Document it.
6949 (main): Set run_once for `--once'. Call remote_prepare. Exit after
6950 the first run if RUN_ONCE.
6951 * server.h (run_once, remote_prepare): New declarations.
6952
6953 2011-04-19 Tom Tromey <tromey@redhat.com>
6954
6955 * win32-low.c (handle_load_dll): Remove duplicate "the".
6956
6957 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
6958
6959 Remove support for old Cygwin 1.5 versions.
6960 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
6961 function to avoid warning.
6962 (win32_add_one_solib): Use cygwin_conv_path function to avoid
6963 warning.
6964
6965 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
6966
6967 * gdbserver/server.h (Macro _): Define it if not available.
6968
6969 2011-03-14 Michael Snyder <msnyder@vmware.com>
6970
6971 * hostio.c (handle_close): Remove unnecessary null test.
6972
6973 2011-03-10 Joel Brobecker <brobecker@adacore.com>
6974
6975 * Makefile.in (maintainer-clean realclean distclean): Remove
6976 "make ... subdir_do" command.
6977
6978 2011-03-10 Michael Snyder <msnyder@vmware.com>
6979
6980 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
6981
6982 * server.c (handle_v_run): Free alloced buffer on early return.
6983
6984 2011-03-09 Yao Qi <yao@codesourcery.com>
6985
6986 Revert:
6987 2011-03-04 Yao Qi <yao@codesourcery.com>
6988
6989 * Makefile.in: Remove GNU make feature --directory.
6990
6991 2011-03-05 Yao Qi <yao@codesourcery.com>
6992
6993 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
6994 (subdir_do): New make target. Copied from gdb/Makefile.
6995 (maintainer-clean, realclean, distclean, clean): Call corresponding
6996 make targets in common/Makefile.
6997
6998 2011-02-11 Yao Qi <yao@codesourcery.com>
6999
7000 * configure.ac: Call AC_PROG_RANLIB.
7001 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
7002 * configure: Regenerate.
7003
7004 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7005
7006 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
7007
7008 2011-03-06 Yao Qi <yao@codesourcery.com>
7009
7010 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
7011
7012 2011-03-05 Yao Qi <yao@codesourcery.com>
7013
7014 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
7015 (subdir_do): New make target. Copied from gdb/Makefile.
7016 (maintainer-clean, realclean, distclean, clean): Call corresponding
7017 make targets in common/Makefile.
7018
7019 2011-03-04 Yao Qi <yao@codesourcery.com>
7020
7021 * Makefile.in: Remove GNU make feature --directory.
7022
7023 2011-03-04 Michael Snyder <msnyder@vmware.com>
7024
7025 * server.c (queue_stop_reply): Call xmalloc not malloc.
7026
7027 2011-03-02 Michael Snyder <msnyder@vmware.com>
7028
7029 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
7030
7031 2011-02-28 Michael Snyder <msnyder@vmware.com>
7032
7033 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
7034 (cmd_qtframe): Ditto.
7035 (cmd_qtbuffer): Ditto.
7036 (cmd_bigqtbuffer): Ditto.
7037
7038 * utils.c (decimal2str): Initialize 'width' to nine, then
7039 don't mess with it.
7040
7041 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
7042
7043 * hostio.c (require_data): Free *data, not data.
7044
7045 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7046
7047 * hostio.c (require_data): Use free, not xfree.
7048
7049 2011-02-27 Michael Snyder <msnyder@vmware.com>
7050
7051 * server.c (handle_query): Discard unused value.
7052
7053 * hostio.c (require_data): Free malloc memory before returning
7054 error.
7055
7056 2011-02-26 Michael Snyder <msnyder@vmware.com>
7057
7058 * linux-low.c (list_threads): Call closedir for dirent.
7059
7060 2011-02-27 Michael Snyder <msnyder@vmware.com>
7061
7062 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
7063 a case statement falls through.
7064
7065 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
7066
7067 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
7068 in comparison.
7069
7070 2011-02-26 Michael Snyder <msnyder@vmware.com>
7071
7072 * utils.c (decimal2str): Eliminate dead code and dead param.
7073 (pulongest): Drop dead param from call to decimal2str.
7074 (plongest): Ditto.
7075
7076 2011-02-24 Joel Brobecker <brobecker@adacore.com>
7077
7078 Revert the following patch (not approved yet):
7079 2011-02-21 Hui Zhu <teawater@gmail.com>
7080 * tracepoint.c (tp_printf): New function.
7081 (eval_agent_expr): Handle gdb_agent_op_printf.
7082
7083 2011-02-21 Hui Zhu <teawater@gmail.com>
7084
7085 * tracepoint.c (tp_printf): New function.
7086 (eval_agent_expr): Handle gdb_agent_op_printf.
7087
7088 2011-02-18 Tom Tromey <tromey@redhat.com>
7089
7090 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
7091 (tracepoint.o): Likewise.
7092 * tracepoint.c (enum gdb_agent_op): Use ax.def.
7093 (gdb_agent_op_names): Likewise.
7094
7095 2011-02-18 Tom Tromey <tromey@redhat.com>
7096
7097 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
7098 gdb_agent_op_rot>: New constants.
7099 (gdb_agent_op_names): Add pick and roll.
7100 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
7101 cases.
7102
7103 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
7104
7105 * aclocal.m4: Regenerated with aclocal-1.11.1.
7106
7107 2011-02-14 Pedro Alves <pedro@codesourcery.com>
7108
7109 * server.c (handle_qxfer_traceframe_info): New.
7110 (qxfer_packets): Register "traceframe-info".
7111 (handle_query): Report support for qXfer:traceframe-info:read+.
7112 * tracepoint.c (match_blocktype): New.
7113 (traceframe_find_block_type): Rename to ...
7114 (traceframe_walk_blocks): ... this. Add callback filter argument,
7115 and use it.
7116 (traceframe_find_block_type): New, reimplemented on top of
7117 traceframe_walk_blocks.
7118 (build_traceframe_info_xml): New.
7119 (traceframe_read_info): New.
7120 * server.h (traceframe_read_info): Declare.
7121
7122 2011-02-11 Yao Qi <yao@codesourcery.com>
7123
7124 * configure.ac: Call AC_PROG_RANLIB.
7125 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
7126 * configure: Regenerate.
7127
7128 2011-02-07 Pedro Alves <pedro@codesourcery.com>
7129
7130 * server.c (gdb_read_memory): Change return semantics to allow
7131 partial transfers.
7132 (handle_search_memory_1): Adjust.
7133 (process_serial_event) <'m' packet>: Handle partial transfers.
7134 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
7135
7136 2011-01-28 Pedro Alves <pedro@codesourcery.com>
7137
7138 * regcache.c (init_register_cache): Initialize
7139 regcache->register_status.
7140 (free_register_cache): Release regcache->register_status.
7141 (regcache_cpy): Copy register_status.
7142 (registers_to_string): Print 'x's for unavailable registers.
7143 (supply_register): Mark the register's status valid or
7144 unavailable, depending on whether a buffer was passed in or not.
7145 (supply_register_zeroed): New.
7146 (supply_regblock): Mark the registers' status valid or
7147 unavailable, depending on whether a buffer was passed in or not.
7148 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
7149 (struct regcache): New `register_status' field.
7150 (supply_register_zeroed): Declare.
7151 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
7152 supply_register_zeroed, rather than passing a NULL buffer to
7153 supply_register.
7154 * tracepoint.c (fetch_traceframe_registers): Update comment.
7155
7156 2011-01-28 Pedro Alves <pedro@codesourcery.com>
7157
7158 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
7159 buffer explicit.
7160
7161 2011-01-25 Pedro Alves <pedro@codesourcery.com>
7162
7163 * server.h (decode_xfer_write): Change prototype.
7164 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
7165 and don't extract the annex here.
7166 * server.c (decode_xfer_read): Remove `annex' parameter,
7167 and don't extract the annex here.
7168 (decode_xfer): New.
7169 (struct qxfer): New.
7170 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
7171 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
7172 (handle_qxfer_statictrace): New functions, abstracted out from
7173 handle_query, and made to use the struct qxfer interface.
7174 (handle_threads_qxfer_proper): Rename to ...
7175 (handle_qxfer_threads_proper): ... this.
7176 (handle_threads_qxfer): Rename to ...
7177 (handle_qxfer_threads): ... this. Adjust.
7178 (qxfer_packets): New array.
7179 (handle_qxfer): New function.
7180 (handle_query): Use handle_qxfer.
7181
7182 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
7183
7184 * gdbreplay.c: Shorten lines of >= 80 columns.
7185 * linux-low.c: Ditto.
7186 * linux-ppc-low.c: Ditto.
7187 * linux-s390-low.c: Ditto.
7188 * linux-sparc-low.c: Ditto.
7189 * linux-x86-low.c: Ditto.
7190 * linux-xtensa-low.c: Ditto.
7191 * mem-break.c: Ditto.
7192 * nto-low.c: Ditto.
7193 * regcache.h: Ditto.
7194 * remote-utils.c: Ditto.
7195 * server.c: Ditto.
7196 * server.h: Ditto.
7197 * thread-db.c: Ditto.
7198 * tracepoint.c: Ditto.
7199 * utils.c: Ditto.
7200 * win32-low.h: Ditto.
7201
7202 2011-01-05 Joel Brobecker <brobecker@adacore.com>
7203
7204 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
7205 update.
7206
7207 2011-01-01 Joel Brobecker <brobecker@adacore.com>
7208
7209 * server.c (gdbserver_version): Update copyright year in version
7210 output.
7211 * gdbreplay.c (gdbreplay_version): Ditto.
7212
7213 2010-12-29 Jie Zhang <jie.zhang@analog.com>
7214
7215 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
7216 * linux-bfin-low.c: New file.
7217 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
7218 PT_DATA_ADDR for BFIN targets.
7219 * Makefile.in (SFILES): Add linux-bfin-low.c.
7220 (clean): Remove reg-bfin.c.
7221 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
7222 * README: Mention supported Blackfin targets.
7223
7224 2010-12-23 Mike Frysinger <vapier@gentoo.org>
7225
7226 * .gitignore: New file.
7227
7228 2010-11-16 Mike Frysinger <vapier@gentoo.org>
7229
7230 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
7231
7232 2010-10-22 Jie Zhang <jie@codesourcery.com>
7233
7234 * Makefile.in: Add FLAGS_TO_PASS variable.
7235 (install): Remove dependency of install-only and recursively
7236 invoke make for install-only.
7237
7238 2010-10-04 Doug Evans <dje@google.com>
7239
7240 * Makefile.in (uninstall): Use $(DESTDIR).
7241
7242 2010-09-24 Pedro Alves <pedro@codesourcery.com>
7243
7244 PR gdb/11842
7245
7246 * linux-x86-low.c (compat_siginfo_from_siginfo)
7247 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
7248 si_code is < 0. Check for si_code == SI_TIMER before checking for
7249 si_code < 0.
7250
7251 2010-09-13 Joel Brobecker <brobecker@adacore.com>
7252
7253 * lynx-i386-low.c: New file.
7254 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
7255
7256 2010-09-13 Joel Brobecker <brobecker@adacore.com>
7257
7258 * lynx-low.c (ptrace_request_to_str): Remove handling for
7259 request values that have been removed in LynxOS 5.x.
7260
7261 2010-09-13 Joel Brobecker <brobecker@adacore.com>
7262
7263 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
7264 <ptrace.h>
7265
7266 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
7267
7268 * configure.ac: Add --enable-inprocess-agent option.
7269 * configure: Rebuilt.
7270
7271 2010-09-06 Yao Qi <yao@codesourcery.com>
7272
7273 * linux-low.c (linux_kill): Remove unused variable.
7274 (linux_stabilize_threads): Likewise.
7275 * server.c (start_inferior): Likewise.
7276 (queue_stop_reply_callback): Likewise.
7277 * tracepoint.c (do_action_at_tracepoint): Likewise.
7278
7279 2010-09-06 Yao Qi <yao@codesourcery.com>
7280
7281 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
7282 on return.
7283
7284 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
7285
7286 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
7287
7288 2010-09-06 Pedro Alves <pedro@codesourcery.com>
7289
7290 * Makefile.in (install-only): Replace $IPA_DEPFILES with
7291 "$(IPA_DEPFILES)".
7292
7293 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7294
7295 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
7296 gdbserver/lynx-ppc-low.c: New files.
7297 * Makefile.in (lynx_low_h): New variable.
7298 (lynx-low.o, lynx-ppc-low.o): New rules.
7299 * configure.ac: On LynxOS, link with -lnetinet.
7300 * configure.srv: Add handling of powerpc-*-lynxos* targets.
7301 * configure: regenerate.
7302
7303 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7304
7305 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
7306 * configure.ac: Add check for vasprintf and vsnprintf.
7307 * configure, config.in: Regenerate.
7308 * server.h (vasprintf, vsnprintf): Add conditional declarations.
7309
7310 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7311
7312 * gdbreplay.c: Move include of alloca.h up, next to include of
7313 malloc.h.
7314 * server.h: Add include of malloc.h.
7315 * mem-break.c: Remove include of malloc.h.
7316 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
7317
7318 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7319
7320 * Makefile.in (memmem.o): Build with -Wno-error.
7321
7322 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7323
7324 * utils.c (xsnprintf): Make non-static.
7325 * server.h: Add xsnprintf declaration.
7326 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
7327 replace calls to snprintf by calls to xsnprintf throughout.
7328
7329 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7330
7331 * configure.ac: Add configure check for alloca.
7332 * configure, config.in: Regenerate.
7333 * server.h: Include alloca.h if it exists.
7334 * gdbreplay.c: Include alloca.h if it exists.
7335
7336 2010-08-28 Pedro Alves <pedro@codesourcery.com>
7337
7338 * linux-low.c (__SIGRTMIN): Define if not already defined.
7339 (linux_create_inferior): Check for __ANDROID__ rather than
7340 __SIGRTMIN.
7341 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
7342 are already deferred.
7343 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
7344 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
7345 stopped and already has a pending signal to report.
7346 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
7347 a pending signal to report or is moving out of a jump pad.
7348 (linux_init_signals): Check for __ANDROID__ rather than
7349 __SIGRTMIN.
7350
7351 2010-08-28 Pedro Alves <pedro@codesourcery.com>
7352
7353 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
7354 debug_threads check. Avoid a linear search when not doing debug
7355 output.
7356
7357 2010-08-27 Pedro Alves <pedro@codesourcery.com>
7358
7359 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
7360 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
7361 (struct file_handler) <fd>: Change type to gdb_fildes_t.
7362 (process_event): Change local fd's type to gdb_fildes_t.
7363 (create_file_handler): Adjust prototype.
7364 (delete_file_handler): Adjust prototype.
7365 (handle_file_event): Adjust prototype. Use pfildes.
7366 (create_file_event): Adjsut prototype.
7367 * remote-utils.c (remote_desc, listen_desc): Change type to
7368 gdb_fildes_t.
7369 * server.h: New gdb_fildes_t typedef.
7370 [USE_WIN32API]: Include winsock2.h.
7371 (delete_file_handler, add_file_handler): Adjust prototypes.
7372 (pfildes): Declare.
7373 * utils.c (pfildes): New.
7374
7375 2010-08-27 Pedro Alves <pedro@codesourcery.com>
7376
7377 * configure.ac (build_warnings): Add -Wno-char-subscripts.
7378 * configure: Regenerate.
7379
7380 2010-08-27 Pedro Alves <pedro@codesourcery.com>
7381
7382 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
7383 (linux_done_accessing_memory): ... this.
7384 (linux_target_ops): Adjust.
7385 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
7386 * nto-low.c (nto_target_ops): Adjust comment.
7387 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
7388 * spu-low.c (spu_target_ops): Adjust comment.
7389 * target.h (target_ops): Rename unprepare_to_access_memory field
7390 to done_accessing_memory.
7391 (unprepare_to_access_memory): Rename to ...
7392 (done_accessing_memory): ... this.
7393
7394 2010-08-26 Pedro Alves <pedro@codesourcery.com>
7395
7396 * linux-low.c (linux_prepare_to_access_memory): New.
7397 (linux_unprepare_to_access_memory): New.
7398 (linux_target_ops): Install them.
7399 * server.c (read_memory): Rename to ...
7400 (gdb_read_memory): ... this. Use
7401 prepare_to_access_memory/prepare_to_access_memory.
7402 (write_memory): Rename to ...
7403 (gdb_write_memory): ... this. Use
7404 prepare_to_access_memory/prepare_to_access_memory.
7405 (handle_search_memory_1): Adjust.
7406 (process_serial_event): Adjust.
7407 * target.h (struct target_ops): New fields
7408 prepare_to_access_memory and unprepare_to_access_memory.
7409 (prepare_to_access_memory, unprepare_to_access_memory): New.
7410 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
7411 prepare_to_access_memory/prepare_to_access_memory.
7412 * nto-low.c (nto_target_ops): Adjust.
7413 * spu-low.c (spu_target_ops): Adjust.
7414 * win32-low.c (win32_target_ops): Adjust.
7415
7416 2010-08-26 Pedro Alves <pedro@codesourcery.com>
7417
7418 * Makefile.in (WARN_CFLAGS): Get it from configure.
7419 (WERROR_CFLAGS): New.
7420 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
7421 * configure.ac: Introduce --enable-werror, which adds -Werror to
7422 the compiler command line. Enabled by default. Disable with
7423 --disable-werror. Add -Wdeclaration-after-statement
7424 Wpointer-arith and -Wformat-nonliteral to warning flags.
7425 * configure: Regenerate.
7426
7427 2010-08-26 Pedro Alves <pedro@codesourcery.com>
7428
7429 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
7430
7431 2010-08-26 Pedro Alves <pedro@codesourcery.com>
7432
7433 * gdbreplay.c (remote_error): New.
7434 (gdbchar): New.
7435 (expect): Use gdbchar. Check for error reading from GDB.
7436 Clarify sync error output.
7437 (play): Check for errors writing to GDB.
7438 * linux-low.c (sigchld_handler): Really ignore `write' errors.
7439 * remote-utils.c (getpkt): Check for errors writing to the remote
7440 descriptor.
7441
7442 2010-08-25 Pedro Alves <pedro@codesourcery.com>
7443
7444 * linux-low.c (linux_wait_1): Move non-debugging code out of
7445 `debug_threads' control.
7446
7447 2010-08-25 Pedro Alves <pedro@codesourcery.com>
7448
7449 * linux-low.c (linux_wait_1): Don't set last_status here.
7450 * server.c (push_event, queue_stop_reply_callback): Assert we're
7451 not pushing a TARGET_WAITKIND_IGNORE event.
7452 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
7453 (myresume, handle_target_event): Set the thread's last_resume_kind
7454 and last_status from the target returned status.
7455
7456 2010-08-25 Pedro Alves <pedro@codesourcery.com>
7457
7458 PR threads/10729
7459
7460 * linux-x86-low.c (update_debug_registers_callback): New.
7461 (i386_dr_low_set_addr): Use it.
7462 (i386_dr_low_get_addr): New.
7463 (i386_dr_low_set_control): Use update_debug_registers_callback.
7464 (i386_dr_low_get_control): New.
7465 (i386_dr_low_get_status): Adjust.
7466 * linux-low.c (linux_stop_lwp): New.
7467 * linux-low.h (linux_stop_lwp): Declare.
7468
7469 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
7470 argument instead of a i386_debug_reg_state.
7471 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
7472 a i386_debug_reg_state.
7473 (i386_insert_aligned_watchpoint): Adjust.
7474 (i386_remove_aligned_watchpoint): Adjust.
7475 (i386_low_stopped_data_address): Read the debug registers from the
7476 inferior instead of from the mirrors.
7477 * i386-low.h (struct i386_debug_reg_state): Extend comment.
7478 (i386_dr_low_get_addr): Declare.
7479 (i386_dr_low_get_control): Declare.
7480 (i386_dr_low_get_status): Change prototype.
7481
7482 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
7483 (i386_dr_low_get_addr): New.
7484 (i386_dr_low_get_control): New.
7485 (i386_dr_low_get_status): Adjust prototype. Return
7486 dr_status_mirror.
7487 (i386_initial_stuff): Clear dr_status_mirror and
7488 dr_control_mirror.
7489 (i386_get_thread_context): Adjust.
7490 (i386_set_thread_context): Adjust.
7491 (i386_thread_added): Adjust.
7492
7493 2010-08-24 Pedro Alves <pedro@codesourcery.com>
7494
7495 * linux-low.h (linux_thread_area): Delete declaration.
7496
7497 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
7498
7499 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
7500 after its termination.
7501
7502 2010-08-09 Pedro Alves <pedro@codesourcery.com>
7503
7504 * linux-low.c (gdb_wants_lwp_stopped): Delete.
7505 (gdb_wants_all_stopped): Delete.
7506 (linux_wait_1): Don't call them.
7507 * server.c (handle_v_cont): Tag all threads as want-stopped.
7508 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
7509 stopped as "client-wants-stopped".
7510
7511 2010-07-31 Pedro Alves <pedro@codesourcery.com>
7512
7513 * Makefile.in (signals_h): New.
7514 (server_h): Depend on it.
7515 (server.o): Don't depend on $(signals_def).
7516 (signals.o): Depend on $(signals_def).
7517
7518 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
7519
7520 * Makefile.in (signals_def): New.
7521 (server_h): Append include/gdb/signals.h and signals_def.
7522 (server.o): Append signals_def.
7523
7524 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
7525
7526 * server.c (handle_target_event): Use target_signal_to_host for
7527 resume_info.sig initialization.
7528 * target.h (struct thread_resume) <sig>: New comment.
7529
7530 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
7531
7532 * server.c (handle_query): strcpy() the returned string from paddress()
7533 instead of sprintf().
7534 * utils.c (paddress): Return phex_nz().
7535
7536 2010-07-07 Joel Brobecker <brobecker@adacore.com>
7537
7538 * server.c (handle_v_cont): Call mourn_inferior if process
7539 just exited.
7540 (myresume): Likewise.
7541
7542 2010-07-01 Pedro Alves <pedro@codesourcery.com>
7543
7544 Static tracepoints, and integration with UST.
7545
7546 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
7547 * mem-break.c (uninsert_all_breakpoints)
7548 (reinsert_all_breakpoints): New.
7549 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
7550 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
7551 (gdb_agent_ust_loaded, helper_thread_id)
7552 (gdb_agent_helper_thread_id): New macros.
7553 (struct ipa_sym_addresses): Add addr_ust_loaded,
7554 addr_helper_thread_id, addr_cmd_buf.
7555 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
7556 (in_process_agent_loaded_ust): New.
7557 (write_e_ust_not_loaded): New.
7558 (maybe_write_ipa_ust_not_loaded): New.
7559 (struct collect_static_trace_data_action): New.
7560 (enum tracepoint_type) <static_tracepoint>: New.
7561 (struct tracepoint) <handle>: Mention static tracepoints.
7562 (struct static_tracepoint_ctx): New.
7563 (CMD_BUF_SIZE): New.
7564 (add_tracepoint_action): Handle static tracepoint actions.
7565 (unprobe_marker_at): New.
7566 (clear_installed_tracepoints): Handle static tracepoints.
7567 (cmd_qtdp): Handle static tracepoints.
7568 (probe_marker_at): New.
7569 (cmd_qtstart): Handle static tracepoints.
7570 (response_tracepoint): Handle static tracepoints.
7571 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
7572 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
7573 (get_context_regcache): Handle static tracepoints.
7574 (do_action_at_tracepoint): Handle static tracepoint actions.
7575 (traceframe_find_block_type): Handle static trace data blocks.
7576 (traceframe_read_sdata): New.
7577 (download_tracepoints): Download static tracepoint actions.
7578 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
7579 (GDB_PROBE_NAME): New.
7580 (ust_ops): New.
7581 (GET_UST_SYM): New.
7582 (USTF): New.
7583 (dlsym_ust): New.
7584 (ust_marker_to_static_tracepoint): New.
7585 (gdb_probe): New.
7586 (collect_ust_data_at_tracepoint): New.
7587 (gdb_ust_probe): New.
7588 (UNIX_PATH_MAX, SOCK_DIR): New.
7589 (gdb_ust_connect_sync_socket): New.
7590 (resume_thread, stop_thread): New.
7591 (run_inferior_command): New.
7592 (init_named_socket): New.
7593 (gdb_ust_socket_init): New.
7594 (cstr_to_hexstr): New.
7595 (next_st): New.
7596 (first_marker, next_marker): New.
7597 (response_ust_marker): New.
7598 (cmd_qtfstm, cmd_qtsstm): New.
7599 (unprobe_marker_at, probe_marker_at): New.
7600 (cmd_qtstmat, gdb_ust_thread): New.
7601 (gdb_ust_init): New.
7602 (initialize_tracepoint_ftlib): Call gdb_ust_init.
7603 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
7604 (ST_REGENTRY): New.
7605 (x86_64_st_collect_regmap): New.
7606 (X86_64_NUM_ST_COLLECT_GREGS): New.
7607 (AMD64_RIP_REGNUM): New.
7608 (supply_static_tracepoint_registers): New.
7609 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
7610 (ST_REGENTRY): New.
7611 (i386_st_collect_regmap): New.
7612 (i386_NUM_ST_COLLECT_GREGS): New.
7613 (supply_static_tracepoint_registers): New.
7614 * server.c (handle_query): Handle qXfer:statictrace:read.
7615 <qSupported>: Report support for StaticTracepoints, and
7616 qXfer:statictrace:read features.
7617 * server.h (traceframe_read_sdata)
7618 (supply_static_tracepoint_registers): Declare.
7619 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
7620 (unpack_varlen_hex): Include in IPA build.
7621 * Makefile.in (ustlibs, ustinc): New.
7622 (IPA_OBJS): Add remote-utils-ipa.o.
7623 ($(IPA_LIB)): Link -ldl and -lpthread.
7624 (UST_CFLAGS): New.
7625 (IPAGENT_CFLAGS): Add UST_CFLAGS.
7626 * config.in, configure: Regenerate.
7627
7628 2010-06-20 Ian Lance Taylor <iant@google.com>
7629 Pedro Alves <pedro@codesourcery.com>
7630
7631 * linux-x86-low.c (always_true): Delete.
7632 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
7633 trying to fool the compiler with always_true.
7634
7635 2010-06-20 Pedro Alves <pedro@codesourcery.com>
7636
7637 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
7638 conditions in gdbserver.
7639
7640 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
7641
7642 * spu-low.c (spu_read_memory): Wrap around local store limit.
7643 (spu_write_memory): Likewise.
7644
7645 2010-06-15 Pedro Alves <pedro@codesourcery.com>
7646
7647 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
7648 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
7649 LONGEST uses.
7650 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
7651 uses.
7652 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
7653 uses with LONGEST uses.
7654
7655 2010-06-14 Stan Shebs <stan@codesourcery.com>
7656 Pedro Alves <pedro@codesourcery.com>
7657
7658 Bytecode compiler.
7659
7660 * linux-x86-low.c: Include limits.h.
7661 (add_insns): New.
7662 (always_true): New.
7663 (EMIT_ASM): New.
7664 (EMIT_ASM32): New.
7665 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
7666 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
7667 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
7668 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
7669 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
7670 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
7671 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
7672 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
7673 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
7674 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
7675 (amd64_emit_void_call_2): New.
7676 (amd64_emit_ops): New.
7677 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
7678 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
7679 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
7680 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
7681 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
7682 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
7683 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
7684 (i386_emit_call, i386_emit_reg, i386_emit_pop)
7685 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
7686 (i386_emit_stack_adjust, i386_emit_int_call_1)
7687 (i386_emit_void_call_2): New.
7688 (i386_emit_ops): New.
7689 (x86_emit_ops): New.
7690 (the_low_target): Install x86_emit_ops.
7691 * server.h (struct emit_ops): New.
7692 (get_raw_reg_func_addr): Declare.
7693 (current_insn_ptr, emit_error): Declare.
7694 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
7695 (set_trace_state_variable_value): New defines.
7696 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
7697 addr_get_trace_state_variable_value and
7698 addr_set_trace_state_variable_value.
7699 (symbol_list): New fields for get_raw_reg,
7700 get_trace_state_variable_value and set_trace_state_variable_value.
7701 (condfn): New typedef.
7702 (struct tracepoint): New field `compiled_cond'.
7703 (do_action_at_tracepoint): Clear compiled_cond.
7704 (get_trace_state_variable_value, set_trace_state_variable_value):
7705 Export in the IPA.
7706 (condition_true_at_tracepoint): If there's a compiled condition,
7707 run that.
7708 (current_insn_ptr, emit_error): New globals.
7709 (struct bytecode_address): New.
7710 (get_raw_reg_func_addr): New.
7711 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
7712 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
7713 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
7714 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
7715 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
7716 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
7717 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
7718 (compile_tracepoint_condition, compile_bytecodes): New.
7719 * target.h (emit_ops): Forward declare.
7720 (struct target_ops): New field emit_ops.
7721 (target_emit_ops): New.
7722 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
7723 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
7724 * linux-low.c (linux_emit_ops): New.
7725 (linux_target_ops): Install it.
7726 * linux-low.h (struct linux_target_ops): New field emit_ops.
7727
7728 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
7729
7730 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
7731 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
7732
7733 2010-06-01 Pedro Alves <pedro@codesourcery.com>
7734 Stan Shebs <stan@codesourcery.com>
7735
7736 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
7737 (all): Depend on $(extra_libraries).
7738 (install-only): Install the IPA.
7739 (IPA_OBJS, IPA_LIB): New.
7740 (clean): Remove the IPA lib.
7741 (IPAGENT_CFLAGS): New.
7742 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
7743 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
7744 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
7745 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
7746 * configure.ac: Check for atomic builtins support in the compiler.
7747 (IPA_DEPFILES, extra_libraries): Define.
7748 * configure.srv (ipa_obj): Add description.
7749 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
7750 (i[34567]86-*-linux*): Set ipa_obj.
7751 (x86_64-*-linux*): Set ipa_obj.
7752 * linux-low.c (stabilizing_threads): New.
7753 (supports_fast_tracepoints): New.
7754 (linux_detach): Stabilize threads before detaching.
7755 (handle_tracepoints): Handle internal tracing breakpoints. Assert
7756 the lwp is either not stabilizing, or is moving out of a jump pad.
7757 (linux_fast_tracepoint_collecting): New.
7758 (maybe_move_out_of_jump_pad): New.
7759 (enqueue_one_deferred_signal): New.
7760 (dequeue_one_deferred_signal): New.
7761 (linux_wait_for_event_1): If moving out of a jump pad, defer
7762 pending signals to later.
7763 (linux_stabilize_threads): New.
7764 (linux_wait_1): Check if threads need moving out of jump pads, and
7765 do it if so.
7766 (stuck_in_jump_pad_callback): New.
7767 (move_out_of_jump_pad_callback): New.
7768 (lwp_running): New.
7769 (linux_resume_one_lwp): Handle moving out of jump pads.
7770 (linux_set_resume_request): Dequeue deferred signals.
7771 (need_step_over_p): Also step over fast tracepoint jumps.
7772 (start_step_over): Also uninsert fast tracepoint jumps.
7773 (finish_step_over): Also reinsert fast tracepoint jumps.
7774 (linux_install_fast_tracepoint_jump): New.
7775 (linux_target_ops): Install linux_stabilize_threads and
7776 linux_install_fast_tracepoint_jump_pad.
7777 * linux-low.h (linux_target_ops) <get_thread_area,
7778 install_fast_tracepoint_jump_pad>: New fields.
7779 (struct lwp_info) <collecting_fast_tracepoint,
7780 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
7781 (linux_get_thread_area): Declare.
7782 * linux-x86-low.c (jump_insn): New.
7783 (x86_get_thread_area): New.
7784 (append_insns): New.
7785 (push_opcode): New.
7786 (amd64_install_fast_tracepoint_jump_pad): New.
7787 (i386_install_fast_tracepoint_jump_pad): New.
7788 (x86_install_fast_tracepoint_jump_pad): New.
7789 (the_low_target): Install x86_get_thread_area and
7790 x86_install_fast_tracepoint_jump_pad.
7791 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
7792 (struct fast_tracepoint_jump): New.
7793 (fast_tracepoint_jump_insn): New.
7794 (fast_tracepoint_jump_shadow): New.
7795 (find_fast_tracepoint_jump_at): New.
7796 (fast_tracepoint_jump_here): New.
7797 (delete_fast_tracepoint_jump): New.
7798 (set_fast_tracepoint_jump): New.
7799 (uninsert_fast_tracepoint_jumps_at): New.
7800 (reinsert_fast_tracepoint_jumps_at): New.
7801 (set_breakpoint_at): Use write_inferior_memory.
7802 (uninsert_raw_breakpoint): Use write_inferior_memory.
7803 (check_mem_read): Mask out fast tracepoint jumps.
7804 (check_mem_write): Mask out fast tracepoint jumps.
7805 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
7806 (set_fast_tracepoint_jump): Declare.
7807 (delete_fast_tracepoint_jump)
7808 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
7809 (reinsert_fast_tracepoint_jumps_at): Declare.
7810 * regcache.c: Don't compile many functions when building the
7811 in-process agent library.
7812 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
7813 the register buffer in the heap.
7814 (free_register_cache): If the register buffer isn't owned by the
7815 regcache, don't free it.
7816 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
7817 pre-existing register caches.
7818 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
7819 type.
7820 (convert_ascii_to_int): : Constify `from' parameter type.
7821 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
7822 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
7823 the needed buffer in-place.
7824 (relocate_instruction): New.
7825 * server.c (handle_query) <qSymbols>: If the target supports
7826 tracepoints, give it a chance of looking up symbols. Report
7827 support for fast tracepoints.
7828 (handle_status): Stabilize threads.
7829 (process_serial_event): Adjust.
7830 * server.h (struct fast_tracepoint_jump): Forward declare.
7831 (struct process_info) <fast_tracepoint_jumps>: New field.
7832 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
7833 (decode_X_packet, decode_M_packet): Adjust.
7834 (relocate_instruction): Declare.
7835 (in_process_agent_loaded): Declare.
7836 (tracepoint_look_up_symbols): Declare.
7837 (struct fast_tpoint_collect_status): Declare.
7838 (fast_tracepoint_collecting): Declare.
7839 (force_unlock_trace_buffer): Declare.
7840 (handle_tracepoint_bkpts): Declare.
7841 (initialize_low_tracepoint)
7842 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
7843 * target.h (struct target_ops) <stabilize_threads,
7844 install_fast_tracepoint_jump_pad>: New fields.
7845 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
7846 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
7847 [HAVE_STDINT_H]: Include stdint.h.
7848 (trace_debug_1): Rename to ...
7849 (trace_vdebug): ... this.
7850 (trace_debug): Rename to ...
7851 (trace_debug_1): ... this. Add `level' parameter.
7852 (trace_debug): New.
7853 (ATTR_USED, ATTR_NOINLINE): New.
7854 (IP_AGENT_EXPORT): New.
7855 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
7856 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
7857 (about_to_request_buffer_space, trace_buffer_is_full)
7858 (stopping_tracepoint, expr_eval_result, error_tracepoint)
7859 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
7860 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
7861 (traceframe_write_count, traceframes_created)
7862 (trace_state_variables)
7863 New renaming defines.
7864 (struct ipa_sym_addresses): New.
7865 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
7866 (symbol_list): New.
7867 (ipa_sym_addrs): New.
7868 (all_tracepoint_symbols_looked_up): New.
7869 (in_process_agent_loaded): New.
7870 (write_e_ipa_not_loaded): New.
7871 (maybe_write_ipa_not_loaded): New.
7872 (tracepoint_look_up_symbols): New.
7873 (debug_threads) [IN_PROCESS_AGENT]: New.
7874 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
7875 (UNKNOWN_SIDE_EFFECTS): New.
7876 (stop_tracing): New.
7877 (flush_trace_buffer): New.
7878 (stop_tracing_bkpt): New.
7879 (flush_trace_buffer_bkpt): New.
7880 (read_inferior_integer): New.
7881 (read_inferior_uinteger): New.
7882 (read_inferior_data_pointer): New.
7883 (write_inferior_data_pointer): New.
7884 (write_inferior_integer): New.
7885 (write_inferior_uinteger): New.
7886 (struct collect_static_trace_data_action): Delete.
7887 (enum tracepoint_type): New.
7888 (struct tracepoint) <type>: New field `type'.
7889 <actions_str, step_actions, step_actions_str>: Only include in
7890 GDBserver.
7891 <orig_size, obj_addr_on_target, adjusted_insn_addr>
7892 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
7893 (tracepoints): Use IP_AGENT_EXPORT.
7894 (last_tracepoint): Don't include in the IPA.
7895 (stopping_tracepoint): Use IP_AGENT_EXPORT.
7896 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
7897 (alloced_trace_state_variables): New.
7898 (trace_state_variables): Use IP_AGENT_EXPORT.
7899 (traceframe_t): Delete unused variable.
7900 (circular_trace_buffer): Don't include in the IPA.
7901 (trace_buffer_start): Delete.
7902 (struct trace_buffer_control): New.
7903 (trace_buffer_free): Delete.
7904 (struct ipa_trace_buffer_control): New.
7905 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
7906 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
7907 New.
7908 (trace_buffer_ctrl): New.
7909 (TRACE_BUFFER_CTRL_CURR): New.
7910 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
7911 Reimplement as macros.
7912 (trace_buffer_wrap): Delete.
7913 (traceframe_write_count, traceframe_read_count)
7914 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
7915 (struct tracepoint_hit_ctx) <type>: New field.
7916 (struct fast_tracepoint_ctx): New.
7917 (memory_barrier): New.
7918 (cmpxchg): New.
7919 (record_tracepoint_error): Update atomically in the IPA.
7920 (clear_inferior_trace_buffer): New.
7921 (about_to_request_buffer_space): New.
7922 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
7923 updating the same buffer.
7924 (add_tracepoint): Default the tracepoint's type to trap
7925 tracepoint, and orig_size to -1.
7926 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
7927 internal variables.
7928 (create_trace_state_variable): New parameter `gdb'. Handle it.
7929 (clear_installed_tracepoints): Clear fast tracepoint jumps.
7930 (cmd_qtdp): Handle fast tracepoints.
7931 (cmd_qtdv): Adjust.
7932 (max_jump_pad_size): New.
7933 (gdb_jump_pad_head): New.
7934 (get_jump_space_head): New.
7935 (claim_jump_space): New.
7936 (sort_tracepoints): New.
7937 (MAX_JUMP_SIZE): New.
7938 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
7939 IPA.
7940 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
7941 support. Upload fast traceframes, and delete internal IPA
7942 breakpoints.
7943 (stop_tracing_handler): New.
7944 (flush_trace_buffer_handler): New.
7945 (cmd_qtstop): Upload fast tracepoints.
7946 (response_tracepoint): Handle fast tracepoints.
7947 (tracepoint_finished_step): Upload fast traceframes. Set the
7948 tracepoint hit context's tracepoint type.
7949 (handle_tracepoint_bkpts): New.
7950 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
7951 type. Add comment about fast tracepoints.
7952 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
7953 non-existing action_str field.
7954 (get_context_regcache): Handle fast tracepoints.
7955 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
7956 to the regcache.
7957 (fast_tracepoint_from_jump_pad_address): New.
7958 (fast_tracepoint_from_ipa_tpoint_address): New.
7959 (collecting_t): New.
7960 (force_unlock_trace_buffer): New.
7961 (fast_tracepoint_collecting): New.
7962 (collecting): New.
7963 (gdb_collect): New.
7964 (write_inferior_data_ptr): New.
7965 (target_tp_heap): New.
7966 (target_malloc): New.
7967 (download_agent_expr): New.
7968 (UALIGN): New.
7969 (download_tracepoints): New.
7970 (download_trace_state_variables): New.
7971 (upload_fast_traceframes): New.
7972 (IPA_FIRST_TRACEFRAME): New.
7973 (IPA_NEXT_TRACEFRAME_1): New.
7974 (IPA_NEXT_TRACEFRAME): New.
7975 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
7976 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
7977 (gdb_jump_pad_buffer_end): New.
7978 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
7979 (initialize_tracepoint): Adjust.
7980 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
7981 buffer. Initialize the low module.
7982 * utils.c (PREFIX, TOOLNAME): New.
7983 (malloc_failure): Use PREFIX.
7984 (error): In the IPA, an error causes an exit.
7985 (fatal, warning): Use PREFIX.
7986 (internal_error): Use TOOLNAME.
7987 (NUMCELLS): Increase to 10.
7988 * configure, config.in: Regenerate.
7989
7990 2010-06-01 Pedro Alves <pedro@codesourcery.com>
7991
7992 * server.c (handle_query) <qSupported>: Do two passes over the
7993 qSupported string to avoid nesting strtok.
7994
7995 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7996
7997 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
7998 (CDEPS): New.
7999 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
8000 -Wl,--dynamic-list.
8001 * configure: Regenerate.
8002 * proc-service.list: New.
8003
8004 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8005
8006 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
8007 New comment.
8008
8009 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
8010
8011 * gdbreplay.c (remote_open): Check error return from socket() call by
8012 its equality to -1 not by it being negative.
8013 * remote-utils.c (remote_open): Likewise.
8014
8015 2010-05-23 Pedro Alves <pedro@codesourcery.com>
8016
8017 * config.h: Regenerate.
8018
8019 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
8020
8021 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
8022 doesn't provide PTRACE_GET_THREAD_AREA.
8023
8024 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
8025
8026 * linux-m68k-low.c: Include <asm/ptrace.h>
8027 (ps_get_thread_area): Implement.
8028
8029 2010-05-03 Doug Evans <dje@google.com>
8030
8031 * event-loop.c (struct callback_event): New struct.
8032 (callback_list): New global.
8033 (append_callback_event, delete_callback_event): New functions.
8034 (process_callback): New function.
8035 (start_event_loop): Call it.
8036 * remote-utils.c (NOT_SCHEDULED): Define.
8037 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
8038 moved out of readchar.
8039 (readchar): Rewrite. Call reschedule before returning.
8040 (reset_readchar): New function.
8041 (remote_close): Call it.
8042 (process_remaining, reschedule): New functions.
8043 * server.h (callback_handler_func): New typedef.
8044 (append_callback_event, delete_callback_event): Declare.
8045
8046 2010-05-03 Pedro Alves <pedro@codesourcery.com>
8047
8048 * proc-service.c (ps_pglobal_lookup): Use
8049 thread_db_look_up_one_symbol.
8050 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
8051 parameter. Use it instead of all_symbols_looked_up.
8052 * server.h (struct process_info) <all_symbols_looked_up>: Delete
8053 field.
8054 (all_symbols_looked_up): Don't declare.
8055 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
8056 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
8057 field.
8058 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
8059 Set all_symbols_looked_up here.
8060 (thread_db_look_up_one_symbol): New.
8061 (thread_db_get_tls_address): Adjust.
8062 (thread_db_load_search, try_thread_db_load_1): Always allocate the
8063 thread_db object on the heap, and tentatively set it in the
8064 process structure.
8065 (thread_db_init): Don't set all_symbols_looked_up here.
8066 * linux-low.h (thread_db_look_up_one_symbol): Declare.
8067
8068 2010-05-03 Pedro Alves <pedro@codesourcery.com>
8069
8070 * linux-low.c (linux_kill, linux_detach): Adjust.
8071 (status_pending_p_callback): Remove redundant statement. Check
8072 for !TARGET_WAITIKIND_IGNORE, instead of
8073 TARGET_WAITKIND_STOPPED.
8074 (handle_tracepoints): Make sure LWP is locked. Adjust.
8075 (linux_wait_for_event_1): Adjust.
8076 (linux_cancel_breakpoints): New.
8077 (unsuspend_one_lwp): New.
8078 (unsuspend_all_lwps): New.
8079 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
8080 (send_sigstop_callback): Change return type to int, add new
8081 `except' parameter and handle it.
8082 (suspend_and_send_sigstop_callback): New.
8083 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
8084 pass them down. If SUSPEND, also increment the lwp's suspend
8085 count.
8086 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
8087 (need_step_over_p): Don't consider suspended LWPs.
8088 (start_step_over): Adjust.
8089 (proceed_one_lwp): Change return type to int, add new `except'
8090 parameter and handle it.
8091 (unsuspend_and_proceed_one_lwp): New.
8092 (proceed_all_lwps): Use find_inferior instead of
8093 for_each_inferior.
8094 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
8095 also decrement the suspend count of LWPs. Pass `except' down,
8096 instead of hacking its suspend count.
8097 (linux_pause_all): Add `freeze' parameter. Adjust.
8098 (linux_unpause_all): New.
8099 (linux_target_ops): Install linux_unpause_all.
8100 * server.c (handle_status): Adjust.
8101 * target.h (struct target_ops): New fields `unpause_all' and
8102 `cancel_breakpoints'. Add new parameter to `pause_all'.
8103 (pause_all): Add new `freeze' parameter.
8104 (unpause_all): New.
8105 (cancel_breakpoints): New.
8106 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
8107 cancel breakpoints.
8108 (cmd_qtstart): Pause threads.
8109 (stop_tracing): Pause threads, and cancel breakpoints.
8110 * win32-low.c (win32_target_ops): Adjust.
8111
8112 2010-05-03 Pedro Alves <pedro@codesourcery.com>
8113
8114 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
8115 the inferior right away from here...
8116 (linux_wait_1): ... to here, and adjust to check the thread's
8117 last_resume_kind instead of the lwp's step or stop_expected flags.
8118
8119 2010-05-02 Pedro Alves <pedro@codesourcery.com>
8120
8121 * README: Use consistent `GDB' and `GDBserver' spellings.
8122
8123 2010-05-02 Pedro Alves <pedro@codesourcery.com>
8124
8125 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
8126 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
8127 (linux_detach_one_lwp): Assume the lwp is stopped.
8128 (any_thread_of): Delete.
8129 (linux_detach): Stop all lwps here. Don't blindly delete all
8130 breakpoints.
8131 (delete_lwp_callback): New.
8132 (linux_mourn): Delete all lwps of the process that is gone.
8133 (linux_wait_1): Don't delete the last lwp of the process here.
8134 * mem-break.h (mark_breakpoints_out): Declare.
8135 * mem-break.c (mark_breakpoints_out): New.
8136 (free_all_breakpoints): Use it.
8137 * server.c (handle_target_event): If the process is gone, mark
8138 breakpoints out.
8139 * thread-db.c (struct thread_db) <create_bp>: New field.
8140 (thread_db_enable_reporting): Fix prototype. Store a thread event
8141 breakpoint reference in the thread_db struct.
8142 (thread_db_load_search): Clear the thread_db object.
8143 (try_thread_db_load_1): Ditto.
8144 (switch_to_process): New.
8145 (disable_thread_event_reporting): Use it.
8146 (remove_thread_event_breakpoints): New.
8147 (thread_db_detach, thread_db_mourn): Use it.
8148
8149 2010-05-01 Pedro Alves <pedro@codesourcery.com>
8150
8151 * linux-low.c (linux_enable_event_reporting): New.
8152 (linux_wait_for_event_1, handle_extended_wait): Use it.
8153
8154 2010-04-30 Pedro Alves <pedro@codesourcery.com>
8155
8156 * linux-low.c (linux_kill_one_lwp, linux_kill)
8157 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
8158 (send_sigstop): Take an lwp_info as parameter instead. Queue a
8159 SIGSTOP even if the LWP is stopped.
8160 (send_sigstop_callback): New.
8161 (stop_all_lwps): Use send_sigstop_callback instead.
8162 (linux_resume_one_thread): Adjust.
8163 (proceed_one_lwp): Still proceed an LWP that the client has
8164 requested to stop, if we haven't reported it as stopped yet. Make
8165 sure that LWPs the client want stopped, have a pending SIGSTOP.
8166
8167 2010-04-26 Doug Evans <dje@google.com>
8168
8169 * server.c (handle_general_set): Make static.
8170
8171 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
8172 Print received char after testing for error/eof instead of before.
8173 (input_interrupt): Tweak comment.
8174
8175 2010-04-23 Doug Evans <dje@google.com>
8176
8177 * server.c (start_inferior): Print inferior argv if --debug.
8178
8179 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
8180
8181 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
8182 * nto-x86-low.c: Include server.h
8183
8184 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
8185
8186 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
8187 be consistent with other sources of this directory.
8188 (init_registers_amd64): Correct name of source file of this function
8189 in the comment.
8190
8191 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8192
8193 * configure.srv (x86_64-*-mingw*): New configuration for Windows
8194 64-bit executables.
8195
8196 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8197
8198 * win32-i386-low.c: Add 64-bit support.
8199 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
8200 (init_registers_amd64): Declare.
8201 (mappings): Add 64-bit version of array.
8202 (init_windows_x86): New function.
8203 (the_low_target): Change init_arch field to init_windows_x86.
8204
8205 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8206
8207 * win32-low.c: Adapt to support also 64-bit architecture.
8208 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
8209 (get_image_name): Use SIZE_T type for local variable `done'.
8210 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
8211 (toolhelp_get_dll_name): Idem.
8212 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
8213 Use uintptr_t typecast to avoid warning.
8214 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
8215 (handle_exception): Use phex_nz to avoid warning.
8216 (win32_wait): Remove unused local variable `process'.
8217
8218 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8219
8220 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
8221 `amd64-avx.o'.
8222
8223 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
8224
8225 * configure.ac: Use `ws2_32' library for srv_mingw.
8226 * configure: Regenerate.
8227 * gdbreplay.c: Include winsock2.h instead of winsock.h.
8228 * remote-utils.c: Likewise.
8229
8230 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
8231
8232 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
8233 if __x86_64__ is defined.
8234
8235 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
8236
8237 * configure: Regenerate.
8238
8239 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
8240
8241 * server.c (handle_query): Handle 'qGetTIBAddr' query.
8242 * target.h (target_ops): New get_tib_address field.
8243 * win32-low.h (win32_thread_info): Add thread_local_base field.
8244 * win32-low.c (child_add_thread): Add tlb argument.
8245 Set thread_local_base field to TLB.
8246 (get_child_debug_event): Adapt to child_add_thread change.
8247 (win32_get_tib_address): New function.
8248 (win32_target_ops): Set get_tib_address field to
8249 win32_get_tib_address.
8250 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
8251
8252 2010-04-12 Pedro Alves <pedro@codesourcery.com>
8253
8254 * linux-low.c (linux_mourn): Also remove the process.
8255 * server.c (handle_target_event): Don't remove the process here.
8256 * nto-low.c (nto_mourn): New.
8257 (nto_target_ops): Install it.
8258 * spu-low.c (spu_mourn): New.
8259 (spu_target_ops): Install it.
8260 * win32-low.c (win32_mourn): New.
8261 (win32_target_ops): Install it.
8262
8263 2010-04-12 Pedro Alves <pedro@codesourcery.com>
8264
8265 * server.h (buffer_xml_printf): Remove redundant `;'.
8266
8267 2010-04-12 Pedro Alves <pedro@codesourcery.com>
8268
8269 * regcache.c (set_register_cache): Invalidate regcaches before
8270 changing the register cache layout.
8271 (regcache_invalidate_one): Allow a NULL regcache.
8272 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
8273 regcaches before changing the register cache layout or the target
8274 regsets.
8275
8276 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
8277
8278 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
8279 variable warning on Linux/x86-64.
8280
8281 2010-04-11 Pedro Alves <pedro@codesourcery.com>
8282
8283 GDBserver disconnected tracing support.
8284
8285 * linux-low.c (linux_remove_process): Delete.
8286 (add_lwp): Don't set last_resume_kind here.
8287 (linux_kill): Use `mourn'.
8288 (linux_detach): Use `thread_db_detach', and `mourn'.
8289 (linux_mourn): New.
8290 (linux_attach_lwp_1): Adjust comment.
8291 (linux_attach): last_resume_kind moved the thread_info; adjust.
8292 (status_pending_p_callback): Adjust.
8293 (linux_wait_for_event_1): Adjust.
8294 (count_events_callback, select_singlestep_lwp_callback)
8295 (select_event_lwp_callback, cancel_breakpoints_callback)
8296 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
8297 (proceed_one_lwp): Adjust.
8298 (linux_async): Add debug output.
8299 (linux_thread_stopped): New.
8300 (linux_pause_all): New.
8301 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
8302 linux_pause_all.
8303 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
8304 (thread_db_free): Delete declaration.
8305 (thread_db_detach, thread_db_mourn): Declare.
8306 * thread-db.c (thread_db_init): Use thread_db_mourn.
8307 (thread_db_free): Delete, split in two.
8308 (disable_thread_event_reporting): New.
8309 (thread_db_detach): New.
8310 (thread_db_mourn): New.
8311
8312 * server.h (struct thread_info) <last_resume_kind>: New field.
8313 <attached>: Add comment.
8314 <gdb_detached>: New field.
8315 (handler_func): Change return type to int.
8316 (handle_serial_event, handle_target_event): Ditto.
8317 (gdb_connected): Declare.
8318 (tracing): Delete.
8319 (disconnected_tracing): Declare.
8320 (stop_tracing): Declare.
8321
8322 * server.c (handle_query) <qSupported>: Report support for
8323 disconnected tracing.
8324 (queue_stop_reply_callback): Account for running threads.
8325 (gdb_wants_thread_stopped): New.
8326 (gdb_wants_all_threads_stopped): New.
8327 (gdb_reattached_process): New.
8328 (handle_status): Clear the `gdb_detached' flag of all processes.
8329 In all-stop, stop all threads.
8330 (main): Be sure to leave tfind mode. Handle disconnected tracing.
8331 (process_serial_event): If the remote connection breaks, or if an
8332 exit was forced with "monitor exit", force an event loop exit.
8333 Handle disconnected tracing on detach.
8334 (handle_serial_event): Adjust.
8335 (handle_target_event): If GDB isn't connected, forward events back
8336 to the inferior, unless the last process exited, in which case,
8337 exit gdbserver. Adjust interface.
8338
8339 * remote-utils.c (remote_open): Don't block in accept. Instead
8340 register an event loop source on the listen socket file
8341 descriptor. Refactor bits into ...
8342 (listen_desc): ... this new global.
8343 (gdb_connected): ... this new function.
8344 (enable_async_notification): ... this new function.
8345 (handle_accept_event): ... this new function.
8346 (remote_close): Clear remote_desc.
8347
8348 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
8349
8350 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
8351 New fields.
8352 (mourn_inferior): Define.
8353 (target_process_qsupported): Avoid the dangling else problem.
8354 (thread_stopped): Define.
8355 (pause_all): Define.
8356 (target_waitstatus_to_string): Declare.
8357 * target.c (target_waitstatus_to_string): New.
8358
8359 * tracepoint.c (tracing): Make extern.
8360 (disconnected_tracing): New.
8361 (stop_tracing): Make extern. Handle tracing stops due to GDB
8362 disconnecting.
8363 (cmd_qtdisconnected): New.
8364 (cmd_qtstatus): Report disconnected tracing status in trace reply.
8365 (handle_tracepoint_general_set): Handle QTDisconnected.
8366
8367 * event-loop.c (event_handler_func): Change return type to int.
8368 (process_event): Bail out if the event handler wants the event
8369 loop to stop.
8370 (handle_file_event): Ditto.
8371 (start_event_loop): Bail out if the event handler wants the event
8372 loop to stop.
8373
8374 * nto-low.c (nto_target_ops): Adjust.
8375 * spu-low.c (spu_wait): Don't remove the process here.
8376 (spu_target_ops): Adjust.
8377 * win32-low.c (win32_wait): Don't remove the process here.
8378 (win32_target_ops): Adjust.
8379
8380 2010-04-11 Pedro Alves <pedro@codesourcery.com>
8381
8382 * regcache.c (realloc_register_cache): Invalidate inferior's
8383 regcache before recreating it.
8384
8385 2010-04-09 Pedro Alves <pedro@codesourcery.com>
8386
8387 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
8388
8389 2010-04-09 Stan Shebs <stan@codesourcery.com>
8390 Pedro Alves <pedro@codesourcery.com>
8391
8392 * server.h (LONGEST): New.
8393 (struct thread_info) <while_stepping>: New field.
8394 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
8395 Declare.
8396 (initialize_tracepoint, handle_tracepoint_general_set)
8397 (handle_tracepoint_query, tracepoint_finished_step)
8398 (tracepoint_was_hit, release_while_stepping_state_list):
8399 (current_traceframe): Declare.
8400 * server.c (handle_general_set): Handle tracepoint packets.
8401 (read_memory): New.
8402 (write_memory): New.
8403 (handle_search_memory_1): Use read_memory.
8404 (handle_query): Report support for conditional tracepoints, trace
8405 state variables, and tracepoint sources. Handle tracepoint
8406 queries.
8407 (main): Initialize the tracepoints module.
8408 (process_serial_event): Handle traceframe reads/writes.
8409
8410 * linux-low.c (handle_tracepoints): New.
8411 (linux_wait_1): Call it.
8412 (linux_resume_one_lwp): Handle while-stepping.
8413 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
8414 (linux_target_ops): Install them.
8415 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
8416 New field.
8417 * linux-x86-low.c (x86_supports_tracepoints): New.
8418 (the_low_target). Install it.
8419
8420 * mem-break.h (delete_breakpoint): Declare.
8421 * mem-break.c (delete_breakpoint): Make external.
8422
8423 * target.h (struct target_ops): Add `supports_tracepoints',
8424 `read_pc', and `write_pc' fields.
8425 (target_supports_tracepoints): Define.
8426 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
8427 (phex_nz): New.
8428
8429 * regcache.h (struct regcache) <registers_owned>: New field.
8430 (init_register_cache, regcache_cpy): Declare.
8431 (regcache_read_pc, regcache_write_pc): Declare.
8432 (register_cache_size): Declare.
8433 (supply_regblock): Declare.
8434 * regcache.c (init_register_cache): New.
8435 (new_register_cache): Use it.
8436 (regcache_cpy): New.
8437 (register_cache_size): New.
8438 (supply_regblock): New.
8439 (regcache_read_pc, regcache_write_pc): New.
8440
8441 * tracepoint.c: New.
8442
8443 * Makefile.in (OBS): Add tracepoint.o.
8444 (tracepoint.o): New rule.
8445
8446 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
8447
8448 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
8449 (i386-mmx.o): New.
8450 (i386-mmx.c): Likewise.
8451 (i386-mmx-linux.o): Likewise.
8452 (i386-mmx-linux.c): Likewise.
8453
8454 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
8455 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
8456 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
8457 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
8458
8459 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
8460 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
8461 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
8462
8463 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
8464
8465 * Makefile.in (clean): Updated.
8466 (i386-avx.o): New.
8467 (i386-avx.c): Likewise.
8468 (i386-avx-linux.o): Likewise.
8469 (i386-avx-linux.c): Likewise.
8470 (amd64-avx.o): Likewise.
8471 (amd64-avx.c): Likewise.
8472 (amd64-avx-linux.o): Likewise.
8473 (amd64-avx-linux.c): Likewise.
8474
8475 * configure.srv (srv_i386_regobj): Add i386-avx.o.
8476 (srv_i386_linux_regobj): Add i386-avx-linux.o.
8477 (srv_amd64_regobj): Add amd64-avx.o.
8478 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
8479 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
8480 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
8481 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
8482 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
8483 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
8484 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
8485
8486 * i387-fp.c: Include "i386-xstate.h".
8487 (i387_xsave): New.
8488 (i387_cache_to_xsave): Likewise.
8489 (i387_xsave_to_cache): Likewise.
8490 (x86_xcr0): Likewise.
8491
8492 * i387-fp.h (i387_cache_to_xsave): Likewise.
8493 (i387_xsave_to_cache): Likewise.
8494 (x86_xcr0): Likewise.
8495
8496 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
8497 * linux-crisv32-low.c (target_regsets): Likewise.
8498 * linux-m68k-low.c (target_regsets): Likewise.
8499 * linux-mips-low.c (target_regsets): Likewise.
8500 * linux-ppc-low.c (target_regsets): Likewise.
8501 * linux-s390-low.c (target_regsets): Likewise.
8502 * linux-sh-low.c (target_regsets): Likewise.
8503 * linux-sparc-low.c (target_regsets): Likewise.
8504 * linux-xtensa-low.c (target_regsets): Likewise.
8505
8506 * linux-low.c: Include <sys/uio.h>.
8507 (regsets_fetch_inferior_registers): Support nt_type.
8508 (regsets_store_inferior_registers): Likewise.
8509 (linux_process_qsupported): New.
8510 (linux_target_ops): Add linux_process_qsupported.
8511
8512 * linux-low.h (regset_info): Add nt_type.
8513 (linux_target_ops): Add process_qsupported.
8514
8515 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
8516 and <sys/uio.h>.
8517 (init_registers_i386_avx_linux): New.
8518 (init_registers_amd64_avx_linux): Likewise.
8519 (xmltarget_i386_linux_no_xml): Likewise.
8520 (xmltarget_amd64_linux_no_xml): Likewise.
8521 (PTRACE_GETREGSET): Likewise.
8522 (PTRACE_SETREGSET): Likewise.
8523 (x86_fill_xstateregset): Likewise.
8524 (x86_store_xstateregset): Likewise.
8525 (use_xml): Likewise.
8526 (x86_linux_update_xmltarget): Likewise.
8527 (x86_linux_process_qsupported): Likewise.
8528 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
8529 (x86_arch_setup): Don't call init_registers_amd64_linux nor
8530 init_registers_i386_linux here. Call
8531 x86_linux_update_xmltarget.
8532 (the_low_target): Add x86_linux_process_qsupported.
8533
8534 * server.c (handle_query): Call target_process_qsupported.
8535
8536 * target.h (target_ops): Add process_qsupported.
8537 (target_process_qsupported): New.
8538
8539 2010-04-03 Pedro Alves <pedro@codesourcery.com>
8540
8541 * inferiors.c (add_thread): Set last_status kind to
8542 TARGET_WAITKIND_IGNORE.
8543 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
8544 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
8545 (linux_wait_1): Move `thread' local definition to block that uses
8546 it. Don't NULL initialize `event_child'.
8547 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
8548 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
8549 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
8550
8551 2010-04-01 Pedro Alves <pedro@codesourcery.com>
8552
8553 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
8554 an extended waitstatus, or by a watchpoint.
8555 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
8556 thread was stepping or has been stopped by a watchpoint.
8557
8558 2010-04-01 Pedro Alves <pedro@codesourcery.com>
8559
8560 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
8561 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
8562 of another, then delete the previous, and validate all
8563 breakpoints.
8564 (validate_inserted_breakpoint): New.
8565 (delete_disabled_breakpoints): New.
8566 (validate_breakpoints): New.
8567 (check_mem_read): Validate breakpoints before trusting their
8568 shadow. Delete disabled breakpoints.
8569 (check_mem_write): Validate breakpoints before trusting they
8570 should be inserted. Delete disabled breakpoints.
8571 * mem-break.h (validate_breakpoints):
8572 * server.c (handle_query): Validate breakpoints when we see a
8573 qSymbol query.
8574
8575 2010-04-01 Pedro Alves <pedro@codesourcery.com>
8576
8577 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
8578 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
8579 if we could tell there's a GDB breakpoint at stop_pc.
8580 (need_step_over_p): Don't do a step over if we find a GDB
8581 breakpoint at the resume PC.
8582
8583 * mem-break.c (struct raw_breakpoint): New.
8584 (enum bkpt_type): New type `gdb_breakpoint'.
8585 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
8586 fields. New field `raw'.
8587 (find_raw_breakpoint_at): New.
8588 (set_raw_breakpoint_at): Handle refcounting. Create a raw
8589 breakpoint instead.
8590 (set_breakpoint_at): Adjust.
8591 (delete_raw_breakpoint): New.
8592 (release_breakpoint): New.
8593 (delete_breakpoint): Rename to...
8594 (delete_breakpoint_1): ... this. Add proc parameter. Use
8595 release_breakpoint. Return ENOENT.
8596 (delete_breakpoint): Reimplement.
8597 (find_breakpoint_at): Delete.
8598 (find_gdb_breakpoint_at): New.
8599 (delete_breakpoint_at): Delete.
8600 (set_gdb_breakpoint_at): New.
8601 (delete_gdb_breakpoint_at): New.
8602 (gdb_breakpoint_here): New.
8603 (set_reinsert_breakpoint): Use release_breakpoint.
8604 (uninsert_breakpoint): Rename to ...
8605 (uninsert_raw_breakpoint): ... this.
8606 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
8607 (reinsert_raw_breakpoint): Change parameter type to
8608 raw_breakpoint.
8609 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
8610 instead.
8611 (check_breakpoints): Adjust. Use release_breakpoint.
8612 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
8613 (breakpoint_inserted_here): Ditto.
8614 (check_mem_read): Adjust to iterate over raw breakpoints instead.
8615 Don't trust the breakpoint's shadow if it is not inserted.
8616 (check_mem_write): Adjust to iterate over raw breakpoints instead.
8617 (delete_all_breakpoints): Adjust.
8618 (free_all_breakpoints): Mark all breakpoints as uninserted, and
8619 use delete_breakpoint_1.
8620
8621 * mem-break.h (breakpoints_supported): Delete declaration.
8622 (set_gdb_breakpoint_at): Declare.
8623 (gdb_breakpoint_here): Declare.
8624 (delete_breakpoint_at): Delete.
8625 (delete_gdb_breakpoint_at): Declare.
8626
8627 * server.h (struct raw_breakpoint): Forward declare.
8628 (struct process_info): New field `raw_breakpoints'.
8629
8630 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
8631 breakpoints.
8632
8633 2010-03-24 Pedro Alves <pedro@codesourcery.com>
8634
8635 * linux-low.c (status_pending_p_callback): Fix comment.
8636 (linux_wait_for_event_1): Move most of the internal breakpoint
8637 handling from here...
8638 (linux_wait_1): ... to here.
8639 (count_events_callback): New.
8640 (select_singlestep_lwp_callback): New.
8641 (select_event_lwp_callback): New.
8642 (cancel_breakpoints_callback): New.
8643 (select_event_lwp): New.
8644 (linux_wait_1): Simplify internal breakpoint handling. Give equal
8645 priority to all LWPs that have had events that should be reported
8646 to the client. Cancel breakpoints when about to reporting the
8647 event to the client, not while stopping lwps. No longer cancel
8648 finished single-steps here.
8649 (cancel_finished_single_step): Delete.
8650 (cancel_finished_single_steps): Delete.
8651
8652 2010-03-24 Pedro Alves <pedro@codesourcery.com>
8653
8654 * mem-break.c (enum bkpt_type): New.
8655 (struct breakpoint): New field `type'.
8656 (set_breakpoint_at): Change return type to struct breakpoint
8657 pointer. Set type to `other_breakpoint' by default.
8658 (delete_breakpoint): Rewrite, supporting more than one breakpoint
8659 in the breakpoint list.
8660 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
8661 (reinsert_breakpoint): Rename to ...
8662 (reinsert_raw_breakpoint): ... this.
8663 (reinsert_breakpoints_at): Adjust.
8664 * mem-break.h (struct breakpoint): Declare.
8665 (set_breakpoint_at): Change return type to struct breakpoint
8666 pointer.
8667
8668 2010-03-24 Pedro Alves <pedro@codesourcery.com>
8669
8670 * server.c (handle_query): Assign, not compare.
8671
8672 2010-03-24 Pedro Alves <pedro@codesourcery.com>
8673
8674 Teach linux gdbserver to step-over-breakpoints.
8675
8676 * linux-low.c (can_hardware_single_step): New.
8677 (supports_breakpoints): New.
8678 (handle_extended_wait): If stopping threads, read the stop pc of
8679 the new cloned LWP.
8680 (get_pc): New.
8681 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
8682 low target doesn't support retrieving the PC.
8683 (add_lwp): Set last_resume_kind to resume_continue.
8684 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
8685 (linux_attach): Don't clear stop_expected. Set the lwp's
8686 last_resume_kind to resume_stop.
8687 (linux_detach_one_lwp): Don't check for removed breakpoints.
8688 (check_removed_breakpoint): Delete.
8689 (status_pending_p): Rename to ...
8690 (status_pending_p_callback): ... this. Don't check for removed
8691 breakpoints. Don't consider threads that are stopped from GDB's
8692 perspective.
8693 (linux_wait_for_lwp): Always read the stop_pc here.
8694 (cancel_breakpoint): New.
8695 (step_over_bkpt): New global.
8696 (linux_wait_for_event_1): Implement stepping over breakpoints.
8697 (gdb_wants_lwp_stopped): New.
8698 (gdb_wants_all_stopped): New.
8699 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
8700 single-step traps here. Store the thread's last reported target
8701 wait status.
8702 (send_sigstop): Don't clear stop_expected. Always set it,
8703 instead.
8704 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
8705 (cancel_finished_single_step): New.
8706 (cancel_finished_single_steps): New.
8707 (wait_for_sigstop): Don't cancel finished single-step traps here.
8708 (linux_resume_one_lwp): Don't check for removed breakpoints.
8709 Don't set `step' on non-hardware step archs.
8710 (linux_set_resume_request): Ignore resume_stop requests if already
8711 stopping or stopped. Set the lwp's last_resume_kind.
8712 (resume_status_pending_p): Don't check for removed breakpoints.
8713 (need_step_over_p): New.
8714 (start_step_over): New.
8715 (finish_step_over): New.
8716 (linux_resume_one_thread): Always queue a sigstop for resume_stop
8717 requests. Clear the thread's last reported target waitstatus.
8718 Don't use the `suspended' flag. Don't consider pending breakpoints.
8719 (linux_resume): Start a step-over if necessary.
8720 (proceed_one_lwp): New.
8721 (proceed_all_lwps): New.
8722 (unstop_all_lwps): New.
8723 * linux-low.h (struct lwp_info): Rewrite comment for the
8724 `suspended' flag. Add the `stop_pc' field. Delete the
8725 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
8726 Add `'last_resume_kind' and `need_step_over' fields.
8727 * inferiors.c (struct thread_info): Delete, moved elsewhere.
8728 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
8729 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
8730 (set_raw_breakpoint_at): New.
8731 (set_breakpoint_at): Rewrite to use it.
8732 (reinsert_breakpoint_handler): Delete.
8733 (set_reinsert_breakpoint): New.
8734 (reinsert_breakpoint_by_bp): Delete.
8735 (delete_reinsert_breakpoints): New.
8736 (uninsert_breakpoint): Rewrite.
8737 (uninsert_breakpoints_at): New.
8738 (reinsert_breakpoint): Rewrite.
8739 (reinsert_breakpoints_at): New.
8740 (check_breakpoints): Rewrite.
8741 (breakpoint_here): New.
8742 (breakpoint_inserted_here): New.
8743 (check_mem_read): Adjust.
8744 * mem-break.h (breakpoints_supported, breakpoint_here)
8745 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
8746 (reinsert_breakpoint_by_bp): Delete declaration.
8747 (delete_reinsert_breakpoints): Declare.
8748 (reinsert_breakpoint): Delete declaration.
8749 (reinsert_breakpoints_at): Declare.
8750 (uninsert_breakpoint): Delete declaration.
8751 (uninsert_breakpoints_at): Declare.
8752 (check_breakpoints): Adjust prototype.
8753 * server.h: Adjust include order.
8754 (struct thread_info): Declare here. Add a `last_status' field.
8755
8756 2010-03-23 Michael Snyder <msnyder@vmware.com>
8757
8758 * server.c (crc32): New function.
8759 (handle_query): Add handling for 'qCRC:' request.
8760
8761 2010-03-23 Pedro Alves <pedro@codesourcery.com>
8762
8763 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
8764 lwp had been stopped by a watchpoint.
8765
8766 2010-03-16 Pedro Alves <pedro@codesourcery.com>
8767
8768 * server.h (internal_error): Declare.
8769 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
8770 * utils.c (internal_error): New function.
8771
8772 2010-03-15 Andreas Schwab <schwab@redhat.com>
8773
8774 * configure.srv: Fix typo setting srv_regobj.
8775
8776 2010-03-15 Pedro Alves <pedro@codesourcery.com>
8777
8778 * linux-low.c (fetch_register): Avoid passing a non string literal
8779 format to `error'.
8780 (usr_store_inferior_registers): Ditto.
8781
8782 2010-03-14 Pedro Alves <pedro@codesourcery.com>
8783
8784 * linux-low.c (linux_write_memory): Bail out early if peeking
8785 memory failed.
8786
8787 2010-03-14 Pedro Alves <pedro@codesourcery.com>
8788
8789 * linux-low.h (struct lwp_info): New fields
8790 `stopped_by_watchpoint' and `stopped_data_address'.
8791 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
8792 here, and cache them in the lwp object.
8793 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
8794 directly.
8795 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
8796 field.
8797 (linux_stopped_by_watchpoint): Rewrite.
8798 (linux_stopped_data_address): Rewrite.
8799
8800 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
8801
8802 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
8803 switching the current inferior, not before.
8804
8805 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
8806
8807 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
8808 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
8809 i386-linux.c and amd64-linux.c.
8810 (reg-i386.o): Removed.
8811 (reg-i386.c): Likewise.
8812 (reg-i386-linux.o): Likewise.
8813 (reg-i386-linux.c): Likewise.
8814 (reg-x86-64.o): Likewise.
8815 (reg-x86-64.c): Likewise.
8816 (reg-x86-64-linux.o): Likewise.
8817 (reg-x86-64-linux.c): Likewise.
8818 (i386.o): New.
8819 (i386.c): Likewise.
8820 (i386-linux.o): Likewise.
8821 (i386-linux.c): Likewise.
8822 (amd64.o): Likewise.
8823 (amd64.c): Likewise.
8824 (amd64-linux.o): Likewise.
8825 (amd64-linux.c): Likewise.
8826
8827 * configure.srv (srv_i386_regobj): New.
8828 (srv_i386_linux_regobj): Likewise.
8829 (srv_amd64_regobj): Likewise.
8830 (srv_amd64_linux_regobj): Likewise.
8831 (srv_i386_32bit_xmlfiles): Likewise.
8832 (srv_i386_64bit_xmlfiles): Likewise.
8833 (srv_i386_xmlfiles): Likewise.
8834 (srv_amd64_xmlfiles): Likewise.
8835 (srv_i386_linux_xmlfiles): Likewise.
8836 (srv_amd64_linux_xmlfiles): Likewise.
8837 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
8838 srv_xmlfiles to $srv_i386_xmlfiles.
8839 (i[34567]86-*-mingw32ce*): Likewise.
8840 (i[34567]86-*-mingw*): Likewise.
8841 (i[34567]86-*-nto*): Likewise.
8842 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
8843 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
8844 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
8845 (x86_64-*-linux*): Likewise.
8846
8847 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
8848 (init_registers_amd64_linux): New.
8849 (x86_arch_setup): Replace init_registers_x86_64_linux with
8850 init_registers_amd64_linux.
8851
8852 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
8853
8854 * configure.ac: Check for libdl. If it is not available link against
8855 static libthread_db.
8856 * configure: Regenerate.
8857
8858 2010-02-22 Pedro Alves <pedro@codesourcery.com>
8859
8860 PR9605
8861
8862 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
8863 handing a read watchpoint.
8864 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
8865
8866 2010-02-12 Doug Evans <dje@google.com>
8867
8868 * linux-low.c (linux_supports_tracefork_flag): Document.
8869 (linux_look_up_symbols): Add comment.
8870
8871 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
8872
8873 * regcache.c (supply_register): Clear regcache if buf is NULL.
8874
8875 2010-02-02 Nicolas Roche <roche@sourceware.org>
8876 Joel Brobecker <brobecker@adacore.com>
8877
8878 * inferiors.c (find_inferior): Add function documentation.
8879 (unloaded_dll): Handle the case where the unloaded dll has not
8880 been previously registered in the dll list.
8881
8882 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
8883
8884 * linux-arm-low.c (thumb_breakpoint_len): Delete.
8885 (thumb2_breakpoint): New.
8886 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
8887
8888 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
8889
8890 * linux-low.c (get_stop_pc): Check for SIGTRAP.
8891 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
8892 breakpoints.
8893
8894 2010-01-21 Pedro Alves <pedro@codesourcery.com>
8895
8896 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
8897
8898 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
8899
8900 * linux-s390-low.c (s390_collect_ptrace_register)
8901 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
8902
8903 2010-01-21 Doug Evans <dje@google.com>
8904
8905 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
8906 (PTRACE_ARG4_TYPE): New macro.
8907 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
8908 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
8909 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
8910 (usr_store_inferior_registers): Ditto.
8911 (linux_read_memory, linux_write_memory): Ditto.
8912 (linux_test_for_tracefork): Ditto.
8913
8914 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
8915 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
8916
8917 2010-01-21 Pedro Alves <pedro@codesourcery.com>
8918
8919 * proc-service.c (ps_lgetregs): Don't refetch registers from the
8920 target.
8921
8922 2010-01-21 Pedro Alves <pedro@codesourcery.com>
8923
8924 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
8925 prototype to take a regcache. Adjust.
8926
8927 2010-01-20 Pedro Alves <pedro@codesourcery.com>
8928
8929 * regcache.h (struct thread_info): Forward declare.
8930 (struct regcache): New.
8931 (new_register_cache): Adjust prototype.
8932 (get_thread_regcache): Declare.
8933 (free_register_cache): Adjust prototype.
8934 (registers_to_string, registers_from_string): Ditto.
8935 (supply_register, supply_register_by_name, collect_register)
8936 (collect_register_as_string, collect_register_by_name): Ditto.
8937 * regcache.c (struct inferior_regcache_data): Delete.
8938 (get_regcache): Rename to ...
8939 (get_thread_regcache): ... this. Adjust. Switch inferior before
8940 fetching registers.
8941 (regcache_invalidate_one): Adjust.
8942 (regcache_invalidate): Fix prototype.
8943 (new_register_cache): Return the new register cache.
8944 (free_register_cache): Change prototype.
8945 (realloc_register_cache): Adjust.
8946 (registers_to_string): Change prototype to take a regcache. Adjust.
8947 (registers_from_string): Ditto.
8948 (register_data): Ditto.
8949 (supply_register): Ditto.
8950 (supply_register_by_name): Ditto.
8951 (collect_register): Ditto.
8952 (collect_register_as_string): Ditto.
8953 (collect_register_by_name): Ditto.
8954 * server.c (process_serial_event): Adjust.
8955 * linux-low.h (regset_fill_func, regset_store_func): Change
8956 prototype.
8957 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
8958 Change prototype.
8959 * linux-low.c (get_stop_pc): Adjust.
8960 (check_removed_breakpoint): Adjust.
8961 (linux_wait_for_event): Adjust.
8962 (linux_resume_one_lwp): Adjust.
8963 (fetch_register): Add regcache parameter. Adjust.
8964 (usr_store_inferior_registers): Ditto.
8965 (regsets_fetch_inferior_registers): Ditto.
8966 (regsets_store_inferior_registers): Ditto.
8967 (linux_fetch_registers, linux_store_registers): Ditto.
8968 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
8969 regcache. Adjust.
8970 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
8971 Ditto.
8972 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
8973 prototype to take a regcache.
8974 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
8975 * remote-utils.c (convert_ascii_to_int, outreg)
8976 (prepare_resume_reply): Change prototype to take a regcache.
8977 Adjust.
8978 * target.h (struct target_ops) <fetch_registers, store_registers>:
8979 Change prototype to take a regcache.
8980 (fetch_inferior_registers, store_inferior_registers): Change
8981 prototype to take a regcache. Adjust.
8982 * proc-service.c (ps_lgetregs): Adjust.
8983 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
8984 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
8985 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
8986 take a regcache. Adjust.
8987 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
8988 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
8989 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
8990 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
8991 * linux-cris-low.c (cris_get_pc, cris_set_pc)
8992 (cris_cannot_fetch_register):
8993 (cris_breakpoint_at): Change prototype to take a regcache.
8994 Adjust.
8995 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
8996 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
8997 to take a regcache. Adjust.
8998 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
8999 Adjust.
9000 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
9001 take a regcache. Adjust.
9002 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
9003 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
9004 (m68k_set_pc): Change prototype to take a regcache. Adjust.
9005 * linux-mips-low.c (mips_get_pc):
9006 (mips_set_pc): Change prototype to take a regcache. Adjust.
9007 (mips_reinsert_addr): Adjust.
9008 (mips_collect_register): Change prototype to take a regcache.
9009 Adjust.
9010 (mips_supply_register):
9011 (mips_collect_register_32bit, mips_supply_register_32bit)
9012 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
9013 (mips_store_fpregset): Ditto.
9014 * linux-ppc-low.c (ppc_supply_ptrace_register)
9015 (ppc_supply_ptrace_register): Ditto.
9016 (parse_spufs_run): Adjust.
9017 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
9018 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
9019 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
9020 take a regcache. Adjust.
9021 * linux-s390-low.c (s390_collect_ptrace_register)
9022 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
9023 (s390_set_pc): Change prototype to take a regcache. Adjust.
9024 (s390_arch_setup): Adjust.
9025 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
9026 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
9027 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
9028 (sparc_fill_gregset, sparc_store_gregset_from_stack)
9029 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
9030 regcache. Adjust.
9031 (sparc_breakpoint_at): Adjust.
9032 * linux-xtensa-low.c (xtensa_fill_gregset):
9033 (xtensa_store_gregset):
9034 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
9035 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
9036 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
9037 prototype to take a regcache. Adjust.
9038 * win32-arm-low.c (arm_fetch_inferior_register)
9039 (arm_store_inferior_register): Change prototype to take a
9040 regcache. Adjust.
9041 * win32-i386-low.c (i386_fetch_inferior_register)
9042 (i386_store_inferior_register): Change prototype to take a
9043 regcache. Adjust.
9044 * win32-low.c (child_fetch_inferior_registers)
9045 (child_store_inferior_registers): Change prototype to take a
9046 regcache. Adjust.
9047 (win32_wait): Adjust.
9048 (win32_fetch_inferior_registers): Change prototype to take a
9049 regcache. Adjust.
9050 (win32_store_inferior_registers): Adjust.
9051 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
9052 store_inferior_register>: Change prototype to take a regcache.
9053
9054 2010-01-20 Doug Evans <dje@google.com>
9055
9056 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
9057 #ifdef.
9058 (linux_wait_for_event1, linux_init_signals): Ditto.
9059 (W_STOPCODE): Provide definition if missing.
9060
9061 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
9062
9063 * linux-low.c (linux_core_of_thread): New.
9064 (compare_ints, show_process, list_threads): New.
9065 (linux_qxfer_osdata): Report threads and cores.
9066 (linux_target_op): Register linux_core_of_thread.
9067 * remote-utils.c (prepare_resume_reply): Report the core.
9068 (buffer_xml_printf): Support %d specifier.
9069 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
9070 New.
9071 (handle_query): Handle qXfer:threads. Announce availability
9072 thereof.
9073 * target.h (struct target_ops): New field core_of_thread.
9074
9075 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
9076
9077 * Makefile.in (clean): Remove new generated files.
9078 (reg-s390.o, reg-s390.c): Remove rules.
9079 (reg-s390x.o, reg-s390x.c): Likewise.
9080 (s390-linux32.o, s390-linux32.c): Add rules.
9081 (s390-linux64.o, s390-linux64.c): Likewise.
9082 (s390x-linux64.o, s390x-linux64.c): Likewise.
9083 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
9084 * linux-s390-low.c: Include <elf.h>.
9085 (HWCAP_S390_HIGH_GPRS): Define if undefined.
9086 (init_registers_s390): Remove prototype.
9087 (init_registers_s390x): Likewise.
9088 (init_registers_s390_linux32): Add prototype.
9089 (init_registers_s390_linux64): Likewise.
9090 (init_registers_s390x_linux64): Likewise.
9091 (s390_num_regs_3264): New define.
9092 (s390_regmap_3264): New global variable.
9093 (s390_cannot_fetch_register): Remove obsolete check.
9094 (s390_cannot_store_register): Likewise.
9095 (s390_collect_ptrace_register): Handle upper/lower register halves.
9096 (s390_supply_ptrace_register): Likewise.
9097 (s390_fill_gregset): Update to register number changes.
9098 (s390_get_hwcap): New routine.
9099 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
9100 Install appropriate regmap and register set.
9101
9102 2010-01-01 Joel Brobecker <brobecker@adacore.com>
9103
9104 * server.c (gdbserver_version): Update copyright year to 2010.
9105 * gdbreplay.c (gdbreplay_version): Likewise.
9106
9107 2009-12-28 Doug Evans <dje@google.com>
9108
9109 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
9110 elf/external.h. Include <elf.h> instead but only if necessary.
9111
9112 2009-12-28 Pedro Alves <pedro@codesourcery.com>
9113
9114 * linux-low.c (linux_remove_process): Remove `detaching'
9115 parameter. Don't release/detach from thread_db here.
9116 (linux_kill): Release/detach from thread_db here, ...
9117 (linux_detach): ... and here, before actually detaching.
9118 (linux_wait_1): ... and here, when a process exits.
9119 * thread-db.c (any_thread_of): New.
9120 (thread_db_free): Switch the current inferior to a thread of the
9121 passed in process.
9122
9123 2009-12-21 Doug Evans <dje@google.com>
9124
9125 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
9126
9127 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
9128 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
9129 warning ifndef __NR_tkill. Move setting of errno there too.
9130 Delete unnecessary resetting of errno after syscall.
9131 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
9132
9133 * configure.ac: Check for dladdr.
9134 * config.in: Regenerate.
9135 * configure: Regenerate.
9136 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
9137 (try_thread_db_load): Update.
9138
9139 * linux-low.c (my_waitpid): Delete unnecessary prototype.
9140
9141 2009-12-18 Doug Evans <dje@google.com>
9142
9143 * event-loop.c: Include unistd.h if it exists.
9144
9145 * linux-low.c (my_waitpid): Move definition away from being in
9146 between linux_tracefork_child/linux_test_for_tracefork.
9147
9148 * gdb_proc_service.h (psaddr_t): Fix type.
9149 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
9150 signature to match glibc.
9151
9152 2009-12-16 Doug Evans <dje@google.com>
9153
9154 * linux-low.c (linux_read_memory): Fix argument to read.
9155
9156 2009-11-26 Pedro Alves <pedro@codesourcery.com>
9157
9158 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
9159 events, don't leave current_inferior pointing at null.
9160
9161 2009-11-26 Pedro Alves <pedro@codesourcery.com>
9162
9163 * win32-low.c (LOG): Delete.
9164 (OUTMSG): Output to stderr.
9165 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
9166 on compile time LOG macro.
9167 (win32_wait): Fix debug output.
9168
9169 2009-11-26 Pedro Alves <pedro@codesourcery.com>
9170
9171 * win32-low.c (win32_add_one_solib): If the dll name is
9172 "ntdll.dll", prepend the system directory to the dll path.
9173
9174 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
9175
9176 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
9177
9178 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
9179 Vladimir Prus <vladimir@codesourcery.com>
9180
9181 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
9182 * configure.ac: Check for __mcoldfire__ and set
9183 gdb_cv_m68k_is_coldfire.
9184 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
9185 reg-cf.o and reg-m68k.o.
9186 * configure: Regenerated.
9187
9188 2009-11-16 Pedro Alves <pedro@codesourcery.com>
9189
9190 * linux-low.c (linux_remove_process): Add `detaching' parameter.
9191 Pass it to thread_db_free.
9192 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
9193 proper `detaching' argument to linux_remove_process.
9194 * linux-low.h (thread_db_free): Add `detaching' parameter.
9195 * thread-db.c (thread_db_init): Pass false as `detaching' argument
9196 to thread_db_free.
9197 (thread_db_free): Add `detaching' parameter. Only
9198 call td_ta_clear_event if detaching from process.
9199
9200 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
9201
9202 * thread-db.c (thread_db_free): Fix typo.
9203
9204 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
9205
9206 PR gdb/10838
9207 * thread-db.c (thread_db_free): Call td_ta_clear_event.
9208
9209 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
9210
9211 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
9212 with an i686 compiler.
9213 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
9214 needed.
9215 * configure: Rebuilt.
9216
9217 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
9218
9219 PR gdb/10783
9220
9221 * server.c (handle_search_memory_1): Correct read_addr initialization
9222 in loop for searching subsequent chunks.
9223
9224 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
9225
9226 * configure.ac: New --with-libthread-db option.
9227 * thread-db.c: Allow direct dependence on libthread_db.
9228 (thread_db_free): Adjust.
9229 * config.in: Regenerate.
9230 * configure: Likewise.
9231
9232 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
9233
9234 PR gdb/10757
9235 * thread-db.c (attach_thread): New function.
9236 (maybe_attach_thread): Return success/failure.
9237 (find_new_threads_callback): Adjust.
9238 (thread_db_find_new_threads): Loop until no new threads.
9239
9240 2009-10-13 Pedro Alves <pedro@codesourcery.com>
9241
9242 * proc-service.c (ps_lgetregs): Formatting.
9243
9244 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
9245
9246 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
9247 * configure.ac: Adjust.
9248 * linux-low.h (struct process_info_private): Move members to struct
9249 thread_db.
9250 (thread_db_free, thread_db_handle_monitor_command): New prototype.
9251 * linux-low.c (linux_remove_process): Adjust.
9252 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
9253 * server.c (handle_query): Move code ...
9254 (handle_monitor_command): ... here. New function.
9255 * target.h (struct target_ops): New member.
9256 * thread-db.c (struct thread_db): New.
9257 (libthread_db_search_path): New variable.
9258 (thread_db_create_event, thread_db_enable_reporting)
9259 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
9260 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
9261 (try_thread_db_load_1, dladdr_to_soname): New functions.
9262 (try_thread_db_load, thread_db_load_search): New functions.
9263 (thread_db_init): Search for libthread_db.
9264 (thread_db_free): New function.
9265 (thread_db_handle_monitor_command): Likewise.
9266 * config.in: Regenerate.
9267 * configure: Regenerate.
9268
9269 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
9270
9271 * spu-low.c (spu_kill): Wait for inferior to terminate.
9272 Call clear_inferiors.
9273 (spu_detach): Call clear_inferiors.
9274
9275 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9276
9277 * aclocal.m4: Regenerate.
9278 * config.in: Likewise.
9279 * configure: Likewise.
9280
9281 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9282
9283 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
9284 (parse_spufs_run): New function.
9285 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
9286 (ppc_breakpoint_at): Handle SPU breakpoints.
9287
9288 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9289
9290 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
9291 (SPUFS_MAGIC): Define.
9292 (spu_enumerate_spu_ids): New function.
9293 (linux_qxfer_spu): New function.
9294 (linux_target_ops): Install linux_qxfer_spu.
9295
9296 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9297
9298 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
9299 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
9300 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
9301 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
9302 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
9303 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
9304 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
9305 (init_registers_powerpc_cell32l): Add prototype.
9306 (init_registers_powerpc_cell64l): Likewise.
9307 (ppc_arch_setup): Detect Cell/B.E. architecture.
9308
9309 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9310
9311 * Makefile.in (datarootdir): New variable.
9312
9313 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
9314
9315 * linux-low.c (linux_write_memory): Update debugging output.
9316 * Makefile.in (clean): Add new descriptions.
9317 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
9318 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
9319 * configure.srv: Add new files for arm*-*-linux*.
9320 * linux-arm-low.c: Add new declarations.
9321 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
9322 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
9323 (HWCAP_VFPv3D16): New.
9324 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
9325 instead of __IWMMXT__.
9326 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
9327 (arm_arch_setup): New.
9328 (target_regsets): Remove #ifdef. Add VFP regset.
9329 (the_low_target): Use arm_arch_setup.
9330
9331 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
9332
9333 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
9334 the main thread again.
9335
9336 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
9337
9338 Adding Neutrino gdbserver.
9339 * configure: Regenerated.
9340 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
9341 * configure.srv (i[34567]86-*-nto*): New target.
9342 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
9343 * remote-utils.c [__QNX__]: Include sys/iomgr.h
9344 (nto_comctrl) [__QNX__]: New function.
9345 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
9346
9347 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
9348
9349 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
9350 srv_tgtobj.
9351
9352 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
9353 Pedro Alves <pedro@codesourcery.com>
9354
9355 * win32-i386-low.c (i386_get_thread_context): Handle systems that
9356 don't support CONTEXT_EXTENDED_REGISTERS.
9357 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
9358 (the_low_target): Install them.
9359 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
9360 failing with ERROR_PIPE_NOT_CONNECTED.
9361
9362 2009-06-30 Doug Evans <dje@google.com>
9363 Pierre Muller <muller@ics.u-strasbg.fr>
9364
9365 Add h/w watchpoint support to x86-linux, win32-i386.
9366 * Makefile.in (SFILES): Add i386-low.c
9367 (i386_low_h): Define.
9368 (i386-low.o): Add dependencies.
9369 (linux-x86-low.o): Add i386-low.h dependency.
9370 (win32-i386-low.o): Ditto.
9371 * i386-low.c: New file.
9372 * i386-low.h: New file.
9373 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
9374 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
9375 * linux-low.c (linux_add_process): Initialize arch_private.
9376 (linux_remove_process): Free arch_private.
9377 (add_lwp): Initialize arch_private.
9378 (delete_lwp): Free arch_private.
9379 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
9380 provided.
9381 * linux-low.h (process_info_private): New member arch_private.
9382 (lwp_info): New member arch_private.
9383 (linux_target_ops): New members new_process, new_thread,
9384 prepare_to_resume.
9385 (ptid_of): New macro.
9386 * linux-x86-low.c: Include stddef.h, i386-low.h.
9387 (arch_process_info): New struct.
9388 (arch_lwp_info): New struct.
9389 (x86_linux_dr_get, x86_linux_dr_set): New functions.
9390 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
9391 (i386_dr_low_get_status): New function.
9392 (x86_insert_point, x86_remove_point): New functions.
9393 (x86_stopped_by_watchpoint): New function.
9394 (x86_stopped_data_address): New function.
9395 (x86_linux_new_process, x86_linux_new_thread): New functions.
9396 (x86_linux_prepare_to_resume): New function.
9397 (the_low_target): Add entries for insert_point, remove_point,
9398 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
9399 prepare_to_resume.
9400 * server.c (debug_hw_points): New global.
9401 (monitor_show_help): Document set debug-hw-points.
9402 (handle_query): Process "set debug-hw-points".
9403 * server.h (debug_hw_points): Declare.
9404 (paddress): Declare.
9405 * utils.c (NUMCELLS, CELLSIZE): New macros.
9406 (get_sell, xsnprintf, paddress): New functions.
9407 * win32-arm-low.c (the_low_target): Add entries for insert_point,
9408 remove_point, stopped_by_watchpoint, stopped_data_address.
9409 * win32-i386-low.c: Include i386-low.h.
9410 (debug_reg_state): Replaces dr.
9411 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
9412 (i386_dr_low_get_status): New function.
9413 (i386_insert_point, i386_remove_point): New functions.
9414 (i386_stopped_by_watchpoint): New function.
9415 (i386_stopped_data_address): New function.
9416 (i386_initial_stuff): Update.
9417 (get_thread_context,set_thread_context,i386_thread_added): Update.
9418 (the_low_target): Add entries for insert_point,
9419 remove_point, stopped_by_watchpoint, stopped_data_address.
9420 * win32-low.c (win32_insert_watchpoint): New function.
9421 (win32_remove_watchpoint): New function.
9422 (win32_stopped_by_watchpoint): New function.
9423 (win32_stopped_data_address): New function.
9424 (win32_target_ops): Add entries for insert_watchpoint,
9425 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
9426 * win32-low.h (win32_target_ops): New members insert_point,
9427 remove_point, stopped_by_watchpoint, stopped_data_address.
9428
9429 2009-06-25 Pedro Alves <pedro@codesourcery.com>
9430
9431 * server.c (process_serial_event): Re-return unsupported, not
9432 error, if the type isn't recognized. Re-allow supporting only
9433 insert or remove packets. Also call require_running for
9434 breakpoints. Add missing break statement to default case. Tidy.
9435 * target.h (struct target_ops): Rename insert_watchpoint to
9436 insert_point, and remove_watchpoint to remove_point.
9437
9438 * linux-low.h (struct linux_target_ops): Likewise.
9439 * linux-low.c (linux_insert_watchpoint): Rename to ...
9440 (linux_insert_point): ... this. Adjust.
9441 (linux_remove_watchpoint): Rename to ...
9442 (linux_remove_point): ... this. Adjust.
9443 (linux_target_ops): Adjust.
9444 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
9445 (cris_insert_point): ... this.
9446 (cris_remove_watchpoint): Rename to ...
9447 (cris_remove_point): ... this.
9448 (the_low_target): Adjust.
9449
9450 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
9451
9452 * server.c (handle_v_kill): Pass signal_pid to
9453 kill_inferior if multi_process is zero.
9454
9455 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
9456
9457 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
9458 * target.h (target_ops): Comment for *_watchpoint to make it clear
9459 the functions can get types '0' and '1'.
9460
9461 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
9462
9463 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
9464 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
9465 * regcache.c (get_regcache): Likewise.
9466 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
9467 * win32-low.c (child_fetch_inferior_registers): Remove check for
9468 regno 0.
9469
9470 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
9471 Pedro Alves <pedro@codesourcery.com>
9472
9473 * target.h (struct target_ops) <supports_multi_process>: New
9474 callback.
9475 (target_supports_multi_process): New.
9476 * server.c (handle_query): Even if GDB reports support, only
9477 enable multi-process if the target also supports it. Report
9478 multi-process support only if the target backend supports it.
9479 * linux-low.c (linux_supports_multi_process): New function.
9480 (linux_target_ops): Install it as target_supports_multi_process
9481 callback.
9482
9483 2009-05-24 Doug Evans <dje@google.com>
9484
9485 Global renaming of find_thread_pid to find_thread_ptid.
9486 * server.h (find_thread_ptid): Renamed from find_thread_pid.
9487 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
9488 All callers updated.
9489
9490 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
9491 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
9492 directly.
9493
9494 * linux-low.c (get_stop_pc): Print pc if debug_threads.
9495 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
9496 (linux_resume_one_lwp): Ditto.
9497
9498 2009-05-23 Doug Evans <dje@google.com>
9499
9500 * linux-low.c (linux_resume_one_lwp): Change type of first arg
9501 from struct inferior_list_entry * to struct lwp_info *.
9502 All callers updated.
9503
9504 2009-05-13 Doug Evans <dje@google.com>
9505
9506 * linux-x86-low.c: Don't include assert.h.
9507 (x86_siginfo_fixup): Use fatal, not assert.
9508 (x86_arch_setup): Fix comment.
9509
9510 2009-05-12 Doug Evans <dje@google.com>
9511
9512 Biarch support for i386/amd64 gdbserver.
9513 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
9514 Add linux-x86-low.c.
9515 (linux-i386-low.o, linux-x86-64-low.o): Delete.
9516 (linux-x86-low.o): Add.
9517 * linux-x86-64-low.c: Delete.
9518 * linux-i386-low.c: Delete.
9519 * linux-x86-low.c: New file.
9520 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
9521 linux-x86-low.o.
9522 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
9523 linux-x86-low.o.
9524 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
9525 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
9526 (linux_child_pid_to_exec_file): New function.
9527 (elf_64_header_p, elf_64_file_p): New functions.
9528 (siginfo_fixup): New function.
9529 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
9530 give target a chance to convert layout.
9531 * linux-low.h (linux_target_ops): New member siginfo_fixup.
9532 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
9533
9534 2009-05-07 Doug Evans <dje@google.com>
9535
9536 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
9537 (regsets_store_inferior_registers): Ditto.
9538
9539 2009-05-06 Pedro Alves <pedro@codesourcery.com>
9540
9541 PR server/10048
9542
9543 * linux-low.c (must_set_ptrace_flags): Delete.
9544 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
9545 of the global.
9546 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
9547 `lwp->must_set_ptrace_flags' instead.
9548 (linux_wait_for_event_1): Set ptrace options here.
9549 (linux_wait_1): ... not here.
9550
9551 2009-04-30 Doug Evans <dje@google.com>
9552
9553 * inferiors.c (started_inferior_callback): New function.
9554 (attached_inferior_callback): New function.
9555 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
9556 * server.c (print_started_pid, print_attached_pid): New functions.
9557 (detach_or_kill_for_exit): New function.
9558 (main): Call it instead of for_each_inferior (kill_inferior_callback).
9559 * server.h (have_started_inferiors_p): Declare.
9560 (have_attached_inferiors_p): Declare.
9561
9562 * inferiors.c (remove_process): Fix memory leak, free process.
9563 * linux-low.c (linux_remove_process): New function.
9564 (linux_kill): Call it instead of remove_process.
9565 (linux_detach, linux_wait_1): Ditto.
9566
9567 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
9568
9569 * configure.srv: Add x86 Windows CE target.
9570
9571 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
9572
9573 * inferiors.c (get_thread_process): Make global.
9574 * server.h (get_thread_process): Add prototype.
9575 * thread-db.c (find_one_thread): Use get_thread_process
9576 instead of current_process.
9577 (thread_db_get_tls_address): Do not crash if called when
9578 thread layer is not yet initialized.
9579
9580 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
9581
9582 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
9583 * spu-low.c (current_tid): Rename to ...
9584 (current_ptid): ... this.
9585 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
9586 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
9587 ptid_get_lwp (current_ptid) instead of current_tid.
9588 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
9589 instead of current_tid. Use find_process_pid to verify pid
9590 argument is valid. Pass proper argument to remove_process.
9591 (spu_thread_alive): Compare current_ptid instead of current_tid.
9592 (spu_resume): Likewise.
9593
9594 2009-04-02 Pedro Alves <pedro@codesourcery.com>
9595
9596 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
9597 variable.
9598
9599 2009-04-01 Pedro Alves <pedro@codesourcery.com>
9600
9601 Implement the multiprocess extensions, and add linux multiprocess
9602 support.
9603
9604 * server.h (ULONGEST): Declare.
9605 (struct ptid, ptid_t): New.
9606 (minus_one_ptid, null_ptid): Declare.
9607 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
9608 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
9609 (struct inferior_list_entry): Change `id' type from unsigned from
9610 to ptid_t.
9611 (struct sym_cache, struct breakpoint, struct
9612 process_info_private): Forward declare.
9613 (struct process_info): Declare.
9614 (current_process): Declare.
9615 (all_processes): Declare.
9616 (initialize_inferiors): Declare.
9617 (add_thread): Adjust to use ptid_t.
9618 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
9619 (add_process, remove_process, find_thread_pid): Declare.
9620 (find_inferior_id): Adjust to use ptid_t.
9621 (cont_thread, general_thread, step_thread): Change type to ptid_t.
9622 (multi_process): Declare.
9623 (push_event): Adjust to use ptid_t.
9624 (read_ptid, write_ptid): Declare.
9625 (prepare_resume_reply): Adjust to use ptid_t.
9626 (clear_symbol_cache): Declare.
9627 * inferiors.c (all_processes): New.
9628 (null_ptid, minus_one_ptid): New.
9629 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
9630 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
9631 (add_thread): Change unsigned long to ptid. Remove gdb_id
9632 parameter. Adjust.
9633 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
9634 (gdb_id_to_thread): Rename to ...
9635 (find_thread_pid): ... this. Change unsigned long to ptid.
9636 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
9637 (loaded_dll, pull_pid_from_list): Adjust.
9638 (add_process, remove_process, find_process_pid)
9639 (get_thread_process, current_process, initialize_inferiors): New.
9640 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
9641 (struct target_waitstatus) <related_pid>: Ditto.
9642 (struct target_ops) <kill, detach>: Add `pid' argument. Change
9643 return type to int.
9644 (struct target_ops) <join>: Add `pid' argument.
9645 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
9646 (struct target_ops) <wait>: Add `ptid' field. Change return type
9647 to ptid.
9648 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
9649 (mywait): Add `ptid' argument. Change return type to ptid_t.
9650 (target_pid_to_str): Declare.
9651 * target.c (set_desired_inferior): Adjust to use ptids.
9652 (mywait): Add new `ptid' argument. Adjust.
9653 (target_pid_to_str): New.
9654 * mem-break.h (free_all_breakpoints): Declare.
9655 * mem-break.c (breakpoints): Delelete.
9656 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
9657 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
9658 to use per-process breakpoint list.
9659 (free_all_breakpoints): New.
9660 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
9661 (symbol_cache, all_symbols_looked_up): Delete.
9662 (hexchars): New.
9663 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
9664 read_ptid): New.
9665 (prepare_resume_reply): Change ptid argument's type from unsigned
9666 long to ptid_t. Adjust. Implement W;process and X;process.
9667 (free_sym_cache, clear_symbol_cache): New.
9668 (look_up_one_symbol): Adjust to per-process symbol cache. *
9669 * server.c (cont_thread, general_thread, step_thread): Change type
9670 to ptid_t.
9671 (attached): Delete.
9672 (multi_process): New.
9673 (last_ptid): Change type to ptid_t.
9674 (struct vstop_notif) <ptid>: Change type to ptid_t.
9675 (queue_stop_reply, push_event): Change `ptid' argument's type to
9676 ptid_t.
9677 (discard_queued_stop_replies): Add `pid' argument.
9678 (start_inferior): Adjust to use ptids. Adjust to mywait interface
9679 changes. Don't reference the `attached' global.
9680 (attach_inferior): Adjust to mywait interface changes.
9681 (handle_query): Adjust to use ptids. Parse GDB's qSupported
9682 features. Handle and report "multiprocess+". Handle
9683 "qAttached:PID".
9684 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
9685 changes.
9686 (handle_v_kill): New.
9687 (handle_v_stopped): Adjust to use target_pid_to_str.
9688 (handle_v_requests): Allow multiple attaches and runs when
9689 multiprocess extensions are in effect. Handle "vKill".
9690 (myresume): Adjust to use ptids.
9691 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
9692 (handle_status): Adjust to discard_queued_stop_replies interface
9693 change.
9694 (first_thread_of, kill_inferior_callback)
9695 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
9696 (main): Call initialize_inferiors. Adjust to use ptids, killing
9697 and detaching from all inferiors. Handle multiprocess packet
9698 variants.
9699 * linux-low.h: Include gdb_proc_service.h.
9700 (struct process_info_private): New.
9701 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
9702 <lwpid_of>: Use ptid_get_lwp.
9703 (get_lwp_thread): Adjust.
9704 (struct lwp_info): Add `dead' member.
9705 (find_lwp_pid): Declare.
9706 * linux-low.c (thread_db_active): Delete.
9707 (new_inferior): Adjust comment.
9708 (inferior_pid): Delete.
9709 (linux_add_process): New.
9710 (handle_extended_wait): Adjust.
9711 (add_lwp): Change unsigned long to ptid.
9712 (linux_create_inferior): Add process to processes table. Adjust
9713 to use ptids. Don't set new_inferior here.
9714 (linux_attach_lwp): Rename to ...
9715 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
9716 it. Adjust to use ptids.
9717 (linux_attach_lwp): New.
9718 (linux_attach): Add process to processes table. Don't set
9719 new_inferior here.
9720 (struct counter): New.
9721 (second_thread_of_pid_p, last_thread_of_process_p): New.
9722 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
9723 multiple processes.
9724 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
9725 processes. Remove process from process table.
9726 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
9727 to multiple processes.
9728 (any_thread_of): New.
9729 (linux_detach): Add `pid' argument, and handle it. Remove process
9730 from processes table.
9731 (linux_join): Add `pid' argument. Handle it.
9732 (linux_thread_alive): Change unsighed long argument to ptid_t.
9733 Consider dead lwps as not being alive.
9734 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
9735 threads we're not interested in.
9736 (same_lwp, find_lwp_pid): New.
9737 (linux_wait_for_lwp): Change `pid' argument's type from int to
9738 ptid_t. Adjust.
9739 (linux_wait_for_event): Rename to ...
9740 (linux_wait_for_event_1): ... this. Change `pid' argument's type
9741 from int to ptid_t. Adjust.
9742 (linux_wait_for_event): New.
9743 (linux_wait_1): Add `ptid' argument. Change return type to
9744 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
9745 that exit from the process table.
9746 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
9747 Adjust.
9748 (mark_lwp_dead): New.
9749 (wait_for_sigstop): Adjust to use ptids. If a process exits while
9750 stopping all threads, mark its main lwp as dead.
9751 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
9752 ptids.
9753 (fetch_register, usr_store_inferior_registers)
9754 (regsets_fetch_inferior_registers)
9755 (regsets_store_inferior_registers, linux_read_memory)
9756 (linux_write_memory): Inline `inferior_pid'.
9757 (linux_look_up_symbols): Adjust to use per-process
9758 `thread_db_active'.
9759 (linux_request_interrupt): Adjust to use ptids.
9760 (linux_read_auxv): Inline `inferior_pid'.
9761 (initialize_low): Don't reference thread_db_active.
9762 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
9763 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
9764 (ps_getpid): Return the pid of the current inferior.
9765 * thread-db.c (proc_handle, thread_agent): Delete.
9766 (thread_db_create_event, thread_db_enable_reporting): Adjust to
9767 per-process data.
9768 (find_one_thread): Change argument type to ptid_t. Adjust to
9769 per-process data.
9770 (maybe_attach_thread): Adjust to per-process data and ptids.
9771 (thread_db_find_new_threads): Ditto.
9772 (thread_db_init): Ditto.
9773 * spu-low.c (spu_create_inferior, spu_attach): Add process to
9774 processes table. Adjust to use ptids.
9775 (spu_kill, spu_detach): Adjust interface. Remove process from
9776 processes table.
9777 (spu_join, spu_thread_alive): Adjust interface.
9778 (spu_wait): Adjust interface. Remove process from processes
9779 table. Adjust to use ptids.
9780 * win32-low.c (current_inferior_tid): Delete.
9781 (current_inferior_ptid): New.
9782 (debug_event_ptid): New.
9783 (thread_rec): Take a ptid. Adjust.
9784 (child_add_thread): Add `pid' argument. Adjust to use ptids.
9785 (child_delete_thread): Ditto.
9786 (do_initial_child_stuff): Add `attached' argument. Add process to
9787 processes table.
9788 (child_fetch_inferior_registers, child_store_inferior_registers):
9789 Adjust.
9790 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
9791 (win32_attach): Pass 1 to do_initial_child_stuff.
9792 (win32_kill): Adjust interface. Remove process from processes
9793 table.
9794 (win32_detach): Ditto.
9795 (win32_join): Adjust interface.
9796 (win32_thread_alive): Take a ptid.
9797 (win32_resume): Adjust to use ptids.
9798 (get_child_debug_event): Ditto.
9799 (win32_wait): Adjust interface. Remove exiting process from
9800 processes table.
9801
9802 2009-04-01 Pedro Alves <pedro@codesourcery.com>
9803
9804 Non-stop mode support.
9805
9806 * server.h (non_stop): Declare.
9807 (gdb_client_data, handler_func): Declare.
9808 (delete_file_handler, add_file_handler, start_event_loop):
9809 Declare.
9810 (handle_serial_event, handle_target_event, push_event)
9811 (putpkt_notif): Declare.
9812 * target.h (enum resume_kind): New.
9813 (struct thread_resume): Replace `step' field by `kind' field.
9814 (TARGET_WNOHANG): Define.
9815 (struct target_ops) <wait>: Add `options' argument.
9816 <supports_non_stop, async, start_non_stop>: New fields.
9817 (target_supports_non_stop, target_async): New.
9818 (start_non_stop): Declare.
9819 (mywait): Add `options' argument.
9820 * target.c (mywait): Add `options' argument. Print child exit
9821 notifications here.
9822 (start_non_stop): New.
9823 * server.c (non_stop, own_buf, mem_buf): New globals.
9824 (struct vstop_notif): New.
9825 (notif_queue): New global.
9826 (queue_stop_reply, push_event, discard_queued_stop_replies)
9827 (send_next_stop_reply): New.
9828 (start_inferior): Adjust to use resume_kind. Adjust to mywait
9829 interface changes.
9830 (attach_inferior): In non-stop mode, don't wait for the target
9831 here.
9832 (handle_general_set): Handle QNonStop.
9833 (handle_query): When handling qC, return the current general
9834 thread, instead of the first thread of the list.
9835 (handle_query): If the backend supports non-stop mode, include
9836 QNonStop+ in the qSupported query response.
9837 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
9838 and non-stop mode.
9839 (handle_v_attach, handle_v_run): Handle non-stop mode.
9840 (handle_v_stopped): New.
9841 (handle_v_requests): Report support for vCont;t. Handle vStopped.
9842 (myresume): Adjust to use resume_kind. Handle non-stop.
9843 (queue_stop_reply_callback): New.
9844 (handle_status): Handle non-stop mode.
9845 (main): Clear non_stop flag on reconnection. Use the event-loop.
9846 Refactor serial protocol handling from here ...
9847 (process_serial_event): ... to this new function. When GDB
9848 selects any thread, select one here. In non-stop mode, wait until
9849 GDB acks all pending events before exiting.
9850 (handle_serial_event, handle_target_event): New.
9851 * remote-utils.c (remote_open): Install remote_desc in the event
9852 loop.
9853 (remote_close): Remove remote_desc from the event loop.
9854 (putpkt_binary): Rename to...
9855 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
9856 (putpkt_binary): New as wrapper around putpkt_binary_1.
9857 (putpkt_notif): New.
9858 (prepare_resume_reply): In non-stop mode, don't change the
9859 general_thread.
9860 * event-loop.c: New.
9861 * Makefile.in (OBJ): Add event-loop.o.
9862 (event-loop.o): New rule.
9863
9864 * linux-low.h (pid_of): Moved here.
9865 (lwpid_of): New.
9866 (get_lwp_thread): Use lwpid_of.
9867 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
9868 * linux-low.c (pid_of): Delete.
9869 (inferior_pid): Use lwpid_of.
9870 (linux_event_pipe): New.
9871 (target_is_async_p): New.
9872 (delete_lwp): New.
9873 (handle_extended_wait): Use lwpid_of.
9874 (add_lwp): Don't set lwpid field.
9875 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
9876 (linux_kill_one_lwp): If killing a running lwp, stop it first.
9877 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
9878 (linux_detach_one_lwp): If detaching from a running lwp, stop it
9879 first. Adjust to linux_wait_for_event interface changes. Use
9880 lwpid_of.
9881 (linux_detach): Don't delete the main lwp here.
9882 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
9883 (status_pending_p): Don't consider explicitly suspended lwps.
9884 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
9885 pointer. Add OPTIONS argument. Change return type to int. Use
9886 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
9887 (linux_wait_for_event): Take an integer pid instead of a lwp_info
9888 pointer. Add status pointer argument. Return a pid instead of a
9889 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
9890 changes. In non-stop mode, don't switch to a random thread.
9891 (linux_wait): Rename to...
9892 (linux_wait_1): ... this. Add target_options argument, and handle
9893 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
9894 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
9895 clean exit and signal exit code. Don't stop all threads in
9896 non-stop mode. In all-stop mode, only stop all threads when
9897 reporting a stop to GDB. Handle explicit thread stop requests.
9898 (async_file_flush, async_file_mark): New.
9899 (linux_wait): New.
9900 (send_sigstop): Use lwpid_of.
9901 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
9902 interface changes. In non-stop mode, don't switch to a random
9903 thread.
9904 (linux_resume_one_lwp): Use lwpid_of.
9905 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
9906 (linux_resume_one_thread): ... this. Handle resume_stop. In
9907 non-stop mode, don't look for pending flag in all threads.
9908 (resume_status_pending_p): Don't consider explicitly suspended
9909 threads.
9910 (my_waitpid): Reimplement. Emulate __WALL.
9911 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
9912 Use lwpid_of.
9913 (sigchld_handler, linux_supports_non_stop, linux_async)
9914 (linux_start_non_stop): New.
9915 (linux_target_ops): Register linux_supports_non_stop, linux_async
9916 and linux_start_non_stop.
9917 (initialize_low): Install SIGCHLD handler.
9918 * thread-db.c (thread_db_create_event, find_one_thread)
9919 (thread_db_get_tls_address): Use lwpid_of.
9920 * win32-low.c (win32_detach): Adjust to use resume_kind.
9921 (win32_wait): Add `options' argument.
9922 * spu-low.c (spu_resume): Adjust to use resume_kind.
9923 (spu_wait): Add `options' argument.
9924
9925 2009-04-01 Pedro Alves <pedro@codesourcery.com>
9926
9927 Decouple target code from remote protocol.
9928
9929 * target.h (enum target_waitkind): New.
9930 (struct target_waitstatus): New.
9931 (struct target_ops) <wait>: Return an unsigned long. Take a
9932 target_waitstatus pointer instead of a char pointer.
9933 (mywait): Likewise.
9934 * target.c (mywait): Change prototype to return an unsigned long.
9935 Take a target_waitstatus pointer instead of a char pointer. Adjust.
9936 * server.h (thread_from_wait, old_thread_from_wait): Delete
9937 declarations.
9938 (prepare_resume_reply): Change prototype to take a
9939 target_waitstatus.
9940 * server.c (thread_from_wait, old_thread_from_wait): Delete.
9941 (last_status, last_ptid): New.
9942 (start_inferior): Remove "statusptr" argument. Adjust. Return a
9943 pid instead of a signal.
9944 (attach_inferior): Remove "status" and "signal" parameters.
9945 Adjust.
9946 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
9947 not as an address.
9948 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
9949 (handle_v_requests, myresume): Remove "status" and "signal"
9950 parameters. Adjust.
9951 (handle_status): New.
9952 (main): Delete local `status'. Adjust.
9953 * remote-utils.c: Include target.h.
9954 (prepare_resume_reply): Change prototype to take a
9955 target_waitstatus. Adjust.
9956
9957 * linux-low.c (linux_wait): Adjust to new target_ops->wait
9958 interface.
9959 * spu-low.c (spu_wait): Adjust.
9960 * win32-low.c (enum target_waitkind, struct target_waitstatus):
9961 Delete.
9962 (win32_wait): Adjust.
9963
9964 2009-04-01 Pedro Alves <pedro@codesourcery.com>
9965
9966 * target.h (struct thread_resume): Delete leave_stopped member.
9967 (struct target_ops): Add a `n' argument to the `resume' callback.
9968 * server.c (start_inferior): Adjust.
9969 (handle_v_cont, myresume): Adjust.
9970 * linux-low.c (check_removed_breakpoint): Adjust to resume
9971 interface change, and to removed leave_stopped field.
9972 (resume_ptr): Delete.
9973 (struct thread_resume_array): New.
9974 (linux_set_resume_request): Add new `arg' parameter. Adjust to
9975 resume interface change.
9976 (linux_continue_one_thread, linux_queue_one_thread)
9977 (resume_status_pending_p): Check if the resume field is NULL
9978 instead of checking the leave_stopped member.
9979 (linux_resume): Adjust to the target resume interface change.
9980 * spu-low.c (spu_resume): Adjust to the target resume interface
9981 change.
9982 * win32-low.c (win32_detach, win32_resume): Ditto.
9983
9984 2009-04-01 Pedro Alves <pedro@codesourcery.com>
9985
9986 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
9987 flag.
9988 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
9989 pending.
9990 (linux_continue_one_thread): Only preserve the stepping flag if
9991 there's a pending breakpoint.
9992
9993 2009-03-31 Pedro Alves <pedro@codesourcery.com>
9994
9995 * server.c (main): After the inferior having exited, call
9996 remote_close before exiting gdbserver.
9997
9998 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
9999
10000 Fix size of FPSCR in Power 7 processors.
10001 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
10002 (PPC_FEATURE_HAS_DFP): New #define.
10003 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
10004 size of the FPSCR.
10005
10006 2009-03-23 Pedro Alves <pedro@codesourcery.com>
10007
10008 * server.c (handle_query) Whitespace and formatting.
10009
10010 2009-03-22 Pedro Alves <pedro@codesourcery.com>
10011
10012 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
10013 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
10014 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
10015 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
10016 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
10017 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
10018 Makefile.in, configure.ac: Fix whitespace throughout.
10019 * configure: Regenerate.
10020
10021 2009-03-22 Pedro Alves <pedro@codesourcery.com>
10022
10023 * inferiors.c (find_inferior): Make it safe for the callback
10024 function to delete the currently iterated inferior.
10025
10026 2009-03-22 Pedro Alves <pedro@codesourcery.com>
10027
10028 * Makefile.in (linuw_low_h): Move higher.
10029 (thread-db.o): Depend on $(linux_low_h).
10030
10031 2009-03-17 Pedro Alves <pedro@codesourcery.com>
10032
10033 Rename "process" to "lwp" throughout.
10034
10035 * linux-low.c (all_processes): Rename to...
10036 (all_lwps): ... this.
10037 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
10038 (add_process): Rename to ...
10039 (add_lwp): ... this. Adjust.
10040 (linux_create_inferior): Adjust.
10041 (linux_attach_lwp): Adjust.
10042 (linux_attach): Adjust.
10043 (linux_kill_one_process): Rename to ...
10044 (linux_kill_one_lwp): ... this. Adjust.
10045 (linux_kill): Adjust.
10046 (linux_detach_one_process): Rename to ...
10047 (linux_detach_one_lwp): ... this. Adjust.
10048 (linux_detach): Adjust.
10049 (check_removed_breakpoint): Adjust.
10050 (status_pending_p): Adjust.
10051 (linux_wait_for_process): Rename to ...
10052 (linux_wait_for_lwp): ... this. Adjust.
10053 (linux_wait_for_event): Adjust.
10054 (send_sigstop): Adjust.
10055 (wait_for_sigstop): Adjust.
10056 (stop_all_processes): Rename to ...
10057 (stop_all_lwps): ... this.
10058 (linux_resume_one_process): Rename to ...
10059 (linux_resume_one_lwp): ... this. Adjust.
10060 (linux_set_resume_request, linux_continue_one_thread)
10061 (linux_queue_one_thread, resume_status_pending_p)
10062 (usr_store_inferior_registers, regsets_store_inferior_registers)
10063 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
10064 Adjust.
10065 * linux-low.h (get_process): Rename to ...
10066 (get_lwp): ... this. Adjust.
10067 (get_thread_process): Rename to ...
10068 (get_thread_lwp): ... this. Adjust.
10069 (get_process_thread): Rename to ...
10070 (get_lwp_thread): ... this. Adjust.
10071 (struct process_info): Rename to ...
10072 (struct lwp_info): ... this.
10073 (all_processes): Rename to ...
10074 (all_lwps): ... this.
10075 * proc-service.c (ps_lgetregs): Adjust.
10076 * thread-db.c (thread_db_create_event, find_one_thread)
10077 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
10078
10079 2009-03-14 Pedro Alves <pedro@codesourcery.com>
10080
10081 * server.c (handle_query): Handle "qAttached".
10082
10083 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
10084
10085 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
10086 GPLv3, update license URL.
10087
10088 2009-03-01 Doug Evans <dje@google.com>
10089
10090 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
10091 (server_h): Add gdb_signals.h.
10092 (signals.o): Update.
10093 * server.h (target_signal_from_host,target_signal_to_host_p)
10094 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
10095
10096 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
10097
10098 * remote-utils.c (getpkt): Also generate remote-debug
10099 information if noack_mode is set.
10100
10101 2009-02-06 Pedro Alves <pedro@codesourcery.com>
10102
10103 * server.c (handle_query): Report qXfer:siginfo:read and
10104 qXfer:siginfo:write as supported and handle them.
10105 * target.h (struct target_ops) <qxfer_siginfo>: New field.
10106 * linux-low.c (linux_xfer_siginfo): New.
10107 (linux_target_ops): Set it.
10108
10109 2009-01-26 Pedro Alves <pedro@codesourcery.com>
10110
10111 * server.c (gdbserver_usage): Mention --remote-debug.
10112 (main): Accept '--remote-debug' switch.
10113
10114 2009-01-18 Doug Evans <dje@google.com>
10115
10116 * regcache.c (new_register_cache): No need to check result of xcalloc.
10117 * server.c (handle_search_memory): Back out calls to xmalloc,
10118 result is checked and error is returned to user upon failure.
10119 (handle_query): Ditto. Add more checks for result of malloc.
10120 (handle_v_cont): Check result of malloc, report error back to
10121 user upon failure.
10122 (handle_v_run): Ditto. Call freeargv.
10123 * server.h (freeargv): Declare.
10124 * utils.c (freeargv): New fn.
10125
10126 2009-01-15 Doug Evans <dje@google.com>
10127
10128 * gdbreplay.c (perror_with_name): Make arg const char *.
10129 * server.h (target_signal_to_name): Make return type const char *.
10130 * thread-db.c (thread_db_err_str): Make return type const char *.
10131 * utils.c (perror_with_name): Make arg const char *.
10132
10133 2009-01-14 Pedro Alves <pedro@codesourcery.com>
10134
10135 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
10136 when handling a EXIT_PROCESS_DEBUG_EVENT.
10137
10138 2009-01-06 Joel Brobecker <brobecker@adacore.com>
10139
10140 * gdbreplay.c (gdbreplay_version): Update copyright year.
10141 * server.c (gdbserver_version): Likewise.
10142
10143 2009-01-05 Doug Evans <dje@google.com>
10144
10145 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
10146 (handle_extended_wait): Improve comment.
10147
10148 2008-12-13 Doug Evans <dje@google.com>
10149
10150 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
10151 * server.h (ATTR_MALLOC): New macro.
10152 (xmalloc,xcalloc,xstrdup): Declare.
10153 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
10154 * inferiors.c: Ditto.
10155 * linux-low.c: Ditto.
10156 * mem-break.c: Ditto.
10157 * regcache.c: Ditto.
10158 * remote-utils.c: Ditto.
10159 * server.c: Ditto.
10160 * target.c: Ditto.
10161 * win32-low.c: Ditto.
10162
10163 2008-12-12 Doug Evans <dje@google.com>
10164
10165 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
10166 in debugging printf.
10167
10168 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
10169
10170 2008-12-09 Doug Evans <dje@google.com>
10171
10172 * linux-low.h (struct process_info): Delete member tid, unused.
10173 * thread-db.c (find_one_thread): Update.
10174 (maybe_attach_thread): Update.
10175
10176 2008-12-02 Pedro Alves <pedro@codesourcery.com>
10177
10178 * target.h (struct target_ops): Add qxfer_osdata member.
10179 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
10180 and dirent.h.
10181 (linux_qxfer_osdata): New functions.
10182 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
10183 callback.
10184 * server.c (handle_query): Handle "qXfer:osdata:read:".
10185 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
10186 (buffer_xml_printf): New functions.
10187 * server.h (struct buffer): New.
10188 (buffer_grow_str, buffer_grow_str0): New macros.
10189 (buffer_grow, buffer_free, buffer_init, buffer_finish)
10190 (buffer_xml_printf): Declare.
10191
10192 2008-11-24 Doug Evans <dje@google.com>
10193
10194 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
10195
10196 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
10197
10198 * server.c (handle_v_run): Always use the supplied argument list.
10199
10200 2008-11-19 Bob Wilson <bob.wilson@acm.org>
10201
10202 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
10203 (xtensa_regmap_table): Add entry for scompare1.
10204
10205 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
10206
10207 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
10208 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
10209 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
10210 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
10211 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
10212 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
10213 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
10214 XML target descriptions.
10215 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
10216 when inferior is running on an ISA 2.05 or later processor. Add
10217 special case to return offset for full 64-bit slot of FPSCR when
10218 in 32-bits.
10219
10220 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
10221
10222 * Makefile.in (SFILES, clean): Added sparc64 files.
10223 (reg-sparc64.o, reg-sparc64.c): New.
10224 * configure.srv (sparc*-*-linux*): New configuration.
10225 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
10226 syscall arguments for SPARC.
10227 (regsets_store_inferior_registers): Likewise.
10228 * linux-sparc-low.c: New file.
10229
10230 2008-10-21 Doug Evans <dje@google.com>
10231
10232 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
10233 (READLINE_DIR,READLINE_DEP): Delete.
10234 (INTERNAL_CFLAGS): Update.
10235 (LINTFLAGS): Update.
10236
10237 2008-10-10 Pedro Alves <pedro@codesourcery.com>
10238
10239 * server.c (handle_v_run): If GDB didn't specify an argv, use the
10240 whole argv from the last run, not just argv[0].
10241
10242 2008-09-08 Pedro Alves <pedro@codesourcery.com>
10243
10244 * regcache.c (new_register_cache): Return NULL if the register
10245 cache size isn't known yet.
10246 (free_register_cache): Avoid dereferencing a NULL regcache.
10247
10248 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
10249
10250 * configure.srv: Merge MIPS and MIPS64.
10251
10252 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
10253
10254 * Makefile.in (uninstall): Apply $(EXEEXT) too.
10255
10256 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
10257
10258 * Makefile.in: Add required vsx dependencies.
10259
10260 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
10261 Declare init_registers_powerpc_vsx32l.
10262 Declare init_registers_powerpc_vsx64l.
10263 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
10264 (ppc_arch_setup): Check for VSX in hwcap.
10265 (ppc_fill_vsxregset): New function.
10266 (ppc_store_vsxregset): New function.
10267 Add new VSX entry in regset_info target_regsets.
10268
10269 * configure.srv: Add new VSX dependencies.
10270
10271 2008-08-12 Pedro Alves <pedro@codesourcery.com>
10272
10273 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
10274 (remote_open): Set or clear transport_is_reliable.
10275 (putpkt_binary): Don't expect acks in noack mode.
10276 (getpkt): Don't send ack/nac in noack mode.
10277 * server.c (handle_general_set): Handle QStartNoAckMode.
10278 (handle_query): If connected by tcp pass QStartNoAckMode+ in
10279 qSupported.
10280 (main): Reset noack_mode on every connection.
10281 * server.h (noack_mode): Declare.
10282
10283 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
10284
10285 * Makefile.in (GDBREPLAY_OBS): New variable.
10286 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
10287
10288 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
10289 Daniel Jacobowitz <dan@codesourcery.com>
10290
10291 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
10292 (usr_store_inferior_registers): Likewise.
10293 (regsets_store_inferior_registers): Likewise.
10294
10295 2008-07-31 Rolf Jansen <rj@surtec.com>
10296 Pedro Alves <pedro@codesourcery.com>
10297
10298 * configure.ac: Check for memmem declaration.
10299 * server.c [HAVE_MALLOC_H]: Include malloc.h.
10300 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
10301 (disable_packet_qfThreadInfo): Unconditionally compile.
10302 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
10303 * configure, config.in: Regenerate.
10304
10305 2008-07-28 Doug Kwan <dougkwan@google.com>
10306
10307 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
10308 (linux_write_memory): Remove declaration of errno.
10309
10310 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
10311
10312 * linux-low.c (handle_extended_wait): Do not use "status"
10313 variable uninitialized.
10314
10315 2008-07-07 Pedro Alves <pedro@codesourcery.com>
10316
10317 * server.c (handle_v_attach): Inhibit reporting dll changes.
10318
10319 2008-06-27 Pedro Alves <pedro@codesourcery.com>
10320
10321 * remote-utils.c (prepare_resume_reply): If requested, don't
10322 output "thread:TID" in the T stop reply.
10323
10324 * server.c (disable_packet_vCont, disable_packet_Tthread)
10325 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
10326 (handle_query): If requested, disable support for qC, qfThreadInfo
10327 and qsThreadInfo.
10328 (handle_v_requests): If requested, disable support for vCont.
10329 (gdbserver_show_disableable): New.
10330 (main): Handle --disable-packet and --disable-packet=LIST.
10331
10332 * server.h (disable_packet_vCont, disable_packet_Tthread)
10333 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
10334
10335 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
10336
10337 * server.c (gdbserver_usage): Mention --version.
10338
10339 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
10340
10341 * Makefile.in (gdbreplay.o): New rule.
10342
10343 2008-06-06 Joseph Myers <joseph@codesourcery.com>
10344
10345 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
10346 message, not gdbserver.
10347
10348 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
10349 Nathan Sidwell <nathan@codesourcery.com>
10350 Joseph Myers <joseph@codesourcery.com>
10351
10352 * acinclude.m4: Include ../../config/acx.m4.
10353 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
10354 * configure, config.in: Regenerate.
10355 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
10356 * server.c (gdbserver_version): Print PKGVERSION.
10357 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
10358 (main): Adjust gdbserver_usage calls.
10359 * gdbreplay.c (version, host_name): Add declarations.
10360 (gdbreplay_version, gdbreplay_usage): New.
10361 (main): Accept --version and --help options.
10362
10363 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
10364
10365 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
10366 (arm_breakpoint_at): Handle Thumb.
10367 (the_low_target): Add comment.
10368
10369 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
10370
10371 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
10372
10373 2008-05-09 Doug Evans <dje@google.com>
10374
10375 * server.h (decode_search_memory_packet): Declare.
10376 * remote-utils.c (decode_search_memory_packet): New fn.
10377 * server.c (handle_search_memory_1): New fn.
10378 (handle_search_memory): New fn.
10379 (handle_query): Process qSearch:memory packets.
10380
10381 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
10382
10383 * regcache.c (registers_length): Remove.
10384 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
10385 full register packet.
10386 * regcache.h (registers_length): Remove prototype.
10387 * server.h (PBUFSIZ): Define to 16384.
10388
10389 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
10390
10391 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
10392 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
10393 powerpc-64l.o, and powerpc-altivec64l.o.
10394 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
10395 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
10396 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
10397 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
10398 rs6000/power-linux.xml, and rs6000/power64-linux.xml
10399 to srv_xmlfiles.
10400
10401 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
10402 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
10403 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
10404 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
10405 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
10406 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
10407 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
10408 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
10409 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
10410 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
10411 (clean): Update.
10412
10413 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
10414 (init_registers_powerpc_32l): ... this new prototype.
10415 (init_registers_powerpc_32): Remove, replace by ...
10416 (init_registers_powerpc_altivec32l): ... this new prototype.
10417 (init_registers_powerpc_e500): Remove, replace by ...
10418 (init_registers_powerpc_e500l): ... this new prototype.
10419 (init_registers_ppc64): Remove, replace by ...
10420 (init_registers_powerpc_64l): ... this new prototype.
10421 (init_registers_powerpc_64): Remove, replace by ...
10422 (init_registers_powerpc_altivec64l): ... this new prototype.
10423 (ppc_num_regs): Set to 73.
10424 (PT_ORIG_R3, PT_TRAP): Define if necessary.
10425 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
10426 (ppc_cannot_store_register): Handle orig_r3 and trap.
10427 (ppc_arch_setup): Update init_registers_... calls.
10428 (ppc_fill_gregset): Handle orig_r3 and trap.
10429
10430 * inferiors.c (clear_inferiors): Reset current_inferior.
10431
10432 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
10433
10434 * acinclude.m4: Add override.m4.
10435 * configure: Regenerate.
10436
10437 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
10438
10439 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
10440 initial call to init_register_ppc64.
10441
10442 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
10443
10444 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
10445 single powerpc*-*-linux* case.
10446 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
10447
10448 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
10449
10450 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
10451 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
10452 from reg_xmlfiles.
10453 * linux-ppc-low.c: Include <elf.h>.
10454 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
10455 (ppc_hwcap): New global variable.
10456 (ppc_regmap): Remove __SPE__ #ifdef sections.
10457 (ppc_regmap_e500): New global variable.
10458 (ppc_cannot_store_register): Update __SPE__ special case.
10459 (ppc_get_hwcap): New function.
10460 (ppc_arch_setup): Use it to determine whether inferior supports
10461 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
10462 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
10463 Do not access registers if target does not support AltiVec.
10464 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
10465 Do not access registers if target does not support SPE.
10466 (target_regsets): Unconditionally include AltiVec and SPE regsets.
10467
10468 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
10469
10470 * linux-low.c (disabled_regsets, num_regsets): New.
10471 (use_regsets_p): Delete.
10472 (linux_wait_for_process): Clear disabled_regsets.
10473 (regsets_fetch_inferior_registers): Check and set it.
10474 (regsets_store_inferior_registers): Likewise.
10475 (linux_fetch_registers, linux_store_registers): Do not use
10476 use_regsets_p.
10477 (initialize_low): Allocate disabled_regsets.
10478
10479 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
10480
10481 * Makefile.in (LIBOBJS): New.
10482 (OBS): Use LIBOBJS.
10483 (memmem.o): New rule.
10484 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
10485 * configure: Regenerated.
10486
10487 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
10488
10489 * server.c (handle_query): Never return "unsupported" for
10490 qXfer:features:read queries.
10491
10492 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
10493
10494 * server.c (get_features_xml): Fix inverted condition.
10495 (handle_query): Always support qXfer:feature:read.
10496
10497 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
10498
10499 * server.c (wrapper_argv): New.
10500 (start_inferior): Handle wrapper_argv. If set, expect an extra
10501 trap.
10502 (gdbserver_usage): Document --wrapper.
10503 (main): Parse --wrapper.
10504
10505 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10506
10507 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
10508 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
10509 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
10510 (ppc_set_pc): Likewise.
10511 (ppc_arch_setup): New function.
10512 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
10513 of collect_register.
10514 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
10515
10516 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10517
10518 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
10519 instead of linux-ppc64-low.o.
10520 * linux-ppc64-low.c: Remove file.
10521 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
10522 (linux-ppc64-low.o): Remove rule.
10523
10524 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
10525 (init_registers_powerpc_64): Likewise.
10526 (ppc_regmap): Conditionally define depending on __powerpc64__.
10527 (ppc_cannot_store_register): Do not special-case "fpscr" when
10528 compiled on __powerpc64__.
10529 (ppc_collect_ptrace_register): New function.
10530 (ppc_supply_ptrace_register): New function.
10531 (ppc_breakpoint): Change type to "unsigned int".
10532 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
10533 (the_low_target): Conditionally provide initializers for the
10534 arch_setup member depending on __powerpc64__. Install
10535 collect_ptrace_register and supply_ptrace_register members.
10536
10537 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10538
10539 * regcache.h (gdbserver_xmltarget): Add extern declaration.
10540 * server.c (gdbserver_xmltarget): Define.
10541 (get_features_xml): Use it to replace "target.xml" and arch_string.
10542
10543 * configure.srv: Remove srv_xmltarget. Add XML files that were
10544 mentioned there to srv_xmlfiles instead. Remove conditional tests
10545 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
10546 srv_xmlfiles and srv_regobj to include all possible choices.
10547 * configure.ac (srv_xmltarget): Remove.
10548 (srv_xmlfiles): Do not add "target.xml".
10549 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
10550 checks for supplementary target information.
10551 * configure: Regenerate.
10552 * Makefile.in (XML_TARGET): Remove.
10553 (target.xml): Remove rule.
10554 (clean): Do not clean up target.xml.
10555 (.PRECIOUS): Do not mention target.xml.
10556
10557 * target.h (struct target_ops): Remove arch_string member.
10558 * linux-low.c (linux_arch_string): Remove.
10559 (linux_target_ops): Remove arch_string initializer.
10560 * linux-low.h (struct linux_target_ops): Remove arch_string member.
10561 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
10562 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
10563 * spu-low.c (spu_arch_string): Remove.
10564 (spu_target_ops): Remove arch_string initializer.
10565 * win32-low.c (win32_arch_string): Remove.
10566 (win32_target_ops): Remove arch_string initializer.
10567 * win32-low.h (struct win32_target_ops): Remove arch_string member.
10568 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
10569 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
10570
10571 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
10572
10573 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
10574 by collect_ptrace_register and supply_ptrace_register hooks.
10575 * linux-low.c (fetch_register): Use supply_ptrace_register callback
10576 instead of checking for the_low_target.left_pad_xfer.
10577 (usr_store_inferior_registers): Use collect_ptrace_register callback
10578 instead of checking for the_low_target.left_pad_xfer.
10579
10580 * linux-s390-low.c (s390_collect_ptrace_register): New function.
10581 (s390_supply_ptrace_register): Likewise.
10582 (s390_fill_gregset): Call s390_collect_ptrace_register.
10583 (the_low_target): Update.
10584
10585 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
10586 (ppc_supply_ptrace_register): Likewise.
10587 (the_low_target): Update.
10588
10589 * linux-i386-low.c (the_low_target): Update.
10590 * linux-x86-64-low.c (the_low_target): Update.
10591
10592 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
10593
10594 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
10595 reg-s390.o and reg-s390x.o.
10596
10597 * linux-low.c (new_inferior): New global variable.
10598 (linux_create_inferior, linux_attach): Set it.
10599 (linux_wait_for_process): Call the_low_target.arch_setup after the
10600 target has stopped for the first time.
10601 (initialize_low): Do not call the_low_target.arch_setup.
10602
10603 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
10604 (s390_set_pc): Likewise.
10605 (s390_arch_setup): New function.
10606 (the_low_target): Use s390_arch_setup as arch_setup routine.
10607
10608 * regcache.c (realloc_register_cache): New function.
10609 (set_register_cache): Call it for each existing regcache.
10610
10611 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
10612
10613 * server.h (init_registers): Remove prototype.
10614
10615 * linux-low.h (struct linux_target_ops): Add arch_setup field.
10616 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
10617 instead of init_registers ().
10618 * linux-arm-low.c (init_registers_arm): Add prototype.
10619 (init_registers_arm_with_iwmmxt): Likewise.
10620 (the_low_target): Add initializer for arch_setup field.
10621 * linux-cris-low.c (init_registers_cris): Add prototype.
10622 (the_low_target): Add initializer for arch_setup field.
10623 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
10624 (the_low_target): Add initializer for arch_setup field.
10625 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
10626 (the_low_target): Add initializer for arch_setup field.
10627 * linux-ia64-low.c (init_registers_ia64): Add prototype.
10628 (the_low_target): Add initializer for arch_setup field.
10629 * linux-m32r-low.c (init_registers_m32r): Add prototype.
10630 (the_low_target): Add initializer for arch_setup field.
10631 * linux-m68k-low.c (init_registers_m68k): Add prototype.
10632 (the_low_target): Add initializer for arch_setup field.
10633 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
10634 (init_registers_mips64_linux): Likewise.
10635 (the_low_target): Add initializer for arch_setup field.
10636 * linux-ppc-low.c (init_registers_ppc): Add prototype.
10637 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
10638 (the_low_target): Add initializer for arch_setup field.
10639 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
10640 (init_registers_powerpc_64): Likewise.
10641 (the_low_target): Add initializer for arch_setup field.
10642 * linux-s390-low.c (init_registers_s390): Add prototype.
10643 (init_registers_s390x): Likewise.
10644 (the_low_target): Add initializer for arch_setup field.
10645 * linux-sh-low.c (init_registers_sh): Add prototype.
10646 (the_low_target): Add initializer for arch_setup field.
10647 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
10648 (the_low_target): Add initializer for arch_setup field.
10649 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
10650 (the_low_target): Add initializer for arch_setup field.
10651
10652 * win32-low.h (struct win32_target_ops): Add arch_setup field.
10653 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
10654 instead of init_registers ().
10655 * win32-arm-low.c (init_registers_arm): Add prototype.
10656 (the_low_target): Add initializer for arch_setup field.
10657 * win32-i386-low.c (init_registers_i386): Add prototype.
10658 (the_low_target): Add initializer for arch_setup field.
10659
10660 * spu-low.c (init_registers_spu): Add prototype.
10661 (initialize_low): Call initialie_registers_spu () instead of
10662 initialize_registers ().
10663
10664 2008-02-19 Pedro Alves <pedro@codesourcery.com>
10665
10666 * server.c (handle_v_requests): When handling the vRun and vAttach
10667 packets, if already debugging a process, don't kill it. Return an
10668 error instead.
10669
10670 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
10671
10672 * server.c (handle_query): Correct length check.
10673
10674 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
10675
10676 * win32-low.c (do_initial_child_stuff): Add process handle
10677 parameter. Set current_process_handle and current_process_id from the
10678 parameters. Clear globals.
10679 (win32_create_inferior): Don't set current_process_handle and
10680 current_process_id here. Instead pass them on the call to
10681 do_initial_child_stuff.
10682 (win32_attach): Likewise.
10683 (win32_clear_inferiors): New.
10684 (win32_kill): Don't close the current process handle or the
10685 current thread handle here. Instead call win32_clear_inferiors.
10686 (win32_detach): Don't open a new handle to the process. Call
10687 win32_clear_inferiors.
10688 (win32_join): Don't rely on current_process_handle; open a new
10689 handle using the process id.
10690 (win32_wait): Call win32_clear_inferiors when the inferior process
10691 has exited.
10692
10693 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
10694
10695 * server.c (monitor_show_help): Add "exit".
10696
10697 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
10698
10699 * Makefile.in (SFILES): Add linux-xtensa-low.c.
10700 (clean): Add reg-xtensa.c.
10701 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
10702 * configure.srv (xtensa*-*-linux*) New target.
10703 * linux-xtensa-low.c: New.
10704 * xtensa-xtregs.c: New.
10705
10706 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
10707
10708 * hostio.c: Don't include errno.h.
10709 (errno_to_fileio_errno): Move to hostio-errno.
10710 * hostio.c: (hostio_error): Remove the error parameter. Defer the
10711 error number outputting to the target->hostio_last_error callback.
10712 (hostio_packet_error): Use FILEIO_EINVAL directly.
10713 (handle_open, handle_pread, hostio_error, handle_unlink): Update
10714 calls to hostio_error.
10715 * hostio-errno.c: New.
10716 * server.h (hostio_last_error_from_errno): Declare.
10717 * target.h (target_ops): Add hostio_last_error member.
10718 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
10719 as hostio_last_error handler.
10720 * spu-low.c (spu_target_ops): Likewise.
10721 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
10722 (wince_hostio_last_error): New functions.
10723 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
10724 as hostio_last_error handler.
10725 (win32_target_ops) [!_WIN32_WCE]: Register
10726 hostio_last_error_from_errno as hostio_last_error handler.
10727 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
10728 (hostio-errno.o): New rule.
10729 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
10730 * configure.srv (srv_hostio_err_objs): New variable. Default to
10731 hostio-errno.o.
10732 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
10733 * configure: Regenerate.
10734
10735 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
10736
10737 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
10738 (linux_kill, linux_detach): Clean up the process list.
10739 * remote-utils.c (remote_open): Improve port number parsing.
10740 (putpkt_binary, input_interrupt): Only send interrupts if the target
10741 is running.
10742 * server.c (extended_protocol): Make static.
10743 (attached): Define earlier.
10744 (exit_requested, response_needed, program_argv): New variables.
10745 (target_running): New.
10746 (start_inferior): Clear attached here.
10747 (attach_inferior): Set attached here.
10748 (require_running): Define.
10749 (handle_query): Use require_running and target_running. Implement
10750 "monitor exit".
10751 (handle_v_attach, handle_v_run): New.
10752 (handle_v_requests): Use require_running. Handle vAttach and vRun.
10753 (gdbserver_usage): Update.
10754 (main): Redo argument parsing. Handle --debug and --multi. Handle
10755 --attach along with other options or after the port. Save
10756 program_argv. Support no initial program. Resynchronize
10757 communication with GDB after an error. Handle "monitor exit".
10758 Use require_running and target_running. Always allow the extended
10759 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
10760 restart in extended mode.
10761 * README: Refer to the GDB manual. Update --attach usage.
10762
10763 2007-12-20 Andreas Schwab <schwab@suse.de>
10764
10765 * linux-low.c (STACK_SIZE): Define.
10766 (linux_tracefork_child): Use it. Use __clone2 on ia64.
10767 (linux_test_for_tracefork): Likewise.
10768
10769 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
10770
10771 * linux-low.c (linux_wait_for_event): Update messages. Do not
10772 reinsert auto-delete breakpoints.
10773 * mem-break.c (struct breakpoint): Change return type of handler to
10774 int.
10775 (set_breakpoint_at): Update handler type.
10776 (reinsert_breakpoint_handler): Return 1 instead of calling
10777 delete_breakpoint.
10778 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
10779 setting a new one.
10780 (check_breakpoints): Delete auto-delete breakpoints and return 2.
10781 * mem-break.h (set_breakpoint_at): Update handler type.
10782 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
10783 * win32-low.c (auto_delete_breakpoint): New.
10784 (get_child_debug_event): Use it.
10785
10786 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
10787
10788 * configure.ac: Check for pread and pwrite.
10789 * hostio.c (handle_pread): Fall back to lseek and read.
10790 (handle_pwrite): Fall back to lseek and write.
10791 * config.in, configure: Regenerated.
10792
10793 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
10794
10795 * server.c (myresume): Add own_buf argument.
10796 (main): Update calls.
10797
10798 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
10799
10800 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
10801 * remote-utils.c (remote_open): Do not call disable_async_io.
10802 (block_async_io): Delete.
10803 (unblock_async_io): Make static.
10804 (initialize_async_io): New.
10805 * server.c (handle_v_cont): Handle async I/O here.
10806 (myresume): Likewise. Move other common resume tasks here...
10807 (main): ... from here. Call initialize_async_io. Disable async
10808 I/O before the main loop.
10809 * server.h (initialize_async_io): Declare.
10810 (block_async_io, unblock_async_io): Delete prototypes.
10811 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
10812
10813 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
10814
10815 * remote-utils.c (readchar): Allow binary data in received messages.
10816
10817 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10818
10819 * win32-low.c (attaching): New global.
10820 (win32_create_inferior): Clear the `attaching' global.
10821 (win32_attach): Set the `attaching' global.
10822 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
10823 attaching. Only set a breakpoint at the entry point if not
10824 attaching.
10825
10826 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10827
10828 * server.c (main): Don't report dll events on the initial
10829 connection on attaches.
10830
10831 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10832
10833 * server.c (main): Relax numerical bases supported for the pid of
10834 the --attach command line argument.
10835
10836 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10837
10838 * win32-low.c (win32_attach): Call OpenProcess before
10839 DebugActiveProcess, not after. Add last error output to error
10840 call.
10841
10842 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10843
10844 * win32-low.c (win32_get_thread_context)
10845 (win32_set_thread_context): New functions.
10846 (thread_rec): Use win32_get_thread_context.
10847 (continue_one_thread, win32_resume): Use win32_set_thread_context.
10848 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
10849 field.
10850
10851 2007-12-03 Leo Zayas
10852 Pedro Alves <pedro_alves@portugalmail.pt>
10853
10854 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
10855 global variables.
10856 (child_add_thread): Minor cleanup.
10857 (child_continue): Resume artificially suspended threads before
10858 calling ContinueDebugEvent.
10859 (suspend_one_thread): New.
10860 (fake_breakpoint_event): New.
10861 (get_child_debug_event): Change return type to int. Check here if
10862 gdb sent an interrupt request. If a soft interrupt was requested,
10863 fake a breakpoint event. Return 0 if there is no event to handle,
10864 and 1 otherwise.
10865 (win32_wait): Don't check here if gdb sent an interrupt request.
10866 Ensure there is a valid event to handle.
10867 (win32_request_interrupt): Add soft interruption method as last
10868 resort.
10869
10870 2007-12-03 Leo Zayas
10871 Pedro Alves <pedro_alves@portugalmail.pt>
10872
10873 * win32-low.h (win32_thread_info): Add descriptions to the
10874 structure members. Replace `suspend_count' counter by a
10875 `suspended' flag.
10876 * win32-low.c (thread_rec): Update condition of when to get the
10877 context from the inferior. Rely on ContextFlags being set if it
10878 has already been retrieved. Only suspend the inferior thread if
10879 we haven't already. Warn if that fails.
10880 (continue_one_thread): s/suspend_count/suspended/. Only call
10881 ResumeThread once. Warn if that fails.
10882
10883 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
10884
10885 * win32-low.c (win32_wait): Don't read from the inferior when it
10886 has already exited.
10887
10888 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
10889
10890 * Makefile.in (win32_low_h): New variable.
10891 (win32-low.o): Add dependency on $(win32_low_h).
10892 (win32-arm-low.o, win32-i386-low.o): New rules.
10893
10894 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
10895
10896 * hostio.c: Correct copyright year.
10897
10898 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
10899
10900 * Makefile.in (OBS): Add hostio.o.
10901 (hostio.o): New rule.
10902 * server.h (handle_vFile): Declare.
10903 * hostio.c: New file.
10904 * server.c (handle_v_requests): Take packet_len and new_packet_len
10905 for binary packets. Call handle_vFile.
10906 (main): Update call to handle_v_requests.
10907
10908 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
10909
10910 * linux-low.c: Include <sched.h>.
10911
10912 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
10913
10914 * linux-low.c (linux_tracefork_grandchild): New.
10915 (linux_tracefork_child): Use clone.
10916 (linux_test_for_tracefork): Use clone; allocate and free a stack.
10917
10918 2007-10-31 Joel Brobecker <brobecker@adacore.com>
10919
10920 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
10921
10922 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
10923
10924 * linux-low.c (handle_extended_wait): Handle unexpected signals.
10925
10926 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
10927
10928 * inferiors.c (change_inferior_id): Delete.
10929 (add_pid_to_list, pull_pid_from_list): New.
10930 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
10931 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
10932 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
10933 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
10934 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
10935 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
10936 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
10937 (using_threads): Always set to 1.
10938 (handle_extended_wait): New.
10939 (add_process): Do not set TID.
10940 (linux_create_inferior): Set must_set_ptrace_flags.
10941 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
10942 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
10943 (linux_thread_alive): Rename TID argument to LWPID.
10944 (linux_wait_for_process): Handle unknown processes. Do not use TID.
10945 (linux_wait_for_event): Do not use TID or check using_threads. Update
10946 call to dead_thread_notify. Call handle_extended_wait.
10947 (linux_create_inferior): Use PTRACE_SETOPTIONS.
10948 (send_sigstop): Delete sigstop_sent.
10949 (wait_for_sigstop): Avoid TID.
10950 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
10951 (linux_test_for_tracefork): New.
10952 (linux_lookup_signals): Use thread_db_active and
10953 linux_supports_tracefork_flag.
10954 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
10955 * linux-low.h (get_process_thread): Avoid TID.
10956 (struct process_ifo): Move thread_known and tid to the end. Remove
10957 sigstop_sent.
10958 (linux_attach_lwp, thread_db_init): Update prototypes.
10959 * server.h (change_inferior_id): Delete prototype.
10960 (add_pid_to_list, pull_pid_from_list): New prototypes.
10961 * thread-db.c (thread_db_use_events): New.
10962 (find_first_thread): Rename to...
10963 (find_one_thread): ...this. Update callers and messages. Do not
10964 call fatal. Check thread_db_use_events. Do not call
10965 change_inferior_id or new_thread_notify.
10966 (maybe_attach_thread): Update. Do not call new_thread_notify.
10967 (thread_db_init): Set thread_db_use_events. Check use_events.
10968 * utils.c (fatal, warning): Correct message prefix.
10969
10970 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
10971
10972 * Makefile.in (clean): Remove new files.
10973 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
10974 (powerpc-64.o, powerpc-64.c): New rules.
10975 * configure.srv: Use alternate register sets for powerpc64-*-linux*
10976 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
10977 with SPE.
10978 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
10979 SPE targets.
10980 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
10981 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
10982 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
10983 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
10984 (target_regsets): Add AltiVec and SPE register sets.
10985 * configure.ac: Check for AltiVec and SPE.
10986 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
10987 (ppc_fill_vrregset, ppc_store_vrregset): New.
10988 (target_regsets): Add AltiVec register set.
10989 * configure: Regenerated.
10990
10991 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
10992
10993 * linux-low.c (O_LARGEFILE): Define.
10994 (linux_read_memory): Use /proc/PID/mem.
10995 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
10996 * configure, config.in: Regenerated.
10997
10998 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
10999
11000 * linux-low.c (linux_wait_for_event): Do not pass signals while
11001 single-stepping.
11002
11003 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
11004
11005 * win32-low.c (create_process): New.
11006 (win32_create_inferior): Use create_process instead of
11007 CreateProcess. If create_process failed retry appending an ".exe"
11008 suffix. Store the GetLastError result immediatelly after
11009 create_process calls and use it on the call to error.
11010
11011 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
11012
11013 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
11014
11015 2007-08-23 Joel Brobecker <brobecker@adacore.com>
11016
11017 * configure.ac: Switch license to GPLv3.
11018
11019 2007-08-01 Michael Snyder <msnyder@access-company.com>
11020
11021 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
11022
11023 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
11024
11025 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
11026 typedef.
11027 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
11028 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
11029 CloseToolhelp32Snapshot.
11030 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
11031 CloseToolhelp32Snapshot.
11032
11033 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
11034
11035 * server.c (main): Check for inferior exit before main loop.
11036
11037 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
11038
11039 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
11040 instead of on tmp_desc.
11041
11042 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
11043 Daniel Jacobowitz <dan@codesourcery.com>
11044
11045 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
11046 (add_thread): Minor cleanups.
11047 (clear_inferiors): Move lower in the file. Clear the DLL
11048 list.
11049 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
11050 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
11051 (xml_escape_text): New.
11052 * server.c (handle_query): Handle qXfer:libraries:read. Report it
11053 for qSupported.
11054 (handle_v_cont): Report errors.
11055 (gdbserver_version): Update.
11056 (main): Correct size of own_buf. Do not report initial DLL events.
11057 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
11058 (unloaded_dll, xml_escape_text): New.
11059 * win32-low.c (enum target_waitkind): Update comments.
11060 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
11061 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
11062 (win32_EnumProcessModules, win32_GetModuleInformation)
11063 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
11064 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
11065 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
11066 (win32_Module32First, win32_Module32Next, load_toolhelp)
11067 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
11068 (get_child_debug_event): Handle DLL events.
11069 (win32_wait): Likewise.
11070
11071 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
11072
11073 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
11074 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
11075
11076 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
11077
11078 * win32-low.c (handle_output_debug_string): Ignore event if not
11079 waiting.
11080
11081 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
11082
11083 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
11084
11085 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
11086
11087 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
11088
11089 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
11090
11091 * inferiors.c (change_inferior_id): Add comment.
11092 * linux-low.c (check_removed_breakpoint): Add an early
11093 prototype. Improve debug output.
11094 (linux_attach): Doc update.
11095 (linux_detach_one_process, linux_detach): Clean up before releasing
11096 each process.
11097 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
11098 * linux-low.h (struct process_info): Doc improvement.
11099 * mem-break.c (delete_all_breakpoints): New.
11100 * mem-break.h (delete_all_breakpoints): New prototype.
11101 * thread-db.c (find_first_thread): New.
11102 (thread_db_create_event): Call it instead of
11103 thread_db_find_new_threads. Clean up unused variables.
11104 (maybe_attach_thread): Remove first thread handling.
11105 (thread_db_find_new_threads): Use find_first_thread.
11106 (thread_db_get_tls_address): Likewise.
11107
11108 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
11109
11110 * thread-db.c (thread_db_find_new_threads): Add prototype.
11111 (thread_db_create_event): Check for the main thread before adding
11112 a new thread.
11113 (maybe_attach_thread): Only enable event reporting if TID == 0.
11114 (thread_db_get_tls_address): Check for new threads.
11115
11116 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
11117
11118 * linux-low.c (linux_create_inferior): Try execv before execvp.
11119 * spu-low.c (spu_create_inferior): Likewise.
11120
11121 2007-06-13 Mike Frysinger <vapier@gentoo.org>
11122
11123 * linux-low.c (linux_create_inferior): Change execv to execvp.
11124 * spu-low.c (spu_create_inferior): Likewies.
11125
11126 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
11127
11128 * Makefile.in (clean): Clean new files instead of deleted ones.
11129 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
11130 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
11131 rules.
11132 * configure.srv: Specify XML files and new regformats for MIPS and
11133 MIPS64 GNU/Linux.
11134 * linux-mips-low.c (mips_num_regs): Set to only used registers.
11135 (mips_regmap): Do not fetch $0. Remove unused registers. Add
11136 an entry for the restart register.
11137 (mips_cannot_fetch_register, mips_cannot_store_register)
11138 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
11139 register names to match the XML descriptions.
11140 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
11141 restart register instead of $0.
11142
11143 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
11144 Markus Deuling <deuling@de.ibm.com>
11145
11146 * remote-utils.c (decode_xfer_write): New function.
11147 * server.h (decode_xfer_write): Add prototype.
11148 * server.c (handle_query): Add PACKET_LEN argument. Support
11149 qXfer:spu:read and qXfer:spu:write packets.
11150 (main): Pass packet_len to handle_query.
11151 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
11152 * target.h (target_ops): Add qxfer_spu.
11153
11154 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
11155
11156 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
11157 accessing non-seekable spufs files.
11158
11159 2007-05-16 Markus Deuling <deuling@de.ibm.com>
11160
11161 * server.c (handle_query): Add reply for qC packet.
11162
11163 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11164 Leo Zayas <lerele@champenstudios@com>
11165
11166 * server.h (check_remote_input_interrupt_request): New function.
11167 * remote_utils.c (INVALID_DESCRIPTOR): New define.
11168 (remote_desc): Initialize with INVALID_DESCRIPTOR.
11169 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
11170 (check_remote_input_interrupt_request): New function.
11171 * server.h (check_remote_input_interrupt_request): Declare.
11172 * win32-low.c (winapi_DebugBreakProcess,
11173 winapi_GenerateConsoleCtrlEvent): New typedefs.
11174 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
11175 to 250 ms.
11176 (win32_wait): Check for remote interrupt request
11177 with check_remote_input_interrupt_request.
11178 (win32_request_interrupt): New function.
11179 (win32_target_op): Set request_interrupt to win32_request_interrupt.
11180
11181 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11182
11183 * win32-low.c (debug_registers_changed,
11184 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
11185 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
11186 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
11187 (thread_rec): Get context using the low target.
11188 (child_add_thread): Call thread_added on the low target,
11189 which does the same thing.
11190 (regptr): Delete.
11191 (do_initial_child_stuff): Remove debug registers references.
11192 Set context using the low target. Resume threads after
11193 setting the contexts.
11194 (child_continue): Remove dead variable. Remove debug
11195 registers references.
11196 (child_fetch_inferior_registers): Go through the low target.
11197 (do_child_store_inferior_registers): Remove.
11198 (child_store_inferior_registers): Go through the low target.
11199 (win32_resume): Remove debug registers references.
11200 Set context using the low target.
11201 (handle_exception): Change return type to void. Don't record
11202 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
11203 first chance exception.
11204 (get_child_debug_event): Change return type to void. Remove
11205 goto loop. Always return after waiting for debug event.
11206 (win32_wait): Convert to switch statement. Handle spurious
11207 events.
11208
11209 * win32-i386-low.c (debug_registers_changed,
11210 debug_registers_used): New.
11211 (initial_stuff): Rename to ...
11212 (i386_initial_stuff): ... this. Clear debug registers
11213 state variables.
11214 (store_debug_registers): Delete.
11215 (i386_get_thread_context): New.
11216 (load_debug_registers): Delete.
11217 (i386_set_thread_context): New.
11218 (i386_thread_added): New.
11219 (single_step): Rename to ...
11220 (i386_single_step): ... this.
11221 (do_fetch_inferior_registers): Rename to ...
11222 (i386_fetch_inferior_register): ... this.
11223 (i386_store_inferior_register): New.
11224 (the_low_target): Adapt to new interface.
11225
11226 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
11227 (arm_get_thread_context): New.
11228 (arm_set_thread_context): New.
11229 (regptr): New.
11230 (do_fetch_inferior_registers): Rename to ...
11231 (arm_fetch_inferior_register): ... this.
11232 (arm_store_inferior_register): New.
11233 (arm_wince_breakpoint): Reimplement as unsigned long.
11234 (arm_wince_breakpoint_len): Define.
11235 (the_low_target): Adapt to new interface.
11236
11237 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
11238 load_debug_registers. Add get_thread_context, set_thread_context,
11239 thread_added and store_inferior_register. Rename
11240 fetch_inferior_registers to fetch_inferior_register.
11241 (regptr): Remove declaration.
11242
11243 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11244
11245 * linux-low.c (linux_detach): Change return type to int. Return 0.
11246 * spu-low.c (spu_detach): Likewise.
11247
11248 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11249
11250 * target.h (target_ops): Change return type of detach to int.
11251 Add join.
11252 (join_inferior): New.
11253 * server.c (main): Don't skip detach support on mingw32.
11254 If the inferior doesn't support detaching return error.
11255 Call join_inferior instead of using waitpid.
11256 * linux-low.c (linux_join): New.
11257 (linux_target_op): Add linux_join.
11258 * spu-low.c (spu_join): New.
11259 (spu_target_ops): Add spu_join.
11260 * win32-low.c (win32_detach): Adapt to new interface.
11261 Reopen current_process_handle before detaching. Issue a child
11262 resume before detaching.
11263 (win32_join): New.
11264 (win32_target_op): Add win32_join.
11265
11266 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11267
11268 * win32-low.c (win32-attach): Fix return value.
11269 * target.h (target_ops): Describe ATTACH return values.
11270
11271 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11272
11273 * win32-low.c (GETPROCADDRESS): Define.
11274 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
11275 (winapi_DebugSetProcessKillOnExit): Likewise.
11276 (win32_create_inferior): Force usage of ansi CreateProcessA.
11277 (win32_attach): Use GETPROCADDRESS.
11278 (win32_detach): Likewise.
11279
11280 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11281
11282 * win32-low.c (win32_wait): Don't use WSTOPSIG.
11283
11284 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
11285
11286 * win32-low.c: Commit leftover changes from 2007-03-29.
11287
11288 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
11289
11290 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
11291 fields short instead of int. Add explicit padding.
11292 (i387_cache_to_fsave): Remove unnecessary casts.
11293 (i387_fsave_to_cache): Doc fix.
11294 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
11295
11296 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
11297
11298 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
11299 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
11300
11301 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
11302
11303 * configure.srv (arm*-*-mingw32ce*): Move near the other
11304 arm targets.
11305
11306 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
11307
11308 * configure.ac: Add errno checking.
11309 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
11310 sys/file.h and malloc.h.
11311 (AC_CHECK_DECLS): Add perror.
11312 (srv_mingwce): Handle.
11313 * configure.srv (i[34567]86-*-cygwin*): Add
11314 win32-i386-low.o to srv_tgtobj.
11315 (i[34567]86-*-mingw*): Likewise.
11316 (arm*-*-mingw32ce*): Add case.
11317 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
11318 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
11319 [__MINGW32CE__] (strerror): New function.
11320 [__MINGW32CE__] (errno): Define to GetLastError.
11321 [__MINGW32CE__] (COUNTOF): New macro.
11322 (remote_open): Remove extra close call.
11323 * mem-break.c (delete_breakpoint_at): New function.
11324 * mem-break.h (delete_breakpoint_at): Declare.
11325 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
11326 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
11327 [USE_WIN32API] (read, write): Add char* casts.
11328 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
11329 * server.h: Include wincecompat.h on Windows CE.
11330 [HAVE_ERRNO_H]: Check.
11331 (perror): Declare if not declared.
11332 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
11333 (perror_with_name): Remove errno declaration.
11334 * wincecompat.h: New.
11335 * wincecompat.c: New.
11336 * win32-low.h: New.
11337 * win32-arm-low.c: New.
11338 * win32-i386-low.c: New.
11339 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
11340 (OUTMSG2): Make it safe.
11341 (_T): New macro.
11342 (COUNTOF): New macro.
11343 (NUM_REGS): Get it from the low target.
11344 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
11345 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
11346 (thread_rec): Let low target handle debug registers.
11347 (child_add_thread): Likewise.
11348 (child_init_thread_list): Likewise.
11349 (continue_one_thread): Likewise.
11350 (regptr): New.
11351 (do_child_fetch_inferior_registers): Move to ...
11352 * win32-i386-low.c: ... here, and rename to ...
11353 (do_fetch_inferior_registers): ... this.
11354 * win32-low.c (child_fetch_inferior_registers):
11355 Go through the low target.
11356 (do_child_store_inferior_registers): Use regptr.
11357 (strwinerror): New function.
11358 (win32_create_inferior): Handle Windows CE.
11359 Use strwinerror instead of strerror on Windows error
11360 codes. Add program to the error output.
11361 Don't close the main thread handle on Windows CE.
11362 (win32_attach): Use coredll.dll on Windows CE.
11363 (win32_kill): Close current process and current
11364 thread handles.
11365 (win32_detach): Use coredll.dll on Windows CE.
11366 (win32_resume): Let low target handle debug registers, and
11367 step request.
11368 (handle_exception): Add/Remove initial breakpoint. Avoid
11369 non-existant WSTOPSIG on Windows CE.
11370 (win32_read_inferior_memory): Cast to remove warning.
11371 (win32_arch_string): Go through the low target.
11372 (initialize_low): Call set_breakpoint_data with the low
11373 target's breakpoint.
11374 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
11375 FOP_REGNUM, mappings): Move to ...
11376 * win32-i386-low.c: ... here.
11377 * win32-low.c (win32_thread_info): Move to ...
11378 * win32-low.h: ... here.
11379 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
11380 win32-arm-low.c and wincecompat.c.
11381 (all:): Add $EXEEXT.
11382 (install-only:): Likewise.
11383 (gdbserver:): Likewise.
11384 (gdbreplay:): Likewise.
11385 * config.in: Regenerate.
11386 * configure: Regenerate.
11387
11388 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
11389
11390 * win32-low.c: Rename typedef thread_info to
11391 win32_thread_info throughout.
11392
11393 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
11394
11395 * win32-i386-low.c: Rename to ...
11396 * win32-low.c: ... this.
11397 * configure.srv: Replace win32-i386-low.o with win32-low.o.
11398 * Makefile.in: Likewise.
11399
11400 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
11401
11402 * remote-utils.c (monitor_output): Constify msg parameter.
11403 * server.h (monitor_output): Likewise.
11404 * win32-i386-low.c (handle_output_debug_string): New.
11405 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
11406 handle_output_debug_string.
11407 (get_child_debug_event): Likewise.
11408
11409 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
11410
11411 * server.c (main): Correct strtoul check.
11412
11413 2007-03-27 Jon Ringle <jon@ringle.org>
11414
11415 * linux-low.c: Check __ARCH_HAS_MMU__ also.
11416
11417 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
11418
11419 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
11420
11421 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
11422
11423 * terminal.h: Check HAVE_SGTTY_H.
11424
11425 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
11426
11427 * remote-utils.c (remote_open): Print out the assigned port number.
11428
11429 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
11430
11431 * remote-utils.c (monitor_output): New function.
11432 * server.c (debug_threads): Define here.
11433 (monitor_show_help): New function.
11434 (handle_query): Handle qRcmd.
11435 (main): Do not handle 'd' packet.
11436 * server.h (debug_threads, remote_debug, monitor_output): Declare.
11437 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
11438 of debug_threads.
11439
11440 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11441
11442 * Makefile.in (EXEEXT): New.
11443 (clean): Use $(EXEEXT).
11444
11445 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11446
11447 * target.h (target_ops): Rename send_signal to request_interrupt,
11448 and remove enum target_signal parameter.
11449 * linux-low.c (linux_request_interrupt): Rename from
11450 linux_send_signal, and always send SIGINT.
11451 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
11452 and always send SIGINT.
11453 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
11454 of send_signal.
11455 (input_interrupt): Likewise.
11456
11457 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11458
11459 * server.c (get_features_xml): Check if target implemented
11460 arch_string.
11461 * win32-i386-low.c (win32_arch_string): New.
11462 (win32_target_ops): Add win32_arch_string as arch_string member.
11463
11464 2007-02-22 Markus Deuling <deuling@de.ibm.com>
11465
11466 * spu-low.c (spu_arch_string): New.
11467 (spu_target_ops): Add spu_arch_string.
11468
11469 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
11470
11471 * remote-utils.c: Remove HAVE_TERMINAL_H check.
11472 * configure.ac: Do not check for terminal.h.
11473 * configure, config.in: Regenerated.
11474
11475 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
11476
11477 * Makefile.in (OBS): Add $(XML_BUILTIN).
11478 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
11479 (clean): Update.
11480 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
11481 (arm-with-iwmmxt.c): New.
11482 * config.in, configure: Regenerate.
11483 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
11484 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
11485 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
11486 (arm*-*-linux*): Add iWMMXt and regset support.
11487 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
11488 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
11489 (arm_store_wmmxregset, target_regsets): New.
11490 * server.c (get_features_xml): Take annex argument. Check builtin
11491 XML documents.
11492 (handle_query): Handle multiple annexes.
11493
11494 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11495
11496 * remote-utils.c [USE_WIN32API] (read, write): Define.
11497 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
11498 write.
11499
11500 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
11501
11502 * linux-i386-low.c (the_low_target): Set arch_string.
11503 * linux-x86-64-low.c (the_low_target): Likewise.
11504 * linux-low.c (linux_arch_string): New.
11505 (linux_target_ops): Add it.
11506 * linux-low.h (struct linux_target_ops): Add arch_string.
11507 * server.c (write_qxfer_response): Use const void * for DATA.
11508 (get_features_xml): New.
11509 (handle_query): Handle qXfer:features:read. Report it for qSupported.
11510 * target.h (struct target_ops): Add arch_string method.
11511
11512 2007-01-03 Denis Pilat <denis.pilat@st.com>
11513 Daniel Jacobowitz <dan@codesourcery.com>
11514
11515 * linux-low.c (linux_kill): Handle being called with no threads.
11516 * win32-i386-low.c (win32_kill): Likewise.
11517 (get_child_debug_event): Clear current_process_handle.
11518
11519 2006-12-30 Denis PILAT <denis.pilat@st.com>
11520 Daniel Jacobowitz <dan@codesourcery.com>
11521
11522 * remote-utils.c (remote_open): Check the type of specified
11523 serial port devices before opening them.
11524 * server.c (main): Kill the inferior if an error occurs during
11525 the first remote_open.
11526
11527 2006-12-05 Markus Deuling <deuling@de.ibm.com>
11528
11529 * README: Update supported targets.
11530
11531 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
11532
11533 * Makefile.in (clean): Remove reg-mips64.c.
11534 (reg-mips64.c, reg-mips64.o): New rules.
11535 * configure.srv: Handle mips64. Include regset support for mips.
11536 * linux-mips-low.c (union mips_register): New.
11537 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
11538 (mips_breakpoint, mips_breakpoint_at): Use int.
11539 (mips_collect_register, mips_supply_register)
11540 (mips_collect_register_32bit, mips_supply_register_32bit)
11541 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
11542 (mips_store_fpregset, target_regsets): New.
11543 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
11544
11545 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
11546
11547 * configure.srv: Add target "spu*-*-*".
11548 * Makefile.in (clean): Remove reg-spu.c.
11549 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
11550 * spu-low.c: New file.
11551
11552 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
11553
11554 * configure.ac: Correct td_thr_tls_get_addr test.
11555 * configure: Regenerated.
11556
11557 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
11558
11559 * linux-low.c (linux_wait_for_event): Reformat. Use the
11560 pass_signals array.
11561 * remote-utils.c (decode_address_to_semicolon): New.
11562 * server.c (pass_signals, handle_general_set): New.
11563 (handle_query): Mention QPassSignals for qSupported.
11564 (main): Call handle_general_set.
11565 * server.h (pass_signals, decode_address_to_semicolon): New.
11566
11567 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
11568
11569 * server.c (handle_query): Correct error handling for read_auxv.
11570
11571 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
11572
11573 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
11574 and srv_linux_thread_db to yes.
11575 * linux-s390-low.c (s390_fill_gregset): New function.
11576 (target_regsets): Define data structure.
11577
11578 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
11579
11580 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
11581 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
11582 * config.in, configure: Regenerated.
11583 * inferiors.c (gdb_id_to_thread): New function.
11584 (gdb_id_to_thread_id): Use it.
11585 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
11586 * linux-low.h (struct process_info): Add th member.
11587 (thread_db_get_tls_address): New prototype.
11588 * remote-utils.c (decode_address): Make non-static.
11589 * server.c (handle_query): Handle qGetTLSAddr.
11590 * server.h (gdb_id_to_thread, decode_address): New prototypes.
11591 * target.h (struct target_ops): Add get_tls_address.
11592 * thread-db.c (maybe_attach_thread): Save the thread handle.
11593 (thread_db_get_tls_address): New.
11594
11595 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
11596
11597 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
11598 (linux_resume_one_process): Take a siginfo_t *. Update all
11599 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
11600 (struct pending_signals): Add a siginfo_t.
11601 (linux_wait_for_process): Always set last_status.
11602 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
11603 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
11604 * linux-low.h (struct process_info): Add last_status.
11605
11606 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
11607
11608 * remote-utils.c (try_rle): New function.
11609 (putpkt_binary): Use it.
11610
11611 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
11612
11613 * Makefile.in (clean): Clean reg-x86-64-linux.c.
11614 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
11615 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
11616 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
11617 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
11618 point registers.
11619
11620 2006-08-08 Richard Sandiford <richard@codesourcery.com>
11621
11622 * server.c (terminal_fd): New variable.
11623 (old_foreground_pgrp): Likewise.
11624 (restore_old_foreground_pgrp): New function.
11625 (start_inferior): Record the terminal file descriptor in terminal_fd
11626 and its original foreground group in old_foreground_pgrp. Register
11627 restore_old_foreground_pgrp with atexit().
11628
11629 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
11630
11631 * server.c (handle_query): Correct qPart to qXfer.
11632
11633 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
11634
11635 * configure.ac: Check for more headers which are missing on
11636 Windows. Automatically supply -lwsock32 and USE_WIN32API.
11637 * configure.srv: Add Cygwin and mingw32.
11638 * remote-utils.c: Don't include headers unconditionally which
11639 are missing on mingw32. Include <winsock.h> for mingw32.
11640 (remote_open): Adjust for mingw32 support. Flush
11641 standard error after writing to it.
11642 (remote_close, putpkt_binary, input_interrupt, block_async_io)
11643 (unblock_async_io, enable_async_io, disable_async_io)
11644 (readchar, getpkt): Update for Winsock support.
11645 (prepare_resume_reply): Expect a protocol signal number.
11646 * server.c: Disable <sys/wait.h> on mingw32.
11647 (start_inferior): Adjust for mingw32 support. Flush
11648 standard error after writing to it.
11649 (attach_inferior): Likewise. Use protocol signal
11650 numbers.
11651 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
11652 and names.
11653 * win32-i386-low.c: New file.
11654 * Makefile.in (XM_CLIBS): Set.
11655 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
11656 (win32-i386-low.o): New dependency rule.
11657 * linux-low.c (linux_wait): Use target signal numbers.
11658 * target.h (struct target_ops): Doc fix.
11659 * server.h (target_signal_to_name): New prototype.
11660 * gdbreplay.c: Don't include headers unconditionally which
11661 are missing on mingw32. Include <winsock.h> for mingw32.
11662 (remote_close, remote_open): Adjust for Winsock support.
11663 * configure, config.in: Regenerated.
11664
11665 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
11666
11667 * server.c (decode_xfer_read, write_qxfer_response): New.
11668 (handle_query): Take a packet length argument. Handle
11669 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
11670 the qSupported response.
11671 (main): Update call to handle_query.
11672
11673 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
11674
11675 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
11676 (putpkt_binary): Renamed from putpkt and adjusted for binary
11677 data.
11678 (putpkt): New wrapper for putpkt_binary.
11679 (readchar): Don't mask off the high bit.
11680 (decode_X_packet): New function.
11681 * server.c (main): Call putpkt_binary if a handler sets the packet
11682 length. Save the length of the incoming packet. Handle 'X'.
11683 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
11684
11685 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
11686
11687 * server.c (handle_query): Handle qSupported.
11688
11689 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
11690
11691 * remote-utils.c (all_symbols_looked_up): New variable.
11692 (look_up_one_symbol): Check it.
11693 * server.h (look_up_one_symbol): New declaration.
11694 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
11695
11696 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
11697
11698 * Makefile.in (linux-arm-low.o): Update dependencies.
11699 * linux-arm-low.c: Include "gdb_proc_service.h".
11700 (PTRACE_GET_THREAD_AREA): Define.
11701 (ps_get_thread_area): New function.
11702
11703 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
11704
11705 * configure.srv (m68k*-*-uclinux*): New target.
11706 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
11707 (linux_resume_one_process): Remove extraneous cast.
11708 (linux_read_offsets): New.
11709 (linux_target_op): Add linux_read_offsets on mmuless systems.
11710 * server.c (handle_query): Add qOffsets logic.
11711 * target.h (struct target_ops): Add read_offsets.
11712
11713 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
11714
11715 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
11716 (PTRACE_GET_THREAD_AREA): Define.
11717 (ps_get_thread_area): New function.
11718 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
11719 (linux-x86-64-low.o): Update.
11720
11721 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
11722
11723 * configure.ac: Remove checks for prfpregset_t.
11724 * gdb_proc_service.h: New file.
11725 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
11726 new "gdb_proc_service.h".
11727 * proc-service.c: Likewise.
11728 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
11729 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
11730 * Makefile.in (gdb_proc_service_h): Updated.
11731 * configure, config.in: Regenerated.
11732
11733 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
11734
11735 * remote-utils.c (prepare_resume_reply): Move declaration
11736 of gdb_id_from_wait to the top of the block.
11737
11738 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
11739
11740 * linux-low.c (regsets_store_inferior_registers): Read the regset
11741 from the target before filling it.
11742
11743 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
11744
11745 * server.c (attach_inferior): Return SIGTRAP for a successful
11746 attach.
11747
11748 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
11749
11750 * Makefile.in (OBS): Add version.o.
11751 (STAGESTUFF): Delete.
11752 (version.o): Add dependencies.
11753 (version.c): Replace rule.
11754 (clean): Remove version.c.
11755 * server.c (gdbserver_version): New.
11756 (gdbserver_usage): Use printf.
11757 (main): Handle --version and --help.
11758 * server.h (version, host_name): Add declarations.
11759
11760 2005-12-23 Eli Zaretskii <eliz@gnu.org>
11761
11762 * linux-arm-low.c:
11763 * linux-arm-low.c:
11764 * inferiors.c:
11765 * i387-fp.h:
11766 * i387-fp.c:
11767 * gdbreplay.c:
11768 * regcache.c:
11769 * proc-service.c:
11770 * mem-break.h:
11771 * mem-break.c:
11772 * linux-x86-64-low.c:
11773 * linux-sh-low.c:
11774 * linux-s390-low.c:
11775 * linux-ppc64-low.c:
11776 * linux-ppc-low.c:
11777 * linux-mips-low.c:
11778 * linux-m68k-low.c:
11779 * linux-m32r-low.c:
11780 * linux-low.h:
11781 * linux-low.c:
11782 * linux-ia64-low.c:
11783 * linux-i386-low.c:
11784 * linux-crisv32-low.c:
11785 * thread-db.c:
11786 * terminal.h:
11787 * target.h:
11788 * target.c:
11789 * server.h:
11790 * server.c:
11791 * remote-utils.c:
11792 * regcache.h:
11793 * utils.c:
11794 * Makefile.in:
11795 * configure.ac:
11796 * gdbserver.1: Add (C) after Copyright. Update the FSF
11797 address.
11798
11799 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
11800
11801 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
11802 (arm_breakpoint_at): Recognize both breakpoints.
11803 (the_low_target): Use the correct breakpoint instruction.
11804
11805 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
11806
11807 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
11808 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
11809 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
11810 (the_low_target): Update.
11811
11812 2005-10-25 Andreas Schwab <schwab@suse.de>
11813
11814 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
11815
11816 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
11817 (ia64_num_regs): Reduce to 462.
11818
11819 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
11820
11821 * acinclude.m4: Correct quoting.
11822 * aclocal.m4: Regenerated.
11823
11824 Suggested by SZOKOVACS Robert <szo@ies.hu>:
11825 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
11826 (thread_db_init): Call thread_db_err_str.
11827 * configure.ac: Check for TD_VERSION.
11828 * config.in, configure: Regenerated.
11829
11830 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11831
11832 * server.h (error, fatal, warning): Add ATTR_FORMAT.
11833
11834 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
11835
11836 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
11837 is not available. Define HAVE_PTRACE_GETREGS if it is.
11838 * config.in, configure: Regenerated.
11839 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
11840 * linux-i386-low.c, linux-m68k-low.c: Update to use
11841 HAVE_PTRACE_GETREGS.
11842 * linux-low.c (regsets_fetch_inferior_registers)
11843 (regsets_store_inferior_registers): Only return 0 if we processed
11844 GENERAL_REGS.
11845 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
11846 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
11847
11848 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
11849
11850 * inferiors.c (struct thread_info): Add gdb_id.
11851 (add_thread): Add gdb_id argument.
11852 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
11853 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
11854 calls to add_thread.
11855 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
11856 * server.c (handle_query): Use thread_to_gdb_id.
11857 (handle_v_cont, main): Use gdb_id_to_thread_id.
11858 * server.h (add_thread): Update prototype.
11859 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
11860 prototypes.
11861
11862 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
11863
11864 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
11865 left-padded registers.
11866 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
11867 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
11868
11869 2005-07-01 Steve Ellcey <sje@cup.hp.com>
11870
11871 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
11872 * configure: Regenerate.
11873 * config.in: Regenerate.
11874 * server.h (NEED_DECLARATION_STRERROR):
11875 Replace with !HAVE_DECL_STRERROR.
11876
11877 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
11878
11879 * linux-low.c (linux_wait, linux_send_signal): Don't test
11880 an unsigned long variable for > 0 if it could be MAX_ULONG.
11881 * server.c (myresume): Likewise.
11882 * target.c (set_desired_inferior): Likewise.
11883
11884 2005-06-13 Mark Kettenis <kettenis@gnu.org>
11885
11886 * configure.ac: Simplify and improve check for socklen_t.
11887 * configure, config.in: Regenerate.
11888
11889 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
11890
11891 * acconfig.h: Remove.
11892 * configure.ac: Add a test for socklen_t. Use three-argument
11893 AC_DEFINE throughout.
11894 * config.in: Regenerated using autoheader 2.59.
11895 * configure: Regenerated.
11896
11897 * gdbreplay.c (socklen_t): Provide a default.
11898 (remote_open): Use socklen_t.
11899 * remote-utils.c (socklen_t): Provide a default.
11900 (remote_open): Use socklen_t.
11901 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
11902 unsigned char.
11903
11904 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
11905 char for buffers.
11906 * linux-low.c (linux_read_memory, linux_write_memory)
11907 (linux_read_auxv): Likewise.
11908 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
11909 (check_mem_write): Likewise.
11910 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
11911 Likewise.
11912 * regcache.c (struct inferior_rgcache_data, registers_to_string)
11913 (registers_from_string, register_data): Likewise.
11914 * server.c (handle_query, main): Likewise.
11915 * server.h (convert_ascii_to_int, convert_int_to_ascii)
11916 (decode_M_packet): Likewise.
11917 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
11918 * target.h (struct target_ops): Update read_memory, write_memory,
11919 and read_auxv.
11920 (read_inferior_memory, write_inferior_memory): Update.
11921 * linux-low.h (struct linux_target_ops): Change type of breakpoint
11922 to unsigned char *.
11923 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
11924 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
11925 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
11926 linux-s390-low.c, linux-sh-low.c: Update for changes in
11927 read_inferior_memory and the_low_target->breakpoint.
11928
11929 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
11930
11931 * Makefile.in (SFILES): Add linux-ppc64-low.c.
11932 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
11933 * configure.srv: Add powerpc64-*-linux*.
11934 * linux-ppc64-low.c: New file.
11935
11936 2005-05-23 Orjan Friberg <orjanf@axis.com>
11937
11938 * linux-cris-low.c: New file with support for CRIS.
11939 * linux-crisv32-low.c: Ditto for CRISv32.
11940 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
11941 (clean): Add reg-cris.c and reg-crisv32.c.
11942 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
11943 reg-crisv32.o, and reg-crisv32.c to make rules.
11944 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
11945 recognized targets.
11946
11947 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
11948
11949 * linux-low.c (fetch_register): Ensure buffer size is a multiple
11950 of sizeof (PTRACE_XFER_TYPE).
11951 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
11952
11953 2005-05-12 Orjan Friberg <orjanf@axis.com>
11954
11955 * target.h (struct target_ops): Add insert_watchpoint,
11956 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
11957 pointers for hardware watchpoint support.
11958 * linux-low.h (struct linux_target_ops): Ditto.
11959 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
11960 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
11961 to linux_target_ops.
11962 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
11963 reply packet.
11964 * server.c (main): Recognize 'Z' and 'z' packets.
11965
11966 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
11967
11968 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
11969 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
11970 (the_low_target): Add new members.
11971
11972 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
11973
11974 * proc-service.c (ps_lgetregs): Search all_processes instead of
11975 all_threads.
11976
11977 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
11978
11979 * server.c (start_inferior): Change return type to int.
11980 (attach_inferior): Change sigptr to int *.
11981 (handle_v_cont, handle_v_requests): Change signal to int *.
11982 (main): Change signal to int.
11983
11984 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
11985
11986 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
11987 * configure.srv: Add m32r*-*-linux*.
11988 * linux-m32r-low.c: New file.
11989
11990 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
11991
11992 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
11993
11994 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
11995
11996 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
11997 Take unsigned long arguments for PIDs.
11998 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
11999 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
12000 (wait_for_sigstop, linux_resume_one_process)
12001 (regsets_fetch_inferior_registers, linux_send_signal)
12002 (linux_read_auxv): Likewise. Update the types of variables holding
12003 PIDs. Update format string specifiers.
12004 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
12005 * remote-utils.c (prepare_resume_reply): Likewise.
12006 * server.c (cont_thread, general_thread, step_thread)
12007 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
12008 unsigned long.
12009 (handle_query): Update format specifiers.
12010 (handle_v_cont, main): Use strtoul for thread IDs.
12011 * server.h (struct inferior_list_entry): Use unsigned long for ID.
12012 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
12013 (general_thread, step_thread, thread_from_wait)
12014 (old_thread_from_wait): Update.
12015 * target.h (struct thread_resume): Use unsigned long for THREAD.
12016 (struct target_ops): Use unsigned long for arguments to attach and
12017 thread_alive.
12018
12019 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
12020
12021 * acinclude.m4: Include bfd/bfd.m4 directly.
12022 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
12023 <agriffis@toolchain.org>.
12024 * aclocal.m4, configure: Regenerated.
12025
12026 2005-01-07 Andrew Cagney <cagney@gnu.org>
12027
12028 * configure.ac: Rename configure.in, require autoconf 2.59.
12029 * configure: Re-generate.
12030
12031 2004-12-08 Daniel Jacobowitz <dan@debian.org>
12032
12033 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
12034 LIBS when finished.
12035 * aclocal.m4: Regenerated.
12036 * configure: Regenerated.
12037
12038 2004-11-21 Andreas Schwab <schwab@suse.de>
12039
12040 * linux-m68k-low.c (m68k_num_gregs): Define.
12041 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
12042 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
12043 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
12044 (m68k_breakpoint_at): New. Add to the_low_target.
12045
12046 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
12047 srv_linux_thread_db to yes.
12048
12049 2004-10-20 Joel Brobecker <brobecker@gnat.com>
12050
12051 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
12052 (ARCH_SET_FS): Likewise.
12053 (ARCH_GET_FS): Likewise.
12054 (ARCH_GET_GS): Likewise.
12055
12056 2004-10-16 Daniel Jacobowitz <dan@debian.org>
12057
12058 * linux-i386-low.c (ps_get_thread_area): New.
12059 * linux-x86-64-low.c (ps_get_thread_area): New.
12060 * linux-low.c: Include <sys/syscall.h>.
12061 (linux_kill_one_process): Don't kill the first thread here.
12062 (linux_kill): Kill the first thread here.
12063 (kill_lwp): New function.
12064 (send_sigstop, linux_send_signal): Use it.
12065 * proc-service.c: Clean up #ifdefs.
12066 (fpregset_info): Delete.
12067 (ps_lgetregs): Update and enable implementation.
12068 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
12069 implementations.
12070 * remote-utils.c (struct sym_cache, symbol_cache): New.
12071 (input_interrupt): Print a clearer message.
12072 (async_io_enabled): New variable.
12073 (enable_async_io, disable_async_io): Use it. Update comments.
12074 (look_up_one_symbol): Use the symbol cache.
12075 * thread-db.c (thread_db_look_up_symbols): New function.
12076 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
12077
12078 2004-10-16 Daniel Jacobowitz <dan@debian.org>
12079
12080 * configure.in: Test for -rdynamic.
12081 * configure: Regenerated.
12082 * Makefile (INTERNAL_LDFLAGS): New.
12083 (gdbserver, gdbreplay): Use it.
12084
12085 2004-09-02 Andrew Cagney <cagney@gnu.org>
12086
12087 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
12088
12089 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
12090
12091 * linux-low.c (linux_wait): Clear all_processes list also.
12092
12093 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
12094
12095 * linux-low.c: Include <errno.h>. Remove extern declaration of
12096 errno.
12097
12098 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
12099
12100 * gdbreplay.c, server.h, utils.c: Update copyright years.
12101
12102 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
12103
12104 * server.c (main): Print child status or termination signal from
12105 variable 'signal', not 'sig'.
12106
12107 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
12108
12109 * linux-low.c (linux_read_memory): Change return type to
12110 int. Check for and return error from ptrace().
12111 * target.c (read_inferior_memory): Change return type to int. Pass
12112 back return status from the_target->read_memory().
12113 * target.h (struct target_ops): Adapt *read_memory() prototype.
12114 Update comment.
12115 (read_inferior_memory): Adapt prototype.
12116 * server.c (main): Return an error packet if
12117 read_inferior_memory() returns an error.
12118
12119 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
12120
12121 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
12122 Unify with other clean targets.
12123
12124 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
12125
12126 * server.c (handle_v_cont): Call set_desired_inferior.
12127
12128 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
12129
12130 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
12131
12132 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
12133
12134 * linux-low.c (linux_wait): Unblock async I/O.
12135 (linux_resume): Block and enable async I/O.
12136 * remote-utils.c (block_async_io, unblock_async_io): New functions.
12137 * server.h (block_async_io, unblock_async_io): Add prototypes.
12138
12139 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
12140
12141 * remote-utils.c (remote_open): Print a status notice after
12142 opening a TCP port.
12143 * server.c (attach_inferior): Print a status notice after
12144 attaching.
12145
12146 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
12147
12148 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
12149
12150 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
12151
12152 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
12153 error packet.
12154 * server.c, target.h: Update copyright years.
12155
12156 2004-02-25 Roland McGrath <roland@redhat.com>
12157
12158 * target.h (struct target_ops): New member `read_auxv'.
12159 * server.c (handle_query): Handle qPart:auxv:read: query using that.
12160 * linux-low.c (linux_read_auxv): New function.
12161 (linux_target_ops): Initialize `read_auxv' member to that.
12162
12163 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
12164
12165 Committed by Jim Blandy <jimb@redhat.com>.
12166
12167 * linux-s390-low.c (s390_num_regs): Update.
12168 (s390_regmap): Remove control registers. Use __s390x__ predefine
12169 instead of GPR_SIZE to distiguish s390 and s390x targets.
12170
12171 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
12172
12173 * linux-low.c: Update copyright year.
12174 (check_removed_breakpoint): Clear pending_is_breakpoint.
12175 (linux_set_resume_request, linux_queue_one_thread)
12176 (resume_status_pending_p): New functions.
12177 (linux_continue_one_thread): Use process->resume.
12178 (linux_resume): Only resume threads if there are no pending events.
12179 * linux-low.h (struct process_info): Add resume request
12180 pointer.
12181
12182 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
12183
12184 * regcache.c (new_register_cache): Clear the allocated register
12185 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
12186
12187 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
12188
12189 * linux-low.c (linux_resume): Take a struct thread_resume *
12190 argument.
12191 (linux_wait): Update call.
12192 (resume_ptr): New static variable.
12193 (linux_continue_one_thread): Renamed from
12194 linux_continue_one_process. Use resume_ptr.
12195 (linux_resume): Use linux_continue_one_thread.
12196 * server.c (handle_v_cont, handle_v_requests): New functions.
12197 (myresume): New function.
12198 (main): Handle 'v' case.
12199 * target.h (struct thread_resume): New type.
12200 (struct target_ops): Change argument of "resume" to struct
12201 thread_resume *.
12202 (myresume): Delete macro.
12203
12204 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
12205
12206 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
12207 (uninstall): Support DESTDIR.
12208
12209 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
12210
12211 * configure.srv: Add xscale*linux copy of arm*linux entry.
12212
12213 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
12214
12215 * linux-arm-low.c (arm_reinsert_addr): New function.
12216 (the_low_target): Add arm_reinsert_addr.
12217
12218 2003-07-08 Mark Kettenis <kettenis@gnu.org>
12219
12220 * mem-break.c: Remove whitespace at end of file.
12221
12222 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
12223
12224 * configure.in: Check whether we need to prototype strerror.
12225 * server.h: Optionally prototype strerror.
12226 * gdbreplay.c (perror_with_name): Use strerror.
12227 * linux-low.c (linux_attach_lwp): Use strerror.
12228 * utils.c (perror_with_name): Use strerror.
12229 * config.in, configure: Regenerated.
12230
12231 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
12232
12233 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
12234 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
12235
12236 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
12237
12238 * Makefile.in (SFILES): Update.
12239 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
12240 low-sun3.c: Remove files.
12241
12242 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
12243
12244 * linux-low.c: Move comment to linux_thread_alive where it belonged.
12245 (linux_detach_one_process, linux_detach): New functions.
12246 (linux_target_ops): Add linux_detach.
12247 * server.c (main): Handle 'D' packet.
12248 * target.h (struct target_ops): Add "detach" member.
12249 (detach_inferior): Define.
12250
12251 2003-06-13 Mark Kettenis <kettenis@gnu.org>
12252
12253 From Kelley Cook <kelleycook@wideopenwest.com>:
12254 * configure.srv: Accept i[34567]86 variants.
12255
12256 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
12257
12258 * linux-low.c (linux_wait_for_event): Correct comment typos.
12259 (linux_resume_one_process): Call check_removed_breakpoint.
12260 (linux_send_signal): New function.
12261 (linux_target_ops): Add linux_send_signal.
12262 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
12263 of kill.
12264 * target.h (struct target_ops): Add send_signal.
12265
12266 2003-05-29 Jim Blandy <jimb@redhat.com>
12267
12268 * linux-low.c (usr_store_inferior_registers): Transfer buf in
12269 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
12270 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
12271 away part of the register's value.
12272
12273 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
12274
12275 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
12276 (linux_wait_for_event, linux_init_signals): Likewise.
12277
12278 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
12279
12280 * configure.in: Check for stdlib.h.
12281 * configure: Regenerated.
12282 * config.in: Regenerated.
12283
12284 2003-01-04 Andreas Schwab <schwab@suse.de>
12285
12286 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
12287
12288 2003-01-02 Andrew Cagney <ac131313@redhat.com>
12289
12290 * Makefile.in: Remove obsolete code.
12291
12292 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
12293
12294 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
12295 defined(PT_FPR0_HI).
12296
12297 2002-11-17 Stuart Hughes <seh@zee2.com>
12298
12299 * linux-arm-low.c (arm_num_regs): Increase.
12300 (arm_regmap): Include status register.
12301
12302 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
12303
12304 * linux-low.c (register_addr): Remove incorrect -1 check.
12305
12306 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
12307
12308 * linux-low.c (linux_create_inferior): Call setpgid. Return
12309 the new PID.
12310 (unstopped_p, linux_signal_pid): Remove.
12311 (linux_target_ops): Remove linux_signal_pid.
12312 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
12313 global instead of target method.
12314 * target.h (struct target_ops): Remove signal_pid. Update comment
12315 for create_inferior.
12316 * server.c (signal_pid): New variable.
12317 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
12318 gdbserver. Set the child to be the foreground process group.
12319 (attach_inferior): Set signal_pid.
12320
12321 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
12322
12323 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
12324
12325 2002-08-20 Jim Blandy <jimb@redhat.com>
12326
12327 * Makefile.in (LDFLAGS): Allow the configure script to establish a
12328 default for this.
12329
12330 2002-08-01 Andrew Cagney <cagney@redhat.com>
12331
12332 * Makefile.in: Make chill references obsolete.
12333
12334 2002-07-24 Kevin Buettner <kevinb@redhat.com>
12335
12336 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
12337 * configure: Regenerate.
12338 * config.in: Regenerate.
12339
12340 2002-07-09 David O'Brien <obrien@FreeBSD.org>
12341
12342 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
12343 (perror_with_name, remote_close, remote_open, expect, play): Static.
12344
12345 2002-07-04 Michal Ludvig <mludvig@suse.cz>
12346
12347 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
12348 byte offsets instead of an array of indexes.
12349 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
12350
12351 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
12352
12353 * regcache.c: Add comment.
12354
12355 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
12356
12357 * thread-db.c: New file.
12358 * proc-service.c: New file.
12359 * acinclude.m4: New file.
12360 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
12361 proc-service.o, and thread-db.o.
12362 (linux-low.o): Add USE_THREAD_DB.
12363 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
12364 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
12365 * aclocal.m4: Regenerated.
12366 * config.in: Regenerated.
12367 * configure: Regenerated.
12368 * configure.in: Check for proc_service.h, sys/procfs.h,
12369 thread_db.h, and linux/elf.h headrs.
12370 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
12371 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
12372 Check for -lthread_db and thread support.
12373 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
12374 PowerPC, and SuperH.
12375 * i387-fp.c: Constify arguments.
12376 * i387-fp.h: Likewise.
12377 * inferiors.c: (struct thread_info): Renamed from
12378 `struct inferior_info'. Remove PID member. Use generic inferior
12379 list header. All uses updated.
12380 (inferiors, signal_pid): Removed.
12381 (all_threads): New variable.
12382 (get_thread): Define.
12383 (add_inferior_to_list): New function.
12384 (for_each_inferior): New function.
12385 (change_inferior_id): New function.
12386 (add_inferior): Removed.
12387 (remove_inferior): New function.
12388 (add_thread): New function.
12389 (free_one_thread): New function.
12390 (remove_thread): New function.
12391 (clear_inferiors): Use for_each_inferior and free_one_thread.
12392 (find_inferior): New function.
12393 (find_inferior_id): New function.
12394 (inferior_target_data): Update argument type.
12395 (set_inferior_target_data): Likewise.
12396 (inferior_regcache_data): Likewise.
12397 (set_inferior_regcache_data): Likewise.
12398 * linux-low.c (linux_bp_reinsert): Remove.
12399 (all_processes, stopping_threads, using_thrads)
12400 (struct pending_signals, debug_threads, pid_of): New.
12401 (inferior_pid): Replace with macro.
12402 (struct inferior_linux_data): Remove.
12403 (get_stop_pc, add_process): New functions.
12404 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
12405 Use add_process and add_thread.
12406 (linux_attach_lwp): New function, based on old linux_attach. Use
12407 add_process and add_thread. Set stop_expected for new threads.
12408 (linux_attach): New function.
12409 (linux_kill_one_process): New function.
12410 (linux_kill): Kill all LWPs.
12411 (linux_thread_alive): Use find_inferior_id.
12412 (check_removed_breakpoints, status_pending_p): New functions.
12413 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
12414 Update. Use WNOHANG. Wait for cloned processes also. Update process
12415 struct for the found process.
12416 (linux_wait_for_event): New function.
12417 (linux_wait): Use it. Support LWPs.
12418 (send_sigstop, wait_for_sigstop, stop_all_processes)
12419 (linux_resume_one_process, linux_continue_one_process): New functions.
12420 (linux_resume): Support LWPs.
12421 (REGISTER_RAW_SIZE): Remove.
12422 (fetch_register): Use register_size instead. Call supply_register.
12423 (usr_store_inferior_registers): Likewise. Call collect_register.
12424 Fix recursive case.
12425 (regsets_fetch_inferior_registers): Improve error message.
12426 (regsets_store_inferior_registers): Add debugging.
12427 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
12428 (unstopped_p, linux_signal_pid): New functions.
12429 (linux_target_ops): Add linux_signal_pid.
12430 (linux_init_signals): New function.
12431 (initialize_low): Call it. Initialize using_threads.
12432 * regcache.c (inferior_regcache_data): Add valid
12433 flag.
12434 (get_regcache): Fetch registers lazily. Add fetch argument
12435 and update all callers.
12436 (regcache_invalidate_one, regcache_invalidate): New
12437 functions.
12438 (new_register_cache): Renamed from create_register_cache.
12439 Return the new regcache.
12440 (free_register_cache): Change argument to a void *.
12441 (registers_to_string, registers_from_string): Call get_regcache
12442 with fetch flag set.
12443 (register_data): Make static. Pass fetch flag to get_regcache.
12444 (supply_register): Call get_regcache with fetch flag clear.
12445 (collect_register): Call get_regcache with fetch flag set.
12446 (collect_register_as_string): New function.
12447 * regcache.h: Update.
12448 * remote-utils.c (putpkt): Flush after debug output and use
12449 stderr.
12450 Handle input interrupts while waiting for an ACK.
12451 (input_interrupt): Use signal_pid method.
12452 (getpkt): Flush after debug output and use stderr.
12453 (outreg): Use collect_register_as_string.
12454 (new_thread_notify, dead_thread_notify): New functions.
12455 (prepare_resume_reply): Check using_threads. Set thread_from_wait
12456 and general_thread.
12457 (look_up_one_symbol): Flush after debug output.
12458 * server.c (step_thread, server_waiting): New variables.
12459 (start_inferior): Don't use signal_pid. Update call to mywait.
12460 (attach_inferior): Update call to mywait.
12461 (handle_query): Handle qfThreadInfo and qsThreadInfo.
12462 (main): Don't fetch/store registers explicitly. Use
12463 set_desired_inferior. Support proposed ``Hs'' packet. Update
12464 calls to mywait.
12465 * server.h: Update.
12466 (struct inferior_list, struct_inferior_list_entry): New.
12467 * target.c (set_desired_inferior): New.
12468 (write_inferior_memory): Constify.
12469 (mywait): New function.
12470 * target.h: Update.
12471 (struct target_ops): New signal_pid method.
12472 (mywait): Removed macro, added prototype.
12473
12474 * linux-low.h (regset_func): Removed.
12475 (regset_fill_func, regset_store_func): New.
12476 (enum regset_type): New.
12477 (struct regset_info): Add type field. Use new operation types.
12478 (struct linux_target_ops): stop_pc renamed to get_pc.
12479 Add decr_pc_after_break and breakpoint_at.
12480 (get_process, get_thread_proess, get_process_thread)
12481 (strut process_info, all_processes, linux_attach_lwp)
12482 (thread_db_init): New.
12483
12484 * linux-arm-low.c (arm_get_pc, arm_set_pc,
12485 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
12486 (the_low_target): Add new members.
12487 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
12488 (i386_store_fpxregset): Constify.
12489 (target_regsets): Add new kind identifier.
12490 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
12491 (i386_set_pc): Add debugging.
12492 (i386_breakpoint_at): New function.
12493 (the_low_target): Add new members.
12494 * linux-mips-low.c (mips_get_pc, mips_set_pc)
12495 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
12496 (mips_breakpoint_at): New.
12497 (the_low_target): Add new members.
12498 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
12499 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
12500 (the_low_target): Add new members.
12501 * linux-sh-low.c (sh_get_pc, sh_set_pc)
12502 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
12503 (the_low_target): Add new members.
12504 * linux-x86-64-low.c (target_regsets): Add new kind
12505 identifier.
12506
12507 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
12508
12509 From Martin Pool <mbp@samba.org>:
12510 * server.c (gdbserver_usage): New function.
12511 (main): Call it.
12512
12513 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
12514
12515 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
12516 stop_at -> stop_pc.
12517
12518 2002-05-04 Andrew Cagney <ac131313@redhat.com>
12519
12520 * Makefile.in: Remove obsolete code.
12521
12522 2002-04-24 Michal Ludvig <mludvig@suse.cz>
12523
12524 * linux-low.c (regsets_fetch_inferior_registers),
12525 (regsets_store_inferior_registers): Removed cast to int from
12526 ptrace() calls.
12527 * regcache.h: Added declaration of struct inferior_info.
12528
12529 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
12530
12531 * inferiors.c (struct inferior_info): Add regcache_data.
12532 (add_inferior): Call create_register_cache.
12533 (clear_inferiors): Call free_register_cache.
12534 (inferior_regcache_data, set_inferior_regcache_data): New functions.
12535 * regcache.c (struct inferior_regcache_data): New.
12536 (registers): Remove.
12537 (get_regcache): New function.
12538 (create_register_cache, free_register_cache): New functions.
12539 (set_register_cache): Don't initialize the register cache here.
12540 (registers_to_string, registers_from_string, register_data): Call
12541 get_regcache.
12542 * regcache.h: Add prototypes.
12543 * server.h: Likewise.
12544
12545 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
12546
12547 * mem-break.c: New file.
12548 * mem-break.h: New file.
12549 * Makefile.in: Add mem-break.o rule; update server.h
12550 dependencies.
12551 * inferiors.c (struct inferior_info): Add target_data
12552 member.
12553 (clear_inferiors): Free target_data member if set.
12554 (inferior_target_data, set_inferior_target_data): New functions.
12555 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
12556 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
12557 * linux-low.c (linux_bp_reinsert): New variable.
12558 (struct inferior_linux_data): New.
12559 (linux_create_inferior): Use set_inferior_target_data.
12560 (linux_attach): Likewise. Call add_inferior.
12561 (linux_wait_for_one_inferior): New function.
12562 (linux_wait): Call it.
12563 (linux_write_memory): Add const.
12564 (initialize_low): Call set_breakpoint_data.
12565 * linux-low.h (struct linux_target_ops): Add breakpoint
12566 handling members.
12567 * server.c (attach_inferior): Remove extra add_inferior
12568 call.
12569 * server.h: Include mem-break.h. Update inferior.c
12570 prototypes.
12571 * target.c (read_inferior_memory)
12572 (write_inferior_memory): New functions.
12573 * target.h (read_inferior_memory)
12574 (write_inferior_memory): Change macros to prototypes.
12575 (struct target_ops): Update comments. Add const to write_memory
12576 definition.
12577
12578 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
12579
12580 * linux-low.c (usr_store_inferior_registers): Support
12581 registers which are allowed to fail to store.
12582 * linux-low.h (linux_target_ops): Likewise.
12583 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
12584 (ppc_cannot_store_register): FPSCR may not be storable.
12585
12586 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
12587
12588 * server.h: Include <string.h> if HAVE_STRING_H.
12589 * ChangeLog: Correct paths in last ChangeLog entry.
12590
12591 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
12592
12593 * linux-low.h: Remove obsolete prototypes.
12594 (struct linux_target_ops): New.
12595 (extern the_low_target): New.
12596 * linux-low.c (num_regs, regmap): Remove declarations.
12597 (register_addr): Use the_low_target explicitly.
12598 (fetch_register): Likewise.
12599 (usr_fetch_inferior_registers): Likewise.
12600 (usr_store_inferior_registers): Likewise.
12601 * linux-arm-low.c (num_regs): Remove.
12602 (arm_num_regs): Define.
12603 (arm_regmap): Renamed from regmap, made static.
12604 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
12605 made static.
12606 (arm_cannot_store_register): Renamed from cannot_store_register,
12607 made static.
12608 (the_low_target): New.
12609 * linux-i386-low.c (num_regs): Remove.
12610 (i386_num_regs): Define.
12611 (i386_regmap): Renamed from regmap, made static.
12612 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
12613 made static.
12614 (i386_cannot_store_register): Renamed from cannot_store_register,
12615 made static.
12616 (the_low_target): New.
12617 * linux-ia64-low.c (num_regs): Remove.
12618 (ia64_num_regs): Define.
12619 (ia64_regmap): Renamed from regmap, made static.
12620 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
12621 made static.
12622 (ia64_cannot_store_register): Renamed from cannot_store_register,
12623 made static.
12624 (the_low_target): New.
12625 * linux-m68k-low.c (num_regs): Remove.
12626 (m68k_num_regs): Define.
12627 (m68k_regmap): Renamed from regmap, made static.
12628 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
12629 made static.
12630 (m68k_cannot_store_register): Renamed from cannot_store_register,
12631 made static.
12632 (the_low_target): New.
12633 * linux-mips-low.c (num_regs): Remove.
12634 (mips_num_regs): Define.
12635 (mips_regmap): Renamed from regmap, made static.
12636 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
12637 made static.
12638 (mips_cannot_store_register): Renamed from cannot_store_register,
12639 made static.
12640 (the_low_target): New.
12641 * linux-ppc-low.c (num_regs): Remove.
12642 (ppc_num_regs): Define.
12643 (ppc_regmap): Renamed from regmap, made static.
12644 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
12645 made static.
12646 (ppc_cannot_store_register): Renamed from cannot_store_register,
12647 made static.
12648 (the_low_target): New.
12649 * linux-s390-low.c (num_regs): Remove.
12650 (s390_num_regs): Define.
12651 (s390_regmap): Renamed from regmap, made static.
12652 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
12653 made static.
12654 (s390_cannot_store_register): Renamed from cannot_store_register,
12655 made static.
12656 (the_low_target): New.
12657 * linux-sh-low.c (num_regs): Remove.
12658 (sh_num_regs): Define.
12659 (sh_regmap): Renamed from regmap, made static.
12660 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
12661 made static.
12662 (sh_cannot_store_register): Renamed from cannot_store_register,
12663 made static.
12664 (the_low_target): New.
12665 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
12666 (the_low_target): New.
12667
12668 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
12669
12670 * Makefile.in: Add stamp-h target.
12671 * configure.in: Create stamp-h.
12672 * configure: Regenerated.
12673
12674 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
12675
12676 * inferiors.c: New file.
12677 * target.c: New file.
12678 * target.h: New file.
12679 * Makefile.in: Add target.o and inferiors.o. Update
12680 dependencies.
12681 * linux-low.c (inferior_pid): New static variable,
12682 moved from server.c.
12683 (linux_create_inferior): Renamed from create_inferior.
12684 Call add_inferior. Return 0 on success instead of a PID.
12685 (linux_attach): Renamed from myattach.
12686 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
12687 (linux_thread_alive): Renamed from mythread_alive.
12688 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
12689 child dies.
12690 (linux_resume): Renamed from myresume. Add missing ``return 0''.
12691 (regsets_store_inferior_registers): Correct error message.
12692 Add missing ``return 0''.
12693 (linux_fetch_registers): Renamed from fetch_inferior_registers.
12694 (linux_store_registers): Renamed from store_inferior_registers.
12695 (linux_read_memory): Renamed from read_inferior_memory.
12696 (linux_write_memory): Renamed from write_inferior_memory.
12697 (linux_target_ops): New structure.
12698 (initialize_low): Call set_target_ops ().
12699 * remote-utils.c (unhexify): New function.
12700 (hexify): New function.
12701 (input_interrupt): Send signals to ``signal_pid''.
12702 * server.c (inferior_pid): Remove.
12703 (start_inferior): Update create_inferior call.
12704 (attach_inferior): Call add_inferior.
12705 (handle_query): New function.
12706 (main): Call handle_query for `q' packets.
12707 * server.h: Include "target.h". Remove obsolete prototypes.
12708 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
12709
12710 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
12711
12712 * Makefile.in: Add WARN_CFLAGS. Update configury
12713 dependencies.
12714 * configure.in: Check for <string.h>
12715 * configure: Regenerate.
12716 * config.in: Regenerate.
12717 * gdbreplay.c: Include needed system headers.
12718 (remote_open): Remove strchr prototype.
12719 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
12720 * regcache.c (supply_register): Change buf argument to const void *.
12721 (supply_register_by_name): Likewise.
12722 (collect_register): Change buf argument to void *.
12723 (collect_register_by_name): Likewise.
12724 * regcache.h: Add missing prototypes.
12725 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
12726 * server.c (handle_query): New function.
12727 (attached): New static variable, moved out of main.
12728 (main): Quiet longjmp clobber warnings.
12729 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
12730 * utils.c (error): Remove NORETURN.
12731 (fatal): Likewise.
This page took 0.307831 seconds and 4 git commands to generate.