gdbserver/proc-service.c: Change CORE_ADDR cast to uintptr_t
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
1 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
2
3 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
4 (ps_pdwrite): Likewise.
5
6 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
7
8 * linux-arm-low.c (arm_new_thread): Move pointer dereference
9 to after assert checks.
10
11 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
12
13 * proc-service.c (ps_pdread): Add/adjust casts.
14 (ps_pdwrite): Add/adjust casts.
15
16 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
17
18 * server.c (handle_search_memory_1): Cast return value of
19 memmem.
20
21 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
22
23 * server.c (write_qxfer_response): Change type of data to
24 gdb_byte *.
25
26 2015-10-29 Pedro Alves <palves@redhat.com>
27
28 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
29
30 2015-10-29 Pedro Alves <palves@redhat.com>
31
32 * tracepoint.c (clear_installed_tracepoints): Add casts.
33
34 2015-10-29 Pedro Alves <palves@redhat.com>
35
36 * server.c (handle_v_cont, process_serial_event): Add enum
37 gdb_signal casts to signal parsing code.
38
39 2015-10-29 Pedro Alves <palves@redhat.com>
40
41 * linux-low.h (NULL_REGSET): Define.
42 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
43 * linux-arm-low.c (arm_regsets): Likewise.
44 * linux-crisv32-low.c (cris_regsets): Likewise.
45 * linux-m68k-low.c (m68k_regsets): Likewise.
46 * linux-mips-low.c (mips_regsets): Likewise.
47 * linux-nios2-low.c (nios2_regsets): Likewise.
48 * linux-ppc-low.c (ppc_regsets): Likewise.
49 * linux-s390-low.c (s390_regsets): Likewise.
50 * linux-sh-low.c (sh_regsets): Likewise.
51 * linux-sparc-low.c (sparc_regsets): Likewise.
52 * linux-tic6x-low.c (tic6x_regsets): Likewise.
53 * linux-tile-low.c (tile_regsets): Likewise.
54 * linux-x86-low.c (x86_regsets): Likewise.
55 * linux-xtensa-low.c (xtensa_regsets): Likewise.
56
57 2015-10-29 Pedro Alves <palves@redhat.com>
58
59 * linux-low.h (NULL_REGSET): Define.
60 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
61 * linux-arm-low.c (arm_regsets): Likewise.
62 * linux-crisv32-low.c (cris_regsets): Likewise.
63 * linux-m68k-low.c (m68k_regsets): Likewise.
64 * linux-mips-low.c (mips_regsets): Likewise.
65 * linux-nios2-low.c (nios2_regsets): Likewise.
66 * linux-ppc-low.c (ppc_regsets): Likewise.
67 * linux-s390-low.c (s390_regsets): Likewise.
68 * linux-sh-low.c (sh_regsets): Likewise.
69 * linux-sparc-low.c (sparc_regsets): Likewise.
70 * linux-tic6x-low.c (tic6x_regsets): Likewise.
71 * linux-tile-low.c (tile_regsets): Likewise.
72 * linux-x86-low.c (x86_regsets): Likewise.
73 * linux-xtensa-low.c (xtensa_regsets): Likewise.
74
75 2015-10-26 Doug Evans <dje@google.com>
76
77 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
78
79 2015-10-26 Doug Evans <dje@google.com>
80
81 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
82
83 2015-10-26 Doug Evans <dje@google.com>
84
85 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
86 for debug_printf.
87 (attach_thread, find_new_threads_callback): Ditto.
88
89 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
90
91 * mem-break.h (set_breakpoint_data): Remove.
92
93 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
94
95 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
96 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
97 (initialize_low): Remove set_breakpoint_data call.
98 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
99 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
100 (initialize_low): Remove set_breakpoint_data call.
101 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
102 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
103 (initialize_low): Remove set_breakpoint_data call.
104
105 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
106
107 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
108 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
109 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
110 * target.h (target_breakpoint_kind_from_pc): New macro.
111
112 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
113
114 * linux-low.c (default_breakpoint_kind_from_pc): New function.
115 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
116 the default breakpoint kind.
117
118 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
119
120 * linux-arm-low.c (arm_supports_z_point_type): Add software
121 breakpoint support.
122
123 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
124
125 * linux-arm-low.c: Refactor breakpoint definitions.
126 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
127 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
128
129 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
130
131 * Makefile.in: Add arm.c/o.
132 * configure.srv: Likewise.
133 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
134 (arm_breakpoint_kind_from_pc): New function.
135 (arm_sw_breakpoint_from_kind): Return proper kind.
136 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
137
138 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
139
140 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
141 removal.
142 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
143 (struct raw_breakpoint) <size>: Remove.
144 (struct raw_breakpoint) <kind>: Add.
145 (bp_size): New function.
146 (bp_opcode): Likewise.
147 (find_raw_breakpoint_at): Adjust for kind.
148 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
149 (remove_memory_breakpoint): Adjust for kind call bp_size.
150 (set_raw_breakpoint_at): Adjust for kind.
151 (set_breakpoint): Likewise.
152 (set_breakpoint_at): Call breakpoint_kind_from_pc.
153 (delete_raw_breakpoint): Adjust for kind.
154 (delete_breakpoint): Likewise.
155 (find_gdb_breakpoint): Likewise.
156 (set_gdb_breakpoint_1): Likewise.
157 (set_gdb_breakpoint): Likewise.
158 (delete_gdb_breakpoint_1): Likewise.
159 (delete_gdb_breakpoint): Likewise.
160 (uninsert_raw_breakpoint): Likewise.
161 (reinsert_raw_breakpoint): Likewise.
162 (set_breakpoint_data): Remove.
163 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
164 (check_mem_read): Adjust for kind call bp_size.
165 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
166 (clone_one_breakpoint): Adjust for kind.
167 * mem-break.h (set_gdb_breakpoint): Likewise.
168 (delete_gdb_breakpoint): Likewise.
169 * server.c (process_serial_event): Likewise.
170
171 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
172
173 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
174 (struct linux_target_ops) <breakpoint>: Remove.
175 (struct linux_target_ops) <breakpoint_len>: Remove.
176 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
177 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
178 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
179 (arm_sw_breakpoint_from_kind): New function.
180 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
181 (struct linux_target_ops) <breakpoint>: Remove.
182 (struct linux_target_ops) <breakpoint_len>: Remove.
183 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
184 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
185 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
186 (struct linux_target_ops) <breakpoint>: Remove.
187 (struct linux_target_ops) <breakpoint_len>: Remove.
188 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
189 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
190 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
191 (struct linux_target_ops) <breakpoint>: Remove.
192 (struct linux_target_ops) <breakpoint_len>: Remove.
193 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
194 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
195 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
196 and sw_breakpoint_from_kind to increment the pc.
197 (linux_breakpoint_kind_from_pc): New function.
198 (linux_sw_breakpoint_from_kind): New function.
199 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
200 (initialize_low): Call breakpoint_kind_from_pc and
201 sw_breakpoint_from_kind to replace breakpoint_data/len.
202 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
203 New field.
204 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
205 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
206 (struct linux_target_ops) <breakpoint>: Remove.
207 (struct linux_target_ops) <breakpoint_len>: Remove.
208 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
209 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
210 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
211 (struct linux_target_ops) <breakpoint>: Remove.
212 (struct linux_target_ops) <breakpoint_len>: Remove.
213 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
214 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
215 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
216 (struct linux_target_ops) <breakpoint>: Remove.
217 (struct linux_target_ops) <breakpoint_len>: Remove.
218 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
219 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
220 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
221 (struct linux_target_ops) <breakpoint>: Remove.
222 (struct linux_target_ops) <breakpoint_len>: Remove.
223 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
224 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
225 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
226 (struct linux_target_ops) <breakpoint>: Remove.
227 (struct linux_target_ops) <breakpoint_len>: Remove.
228 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
229 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
230 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
231 (struct linux_target_ops) <breakpoint>: Remove.
232 (struct linux_target_ops) <breakpoint_len>: Remove.
233 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
234 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
235 * linux-sh-low.c (sh_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-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
241 (struct linux_target_ops) <breakpoint>: Remove.
242 (struct linux_target_ops) <breakpoint_len>: Remove.
243 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
244 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
245 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
246 (struct linux_target_ops) <breakpoint>: Remove.
247 (struct linux_target_ops) <breakpoint_len>: Remove.
248 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
249 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
250 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
251 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
252 (struct linux_target_ops) <breakpoint>: Remove.
253 (struct linux_target_ops) <breakpoint_len>: Remove.
254 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
255 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
256 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
257 (struct linux_target_ops) <breakpoint>: Remove.
258 (struct linux_target_ops) <breakpoint_len>: Remove.
259 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
260 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
261
262 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
263
264 * linux-cris-low.c (cris_get_pc): Remove void arg.
265
266 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
267
268 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
269 variable name.
270
271 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
272
273 * inferiors.c (thread_pid_matches_callback): New function.
274 (find_thread_process): New function.
275 (remove_thread): Reset current_thread.
276 (remove_process): Assert threads have been removed first.
277
278 2015-10-15 Yao Qi <yao.qi@linaro.org>
279
280 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
281 if it is 3.
282 (aarch64_remove_point): Likewise.
283 * regcache.c (regcache_register_size): New function.
284
285 2015-10-12 Yao Qi <yao.qi@linaro.org>
286
287 * linux-aarch64-low.c: Update all callers as emit_load_store
288 is renamed to aarch64_emit_load_store.
289
290 2015-10-12 Yao Qi <yao.qi@linaro.org>
291
292 * linux-aarch64-low.c: Update all callers of function renaming
293 from emit_insn to aarch64_emit_insn.
294
295 2015-10-12 Yao Qi <yao.qi@linaro.org>
296
297 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
298 arch/aarch64-insn.h.
299 (struct aarch64_memory_operand): Likewise.
300 (ENCODE): Likewise.
301 (emit_insn): Move to arch/aarch64-insn.c.
302 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
303 (emit_load_store): Move to arch/aarch64-insn.c.
304 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
305 (can_encode_int32): Remove.
306
307 2015-10-12 Yao Qi <yao.qi@linaro.org>
308
309 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
310 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
311 (aarch64_relocate_instruction): Likewise.
312 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
313 (struct aarch64_insn_visitor): Likewise.
314
315 2015-10-12 Yao Qi <yao.qi@linaro.org>
316
317 * linux-aarch64-low.c (struct aarch64_insn_data): New.
318 (struct aarch64_insn_visitor): New.
319 (struct aarch64_insn_relocation_data): New.
320 (aarch64_ftrace_insn_reloc_b): New function.
321 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
322 (aarch64_ftrace_insn_reloc_cb): Likewise.
323 (aarch64_ftrace_insn_reloc_tb): Likewise.
324 (aarch64_ftrace_insn_reloc_adr): Likewise.
325 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
326 (aarch64_ftrace_insn_reloc_others): Likewise.
327 (visitor): New.
328 (aarch64_relocate_instruction): Use visitor.
329
330 2015-10-12 Yao Qi <yao.qi@linaro.org>
331
332 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
333 int. Add argument buf.
334 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
335 aarch64_relocate_instruction.
336
337 2015-10-12 Yao Qi <yao.qi@linaro.org>
338
339 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
340 argument insn. Remove local variable insn. Don't call
341 target_read_uint32.
342 (aarch64_install_fast_tracepoint_jump_pad): Call
343 target_read_uint32.
344
345 2015-09-30 Yao Qi <yao.qi@linaro.org>
346
347 * linux-aarch64-low.c (emit_movk): Shorten a long line.
348 (emit_load_store_pair): Likewise.
349
350 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
351
352 * dll.c (match_dll): Add cast(s).
353 (unloaded_dll): Likewise.
354 * linux-low.c (second_thread_of_pid_p): Likewise.
355 (delete_lwp_callback): Likewise.
356 (count_events_callback): Likewise.
357 (select_event_lwp_callback): Likewise.
358 (linux_set_resume_request): Likewise.
359 * server.c (accumulate_file_name_length): Likewise.
360 (emit_dll_description): Likewise.
361 (handle_qxfer_threads_worker): Likewise.
362 (visit_actioned_threads): Likewise.
363 * thread-db.c (any_thread_of): Likewise.
364 * tracepoint.c (same_process_p): Likewise.
365 (match_blocktype): Likewise.
366 (build_traceframe_info_xml): Likewise.
367
368 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
369
370 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
371 assignment.
372 (gdb_unparse_agent_expr): Likewise.
373 * hostio.c (require_data): Likewise.
374 (handle_pread): Likewise.
375 * linux-low.c (disable_regset): Likewise.
376 (fetch_register): Likewise.
377 (store_register): Likewise.
378 (get_dynamic): Likewise.
379 (linux_qxfer_libraries_svr4): Likewise.
380 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
381 (set_fast_tracepoint_jump): Likewise.
382 (uninsert_fast_tracepoint_jumps_at): Likewise.
383 (reinsert_fast_tracepoint_jumps_at): Likewise.
384 (validate_inserted_breakpoint): Likewise.
385 (clone_agent_expr): Likewise.
386 * regcache.c (init_register_cache): Likewise.
387 * remote-utils.c (putpkt_binary_1): Likewise.
388 (decode_M_packet): Likewise.
389 (decode_X_packet): Likewise.
390 (look_up_one_symbol): Likewise.
391 (relocate_instruction): Likewise.
392 (monitor_output): Likewise.
393 * server.c (handle_search_memory): Likewise.
394 (handle_qxfer_exec_file): Likewise.
395 (handle_qxfer_libraries): Likewise.
396 (handle_qxfer): Likewise.
397 (handle_query): Likewise.
398 (handle_v_cont): Likewise.
399 (handle_v_run): Likewise.
400 (captured_main): Likewise.
401 * target.c (write_inferior_memory): Likewise.
402 * thread-db.c (try_thread_db_load_from_dir): Likewise.
403 * tracepoint.c (init_trace_buffer): Likewise.
404 (add_tracepoint_action): Likewise.
405 (add_traceframe): Likewise.
406 (add_traceframe_block): Likewise.
407 (cmd_qtdpsrc): Likewise.
408 (cmd_qtdv): Likewise.
409 (cmd_qtstatus): Likewise.
410 (response_source): Likewise.
411 (response_tsv): Likewise.
412 (cmd_qtnotes): Likewise.
413 (gdb_collect): Likewise.
414 (initialize_tracepoint): Likewise.
415
416 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
417
418 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
419 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
420 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
421 <NOP>: New.
422 (enum aarch64_condition_codes): New enum.
423 (w0): New static global.
424 (fp): Likewise.
425 (lr): Likewise.
426 (struct aarch64_memory_operand) <type>: New
427 MEMORY_OPERAND_POSTINDEX type.
428 (postindex_memory_operand): New helper function.
429 (emit_ret): New function.
430 (emit_load_store_pair): New function, factored out of emit_stp
431 with support for MEMORY_OPERAND_POSTINDEX.
432 (emit_stp): Rewrite using emit_load_store_pair.
433 (emit_ldp): New function.
434 (emit_load_store): Likewise.
435 (emit_ldr): Mention post-index instruction in comment.
436 (emit_ldrh): New function.
437 (emit_ldrb): New function.
438 (emit_ldrsw): Mention post-index instruction in comment.
439 (emit_str): Likewise.
440 (emit_subs): New function.
441 (emit_cmp): Likewise.
442 (emit_and): Likewise.
443 (emit_orr): Likewise.
444 (emit_orn): Likewise.
445 (emit_eor): Likewise.
446 (emit_mvn): Likewise.
447 (emit_lslv): Likewise.
448 (emit_lsrv): Likewise.
449 (emit_asrv): Likewise.
450 (emit_mul): Likewise.
451 (emit_sbfm): Likewise.
452 (emit_sbfx): Likewise.
453 (emit_ubfm): Likewise.
454 (emit_ubfx): Likewise.
455 (emit_csinc): Likewise.
456 (emit_cset): Likewise.
457 (emit_nop): Likewise.
458 (emit_ops_insns): New helper function.
459 (emit_pop): Likewise.
460 (emit_push): Likewise.
461 (aarch64_emit_prologue): New function.
462 (aarch64_emit_epilogue): Likewise.
463 (aarch64_emit_add): Likewise.
464 (aarch64_emit_sub): Likewise.
465 (aarch64_emit_mul): Likewise.
466 (aarch64_emit_lsh): Likewise.
467 (aarch64_emit_rsh_signed): Likewise.
468 (aarch64_emit_rsh_unsigned): Likewise.
469 (aarch64_emit_ext): Likewise.
470 (aarch64_emit_log_not): Likewise.
471 (aarch64_emit_bit_and): Likewise.
472 (aarch64_emit_bit_or): Likewise.
473 (aarch64_emit_bit_xor): Likewise.
474 (aarch64_emit_bit_not): Likewise.
475 (aarch64_emit_equal): Likewise.
476 (aarch64_emit_less_signed): Likewise.
477 (aarch64_emit_less_unsigned): Likewise.
478 (aarch64_emit_ref): Likewise.
479 (aarch64_emit_if_goto): Likewise.
480 (aarch64_emit_goto): Likewise.
481 (aarch64_write_goto_address): Likewise.
482 (aarch64_emit_const): Likewise.
483 (aarch64_emit_call): Likewise.
484 (aarch64_emit_reg): Likewise.
485 (aarch64_emit_pop): Likewise.
486 (aarch64_emit_stack_flush): Likewise.
487 (aarch64_emit_zero_ext): Likewise.
488 (aarch64_emit_swap): Likewise.
489 (aarch64_emit_stack_adjust): Likewise.
490 (aarch64_emit_int_call_1): Likewise.
491 (aarch64_emit_void_call_2): Likewise.
492 (aarch64_emit_eq_goto): Likewise.
493 (aarch64_emit_ne_goto): Likewise.
494 (aarch64_emit_lt_goto): Likewise.
495 (aarch64_emit_le_goto): Likewise.
496 (aarch64_emit_gt_goto): Likewise.
497 (aarch64_emit_ge_got): Likewise.
498 (aarch64_emit_ops_impl): New static global variable.
499 (aarch64_emit_ops): New target function, return
500 &aarch64_emit_ops_impl.
501 (struct linux_target_ops): Install it.
502
503 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
504
505 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
506 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
507 aarch64-ipa.o.
508 * linux-aarch64-ipa.c: New file.
509 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
510 and endian.h.
511 (aarch64_get_thread_area): New target method.
512 (extract_signed_bitfield): New helper function.
513 (aarch64_decode_ldr_literal): New function.
514 (enum aarch64_opcodes): New enum.
515 (struct aarch64_register): New struct.
516 (struct aarch64_operand): New struct.
517 (x0): New static global.
518 (x1): Likewise.
519 (x2): Likewise.
520 (x3): Likewise.
521 (x4): Likewise.
522 (w2): Likewise.
523 (ip0): Likewise.
524 (sp): Likewise.
525 (xzr): Likewise.
526 (aarch64_register): New helper function.
527 (register_operand): Likewise.
528 (immediate_operand): Likewise.
529 (struct aarch64_memory_operand): New struct.
530 (offset_memory_operand): New helper function.
531 (preindex_memory_operand): Likewise.
532 (enum aarch64_system_control_registers): New enum.
533 (ENCODE): New macro.
534 (emit_insn): New helper function.
535 (emit_b): New function.
536 (emit_bcond): Likewise.
537 (emit_cb): Likewise.
538 (emit_tb): Likewise.
539 (emit_blr): Likewise.
540 (emit_stp): Likewise.
541 (emit_ldp_q_offset): Likewise.
542 (emit_stp_q_offset): Likewise.
543 (emit_load_store): Likewise.
544 (emit_ldr): Likewise.
545 (emit_ldrsw): Likewise.
546 (emit_str): Likewise.
547 (emit_ldaxr): Likewise.
548 (emit_stxr): Likewise.
549 (emit_stlr): Likewise.
550 (emit_data_processing_reg): Likewise.
551 (emit_data_processing): Likewise.
552 (emit_add): Likewise.
553 (emit_sub): Likewise.
554 (emit_mov): Likewise.
555 (emit_movk): Likewise.
556 (emit_mov_addr): Likewise.
557 (emit_mrs): Likewise.
558 (emit_msr): Likewise.
559 (emit_sevl): Likewise.
560 (emit_wfe): Likewise.
561 (append_insns): Likewise.
562 (can_encode_int32_in): New helper function.
563 (aarch64_relocate_instruction): New function.
564 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
565 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
566 (struct linux_target_ops): Install aarch64_get_thread_area,
567 aarch64_install_fast_tracepoint_jump_pad and
568 aarch64_get_min_fast_tracepoint_insn_len.
569
570 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
571
572 * Makefile.in (aarch64-insn.o): New rule.
573 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
574
575 2015-09-21 Yao Qi <yao.qi@linaro.org>
576
577 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
578
579 2015-09-21 Yao Qi <yao.qi@linaro.org>
580
581 * tracepoint.c (max_jump_pad_size): Remove.
582
583 2015-09-18 Yao Qi <yao.qi@linaro.org>
584
585 * linux-aarch64-low.c: Don't include sys/uio.h.
586 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
587
588 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
589
590 * tracepoint.c (eval_result_type): Change prototype.
591 (condition_true_at_tracepoint): Fix argument to compiled_cond.
592
593 2015-09-15 Pedro Alves <palves@redhat.com>
594
595 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
596 Check whether to report exec events instead of checking whether
597 multiprocess is enabled.
598
599 2015-09-15 Pedro Alves <palves@redhat.com>
600
601 PR remote/18965
602 * remote-utils.c (prepare_resume_reply): Merge
603 TARGET_WAITKIND_VFORK_DONE switch case with the
604 TARGET_WAITKIND_FORKED case.
605
606 2015-09-15 Yao Qi <yao.qi@linaro.org>
607
608 * server.c (handle_query): Check string comparison using
609 "else if" instead of "if".
610
611 2015-09-15 Yao Qi <yao.qi@linaro.org>
612
613 * server.c (vCont_supported): New global variable.
614 (handle_query): Set vCont_supported to 1 if "vContSupported+"
615 matches. Append ";vContSupported+" to own_buf.
616 (handle_v_requests): Append ";s;S" to own_buf if target supports
617 hardware single step or vCont_supported is false.
618 (capture_main): Set vCont_supported to zero.
619
620 2015-09-15 Yao Qi <yao.qi@linaro.org>
621
622 * linux-low.c (linux_supports_conditional_breakpoints): Rename
623 it to ...
624 (linux_supports_hardware_single_step): ... New function.
625 (linux_target_ops): Update.
626 * lynx-low.c (lynx_target_ops): Set field
627 supports_hardware_single_step to target_can_do_hardware_single_step.
628 * nto-low.c (nto_target_ops): Likewise.
629 * spu-low.c (spu_target_ops): Likewise.
630 * win32-low.c (win32_target_ops): Likewise.
631 * target.c (target_can_do_hardware_single_step): New function.
632 * target.h (struct target_ops) <supports_conditional_breakpoints>:
633 Remove. <supports_hardware_single_step>: New field.
634 (target_supports_conditional_breakpoints): Remove.
635 (target_supports_hardware_single_step): New macro.
636 (target_can_do_hardware_single_step): Declare.
637 * server.c (handle_query): Use target_supports_hardware_single_step
638 instead of target_supports_conditional_breakpoints.
639
640 2015-09-15 Yao Qi <yao.qi@linaro.org>
641
642 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
643 function.
644 (struct linux_target_ops the_low_target): Install
645 aarch64_linux_siginfo_fixup.
646
647 2015-09-11 Don Breazeal <donb@codesourcery.com>
648 Luis Machado <lgustavo@codesourcery.com>
649
650 * linux-low.c (linux_mourn): Static declaration.
651 (linux_arch_setup): Move in front of
652 handle_extended_wait.
653 (linux_arch_setup_thread): New function.
654 (handle_extended_wait): Handle exec events. Call
655 linux_arch_setup_thread. Make event_lwp argument a
656 pointer-to-a-pointer.
657 (check_zombie_leaders): Do not check stopped threads.
658 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
659 (linux_low_filter_event): Add lwp and thread for exec'ing
660 non-leader thread if leader thread has been deleted.
661 Refactor code into linux_arch_setup_thread and call it.
662 Pass child lwp pointer by reference to handle_extended_wait.
663 (linux_wait_for_event_filtered): Update comment.
664 (linux_wait_1): Prevent clobbering exec event status.
665 (linux_supports_exec_events): New function.
666 (linux_target_ops) <supports_exec_events>: Initialize new member.
667 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
668 new member.
669 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
670 * server.c (report_exec_events): New global variable.
671 (handle_query): Handle qSupported query for exec-events feature.
672 (captured_main): Initialize report_exec_events.
673 * server.h (report_exec_events): Declare new global variable.
674 * target.h (struct target_ops) <supports_exec_events>: New
675 member.
676 (target_supports_exec_events): New macro.
677 * win32-low.c (win32_target_ops) <supports_exec_events>:
678 Initialize new member.
679
680 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
681
682 * linux-low.c (linux_low_enable_btrace): Remove.
683 (linux_target_ops): Replace linux_low_enable_btrace with
684 linux_enable_btrace.
685
686 2015-09-03 Yao Qi <yao.qi@linaro.org>
687
688 * linux-aarch64-low.c (aarch64_insert_point): Call
689 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
690 returns true.
691
692 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
693
694 * linux-low.c (check_stopped_by_breakpoint): Use
695 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
696
697 2015-08-27 Pedro Alves <palves@redhat.com>
698
699 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
700
701 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
702
703 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
704 the XNEW-family equivalent.
705 (compile_bytecodes): Likewise.
706 * dll.c (loaded_dll): Likewise.
707 * event-loop.c (append_callback_event): Likewise.
708 (create_file_handler): Likewise.
709 (create_file_event): Likewise.
710 * hostio.c (handle_open): Likewise.
711 * inferiors.c (add_thread): Likewise.
712 (add_process): Likewise.
713 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
714 * linux-arm-low.c (arm_new_process): Likewise.
715 (arm_new_thread): Likewise.
716 * linux-low.c (add_to_pid_list): Likewise.
717 (linux_add_process): Likewise.
718 (handle_extended_wait): Likewise.
719 (add_lwp): Likewise.
720 (enqueue_one_deferred_signal): Likewise.
721 (enqueue_pending_signal): Likewise.
722 (linux_resume_one_lwp_throw): Likewise.
723 (linux_resume_one_thread): Likewise.
724 (linux_read_memory): Likewise.
725 (linux_write_memory): Likewise.
726 * linux-mips-low.c (mips_linux_new_process): Likewise.
727 (mips_linux_new_thread): Likewise.
728 (mips_add_watchpoint): Likewise.
729 * linux-x86-low.c (initialize_low_arch): Likewise.
730 * lynx-low.c (lynx_add_process): Likewise.
731 * mem-break.c (set_raw_breakpoint_at): Likewise.
732 (set_breakpoint): Likewise.
733 (add_condition_to_breakpoint): Likewise.
734 (add_commands_to_breakpoint): Likewise.
735 (clone_agent_expr): Likewise.
736 (clone_one_breakpoint): Likewise.
737 * regcache.c (new_register_cache): Likewise.
738 * remote-utils.c (look_up_one_symbol): Likewise.
739 * server.c (queue_stop_reply): Likewise.
740 (start_inferior): Likewise.
741 (queue_stop_reply_callback): Likewise.
742 (handle_target_event): Likewise.
743 * spu-low.c (fetch_ppc_memory): Likewise.
744 (store_ppc_memory): Likewise.
745 * target.c (set_target_ops): Likewise.
746 * thread-db.c (thread_db_load_search): Likewise.
747 (try_thread_db_load_1): Likewise.
748 * tracepoint.c (add_tracepoint): Likewise.
749 (add_tracepoint_action): Likewise.
750 (create_trace_state_variable): Likewise.
751 (cmd_qtdpsrc): Likewise.
752 (cmd_qtro): Likewise.
753 (add_while_stepping_state): Likewise.
754 * win32-low.c (child_add_thread): Likewise.
755 (get_image_name): Likewise.
756
757 2015-08-25 Yao Qi <yao.qi@linaro.org>
758
759 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
760
761 2015-08-25 Yao Qi <yao.qi@linaro.org>
762
763 * Makefile.in (aarch64-linux.o): New rule.
764 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
765 srv_tgtobj.
766 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
767 (aarch64_init_debug_reg_state): Make it extern.
768 (aarch64_linux_prepare_to_resume): Remove.
769
770 2015-08-25 Yao Qi <yao.qi@linaro.org>
771
772 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
773 lwp_arch_private_info and ptid_of_lwp.
774
775 2015-08-25 Yao Qi <yao.qi@linaro.org>
776
777 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
778 Find proc_info by find_process_pid. All callers updated.
779
780 2015-08-25 Yao Qi <yao.qi@linaro.org>
781
782 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
783 Remove.
784 (debug_reg_change_callback): Remove.
785 (aarch64_notify_debug_reg_change): Remove.
786
787 2015-08-25 Yao Qi <yao.qi@linaro.org>
788
789 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
790 Call current_lwp_ptid.
791
792 2015-08-25 Yao Qi <yao.qi@linaro.org>
793
794 * linux-aarch64-low.c (debug_reg_change_callback): Use
795 debug_printf.
796
797 2015-08-25 Yao Qi <yao.qi@linaro.org>
798
799 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
800
801 2015-08-25 Yao Qi <yao.qi@linaro.org>
802
803 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
804
805 2015-08-25 Yao Qi <yao.qi@linaro.org>
806
807 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
808 the code.
809
810 2015-08-25 Yao Qi <yao.qi@linaro.org>
811
812 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
813 Remove.
814 (debug_reg_change_callback): Remove argument entry and add argument
815 lwp. Remove local variable thread. Don't print thread id in the
816 debugging output. Don't check whether pid of thread equals to pid.
817 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
818 iterate_over_lwps instead find_inferior.
819
820 2015-08-24 Pedro Alves <palves@redhat.com>
821
822 * inferiors.c (get_first_process): New function.
823 * inferiors.h (get_first_process): New declaration.
824 * remote-utils.c (read_ptid): Default to the first process in the
825 list, instead of to the current thread's process.
826
827 2015-08-24 Pedro Alves <palves@redhat.com>
828
829 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
830 * event-loop.c: Likewise.
831 * remote-utils.c: Likewise.
832 * tracepoint.c: Likewise.
833
834 2015-08-24 Pedro Alves <palves@redhat.com>
835
836 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
837 ptid_get_lwp.
838
839 2015-08-21 Pedro Alves <palves@redhat.com>
840
841 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
842 instead of literal 1.
843
844 2015-08-21 Pedro Alves <palves@redhat.com>
845
846 * tdesc.c (default_description): Explicitly zero-initialize.
847
848 2015-08-21 Pedro Alves <palves@redhat.com>
849
850 PR gdb/18749
851 * inferiors.c (remove_thread): Discard any pending stop reply for
852 this thread.
853 * server.c (remove_all_on_match_pid): Rename to ...
854 (remove_all_on_match_ptid): ... this. Work with a filter ptid
855 instead of a pid.
856 (discard_queued_stop_replies): Change parameter to a ptid. Now
857 extern.
858 (handle_v_kill, kill_inferior_callback, captured_main)
859 (process_serial_event): Adjust.
860 * server.h (discard_queued_stop_replies): Declare.
861
862 2015-08-21 Pedro Alves <palves@redhat.com>
863
864 * linux-low.c (wait_for_sigstop): Always switch to no thread
865 selected if the previously current thread dies.
866 * lynx-low.c (lynx_request_interrupt): Use the first thread's
867 process instead of the current thread's.
868 * remote-utils.c (input_interrupt): Don't check if there's no
869 current thread.
870 * server.c (gdb_read_memory, gdb_write_memory): If setting the
871 current thread to the general thread fails, error out.
872 (handle_qxfer_auxv, handle_qxfer_libraries)
873 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
874 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
875 (handle_query): Check if there's a thread selected instead of
876 checking whether there's any thread in the thread list.
877 (handle_qxfer_threads, handle_qxfer_btrace)
878 (handle_qxfer_btrace_conf): Don't error out early if there's no
879 thread in the thread list.
880 (handle_v_cont, myresume): Don't set the current thread to the
881 continue thread.
882 (process_serial_event) <Hg handling>: Also set thread_id if the
883 previous general thread is still alive.
884 (process_serial_event) <g/G handling>: If setting the current
885 thread to the general thread fails, error out.
886 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
887 thread's lwp instead of the current thread's.
888 * target.c (set_desired_thread): If the desired thread was not
889 found, leave the current thread pointing to NULL. Return an int
890 (boolean) indicating success.
891 * target.h (set_desired_thread): Change return type to int.
892
893 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
894
895 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
896 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
897 #includes.
898 (ps_get_thread_area): New function.
899
900 2015-08-19 Gary Benson <gbenson@redhat.com>
901
902 * hostio.c (handle_pread): Do not attempt to read more data
903 than hostio_reply_with_data can fit in a packet.
904
905 2015-08-18 Joel Brobecker <brobecker@adacore.com>
906
907 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
908
909 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
910
911 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
912
913 2015-08-06 Pedro Alves <palves@redhat.com>
914
915 * tracepoint.c (expr_eval_result): Now an int.
916
917 2015-08-06 Pedro Alves <palves@redhat.com>
918
919 * gdbthread.h (struct regcache): Forward declare.
920 (struct thread_info) <regcache_data>: Now a struct regcache
921 pointer.
922 * inferiors.c (inferior_regcache_data)
923 (set_inferior_regcache_data): Now work with struct regcache
924 pointers.
925 * inferiors.h (struct regcache): Forward declare.
926 (inferior_regcache_data, set_inferior_regcache_data): Now work
927 with struct regcache pointers.
928 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
929 (free_register_cache_thread): Remove struct regcache pointer
930 casts.
931
932 2015-08-06 Pedro Alves <palves@redhat.com>
933
934 * server.c (captured_main): On error, print the exception message
935 to stderr, and if run_once is set, throw a quit.
936
937 2015-08-06 Pedro Alves <palves@redhat.com>
938
939 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
940 the current thread.
941
942 2015-08-06 Pedro Alves <palves@redhat.com>
943
944 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
945 reading beyond the passed in buffer length.
946
947 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
948
949 * tracepoint.c (symbol_list) <required>: Remove.
950
951 2015-08-06 Pedro Alves <palves@redhat.com>
952
953 * linux-low.c (handle_extended_wait): Set the fork child's suspend
954 count if stopping and suspending threads.
955 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
956 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
957 (linux_detach): Complete an ongoing step-over.
958 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
959 throughout.
960 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
961 (linux_wait_1): If passing a signal to the inferior after
962 finishing a step-over, unsuspend and re-resume all lwps. If we
963 see a single-step event but the thread should be continuing, don't
964 pass the trap to gdb.
965 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
966 internal_error instead of gdb_assert.
967 (enqueue_pending_signal): New function.
968 (check_ptrace_stopped_lwp_gone): Add debug output.
969 (start_step_over): Use internal_error instead of gdb_assert.
970 (complete_ongoing_step_over): New function.
971 (linux_resume_one_thread): Don't resume a suspended thread.
972 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
973 it stepping.
974
975 2015-08-06 Pedro Alves <palves@redhat.com>
976
977 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
978 (linux_thread_alive): Use lwp_is_marked_dead.
979 (extended_event_reported): Delete.
980 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
981 instead of extended_event_reported.
982 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
983 as well.
984 (lwp_is_marked_dead): New function.
985 (lwp_running): Use lwp_is_marked_dead.
986 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
987 comment.
988
989 2015-08-06 Pedro Alves <palves@redhat.com>
990
991 * linux-low.c (linux_wait_1): Move fork event output out of the
992 !report_to_gdb check. Pass event_child->waitstatus to
993 target_waitstatus_to_string instead of ourstatus.
994
995 2015-08-04 Yao Qi <yao.qi@linaro.org>
996
997 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
998 if current_thread is 32 bit.
999
1000 2015-08-04 Yao Qi <yao.qi@linaro.org>
1001
1002 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
1003 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
1004 * server.c (extended_protocol): Remove "static".
1005 * server.h (extended_protocol): Declare it.
1006
1007 2015-08-04 Yao Qi <yao.qi@linaro.org>
1008
1009 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
1010 both aarch64 and aarch32.
1011 (aarch64_set_pc): Likewise.
1012
1013 2015-08-04 Yao Qi <yao.qi@linaro.org>
1014
1015 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
1016 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
1017 arm-with-neon.xml to srv_xmlfiles.
1018 * linux-aarch64-low.c: Include linux-aarch32-low.h.
1019 (is_64bit_tdesc): New function.
1020 (aarch64_linux_read_description): New function.
1021 (aarch64_arch_setup): Call aarch64_linux_read_description.
1022 (regs_info): Rename to regs_info_aarch64.
1023 (aarch64_regs_info): Return right regs_info.
1024 (initialize_low_arch): Call initialize_low_arch_aarch32.
1025
1026 2015-08-04 Yao Qi <yao.qi@linaro.org>
1027
1028 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
1029 * linux-aarch32-low.c: New file.
1030 * linux-aarch32-low.h: New file.
1031 * linux-arm-low.c (arm_fill_gregset): Move it to
1032 linux-aarch32-low.c.
1033 (arm_store_gregset): Likewise.
1034 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
1035 (arm_store_vfpregset): Call arm_store_vfpregset_num.
1036 (arm_arch_setup): Check if PTRACE_GETREGSET works.
1037 (regs_info): Rename to regs_info_arm.
1038 (arm_regs_info): Return regs_info_aarch32 if
1039 have_ptrace_getregset is 1 and target description is
1040 arm_with_neon or arm_with_vfpv3.
1041 (initialize_low_arch): Don't call init_registers_arm_with_neon.
1042 Call initialize_low_arch_aarch32 instead.
1043
1044 2015-08-04 Yao Qi <yao.qi@linaro.org>
1045
1046 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
1047 * linux-low.c: ... here.
1048 * linux-low.h (have_ptrace_getregset): Declare it.
1049
1050 2015-08-04 Pedro Alves <palves@redhat.com>
1051
1052 * thread-db.c (struct thread_db): Use new typedefs.
1053 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
1054 CHK calls.
1055 (disable_thread_event_reporting): Cast result of dlsym to
1056 destination function pointer type.
1057 (thread_db_mourn): Use td_ta_delete_ftype.
1058
1059 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
1060
1061 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
1062 arch variant.
1063 (CDX_BREAKPOINT): Define for R2.
1064 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
1065 (the_low_target): Add comments.
1066
1067 2015-07-30 Yao Qi <yao.qi@linaro.org>
1068
1069 * linux-arm-low.c (arm_hwcap): Remove it.
1070 (arm_read_description): New local variable arm_hwcap. Don't
1071 set arm_hwcap to zero.
1072
1073 2015-07-30 Yao Qi <yao.qi@linaro.org>
1074
1075 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
1076 Use regcache->tdesc instead.
1077 (arm_store_wmmxregset): Likewise.
1078 (arm_fill_vfpregset): Likewise.
1079 (arm_store_vfpregset): Likewise.
1080
1081 2015-07-30 Yao Qi <yao.qi@linaro.org>
1082
1083 * linux-arm-low.c: Include arch/arm.h.
1084 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
1085 (arm_store_gregset): Likewise.
1086
1087 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
1088
1089 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
1090 ptrace's 4th parameter.
1091
1092 2015-07-27 Yao Qi <yao.qi@linaro.org>
1093
1094 * configure.srv (case aarch64*-*-linux*): Don't set
1095 srv_linux_usrregs.
1096
1097 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
1098
1099 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
1100 sys/ptrace.h.
1101 * linux-arm-low.c: Likewise.
1102 * linux-cris-low.c: Likewise.
1103 * linux-crisv32-low.c: Likewise.
1104 * linux-low.c: Likewise.
1105 * linux-m68k-low.c: Likewise.
1106 * linux-mips-low.c: Likewise.
1107 * linux-nios2-low.c: Likewise.
1108 * linux-s390-low.c: Likewise.
1109 * linux-sparc-low.c: Likewise.
1110 * linux-tic6x-low.c: Likewise.
1111 * linux-tile-low.c: Likewise.
1112 * linux-x86-low.c: Likewise.
1113
1114 2015-07-24 Pedro Alves <palves@redhat.com>
1115
1116 * config.in: Regenerate.
1117 * configure: Regenerate.
1118
1119 2015-07-24 Pedro Alves <palves@redhat.com>
1120
1121 * acinclude.m4: Include ../ptrace.m4.
1122 * configure.ac: Call GDB_AC_PTRACE.
1123 * config.in, configure: Regenerate.
1124
1125 2015-07-24 Yao Qi <yao.qi@linaro.org>
1126
1127 * linux-low.c (linux_create_inferior): Remove setting to
1128 proc->priv->new_inferior.
1129 (linux_attach): Likewise.
1130 (linux_low_filter_event): Likewise.
1131 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
1132
1133 2015-07-24 Yao Qi <yao.qi@linaro.org>
1134
1135 * linux-low.c (linux_arch_setup): New function.
1136 (linux_low_filter_event): If proc->tdesc is NULL and
1137 proc->attached is true, call the_low_target.arch_setup.
1138 Otherwise, keep status pending, and return.
1139 (linux_resume_one_lwp_throw): Don't call get_pc if
1140 thread->while_stepping isn't NULL. Don't call
1141 get_thread_regcache if proc->tdesc is NULL.
1142 (need_step_over_p): Return 0 if proc->tdesc is NULL.
1143 (linux_target_ops): Install arch_setup.
1144 * server.c (start_inferior): Call the_target->arch_setup.
1145 * target.h (struct target_ops) <arch_setup>: New field.
1146 (target_arch_setup): New marco.
1147 * lynx-low.c (lynx_target_ops): Update.
1148 * nto-low.c (nto_target_ops): Update.
1149 * spu-low.c (spu_target_ops): Update.
1150 * win32-low.c (win32_target_ops): Update.
1151
1152 2015-07-24 Yao Qi <yao.qi@linaro.org>
1153
1154 * linux-low.c (linux_add_process): Don't set
1155 proc->priv->new_inferior.
1156 (linux_create_inferior): Set proc->priv->new_inferior to 1.
1157 (linux_attach): Likewise.
1158
1159 2015-07-24 Yao Qi <yao.qi@linaro.org>
1160
1161 * server.c (start_inferior): Code refactor.
1162
1163 2015-07-24 Yao Qi <yao.qi@linaro.org>
1164
1165 * server.c (process_serial_event): Set general_thread.
1166
1167 2015-07-21 Yao Qi <yao.qi@linaro.org>
1168
1169 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
1170 aarch64_linux_get_debug_reg_capacity.
1171
1172 2015-07-17 Yao Qi <yao.qi@linaro.org>
1173
1174 * Makefile.in (aarch64-linux-hw-point.o): New rule.
1175 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
1176 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
1177 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
1178 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
1179 (AARCH64_HWP_ALIGNMENT): Likewise.
1180 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
1181 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
1182 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
1183 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
1184 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
1185 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
1186 (struct aarch64_debug_reg_state): Likewise.
1187 (struct arch_lwp_info): Likewise.
1188 (aarch64_align_watchpoint): Likewise.
1189 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
1190 (aarch64_watchpoint_length): Likewise.
1191 (aarch64_point_encode_ctrl_reg): Likewise
1192 (aarch64_point_is_aligned): Likewise.
1193 (aarch64_align_watchpoint): Likewise.
1194 (aarch64_linux_set_debug_regs):
1195 (aarch64_dr_state_insert_one_point): Likewise.
1196 (aarch64_dr_state_remove_one_point): Likewise.
1197 (aarch64_handle_breakpoint): Likewise.
1198 (aarch64_handle_aligned_watchpoint): Likewise.
1199 (aarch64_handle_unaligned_watchpoint): Likewise.
1200 (aarch64_handle_watchpoint): Likewise.
1201
1202 2015-07-17 Yao Qi <yao.qi@linaro.org>
1203
1204 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
1205 and don't aarch64_get_debug_reg_state. All callers update.
1206 (aarch64_handle_aligned_watchpoint): Likewise.
1207 (aarch64_handle_unaligned_watchpoint): Likewise.
1208 (aarch64_handle_watchpoint): Likewise.
1209 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
1210 (aarch64_remove_point): Likewise.
1211
1212 2015-07-17 Yao Qi <yao.qi@linaro.org>
1213
1214 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
1215 debug_printf.
1216 (aarch64_handle_unaligned_watchpoint): Likewise.
1217
1218 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
1219
1220 Revert the previous 3 commits:
1221 Move gdb_regex* to common/
1222 Move linux_find_memory_regions_full & co.
1223 gdbserver build-id attribute generator
1224
1225 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1226 Jan Kratochvil <jan.kratochvil@redhat.com>
1227
1228 gdbserver build-id attribute generator.
1229 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
1230 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
1231 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
1232 (find_phdr): New.
1233 (get_dynamic): Use find_pdhr to traverse program headers.
1234 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
1235 (compare_mapping_entry_range, struct find_memory_region_callback_data)
1236 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
1237 (get_hex_build_id): New.
1238 (linux_qxfer_libraries_svr4): Add optional build-id attribute
1239 to reply XML document.
1240
1241 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1242 Jan Kratochvil <jan.kratochvil@redhat.com>
1243
1244 * target.c: Include target/target-utils.h and fcntl.h.
1245 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
1246 (target_fileio_read_stralloc): New functions.
1247
1248 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
1249
1250 * Makefile.in (OBS): Add gdb_regex.o.
1251 (gdb_regex.o): New.
1252 * config.in: Rebuilt.
1253 * configure: Rebuilt.
1254
1255 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1256 Jan Kratochvil <jan.kratochvil@redhat.com>
1257
1258 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
1259 * Makefile.in (OBS): Add target-utils.o.
1260 (linux-maps.o, target-utils.o): New.
1261 * configure.srv (srv_linux_obj): Add linux-maps.o.
1262
1263 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
1264
1265 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
1266 function, return 1.
1267 (the_low_target): Install it.
1268
1269 2015-07-14 Pedro Alves <palves@redhat.com>
1270
1271 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
1272 Instead, ignore ECHILD, and throw an error for other errnos.
1273
1274 2015-07-10 Pedro Alves <palves@redhat.com>
1275
1276 * event-loop.c (struct callback_event) <data>: Change type to
1277 gdb_client_data instance instead of gdb_client_data pointer.
1278 (append_callback_event): Adjust.
1279
1280 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
1281
1282 * linux-aarch64-low.c: Add comments for each linux_target_ops
1283 method. Remove comments already covered in target_ops and
1284 linux_target_ops definitions.
1285 (the_low_target): Add comments for each unimplemented method.
1286
1287 2015-07-09 Yao Qi <yao.qi@linaro.org>
1288
1289 * linux-aarch64-low.c (aarch64_regmap): Remove.
1290 (aarch64_usrregs_info): Remove.
1291 (regs_info): Set field usrregs to NULL.
1292
1293 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
1294
1295 * linux-low.c: Include "rsp-low.h"
1296 (linux_low_encode_pt_config, linux_low_encode_raw): New.
1297 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
1298 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
1299 (handle_btrace_enable_pt): New.
1300 (handle_btrace_general_set): Support "pt".
1301 (handle_btrace_conf_general_set): Support "pt:size".
1302
1303 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
1304
1305 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
1306 Z_PACKET_SW_BP.
1307
1308 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
1309
1310 * linux-aarch64-low.c: Remove comment about endianness.
1311 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
1312 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
1313 memcmp.
1314
1315 2015-06-24 Gary Benson <gbenson@redhat.com>
1316
1317 * linux-i386-ipa.c (stdint.h): Do not include.
1318 * lynx-i386-low.c (stdint.h): Likewise.
1319 * lynx-ppc-low.c (stdint.h): Likewise.
1320 * mem-break.c (stdint.h): Likewise.
1321 * thread-db.c (stdint.h): Likewise.
1322 * tracepoint.c (stdint.h): Likewise.
1323 * win32-low.c (stdint.h): Likewise.
1324
1325 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
1326
1327 * server.c (write_qxfer_response): Update call to
1328 remote_escape_output.
1329
1330 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
1331 Jan Kratochvil <jan.kratochvil@redhat.com>
1332
1333 Merge multiple hex conversions.
1334 * gdbreplay.c (tohex): Rename to 'fromhex'.
1335 (logchar): Use fromhex.
1336
1337 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
1338
1339 * server.c (handle_qxfer_libraries): Set `version' attribute for
1340 <library-list>.
1341
1342 2015-06-10 Gary Benson <gbenson@redhat.com>
1343
1344 * target.h (struct target_ops) <multifs_open>: New field.
1345 <multifs_unlink>: Likewise.
1346 <multifs_readlink>: Likewise.
1347 * linux-low.c (nat/linux-namespaces.h): New include.
1348 (linux_target_ops): Initialize the_target->multifs_open,
1349 the_target->multifs_unlink and the_target->multifs_readlink.
1350 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
1351 * hostio.c (hostio_fs_pid): New static variable.
1352 (hostio_handle_new_gdb_connection): New function.
1353 (handle_setfs): Likewise.
1354 (handle_open): Use the_target->multifs_open as appropriate.
1355 (handle_unlink): Use the_target->multifs_unlink as appropriate.
1356 (handle_readlink): Use the_target->multifs_readlink as
1357 appropriate.
1358 (handle_vFile): Handle vFile:setfs packets.
1359 * server.c (handle_query): Call hostio_handle_new_gdb_connection
1360 after target_handle_new_gdb_connection.
1361
1362 2015-06-10 Gary Benson <gbenson@redhat.com>
1363
1364 * configure.ac (AC_CHECK_FUNCS): Add setns.
1365 * config.in: Regenerate.
1366 * configure: Likewise.
1367 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
1368 (linux-namespaces.o): New rule.
1369 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
1370
1371 2015-06-09 Gary Benson <gbenson@redhat.com>
1372
1373 * hostio.c (handle_open): Process mode argument with
1374 fileio_to_host_mode.
1375
1376 2015-06-01 Yao Qi <yao.qi@linaro.org>
1377
1378 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
1379 * linux-x86-low.c: Likewise.
1380
1381 2015-05-28 Don Breazeal <donb@codesourcery.com>
1382
1383 * linux-low.c (handle_extended_wait): Initialize
1384 thread_info.last_resume_kind for new fork children.
1385
1386 2015-05-15 Pedro Alves <palves@redhat.com>
1387
1388 * target.h (target_handle_new_gdb_connection): Rewrite using if
1389 wrapped in do/while.
1390
1391 2015-05-14 Joel Brobecker <brobecker@adacore.com>
1392
1393 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
1394 * configure, config.in: Regenerate.
1395 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
1396 Declare typedef.
1397
1398 2015-05-12 Don Breazeal <donb@codesourcery.com>
1399
1400 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
1401 PTRACE_EVENT_VFORK_DONE.
1402 (linux_low_ptrace_options, extended_event_reported): Add vfork
1403 events.
1404 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
1405 and "vforkdone" for RSP 'T' Stop Reply Packet.
1406 * server.h (report_vfork_events): Declare
1407 global variable.
1408
1409 2015-05-12 Don Breazeal <donb@codesourcery.com>
1410
1411 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
1412 (the_low_target) <new_fork>: Initialize new member.
1413 * linux-arm-low.c (arm_new_fork): New function.
1414 (the_low_target) <new_fork>: Initialize new member.
1415 * linux-low.c (handle_extended_wait): Call new target function
1416 new_fork.
1417 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
1418 * linux-mips-low.c (mips_add_watchpoint): New function
1419 extracted from mips_insert_point.
1420 (the_low_target) <new_fork>: Initialize new member.
1421 (mips_linux_new_fork): New function.
1422 (mips_insert_point): Call mips_add_watchpoint.
1423 * linux-x86-low.c (x86_linux_new_fork): New function.
1424 (the_low_target) <new_fork>: Initialize new member.
1425
1426 2015-05-12 Don Breazeal <donb@codesourcery.com>
1427
1428 * linux-low.c (handle_extended_wait): Implement return value,
1429 rename argument 'event_child' to 'event_lwp', handle
1430 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
1431 (linux_low_ptrace_options): New function.
1432 (linux_low_filter_event): Call linux_low_ptrace_options,
1433 use different argument fo linux_enable_event_reporting,
1434 use return value from handle_extended_wait.
1435 (extended_event_reported): New function.
1436 (linux_wait_1): Call extended_event_reported and set
1437 status to report fork events.
1438 (linux_write_memory): Add pid to debug message.
1439 (reset_lwp_ptrace_options_callback): New function.
1440 (linux_handle_new_gdb_connection): New function.
1441 (linux_target_ops): Initialize new structure member.
1442 * linux-low.h (struct lwp_info) <waitstatus>: New member.
1443 * lynx-low.c: Initialize new structure member.
1444 * remote-utils.c (prepare_resume_reply): Implement stop reason
1445 "fork" for "T" stop message.
1446 * server.c (handle_query): Call handle_new_gdb_connection.
1447 * server.h (report_fork_events): Declare global flag.
1448 * target.h (struct target_ops) <handle_new_gdb_connection>:
1449 New member.
1450 (target_handle_new_gdb_connection): New macro.
1451 * win32-low.c: Initialize new structure member.
1452
1453 2015-05-12 Don Breazeal <donb@codesourcery.com>
1454
1455 * mem-break.c (APPEND_TO_LIST): Define macro.
1456 (clone_agent_expr): New function.
1457 (clone_one_breakpoint): New function.
1458 (clone_all_breakpoints): New function.
1459 * mem-break.h: Declare new functions.
1460
1461 2015-05-12 Don Breazeal <donb@codesourcery.com>
1462
1463 * linux-low.c (linux_supports_fork_events): New function.
1464 (linux_supports_vfork_events): New function.
1465 (linux_target_ops): Initialize new structure members.
1466 (initialize_low): Call linux_check_ptrace_features.
1467 * lynx-low.c (lynx_target_ops): Initialize new structure
1468 members.
1469 * server.c (report_fork_events, report_vfork_events):
1470 New global flags.
1471 (handle_query): Add new features to qSupported packet and
1472 response.
1473 (captured_main): Initialize new global variables.
1474 * target.h (struct target_ops) <supports_fork_events>:
1475 New member.
1476 <supports_vfork_events>: New member.
1477 (target_supports_fork_events): New macro.
1478 (target_supports_vfork_events): New macro.
1479 * win32-low.c (win32_target_ops): Initialize new structure
1480 members.
1481
1482 2015-05-12 Gary Benson <gbenson@redhat.com>
1483
1484 * server.c (handle_qxfer_exec_file): Use current process
1485 if annex is empty.
1486
1487 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
1488
1489 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
1490 Remove HAVE_PTRACE_GETREGS conditionals.
1491 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
1492 instead of PTRACE_GETREGS and PTRACE_SETREGS.
1493
1494 2015-05-08 Yao Qi <yao.qi@linaro.org>
1495
1496 * linux-low.c (linux_supports_conditional_breakpoints): New
1497 function.
1498 (linux_target_ops): Install new target method.
1499 * lynx-low.c (lynx_target_ops): Install NULL hook for
1500 supports_conditional_breakpoints.
1501 * nto-low.c (nto_target_ops): Likewise.
1502 * spu-low.c (spu_target_ops): Likewise.
1503 * win32-low.c (win32_target_ops): Likewise.
1504 * server.c (handle_query): Check
1505 target_supports_conditional_breakpoints.
1506 * target.h (struct target_ops) <supports_conditional_breakpoints>:
1507 New field.
1508 (target_supports_conditional_breakpoints): New macro.
1509
1510 2015-05-06 Pedro Alves <palves@redhat.com>
1511
1512 PR server/18081
1513 * server.c (start_inferior): If the process exits, mourn it.
1514
1515 2015-04-21 Gary Benson <gbenson@redhat.com>
1516
1517 * hostio.c (fileio_open_flags_to_host): Factored out to
1518 fileio_to_host_openflags in common/fileio.c. Single use
1519 updated.
1520
1521 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
1522
1523 * linux-xtensa-low.c (xtensa_fill_gregset)
1524 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
1525 XCHAL_HAVE_LOOP.
1526
1527 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
1528
1529 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
1530 (regs_info): Replace usrregs pointer with NULL.
1531
1532 2015-04-17 Gary Benson <gbenson@redhat.com>
1533
1534 * target.h (struct target_ops) <pid_to_exec_file>: New field.
1535 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
1536 * server.c (handle_qxfer_exec_file): New function.
1537 (qxfer_packets): Add exec-file entry.
1538 (handle_query): Report qXfer:exec-file:read as supported packet.
1539
1540 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
1541
1542 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
1543
1544 2015-04-09 Gary Benson <gbenson@redhat.com>
1545
1546 * hostio-errno.c (errno_to_fileio_error): Remove function.
1547 Update caller to use remote_fileio_to_fio_error.
1548
1549 2015-04-09 Yao Qi <yao.qi@linaro.org>
1550
1551 * linux-low.c (linux_insert_point): Call
1552 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
1553 (linux_remove_point): Call remove_memory_breakpoint if type is
1554 raw_bkpt_type_sw.
1555 * linux-x86-low.c (x86_insert_point): Don't call
1556 insert_memory_breakpoint.
1557 (x86_remove_point): Don't call remove_memory_breakpoint.
1558
1559 2015-04-01 Pedro Alves <palves@redhat.com>
1560 Cleber Rosa <crosa@redhat.com>
1561
1562 * server.c (gdbserver_usage): Reorganize and extend the usage
1563 message.
1564
1565 2015-03-24 Pedro Alves <palves@redhat.com>
1566
1567 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
1568 output. Also dump TRAP_TRACE.
1569 (linux_low_filter_event): In debug output, distinguish a
1570 resume_stop SIGSTOP from a delayed SIGSTOP.
1571
1572 2015-03-24 Gary Benson <gbenson@redhat.com>
1573
1574 * linux-x86-low.c (x86_linux_new_thread): Moved to
1575 nat/x86-linux.c.
1576 (x86_linux_prepare_to_resume): Likewise.
1577
1578 2015-03-24 Gary Benson <gbenson@redhat.com>
1579
1580 * Makefile.in (x86-linux-dregs.o): New rule.
1581 * configure.srv: Add x86-linux-dregs.o to relevant targets.
1582 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
1583 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
1584 (x86_linux_dr_get): Likewise.
1585 (x86_linux_dr_set): Likewise.
1586 (update_debug_registers_callback): Likewise.
1587 (x86_linux_dr_set_addr): Likewise.
1588 (x86_linux_dr_get_addr): Likewise.
1589 (x86_linux_dr_set_control): Likewise.
1590 (x86_linux_dr_get_control): Likewise.
1591 (x86_linux_dr_get_status): Likewise.
1592 (x86_linux_update_debug_registers): Likewise.
1593
1594 2015-03-24 Gary Benson <gbenson@redhat.com>
1595
1596 * linux-x86-low.c (x86_linux_update_debug_registers):
1597 New function, factored out from...
1598 (x86_linux_prepare_to_resume): ...this.
1599
1600 2015-03-24 Gary Benson <gbenson@redhat.com>
1601
1602 * linux-x86-low.c (x86_linux_dr_get): Update comments.
1603 (x86_linux_dr_set): Likewise.
1604 (update_debug_registers_callback): Likewise.
1605 (x86_linux_dr_set_addr): Likewise.
1606 (x86_linux_dr_get_addr): Likewise.
1607 (x86_linux_dr_set_control): Likewise.
1608 (x86_linux_dr_get_control): Likewise.
1609 (x86_linux_dr_get_status): Likewise.
1610 (x86_linux_prepare_to_resume): Likewise.
1611
1612 2015-03-24 Gary Benson <gbenson@redhat.com>
1613
1614 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
1615 Use perror_with_name. Pass string through gettext.
1616 (x86_linux_dr_set): Likewise.
1617
1618 2015-03-24 Gary Benson <gbenson@redhat.com>
1619
1620 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
1621 (x86_linux_dr_set_addr): ...this.
1622 (x86_dr_low_get_addr): Rename to...
1623 (x86_linux_dr_get_addr): ...this.
1624 (x86_dr_low_set_control): Rename to...
1625 (x86_linux_dr_set_control): ...this.
1626 (x86_dr_low_get_control): Rename to...
1627 (x86_linux_dr_get_control): ...this.
1628 (x86_dr_low_get_status): Rename to...
1629 (x86_linux_dr_get_status): ...this.
1630 (x86_dr_low): Update with new function names.
1631
1632 2015-03-24 Gary Benson <gbenson@redhat.com>
1633
1634 * Makefile.in (x86-linux.o): New rule.
1635 * configure.srv: Add x86-linux.o to relevant targets.
1636 * linux-low.c (lwp_set_arch_private_info): New function.
1637 (lwp_arch_private_info): Likewise.
1638 * linux-x86-low.c: Include nat/x86-linux.h.
1639 (arch_lwp_info): Removed structure.
1640 (update_debug_registers_callback):
1641 Use lwp_set_debug_registers_changed.
1642 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
1643 and lwp_set_debug_registers_changed.
1644 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
1645
1646 2015-03-24 Gary Benson <gbenson@redhat.com>
1647
1648 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
1649 * linux-arm-low.c (arm_new_thread): Likewise.
1650 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
1651 * linux-mips-low.c (mips_linux_new_thread): Likewise.
1652 * linux-x86-low.c (x86_linux_new_thread): Likewise.
1653 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
1654
1655 2015-03-24 Gary Benson <gbenson@redhat.com>
1656
1657 * linux-low.c (ptid_of_lwp): New function.
1658 (lwp_is_stopped): Likewise.
1659 (lwp_stop_reason): Likewise.
1660 * linux-x86-low.c (update_debug_registers_callback):
1661 Use lwp_is_stopped.
1662 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
1663 lwp_stop_reason.
1664
1665 2015-03-24 Gary Benson <gbenson@redhat.com>
1666
1667 * linux-low.h (linux_stop_lwp): Remove declaration.
1668
1669 2015-03-24 Gary Benson <gbenson@redhat.com>
1670
1671 * linux-low.h: Include nat/linux-nat.h.
1672 * linux-low.c (iterate_over_lwps_args): New structure.
1673 (iterate_over_lwps_filter): New function.
1674 (iterate_over_lwps): Likewise.
1675 * linux-x86-low.c (update_debug_registers_callback):
1676 Update signature to what iterate_over_lwps expects.
1677 Remove PID check that iterate_over_lwps now performs.
1678 (x86_dr_low_set_addr): Use iterate_over_lwps.
1679 (x86_dr_low_set_control): Likewise.
1680
1681 2015-03-24 Gary Benson <gbenson@redhat.com>
1682
1683 * linux-x86-low.c (x86_debug_reg_state): New function.
1684 (x86_linux_prepare_to_resume): Use the above.
1685
1686 2015-03-24 Gary Benson <gbenson@redhat.com>
1687
1688 * linux-low.c (current_lwp_ptid): New function.
1689 * linux-x86-low.c: Include nat/linux-nat.h.
1690 (x86_dr_low_get_addr): Use current_lwp_ptid.
1691 (x86_dr_low_get_control): Likewise.
1692 (x86_dr_low_get_status): Likewise.
1693
1694 2015-03-20 Pedro Alves <palves@redhat.com>
1695
1696 * tracepoint.c (cmd_qtstatus): Make "str" const.
1697
1698 2015-03-20 Pedro Alves <palves@redhat.com>
1699
1700 * server.c (handle_general_set): Make "req_str" const.
1701
1702 2015-03-19 Pedro Alves <palves@redhat.com>
1703
1704 * linux-low.c (linux_resume_one_lwp): Rename to ...
1705 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
1706 instead call perror_with_name.
1707 (check_ptrace_stopped_lwp_gone): New function.
1708 (linux_resume_one_lwp): Reimplement as wrapper around
1709 linux_resume_one_lwp_throw that swallows errors if the LWP is
1710 gone.
1711
1712 2015-03-19 Pedro Alves <palves@redhat.com>
1713
1714 * linux-low.c (count_events_callback, select_event_lwp_callback):
1715 No longer check whether the thread has resume_stop as last resume
1716 kind.
1717
1718 2015-03-19 Pedro Alves <palves@redhat.com>
1719
1720 * linux-low.c (count_events_callback, select_event_lwp_callback):
1721 Use the lwp's status_pending_p field, not the thread's.
1722
1723 2015-03-19 Pedro Alves <palves@redhat.com>
1724
1725 * linux-low.c (select_event_lwp_callback): Update comments to
1726 no longer mention SIGTRAP.
1727
1728 2015-03-18 Gary Benson <gbenson@redhat.com>
1729
1730 * server.c (handle_query): Do not report vFile:fstat as supported.
1731
1732 2015-03-11 Gary Benson <gbenson@redhat.com>
1733
1734 * hostio.c (sys/types.h): New include.
1735 (sys/stat.h): Likewise.
1736 (common-remote-fileio.h): Likewise.
1737 (handle_fstat): New function.
1738 (handle_vFile): Handle vFile:fstat packets.
1739
1740 2015-03-11 Gary Benson <gbenson@redhat.com>
1741
1742 * configure.ac (AC_CHECK_MEMBERS): Add checks for
1743 struct stat.st_blocks and struct stat.st_blksize.
1744 * configure: Regenerate.
1745 * config.in: Likewise.
1746 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
1747 (OBS): Add common-remote-fileio.o.
1748 (common-remote-fileio.o): New rule.
1749
1750 2015-03-09 Pedro Alves <palves@redhat.com>
1751
1752 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
1753 'struct sockaddr' pointer in 'accept' call.
1754
1755 2015-03-09 Pedro Alves <palves@redhat.com>
1756
1757 Revert:
1758 2015-03-07 Pedro Alves <palves@redhat.com>
1759 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
1760 or <winsock2.h> here. Instead include "gdb_socket.h".
1761 (remote_open): Use union gdb_sockaddr_u.
1762 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
1763 or <winsock2.h> here. Instead include "gdb_socket.h".
1764 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
1765 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
1766 or <sys/un.h>.
1767 (init_named_socket, gdb_agent_helper_thread): Use union
1768 gdb_sockaddr_u.
1769
1770 2015-03-07 Pedro Alves <palves@redhat.com>
1771
1772 * configure.ac (build_warnings): Move
1773 -Wdeclaration-after-statement to the C-specific set.
1774 * configure: Regenerate.
1775
1776 2015-03-07 Pedro Alves <palves@redhat.com>
1777
1778 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
1779 or <winsock2.h> here. Instead include "gdb_socket.h".
1780 (remote_open): Use union gdb_sockaddr_u.
1781 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
1782 or <winsock2.h> here. Instead include "gdb_socket.h".
1783 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
1784 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
1785 or <sys/un.h>.
1786 (init_named_socket, gdb_agent_helper_thread): Use union
1787 gdb_sockaddr_u.
1788
1789 2015-03-07 Pedro Alves <palves@redhat.com>
1790
1791 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
1792 instead.
1793
1794 2015-03-06 Yao Qi <yao.qi@linaro.org>
1795
1796 * linux-aarch64-low.c (aarch64_insert_point): Use
1797 show_debug_regs as a boolean.
1798 (aarch64_remove_point): Likewise.
1799
1800 2015-03-05 Pedro Alves <palves@redhat.com>
1801
1802 * lynx-low.c (lynx_target_ops): Install NULL hooks for
1803 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
1804 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
1805 * nto-low.c (nto_target_ops): Likewise.
1806 * spu-low.c (spu_target_ops): Likewise.
1807 * win32-low.c (win32_target_ops): Likewise.
1808
1809 2015-03-04 Pedro Alves <palves@redhat.com>
1810
1811 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
1812 Decide whether a breakpoint triggered based on the SIGTRAP's
1813 siginfo.si_code.
1814 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
1815 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
1816 (linux_low_filter_event): Check for breakpoints before checking
1817 watchpoints.
1818 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
1819 siginfo.si_code.
1820 (linux_stopped_by_sw_breakpoint)
1821 (linux_supports_stopped_by_sw_breakpoint)
1822 (linux_stopped_by_hw_breakpoint)
1823 (linux_supports_stopped_by_hw_breakpoint): New functions.
1824 (linux_target_ops): Install new target methods.
1825
1826 2015-03-04 Pedro Alves <palves@redhat.com>
1827
1828 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
1829 * server.c (swbreak_feature, hwbreak_feature): New globals.
1830 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
1831 (captured_main): Clear swbreak_feature and hwbreak_feature.
1832 * server.h (swbreak_feature, hwbreak_feature): Declare.
1833 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
1834 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
1835 supports_stopped_by_hw_breakpoint>: New fields.
1836 (target_supports_stopped_by_sw_breakpoint)
1837 (target_stopped_by_sw_breakpoint)
1838 (target_supports_stopped_by_hw_breakpoint)
1839 (target_stopped_by_hw_breakpoint): Declare.
1840
1841 2015-03-04 Pedro Alves <palves@redhat.com>
1842
1843 enum lwp_stop_reason -> enum target_stop_reason
1844 * linux-low.c (check_stopped_by_breakpoint): Adjust.
1845 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
1846 (linux_wait_1, stuck_in_jump_pad_callback)
1847 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
1848 (linux_stopped_by_watchpoint):
1849 * linux-low.h (enum lwp_stop_reason): Delete.
1850 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
1851 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
1852
1853 2015-03-04 Yao Qi <yao.qi@linaro.org>
1854
1855 * Makefile.in (SFILES): Add linux-aarch64-low.c.
1856
1857 2015-03-03 Gary Benson <gbenson@redhat.com>
1858
1859 * hostio.c (handle_vFile): Fix prefix lengths.
1860
1861 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
1862
1863 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
1864 ptr_bits.
1865
1866 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
1867
1868 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
1869 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
1870 (clean): Add "rm -f" for above C files.
1871 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
1872 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
1873 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
1874 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
1875 * linux-s390-low.c (HWCAP_S390_VX): New macro.
1876 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
1877 (init_registers_s390x_vx_linux64)
1878 (init_registers_s390x_tevx_linux64)
1879 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
1880 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
1881 declarations.
1882 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
1883 (s390_store_vxrs_high): New functions.
1884 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
1885 NT_S390_VXRS_HIGH.
1886 (s390_arch_setup): Add logic for selecting one of the new target
1887 descriptions. Activate the new vector regsets if applicable.
1888 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
1889 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
1890 and init_registers_s390x_tevx_linux64.
1891
1892 2015-03-01 Pedro Alves <palves@redhat.com>
1893
1894 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
1895 parameter.
1896
1897 2015-02-27 Pedro Alves <palves@redhat.com>
1898
1899 * linux-x86-low.c (u_debugreg_offset): New function.
1900 (x86_linux_dr_get, x86_linux_dr_set): Use it.
1901
1902 2015-02-27 Pedro Alves <palves@redhat.com>
1903
1904 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
1905 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
1906 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
1907 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
1908 (ps_lsetfpregs, ps_getpid)
1909 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
1910 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
1911 (ps_lsetxregs, ps_plog): Declare.
1912
1913 2015-02-27 Pedro Alves <palves@redhat.com>
1914
1915 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
1916 IP_AGENT_EXPORT_FUNC.
1917 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
1918 IP_AGENT_EXPORT_FUNC.
1919 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
1920 (IP_AGENT_EXPORT): Delete.
1921 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
1922 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
1923 (gdb_trampoline_buffer_error, collecting, gdb_collect)
1924 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
1925 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
1926 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
1927 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
1928 (traceframe_read_count, traceframe_write_count)
1929 (traceframes_created, trace_state_variables, get_raw_reg)
1930 (get_trace_state_variable_value, set_trace_state_variable_value)
1931 (ust_loaded, helper_thread_id, cmd_buf): Use
1932 IPA_SYM_EXPORTED_NAME.
1933 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
1934 (tracepoints) Use IP_AGENT_EXPORT_VAR.
1935 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
1936 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
1937 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
1938 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
1939 EXTERN_C_PUSH/EXTERN_C_POP.
1940 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
1941 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
1942 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
1943 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
1944 (traceframe_write_count, traceframe_read_count)
1945 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
1946 (about_to_request_buffer_space, get_trace_state_variable_value)
1947 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
1948 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
1949 EXTERN_C_PUSH/EXTERN_C_POP.
1950 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
1951 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
1952 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
1953 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
1954 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
1955 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
1956 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
1957 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
1958 Define.
1959 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
1960 (IP_AGENT_EXPORT_VAR_DECL): Define.
1961 (tracing): Declare.
1962 (gdb_agent_get_raw_reg): Declare.
1963
1964 2015-02-27 Tom Tromey <tromey@redhat.com>
1965 Pedro Alves <palves@redhat.com>
1966
1967 Rename symbols whose names are reserved C++ keywords throughout.
1968
1969 2015-02-27 Pedro Alves <palves@redhat.com>
1970
1971 * Makefile.in (COMPILER): New, get it from autoconf.
1972 (CXX): Get from autoconf instead.
1973 (COMPILE.pre): Use COMPILER.
1974 (CC-LD): Rename to ...
1975 (CC_LD): ... this. Use COMPILER.
1976 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
1977 (CXX_FOR_TARGET): Default to g++ instead of gcc.
1978 * acinclude.m4: Include build-with-cxx.m4.
1979 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
1980 Disable -Werror by default if building in C++ mode.
1981 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
1982 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
1983 the C++ compiler. Save/restore CXXFLAGS too.
1984 * configure: Regenerate.
1985
1986 2015-02-27 Pedro Alves <palves@redhat.com>
1987
1988 * acinclude.m4: Include libiberty.m4.
1989 * configure.ac: Call libiberty_INIT.
1990 * config.in, configure: Regenerate.
1991
1992 2015-02-26 Pedro Alves <palves@redhat.com>
1993
1994 * linux-low.c (linux_wait_1): When incrementing the PC past a
1995 program breakpoint always use the_low_target.breakpoint_len as
1996 increment, rather than the maximum between that and
1997 the_low_target.decr_pc_after_break.
1998
1999 2015-02-23 Pedro Alves <palves@redhat.com>
2000
2001 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
2002 thread was doing a step-over; always adjust the PC if
2003 we stepped over a permanent breakpoint.
2004 (linux_wait_1): If we stepped over breakpoint that was on top of a
2005 permanent breakpoint, manually advance the PC past it.
2006
2007 2015-02-23 Pedro Alves <palves@redhat.com>
2008
2009 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
2010 modes.
2011 (x86_fill_gregset, x86_store_gregset): Use it when handling
2012 $orig_eax.
2013
2014 2015-02-20 Pedro Alves <palves@redhat.com>
2015
2016 * thread-db.c: Include "nat/linux-procfs.h".
2017 (thread_db_init): Skip listing new threads if the kernel supports
2018 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
2019
2020 2015-02-20 Pedro Alves <palves@redhat.com>
2021
2022 * linux-low.c (status_pending_p_callback): Use ptid_match.
2023
2024 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
2025
2026 PR breakpoints/16812
2027 * linux-low.c (wstatus_maybe_breakpoint): Remove.
2028 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
2029 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
2030
2031 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
2032
2033 PR breakpoints/15956
2034 * tracepoint.c (cmd_qtinit): Add check for current_thread.
2035
2036 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2037
2038 * linux-low.c (linux_low_btrace_conf): Print size.
2039 * server.c (handle_btrace_conf_general_set): New.
2040 (hanle_general_set): Call handle_btrace_conf_general_set.
2041 (handle_query): Report Qbtrace-conf:bts:size as supported.
2042
2043 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2044
2045 * linux-low.c (linux_low_enable_btrace): Update parameters.
2046 (linux_low_btrace_conf): New.
2047 (linux_target_ops)<to_btrace_conf>: Initialize.
2048 * server.c (current_btrace_conf): New.
2049 (handle_btrace_enable): Rename to ...
2050 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
2051 to target_enable_btrace. Update comment. Update users.
2052 (handle_qxfer_btrace_conf): New.
2053 (qxfer_packets): Add btrace-conf entry.
2054 (handle_query): Report qXfer:btrace-conf:read as supported packet.
2055 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
2056 (target_ops)<read_btrace_conf>: New.
2057 (target_enable_btrace): Update parameters.
2058 (target_read_btrace_conf): New.
2059
2060 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2061
2062 * server.c (handle_btrace_general_set): Remove call to
2063 target_supports_btrace.
2064 (supported_btrace_packets): New.
2065 (handle_query): Call supported_btrace_packets.
2066 * target.h: include btrace-common.h.
2067 (btrace_target_info): Removed.
2068 (supports_btrace, target_supports_btrace): Update parameters.
2069
2070 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2071
2072 * Makefile.in (SFILES): Add common/btrace-common.c.
2073 (OBS): Add common/btrace-common.o.
2074 (btrace-common.o): Add build rules.
2075 * linux-low: Include btrace-common.h.
2076 (linux_low_read_btrace): Use struct btrace_data. Call
2077 btrace_data_init and btrace_data_fini.
2078
2079 2015-02-06 Pedro Alves <palves@redhat.com>
2080
2081 * thread-db.c (find_new_threads_callback): Add debug output.
2082
2083 2015-02-04 Pedro Alves <palves@redhat.com>
2084
2085 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
2086 (resume_stopped_resumed_lwps): New function.
2087 (linux_wait_for_event_filtered): Use it.
2088
2089 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
2090
2091 * Makefile.in (SFILES): Add linux-personality.c.
2092 (linux-personality.o): New rule.
2093 * configure.srv (srv_linux_obj): Add linux-personality.o to the
2094 list of objects to be built.
2095 * linux-low.c: Include nat/linux-personality.h.
2096 (linux_create_inferior): Remove code to disable address space
2097 randomization (moved to ../nat/linux-personality.c). Create
2098 cleanup to disable address space randomization.
2099
2100 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
2101
2102 * Makefile.in (posix-strerror.o): New rule.
2103 (mingw-strerror.o): Likewise.
2104 * configure: Regenerated.
2105 * configure.ac: Source file ../common/common.host. Initialize new
2106 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
2107
2108 2015-01-14 Yao Qi <yao@codesourcery.com>
2109
2110 * Makefile.in (SFILES): Add nat/ppc-linux.c.
2111 (ppc-linux.o): New rule.
2112 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
2113 * configure.ac: AC_CHECK_FUNCS(getauxval).
2114 * config.in: Re-generated.
2115 * configure: Re-generated.
2116 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
2117 ppc64_64bit_inferior_p
2118
2119 2015-01-14 Yao Qi <yao@codesourcery.com>
2120
2121 * linux-ppc-low.c: Include "nat/ppc-linux.h".
2122 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
2123 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
2124 (PT_ORIG_R3, PT_TRAP): Likewise.
2125 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
2126 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
2127 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
2128
2129 2015-01-10 Joel Brobecker <brobecker@adacore.com>
2130
2131 * i387-fp.c (i387_cache_to_xsave): In look over
2132 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
2133 zmmh_low_space field by use of zmmh_high_space.
2134
2135 2015-01-09 Pedro Alves <palves@redhat.com>
2136
2137 * linux-low.c (step_over_bkpt): Move higher up in the file.
2138 (handle_extended_wait): Don't store the stop_pc here.
2139 (get_stop_pc): Adjust comments and rename to ...
2140 (check_stopped_by_breakpoint): ... this. Record whether the LWP
2141 stopped for a software breakpoint or hardware breakpoint.
2142 (thread_still_has_status_pending_p): New function.
2143 (status_pending_p_callback): Use
2144 thread_still_has_status_pending_p. If the event is no longer
2145 interesting, resume the LWP.
2146 (handle_tracepoints): Add assert.
2147 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
2148 (wstatus_maybe_breakpoint): New function.
2149 (cancel_breakpoint): Delete function.
2150 (check_stopped_by_watchpoint): New function, factored out from
2151 linux_low_filter_event.
2152 (lp_status_maybe_breakpoint): Delete function.
2153 (linux_low_filter_event): Remove filter_ptid argument.
2154 Leave thread group exits pending here. Store the LWP's stop PC.
2155 Always leave events pending.
2156 (linux_wait_for_event_filtered): Pull all events out of the
2157 kernel, and leave them all pending.
2158 (count_events_callback, select_event_lwp_callback): Consider all
2159 events.
2160 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
2161 (select_event_lwp): Only give preference to the stepping LWP in
2162 all-stop mode. Adjust comments.
2163 (ignore_event): New function.
2164 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
2165 references to cancel_breakpoints. Adjust to renames. Also give
2166 equal priority to all LWPs that have had events in non-stop mode.
2167 If reporting a software breakpoint event, unadjust the LWP's PC.
2168 (linux_wait): If linux_wait_1 returned an ignored event, retry.
2169 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
2170 Adjust.
2171 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
2172 (resume_status_pending_p): Use thread_still_has_status_pending_p.
2173 (linux_stopped_by_watchpoint): Adjust.
2174 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
2175 * linux-low.h (enum lwp_stop_reason): New.
2176 (struct lwp_info) <stop_pc>: Adjust comment.
2177 <stopped_by_watchpoint>: Delete field.
2178 <stop_reason>: New field.
2179 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
2180 * mem-break.c (software_breakpoint_inserted_here)
2181 (hardware_breakpoint_inserted_here): New function.
2182 * mem-break.h (software_breakpoint_inserted_here)
2183 (hardware_breakpoint_inserted_here): Declare.
2184 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
2185 (cancel_breakpoints): Delete.
2186 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
2187 (upload_fast_traceframes): Remove references to
2188 cancel_breakpoints.
2189
2190 2015-01-09 Pedro Alves <palves@redhat.com>
2191
2192 * thread-db.c (find_new_threads_callback): Ignore thread if the
2193 kernel thread ID is -1.
2194
2195 2015-01-09 Pedro Alves <palves@redhat.com>
2196
2197 * linux-low.c (linux_attach_fail_reason_string): Move to
2198 nat/linux-ptrace.c, and rename.
2199 (linux_attach_lwp): Update comment.
2200 (attach_proc_task_lwp_callback): New function.
2201 (linux_attach): Adjust to rename and use
2202 linux_proc_attach_tgid_threads.
2203 (linux_attach_fail_reason_string): Delete declaration.
2204
2205 2015-01-01 Joel Brobecker <brobecker@adacore.com>
2206
2207 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
2208 * server.c (gdbserver_version): Likewise.
2209
2210 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
2211
2212 * remote-utils.c: Include ctype.h.
2213 (input_interrupt): Explicitly handle the case when the char
2214 received is the NUL byte. Improve the printing of non-ASCII
2215 characters.
2216
2217 2014-12-16 Joel Brobecker <brobecker@adacore.com>
2218
2219 * linux-low.c (linux_low_filter_event): Update call to
2220 linux_enable_event_reporting following the addition of
2221 a new parameter to that function.
2222
2223 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
2224
2225 PR server/17457
2226 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
2227 (AARCH64_FPCR_REGNO): Likewise.
2228 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
2229 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
2230 (aarch64_store_fpregset): Likewise.
2231
2232 2014-12-15 Joel Brobecker <brobecker@adacore.com>
2233
2234 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
2235 Remove FIXME comment about assumption about N.
2236
2237 2014-12-13 Joel Brobecker <brobecker@adacore.com>
2238
2239 * configure.ac: If large-file support is disabled in GDBserver,
2240 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
2241 * configure: Regenerate.
2242
2243 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2244
2245 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
2246 warning upon ENODATA from ptrace.
2247 * linux-s390-low.c (s390_store_tdb): New.
2248 (s390_regsets): Add regset for NT_S390_TDB.
2249
2250 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2251
2252 * linux-low.c (regsets_store_inferior_registers): Skip regsets
2253 without a fill_function.
2254 * linux-s390-low.c (s390_fill_last_break): Remove.
2255 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
2256 (s390_arch_setup): Use regset's size instead of fill_function for
2257 loop end condition.
2258
2259 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2260
2261 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
2262 the regset's store function when ptrace returned an error.
2263 * regcache.c (get_thread_regcache): Invalidate register cache
2264 before fetching inferior's registers.
2265
2266 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2267
2268 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
2269 while-loop as for-loop.
2270 (regsets_store_inferior_registers): Likewise.
2271
2272 2014-11-28 Yao Qi <yao@codesourcery.com>
2273
2274 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
2275 * config.in, configure: Re-generate.
2276 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
2277 is defined.
2278
2279 2014-11-21 Yao Qi <yao@codesourcery.com>
2280
2281 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
2282 (AC_CHECK_HEADERS): Remove malloc.h.
2283 * configure: Re-generated.
2284 * config.in: Re-generated.
2285 * server.h: Don't include alloca.h and malloc.h.
2286 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
2287 Don't include malloc.h.
2288
2289 2014-11-17 Joel Brobecker <brobecker@adacore.com>
2290
2291 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
2292 corresponding ERRNO check in same block.
2293
2294 2014-11-12 Pedro Alves <palves@redhat.com>
2295
2296 * server.c (cont_thread): Update comment.
2297 (start_inferior, attach_inferior): No longer clear cont_thread.
2298 (handle_v_cont): No longer set cont_thread.
2299 (captured_main): Clear cont_thread each time a GDB connects.
2300
2301 2014-11-12 Pedro Alves <palves@redhat.com>
2302
2303 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
2304 thread, and don't resume all threads if the Hc thread has exited.
2305
2306 2014-11-12 Pedro Alves <palves@redhat.com>
2307
2308 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
2309 the process group instead of to a specific LWP.
2310
2311 2014-10-15 Pedro Alves <palves@redhat.com>
2312
2313 PR server/17487
2314 * win32-arm-low.c (arm_set_thread_context): Remove current_event
2315 parameter.
2316 (arm_set_thread_context): Delete.
2317 (the_low_target): Adjust.
2318 * win32-i386-low.c (debug_registers_changed)
2319 (debug_registers_used): Delete.
2320 (update_debug_registers_callback): New function.
2321 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
2322 needing to update their debug registers.
2323 (win32_get_current_dr): New function.
2324 (x86_dr_low_get_addr, x86_dr_low_get_control)
2325 (x86_dr_low_get_status): Fetch the debug register from the thread
2326 record's context.
2327 (i386_initial_stuff): Adjust.
2328 (i386_get_thread_context): Remove current_event parameter. Don't
2329 clear debug_registers_changed nor copy DR values to
2330 debug_reg_state.
2331 (i386_set_thread_context): Delete.
2332 (i386_prepare_to_resume): New function.
2333 (i386_thread_added): Mark the thread as needing to update irs
2334 debug registers.
2335 (the_low_target): Remove i386_set_thread_context and install
2336 i386_prepare_to_resume.
2337 * win32-low.c (win32_get_thread_context): Adjust.
2338 (win32_set_thread_context): Use SetThreadContext
2339 directly.
2340 (win32_prepare_to_resume): New function.
2341 (win32_require_context): New function, factored out from ...
2342 (thread_rec): ... this.
2343 (continue_one_thread): Call win32_prepare_to_resume on each thread
2344 we're about to continue.
2345 (win32_resume): Call win32_prepare_to_resume on the event thread.
2346 * win32-low.h (struct win32_thread_info)
2347 <debug_registers_changed>: New field.
2348 (struct win32_target_ops): Change prototype of set_thread_context,
2349 delete set_thread_context and add prepare_to_resume.
2350 (win32_require_context): New declaration.
2351
2352 2014-10-08 Gary Benson <gbenson@redhat.com>
2353
2354 * server.h: Do not include common-exceptions.h.
2355
2356 2014-10-08 Gary Benson <gbenson@redhat.com>
2357
2358 * server.h: Do not include cleanups.h.
2359
2360 2014-09-30 James Hogan <james.hogan@imgtec.com>
2361
2362 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
2363 mips64-dsp-linux.c.
2364
2365 2014-09-23 Yao Qi <yao@codesourcery.com>
2366
2367 * linux-low.c (lp_status_maybe_breakpoint): New function.
2368 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
2369 (count_events_callback): Likewise.
2370 (select_event_lwp_callback): Likewise.
2371 (cancel_breakpoints_callback): Likewise.
2372
2373 2014-09-19 Don Breazeal <donb@codesourcery.com>
2374
2375 * linux-low.c (handle_extended_wait): Call
2376 linux_ptrace_get_extended_event.
2377 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
2378 linux_is_extended_waitstatus.
2379
2380 2014-09-16 Joel Brobecker <brobecker@adacore.com>
2381
2382 * Makefile.in (CPPFLAGS): Define.
2383 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
2384 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
2385
2386 2014-09-16 Gary Benson <gbenson@redhat.com>
2387
2388 * inferiors.h (current_inferior): Renamed as...
2389 (current_thread): New variable. All uses updated.
2390 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
2391 (maybe_move_out_of_jump_pad): Likewise.
2392 (cancel_breakpoint): Likewise.
2393 (linux_low_filter_event): Likewise.
2394 (wait_for_sigstop): Likewise.
2395 (linux_resume_one_lwp): Likewise.
2396 (need_step_over_p): Likewise.
2397 (start_step_over): Likewise.
2398 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
2399 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
2400 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
2401 and save_inferior as saved_thread.
2402 * regcache.c (get_thread_regcache): Renamed saved_inferior as
2403 saved_thread.
2404 (regcache_invalidate_thread): Likewise.
2405 * remote-utils.c (prepare_resume_reply): Likewise.
2406 * thread-db.c (thread_db_get_tls_address): Likewise.
2407 (disable_thread_event_reporting): Likewise.
2408 (remove_thread_event_breakpoints): Likewise.
2409 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
2410 as saved_thread.
2411 * target.h (set_desired_inferior): Renamed as...
2412 (set_desired_thread): New declaration. All uses updated.
2413 * server.c (myresume): Updated comment to reference thread instead
2414 of inferior.
2415 (handle_serial_event): Likewise.
2416 (handle_target_event): Likewise.
2417
2418 2014-09-12 Tom Tromey <tromey@redhat.com>
2419 Gary Benson <gbenson@redhat.com>
2420
2421 * regcache.h: Include common-regcache.h.
2422 (regcache_read_pc): Don't declare.
2423 * regcache.c (get_thread_regcache_for_ptid): New function.
2424
2425 2014-09-11 Tom Tromey <tromey@redhat.com>
2426 Gary Benson <gbenson@redhat.com>
2427
2428 * symbol.c: New file.
2429 * Makefile.in (SFILES): Add symbol.c.
2430 (OBS): Add symbol.o.
2431
2432 2014-09-11 Gary Benson <gbenson@redhat.com>
2433
2434 * target.c (target_stop_ptid, target_continue_ptid): New
2435 functions.
2436
2437 2014-09-11 Tom Tromey <tromey@redhat.com>
2438 Gary Benson <gbenson@redhat.com>
2439
2440 * target.h: Include target/target.h.
2441 * target.c (target_read_memory, target_read_uint32)
2442 (target_write_memory): New functions.
2443
2444 2014-09-11 Gary Benson <gbenson@redhat.com>
2445
2446 * server.h (debug_hw_points): Don't declare.
2447 * server.c (debug_hw_points): Don't define. Replace all uses
2448 with show_debug_regs.
2449 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
2450 all uses with show_debug_regs.
2451
2452 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
2453
2454 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
2455 endianness into account.
2456 (ppc_supply_ptrace_register): Likewise.
2457
2458 2014-09-03 James Hogan <james.hogan@imgtec.com>
2459
2460 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
2461 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
2462
2463 2014-09-03 Gary Benson <gbenson@redhat.com>
2464
2465 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
2466 ALL_DEBUG_ADDRESS_REGISTERS.
2467
2468 2014-09-02 Gary Benson <gbenson@redhat.com>
2469
2470 * i386-low.h: Renamed as...
2471 * x86-low.h: New file. All type, function and variable name
2472 prefixes changed from "i386_" to "x86_". All references updated.
2473 * i386-low.c: Renamed as...
2474 * x86-low.c: New file. All type, function and variable name
2475 prefixes changed from "i386_" to "x86_". All references updated.
2476
2477 2014-09-02 Gary Benson <gbenson@redhat.com>
2478
2479 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
2480 (x86_linux_new_thread): Likewise.
2481
2482 2014-08-29 Gary Benson <gbenson@redhat.com>
2483
2484 * server.h (setjmp.h): Do not include.
2485 (toplevel): Do not declare.
2486 (common-exceptions.h): Include.
2487 (cleanups.h): Likewise.
2488 * server.c (toplevel): Do not define.
2489 (exit_code): New static global.
2490 (detach_or_kill_for_exit_cleanup): New function.
2491 (main): New function. Original main renamed to...
2492 (captured_main): New function.
2493 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
2494
2495 2014-08-29 Gary Benson <gbenson@redhat.com>
2496
2497 * Makefile.in (SFILES): Add common/common-exceptions.c.
2498 (OBS): Add common-exceptions.o.
2499 (common-exceptions.o): New rule.
2500 * utils.c (prepare_to_throw_exception): New function.
2501
2502 2014-08-29 Gary Benson <gbenson@redhat.com>
2503
2504 * config.in: Regenerate.
2505 * configure: Likewise.
2506
2507 2014-08-29 Gary Benson <gbenson@redhat.com>
2508
2509 * Makefile.in (SFILES): Add common/cleanups.c.
2510 (OBS): cleanups.o.
2511 (cleanups.o): New rule.
2512
2513 2014-08-29 Gary Benson <gbenson@redhat.com>
2514
2515 * utils.c (internal_vwarning): New function.
2516
2517 2014-08-28 Gary Benson <gbenson@redhat.com>
2518
2519 * utils.h (fatal): Remove declaration.
2520 * utils.c (fatal): Remove function.
2521
2522 2014-08-28 Gary Benson <gbenson@redhat.com>
2523
2524 * tracepoint.c (gdb_agent_init): Replace fatal with
2525 perror_with_name.
2526 (initialize_tracepoint): Likewise.
2527
2528 2014-08-28 Gary Benson <gbenson@redhat.com>
2529
2530 * remote-utils.c (remote_prepare): Replace fatal with error.
2531
2532 2014-08-28 Gary Benson <gbenson@redhat.com>
2533
2534 * linux-low.c (linux_async): Replace fatal with warning.
2535 Tidy up and return.
2536 (linux_start_non_stop): Return -1 if linux_async failed.
2537
2538 2014-08-28 Gary Benson <gbenson@redhat.com>
2539
2540 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
2541 gdb_assert.
2542 (i386_dr_low_get_addr): Remove vague comment.
2543 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
2544 gdb_assert.
2545
2546 2014-08-28 Gary Benson <gbenson@redhat.com>
2547
2548 * inferiors.c (get_thread_process): Replace check with gdb_assert.
2549 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
2550 internal_error.
2551 (linux_resume_one_lwp): Likewise.
2552 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
2553 gdb_assert.
2554 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
2555 with internal_error.
2556 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
2557 (init_register_cache): Replace fatal with gdb_assert_not_reached.
2558 (find_register_by_name): Replace fatal with internal_error.
2559 (find_regno): Likewise.
2560 * tdesc.c (init_target_desc): Replace check with gdb_assert.
2561 * thread-db.c (thread_db_create_event): Likewise.
2562 (thread_db_load_search): Likewise.
2563 (try_thread_db_load_1): Likewise.
2564 * tracepoint.c (get_jump_space_head): Replace fatal with
2565 internal_error.
2566 (claim_trampoline_space): Likewise.
2567 (have_fast_tracepoint_trampoline_buffer): Likewise.
2568 (cmd_qtstart): Likewise.
2569 (stop_tracing): Likewise.
2570 (fast_tracepoint_collecting): Likewise.
2571 (target_malloc): Likewise.
2572 (download_tracepoint): Likewise.
2573 (download_trace_state_variables): Replace check with gdb_assert.
2574 (upload_fast_traceframes): Replace fatal with internal_error.
2575
2576 2014-08-19 Tom Tromey <tromey@redhat.com>
2577 Gary Benson <gbenson@redhat.com>
2578
2579 * Makefile.in (SFILES): Add common/common-debug.c.
2580 (OBS): Add common-debug.o.
2581 (common-debug.o): New rule.
2582 * debug.h (debug_printf): Don't declare.
2583 * debug.c (debug_printf): Renamed and rewritten as...
2584 (debug_vprintf): New function.
2585
2586 2014-08-19 Gary Benson <gbenson@redhat.com>
2587
2588 * utils.h: Do not include print-utils.h.
2589
2590 2014-08-19 Tom Tromey <tromey@redhat.com>
2591 Gary Benson <gbenson@redhat.com>
2592
2593 * server.h: Add static assertion.
2594 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
2595
2596 2014-08-19 Tom Tromey <tromey@redhat.com>
2597 Gary Benson <gbenson@redhat.com>
2598
2599 * Makefile.in (SFILES): Add common/errors.c.
2600 (OBS): Add errors.o.
2601 (IPA_OBS): Add errors-ipa.o.
2602 (errors.o): New rule.
2603 (errors-ipa.o): Likewise.
2604 * utils.h (perror_with_name, error, warning): Don't declare.
2605 * utils.c (warning): Renamed and rewritten as...
2606 (vwarning): New function.
2607 (error): Renamed and rewritten as...
2608 (verror): New function.
2609 (internal_error): Renamed and rewritten as...
2610 (internal_verror): New function.
2611
2612 2014-08-07 Gary Benson <gbenson@redhat.com>
2613
2614 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
2615 * configure: Regenerate.
2616 * config.in: Likewise.
2617 * server.h: Do not include errno.h.
2618 * event-loop.c: Likewise.
2619 * hostio-errno.c: Likewise.
2620 * linux-low.c: Likewise.
2621 * remote-utils.c: Likewise.
2622 * spu-low.c: Likewise.
2623 * utils.c: Likewise.
2624 * gdbreplay.c: Unconditionally include errno.h.
2625
2626 2014-08-07 Gary Benson <gbenson@redhat.com>
2627
2628 * server.h: Do not include string.h.
2629 * event-loop.c: Likewise.
2630 * linux-low.c: Likewise.
2631 * regcache.c: Likewise.
2632 * remote-utils.c: Likewise.
2633 * spu-low.c: Likewise.
2634 * utils.c: Likewise.
2635
2636 2014-08-07 Gary Benson <gbenson@redhat.com>
2637
2638 * server.h: Do not include gdb_assert.h.
2639
2640 2014-08-07 Gary Benson <gbenson@redhat.com>
2641
2642 * server.h: Do not include common-utils.h.
2643
2644 2014-08-07 Gary Benson <gbenson@redhat.com>
2645
2646 * server.h: Do not include ptid.h.
2647 * notif.h: Likewise.
2648
2649 2014-08-07 Gary Benson <gbenson@redhat.com>
2650
2651 * server.h: Do not include gdb_locale.h.
2652
2653 2014-08-07 Gary Benson <gbenson@redhat.com>
2654
2655 * server.h: Do not include gdb/signals.h.
2656 * win32-low.c: Likewise.
2657
2658 2014-08-07 Gary Benson <gbenson@redhat.com>
2659
2660 * server.h: Do not include pathmax.h.
2661
2662 2014-08-07 Gary Benson <gbenson@redhat.com>
2663
2664 * server.h: Do not include libiberty.h.
2665 * linux-bfin-low.c: Likewise.
2666
2667 2014-08-07 Gary Benson <gbenson@redhat.com>
2668
2669 * server.h: Do not include ansidecl.h.
2670
2671 2014-08-07 Gary Benson <gbenson@redhat.com>
2672
2673 * linux-x86-low.c: Do not include stddef.h.
2674 * lynx-ppc-low.c: Likewise.
2675 * tracepoint.c: Likewise.
2676
2677 2014-08-07 Gary Benson <gbenson@redhat.com>
2678
2679 * server.h: Do not include stdarg.h.
2680 * nto-low.c: Likewise.
2681
2682 2014-08-07 Gary Benson <gbenson@redhat.com>
2683
2684 * server.h: Do not include stdlib.h.
2685 * inferiors.c: Likewise.
2686 * linux-low.c: Likewise.
2687 * regcache.c: Likewise.
2688 * spu-low.c: Likewise.
2689 * tracepoint.c: Likewise.
2690 * utils.c: Likewise.
2691
2692 2014-08-07 Gary Benson <gbenson@redhat.com>
2693
2694 * server.h: Do not include stdio.h.
2695 * linux-low.c: Likewise.
2696 * remote-utils.c: Likewise.
2697 * spu-low.c: Likewise.
2698 * utils.c: Likewise.
2699 * wincecompat.c: Likewise.
2700
2701 2014-08-06 Gary Benson <gbenson@redhat.com>
2702
2703 * regcache.c (init_register_cache): Move conditionals inside if.
2704
2705 2014-08-06 Gary Benson <gbenson@redhat.com>
2706
2707 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
2708
2709 2014-07-31 Gary Benson <gbenson@redhat.com>
2710
2711 * ax.h: Do not include server.h.
2712 * gdbthread.h: Likewise.
2713 * lynx-low.h: Likewise.
2714 * notif.h: Likewise.
2715
2716 2014-07-30 Gary Benson <gbenson@redhat.com>
2717
2718 * server.h: Include common-defs.h.
2719 Do not include config.h or build-gnulib-gdbserver/config.h.
2720
2721 2014-07-30 Gary Benson <gbenson@redhat.com>
2722
2723 * hostio-errno.c: Move server.h to top of includes list.
2724 * inferiors.c: Likewise.
2725 * linux-x86-low.c: Likewise.
2726 * notif.c: Include server.h.
2727
2728 2014-07-24 Tom Tromey <tromey@redhat.com>
2729 Gary Benson <gbenson@redhat.com>
2730
2731 * server.h (CORE_ADDR): Now unsigned.
2732
2733 2014-07-16 Pedro Alves <palves@redhat.com>
2734
2735 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
2736
2737 2014-07-15 Pedro Alves <palves@redhat.com>
2738
2739 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
2740 copy.
2741
2742 2014-07-11 Pedro Alves <palves@redhat.com>
2743
2744 * linux-low.c (kill_wait_lwp): New function, based on
2745 kill_one_lwp_callback, but use my_waitpid directly.
2746 (kill_one_lwp_callback, linux_kill): Use it.
2747
2748 2014-06-23 Pedro Alves <palves@redhat.com>
2749
2750 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
2751 before setting DR0..DR3.
2752
2753 2014-06-20 Gary Benson <gbenson@redhat.com>
2754
2755 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
2756 * configure: Regenerated.
2757 * config.in: Likewise.
2758
2759 2014-06-20 Gary Benson <gbenson@redhat.com>
2760
2761 * Makefile.in (SFILES): Update locations for files moved
2762 from common to nat.
2763 (object file files): Reordered.
2764
2765 2014-06-20 Gary Benson <gbenson@redhat.com>
2766
2767 * i386-low.h (i386_dr_low_can_set_addr): Removed.
2768 (i386_dr_low_set_addr): Likewise.
2769 (i386_dr_low_get_addr): Likewise.
2770 (i386_dr_low_can_set_control): Likewise.
2771 (i386_dr_low_set_control): Likewise.
2772 (i386_dr_low_get_control): Likewise.
2773 (i386_dr_low_get_status): Likewise.
2774 (i386_get_debug_register_length): Likewise.
2775 * linux-x86-low.c (i386_dr_low_set_addr):
2776 Changed signature. Made static.
2777 (i386_dr_low_get_addr): Likewise.
2778 (i386_dr_low_set_control): Likewise.
2779 (i386_dr_low_get_control): Likewise.
2780 (i386_dr_low_get_status): Likewise.
2781 (i386_dr_low): New global variable.
2782 * win32-i386-low.c (i386_dr_low_set_addr):
2783 Changed signature. Made static.
2784 (i386_dr_low_get_addr): Likewise.
2785 (i386_dr_low_set_control): Likewise.
2786 (i386_dr_low_get_control): Likewise.
2787 (i386_dr_low_get_status): Likewise.
2788 (i386_dr_low): New global variable.
2789
2790 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
2791
2792 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
2793 * Makefile.in (AR, AR_FLAGS): Define.
2794 * configure: Regenerate.
2795
2796 2014-06-19 Gary Benson <gbenson@redhat.com>
2797
2798 * Makefile.in (i386-dregs.o): New rule.
2799 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
2800 * i386-low.c (target.h): Remove include.
2801 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
2802 (DR_CONTROL_SHIFT): Likewise.
2803 (DR_CONTROL_SIZE): Likewise.
2804 (DR_RW_EXECUTE): Likewise.
2805 (DR_RW_WRITE): Likewise.
2806 (DR_RW_READ): Likewise.
2807 (DR_RW_IORW): Likewise.
2808 (DR_LEN_1): Likewise.
2809 (DR_LEN_2): Likewise.
2810 (DR_LEN_4): Likewise.
2811 (DR_LEN_8): Likewise.
2812 (DR_LOCAL_ENABLE_SHIFT): Likewise.
2813 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
2814 (DR_ENABLE_SIZE): Likewise.
2815 (DR_LOCAL_SLOWDOWN): Likewise.
2816 (DR_GLOBAL_SLOWDOWN): Likewise.
2817 (DR_CONTROL_RESERVED): Likewise.
2818 (I386_DR_CONTROL_MASK): Likewise.
2819 (I386_DR_VACANT): Likewise.
2820 (I386_DR_LOCAL_ENABLE): Likewise.
2821 (I386_DR_GLOBAL_ENABLE): Likewise.
2822 (I386_DR_DISABLE): Likewise.
2823 (I386_DR_SET_RW_LEN): Likewise.
2824 (I386_DR_GET_RW_LEN): Likewise.
2825 (I386_DR_WATCH_HIT): Likewise.
2826 (i386_wp_op_t): Likewise.
2827 (i386_show_dr): Likewise.
2828 (i386_length_and_rw_bits): Likewise.
2829 (i386_insert_aligned_watchpoint): Likewise.
2830 (i386_remove_aligned_watchpoint): Likewise.
2831 (i386_handle_nonaligned_watchpoint): Likewise.
2832 i386_update_inferior_debug_regs(): Likewise.
2833 (i386_dr_insert_watchpoint): Likewise.
2834 (i386_dr_remove_watchpoint): Likewise.
2835 (i386_dr_region_ok_for_watchpoint): Likewise.
2836 (i386_dr_stopped_data_address): Likewise.
2837 (i386_dr_stopped_by_watchpoint): Likewise.
2838
2839 2014-06-19 Gary Benson <gbenson@redhat.com>
2840
2841 * i386-low.c (i386_dr_show): Renamed to
2842 i386_show_dr and made static. All uses updated.
2843 (i386_dr_length_and_rw_bits): Renamed to
2844 i386_length_and_rw_bits and made static.
2845 All uses updated.
2846 (i386_dr_insert_aligned_watchpoint): Renamed to
2847 i386_insert_aligned_watchpoint and made static.
2848 All uses updated.
2849 (i386_dr_remove_aligned_watchpoint): Renamed to
2850 i386_remove_aligned_watchpoint and made static.
2851 All uses updated.
2852 (i386_dr_update_inferior_debug_regs): Renamed to
2853 i386_update_inferior_debug_regs and made static.
2854 All uses updated.
2855
2856 2014-06-18 Gary Benson <gbenson@redhat.com>
2857
2858 * i386-low.h (i386_dr_low_can_set_addr): New macro.
2859 (i386_dr_low_can_set_control): Likewise.
2860 (i386_get_debug_register_length): Likewise.
2861 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
2862 (i386_dr_low_can_set_control): Likewise.
2863 (i386_get_debug_register_length): Likewise.
2864
2865 2014-06-17 Gary Benson <gbenson@redhat.com>
2866
2867 * i386-low.h (i386-dregs.h): New include.
2868 (DR_FIRSTADDR): Now in i386-dregs.h.
2869 (DR_LASTADDR): Likewise.
2870 (DR_NADDR): Likewise.
2871 (DR_STATUS): Likewise.
2872 (DR_CONTROL): Likewise.
2873 (i386_debug_reg_state): Likewise.
2874 (i386_dr_insert_watchpoint): Likewise.
2875 (i386_dr_remove_watchpoint): Likewise.
2876 (i386_dr_region_ok_for_watchpoint): Likewise.
2877 (i386_dr_stopped_data_address): Likewise.
2878 (i386_dr_stopped_by_watchpoint): Likewise.
2879 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
2880
2881 2014-06-18 Gary Benson <gbenson@redhat.com>
2882
2883 * i386-low.h (i386_low_insert_watchpoint): Renamed to
2884 i386_dr_insert_watchpoint.
2885 (i386_low_remove_watchpoint): Renamed to
2886 i386_dr_remove_watchpoint.
2887 (i386_low_region_ok_for_watchpoint): Renamed to
2888 i386_dr_region_ok_for_watchpoint.
2889 (i386_low_stopped_data_address): Renamed to
2890 i386_dr_stopped_data_address.
2891 (i386_low_stopped_by_watchpoint): Renamed to
2892 i386_dr_stopped_by_watchpoint.
2893 * i386-low.c (i386_show_dr): Renamed to
2894 i386_dr_show and made nonstatic. All uses updated.
2895 (i386_length_and_rw_bits): Renamed to
2896 i386_dr_length_and_rw_bits and made nonstatic.
2897 All uses updated.
2898 (i386_insert_aligned_watchpoint): Renamed to
2899 i386_dr_insert_aligned_watchpoint and made nonstatic.
2900 All uses updated.
2901 (i386_remove_aligned_watchpoint): Renamed to
2902 i386_dr_remove_aligned_watchpoint and made nonstatic.
2903 All uses updated.
2904 (i386_update_inferior_debug_regs): Renamed to
2905 i386_dr_update_inferior_debug_regs and made nonstatic.
2906 All uses updated.
2907 (i386_low_insert_watchpoint): Renamed to
2908 i386_dr_insert_watchpoint. All uses updated.
2909 (i386_low_remove_watchpoint): Renamed to
2910 i386_dr_remove_watchpoint. All uses updated.
2911 (i386_low_region_ok_for_watchpoint): Renamed to
2912 i386_dr_region_ok_for_watchpoint. All uses updated.
2913 (i386_low_stopped_data_address): Renamed to
2914 i386_dr_stopped_data_address. All uses updated.
2915 (i386_low_stopped_by_watchpoint): Renamed to
2916 i386_dr_stopped_by_watchpoint. All uses updated.
2917
2918 2014-06-18 Gary Benson <gbenson@redhat.com>
2919
2920 * i386-low.c (i386_dr_low_can_set_addr): New macro.
2921 (i386_dr_low_can_set_control): Likewise.
2922 (i386_insert_aligned_watchpoint): New check.
2923
2924 2014-06-18 Gary Benson <gbenson@redhat.com>
2925
2926 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
2927 Renamed to state.
2928
2929 2014-06-18 Gary Benson <gbenson@redhat.com>
2930
2931 * i386-low.c (i386_length_and_rw_bits): Use internal_error
2932 instead of fatal and error.
2933 (i386_handle_nonaligned_watchpoint): Likewise.
2934
2935 2014-06-18 Gary Benson <gbenson@redhat.com>
2936
2937 * i386-low.c (i386_get_debug_register_length): New macro.
2938 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
2939 (i386_show_dr): Use debug_printf instead of fprintf. Use
2940 phex to format values.
2941
2942 2014-06-18 Gary Benson <gbenson@redhat.com>
2943
2944 * i386-low.h: Comment changes.
2945 * i386-low.c: Likewise.
2946
2947 2014-06-18 Gary Benson <gbenson@redhat.com>
2948
2949 * i386-low.c: Whitespace changes.
2950
2951 2014-06-12 Tom Tromey <tromey@redhat.com>
2952
2953 * utils.c (freeargv): Remove.
2954
2955 2014-06-12 Tom Tromey <tromey@redhat.com>
2956
2957 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
2958 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
2959 (parse_debug_format_options): Likewise.
2960 (gdbserver_usage): Likewise.
2961 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
2962 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
2963 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
2964 against libiberty.
2965 ($(LIBGNU)): Depend on libiberty.
2966 (all-lib): Recurse into all subdirs.
2967 (install-only): Invoke "install" target in subdirs.
2968 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
2969 targets.
2970 * configure: Rebuild.
2971 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
2972 for vasprintf, vsnprintf, or gettimeofday.
2973 * configure.srv: Don't add safe-ctype.o or lbasename.o to
2974 srv_tgtobj.
2975
2976 2014-06-05 Joel Brobecker <brobecker@adacore.com>
2977
2978 * development.sh: Delete.
2979 * Makefile.in (config.status): Adjust dependency on development.sh.
2980 * configure.ac: Adjust development.sh source call.
2981 * configure: Regenerate.
2982
2983 2014-06-02 Pedro Alves <palves@redhat.com>
2984
2985 * ax.c (gdb_free_agent_expr): New function.
2986 * ax.h (gdb_free_agent_expr): New declaration.
2987 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
2988 list.
2989 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
2990 static.
2991 (clear_breakpoint_conditions_and_commands): New function.
2992 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
2993 (clear_breakpoint_conditions_and_commands): New declaration.
2994
2995 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
2996
2997 * linux-aarch64-low.c (asm/ptrace.h): Include.
2998
2999 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
3000
3001 Fix TLS access for -static -pthread.
3002 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
3003 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
3004 (thread_db_load_search, try_thread_db_load_1): Initialize it.
3005
3006 2014-05-20 Pedro Alves <palves@redhat.com>
3007
3008 * linux-aarch64-low.c (aarch64_insert_point)
3009 (aarch64_remove_point): No longer check whether the type is
3010 supported here. Adjust to new interface.
3011 (the_low_target): Install aarch64_supports_z_point_type as
3012 supports_z_point_type method.
3013 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
3014 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
3015 instead of a Z packet char. Adjust.
3016 (arm_supports_z_point_type): New function.
3017 (arm_insert_point, arm_remove_point): Adjust to new interface.
3018 (the_low_target): Install arm_supports_z_point_type.
3019 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
3020 (cris_insert_point, cris_remove_point): Adjust to new interface.
3021 Don't check whether the type is supported here.
3022 (the_low_target): Install cris_supports_z_point_type.
3023 * linux-low.c (linux_supports_z_point_type): New function.
3024 (linux_insert_point, linux_remove_point): Adjust to new interface.
3025 * linux-low.h (struct linux_target_ops) <insert_point,
3026 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
3027 raw_breakpoint pointer parameter.
3028 <supports_z_point_type>: New method.
3029 * linux-mips-low.c (mips_supports_z_point_type): New function.
3030 (mips_insert_point, mips_remove_point): Adjust to new interface.
3031 Use mips_supports_z_point_type.
3032 (the_low_target): Install mips_supports_z_point_type.
3033 * linux-ppc-low.c (the_low_target): Install NULL as
3034 supports_z_point_type method.
3035 * linux-s390-low.c (the_low_target): Install NULL as
3036 supports_z_point_type method.
3037 * linux-sparc-low.c (the_low_target): Install NULL as
3038 supports_z_point_type method.
3039 * linux-x86-low.c (x86_supports_z_point_type): New function.
3040 (x86_insert_point): Adjust to new insert_point interface. Use
3041 insert_memory_breakpoint. Adjust to new
3042 i386_low_insert_watchpoint interface.
3043 (x86_remove_point): Adjust to remove_point interface. Use
3044 remove_memory_breakpoint. Adjust to new
3045 i386_low_remove_watchpoint interface.
3046 (the_low_target): Install x86_supports_z_point_type.
3047 * lynx-low.c (lynx_target_ops): Install NULL as
3048 supports_z_point_type callback.
3049 * nto-low.c (nto_supports_z_point_type): New.
3050 (nto_insert_point, nto_remove_point): Adjust to new interface.
3051 (nto_target_ops): Install nto_supports_z_point_type.
3052 * mem-break.c: Adjust intro comment.
3053 (struct raw_breakpoint) <raw_type, size>: New fields.
3054 <inserted>: Update comment.
3055 <shlib_disabled>: Delete field.
3056 (enum bkpt_type) <gdb_breakpoint>: Delete value.
3057 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
3058 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
3059 (raw_bkpt_type_to_target_hw_bp_type): New function.
3060 (find_enabled_raw_code_breakpoint_at): New function.
3061 (find_raw_breakpoint_at): New type and size parameters. Use them.
3062 (insert_memory_breakpoint): New function, based off
3063 set_raw_breakpoint_at.
3064 (remove_memory_breakpoint): New function.
3065 (set_raw_breakpoint_at): Reimplement.
3066 (set_breakpoint): New, based on set_breakpoint_at.
3067 (set_breakpoint_at): Reimplement.
3068 (delete_raw_breakpoint): Go through the_target->remove_point
3069 instead of assuming memory breakpoints.
3070 (find_gdb_breakpoint_at): Delete.
3071 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
3072 (find_gdb_breakpoint): New function.
3073 (set_gdb_breakpoint_at): Delete.
3074 (z_type_supported): New function.
3075 (set_gdb_breakpoint_1): New function, loosely based off
3076 set_gdb_breakpoint_at.
3077 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
3078 (delete_gdb_breakpoint_at): Delete.
3079 (delete_gdb_breakpoint_1): New function, loosely based off
3080 delete_gdb_breakpoint_at.
3081 (delete_gdb_breakpoint): New function.
3082 (clear_gdb_breakpoint_conditions): Rename to ...
3083 (clear_breakpoint_conditions): ... this. Don't handle a NULL
3084 breakpoint.
3085 (add_condition_to_breakpoint): Make static.
3086 (add_breakpoint_condition): Take a struct breakpoint pointer
3087 instead of an address. Adjust.
3088 (gdb_condition_true_at_breakpoint): Rename to ...
3089 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
3090 z_type parameter.
3091 (gdb_condition_true_at_breakpoint): Reimplement.
3092 (add_breakpoint_commands): Take a struct breakpoint pointer
3093 instead of an address. Adjust.
3094 (gdb_no_commands_at_breakpoint): Rename to ...
3095 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
3096 parameter. Return true if no breakpoint was found. Change debug
3097 output.
3098 (gdb_no_commands_at_breakpoint): Reimplement.
3099 (run_breakpoint_commands): Rename to ...
3100 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
3101 and change return type to boolean.
3102 (run_breakpoint_commands): New function.
3103 (gdb_breakpoint_here): Also check for Z1 breakpoints.
3104 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
3105 breakpoint. Go through the_target->remove_point instead of
3106 assuming memory breakpoint.
3107 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
3108 software and hardware breakpoints.
3109 (reinsert_raw_breakpoint): Go through the_target->insert_point
3110 instead of assuming memory breakpoint.
3111 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
3112 software and hardware breakpoints.
3113 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
3114 Check both software and hardware breakpoints.
3115 (validate_inserted_breakpoint): Assert the breakpoint is a
3116 software breakpoint. Set the inserted flag to -1 instead of
3117 setting shlib_disabled.
3118 (delete_disabled_breakpoints): Adjust.
3119 (validate_breakpoints): Only validate software breakpoints.
3120 Adjust to inserted flag change.
3121 (check_mem_read, check_mem_write): Skip breakpoint types other
3122 than software breakpoints. Adjust to inserted flag change.
3123 * mem-break.h (enum raw_bkpt_type): New enum.
3124 (raw_breakpoint, struct process_info): Forward declare.
3125 (Z_packet_to_target_hw_bp_type): Delete declaration.
3126 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
3127 (set_gdb_breakpoint, delete_gdb_breakpoint)
3128 (clear_breakpoint_conditions): New declarations.
3129 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
3130 (breakpoint_inserted_here): Update comment.
3131 (add_breakpoint_condition, add_breakpoint_commands): Replace
3132 address parameter with a breakpoint pointer parameter.
3133 (gdb_breakpoint_here): Update comment.
3134 (delete_gdb_breakpoint_at): Delete.
3135 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
3136 * server.c (process_point_options): Take a struct breakpoint
3137 pointer instead of an address. Adjust.
3138 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
3139 delete_gdb_breakpoint.
3140 * spu-low.c (spu_target_ops): Install NULL as
3141 supports_z_point_type method.
3142 * target.h: Include mem-break.h.
3143 (struct target_ops) <prepare_to_access_memory>: Update comment.
3144 <supports_z_point_type>: New field.
3145 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
3146 instead of a char. Also take a raw breakpoint pointer.
3147 * win32-arm-low.c (the_low_target): Install NULL as
3148 supports_z_point_type.
3149 * win32-i386-low.c (i386_supports_z_point_type): New function.
3150 (i386_insert_point, i386_remove_point): Adjust to new interface.
3151 (the_low_target): Install i386_supports_z_point_type.
3152 * win32-low.c (win32_supports_z_point_type): New function.
3153 (win32_insert_point, win32_remove_point): Adjust to new interface.
3154 (win32_target_ops): Install win32_supports_z_point_type.
3155 * win32-low.h (struct win32_target_ops):
3156 <supports_z_point_type>: New method.
3157 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
3158 instead of a char. Also take a raw breakpoint pointer.
3159
3160 2014-05-20 Pedro Alves <palves@redhat.com>
3161
3162 * mem-break.h: Include break-common.h.
3163 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
3164 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
3165 (Z_packet_to_target_hw_bp_type): New declaration.
3166 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
3167 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
3168 (Z_PACKET_ACCESS_WP): Delete macros.
3169 (Z_packet_to_hw_type): Delete function.
3170 * i386-low.h: Don't include break-common.h here.
3171 (Z_packet_to_hw_type): Delete declaration.
3172 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
3173 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
3174 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
3175 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
3176 * linux-aarch64-low.c: Don't include break-common.h here.
3177 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
3178 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
3179 (Z_packet_to_target_hw_bp_type): Delete function.
3180 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
3181 function.
3182 (mips_insert_point, mips_remove_point): Use
3183 Z_packet_to_target_hw_bp_type.
3184
3185 2014-05-20 Pedro Alves <palves@redhat.com>
3186
3187 * linux-aarch64-low.c: Include break-common.h.
3188 (enum target_point_type): Delete.
3189 (Z_packet_to_point_type): Rename to ...
3190 (Z_packet_to_target_hw_bp_type): ... this, and return a
3191 target_hw_bp_type instead.
3192 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
3193 instead of an enum target_point_type.
3194 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
3195 breakpoint type.
3196 (aarch64_dr_state_insert_one_point)
3197 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
3198 (aarch64_handle_aligned_watchpoint)
3199 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
3200 Take an enum target_hw_bp_type instead of an enum
3201 target_point_type.
3202 (aarch64_supports_z_point_type): New function.
3203 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
3204 use Z_packet_to_target_hw_bp_type.
3205
3206 2014-05-20 Joel Brobecker <brobecker@adacore.com>
3207
3208 * configure.ac: Only use -Werror by default when DEVELOPMENT
3209 is true.
3210 * configure: Regenerate.
3211
3212 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
3213
3214 Fix gdbserver qGetTLSAddr for x86_64 -m32.
3215 * linux-x86-low.c (X86_64_USER_REGS): New.
3216 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
3217
3218 2014-04-28 Yao Qi <yao@codesourcery.com>
3219
3220 * Makefile.in (i386-avx512.c): Fix the typo of generated file
3221 name.
3222
3223 2014-04-25 Pedro Alves <palves@redhat.com>
3224
3225 PR server/16255
3226 * linux-low.c (linux_attach_fail_reason_string): New function.
3227 (linux_attach_lwp): Delete.
3228 (linux_attach_lwp_1): Rename to ...
3229 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
3230 argument. Remove "initial" parameter. Return int instead of
3231 void. Don't error or warn here.
3232 (linux_attach): Adjust to call linux_attach_lwp. Call error on
3233 failure to attach to the tgid. Call warning when failing to
3234 attach to an lwp.
3235 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
3236 argument. Remove "initial" parameter. Return int instead of
3237 void. Don't error or warn here.
3238 (linux_attach_fail_reason_string): New declaration.
3239 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
3240 interface change. Use linux_attach_fail_reason_string.
3241
3242 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
3243 Walfred Tedeschi <walfred.tedeschi@intel.com>
3244
3245 * Makefile.in: Added rules to handle new files
3246 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
3247 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
3248 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
3249 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
3250 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
3251 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
3252 x32-avx512-linux.o.
3253 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
3254 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
3255 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
3256 i386/x32-avx512.xml.
3257 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
3258 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
3259 i386/x32-avx512-linux.xml.
3260 * i387-fp.c (num_avx512_k_registers): New constant for number
3261 of K registers.
3262 (num_avx512_zmmh_low_registers): New constant for number of
3263 lower ZMM registers (0-15).
3264 (num_avx512_zmmh_high_registers): New constant for number of
3265 higher ZMM registers (16-31).
3266 (num_avx512_ymmh_registers): New contant for number of higher
3267 YMM registers (ymm16-31 added by avx521 on x86_64).
3268 (num_avx512_xmm_registers): New constant for number of higher
3269 XMM registers (xmm16-31 added by AVX512 on x86_64).
3270 (struct i387_xsave): Add space for AVX512 registers.
3271 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
3272 Add code to handle AVX512 registers.
3273 (i387_xsave_to_cache): Add code to handle AVX512 registers.
3274 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
3275 prototypei from generated file.
3276 (tdesc_amd64_avx512_linux): Likewise.
3277 (init_registers_x32_avx512_linux): Likewise.
3278 (tdesc_x32_avx512_linux): Likewise.
3279 (init_registers_i386_avx512_linux): Likewise.
3280 (tdesc_i386_avx512_linux): Likewise.
3281 (x86_64_regmap): Add AVX512 registers.
3282 (x86_linux_read_description): Add code to handle AVX512 XSTATE
3283 mask.
3284 (initialize_low_arch): Add code to initialize AVX512 registers.
3285
3286 2014-04-23 Pedro Alves <palves@redhat.com>
3287
3288 * mem-break.c (find_gdb_breakpoint_at): Make static.
3289 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
3290
3291 2014-04-23 Pedro Alves <palves@redhat.com>
3292
3293 * i386-low.c: Don't include break-common.h here.
3294 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
3295 prototype to take target_hw_bp_type as argument instead of a Z
3296 packet char.
3297 * i386-low.h: Include break-common.h here.
3298 (Z_packet_to_hw_type): Declare.
3299 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
3300 prototypes.
3301 * linux-x86-low.c (x86_insert_point): Convert the packet number to
3302 a target_hw_bp_type before calling i386_low_insert_watchpoint.
3303 (x86_remove_point): Convert the packet number to a
3304 target_hw_bp_type before calling i386_low_remove_watchpoint.
3305 * win32-i386-low.c (i386_insert_point): Convert the packet number
3306 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
3307 (i386_remove_point): Convert the packet number to a
3308 target_hw_bp_type before calling i386_low_remove_watchpoint.
3309
3310 2014-04-23 Pedro Alves <palves@redhat.com>
3311
3312 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
3313
3314 2014-04-10 Pedro Alves <palves@redhat.com>
3315
3316 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
3317 Check if the condition or command is NULL before checking if the
3318 breakpoint is known. On success, return true.
3319 * mem-break.h (add_breakpoint_condition): Document return.
3320 (add_breakpoint_commands): Add describing comment.
3321 * server.c (skip_to_semicolon): New function.
3322 (process_point_options): Use it.
3323
3324 2014-04-09 Pedro Alves <palves@redhat.com>
3325
3326 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
3327 to lwpid_of.
3328
3329 2014-02-27 Pedro Alves <palves@redhat.com>
3330
3331 PR 12702
3332 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
3333 macros.
3334 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
3335 output.
3336 (last_thread_of_process_p): Take a PID argument instead of a
3337 thread pointer.
3338 (linux_wait_for_lwp): Delete.
3339 (num_lwps, check_zombie_leaders, not_stopped_callback): New
3340 functions.
3341 (linux_low_filter_event): New function, party factored out from
3342 linux_wait_for_event.
3343 (linux_wait_for_event): Rename to ...
3344 (linux_wait_for_event_filtered): ... this. Add new filter ptid
3345 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
3346 sigsuspend. Check for zombie leaders.
3347 (linux_wait_for_event): Reimplement as wrapper around
3348 linux_wait_for_event_filtered.
3349 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
3350 a normal or signal exit is seen, it's the whole process exiting.
3351 (wait_for_sigstop): No longer a for_each_inferior callback.
3352 Rewrite on top of linux_wait_for_event_filtered.
3353 (stop_all_lwps): Call wait_for_sigstop directly.
3354 * server.c (resume, handle_target_event): Handle
3355 TARGET_WAITKIND_NO_RESUMED.
3356
3357 2014-02-26 Joel Brobecker <brobecker@adacore.com>
3358
3359 * win32-low.c (psapi_get_dll_name,
3360 * win32_CreateToolhelp32Snapshot): Delete.
3361 (win32_CreateToolhelp32Snapshot, win32_Module32First)
3362 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
3363 Delete.
3364 (handle_load_dll): Add function description.
3365 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
3366
3367 2014-02-26 Joel Brobecker <brobecker@adacore.com>
3368
3369 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
3370 Add comment.
3371 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
3372 base address when calling win32_add_one_solib.
3373 (handle_load_dll): Delete local variable load_addr.
3374 Remove 0x1000 offset applied to DLL base address when calling
3375 win32_add_one_solib.
3376 (handle_unload_dll): Add comment.
3377
3378 2014-02-26 Joel Brobecker <brobecker@adacore.com>
3379
3380 * win32-low.c (win32_add_all_dlls): Renames
3381 win32_ensure_ntdll_loaded. Rewrite function documentation.
3382 Adjust implementation to always load all DLLs.
3383 Add 0x1000 offset to DLL base address when calling
3384 win32_add_one_solib.
3385 (child_initialization_done): New static global.
3386 (do_initial_child_stuff): Set child_initialization_done to
3387 zero during child initialization, and 1 after. Replace call
3388 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
3389 Add comment.
3390 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
3391 (handle_unload_dll): Add function documentation.
3392 (get_child_debug_event): Ignore load and unload DLL events
3393 during child initialization.
3394
3395 2014-02-20 Doug Evans <dje@google.com>
3396
3397 Remove global all_lwps.
3398 * inferiors.h (ptid_of): Move here from linux-low.h.
3399 (pid_of, lwpid_of): Ditto.
3400 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
3401 parameter is a struct thread_info * now.
3402 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
3403 directly. Pass &all_threads to find_inferior instead of &all_lwps.
3404 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
3405 directly.
3406 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
3407 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
3408 * linux-arm-low.c (update_registers_callback): Update, "entry"
3409 parameter is a struct thread_info * now.
3410 Fetch lwpid from current_inferior directly.
3411 (arm_insert_point): Pass &all_threads to find_inferior instead of
3412 &all_lwps.
3413 (arm_remove_point): Ditto.
3414 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
3415 (arm_prepare_to_resume): Fetch pid from thread.
3416 (arm_read_description): Fetch lwpid from current_inferior directly.
3417 * linux-low.c (all_lwps): Delete.
3418 (delete_lwp): Delete call to remove_inferior.
3419 (handle_extended_wait): Fetch lwpid from thread.
3420 (add_lwp): Don't set lwp->entry.id. Remove call to
3421 add_inferior_to_list.
3422 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
3423 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
3424 (kill_one_lwp_callback): Ditto.
3425 (linux_kill): Don't dereference NULL pointer.
3426 Fetch ptid,lwpid from thread.
3427 (get_detach_signal): Fetch ptid from thread.
3428 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
3429 Simplify call to regcache_invalidate_thread.
3430 (delete_lwp_callback): Update, "entry" parameter is a
3431 struct thread_info * now. Fetch pid from thread.
3432 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
3433 (status_pending_p_callback): Update, "entry" parameter is a
3434 struct thread_info * now. Fetch ptid from thread.
3435 (find_lwp_pid): Update, "entry" parameter is a
3436 struct thread_info * now.
3437 (linux_wait_for_lwp): Fetch pid from thread.
3438 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
3439 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
3440 (enqueue_one_deferred_signal): Fetch lwpid from thread.
3441 (dequeue_one_deferred_signal): Ditto.
3442 (cancel_breakpoint): Fetch ptid from current_inferior.
3443 (linux_wait_for_event): Pass &all_threads to find_inferior,
3444 not &all_lwps. Fetch ptid, lwpid from thread.
3445 (count_events_callback): Update, "entry" parameter is a
3446 struct thread_info * now.
3447 (select_singlestep_lwp_callback): Ditto.
3448 (select_event_lwp_callback): Ditto.
3449 (cancel_breakpoints_callback): Ditto.
3450 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
3451 not &all_lwps.
3452 (select_event_lwp): Ditto. Fetch ptid from event_thread.
3453 (unsuspend_one_lwp): Update, "entry" parameter is a
3454 struct thread_info * now.
3455 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
3456 not &all_lwps.
3457 (linux_stabilize_threads): Ditto. And for for_each_inferior.
3458 Fetch lwpid from thread, not lwp.
3459 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
3460 Pass &all_threads to find_inferior, not &all_lwps.
3461 (send_sigstop): Fetch lwpid from thread, not lwp.
3462 (send_sigstop_callback): Update, "entry" parameter is a
3463 struct thread_info * now.
3464 (suspend_and_send_sigstop_callback): Ditto.
3465 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
3466 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
3467 struct thread_info * now.
3468 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
3469 from thread, lwp.
3470 (lwp_running): Update, "entry" parameter is a
3471 struct thread_info * now.
3472 (stop_all_lwps): Fetch ptid from thread.
3473 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
3474 (linux_resume_one_lwp): Fetch lwpid from thread.
3475 (linux_set_resume_request): Update, "entry" parameter is a
3476 struct thread_info * now. Fetch pid, lwpid from thread.
3477 (resume_status_pending_p): Update, "entry" parameter is a
3478 struct thread_info * now.
3479 (need_step_over_p): Ditto. Fetch lwpid from thread.
3480 (start_step_over): Fetch lwpid from thread.
3481 (linux_resume_one_thread): Update, "entry" parameter is a
3482 struct thread_info * now. Fetch lwpid from thread.
3483 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
3484 (proceed_one_lwp): Update, "entry" parameter is a
3485 struct thread_info * now. Fetch lwpid from thread.
3486 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
3487 struct thread_info * now.
3488 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
3489 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
3490 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
3491 directly.
3492 (regsets_store_inferior_registers): Ditto.
3493 (fetch_register, store_register): Ditto.
3494 (linux_read_memory, linux_write_memory): Ditto.
3495 (linux_request_interrupt): Ditto.
3496 (linux_read_auxv): Ditto.
3497 (linux_xfer_siginfo): Ditto.
3498 (linux_qxfer_spu): Ditto.
3499 (linux_qxfer_libraries_svr4): Ditto.
3500 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
3501 moved to inferiors.h.
3502 (get_lwp): Delete.
3503 (get_thread_lwp): Update.
3504 (struct lwp_info): Delete member "entry". Simplify comment for
3505 member "thread".
3506 (all_lwps): Delete.
3507 * linux-mips-low.c (mips_read_description): Fetch lwpid from
3508 current_inferior directly.
3509 (update_watch_registers_callback): Update, "entry" parameter is a
3510 struct thread_info * now. Fetch pid from thread.
3511 (mips_linux_prepare_to_resume): Fetch ptid from thread.
3512 (mips_insert_point): Fetch lwpid from current_inferior.
3513 Pass &all_threads to find_inferior, not &all_lwps.
3514 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
3515 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
3516 directly.
3517 (mips_stopped_data_address): Ditto.
3518 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
3519 directly.
3520 * linux-tile-low.c (tile_arch_setup): Ditto.
3521 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
3522 (update_debug_registers_callback): Update, "entry" parameter is a
3523 struct thread_info * now. Fetch pid from thread.
3524 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
3525 Pass &all_threads to find_inferior, not &all_lwps.
3526 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
3527 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
3528 Pass &all_threads to find_inferior, not &all_lwps.
3529 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
3530 (i386_dr_low_get_status): Ditto.
3531 (x86_linux_prepare_to_resume): Fetch ptid from thread.
3532 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
3533 (x86_linux_read_description): Ditto.
3534 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
3535
3536 2014-02-20 Doug Evans <dje@google.com>
3537
3538 * inferiors.c (get_first_inferior): Fix buglet.
3539
3540 2014-02-19 Doug Evans <dje@google.com>
3541
3542 * gdbthread.h (add_thread): Change result type to struct thread_info *.
3543 * inferiors.c (add_thread): Change result type to struct thread_info *.
3544 All callers updated.
3545 (add_lwp): Call add_thread here instead of in callers.
3546 All callers updated.
3547 * linux-low.h (get_lwp_thread): Rewrite.
3548 (struct lwp_info): New member "thread".
3549
3550 2014-02-19 Doug Evans <dje@google.com>
3551
3552 * linux-low.c (add_lwp): Change result to struct lwp_info *.
3553 All callers updated.
3554
3555 2014-02-19 Doug Evans <dje@google.com>
3556
3557 * inferiors.c (add_thread): Fix whitespace.
3558
3559 2014-02-19 Doug Evans <dje@google.com>
3560
3561 * dll.c (clear_dlls): Replace accessing list implemention details
3562 with API function.
3563 * gdbthread.h (get_first_thread): Declare.
3564 * inferiors.c (for_each_inferior_with_data): New function.
3565 (get_first_thread): New function.
3566 (find_thread_ptid): Simplify.
3567 (get_first_inferior): New function.
3568 (clear_list): Delete.
3569 (one_inferior_p): New function.
3570 (clear_inferior_list): New function.
3571 (clear_inferiors): Update.
3572 * inferiors.h (for_each_inferior_with_data): Declare.
3573 (clear_inferior_list): Declare.
3574 (one_inferior_p): Declare.
3575 (get_first_inferior): Declare.
3576 * linux-low.c (linux_wait_for_event): Replace accessing list
3577 implemention details with API function.
3578 * server.c (target_running): Ditto.
3579 (accumulate_file_name_length): New function.
3580 (emit_dll_description): New function.
3581 (handle_qxfer_libraries): Replace accessing list implemention
3582 details with API function.
3583 (handle_qxfer_threads_worker): New function.
3584 (handle_qxfer_threads_proper): Replace accessing list implemention
3585 details with API function.
3586 (handle_query): Ditto.
3587 (visit_actioned_threads_callback_ftype): New typedef.
3588 (visit_actioned_threads_data): New struct.
3589 (visit_actioned_threads): Rewrite to be find_inferior callback.
3590 (resume): Call find_inferior.
3591 (handle_status): Replace accessing list implemention
3592 details with API function.
3593 (process_serial_event): Replace accessing list implemention details
3594 with API function.
3595 * target.c (set_desired_inferior): Replace accessing list implemention
3596 details with API function.
3597 * tracepoint.c (same_process_p): New function.
3598 (gdb_agent_about_to_close): Replace accessing list implemention
3599 details with API function.
3600 * win32-low.c (child_delete_thread): Replace accessing list
3601 implemention details with API function.
3602 (match_dll_by_basename): New function.
3603 (dll_is_loaded_by_basename): New function.
3604 (win32_ensure_ntdll_loaded): Replace accessing list implemention
3605 details call to dll_is_loaded_by_basename.
3606
3607 2014-02-19 Doug Evans <dje@google.com>
3608
3609 * dll.h (struct dll_info): Add comment.
3610 * gdbthread.h (struct thread_info): Add comment.
3611 (current_ptid): Simplify.
3612 * inferiors.c (add_process): Update.
3613 (remove_process): Update.
3614 * inferiors.h (struct process_info): Rename member "head" to "entry".
3615 * linux-low.c (delete_lwp): Update.
3616 (add_lwp): Update.
3617 (last_thread_of_process_p): Update.
3618 (kill_one_lwp_callback, linux_kill): Update.
3619 (status_pending_p_callback): Update.
3620 (wait_for_sigstop): Update. Simplify read of ptid.
3621 (start_step_over): Update.
3622 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
3623 (get_lwp_thread): Update.
3624 (struct lwp_info): Rename member "head" to "entry".
3625 * regcache.h (inferior_list_entry): Delete.
3626 * server.c (kill_inferior_callback): Update.
3627 (detach_or_kill_inferior_callback): Update.
3628 (print_started_pid): Update.
3629 (print_attached_pid): Update.
3630 (process_serial_event): Simplify read of ptid.
3631 * thread-db.c (thread_db_create_event): Update.
3632 (thread_db_get_tls_address): Update.
3633 * win32-low.c (current_inferior_ptid): Simplify.
3634
3635 2014-02-19 Tom Tromey <tromey@redhat.com>
3636
3637 * target.h (struct target_ops) <supports_btrace>: Add target_ops
3638 argument.
3639 (target_supports_btrace): Update.
3640
3641 2014-02-14 Yao Qi <yao@codesourcery.com>
3642
3643 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
3644 (rsp-low-ipa.o): New target.
3645
3646 2014-02-12 Tom Tromey <tromey@redhat.com>
3647
3648 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
3649 convert_ascii_to_int.
3650 * regcache.c (registers_to_string): Likewise.
3651 * remote-utils.c (decode_M_packet): Likewise.
3652 * server.c (process_serial_event): Likewise.
3653
3654 2014-02-12 Tom Tromey <tromey@redhat.com>
3655
3656 * server.c (handle_query, handle_v_run): Use hex2bin, not
3657 unhexify.
3658 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
3659
3660 2014-02-12 Tom Tromey <tromey@redhat.com>
3661
3662 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
3663 convert_int_to_ascii.
3664 * regcache.c (registers_to_string, collect_register_as_string):
3665 Likewise.
3666 * remote-utils.c (look_up_one_symbol, relocate_instruction):
3667 Likewise.
3668 * server.c (process_serial_event): Likewise.
3669 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
3670 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
3671
3672 2014-02-12 Tom Tromey <tromey@redhat.com>
3673
3674 * remote-utils.c (look_up_one_symbol, monitor_output): Use
3675 bin2hex, not hexify.
3676 * tracepoint.c (cmd_qtstatus): Likewise.
3677
3678 2014-02-12 Tom Tromey <tromey@redhat.com>
3679
3680 * remote-utils.c (monitor_output): Pass explicit length to
3681 hexify.
3682
3683 2014-02-12 Tom Tromey <tromey@redhat.com>
3684
3685 * tracepoint.c: Include rsp-low.h.
3686 * server.c: Include rsp-low.h.
3687 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
3688 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
3689 declare.
3690 * remote-utils.c: Include rsp-low.h.
3691 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
3692 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
3693 (convert_int_to_ascii, convert_ascii_to_int): Move to
3694 common/rsp-low.c.
3695 * regcache.c: Include rsp-low.h.
3696 * ax.c: Include rsp-low.h.
3697 * Makefile.in (SFILES): Add common/rsp-low.c.
3698 (OBS): Add rsp-low.o.
3699 (rsp-low.o): New target.
3700
3701 2014-02-12 Tom Tromey <tromey@redhat.com>
3702
3703 * utils.h (pulongest, plongest, phex_nz): Don't declare.
3704 Include print-utils.h.
3705 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
3706 (plongest, thirty_two, phex_nz): Remove.
3707 * Makefile.in (SFILES): Add common/print-utils.c.
3708 (OBS): Add print-utils.o.
3709 (print-utils-ipa.o): New target.
3710 (print-utils.o): New target.
3711 (IPA_OBJS): Add print-utils-ipa.o.
3712
3713 2014-02-06 Tom Tromey <tromey@redhat.com>
3714
3715 * Makefile.in (SFILES): Fix indentation.
3716
3717 2014-02-05 Doug Evans <dje@google.com>
3718
3719 * linux-low.c (linux_wait_for_event): Improve comment.
3720 (linux_wait_1): Keep current_inferior in sync with event_child.
3721
3722 2014-01-22 Doug Evans <dje@google.com>
3723
3724 * gdbthread.h (gdb_id_to_thread): Delete, unused.
3725
3726 2014-01-22 Doug Evans <dje@google.com>
3727
3728 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
3729 * configure: Regenerate.
3730 * config.in: Regenerate.
3731 * Makefile.in (SFILES): Add debug.c.
3732 (OBS): Add debug.o.
3733 * debug.c: New file.
3734 * debug.h: New file.
3735 * linux-aarch64-low.c (*): Update all debugging printfs to use
3736 debug_printf instead of fprintf.
3737 * linux-arm-low.c (*): Ditto.
3738 * linux-cris-low.c (*): Ditto.
3739 * linux-crisv32-low.c (*): Ditto.
3740 * linux-m32r-low.c (*): Ditto.
3741 * linux-sparc-low.c (*): Ditto.
3742 * linux-x86.c (*): Ditto.
3743 * linux-low.c (*): Ditto.
3744 (linux_wait_1): Add calls to debug_enter, debug_exit.
3745 (linux_wait): Remove redundant debugging printf.
3746 (stop_all_lwps): Add calls to debug_enter, debug_exit.
3747 (linux_resume, unstop_all_lwps): Ditto.
3748 * mem-break.c (*): Update all debugging printfs to use
3749 debug_printf instead of fprintf.
3750 * remote-utils.c (*): Ditto.
3751 * thread-db.c (*): Ditto.
3752 * server.c #include <ctype.h>, "gdb_vecs.h".
3753 (debug_threads): Moved to debug.c.
3754 (*): Update all debugging printfs to use debug_printf instead of
3755 fprintf.
3756 (start_inferior): Replace call to fflush with call to debug_flush.
3757 (monitor_show_help): Mention set debug-format.
3758 (parse_debug_format_options): New function.
3759 (handle_monitor_command): Handle "monitor set debug-format".
3760 (gdbserver_usage): Mention --debug-format.
3761 (main): Parse --debug-format.
3762 * server.h (debug_threads): Declaration moved to debug.h.
3763 #include "debug.h".
3764 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
3765 trace_debug_1 that uses debug_printf.
3766 (tracepoint_look_up_symbols): Update all debugging printfs to use
3767 debug_printf instead of fprintf.
3768
3769 2014-01-20 Baruch Siach <baruch@tkos.co.il>
3770
3771 * linux-xtensa-low.c: Include asm/ptrace.h instead of
3772 sys/ptrace.h.
3773
3774 2014-01-17 Pedro Alves <palves@redhat.com>
3775
3776 PR build/16445
3777 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
3778 defined after including gdb_proc_service.h.
3779
3780 2014-01-16 Doug Evans <dje@google.com>
3781
3782 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
3783 (match_dll): Use it.
3784
3785 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
3786
3787 * target.h (target_ops) <read_btrace>: Change parameters and
3788 return type to allow error reporting.
3789 * server.c (handle_qxfer_btrace): Support delta reads. Pass
3790 trace reading errors on.
3791 * linux-low.c (linux_low_read_btrace): Pass trace reading
3792 errors on.
3793 (linux_low_disable_btrace): New.
3794
3795 2014-01-15 Doug Evans <dje@google.com>
3796
3797 * inferiors.c (thread_id_to_gdb_id): Delete.
3798 * inferiors.h (thread_id_to_gdb_id): Delete.
3799
3800 2014-01-13 Eli Zaretskii <eliz@gnu.org>
3801
3802 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
3803 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
3804 versions.
3805
3806 2014-01-08 Pedro Alves <palves@redhat.com>
3807
3808 * server.c (handle_status): Don't discard previous queued stop
3809 replies or thread's pending status here.
3810 (main) <disconnection>: Do it here instead.
3811
3812 2014-01-08 Pedro Alves <palves@redhat.com>
3813
3814 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
3815 * server.c (visit_actioned_threads, handle_pending_status): New
3816 function.
3817 (handle_v_cont): Factor out parts to ...
3818 (resume): ... this new function. If in all-stop, and a thread
3819 being resumed has a pending status, report it without actually
3820 resuming.
3821 (myresume): Adjust to use the new 'resume' function.
3822 (clear_pending_status_callback, set_pending_status_callback)
3823 (find_status_pending_thread_callback): New functions.
3824 (handle_status): Handle the case of multiple threads having
3825 interesting statuses to report. Report threads' real last signal
3826 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
3827 with an interesting thread to report the status for, instead of
3828 always reporting the status of the first thread.
3829
3830 2014-01-01 Joel Brobecker <brobecker@adacore.com>
3831
3832 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
3833 * gdbreplay.c (gdbreplay_version): Likewise.
3834
3835 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
3836
3837 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
3838 iov.iov_len with the real length in use.
3839
3840 2013-12-13 Joel Brobecker <brobecker@adacore.com>
3841
3842 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
3843 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
3844 for all targets that use win32-low.c.
3845 * win32-low.c (win32_ensure_ntdll_loaded): New function.
3846 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
3847
3848 2013-12-13 Pedro Alves <palves@redhat.com>
3849
3850 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
3851 if equal to TARGET_WAITKIND_LOADED.
3852 * win32-low.c (cached_status): New static global.
3853 (win32_wait): Add declaration.
3854 (do_initial_child_stuff): Flush all initial pending debug events
3855 up to the initial breakpoint.
3856 (win32_wait): If CACHED_STATUS was set, return that instead
3857 of doing a real wait. Remove the code resuming the execution
3858 of the inferior after receiving a TARGET_WAITKIND_LOADED event
3859 during the initial phase. Also remove the code changing
3860 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
3861 TARGET_WAITKIND_STOPPED.
3862
3863 2013-12-11 Yao Qi <yao@codesourcery.com>
3864
3865 * notif.c (handle_notif_ack): Return 0 if no notification
3866 matches.
3867
3868 2013-11-20 Doug Evans <dje@google.com>
3869
3870 * linux-low.c (linux_set_resume_request): Fix comment.
3871
3872 2013-11-20 Doug Evans <dje@google.com>
3873
3874 * linux-low.c (resume_status_pending_p): Tweak comment.
3875
3876 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
3877
3878 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
3879 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
3880 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
3881 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
3882 (srv_amd64_regobj): Add amd64-mpx.o.
3883 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
3884 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
3885 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
3886 * i387-fp.c (num_pl_bnd_register) Added constant.
3887 (num_pl_bnd_cfg_registers) Added constant.
3888 (struct i387_xsave) Added reserved area and MPX fields.
3889 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
3890 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
3891 function.
3892 (tdesc_i386_mpx_linux): Add MPX amd64 target.
3893 (init_registers_amd64_mpx_linux): Declare new function.
3894 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
3895 (x86_64_regmap): Add MPX registers.
3896 (x86_linux_read_description): Add MPX case.
3897 (initialize_low_arch): Initialize MPX targets.
3898
3899 2013-11-18 Tom Tromey <tromey@redhat.com>
3900
3901 * configure: Rebuild.
3902 * configure.ac: Don't check for stdlib.h.
3903 * gdbreplay.c: Unconditionally include stdlib.h.
3904
3905 2013-11-18 Tom Tromey <tromey@redhat.com>
3906
3907 * config.in: Rebuild.
3908 * configure: Rebuild.
3909 * configure.ac: Don't use AC_HEADER_DIRENT.
3910
3911 2013-11-18 Tom Tromey <tromey@redhat.com>
3912
3913 * server.h: Don't check HAVE_STRING_H.
3914 * gdbreplay.c: Don't check HAVE_STRING_H.
3915 * configure: Rebuild.
3916
3917 2013-11-18 Tom Tromey <tromey@redhat.com>
3918
3919 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
3920 LIBGNU.
3921
3922 2013-11-08 Tom Tromey <tromey@redhat.com>
3923
3924 * configure, config.in: Rebuild.
3925 * configure.ac: Remove unused configury.
3926
3927 2013-11-08 Tom Tromey <tromey@redhat.com>
3928
3929 * acinclude.m4: Include common.m4, codeset.m4.
3930 * configure, config.in: Rebuild.
3931 * configure.ac: Use GDB_AC_COMMON.
3932
3933 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
3934
3935 * linux-s390-low.c (HWCAP_S390_TE): New define.
3936 (s390_arch_setup): Consider the TE field in the HWCAP for
3937 determining 'have_regset_tdb'.
3938
3939 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
3940
3941 PR gdb/16014
3942 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
3943 call to sizeof.
3944
3945 2013-10-02 Pedro Alves <palves@redhat.com>
3946
3947 * server.c (process_serial_event): Don't output "GDBserver
3948 exiting" if GDB is connected through stdio.
3949 * target.c (mywait): Likewise, be silent if GDB is connected
3950 through stdio.
3951
3952 2013-10-01 Joel Brobecker <brobecker@adacore.com>
3953
3954 * lynx-low.c (lynx_add_threads_after_attach): New function.
3955 (lynx_attach): Remove call to add_thread. Add call to
3956 lynx_add_threads_after_attach instead.
3957
3958 2013-09-28 Mike Frysinger <vapier@gentoo.org>
3959
3960 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
3961 * config.in, configure: Regenerated.
3962
3963 2013-09-18 Yao Qi <yao@codesourcery.com>
3964
3965 PR server/15959
3966 * server.c (start_inferior): Clear 'resume_info'.
3967
3968 2013-09-16 Jiong Wang <jiwang@tilera.com>
3969
3970 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
3971 for each register.
3972
3973 2013-09-16 Jiong Wang <jiwang@tilera.com>
3974
3975 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
3976 linux-tile-low.o to srv_tgtobj.
3977
3978 2013-09-16 Will Newton <will.newton@linaro.org>
3979
3980 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
3981 out regs.
3982
3983 2013-09-06 Pedro Alves <palves@redhat.com>
3984
3985 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
3986 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
3987 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
3988 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
3989 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
3990 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
3991
3992 2013-09-06 Pedro Alves <palves@redhat.com>
3993
3994 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
3995 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
3996
3997 2013-09-06 Pedro Alves <palves@redhat.com>
3998
3999 * linux-amd64-ipa.c: Include tracepoint.h.
4000 * linux-i386-ipa.c: Include tracepoint.h.
4001
4002 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
4003
4004 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
4005 (ps_get_thread_area): New function.
4006
4007 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
4008
4009 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
4010 (initialize_low_arch): Call init_registers_crisv32 rather than
4011 init_register_crisv32.
4012
4013 2013-09-05 Pedro Alves <palves@redhat.com>
4014
4015 * server.h (handle_vFile, hostio_last_error_from_errno): Move
4016 to ...
4017 * hostio.h: ... this new file.
4018 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
4019 win32-low.c: Include hostio.h.
4020
4021 2013-09-05 Pedro Alves <palves@redhat.com>
4022
4023 * server.h (gdb_client_data, handler_func, callback_handler_func)
4024 (delete_file_handler, add_file_handler, append_callback_event)
4025 (delete_callback_event, start_event_loop, initialize_event_loop):
4026 Move to event-loop.h and include it.
4027 * event-loop.h: New file.
4028
4029 2013-09-05 Pedro Alves <palves@redhat.com>
4030
4031 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
4032 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
4033 (loaded_dll, unloaded_dll): Move to ...
4034 * dll.h: ... this new file.
4035 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
4036
4037 2013-09-05 Pedro Alves <palves@redhat.com>
4038
4039 * server.h (current_process, get_thread_process, all_processes)
4040 (add_inferior_to_list, for_each_inferior, current_inferior)
4041 (remove_inferior, add_process, remove_process, find_process_pid)
4042 (have_started_inferiors_p, have_attached_inferiors_p)
4043 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
4044 (clear_inferiors, find_inferior, find_inferior_id)
4045 (inferior_target_data, set_inferior_target_data)
4046 (inferior_regcache_data, set_inferior_regcache_data): Move to
4047 inferiors.h, and include it.
4048 * inferiors.h: New file.
4049
4050 2013-09-05 Pedro Alves <palves@redhat.com>
4051
4052 * server.h (struct emit_ops, current_insn_ptr, emit_error):
4053 Move ...
4054 * ax.h: ... here.
4055
4056 2013-09-05 Pedro Alves <palves@redhat.com>
4057
4058 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
4059 tracepoint.h.
4060 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
4061 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
4062 (handle_tracepoint_general_set, handle_tracepoint_query)
4063 (tracepoint_finished_step, tracepoint_was_hit)
4064 (release_while_stepping_state_list, current_traceframe)
4065 (in_readonly_region, traceframe_read_mem)
4066 (fetch_traceframe_registers, traceframe_read_sdata)
4067 (traceframe_read_info, struct fast_tpoint_collect_status)
4068 (fast_tracepoint_collecting, force_unlock_trace_buffer)
4069 (handle_tracepoit_bkpts, initialize_low_tracepoint)
4070 (supply_fast_tracepoint_registers)
4071 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
4072 (ipa_tdesc, claim_trampoline_space)
4073 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
4074 (agent_mem_read, agent_get_trace_state_variable_value)
4075 (agent_set_trace_state_variable_value, agent_tsv_read)
4076 (agent_mem_read_string, get_raw_reg_func_addr)
4077 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
4078 * tracepoint.h: ... this new file.
4079
4080 2013-09-05 Pedro Alves <palves@redhat.com>
4081
4082 * server.h (perror_with_name, error, fatal, warning, paddress)
4083 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
4084 include it.
4085 * utils.h: New file.
4086
4087 2013-09-05 Pedro Alves <palves@redhat.com>
4088
4089 * server.h (remote_debug, noack_mode, transport_is_reliable)
4090 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
4091 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
4092 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
4093 (write_enn, initialize_async_io, enable_async_io)
4094 (disable_async_io, check_remote_input_interrupt_request)
4095 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
4096 (dead_thread_notify, prepare_resume_reply)
4097 (decode_address_to_semicolon, decode_address, decode_m_packet)
4098 (decode_M_packet, decode_X_packet, decode_xfer_write)
4099 (decode_search_memory_packet, unhexify, hexify)
4100 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
4101 (look_up_one_symbol, relocate_instruction)
4102 (monitor_output): Move to remote-utils.h, and include it.
4103 * remote-utils.h: New file.
4104
4105 2013-09-05 Pedro Alves <palves@redhat.com>
4106
4107 * server.h (_): Delete.
4108
4109 2013-09-02 Pedro Alves <palves@redhat.com>
4110
4111 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
4112 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
4113 allocated.
4114 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
4115
4116 2013-09-02 Pierre Muller <muller@sourceware.org>
4117
4118 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
4119 or WriteProcessMemory complete successfully and handle
4120 ERROR_PARTIAL_COPY error.
4121
4122 2013-09-02 Pedro Alves <palves@redhat.com>
4123
4124 * server.c (gdb_read_memory): Return -1 on traceframe memory read
4125 error instead of EIO.
4126
4127 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4128
4129 PR server/15604
4130 * linux-low.c: Include filestuff.h.
4131 (linux_create_inferior) <pid == 0>: Call close_most_fds.
4132 * lynx-low.c: Include filestuff.h.
4133 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
4134 * server.c: Include filestuff.h.
4135 (main): Call notice_open_fds.
4136 * spu-low.c: Include filestuff.h.
4137 (spu_create_inferior) <pid == 0>: Call close_most_fds.
4138
4139 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
4140
4141 * Makefile.in: Explain why ../target and ../nat are not
4142 listed as include file search paths.
4143 (linux-waitpid.o): New object file rule.
4144 * configure.srv (srv_native_linux_obj): New variable.
4145 Replace all occurrences of linux native object files with
4146 $srv_native_linux_obj.
4147 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
4148 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
4149 (linux_enable_event_reporting): Remove declaration.
4150 (my_waitpid): Moved to common/linux-waitpid.c.
4151 (linux_wait_for_event): Pass ptid when calling
4152 linux_enable_event_reporting.
4153 (linux_supports_tracefork_flag): Remove.
4154 (linux_enable_event_reporting): Likewise.
4155 (linux_tracefork_grandchild): Remove.
4156 (STACK_SIZE): Moved to common/linux-ptrace.c.
4157 (linux_tracefork_child): Remove.
4158 (linux_test_for_tracefork): Remove.
4159 (linux_look_up_symbols): Call linux_supports_traceclone.
4160 (initialize_low): Remove call to linux_test_for_tracefork.
4161 * linux-low.h (PTRACE_TYPE_ARG3): Move to
4162 common/linux-ptrace.h.
4163 (PTRACE_TYPE_ARG4): Likewise.
4164 Include linux-ptrace.h.
4165
4166 2013-08-21 Pedro Alves <palves@redhat.com>
4167
4168 * config.in: Renegerate.
4169
4170 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
4171
4172 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
4173 (SFILES): Remove $(srcdir)/common/target-common.c and
4174 add $(srcdir)/target/waitstatus.c.
4175 (OBS): Remove target-common.o and add waitstatus.o.
4176 (server_h): Remove $(srcdir)/../common/target-common.h and
4177 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
4178 and $(srcdir)/../target/waitstatus.h.
4179 (target-common.o): Remove.
4180 (waitstatus.o): New target object file.
4181 * target.h: Do not include target-common.h and
4182 include target/resume.h, target/wait.h and
4183 target/waitstatus.h.
4184
4185 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
4186
4187 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
4188 to PTRACE_TYPE_ARG3.
4189 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
4190 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
4191 PTRACE_TYPE_ARG4.
4192 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
4193 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
4194
4195 2013-07-27 Jie Zhang <jie@codesourcery.com>
4196 Daniel Jacobowitz <dan@codesourcery.com>
4197 Yao Qi <yao@codesourcery.com>
4198
4199 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
4200 (mips-linux-watch.o): New rule.
4201 (mips_linux_watch_h): New variable.
4202 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
4203 srv_tgtobj.
4204 * linux-mips-low.c: Include mips-linux-watch.h.
4205 (struct arch_process_info, struct arch_lwp_info): New.
4206 (update_watch_registers_callback): New function.
4207 (mips_linux_new_process, mips_linux_new_thread) New functions.
4208 (mips_linux_prepare_to_resume, mips_insert_point): New
4209 functions.
4210 (mips_remove_point, mips_stopped_by_watchpoint): New
4211 functions.
4212 (rsp_bp_type_to_target_hw_bp_type): New function.
4213 (mips_stopped_data_address): New function.
4214 (the_low_target): Add watchpoint support functions.
4215
4216 2013-07-27 Yao Qi <yao@codesourcery.com>
4217
4218 * i386-low.c: Include break-common.h.
4219 (enum target_hw_bp_type): Remove.
4220
4221 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
4222
4223 * Makefile.in (SFILES): /common/target-common.c.
4224 (OBS): Add target-common.o.
4225 (server_h): Add $(srcdir)/../common/target-common.h.
4226 (target-common.o): New target.
4227 * server.c (queue_stop_reply_callback): Free
4228 status string after use.
4229 * target.c (target_waitstatus_to_string): Remove.
4230 * target.h: Include target-common.h.
4231 (resume_kind): Likewise.
4232 (target_waitkind): Likewise.
4233 (target_waitstatus): Likewise.
4234 (TARGET_WNOHANG): Likewise.
4235
4236 2013-07-04 Yao Qi <yao@codesourcery.com>
4237
4238 * Makefile.in (host_alias): Use @host_noncanonical@.
4239 (target_alias): Use @target_noncanonical@.
4240 * configure.ac: Use ACX_NONCANONICAL_TARGET and
4241 ACX_NONCANONICAL_HOST.
4242 * configure: Regenerated.
4243
4244 Revert:
4245 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
4246
4247 * configure.ac (version_host, version_target): Set and AC_SUBST them.
4248 * configure: Rebuild.
4249 * Makefile.in (version_host, version_target): Get from configure.
4250 (version.c): Use $(version_host) and $(version_target).
4251
4252 2013-07-03 Pedro Alves <palves@redhat.com>
4253
4254 * Makefile.in (config.status): Depend on development.sh.
4255 * acinclude.m4: Include libmcheck.m4.
4256 * configure: Regenerate.
4257
4258 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
4259
4260 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
4261 attribute inside the parentheses.
4262 (winapi_DebugSetProcessKillOnExit): Ditto.
4263 (winapi_DebugBreakProcess): Ditto.
4264 (winapi_GenerateConsoleCtrlEvent): Ditto.
4265
4266 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
4267
4268 * notif.h (notif_event): Add a dummy member to avoid compiler
4269 errors.
4270
4271 2013-07-01 Pedro Alves <palves@redhat.com>
4272
4273 * hostio.c (HOSTIO_PATH_MAX): Define.
4274 (require_filename, handle_open, handle_unlink, handle_readlink):
4275 Use it.
4276
4277 2013-07-01 Pedro Alves <palves@redhat.com>
4278
4279 * server.h: Include "pathmax.h".
4280 * linux-low.c: Don't include sys/param.h.
4281 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
4282 MAXPATHLEN.
4283 * win32-low.c: Don't include sys/param.h.
4284 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
4285
4286 2013-07-01 Pedro Alves <palves@redhat.com>
4287
4288 * event-loop.c: Don't check HAVE_UNISTD_H before including
4289 <unistd.h>.
4290 * gdbreplay.c: Likewise.
4291 * remote-utils.c: Likewise.
4292 * server.c: Likewise.
4293 * configure.ac: Don't check for unistd.h.
4294 * configure: Regenerate.
4295
4296 2013-06-28 Tom Tromey <tromey@redhat.com>
4297
4298 * Makefile.in (version.c): Use version.in, not
4299 common/version.in.
4300
4301 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
4302
4303 * configure.ac (version_host, version_target): Set and AC_SUBST them.
4304 * configure: Rebuild.
4305 * Makefile.in (version_host, version_target): Get from configure.
4306 (version.c): Use $(version_host) and $(version_target).
4307
4308 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
4309
4310 Fix trace-status to output user name without trailing colon.
4311 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
4312
4313 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
4314
4315 Fix trace-status to output proper start-time and stop-time.
4316 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
4317 output start time and stop time in hex as gdb expects.
4318
4319 2013-06-26 Pedro Alves <pedro@codesourcery.com>
4320
4321 * tracepoint.c (build_traceframe_info_xml): Output trace state
4322 variables present in the trace buffer.
4323
4324 2013-06-24 Tom Tromey <tromey@redhat.com>
4325
4326 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
4327 create-version.sh.
4328 (version.o): Remove.
4329 * gdbreplay.c: Include version.h.
4330 (version, host_name): Don't declare.
4331 * server.h: Include version.h.
4332 (version, host_name): Don't declare.
4333
4334 2013-06-12 Pedro Alves <palves@redhat.com>
4335
4336 * linux-x86-low.c (linux_is_elf64): Delete global.
4337 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
4338 with local linux_pid_exe_is_elf_64_file use.
4339
4340 2013-06-11 Pedro Alves <palves@redhat.com>
4341
4342 * linux-low.c (regset_disabled, disable_regset): New functions.
4343 (regsets_fetch_inferior_registers)
4344 (regsets_store_inferior_registers): Use them.
4345 (initialize_regsets_info); Don't allocate the disabled_regsets
4346 array here.
4347 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
4348 comment.
4349
4350 2013-06-11 Pedro Alves <palves@redhat.com>
4351
4352 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
4353 xmalloc.
4354
4355 2013-06-11 Pedro Alves <palves@redhat.com>
4356
4357 * linux-x86-low.c (initialize_low_arch): Call
4358 init_registers_x32_avx_linux.
4359
4360 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
4361
4362 Fix compatibility with Android Bionic.
4363 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
4364 it is not empty.
4365
4366 2013-06-07 Pedro Alves <palves@redhat.com>
4367
4368 PR server/14823
4369 * Makefile.in (OBS): Add tdesc.o.
4370 (IPA_OBJS): Add tdesc-ipa.o.
4371 (tdesc-ipa.o): New rule.
4372 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
4373 interface.
4374 * linux-low.c (new_inferior): Delete.
4375 (disabled_regsets, num_regsets): Delete.
4376 (linux_add_process): Adjust to set the new per-process
4377 new_inferior flag.
4378 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
4379 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
4380 was a stop. When calling arch_setup, switch the current inferior
4381 to the thread that got an event.
4382 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
4383 (regsets_fetch_inferior_registers)
4384 (regsets_store_inferior_registers): New regsets_info parameter.
4385 Adjust to use it.
4386 (linux_register_in_regsets): New regs_info parameter. Adjust to
4387 use it.
4388 (register_addr, fetch_register, store_register): New usrregs_info
4389 parameter. Adjust to use it.
4390 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
4391 parameter regs_info. Adjust to use it.
4392 (linux_fetch_registers): Get the current inferior's regs_info, and
4393 adjust to use it.
4394 (linux_store_registers): Ditto.
4395 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
4396 (initialize_low): Don't initialize the target_regsets here. Call
4397 initialize_low_arch.
4398 * linux-low.h (target_regsets): Delete declaration.
4399 (struct regsets_info): New.
4400 (struct usrregs_info): New.
4401 (struct regs_info): New.
4402 (struct process_info_private) <new_inferior>: New field.
4403 (struct linux_target_ops): Delete the num_regs, regmap, and
4404 regset_bitmap fields. New field regs_info.
4405 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
4406 * i387-fp.c (num_xmm_registers): Delete.
4407 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
4408 calls to new interface.
4409 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
4410 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
4411 Infer the number of xmm registers from the regcache's target
4412 description.
4413 * i387-fp.h (num_xmm_registers): Delete.
4414 * inferiors.c (add_thread): Don't install the thread's regcache
4415 here.
4416 * proc-service.c (gregset_info): Fetch the current inferior's
4417 regs_info. Adjust to use it.
4418 * regcache.c: Include tdesc.h.
4419 (register_bytes, reg_defs, num_registers)
4420 (gdbserver_expedite_regs): Delete.
4421 (get_thread_regcache): If the thread doesn't have a regcache yet,
4422 create one, instead of aborting gdbserver.
4423 (regcache_invalidate_one): Rename to ...
4424 (regcache_invalidate_thread): ... this.
4425 (regcache_invalidate_one): New.
4426 (regcache_invalidate): Only invalidate registers of the current
4427 process.
4428 (init_register_cache): Add target_desc parameter, and use it.
4429 (new_register_cache): Ditto. Assert the target description has a
4430 non zero registers_size.
4431 (regcache_cpy): Add assertions. Adjust.
4432 (realloc_register_cache, set_register_cache): Delete.
4433 (registers_to_string, registers_from_string): Adjust.
4434 (find_register_by_name, find_regno, find_register_by_number)
4435 (register_cache_size): Add target_desc parameter, and use it.
4436 (free_register_cache_thread, free_register_cache_thread_one)
4437 (regcache_release, register_cache_size): New.
4438 (register_size): Add target_desc parameter, and use it.
4439 (register_data, supply_register, supply_register_zeroed)
4440 (supply_regblock, supply_register_by_name, collect_register)
4441 (collect_register_as_string, collect_register_by_name): Adjust.
4442 * regcache.h (struct target_desc): Forward declare.
4443 (struct regcache) <tdesc>: New field.
4444 (init_register_cache, new_register_cache): Add target_desc
4445 parameter.
4446 (regcache_invalidate_thread): Declare.
4447 (regcache_invalidate_one): Delete declaration.
4448 (regcache_release): Declare.
4449 (find_register_by_number, register_cache_size, register_size)
4450 (find_regno): Add target_desc parameter.
4451 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
4452 declarations.
4453 * remote-utils.c: Include tdesc.h.
4454 (outreg, prepare_resume_reply): Adjust.
4455 * server.c: Include tdesc.h.
4456 (gdbserver_xmltarget): Delete declaration.
4457 (get_features_xml, process_serial_event): Adjust.
4458 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
4459 declare.
4460 (struct process_info) <tdesc>: New field.
4461 (ipa_tdesc): Declare.
4462 * tdesc.c: New file.
4463 * tdesc.h: New file.
4464 * tracepoint.c: Include tdesc.h.
4465 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
4466 (get_context_regcache): Adjust to pass ipa_tdesc down.
4467 (do_action_at_tracepoint): Adjust to get the register cache size
4468 from the context regcache's description.
4469 (traceframe_walk_blocks): Adjust to get the register cache size
4470 from the current trace frame's description.
4471 (traceframe_get_pc): Adjust to get current trace frame's
4472 description and pass it down.
4473 (gdb_collect): Adjust to get the register cache size from the
4474 IPA's description.
4475 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
4476 (gdbserver_xmltarget): Delete.
4477 (initialize_low_tracepoint): Set the ipa's target description.
4478 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
4479 (initialize_low_tracepoint): Set the ipa's target description.
4480 * linux-x86-low.c: Include tdesc.h.
4481 [__x86_64__] (is_64bit_tdesc): New.
4482 (ps_get_thread_area, x86_get_thread_area): Use it.
4483 (i386_cannot_store_register): Rename to ...
4484 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
4485 (i386_cannot_fetch_register): Rename to ...
4486 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
4487 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
4488 to new interface.
4489 (target_regsets): Rename to ...
4490 (x86_regsets): ... this.
4491 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
4492 interface.
4493 (x86_siginfo_fixup): Use is_64bit_tdesc.
4494 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
4495 (tdesc_x32_avx_linux, tdesc_x32_linux)
4496 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
4497 Declare.
4498 (x86_linux_update_xmltarget): Delete.
4499 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
4500 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
4501 (AMD64_LINUX_USER64_CS): New.
4502 (x86_linux_read_description): New, based on
4503 x86_linux_update_xmltarget.
4504 (same_process_callback): New.
4505 (x86_arch_setup_process_callback): New.
4506 (x86_linux_update_xmltarget): New.
4507 (x86_regsets_info): New.
4508 (amd64_linux_regs_info): New.
4509 (i386_linux_usrregs_info): New.
4510 (i386_linux_regs_info): New.
4511 (x86_linux_regs_info): New.
4512 (x86_arch_setup): Reimplement.
4513 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
4514 (x86_emit_ops): Ditto.
4515 (the_low_target): Adjust. Install x86_linux_regs_info,
4516 x86_cannot_fetch_register, and x86_cannot_store_register.
4517 (initialize_low_arch): New.
4518 * linux-ia64-low.c (tdesc_ia64): Declare.
4519 (ia64_fetch_register): Adjust.
4520 (ia64_usrregs_info, regs_info): New globals.
4521 (ia64_regs_info): New function.
4522 (the_low_target): Adjust.
4523 (initialize_low_arch): New function.
4524 * linux-sparc-low.c (tdesc_sparc64): Declare.
4525 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
4526 Adjust.
4527 (sparc_arch_setup): New function.
4528 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
4529 (the_low_target): Adjust.
4530 (initialize_low_arch): New function.
4531 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
4532 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
4533 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
4534 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
4535 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
4536 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
4537 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
4538 (tdesc_powerpc_isa205_vsx64l): Declare.
4539 (ppc_cannot_store_register, ppc_collect_ptrace_register)
4540 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
4541 (ppc_set_pc, ppc_get_hwcap): Adjust.
4542 (ppc_usrregs_info): Forward declare.
4543 (!__powerpc64__) ppc_regmap_adjusted: New global.
4544 (ppc_arch_setup): Adjust to the current process'es target
4545 description.
4546 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
4547 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
4548 (ppc_store_evrregset): Adjust.
4549 (target_regsets): Rename to ...
4550 (ppc_regsets): ... this, and make static.
4551 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
4552 (ppc_regs_info): New function.
4553 (the_low_target): Adjust.
4554 (initialize_low_arch): New function.
4555 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
4556 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
4557 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
4558 (tdesc_s390x_linux64v2): Declare.
4559 (s390_collect_ptrace_register, s390_supply_ptrace_register)
4560 (s390_fill_gregset, s390_store_last_break): Adjust.
4561 (target_regsets): Rename to ...
4562 (s390_regsets): ... this, and make static.
4563 (s390_get_pc, s390_set_pc): Adjust.
4564 (s390_get_hwcap): New target_desc parameter, and use it.
4565 [__s390x__] (have_hwcap_s390_high_gprs): New global.
4566 (s390_arch_setup): Adjust to set the current process'es target
4567 description. Don't adjust the regmap.
4568 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
4569 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
4570 (regs_info_3264): New globals.
4571 (s390_regs_info): New function.
4572 (the_low_target): Adjust.
4573 (initialize_low_arch): New function.
4574 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
4575 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
4576 [__mips64] (init_registers_mips_linux)
4577 (init_registers_mips_dsp_linux): Delete defines.
4578 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
4579 (have_dsp): New global.
4580 (mips_read_description): New, based on mips_arch_setup.
4581 (mips_arch_setup): Reimplement.
4582 (get_usrregs_info): New function.
4583 (mips_cannot_fetch_register, mips_cannot_store_register)
4584 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
4585 (mips_fill_fpregset, mips_store_fpregset): Adjust.
4586 (target_regsets): Rename to ...
4587 (mips_regsets): ... this, and make static.
4588 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
4589 (dsp_regs_info, regs_info): New globals.
4590 (mips_regs_info): New function.
4591 (the_low_target): Adjust.
4592 (initialize_low_arch): New function.
4593 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
4594 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
4595 Declare.
4596 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
4597 (arm_read_description): New, with bits factored from
4598 arm_arch_setup.
4599 (arm_arch_setup): Reimplement.
4600 (target_regsets): Rename to ...
4601 (arm_regsets): ... this, and make static.
4602 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
4603 (arm_regs_info): New function.
4604 (the_low_target): Adjust.
4605 (initialize_low_arch): New function.
4606 * linux-m68k-low.c (tdesc_m68k): Declare.
4607 (target_regsets): Rename to ...
4608 (m68k_regsets): ... this, and make static.
4609 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
4610 (m68k_regs_info): New function.
4611 (m68k_arch_setup): New function.
4612 (the_low_target): Adjust.
4613 (initialize_low_arch): New function.
4614 * linux-sh-low.c (tdesc_sharch): Declare.
4615 (target_regsets): Rename to ...
4616 (sh_regsets): ... this, and make static.
4617 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
4618 (sh_regs_info, sh_arch_setup): New functions.
4619 (the_low_target): Adjust.
4620 (initialize_low_arch): New function.
4621 * linux-bfin-low.c (tdesc_bfin): Declare.
4622 (bfin_arch_setup): New function.
4623 (bfin_usrregs_info, regs_info): New globals.
4624 (bfin_regs_info): New function.
4625 (the_low_target): Adjust.
4626 (initialize_low_arch): New function.
4627 * linux-cris-low.c (tdesc_cris): Declare.
4628 (cris_arch_setup): New function.
4629 (cris_usrregs_info, regs_info): New globals.
4630 (cris_regs_info): New function.
4631 (the_low_target): Adjust.
4632 (initialize_low_arch): New function.
4633 * linux-cris-low.c (tdesc_crisv32): Declare.
4634 (cris_arch_setup): New function.
4635 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
4636 (cris_regs_info): New function.
4637 (the_low_target): Adjust.
4638 (initialize_low_arch): New function.
4639 * linux-m32r-low.c (tdesc_m32r): Declare.
4640 (m32r_arch_setup): New function.
4641 (m32r_usrregs_info, regs_info): New globals.
4642 (m32r_regs_info): Adjust.
4643 (initialize_low_arch): New function.
4644 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
4645 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
4646 (tic6x_usrregs_info): Forward declare.
4647 (tic6x_read_description): New function, based on ...
4648 (tic6x_arch_setup): ... this. Reimplement.
4649 (target_regsets): Rename to ...
4650 (tic6x_regsets): ... this, and make static.
4651 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
4652 (tic6x_regs_info): New function.
4653 (the_low_target): Adjust.
4654 (initialize_low_arch): New function.
4655 * linux-xtensa-low.c (tdesc_xtensa): Declare.
4656 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
4657 (target_regsets): Rename to ...
4658 (xtensa_regsets): ... this, and make static.
4659 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
4660 globals.
4661 (xtensa_arch_setup, xtensa_regs_info): New functions.
4662 (the_low_target): Adjust.
4663 (initialize_low_arch): New function.
4664 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
4665 (nios2_arch_setup): Set the current process'es tdesc.
4666 (target_regsets): Rename to ...
4667 (nios2_regsets): ... this.
4668 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
4669 (nios2_regs_info): New function.
4670 (the_low_target): Adjust.
4671 (initialize_low_arch): New function.
4672 * linux-aarch64-low.c (tdesc_aarch64): Declare.
4673 (aarch64_arch_setup): Set the current process'es tdesc.
4674 (target_regsets): Rename to ...
4675 (aarch64_regsets): ... this.
4676 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
4677 (aarch64_regs_info): New function.
4678 (the_low_target): Adjust.
4679 (initialize_low_arch): New function.
4680 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
4681 globals.
4682 (target_regsets): Rename to ...
4683 (tile_regsets): ... this.
4684 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
4685 (tile_regs_info): New function.
4686 (tile_arch_setup): Set the current process'es tdesc.
4687 (the_low_target): Adjust.
4688 (initialize_low_arch): New function.
4689 * spu-low.c (tdesc_spu): Declare.
4690 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
4691 * win32-arm-low.c (tdesc_arm): Declare.
4692 (arm_arch_setup): New function.
4693 (the_low_target): Install arm_arch_setup instead of
4694 init_registers_arm.
4695 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
4696 (init_windows_x86): Rename to ...
4697 (i386_arch_setup): ... this. Set `win32_tdesc'.
4698 (the_low_target): Adjust.
4699 * win32-low.c (win32_tdesc): New global.
4700 (child_add_thread): Don't create the thread cache here.
4701 (do_initial_child_stuff): Set the new process'es tdesc.
4702 * win32-low.h (struct target_desc): Forward declare.
4703 (win32_tdesc): Declare.
4704 * lynx-i386-low.c (tdesc_i386): Declare global.
4705 (lynx_i386_arch_setup): Set `lynx_tdesc'.
4706 * lynx-low.c (lynx_tdesc): New global.
4707 (lynx_add_process): Set the new process'es tdesc.
4708 * lynx-low.h (struct target_desc): Forward declare.
4709 (lynx_tdesc): Declare global.
4710 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
4711 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
4712 * nto-low.c (nto_tdesc): New global.
4713 (do_attach): Set the new process'es tdesc.
4714 * nto-low.h (struct target_desc): Forward declare.
4715 (nto_tdesc): Declare.
4716 * nto-x86-low.c (tdesc_i386): Declare.
4717 (nto_x86_arch_setup): Set `nto_tdesc'.
4718
4719 2013-06-04 Gary Benson <gbenson@redhat.com>
4720
4721 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
4722 to qSupported response when appropriate.
4723 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
4724 with nonzero-length annex.
4725 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
4726 arguments supplied in annex.
4727
4728 2013-05-31 Doug Evans <dje@google.com>
4729
4730 PR server/15594
4731 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
4732 64 bits in 64-cross-32 environment.
4733
4734 2013-05-28 Pedro Alves <palves@redhat.com>
4735
4736 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
4737 (aarch64-without-fpu.c): Delete rule.
4738 * configure.srv (aarch64*-*-linux*): Remove references to
4739 aarch64-without-fpu.o and aarch64-without-fpu.xml.
4740 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
4741 declaration.
4742
4743 2013-05-24 Pedro Alves <palves@redhat.com>
4744
4745 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
4746 instead of strchr/decode_address. Error if the range isn't split
4747 with a ','. Don't assume there's be a ':' in the action.
4748
4749 2013-05-23 Yao Qi <yao@codesourcery.com>
4750 Pedro Alves <palves@redhat.com>
4751
4752 * linux-low.c (lwp_in_step_range): New function.
4753 (linux_wait_1): If the thread was range stepping and stopped
4754 outside the stepping range, report the stop to GDB. Otherwise,
4755 continue stepping. Add range stepping debug output.
4756 (linux_set_resume_request): Copy the step range from the resume
4757 request to the lwp.
4758 (linux_supports_range_stepping): New.
4759 (linux_target_ops) <supports_range_stepping>: Set to
4760 linux_supports_range_stepping.
4761 * linux-low.h (struct linux_target_ops)
4762 <supports_range_stepping>: New field.
4763 (struct lwp_info) <step_range_start, step_range_end>: New fields.
4764 * linux-x86-low.c (x86_supports_range_stepping): New.
4765 (the_low_target) <supports_range_stepping>: Set to
4766 x86_supports_range_stepping.
4767 * server.c (handle_v_cont): Handle 'r' action.
4768 (handle_v_requests): Append ";r" if the target supports range
4769 stepping.
4770 * target.h (struct thread_resume) <step_range_start,
4771 step_range_end>: New fields.
4772 (struct target_ops) <supports_range_stepping>:
4773 New field.
4774 (target_supports_range_stepping): New macro.
4775
4776 2013-05-17 Joel Brobecker <brobecker@adacore.com>
4777
4778 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
4779 confusion in comment.
4780
4781 2013-05-17 Joel Brobecker <brobecker@adacore.com>
4782
4783 * lynx-low.c (struct process_info_private): New type.
4784 (lynx_add_process): New function.
4785 (lynx_create_inferior, lynx_attach): Replace calls to
4786 add_process by calls to lynx_add_process.
4787 (lynx_resume): If PTID is null, then try using
4788 current_process()->private->last_wait_event_ptid.
4789 Add comments.
4790 (lynx_clear_inferiors): Delete. The contents of that function
4791 has been inlined in lynx_mourn;
4792 (lynx_wait_1): Save the ptid in the process's private data.
4793 (lynx_mourn): Free the process' private data. Replace call
4794 to lynx_clear_inferiors by call to clear_inferiors.
4795
4796 2013-05-17 Yao Qi <yao@codesourcery.com>
4797
4798 * i386-low.c (i386_length_and_rw_bits): Move the comment to
4799 the right place.
4800
4801 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
4802
4803 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
4804 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
4805 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
4806 PT_TEXT_END_ADDR guards. Update comments.
4807 (linux_target_op) <read_offsets>: Conditionally define to
4808 linux_read_offsets if the target is UCLIBC and if it defines
4809 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
4810
4811 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
4812 Andrew Jenner <andrew@codesourcery.com>
4813
4814 * Makefile.in (SFILES): Add linux-nios2-low.c.
4815 (clean): Add action to delete nios2-linux.c.
4816 (nios2-linux.c): New rule.
4817 * configure.srv: Add nios2*-*-linux*.
4818 * linux-nios2-low.c: New.
4819
4820 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
4821
4822 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
4823
4824 2013-04-25 Hui Zhu <hui@codesourcery.com>
4825
4826 PR gdb/15186
4827 * ax.c (ax_printf): Add fflush.
4828
4829 2013-04-22 Tom Tromey <tromey@redhat.com>
4830
4831 * Makefile.in (SFILES): Add filestuff.c.
4832 (OBS): Add filestuff.o.
4833 (filestuff.o): New target.
4834 * config.in, configure: Rebuild.
4835 * configure.ac: Check for fdwalk, pipe2.
4836
4837 2013-04-17 Pedro Alves <palves@redhat.com>
4838
4839 * configure.ac (USE_THREAD_DB): Delete variable.
4840 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
4841 Don't AC_SUBST USE_THREAD_DB.
4842 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
4843 * config.in, configure: Regenerate.
4844
4845 2013-04-16 Pedro Alves <palves@redhat.com>
4846
4847 * linux-low.h (struct lwp_info) <thread_known>: Move under
4848 the USE_THREAD_DB #ifdef.
4849
4850 2013-04-16 Pedro Alves <palves@redhat.com>
4851
4852 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
4853 (linux-low.o): Delete rule.
4854 * linux-low.h: Always include "gdb_thread_db.h" instead of
4855 conditionally including thread_db.h.
4856 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
4857 HAVE_THREAD_DB_H.
4858
4859 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
4860
4861 * Makefile.in (install-only): Fix make install regression.
4862
4863 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
4864
4865 Convert man pages to texinfo, new gdbinit.5 texinfo page.
4866 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
4867 installation.
4868 * gdbserver.1: Remove.
4869
4870 2013-03-22 Pedro Alves <palves@redhat.com>
4871
4872 * linux-low.c (handle_extended_wait): Don't call
4873 linux_enable_event_reporting.
4874
4875 2013-03-15 Tony Theodore <tonyt@logyst.com>
4876
4877 PR build/9098:
4878 * Makefile.in (SHELL): Use @SHELL@.
4879
4880 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
4881
4882 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
4883 compiler warning.
4884
4885 2013-03-13 Joel Brobecker <brobecker@adacore.com>
4886
4887 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
4888 Remove extraneous NULL element.
4889
4890 2013-03-13 Yao Qi <yao@codesourcery.com>
4891
4892 * tracepoint.c (traceframe_read_tsv): Look for the last matched
4893 'V' block in trace frame.
4894
4895 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4896
4897 * target.h (struct target_ops): Add btrace ops.
4898 (target_supports_btrace): New macro.
4899 (target_enable_btrace): New macro.
4900 (target_disable_btrace): New macro.
4901 (target_read_btrace): New macro.
4902 * gdbthread.h (struct thread_info): Add btrace field.
4903 * server.c: Include btrace-common.h.
4904 (handle_btrace_general_set): New function.
4905 (handle_btrace_enable): New function.
4906 (handle_btrace_disable): New function.
4907 (handle_general_set): Call handle_btrace_general_set.
4908 (handle_qxfer_btrace): New function.
4909 (struct qxfer qxfer_packets[]): Add btrace entry.
4910 * inferiors.c (remove_thread): Disable btrace.
4911 * linux-low: Include linux-btrace.h.
4912 (linux_low_enable_btrace): New function.
4913 (linux_low_read_btrace): New function.
4914 (linux_target_ops): Add btrace ops.
4915 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
4916 Add srv_linux_btrace=yes.
4917 (x86_64-*-linux*): Add linux-btrace.o.
4918 Add srv_linux_btrace=yes.
4919 * configure.ac: Define HAVE_LINUX_BTRACE.
4920 * config.in: Regenerated.
4921 * configure: Regenerated.
4922
4923 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4924
4925 * server.c (handle_qxfer): Preserve error message if -3 is
4926 returned.
4927 (qxfer): Document the -3 return value.
4928
4929 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4930
4931 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
4932 (linux_btrace_h): New variable.
4933 (linux-btrace.o): New rule.
4934
4935 2013-03-08 Stan Shebs <stan@codesourcery.com>
4936 Hafiz Abid Qadeer <abidh@codesourcery.com>
4937
4938 * tracepoint.c (trace_buffer_size): New global.
4939 (DEFAULT_TRACE_BUFFER_SIZE): New define.
4940 (init_trace_buffer): Change to one-argument function. Allocate
4941 trace buffer memory.
4942 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
4943 handle QTBuffer:size packet.
4944 (cmd_bigqtbuffer_size): New function.
4945 (initialize_tracepoint): Call init_trace_buffer with
4946 DEFAULT_TRACE_BUFFER_SIZE.
4947 * server.c (handle_query): Add QTBuffer:size in the
4948 supported packets.
4949
4950 2013-03-07 Yao Qi <yao@codesourcery.com>
4951
4952 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
4953 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
4954 of -1.
4955 (cmd_qtsp): Adjust condition. Do post increment.
4956 Set cur_action and cur_step_action back to 0.
4957
4958 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
4959
4960 PR server/15236
4961 * linux-low.c (linux_write_memory): Return early success if LEN is
4962 zero.
4963
4964 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
4965
4966 * configure.srv: Add x86_64-*-cygwin* as target.
4967
4968 2013-02-28 Tom Tromey <tromey@redhat.com>
4969
4970 * configure.ac: Invoke AC_SYS_LARGEFILE.
4971 * configure, config.in: Rebuild.
4972
4973 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
4974
4975 * win32-low.c: Throughout, fix format strings and casts of
4976 printf-like functions to avoid type related warnings on all
4977 platforms.
4978 (get_child_debug_event): Print dwDebugEventCode as hex since
4979 that's how it's usually documented.
4980
4981 2013-02-28 Yao Qi <yao@codesourcery.com>
4982
4983 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
4984 pulongest.
4985
4986 2013-02-27 Jiong Wang <jiwang@tilera.com>
4987
4988 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
4989 (reg-tilegx32.c): New rule.
4990 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
4991 * linux-tile-low.c (tile_arch_setup): New function. Invoke
4992 different register info initializer according to elf class.
4993 (init_registers_tilgx32): New function. The tilegx32 register info
4994 initializer.
4995 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
4996 (tile_store_gregset): Likewise.
4997
4998 2013-02-27 Yao Qi <yao@codesourcery.com>
4999
5000 * server.c (process_point_options): Print debug message when
5001 debug_threads is true.
5002
5003 2013-02-26 Yao Qi <yao@codesourcery.com>
5004
5005 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
5006
5007 2013-02-19 Pedro Alves <palves@redhat.com>
5008 Kai Tietz <ktietz@redhat.com>
5009
5010 PR gdb/15161
5011
5012 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
5013 instead of strtoul to extract address from packet.
5014 (process_serial_event) <'z'>: Likewise.
5015
5016 2013-02-18 Yao Qi <yao@codesourcery.com>
5017
5018 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
5019
5020 2013-02-14 Pedro Alves <palves@redhat.com>
5021
5022 Plug memory leak.
5023
5024 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
5025 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
5026
5027 2013-02-14 Pedro Alves <palves@redhat.com>
5028
5029 * tracepoint.c (cmd_qtdpsrc): Use savestring.
5030
5031 2013-02-14 Pedro Alves <palves@redhat.com>
5032
5033 * tracepoint.c (save_string): Delete.
5034 (add_tracepoint_action): Use savestring instead of save_string.
5035
5036 2013-02-12 Pedro Alves <palves@redhat.com>
5037
5038 * linux-xtensa-low.c: Ditto.
5039 * xtensa-xtregs.c: Ditto.
5040
5041 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
5042
5043 * thread-db.c (thread_db_get_tls_address): NULL pointer check
5044 thread_db.
5045
5046 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
5047
5048 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
5049 aarch64_num_wp_regs and aarch64_num_bp_regs to
5050 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
5051
5052 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
5053
5054 * linux-aarch64-low.c (ps_get_thread_area): Replace
5055 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
5056
5057 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
5058 Marcus Shawcroft <marcus.shawcroft@arm.com>
5059 Nigel Stephens <nigel.stephens@arm.com>
5060 Yufeng Zhang <yufeng.zhang@arm.com>
5061
5062 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
5063 (aarch64.c, aarch64-without-fpu.c): New targets.
5064 * configure.srv (aarch64*-*-linux*): New.
5065 * linux-aarch64-low.c: New file.
5066
5067 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
5068
5069 * linux-low.c (handle_extended_wait, linux_create_inferior)
5070 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
5071 (dequeue_one_deferred_signal, linux_resume_one_thread)
5072 (fetch_register, linux_write_memory, linux_enable_event_reporting)
5073 (linux_tracefork_grandchild, linux_test_for_tracefork)
5074 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
5075 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
5076 where the argument is 0.
5077
5078 2013-01-25 Yao Qi <yao@codesourcery.com>
5079
5080 * event-loop.c: Include "queue.h".
5081 (gdb_event_p): New typedef.
5082 (struct gdb_event) <next_event>: Remove.
5083 (event_queue): Change to QUEUE(gdb_event_p).
5084 (async_queue_event): Remove.
5085 (gdb_event_xfree): New.
5086 (initialize_event_loop): New.
5087 (process_event): Use API from QUEUE.
5088 (wait_for_event): Likewise.
5089 * server.c (main): Call initialize_event_loop.
5090 * server.h (initialize_event_loop): Declare.
5091
5092 2013-01-18 Yao Qi <yao@codesourcery.com>
5093
5094 * ax.h (struct eval_agent_expr_context): New.
5095 (gdb_eval_agent_expr): Update declaration.
5096 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
5097 TFRAME. Add new argument CTX.
5098 * server.h (struct eval_agent_expr_context): Declare.
5099 (agent_mem_read, agent_tsv_read): Update declaration.
5100 (agent_mem_read_string): Likewise.
5101 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
5102 (add_traceframe_block): Add new argument TPOINT.
5103 Increase TPOINT->traceframe_usage.
5104 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
5105 eval_tracepoint_agent_expr.
5106 (condition_true_at_tracepoint): Likewise.
5107 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
5108 (agent_mem_read_string, agent_tsv_read): Likewise.
5109
5110 2013-01-16 Yao Qi <yao@codesourcery.com>
5111
5112 * linux-low.c (linux_resume_one_lwp): Don't check
5113 'lwp->bp_reinsert != 0'.
5114
5115 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5116 Pedro Alves <palves@redhat.com>
5117
5118 * lynx-low.c (ptrace_request_to_str): Define a temporary
5119 macro and use it to simplify this function's implementation.
5120
5121 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5122
5123 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
5124 sets errno.
5125
5126 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5127
5128 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
5129
5130 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5131
5132 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
5133
5134 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5135
5136 * lynx-low.c (lynx_resume): Use the resume_info parameter
5137 to determine the ptid for the lynx_ptrace call, unless
5138 it is equal to minus_one_ptid, in which case we use the
5139 ptid of the current_inferior.
5140 (lynx_wait_1): After having received a thread create/exit
5141 event, resume the inferior's execution using the signaling
5142 thread's ptid, rather than the old ptid.
5143
5144 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5145
5146 * lynx-low.c (lynx_resume): Delete variable ret.
5147
5148 2013-01-01 Joel Brobecker <brobecker@adacore.com>
5149
5150 * gdbreplay.c (gdbreplay_version): Update copyright year.
5151 * server.c (gdbserver_version): Likewise.
5152
5153 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5154
5155 * lynx-low.c (lynx_wait_1): Add debug trace before adding
5156 new thread.
5157
5158 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5159
5160 * lynx-low.c (ptrace_request_to_str): Add handling for
5161 PTRACE_GETTRACESIG.
5162
5163 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5164
5165 * lynx-low.c (lynx_attach): Delete variable new_process.
5166
5167 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5168
5169 * lynx-low.c (lynx_create_inferior): Delete variable
5170 new_process.
5171
5172 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5173
5174 * lynx-low.c (ptrace_request_to_str): Do not handle
5175 PTRACE_GETTHREADLIST if this macro does not exist.
5176
5177 2012-12-15 Yao Qi <yao@codesourcery.com>
5178
5179 * Makefile.in (OBS): Add notif.o.
5180 * notif.c, notif.h: New.
5181 * server.c: Include "notif.h".
5182 (struct vstop_notif) <next>: Remove.
5183 <base>: New field.
5184 (queue_stop_reply): Update.
5185 (push_event, send_next_stop_reply): Remove.
5186 (discard_queued_stop_replies): Update.
5187 (notif_stop): New variable.
5188 (handle_v_stopped): Remove.
5189 (handle_v_requests): Don't call handle_v_stopped. Call
5190 handle_ack_notif instead.
5191 (queue_stop_reply_callback): Call notif_event_enque instead
5192 of queue_stop_reply.
5193 (handle_status): Don't call send_next_stop_reply, call
5194 notif_write_event instead.
5195 (kill_inferior_callback): Likewise.
5196 (detach_or_kill_inferior_callback): Likewise.
5197 (main): Call initialize_notif.
5198 (process_serial_event): Call QUEUE_is_empty.
5199 (handle_target_event): Call notif_push instead of push event.
5200 * server.h (push_event): Remove declaration.
5201
5202 2012-12-10 Tom Tromey <tromey@redhat.com>
5203
5204 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
5205 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
5206 macros.
5207 (.c.o): Rewrite.
5208 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
5209 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
5210 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
5211 (amd64-linux-ipa.o, ax.o): Rewrite.
5212 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
5213 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
5214 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
5215 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
5216 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
5217 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
5218 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
5219 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
5220 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
5221 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
5222 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
5223 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
5224 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
5225 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
5226 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
5227 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
5228 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
5229 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
5230 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
5231 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
5232 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
5233 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
5234 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
5235 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
5236 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
5237 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
5238 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
5239 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
5240 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
5241 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
5242 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
5243 (reg-tilegx.o): Remove.
5244 (all_object_files): New macro.
5245 Include .deps files.
5246 * aclocal.m4, configure: Rebuild.
5247 * acinclude.m4: Include depstand.m4, lead-dot.m4.
5248 * configure.ac: Invoke ZW_CREATE_DEPDIR,
5249 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
5250
5251 2012-12-05 Tom Tromey <tromey@redhat.com>
5252
5253 PR gdb/14917:
5254 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
5255
5256 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
5257
5258 * configure.ac: Check for linux/perf_event.h.
5259 * config.in: Regenerated.
5260 * configure: Regenerated.
5261
5262 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
5263
5264 * hostio.c (handle_readlink): Decrease buffer size
5265 parameter passed to readlink by one byte.
5266
5267 2012-11-26 Yao Qi <yao@codesourcery.com>
5268
5269 * configure.ac (build_warnings): Append '-Wempty-body'.
5270 * configure: Regenerated.
5271 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
5272 body.
5273
5274 2012-11-15 Pierre Muller <muller@sourceware.org>
5275
5276 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
5277 * config.in: Regenerate.
5278 * configure: Regenerate.
5279 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
5280 Use "gdb_wait.h" header instead of <sys/wait.h> header.
5281 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
5282 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
5283 header.
5284 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
5285 instead of <sys/wait.h> header.
5286 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
5287
5288 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
5289
5290 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
5291 (various make rules): Remove -DGDBSERVER
5292
5293 2012-11-09 Yao Qi <yao@codesourcery.com>
5294
5295 * spu-low.c (current_ptid): Move it to ..
5296 * gdbthread.h: ... here. New.
5297 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
5298 * server.c (myresume, process_serial_event): Likewise.
5299 * thread-db.c (thread_db_find_new_threads): Likewise.
5300 * tracepoint.c (run_inferior_command): Likewise.
5301
5302 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
5303
5304 * server.c (handle_search_memory_1): Include access length in
5305 warning message.
5306
5307 2012-09-05 Michael Brandt <michael.brandt@axis.com>
5308
5309 * linux-crisv32-low.c: Fix compile errors.
5310
5311 2012-09-04 Yao Qi <yao@codesourcery.com>
5312
5313 * tracepoint.c (cmd_qtsv): Adjust debug message.
5314 Don't check CUR_TPOINT.
5315
5316 2012-08-28 Yao Qi <yao@codesourcery.com>
5317
5318 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
5319 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
5320 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
5321 Remove declarations of xmalloc, xreallloc, xstrdup and
5322 freeargv.
5323 * Makefile.in (libiberty_h): New.
5324 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
5325 (linux-bfin-low.o): Append dependency 'libiberty.h'.
5326
5327 2012-08-23 Yao Qi <yao@codesourcery.com>
5328
5329 * server.h: Remove declaration of 'xsnprintf'.
5330
5331 2012-08-22 Keith Seitz <keiths@redhat.com>
5332
5333 * server.h: Include build-gnulib-gbserver/config.h.
5334 * gdbreplay.c: Likewise.
5335
5336 2012-08-08 Doug Evans <dje@google.com>
5337
5338 * Makefile.in (SFILES): Add gdb_vecs.c.
5339 (OBS): Add gdb_vecs.o.
5340 (gdb_vecs_h, host_defs_h): New variables.
5341 (thread-db.o): Add $(gdb_vecs_h) dependency.
5342 (gdb_vecs.o): New rule.
5343 * thread-db.c: #include "gdb_vecs.h".
5344 (thread_db_load_search): Use a vector to iterate over path elements.
5345 Handle text appearing after "$pdir".
5346
5347 * configure.ac: Add check for strstr.
5348 * config.in: Regenerate.
5349 * configure: Regenerate.
5350
5351 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
5352
5353 * hostio.c (handle_pread): If pread fails, fall back to attempting
5354 lseek/read.
5355 (handle_pwrite): Likewise for pwrite.
5356
5357 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
5358
5359 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
5360 between unsupported TYPE and unimplementable ADDR/LEN combination.
5361 (arm_insert_point): Act on new return value.
5362
5363 2012-07-31 Pedro Alves <palves@redhat.com>
5364
5365 * server.c (process_point_options): Only skip tokens if we find
5366 one that is unrecognized. Don't treat 'X' specially while
5367 skipping unrecognized tokens.
5368
5369 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
5370
5371 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
5372 to 4-byte-align HW breakpoint addresses for Thumb.
5373
5374 2012-07-27 Yao Qi <yao@codesourcery.com>
5375
5376 PR remote/14161.
5377
5378 * server.h: Declare gdb_agent_about_to_close.
5379 * target.c (kill_inferior): Include "agent.h".
5380 New. Send command 'kill'.
5381 * target.h (kill_inferior): Removed macro.
5382 * tracepoint.c (gdb_agent_about_to_close): New.
5383 (gdb_agent_helper_thread): Handle command 'close'.
5384 Wait endlessly until the inferior stops.
5385 Install gdb_agent_remove_socket to atexit hook.
5386 (agent_socket_name): New static variable.
5387 (gdb_agent_socket_init): Replace local variable 'name' with
5388 'agent_socket_name'.
5389 (gdb_agent_remove_socket): New.
5390
5391 2012-07-27 Yao Qi <yao@codesourcery.com>
5392
5393 * server.c (process_point_options): Stop at 'X' when parsing.
5394
5395 2012-07-19 Michael Eager <eager@eagercon.com>
5396
5397 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
5398 to hw_execute.
5399 * linux-x86-low.c (x86_insert_point, x86_remove_point):
5400 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
5401 hardware breakpoint.
5402
5403 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5404
5405 * gdbserver/linux-low.c (initialize_low): Call
5406 linux_ptrace_init_warnings.
5407
5408 2012-07-02 Doug Evans <dje@google.com>
5409
5410 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
5411 pointer to int.
5412
5413 2012-07-02 Stan Shebs <stan@codesourcery.com>
5414
5415 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
5416 (ax.o): Add it to build rule.
5417 (ax-ipa.o): Ditto.
5418 (OBS): Add format.o.
5419 (IPA_OBS): Add format.o.
5420 * server.c (handle_query): Claim support for breakpoint commands.
5421 (process_point_options): Add command case.
5422 (process_serial_event): Leave running if there are printfs in
5423 effect.
5424 * mem-break.h (any_persistent_commands): Declare.
5425 (add_breakpoint_commands): Declare.
5426 (gdb_no_commands_at_breakpoint): Declare.
5427 (run_breakpoint_commands): Declare.
5428 * mem-break.c (struct point_command_list): New struct.
5429 (struct breakpoint): New field command_list.
5430 (any_persistent_commands): New function.
5431 (add_commands_to_breakpoint): New function.
5432 (add_breakpoint_commands): New function.
5433 (gdb_no_commands_at_breakpoint): New function.
5434 (run_breakpoint_commands): New function.
5435 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
5436 locally.
5437 * ax.c: Include format.h.
5438 (ax_printf): New function.
5439 (gdb_eval_agent_expr): Add printf opcode.
5440
5441 2012-06-13 Yao Qi <yao@codesourcery.com>
5442
5443 * server.c (start_inferior): Remove duplicated writes to fields
5444 'last_resume_kind' and 'last_status' of 'current_inferior'.
5445
5446 2012-06-12 Yao Qi <yao@codesourcery.com>
5447 Pedro Alves <palves@redhat.com>
5448
5449 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
5450 comment.
5451 * server.c (handle_v_cont): Extend comment.
5452
5453 2012-06-11 Yao Qi <yao@codesourcery.com>
5454
5455 * linux-low.c (linux_attach): Add 'static'.
5456
5457 2012-06-06 Yao Qi <yao@codesourcery.com>
5458
5459 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
5460
5461 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
5462
5463 Fix gcc -flto compilation warning.
5464 * server.c (main): Make variable multi_mode and attach volatile.
5465
5466 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5467
5468 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
5469 if the platform doesn't know about it.
5470
5471 2012-05-30 Jeff Kenton <jkenton@tilera.com>
5472
5473 * Makefile.in (SFILES): Add linux-tile-low.c.
5474 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
5475 * configure.srv: Handle tilegx-*-linux*.
5476 * linux-tile-low.c: New file.
5477
5478 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5479
5480 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
5481
5482 2012-05-24 Pedro Alves <palves@redhat.com>
5483
5484 PR gdb/7205
5485
5486 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
5487
5488 2012-05-24 Pedro Alves <palves@redhat.com>
5489
5490 PR gdb/7205
5491
5492 Replace target_signal with gdb_signal throughout.
5493
5494 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
5495
5496 * linux-low.c (linux_store_registers): Avoid the copying sequence
5497 when no data has been retrieved by ptrace.
5498
5499 2012-05-22 Will Deacon <will.deacon@arm.com>
5500
5501 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
5502 Include asm/ptrace.h.
5503 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
5504 already defined.
5505
5506 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
5507
5508 * linux-low.c (linux_store_registers): Don't re-retrieve data
5509 with ptrace that has already been obtained from /proc. Always
5510 copy any data retrieved with ptrace to the buffer supplied.
5511
5512 2012-05-11 Yao Qi <yao@codesourcery.com>
5513 Pedro Alves <palves@redhat.com>
5514
5515 * linux-low.c (enum stopping_threads_kind): New.
5516 (stopping_threads): Change type to `enum stopping_threads_kind'.
5517 (handle_extended_wait): If stopping and suspending threads, leave
5518 the new_lwp suspended too.
5519 (linux_wait_for_event): Adjust.
5520 (stop_all_lwps): Set `stopping_threads' to
5521 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
5522 whether we're suspending threads or just stopping them. Assert no
5523 recursion happens.
5524
5525 2012-04-29 Yao Qi <yao@codesourcery.com>
5526
5527 * server.h: Move some code to ...
5528 * gdbthread.h: ... here. New.
5529 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
5530 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
5531 (nto-low.o, win32-low.o): Likewise.
5532 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
5533 * regcache.c, remote-utils.c, server.c: Likewise.
5534 * target.c, tracepoint.c, win32-low.c: Likewise.
5535
5536 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5537
5538 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
5539 (PTRACE_ARG4_TYPE): Likewise.
5540 (PTRACE_XFER_TYPE): Likewise.
5541 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
5542 ptrace to PTRACE_ARG3_TYPE.
5543 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
5544 (PTRACE_ARG4_TYPE): Likewise.
5545 (PTRACE_XFER_TYPE): Likewise.
5546 (linux_detach_one_lwp): Cast fourth argument of
5547 ptrace to long then PTRACE_ARG4_TYPE.
5548 (regsets_fetch_inferior_registers): Cast third argument of
5549 ptrace to long then PTRACE_ARG3_TYPE.
5550 (regsets_store_inferior_registers): Likewise.
5551
5552 2012-04-20 Pedro Alves <palves@redhat.com>
5553
5554 * configure: Regenerate.
5555
5556 2012-04-19 Pedro Alves <palves@redhat.com>
5557
5558 * Makefile.in (GNULIB_BUILDDIR): New.
5559 (LIBGNU, INCGNU, GNULIB_H): Adjust.
5560 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
5561 (all, install-only, uninstall, clean-info, all-lib, clean): No
5562 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
5563 (maintainer-clean realclean distclean): Use subdir_do.
5564 (subdir_do): New.
5565 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
5566 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
5567 * acinclude.m4: Include acx_configure_dir.m4.
5568 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
5569 calls. Call AC_PROG_RANLIB. Configure gnulib using
5570 ACX_CONFIGURE_DIR.
5571 (GNULIB): New.
5572 (GNULIB_STDINT_H): Adjust.
5573 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
5574 * gdbreplay.c: Include build-gnulib/config.h.
5575 * server.h: Likewise.
5576 * aclocal.m4: Regenerate.
5577 * config.in: Regenerate.
5578 * configure: Regenerate.
5579
5580 2012-04-19 Pedro Alves <palves@redhat.com>
5581
5582 * Makefile.in (LIBGNU, INCGNU): Adjust.
5583 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
5584 (all, install-only, uninstall, clean-info, all-lib, clean)
5585 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
5586 * configure.ac: Adjust AC_OUTPUT output.
5587 * aclocal.m4: Regenerate.
5588 * configure: Regenerate.
5589
5590 2012-04-19 Pedro Alves <palves@redhat.com>
5591
5592 * Makefile.in (generated_files): New.
5593 (server_h): Remove the explicit dependency on config.h, and depend
5594 on $generated_files.
5595
5596 2012-04-19 Pedro Alves <palves@redhat.com>
5597
5598 * Makefile.in (INCGNU): Add -Ignulib.
5599
5600 2012-04-19 Pedro Alves <palves@redhat.com>
5601
5602 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
5603 (INCGNU): ... this, and spell out -I here.
5604 (GNULIB_LIB): Rename to ...
5605 (LIBGNU): ... this.
5606 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
5607
5608 2012-04-19 Pedro Alves <palves@redhat.com>
5609
5610 * config.in: Regenerate.
5611
5612 2012-04-19 Pedro Alves <palves@redhat.com>
5613
5614 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
5615 * server.h (memmem): Remove declaration.
5616 * config.in: Regenerate.
5617 * configure: Regenerate.
5618
5619 2012-04-19 Yao Qi <yao@codesourcery.com>
5620
5621 * Makefile.in (SFILES): Add common/vec.c.
5622 (OBS): Add vec.o.
5623 (vec.o): New rule.
5624
5625 2012-04-19 Yao Qi <yao@codesourcery.com>
5626
5627 * remote-utils.c (prepare_resume_reply): Replace with macro
5628 target_core_of_thread.
5629 * server.c (handle_qxfer_threads_proper): Likewise.
5630 * target.h (traget_core_of_thread): New macro.
5631
5632 2012-04-18 Pedro Alves <palves@redhat.com>
5633
5634 * aclocal.m4: Regenerate.
5635 * configure: Regenerate.
5636
5637 2012-04-16 Yao Qi <yao@codesourcery.com>
5638
5639 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
5640 duplicated on address.
5641
5642 2012-04-16 Yao Qi <yao@codesourcery.com>
5643
5644 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
5645 (struct tracepoint_action_ops) <send>: New field.
5646 (m_tracepoint_action_send, r_tracepoint_action_send): New.
5647 (agent_expr_send, x_tracepoint_action_send): New.
5648 (l_tracepoint_action_send): New.
5649 (cmd_qtdp): Download and install tracepoint
5650 according to `use_agent'.
5651 (run_inferior_command): Add one more parameter `len'.
5652 Update callers.
5653 (tracepoint_send_agent): New.
5654 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
5655
5656 2012-04-16 Yao Qi <yao@codesourcery.com>
5657
5658 * tracepoint.c (download_tracepoints): Moved to ...
5659 (cmd_qtstart): ... here.
5660
5661 2012-04-14 Yao Qi <yao@codesourcery.com>
5662
5663 * tracepoint.c: Include inttypes.h.
5664 (struct collect_memory_action): Use sized types.
5665 (struct tracepoint): Likewise.
5666 (cmd_qtdp, stop_tracing): Update print specifiers.
5667 (cmd_qtp, response_tracepoint): Likewise.
5668 (collect_data_at_tracepoint): Likewise.
5669 (collect_data_at_step): Likewise.
5670
5671 2012-04-14 Yao Qi <yao@codesourcery.com>
5672
5673 Import gnulib module inttypes.
5674 * aclocal.m4, config.in, configure: Regenerated.
5675
5676 2012-04-14 Yao Qi <yao@codesourcery.com>
5677
5678 * Makefile.in (maintainer-clean, realclean, distclean): Remove
5679 Makefile and config.status at last.
5680
5681 2012-04-13 Yao Qi <yao@codesourcery.com>
5682
5683 * tracepoint.c: Include stdint.h unconditionally.
5684
5685 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5686
5687 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
5688 on BFD_HAVE_SYS_PROCFS_TYPE.
5689 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
5690 * configure: Regenerate.
5691 * config.in: Likewise.
5692
5693 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
5694
5695 * Makefile.in (clean): Also remove x32.c x32-linux.c
5696 x32-avx.c x32-avx-linux.c.
5697 (x32.o): New target.
5698 (x32.c): Likewise.
5699 (x32-linux.o): Likewise.
5700 (x32-linux.c): Likewise.
5701 (x32-avx.o): Likewise.
5702 (x32-avx.c): Likewise.
5703 (x32-avx-linux.o): Likewise.
5704 (x32-avx-linux.c): Likewise.
5705
5706 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
5707 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
5708 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
5709 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
5710 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
5711 i386/x32-avx-linux.xml.
5712
5713 * linux-x86-low.c (init_registers_x32_linux): New prototype.
5714 (init_registers_x32_avx_linux): Likwise.
5715 (x86_linux_update_xmltarget): Call init_registers_x32_linux
5716 or init_registers_x32_avx_linux if linux_is_elf64 is false.
5717
5718 2012-04-13 Pedro Alves <palves@redhat.com>
5719
5720 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
5721 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
5722 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
5723 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
5724 the sub-make.
5725
5726 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
5727
5728 * linux-x86-low.c (compat_x32_clock_t): New.
5729 (compat_x32_siginfo_t): Likewise.
5730 (compat_x32_siginfo_from_siginfo): Likewise.
5731 (siginfo_from_compat_x32_siginfo): Likewise.
5732 (linux_is_elf64): Likewise.
5733 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
5734 and siginfo_from_compat_x32_siginfo for x32.
5735 (x86_arch_setup): Set linux_is_elf64.
5736
5737 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
5738
5739 PR gdb/13969
5740 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
5741 e_machine field.
5742 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
5743 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
5744 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
5745 compatible with process.
5746
5747 2012-04-12 Yao Qi <yao@codesourcery.com>
5748
5749 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
5750 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
5751 (install-only, install-info, clean): Handle sub dir gnulib.
5752 (all-lib, am--refresh): New targets.
5753 (memmem.o): Remove target.
5754 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
5755 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
5756 (AC_REPLACE_FUNCS): Remove memmem.
5757 Invoke gl_INIT and AM_INIT_AUTOMAKE.
5758 (AC_OUTPUT): Generate Makefile in gnulib/.
5759 * aclocal.m4, config.in, configure: Regenerated.
5760
5761 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
5762
5763 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
5764
5765 2012-04-05 Pedro Alves <palves@redhat.com>
5766
5767 -Werror=strict-aliasing
5768
5769 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
5770 pointer.
5771
5772 2012-04-04 Pedro Alves <palves@redhat.com>
5773
5774 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
5775 (sparc_store_gregset_from_stack, sparc_store_gregset)
5776 (sparc_breakpoint_at): Fix formatting.
5777
5778 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5779
5780 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
5781 are available.
5782 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
5783 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
5784 * config.in: Regenerate.
5785 * configure: Likewise.
5786
5787 2012-03-29 Pedro Alves <palves@redhat.com>
5788
5789 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
5790 Correct ptrace arguments.
5791
5792 2012-03-28 Pedro Alves <palves@redhat.com>
5793
5794 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
5795 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
5796 (IA64_FR1_REGNUM): New defines.
5797 (ia64_fetch_register): New.
5798 (the_low_target): Install it.
5799 * linux-low.h (struct linux_target_ops) <fetch_register>: New
5800 field.
5801 * linux-low.c (linux_fetch_registers): Try the
5802 the_low_target.fetch_register hook first.
5803
5804 * linux-arm-low.c (the_low_target): Adjust.
5805 * linux-bfin-low.c (the_low_target): Adjust.
5806 * linux-cris-low.c (the_low_target): Adjust.
5807 * linux-crisv32-low.c (the_low_target): Adjust.
5808 * linux-m32r-low.c (the_low_target): Adjust.
5809 * linux-m68k-low.c (the_low_target): Adjust.
5810 * linux-mips-low.c (the_low_target): Adjust.
5811 * linux-ppc-low.c (the_low_target): Adjust.
5812 * linux-s390-low.c (the_low_target): Adjust.
5813 * linux-sh-low.c (the_low_target): Adjust.
5814 * linux-sparc-low.c (the_low_target): Adjust.
5815 * linux-tic6x-low.c (the_low_target): Adjust.
5816 * linux-x86-low.c (the_low_target): Adjust.
5817 * linux-xtensa-low.c (the_low_target): Adjust.
5818
5819 2012-03-26 Pedro Alves <palves@redhat.com>
5820
5821 * server.c (handle_qxfer_libraries): Don't bail early if
5822 the_target->qxfer_libraries_svr4 is not NULL.
5823
5824 2012-03-26 Pedro Alves <palves@redhat.com>
5825
5826 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
5827
5828 2012-03-23 Pedro Alves <palves@redhat.com>
5829
5830 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
5831 "library-list-svr4" element's start tag when the the DSO list is
5832 empty.
5833
5834 2012-03-23 Pedro Alves <palves@redhat.com>
5835
5836 * linux-low.c (read_one_ptr): Read the inferior's pointer through
5837 a variable whose type size is the same as the inferior's pointer
5838 size.
5839
5840 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
5841
5842 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
5843 struct siginfo.
5844 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
5845 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
5846 * linux-low.h: Include <signal.h>.
5847 (struct siginfo): Remove forward declaration.
5848 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
5849 struct siginfo.
5850
5851 2012-03-21 Mike Frysinger <vapier@gentoo.org>
5852
5853 * .gitignore: Ignore more files.
5854
5855 2012-03-19 Pedro Alves <palves@redhat.com>
5856 Jan Kratochvil <jan.kratochvil@redhat.com>
5857
5858 * server.c (cont_thread, general_thread): Add describing comments.
5859 (start_inferior): Clear `cont_thread'.
5860 (handle_v_cont): Don't set `cont_thread' if resuming all threads
5861 of a process.
5862
5863 2012-03-15 Yao Qi <yao@codesourcery.com>
5864
5865 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
5866 handling to ...
5867 (cmd_qtdp): ... here.
5868
5869 2012-03-15 Yao Qi <yao@codesourcery.com>
5870
5871 * tracepoint.c (struct tracepoint_action_ops): New.
5872 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
5873 (m_tracepoint_action_download): New.
5874 (r_tracepoint_action_download): New.
5875 (x_tracepoint_action_download): New.
5876 (l_tracepoint_action_download): New.
5877 (add_tracepoint_action): Install `action->ops' according type.
5878 (download_tracepoint_1): Move code `download' function pointer
5879 of various tracepoint_action_ops.
5880
5881 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
5882
5883 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
5884 linux_ptrace_attach_warnings.
5885
5886 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
5887
5888 * Makefile.in (linux-ptrace.o): New.
5889 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
5890 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
5891 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
5892 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
5893 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
5894 of these targets.
5895 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
5896
5897 2012-03-08 Yao Qi <yao@codesourcery.com>
5898 Pedro Alves <palves@redhat.com>
5899
5900 Fix PR server/13392.
5901 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
5902 offset of JMP insn.
5903 * tracepoint.c (remove_tracepoint): New.
5904 (cmd_qtdp): Call remove_tracepoint when failed to install.
5905
5906 2012-03-07 Pedro Alves <palves@redhat.com>
5907
5908 * linux-low.c (get_detach_signal): New.
5909 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
5910 Pass on pending signals to PTRACE_DETACH. Check the result of the
5911 ptrace call.
5912 * server.c (program_signals, program_signals_p): New.
5913 (handle_general_set): Handle QProgramSignals.
5914 * server.h (program_signals, program_signals_p): Declare.
5915
5916 2012-03-05 Pedro Alves <palves@redhat.com>
5917 Jan Kratochvil <jan.kratochvil@redhat.com>
5918
5919 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
5920 New comment why.
5921
5922 2012-03-03 Yao Qi <yao@codesourcery.com>
5923
5924 * tracepoint.c (tracepoint_look_up_symbols): Update call to
5925 agent_look_up_symbols.
5926
5927 2012-03-03 Yao Qi <yao@codesourcery.com>
5928
5929 * Makefile.in (linux-low.o): Keep dependence on agent.h.
5930 (linux-x86-low.o): Likewise.
5931 * server.h: Remove in_process_agent_loaded.
5932 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
5933 common/agent.c.
5934 Update callers.
5935
5936 2012-03-03 Yao Qi <yao@codesourcery.com>
5937
5938 * tracepoint.c (gdb_agent_capability): New global.
5939 (in_process_agent_loaded_ust): Renamed to
5940 `in_process_agent_supports_ust'.
5941 Update callers.
5942 (in_process_agent_supports_ust): Call agent_capability_check.
5943 (clear_installed_tracepoints): Assert that agent supports
5944 agent.
5945
5946 2012-03-03 Yao Qi <yao@codesourcery.com>
5947
5948 * linux-low.c (linux_supports_agent): New.
5949 (linux_target_ops): Initialize field `supports_agent' with
5950 linux_supports_agent.
5951 * target.h (struct target_ops) <supports_agent>: New.
5952 (target_supports_agent): New macro.
5953 * server.c (handle_general_set): Handle packet 'QAgent'.
5954 (handle_query): Send `QAgent+'.
5955 * Makefile.in (server.o): Depends on agent.h.
5956
5957 2012-03-03 Yao Qi <yao@codesourcery.com>
5958
5959 * Makefile.in (OBS): Add agent.o.
5960 Add new rule for agent.o.
5961 Track dependence of tracepoint.c on agent.h.
5962 * tracepoint.c (run_inferior_command_1):
5963 (run_inferior_command): Call agent_run_command.
5964 (gdb_ust_connect_sync_socket): Deleted. Move it to
5965 common/agent.c.
5966 (resume_thread, stop_thread): Likewise.
5967 (gdb_ust_socket_init): Renamed to ...
5968 (gdb_agent_socket_init): ... New.
5969 (gdb_ust_thread): Renamed to ...
5970 (gdb_agent_helper_thread): ... New.
5971 (gdb_ust_init): Move some code to ...
5972 (gdb_agent_init): ... here. New.
5973 [HAVE_UST]: Call gdb_ust_init.
5974 (initialize_tracepoint_ftlib): Call gdb_agent_init.
5975 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
5976 * config.in, configure: Regenerated.
5977
5978 2012-03-02 Pedro Alves <palves@redhat.com>
5979
5980 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
5981 * linux-low.c (struct simple_pid_list): New.
5982 (stopped_pids): New a struct simple_pid_list pointer.
5983 (add_to_pid_list, pull_pid_from_list): New.
5984 (handle_extended_wait): Don't assume the first signal new children
5985 report is SIGSTOP. Adjust call to pull_pid_from_list.
5986 (linux_wait_for_lwp): Adjust.
5987
5988 2012-03-02 Yao Qi <yao@codesourcery.com>
5989
5990 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
5991 debug log.
5992
5993 2012-03-02 Yao Qi <yao@codesourcery.com>
5994
5995 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
5996 `stop_pc' and `tpoint'. Update caller.
5997
5998 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
5999
6000 * linux-low.h (linux_target_ops): Add regset_bitmap member.
6001 * linux-low.c (use_linux_regsets): New macro.
6002 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
6003 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
6004 (linux_register_in_regsets): New function.
6005 (usr_fetch_inferior_registers): Skip registers covered by
6006 regsets.
6007 (usr_store_inferior_registers): Likewise.
6008 (usr_fetch_inferior_registers): New macro.
6009 (usr_store_inferior_registers): Likewise.
6010 (linux_fetch_registers): Handle mixed regset/non-regset targets.
6011 (linux_store_registers): Likewise.
6012 * linux-mips-low.c (init_registers_mips_dsp_linux): New
6013 prototype.
6014 (init_registers_mips64_dsp_linux): Likewise.
6015 (init_registers_mips_linux): New macro.
6016 (init_registers_mips_dsp_linux): Likewise.
6017 (mips_dsp_num_regs): Likewise.
6018 (DSP_BASE, DSP_CONTROL): New fallback macros.
6019 (mips_base_regs): New macro.
6020 (mips_regmap): Use it. Fix the size.
6021 (mips_dsp_regmap): New variable.
6022 (mips_dsp_regset_bitmap): Likewise.
6023 (mips_arch_setup): New function.
6024 (mips_cannot_fetch_register): Use the_low_target.regmap rather
6025 than mips_regmap.
6026 (mips_cannot_store_register): Likewise.
6027 (the_low_target): Update .arch_setup, .num_regs and .regmap
6028 initializers. Add .regset_bitmap initializer.
6029 * linux-arm-low.c (the_low_target): Add .regset_bitmap
6030 initializer.
6031 * linux-bfin-low.c (the_low_target): Likewise.
6032 * linux-cris-low.c (the_low_target): Likewise.
6033 * linux-crisv32-low.c (the_low_target): Likewise.
6034 * linux-ia64-low.c (the_low_target): Likewise.
6035 * linux-m32r-low.c (the_low_target): Likewise.
6036 * linux-m68k-low.c (the_low_target): Likewise.
6037 * linux-ppc-low.c (the_low_target): Likewise.
6038 * linux-s390-low.c (the_low_target): Likewise.
6039 * linux-sh-low.c (the_low_target): Likewise.
6040 * linux-sparc-low.c (the_low_target): Likewise.
6041 * linux-tic6x-low.c (the_low_target): Likewise.
6042 * linux-x86-low.c (the_low_target): Likewise.
6043 * linux-xtensa-low.c (the_low_target): Likewise.
6044 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
6045 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
6046 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
6047 srv_xmlfiles.
6048 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
6049 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
6050
6051 2012-02-29 Yao Qi <yao@codesourcery.com>
6052 Pedro Alves <palves@redhat.com>
6053
6054 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
6055 `step_over_finished' is true.
6056
6057 2012-02-27 Pedro Alves <palves@redhat.com>
6058
6059 * linux-low.c (pid_is_stopped): Delete, moved to common/.
6060 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
6061
6062 2012-02-27 Pedro Alves <palves@redhat.com>
6063
6064 PR server/9684
6065 * linux-low.c (pid_is_stopped): New.
6066 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
6067
6068 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
6069
6070 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
6071 of conditions.
6072
6073 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
6074
6075 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
6076
6077 2012-02-24 Luis Machado <lgustavo@codesourcery>
6078
6079 * server.c (handle_query): Advertise support for target-side
6080 breakpoint condition evaluation.
6081 (process_point_options): New function.
6082 (process_serial_event): When inserting a breakpoint, check for
6083 a target-side condition that should be evaluated.
6084
6085 * mem-break.c: Include regcache.h and ax.h.
6086 (point_cond_list_t): New data structure.
6087 (breakpoint) <cond_list>: New field.
6088 (find_gdb_breakpoint_at): Make non-static.
6089 (delete_gdb_breakpoint_at): Clear any target-side
6090 conditions.
6091 (clear_gdb_breakpoint_conditions): New function.
6092 (add_condition_to_breakpoint): Likewise.
6093 (add_breakpoint_condition): Likewise.
6094 (gdb_condition_true_at_breakpoint): Likewise.
6095 (gdb_breakpoint_here): Return result directly instead
6096 of going through a local variable.
6097
6098 * mem-break.h (find_gdb_breakpoint_at): New prototype.
6099 (clear_gdb_breakpoint_conditions): Likewise.
6100 (add_breakpoint_condition): Likewise.
6101 (gdb_condition_true_at_breakpoint): Likewise.
6102
6103 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
6104 (need_step_over_p): Take target-side breakpoint condition into
6105 consideration.
6106
6107 2012-02-24 Luis Machado <lgustavo@codesourcery>
6108
6109 * server.h: Include tracepoint.h.
6110 (agent_mem_read, agent_get_trace_state_variable_value,
6111 agent_set_trace_state_variable_value,
6112 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
6113 get_set_tsv_func_addr): New prototypes.
6114
6115 * ax.h: New include file.
6116 * ax.c: New source file.
6117
6118 * tracepoint.c: Include ax.h.
6119 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
6120 agent_expr, eval_result_type): Move to ax.h.
6121 (parse_agent_expr): Rename to ...
6122 (gdb_parse_agent_expr): ... this, make it non-static and move
6123 to ax.h.
6124 (unparse_agent_expr) Rename to ...
6125 (gdb_unparse_agent_expr): ... this, make it non-static and move
6126 to ax.h.
6127 (eval_agent_expr): Rename to ...
6128 (eval_tracepoint_agent_expr): ... this.
6129 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
6130 forward declarations.
6131 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
6132 (agent_get_trace_state_variable_value): New function.
6133 (agent_set_trace_state_variable_value): New function.
6134 (cmd_qtdp): Call gdb_parse_agent_expr (...).
6135 (response_tracepoint): Call gdb_unparse_agent_expr (...).
6136 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
6137 (condition_true_at_tracepoint): Likewise.
6138 (parse_agent_expr): Rename to ...
6139 (gdb_parse_agent_expr): ... this and move to ax.c.
6140 (unparse_agent_expr): Rename to ...
6141 (gdb_unparse_agent_expr): ... this and move to ax.c.
6142 (gdb_agent_op_name): Move to ax.c.
6143 (eval_agent_expr): Rename to ...
6144 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
6145 and move to ax.c.
6146 (eval_tracepoint_agent_expr): New function.
6147 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
6148 non-static.
6149 (current_insn_ptr, emit_error, struct bytecode_address): Move to
6150 ax.c.
6151 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
6152 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
6153 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
6154 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
6155 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
6156 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
6157 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
6158 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
6159 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
6160 (compile_bytecodes): Remove forward declaration.
6161 (is_goto_target): Move to ax.c.
6162 (compile_bytecodes): Move to ax.c and call
6163 agent_get_trace_state_variable_value (...) and
6164 agent_set_trace_state_variable_value (...).
6165
6166 * Makefile.in: Update ax.c and IPA dependencies.
6167
6168 2012-02-24 Pedro Alves <palves@redhat.com>
6169
6170 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
6171 (cmd_bigqtbuffer_circular): ... this. Only handle
6172 'QTBuffer:circular:'.
6173 (handle_tracepoint_general_set): Adjust.
6174
6175 2012-02-16 Yao Qi <yao@codesourcery.com>
6176
6177 * inferiors.c: Move code to ...
6178 * dll.c: .... here. New.
6179 * server.h: Declare clear_dlls.
6180 * Makefile.in (SFILES): Add dll.c.
6181 (OBS): Add dll.o
6182 (dll.o): New rule.
6183
6184 2012-02-11 Yao Qi <yao@codesourcery.com>
6185
6186 * server.c: (handle_monitor_command): Add a new parameter
6187 `own_buf'.
6188 (handle_query): Update caller.
6189
6190 2012-02-09 Joel Brobecker <brobecker@adacore.com>
6191
6192 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
6193 * configure, config.in: Regenerate.
6194 * hostio.c: Provide an alternate implementation if HAVE_READLINK
6195 is not defined.
6196
6197 2012-02-02 Pedro Alves <palves@redhat.com>
6198
6199 Try SIGKILL first, then PTRACE_KILL.
6200 * linux-low.c (linux_kill_one_lwp): New.
6201 (linux_kill_one_lwp): Rename to ...
6202 (kill_one_lwp_callback): ... this. Use the new
6203 linux_kill_one_lwp.
6204
6205 2012-02-02 Pedro Alves <palves@redhat.com>
6206
6207 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
6208 inferior.
6209
6210 2012-01-27 Pedro Alves <palves@redhat.com>
6211
6212 * linux-low.c (linux_child_pid_to_exec_file): Delete.
6213 (elf_64_file_p): Make static.
6214 (linux_pid_exe_is_elf_64_file): New.
6215 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
6216 Delete declarations.
6217 (linux_pid_exe_is_elf_64_file): Declare.
6218 * linux-x86-low.c (x86_arch_setup): Use
6219 linux_pid_exe_is_elf_64_file.
6220
6221 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
6222
6223 * linux-low.c (linux_wait_for_event_1): Rename to ...
6224 (linux_wait_for_event): ... here and merge it with former
6225 linux_wait_for_event - new variable wait_ptid, use it.
6226 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
6227
6228 2012-01-23 Pedro Alves <palves@redhat.com>
6229
6230 * server.c (main): Avoid yet another case of infinite loop while
6231 detaching/killing after a longjmp.
6232
6233 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
6234
6235 Code cleanup.
6236 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
6237
6238 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
6239
6240 * hostio.c (handle_readlink): New function.
6241 (handle_vFile): Call it to handle "vFile:readlink" packets.
6242
6243 2012-01-20 Pedro Alves <palves@redhat.com>
6244 Ulrich Weigand <ulrich.weigand@linaro.org>
6245
6246 * server.c (handle_v_requests): Only support vAttach and vRun to
6247 start multiple processes when in extended protocol mode.
6248
6249 2012-01-17 Pedro Alves <palves@redhat.com>
6250
6251 * tracepoint.c (initialize_tracepoint): Use mmap instead of
6252 memalign plus mprotect to allocate the scratch buffer.
6253
6254 2012-01-13 Pedro Alves <palves@redhat.com>
6255
6256 * server.c (attach_inferior): Clear `cont_thread'.
6257
6258 2012-01-13 Pedro Alves <palves@redhat.com>
6259
6260 * server.c (main): Avoid infinite loop while detaching/killing
6261 after a longjmp.
6262
6263 2012-01-09 Doug Evans <dje@google.com>
6264
6265 * server.c (start_inferior): Set last_ptid in --wrapper case.
6266
6267 2012-01-06 Yao Qi <yao@codesourcery.com>
6268
6269 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
6270 defined.
6271 [IN_PROCESS_AGENT] (debug_agent): New global variable.
6272
6273 2012-01-04 Yao Qi <yao@codesourcery.com>
6274
6275 * tracepoint.c (cmd_qtdp): Print debug message
6276 for static tracepoint.
6277
6278 2012-01-04 Yao Qi <yao@codesourcery.com>
6279
6280 * tracepoint.c (trace_vdebug): Differentiate debug message
6281 between gdbserver and IPA.
6282
6283 2012-01-03 Yao Qi <yao@codesourcery.com>
6284
6285 * tracepoint.c (tracepoint_was_hit): Don't collect for
6286 static tracepoint.
6287
6288 2012-01-02 Joel Brobecker <brobecker@adacore.com>
6289
6290 * terminal.h: Reformat copyright header.
6291
6292 2012-01-02 Joel Brobecker <brobecker@adacore.com>
6293
6294 * server.c (gdbserver_version): Update copyright year.
6295 * gdbreplay.c (gdbreplay_version): Likewise.
6296
6297 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
6298
6299 * linux-low.c (linux_create_inferior): Put empty if clause for write.
6300
6301 Revert:
6302 2011-12-18 Hui Zhu <teawater@gmail.com>
6303 * linux-low.c (linux_create_inferior): Save return value to ret.
6304
6305 2011-12-18 Hui Zhu <teawater@gmail.com>
6306
6307 * linux-low.c (linux_create_inferior): Save return value to ret.
6308
6309 2011-12-16 Doug Evans <dje@google.com>
6310
6311 * linux-low.c (linux_create_inferior): If stdio connection,
6312 redirect stdin from /dev/null, stdout to stderr.
6313 * remote-utils.c (remote_is_stdio): New static global.
6314 (remote_connection_is_stdio): New function.
6315 (remote_prepare): Handle stdio connection.
6316 (remote_open): Ditto.
6317 (remote_close): Don't close stdin for stdio connections.
6318 (read_prim,write_prim): New functions. Replace all calls to
6319 read/write to these.
6320 * server.c (main): Watch for "-" argument. Move call to
6321 remote_prepare before start_inferior.
6322 * server.h (STDIO_CONNECTION_NAME): New macro.
6323 (remote_connection_is_stdio): Declare.
6324
6325 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
6326 in debugging output.
6327
6328 2011-12-15 Yao Qi <yao@codesourcery.com>
6329
6330 * tracepoint.c: Include sys/syscall.h.
6331 (gdb_ust_thread): Remove preprocessor conditional.
6332
6333 2011-12-14 Pedro Alves <pedro@codesourcery.com>
6334
6335 * linux-low.c (linux_detach_one_lwp): Call
6336 the_low_target.prepare_to_resume before detaching.
6337
6338 2011-12-14 Yao Qi <yao@codesourcery.com>
6339
6340 * tracepoint.c (gdb_ust_thread): Don't ignore return value
6341 of write.
6342
6343 2011-12-14 Yao Qi <yao@codesourcery.com>
6344
6345 * i386-low.c (i386_low_stopped_data_address): Initialize local
6346 variable `control'.
6347
6348 2011-12-13 Pedro Alves <pedro@codesourcery.com>
6349
6350 PR remote/13492
6351
6352 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
6353 DR_CONTROL unless necessary. Extend comments.
6354 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
6355 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
6356
6357 2011-12-13 Yao Qi <yao@codesourcery.com>
6358
6359 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
6360 macros.
6361 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
6362
6363 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
6364
6365 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
6366 Print new debug message for such case.
6367
6368 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
6369
6370 Fix overlapping memcpy.
6371 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
6372 the read_inferior_memory transfer.
6373 (delete_fast_tracepoint_jump): New variable buf. Use it for the
6374 write_inferior_memory transfer.
6375 (set_fast_tracepoint_jump): New variable buf. Use it for the
6376 read_inferior_memory and write_inferior_memory transfers.
6377 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
6378 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
6379 Use it for the write_inferior_memory transfer.
6380 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
6381 buffers.
6382
6383 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
6384
6385 * linux-low.c (fetch_register, store_register): Make code
6386 consistent, fix formatting.
6387
6388 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
6389
6390 * linux-low.c (usr_store_inferior_registers): Factor out code
6391 to handle individual registers into...
6392 (store_register): ... this new function.
6393
6394 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
6395
6396 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
6397 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
6398 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
6399 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
6400 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
6401 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
6402 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
6403 (srv_xmlfiles): Add new XML files.
6404
6405 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
6406 and <sys/uio.h>.
6407 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
6408 (init_registers_s390_linux32v1): Add prototype.
6409 (init_registers_s390_linux32v2): Likewise.
6410 (init_registers_s390_linux64v1): Likewise.
6411 (init_registers_s390_linux64v2): Likewise.
6412 (init_registers_s390x_linux64v1): Likewise.
6413 (init_registers_s390x_linux64v2): Likewise.
6414 (s390_num_regs): Increment to 52.
6415 (s390_regmap): Add orig_r2 register.
6416 (s390_num_regs_3264): Increment to 68.
6417 (s390_regmap_3264): Add orig_r2 register.
6418 (s390_collect_ptrace_register): Handle orig_r2 register.
6419 (s390_supply_ptrace_register): Likewise.
6420 (s390_fill_last_break): New function.
6421 (s390_store_last_break): Likewise.
6422 (s390_fill_system_call): New function.
6423 (s390_store_system_call): Likewise.
6424 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
6425 register sets.
6426 (s390_check_regset): New function.
6427 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
6428 NT_S390_SYSTEM_CALL regsets and use appropriate description.
6429 Update target_regsets for available register sets.
6430
6431 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
6432 Jan Kratochvil <jan.kratochvil@redhat.com>
6433
6434 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
6435 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
6436 New.
6437 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
6438 * linux-low.h (struct process_info_private): New member r_debug.
6439 * server.c (handle_qxfer_libraries): Call
6440 the_target->qxfer_libraries_svr4.
6441 (handle_qxfer_libraries_svr4): New function.
6442 (qxfer_packets): New entry "libraries-svr4".
6443 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
6444 * target.h (struct target_ops): New member qxfer_libraries_svr4.
6445 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
6446 PACKET_qXfer_libraries_svr4.
6447
6448 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
6449
6450 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
6451 PSW address/mask between 8-byte and 16-byte formats.
6452 (s390_supply_ptrace_register): Likewise.
6453 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
6454 basic addressing mode bit.
6455
6456 2011-11-24 Stan Shebs <stan@codesourcery.com>
6457
6458 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
6459
6460 2011-11-17 Stan Shebs <stan@codesourcery.com>
6461
6462 * tracepoint.c (struct tracepoint): New field traceframe_usage.
6463 (tracing_start_time): New global.
6464 (tracing_stop_time): New global.
6465 (tracing_user_name): New global.
6466 (tracing_notes): New global.
6467 (tracing_stop_note): New global.
6468 (cmd_qtstart): Set traceframe_usage, start_time.
6469 (stop_tracing): Set stop_time.
6470 (cmd_qtstatus): Report additional status.
6471 (cmd_qtp): New function.
6472 (handle_tracepoint_query): Call it.
6473 (cmd_qtnotes): New function.
6474 (handle_tracepoint_general_set): Call it.
6475 (get_timestamp): Rename from tsv_get_timestamp.
6476
6477 2011-11-14 Stan Shebs <stan@codesourcery.com>
6478 Kwok Cheung Yeung <kcy@codesourcery.com>
6479
6480 * linux-x86-low.c (small_jump_insn): New.
6481 (i386_install_fast_tracepoint_jump_pad): Add arguments for
6482 trampoline and error message, build a trampoline and issue a small
6483 jump instruction to it.
6484 (x86_install_fast_tracepoint_jump_pad): Add arguments for
6485 trampoline and error message.
6486 (x86_get_min_fast_tracepoint_insn_len): New.
6487 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
6488 * linux-low.h (struct linux_target_ops): Add arguments to
6489 install_fast_tracepoint_jump_pad operation, add new operation.
6490 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
6491 arguments.
6492 (linux_get_min_fast_tracepoint_insn_len): New function.
6493 (linux_target_op): Add new operation.
6494 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
6495 (gdb_trampoline_buffer_end): Ditto.
6496 (gdb_trampoline_buffer_error): Ditto.
6497 (struct ipa_sym_addresses): Add fields for new IPA variables.
6498 (symbol_list): Add entries for new IPA variables.
6499 (struct tracepoint): Add fields to hold the address range of the
6500 trampoline used by the tracepoint.
6501 (trampoline_buffer_head): New static variable.
6502 (trampoline_buffer_tail): Ditto.
6503 (claim_trampoline_space): New function.
6504 (have_fast_tracepoint_trampoline_buffer): New function.
6505 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
6506 structure.
6507 (install_fast_tracepoint): Ditto, also add error buffer argument.
6508 (cmd_qtminftpilen): New function.
6509 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
6510 (fast_tracepoint_from_trampoline_address): New function.
6511 (fast_tracepoint_collecting): Handle trampoline as part of jump
6512 pad space.
6513 (set_trampoline_buffer_space): New function.
6514 (initialize_tracepoint): Initialize new IPA variables.
6515 * target.h (struct target_ops): Add arguments to
6516 install_fast_tracepoint_jump_pad operation, add new
6517 get_min_fast_tracepoint_insn_len operation.
6518 (target_get_min_fast_tracepoint_insn_len): New.
6519 (install_fast_tracepoint_jump_pad): Add arguments.
6520 * server.h (IPA_BUFSIZ): Define.
6521 * linux-i386-ipa.c: Include extra header files.
6522 (initialize_fast_tracepoint_trampoline_buffer): New function.
6523 (initialize_low_tracepoint): Call it.
6524 * server.h (set_trampoline_buffer_space): Declare.
6525 (claim_trampoline_space): Ditto.
6526 (have_fast_tracepoint_trampoline_buffer): Ditto.
6527
6528 2011-11-14 Yao Qi <yao@codesourcery.com>
6529
6530 * server.c (handle_query): Handle InstallInTrace for qSupported.
6531 * tracepoint.c (add_tracepoint): Sort list.
6532 (install_tracepoint, download_tracepoint): New.
6533 (cmd_qtdp): Call them to install and download tracepoints.
6534 (sort_tracepoints): Removed.
6535 (cmd_qtstart): Update.
6536
6537 2011-11-14 Yao Qi <yao@codesourcery.com>
6538
6539 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
6540 * mem-break.h: Declare.
6541 * tracepoint.c (cmd_qtstart): Move some code to ...
6542 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
6543 New.
6544 (download_tracepoints): Move some code to ...
6545 (download_tracepoint_1): ... here. New.
6546
6547 2011-11-08 Yao Qi <yao@codesourcery.com>
6548
6549 * remote-utils.c (relocate_instruction): A comment fix.
6550
6551 2011-11-07 Joel Brobecker <brobecker@adacore.com>
6552
6553 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
6554 (i386_dr_low_get_control, i386_dr_low_get_status): Use
6555 dr_status_mirror and dr_control_mirror from debug_reg_state.
6556 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
6557 (i386_initial_stuff): Remove use of deleted globals.
6558 (i386_get_thread_context, i386_set_thread_context,
6559 i386_thread_added): Use dr_status_mirror and dr_control_mirror
6560 from debug_reg_state.
6561
6562 2011-11-05 Yao Qi <yao@codesourcery.com>
6563
6564 * tracepoint.c (gdb_collect): Loop over tracepoints of same
6565 address as TPOINT's.
6566
6567 2011-11-02 Stan Shebs <stan@codesourcery.com>
6568
6569 * tracepoint.c (agent_mem_read_string): New function.
6570 (eval_agent_expr): Call it for tracenz.
6571 * server.c (handle_query): Report support for tracenz.
6572
6573 2011-11-02 Yao Qi <yao@codesourcery.com>
6574
6575 * tracepoint.c (cmd_qtstart): Remove unused local variables.
6576
6577 2011-11-02 Yao Qi <yao@codesourcery.com>
6578
6579 * target.h: Fix a typo in comment.
6580
6581 2011-10-31 Pedro Alves <pedro@codesourcery.com>
6582
6583 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
6584 clobber the breakpoints' shadows with fast tracepoint jumps.
6585 * mem-break.h (check_mem_write): Add `myaddr' parameter.
6586 * target.c (write_inferior_memory): Also pass MYADDR down to
6587 check_mem_write.
6588
6589 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
6590
6591 * configure.ac: Check support for personality routine.
6592 * configure: Regenerate.
6593 * config.in: Likewise.
6594 * linux-low.c: Include <sys/personality.h>.
6595 Define ADDR_NO_RANDOMIZE if necessary.
6596 (linux_create_inferior): Disable address space randomization when
6597 forking inferior, if requested.
6598 (linux_supports_disable_randomization): New function.
6599 (linux_target_ops): Install it.
6600 * server.h (disable_randomization): Declare.
6601 * server.c (disable_randomization): New global variable.
6602 (handle_general_set): Handle QDisableRandomization.
6603 (handle_query): Likewise for qSupported.
6604 (main): Support --disable-randomization and --no-disable-randomization
6605 command line arguments.
6606 * target.h (struct target_ops): Add supports_disable_randomization.
6607 (target_supports_disable_randomization): New macro.
6608
6609 2011-09-29 Mike Frysinger <vapier@gentoo.org>
6610
6611 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
6612 ifdef check.
6613 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
6614 [!PT_GETDSBT] (target_loadmap): New definition.
6615 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
6616 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
6617 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
6618 and PT_GETDSBT to LINUX_LOADMAP.
6619 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
6620 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
6621
6622 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
6623
6624 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
6625 (arm_linux_hwbp_cap): New static variable.
6626 (arm_linux_get_hwbp_cap): Replace by ...
6627 (arm_linux_init_hwbp_cap): ... this new function.
6628 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
6629 (arm_linux_get_hw_watchpoint_count): Likewise.
6630 (arm_linux_get_hw_watchpoint_max_length): Likewise.
6631 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
6632 (arm_prepare_to_resume): Use perror_with_name instead of error.
6633
6634 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
6635
6636 * linux-arm-low.c: Include <signal.h>.
6637 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
6638 (struct arm_linux_hwbp_cap): New data type.
6639 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
6640 (struct arm_linux_hw_breakpoint): New data type.
6641 (MAX_BPTS, MAX_WPTS): Define.
6642 (struct arch_process_info, struct arch_lwp_info): New data types.
6643 (arm_linux_get_hwbp_cap): New function.
6644 (arm_linux_get_hw_breakpoint_count): Likewise.
6645 (arm_linux_get_hw_watchpoint_count): Likewise.
6646 (arm_linux_get_hw_watchpoint_max_length): Likewise.
6647 (arm_hwbp_control_initialize): Likewise.
6648 (arm_hwbp_control_is_enabled): Likewise.
6649 (arm_hwbp_control_is_initialized): Likewise.
6650 (arm_hwbp_control_disable): Likewise.
6651 (arm_linux_hw_breakpoint_equal): Likewise.
6652 (arm_linux_hw_point_initialize): Likewise.
6653 (struct update_registers_data): New data structure.
6654 (update_registers_callback: New function.
6655 (arm_insert_point): Likewise.
6656 (arm_remove_point): Likewise.
6657 (arm_stopped_by_watchpoint): Likewise.
6658 (arm_stopped_data_address): Likewise.
6659 (arm_new_process): Likewise.
6660 (arm_new_thread): Likewise.
6661 (arm_prepare_to_resume): Likewise.
6662 (the_low_target): Register arm_insert_point, arm_remove_point,
6663 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
6664 arm_new_thread, and arm_prepare_to_resume.
6665
6666 2011-09-15 Stan Shebs <stan@codesourcery.com>
6667
6668 * server.h (struct emit_ops): Add compare-goto fields.
6669 * tracepoint.c (gdb_agent_op_sizes): New table.
6670 (emit_eq_goto): New function.
6671 (emit_ne_goto): New function.
6672 (emit_lt_goto): New function.
6673 (emit_le_goto): New function.
6674 (emit_gt_goto): New function.
6675 (emit_ge_goto): New function.
6676 (is_goto_target): New function.
6677 (compile_bytecodes): Recognize special cases of compare-goto
6678 combinations and call specialized emitters for them.
6679 * linux-x86-low.c (amd64_emit_eq_goto): New function.
6680 (amd64_emit_ne_goto): New function.
6681 (amd64_emit_lt_goto): New function.
6682 (amd64_emit_le_goto): New function.
6683 (amd64_emit_gt_goto): New function.
6684 (amd64_emit_ge_goto): New function.
6685 (amd64_emit_ops): Add the new functions.
6686 (i386_emit_eq_goto): New function.
6687 (i386_emit_ne_goto): New function.
6688 (i386_emit_lt_goto): New function.
6689 (i386_emit_le_goto): New function.
6690 (i386_emit_gt_goto): New function.
6691 (i386_emit_ge_goto): New function.
6692 (i386_emit_ops): Add the new functions.
6693
6694 2011-09-08 Stan Shebs <stan@codesourcery.com>
6695
6696 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
6697 (i386_emit_epilogue): Restore %ebx.
6698
6699 2011-08-31 Jie Zhang <jzhang918@gmail.com>
6700
6701 * server.c (step_thread): Remove definition.
6702 (process_serial_event): Don't handle Hs.
6703 * server.h (step_thread): Remove declaration.
6704 * target.c (set_desired_inferior): Remove use of step_thread.
6705
6706 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
6707
6708 * linux-low.c: Include linux-procfs.h.
6709 (linux_attach_lwp_1): Update comments.
6710 (linux_attach): Scan for existing threads when attaching to a
6711 process that is the tgid.
6712 * Makefile.in: Update dependencies.
6713
6714 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
6715
6716 * configure.srv: Add linux-procfs.o dependencies.
6717
6718 2011-08-14 Yao Qi <yao@codesourcery.com>
6719
6720 * target.h (struct target_ops): Fix indent.
6721 * win32-low.c (win32_target_ops): Fix comment.
6722
6723 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
6724 Yao Qi <yao@codesourcery.com>
6725
6726 * Makefile.in (clean): Remove tic6x-*.c files.
6727 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
6728 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
6729 (tic6x-c64xp-linux.c): Likewise.
6730 * configure.srv: Add support for tic6x-*-uclinux.
6731 * linux-tic6x-low.c: New.
6732 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
6733
6734 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
6735 Yao Qi <yao@codesourcery.com>
6736
6737 * target.h (struct target_ops): Add read_loadmap.
6738 * linux-low.c (struct target_loadseg): New type.
6739 (struct target_loadmap): New type.
6740 (linux_read_loadmap): New function.
6741 (linux_target_ops): Add linux_read_loadmap.
6742 * server.c (handle_query): Support qXfer:fdpic:read packet.
6743 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
6744 to NULL.
6745
6746 2011-08-05 Eli Zaretskii <eliz@gnu.org>
6747
6748 * win32-low.c: Include <stdint.h>.
6749
6750 2011-07-22 Pedro Alves <pedro@codesourcery.com>
6751
6752 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
6753 to the inferior here.
6754 (i386_remove_aligned_watchpoint): Ditto.
6755 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
6756 fit part of the watchpoint in the debug registers.
6757 (i386_update_inferior_debug_regs): New.
6758 (i386_low_insert_watchpoint): Work on a local mirror of the debug
6759 registers, and only update the inferior on success.
6760 (i386_low_remove_watchpoint): Ditto.
6761
6762 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
6763
6764 * linux-low.c (compare_ints, unique, list_threads, show_process,
6765 linux_core_of_thread): Delete.
6766 (linux_target_ops): Change linux_core_of_thread to
6767 linux_common_core_of_thread.
6768 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
6769 * utils.c (malloc_failure): Change type of argument.
6770 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
6771 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
6772 common/linux-osdata.c, common/ptid.c and common/buffer.c.
6773 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
6774 (IPA_OBJS): Add common-utils-ipa.o.
6775 (ptid_h, linux_osdata_h): New macros.
6776 (server_h): Add common/common-utils.h, common/xml-utils.h,
6777 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
6778 common/ptid.h.
6779 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
6780 ptid.o, buffer.o): New rules.
6781 (linux-low.o): Add common/linux-osdata.h as a dependency.
6782 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
6783 * configure.ac: Add AC_HEADER_DIRENT check.
6784 * config.in: Regenerate.
6785 * configure: Regenerate.
6786 * remote-utils.c (xml_escape_text): Delete.
6787 (buffer_grow, buffer_free, buffer_init, buffer_finish,
6788 buffer_xml_printf): Move to common/buffer.c.
6789 * server.c (main): Remove call to initialize_inferiors.
6790 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
6791 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
6792 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
6793 internal_error, gdb_assert, gdb_assert_fail): Delete.
6794 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
6795 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
6796 common/buffer.h.
6797 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
6798 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
6799 initialize_inferiors): Delete.
6800
6801 2011-07-20 Pedro Alves <pedro@codesourcery.com>
6802
6803 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
6804 symbol error.
6805
6806 2011-05-31 Pedro Alves <pedro@codesourcery.com>
6807
6808 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
6809 assertion.
6810 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
6811
6812 2011-05-26 Yao Qi <yao@codesourcery.com>
6813
6814 * Makefile.in (thread-db.o): Track dependence to
6815 common/gdb_thread_db.h.
6816 * thread-db.c: include gdb_thread_db.h from right place.
6817
6818 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
6819
6820 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
6821 __FILE__ and __LINE__ to internal_error.
6822
6823 2011-05-13 Doug Evans <dje@google.com>
6824
6825 * thread-db.c (try_thread_db_load_from_sdir): New function.
6826 (try_thread_db_load_from_dir): New function.
6827 (thread_db_load_search): Handle $sdir, ignore $pdir.
6828 Remove trying of system directories if search of
6829 libthread-db-search-path fails, that is now done via $sdir.
6830
6831 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
6832
6833 * server.c (handle_query): Add EnableDisableTracepoints to the list
6834 of supported features.
6835 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
6836 tracepoints.
6837 (cmd_qtenable_disable): New.
6838 (cmd_qtstart): Install tracepoints even if disabled.
6839 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
6840 receiving a QTEnable or QTDisable packet.
6841 (gdb_collect): Skip data collection if fast tracepoint is disabled.
6842 (ust_marker_to_static_tracepoint): Do not ignore disabled static
6843 tracepoints.
6844 (gdb_probe): Skip data collection if static tracepoint is disabled.
6845
6846 2011-05-10 Doug Evans <dje@google.com>
6847
6848 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
6849
6850 2011-05-04 Doug Evans <dje@google.com>
6851
6852 * linux-low.c (linux_join): Skip process lookup.
6853 * spu-low.c (spu_join): Ditto.
6854 * server.c (join_inferiors_callback): Delete.
6855 (process_serial_event): For 'D' packet (detach) call join_inferior
6856 directly.
6857
6858 2011-05-04 Joseph Myers <joseph@codesourcery.com>
6859
6860 * README: Don't mention xscale*-*-linux*.
6861 * configure.srv (xscale*-*-linux*): Don't handle target.
6862
6863 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
6864
6865 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
6866 casting pointers.
6867 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
6868 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
6869 (i386_emit_void_call_2): Likewise.
6870
6871 2011-04-26 Yao Qi <yao@codesourcery.com>
6872
6873 * linux-low.c: Move common macros to linux-ptrace.h.
6874 Include linux-ptrace.h.
6875 * Makefile.in (linux_ptrace_h): New.
6876 (linux-low.o): Depends on linux-ptrace.h.
6877
6878 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
6879
6880 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
6881 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
6882 (remote_prepare): New function with most of the TCP code from ...
6883 (remote_open): ... here. Detect PORT here unconditionally. Move also
6884 setting transport_is_reliable.
6885 * server.c (run_once): New variable.
6886 (gdbserver_usage): Document it.
6887 (main): Set run_once for `--once'. Call remote_prepare. Exit after
6888 the first run if RUN_ONCE.
6889 * server.h (run_once, remote_prepare): New declarations.
6890
6891 2011-04-19 Tom Tromey <tromey@redhat.com>
6892
6893 * win32-low.c (handle_load_dll): Remove duplicate "the".
6894
6895 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
6896
6897 Remove support for old Cygwin 1.5 versions.
6898 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
6899 function to avoid warning.
6900 (win32_add_one_solib): Use cygwin_conv_path function to avoid
6901 warning.
6902
6903 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
6904
6905 * gdbserver/server.h (Macro _): Define it if not available.
6906
6907 2011-03-14 Michael Snyder <msnyder@vmware.com>
6908
6909 * hostio.c (handle_close): Remove unnecessary null test.
6910
6911 2011-03-10 Joel Brobecker <brobecker@adacore.com>
6912
6913 * Makefile.in (maintainer-clean realclean distclean): Remove
6914 "make ... subdir_do" command.
6915
6916 2011-03-10 Michael Snyder <msnyder@vmware.com>
6917
6918 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
6919
6920 * server.c (handle_v_run): Free alloced buffer on early return.
6921
6922 2011-03-09 Yao Qi <yao@codesourcery.com>
6923
6924 Revert:
6925 2011-03-04 Yao Qi <yao@codesourcery.com>
6926
6927 * Makefile.in: Remove GNU make feature --directory.
6928
6929 2011-03-05 Yao Qi <yao@codesourcery.com>
6930
6931 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
6932 (subdir_do): New make target. Copied from gdb/Makefile.
6933 (maintainer-clean, realclean, distclean, clean): Call corresponding
6934 make targets in common/Makefile.
6935
6936 2011-02-11 Yao Qi <yao@codesourcery.com>
6937
6938 * configure.ac: Call AC_PROG_RANLIB.
6939 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
6940 * configure: Regenerate.
6941
6942 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
6943
6944 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
6945
6946 2011-03-06 Yao Qi <yao@codesourcery.com>
6947
6948 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
6949
6950 2011-03-05 Yao Qi <yao@codesourcery.com>
6951
6952 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
6953 (subdir_do): New make target. Copied from gdb/Makefile.
6954 (maintainer-clean, realclean, distclean, clean): Call corresponding
6955 make targets in common/Makefile.
6956
6957 2011-03-04 Yao Qi <yao@codesourcery.com>
6958
6959 * Makefile.in: Remove GNU make feature --directory.
6960
6961 2011-03-04 Michael Snyder <msnyder@vmware.com>
6962
6963 * server.c (queue_stop_reply): Call xmalloc not malloc.
6964
6965 2011-03-02 Michael Snyder <msnyder@vmware.com>
6966
6967 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
6968
6969 2011-02-28 Michael Snyder <msnyder@vmware.com>
6970
6971 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
6972 (cmd_qtframe): Ditto.
6973 (cmd_qtbuffer): Ditto.
6974 (cmd_bigqtbuffer): Ditto.
6975
6976 * utils.c (decimal2str): Initialize 'width' to nine, then
6977 don't mess with it.
6978
6979 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
6980
6981 * hostio.c (require_data): Free *data, not data.
6982
6983 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6984
6985 * hostio.c (require_data): Use free, not xfree.
6986
6987 2011-02-27 Michael Snyder <msnyder@vmware.com>
6988
6989 * server.c (handle_query): Discard unused value.
6990
6991 * hostio.c (require_data): Free malloc memory before returning
6992 error.
6993
6994 2011-02-26 Michael Snyder <msnyder@vmware.com>
6995
6996 * linux-low.c (list_threads): Call closedir for dirent.
6997
6998 2011-02-27 Michael Snyder <msnyder@vmware.com>
6999
7000 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
7001 a case statement falls through.
7002
7003 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
7004
7005 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
7006 in comparison.
7007
7008 2011-02-26 Michael Snyder <msnyder@vmware.com>
7009
7010 * utils.c (decimal2str): Eliminate dead code and dead param.
7011 (pulongest): Drop dead param from call to decimal2str.
7012 (plongest): Ditto.
7013
7014 2011-02-24 Joel Brobecker <brobecker@adacore.com>
7015
7016 Revert the following patch (not approved yet):
7017 2011-02-21 Hui Zhu <teawater@gmail.com>
7018 * tracepoint.c (tp_printf): New function.
7019 (eval_agent_expr): Handle gdb_agent_op_printf.
7020
7021 2011-02-21 Hui Zhu <teawater@gmail.com>
7022
7023 * tracepoint.c (tp_printf): New function.
7024 (eval_agent_expr): Handle gdb_agent_op_printf.
7025
7026 2011-02-18 Tom Tromey <tromey@redhat.com>
7027
7028 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
7029 (tracepoint.o): Likewise.
7030 * tracepoint.c (enum gdb_agent_op): Use ax.def.
7031 (gdb_agent_op_names): Likewise.
7032
7033 2011-02-18 Tom Tromey <tromey@redhat.com>
7034
7035 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
7036 gdb_agent_op_rot>: New constants.
7037 (gdb_agent_op_names): Add pick and roll.
7038 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
7039 cases.
7040
7041 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
7042
7043 * aclocal.m4: Regenerated with aclocal-1.11.1.
7044
7045 2011-02-14 Pedro Alves <pedro@codesourcery.com>
7046
7047 * server.c (handle_qxfer_traceframe_info): New.
7048 (qxfer_packets): Register "traceframe-info".
7049 (handle_query): Report support for qXfer:traceframe-info:read+.
7050 * tracepoint.c (match_blocktype): New.
7051 (traceframe_find_block_type): Rename to ...
7052 (traceframe_walk_blocks): ... this. Add callback filter argument,
7053 and use it.
7054 (traceframe_find_block_type): New, reimplemented on top of
7055 traceframe_walk_blocks.
7056 (build_traceframe_info_xml): New.
7057 (traceframe_read_info): New.
7058 * server.h (traceframe_read_info): Declare.
7059
7060 2011-02-11 Yao Qi <yao@codesourcery.com>
7061
7062 * configure.ac: Call AC_PROG_RANLIB.
7063 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
7064 * configure: Regenerate.
7065
7066 2011-02-07 Pedro Alves <pedro@codesourcery.com>
7067
7068 * server.c (gdb_read_memory): Change return semantics to allow
7069 partial transfers.
7070 (handle_search_memory_1): Adjust.
7071 (process_serial_event) <'m' packet>: Handle partial transfers.
7072 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
7073
7074 2011-01-28 Pedro Alves <pedro@codesourcery.com>
7075
7076 * regcache.c (init_register_cache): Initialize
7077 regcache->register_status.
7078 (free_register_cache): Release regcache->register_status.
7079 (regcache_cpy): Copy register_status.
7080 (registers_to_string): Print 'x's for unavailable registers.
7081 (supply_register): Mark the register's status valid or
7082 unavailable, depending on whether a buffer was passed in or not.
7083 (supply_register_zeroed): New.
7084 (supply_regblock): Mark the registers' status valid or
7085 unavailable, depending on whether a buffer was passed in or not.
7086 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
7087 (struct regcache): New `register_status' field.
7088 (supply_register_zeroed): Declare.
7089 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
7090 supply_register_zeroed, rather than passing a NULL buffer to
7091 supply_register.
7092 * tracepoint.c (fetch_traceframe_registers): Update comment.
7093
7094 2011-01-28 Pedro Alves <pedro@codesourcery.com>
7095
7096 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
7097 buffer explicit.
7098
7099 2011-01-25 Pedro Alves <pedro@codesourcery.com>
7100
7101 * server.h (decode_xfer_write): Change prototype.
7102 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
7103 and don't extract the annex here.
7104 * server.c (decode_xfer_read): Remove `annex' parameter,
7105 and don't extract the annex here.
7106 (decode_xfer): New.
7107 (struct qxfer): New.
7108 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
7109 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
7110 (handle_qxfer_statictrace): New functions, abstracted out from
7111 handle_query, and made to use the struct qxfer interface.
7112 (handle_threads_qxfer_proper): Rename to ...
7113 (handle_qxfer_threads_proper): ... this.
7114 (handle_threads_qxfer): Rename to ...
7115 (handle_qxfer_threads): ... this. Adjust.
7116 (qxfer_packets): New array.
7117 (handle_qxfer): New function.
7118 (handle_query): Use handle_qxfer.
7119
7120 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
7121
7122 * gdbreplay.c: Shorten lines of >= 80 columns.
7123 * linux-low.c: Ditto.
7124 * linux-ppc-low.c: Ditto.
7125 * linux-s390-low.c: Ditto.
7126 * linux-sparc-low.c: Ditto.
7127 * linux-x86-low.c: Ditto.
7128 * linux-xtensa-low.c: Ditto.
7129 * mem-break.c: Ditto.
7130 * nto-low.c: Ditto.
7131 * regcache.h: Ditto.
7132 * remote-utils.c: Ditto.
7133 * server.c: Ditto.
7134 * server.h: Ditto.
7135 * thread-db.c: Ditto.
7136 * tracepoint.c: Ditto.
7137 * utils.c: Ditto.
7138 * win32-low.h: Ditto.
7139
7140 2011-01-05 Joel Brobecker <brobecker@adacore.com>
7141
7142 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
7143 update.
7144
7145 2011-01-01 Joel Brobecker <brobecker@adacore.com>
7146
7147 * server.c (gdbserver_version): Update copyright year in version
7148 output.
7149 * gdbreplay.c (gdbreplay_version): Ditto.
7150
7151 2010-12-29 Jie Zhang <jie.zhang@analog.com>
7152
7153 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
7154 * linux-bfin-low.c: New file.
7155 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
7156 PT_DATA_ADDR for BFIN targets.
7157 * Makefile.in (SFILES): Add linux-bfin-low.c.
7158 (clean): Remove reg-bfin.c.
7159 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
7160 * README: Mention supported Blackfin targets.
7161
7162 2010-12-23 Mike Frysinger <vapier@gentoo.org>
7163
7164 * .gitignore: New file.
7165
7166 2010-11-16 Mike Frysinger <vapier@gentoo.org>
7167
7168 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
7169
7170 2010-10-22 Jie Zhang <jie@codesourcery.com>
7171
7172 * Makefile.in: Add FLAGS_TO_PASS variable.
7173 (install): Remove dependency of install-only and recursively
7174 invoke make for install-only.
7175
7176 2010-10-04 Doug Evans <dje@google.com>
7177
7178 * Makefile.in (uninstall): Use $(DESTDIR).
7179
7180 2010-09-24 Pedro Alves <pedro@codesourcery.com>
7181
7182 PR gdb/11842
7183
7184 * linux-x86-low.c (compat_siginfo_from_siginfo)
7185 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
7186 si_code is < 0. Check for si_code == SI_TIMER before checking for
7187 si_code < 0.
7188
7189 2010-09-13 Joel Brobecker <brobecker@adacore.com>
7190
7191 * lynx-i386-low.c: New file.
7192 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
7193
7194 2010-09-13 Joel Brobecker <brobecker@adacore.com>
7195
7196 * lynx-low.c (ptrace_request_to_str): Remove handling for
7197 request values that have been removed in LynxOS 5.x.
7198
7199 2010-09-13 Joel Brobecker <brobecker@adacore.com>
7200
7201 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
7202 <ptrace.h>
7203
7204 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
7205
7206 * configure.ac: Add --enable-inprocess-agent option.
7207 * configure: Rebuilt.
7208
7209 2010-09-06 Yao Qi <yao@codesourcery.com>
7210
7211 * linux-low.c (linux_kill): Remove unused variable.
7212 (linux_stabilize_threads): Likewise.
7213 * server.c (start_inferior): Likewise.
7214 (queue_stop_reply_callback): Likewise.
7215 * tracepoint.c (do_action_at_tracepoint): Likewise.
7216
7217 2010-09-06 Yao Qi <yao@codesourcery.com>
7218
7219 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
7220 on return.
7221
7222 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
7223
7224 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
7225
7226 2010-09-06 Pedro Alves <pedro@codesourcery.com>
7227
7228 * Makefile.in (install-only): Replace $IPA_DEPFILES with
7229 "$(IPA_DEPFILES)".
7230
7231 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7232
7233 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
7234 gdbserver/lynx-ppc-low.c: New files.
7235 * Makefile.in (lynx_low_h): New variable.
7236 (lynx-low.o, lynx-ppc-low.o): New rules.
7237 * configure.ac: On LynxOS, link with -lnetinet.
7238 * configure.srv: Add handling of powerpc-*-lynxos* targets.
7239 * configure: regenerate.
7240
7241 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7242
7243 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
7244 * configure.ac: Add check for vasprintf and vsnprintf.
7245 * configure, config.in: Regenerate.
7246 * server.h (vasprintf, vsnprintf): Add conditional declarations.
7247
7248 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7249
7250 * gdbreplay.c: Move include of alloca.h up, next to include of
7251 malloc.h.
7252 * server.h: Add include of malloc.h.
7253 * mem-break.c: Remove include of malloc.h.
7254 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
7255
7256 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7257
7258 * Makefile.in (memmem.o): Build with -Wno-error.
7259
7260 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7261
7262 * utils.c (xsnprintf): Make non-static.
7263 * server.h: Add xsnprintf declaration.
7264 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
7265 replace calls to snprintf by calls to xsnprintf throughout.
7266
7267 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7268
7269 * configure.ac: Add configure check for alloca.
7270 * configure, config.in: Regenerate.
7271 * server.h: Include alloca.h if it exists.
7272 * gdbreplay.c: Include alloca.h if it exists.
7273
7274 2010-08-28 Pedro Alves <pedro@codesourcery.com>
7275
7276 * linux-low.c (__SIGRTMIN): Define if not already defined.
7277 (linux_create_inferior): Check for __ANDROID__ rather than
7278 __SIGRTMIN.
7279 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
7280 are already deferred.
7281 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
7282 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
7283 stopped and already has a pending signal to report.
7284 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
7285 a pending signal to report or is moving out of a jump pad.
7286 (linux_init_signals): Check for __ANDROID__ rather than
7287 __SIGRTMIN.
7288
7289 2010-08-28 Pedro Alves <pedro@codesourcery.com>
7290
7291 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
7292 debug_threads check. Avoid a linear search when not doing debug
7293 output.
7294
7295 2010-08-27 Pedro Alves <pedro@codesourcery.com>
7296
7297 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
7298 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
7299 (struct file_handler) <fd>: Change type to gdb_fildes_t.
7300 (process_event): Change local fd's type to gdb_fildes_t.
7301 (create_file_handler): Adjust prototype.
7302 (delete_file_handler): Adjust prototype.
7303 (handle_file_event): Adjust prototype. Use pfildes.
7304 (create_file_event): Adjsut prototype.
7305 * remote-utils.c (remote_desc, listen_desc): Change type to
7306 gdb_fildes_t.
7307 * server.h: New gdb_fildes_t typedef.
7308 [USE_WIN32API]: Include winsock2.h.
7309 (delete_file_handler, add_file_handler): Adjust prototypes.
7310 (pfildes): Declare.
7311 * utils.c (pfildes): New.
7312
7313 2010-08-27 Pedro Alves <pedro@codesourcery.com>
7314
7315 * configure.ac (build_warnings): Add -Wno-char-subscripts.
7316 * configure: Regenerate.
7317
7318 2010-08-27 Pedro Alves <pedro@codesourcery.com>
7319
7320 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
7321 (linux_done_accessing_memory): ... this.
7322 (linux_target_ops): Adjust.
7323 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
7324 * nto-low.c (nto_target_ops): Adjust comment.
7325 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
7326 * spu-low.c (spu_target_ops): Adjust comment.
7327 * target.h (target_ops): Rename unprepare_to_access_memory field
7328 to done_accessing_memory.
7329 (unprepare_to_access_memory): Rename to ...
7330 (done_accessing_memory): ... this.
7331
7332 2010-08-26 Pedro Alves <pedro@codesourcery.com>
7333
7334 * linux-low.c (linux_prepare_to_access_memory): New.
7335 (linux_unprepare_to_access_memory): New.
7336 (linux_target_ops): Install them.
7337 * server.c (read_memory): Rename to ...
7338 (gdb_read_memory): ... this. Use
7339 prepare_to_access_memory/prepare_to_access_memory.
7340 (write_memory): Rename to ...
7341 (gdb_write_memory): ... this. Use
7342 prepare_to_access_memory/prepare_to_access_memory.
7343 (handle_search_memory_1): Adjust.
7344 (process_serial_event): Adjust.
7345 * target.h (struct target_ops): New fields
7346 prepare_to_access_memory and unprepare_to_access_memory.
7347 (prepare_to_access_memory, unprepare_to_access_memory): New.
7348 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
7349 prepare_to_access_memory/prepare_to_access_memory.
7350 * nto-low.c (nto_target_ops): Adjust.
7351 * spu-low.c (spu_target_ops): Adjust.
7352 * win32-low.c (win32_target_ops): Adjust.
7353
7354 2010-08-26 Pedro Alves <pedro@codesourcery.com>
7355
7356 * Makefile.in (WARN_CFLAGS): Get it from configure.
7357 (WERROR_CFLAGS): New.
7358 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
7359 * configure.ac: Introduce --enable-werror, which adds -Werror to
7360 the compiler command line. Enabled by default. Disable with
7361 --disable-werror. Add -Wdeclaration-after-statement
7362 Wpointer-arith and -Wformat-nonliteral to warning flags.
7363 * configure: Regenerate.
7364
7365 2010-08-26 Pedro Alves <pedro@codesourcery.com>
7366
7367 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
7368
7369 2010-08-26 Pedro Alves <pedro@codesourcery.com>
7370
7371 * gdbreplay.c (remote_error): New.
7372 (gdbchar): New.
7373 (expect): Use gdbchar. Check for error reading from GDB.
7374 Clarify sync error output.
7375 (play): Check for errors writing to GDB.
7376 * linux-low.c (sigchld_handler): Really ignore `write' errors.
7377 * remote-utils.c (getpkt): Check for errors writing to the remote
7378 descriptor.
7379
7380 2010-08-25 Pedro Alves <pedro@codesourcery.com>
7381
7382 * linux-low.c (linux_wait_1): Move non-debugging code out of
7383 `debug_threads' control.
7384
7385 2010-08-25 Pedro Alves <pedro@codesourcery.com>
7386
7387 * linux-low.c (linux_wait_1): Don't set last_status here.
7388 * server.c (push_event, queue_stop_reply_callback): Assert we're
7389 not pushing a TARGET_WAITKIND_IGNORE event.
7390 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
7391 (myresume, handle_target_event): Set the thread's last_resume_kind
7392 and last_status from the target returned status.
7393
7394 2010-08-25 Pedro Alves <pedro@codesourcery.com>
7395
7396 PR threads/10729
7397
7398 * linux-x86-low.c (update_debug_registers_callback): New.
7399 (i386_dr_low_set_addr): Use it.
7400 (i386_dr_low_get_addr): New.
7401 (i386_dr_low_set_control): Use update_debug_registers_callback.
7402 (i386_dr_low_get_control): New.
7403 (i386_dr_low_get_status): Adjust.
7404 * linux-low.c (linux_stop_lwp): New.
7405 * linux-low.h (linux_stop_lwp): Declare.
7406
7407 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
7408 argument instead of a i386_debug_reg_state.
7409 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
7410 a i386_debug_reg_state.
7411 (i386_insert_aligned_watchpoint): Adjust.
7412 (i386_remove_aligned_watchpoint): Adjust.
7413 (i386_low_stopped_data_address): Read the debug registers from the
7414 inferior instead of from the mirrors.
7415 * i386-low.h (struct i386_debug_reg_state): Extend comment.
7416 (i386_dr_low_get_addr): Declare.
7417 (i386_dr_low_get_control): Declare.
7418 (i386_dr_low_get_status): Change prototype.
7419
7420 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
7421 (i386_dr_low_get_addr): New.
7422 (i386_dr_low_get_control): New.
7423 (i386_dr_low_get_status): Adjust prototype. Return
7424 dr_status_mirror.
7425 (i386_initial_stuff): Clear dr_status_mirror and
7426 dr_control_mirror.
7427 (i386_get_thread_context): Adjust.
7428 (i386_set_thread_context): Adjust.
7429 (i386_thread_added): Adjust.
7430
7431 2010-08-24 Pedro Alves <pedro@codesourcery.com>
7432
7433 * linux-low.h (linux_thread_area): Delete declaration.
7434
7435 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
7436
7437 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
7438 after its termination.
7439
7440 2010-08-09 Pedro Alves <pedro@codesourcery.com>
7441
7442 * linux-low.c (gdb_wants_lwp_stopped): Delete.
7443 (gdb_wants_all_stopped): Delete.
7444 (linux_wait_1): Don't call them.
7445 * server.c (handle_v_cont): Tag all threads as want-stopped.
7446 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
7447 stopped as "client-wants-stopped".
7448
7449 2010-07-31 Pedro Alves <pedro@codesourcery.com>
7450
7451 * Makefile.in (signals_h): New.
7452 (server_h): Depend on it.
7453 (server.o): Don't depend on $(signals_def).
7454 (signals.o): Depend on $(signals_def).
7455
7456 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
7457
7458 * Makefile.in (signals_def): New.
7459 (server_h): Append include/gdb/signals.h and signals_def.
7460 (server.o): Append signals_def.
7461
7462 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
7463
7464 * server.c (handle_target_event): Use target_signal_to_host for
7465 resume_info.sig initialization.
7466 * target.h (struct thread_resume) <sig>: New comment.
7467
7468 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
7469
7470 * server.c (handle_query): strcpy() the returned string from paddress()
7471 instead of sprintf().
7472 * utils.c (paddress): Return phex_nz().
7473
7474 2010-07-07 Joel Brobecker <brobecker@adacore.com>
7475
7476 * server.c (handle_v_cont): Call mourn_inferior if process
7477 just exited.
7478 (myresume): Likewise.
7479
7480 2010-07-01 Pedro Alves <pedro@codesourcery.com>
7481
7482 Static tracepoints, and integration with UST.
7483
7484 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
7485 * mem-break.c (uninsert_all_breakpoints)
7486 (reinsert_all_breakpoints): New.
7487 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
7488 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
7489 (gdb_agent_ust_loaded, helper_thread_id)
7490 (gdb_agent_helper_thread_id): New macros.
7491 (struct ipa_sym_addresses): Add addr_ust_loaded,
7492 addr_helper_thread_id, addr_cmd_buf.
7493 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
7494 (in_process_agent_loaded_ust): New.
7495 (write_e_ust_not_loaded): New.
7496 (maybe_write_ipa_ust_not_loaded): New.
7497 (struct collect_static_trace_data_action): New.
7498 (enum tracepoint_type) <static_tracepoint>: New.
7499 (struct tracepoint) <handle>: Mention static tracepoints.
7500 (struct static_tracepoint_ctx): New.
7501 (CMD_BUF_SIZE): New.
7502 (add_tracepoint_action): Handle static tracepoint actions.
7503 (unprobe_marker_at): New.
7504 (clear_installed_tracepoints): Handle static tracepoints.
7505 (cmd_qtdp): Handle static tracepoints.
7506 (probe_marker_at): New.
7507 (cmd_qtstart): Handle static tracepoints.
7508 (response_tracepoint): Handle static tracepoints.
7509 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
7510 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
7511 (get_context_regcache): Handle static tracepoints.
7512 (do_action_at_tracepoint): Handle static tracepoint actions.
7513 (traceframe_find_block_type): Handle static trace data blocks.
7514 (traceframe_read_sdata): New.
7515 (download_tracepoints): Download static tracepoint actions.
7516 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
7517 (GDB_PROBE_NAME): New.
7518 (ust_ops): New.
7519 (GET_UST_SYM): New.
7520 (USTF): New.
7521 (dlsym_ust): New.
7522 (ust_marker_to_static_tracepoint): New.
7523 (gdb_probe): New.
7524 (collect_ust_data_at_tracepoint): New.
7525 (gdb_ust_probe): New.
7526 (UNIX_PATH_MAX, SOCK_DIR): New.
7527 (gdb_ust_connect_sync_socket): New.
7528 (resume_thread, stop_thread): New.
7529 (run_inferior_command): New.
7530 (init_named_socket): New.
7531 (gdb_ust_socket_init): New.
7532 (cstr_to_hexstr): New.
7533 (next_st): New.
7534 (first_marker, next_marker): New.
7535 (response_ust_marker): New.
7536 (cmd_qtfstm, cmd_qtsstm): New.
7537 (unprobe_marker_at, probe_marker_at): New.
7538 (cmd_qtstmat, gdb_ust_thread): New.
7539 (gdb_ust_init): New.
7540 (initialize_tracepoint_ftlib): Call gdb_ust_init.
7541 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
7542 (ST_REGENTRY): New.
7543 (x86_64_st_collect_regmap): New.
7544 (X86_64_NUM_ST_COLLECT_GREGS): New.
7545 (AMD64_RIP_REGNUM): New.
7546 (supply_static_tracepoint_registers): New.
7547 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
7548 (ST_REGENTRY): New.
7549 (i386_st_collect_regmap): New.
7550 (i386_NUM_ST_COLLECT_GREGS): New.
7551 (supply_static_tracepoint_registers): New.
7552 * server.c (handle_query): Handle qXfer:statictrace:read.
7553 <qSupported>: Report support for StaticTracepoints, and
7554 qXfer:statictrace:read features.
7555 * server.h (traceframe_read_sdata)
7556 (supply_static_tracepoint_registers): Declare.
7557 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
7558 (unpack_varlen_hex): Include in IPA build.
7559 * Makefile.in (ustlibs, ustinc): New.
7560 (IPA_OBJS): Add remote-utils-ipa.o.
7561 ($(IPA_LIB)): Link -ldl and -lpthread.
7562 (UST_CFLAGS): New.
7563 (IPAGENT_CFLAGS): Add UST_CFLAGS.
7564 * config.in, configure: Regenerate.
7565
7566 2010-06-20 Ian Lance Taylor <iant@google.com>
7567 Pedro Alves <pedro@codesourcery.com>
7568
7569 * linux-x86-low.c (always_true): Delete.
7570 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
7571 trying to fool the compiler with always_true.
7572
7573 2010-06-20 Pedro Alves <pedro@codesourcery.com>
7574
7575 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
7576 conditions in gdbserver.
7577
7578 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
7579
7580 * spu-low.c (spu_read_memory): Wrap around local store limit.
7581 (spu_write_memory): Likewise.
7582
7583 2010-06-15 Pedro Alves <pedro@codesourcery.com>
7584
7585 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
7586 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
7587 LONGEST uses.
7588 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
7589 uses.
7590 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
7591 uses with LONGEST uses.
7592
7593 2010-06-14 Stan Shebs <stan@codesourcery.com>
7594 Pedro Alves <pedro@codesourcery.com>
7595
7596 Bytecode compiler.
7597
7598 * linux-x86-low.c: Include limits.h.
7599 (add_insns): New.
7600 (always_true): New.
7601 (EMIT_ASM): New.
7602 (EMIT_ASM32): New.
7603 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
7604 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
7605 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
7606 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
7607 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
7608 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
7609 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
7610 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
7611 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
7612 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
7613 (amd64_emit_void_call_2): New.
7614 (amd64_emit_ops): New.
7615 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
7616 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
7617 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
7618 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
7619 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
7620 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
7621 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
7622 (i386_emit_call, i386_emit_reg, i386_emit_pop)
7623 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
7624 (i386_emit_stack_adjust, i386_emit_int_call_1)
7625 (i386_emit_void_call_2): New.
7626 (i386_emit_ops): New.
7627 (x86_emit_ops): New.
7628 (the_low_target): Install x86_emit_ops.
7629 * server.h (struct emit_ops): New.
7630 (get_raw_reg_func_addr): Declare.
7631 (current_insn_ptr, emit_error): Declare.
7632 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
7633 (set_trace_state_variable_value): New defines.
7634 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
7635 addr_get_trace_state_variable_value and
7636 addr_set_trace_state_variable_value.
7637 (symbol_list): New fields for get_raw_reg,
7638 get_trace_state_variable_value and set_trace_state_variable_value.
7639 (condfn): New typedef.
7640 (struct tracepoint): New field `compiled_cond'.
7641 (do_action_at_tracepoint): Clear compiled_cond.
7642 (get_trace_state_variable_value, set_trace_state_variable_value):
7643 Export in the IPA.
7644 (condition_true_at_tracepoint): If there's a compiled condition,
7645 run that.
7646 (current_insn_ptr, emit_error): New globals.
7647 (struct bytecode_address): New.
7648 (get_raw_reg_func_addr): New.
7649 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
7650 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
7651 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
7652 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
7653 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
7654 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
7655 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
7656 (compile_tracepoint_condition, compile_bytecodes): New.
7657 * target.h (emit_ops): Forward declare.
7658 (struct target_ops): New field emit_ops.
7659 (target_emit_ops): New.
7660 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
7661 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
7662 * linux-low.c (linux_emit_ops): New.
7663 (linux_target_ops): Install it.
7664 * linux-low.h (struct linux_target_ops): New field emit_ops.
7665
7666 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
7667
7668 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
7669 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
7670
7671 2010-06-01 Pedro Alves <pedro@codesourcery.com>
7672 Stan Shebs <stan@codesourcery.com>
7673
7674 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
7675 (all): Depend on $(extra_libraries).
7676 (install-only): Install the IPA.
7677 (IPA_OBJS, IPA_LIB): New.
7678 (clean): Remove the IPA lib.
7679 (IPAGENT_CFLAGS): New.
7680 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
7681 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
7682 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
7683 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
7684 * configure.ac: Check for atomic builtins support in the compiler.
7685 (IPA_DEPFILES, extra_libraries): Define.
7686 * configure.srv (ipa_obj): Add description.
7687 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
7688 (i[34567]86-*-linux*): Set ipa_obj.
7689 (x86_64-*-linux*): Set ipa_obj.
7690 * linux-low.c (stabilizing_threads): New.
7691 (supports_fast_tracepoints): New.
7692 (linux_detach): Stabilize threads before detaching.
7693 (handle_tracepoints): Handle internal tracing breakpoints. Assert
7694 the lwp is either not stabilizing, or is moving out of a jump pad.
7695 (linux_fast_tracepoint_collecting): New.
7696 (maybe_move_out_of_jump_pad): New.
7697 (enqueue_one_deferred_signal): New.
7698 (dequeue_one_deferred_signal): New.
7699 (linux_wait_for_event_1): If moving out of a jump pad, defer
7700 pending signals to later.
7701 (linux_stabilize_threads): New.
7702 (linux_wait_1): Check if threads need moving out of jump pads, and
7703 do it if so.
7704 (stuck_in_jump_pad_callback): New.
7705 (move_out_of_jump_pad_callback): New.
7706 (lwp_running): New.
7707 (linux_resume_one_lwp): Handle moving out of jump pads.
7708 (linux_set_resume_request): Dequeue deferred signals.
7709 (need_step_over_p): Also step over fast tracepoint jumps.
7710 (start_step_over): Also uninsert fast tracepoint jumps.
7711 (finish_step_over): Also reinsert fast tracepoint jumps.
7712 (linux_install_fast_tracepoint_jump): New.
7713 (linux_target_ops): Install linux_stabilize_threads and
7714 linux_install_fast_tracepoint_jump_pad.
7715 * linux-low.h (linux_target_ops) <get_thread_area,
7716 install_fast_tracepoint_jump_pad>: New fields.
7717 (struct lwp_info) <collecting_fast_tracepoint,
7718 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
7719 (linux_get_thread_area): Declare.
7720 * linux-x86-low.c (jump_insn): New.
7721 (x86_get_thread_area): New.
7722 (append_insns): New.
7723 (push_opcode): New.
7724 (amd64_install_fast_tracepoint_jump_pad): New.
7725 (i386_install_fast_tracepoint_jump_pad): New.
7726 (x86_install_fast_tracepoint_jump_pad): New.
7727 (the_low_target): Install x86_get_thread_area and
7728 x86_install_fast_tracepoint_jump_pad.
7729 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
7730 (struct fast_tracepoint_jump): New.
7731 (fast_tracepoint_jump_insn): New.
7732 (fast_tracepoint_jump_shadow): New.
7733 (find_fast_tracepoint_jump_at): New.
7734 (fast_tracepoint_jump_here): New.
7735 (delete_fast_tracepoint_jump): New.
7736 (set_fast_tracepoint_jump): New.
7737 (uninsert_fast_tracepoint_jumps_at): New.
7738 (reinsert_fast_tracepoint_jumps_at): New.
7739 (set_breakpoint_at): Use write_inferior_memory.
7740 (uninsert_raw_breakpoint): Use write_inferior_memory.
7741 (check_mem_read): Mask out fast tracepoint jumps.
7742 (check_mem_write): Mask out fast tracepoint jumps.
7743 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
7744 (set_fast_tracepoint_jump): Declare.
7745 (delete_fast_tracepoint_jump)
7746 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
7747 (reinsert_fast_tracepoint_jumps_at): Declare.
7748 * regcache.c: Don't compile many functions when building the
7749 in-process agent library.
7750 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
7751 the register buffer in the heap.
7752 (free_register_cache): If the register buffer isn't owned by the
7753 regcache, don't free it.
7754 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
7755 pre-existing register caches.
7756 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
7757 type.
7758 (convert_ascii_to_int): : Constify `from' parameter type.
7759 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
7760 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
7761 the needed buffer in-place.
7762 (relocate_instruction): New.
7763 * server.c (handle_query) <qSymbols>: If the target supports
7764 tracepoints, give it a chance of looking up symbols. Report
7765 support for fast tracepoints.
7766 (handle_status): Stabilize threads.
7767 (process_serial_event): Adjust.
7768 * server.h (struct fast_tracepoint_jump): Forward declare.
7769 (struct process_info) <fast_tracepoint_jumps>: New field.
7770 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
7771 (decode_X_packet, decode_M_packet): Adjust.
7772 (relocate_instruction): Declare.
7773 (in_process_agent_loaded): Declare.
7774 (tracepoint_look_up_symbols): Declare.
7775 (struct fast_tpoint_collect_status): Declare.
7776 (fast_tracepoint_collecting): Declare.
7777 (force_unlock_trace_buffer): Declare.
7778 (handle_tracepoint_bkpts): Declare.
7779 (initialize_low_tracepoint)
7780 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
7781 * target.h (struct target_ops) <stabilize_threads,
7782 install_fast_tracepoint_jump_pad>: New fields.
7783 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
7784 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
7785 [HAVE_STDINT_H]: Include stdint.h.
7786 (trace_debug_1): Rename to ...
7787 (trace_vdebug): ... this.
7788 (trace_debug): Rename to ...
7789 (trace_debug_1): ... this. Add `level' parameter.
7790 (trace_debug): New.
7791 (ATTR_USED, ATTR_NOINLINE): New.
7792 (IP_AGENT_EXPORT): New.
7793 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
7794 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
7795 (about_to_request_buffer_space, trace_buffer_is_full)
7796 (stopping_tracepoint, expr_eval_result, error_tracepoint)
7797 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
7798 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
7799 (traceframe_write_count, traceframes_created)
7800 (trace_state_variables)
7801 New renaming defines.
7802 (struct ipa_sym_addresses): New.
7803 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
7804 (symbol_list): New.
7805 (ipa_sym_addrs): New.
7806 (all_tracepoint_symbols_looked_up): New.
7807 (in_process_agent_loaded): New.
7808 (write_e_ipa_not_loaded): New.
7809 (maybe_write_ipa_not_loaded): New.
7810 (tracepoint_look_up_symbols): New.
7811 (debug_threads) [IN_PROCESS_AGENT]: New.
7812 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
7813 (UNKNOWN_SIDE_EFFECTS): New.
7814 (stop_tracing): New.
7815 (flush_trace_buffer): New.
7816 (stop_tracing_bkpt): New.
7817 (flush_trace_buffer_bkpt): New.
7818 (read_inferior_integer): New.
7819 (read_inferior_uinteger): New.
7820 (read_inferior_data_pointer): New.
7821 (write_inferior_data_pointer): New.
7822 (write_inferior_integer): New.
7823 (write_inferior_uinteger): New.
7824 (struct collect_static_trace_data_action): Delete.
7825 (enum tracepoint_type): New.
7826 (struct tracepoint) <type>: New field `type'.
7827 <actions_str, step_actions, step_actions_str>: Only include in
7828 GDBserver.
7829 <orig_size, obj_addr_on_target, adjusted_insn_addr>
7830 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
7831 (tracepoints): Use IP_AGENT_EXPORT.
7832 (last_tracepoint): Don't include in the IPA.
7833 (stopping_tracepoint): Use IP_AGENT_EXPORT.
7834 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
7835 (alloced_trace_state_variables): New.
7836 (trace_state_variables): Use IP_AGENT_EXPORT.
7837 (traceframe_t): Delete unused variable.
7838 (circular_trace_buffer): Don't include in the IPA.
7839 (trace_buffer_start): Delete.
7840 (struct trace_buffer_control): New.
7841 (trace_buffer_free): Delete.
7842 (struct ipa_trace_buffer_control): New.
7843 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
7844 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
7845 New.
7846 (trace_buffer_ctrl): New.
7847 (TRACE_BUFFER_CTRL_CURR): New.
7848 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
7849 Reimplement as macros.
7850 (trace_buffer_wrap): Delete.
7851 (traceframe_write_count, traceframe_read_count)
7852 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
7853 (struct tracepoint_hit_ctx) <type>: New field.
7854 (struct fast_tracepoint_ctx): New.
7855 (memory_barrier): New.
7856 (cmpxchg): New.
7857 (record_tracepoint_error): Update atomically in the IPA.
7858 (clear_inferior_trace_buffer): New.
7859 (about_to_request_buffer_space): New.
7860 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
7861 updating the same buffer.
7862 (add_tracepoint): Default the tracepoint's type to trap
7863 tracepoint, and orig_size to -1.
7864 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
7865 internal variables.
7866 (create_trace_state_variable): New parameter `gdb'. Handle it.
7867 (clear_installed_tracepoints): Clear fast tracepoint jumps.
7868 (cmd_qtdp): Handle fast tracepoints.
7869 (cmd_qtdv): Adjust.
7870 (max_jump_pad_size): New.
7871 (gdb_jump_pad_head): New.
7872 (get_jump_space_head): New.
7873 (claim_jump_space): New.
7874 (sort_tracepoints): New.
7875 (MAX_JUMP_SIZE): New.
7876 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
7877 IPA.
7878 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
7879 support. Upload fast traceframes, and delete internal IPA
7880 breakpoints.
7881 (stop_tracing_handler): New.
7882 (flush_trace_buffer_handler): New.
7883 (cmd_qtstop): Upload fast tracepoints.
7884 (response_tracepoint): Handle fast tracepoints.
7885 (tracepoint_finished_step): Upload fast traceframes. Set the
7886 tracepoint hit context's tracepoint type.
7887 (handle_tracepoint_bkpts): New.
7888 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
7889 type. Add comment about fast tracepoints.
7890 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
7891 non-existing action_str field.
7892 (get_context_regcache): Handle fast tracepoints.
7893 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
7894 to the regcache.
7895 (fast_tracepoint_from_jump_pad_address): New.
7896 (fast_tracepoint_from_ipa_tpoint_address): New.
7897 (collecting_t): New.
7898 (force_unlock_trace_buffer): New.
7899 (fast_tracepoint_collecting): New.
7900 (collecting): New.
7901 (gdb_collect): New.
7902 (write_inferior_data_ptr): New.
7903 (target_tp_heap): New.
7904 (target_malloc): New.
7905 (download_agent_expr): New.
7906 (UALIGN): New.
7907 (download_tracepoints): New.
7908 (download_trace_state_variables): New.
7909 (upload_fast_traceframes): New.
7910 (IPA_FIRST_TRACEFRAME): New.
7911 (IPA_NEXT_TRACEFRAME_1): New.
7912 (IPA_NEXT_TRACEFRAME): New.
7913 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
7914 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
7915 (gdb_jump_pad_buffer_end): New.
7916 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
7917 (initialize_tracepoint): Adjust.
7918 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
7919 buffer. Initialize the low module.
7920 * utils.c (PREFIX, TOOLNAME): New.
7921 (malloc_failure): Use PREFIX.
7922 (error): In the IPA, an error causes an exit.
7923 (fatal, warning): Use PREFIX.
7924 (internal_error): Use TOOLNAME.
7925 (NUMCELLS): Increase to 10.
7926 * configure, config.in: Regenerate.
7927
7928 2010-06-01 Pedro Alves <pedro@codesourcery.com>
7929
7930 * server.c (handle_query) <qSupported>: Do two passes over the
7931 qSupported string to avoid nesting strtok.
7932
7933 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7934
7935 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
7936 (CDEPS): New.
7937 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
7938 -Wl,--dynamic-list.
7939 * configure: Regenerate.
7940 * proc-service.list: New.
7941
7942 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7943
7944 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
7945 New comment.
7946
7947 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
7948
7949 * gdbreplay.c (remote_open): Check error return from socket() call by
7950 its equality to -1 not by it being negative.
7951 * remote-utils.c (remote_open): Likewise.
7952
7953 2010-05-23 Pedro Alves <pedro@codesourcery.com>
7954
7955 * config.h: Regenerate.
7956
7957 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
7958
7959 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
7960 doesn't provide PTRACE_GET_THREAD_AREA.
7961
7962 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
7963
7964 * linux-m68k-low.c: Include <asm/ptrace.h>
7965 (ps_get_thread_area): Implement.
7966
7967 2010-05-03 Doug Evans <dje@google.com>
7968
7969 * event-loop.c (struct callback_event): New struct.
7970 (callback_list): New global.
7971 (append_callback_event, delete_callback_event): New functions.
7972 (process_callback): New function.
7973 (start_event_loop): Call it.
7974 * remote-utils.c (NOT_SCHEDULED): Define.
7975 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
7976 moved out of readchar.
7977 (readchar): Rewrite. Call reschedule before returning.
7978 (reset_readchar): New function.
7979 (remote_close): Call it.
7980 (process_remaining, reschedule): New functions.
7981 * server.h (callback_handler_func): New typedef.
7982 (append_callback_event, delete_callback_event): Declare.
7983
7984 2010-05-03 Pedro Alves <pedro@codesourcery.com>
7985
7986 * proc-service.c (ps_pglobal_lookup): Use
7987 thread_db_look_up_one_symbol.
7988 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
7989 parameter. Use it instead of all_symbols_looked_up.
7990 * server.h (struct process_info) <all_symbols_looked_up>: Delete
7991 field.
7992 (all_symbols_looked_up): Don't declare.
7993 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
7994 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
7995 field.
7996 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
7997 Set all_symbols_looked_up here.
7998 (thread_db_look_up_one_symbol): New.
7999 (thread_db_get_tls_address): Adjust.
8000 (thread_db_load_search, try_thread_db_load_1): Always allocate the
8001 thread_db object on the heap, and tentatively set it in the
8002 process structure.
8003 (thread_db_init): Don't set all_symbols_looked_up here.
8004 * linux-low.h (thread_db_look_up_one_symbol): Declare.
8005
8006 2010-05-03 Pedro Alves <pedro@codesourcery.com>
8007
8008 * linux-low.c (linux_kill, linux_detach): Adjust.
8009 (status_pending_p_callback): Remove redundant statement. Check
8010 for !TARGET_WAITIKIND_IGNORE, instead of
8011 TARGET_WAITKIND_STOPPED.
8012 (handle_tracepoints): Make sure LWP is locked. Adjust.
8013 (linux_wait_for_event_1): Adjust.
8014 (linux_cancel_breakpoints): New.
8015 (unsuspend_one_lwp): New.
8016 (unsuspend_all_lwps): New.
8017 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
8018 (send_sigstop_callback): Change return type to int, add new
8019 `except' parameter and handle it.
8020 (suspend_and_send_sigstop_callback): New.
8021 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
8022 pass them down. If SUSPEND, also increment the lwp's suspend
8023 count.
8024 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
8025 (need_step_over_p): Don't consider suspended LWPs.
8026 (start_step_over): Adjust.
8027 (proceed_one_lwp): Change return type to int, add new `except'
8028 parameter and handle it.
8029 (unsuspend_and_proceed_one_lwp): New.
8030 (proceed_all_lwps): Use find_inferior instead of
8031 for_each_inferior.
8032 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
8033 also decrement the suspend count of LWPs. Pass `except' down,
8034 instead of hacking its suspend count.
8035 (linux_pause_all): Add `freeze' parameter. Adjust.
8036 (linux_unpause_all): New.
8037 (linux_target_ops): Install linux_unpause_all.
8038 * server.c (handle_status): Adjust.
8039 * target.h (struct target_ops): New fields `unpause_all' and
8040 `cancel_breakpoints'. Add new parameter to `pause_all'.
8041 (pause_all): Add new `freeze' parameter.
8042 (unpause_all): New.
8043 (cancel_breakpoints): New.
8044 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
8045 cancel breakpoints.
8046 (cmd_qtstart): Pause threads.
8047 (stop_tracing): Pause threads, and cancel breakpoints.
8048 * win32-low.c (win32_target_ops): Adjust.
8049
8050 2010-05-03 Pedro Alves <pedro@codesourcery.com>
8051
8052 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
8053 the inferior right away from here...
8054 (linux_wait_1): ... to here, and adjust to check the thread's
8055 last_resume_kind instead of the lwp's step or stop_expected flags.
8056
8057 2010-05-02 Pedro Alves <pedro@codesourcery.com>
8058
8059 * README: Use consistent `GDB' and `GDBserver' spellings.
8060
8061 2010-05-02 Pedro Alves <pedro@codesourcery.com>
8062
8063 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
8064 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
8065 (linux_detach_one_lwp): Assume the lwp is stopped.
8066 (any_thread_of): Delete.
8067 (linux_detach): Stop all lwps here. Don't blindly delete all
8068 breakpoints.
8069 (delete_lwp_callback): New.
8070 (linux_mourn): Delete all lwps of the process that is gone.
8071 (linux_wait_1): Don't delete the last lwp of the process here.
8072 * mem-break.h (mark_breakpoints_out): Declare.
8073 * mem-break.c (mark_breakpoints_out): New.
8074 (free_all_breakpoints): Use it.
8075 * server.c (handle_target_event): If the process is gone, mark
8076 breakpoints out.
8077 * thread-db.c (struct thread_db) <create_bp>: New field.
8078 (thread_db_enable_reporting): Fix prototype. Store a thread event
8079 breakpoint reference in the thread_db struct.
8080 (thread_db_load_search): Clear the thread_db object.
8081 (try_thread_db_load_1): Ditto.
8082 (switch_to_process): New.
8083 (disable_thread_event_reporting): Use it.
8084 (remove_thread_event_breakpoints): New.
8085 (thread_db_detach, thread_db_mourn): Use it.
8086
8087 2010-05-01 Pedro Alves <pedro@codesourcery.com>
8088
8089 * linux-low.c (linux_enable_event_reporting): New.
8090 (linux_wait_for_event_1, handle_extended_wait): Use it.
8091
8092 2010-04-30 Pedro Alves <pedro@codesourcery.com>
8093
8094 * linux-low.c (linux_kill_one_lwp, linux_kill)
8095 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
8096 (send_sigstop): Take an lwp_info as parameter instead. Queue a
8097 SIGSTOP even if the LWP is stopped.
8098 (send_sigstop_callback): New.
8099 (stop_all_lwps): Use send_sigstop_callback instead.
8100 (linux_resume_one_thread): Adjust.
8101 (proceed_one_lwp): Still proceed an LWP that the client has
8102 requested to stop, if we haven't reported it as stopped yet. Make
8103 sure that LWPs the client want stopped, have a pending SIGSTOP.
8104
8105 2010-04-26 Doug Evans <dje@google.com>
8106
8107 * server.c (handle_general_set): Make static.
8108
8109 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
8110 Print received char after testing for error/eof instead of before.
8111 (input_interrupt): Tweak comment.
8112
8113 2010-04-23 Doug Evans <dje@google.com>
8114
8115 * server.c (start_inferior): Print inferior argv if --debug.
8116
8117 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
8118
8119 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
8120 * nto-x86-low.c: Include server.h
8121
8122 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
8123
8124 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
8125 be consistent with other sources of this directory.
8126 (init_registers_amd64): Correct name of source file of this function
8127 in the comment.
8128
8129 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8130
8131 * configure.srv (x86_64-*-mingw*): New configuration for Windows
8132 64-bit executables.
8133
8134 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8135
8136 * win32-i386-low.c: Add 64-bit support.
8137 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
8138 (init_registers_amd64): Declare.
8139 (mappings): Add 64-bit version of array.
8140 (init_windows_x86): New function.
8141 (the_low_target): Change init_arch field to init_windows_x86.
8142
8143 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8144
8145 * win32-low.c: Adapt to support also 64-bit architecture.
8146 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
8147 (get_image_name): Use SIZE_T type for local variable `done'.
8148 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
8149 (toolhelp_get_dll_name): Idem.
8150 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
8151 Use uintptr_t typecast to avoid warning.
8152 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
8153 (handle_exception): Use phex_nz to avoid warning.
8154 (win32_wait): Remove unused local variable `process'.
8155
8156 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8157
8158 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
8159 `amd64-avx.o'.
8160
8161 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
8162
8163 * configure.ac: Use `ws2_32' library for srv_mingw.
8164 * configure: Regenerate.
8165 * gdbreplay.c: Include winsock2.h instead of winsock.h.
8166 * remote-utils.c: Likewise.
8167
8168 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
8169
8170 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
8171 if __x86_64__ is defined.
8172
8173 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
8174
8175 * configure: Regenerate.
8176
8177 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
8178
8179 * server.c (handle_query): Handle 'qGetTIBAddr' query.
8180 * target.h (target_ops): New get_tib_address field.
8181 * win32-low.h (win32_thread_info): Add thread_local_base field.
8182 * win32-low.c (child_add_thread): Add tlb argument.
8183 Set thread_local_base field to TLB.
8184 (get_child_debug_event): Adapt to child_add_thread change.
8185 (win32_get_tib_address): New function.
8186 (win32_target_ops): Set get_tib_address field to
8187 win32_get_tib_address.
8188 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
8189
8190 2010-04-12 Pedro Alves <pedro@codesourcery.com>
8191
8192 * linux-low.c (linux_mourn): Also remove the process.
8193 * server.c (handle_target_event): Don't remove the process here.
8194 * nto-low.c (nto_mourn): New.
8195 (nto_target_ops): Install it.
8196 * spu-low.c (spu_mourn): New.
8197 (spu_target_ops): Install it.
8198 * win32-low.c (win32_mourn): New.
8199 (win32_target_ops): Install it.
8200
8201 2010-04-12 Pedro Alves <pedro@codesourcery.com>
8202
8203 * server.h (buffer_xml_printf): Remove redundant `;'.
8204
8205 2010-04-12 Pedro Alves <pedro@codesourcery.com>
8206
8207 * regcache.c (set_register_cache): Invalidate regcaches before
8208 changing the register cache layout.
8209 (regcache_invalidate_one): Allow a NULL regcache.
8210 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
8211 regcaches before changing the register cache layout or the target
8212 regsets.
8213
8214 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
8215
8216 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
8217 variable warning on Linux/x86-64.
8218
8219 2010-04-11 Pedro Alves <pedro@codesourcery.com>
8220
8221 GDBserver disconnected tracing support.
8222
8223 * linux-low.c (linux_remove_process): Delete.
8224 (add_lwp): Don't set last_resume_kind here.
8225 (linux_kill): Use `mourn'.
8226 (linux_detach): Use `thread_db_detach', and `mourn'.
8227 (linux_mourn): New.
8228 (linux_attach_lwp_1): Adjust comment.
8229 (linux_attach): last_resume_kind moved the thread_info; adjust.
8230 (status_pending_p_callback): Adjust.
8231 (linux_wait_for_event_1): Adjust.
8232 (count_events_callback, select_singlestep_lwp_callback)
8233 (select_event_lwp_callback, cancel_breakpoints_callback)
8234 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
8235 (proceed_one_lwp): Adjust.
8236 (linux_async): Add debug output.
8237 (linux_thread_stopped): New.
8238 (linux_pause_all): New.
8239 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
8240 linux_pause_all.
8241 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
8242 (thread_db_free): Delete declaration.
8243 (thread_db_detach, thread_db_mourn): Declare.
8244 * thread-db.c (thread_db_init): Use thread_db_mourn.
8245 (thread_db_free): Delete, split in two.
8246 (disable_thread_event_reporting): New.
8247 (thread_db_detach): New.
8248 (thread_db_mourn): New.
8249
8250 * server.h (struct thread_info) <last_resume_kind>: New field.
8251 <attached>: Add comment.
8252 <gdb_detached>: New field.
8253 (handler_func): Change return type to int.
8254 (handle_serial_event, handle_target_event): Ditto.
8255 (gdb_connected): Declare.
8256 (tracing): Delete.
8257 (disconnected_tracing): Declare.
8258 (stop_tracing): Declare.
8259
8260 * server.c (handle_query) <qSupported>: Report support for
8261 disconnected tracing.
8262 (queue_stop_reply_callback): Account for running threads.
8263 (gdb_wants_thread_stopped): New.
8264 (gdb_wants_all_threads_stopped): New.
8265 (gdb_reattached_process): New.
8266 (handle_status): Clear the `gdb_detached' flag of all processes.
8267 In all-stop, stop all threads.
8268 (main): Be sure to leave tfind mode. Handle disconnected tracing.
8269 (process_serial_event): If the remote connection breaks, or if an
8270 exit was forced with "monitor exit", force an event loop exit.
8271 Handle disconnected tracing on detach.
8272 (handle_serial_event): Adjust.
8273 (handle_target_event): If GDB isn't connected, forward events back
8274 to the inferior, unless the last process exited, in which case,
8275 exit gdbserver. Adjust interface.
8276
8277 * remote-utils.c (remote_open): Don't block in accept. Instead
8278 register an event loop source on the listen socket file
8279 descriptor. Refactor bits into ...
8280 (listen_desc): ... this new global.
8281 (gdb_connected): ... this new function.
8282 (enable_async_notification): ... this new function.
8283 (handle_accept_event): ... this new function.
8284 (remote_close): Clear remote_desc.
8285
8286 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
8287
8288 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
8289 New fields.
8290 (mourn_inferior): Define.
8291 (target_process_qsupported): Avoid the dangling else problem.
8292 (thread_stopped): Define.
8293 (pause_all): Define.
8294 (target_waitstatus_to_string): Declare.
8295 * target.c (target_waitstatus_to_string): New.
8296
8297 * tracepoint.c (tracing): Make extern.
8298 (disconnected_tracing): New.
8299 (stop_tracing): Make extern. Handle tracing stops due to GDB
8300 disconnecting.
8301 (cmd_qtdisconnected): New.
8302 (cmd_qtstatus): Report disconnected tracing status in trace reply.
8303 (handle_tracepoint_general_set): Handle QTDisconnected.
8304
8305 * event-loop.c (event_handler_func): Change return type to int.
8306 (process_event): Bail out if the event handler wants the event
8307 loop to stop.
8308 (handle_file_event): Ditto.
8309 (start_event_loop): Bail out if the event handler wants the event
8310 loop to stop.
8311
8312 * nto-low.c (nto_target_ops): Adjust.
8313 * spu-low.c (spu_wait): Don't remove the process here.
8314 (spu_target_ops): Adjust.
8315 * win32-low.c (win32_wait): Don't remove the process here.
8316 (win32_target_ops): Adjust.
8317
8318 2010-04-11 Pedro Alves <pedro@codesourcery.com>
8319
8320 * regcache.c (realloc_register_cache): Invalidate inferior's
8321 regcache before recreating it.
8322
8323 2010-04-09 Pedro Alves <pedro@codesourcery.com>
8324
8325 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
8326
8327 2010-04-09 Stan Shebs <stan@codesourcery.com>
8328 Pedro Alves <pedro@codesourcery.com>
8329
8330 * server.h (LONGEST): New.
8331 (struct thread_info) <while_stepping>: New field.
8332 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
8333 Declare.
8334 (initialize_tracepoint, handle_tracepoint_general_set)
8335 (handle_tracepoint_query, tracepoint_finished_step)
8336 (tracepoint_was_hit, release_while_stepping_state_list):
8337 (current_traceframe): Declare.
8338 * server.c (handle_general_set): Handle tracepoint packets.
8339 (read_memory): New.
8340 (write_memory): New.
8341 (handle_search_memory_1): Use read_memory.
8342 (handle_query): Report support for conditional tracepoints, trace
8343 state variables, and tracepoint sources. Handle tracepoint
8344 queries.
8345 (main): Initialize the tracepoints module.
8346 (process_serial_event): Handle traceframe reads/writes.
8347
8348 * linux-low.c (handle_tracepoints): New.
8349 (linux_wait_1): Call it.
8350 (linux_resume_one_lwp): Handle while-stepping.
8351 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
8352 (linux_target_ops): Install them.
8353 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
8354 New field.
8355 * linux-x86-low.c (x86_supports_tracepoints): New.
8356 (the_low_target). Install it.
8357
8358 * mem-break.h (delete_breakpoint): Declare.
8359 * mem-break.c (delete_breakpoint): Make external.
8360
8361 * target.h (struct target_ops): Add `supports_tracepoints',
8362 `read_pc', and `write_pc' fields.
8363 (target_supports_tracepoints): Define.
8364 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
8365 (phex_nz): New.
8366
8367 * regcache.h (struct regcache) <registers_owned>: New field.
8368 (init_register_cache, regcache_cpy): Declare.
8369 (regcache_read_pc, regcache_write_pc): Declare.
8370 (register_cache_size): Declare.
8371 (supply_regblock): Declare.
8372 * regcache.c (init_register_cache): New.
8373 (new_register_cache): Use it.
8374 (regcache_cpy): New.
8375 (register_cache_size): New.
8376 (supply_regblock): New.
8377 (regcache_read_pc, regcache_write_pc): New.
8378
8379 * tracepoint.c: New.
8380
8381 * Makefile.in (OBS): Add tracepoint.o.
8382 (tracepoint.o): New rule.
8383
8384 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
8385
8386 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
8387 (i386-mmx.o): New.
8388 (i386-mmx.c): Likewise.
8389 (i386-mmx-linux.o): Likewise.
8390 (i386-mmx-linux.c): Likewise.
8391
8392 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
8393 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
8394 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
8395 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
8396
8397 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
8398 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
8399 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
8400
8401 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
8402
8403 * Makefile.in (clean): Updated.
8404 (i386-avx.o): New.
8405 (i386-avx.c): Likewise.
8406 (i386-avx-linux.o): Likewise.
8407 (i386-avx-linux.c): Likewise.
8408 (amd64-avx.o): Likewise.
8409 (amd64-avx.c): Likewise.
8410 (amd64-avx-linux.o): Likewise.
8411 (amd64-avx-linux.c): Likewise.
8412
8413 * configure.srv (srv_i386_regobj): Add i386-avx.o.
8414 (srv_i386_linux_regobj): Add i386-avx-linux.o.
8415 (srv_amd64_regobj): Add amd64-avx.o.
8416 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
8417 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
8418 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
8419 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
8420 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
8421 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
8422 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
8423
8424 * i387-fp.c: Include "i386-xstate.h".
8425 (i387_xsave): New.
8426 (i387_cache_to_xsave): Likewise.
8427 (i387_xsave_to_cache): Likewise.
8428 (x86_xcr0): Likewise.
8429
8430 * i387-fp.h (i387_cache_to_xsave): Likewise.
8431 (i387_xsave_to_cache): Likewise.
8432 (x86_xcr0): Likewise.
8433
8434 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
8435 * linux-crisv32-low.c (target_regsets): Likewise.
8436 * linux-m68k-low.c (target_regsets): Likewise.
8437 * linux-mips-low.c (target_regsets): Likewise.
8438 * linux-ppc-low.c (target_regsets): Likewise.
8439 * linux-s390-low.c (target_regsets): Likewise.
8440 * linux-sh-low.c (target_regsets): Likewise.
8441 * linux-sparc-low.c (target_regsets): Likewise.
8442 * linux-xtensa-low.c (target_regsets): Likewise.
8443
8444 * linux-low.c: Include <sys/uio.h>.
8445 (regsets_fetch_inferior_registers): Support nt_type.
8446 (regsets_store_inferior_registers): Likewise.
8447 (linux_process_qsupported): New.
8448 (linux_target_ops): Add linux_process_qsupported.
8449
8450 * linux-low.h (regset_info): Add nt_type.
8451 (linux_target_ops): Add process_qsupported.
8452
8453 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
8454 and <sys/uio.h>.
8455 (init_registers_i386_avx_linux): New.
8456 (init_registers_amd64_avx_linux): Likewise.
8457 (xmltarget_i386_linux_no_xml): Likewise.
8458 (xmltarget_amd64_linux_no_xml): Likewise.
8459 (PTRACE_GETREGSET): Likewise.
8460 (PTRACE_SETREGSET): Likewise.
8461 (x86_fill_xstateregset): Likewise.
8462 (x86_store_xstateregset): Likewise.
8463 (use_xml): Likewise.
8464 (x86_linux_update_xmltarget): Likewise.
8465 (x86_linux_process_qsupported): Likewise.
8466 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
8467 (x86_arch_setup): Don't call init_registers_amd64_linux nor
8468 init_registers_i386_linux here. Call
8469 x86_linux_update_xmltarget.
8470 (the_low_target): Add x86_linux_process_qsupported.
8471
8472 * server.c (handle_query): Call target_process_qsupported.
8473
8474 * target.h (target_ops): Add process_qsupported.
8475 (target_process_qsupported): New.
8476
8477 2010-04-03 Pedro Alves <pedro@codesourcery.com>
8478
8479 * inferiors.c (add_thread): Set last_status kind to
8480 TARGET_WAITKIND_IGNORE.
8481 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
8482 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
8483 (linux_wait_1): Move `thread' local definition to block that uses
8484 it. Don't NULL initialize `event_child'.
8485 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
8486 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
8487 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
8488
8489 2010-04-01 Pedro Alves <pedro@codesourcery.com>
8490
8491 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
8492 an extended waitstatus, or by a watchpoint.
8493 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
8494 thread was stepping or has been stopped by a watchpoint.
8495
8496 2010-04-01 Pedro Alves <pedro@codesourcery.com>
8497
8498 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
8499 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
8500 of another, then delete the previous, and validate all
8501 breakpoints.
8502 (validate_inserted_breakpoint): New.
8503 (delete_disabled_breakpoints): New.
8504 (validate_breakpoints): New.
8505 (check_mem_read): Validate breakpoints before trusting their
8506 shadow. Delete disabled breakpoints.
8507 (check_mem_write): Validate breakpoints before trusting they
8508 should be inserted. Delete disabled breakpoints.
8509 * mem-break.h (validate_breakpoints):
8510 * server.c (handle_query): Validate breakpoints when we see a
8511 qSymbol query.
8512
8513 2010-04-01 Pedro Alves <pedro@codesourcery.com>
8514
8515 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
8516 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
8517 if we could tell there's a GDB breakpoint at stop_pc.
8518 (need_step_over_p): Don't do a step over if we find a GDB
8519 breakpoint at the resume PC.
8520
8521 * mem-break.c (struct raw_breakpoint): New.
8522 (enum bkpt_type): New type `gdb_breakpoint'.
8523 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
8524 fields. New field `raw'.
8525 (find_raw_breakpoint_at): New.
8526 (set_raw_breakpoint_at): Handle refcounting. Create a raw
8527 breakpoint instead.
8528 (set_breakpoint_at): Adjust.
8529 (delete_raw_breakpoint): New.
8530 (release_breakpoint): New.
8531 (delete_breakpoint): Rename to...
8532 (delete_breakpoint_1): ... this. Add proc parameter. Use
8533 release_breakpoint. Return ENOENT.
8534 (delete_breakpoint): Reimplement.
8535 (find_breakpoint_at): Delete.
8536 (find_gdb_breakpoint_at): New.
8537 (delete_breakpoint_at): Delete.
8538 (set_gdb_breakpoint_at): New.
8539 (delete_gdb_breakpoint_at): New.
8540 (gdb_breakpoint_here): New.
8541 (set_reinsert_breakpoint): Use release_breakpoint.
8542 (uninsert_breakpoint): Rename to ...
8543 (uninsert_raw_breakpoint): ... this.
8544 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
8545 (reinsert_raw_breakpoint): Change parameter type to
8546 raw_breakpoint.
8547 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
8548 instead.
8549 (check_breakpoints): Adjust. Use release_breakpoint.
8550 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
8551 (breakpoint_inserted_here): Ditto.
8552 (check_mem_read): Adjust to iterate over raw breakpoints instead.
8553 Don't trust the breakpoint's shadow if it is not inserted.
8554 (check_mem_write): Adjust to iterate over raw breakpoints instead.
8555 (delete_all_breakpoints): Adjust.
8556 (free_all_breakpoints): Mark all breakpoints as uninserted, and
8557 use delete_breakpoint_1.
8558
8559 * mem-break.h (breakpoints_supported): Delete declaration.
8560 (set_gdb_breakpoint_at): Declare.
8561 (gdb_breakpoint_here): Declare.
8562 (delete_breakpoint_at): Delete.
8563 (delete_gdb_breakpoint_at): Declare.
8564
8565 * server.h (struct raw_breakpoint): Forward declare.
8566 (struct process_info): New field `raw_breakpoints'.
8567
8568 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
8569 breakpoints.
8570
8571 2010-03-24 Pedro Alves <pedro@codesourcery.com>
8572
8573 * linux-low.c (status_pending_p_callback): Fix comment.
8574 (linux_wait_for_event_1): Move most of the internal breakpoint
8575 handling from here...
8576 (linux_wait_1): ... to here.
8577 (count_events_callback): New.
8578 (select_singlestep_lwp_callback): New.
8579 (select_event_lwp_callback): New.
8580 (cancel_breakpoints_callback): New.
8581 (select_event_lwp): New.
8582 (linux_wait_1): Simplify internal breakpoint handling. Give equal
8583 priority to all LWPs that have had events that should be reported
8584 to the client. Cancel breakpoints when about to reporting the
8585 event to the client, not while stopping lwps. No longer cancel
8586 finished single-steps here.
8587 (cancel_finished_single_step): Delete.
8588 (cancel_finished_single_steps): Delete.
8589
8590 2010-03-24 Pedro Alves <pedro@codesourcery.com>
8591
8592 * mem-break.c (enum bkpt_type): New.
8593 (struct breakpoint): New field `type'.
8594 (set_breakpoint_at): Change return type to struct breakpoint
8595 pointer. Set type to `other_breakpoint' by default.
8596 (delete_breakpoint): Rewrite, supporting more than one breakpoint
8597 in the breakpoint list.
8598 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
8599 (reinsert_breakpoint): Rename to ...
8600 (reinsert_raw_breakpoint): ... this.
8601 (reinsert_breakpoints_at): Adjust.
8602 * mem-break.h (struct breakpoint): Declare.
8603 (set_breakpoint_at): Change return type to struct breakpoint
8604 pointer.
8605
8606 2010-03-24 Pedro Alves <pedro@codesourcery.com>
8607
8608 * server.c (handle_query): Assign, not compare.
8609
8610 2010-03-24 Pedro Alves <pedro@codesourcery.com>
8611
8612 Teach linux gdbserver to step-over-breakpoints.
8613
8614 * linux-low.c (can_hardware_single_step): New.
8615 (supports_breakpoints): New.
8616 (handle_extended_wait): If stopping threads, read the stop pc of
8617 the new cloned LWP.
8618 (get_pc): New.
8619 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
8620 low target doesn't support retrieving the PC.
8621 (add_lwp): Set last_resume_kind to resume_continue.
8622 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
8623 (linux_attach): Don't clear stop_expected. Set the lwp's
8624 last_resume_kind to resume_stop.
8625 (linux_detach_one_lwp): Don't check for removed breakpoints.
8626 (check_removed_breakpoint): Delete.
8627 (status_pending_p): Rename to ...
8628 (status_pending_p_callback): ... this. Don't check for removed
8629 breakpoints. Don't consider threads that are stopped from GDB's
8630 perspective.
8631 (linux_wait_for_lwp): Always read the stop_pc here.
8632 (cancel_breakpoint): New.
8633 (step_over_bkpt): New global.
8634 (linux_wait_for_event_1): Implement stepping over breakpoints.
8635 (gdb_wants_lwp_stopped): New.
8636 (gdb_wants_all_stopped): New.
8637 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
8638 single-step traps here. Store the thread's last reported target
8639 wait status.
8640 (send_sigstop): Don't clear stop_expected. Always set it,
8641 instead.
8642 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
8643 (cancel_finished_single_step): New.
8644 (cancel_finished_single_steps): New.
8645 (wait_for_sigstop): Don't cancel finished single-step traps here.
8646 (linux_resume_one_lwp): Don't check for removed breakpoints.
8647 Don't set `step' on non-hardware step archs.
8648 (linux_set_resume_request): Ignore resume_stop requests if already
8649 stopping or stopped. Set the lwp's last_resume_kind.
8650 (resume_status_pending_p): Don't check for removed breakpoints.
8651 (need_step_over_p): New.
8652 (start_step_over): New.
8653 (finish_step_over): New.
8654 (linux_resume_one_thread): Always queue a sigstop for resume_stop
8655 requests. Clear the thread's last reported target waitstatus.
8656 Don't use the `suspended' flag. Don't consider pending breakpoints.
8657 (linux_resume): Start a step-over if necessary.
8658 (proceed_one_lwp): New.
8659 (proceed_all_lwps): New.
8660 (unstop_all_lwps): New.
8661 * linux-low.h (struct lwp_info): Rewrite comment for the
8662 `suspended' flag. Add the `stop_pc' field. Delete the
8663 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
8664 Add `'last_resume_kind' and `need_step_over' fields.
8665 * inferiors.c (struct thread_info): Delete, moved elsewhere.
8666 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
8667 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
8668 (set_raw_breakpoint_at): New.
8669 (set_breakpoint_at): Rewrite to use it.
8670 (reinsert_breakpoint_handler): Delete.
8671 (set_reinsert_breakpoint): New.
8672 (reinsert_breakpoint_by_bp): Delete.
8673 (delete_reinsert_breakpoints): New.
8674 (uninsert_breakpoint): Rewrite.
8675 (uninsert_breakpoints_at): New.
8676 (reinsert_breakpoint): Rewrite.
8677 (reinsert_breakpoints_at): New.
8678 (check_breakpoints): Rewrite.
8679 (breakpoint_here): New.
8680 (breakpoint_inserted_here): New.
8681 (check_mem_read): Adjust.
8682 * mem-break.h (breakpoints_supported, breakpoint_here)
8683 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
8684 (reinsert_breakpoint_by_bp): Delete declaration.
8685 (delete_reinsert_breakpoints): Declare.
8686 (reinsert_breakpoint): Delete declaration.
8687 (reinsert_breakpoints_at): Declare.
8688 (uninsert_breakpoint): Delete declaration.
8689 (uninsert_breakpoints_at): Declare.
8690 (check_breakpoints): Adjust prototype.
8691 * server.h: Adjust include order.
8692 (struct thread_info): Declare here. Add a `last_status' field.
8693
8694 2010-03-23 Michael Snyder <msnyder@vmware.com>
8695
8696 * server.c (crc32): New function.
8697 (handle_query): Add handling for 'qCRC:' request.
8698
8699 2010-03-23 Pedro Alves <pedro@codesourcery.com>
8700
8701 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
8702 lwp had been stopped by a watchpoint.
8703
8704 2010-03-16 Pedro Alves <pedro@codesourcery.com>
8705
8706 * server.h (internal_error): Declare.
8707 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
8708 * utils.c (internal_error): New function.
8709
8710 2010-03-15 Andreas Schwab <schwab@redhat.com>
8711
8712 * configure.srv: Fix typo setting srv_regobj.
8713
8714 2010-03-15 Pedro Alves <pedro@codesourcery.com>
8715
8716 * linux-low.c (fetch_register): Avoid passing a non string literal
8717 format to `error'.
8718 (usr_store_inferior_registers): Ditto.
8719
8720 2010-03-14 Pedro Alves <pedro@codesourcery.com>
8721
8722 * linux-low.c (linux_write_memory): Bail out early if peeking
8723 memory failed.
8724
8725 2010-03-14 Pedro Alves <pedro@codesourcery.com>
8726
8727 * linux-low.h (struct lwp_info): New fields
8728 `stopped_by_watchpoint' and `stopped_data_address'.
8729 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
8730 here, and cache them in the lwp object.
8731 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
8732 directly.
8733 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
8734 field.
8735 (linux_stopped_by_watchpoint): Rewrite.
8736 (linux_stopped_data_address): Rewrite.
8737
8738 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
8739
8740 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
8741 switching the current inferior, not before.
8742
8743 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
8744
8745 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
8746 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
8747 i386-linux.c and amd64-linux.c.
8748 (reg-i386.o): Removed.
8749 (reg-i386.c): Likewise.
8750 (reg-i386-linux.o): Likewise.
8751 (reg-i386-linux.c): Likewise.
8752 (reg-x86-64.o): Likewise.
8753 (reg-x86-64.c): Likewise.
8754 (reg-x86-64-linux.o): Likewise.
8755 (reg-x86-64-linux.c): Likewise.
8756 (i386.o): New.
8757 (i386.c): Likewise.
8758 (i386-linux.o): Likewise.
8759 (i386-linux.c): Likewise.
8760 (amd64.o): Likewise.
8761 (amd64.c): Likewise.
8762 (amd64-linux.o): Likewise.
8763 (amd64-linux.c): Likewise.
8764
8765 * configure.srv (srv_i386_regobj): New.
8766 (srv_i386_linux_regobj): Likewise.
8767 (srv_amd64_regobj): Likewise.
8768 (srv_amd64_linux_regobj): Likewise.
8769 (srv_i386_32bit_xmlfiles): Likewise.
8770 (srv_i386_64bit_xmlfiles): Likewise.
8771 (srv_i386_xmlfiles): Likewise.
8772 (srv_amd64_xmlfiles): Likewise.
8773 (srv_i386_linux_xmlfiles): Likewise.
8774 (srv_amd64_linux_xmlfiles): Likewise.
8775 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
8776 srv_xmlfiles to $srv_i386_xmlfiles.
8777 (i[34567]86-*-mingw32ce*): Likewise.
8778 (i[34567]86-*-mingw*): Likewise.
8779 (i[34567]86-*-nto*): Likewise.
8780 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
8781 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
8782 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
8783 (x86_64-*-linux*): Likewise.
8784
8785 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
8786 (init_registers_amd64_linux): New.
8787 (x86_arch_setup): Replace init_registers_x86_64_linux with
8788 init_registers_amd64_linux.
8789
8790 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
8791
8792 * configure.ac: Check for libdl. If it is not available link against
8793 static libthread_db.
8794 * configure: Regenerate.
8795
8796 2010-02-22 Pedro Alves <pedro@codesourcery.com>
8797
8798 PR9605
8799
8800 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
8801 handing a read watchpoint.
8802 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
8803
8804 2010-02-12 Doug Evans <dje@google.com>
8805
8806 * linux-low.c (linux_supports_tracefork_flag): Document.
8807 (linux_look_up_symbols): Add comment.
8808
8809 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
8810
8811 * regcache.c (supply_register): Clear regcache if buf is NULL.
8812
8813 2010-02-02 Nicolas Roche <roche@sourceware.org>
8814 Joel Brobecker <brobecker@adacore.com>
8815
8816 * inferiors.c (find_inferior): Add function documentation.
8817 (unloaded_dll): Handle the case where the unloaded dll has not
8818 been previously registered in the dll list.
8819
8820 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
8821
8822 * linux-arm-low.c (thumb_breakpoint_len): Delete.
8823 (thumb2_breakpoint): New.
8824 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
8825
8826 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
8827
8828 * linux-low.c (get_stop_pc): Check for SIGTRAP.
8829 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
8830 breakpoints.
8831
8832 2010-01-21 Pedro Alves <pedro@codesourcery.com>
8833
8834 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
8835
8836 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
8837
8838 * linux-s390-low.c (s390_collect_ptrace_register)
8839 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
8840
8841 2010-01-21 Doug Evans <dje@google.com>
8842
8843 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
8844 (PTRACE_ARG4_TYPE): New macro.
8845 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
8846 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
8847 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
8848 (usr_store_inferior_registers): Ditto.
8849 (linux_read_memory, linux_write_memory): Ditto.
8850 (linux_test_for_tracefork): Ditto.
8851
8852 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
8853 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
8854
8855 2010-01-21 Pedro Alves <pedro@codesourcery.com>
8856
8857 * proc-service.c (ps_lgetregs): Don't refetch registers from the
8858 target.
8859
8860 2010-01-21 Pedro Alves <pedro@codesourcery.com>
8861
8862 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
8863 prototype to take a regcache. Adjust.
8864
8865 2010-01-20 Pedro Alves <pedro@codesourcery.com>
8866
8867 * regcache.h (struct thread_info): Forward declare.
8868 (struct regcache): New.
8869 (new_register_cache): Adjust prototype.
8870 (get_thread_regcache): Declare.
8871 (free_register_cache): Adjust prototype.
8872 (registers_to_string, registers_from_string): Ditto.
8873 (supply_register, supply_register_by_name, collect_register)
8874 (collect_register_as_string, collect_register_by_name): Ditto.
8875 * regcache.c (struct inferior_regcache_data): Delete.
8876 (get_regcache): Rename to ...
8877 (get_thread_regcache): ... this. Adjust. Switch inferior before
8878 fetching registers.
8879 (regcache_invalidate_one): Adjust.
8880 (regcache_invalidate): Fix prototype.
8881 (new_register_cache): Return the new register cache.
8882 (free_register_cache): Change prototype.
8883 (realloc_register_cache): Adjust.
8884 (registers_to_string): Change prototype to take a regcache. Adjust.
8885 (registers_from_string): Ditto.
8886 (register_data): Ditto.
8887 (supply_register): Ditto.
8888 (supply_register_by_name): Ditto.
8889 (collect_register): Ditto.
8890 (collect_register_as_string): Ditto.
8891 (collect_register_by_name): Ditto.
8892 * server.c (process_serial_event): Adjust.
8893 * linux-low.h (regset_fill_func, regset_store_func): Change
8894 prototype.
8895 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
8896 Change prototype.
8897 * linux-low.c (get_stop_pc): Adjust.
8898 (check_removed_breakpoint): Adjust.
8899 (linux_wait_for_event): Adjust.
8900 (linux_resume_one_lwp): Adjust.
8901 (fetch_register): Add regcache parameter. Adjust.
8902 (usr_store_inferior_registers): Ditto.
8903 (regsets_fetch_inferior_registers): Ditto.
8904 (regsets_store_inferior_registers): Ditto.
8905 (linux_fetch_registers, linux_store_registers): Ditto.
8906 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
8907 regcache. Adjust.
8908 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
8909 Ditto.
8910 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
8911 prototype to take a regcache.
8912 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
8913 * remote-utils.c (convert_ascii_to_int, outreg)
8914 (prepare_resume_reply): Change prototype to take a regcache.
8915 Adjust.
8916 * target.h (struct target_ops) <fetch_registers, store_registers>:
8917 Change prototype to take a regcache.
8918 (fetch_inferior_registers, store_inferior_registers): Change
8919 prototype to take a regcache. Adjust.
8920 * proc-service.c (ps_lgetregs): Adjust.
8921 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
8922 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
8923 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
8924 take a regcache. Adjust.
8925 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
8926 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
8927 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
8928 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
8929 * linux-cris-low.c (cris_get_pc, cris_set_pc)
8930 (cris_cannot_fetch_register):
8931 (cris_breakpoint_at): Change prototype to take a regcache.
8932 Adjust.
8933 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
8934 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
8935 to take a regcache. Adjust.
8936 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
8937 Adjust.
8938 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
8939 take a regcache. Adjust.
8940 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
8941 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
8942 (m68k_set_pc): Change prototype to take a regcache. Adjust.
8943 * linux-mips-low.c (mips_get_pc):
8944 (mips_set_pc): Change prototype to take a regcache. Adjust.
8945 (mips_reinsert_addr): Adjust.
8946 (mips_collect_register): Change prototype to take a regcache.
8947 Adjust.
8948 (mips_supply_register):
8949 (mips_collect_register_32bit, mips_supply_register_32bit)
8950 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
8951 (mips_store_fpregset): Ditto.
8952 * linux-ppc-low.c (ppc_supply_ptrace_register)
8953 (ppc_supply_ptrace_register): Ditto.
8954 (parse_spufs_run): Adjust.
8955 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
8956 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
8957 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
8958 take a regcache. Adjust.
8959 * linux-s390-low.c (s390_collect_ptrace_register)
8960 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
8961 (s390_set_pc): Change prototype to take a regcache. Adjust.
8962 (s390_arch_setup): Adjust.
8963 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
8964 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
8965 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
8966 (sparc_fill_gregset, sparc_store_gregset_from_stack)
8967 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
8968 regcache. Adjust.
8969 (sparc_breakpoint_at): Adjust.
8970 * linux-xtensa-low.c (xtensa_fill_gregset):
8971 (xtensa_store_gregset):
8972 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
8973 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
8974 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
8975 prototype to take a regcache. Adjust.
8976 * win32-arm-low.c (arm_fetch_inferior_register)
8977 (arm_store_inferior_register): Change prototype to take a
8978 regcache. Adjust.
8979 * win32-i386-low.c (i386_fetch_inferior_register)
8980 (i386_store_inferior_register): Change prototype to take a
8981 regcache. Adjust.
8982 * win32-low.c (child_fetch_inferior_registers)
8983 (child_store_inferior_registers): Change prototype to take a
8984 regcache. Adjust.
8985 (win32_wait): Adjust.
8986 (win32_fetch_inferior_registers): Change prototype to take a
8987 regcache. Adjust.
8988 (win32_store_inferior_registers): Adjust.
8989 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
8990 store_inferior_register>: Change prototype to take a regcache.
8991
8992 2010-01-20 Doug Evans <dje@google.com>
8993
8994 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
8995 #ifdef.
8996 (linux_wait_for_event1, linux_init_signals): Ditto.
8997 (W_STOPCODE): Provide definition if missing.
8998
8999 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
9000
9001 * linux-low.c (linux_core_of_thread): New.
9002 (compare_ints, show_process, list_threads): New.
9003 (linux_qxfer_osdata): Report threads and cores.
9004 (linux_target_op): Register linux_core_of_thread.
9005 * remote-utils.c (prepare_resume_reply): Report the core.
9006 (buffer_xml_printf): Support %d specifier.
9007 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
9008 New.
9009 (handle_query): Handle qXfer:threads. Announce availability
9010 thereof.
9011 * target.h (struct target_ops): New field core_of_thread.
9012
9013 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
9014
9015 * Makefile.in (clean): Remove new generated files.
9016 (reg-s390.o, reg-s390.c): Remove rules.
9017 (reg-s390x.o, reg-s390x.c): Likewise.
9018 (s390-linux32.o, s390-linux32.c): Add rules.
9019 (s390-linux64.o, s390-linux64.c): Likewise.
9020 (s390x-linux64.o, s390x-linux64.c): Likewise.
9021 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
9022 * linux-s390-low.c: Include <elf.h>.
9023 (HWCAP_S390_HIGH_GPRS): Define if undefined.
9024 (init_registers_s390): Remove prototype.
9025 (init_registers_s390x): Likewise.
9026 (init_registers_s390_linux32): Add prototype.
9027 (init_registers_s390_linux64): Likewise.
9028 (init_registers_s390x_linux64): Likewise.
9029 (s390_num_regs_3264): New define.
9030 (s390_regmap_3264): New global variable.
9031 (s390_cannot_fetch_register): Remove obsolete check.
9032 (s390_cannot_store_register): Likewise.
9033 (s390_collect_ptrace_register): Handle upper/lower register halves.
9034 (s390_supply_ptrace_register): Likewise.
9035 (s390_fill_gregset): Update to register number changes.
9036 (s390_get_hwcap): New routine.
9037 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
9038 Install appropriate regmap and register set.
9039
9040 2010-01-01 Joel Brobecker <brobecker@adacore.com>
9041
9042 * server.c (gdbserver_version): Update copyright year to 2010.
9043 * gdbreplay.c (gdbreplay_version): Likewise.
9044
9045 2009-12-28 Doug Evans <dje@google.com>
9046
9047 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
9048 elf/external.h. Include <elf.h> instead but only if necessary.
9049
9050 2009-12-28 Pedro Alves <pedro@codesourcery.com>
9051
9052 * linux-low.c (linux_remove_process): Remove `detaching'
9053 parameter. Don't release/detach from thread_db here.
9054 (linux_kill): Release/detach from thread_db here, ...
9055 (linux_detach): ... and here, before actually detaching.
9056 (linux_wait_1): ... and here, when a process exits.
9057 * thread-db.c (any_thread_of): New.
9058 (thread_db_free): Switch the current inferior to a thread of the
9059 passed in process.
9060
9061 2009-12-21 Doug Evans <dje@google.com>
9062
9063 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
9064
9065 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
9066 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
9067 warning ifndef __NR_tkill. Move setting of errno there too.
9068 Delete unnecessary resetting of errno after syscall.
9069 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
9070
9071 * configure.ac: Check for dladdr.
9072 * config.in: Regenerate.
9073 * configure: Regenerate.
9074 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
9075 (try_thread_db_load): Update.
9076
9077 * linux-low.c (my_waitpid): Delete unnecessary prototype.
9078
9079 2009-12-18 Doug Evans <dje@google.com>
9080
9081 * event-loop.c: Include unistd.h if it exists.
9082
9083 * linux-low.c (my_waitpid): Move definition away from being in
9084 between linux_tracefork_child/linux_test_for_tracefork.
9085
9086 * gdb_proc_service.h (psaddr_t): Fix type.
9087 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
9088 signature to match glibc.
9089
9090 2009-12-16 Doug Evans <dje@google.com>
9091
9092 * linux-low.c (linux_read_memory): Fix argument to read.
9093
9094 2009-11-26 Pedro Alves <pedro@codesourcery.com>
9095
9096 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
9097 events, don't leave current_inferior pointing at null.
9098
9099 2009-11-26 Pedro Alves <pedro@codesourcery.com>
9100
9101 * win32-low.c (LOG): Delete.
9102 (OUTMSG): Output to stderr.
9103 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
9104 on compile time LOG macro.
9105 (win32_wait): Fix debug output.
9106
9107 2009-11-26 Pedro Alves <pedro@codesourcery.com>
9108
9109 * win32-low.c (win32_add_one_solib): If the dll name is
9110 "ntdll.dll", prepend the system directory to the dll path.
9111
9112 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
9113
9114 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
9115
9116 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
9117 Vladimir Prus <vladimir@codesourcery.com>
9118
9119 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
9120 * configure.ac: Check for __mcoldfire__ and set
9121 gdb_cv_m68k_is_coldfire.
9122 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
9123 reg-cf.o and reg-m68k.o.
9124 * configure: Regenerated.
9125
9126 2009-11-16 Pedro Alves <pedro@codesourcery.com>
9127
9128 * linux-low.c (linux_remove_process): Add `detaching' parameter.
9129 Pass it to thread_db_free.
9130 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
9131 proper `detaching' argument to linux_remove_process.
9132 * linux-low.h (thread_db_free): Add `detaching' parameter.
9133 * thread-db.c (thread_db_init): Pass false as `detaching' argument
9134 to thread_db_free.
9135 (thread_db_free): Add `detaching' parameter. Only
9136 call td_ta_clear_event if detaching from process.
9137
9138 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
9139
9140 * thread-db.c (thread_db_free): Fix typo.
9141
9142 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
9143
9144 PR gdb/10838
9145 * thread-db.c (thread_db_free): Call td_ta_clear_event.
9146
9147 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
9148
9149 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
9150 with an i686 compiler.
9151 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
9152 needed.
9153 * configure: Rebuilt.
9154
9155 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
9156
9157 PR gdb/10783
9158
9159 * server.c (handle_search_memory_1): Correct read_addr initialization
9160 in loop for searching subsequent chunks.
9161
9162 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
9163
9164 * configure.ac: New --with-libthread-db option.
9165 * thread-db.c: Allow direct dependence on libthread_db.
9166 (thread_db_free): Adjust.
9167 * config.in: Regenerate.
9168 * configure: Likewise.
9169
9170 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
9171
9172 PR gdb/10757
9173 * thread-db.c (attach_thread): New function.
9174 (maybe_attach_thread): Return success/failure.
9175 (find_new_threads_callback): Adjust.
9176 (thread_db_find_new_threads): Loop until no new threads.
9177
9178 2009-10-13 Pedro Alves <pedro@codesourcery.com>
9179
9180 * proc-service.c (ps_lgetregs): Formatting.
9181
9182 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
9183
9184 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
9185 * configure.ac: Adjust.
9186 * linux-low.h (struct process_info_private): Move members to struct
9187 thread_db.
9188 (thread_db_free, thread_db_handle_monitor_command): New prototype.
9189 * linux-low.c (linux_remove_process): Adjust.
9190 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
9191 * server.c (handle_query): Move code ...
9192 (handle_monitor_command): ... here. New function.
9193 * target.h (struct target_ops): New member.
9194 * thread-db.c (struct thread_db): New.
9195 (libthread_db_search_path): New variable.
9196 (thread_db_create_event, thread_db_enable_reporting)
9197 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
9198 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
9199 (try_thread_db_load_1, dladdr_to_soname): New functions.
9200 (try_thread_db_load, thread_db_load_search): New functions.
9201 (thread_db_init): Search for libthread_db.
9202 (thread_db_free): New function.
9203 (thread_db_handle_monitor_command): Likewise.
9204 * config.in: Regenerate.
9205 * configure: Regenerate.
9206
9207 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
9208
9209 * spu-low.c (spu_kill): Wait for inferior to terminate.
9210 Call clear_inferiors.
9211 (spu_detach): Call clear_inferiors.
9212
9213 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9214
9215 * aclocal.m4: Regenerate.
9216 * config.in: Likewise.
9217 * configure: Likewise.
9218
9219 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9220
9221 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
9222 (parse_spufs_run): New function.
9223 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
9224 (ppc_breakpoint_at): Handle SPU breakpoints.
9225
9226 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9227
9228 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
9229 (SPUFS_MAGIC): Define.
9230 (spu_enumerate_spu_ids): New function.
9231 (linux_qxfer_spu): New function.
9232 (linux_target_ops): Install linux_qxfer_spu.
9233
9234 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9235
9236 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
9237 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
9238 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
9239 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
9240 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
9241 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
9242 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
9243 (init_registers_powerpc_cell32l): Add prototype.
9244 (init_registers_powerpc_cell64l): Likewise.
9245 (ppc_arch_setup): Detect Cell/B.E. architecture.
9246
9247 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9248
9249 * Makefile.in (datarootdir): New variable.
9250
9251 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
9252
9253 * linux-low.c (linux_write_memory): Update debugging output.
9254 * Makefile.in (clean): Add new descriptions.
9255 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
9256 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
9257 * configure.srv: Add new files for arm*-*-linux*.
9258 * linux-arm-low.c: Add new declarations.
9259 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
9260 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
9261 (HWCAP_VFPv3D16): New.
9262 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
9263 instead of __IWMMXT__.
9264 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
9265 (arm_arch_setup): New.
9266 (target_regsets): Remove #ifdef. Add VFP regset.
9267 (the_low_target): Use arm_arch_setup.
9268
9269 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
9270
9271 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
9272 the main thread again.
9273
9274 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
9275
9276 Adding Neutrino gdbserver.
9277 * configure: Regenerated.
9278 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
9279 * configure.srv (i[34567]86-*-nto*): New target.
9280 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
9281 * remote-utils.c [__QNX__]: Include sys/iomgr.h
9282 (nto_comctrl) [__QNX__]: New function.
9283 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
9284
9285 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
9286
9287 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
9288 srv_tgtobj.
9289
9290 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
9291 Pedro Alves <pedro@codesourcery.com>
9292
9293 * win32-i386-low.c (i386_get_thread_context): Handle systems that
9294 don't support CONTEXT_EXTENDED_REGISTERS.
9295 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
9296 (the_low_target): Install them.
9297 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
9298 failing with ERROR_PIPE_NOT_CONNECTED.
9299
9300 2009-06-30 Doug Evans <dje@google.com>
9301 Pierre Muller <muller@ics.u-strasbg.fr>
9302
9303 Add h/w watchpoint support to x86-linux, win32-i386.
9304 * Makefile.in (SFILES): Add i386-low.c
9305 (i386_low_h): Define.
9306 (i386-low.o): Add dependencies.
9307 (linux-x86-low.o): Add i386-low.h dependency.
9308 (win32-i386-low.o): Ditto.
9309 * i386-low.c: New file.
9310 * i386-low.h: New file.
9311 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
9312 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
9313 * linux-low.c (linux_add_process): Initialize arch_private.
9314 (linux_remove_process): Free arch_private.
9315 (add_lwp): Initialize arch_private.
9316 (delete_lwp): Free arch_private.
9317 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
9318 provided.
9319 * linux-low.h (process_info_private): New member arch_private.
9320 (lwp_info): New member arch_private.
9321 (linux_target_ops): New members new_process, new_thread,
9322 prepare_to_resume.
9323 (ptid_of): New macro.
9324 * linux-x86-low.c: Include stddef.h, i386-low.h.
9325 (arch_process_info): New struct.
9326 (arch_lwp_info): New struct.
9327 (x86_linux_dr_get, x86_linux_dr_set): New functions.
9328 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
9329 (i386_dr_low_get_status): New function.
9330 (x86_insert_point, x86_remove_point): New functions.
9331 (x86_stopped_by_watchpoint): New function.
9332 (x86_stopped_data_address): New function.
9333 (x86_linux_new_process, x86_linux_new_thread): New functions.
9334 (x86_linux_prepare_to_resume): New function.
9335 (the_low_target): Add entries for insert_point, remove_point,
9336 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
9337 prepare_to_resume.
9338 * server.c (debug_hw_points): New global.
9339 (monitor_show_help): Document set debug-hw-points.
9340 (handle_query): Process "set debug-hw-points".
9341 * server.h (debug_hw_points): Declare.
9342 (paddress): Declare.
9343 * utils.c (NUMCELLS, CELLSIZE): New macros.
9344 (get_sell, xsnprintf, paddress): New functions.
9345 * win32-arm-low.c (the_low_target): Add entries for insert_point,
9346 remove_point, stopped_by_watchpoint, stopped_data_address.
9347 * win32-i386-low.c: Include i386-low.h.
9348 (debug_reg_state): Replaces dr.
9349 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
9350 (i386_dr_low_get_status): New function.
9351 (i386_insert_point, i386_remove_point): New functions.
9352 (i386_stopped_by_watchpoint): New function.
9353 (i386_stopped_data_address): New function.
9354 (i386_initial_stuff): Update.
9355 (get_thread_context,set_thread_context,i386_thread_added): Update.
9356 (the_low_target): Add entries for insert_point,
9357 remove_point, stopped_by_watchpoint, stopped_data_address.
9358 * win32-low.c (win32_insert_watchpoint): New function.
9359 (win32_remove_watchpoint): New function.
9360 (win32_stopped_by_watchpoint): New function.
9361 (win32_stopped_data_address): New function.
9362 (win32_target_ops): Add entries for insert_watchpoint,
9363 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
9364 * win32-low.h (win32_target_ops): New members insert_point,
9365 remove_point, stopped_by_watchpoint, stopped_data_address.
9366
9367 2009-06-25 Pedro Alves <pedro@codesourcery.com>
9368
9369 * server.c (process_serial_event): Re-return unsupported, not
9370 error, if the type isn't recognized. Re-allow supporting only
9371 insert or remove packets. Also call require_running for
9372 breakpoints. Add missing break statement to default case. Tidy.
9373 * target.h (struct target_ops): Rename insert_watchpoint to
9374 insert_point, and remove_watchpoint to remove_point.
9375
9376 * linux-low.h (struct linux_target_ops): Likewise.
9377 * linux-low.c (linux_insert_watchpoint): Rename to ...
9378 (linux_insert_point): ... this. Adjust.
9379 (linux_remove_watchpoint): Rename to ...
9380 (linux_remove_point): ... this. Adjust.
9381 (linux_target_ops): Adjust.
9382 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
9383 (cris_insert_point): ... this.
9384 (cris_remove_watchpoint): Rename to ...
9385 (cris_remove_point): ... this.
9386 (the_low_target): Adjust.
9387
9388 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
9389
9390 * server.c (handle_v_kill): Pass signal_pid to
9391 kill_inferior if multi_process is zero.
9392
9393 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
9394
9395 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
9396 * target.h (target_ops): Comment for *_watchpoint to make it clear
9397 the functions can get types '0' and '1'.
9398
9399 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
9400
9401 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
9402 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
9403 * regcache.c (get_regcache): Likewise.
9404 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
9405 * win32-low.c (child_fetch_inferior_registers): Remove check for
9406 regno 0.
9407
9408 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
9409 Pedro Alves <pedro@codesourcery.com>
9410
9411 * target.h (struct target_ops) <supports_multi_process>: New
9412 callback.
9413 (target_supports_multi_process): New.
9414 * server.c (handle_query): Even if GDB reports support, only
9415 enable multi-process if the target also supports it. Report
9416 multi-process support only if the target backend supports it.
9417 * linux-low.c (linux_supports_multi_process): New function.
9418 (linux_target_ops): Install it as target_supports_multi_process
9419 callback.
9420
9421 2009-05-24 Doug Evans <dje@google.com>
9422
9423 Global renaming of find_thread_pid to find_thread_ptid.
9424 * server.h (find_thread_ptid): Renamed from find_thread_pid.
9425 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
9426 All callers updated.
9427
9428 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
9429 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
9430 directly.
9431
9432 * linux-low.c (get_stop_pc): Print pc if debug_threads.
9433 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
9434 (linux_resume_one_lwp): Ditto.
9435
9436 2009-05-23 Doug Evans <dje@google.com>
9437
9438 * linux-low.c (linux_resume_one_lwp): Change type of first arg
9439 from struct inferior_list_entry * to struct lwp_info *.
9440 All callers updated.
9441
9442 2009-05-13 Doug Evans <dje@google.com>
9443
9444 * linux-x86-low.c: Don't include assert.h.
9445 (x86_siginfo_fixup): Use fatal, not assert.
9446 (x86_arch_setup): Fix comment.
9447
9448 2009-05-12 Doug Evans <dje@google.com>
9449
9450 Biarch support for i386/amd64 gdbserver.
9451 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
9452 Add linux-x86-low.c.
9453 (linux-i386-low.o, linux-x86-64-low.o): Delete.
9454 (linux-x86-low.o): Add.
9455 * linux-x86-64-low.c: Delete.
9456 * linux-i386-low.c: Delete.
9457 * linux-x86-low.c: New file.
9458 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
9459 linux-x86-low.o.
9460 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
9461 linux-x86-low.o.
9462 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
9463 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
9464 (linux_child_pid_to_exec_file): New function.
9465 (elf_64_header_p, elf_64_file_p): New functions.
9466 (siginfo_fixup): New function.
9467 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
9468 give target a chance to convert layout.
9469 * linux-low.h (linux_target_ops): New member siginfo_fixup.
9470 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
9471
9472 2009-05-07 Doug Evans <dje@google.com>
9473
9474 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
9475 (regsets_store_inferior_registers): Ditto.
9476
9477 2009-05-06 Pedro Alves <pedro@codesourcery.com>
9478
9479 PR server/10048
9480
9481 * linux-low.c (must_set_ptrace_flags): Delete.
9482 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
9483 of the global.
9484 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
9485 `lwp->must_set_ptrace_flags' instead.
9486 (linux_wait_for_event_1): Set ptrace options here.
9487 (linux_wait_1): ... not here.
9488
9489 2009-04-30 Doug Evans <dje@google.com>
9490
9491 * inferiors.c (started_inferior_callback): New function.
9492 (attached_inferior_callback): New function.
9493 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
9494 * server.c (print_started_pid, print_attached_pid): New functions.
9495 (detach_or_kill_for_exit): New function.
9496 (main): Call it instead of for_each_inferior (kill_inferior_callback).
9497 * server.h (have_started_inferiors_p): Declare.
9498 (have_attached_inferiors_p): Declare.
9499
9500 * inferiors.c (remove_process): Fix memory leak, free process.
9501 * linux-low.c (linux_remove_process): New function.
9502 (linux_kill): Call it instead of remove_process.
9503 (linux_detach, linux_wait_1): Ditto.
9504
9505 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
9506
9507 * configure.srv: Add x86 Windows CE target.
9508
9509 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
9510
9511 * inferiors.c (get_thread_process): Make global.
9512 * server.h (get_thread_process): Add prototype.
9513 * thread-db.c (find_one_thread): Use get_thread_process
9514 instead of current_process.
9515 (thread_db_get_tls_address): Do not crash if called when
9516 thread layer is not yet initialized.
9517
9518 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
9519
9520 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
9521 * spu-low.c (current_tid): Rename to ...
9522 (current_ptid): ... this.
9523 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
9524 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
9525 ptid_get_lwp (current_ptid) instead of current_tid.
9526 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
9527 instead of current_tid. Use find_process_pid to verify pid
9528 argument is valid. Pass proper argument to remove_process.
9529 (spu_thread_alive): Compare current_ptid instead of current_tid.
9530 (spu_resume): Likewise.
9531
9532 2009-04-02 Pedro Alves <pedro@codesourcery.com>
9533
9534 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
9535 variable.
9536
9537 2009-04-01 Pedro Alves <pedro@codesourcery.com>
9538
9539 Implement the multiprocess extensions, and add linux multiprocess
9540 support.
9541
9542 * server.h (ULONGEST): Declare.
9543 (struct ptid, ptid_t): New.
9544 (minus_one_ptid, null_ptid): Declare.
9545 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
9546 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
9547 (struct inferior_list_entry): Change `id' type from unsigned from
9548 to ptid_t.
9549 (struct sym_cache, struct breakpoint, struct
9550 process_info_private): Forward declare.
9551 (struct process_info): Declare.
9552 (current_process): Declare.
9553 (all_processes): Declare.
9554 (initialize_inferiors): Declare.
9555 (add_thread): Adjust to use ptid_t.
9556 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
9557 (add_process, remove_process, find_thread_pid): Declare.
9558 (find_inferior_id): Adjust to use ptid_t.
9559 (cont_thread, general_thread, step_thread): Change type to ptid_t.
9560 (multi_process): Declare.
9561 (push_event): Adjust to use ptid_t.
9562 (read_ptid, write_ptid): Declare.
9563 (prepare_resume_reply): Adjust to use ptid_t.
9564 (clear_symbol_cache): Declare.
9565 * inferiors.c (all_processes): New.
9566 (null_ptid, minus_one_ptid): New.
9567 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
9568 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
9569 (add_thread): Change unsigned long to ptid. Remove gdb_id
9570 parameter. Adjust.
9571 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
9572 (gdb_id_to_thread): Rename to ...
9573 (find_thread_pid): ... this. Change unsigned long to ptid.
9574 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
9575 (loaded_dll, pull_pid_from_list): Adjust.
9576 (add_process, remove_process, find_process_pid)
9577 (get_thread_process, current_process, initialize_inferiors): New.
9578 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
9579 (struct target_waitstatus) <related_pid>: Ditto.
9580 (struct target_ops) <kill, detach>: Add `pid' argument. Change
9581 return type to int.
9582 (struct target_ops) <join>: Add `pid' argument.
9583 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
9584 (struct target_ops) <wait>: Add `ptid' field. Change return type
9585 to ptid.
9586 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
9587 (mywait): Add `ptid' argument. Change return type to ptid_t.
9588 (target_pid_to_str): Declare.
9589 * target.c (set_desired_inferior): Adjust to use ptids.
9590 (mywait): Add new `ptid' argument. Adjust.
9591 (target_pid_to_str): New.
9592 * mem-break.h (free_all_breakpoints): Declare.
9593 * mem-break.c (breakpoints): Delelete.
9594 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
9595 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
9596 to use per-process breakpoint list.
9597 (free_all_breakpoints): New.
9598 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
9599 (symbol_cache, all_symbols_looked_up): Delete.
9600 (hexchars): New.
9601 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
9602 read_ptid): New.
9603 (prepare_resume_reply): Change ptid argument's type from unsigned
9604 long to ptid_t. Adjust. Implement W;process and X;process.
9605 (free_sym_cache, clear_symbol_cache): New.
9606 (look_up_one_symbol): Adjust to per-process symbol cache. *
9607 * server.c (cont_thread, general_thread, step_thread): Change type
9608 to ptid_t.
9609 (attached): Delete.
9610 (multi_process): New.
9611 (last_ptid): Change type to ptid_t.
9612 (struct vstop_notif) <ptid>: Change type to ptid_t.
9613 (queue_stop_reply, push_event): Change `ptid' argument's type to
9614 ptid_t.
9615 (discard_queued_stop_replies): Add `pid' argument.
9616 (start_inferior): Adjust to use ptids. Adjust to mywait interface
9617 changes. Don't reference the `attached' global.
9618 (attach_inferior): Adjust to mywait interface changes.
9619 (handle_query): Adjust to use ptids. Parse GDB's qSupported
9620 features. Handle and report "multiprocess+". Handle
9621 "qAttached:PID".
9622 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
9623 changes.
9624 (handle_v_kill): New.
9625 (handle_v_stopped): Adjust to use target_pid_to_str.
9626 (handle_v_requests): Allow multiple attaches and runs when
9627 multiprocess extensions are in effect. Handle "vKill".
9628 (myresume): Adjust to use ptids.
9629 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
9630 (handle_status): Adjust to discard_queued_stop_replies interface
9631 change.
9632 (first_thread_of, kill_inferior_callback)
9633 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
9634 (main): Call initialize_inferiors. Adjust to use ptids, killing
9635 and detaching from all inferiors. Handle multiprocess packet
9636 variants.
9637 * linux-low.h: Include gdb_proc_service.h.
9638 (struct process_info_private): New.
9639 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
9640 <lwpid_of>: Use ptid_get_lwp.
9641 (get_lwp_thread): Adjust.
9642 (struct lwp_info): Add `dead' member.
9643 (find_lwp_pid): Declare.
9644 * linux-low.c (thread_db_active): Delete.
9645 (new_inferior): Adjust comment.
9646 (inferior_pid): Delete.
9647 (linux_add_process): New.
9648 (handle_extended_wait): Adjust.
9649 (add_lwp): Change unsigned long to ptid.
9650 (linux_create_inferior): Add process to processes table. Adjust
9651 to use ptids. Don't set new_inferior here.
9652 (linux_attach_lwp): Rename to ...
9653 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
9654 it. Adjust to use ptids.
9655 (linux_attach_lwp): New.
9656 (linux_attach): Add process to processes table. Don't set
9657 new_inferior here.
9658 (struct counter): New.
9659 (second_thread_of_pid_p, last_thread_of_process_p): New.
9660 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
9661 multiple processes.
9662 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
9663 processes. Remove process from process table.
9664 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
9665 to multiple processes.
9666 (any_thread_of): New.
9667 (linux_detach): Add `pid' argument, and handle it. Remove process
9668 from processes table.
9669 (linux_join): Add `pid' argument. Handle it.
9670 (linux_thread_alive): Change unsighed long argument to ptid_t.
9671 Consider dead lwps as not being alive.
9672 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
9673 threads we're not interested in.
9674 (same_lwp, find_lwp_pid): New.
9675 (linux_wait_for_lwp): Change `pid' argument's type from int to
9676 ptid_t. Adjust.
9677 (linux_wait_for_event): Rename to ...
9678 (linux_wait_for_event_1): ... this. Change `pid' argument's type
9679 from int to ptid_t. Adjust.
9680 (linux_wait_for_event): New.
9681 (linux_wait_1): Add `ptid' argument. Change return type to
9682 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
9683 that exit from the process table.
9684 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
9685 Adjust.
9686 (mark_lwp_dead): New.
9687 (wait_for_sigstop): Adjust to use ptids. If a process exits while
9688 stopping all threads, mark its main lwp as dead.
9689 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
9690 ptids.
9691 (fetch_register, usr_store_inferior_registers)
9692 (regsets_fetch_inferior_registers)
9693 (regsets_store_inferior_registers, linux_read_memory)
9694 (linux_write_memory): Inline `inferior_pid'.
9695 (linux_look_up_symbols): Adjust to use per-process
9696 `thread_db_active'.
9697 (linux_request_interrupt): Adjust to use ptids.
9698 (linux_read_auxv): Inline `inferior_pid'.
9699 (initialize_low): Don't reference thread_db_active.
9700 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
9701 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
9702 (ps_getpid): Return the pid of the current inferior.
9703 * thread-db.c (proc_handle, thread_agent): Delete.
9704 (thread_db_create_event, thread_db_enable_reporting): Adjust to
9705 per-process data.
9706 (find_one_thread): Change argument type to ptid_t. Adjust to
9707 per-process data.
9708 (maybe_attach_thread): Adjust to per-process data and ptids.
9709 (thread_db_find_new_threads): Ditto.
9710 (thread_db_init): Ditto.
9711 * spu-low.c (spu_create_inferior, spu_attach): Add process to
9712 processes table. Adjust to use ptids.
9713 (spu_kill, spu_detach): Adjust interface. Remove process from
9714 processes table.
9715 (spu_join, spu_thread_alive): Adjust interface.
9716 (spu_wait): Adjust interface. Remove process from processes
9717 table. Adjust to use ptids.
9718 * win32-low.c (current_inferior_tid): Delete.
9719 (current_inferior_ptid): New.
9720 (debug_event_ptid): New.
9721 (thread_rec): Take a ptid. Adjust.
9722 (child_add_thread): Add `pid' argument. Adjust to use ptids.
9723 (child_delete_thread): Ditto.
9724 (do_initial_child_stuff): Add `attached' argument. Add process to
9725 processes table.
9726 (child_fetch_inferior_registers, child_store_inferior_registers):
9727 Adjust.
9728 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
9729 (win32_attach): Pass 1 to do_initial_child_stuff.
9730 (win32_kill): Adjust interface. Remove process from processes
9731 table.
9732 (win32_detach): Ditto.
9733 (win32_join): Adjust interface.
9734 (win32_thread_alive): Take a ptid.
9735 (win32_resume): Adjust to use ptids.
9736 (get_child_debug_event): Ditto.
9737 (win32_wait): Adjust interface. Remove exiting process from
9738 processes table.
9739
9740 2009-04-01 Pedro Alves <pedro@codesourcery.com>
9741
9742 Non-stop mode support.
9743
9744 * server.h (non_stop): Declare.
9745 (gdb_client_data, handler_func): Declare.
9746 (delete_file_handler, add_file_handler, start_event_loop):
9747 Declare.
9748 (handle_serial_event, handle_target_event, push_event)
9749 (putpkt_notif): Declare.
9750 * target.h (enum resume_kind): New.
9751 (struct thread_resume): Replace `step' field by `kind' field.
9752 (TARGET_WNOHANG): Define.
9753 (struct target_ops) <wait>: Add `options' argument.
9754 <supports_non_stop, async, start_non_stop>: New fields.
9755 (target_supports_non_stop, target_async): New.
9756 (start_non_stop): Declare.
9757 (mywait): Add `options' argument.
9758 * target.c (mywait): Add `options' argument. Print child exit
9759 notifications here.
9760 (start_non_stop): New.
9761 * server.c (non_stop, own_buf, mem_buf): New globals.
9762 (struct vstop_notif): New.
9763 (notif_queue): New global.
9764 (queue_stop_reply, push_event, discard_queued_stop_replies)
9765 (send_next_stop_reply): New.
9766 (start_inferior): Adjust to use resume_kind. Adjust to mywait
9767 interface changes.
9768 (attach_inferior): In non-stop mode, don't wait for the target
9769 here.
9770 (handle_general_set): Handle QNonStop.
9771 (handle_query): When handling qC, return the current general
9772 thread, instead of the first thread of the list.
9773 (handle_query): If the backend supports non-stop mode, include
9774 QNonStop+ in the qSupported query response.
9775 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
9776 and non-stop mode.
9777 (handle_v_attach, handle_v_run): Handle non-stop mode.
9778 (handle_v_stopped): New.
9779 (handle_v_requests): Report support for vCont;t. Handle vStopped.
9780 (myresume): Adjust to use resume_kind. Handle non-stop.
9781 (queue_stop_reply_callback): New.
9782 (handle_status): Handle non-stop mode.
9783 (main): Clear non_stop flag on reconnection. Use the event-loop.
9784 Refactor serial protocol handling from here ...
9785 (process_serial_event): ... to this new function. When GDB
9786 selects any thread, select one here. In non-stop mode, wait until
9787 GDB acks all pending events before exiting.
9788 (handle_serial_event, handle_target_event): New.
9789 * remote-utils.c (remote_open): Install remote_desc in the event
9790 loop.
9791 (remote_close): Remove remote_desc from the event loop.
9792 (putpkt_binary): Rename to...
9793 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
9794 (putpkt_binary): New as wrapper around putpkt_binary_1.
9795 (putpkt_notif): New.
9796 (prepare_resume_reply): In non-stop mode, don't change the
9797 general_thread.
9798 * event-loop.c: New.
9799 * Makefile.in (OBJ): Add event-loop.o.
9800 (event-loop.o): New rule.
9801
9802 * linux-low.h (pid_of): Moved here.
9803 (lwpid_of): New.
9804 (get_lwp_thread): Use lwpid_of.
9805 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
9806 * linux-low.c (pid_of): Delete.
9807 (inferior_pid): Use lwpid_of.
9808 (linux_event_pipe): New.
9809 (target_is_async_p): New.
9810 (delete_lwp): New.
9811 (handle_extended_wait): Use lwpid_of.
9812 (add_lwp): Don't set lwpid field.
9813 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
9814 (linux_kill_one_lwp): If killing a running lwp, stop it first.
9815 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
9816 (linux_detach_one_lwp): If detaching from a running lwp, stop it
9817 first. Adjust to linux_wait_for_event interface changes. Use
9818 lwpid_of.
9819 (linux_detach): Don't delete the main lwp here.
9820 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
9821 (status_pending_p): Don't consider explicitly suspended lwps.
9822 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
9823 pointer. Add OPTIONS argument. Change return type to int. Use
9824 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
9825 (linux_wait_for_event): Take an integer pid instead of a lwp_info
9826 pointer. Add status pointer argument. Return a pid instead of a
9827 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
9828 changes. In non-stop mode, don't switch to a random thread.
9829 (linux_wait): Rename to...
9830 (linux_wait_1): ... this. Add target_options argument, and handle
9831 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
9832 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
9833 clean exit and signal exit code. Don't stop all threads in
9834 non-stop mode. In all-stop mode, only stop all threads when
9835 reporting a stop to GDB. Handle explicit thread stop requests.
9836 (async_file_flush, async_file_mark): New.
9837 (linux_wait): New.
9838 (send_sigstop): Use lwpid_of.
9839 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
9840 interface changes. In non-stop mode, don't switch to a random
9841 thread.
9842 (linux_resume_one_lwp): Use lwpid_of.
9843 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
9844 (linux_resume_one_thread): ... this. Handle resume_stop. In
9845 non-stop mode, don't look for pending flag in all threads.
9846 (resume_status_pending_p): Don't consider explicitly suspended
9847 threads.
9848 (my_waitpid): Reimplement. Emulate __WALL.
9849 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
9850 Use lwpid_of.
9851 (sigchld_handler, linux_supports_non_stop, linux_async)
9852 (linux_start_non_stop): New.
9853 (linux_target_ops): Register linux_supports_non_stop, linux_async
9854 and linux_start_non_stop.
9855 (initialize_low): Install SIGCHLD handler.
9856 * thread-db.c (thread_db_create_event, find_one_thread)
9857 (thread_db_get_tls_address): Use lwpid_of.
9858 * win32-low.c (win32_detach): Adjust to use resume_kind.
9859 (win32_wait): Add `options' argument.
9860 * spu-low.c (spu_resume): Adjust to use resume_kind.
9861 (spu_wait): Add `options' argument.
9862
9863 2009-04-01 Pedro Alves <pedro@codesourcery.com>
9864
9865 Decouple target code from remote protocol.
9866
9867 * target.h (enum target_waitkind): New.
9868 (struct target_waitstatus): New.
9869 (struct target_ops) <wait>: Return an unsigned long. Take a
9870 target_waitstatus pointer instead of a char pointer.
9871 (mywait): Likewise.
9872 * target.c (mywait): Change prototype to return an unsigned long.
9873 Take a target_waitstatus pointer instead of a char pointer. Adjust.
9874 * server.h (thread_from_wait, old_thread_from_wait): Delete
9875 declarations.
9876 (prepare_resume_reply): Change prototype to take a
9877 target_waitstatus.
9878 * server.c (thread_from_wait, old_thread_from_wait): Delete.
9879 (last_status, last_ptid): New.
9880 (start_inferior): Remove "statusptr" argument. Adjust. Return a
9881 pid instead of a signal.
9882 (attach_inferior): Remove "status" and "signal" parameters.
9883 Adjust.
9884 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
9885 not as an address.
9886 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
9887 (handle_v_requests, myresume): Remove "status" and "signal"
9888 parameters. Adjust.
9889 (handle_status): New.
9890 (main): Delete local `status'. Adjust.
9891 * remote-utils.c: Include target.h.
9892 (prepare_resume_reply): Change prototype to take a
9893 target_waitstatus. Adjust.
9894
9895 * linux-low.c (linux_wait): Adjust to new target_ops->wait
9896 interface.
9897 * spu-low.c (spu_wait): Adjust.
9898 * win32-low.c (enum target_waitkind, struct target_waitstatus):
9899 Delete.
9900 (win32_wait): Adjust.
9901
9902 2009-04-01 Pedro Alves <pedro@codesourcery.com>
9903
9904 * target.h (struct thread_resume): Delete leave_stopped member.
9905 (struct target_ops): Add a `n' argument to the `resume' callback.
9906 * server.c (start_inferior): Adjust.
9907 (handle_v_cont, myresume): Adjust.
9908 * linux-low.c (check_removed_breakpoint): Adjust to resume
9909 interface change, and to removed leave_stopped field.
9910 (resume_ptr): Delete.
9911 (struct thread_resume_array): New.
9912 (linux_set_resume_request): Add new `arg' parameter. Adjust to
9913 resume interface change.
9914 (linux_continue_one_thread, linux_queue_one_thread)
9915 (resume_status_pending_p): Check if the resume field is NULL
9916 instead of checking the leave_stopped member.
9917 (linux_resume): Adjust to the target resume interface change.
9918 * spu-low.c (spu_resume): Adjust to the target resume interface
9919 change.
9920 * win32-low.c (win32_detach, win32_resume): Ditto.
9921
9922 2009-04-01 Pedro Alves <pedro@codesourcery.com>
9923
9924 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
9925 flag.
9926 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
9927 pending.
9928 (linux_continue_one_thread): Only preserve the stepping flag if
9929 there's a pending breakpoint.
9930
9931 2009-03-31 Pedro Alves <pedro@codesourcery.com>
9932
9933 * server.c (main): After the inferior having exited, call
9934 remote_close before exiting gdbserver.
9935
9936 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
9937
9938 Fix size of FPSCR in Power 7 processors.
9939 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
9940 (PPC_FEATURE_HAS_DFP): New #define.
9941 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
9942 size of the FPSCR.
9943
9944 2009-03-23 Pedro Alves <pedro@codesourcery.com>
9945
9946 * server.c (handle_query) Whitespace and formatting.
9947
9948 2009-03-22 Pedro Alves <pedro@codesourcery.com>
9949
9950 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
9951 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
9952 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
9953 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
9954 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
9955 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
9956 Makefile.in, configure.ac: Fix whitespace throughout.
9957 * configure: Regenerate.
9958
9959 2009-03-22 Pedro Alves <pedro@codesourcery.com>
9960
9961 * inferiors.c (find_inferior): Make it safe for the callback
9962 function to delete the currently iterated inferior.
9963
9964 2009-03-22 Pedro Alves <pedro@codesourcery.com>
9965
9966 * Makefile.in (linuw_low_h): Move higher.
9967 (thread-db.o): Depend on $(linux_low_h).
9968
9969 2009-03-17 Pedro Alves <pedro@codesourcery.com>
9970
9971 Rename "process" to "lwp" throughout.
9972
9973 * linux-low.c (all_processes): Rename to...
9974 (all_lwps): ... this.
9975 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
9976 (add_process): Rename to ...
9977 (add_lwp): ... this. Adjust.
9978 (linux_create_inferior): Adjust.
9979 (linux_attach_lwp): Adjust.
9980 (linux_attach): Adjust.
9981 (linux_kill_one_process): Rename to ...
9982 (linux_kill_one_lwp): ... this. Adjust.
9983 (linux_kill): Adjust.
9984 (linux_detach_one_process): Rename to ...
9985 (linux_detach_one_lwp): ... this. Adjust.
9986 (linux_detach): Adjust.
9987 (check_removed_breakpoint): Adjust.
9988 (status_pending_p): Adjust.
9989 (linux_wait_for_process): Rename to ...
9990 (linux_wait_for_lwp): ... this. Adjust.
9991 (linux_wait_for_event): Adjust.
9992 (send_sigstop): Adjust.
9993 (wait_for_sigstop): Adjust.
9994 (stop_all_processes): Rename to ...
9995 (stop_all_lwps): ... this.
9996 (linux_resume_one_process): Rename to ...
9997 (linux_resume_one_lwp): ... this. Adjust.
9998 (linux_set_resume_request, linux_continue_one_thread)
9999 (linux_queue_one_thread, resume_status_pending_p)
10000 (usr_store_inferior_registers, regsets_store_inferior_registers)
10001 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
10002 Adjust.
10003 * linux-low.h (get_process): Rename to ...
10004 (get_lwp): ... this. Adjust.
10005 (get_thread_process): Rename to ...
10006 (get_thread_lwp): ... this. Adjust.
10007 (get_process_thread): Rename to ...
10008 (get_lwp_thread): ... this. Adjust.
10009 (struct process_info): Rename to ...
10010 (struct lwp_info): ... this.
10011 (all_processes): Rename to ...
10012 (all_lwps): ... this.
10013 * proc-service.c (ps_lgetregs): Adjust.
10014 * thread-db.c (thread_db_create_event, find_one_thread)
10015 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
10016
10017 2009-03-14 Pedro Alves <pedro@codesourcery.com>
10018
10019 * server.c (handle_query): Handle "qAttached".
10020
10021 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
10022
10023 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
10024 GPLv3, update license URL.
10025
10026 2009-03-01 Doug Evans <dje@google.com>
10027
10028 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
10029 (server_h): Add gdb_signals.h.
10030 (signals.o): Update.
10031 * server.h (target_signal_from_host,target_signal_to_host_p)
10032 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
10033
10034 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
10035
10036 * remote-utils.c (getpkt): Also generate remote-debug
10037 information if noack_mode is set.
10038
10039 2009-02-06 Pedro Alves <pedro@codesourcery.com>
10040
10041 * server.c (handle_query): Report qXfer:siginfo:read and
10042 qXfer:siginfo:write as supported and handle them.
10043 * target.h (struct target_ops) <qxfer_siginfo>: New field.
10044 * linux-low.c (linux_xfer_siginfo): New.
10045 (linux_target_ops): Set it.
10046
10047 2009-01-26 Pedro Alves <pedro@codesourcery.com>
10048
10049 * server.c (gdbserver_usage): Mention --remote-debug.
10050 (main): Accept '--remote-debug' switch.
10051
10052 2009-01-18 Doug Evans <dje@google.com>
10053
10054 * regcache.c (new_register_cache): No need to check result of xcalloc.
10055 * server.c (handle_search_memory): Back out calls to xmalloc,
10056 result is checked and error is returned to user upon failure.
10057 (handle_query): Ditto. Add more checks for result of malloc.
10058 (handle_v_cont): Check result of malloc, report error back to
10059 user upon failure.
10060 (handle_v_run): Ditto. Call freeargv.
10061 * server.h (freeargv): Declare.
10062 * utils.c (freeargv): New fn.
10063
10064 2009-01-15 Doug Evans <dje@google.com>
10065
10066 * gdbreplay.c (perror_with_name): Make arg const char *.
10067 * server.h (target_signal_to_name): Make return type const char *.
10068 * thread-db.c (thread_db_err_str): Make return type const char *.
10069 * utils.c (perror_with_name): Make arg const char *.
10070
10071 2009-01-14 Pedro Alves <pedro@codesourcery.com>
10072
10073 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
10074 when handling a EXIT_PROCESS_DEBUG_EVENT.
10075
10076 2009-01-06 Joel Brobecker <brobecker@adacore.com>
10077
10078 * gdbreplay.c (gdbreplay_version): Update copyright year.
10079 * server.c (gdbserver_version): Likewise.
10080
10081 2009-01-05 Doug Evans <dje@google.com>
10082
10083 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
10084 (handle_extended_wait): Improve comment.
10085
10086 2008-12-13 Doug Evans <dje@google.com>
10087
10088 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
10089 * server.h (ATTR_MALLOC): New macro.
10090 (xmalloc,xcalloc,xstrdup): Declare.
10091 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
10092 * inferiors.c: Ditto.
10093 * linux-low.c: Ditto.
10094 * mem-break.c: Ditto.
10095 * regcache.c: Ditto.
10096 * remote-utils.c: Ditto.
10097 * server.c: Ditto.
10098 * target.c: Ditto.
10099 * win32-low.c: Ditto.
10100
10101 2008-12-12 Doug Evans <dje@google.com>
10102
10103 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
10104 in debugging printf.
10105
10106 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
10107
10108 2008-12-09 Doug Evans <dje@google.com>
10109
10110 * linux-low.h (struct process_info): Delete member tid, unused.
10111 * thread-db.c (find_one_thread): Update.
10112 (maybe_attach_thread): Update.
10113
10114 2008-12-02 Pedro Alves <pedro@codesourcery.com>
10115
10116 * target.h (struct target_ops): Add qxfer_osdata member.
10117 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
10118 and dirent.h.
10119 (linux_qxfer_osdata): New functions.
10120 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
10121 callback.
10122 * server.c (handle_query): Handle "qXfer:osdata:read:".
10123 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
10124 (buffer_xml_printf): New functions.
10125 * server.h (struct buffer): New.
10126 (buffer_grow_str, buffer_grow_str0): New macros.
10127 (buffer_grow, buffer_free, buffer_init, buffer_finish)
10128 (buffer_xml_printf): Declare.
10129
10130 2008-11-24 Doug Evans <dje@google.com>
10131
10132 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
10133
10134 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
10135
10136 * server.c (handle_v_run): Always use the supplied argument list.
10137
10138 2008-11-19 Bob Wilson <bob.wilson@acm.org>
10139
10140 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
10141 (xtensa_regmap_table): Add entry for scompare1.
10142
10143 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
10144
10145 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
10146 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
10147 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
10148 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
10149 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
10150 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
10151 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
10152 XML target descriptions.
10153 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
10154 when inferior is running on an ISA 2.05 or later processor. Add
10155 special case to return offset for full 64-bit slot of FPSCR when
10156 in 32-bits.
10157
10158 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
10159
10160 * Makefile.in (SFILES, clean): Added sparc64 files.
10161 (reg-sparc64.o, reg-sparc64.c): New.
10162 * configure.srv (sparc*-*-linux*): New configuration.
10163 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
10164 syscall arguments for SPARC.
10165 (regsets_store_inferior_registers): Likewise.
10166 * linux-sparc-low.c: New file.
10167
10168 2008-10-21 Doug Evans <dje@google.com>
10169
10170 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
10171 (READLINE_DIR,READLINE_DEP): Delete.
10172 (INTERNAL_CFLAGS): Update.
10173 (LINTFLAGS): Update.
10174
10175 2008-10-10 Pedro Alves <pedro@codesourcery.com>
10176
10177 * server.c (handle_v_run): If GDB didn't specify an argv, use the
10178 whole argv from the last run, not just argv[0].
10179
10180 2008-09-08 Pedro Alves <pedro@codesourcery.com>
10181
10182 * regcache.c (new_register_cache): Return NULL if the register
10183 cache size isn't known yet.
10184 (free_register_cache): Avoid dereferencing a NULL regcache.
10185
10186 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
10187
10188 * configure.srv: Merge MIPS and MIPS64.
10189
10190 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
10191
10192 * Makefile.in (uninstall): Apply $(EXEEXT) too.
10193
10194 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
10195
10196 * Makefile.in: Add required vsx dependencies.
10197
10198 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
10199 Declare init_registers_powerpc_vsx32l.
10200 Declare init_registers_powerpc_vsx64l.
10201 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
10202 (ppc_arch_setup): Check for VSX in hwcap.
10203 (ppc_fill_vsxregset): New function.
10204 (ppc_store_vsxregset): New function.
10205 Add new VSX entry in regset_info target_regsets.
10206
10207 * configure.srv: Add new VSX dependencies.
10208
10209 2008-08-12 Pedro Alves <pedro@codesourcery.com>
10210
10211 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
10212 (remote_open): Set or clear transport_is_reliable.
10213 (putpkt_binary): Don't expect acks in noack mode.
10214 (getpkt): Don't send ack/nac in noack mode.
10215 * server.c (handle_general_set): Handle QStartNoAckMode.
10216 (handle_query): If connected by tcp pass QStartNoAckMode+ in
10217 qSupported.
10218 (main): Reset noack_mode on every connection.
10219 * server.h (noack_mode): Declare.
10220
10221 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
10222
10223 * Makefile.in (GDBREPLAY_OBS): New variable.
10224 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
10225
10226 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
10227 Daniel Jacobowitz <dan@codesourcery.com>
10228
10229 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
10230 (usr_store_inferior_registers): Likewise.
10231 (regsets_store_inferior_registers): Likewise.
10232
10233 2008-07-31 Rolf Jansen <rj@surtec.com>
10234 Pedro Alves <pedro@codesourcery.com>
10235
10236 * configure.ac: Check for memmem declaration.
10237 * server.c [HAVE_MALLOC_H]: Include malloc.h.
10238 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
10239 (disable_packet_qfThreadInfo): Unconditionally compile.
10240 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
10241 * configure, config.in: Regenerate.
10242
10243 2008-07-28 Doug Kwan <dougkwan@google.com>
10244
10245 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
10246 (linux_write_memory): Remove declaration of errno.
10247
10248 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
10249
10250 * linux-low.c (handle_extended_wait): Do not use "status"
10251 variable uninitialized.
10252
10253 2008-07-07 Pedro Alves <pedro@codesourcery.com>
10254
10255 * server.c (handle_v_attach): Inhibit reporting dll changes.
10256
10257 2008-06-27 Pedro Alves <pedro@codesourcery.com>
10258
10259 * remote-utils.c (prepare_resume_reply): If requested, don't
10260 output "thread:TID" in the T stop reply.
10261
10262 * server.c (disable_packet_vCont, disable_packet_Tthread)
10263 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
10264 (handle_query): If requested, disable support for qC, qfThreadInfo
10265 and qsThreadInfo.
10266 (handle_v_requests): If requested, disable support for vCont.
10267 (gdbserver_show_disableable): New.
10268 (main): Handle --disable-packet and --disable-packet=LIST.
10269
10270 * server.h (disable_packet_vCont, disable_packet_Tthread)
10271 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
10272
10273 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
10274
10275 * server.c (gdbserver_usage): Mention --version.
10276
10277 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
10278
10279 * Makefile.in (gdbreplay.o): New rule.
10280
10281 2008-06-06 Joseph Myers <joseph@codesourcery.com>
10282
10283 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
10284 message, not gdbserver.
10285
10286 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
10287 Nathan Sidwell <nathan@codesourcery.com>
10288 Joseph Myers <joseph@codesourcery.com>
10289
10290 * acinclude.m4: Include ../../config/acx.m4.
10291 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
10292 * configure, config.in: Regenerate.
10293 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
10294 * server.c (gdbserver_version): Print PKGVERSION.
10295 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
10296 (main): Adjust gdbserver_usage calls.
10297 * gdbreplay.c (version, host_name): Add declarations.
10298 (gdbreplay_version, gdbreplay_usage): New.
10299 (main): Accept --version and --help options.
10300
10301 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
10302
10303 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
10304 (arm_breakpoint_at): Handle Thumb.
10305 (the_low_target): Add comment.
10306
10307 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
10308
10309 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
10310
10311 2008-05-09 Doug Evans <dje@google.com>
10312
10313 * server.h (decode_search_memory_packet): Declare.
10314 * remote-utils.c (decode_search_memory_packet): New fn.
10315 * server.c (handle_search_memory_1): New fn.
10316 (handle_search_memory): New fn.
10317 (handle_query): Process qSearch:memory packets.
10318
10319 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
10320
10321 * regcache.c (registers_length): Remove.
10322 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
10323 full register packet.
10324 * regcache.h (registers_length): Remove prototype.
10325 * server.h (PBUFSIZ): Define to 16384.
10326
10327 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
10328
10329 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
10330 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
10331 powerpc-64l.o, and powerpc-altivec64l.o.
10332 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
10333 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
10334 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
10335 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
10336 rs6000/power-linux.xml, and rs6000/power64-linux.xml
10337 to srv_xmlfiles.
10338
10339 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
10340 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
10341 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
10342 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
10343 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
10344 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
10345 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
10346 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
10347 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
10348 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
10349 (clean): Update.
10350
10351 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
10352 (init_registers_powerpc_32l): ... this new prototype.
10353 (init_registers_powerpc_32): Remove, replace by ...
10354 (init_registers_powerpc_altivec32l): ... this new prototype.
10355 (init_registers_powerpc_e500): Remove, replace by ...
10356 (init_registers_powerpc_e500l): ... this new prototype.
10357 (init_registers_ppc64): Remove, replace by ...
10358 (init_registers_powerpc_64l): ... this new prototype.
10359 (init_registers_powerpc_64): Remove, replace by ...
10360 (init_registers_powerpc_altivec64l): ... this new prototype.
10361 (ppc_num_regs): Set to 73.
10362 (PT_ORIG_R3, PT_TRAP): Define if necessary.
10363 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
10364 (ppc_cannot_store_register): Handle orig_r3 and trap.
10365 (ppc_arch_setup): Update init_registers_... calls.
10366 (ppc_fill_gregset): Handle orig_r3 and trap.
10367
10368 * inferiors.c (clear_inferiors): Reset current_inferior.
10369
10370 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
10371
10372 * acinclude.m4: Add override.m4.
10373 * configure: Regenerate.
10374
10375 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
10376
10377 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
10378 initial call to init_register_ppc64.
10379
10380 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
10381
10382 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
10383 single powerpc*-*-linux* case.
10384 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
10385
10386 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
10387
10388 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
10389 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
10390 from reg_xmlfiles.
10391 * linux-ppc-low.c: Include <elf.h>.
10392 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
10393 (ppc_hwcap): New global variable.
10394 (ppc_regmap): Remove __SPE__ #ifdef sections.
10395 (ppc_regmap_e500): New global variable.
10396 (ppc_cannot_store_register): Update __SPE__ special case.
10397 (ppc_get_hwcap): New function.
10398 (ppc_arch_setup): Use it to determine whether inferior supports
10399 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
10400 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
10401 Do not access registers if target does not support AltiVec.
10402 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
10403 Do not access registers if target does not support SPE.
10404 (target_regsets): Unconditionally include AltiVec and SPE regsets.
10405
10406 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
10407
10408 * linux-low.c (disabled_regsets, num_regsets): New.
10409 (use_regsets_p): Delete.
10410 (linux_wait_for_process): Clear disabled_regsets.
10411 (regsets_fetch_inferior_registers): Check and set it.
10412 (regsets_store_inferior_registers): Likewise.
10413 (linux_fetch_registers, linux_store_registers): Do not use
10414 use_regsets_p.
10415 (initialize_low): Allocate disabled_regsets.
10416
10417 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
10418
10419 * Makefile.in (LIBOBJS): New.
10420 (OBS): Use LIBOBJS.
10421 (memmem.o): New rule.
10422 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
10423 * configure: Regenerated.
10424
10425 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
10426
10427 * server.c (handle_query): Never return "unsupported" for
10428 qXfer:features:read queries.
10429
10430 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
10431
10432 * server.c (get_features_xml): Fix inverted condition.
10433 (handle_query): Always support qXfer:feature:read.
10434
10435 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
10436
10437 * server.c (wrapper_argv): New.
10438 (start_inferior): Handle wrapper_argv. If set, expect an extra
10439 trap.
10440 (gdbserver_usage): Document --wrapper.
10441 (main): Parse --wrapper.
10442
10443 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10444
10445 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
10446 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
10447 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
10448 (ppc_set_pc): Likewise.
10449 (ppc_arch_setup): New function.
10450 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
10451 of collect_register.
10452 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
10453
10454 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10455
10456 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
10457 instead of linux-ppc64-low.o.
10458 * linux-ppc64-low.c: Remove file.
10459 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
10460 (linux-ppc64-low.o): Remove rule.
10461
10462 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
10463 (init_registers_powerpc_64): Likewise.
10464 (ppc_regmap): Conditionally define depending on __powerpc64__.
10465 (ppc_cannot_store_register): Do not special-case "fpscr" when
10466 compiled on __powerpc64__.
10467 (ppc_collect_ptrace_register): New function.
10468 (ppc_supply_ptrace_register): New function.
10469 (ppc_breakpoint): Change type to "unsigned int".
10470 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
10471 (the_low_target): Conditionally provide initializers for the
10472 arch_setup member depending on __powerpc64__. Install
10473 collect_ptrace_register and supply_ptrace_register members.
10474
10475 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10476
10477 * regcache.h (gdbserver_xmltarget): Add extern declaration.
10478 * server.c (gdbserver_xmltarget): Define.
10479 (get_features_xml): Use it to replace "target.xml" and arch_string.
10480
10481 * configure.srv: Remove srv_xmltarget. Add XML files that were
10482 mentioned there to srv_xmlfiles instead. Remove conditional tests
10483 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
10484 srv_xmlfiles and srv_regobj to include all possible choices.
10485 * configure.ac (srv_xmltarget): Remove.
10486 (srv_xmlfiles): Do not add "target.xml".
10487 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
10488 checks for supplementary target information.
10489 * configure: Regenerate.
10490 * Makefile.in (XML_TARGET): Remove.
10491 (target.xml): Remove rule.
10492 (clean): Do not clean up target.xml.
10493 (.PRECIOUS): Do not mention target.xml.
10494
10495 * target.h (struct target_ops): Remove arch_string member.
10496 * linux-low.c (linux_arch_string): Remove.
10497 (linux_target_ops): Remove arch_string initializer.
10498 * linux-low.h (struct linux_target_ops): Remove arch_string member.
10499 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
10500 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
10501 * spu-low.c (spu_arch_string): Remove.
10502 (spu_target_ops): Remove arch_string initializer.
10503 * win32-low.c (win32_arch_string): Remove.
10504 (win32_target_ops): Remove arch_string initializer.
10505 * win32-low.h (struct win32_target_ops): Remove arch_string member.
10506 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
10507 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
10508
10509 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
10510
10511 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
10512 by collect_ptrace_register and supply_ptrace_register hooks.
10513 * linux-low.c (fetch_register): Use supply_ptrace_register callback
10514 instead of checking for the_low_target.left_pad_xfer.
10515 (usr_store_inferior_registers): Use collect_ptrace_register callback
10516 instead of checking for the_low_target.left_pad_xfer.
10517
10518 * linux-s390-low.c (s390_collect_ptrace_register): New function.
10519 (s390_supply_ptrace_register): Likewise.
10520 (s390_fill_gregset): Call s390_collect_ptrace_register.
10521 (the_low_target): Update.
10522
10523 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
10524 (ppc_supply_ptrace_register): Likewise.
10525 (the_low_target): Update.
10526
10527 * linux-i386-low.c (the_low_target): Update.
10528 * linux-x86-64-low.c (the_low_target): Update.
10529
10530 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
10531
10532 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
10533 reg-s390.o and reg-s390x.o.
10534
10535 * linux-low.c (new_inferior): New global variable.
10536 (linux_create_inferior, linux_attach): Set it.
10537 (linux_wait_for_process): Call the_low_target.arch_setup after the
10538 target has stopped for the first time.
10539 (initialize_low): Do not call the_low_target.arch_setup.
10540
10541 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
10542 (s390_set_pc): Likewise.
10543 (s390_arch_setup): New function.
10544 (the_low_target): Use s390_arch_setup as arch_setup routine.
10545
10546 * regcache.c (realloc_register_cache): New function.
10547 (set_register_cache): Call it for each existing regcache.
10548
10549 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
10550
10551 * server.h (init_registers): Remove prototype.
10552
10553 * linux-low.h (struct linux_target_ops): Add arch_setup field.
10554 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
10555 instead of init_registers ().
10556 * linux-arm-low.c (init_registers_arm): Add prototype.
10557 (init_registers_arm_with_iwmmxt): Likewise.
10558 (the_low_target): Add initializer for arch_setup field.
10559 * linux-cris-low.c (init_registers_cris): Add prototype.
10560 (the_low_target): Add initializer for arch_setup field.
10561 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
10562 (the_low_target): Add initializer for arch_setup field.
10563 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
10564 (the_low_target): Add initializer for arch_setup field.
10565 * linux-ia64-low.c (init_registers_ia64): Add prototype.
10566 (the_low_target): Add initializer for arch_setup field.
10567 * linux-m32r-low.c (init_registers_m32r): Add prototype.
10568 (the_low_target): Add initializer for arch_setup field.
10569 * linux-m68k-low.c (init_registers_m68k): Add prototype.
10570 (the_low_target): Add initializer for arch_setup field.
10571 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
10572 (init_registers_mips64_linux): Likewise.
10573 (the_low_target): Add initializer for arch_setup field.
10574 * linux-ppc-low.c (init_registers_ppc): Add prototype.
10575 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
10576 (the_low_target): Add initializer for arch_setup field.
10577 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
10578 (init_registers_powerpc_64): Likewise.
10579 (the_low_target): Add initializer for arch_setup field.
10580 * linux-s390-low.c (init_registers_s390): Add prototype.
10581 (init_registers_s390x): Likewise.
10582 (the_low_target): Add initializer for arch_setup field.
10583 * linux-sh-low.c (init_registers_sh): Add prototype.
10584 (the_low_target): Add initializer for arch_setup field.
10585 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
10586 (the_low_target): Add initializer for arch_setup field.
10587 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
10588 (the_low_target): Add initializer for arch_setup field.
10589
10590 * win32-low.h (struct win32_target_ops): Add arch_setup field.
10591 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
10592 instead of init_registers ().
10593 * win32-arm-low.c (init_registers_arm): Add prototype.
10594 (the_low_target): Add initializer for arch_setup field.
10595 * win32-i386-low.c (init_registers_i386): Add prototype.
10596 (the_low_target): Add initializer for arch_setup field.
10597
10598 * spu-low.c (init_registers_spu): Add prototype.
10599 (initialize_low): Call initialie_registers_spu () instead of
10600 initialize_registers ().
10601
10602 2008-02-19 Pedro Alves <pedro@codesourcery.com>
10603
10604 * server.c (handle_v_requests): When handling the vRun and vAttach
10605 packets, if already debugging a process, don't kill it. Return an
10606 error instead.
10607
10608 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
10609
10610 * server.c (handle_query): Correct length check.
10611
10612 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
10613
10614 * win32-low.c (do_initial_child_stuff): Add process handle
10615 parameter. Set current_process_handle and current_process_id from the
10616 parameters. Clear globals.
10617 (win32_create_inferior): Don't set current_process_handle and
10618 current_process_id here. Instead pass them on the call to
10619 do_initial_child_stuff.
10620 (win32_attach): Likewise.
10621 (win32_clear_inferiors): New.
10622 (win32_kill): Don't close the current process handle or the
10623 current thread handle here. Instead call win32_clear_inferiors.
10624 (win32_detach): Don't open a new handle to the process. Call
10625 win32_clear_inferiors.
10626 (win32_join): Don't rely on current_process_handle; open a new
10627 handle using the process id.
10628 (win32_wait): Call win32_clear_inferiors when the inferior process
10629 has exited.
10630
10631 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
10632
10633 * server.c (monitor_show_help): Add "exit".
10634
10635 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
10636
10637 * Makefile.in (SFILES): Add linux-xtensa-low.c.
10638 (clean): Add reg-xtensa.c.
10639 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
10640 * configure.srv (xtensa*-*-linux*) New target.
10641 * linux-xtensa-low.c: New.
10642 * xtensa-xtregs.c: New.
10643
10644 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
10645
10646 * hostio.c: Don't include errno.h.
10647 (errno_to_fileio_errno): Move to hostio-errno.
10648 * hostio.c: (hostio_error): Remove the error parameter. Defer the
10649 error number outputting to the target->hostio_last_error callback.
10650 (hostio_packet_error): Use FILEIO_EINVAL directly.
10651 (handle_open, handle_pread, hostio_error, handle_unlink): Update
10652 calls to hostio_error.
10653 * hostio-errno.c: New.
10654 * server.h (hostio_last_error_from_errno): Declare.
10655 * target.h (target_ops): Add hostio_last_error member.
10656 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
10657 as hostio_last_error handler.
10658 * spu-low.c (spu_target_ops): Likewise.
10659 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
10660 (wince_hostio_last_error): New functions.
10661 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
10662 as hostio_last_error handler.
10663 (win32_target_ops) [!_WIN32_WCE]: Register
10664 hostio_last_error_from_errno as hostio_last_error handler.
10665 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
10666 (hostio-errno.o): New rule.
10667 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
10668 * configure.srv (srv_hostio_err_objs): New variable. Default to
10669 hostio-errno.o.
10670 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
10671 * configure: Regenerate.
10672
10673 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
10674
10675 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
10676 (linux_kill, linux_detach): Clean up the process list.
10677 * remote-utils.c (remote_open): Improve port number parsing.
10678 (putpkt_binary, input_interrupt): Only send interrupts if the target
10679 is running.
10680 * server.c (extended_protocol): Make static.
10681 (attached): Define earlier.
10682 (exit_requested, response_needed, program_argv): New variables.
10683 (target_running): New.
10684 (start_inferior): Clear attached here.
10685 (attach_inferior): Set attached here.
10686 (require_running): Define.
10687 (handle_query): Use require_running and target_running. Implement
10688 "monitor exit".
10689 (handle_v_attach, handle_v_run): New.
10690 (handle_v_requests): Use require_running. Handle vAttach and vRun.
10691 (gdbserver_usage): Update.
10692 (main): Redo argument parsing. Handle --debug and --multi. Handle
10693 --attach along with other options or after the port. Save
10694 program_argv. Support no initial program. Resynchronize
10695 communication with GDB after an error. Handle "monitor exit".
10696 Use require_running and target_running. Always allow the extended
10697 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
10698 restart in extended mode.
10699 * README: Refer to the GDB manual. Update --attach usage.
10700
10701 2007-12-20 Andreas Schwab <schwab@suse.de>
10702
10703 * linux-low.c (STACK_SIZE): Define.
10704 (linux_tracefork_child): Use it. Use __clone2 on ia64.
10705 (linux_test_for_tracefork): Likewise.
10706
10707 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
10708
10709 * linux-low.c (linux_wait_for_event): Update messages. Do not
10710 reinsert auto-delete breakpoints.
10711 * mem-break.c (struct breakpoint): Change return type of handler to
10712 int.
10713 (set_breakpoint_at): Update handler type.
10714 (reinsert_breakpoint_handler): Return 1 instead of calling
10715 delete_breakpoint.
10716 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
10717 setting a new one.
10718 (check_breakpoints): Delete auto-delete breakpoints and return 2.
10719 * mem-break.h (set_breakpoint_at): Update handler type.
10720 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
10721 * win32-low.c (auto_delete_breakpoint): New.
10722 (get_child_debug_event): Use it.
10723
10724 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
10725
10726 * configure.ac: Check for pread and pwrite.
10727 * hostio.c (handle_pread): Fall back to lseek and read.
10728 (handle_pwrite): Fall back to lseek and write.
10729 * config.in, configure: Regenerated.
10730
10731 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
10732
10733 * server.c (myresume): Add own_buf argument.
10734 (main): Update calls.
10735
10736 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
10737
10738 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
10739 * remote-utils.c (remote_open): Do not call disable_async_io.
10740 (block_async_io): Delete.
10741 (unblock_async_io): Make static.
10742 (initialize_async_io): New.
10743 * server.c (handle_v_cont): Handle async I/O here.
10744 (myresume): Likewise. Move other common resume tasks here...
10745 (main): ... from here. Call initialize_async_io. Disable async
10746 I/O before the main loop.
10747 * server.h (initialize_async_io): Declare.
10748 (block_async_io, unblock_async_io): Delete prototypes.
10749 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
10750
10751 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
10752
10753 * remote-utils.c (readchar): Allow binary data in received messages.
10754
10755 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10756
10757 * win32-low.c (attaching): New global.
10758 (win32_create_inferior): Clear the `attaching' global.
10759 (win32_attach): Set the `attaching' global.
10760 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
10761 attaching. Only set a breakpoint at the entry point if not
10762 attaching.
10763
10764 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10765
10766 * server.c (main): Don't report dll events on the initial
10767 connection on attaches.
10768
10769 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10770
10771 * server.c (main): Relax numerical bases supported for the pid of
10772 the --attach command line argument.
10773
10774 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10775
10776 * win32-low.c (win32_attach): Call OpenProcess before
10777 DebugActiveProcess, not after. Add last error output to error
10778 call.
10779
10780 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10781
10782 * win32-low.c (win32_get_thread_context)
10783 (win32_set_thread_context): New functions.
10784 (thread_rec): Use win32_get_thread_context.
10785 (continue_one_thread, win32_resume): Use win32_set_thread_context.
10786 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
10787 field.
10788
10789 2007-12-03 Leo Zayas
10790 Pedro Alves <pedro_alves@portugalmail.pt>
10791
10792 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
10793 global variables.
10794 (child_add_thread): Minor cleanup.
10795 (child_continue): Resume artificially suspended threads before
10796 calling ContinueDebugEvent.
10797 (suspend_one_thread): New.
10798 (fake_breakpoint_event): New.
10799 (get_child_debug_event): Change return type to int. Check here if
10800 gdb sent an interrupt request. If a soft interrupt was requested,
10801 fake a breakpoint event. Return 0 if there is no event to handle,
10802 and 1 otherwise.
10803 (win32_wait): Don't check here if gdb sent an interrupt request.
10804 Ensure there is a valid event to handle.
10805 (win32_request_interrupt): Add soft interruption method as last
10806 resort.
10807
10808 2007-12-03 Leo Zayas
10809 Pedro Alves <pedro_alves@portugalmail.pt>
10810
10811 * win32-low.h (win32_thread_info): Add descriptions to the
10812 structure members. Replace `suspend_count' counter by a
10813 `suspended' flag.
10814 * win32-low.c (thread_rec): Update condition of when to get the
10815 context from the inferior. Rely on ContextFlags being set if it
10816 has already been retrieved. Only suspend the inferior thread if
10817 we haven't already. Warn if that fails.
10818 (continue_one_thread): s/suspend_count/suspended/. Only call
10819 ResumeThread once. Warn if that fails.
10820
10821 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
10822
10823 * win32-low.c (win32_wait): Don't read from the inferior when it
10824 has already exited.
10825
10826 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
10827
10828 * Makefile.in (win32_low_h): New variable.
10829 (win32-low.o): Add dependency on $(win32_low_h).
10830 (win32-arm-low.o, win32-i386-low.o): New rules.
10831
10832 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
10833
10834 * hostio.c: Correct copyright year.
10835
10836 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
10837
10838 * Makefile.in (OBS): Add hostio.o.
10839 (hostio.o): New rule.
10840 * server.h (handle_vFile): Declare.
10841 * hostio.c: New file.
10842 * server.c (handle_v_requests): Take packet_len and new_packet_len
10843 for binary packets. Call handle_vFile.
10844 (main): Update call to handle_v_requests.
10845
10846 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
10847
10848 * linux-low.c: Include <sched.h>.
10849
10850 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
10851
10852 * linux-low.c (linux_tracefork_grandchild): New.
10853 (linux_tracefork_child): Use clone.
10854 (linux_test_for_tracefork): Use clone; allocate and free a stack.
10855
10856 2007-10-31 Joel Brobecker <brobecker@adacore.com>
10857
10858 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
10859
10860 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
10861
10862 * linux-low.c (handle_extended_wait): Handle unexpected signals.
10863
10864 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
10865
10866 * inferiors.c (change_inferior_id): Delete.
10867 (add_pid_to_list, pull_pid_from_list): New.
10868 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
10869 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
10870 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
10871 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
10872 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
10873 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
10874 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
10875 (using_threads): Always set to 1.
10876 (handle_extended_wait): New.
10877 (add_process): Do not set TID.
10878 (linux_create_inferior): Set must_set_ptrace_flags.
10879 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
10880 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
10881 (linux_thread_alive): Rename TID argument to LWPID.
10882 (linux_wait_for_process): Handle unknown processes. Do not use TID.
10883 (linux_wait_for_event): Do not use TID or check using_threads. Update
10884 call to dead_thread_notify. Call handle_extended_wait.
10885 (linux_create_inferior): Use PTRACE_SETOPTIONS.
10886 (send_sigstop): Delete sigstop_sent.
10887 (wait_for_sigstop): Avoid TID.
10888 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
10889 (linux_test_for_tracefork): New.
10890 (linux_lookup_signals): Use thread_db_active and
10891 linux_supports_tracefork_flag.
10892 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
10893 * linux-low.h (get_process_thread): Avoid TID.
10894 (struct process_ifo): Move thread_known and tid to the end. Remove
10895 sigstop_sent.
10896 (linux_attach_lwp, thread_db_init): Update prototypes.
10897 * server.h (change_inferior_id): Delete prototype.
10898 (add_pid_to_list, pull_pid_from_list): New prototypes.
10899 * thread-db.c (thread_db_use_events): New.
10900 (find_first_thread): Rename to...
10901 (find_one_thread): ...this. Update callers and messages. Do not
10902 call fatal. Check thread_db_use_events. Do not call
10903 change_inferior_id or new_thread_notify.
10904 (maybe_attach_thread): Update. Do not call new_thread_notify.
10905 (thread_db_init): Set thread_db_use_events. Check use_events.
10906 * utils.c (fatal, warning): Correct message prefix.
10907
10908 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
10909
10910 * Makefile.in (clean): Remove new files.
10911 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
10912 (powerpc-64.o, powerpc-64.c): New rules.
10913 * configure.srv: Use alternate register sets for powerpc64-*-linux*
10914 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
10915 with SPE.
10916 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
10917 SPE targets.
10918 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
10919 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
10920 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
10921 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
10922 (target_regsets): Add AltiVec and SPE register sets.
10923 * configure.ac: Check for AltiVec and SPE.
10924 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
10925 (ppc_fill_vrregset, ppc_store_vrregset): New.
10926 (target_regsets): Add AltiVec register set.
10927 * configure: Regenerated.
10928
10929 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
10930
10931 * linux-low.c (O_LARGEFILE): Define.
10932 (linux_read_memory): Use /proc/PID/mem.
10933 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
10934 * configure, config.in: Regenerated.
10935
10936 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
10937
10938 * linux-low.c (linux_wait_for_event): Do not pass signals while
10939 single-stepping.
10940
10941 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
10942
10943 * win32-low.c (create_process): New.
10944 (win32_create_inferior): Use create_process instead of
10945 CreateProcess. If create_process failed retry appending an ".exe"
10946 suffix. Store the GetLastError result immediatelly after
10947 create_process calls and use it on the call to error.
10948
10949 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
10950
10951 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
10952
10953 2007-08-23 Joel Brobecker <brobecker@adacore.com>
10954
10955 * configure.ac: Switch license to GPLv3.
10956
10957 2007-08-01 Michael Snyder <msnyder@access-company.com>
10958
10959 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
10960
10961 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
10962
10963 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
10964 typedef.
10965 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
10966 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
10967 CloseToolhelp32Snapshot.
10968 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
10969 CloseToolhelp32Snapshot.
10970
10971 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
10972
10973 * server.c (main): Check for inferior exit before main loop.
10974
10975 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
10976
10977 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
10978 instead of on tmp_desc.
10979
10980 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
10981 Daniel Jacobowitz <dan@codesourcery.com>
10982
10983 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
10984 (add_thread): Minor cleanups.
10985 (clear_inferiors): Move lower in the file. Clear the DLL
10986 list.
10987 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
10988 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
10989 (xml_escape_text): New.
10990 * server.c (handle_query): Handle qXfer:libraries:read. Report it
10991 for qSupported.
10992 (handle_v_cont): Report errors.
10993 (gdbserver_version): Update.
10994 (main): Correct size of own_buf. Do not report initial DLL events.
10995 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
10996 (unloaded_dll, xml_escape_text): New.
10997 * win32-low.c (enum target_waitkind): Update comments.
10998 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
10999 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
11000 (win32_EnumProcessModules, win32_GetModuleInformation)
11001 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
11002 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
11003 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
11004 (win32_Module32First, win32_Module32Next, load_toolhelp)
11005 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
11006 (get_child_debug_event): Handle DLL events.
11007 (win32_wait): Likewise.
11008
11009 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
11010
11011 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
11012 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
11013
11014 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
11015
11016 * win32-low.c (handle_output_debug_string): Ignore event if not
11017 waiting.
11018
11019 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
11020
11021 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
11022
11023 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
11024
11025 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
11026
11027 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
11028
11029 * inferiors.c (change_inferior_id): Add comment.
11030 * linux-low.c (check_removed_breakpoint): Add an early
11031 prototype. Improve debug output.
11032 (linux_attach): Doc update.
11033 (linux_detach_one_process, linux_detach): Clean up before releasing
11034 each process.
11035 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
11036 * linux-low.h (struct process_info): Doc improvement.
11037 * mem-break.c (delete_all_breakpoints): New.
11038 * mem-break.h (delete_all_breakpoints): New prototype.
11039 * thread-db.c (find_first_thread): New.
11040 (thread_db_create_event): Call it instead of
11041 thread_db_find_new_threads. Clean up unused variables.
11042 (maybe_attach_thread): Remove first thread handling.
11043 (thread_db_find_new_threads): Use find_first_thread.
11044 (thread_db_get_tls_address): Likewise.
11045
11046 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
11047
11048 * thread-db.c (thread_db_find_new_threads): Add prototype.
11049 (thread_db_create_event): Check for the main thread before adding
11050 a new thread.
11051 (maybe_attach_thread): Only enable event reporting if TID == 0.
11052 (thread_db_get_tls_address): Check for new threads.
11053
11054 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
11055
11056 * linux-low.c (linux_create_inferior): Try execv before execvp.
11057 * spu-low.c (spu_create_inferior): Likewise.
11058
11059 2007-06-13 Mike Frysinger <vapier@gentoo.org>
11060
11061 * linux-low.c (linux_create_inferior): Change execv to execvp.
11062 * spu-low.c (spu_create_inferior): Likewies.
11063
11064 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
11065
11066 * Makefile.in (clean): Clean new files instead of deleted ones.
11067 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
11068 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
11069 rules.
11070 * configure.srv: Specify XML files and new regformats for MIPS and
11071 MIPS64 GNU/Linux.
11072 * linux-mips-low.c (mips_num_regs): Set to only used registers.
11073 (mips_regmap): Do not fetch $0. Remove unused registers. Add
11074 an entry for the restart register.
11075 (mips_cannot_fetch_register, mips_cannot_store_register)
11076 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
11077 register names to match the XML descriptions.
11078 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
11079 restart register instead of $0.
11080
11081 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
11082 Markus Deuling <deuling@de.ibm.com>
11083
11084 * remote-utils.c (decode_xfer_write): New function.
11085 * server.h (decode_xfer_write): Add prototype.
11086 * server.c (handle_query): Add PACKET_LEN argument. Support
11087 qXfer:spu:read and qXfer:spu:write packets.
11088 (main): Pass packet_len to handle_query.
11089 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
11090 * target.h (target_ops): Add qxfer_spu.
11091
11092 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
11093
11094 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
11095 accessing non-seekable spufs files.
11096
11097 2007-05-16 Markus Deuling <deuling@de.ibm.com>
11098
11099 * server.c (handle_query): Add reply for qC packet.
11100
11101 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11102 Leo Zayas <lerele@champenstudios@com>
11103
11104 * server.h (check_remote_input_interrupt_request): New function.
11105 * remote_utils.c (INVALID_DESCRIPTOR): New define.
11106 (remote_desc): Initialize with INVALID_DESCRIPTOR.
11107 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
11108 (check_remote_input_interrupt_request): New function.
11109 * server.h (check_remote_input_interrupt_request): Declare.
11110 * win32-low.c (winapi_DebugBreakProcess,
11111 winapi_GenerateConsoleCtrlEvent): New typedefs.
11112 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
11113 to 250 ms.
11114 (win32_wait): Check for remote interrupt request
11115 with check_remote_input_interrupt_request.
11116 (win32_request_interrupt): New function.
11117 (win32_target_op): Set request_interrupt to win32_request_interrupt.
11118
11119 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11120
11121 * win32-low.c (debug_registers_changed,
11122 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
11123 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
11124 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
11125 (thread_rec): Get context using the low target.
11126 (child_add_thread): Call thread_added on the low target,
11127 which does the same thing.
11128 (regptr): Delete.
11129 (do_initial_child_stuff): Remove debug registers references.
11130 Set context using the low target. Resume threads after
11131 setting the contexts.
11132 (child_continue): Remove dead variable. Remove debug
11133 registers references.
11134 (child_fetch_inferior_registers): Go through the low target.
11135 (do_child_store_inferior_registers): Remove.
11136 (child_store_inferior_registers): Go through the low target.
11137 (win32_resume): Remove debug registers references.
11138 Set context using the low target.
11139 (handle_exception): Change return type to void. Don't record
11140 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
11141 first chance exception.
11142 (get_child_debug_event): Change return type to void. Remove
11143 goto loop. Always return after waiting for debug event.
11144 (win32_wait): Convert to switch statement. Handle spurious
11145 events.
11146
11147 * win32-i386-low.c (debug_registers_changed,
11148 debug_registers_used): New.
11149 (initial_stuff): Rename to ...
11150 (i386_initial_stuff): ... this. Clear debug registers
11151 state variables.
11152 (store_debug_registers): Delete.
11153 (i386_get_thread_context): New.
11154 (load_debug_registers): Delete.
11155 (i386_set_thread_context): New.
11156 (i386_thread_added): New.
11157 (single_step): Rename to ...
11158 (i386_single_step): ... this.
11159 (do_fetch_inferior_registers): Rename to ...
11160 (i386_fetch_inferior_register): ... this.
11161 (i386_store_inferior_register): New.
11162 (the_low_target): Adapt to new interface.
11163
11164 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
11165 (arm_get_thread_context): New.
11166 (arm_set_thread_context): New.
11167 (regptr): New.
11168 (do_fetch_inferior_registers): Rename to ...
11169 (arm_fetch_inferior_register): ... this.
11170 (arm_store_inferior_register): New.
11171 (arm_wince_breakpoint): Reimplement as unsigned long.
11172 (arm_wince_breakpoint_len): Define.
11173 (the_low_target): Adapt to new interface.
11174
11175 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
11176 load_debug_registers. Add get_thread_context, set_thread_context,
11177 thread_added and store_inferior_register. Rename
11178 fetch_inferior_registers to fetch_inferior_register.
11179 (regptr): Remove declaration.
11180
11181 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11182
11183 * linux-low.c (linux_detach): Change return type to int. Return 0.
11184 * spu-low.c (spu_detach): Likewise.
11185
11186 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11187
11188 * target.h (target_ops): Change return type of detach to int.
11189 Add join.
11190 (join_inferior): New.
11191 * server.c (main): Don't skip detach support on mingw32.
11192 If the inferior doesn't support detaching return error.
11193 Call join_inferior instead of using waitpid.
11194 * linux-low.c (linux_join): New.
11195 (linux_target_op): Add linux_join.
11196 * spu-low.c (spu_join): New.
11197 (spu_target_ops): Add spu_join.
11198 * win32-low.c (win32_detach): Adapt to new interface.
11199 Reopen current_process_handle before detaching. Issue a child
11200 resume before detaching.
11201 (win32_join): New.
11202 (win32_target_op): Add win32_join.
11203
11204 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11205
11206 * win32-low.c (win32-attach): Fix return value.
11207 * target.h (target_ops): Describe ATTACH return values.
11208
11209 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11210
11211 * win32-low.c (GETPROCADDRESS): Define.
11212 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
11213 (winapi_DebugSetProcessKillOnExit): Likewise.
11214 (win32_create_inferior): Force usage of ansi CreateProcessA.
11215 (win32_attach): Use GETPROCADDRESS.
11216 (win32_detach): Likewise.
11217
11218 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11219
11220 * win32-low.c (win32_wait): Don't use WSTOPSIG.
11221
11222 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
11223
11224 * win32-low.c: Commit leftover changes from 2007-03-29.
11225
11226 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
11227
11228 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
11229 fields short instead of int. Add explicit padding.
11230 (i387_cache_to_fsave): Remove unnecessary casts.
11231 (i387_fsave_to_cache): Doc fix.
11232 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
11233
11234 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
11235
11236 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
11237 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
11238
11239 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
11240
11241 * configure.srv (arm*-*-mingw32ce*): Move near the other
11242 arm targets.
11243
11244 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
11245
11246 * configure.ac: Add errno checking.
11247 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
11248 sys/file.h and malloc.h.
11249 (AC_CHECK_DECLS): Add perror.
11250 (srv_mingwce): Handle.
11251 * configure.srv (i[34567]86-*-cygwin*): Add
11252 win32-i386-low.o to srv_tgtobj.
11253 (i[34567]86-*-mingw*): Likewise.
11254 (arm*-*-mingw32ce*): Add case.
11255 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
11256 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
11257 [__MINGW32CE__] (strerror): New function.
11258 [__MINGW32CE__] (errno): Define to GetLastError.
11259 [__MINGW32CE__] (COUNTOF): New macro.
11260 (remote_open): Remove extra close call.
11261 * mem-break.c (delete_breakpoint_at): New function.
11262 * mem-break.h (delete_breakpoint_at): Declare.
11263 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
11264 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
11265 [USE_WIN32API] (read, write): Add char* casts.
11266 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
11267 * server.h: Include wincecompat.h on Windows CE.
11268 [HAVE_ERRNO_H]: Check.
11269 (perror): Declare if not declared.
11270 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
11271 (perror_with_name): Remove errno declaration.
11272 * wincecompat.h: New.
11273 * wincecompat.c: New.
11274 * win32-low.h: New.
11275 * win32-arm-low.c: New.
11276 * win32-i386-low.c: New.
11277 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
11278 (OUTMSG2): Make it safe.
11279 (_T): New macro.
11280 (COUNTOF): New macro.
11281 (NUM_REGS): Get it from the low target.
11282 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
11283 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
11284 (thread_rec): Let low target handle debug registers.
11285 (child_add_thread): Likewise.
11286 (child_init_thread_list): Likewise.
11287 (continue_one_thread): Likewise.
11288 (regptr): New.
11289 (do_child_fetch_inferior_registers): Move to ...
11290 * win32-i386-low.c: ... here, and rename to ...
11291 (do_fetch_inferior_registers): ... this.
11292 * win32-low.c (child_fetch_inferior_registers):
11293 Go through the low target.
11294 (do_child_store_inferior_registers): Use regptr.
11295 (strwinerror): New function.
11296 (win32_create_inferior): Handle Windows CE.
11297 Use strwinerror instead of strerror on Windows error
11298 codes. Add program to the error output.
11299 Don't close the main thread handle on Windows CE.
11300 (win32_attach): Use coredll.dll on Windows CE.
11301 (win32_kill): Close current process and current
11302 thread handles.
11303 (win32_detach): Use coredll.dll on Windows CE.
11304 (win32_resume): Let low target handle debug registers, and
11305 step request.
11306 (handle_exception): Add/Remove initial breakpoint. Avoid
11307 non-existant WSTOPSIG on Windows CE.
11308 (win32_read_inferior_memory): Cast to remove warning.
11309 (win32_arch_string): Go through the low target.
11310 (initialize_low): Call set_breakpoint_data with the low
11311 target's breakpoint.
11312 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
11313 FOP_REGNUM, mappings): Move to ...
11314 * win32-i386-low.c: ... here.
11315 * win32-low.c (win32_thread_info): Move to ...
11316 * win32-low.h: ... here.
11317 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
11318 win32-arm-low.c and wincecompat.c.
11319 (all:): Add $EXEEXT.
11320 (install-only:): Likewise.
11321 (gdbserver:): Likewise.
11322 (gdbreplay:): Likewise.
11323 * config.in: Regenerate.
11324 * configure: Regenerate.
11325
11326 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
11327
11328 * win32-low.c: Rename typedef thread_info to
11329 win32_thread_info throughout.
11330
11331 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
11332
11333 * win32-i386-low.c: Rename to ...
11334 * win32-low.c: ... this.
11335 * configure.srv: Replace win32-i386-low.o with win32-low.o.
11336 * Makefile.in: Likewise.
11337
11338 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
11339
11340 * remote-utils.c (monitor_output): Constify msg parameter.
11341 * server.h (monitor_output): Likewise.
11342 * win32-i386-low.c (handle_output_debug_string): New.
11343 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
11344 handle_output_debug_string.
11345 (get_child_debug_event): Likewise.
11346
11347 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
11348
11349 * server.c (main): Correct strtoul check.
11350
11351 2007-03-27 Jon Ringle <jon@ringle.org>
11352
11353 * linux-low.c: Check __ARCH_HAS_MMU__ also.
11354
11355 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
11356
11357 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
11358
11359 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
11360
11361 * terminal.h: Check HAVE_SGTTY_H.
11362
11363 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
11364
11365 * remote-utils.c (remote_open): Print out the assigned port number.
11366
11367 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
11368
11369 * remote-utils.c (monitor_output): New function.
11370 * server.c (debug_threads): Define here.
11371 (monitor_show_help): New function.
11372 (handle_query): Handle qRcmd.
11373 (main): Do not handle 'd' packet.
11374 * server.h (debug_threads, remote_debug, monitor_output): Declare.
11375 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
11376 of debug_threads.
11377
11378 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11379
11380 * Makefile.in (EXEEXT): New.
11381 (clean): Use $(EXEEXT).
11382
11383 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11384
11385 * target.h (target_ops): Rename send_signal to request_interrupt,
11386 and remove enum target_signal parameter.
11387 * linux-low.c (linux_request_interrupt): Rename from
11388 linux_send_signal, and always send SIGINT.
11389 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
11390 and always send SIGINT.
11391 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
11392 of send_signal.
11393 (input_interrupt): Likewise.
11394
11395 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11396
11397 * server.c (get_features_xml): Check if target implemented
11398 arch_string.
11399 * win32-i386-low.c (win32_arch_string): New.
11400 (win32_target_ops): Add win32_arch_string as arch_string member.
11401
11402 2007-02-22 Markus Deuling <deuling@de.ibm.com>
11403
11404 * spu-low.c (spu_arch_string): New.
11405 (spu_target_ops): Add spu_arch_string.
11406
11407 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
11408
11409 * remote-utils.c: Remove HAVE_TERMINAL_H check.
11410 * configure.ac: Do not check for terminal.h.
11411 * configure, config.in: Regenerated.
11412
11413 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
11414
11415 * Makefile.in (OBS): Add $(XML_BUILTIN).
11416 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
11417 (clean): Update.
11418 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
11419 (arm-with-iwmmxt.c): New.
11420 * config.in, configure: Regenerate.
11421 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
11422 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
11423 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
11424 (arm*-*-linux*): Add iWMMXt and regset support.
11425 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
11426 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
11427 (arm_store_wmmxregset, target_regsets): New.
11428 * server.c (get_features_xml): Take annex argument. Check builtin
11429 XML documents.
11430 (handle_query): Handle multiple annexes.
11431
11432 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11433
11434 * remote-utils.c [USE_WIN32API] (read, write): Define.
11435 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
11436 write.
11437
11438 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
11439
11440 * linux-i386-low.c (the_low_target): Set arch_string.
11441 * linux-x86-64-low.c (the_low_target): Likewise.
11442 * linux-low.c (linux_arch_string): New.
11443 (linux_target_ops): Add it.
11444 * linux-low.h (struct linux_target_ops): Add arch_string.
11445 * server.c (write_qxfer_response): Use const void * for DATA.
11446 (get_features_xml): New.
11447 (handle_query): Handle qXfer:features:read. Report it for qSupported.
11448 * target.h (struct target_ops): Add arch_string method.
11449
11450 2007-01-03 Denis Pilat <denis.pilat@st.com>
11451 Daniel Jacobowitz <dan@codesourcery.com>
11452
11453 * linux-low.c (linux_kill): Handle being called with no threads.
11454 * win32-i386-low.c (win32_kill): Likewise.
11455 (get_child_debug_event): Clear current_process_handle.
11456
11457 2006-12-30 Denis PILAT <denis.pilat@st.com>
11458 Daniel Jacobowitz <dan@codesourcery.com>
11459
11460 * remote-utils.c (remote_open): Check the type of specified
11461 serial port devices before opening them.
11462 * server.c (main): Kill the inferior if an error occurs during
11463 the first remote_open.
11464
11465 2006-12-05 Markus Deuling <deuling@de.ibm.com>
11466
11467 * README: Update supported targets.
11468
11469 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
11470
11471 * Makefile.in (clean): Remove reg-mips64.c.
11472 (reg-mips64.c, reg-mips64.o): New rules.
11473 * configure.srv: Handle mips64. Include regset support for mips.
11474 * linux-mips-low.c (union mips_register): New.
11475 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
11476 (mips_breakpoint, mips_breakpoint_at): Use int.
11477 (mips_collect_register, mips_supply_register)
11478 (mips_collect_register_32bit, mips_supply_register_32bit)
11479 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
11480 (mips_store_fpregset, target_regsets): New.
11481 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
11482
11483 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
11484
11485 * configure.srv: Add target "spu*-*-*".
11486 * Makefile.in (clean): Remove reg-spu.c.
11487 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
11488 * spu-low.c: New file.
11489
11490 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
11491
11492 * configure.ac: Correct td_thr_tls_get_addr test.
11493 * configure: Regenerated.
11494
11495 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
11496
11497 * linux-low.c (linux_wait_for_event): Reformat. Use the
11498 pass_signals array.
11499 * remote-utils.c (decode_address_to_semicolon): New.
11500 * server.c (pass_signals, handle_general_set): New.
11501 (handle_query): Mention QPassSignals for qSupported.
11502 (main): Call handle_general_set.
11503 * server.h (pass_signals, decode_address_to_semicolon): New.
11504
11505 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
11506
11507 * server.c (handle_query): Correct error handling for read_auxv.
11508
11509 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
11510
11511 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
11512 and srv_linux_thread_db to yes.
11513 * linux-s390-low.c (s390_fill_gregset): New function.
11514 (target_regsets): Define data structure.
11515
11516 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
11517
11518 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
11519 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
11520 * config.in, configure: Regenerated.
11521 * inferiors.c (gdb_id_to_thread): New function.
11522 (gdb_id_to_thread_id): Use it.
11523 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
11524 * linux-low.h (struct process_info): Add th member.
11525 (thread_db_get_tls_address): New prototype.
11526 * remote-utils.c (decode_address): Make non-static.
11527 * server.c (handle_query): Handle qGetTLSAddr.
11528 * server.h (gdb_id_to_thread, decode_address): New prototypes.
11529 * target.h (struct target_ops): Add get_tls_address.
11530 * thread-db.c (maybe_attach_thread): Save the thread handle.
11531 (thread_db_get_tls_address): New.
11532
11533 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
11534
11535 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
11536 (linux_resume_one_process): Take a siginfo_t *. Update all
11537 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
11538 (struct pending_signals): Add a siginfo_t.
11539 (linux_wait_for_process): Always set last_status.
11540 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
11541 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
11542 * linux-low.h (struct process_info): Add last_status.
11543
11544 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
11545
11546 * remote-utils.c (try_rle): New function.
11547 (putpkt_binary): Use it.
11548
11549 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
11550
11551 * Makefile.in (clean): Clean reg-x86-64-linux.c.
11552 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
11553 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
11554 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
11555 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
11556 point registers.
11557
11558 2006-08-08 Richard Sandiford <richard@codesourcery.com>
11559
11560 * server.c (terminal_fd): New variable.
11561 (old_foreground_pgrp): Likewise.
11562 (restore_old_foreground_pgrp): New function.
11563 (start_inferior): Record the terminal file descriptor in terminal_fd
11564 and its original foreground group in old_foreground_pgrp. Register
11565 restore_old_foreground_pgrp with atexit().
11566
11567 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
11568
11569 * server.c (handle_query): Correct qPart to qXfer.
11570
11571 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
11572
11573 * configure.ac: Check for more headers which are missing on
11574 Windows. Automatically supply -lwsock32 and USE_WIN32API.
11575 * configure.srv: Add Cygwin and mingw32.
11576 * remote-utils.c: Don't include headers unconditionally which
11577 are missing on mingw32. Include <winsock.h> for mingw32.
11578 (remote_open): Adjust for mingw32 support. Flush
11579 standard error after writing to it.
11580 (remote_close, putpkt_binary, input_interrupt, block_async_io)
11581 (unblock_async_io, enable_async_io, disable_async_io)
11582 (readchar, getpkt): Update for Winsock support.
11583 (prepare_resume_reply): Expect a protocol signal number.
11584 * server.c: Disable <sys/wait.h> on mingw32.
11585 (start_inferior): Adjust for mingw32 support. Flush
11586 standard error after writing to it.
11587 (attach_inferior): Likewise. Use protocol signal
11588 numbers.
11589 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
11590 and names.
11591 * win32-i386-low.c: New file.
11592 * Makefile.in (XM_CLIBS): Set.
11593 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
11594 (win32-i386-low.o): New dependency rule.
11595 * linux-low.c (linux_wait): Use target signal numbers.
11596 * target.h (struct target_ops): Doc fix.
11597 * server.h (target_signal_to_name): New prototype.
11598 * gdbreplay.c: Don't include headers unconditionally which
11599 are missing on mingw32. Include <winsock.h> for mingw32.
11600 (remote_close, remote_open): Adjust for Winsock support.
11601 * configure, config.in: Regenerated.
11602
11603 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
11604
11605 * server.c (decode_xfer_read, write_qxfer_response): New.
11606 (handle_query): Take a packet length argument. Handle
11607 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
11608 the qSupported response.
11609 (main): Update call to handle_query.
11610
11611 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
11612
11613 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
11614 (putpkt_binary): Renamed from putpkt and adjusted for binary
11615 data.
11616 (putpkt): New wrapper for putpkt_binary.
11617 (readchar): Don't mask off the high bit.
11618 (decode_X_packet): New function.
11619 * server.c (main): Call putpkt_binary if a handler sets the packet
11620 length. Save the length of the incoming packet. Handle 'X'.
11621 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
11622
11623 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
11624
11625 * server.c (handle_query): Handle qSupported.
11626
11627 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
11628
11629 * remote-utils.c (all_symbols_looked_up): New variable.
11630 (look_up_one_symbol): Check it.
11631 * server.h (look_up_one_symbol): New declaration.
11632 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
11633
11634 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
11635
11636 * Makefile.in (linux-arm-low.o): Update dependencies.
11637 * linux-arm-low.c: Include "gdb_proc_service.h".
11638 (PTRACE_GET_THREAD_AREA): Define.
11639 (ps_get_thread_area): New function.
11640
11641 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
11642
11643 * configure.srv (m68k*-*-uclinux*): New target.
11644 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
11645 (linux_resume_one_process): Remove extraneous cast.
11646 (linux_read_offsets): New.
11647 (linux_target_op): Add linux_read_offsets on mmuless systems.
11648 * server.c (handle_query): Add qOffsets logic.
11649 * target.h (struct target_ops): Add read_offsets.
11650
11651 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
11652
11653 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
11654 (PTRACE_GET_THREAD_AREA): Define.
11655 (ps_get_thread_area): New function.
11656 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
11657 (linux-x86-64-low.o): Update.
11658
11659 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
11660
11661 * configure.ac: Remove checks for prfpregset_t.
11662 * gdb_proc_service.h: New file.
11663 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
11664 new "gdb_proc_service.h".
11665 * proc-service.c: Likewise.
11666 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
11667 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
11668 * Makefile.in (gdb_proc_service_h): Updated.
11669 * configure, config.in: Regenerated.
11670
11671 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
11672
11673 * remote-utils.c (prepare_resume_reply): Move declaration
11674 of gdb_id_from_wait to the top of the block.
11675
11676 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
11677
11678 * linux-low.c (regsets_store_inferior_registers): Read the regset
11679 from the target before filling it.
11680
11681 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
11682
11683 * server.c (attach_inferior): Return SIGTRAP for a successful
11684 attach.
11685
11686 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
11687
11688 * Makefile.in (OBS): Add version.o.
11689 (STAGESTUFF): Delete.
11690 (version.o): Add dependencies.
11691 (version.c): Replace rule.
11692 (clean): Remove version.c.
11693 * server.c (gdbserver_version): New.
11694 (gdbserver_usage): Use printf.
11695 (main): Handle --version and --help.
11696 * server.h (version, host_name): Add declarations.
11697
11698 2005-12-23 Eli Zaretskii <eliz@gnu.org>
11699
11700 * linux-arm-low.c:
11701 * linux-arm-low.c:
11702 * inferiors.c:
11703 * i387-fp.h:
11704 * i387-fp.c:
11705 * gdbreplay.c:
11706 * regcache.c:
11707 * proc-service.c:
11708 * mem-break.h:
11709 * mem-break.c:
11710 * linux-x86-64-low.c:
11711 * linux-sh-low.c:
11712 * linux-s390-low.c:
11713 * linux-ppc64-low.c:
11714 * linux-ppc-low.c:
11715 * linux-mips-low.c:
11716 * linux-m68k-low.c:
11717 * linux-m32r-low.c:
11718 * linux-low.h:
11719 * linux-low.c:
11720 * linux-ia64-low.c:
11721 * linux-i386-low.c:
11722 * linux-crisv32-low.c:
11723 * thread-db.c:
11724 * terminal.h:
11725 * target.h:
11726 * target.c:
11727 * server.h:
11728 * server.c:
11729 * remote-utils.c:
11730 * regcache.h:
11731 * utils.c:
11732 * Makefile.in:
11733 * configure.ac:
11734 * gdbserver.1: Add (C) after Copyright. Update the FSF
11735 address.
11736
11737 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
11738
11739 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
11740 (arm_breakpoint_at): Recognize both breakpoints.
11741 (the_low_target): Use the correct breakpoint instruction.
11742
11743 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
11744
11745 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
11746 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
11747 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
11748 (the_low_target): Update.
11749
11750 2005-10-25 Andreas Schwab <schwab@suse.de>
11751
11752 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
11753
11754 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
11755 (ia64_num_regs): Reduce to 462.
11756
11757 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
11758
11759 * acinclude.m4: Correct quoting.
11760 * aclocal.m4: Regenerated.
11761
11762 Suggested by SZOKOVACS Robert <szo@ies.hu>:
11763 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
11764 (thread_db_init): Call thread_db_err_str.
11765 * configure.ac: Check for TD_VERSION.
11766 * config.in, configure: Regenerated.
11767
11768 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11769
11770 * server.h (error, fatal, warning): Add ATTR_FORMAT.
11771
11772 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
11773
11774 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
11775 is not available. Define HAVE_PTRACE_GETREGS if it is.
11776 * config.in, configure: Regenerated.
11777 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
11778 * linux-i386-low.c, linux-m68k-low.c: Update to use
11779 HAVE_PTRACE_GETREGS.
11780 * linux-low.c (regsets_fetch_inferior_registers)
11781 (regsets_store_inferior_registers): Only return 0 if we processed
11782 GENERAL_REGS.
11783 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
11784 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
11785
11786 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
11787
11788 * inferiors.c (struct thread_info): Add gdb_id.
11789 (add_thread): Add gdb_id argument.
11790 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
11791 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
11792 calls to add_thread.
11793 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
11794 * server.c (handle_query): Use thread_to_gdb_id.
11795 (handle_v_cont, main): Use gdb_id_to_thread_id.
11796 * server.h (add_thread): Update prototype.
11797 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
11798 prototypes.
11799
11800 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
11801
11802 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
11803 left-padded registers.
11804 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
11805 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
11806
11807 2005-07-01 Steve Ellcey <sje@cup.hp.com>
11808
11809 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
11810 * configure: Regenerate.
11811 * config.in: Regenerate.
11812 * server.h (NEED_DECLARATION_STRERROR):
11813 Replace with !HAVE_DECL_STRERROR.
11814
11815 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
11816
11817 * linux-low.c (linux_wait, linux_send_signal): Don't test
11818 an unsigned long variable for > 0 if it could be MAX_ULONG.
11819 * server.c (myresume): Likewise.
11820 * target.c (set_desired_inferior): Likewise.
11821
11822 2005-06-13 Mark Kettenis <kettenis@gnu.org>
11823
11824 * configure.ac: Simplify and improve check for socklen_t.
11825 * configure, config.in: Regenerate.
11826
11827 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
11828
11829 * acconfig.h: Remove.
11830 * configure.ac: Add a test for socklen_t. Use three-argument
11831 AC_DEFINE throughout.
11832 * config.in: Regenerated using autoheader 2.59.
11833 * configure: Regenerated.
11834
11835 * gdbreplay.c (socklen_t): Provide a default.
11836 (remote_open): Use socklen_t.
11837 * remote-utils.c (socklen_t): Provide a default.
11838 (remote_open): Use socklen_t.
11839 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
11840 unsigned char.
11841
11842 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
11843 char for buffers.
11844 * linux-low.c (linux_read_memory, linux_write_memory)
11845 (linux_read_auxv): Likewise.
11846 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
11847 (check_mem_write): Likewise.
11848 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
11849 Likewise.
11850 * regcache.c (struct inferior_rgcache_data, registers_to_string)
11851 (registers_from_string, register_data): Likewise.
11852 * server.c (handle_query, main): Likewise.
11853 * server.h (convert_ascii_to_int, convert_int_to_ascii)
11854 (decode_M_packet): Likewise.
11855 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
11856 * target.h (struct target_ops): Update read_memory, write_memory,
11857 and read_auxv.
11858 (read_inferior_memory, write_inferior_memory): Update.
11859 * linux-low.h (struct linux_target_ops): Change type of breakpoint
11860 to unsigned char *.
11861 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
11862 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
11863 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
11864 linux-s390-low.c, linux-sh-low.c: Update for changes in
11865 read_inferior_memory and the_low_target->breakpoint.
11866
11867 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
11868
11869 * Makefile.in (SFILES): Add linux-ppc64-low.c.
11870 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
11871 * configure.srv: Add powerpc64-*-linux*.
11872 * linux-ppc64-low.c: New file.
11873
11874 2005-05-23 Orjan Friberg <orjanf@axis.com>
11875
11876 * linux-cris-low.c: New file with support for CRIS.
11877 * linux-crisv32-low.c: Ditto for CRISv32.
11878 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
11879 (clean): Add reg-cris.c and reg-crisv32.c.
11880 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
11881 reg-crisv32.o, and reg-crisv32.c to make rules.
11882 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
11883 recognized targets.
11884
11885 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
11886
11887 * linux-low.c (fetch_register): Ensure buffer size is a multiple
11888 of sizeof (PTRACE_XFER_TYPE).
11889 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
11890
11891 2005-05-12 Orjan Friberg <orjanf@axis.com>
11892
11893 * target.h (struct target_ops): Add insert_watchpoint,
11894 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
11895 pointers for hardware watchpoint support.
11896 * linux-low.h (struct linux_target_ops): Ditto.
11897 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
11898 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
11899 to linux_target_ops.
11900 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
11901 reply packet.
11902 * server.c (main): Recognize 'Z' and 'z' packets.
11903
11904 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
11905
11906 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
11907 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
11908 (the_low_target): Add new members.
11909
11910 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
11911
11912 * proc-service.c (ps_lgetregs): Search all_processes instead of
11913 all_threads.
11914
11915 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
11916
11917 * server.c (start_inferior): Change return type to int.
11918 (attach_inferior): Change sigptr to int *.
11919 (handle_v_cont, handle_v_requests): Change signal to int *.
11920 (main): Change signal to int.
11921
11922 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
11923
11924 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
11925 * configure.srv: Add m32r*-*-linux*.
11926 * linux-m32r-low.c: New file.
11927
11928 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
11929
11930 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
11931
11932 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
11933
11934 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
11935 Take unsigned long arguments for PIDs.
11936 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
11937 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
11938 (wait_for_sigstop, linux_resume_one_process)
11939 (regsets_fetch_inferior_registers, linux_send_signal)
11940 (linux_read_auxv): Likewise. Update the types of variables holding
11941 PIDs. Update format string specifiers.
11942 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
11943 * remote-utils.c (prepare_resume_reply): Likewise.
11944 * server.c (cont_thread, general_thread, step_thread)
11945 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
11946 unsigned long.
11947 (handle_query): Update format specifiers.
11948 (handle_v_cont, main): Use strtoul for thread IDs.
11949 * server.h (struct inferior_list_entry): Use unsigned long for ID.
11950 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
11951 (general_thread, step_thread, thread_from_wait)
11952 (old_thread_from_wait): Update.
11953 * target.h (struct thread_resume): Use unsigned long for THREAD.
11954 (struct target_ops): Use unsigned long for arguments to attach and
11955 thread_alive.
11956
11957 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
11958
11959 * acinclude.m4: Include bfd/bfd.m4 directly.
11960 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
11961 <agriffis@toolchain.org>.
11962 * aclocal.m4, configure: Regenerated.
11963
11964 2005-01-07 Andrew Cagney <cagney@gnu.org>
11965
11966 * configure.ac: Rename configure.in, require autoconf 2.59.
11967 * configure: Re-generate.
11968
11969 2004-12-08 Daniel Jacobowitz <dan@debian.org>
11970
11971 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
11972 LIBS when finished.
11973 * aclocal.m4: Regenerated.
11974 * configure: Regenerated.
11975
11976 2004-11-21 Andreas Schwab <schwab@suse.de>
11977
11978 * linux-m68k-low.c (m68k_num_gregs): Define.
11979 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
11980 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
11981 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
11982 (m68k_breakpoint_at): New. Add to the_low_target.
11983
11984 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
11985 srv_linux_thread_db to yes.
11986
11987 2004-10-20 Joel Brobecker <brobecker@gnat.com>
11988
11989 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
11990 (ARCH_SET_FS): Likewise.
11991 (ARCH_GET_FS): Likewise.
11992 (ARCH_GET_GS): Likewise.
11993
11994 2004-10-16 Daniel Jacobowitz <dan@debian.org>
11995
11996 * linux-i386-low.c (ps_get_thread_area): New.
11997 * linux-x86-64-low.c (ps_get_thread_area): New.
11998 * linux-low.c: Include <sys/syscall.h>.
11999 (linux_kill_one_process): Don't kill the first thread here.
12000 (linux_kill): Kill the first thread here.
12001 (kill_lwp): New function.
12002 (send_sigstop, linux_send_signal): Use it.
12003 * proc-service.c: Clean up #ifdefs.
12004 (fpregset_info): Delete.
12005 (ps_lgetregs): Update and enable implementation.
12006 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
12007 implementations.
12008 * remote-utils.c (struct sym_cache, symbol_cache): New.
12009 (input_interrupt): Print a clearer message.
12010 (async_io_enabled): New variable.
12011 (enable_async_io, disable_async_io): Use it. Update comments.
12012 (look_up_one_symbol): Use the symbol cache.
12013 * thread-db.c (thread_db_look_up_symbols): New function.
12014 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
12015
12016 2004-10-16 Daniel Jacobowitz <dan@debian.org>
12017
12018 * configure.in: Test for -rdynamic.
12019 * configure: Regenerated.
12020 * Makefile (INTERNAL_LDFLAGS): New.
12021 (gdbserver, gdbreplay): Use it.
12022
12023 2004-09-02 Andrew Cagney <cagney@gnu.org>
12024
12025 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
12026
12027 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
12028
12029 * linux-low.c (linux_wait): Clear all_processes list also.
12030
12031 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
12032
12033 * linux-low.c: Include <errno.h>. Remove extern declaration of
12034 errno.
12035
12036 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
12037
12038 * gdbreplay.c, server.h, utils.c: Update copyright years.
12039
12040 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
12041
12042 * server.c (main): Print child status or termination signal from
12043 variable 'signal', not 'sig'.
12044
12045 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
12046
12047 * linux-low.c (linux_read_memory): Change return type to
12048 int. Check for and return error from ptrace().
12049 * target.c (read_inferior_memory): Change return type to int. Pass
12050 back return status from the_target->read_memory().
12051 * target.h (struct target_ops): Adapt *read_memory() prototype.
12052 Update comment.
12053 (read_inferior_memory): Adapt prototype.
12054 * server.c (main): Return an error packet if
12055 read_inferior_memory() returns an error.
12056
12057 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
12058
12059 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
12060 Unify with other clean targets.
12061
12062 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
12063
12064 * server.c (handle_v_cont): Call set_desired_inferior.
12065
12066 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
12067
12068 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
12069
12070 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
12071
12072 * linux-low.c (linux_wait): Unblock async I/O.
12073 (linux_resume): Block and enable async I/O.
12074 * remote-utils.c (block_async_io, unblock_async_io): New functions.
12075 * server.h (block_async_io, unblock_async_io): Add prototypes.
12076
12077 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
12078
12079 * remote-utils.c (remote_open): Print a status notice after
12080 opening a TCP port.
12081 * server.c (attach_inferior): Print a status notice after
12082 attaching.
12083
12084 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
12085
12086 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
12087
12088 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
12089
12090 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
12091 error packet.
12092 * server.c, target.h: Update copyright years.
12093
12094 2004-02-25 Roland McGrath <roland@redhat.com>
12095
12096 * target.h (struct target_ops): New member `read_auxv'.
12097 * server.c (handle_query): Handle qPart:auxv:read: query using that.
12098 * linux-low.c (linux_read_auxv): New function.
12099 (linux_target_ops): Initialize `read_auxv' member to that.
12100
12101 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
12102
12103 Committed by Jim Blandy <jimb@redhat.com>.
12104
12105 * linux-s390-low.c (s390_num_regs): Update.
12106 (s390_regmap): Remove control registers. Use __s390x__ predefine
12107 instead of GPR_SIZE to distiguish s390 and s390x targets.
12108
12109 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
12110
12111 * linux-low.c: Update copyright year.
12112 (check_removed_breakpoint): Clear pending_is_breakpoint.
12113 (linux_set_resume_request, linux_queue_one_thread)
12114 (resume_status_pending_p): New functions.
12115 (linux_continue_one_thread): Use process->resume.
12116 (linux_resume): Only resume threads if there are no pending events.
12117 * linux-low.h (struct process_info): Add resume request
12118 pointer.
12119
12120 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
12121
12122 * regcache.c (new_register_cache): Clear the allocated register
12123 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
12124
12125 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
12126
12127 * linux-low.c (linux_resume): Take a struct thread_resume *
12128 argument.
12129 (linux_wait): Update call.
12130 (resume_ptr): New static variable.
12131 (linux_continue_one_thread): Renamed from
12132 linux_continue_one_process. Use resume_ptr.
12133 (linux_resume): Use linux_continue_one_thread.
12134 * server.c (handle_v_cont, handle_v_requests): New functions.
12135 (myresume): New function.
12136 (main): Handle 'v' case.
12137 * target.h (struct thread_resume): New type.
12138 (struct target_ops): Change argument of "resume" to struct
12139 thread_resume *.
12140 (myresume): Delete macro.
12141
12142 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
12143
12144 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
12145 (uninstall): Support DESTDIR.
12146
12147 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
12148
12149 * configure.srv: Add xscale*linux copy of arm*linux entry.
12150
12151 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
12152
12153 * linux-arm-low.c (arm_reinsert_addr): New function.
12154 (the_low_target): Add arm_reinsert_addr.
12155
12156 2003-07-08 Mark Kettenis <kettenis@gnu.org>
12157
12158 * mem-break.c: Remove whitespace at end of file.
12159
12160 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
12161
12162 * configure.in: Check whether we need to prototype strerror.
12163 * server.h: Optionally prototype strerror.
12164 * gdbreplay.c (perror_with_name): Use strerror.
12165 * linux-low.c (linux_attach_lwp): Use strerror.
12166 * utils.c (perror_with_name): Use strerror.
12167 * config.in, configure: Regenerated.
12168
12169 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
12170
12171 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
12172 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
12173
12174 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
12175
12176 * Makefile.in (SFILES): Update.
12177 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
12178 low-sun3.c: Remove files.
12179
12180 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
12181
12182 * linux-low.c: Move comment to linux_thread_alive where it belonged.
12183 (linux_detach_one_process, linux_detach): New functions.
12184 (linux_target_ops): Add linux_detach.
12185 * server.c (main): Handle 'D' packet.
12186 * target.h (struct target_ops): Add "detach" member.
12187 (detach_inferior): Define.
12188
12189 2003-06-13 Mark Kettenis <kettenis@gnu.org>
12190
12191 From Kelley Cook <kelleycook@wideopenwest.com>:
12192 * configure.srv: Accept i[34567]86 variants.
12193
12194 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
12195
12196 * linux-low.c (linux_wait_for_event): Correct comment typos.
12197 (linux_resume_one_process): Call check_removed_breakpoint.
12198 (linux_send_signal): New function.
12199 (linux_target_ops): Add linux_send_signal.
12200 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
12201 of kill.
12202 * target.h (struct target_ops): Add send_signal.
12203
12204 2003-05-29 Jim Blandy <jimb@redhat.com>
12205
12206 * linux-low.c (usr_store_inferior_registers): Transfer buf in
12207 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
12208 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
12209 away part of the register's value.
12210
12211 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
12212
12213 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
12214 (linux_wait_for_event, linux_init_signals): Likewise.
12215
12216 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
12217
12218 * configure.in: Check for stdlib.h.
12219 * configure: Regenerated.
12220 * config.in: Regenerated.
12221
12222 2003-01-04 Andreas Schwab <schwab@suse.de>
12223
12224 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
12225
12226 2003-01-02 Andrew Cagney <ac131313@redhat.com>
12227
12228 * Makefile.in: Remove obsolete code.
12229
12230 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
12231
12232 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
12233 defined(PT_FPR0_HI).
12234
12235 2002-11-17 Stuart Hughes <seh@zee2.com>
12236
12237 * linux-arm-low.c (arm_num_regs): Increase.
12238 (arm_regmap): Include status register.
12239
12240 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
12241
12242 * linux-low.c (register_addr): Remove incorrect -1 check.
12243
12244 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
12245
12246 * linux-low.c (linux_create_inferior): Call setpgid. Return
12247 the new PID.
12248 (unstopped_p, linux_signal_pid): Remove.
12249 (linux_target_ops): Remove linux_signal_pid.
12250 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
12251 global instead of target method.
12252 * target.h (struct target_ops): Remove signal_pid. Update comment
12253 for create_inferior.
12254 * server.c (signal_pid): New variable.
12255 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
12256 gdbserver. Set the child to be the foreground process group.
12257 (attach_inferior): Set signal_pid.
12258
12259 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
12260
12261 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
12262
12263 2002-08-20 Jim Blandy <jimb@redhat.com>
12264
12265 * Makefile.in (LDFLAGS): Allow the configure script to establish a
12266 default for this.
12267
12268 2002-08-01 Andrew Cagney <cagney@redhat.com>
12269
12270 * Makefile.in: Make chill references obsolete.
12271
12272 2002-07-24 Kevin Buettner <kevinb@redhat.com>
12273
12274 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
12275 * configure: Regenerate.
12276 * config.in: Regenerate.
12277
12278 2002-07-09 David O'Brien <obrien@FreeBSD.org>
12279
12280 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
12281 (perror_with_name, remote_close, remote_open, expect, play): Static.
12282
12283 2002-07-04 Michal Ludvig <mludvig@suse.cz>
12284
12285 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
12286 byte offsets instead of an array of indexes.
12287 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
12288
12289 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
12290
12291 * regcache.c: Add comment.
12292
12293 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
12294
12295 * thread-db.c: New file.
12296 * proc-service.c: New file.
12297 * acinclude.m4: New file.
12298 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
12299 proc-service.o, and thread-db.o.
12300 (linux-low.o): Add USE_THREAD_DB.
12301 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
12302 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
12303 * aclocal.m4: Regenerated.
12304 * config.in: Regenerated.
12305 * configure: Regenerated.
12306 * configure.in: Check for proc_service.h, sys/procfs.h,
12307 thread_db.h, and linux/elf.h headrs.
12308 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
12309 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
12310 Check for -lthread_db and thread support.
12311 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
12312 PowerPC, and SuperH.
12313 * i387-fp.c: Constify arguments.
12314 * i387-fp.h: Likewise.
12315 * inferiors.c: (struct thread_info): Renamed from
12316 `struct inferior_info'. Remove PID member. Use generic inferior
12317 list header. All uses updated.
12318 (inferiors, signal_pid): Removed.
12319 (all_threads): New variable.
12320 (get_thread): Define.
12321 (add_inferior_to_list): New function.
12322 (for_each_inferior): New function.
12323 (change_inferior_id): New function.
12324 (add_inferior): Removed.
12325 (remove_inferior): New function.
12326 (add_thread): New function.
12327 (free_one_thread): New function.
12328 (remove_thread): New function.
12329 (clear_inferiors): Use for_each_inferior and free_one_thread.
12330 (find_inferior): New function.
12331 (find_inferior_id): New function.
12332 (inferior_target_data): Update argument type.
12333 (set_inferior_target_data): Likewise.
12334 (inferior_regcache_data): Likewise.
12335 (set_inferior_regcache_data): Likewise.
12336 * linux-low.c (linux_bp_reinsert): Remove.
12337 (all_processes, stopping_threads, using_thrads)
12338 (struct pending_signals, debug_threads, pid_of): New.
12339 (inferior_pid): Replace with macro.
12340 (struct inferior_linux_data): Remove.
12341 (get_stop_pc, add_process): New functions.
12342 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
12343 Use add_process and add_thread.
12344 (linux_attach_lwp): New function, based on old linux_attach. Use
12345 add_process and add_thread. Set stop_expected for new threads.
12346 (linux_attach): New function.
12347 (linux_kill_one_process): New function.
12348 (linux_kill): Kill all LWPs.
12349 (linux_thread_alive): Use find_inferior_id.
12350 (check_removed_breakpoints, status_pending_p): New functions.
12351 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
12352 Update. Use WNOHANG. Wait for cloned processes also. Update process
12353 struct for the found process.
12354 (linux_wait_for_event): New function.
12355 (linux_wait): Use it. Support LWPs.
12356 (send_sigstop, wait_for_sigstop, stop_all_processes)
12357 (linux_resume_one_process, linux_continue_one_process): New functions.
12358 (linux_resume): Support LWPs.
12359 (REGISTER_RAW_SIZE): Remove.
12360 (fetch_register): Use register_size instead. Call supply_register.
12361 (usr_store_inferior_registers): Likewise. Call collect_register.
12362 Fix recursive case.
12363 (regsets_fetch_inferior_registers): Improve error message.
12364 (regsets_store_inferior_registers): Add debugging.
12365 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
12366 (unstopped_p, linux_signal_pid): New functions.
12367 (linux_target_ops): Add linux_signal_pid.
12368 (linux_init_signals): New function.
12369 (initialize_low): Call it. Initialize using_threads.
12370 * regcache.c (inferior_regcache_data): Add valid
12371 flag.
12372 (get_regcache): Fetch registers lazily. Add fetch argument
12373 and update all callers.
12374 (regcache_invalidate_one, regcache_invalidate): New
12375 functions.
12376 (new_register_cache): Renamed from create_register_cache.
12377 Return the new regcache.
12378 (free_register_cache): Change argument to a void *.
12379 (registers_to_string, registers_from_string): Call get_regcache
12380 with fetch flag set.
12381 (register_data): Make static. Pass fetch flag to get_regcache.
12382 (supply_register): Call get_regcache with fetch flag clear.
12383 (collect_register): Call get_regcache with fetch flag set.
12384 (collect_register_as_string): New function.
12385 * regcache.h: Update.
12386 * remote-utils.c (putpkt): Flush after debug output and use
12387 stderr.
12388 Handle input interrupts while waiting for an ACK.
12389 (input_interrupt): Use signal_pid method.
12390 (getpkt): Flush after debug output and use stderr.
12391 (outreg): Use collect_register_as_string.
12392 (new_thread_notify, dead_thread_notify): New functions.
12393 (prepare_resume_reply): Check using_threads. Set thread_from_wait
12394 and general_thread.
12395 (look_up_one_symbol): Flush after debug output.
12396 * server.c (step_thread, server_waiting): New variables.
12397 (start_inferior): Don't use signal_pid. Update call to mywait.
12398 (attach_inferior): Update call to mywait.
12399 (handle_query): Handle qfThreadInfo and qsThreadInfo.
12400 (main): Don't fetch/store registers explicitly. Use
12401 set_desired_inferior. Support proposed ``Hs'' packet. Update
12402 calls to mywait.
12403 * server.h: Update.
12404 (struct inferior_list, struct_inferior_list_entry): New.
12405 * target.c (set_desired_inferior): New.
12406 (write_inferior_memory): Constify.
12407 (mywait): New function.
12408 * target.h: Update.
12409 (struct target_ops): New signal_pid method.
12410 (mywait): Removed macro, added prototype.
12411
12412 * linux-low.h (regset_func): Removed.
12413 (regset_fill_func, regset_store_func): New.
12414 (enum regset_type): New.
12415 (struct regset_info): Add type field. Use new operation types.
12416 (struct linux_target_ops): stop_pc renamed to get_pc.
12417 Add decr_pc_after_break and breakpoint_at.
12418 (get_process, get_thread_proess, get_process_thread)
12419 (strut process_info, all_processes, linux_attach_lwp)
12420 (thread_db_init): New.
12421
12422 * linux-arm-low.c (arm_get_pc, arm_set_pc,
12423 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
12424 (the_low_target): Add new members.
12425 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
12426 (i386_store_fpxregset): Constify.
12427 (target_regsets): Add new kind identifier.
12428 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
12429 (i386_set_pc): Add debugging.
12430 (i386_breakpoint_at): New function.
12431 (the_low_target): Add new members.
12432 * linux-mips-low.c (mips_get_pc, mips_set_pc)
12433 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
12434 (mips_breakpoint_at): New.
12435 (the_low_target): Add new members.
12436 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
12437 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
12438 (the_low_target): Add new members.
12439 * linux-sh-low.c (sh_get_pc, sh_set_pc)
12440 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
12441 (the_low_target): Add new members.
12442 * linux-x86-64-low.c (target_regsets): Add new kind
12443 identifier.
12444
12445 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
12446
12447 From Martin Pool <mbp@samba.org>:
12448 * server.c (gdbserver_usage): New function.
12449 (main): Call it.
12450
12451 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
12452
12453 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
12454 stop_at -> stop_pc.
12455
12456 2002-05-04 Andrew Cagney <ac131313@redhat.com>
12457
12458 * Makefile.in: Remove obsolete code.
12459
12460 2002-04-24 Michal Ludvig <mludvig@suse.cz>
12461
12462 * linux-low.c (regsets_fetch_inferior_registers),
12463 (regsets_store_inferior_registers): Removed cast to int from
12464 ptrace() calls.
12465 * regcache.h: Added declaration of struct inferior_info.
12466
12467 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
12468
12469 * inferiors.c (struct inferior_info): Add regcache_data.
12470 (add_inferior): Call create_register_cache.
12471 (clear_inferiors): Call free_register_cache.
12472 (inferior_regcache_data, set_inferior_regcache_data): New functions.
12473 * regcache.c (struct inferior_regcache_data): New.
12474 (registers): Remove.
12475 (get_regcache): New function.
12476 (create_register_cache, free_register_cache): New functions.
12477 (set_register_cache): Don't initialize the register cache here.
12478 (registers_to_string, registers_from_string, register_data): Call
12479 get_regcache.
12480 * regcache.h: Add prototypes.
12481 * server.h: Likewise.
12482
12483 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
12484
12485 * mem-break.c: New file.
12486 * mem-break.h: New file.
12487 * Makefile.in: Add mem-break.o rule; update server.h
12488 dependencies.
12489 * inferiors.c (struct inferior_info): Add target_data
12490 member.
12491 (clear_inferiors): Free target_data member if set.
12492 (inferior_target_data, set_inferior_target_data): New functions.
12493 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
12494 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
12495 * linux-low.c (linux_bp_reinsert): New variable.
12496 (struct inferior_linux_data): New.
12497 (linux_create_inferior): Use set_inferior_target_data.
12498 (linux_attach): Likewise. Call add_inferior.
12499 (linux_wait_for_one_inferior): New function.
12500 (linux_wait): Call it.
12501 (linux_write_memory): Add const.
12502 (initialize_low): Call set_breakpoint_data.
12503 * linux-low.h (struct linux_target_ops): Add breakpoint
12504 handling members.
12505 * server.c (attach_inferior): Remove extra add_inferior
12506 call.
12507 * server.h: Include mem-break.h. Update inferior.c
12508 prototypes.
12509 * target.c (read_inferior_memory)
12510 (write_inferior_memory): New functions.
12511 * target.h (read_inferior_memory)
12512 (write_inferior_memory): Change macros to prototypes.
12513 (struct target_ops): Update comments. Add const to write_memory
12514 definition.
12515
12516 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
12517
12518 * linux-low.c (usr_store_inferior_registers): Support
12519 registers which are allowed to fail to store.
12520 * linux-low.h (linux_target_ops): Likewise.
12521 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
12522 (ppc_cannot_store_register): FPSCR may not be storable.
12523
12524 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
12525
12526 * server.h: Include <string.h> if HAVE_STRING_H.
12527 * ChangeLog: Correct paths in last ChangeLog entry.
12528
12529 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
12530
12531 * linux-low.h: Remove obsolete prototypes.
12532 (struct linux_target_ops): New.
12533 (extern the_low_target): New.
12534 * linux-low.c (num_regs, regmap): Remove declarations.
12535 (register_addr): Use the_low_target explicitly.
12536 (fetch_register): Likewise.
12537 (usr_fetch_inferior_registers): Likewise.
12538 (usr_store_inferior_registers): Likewise.
12539 * linux-arm-low.c (num_regs): Remove.
12540 (arm_num_regs): Define.
12541 (arm_regmap): Renamed from regmap, made static.
12542 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
12543 made static.
12544 (arm_cannot_store_register): Renamed from cannot_store_register,
12545 made static.
12546 (the_low_target): New.
12547 * linux-i386-low.c (num_regs): Remove.
12548 (i386_num_regs): Define.
12549 (i386_regmap): Renamed from regmap, made static.
12550 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
12551 made static.
12552 (i386_cannot_store_register): Renamed from cannot_store_register,
12553 made static.
12554 (the_low_target): New.
12555 * linux-ia64-low.c (num_regs): Remove.
12556 (ia64_num_regs): Define.
12557 (ia64_regmap): Renamed from regmap, made static.
12558 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
12559 made static.
12560 (ia64_cannot_store_register): Renamed from cannot_store_register,
12561 made static.
12562 (the_low_target): New.
12563 * linux-m68k-low.c (num_regs): Remove.
12564 (m68k_num_regs): Define.
12565 (m68k_regmap): Renamed from regmap, made static.
12566 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
12567 made static.
12568 (m68k_cannot_store_register): Renamed from cannot_store_register,
12569 made static.
12570 (the_low_target): New.
12571 * linux-mips-low.c (num_regs): Remove.
12572 (mips_num_regs): Define.
12573 (mips_regmap): Renamed from regmap, made static.
12574 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
12575 made static.
12576 (mips_cannot_store_register): Renamed from cannot_store_register,
12577 made static.
12578 (the_low_target): New.
12579 * linux-ppc-low.c (num_regs): Remove.
12580 (ppc_num_regs): Define.
12581 (ppc_regmap): Renamed from regmap, made static.
12582 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
12583 made static.
12584 (ppc_cannot_store_register): Renamed from cannot_store_register,
12585 made static.
12586 (the_low_target): New.
12587 * linux-s390-low.c (num_regs): Remove.
12588 (s390_num_regs): Define.
12589 (s390_regmap): Renamed from regmap, made static.
12590 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
12591 made static.
12592 (s390_cannot_store_register): Renamed from cannot_store_register,
12593 made static.
12594 (the_low_target): New.
12595 * linux-sh-low.c (num_regs): Remove.
12596 (sh_num_regs): Define.
12597 (sh_regmap): Renamed from regmap, made static.
12598 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
12599 made static.
12600 (sh_cannot_store_register): Renamed from cannot_store_register,
12601 made static.
12602 (the_low_target): New.
12603 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
12604 (the_low_target): New.
12605
12606 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
12607
12608 * Makefile.in: Add stamp-h target.
12609 * configure.in: Create stamp-h.
12610 * configure: Regenerated.
12611
12612 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
12613
12614 * inferiors.c: New file.
12615 * target.c: New file.
12616 * target.h: New file.
12617 * Makefile.in: Add target.o and inferiors.o. Update
12618 dependencies.
12619 * linux-low.c (inferior_pid): New static variable,
12620 moved from server.c.
12621 (linux_create_inferior): Renamed from create_inferior.
12622 Call add_inferior. Return 0 on success instead of a PID.
12623 (linux_attach): Renamed from myattach.
12624 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
12625 (linux_thread_alive): Renamed from mythread_alive.
12626 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
12627 child dies.
12628 (linux_resume): Renamed from myresume. Add missing ``return 0''.
12629 (regsets_store_inferior_registers): Correct error message.
12630 Add missing ``return 0''.
12631 (linux_fetch_registers): Renamed from fetch_inferior_registers.
12632 (linux_store_registers): Renamed from store_inferior_registers.
12633 (linux_read_memory): Renamed from read_inferior_memory.
12634 (linux_write_memory): Renamed from write_inferior_memory.
12635 (linux_target_ops): New structure.
12636 (initialize_low): Call set_target_ops ().
12637 * remote-utils.c (unhexify): New function.
12638 (hexify): New function.
12639 (input_interrupt): Send signals to ``signal_pid''.
12640 * server.c (inferior_pid): Remove.
12641 (start_inferior): Update create_inferior call.
12642 (attach_inferior): Call add_inferior.
12643 (handle_query): New function.
12644 (main): Call handle_query for `q' packets.
12645 * server.h: Include "target.h". Remove obsolete prototypes.
12646 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
12647
12648 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
12649
12650 * Makefile.in: Add WARN_CFLAGS. Update configury
12651 dependencies.
12652 * configure.in: Check for <string.h>
12653 * configure: Regenerate.
12654 * config.in: Regenerate.
12655 * gdbreplay.c: Include needed system headers.
12656 (remote_open): Remove strchr prototype.
12657 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
12658 * regcache.c (supply_register): Change buf argument to const void *.
12659 (supply_register_by_name): Likewise.
12660 (collect_register): Change buf argument to void *.
12661 (collect_register_by_name): Likewise.
12662 * regcache.h: Add missing prototypes.
12663 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
12664 * server.c (handle_query): New function.
12665 (attached): New static variable, moved out of main.
12666 (main): Quiet longjmp clobber warnings.
12667 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
12668 * utils.c (error): Remove NORETURN.
12669 (fatal): Likewise.
This page took 0.310634 seconds and 4 git commands to generate.