gdbserver arm: Add casts
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
1 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2
3 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
4 (arm_store_gregset): Likewise.
5 * linux-arm-low.c (arm_get_hwcap): Likewise.
6 (arm_read_description): Likewise.
7
8 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9
10 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
11
12 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
13
14 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
15 (ppc_fill_vsxregset): Likewise.
16 (ppc_store_vsxregset): Likewise.
17 (ppc_fill_vrregset): Likewise.
18 (ppc_store_vrregset): Likewise.
19 (ppc_fill_evrregset): Likewise.
20 (ppc_store_evrregset): Likewise.
21
22 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
23
24 * linux-ppc-low.c (ppc_usrregs_info): Remove
25 forward-declaration.
26 (ppc_arch_setup): Move lower in file.
27
28 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
29
30 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
31 (ps_pdwrite): Likewise.
32
33 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
34
35 * linux-arm-low.c (arm_new_thread): Move pointer dereference
36 to after assert checks.
37
38 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
39
40 * proc-service.c (ps_pdread): Add/adjust casts.
41 (ps_pdwrite): Add/adjust casts.
42
43 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
44
45 * server.c (handle_search_memory_1): Cast return value of
46 memmem.
47
48 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
49
50 * server.c (write_qxfer_response): Change type of data to
51 gdb_byte *.
52
53 2015-10-29 Pedro Alves <palves@redhat.com>
54
55 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
56
57 2015-10-29 Pedro Alves <palves@redhat.com>
58
59 * tracepoint.c (clear_installed_tracepoints): Add casts.
60
61 2015-10-29 Pedro Alves <palves@redhat.com>
62
63 * server.c (handle_v_cont, process_serial_event): Add enum
64 gdb_signal casts to signal parsing code.
65
66 2015-10-29 Pedro Alves <palves@redhat.com>
67
68 * linux-low.h (NULL_REGSET): Define.
69 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
70 * linux-arm-low.c (arm_regsets): Likewise.
71 * linux-crisv32-low.c (cris_regsets): Likewise.
72 * linux-m68k-low.c (m68k_regsets): Likewise.
73 * linux-mips-low.c (mips_regsets): Likewise.
74 * linux-nios2-low.c (nios2_regsets): Likewise.
75 * linux-ppc-low.c (ppc_regsets): Likewise.
76 * linux-s390-low.c (s390_regsets): Likewise.
77 * linux-sh-low.c (sh_regsets): Likewise.
78 * linux-sparc-low.c (sparc_regsets): Likewise.
79 * linux-tic6x-low.c (tic6x_regsets): Likewise.
80 * linux-tile-low.c (tile_regsets): Likewise.
81 * linux-x86-low.c (x86_regsets): Likewise.
82 * linux-xtensa-low.c (xtensa_regsets): Likewise.
83
84 2015-10-29 Pedro Alves <palves@redhat.com>
85
86 * linux-low.h (NULL_REGSET): Define.
87 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
88 * linux-arm-low.c (arm_regsets): Likewise.
89 * linux-crisv32-low.c (cris_regsets): Likewise.
90 * linux-m68k-low.c (m68k_regsets): Likewise.
91 * linux-mips-low.c (mips_regsets): Likewise.
92 * linux-nios2-low.c (nios2_regsets): Likewise.
93 * linux-ppc-low.c (ppc_regsets): Likewise.
94 * linux-s390-low.c (s390_regsets): Likewise.
95 * linux-sh-low.c (sh_regsets): Likewise.
96 * linux-sparc-low.c (sparc_regsets): Likewise.
97 * linux-tic6x-low.c (tic6x_regsets): Likewise.
98 * linux-tile-low.c (tile_regsets): Likewise.
99 * linux-x86-low.c (x86_regsets): Likewise.
100 * linux-xtensa-low.c (xtensa_regsets): Likewise.
101
102 2015-10-26 Doug Evans <dje@google.com>
103
104 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
105
106 2015-10-26 Doug Evans <dje@google.com>
107
108 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
109
110 2015-10-26 Doug Evans <dje@google.com>
111
112 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
113 for debug_printf.
114 (attach_thread, find_new_threads_callback): Ditto.
115
116 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
117
118 * mem-break.h (set_breakpoint_data): Remove.
119
120 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
121
122 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
123 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
124 (initialize_low): Remove set_breakpoint_data call.
125 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
126 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
127 (initialize_low): Remove set_breakpoint_data call.
128 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
129 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
130 (initialize_low): Remove set_breakpoint_data call.
131
132 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
133
134 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
135 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
136 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
137 * target.h (target_breakpoint_kind_from_pc): New macro.
138
139 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
140
141 * linux-low.c (default_breakpoint_kind_from_pc): New function.
142 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
143 the default breakpoint kind.
144
145 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
146
147 * linux-arm-low.c (arm_supports_z_point_type): Add software
148 breakpoint support.
149
150 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
151
152 * linux-arm-low.c: Refactor breakpoint definitions.
153 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
154 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
155
156 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
157
158 * Makefile.in: Add arm.c/o.
159 * configure.srv: Likewise.
160 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
161 (arm_breakpoint_kind_from_pc): New function.
162 (arm_sw_breakpoint_from_kind): Return proper kind.
163 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
164
165 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
166
167 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
168 removal.
169 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
170 (struct raw_breakpoint) <size>: Remove.
171 (struct raw_breakpoint) <kind>: Add.
172 (bp_size): New function.
173 (bp_opcode): Likewise.
174 (find_raw_breakpoint_at): Adjust for kind.
175 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
176 (remove_memory_breakpoint): Adjust for kind call bp_size.
177 (set_raw_breakpoint_at): Adjust for kind.
178 (set_breakpoint): Likewise.
179 (set_breakpoint_at): Call breakpoint_kind_from_pc.
180 (delete_raw_breakpoint): Adjust for kind.
181 (delete_breakpoint): Likewise.
182 (find_gdb_breakpoint): Likewise.
183 (set_gdb_breakpoint_1): Likewise.
184 (set_gdb_breakpoint): Likewise.
185 (delete_gdb_breakpoint_1): Likewise.
186 (delete_gdb_breakpoint): Likewise.
187 (uninsert_raw_breakpoint): Likewise.
188 (reinsert_raw_breakpoint): Likewise.
189 (set_breakpoint_data): Remove.
190 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
191 (check_mem_read): Adjust for kind call bp_size.
192 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
193 (clone_one_breakpoint): Adjust for kind.
194 * mem-break.h (set_gdb_breakpoint): Likewise.
195 (delete_gdb_breakpoint): Likewise.
196 * server.c (process_serial_event): Likewise.
197
198 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
199
200 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
201 (struct linux_target_ops) <breakpoint>: Remove.
202 (struct linux_target_ops) <breakpoint_len>: Remove.
203 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
204 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
205 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
206 (arm_sw_breakpoint_from_kind): New function.
207 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
208 (struct linux_target_ops) <breakpoint>: Remove.
209 (struct linux_target_ops) <breakpoint_len>: Remove.
210 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
211 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
212 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
213 (struct linux_target_ops) <breakpoint>: Remove.
214 (struct linux_target_ops) <breakpoint_len>: Remove.
215 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
216 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
217 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
218 (struct linux_target_ops) <breakpoint>: Remove.
219 (struct linux_target_ops) <breakpoint_len>: Remove.
220 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
221 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
222 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
223 and sw_breakpoint_from_kind to increment the pc.
224 (linux_breakpoint_kind_from_pc): New function.
225 (linux_sw_breakpoint_from_kind): New function.
226 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
227 (initialize_low): Call breakpoint_kind_from_pc and
228 sw_breakpoint_from_kind to replace breakpoint_data/len.
229 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
230 New field.
231 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
232 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
233 (struct linux_target_ops) <breakpoint>: Remove.
234 (struct linux_target_ops) <breakpoint_len>: Remove.
235 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
236 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
237 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
238 (struct linux_target_ops) <breakpoint>: Remove.
239 (struct linux_target_ops) <breakpoint_len>: Remove.
240 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
241 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
242 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
243 (struct linux_target_ops) <breakpoint>: Remove.
244 (struct linux_target_ops) <breakpoint_len>: Remove.
245 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
246 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
247 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
248 (struct linux_target_ops) <breakpoint>: Remove.
249 (struct linux_target_ops) <breakpoint_len>: Remove.
250 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
251 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
252 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
253 (struct linux_target_ops) <breakpoint>: Remove.
254 (struct linux_target_ops) <breakpoint_len>: Remove.
255 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
256 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
257 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
258 (struct linux_target_ops) <breakpoint>: Remove.
259 (struct linux_target_ops) <breakpoint_len>: Remove.
260 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
261 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
262 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
263 (struct linux_target_ops) <breakpoint>: Remove.
264 (struct linux_target_ops) <breakpoint_len>: Remove.
265 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
266 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
267 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
268 (struct linux_target_ops) <breakpoint>: Remove.
269 (struct linux_target_ops) <breakpoint_len>: Remove.
270 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
271 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
272 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
273 (struct linux_target_ops) <breakpoint>: Remove.
274 (struct linux_target_ops) <breakpoint_len>: Remove.
275 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
276 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
277 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
278 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
279 (struct linux_target_ops) <breakpoint>: Remove.
280 (struct linux_target_ops) <breakpoint_len>: Remove.
281 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
282 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
283 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
284 (struct linux_target_ops) <breakpoint>: Remove.
285 (struct linux_target_ops) <breakpoint_len>: Remove.
286 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
287 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
288
289 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
290
291 * linux-cris-low.c (cris_get_pc): Remove void arg.
292
293 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
294
295 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
296 variable name.
297
298 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
299
300 * inferiors.c (thread_pid_matches_callback): New function.
301 (find_thread_process): New function.
302 (remove_thread): Reset current_thread.
303 (remove_process): Assert threads have been removed first.
304
305 2015-10-15 Yao Qi <yao.qi@linaro.org>
306
307 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
308 if it is 3.
309 (aarch64_remove_point): Likewise.
310 * regcache.c (regcache_register_size): New function.
311
312 2015-10-12 Yao Qi <yao.qi@linaro.org>
313
314 * linux-aarch64-low.c: Update all callers as emit_load_store
315 is renamed to aarch64_emit_load_store.
316
317 2015-10-12 Yao Qi <yao.qi@linaro.org>
318
319 * linux-aarch64-low.c: Update all callers of function renaming
320 from emit_insn to aarch64_emit_insn.
321
322 2015-10-12 Yao Qi <yao.qi@linaro.org>
323
324 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
325 arch/aarch64-insn.h.
326 (struct aarch64_memory_operand): Likewise.
327 (ENCODE): Likewise.
328 (emit_insn): Move to arch/aarch64-insn.c.
329 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
330 (emit_load_store): Move to arch/aarch64-insn.c.
331 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
332 (can_encode_int32): Remove.
333
334 2015-10-12 Yao Qi <yao.qi@linaro.org>
335
336 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
337 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
338 (aarch64_relocate_instruction): Likewise.
339 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
340 (struct aarch64_insn_visitor): Likewise.
341
342 2015-10-12 Yao Qi <yao.qi@linaro.org>
343
344 * linux-aarch64-low.c (struct aarch64_insn_data): New.
345 (struct aarch64_insn_visitor): New.
346 (struct aarch64_insn_relocation_data): New.
347 (aarch64_ftrace_insn_reloc_b): New function.
348 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
349 (aarch64_ftrace_insn_reloc_cb): Likewise.
350 (aarch64_ftrace_insn_reloc_tb): Likewise.
351 (aarch64_ftrace_insn_reloc_adr): Likewise.
352 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
353 (aarch64_ftrace_insn_reloc_others): Likewise.
354 (visitor): New.
355 (aarch64_relocate_instruction): Use visitor.
356
357 2015-10-12 Yao Qi <yao.qi@linaro.org>
358
359 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
360 int. Add argument buf.
361 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
362 aarch64_relocate_instruction.
363
364 2015-10-12 Yao Qi <yao.qi@linaro.org>
365
366 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
367 argument insn. Remove local variable insn. Don't call
368 target_read_uint32.
369 (aarch64_install_fast_tracepoint_jump_pad): Call
370 target_read_uint32.
371
372 2015-09-30 Yao Qi <yao.qi@linaro.org>
373
374 * linux-aarch64-low.c (emit_movk): Shorten a long line.
375 (emit_load_store_pair): Likewise.
376
377 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
378
379 * dll.c (match_dll): Add cast(s).
380 (unloaded_dll): Likewise.
381 * linux-low.c (second_thread_of_pid_p): Likewise.
382 (delete_lwp_callback): Likewise.
383 (count_events_callback): Likewise.
384 (select_event_lwp_callback): Likewise.
385 (linux_set_resume_request): Likewise.
386 * server.c (accumulate_file_name_length): Likewise.
387 (emit_dll_description): Likewise.
388 (handle_qxfer_threads_worker): Likewise.
389 (visit_actioned_threads): Likewise.
390 * thread-db.c (any_thread_of): Likewise.
391 * tracepoint.c (same_process_p): Likewise.
392 (match_blocktype): Likewise.
393 (build_traceframe_info_xml): Likewise.
394
395 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
396
397 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
398 assignment.
399 (gdb_unparse_agent_expr): Likewise.
400 * hostio.c (require_data): Likewise.
401 (handle_pread): Likewise.
402 * linux-low.c (disable_regset): Likewise.
403 (fetch_register): Likewise.
404 (store_register): Likewise.
405 (get_dynamic): Likewise.
406 (linux_qxfer_libraries_svr4): Likewise.
407 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
408 (set_fast_tracepoint_jump): Likewise.
409 (uninsert_fast_tracepoint_jumps_at): Likewise.
410 (reinsert_fast_tracepoint_jumps_at): Likewise.
411 (validate_inserted_breakpoint): Likewise.
412 (clone_agent_expr): Likewise.
413 * regcache.c (init_register_cache): Likewise.
414 * remote-utils.c (putpkt_binary_1): Likewise.
415 (decode_M_packet): Likewise.
416 (decode_X_packet): Likewise.
417 (look_up_one_symbol): Likewise.
418 (relocate_instruction): Likewise.
419 (monitor_output): Likewise.
420 * server.c (handle_search_memory): Likewise.
421 (handle_qxfer_exec_file): Likewise.
422 (handle_qxfer_libraries): Likewise.
423 (handle_qxfer): Likewise.
424 (handle_query): Likewise.
425 (handle_v_cont): Likewise.
426 (handle_v_run): Likewise.
427 (captured_main): Likewise.
428 * target.c (write_inferior_memory): Likewise.
429 * thread-db.c (try_thread_db_load_from_dir): Likewise.
430 * tracepoint.c (init_trace_buffer): Likewise.
431 (add_tracepoint_action): Likewise.
432 (add_traceframe): Likewise.
433 (add_traceframe_block): Likewise.
434 (cmd_qtdpsrc): Likewise.
435 (cmd_qtdv): Likewise.
436 (cmd_qtstatus): Likewise.
437 (response_source): Likewise.
438 (response_tsv): Likewise.
439 (cmd_qtnotes): Likewise.
440 (gdb_collect): Likewise.
441 (initialize_tracepoint): Likewise.
442
443 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
444
445 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
446 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
447 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
448 <NOP>: New.
449 (enum aarch64_condition_codes): New enum.
450 (w0): New static global.
451 (fp): Likewise.
452 (lr): Likewise.
453 (struct aarch64_memory_operand) <type>: New
454 MEMORY_OPERAND_POSTINDEX type.
455 (postindex_memory_operand): New helper function.
456 (emit_ret): New function.
457 (emit_load_store_pair): New function, factored out of emit_stp
458 with support for MEMORY_OPERAND_POSTINDEX.
459 (emit_stp): Rewrite using emit_load_store_pair.
460 (emit_ldp): New function.
461 (emit_load_store): Likewise.
462 (emit_ldr): Mention post-index instruction in comment.
463 (emit_ldrh): New function.
464 (emit_ldrb): New function.
465 (emit_ldrsw): Mention post-index instruction in comment.
466 (emit_str): Likewise.
467 (emit_subs): New function.
468 (emit_cmp): Likewise.
469 (emit_and): Likewise.
470 (emit_orr): Likewise.
471 (emit_orn): Likewise.
472 (emit_eor): Likewise.
473 (emit_mvn): Likewise.
474 (emit_lslv): Likewise.
475 (emit_lsrv): Likewise.
476 (emit_asrv): Likewise.
477 (emit_mul): Likewise.
478 (emit_sbfm): Likewise.
479 (emit_sbfx): Likewise.
480 (emit_ubfm): Likewise.
481 (emit_ubfx): Likewise.
482 (emit_csinc): Likewise.
483 (emit_cset): Likewise.
484 (emit_nop): Likewise.
485 (emit_ops_insns): New helper function.
486 (emit_pop): Likewise.
487 (emit_push): Likewise.
488 (aarch64_emit_prologue): New function.
489 (aarch64_emit_epilogue): Likewise.
490 (aarch64_emit_add): Likewise.
491 (aarch64_emit_sub): Likewise.
492 (aarch64_emit_mul): Likewise.
493 (aarch64_emit_lsh): Likewise.
494 (aarch64_emit_rsh_signed): Likewise.
495 (aarch64_emit_rsh_unsigned): Likewise.
496 (aarch64_emit_ext): Likewise.
497 (aarch64_emit_log_not): Likewise.
498 (aarch64_emit_bit_and): Likewise.
499 (aarch64_emit_bit_or): Likewise.
500 (aarch64_emit_bit_xor): Likewise.
501 (aarch64_emit_bit_not): Likewise.
502 (aarch64_emit_equal): Likewise.
503 (aarch64_emit_less_signed): Likewise.
504 (aarch64_emit_less_unsigned): Likewise.
505 (aarch64_emit_ref): Likewise.
506 (aarch64_emit_if_goto): Likewise.
507 (aarch64_emit_goto): Likewise.
508 (aarch64_write_goto_address): Likewise.
509 (aarch64_emit_const): Likewise.
510 (aarch64_emit_call): Likewise.
511 (aarch64_emit_reg): Likewise.
512 (aarch64_emit_pop): Likewise.
513 (aarch64_emit_stack_flush): Likewise.
514 (aarch64_emit_zero_ext): Likewise.
515 (aarch64_emit_swap): Likewise.
516 (aarch64_emit_stack_adjust): Likewise.
517 (aarch64_emit_int_call_1): Likewise.
518 (aarch64_emit_void_call_2): Likewise.
519 (aarch64_emit_eq_goto): Likewise.
520 (aarch64_emit_ne_goto): Likewise.
521 (aarch64_emit_lt_goto): Likewise.
522 (aarch64_emit_le_goto): Likewise.
523 (aarch64_emit_gt_goto): Likewise.
524 (aarch64_emit_ge_got): Likewise.
525 (aarch64_emit_ops_impl): New static global variable.
526 (aarch64_emit_ops): New target function, return
527 &aarch64_emit_ops_impl.
528 (struct linux_target_ops): Install it.
529
530 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
531
532 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
533 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
534 aarch64-ipa.o.
535 * linux-aarch64-ipa.c: New file.
536 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
537 and endian.h.
538 (aarch64_get_thread_area): New target method.
539 (extract_signed_bitfield): New helper function.
540 (aarch64_decode_ldr_literal): New function.
541 (enum aarch64_opcodes): New enum.
542 (struct aarch64_register): New struct.
543 (struct aarch64_operand): New struct.
544 (x0): New static global.
545 (x1): Likewise.
546 (x2): Likewise.
547 (x3): Likewise.
548 (x4): Likewise.
549 (w2): Likewise.
550 (ip0): Likewise.
551 (sp): Likewise.
552 (xzr): Likewise.
553 (aarch64_register): New helper function.
554 (register_operand): Likewise.
555 (immediate_operand): Likewise.
556 (struct aarch64_memory_operand): New struct.
557 (offset_memory_operand): New helper function.
558 (preindex_memory_operand): Likewise.
559 (enum aarch64_system_control_registers): New enum.
560 (ENCODE): New macro.
561 (emit_insn): New helper function.
562 (emit_b): New function.
563 (emit_bcond): Likewise.
564 (emit_cb): Likewise.
565 (emit_tb): Likewise.
566 (emit_blr): Likewise.
567 (emit_stp): Likewise.
568 (emit_ldp_q_offset): Likewise.
569 (emit_stp_q_offset): Likewise.
570 (emit_load_store): Likewise.
571 (emit_ldr): Likewise.
572 (emit_ldrsw): Likewise.
573 (emit_str): Likewise.
574 (emit_ldaxr): Likewise.
575 (emit_stxr): Likewise.
576 (emit_stlr): Likewise.
577 (emit_data_processing_reg): Likewise.
578 (emit_data_processing): Likewise.
579 (emit_add): Likewise.
580 (emit_sub): Likewise.
581 (emit_mov): Likewise.
582 (emit_movk): Likewise.
583 (emit_mov_addr): Likewise.
584 (emit_mrs): Likewise.
585 (emit_msr): Likewise.
586 (emit_sevl): Likewise.
587 (emit_wfe): Likewise.
588 (append_insns): Likewise.
589 (can_encode_int32_in): New helper function.
590 (aarch64_relocate_instruction): New function.
591 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
592 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
593 (struct linux_target_ops): Install aarch64_get_thread_area,
594 aarch64_install_fast_tracepoint_jump_pad and
595 aarch64_get_min_fast_tracepoint_insn_len.
596
597 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
598
599 * Makefile.in (aarch64-insn.o): New rule.
600 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
601
602 2015-09-21 Yao Qi <yao.qi@linaro.org>
603
604 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
605
606 2015-09-21 Yao Qi <yao.qi@linaro.org>
607
608 * tracepoint.c (max_jump_pad_size): Remove.
609
610 2015-09-18 Yao Qi <yao.qi@linaro.org>
611
612 * linux-aarch64-low.c: Don't include sys/uio.h.
613 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
614
615 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
616
617 * tracepoint.c (eval_result_type): Change prototype.
618 (condition_true_at_tracepoint): Fix argument to compiled_cond.
619
620 2015-09-15 Pedro Alves <palves@redhat.com>
621
622 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
623 Check whether to report exec events instead of checking whether
624 multiprocess is enabled.
625
626 2015-09-15 Pedro Alves <palves@redhat.com>
627
628 PR remote/18965
629 * remote-utils.c (prepare_resume_reply): Merge
630 TARGET_WAITKIND_VFORK_DONE switch case with the
631 TARGET_WAITKIND_FORKED case.
632
633 2015-09-15 Yao Qi <yao.qi@linaro.org>
634
635 * server.c (handle_query): Check string comparison using
636 "else if" instead of "if".
637
638 2015-09-15 Yao Qi <yao.qi@linaro.org>
639
640 * server.c (vCont_supported): New global variable.
641 (handle_query): Set vCont_supported to 1 if "vContSupported+"
642 matches. Append ";vContSupported+" to own_buf.
643 (handle_v_requests): Append ";s;S" to own_buf if target supports
644 hardware single step or vCont_supported is false.
645 (capture_main): Set vCont_supported to zero.
646
647 2015-09-15 Yao Qi <yao.qi@linaro.org>
648
649 * linux-low.c (linux_supports_conditional_breakpoints): Rename
650 it to ...
651 (linux_supports_hardware_single_step): ... New function.
652 (linux_target_ops): Update.
653 * lynx-low.c (lynx_target_ops): Set field
654 supports_hardware_single_step to target_can_do_hardware_single_step.
655 * nto-low.c (nto_target_ops): Likewise.
656 * spu-low.c (spu_target_ops): Likewise.
657 * win32-low.c (win32_target_ops): Likewise.
658 * target.c (target_can_do_hardware_single_step): New function.
659 * target.h (struct target_ops) <supports_conditional_breakpoints>:
660 Remove. <supports_hardware_single_step>: New field.
661 (target_supports_conditional_breakpoints): Remove.
662 (target_supports_hardware_single_step): New macro.
663 (target_can_do_hardware_single_step): Declare.
664 * server.c (handle_query): Use target_supports_hardware_single_step
665 instead of target_supports_conditional_breakpoints.
666
667 2015-09-15 Yao Qi <yao.qi@linaro.org>
668
669 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
670 function.
671 (struct linux_target_ops the_low_target): Install
672 aarch64_linux_siginfo_fixup.
673
674 2015-09-11 Don Breazeal <donb@codesourcery.com>
675 Luis Machado <lgustavo@codesourcery.com>
676
677 * linux-low.c (linux_mourn): Static declaration.
678 (linux_arch_setup): Move in front of
679 handle_extended_wait.
680 (linux_arch_setup_thread): New function.
681 (handle_extended_wait): Handle exec events. Call
682 linux_arch_setup_thread. Make event_lwp argument a
683 pointer-to-a-pointer.
684 (check_zombie_leaders): Do not check stopped threads.
685 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
686 (linux_low_filter_event): Add lwp and thread for exec'ing
687 non-leader thread if leader thread has been deleted.
688 Refactor code into linux_arch_setup_thread and call it.
689 Pass child lwp pointer by reference to handle_extended_wait.
690 (linux_wait_for_event_filtered): Update comment.
691 (linux_wait_1): Prevent clobbering exec event status.
692 (linux_supports_exec_events): New function.
693 (linux_target_ops) <supports_exec_events>: Initialize new member.
694 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
695 new member.
696 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
697 * server.c (report_exec_events): New global variable.
698 (handle_query): Handle qSupported query for exec-events feature.
699 (captured_main): Initialize report_exec_events.
700 * server.h (report_exec_events): Declare new global variable.
701 * target.h (struct target_ops) <supports_exec_events>: New
702 member.
703 (target_supports_exec_events): New macro.
704 * win32-low.c (win32_target_ops) <supports_exec_events>:
705 Initialize new member.
706
707 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
708
709 * linux-low.c (linux_low_enable_btrace): Remove.
710 (linux_target_ops): Replace linux_low_enable_btrace with
711 linux_enable_btrace.
712
713 2015-09-03 Yao Qi <yao.qi@linaro.org>
714
715 * linux-aarch64-low.c (aarch64_insert_point): Call
716 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
717 returns true.
718
719 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
720
721 * linux-low.c (check_stopped_by_breakpoint): Use
722 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
723
724 2015-08-27 Pedro Alves <palves@redhat.com>
725
726 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
727
728 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
729
730 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
731 the XNEW-family equivalent.
732 (compile_bytecodes): Likewise.
733 * dll.c (loaded_dll): Likewise.
734 * event-loop.c (append_callback_event): Likewise.
735 (create_file_handler): Likewise.
736 (create_file_event): Likewise.
737 * hostio.c (handle_open): Likewise.
738 * inferiors.c (add_thread): Likewise.
739 (add_process): Likewise.
740 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
741 * linux-arm-low.c (arm_new_process): Likewise.
742 (arm_new_thread): Likewise.
743 * linux-low.c (add_to_pid_list): Likewise.
744 (linux_add_process): Likewise.
745 (handle_extended_wait): Likewise.
746 (add_lwp): Likewise.
747 (enqueue_one_deferred_signal): Likewise.
748 (enqueue_pending_signal): Likewise.
749 (linux_resume_one_lwp_throw): Likewise.
750 (linux_resume_one_thread): Likewise.
751 (linux_read_memory): Likewise.
752 (linux_write_memory): Likewise.
753 * linux-mips-low.c (mips_linux_new_process): Likewise.
754 (mips_linux_new_thread): Likewise.
755 (mips_add_watchpoint): Likewise.
756 * linux-x86-low.c (initialize_low_arch): Likewise.
757 * lynx-low.c (lynx_add_process): Likewise.
758 * mem-break.c (set_raw_breakpoint_at): Likewise.
759 (set_breakpoint): Likewise.
760 (add_condition_to_breakpoint): Likewise.
761 (add_commands_to_breakpoint): Likewise.
762 (clone_agent_expr): Likewise.
763 (clone_one_breakpoint): Likewise.
764 * regcache.c (new_register_cache): Likewise.
765 * remote-utils.c (look_up_one_symbol): Likewise.
766 * server.c (queue_stop_reply): Likewise.
767 (start_inferior): Likewise.
768 (queue_stop_reply_callback): Likewise.
769 (handle_target_event): Likewise.
770 * spu-low.c (fetch_ppc_memory): Likewise.
771 (store_ppc_memory): Likewise.
772 * target.c (set_target_ops): Likewise.
773 * thread-db.c (thread_db_load_search): Likewise.
774 (try_thread_db_load_1): Likewise.
775 * tracepoint.c (add_tracepoint): Likewise.
776 (add_tracepoint_action): Likewise.
777 (create_trace_state_variable): Likewise.
778 (cmd_qtdpsrc): Likewise.
779 (cmd_qtro): Likewise.
780 (add_while_stepping_state): Likewise.
781 * win32-low.c (child_add_thread): Likewise.
782 (get_image_name): Likewise.
783
784 2015-08-25 Yao Qi <yao.qi@linaro.org>
785
786 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
787
788 2015-08-25 Yao Qi <yao.qi@linaro.org>
789
790 * Makefile.in (aarch64-linux.o): New rule.
791 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
792 srv_tgtobj.
793 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
794 (aarch64_init_debug_reg_state): Make it extern.
795 (aarch64_linux_prepare_to_resume): Remove.
796
797 2015-08-25 Yao Qi <yao.qi@linaro.org>
798
799 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
800 lwp_arch_private_info and ptid_of_lwp.
801
802 2015-08-25 Yao Qi <yao.qi@linaro.org>
803
804 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
805 Find proc_info by find_process_pid. All callers updated.
806
807 2015-08-25 Yao Qi <yao.qi@linaro.org>
808
809 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
810 Remove.
811 (debug_reg_change_callback): Remove.
812 (aarch64_notify_debug_reg_change): Remove.
813
814 2015-08-25 Yao Qi <yao.qi@linaro.org>
815
816 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
817 Call current_lwp_ptid.
818
819 2015-08-25 Yao Qi <yao.qi@linaro.org>
820
821 * linux-aarch64-low.c (debug_reg_change_callback): Use
822 debug_printf.
823
824 2015-08-25 Yao Qi <yao.qi@linaro.org>
825
826 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
827
828 2015-08-25 Yao Qi <yao.qi@linaro.org>
829
830 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
831
832 2015-08-25 Yao Qi <yao.qi@linaro.org>
833
834 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
835 the code.
836
837 2015-08-25 Yao Qi <yao.qi@linaro.org>
838
839 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
840 Remove.
841 (debug_reg_change_callback): Remove argument entry and add argument
842 lwp. Remove local variable thread. Don't print thread id in the
843 debugging output. Don't check whether pid of thread equals to pid.
844 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
845 iterate_over_lwps instead find_inferior.
846
847 2015-08-24 Pedro Alves <palves@redhat.com>
848
849 * inferiors.c (get_first_process): New function.
850 * inferiors.h (get_first_process): New declaration.
851 * remote-utils.c (read_ptid): Default to the first process in the
852 list, instead of to the current thread's process.
853
854 2015-08-24 Pedro Alves <palves@redhat.com>
855
856 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
857 * event-loop.c: Likewise.
858 * remote-utils.c: Likewise.
859 * tracepoint.c: Likewise.
860
861 2015-08-24 Pedro Alves <palves@redhat.com>
862
863 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
864 ptid_get_lwp.
865
866 2015-08-21 Pedro Alves <palves@redhat.com>
867
868 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
869 instead of literal 1.
870
871 2015-08-21 Pedro Alves <palves@redhat.com>
872
873 * tdesc.c (default_description): Explicitly zero-initialize.
874
875 2015-08-21 Pedro Alves <palves@redhat.com>
876
877 PR gdb/18749
878 * inferiors.c (remove_thread): Discard any pending stop reply for
879 this thread.
880 * server.c (remove_all_on_match_pid): Rename to ...
881 (remove_all_on_match_ptid): ... this. Work with a filter ptid
882 instead of a pid.
883 (discard_queued_stop_replies): Change parameter to a ptid. Now
884 extern.
885 (handle_v_kill, kill_inferior_callback, captured_main)
886 (process_serial_event): Adjust.
887 * server.h (discard_queued_stop_replies): Declare.
888
889 2015-08-21 Pedro Alves <palves@redhat.com>
890
891 * linux-low.c (wait_for_sigstop): Always switch to no thread
892 selected if the previously current thread dies.
893 * lynx-low.c (lynx_request_interrupt): Use the first thread's
894 process instead of the current thread's.
895 * remote-utils.c (input_interrupt): Don't check if there's no
896 current thread.
897 * server.c (gdb_read_memory, gdb_write_memory): If setting the
898 current thread to the general thread fails, error out.
899 (handle_qxfer_auxv, handle_qxfer_libraries)
900 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
901 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
902 (handle_query): Check if there's a thread selected instead of
903 checking whether there's any thread in the thread list.
904 (handle_qxfer_threads, handle_qxfer_btrace)
905 (handle_qxfer_btrace_conf): Don't error out early if there's no
906 thread in the thread list.
907 (handle_v_cont, myresume): Don't set the current thread to the
908 continue thread.
909 (process_serial_event) <Hg handling>: Also set thread_id if the
910 previous general thread is still alive.
911 (process_serial_event) <g/G handling>: If setting the current
912 thread to the general thread fails, error out.
913 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
914 thread's lwp instead of the current thread's.
915 * target.c (set_desired_thread): If the desired thread was not
916 found, leave the current thread pointing to NULL. Return an int
917 (boolean) indicating success.
918 * target.h (set_desired_thread): Change return type to int.
919
920 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
921
922 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
923 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
924 #includes.
925 (ps_get_thread_area): New function.
926
927 2015-08-19 Gary Benson <gbenson@redhat.com>
928
929 * hostio.c (handle_pread): Do not attempt to read more data
930 than hostio_reply_with_data can fit in a packet.
931
932 2015-08-18 Joel Brobecker <brobecker@adacore.com>
933
934 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
935
936 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
937
938 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
939
940 2015-08-06 Pedro Alves <palves@redhat.com>
941
942 * tracepoint.c (expr_eval_result): Now an int.
943
944 2015-08-06 Pedro Alves <palves@redhat.com>
945
946 * gdbthread.h (struct regcache): Forward declare.
947 (struct thread_info) <regcache_data>: Now a struct regcache
948 pointer.
949 * inferiors.c (inferior_regcache_data)
950 (set_inferior_regcache_data): Now work with struct regcache
951 pointers.
952 * inferiors.h (struct regcache): Forward declare.
953 (inferior_regcache_data, set_inferior_regcache_data): Now work
954 with struct regcache pointers.
955 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
956 (free_register_cache_thread): Remove struct regcache pointer
957 casts.
958
959 2015-08-06 Pedro Alves <palves@redhat.com>
960
961 * server.c (captured_main): On error, print the exception message
962 to stderr, and if run_once is set, throw a quit.
963
964 2015-08-06 Pedro Alves <palves@redhat.com>
965
966 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
967 the current thread.
968
969 2015-08-06 Pedro Alves <palves@redhat.com>
970
971 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
972 reading beyond the passed in buffer length.
973
974 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
975
976 * tracepoint.c (symbol_list) <required>: Remove.
977
978 2015-08-06 Pedro Alves <palves@redhat.com>
979
980 * linux-low.c (handle_extended_wait): Set the fork child's suspend
981 count if stopping and suspending threads.
982 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
983 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
984 (linux_detach): Complete an ongoing step-over.
985 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
986 throughout.
987 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
988 (linux_wait_1): If passing a signal to the inferior after
989 finishing a step-over, unsuspend and re-resume all lwps. If we
990 see a single-step event but the thread should be continuing, don't
991 pass the trap to gdb.
992 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
993 internal_error instead of gdb_assert.
994 (enqueue_pending_signal): New function.
995 (check_ptrace_stopped_lwp_gone): Add debug output.
996 (start_step_over): Use internal_error instead of gdb_assert.
997 (complete_ongoing_step_over): New function.
998 (linux_resume_one_thread): Don't resume a suspended thread.
999 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
1000 it stepping.
1001
1002 2015-08-06 Pedro Alves <palves@redhat.com>
1003
1004 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
1005 (linux_thread_alive): Use lwp_is_marked_dead.
1006 (extended_event_reported): Delete.
1007 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
1008 instead of extended_event_reported.
1009 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
1010 as well.
1011 (lwp_is_marked_dead): New function.
1012 (lwp_running): Use lwp_is_marked_dead.
1013 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
1014 comment.
1015
1016 2015-08-06 Pedro Alves <palves@redhat.com>
1017
1018 * linux-low.c (linux_wait_1): Move fork event output out of the
1019 !report_to_gdb check. Pass event_child->waitstatus to
1020 target_waitstatus_to_string instead of ourstatus.
1021
1022 2015-08-04 Yao Qi <yao.qi@linaro.org>
1023
1024 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
1025 if current_thread is 32 bit.
1026
1027 2015-08-04 Yao Qi <yao.qi@linaro.org>
1028
1029 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
1030 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
1031 * server.c (extended_protocol): Remove "static".
1032 * server.h (extended_protocol): Declare it.
1033
1034 2015-08-04 Yao Qi <yao.qi@linaro.org>
1035
1036 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
1037 both aarch64 and aarch32.
1038 (aarch64_set_pc): Likewise.
1039
1040 2015-08-04 Yao Qi <yao.qi@linaro.org>
1041
1042 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
1043 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
1044 arm-with-neon.xml to srv_xmlfiles.
1045 * linux-aarch64-low.c: Include linux-aarch32-low.h.
1046 (is_64bit_tdesc): New function.
1047 (aarch64_linux_read_description): New function.
1048 (aarch64_arch_setup): Call aarch64_linux_read_description.
1049 (regs_info): Rename to regs_info_aarch64.
1050 (aarch64_regs_info): Return right regs_info.
1051 (initialize_low_arch): Call initialize_low_arch_aarch32.
1052
1053 2015-08-04 Yao Qi <yao.qi@linaro.org>
1054
1055 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
1056 * linux-aarch32-low.c: New file.
1057 * linux-aarch32-low.h: New file.
1058 * linux-arm-low.c (arm_fill_gregset): Move it to
1059 linux-aarch32-low.c.
1060 (arm_store_gregset): Likewise.
1061 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
1062 (arm_store_vfpregset): Call arm_store_vfpregset_num.
1063 (arm_arch_setup): Check if PTRACE_GETREGSET works.
1064 (regs_info): Rename to regs_info_arm.
1065 (arm_regs_info): Return regs_info_aarch32 if
1066 have_ptrace_getregset is 1 and target description is
1067 arm_with_neon or arm_with_vfpv3.
1068 (initialize_low_arch): Don't call init_registers_arm_with_neon.
1069 Call initialize_low_arch_aarch32 instead.
1070
1071 2015-08-04 Yao Qi <yao.qi@linaro.org>
1072
1073 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
1074 * linux-low.c: ... here.
1075 * linux-low.h (have_ptrace_getregset): Declare it.
1076
1077 2015-08-04 Pedro Alves <palves@redhat.com>
1078
1079 * thread-db.c (struct thread_db): Use new typedefs.
1080 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
1081 CHK calls.
1082 (disable_thread_event_reporting): Cast result of dlsym to
1083 destination function pointer type.
1084 (thread_db_mourn): Use td_ta_delete_ftype.
1085
1086 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
1087
1088 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
1089 arch variant.
1090 (CDX_BREAKPOINT): Define for R2.
1091 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
1092 (the_low_target): Add comments.
1093
1094 2015-07-30 Yao Qi <yao.qi@linaro.org>
1095
1096 * linux-arm-low.c (arm_hwcap): Remove it.
1097 (arm_read_description): New local variable arm_hwcap. Don't
1098 set arm_hwcap to zero.
1099
1100 2015-07-30 Yao Qi <yao.qi@linaro.org>
1101
1102 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
1103 Use regcache->tdesc instead.
1104 (arm_store_wmmxregset): Likewise.
1105 (arm_fill_vfpregset): Likewise.
1106 (arm_store_vfpregset): Likewise.
1107
1108 2015-07-30 Yao Qi <yao.qi@linaro.org>
1109
1110 * linux-arm-low.c: Include arch/arm.h.
1111 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
1112 (arm_store_gregset): Likewise.
1113
1114 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
1115
1116 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
1117 ptrace's 4th parameter.
1118
1119 2015-07-27 Yao Qi <yao.qi@linaro.org>
1120
1121 * configure.srv (case aarch64*-*-linux*): Don't set
1122 srv_linux_usrregs.
1123
1124 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
1125
1126 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
1127 sys/ptrace.h.
1128 * linux-arm-low.c: Likewise.
1129 * linux-cris-low.c: Likewise.
1130 * linux-crisv32-low.c: Likewise.
1131 * linux-low.c: Likewise.
1132 * linux-m68k-low.c: Likewise.
1133 * linux-mips-low.c: Likewise.
1134 * linux-nios2-low.c: Likewise.
1135 * linux-s390-low.c: Likewise.
1136 * linux-sparc-low.c: Likewise.
1137 * linux-tic6x-low.c: Likewise.
1138 * linux-tile-low.c: Likewise.
1139 * linux-x86-low.c: Likewise.
1140
1141 2015-07-24 Pedro Alves <palves@redhat.com>
1142
1143 * config.in: Regenerate.
1144 * configure: Regenerate.
1145
1146 2015-07-24 Pedro Alves <palves@redhat.com>
1147
1148 * acinclude.m4: Include ../ptrace.m4.
1149 * configure.ac: Call GDB_AC_PTRACE.
1150 * config.in, configure: Regenerate.
1151
1152 2015-07-24 Yao Qi <yao.qi@linaro.org>
1153
1154 * linux-low.c (linux_create_inferior): Remove setting to
1155 proc->priv->new_inferior.
1156 (linux_attach): Likewise.
1157 (linux_low_filter_event): Likewise.
1158 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
1159
1160 2015-07-24 Yao Qi <yao.qi@linaro.org>
1161
1162 * linux-low.c (linux_arch_setup): New function.
1163 (linux_low_filter_event): If proc->tdesc is NULL and
1164 proc->attached is true, call the_low_target.arch_setup.
1165 Otherwise, keep status pending, and return.
1166 (linux_resume_one_lwp_throw): Don't call get_pc if
1167 thread->while_stepping isn't NULL. Don't call
1168 get_thread_regcache if proc->tdesc is NULL.
1169 (need_step_over_p): Return 0 if proc->tdesc is NULL.
1170 (linux_target_ops): Install arch_setup.
1171 * server.c (start_inferior): Call the_target->arch_setup.
1172 * target.h (struct target_ops) <arch_setup>: New field.
1173 (target_arch_setup): New marco.
1174 * lynx-low.c (lynx_target_ops): Update.
1175 * nto-low.c (nto_target_ops): Update.
1176 * spu-low.c (spu_target_ops): Update.
1177 * win32-low.c (win32_target_ops): Update.
1178
1179 2015-07-24 Yao Qi <yao.qi@linaro.org>
1180
1181 * linux-low.c (linux_add_process): Don't set
1182 proc->priv->new_inferior.
1183 (linux_create_inferior): Set proc->priv->new_inferior to 1.
1184 (linux_attach): Likewise.
1185
1186 2015-07-24 Yao Qi <yao.qi@linaro.org>
1187
1188 * server.c (start_inferior): Code refactor.
1189
1190 2015-07-24 Yao Qi <yao.qi@linaro.org>
1191
1192 * server.c (process_serial_event): Set general_thread.
1193
1194 2015-07-21 Yao Qi <yao.qi@linaro.org>
1195
1196 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
1197 aarch64_linux_get_debug_reg_capacity.
1198
1199 2015-07-17 Yao Qi <yao.qi@linaro.org>
1200
1201 * Makefile.in (aarch64-linux-hw-point.o): New rule.
1202 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
1203 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
1204 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
1205 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
1206 (AARCH64_HWP_ALIGNMENT): Likewise.
1207 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
1208 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
1209 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
1210 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
1211 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
1212 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
1213 (struct aarch64_debug_reg_state): Likewise.
1214 (struct arch_lwp_info): Likewise.
1215 (aarch64_align_watchpoint): Likewise.
1216 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
1217 (aarch64_watchpoint_length): Likewise.
1218 (aarch64_point_encode_ctrl_reg): Likewise
1219 (aarch64_point_is_aligned): Likewise.
1220 (aarch64_align_watchpoint): Likewise.
1221 (aarch64_linux_set_debug_regs):
1222 (aarch64_dr_state_insert_one_point): Likewise.
1223 (aarch64_dr_state_remove_one_point): Likewise.
1224 (aarch64_handle_breakpoint): Likewise.
1225 (aarch64_handle_aligned_watchpoint): Likewise.
1226 (aarch64_handle_unaligned_watchpoint): Likewise.
1227 (aarch64_handle_watchpoint): Likewise.
1228
1229 2015-07-17 Yao Qi <yao.qi@linaro.org>
1230
1231 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
1232 and don't aarch64_get_debug_reg_state. All callers update.
1233 (aarch64_handle_aligned_watchpoint): Likewise.
1234 (aarch64_handle_unaligned_watchpoint): Likewise.
1235 (aarch64_handle_watchpoint): Likewise.
1236 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
1237 (aarch64_remove_point): Likewise.
1238
1239 2015-07-17 Yao Qi <yao.qi@linaro.org>
1240
1241 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
1242 debug_printf.
1243 (aarch64_handle_unaligned_watchpoint): Likewise.
1244
1245 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
1246
1247 Revert the previous 3 commits:
1248 Move gdb_regex* to common/
1249 Move linux_find_memory_regions_full & co.
1250 gdbserver build-id attribute generator
1251
1252 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1253 Jan Kratochvil <jan.kratochvil@redhat.com>
1254
1255 gdbserver build-id attribute generator.
1256 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
1257 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
1258 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
1259 (find_phdr): New.
1260 (get_dynamic): Use find_pdhr to traverse program headers.
1261 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
1262 (compare_mapping_entry_range, struct find_memory_region_callback_data)
1263 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
1264 (get_hex_build_id): New.
1265 (linux_qxfer_libraries_svr4): Add optional build-id attribute
1266 to reply XML document.
1267
1268 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1269 Jan Kratochvil <jan.kratochvil@redhat.com>
1270
1271 * target.c: Include target/target-utils.h and fcntl.h.
1272 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
1273 (target_fileio_read_stralloc): New functions.
1274
1275 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
1276
1277 * Makefile.in (OBS): Add gdb_regex.o.
1278 (gdb_regex.o): New.
1279 * config.in: Rebuilt.
1280 * configure: Rebuilt.
1281
1282 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1283 Jan Kratochvil <jan.kratochvil@redhat.com>
1284
1285 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
1286 * Makefile.in (OBS): Add target-utils.o.
1287 (linux-maps.o, target-utils.o): New.
1288 * configure.srv (srv_linux_obj): Add linux-maps.o.
1289
1290 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
1291
1292 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
1293 function, return 1.
1294 (the_low_target): Install it.
1295
1296 2015-07-14 Pedro Alves <palves@redhat.com>
1297
1298 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
1299 Instead, ignore ECHILD, and throw an error for other errnos.
1300
1301 2015-07-10 Pedro Alves <palves@redhat.com>
1302
1303 * event-loop.c (struct callback_event) <data>: Change type to
1304 gdb_client_data instance instead of gdb_client_data pointer.
1305 (append_callback_event): Adjust.
1306
1307 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
1308
1309 * linux-aarch64-low.c: Add comments for each linux_target_ops
1310 method. Remove comments already covered in target_ops and
1311 linux_target_ops definitions.
1312 (the_low_target): Add comments for each unimplemented method.
1313
1314 2015-07-09 Yao Qi <yao.qi@linaro.org>
1315
1316 * linux-aarch64-low.c (aarch64_regmap): Remove.
1317 (aarch64_usrregs_info): Remove.
1318 (regs_info): Set field usrregs to NULL.
1319
1320 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
1321
1322 * linux-low.c: Include "rsp-low.h"
1323 (linux_low_encode_pt_config, linux_low_encode_raw): New.
1324 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
1325 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
1326 (handle_btrace_enable_pt): New.
1327 (handle_btrace_general_set): Support "pt".
1328 (handle_btrace_conf_general_set): Support "pt:size".
1329
1330 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
1331
1332 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
1333 Z_PACKET_SW_BP.
1334
1335 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
1336
1337 * linux-aarch64-low.c: Remove comment about endianness.
1338 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
1339 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
1340 memcmp.
1341
1342 2015-06-24 Gary Benson <gbenson@redhat.com>
1343
1344 * linux-i386-ipa.c (stdint.h): Do not include.
1345 * lynx-i386-low.c (stdint.h): Likewise.
1346 * lynx-ppc-low.c (stdint.h): Likewise.
1347 * mem-break.c (stdint.h): Likewise.
1348 * thread-db.c (stdint.h): Likewise.
1349 * tracepoint.c (stdint.h): Likewise.
1350 * win32-low.c (stdint.h): Likewise.
1351
1352 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
1353
1354 * server.c (write_qxfer_response): Update call to
1355 remote_escape_output.
1356
1357 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
1358 Jan Kratochvil <jan.kratochvil@redhat.com>
1359
1360 Merge multiple hex conversions.
1361 * gdbreplay.c (tohex): Rename to 'fromhex'.
1362 (logchar): Use fromhex.
1363
1364 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
1365
1366 * server.c (handle_qxfer_libraries): Set `version' attribute for
1367 <library-list>.
1368
1369 2015-06-10 Gary Benson <gbenson@redhat.com>
1370
1371 * target.h (struct target_ops) <multifs_open>: New field.
1372 <multifs_unlink>: Likewise.
1373 <multifs_readlink>: Likewise.
1374 * linux-low.c (nat/linux-namespaces.h): New include.
1375 (linux_target_ops): Initialize the_target->multifs_open,
1376 the_target->multifs_unlink and the_target->multifs_readlink.
1377 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
1378 * hostio.c (hostio_fs_pid): New static variable.
1379 (hostio_handle_new_gdb_connection): New function.
1380 (handle_setfs): Likewise.
1381 (handle_open): Use the_target->multifs_open as appropriate.
1382 (handle_unlink): Use the_target->multifs_unlink as appropriate.
1383 (handle_readlink): Use the_target->multifs_readlink as
1384 appropriate.
1385 (handle_vFile): Handle vFile:setfs packets.
1386 * server.c (handle_query): Call hostio_handle_new_gdb_connection
1387 after target_handle_new_gdb_connection.
1388
1389 2015-06-10 Gary Benson <gbenson@redhat.com>
1390
1391 * configure.ac (AC_CHECK_FUNCS): Add setns.
1392 * config.in: Regenerate.
1393 * configure: Likewise.
1394 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
1395 (linux-namespaces.o): New rule.
1396 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
1397
1398 2015-06-09 Gary Benson <gbenson@redhat.com>
1399
1400 * hostio.c (handle_open): Process mode argument with
1401 fileio_to_host_mode.
1402
1403 2015-06-01 Yao Qi <yao.qi@linaro.org>
1404
1405 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
1406 * linux-x86-low.c: Likewise.
1407
1408 2015-05-28 Don Breazeal <donb@codesourcery.com>
1409
1410 * linux-low.c (handle_extended_wait): Initialize
1411 thread_info.last_resume_kind for new fork children.
1412
1413 2015-05-15 Pedro Alves <palves@redhat.com>
1414
1415 * target.h (target_handle_new_gdb_connection): Rewrite using if
1416 wrapped in do/while.
1417
1418 2015-05-14 Joel Brobecker <brobecker@adacore.com>
1419
1420 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
1421 * configure, config.in: Regenerate.
1422 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
1423 Declare typedef.
1424
1425 2015-05-12 Don Breazeal <donb@codesourcery.com>
1426
1427 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
1428 PTRACE_EVENT_VFORK_DONE.
1429 (linux_low_ptrace_options, extended_event_reported): Add vfork
1430 events.
1431 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
1432 and "vforkdone" for RSP 'T' Stop Reply Packet.
1433 * server.h (report_vfork_events): Declare
1434 global variable.
1435
1436 2015-05-12 Don Breazeal <donb@codesourcery.com>
1437
1438 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
1439 (the_low_target) <new_fork>: Initialize new member.
1440 * linux-arm-low.c (arm_new_fork): New function.
1441 (the_low_target) <new_fork>: Initialize new member.
1442 * linux-low.c (handle_extended_wait): Call new target function
1443 new_fork.
1444 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
1445 * linux-mips-low.c (mips_add_watchpoint): New function
1446 extracted from mips_insert_point.
1447 (the_low_target) <new_fork>: Initialize new member.
1448 (mips_linux_new_fork): New function.
1449 (mips_insert_point): Call mips_add_watchpoint.
1450 * linux-x86-low.c (x86_linux_new_fork): New function.
1451 (the_low_target) <new_fork>: Initialize new member.
1452
1453 2015-05-12 Don Breazeal <donb@codesourcery.com>
1454
1455 * linux-low.c (handle_extended_wait): Implement return value,
1456 rename argument 'event_child' to 'event_lwp', handle
1457 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
1458 (linux_low_ptrace_options): New function.
1459 (linux_low_filter_event): Call linux_low_ptrace_options,
1460 use different argument fo linux_enable_event_reporting,
1461 use return value from handle_extended_wait.
1462 (extended_event_reported): New function.
1463 (linux_wait_1): Call extended_event_reported and set
1464 status to report fork events.
1465 (linux_write_memory): Add pid to debug message.
1466 (reset_lwp_ptrace_options_callback): New function.
1467 (linux_handle_new_gdb_connection): New function.
1468 (linux_target_ops): Initialize new structure member.
1469 * linux-low.h (struct lwp_info) <waitstatus>: New member.
1470 * lynx-low.c: Initialize new structure member.
1471 * remote-utils.c (prepare_resume_reply): Implement stop reason
1472 "fork" for "T" stop message.
1473 * server.c (handle_query): Call handle_new_gdb_connection.
1474 * server.h (report_fork_events): Declare global flag.
1475 * target.h (struct target_ops) <handle_new_gdb_connection>:
1476 New member.
1477 (target_handle_new_gdb_connection): New macro.
1478 * win32-low.c: Initialize new structure member.
1479
1480 2015-05-12 Don Breazeal <donb@codesourcery.com>
1481
1482 * mem-break.c (APPEND_TO_LIST): Define macro.
1483 (clone_agent_expr): New function.
1484 (clone_one_breakpoint): New function.
1485 (clone_all_breakpoints): New function.
1486 * mem-break.h: Declare new functions.
1487
1488 2015-05-12 Don Breazeal <donb@codesourcery.com>
1489
1490 * linux-low.c (linux_supports_fork_events): New function.
1491 (linux_supports_vfork_events): New function.
1492 (linux_target_ops): Initialize new structure members.
1493 (initialize_low): Call linux_check_ptrace_features.
1494 * lynx-low.c (lynx_target_ops): Initialize new structure
1495 members.
1496 * server.c (report_fork_events, report_vfork_events):
1497 New global flags.
1498 (handle_query): Add new features to qSupported packet and
1499 response.
1500 (captured_main): Initialize new global variables.
1501 * target.h (struct target_ops) <supports_fork_events>:
1502 New member.
1503 <supports_vfork_events>: New member.
1504 (target_supports_fork_events): New macro.
1505 (target_supports_vfork_events): New macro.
1506 * win32-low.c (win32_target_ops): Initialize new structure
1507 members.
1508
1509 2015-05-12 Gary Benson <gbenson@redhat.com>
1510
1511 * server.c (handle_qxfer_exec_file): Use current process
1512 if annex is empty.
1513
1514 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
1515
1516 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
1517 Remove HAVE_PTRACE_GETREGS conditionals.
1518 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
1519 instead of PTRACE_GETREGS and PTRACE_SETREGS.
1520
1521 2015-05-08 Yao Qi <yao.qi@linaro.org>
1522
1523 * linux-low.c (linux_supports_conditional_breakpoints): New
1524 function.
1525 (linux_target_ops): Install new target method.
1526 * lynx-low.c (lynx_target_ops): Install NULL hook for
1527 supports_conditional_breakpoints.
1528 * nto-low.c (nto_target_ops): Likewise.
1529 * spu-low.c (spu_target_ops): Likewise.
1530 * win32-low.c (win32_target_ops): Likewise.
1531 * server.c (handle_query): Check
1532 target_supports_conditional_breakpoints.
1533 * target.h (struct target_ops) <supports_conditional_breakpoints>:
1534 New field.
1535 (target_supports_conditional_breakpoints): New macro.
1536
1537 2015-05-06 Pedro Alves <palves@redhat.com>
1538
1539 PR server/18081
1540 * server.c (start_inferior): If the process exits, mourn it.
1541
1542 2015-04-21 Gary Benson <gbenson@redhat.com>
1543
1544 * hostio.c (fileio_open_flags_to_host): Factored out to
1545 fileio_to_host_openflags in common/fileio.c. Single use
1546 updated.
1547
1548 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
1549
1550 * linux-xtensa-low.c (xtensa_fill_gregset)
1551 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
1552 XCHAL_HAVE_LOOP.
1553
1554 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
1555
1556 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
1557 (regs_info): Replace usrregs pointer with NULL.
1558
1559 2015-04-17 Gary Benson <gbenson@redhat.com>
1560
1561 * target.h (struct target_ops) <pid_to_exec_file>: New field.
1562 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
1563 * server.c (handle_qxfer_exec_file): New function.
1564 (qxfer_packets): Add exec-file entry.
1565 (handle_query): Report qXfer:exec-file:read as supported packet.
1566
1567 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
1568
1569 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
1570
1571 2015-04-09 Gary Benson <gbenson@redhat.com>
1572
1573 * hostio-errno.c (errno_to_fileio_error): Remove function.
1574 Update caller to use remote_fileio_to_fio_error.
1575
1576 2015-04-09 Yao Qi <yao.qi@linaro.org>
1577
1578 * linux-low.c (linux_insert_point): Call
1579 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
1580 (linux_remove_point): Call remove_memory_breakpoint if type is
1581 raw_bkpt_type_sw.
1582 * linux-x86-low.c (x86_insert_point): Don't call
1583 insert_memory_breakpoint.
1584 (x86_remove_point): Don't call remove_memory_breakpoint.
1585
1586 2015-04-01 Pedro Alves <palves@redhat.com>
1587 Cleber Rosa <crosa@redhat.com>
1588
1589 * server.c (gdbserver_usage): Reorganize and extend the usage
1590 message.
1591
1592 2015-03-24 Pedro Alves <palves@redhat.com>
1593
1594 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
1595 output. Also dump TRAP_TRACE.
1596 (linux_low_filter_event): In debug output, distinguish a
1597 resume_stop SIGSTOP from a delayed SIGSTOP.
1598
1599 2015-03-24 Gary Benson <gbenson@redhat.com>
1600
1601 * linux-x86-low.c (x86_linux_new_thread): Moved to
1602 nat/x86-linux.c.
1603 (x86_linux_prepare_to_resume): Likewise.
1604
1605 2015-03-24 Gary Benson <gbenson@redhat.com>
1606
1607 * Makefile.in (x86-linux-dregs.o): New rule.
1608 * configure.srv: Add x86-linux-dregs.o to relevant targets.
1609 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
1610 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
1611 (x86_linux_dr_get): Likewise.
1612 (x86_linux_dr_set): Likewise.
1613 (update_debug_registers_callback): Likewise.
1614 (x86_linux_dr_set_addr): Likewise.
1615 (x86_linux_dr_get_addr): Likewise.
1616 (x86_linux_dr_set_control): Likewise.
1617 (x86_linux_dr_get_control): Likewise.
1618 (x86_linux_dr_get_status): Likewise.
1619 (x86_linux_update_debug_registers): Likewise.
1620
1621 2015-03-24 Gary Benson <gbenson@redhat.com>
1622
1623 * linux-x86-low.c (x86_linux_update_debug_registers):
1624 New function, factored out from...
1625 (x86_linux_prepare_to_resume): ...this.
1626
1627 2015-03-24 Gary Benson <gbenson@redhat.com>
1628
1629 * linux-x86-low.c (x86_linux_dr_get): Update comments.
1630 (x86_linux_dr_set): Likewise.
1631 (update_debug_registers_callback): Likewise.
1632 (x86_linux_dr_set_addr): Likewise.
1633 (x86_linux_dr_get_addr): Likewise.
1634 (x86_linux_dr_set_control): Likewise.
1635 (x86_linux_dr_get_control): Likewise.
1636 (x86_linux_dr_get_status): Likewise.
1637 (x86_linux_prepare_to_resume): Likewise.
1638
1639 2015-03-24 Gary Benson <gbenson@redhat.com>
1640
1641 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
1642 Use perror_with_name. Pass string through gettext.
1643 (x86_linux_dr_set): Likewise.
1644
1645 2015-03-24 Gary Benson <gbenson@redhat.com>
1646
1647 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
1648 (x86_linux_dr_set_addr): ...this.
1649 (x86_dr_low_get_addr): Rename to...
1650 (x86_linux_dr_get_addr): ...this.
1651 (x86_dr_low_set_control): Rename to...
1652 (x86_linux_dr_set_control): ...this.
1653 (x86_dr_low_get_control): Rename to...
1654 (x86_linux_dr_get_control): ...this.
1655 (x86_dr_low_get_status): Rename to...
1656 (x86_linux_dr_get_status): ...this.
1657 (x86_dr_low): Update with new function names.
1658
1659 2015-03-24 Gary Benson <gbenson@redhat.com>
1660
1661 * Makefile.in (x86-linux.o): New rule.
1662 * configure.srv: Add x86-linux.o to relevant targets.
1663 * linux-low.c (lwp_set_arch_private_info): New function.
1664 (lwp_arch_private_info): Likewise.
1665 * linux-x86-low.c: Include nat/x86-linux.h.
1666 (arch_lwp_info): Removed structure.
1667 (update_debug_registers_callback):
1668 Use lwp_set_debug_registers_changed.
1669 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
1670 and lwp_set_debug_registers_changed.
1671 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
1672
1673 2015-03-24 Gary Benson <gbenson@redhat.com>
1674
1675 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
1676 * linux-arm-low.c (arm_new_thread): Likewise.
1677 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
1678 * linux-mips-low.c (mips_linux_new_thread): Likewise.
1679 * linux-x86-low.c (x86_linux_new_thread): Likewise.
1680 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
1681
1682 2015-03-24 Gary Benson <gbenson@redhat.com>
1683
1684 * linux-low.c (ptid_of_lwp): New function.
1685 (lwp_is_stopped): Likewise.
1686 (lwp_stop_reason): Likewise.
1687 * linux-x86-low.c (update_debug_registers_callback):
1688 Use lwp_is_stopped.
1689 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
1690 lwp_stop_reason.
1691
1692 2015-03-24 Gary Benson <gbenson@redhat.com>
1693
1694 * linux-low.h (linux_stop_lwp): Remove declaration.
1695
1696 2015-03-24 Gary Benson <gbenson@redhat.com>
1697
1698 * linux-low.h: Include nat/linux-nat.h.
1699 * linux-low.c (iterate_over_lwps_args): New structure.
1700 (iterate_over_lwps_filter): New function.
1701 (iterate_over_lwps): Likewise.
1702 * linux-x86-low.c (update_debug_registers_callback):
1703 Update signature to what iterate_over_lwps expects.
1704 Remove PID check that iterate_over_lwps now performs.
1705 (x86_dr_low_set_addr): Use iterate_over_lwps.
1706 (x86_dr_low_set_control): Likewise.
1707
1708 2015-03-24 Gary Benson <gbenson@redhat.com>
1709
1710 * linux-x86-low.c (x86_debug_reg_state): New function.
1711 (x86_linux_prepare_to_resume): Use the above.
1712
1713 2015-03-24 Gary Benson <gbenson@redhat.com>
1714
1715 * linux-low.c (current_lwp_ptid): New function.
1716 * linux-x86-low.c: Include nat/linux-nat.h.
1717 (x86_dr_low_get_addr): Use current_lwp_ptid.
1718 (x86_dr_low_get_control): Likewise.
1719 (x86_dr_low_get_status): Likewise.
1720
1721 2015-03-20 Pedro Alves <palves@redhat.com>
1722
1723 * tracepoint.c (cmd_qtstatus): Make "str" const.
1724
1725 2015-03-20 Pedro Alves <palves@redhat.com>
1726
1727 * server.c (handle_general_set): Make "req_str" const.
1728
1729 2015-03-19 Pedro Alves <palves@redhat.com>
1730
1731 * linux-low.c (linux_resume_one_lwp): Rename to ...
1732 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
1733 instead call perror_with_name.
1734 (check_ptrace_stopped_lwp_gone): New function.
1735 (linux_resume_one_lwp): Reimplement as wrapper around
1736 linux_resume_one_lwp_throw that swallows errors if the LWP is
1737 gone.
1738
1739 2015-03-19 Pedro Alves <palves@redhat.com>
1740
1741 * linux-low.c (count_events_callback, select_event_lwp_callback):
1742 No longer check whether the thread has resume_stop as last resume
1743 kind.
1744
1745 2015-03-19 Pedro Alves <palves@redhat.com>
1746
1747 * linux-low.c (count_events_callback, select_event_lwp_callback):
1748 Use the lwp's status_pending_p field, not the thread's.
1749
1750 2015-03-19 Pedro Alves <palves@redhat.com>
1751
1752 * linux-low.c (select_event_lwp_callback): Update comments to
1753 no longer mention SIGTRAP.
1754
1755 2015-03-18 Gary Benson <gbenson@redhat.com>
1756
1757 * server.c (handle_query): Do not report vFile:fstat as supported.
1758
1759 2015-03-11 Gary Benson <gbenson@redhat.com>
1760
1761 * hostio.c (sys/types.h): New include.
1762 (sys/stat.h): Likewise.
1763 (common-remote-fileio.h): Likewise.
1764 (handle_fstat): New function.
1765 (handle_vFile): Handle vFile:fstat packets.
1766
1767 2015-03-11 Gary Benson <gbenson@redhat.com>
1768
1769 * configure.ac (AC_CHECK_MEMBERS): Add checks for
1770 struct stat.st_blocks and struct stat.st_blksize.
1771 * configure: Regenerate.
1772 * config.in: Likewise.
1773 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
1774 (OBS): Add common-remote-fileio.o.
1775 (common-remote-fileio.o): New rule.
1776
1777 2015-03-09 Pedro Alves <palves@redhat.com>
1778
1779 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
1780 'struct sockaddr' pointer in 'accept' call.
1781
1782 2015-03-09 Pedro Alves <palves@redhat.com>
1783
1784 Revert:
1785 2015-03-07 Pedro Alves <palves@redhat.com>
1786 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
1787 or <winsock2.h> here. Instead include "gdb_socket.h".
1788 (remote_open): Use union gdb_sockaddr_u.
1789 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
1790 or <winsock2.h> here. Instead include "gdb_socket.h".
1791 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
1792 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
1793 or <sys/un.h>.
1794 (init_named_socket, gdb_agent_helper_thread): Use union
1795 gdb_sockaddr_u.
1796
1797 2015-03-07 Pedro Alves <palves@redhat.com>
1798
1799 * configure.ac (build_warnings): Move
1800 -Wdeclaration-after-statement to the C-specific set.
1801 * configure: Regenerate.
1802
1803 2015-03-07 Pedro Alves <palves@redhat.com>
1804
1805 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
1806 or <winsock2.h> here. Instead include "gdb_socket.h".
1807 (remote_open): Use union gdb_sockaddr_u.
1808 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
1809 or <winsock2.h> here. Instead include "gdb_socket.h".
1810 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
1811 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
1812 or <sys/un.h>.
1813 (init_named_socket, gdb_agent_helper_thread): Use union
1814 gdb_sockaddr_u.
1815
1816 2015-03-07 Pedro Alves <palves@redhat.com>
1817
1818 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
1819 instead.
1820
1821 2015-03-06 Yao Qi <yao.qi@linaro.org>
1822
1823 * linux-aarch64-low.c (aarch64_insert_point): Use
1824 show_debug_regs as a boolean.
1825 (aarch64_remove_point): Likewise.
1826
1827 2015-03-05 Pedro Alves <palves@redhat.com>
1828
1829 * lynx-low.c (lynx_target_ops): Install NULL hooks for
1830 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
1831 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
1832 * nto-low.c (nto_target_ops): Likewise.
1833 * spu-low.c (spu_target_ops): Likewise.
1834 * win32-low.c (win32_target_ops): Likewise.
1835
1836 2015-03-04 Pedro Alves <palves@redhat.com>
1837
1838 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
1839 Decide whether a breakpoint triggered based on the SIGTRAP's
1840 siginfo.si_code.
1841 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
1842 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
1843 (linux_low_filter_event): Check for breakpoints before checking
1844 watchpoints.
1845 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
1846 siginfo.si_code.
1847 (linux_stopped_by_sw_breakpoint)
1848 (linux_supports_stopped_by_sw_breakpoint)
1849 (linux_stopped_by_hw_breakpoint)
1850 (linux_supports_stopped_by_hw_breakpoint): New functions.
1851 (linux_target_ops): Install new target methods.
1852
1853 2015-03-04 Pedro Alves <palves@redhat.com>
1854
1855 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
1856 * server.c (swbreak_feature, hwbreak_feature): New globals.
1857 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
1858 (captured_main): Clear swbreak_feature and hwbreak_feature.
1859 * server.h (swbreak_feature, hwbreak_feature): Declare.
1860 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
1861 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
1862 supports_stopped_by_hw_breakpoint>: New fields.
1863 (target_supports_stopped_by_sw_breakpoint)
1864 (target_stopped_by_sw_breakpoint)
1865 (target_supports_stopped_by_hw_breakpoint)
1866 (target_stopped_by_hw_breakpoint): Declare.
1867
1868 2015-03-04 Pedro Alves <palves@redhat.com>
1869
1870 enum lwp_stop_reason -> enum target_stop_reason
1871 * linux-low.c (check_stopped_by_breakpoint): Adjust.
1872 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
1873 (linux_wait_1, stuck_in_jump_pad_callback)
1874 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
1875 (linux_stopped_by_watchpoint):
1876 * linux-low.h (enum lwp_stop_reason): Delete.
1877 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
1878 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
1879
1880 2015-03-04 Yao Qi <yao.qi@linaro.org>
1881
1882 * Makefile.in (SFILES): Add linux-aarch64-low.c.
1883
1884 2015-03-03 Gary Benson <gbenson@redhat.com>
1885
1886 * hostio.c (handle_vFile): Fix prefix lengths.
1887
1888 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
1889
1890 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
1891 ptr_bits.
1892
1893 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
1894
1895 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
1896 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
1897 (clean): Add "rm -f" for above C files.
1898 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
1899 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
1900 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
1901 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
1902 * linux-s390-low.c (HWCAP_S390_VX): New macro.
1903 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
1904 (init_registers_s390x_vx_linux64)
1905 (init_registers_s390x_tevx_linux64)
1906 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
1907 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
1908 declarations.
1909 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
1910 (s390_store_vxrs_high): New functions.
1911 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
1912 NT_S390_VXRS_HIGH.
1913 (s390_arch_setup): Add logic for selecting one of the new target
1914 descriptions. Activate the new vector regsets if applicable.
1915 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
1916 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
1917 and init_registers_s390x_tevx_linux64.
1918
1919 2015-03-01 Pedro Alves <palves@redhat.com>
1920
1921 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
1922 parameter.
1923
1924 2015-02-27 Pedro Alves <palves@redhat.com>
1925
1926 * linux-x86-low.c (u_debugreg_offset): New function.
1927 (x86_linux_dr_get, x86_linux_dr_set): Use it.
1928
1929 2015-02-27 Pedro Alves <palves@redhat.com>
1930
1931 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
1932 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
1933 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
1934 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
1935 (ps_lsetfpregs, ps_getpid)
1936 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
1937 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
1938 (ps_lsetxregs, ps_plog): Declare.
1939
1940 2015-02-27 Pedro Alves <palves@redhat.com>
1941
1942 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
1943 IP_AGENT_EXPORT_FUNC.
1944 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
1945 IP_AGENT_EXPORT_FUNC.
1946 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
1947 (IP_AGENT_EXPORT): Delete.
1948 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
1949 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
1950 (gdb_trampoline_buffer_error, collecting, gdb_collect)
1951 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
1952 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
1953 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
1954 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
1955 (traceframe_read_count, traceframe_write_count)
1956 (traceframes_created, trace_state_variables, get_raw_reg)
1957 (get_trace_state_variable_value, set_trace_state_variable_value)
1958 (ust_loaded, helper_thread_id, cmd_buf): Use
1959 IPA_SYM_EXPORTED_NAME.
1960 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
1961 (tracepoints) Use IP_AGENT_EXPORT_VAR.
1962 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
1963 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
1964 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
1965 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
1966 EXTERN_C_PUSH/EXTERN_C_POP.
1967 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
1968 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
1969 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
1970 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
1971 (traceframe_write_count, traceframe_read_count)
1972 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
1973 (about_to_request_buffer_space, get_trace_state_variable_value)
1974 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
1975 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
1976 EXTERN_C_PUSH/EXTERN_C_POP.
1977 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
1978 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
1979 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
1980 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
1981 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
1982 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
1983 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
1984 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
1985 Define.
1986 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
1987 (IP_AGENT_EXPORT_VAR_DECL): Define.
1988 (tracing): Declare.
1989 (gdb_agent_get_raw_reg): Declare.
1990
1991 2015-02-27 Tom Tromey <tromey@redhat.com>
1992 Pedro Alves <palves@redhat.com>
1993
1994 Rename symbols whose names are reserved C++ keywords throughout.
1995
1996 2015-02-27 Pedro Alves <palves@redhat.com>
1997
1998 * Makefile.in (COMPILER): New, get it from autoconf.
1999 (CXX): Get from autoconf instead.
2000 (COMPILE.pre): Use COMPILER.
2001 (CC-LD): Rename to ...
2002 (CC_LD): ... this. Use COMPILER.
2003 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
2004 (CXX_FOR_TARGET): Default to g++ instead of gcc.
2005 * acinclude.m4: Include build-with-cxx.m4.
2006 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
2007 Disable -Werror by default if building in C++ mode.
2008 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
2009 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
2010 the C++ compiler. Save/restore CXXFLAGS too.
2011 * configure: Regenerate.
2012
2013 2015-02-27 Pedro Alves <palves@redhat.com>
2014
2015 * acinclude.m4: Include libiberty.m4.
2016 * configure.ac: Call libiberty_INIT.
2017 * config.in, configure: Regenerate.
2018
2019 2015-02-26 Pedro Alves <palves@redhat.com>
2020
2021 * linux-low.c (linux_wait_1): When incrementing the PC past a
2022 program breakpoint always use the_low_target.breakpoint_len as
2023 increment, rather than the maximum between that and
2024 the_low_target.decr_pc_after_break.
2025
2026 2015-02-23 Pedro Alves <palves@redhat.com>
2027
2028 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
2029 thread was doing a step-over; always adjust the PC if
2030 we stepped over a permanent breakpoint.
2031 (linux_wait_1): If we stepped over breakpoint that was on top of a
2032 permanent breakpoint, manually advance the PC past it.
2033
2034 2015-02-23 Pedro Alves <palves@redhat.com>
2035
2036 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
2037 modes.
2038 (x86_fill_gregset, x86_store_gregset): Use it when handling
2039 $orig_eax.
2040
2041 2015-02-20 Pedro Alves <palves@redhat.com>
2042
2043 * thread-db.c: Include "nat/linux-procfs.h".
2044 (thread_db_init): Skip listing new threads if the kernel supports
2045 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
2046
2047 2015-02-20 Pedro Alves <palves@redhat.com>
2048
2049 * linux-low.c (status_pending_p_callback): Use ptid_match.
2050
2051 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
2052
2053 PR breakpoints/16812
2054 * linux-low.c (wstatus_maybe_breakpoint): Remove.
2055 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
2056 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
2057
2058 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
2059
2060 PR breakpoints/15956
2061 * tracepoint.c (cmd_qtinit): Add check for current_thread.
2062
2063 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2064
2065 * linux-low.c (linux_low_btrace_conf): Print size.
2066 * server.c (handle_btrace_conf_general_set): New.
2067 (hanle_general_set): Call handle_btrace_conf_general_set.
2068 (handle_query): Report Qbtrace-conf:bts:size as supported.
2069
2070 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2071
2072 * linux-low.c (linux_low_enable_btrace): Update parameters.
2073 (linux_low_btrace_conf): New.
2074 (linux_target_ops)<to_btrace_conf>: Initialize.
2075 * server.c (current_btrace_conf): New.
2076 (handle_btrace_enable): Rename to ...
2077 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
2078 to target_enable_btrace. Update comment. Update users.
2079 (handle_qxfer_btrace_conf): New.
2080 (qxfer_packets): Add btrace-conf entry.
2081 (handle_query): Report qXfer:btrace-conf:read as supported packet.
2082 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
2083 (target_ops)<read_btrace_conf>: New.
2084 (target_enable_btrace): Update parameters.
2085 (target_read_btrace_conf): New.
2086
2087 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2088
2089 * server.c (handle_btrace_general_set): Remove call to
2090 target_supports_btrace.
2091 (supported_btrace_packets): New.
2092 (handle_query): Call supported_btrace_packets.
2093 * target.h: include btrace-common.h.
2094 (btrace_target_info): Removed.
2095 (supports_btrace, target_supports_btrace): Update parameters.
2096
2097 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2098
2099 * Makefile.in (SFILES): Add common/btrace-common.c.
2100 (OBS): Add common/btrace-common.o.
2101 (btrace-common.o): Add build rules.
2102 * linux-low: Include btrace-common.h.
2103 (linux_low_read_btrace): Use struct btrace_data. Call
2104 btrace_data_init and btrace_data_fini.
2105
2106 2015-02-06 Pedro Alves <palves@redhat.com>
2107
2108 * thread-db.c (find_new_threads_callback): Add debug output.
2109
2110 2015-02-04 Pedro Alves <palves@redhat.com>
2111
2112 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
2113 (resume_stopped_resumed_lwps): New function.
2114 (linux_wait_for_event_filtered): Use it.
2115
2116 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
2117
2118 * Makefile.in (SFILES): Add linux-personality.c.
2119 (linux-personality.o): New rule.
2120 * configure.srv (srv_linux_obj): Add linux-personality.o to the
2121 list of objects to be built.
2122 * linux-low.c: Include nat/linux-personality.h.
2123 (linux_create_inferior): Remove code to disable address space
2124 randomization (moved to ../nat/linux-personality.c). Create
2125 cleanup to disable address space randomization.
2126
2127 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
2128
2129 * Makefile.in (posix-strerror.o): New rule.
2130 (mingw-strerror.o): Likewise.
2131 * configure: Regenerated.
2132 * configure.ac: Source file ../common/common.host. Initialize new
2133 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
2134
2135 2015-01-14 Yao Qi <yao@codesourcery.com>
2136
2137 * Makefile.in (SFILES): Add nat/ppc-linux.c.
2138 (ppc-linux.o): New rule.
2139 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
2140 * configure.ac: AC_CHECK_FUNCS(getauxval).
2141 * config.in: Re-generated.
2142 * configure: Re-generated.
2143 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
2144 ppc64_64bit_inferior_p
2145
2146 2015-01-14 Yao Qi <yao@codesourcery.com>
2147
2148 * linux-ppc-low.c: Include "nat/ppc-linux.h".
2149 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
2150 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
2151 (PT_ORIG_R3, PT_TRAP): Likewise.
2152 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
2153 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
2154 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
2155
2156 2015-01-10 Joel Brobecker <brobecker@adacore.com>
2157
2158 * i387-fp.c (i387_cache_to_xsave): In look over
2159 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
2160 zmmh_low_space field by use of zmmh_high_space.
2161
2162 2015-01-09 Pedro Alves <palves@redhat.com>
2163
2164 * linux-low.c (step_over_bkpt): Move higher up in the file.
2165 (handle_extended_wait): Don't store the stop_pc here.
2166 (get_stop_pc): Adjust comments and rename to ...
2167 (check_stopped_by_breakpoint): ... this. Record whether the LWP
2168 stopped for a software breakpoint or hardware breakpoint.
2169 (thread_still_has_status_pending_p): New function.
2170 (status_pending_p_callback): Use
2171 thread_still_has_status_pending_p. If the event is no longer
2172 interesting, resume the LWP.
2173 (handle_tracepoints): Add assert.
2174 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
2175 (wstatus_maybe_breakpoint): New function.
2176 (cancel_breakpoint): Delete function.
2177 (check_stopped_by_watchpoint): New function, factored out from
2178 linux_low_filter_event.
2179 (lp_status_maybe_breakpoint): Delete function.
2180 (linux_low_filter_event): Remove filter_ptid argument.
2181 Leave thread group exits pending here. Store the LWP's stop PC.
2182 Always leave events pending.
2183 (linux_wait_for_event_filtered): Pull all events out of the
2184 kernel, and leave them all pending.
2185 (count_events_callback, select_event_lwp_callback): Consider all
2186 events.
2187 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
2188 (select_event_lwp): Only give preference to the stepping LWP in
2189 all-stop mode. Adjust comments.
2190 (ignore_event): New function.
2191 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
2192 references to cancel_breakpoints. Adjust to renames. Also give
2193 equal priority to all LWPs that have had events in non-stop mode.
2194 If reporting a software breakpoint event, unadjust the LWP's PC.
2195 (linux_wait): If linux_wait_1 returned an ignored event, retry.
2196 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
2197 Adjust.
2198 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
2199 (resume_status_pending_p): Use thread_still_has_status_pending_p.
2200 (linux_stopped_by_watchpoint): Adjust.
2201 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
2202 * linux-low.h (enum lwp_stop_reason): New.
2203 (struct lwp_info) <stop_pc>: Adjust comment.
2204 <stopped_by_watchpoint>: Delete field.
2205 <stop_reason>: New field.
2206 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
2207 * mem-break.c (software_breakpoint_inserted_here)
2208 (hardware_breakpoint_inserted_here): New function.
2209 * mem-break.h (software_breakpoint_inserted_here)
2210 (hardware_breakpoint_inserted_here): Declare.
2211 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
2212 (cancel_breakpoints): Delete.
2213 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
2214 (upload_fast_traceframes): Remove references to
2215 cancel_breakpoints.
2216
2217 2015-01-09 Pedro Alves <palves@redhat.com>
2218
2219 * thread-db.c (find_new_threads_callback): Ignore thread if the
2220 kernel thread ID is -1.
2221
2222 2015-01-09 Pedro Alves <palves@redhat.com>
2223
2224 * linux-low.c (linux_attach_fail_reason_string): Move to
2225 nat/linux-ptrace.c, and rename.
2226 (linux_attach_lwp): Update comment.
2227 (attach_proc_task_lwp_callback): New function.
2228 (linux_attach): Adjust to rename and use
2229 linux_proc_attach_tgid_threads.
2230 (linux_attach_fail_reason_string): Delete declaration.
2231
2232 2015-01-01 Joel Brobecker <brobecker@adacore.com>
2233
2234 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
2235 * server.c (gdbserver_version): Likewise.
2236
2237 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
2238
2239 * remote-utils.c: Include ctype.h.
2240 (input_interrupt): Explicitly handle the case when the char
2241 received is the NUL byte. Improve the printing of non-ASCII
2242 characters.
2243
2244 2014-12-16 Joel Brobecker <brobecker@adacore.com>
2245
2246 * linux-low.c (linux_low_filter_event): Update call to
2247 linux_enable_event_reporting following the addition of
2248 a new parameter to that function.
2249
2250 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
2251
2252 PR server/17457
2253 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
2254 (AARCH64_FPCR_REGNO): Likewise.
2255 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
2256 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
2257 (aarch64_store_fpregset): Likewise.
2258
2259 2014-12-15 Joel Brobecker <brobecker@adacore.com>
2260
2261 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
2262 Remove FIXME comment about assumption about N.
2263
2264 2014-12-13 Joel Brobecker <brobecker@adacore.com>
2265
2266 * configure.ac: If large-file support is disabled in GDBserver,
2267 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
2268 * configure: Regenerate.
2269
2270 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2271
2272 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
2273 warning upon ENODATA from ptrace.
2274 * linux-s390-low.c (s390_store_tdb): New.
2275 (s390_regsets): Add regset for NT_S390_TDB.
2276
2277 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2278
2279 * linux-low.c (regsets_store_inferior_registers): Skip regsets
2280 without a fill_function.
2281 * linux-s390-low.c (s390_fill_last_break): Remove.
2282 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
2283 (s390_arch_setup): Use regset's size instead of fill_function for
2284 loop end condition.
2285
2286 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2287
2288 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
2289 the regset's store function when ptrace returned an error.
2290 * regcache.c (get_thread_regcache): Invalidate register cache
2291 before fetching inferior's registers.
2292
2293 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2294
2295 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
2296 while-loop as for-loop.
2297 (regsets_store_inferior_registers): Likewise.
2298
2299 2014-11-28 Yao Qi <yao@codesourcery.com>
2300
2301 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
2302 * config.in, configure: Re-generate.
2303 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
2304 is defined.
2305
2306 2014-11-21 Yao Qi <yao@codesourcery.com>
2307
2308 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
2309 (AC_CHECK_HEADERS): Remove malloc.h.
2310 * configure: Re-generated.
2311 * config.in: Re-generated.
2312 * server.h: Don't include alloca.h and malloc.h.
2313 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
2314 Don't include malloc.h.
2315
2316 2014-11-17 Joel Brobecker <brobecker@adacore.com>
2317
2318 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
2319 corresponding ERRNO check in same block.
2320
2321 2014-11-12 Pedro Alves <palves@redhat.com>
2322
2323 * server.c (cont_thread): Update comment.
2324 (start_inferior, attach_inferior): No longer clear cont_thread.
2325 (handle_v_cont): No longer set cont_thread.
2326 (captured_main): Clear cont_thread each time a GDB connects.
2327
2328 2014-11-12 Pedro Alves <palves@redhat.com>
2329
2330 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
2331 thread, and don't resume all threads if the Hc thread has exited.
2332
2333 2014-11-12 Pedro Alves <palves@redhat.com>
2334
2335 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
2336 the process group instead of to a specific LWP.
2337
2338 2014-10-15 Pedro Alves <palves@redhat.com>
2339
2340 PR server/17487
2341 * win32-arm-low.c (arm_set_thread_context): Remove current_event
2342 parameter.
2343 (arm_set_thread_context): Delete.
2344 (the_low_target): Adjust.
2345 * win32-i386-low.c (debug_registers_changed)
2346 (debug_registers_used): Delete.
2347 (update_debug_registers_callback): New function.
2348 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
2349 needing to update their debug registers.
2350 (win32_get_current_dr): New function.
2351 (x86_dr_low_get_addr, x86_dr_low_get_control)
2352 (x86_dr_low_get_status): Fetch the debug register from the thread
2353 record's context.
2354 (i386_initial_stuff): Adjust.
2355 (i386_get_thread_context): Remove current_event parameter. Don't
2356 clear debug_registers_changed nor copy DR values to
2357 debug_reg_state.
2358 (i386_set_thread_context): Delete.
2359 (i386_prepare_to_resume): New function.
2360 (i386_thread_added): Mark the thread as needing to update irs
2361 debug registers.
2362 (the_low_target): Remove i386_set_thread_context and install
2363 i386_prepare_to_resume.
2364 * win32-low.c (win32_get_thread_context): Adjust.
2365 (win32_set_thread_context): Use SetThreadContext
2366 directly.
2367 (win32_prepare_to_resume): New function.
2368 (win32_require_context): New function, factored out from ...
2369 (thread_rec): ... this.
2370 (continue_one_thread): Call win32_prepare_to_resume on each thread
2371 we're about to continue.
2372 (win32_resume): Call win32_prepare_to_resume on the event thread.
2373 * win32-low.h (struct win32_thread_info)
2374 <debug_registers_changed>: New field.
2375 (struct win32_target_ops): Change prototype of set_thread_context,
2376 delete set_thread_context and add prepare_to_resume.
2377 (win32_require_context): New declaration.
2378
2379 2014-10-08 Gary Benson <gbenson@redhat.com>
2380
2381 * server.h: Do not include common-exceptions.h.
2382
2383 2014-10-08 Gary Benson <gbenson@redhat.com>
2384
2385 * server.h: Do not include cleanups.h.
2386
2387 2014-09-30 James Hogan <james.hogan@imgtec.com>
2388
2389 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
2390 mips64-dsp-linux.c.
2391
2392 2014-09-23 Yao Qi <yao@codesourcery.com>
2393
2394 * linux-low.c (lp_status_maybe_breakpoint): New function.
2395 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
2396 (count_events_callback): Likewise.
2397 (select_event_lwp_callback): Likewise.
2398 (cancel_breakpoints_callback): Likewise.
2399
2400 2014-09-19 Don Breazeal <donb@codesourcery.com>
2401
2402 * linux-low.c (handle_extended_wait): Call
2403 linux_ptrace_get_extended_event.
2404 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
2405 linux_is_extended_waitstatus.
2406
2407 2014-09-16 Joel Brobecker <brobecker@adacore.com>
2408
2409 * Makefile.in (CPPFLAGS): Define.
2410 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
2411 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
2412
2413 2014-09-16 Gary Benson <gbenson@redhat.com>
2414
2415 * inferiors.h (current_inferior): Renamed as...
2416 (current_thread): New variable. All uses updated.
2417 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
2418 (maybe_move_out_of_jump_pad): Likewise.
2419 (cancel_breakpoint): Likewise.
2420 (linux_low_filter_event): Likewise.
2421 (wait_for_sigstop): Likewise.
2422 (linux_resume_one_lwp): Likewise.
2423 (need_step_over_p): Likewise.
2424 (start_step_over): Likewise.
2425 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
2426 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
2427 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
2428 and save_inferior as saved_thread.
2429 * regcache.c (get_thread_regcache): Renamed saved_inferior as
2430 saved_thread.
2431 (regcache_invalidate_thread): Likewise.
2432 * remote-utils.c (prepare_resume_reply): Likewise.
2433 * thread-db.c (thread_db_get_tls_address): Likewise.
2434 (disable_thread_event_reporting): Likewise.
2435 (remove_thread_event_breakpoints): Likewise.
2436 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
2437 as saved_thread.
2438 * target.h (set_desired_inferior): Renamed as...
2439 (set_desired_thread): New declaration. All uses updated.
2440 * server.c (myresume): Updated comment to reference thread instead
2441 of inferior.
2442 (handle_serial_event): Likewise.
2443 (handle_target_event): Likewise.
2444
2445 2014-09-12 Tom Tromey <tromey@redhat.com>
2446 Gary Benson <gbenson@redhat.com>
2447
2448 * regcache.h: Include common-regcache.h.
2449 (regcache_read_pc): Don't declare.
2450 * regcache.c (get_thread_regcache_for_ptid): New function.
2451
2452 2014-09-11 Tom Tromey <tromey@redhat.com>
2453 Gary Benson <gbenson@redhat.com>
2454
2455 * symbol.c: New file.
2456 * Makefile.in (SFILES): Add symbol.c.
2457 (OBS): Add symbol.o.
2458
2459 2014-09-11 Gary Benson <gbenson@redhat.com>
2460
2461 * target.c (target_stop_ptid, target_continue_ptid): New
2462 functions.
2463
2464 2014-09-11 Tom Tromey <tromey@redhat.com>
2465 Gary Benson <gbenson@redhat.com>
2466
2467 * target.h: Include target/target.h.
2468 * target.c (target_read_memory, target_read_uint32)
2469 (target_write_memory): New functions.
2470
2471 2014-09-11 Gary Benson <gbenson@redhat.com>
2472
2473 * server.h (debug_hw_points): Don't declare.
2474 * server.c (debug_hw_points): Don't define. Replace all uses
2475 with show_debug_regs.
2476 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
2477 all uses with show_debug_regs.
2478
2479 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
2480
2481 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
2482 endianness into account.
2483 (ppc_supply_ptrace_register): Likewise.
2484
2485 2014-09-03 James Hogan <james.hogan@imgtec.com>
2486
2487 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
2488 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
2489
2490 2014-09-03 Gary Benson <gbenson@redhat.com>
2491
2492 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
2493 ALL_DEBUG_ADDRESS_REGISTERS.
2494
2495 2014-09-02 Gary Benson <gbenson@redhat.com>
2496
2497 * i386-low.h: Renamed as...
2498 * x86-low.h: New file. All type, function and variable name
2499 prefixes changed from "i386_" to "x86_". All references updated.
2500 * i386-low.c: Renamed as...
2501 * x86-low.c: New file. All type, function and variable name
2502 prefixes changed from "i386_" to "x86_". All references updated.
2503
2504 2014-09-02 Gary Benson <gbenson@redhat.com>
2505
2506 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
2507 (x86_linux_new_thread): Likewise.
2508
2509 2014-08-29 Gary Benson <gbenson@redhat.com>
2510
2511 * server.h (setjmp.h): Do not include.
2512 (toplevel): Do not declare.
2513 (common-exceptions.h): Include.
2514 (cleanups.h): Likewise.
2515 * server.c (toplevel): Do not define.
2516 (exit_code): New static global.
2517 (detach_or_kill_for_exit_cleanup): New function.
2518 (main): New function. Original main renamed to...
2519 (captured_main): New function.
2520 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
2521
2522 2014-08-29 Gary Benson <gbenson@redhat.com>
2523
2524 * Makefile.in (SFILES): Add common/common-exceptions.c.
2525 (OBS): Add common-exceptions.o.
2526 (common-exceptions.o): New rule.
2527 * utils.c (prepare_to_throw_exception): New function.
2528
2529 2014-08-29 Gary Benson <gbenson@redhat.com>
2530
2531 * config.in: Regenerate.
2532 * configure: Likewise.
2533
2534 2014-08-29 Gary Benson <gbenson@redhat.com>
2535
2536 * Makefile.in (SFILES): Add common/cleanups.c.
2537 (OBS): cleanups.o.
2538 (cleanups.o): New rule.
2539
2540 2014-08-29 Gary Benson <gbenson@redhat.com>
2541
2542 * utils.c (internal_vwarning): New function.
2543
2544 2014-08-28 Gary Benson <gbenson@redhat.com>
2545
2546 * utils.h (fatal): Remove declaration.
2547 * utils.c (fatal): Remove function.
2548
2549 2014-08-28 Gary Benson <gbenson@redhat.com>
2550
2551 * tracepoint.c (gdb_agent_init): Replace fatal with
2552 perror_with_name.
2553 (initialize_tracepoint): Likewise.
2554
2555 2014-08-28 Gary Benson <gbenson@redhat.com>
2556
2557 * remote-utils.c (remote_prepare): Replace fatal with error.
2558
2559 2014-08-28 Gary Benson <gbenson@redhat.com>
2560
2561 * linux-low.c (linux_async): Replace fatal with warning.
2562 Tidy up and return.
2563 (linux_start_non_stop): Return -1 if linux_async failed.
2564
2565 2014-08-28 Gary Benson <gbenson@redhat.com>
2566
2567 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
2568 gdb_assert.
2569 (i386_dr_low_get_addr): Remove vague comment.
2570 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
2571 gdb_assert.
2572
2573 2014-08-28 Gary Benson <gbenson@redhat.com>
2574
2575 * inferiors.c (get_thread_process): Replace check with gdb_assert.
2576 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
2577 internal_error.
2578 (linux_resume_one_lwp): Likewise.
2579 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
2580 gdb_assert.
2581 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
2582 with internal_error.
2583 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
2584 (init_register_cache): Replace fatal with gdb_assert_not_reached.
2585 (find_register_by_name): Replace fatal with internal_error.
2586 (find_regno): Likewise.
2587 * tdesc.c (init_target_desc): Replace check with gdb_assert.
2588 * thread-db.c (thread_db_create_event): Likewise.
2589 (thread_db_load_search): Likewise.
2590 (try_thread_db_load_1): Likewise.
2591 * tracepoint.c (get_jump_space_head): Replace fatal with
2592 internal_error.
2593 (claim_trampoline_space): Likewise.
2594 (have_fast_tracepoint_trampoline_buffer): Likewise.
2595 (cmd_qtstart): Likewise.
2596 (stop_tracing): Likewise.
2597 (fast_tracepoint_collecting): Likewise.
2598 (target_malloc): Likewise.
2599 (download_tracepoint): Likewise.
2600 (download_trace_state_variables): Replace check with gdb_assert.
2601 (upload_fast_traceframes): Replace fatal with internal_error.
2602
2603 2014-08-19 Tom Tromey <tromey@redhat.com>
2604 Gary Benson <gbenson@redhat.com>
2605
2606 * Makefile.in (SFILES): Add common/common-debug.c.
2607 (OBS): Add common-debug.o.
2608 (common-debug.o): New rule.
2609 * debug.h (debug_printf): Don't declare.
2610 * debug.c (debug_printf): Renamed and rewritten as...
2611 (debug_vprintf): New function.
2612
2613 2014-08-19 Gary Benson <gbenson@redhat.com>
2614
2615 * utils.h: Do not include print-utils.h.
2616
2617 2014-08-19 Tom Tromey <tromey@redhat.com>
2618 Gary Benson <gbenson@redhat.com>
2619
2620 * server.h: Add static assertion.
2621 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
2622
2623 2014-08-19 Tom Tromey <tromey@redhat.com>
2624 Gary Benson <gbenson@redhat.com>
2625
2626 * Makefile.in (SFILES): Add common/errors.c.
2627 (OBS): Add errors.o.
2628 (IPA_OBS): Add errors-ipa.o.
2629 (errors.o): New rule.
2630 (errors-ipa.o): Likewise.
2631 * utils.h (perror_with_name, error, warning): Don't declare.
2632 * utils.c (warning): Renamed and rewritten as...
2633 (vwarning): New function.
2634 (error): Renamed and rewritten as...
2635 (verror): New function.
2636 (internal_error): Renamed and rewritten as...
2637 (internal_verror): New function.
2638
2639 2014-08-07 Gary Benson <gbenson@redhat.com>
2640
2641 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
2642 * configure: Regenerate.
2643 * config.in: Likewise.
2644 * server.h: Do not include errno.h.
2645 * event-loop.c: Likewise.
2646 * hostio-errno.c: Likewise.
2647 * linux-low.c: Likewise.
2648 * remote-utils.c: Likewise.
2649 * spu-low.c: Likewise.
2650 * utils.c: Likewise.
2651 * gdbreplay.c: Unconditionally include errno.h.
2652
2653 2014-08-07 Gary Benson <gbenson@redhat.com>
2654
2655 * server.h: Do not include string.h.
2656 * event-loop.c: Likewise.
2657 * linux-low.c: Likewise.
2658 * regcache.c: Likewise.
2659 * remote-utils.c: Likewise.
2660 * spu-low.c: Likewise.
2661 * utils.c: Likewise.
2662
2663 2014-08-07 Gary Benson <gbenson@redhat.com>
2664
2665 * server.h: Do not include gdb_assert.h.
2666
2667 2014-08-07 Gary Benson <gbenson@redhat.com>
2668
2669 * server.h: Do not include common-utils.h.
2670
2671 2014-08-07 Gary Benson <gbenson@redhat.com>
2672
2673 * server.h: Do not include ptid.h.
2674 * notif.h: Likewise.
2675
2676 2014-08-07 Gary Benson <gbenson@redhat.com>
2677
2678 * server.h: Do not include gdb_locale.h.
2679
2680 2014-08-07 Gary Benson <gbenson@redhat.com>
2681
2682 * server.h: Do not include gdb/signals.h.
2683 * win32-low.c: Likewise.
2684
2685 2014-08-07 Gary Benson <gbenson@redhat.com>
2686
2687 * server.h: Do not include pathmax.h.
2688
2689 2014-08-07 Gary Benson <gbenson@redhat.com>
2690
2691 * server.h: Do not include libiberty.h.
2692 * linux-bfin-low.c: Likewise.
2693
2694 2014-08-07 Gary Benson <gbenson@redhat.com>
2695
2696 * server.h: Do not include ansidecl.h.
2697
2698 2014-08-07 Gary Benson <gbenson@redhat.com>
2699
2700 * linux-x86-low.c: Do not include stddef.h.
2701 * lynx-ppc-low.c: Likewise.
2702 * tracepoint.c: Likewise.
2703
2704 2014-08-07 Gary Benson <gbenson@redhat.com>
2705
2706 * server.h: Do not include stdarg.h.
2707 * nto-low.c: Likewise.
2708
2709 2014-08-07 Gary Benson <gbenson@redhat.com>
2710
2711 * server.h: Do not include stdlib.h.
2712 * inferiors.c: Likewise.
2713 * linux-low.c: Likewise.
2714 * regcache.c: Likewise.
2715 * spu-low.c: Likewise.
2716 * tracepoint.c: Likewise.
2717 * utils.c: Likewise.
2718
2719 2014-08-07 Gary Benson <gbenson@redhat.com>
2720
2721 * server.h: Do not include stdio.h.
2722 * linux-low.c: Likewise.
2723 * remote-utils.c: Likewise.
2724 * spu-low.c: Likewise.
2725 * utils.c: Likewise.
2726 * wincecompat.c: Likewise.
2727
2728 2014-08-06 Gary Benson <gbenson@redhat.com>
2729
2730 * regcache.c (init_register_cache): Move conditionals inside if.
2731
2732 2014-08-06 Gary Benson <gbenson@redhat.com>
2733
2734 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
2735
2736 2014-07-31 Gary Benson <gbenson@redhat.com>
2737
2738 * ax.h: Do not include server.h.
2739 * gdbthread.h: Likewise.
2740 * lynx-low.h: Likewise.
2741 * notif.h: Likewise.
2742
2743 2014-07-30 Gary Benson <gbenson@redhat.com>
2744
2745 * server.h: Include common-defs.h.
2746 Do not include config.h or build-gnulib-gdbserver/config.h.
2747
2748 2014-07-30 Gary Benson <gbenson@redhat.com>
2749
2750 * hostio-errno.c: Move server.h to top of includes list.
2751 * inferiors.c: Likewise.
2752 * linux-x86-low.c: Likewise.
2753 * notif.c: Include server.h.
2754
2755 2014-07-24 Tom Tromey <tromey@redhat.com>
2756 Gary Benson <gbenson@redhat.com>
2757
2758 * server.h (CORE_ADDR): Now unsigned.
2759
2760 2014-07-16 Pedro Alves <palves@redhat.com>
2761
2762 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
2763
2764 2014-07-15 Pedro Alves <palves@redhat.com>
2765
2766 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
2767 copy.
2768
2769 2014-07-11 Pedro Alves <palves@redhat.com>
2770
2771 * linux-low.c (kill_wait_lwp): New function, based on
2772 kill_one_lwp_callback, but use my_waitpid directly.
2773 (kill_one_lwp_callback, linux_kill): Use it.
2774
2775 2014-06-23 Pedro Alves <palves@redhat.com>
2776
2777 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
2778 before setting DR0..DR3.
2779
2780 2014-06-20 Gary Benson <gbenson@redhat.com>
2781
2782 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
2783 * configure: Regenerated.
2784 * config.in: Likewise.
2785
2786 2014-06-20 Gary Benson <gbenson@redhat.com>
2787
2788 * Makefile.in (SFILES): Update locations for files moved
2789 from common to nat.
2790 (object file files): Reordered.
2791
2792 2014-06-20 Gary Benson <gbenson@redhat.com>
2793
2794 * i386-low.h (i386_dr_low_can_set_addr): Removed.
2795 (i386_dr_low_set_addr): Likewise.
2796 (i386_dr_low_get_addr): Likewise.
2797 (i386_dr_low_can_set_control): Likewise.
2798 (i386_dr_low_set_control): Likewise.
2799 (i386_dr_low_get_control): Likewise.
2800 (i386_dr_low_get_status): Likewise.
2801 (i386_get_debug_register_length): Likewise.
2802 * linux-x86-low.c (i386_dr_low_set_addr):
2803 Changed signature. Made static.
2804 (i386_dr_low_get_addr): Likewise.
2805 (i386_dr_low_set_control): Likewise.
2806 (i386_dr_low_get_control): Likewise.
2807 (i386_dr_low_get_status): Likewise.
2808 (i386_dr_low): New global variable.
2809 * win32-i386-low.c (i386_dr_low_set_addr):
2810 Changed signature. Made static.
2811 (i386_dr_low_get_addr): Likewise.
2812 (i386_dr_low_set_control): Likewise.
2813 (i386_dr_low_get_control): Likewise.
2814 (i386_dr_low_get_status): Likewise.
2815 (i386_dr_low): New global variable.
2816
2817 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
2818
2819 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
2820 * Makefile.in (AR, AR_FLAGS): Define.
2821 * configure: Regenerate.
2822
2823 2014-06-19 Gary Benson <gbenson@redhat.com>
2824
2825 * Makefile.in (i386-dregs.o): New rule.
2826 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
2827 * i386-low.c (target.h): Remove include.
2828 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
2829 (DR_CONTROL_SHIFT): Likewise.
2830 (DR_CONTROL_SIZE): Likewise.
2831 (DR_RW_EXECUTE): Likewise.
2832 (DR_RW_WRITE): Likewise.
2833 (DR_RW_READ): Likewise.
2834 (DR_RW_IORW): Likewise.
2835 (DR_LEN_1): Likewise.
2836 (DR_LEN_2): Likewise.
2837 (DR_LEN_4): Likewise.
2838 (DR_LEN_8): Likewise.
2839 (DR_LOCAL_ENABLE_SHIFT): Likewise.
2840 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
2841 (DR_ENABLE_SIZE): Likewise.
2842 (DR_LOCAL_SLOWDOWN): Likewise.
2843 (DR_GLOBAL_SLOWDOWN): Likewise.
2844 (DR_CONTROL_RESERVED): Likewise.
2845 (I386_DR_CONTROL_MASK): Likewise.
2846 (I386_DR_VACANT): Likewise.
2847 (I386_DR_LOCAL_ENABLE): Likewise.
2848 (I386_DR_GLOBAL_ENABLE): Likewise.
2849 (I386_DR_DISABLE): Likewise.
2850 (I386_DR_SET_RW_LEN): Likewise.
2851 (I386_DR_GET_RW_LEN): Likewise.
2852 (I386_DR_WATCH_HIT): Likewise.
2853 (i386_wp_op_t): Likewise.
2854 (i386_show_dr): Likewise.
2855 (i386_length_and_rw_bits): Likewise.
2856 (i386_insert_aligned_watchpoint): Likewise.
2857 (i386_remove_aligned_watchpoint): Likewise.
2858 (i386_handle_nonaligned_watchpoint): Likewise.
2859 i386_update_inferior_debug_regs(): Likewise.
2860 (i386_dr_insert_watchpoint): Likewise.
2861 (i386_dr_remove_watchpoint): Likewise.
2862 (i386_dr_region_ok_for_watchpoint): Likewise.
2863 (i386_dr_stopped_data_address): Likewise.
2864 (i386_dr_stopped_by_watchpoint): Likewise.
2865
2866 2014-06-19 Gary Benson <gbenson@redhat.com>
2867
2868 * i386-low.c (i386_dr_show): Renamed to
2869 i386_show_dr and made static. All uses updated.
2870 (i386_dr_length_and_rw_bits): Renamed to
2871 i386_length_and_rw_bits and made static.
2872 All uses updated.
2873 (i386_dr_insert_aligned_watchpoint): Renamed to
2874 i386_insert_aligned_watchpoint and made static.
2875 All uses updated.
2876 (i386_dr_remove_aligned_watchpoint): Renamed to
2877 i386_remove_aligned_watchpoint and made static.
2878 All uses updated.
2879 (i386_dr_update_inferior_debug_regs): Renamed to
2880 i386_update_inferior_debug_regs and made static.
2881 All uses updated.
2882
2883 2014-06-18 Gary Benson <gbenson@redhat.com>
2884
2885 * i386-low.h (i386_dr_low_can_set_addr): New macro.
2886 (i386_dr_low_can_set_control): Likewise.
2887 (i386_get_debug_register_length): Likewise.
2888 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
2889 (i386_dr_low_can_set_control): Likewise.
2890 (i386_get_debug_register_length): Likewise.
2891
2892 2014-06-17 Gary Benson <gbenson@redhat.com>
2893
2894 * i386-low.h (i386-dregs.h): New include.
2895 (DR_FIRSTADDR): Now in i386-dregs.h.
2896 (DR_LASTADDR): Likewise.
2897 (DR_NADDR): Likewise.
2898 (DR_STATUS): Likewise.
2899 (DR_CONTROL): Likewise.
2900 (i386_debug_reg_state): Likewise.
2901 (i386_dr_insert_watchpoint): Likewise.
2902 (i386_dr_remove_watchpoint): Likewise.
2903 (i386_dr_region_ok_for_watchpoint): Likewise.
2904 (i386_dr_stopped_data_address): Likewise.
2905 (i386_dr_stopped_by_watchpoint): Likewise.
2906 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
2907
2908 2014-06-18 Gary Benson <gbenson@redhat.com>
2909
2910 * i386-low.h (i386_low_insert_watchpoint): Renamed to
2911 i386_dr_insert_watchpoint.
2912 (i386_low_remove_watchpoint): Renamed to
2913 i386_dr_remove_watchpoint.
2914 (i386_low_region_ok_for_watchpoint): Renamed to
2915 i386_dr_region_ok_for_watchpoint.
2916 (i386_low_stopped_data_address): Renamed to
2917 i386_dr_stopped_data_address.
2918 (i386_low_stopped_by_watchpoint): Renamed to
2919 i386_dr_stopped_by_watchpoint.
2920 * i386-low.c (i386_show_dr): Renamed to
2921 i386_dr_show and made nonstatic. All uses updated.
2922 (i386_length_and_rw_bits): Renamed to
2923 i386_dr_length_and_rw_bits and made nonstatic.
2924 All uses updated.
2925 (i386_insert_aligned_watchpoint): Renamed to
2926 i386_dr_insert_aligned_watchpoint and made nonstatic.
2927 All uses updated.
2928 (i386_remove_aligned_watchpoint): Renamed to
2929 i386_dr_remove_aligned_watchpoint and made nonstatic.
2930 All uses updated.
2931 (i386_update_inferior_debug_regs): Renamed to
2932 i386_dr_update_inferior_debug_regs and made nonstatic.
2933 All uses updated.
2934 (i386_low_insert_watchpoint): Renamed to
2935 i386_dr_insert_watchpoint. All uses updated.
2936 (i386_low_remove_watchpoint): Renamed to
2937 i386_dr_remove_watchpoint. All uses updated.
2938 (i386_low_region_ok_for_watchpoint): Renamed to
2939 i386_dr_region_ok_for_watchpoint. All uses updated.
2940 (i386_low_stopped_data_address): Renamed to
2941 i386_dr_stopped_data_address. All uses updated.
2942 (i386_low_stopped_by_watchpoint): Renamed to
2943 i386_dr_stopped_by_watchpoint. All uses updated.
2944
2945 2014-06-18 Gary Benson <gbenson@redhat.com>
2946
2947 * i386-low.c (i386_dr_low_can_set_addr): New macro.
2948 (i386_dr_low_can_set_control): Likewise.
2949 (i386_insert_aligned_watchpoint): New check.
2950
2951 2014-06-18 Gary Benson <gbenson@redhat.com>
2952
2953 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
2954 Renamed to state.
2955
2956 2014-06-18 Gary Benson <gbenson@redhat.com>
2957
2958 * i386-low.c (i386_length_and_rw_bits): Use internal_error
2959 instead of fatal and error.
2960 (i386_handle_nonaligned_watchpoint): Likewise.
2961
2962 2014-06-18 Gary Benson <gbenson@redhat.com>
2963
2964 * i386-low.c (i386_get_debug_register_length): New macro.
2965 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
2966 (i386_show_dr): Use debug_printf instead of fprintf. Use
2967 phex to format values.
2968
2969 2014-06-18 Gary Benson <gbenson@redhat.com>
2970
2971 * i386-low.h: Comment changes.
2972 * i386-low.c: Likewise.
2973
2974 2014-06-18 Gary Benson <gbenson@redhat.com>
2975
2976 * i386-low.c: Whitespace changes.
2977
2978 2014-06-12 Tom Tromey <tromey@redhat.com>
2979
2980 * utils.c (freeargv): Remove.
2981
2982 2014-06-12 Tom Tromey <tromey@redhat.com>
2983
2984 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
2985 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
2986 (parse_debug_format_options): Likewise.
2987 (gdbserver_usage): Likewise.
2988 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
2989 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
2990 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
2991 against libiberty.
2992 ($(LIBGNU)): Depend on libiberty.
2993 (all-lib): Recurse into all subdirs.
2994 (install-only): Invoke "install" target in subdirs.
2995 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
2996 targets.
2997 * configure: Rebuild.
2998 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
2999 for vasprintf, vsnprintf, or gettimeofday.
3000 * configure.srv: Don't add safe-ctype.o or lbasename.o to
3001 srv_tgtobj.
3002
3003 2014-06-05 Joel Brobecker <brobecker@adacore.com>
3004
3005 * development.sh: Delete.
3006 * Makefile.in (config.status): Adjust dependency on development.sh.
3007 * configure.ac: Adjust development.sh source call.
3008 * configure: Regenerate.
3009
3010 2014-06-02 Pedro Alves <palves@redhat.com>
3011
3012 * ax.c (gdb_free_agent_expr): New function.
3013 * ax.h (gdb_free_agent_expr): New declaration.
3014 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
3015 list.
3016 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
3017 static.
3018 (clear_breakpoint_conditions_and_commands): New function.
3019 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
3020 (clear_breakpoint_conditions_and_commands): New declaration.
3021
3022 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
3023
3024 * linux-aarch64-low.c (asm/ptrace.h): Include.
3025
3026 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
3027
3028 Fix TLS access for -static -pthread.
3029 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
3030 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
3031 (thread_db_load_search, try_thread_db_load_1): Initialize it.
3032
3033 2014-05-20 Pedro Alves <palves@redhat.com>
3034
3035 * linux-aarch64-low.c (aarch64_insert_point)
3036 (aarch64_remove_point): No longer check whether the type is
3037 supported here. Adjust to new interface.
3038 (the_low_target): Install aarch64_supports_z_point_type as
3039 supports_z_point_type method.
3040 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
3041 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
3042 instead of a Z packet char. Adjust.
3043 (arm_supports_z_point_type): New function.
3044 (arm_insert_point, arm_remove_point): Adjust to new interface.
3045 (the_low_target): Install arm_supports_z_point_type.
3046 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
3047 (cris_insert_point, cris_remove_point): Adjust to new interface.
3048 Don't check whether the type is supported here.
3049 (the_low_target): Install cris_supports_z_point_type.
3050 * linux-low.c (linux_supports_z_point_type): New function.
3051 (linux_insert_point, linux_remove_point): Adjust to new interface.
3052 * linux-low.h (struct linux_target_ops) <insert_point,
3053 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
3054 raw_breakpoint pointer parameter.
3055 <supports_z_point_type>: New method.
3056 * linux-mips-low.c (mips_supports_z_point_type): New function.
3057 (mips_insert_point, mips_remove_point): Adjust to new interface.
3058 Use mips_supports_z_point_type.
3059 (the_low_target): Install mips_supports_z_point_type.
3060 * linux-ppc-low.c (the_low_target): Install NULL as
3061 supports_z_point_type method.
3062 * linux-s390-low.c (the_low_target): Install NULL as
3063 supports_z_point_type method.
3064 * linux-sparc-low.c (the_low_target): Install NULL as
3065 supports_z_point_type method.
3066 * linux-x86-low.c (x86_supports_z_point_type): New function.
3067 (x86_insert_point): Adjust to new insert_point interface. Use
3068 insert_memory_breakpoint. Adjust to new
3069 i386_low_insert_watchpoint interface.
3070 (x86_remove_point): Adjust to remove_point interface. Use
3071 remove_memory_breakpoint. Adjust to new
3072 i386_low_remove_watchpoint interface.
3073 (the_low_target): Install x86_supports_z_point_type.
3074 * lynx-low.c (lynx_target_ops): Install NULL as
3075 supports_z_point_type callback.
3076 * nto-low.c (nto_supports_z_point_type): New.
3077 (nto_insert_point, nto_remove_point): Adjust to new interface.
3078 (nto_target_ops): Install nto_supports_z_point_type.
3079 * mem-break.c: Adjust intro comment.
3080 (struct raw_breakpoint) <raw_type, size>: New fields.
3081 <inserted>: Update comment.
3082 <shlib_disabled>: Delete field.
3083 (enum bkpt_type) <gdb_breakpoint>: Delete value.
3084 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
3085 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
3086 (raw_bkpt_type_to_target_hw_bp_type): New function.
3087 (find_enabled_raw_code_breakpoint_at): New function.
3088 (find_raw_breakpoint_at): New type and size parameters. Use them.
3089 (insert_memory_breakpoint): New function, based off
3090 set_raw_breakpoint_at.
3091 (remove_memory_breakpoint): New function.
3092 (set_raw_breakpoint_at): Reimplement.
3093 (set_breakpoint): New, based on set_breakpoint_at.
3094 (set_breakpoint_at): Reimplement.
3095 (delete_raw_breakpoint): Go through the_target->remove_point
3096 instead of assuming memory breakpoints.
3097 (find_gdb_breakpoint_at): Delete.
3098 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
3099 (find_gdb_breakpoint): New function.
3100 (set_gdb_breakpoint_at): Delete.
3101 (z_type_supported): New function.
3102 (set_gdb_breakpoint_1): New function, loosely based off
3103 set_gdb_breakpoint_at.
3104 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
3105 (delete_gdb_breakpoint_at): Delete.
3106 (delete_gdb_breakpoint_1): New function, loosely based off
3107 delete_gdb_breakpoint_at.
3108 (delete_gdb_breakpoint): New function.
3109 (clear_gdb_breakpoint_conditions): Rename to ...
3110 (clear_breakpoint_conditions): ... this. Don't handle a NULL
3111 breakpoint.
3112 (add_condition_to_breakpoint): Make static.
3113 (add_breakpoint_condition): Take a struct breakpoint pointer
3114 instead of an address. Adjust.
3115 (gdb_condition_true_at_breakpoint): Rename to ...
3116 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
3117 z_type parameter.
3118 (gdb_condition_true_at_breakpoint): Reimplement.
3119 (add_breakpoint_commands): Take a struct breakpoint pointer
3120 instead of an address. Adjust.
3121 (gdb_no_commands_at_breakpoint): Rename to ...
3122 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
3123 parameter. Return true if no breakpoint was found. Change debug
3124 output.
3125 (gdb_no_commands_at_breakpoint): Reimplement.
3126 (run_breakpoint_commands): Rename to ...
3127 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
3128 and change return type to boolean.
3129 (run_breakpoint_commands): New function.
3130 (gdb_breakpoint_here): Also check for Z1 breakpoints.
3131 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
3132 breakpoint. Go through the_target->remove_point instead of
3133 assuming memory breakpoint.
3134 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
3135 software and hardware breakpoints.
3136 (reinsert_raw_breakpoint): Go through the_target->insert_point
3137 instead of assuming memory breakpoint.
3138 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
3139 software and hardware breakpoints.
3140 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
3141 Check both software and hardware breakpoints.
3142 (validate_inserted_breakpoint): Assert the breakpoint is a
3143 software breakpoint. Set the inserted flag to -1 instead of
3144 setting shlib_disabled.
3145 (delete_disabled_breakpoints): Adjust.
3146 (validate_breakpoints): Only validate software breakpoints.
3147 Adjust to inserted flag change.
3148 (check_mem_read, check_mem_write): Skip breakpoint types other
3149 than software breakpoints. Adjust to inserted flag change.
3150 * mem-break.h (enum raw_bkpt_type): New enum.
3151 (raw_breakpoint, struct process_info): Forward declare.
3152 (Z_packet_to_target_hw_bp_type): Delete declaration.
3153 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
3154 (set_gdb_breakpoint, delete_gdb_breakpoint)
3155 (clear_breakpoint_conditions): New declarations.
3156 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
3157 (breakpoint_inserted_here): Update comment.
3158 (add_breakpoint_condition, add_breakpoint_commands): Replace
3159 address parameter with a breakpoint pointer parameter.
3160 (gdb_breakpoint_here): Update comment.
3161 (delete_gdb_breakpoint_at): Delete.
3162 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
3163 * server.c (process_point_options): Take a struct breakpoint
3164 pointer instead of an address. Adjust.
3165 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
3166 delete_gdb_breakpoint.
3167 * spu-low.c (spu_target_ops): Install NULL as
3168 supports_z_point_type method.
3169 * target.h: Include mem-break.h.
3170 (struct target_ops) <prepare_to_access_memory>: Update comment.
3171 <supports_z_point_type>: New field.
3172 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
3173 instead of a char. Also take a raw breakpoint pointer.
3174 * win32-arm-low.c (the_low_target): Install NULL as
3175 supports_z_point_type.
3176 * win32-i386-low.c (i386_supports_z_point_type): New function.
3177 (i386_insert_point, i386_remove_point): Adjust to new interface.
3178 (the_low_target): Install i386_supports_z_point_type.
3179 * win32-low.c (win32_supports_z_point_type): New function.
3180 (win32_insert_point, win32_remove_point): Adjust to new interface.
3181 (win32_target_ops): Install win32_supports_z_point_type.
3182 * win32-low.h (struct win32_target_ops):
3183 <supports_z_point_type>: New method.
3184 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
3185 instead of a char. Also take a raw breakpoint pointer.
3186
3187 2014-05-20 Pedro Alves <palves@redhat.com>
3188
3189 * mem-break.h: Include break-common.h.
3190 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
3191 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
3192 (Z_packet_to_target_hw_bp_type): New declaration.
3193 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
3194 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
3195 (Z_PACKET_ACCESS_WP): Delete macros.
3196 (Z_packet_to_hw_type): Delete function.
3197 * i386-low.h: Don't include break-common.h here.
3198 (Z_packet_to_hw_type): Delete declaration.
3199 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
3200 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
3201 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
3202 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
3203 * linux-aarch64-low.c: Don't include break-common.h here.
3204 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
3205 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
3206 (Z_packet_to_target_hw_bp_type): Delete function.
3207 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
3208 function.
3209 (mips_insert_point, mips_remove_point): Use
3210 Z_packet_to_target_hw_bp_type.
3211
3212 2014-05-20 Pedro Alves <palves@redhat.com>
3213
3214 * linux-aarch64-low.c: Include break-common.h.
3215 (enum target_point_type): Delete.
3216 (Z_packet_to_point_type): Rename to ...
3217 (Z_packet_to_target_hw_bp_type): ... this, and return a
3218 target_hw_bp_type instead.
3219 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
3220 instead of an enum target_point_type.
3221 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
3222 breakpoint type.
3223 (aarch64_dr_state_insert_one_point)
3224 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
3225 (aarch64_handle_aligned_watchpoint)
3226 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
3227 Take an enum target_hw_bp_type instead of an enum
3228 target_point_type.
3229 (aarch64_supports_z_point_type): New function.
3230 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
3231 use Z_packet_to_target_hw_bp_type.
3232
3233 2014-05-20 Joel Brobecker <brobecker@adacore.com>
3234
3235 * configure.ac: Only use -Werror by default when DEVELOPMENT
3236 is true.
3237 * configure: Regenerate.
3238
3239 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
3240
3241 Fix gdbserver qGetTLSAddr for x86_64 -m32.
3242 * linux-x86-low.c (X86_64_USER_REGS): New.
3243 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
3244
3245 2014-04-28 Yao Qi <yao@codesourcery.com>
3246
3247 * Makefile.in (i386-avx512.c): Fix the typo of generated file
3248 name.
3249
3250 2014-04-25 Pedro Alves <palves@redhat.com>
3251
3252 PR server/16255
3253 * linux-low.c (linux_attach_fail_reason_string): New function.
3254 (linux_attach_lwp): Delete.
3255 (linux_attach_lwp_1): Rename to ...
3256 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
3257 argument. Remove "initial" parameter. Return int instead of
3258 void. Don't error or warn here.
3259 (linux_attach): Adjust to call linux_attach_lwp. Call error on
3260 failure to attach to the tgid. Call warning when failing to
3261 attach to an lwp.
3262 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
3263 argument. Remove "initial" parameter. Return int instead of
3264 void. Don't error or warn here.
3265 (linux_attach_fail_reason_string): New declaration.
3266 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
3267 interface change. Use linux_attach_fail_reason_string.
3268
3269 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
3270 Walfred Tedeschi <walfred.tedeschi@intel.com>
3271
3272 * Makefile.in: Added rules to handle new files
3273 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
3274 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
3275 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
3276 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
3277 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
3278 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
3279 x32-avx512-linux.o.
3280 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
3281 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
3282 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
3283 i386/x32-avx512.xml.
3284 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
3285 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
3286 i386/x32-avx512-linux.xml.
3287 * i387-fp.c (num_avx512_k_registers): New constant for number
3288 of K registers.
3289 (num_avx512_zmmh_low_registers): New constant for number of
3290 lower ZMM registers (0-15).
3291 (num_avx512_zmmh_high_registers): New constant for number of
3292 higher ZMM registers (16-31).
3293 (num_avx512_ymmh_registers): New contant for number of higher
3294 YMM registers (ymm16-31 added by avx521 on x86_64).
3295 (num_avx512_xmm_registers): New constant for number of higher
3296 XMM registers (xmm16-31 added by AVX512 on x86_64).
3297 (struct i387_xsave): Add space for AVX512 registers.
3298 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
3299 Add code to handle AVX512 registers.
3300 (i387_xsave_to_cache): Add code to handle AVX512 registers.
3301 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
3302 prototypei from generated file.
3303 (tdesc_amd64_avx512_linux): Likewise.
3304 (init_registers_x32_avx512_linux): Likewise.
3305 (tdesc_x32_avx512_linux): Likewise.
3306 (init_registers_i386_avx512_linux): Likewise.
3307 (tdesc_i386_avx512_linux): Likewise.
3308 (x86_64_regmap): Add AVX512 registers.
3309 (x86_linux_read_description): Add code to handle AVX512 XSTATE
3310 mask.
3311 (initialize_low_arch): Add code to initialize AVX512 registers.
3312
3313 2014-04-23 Pedro Alves <palves@redhat.com>
3314
3315 * mem-break.c (find_gdb_breakpoint_at): Make static.
3316 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
3317
3318 2014-04-23 Pedro Alves <palves@redhat.com>
3319
3320 * i386-low.c: Don't include break-common.h here.
3321 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
3322 prototype to take target_hw_bp_type as argument instead of a Z
3323 packet char.
3324 * i386-low.h: Include break-common.h here.
3325 (Z_packet_to_hw_type): Declare.
3326 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
3327 prototypes.
3328 * linux-x86-low.c (x86_insert_point): Convert the packet number to
3329 a target_hw_bp_type before calling i386_low_insert_watchpoint.
3330 (x86_remove_point): Convert the packet number to a
3331 target_hw_bp_type before calling i386_low_remove_watchpoint.
3332 * win32-i386-low.c (i386_insert_point): Convert the packet number
3333 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
3334 (i386_remove_point): Convert the packet number to a
3335 target_hw_bp_type before calling i386_low_remove_watchpoint.
3336
3337 2014-04-23 Pedro Alves <palves@redhat.com>
3338
3339 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
3340
3341 2014-04-10 Pedro Alves <palves@redhat.com>
3342
3343 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
3344 Check if the condition or command is NULL before checking if the
3345 breakpoint is known. On success, return true.
3346 * mem-break.h (add_breakpoint_condition): Document return.
3347 (add_breakpoint_commands): Add describing comment.
3348 * server.c (skip_to_semicolon): New function.
3349 (process_point_options): Use it.
3350
3351 2014-04-09 Pedro Alves <palves@redhat.com>
3352
3353 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
3354 to lwpid_of.
3355
3356 2014-02-27 Pedro Alves <palves@redhat.com>
3357
3358 PR 12702
3359 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
3360 macros.
3361 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
3362 output.
3363 (last_thread_of_process_p): Take a PID argument instead of a
3364 thread pointer.
3365 (linux_wait_for_lwp): Delete.
3366 (num_lwps, check_zombie_leaders, not_stopped_callback): New
3367 functions.
3368 (linux_low_filter_event): New function, party factored out from
3369 linux_wait_for_event.
3370 (linux_wait_for_event): Rename to ...
3371 (linux_wait_for_event_filtered): ... this. Add new filter ptid
3372 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
3373 sigsuspend. Check for zombie leaders.
3374 (linux_wait_for_event): Reimplement as wrapper around
3375 linux_wait_for_event_filtered.
3376 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
3377 a normal or signal exit is seen, it's the whole process exiting.
3378 (wait_for_sigstop): No longer a for_each_inferior callback.
3379 Rewrite on top of linux_wait_for_event_filtered.
3380 (stop_all_lwps): Call wait_for_sigstop directly.
3381 * server.c (resume, handle_target_event): Handle
3382 TARGET_WAITKIND_NO_RESUMED.
3383
3384 2014-02-26 Joel Brobecker <brobecker@adacore.com>
3385
3386 * win32-low.c (psapi_get_dll_name,
3387 * win32_CreateToolhelp32Snapshot): Delete.
3388 (win32_CreateToolhelp32Snapshot, win32_Module32First)
3389 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
3390 Delete.
3391 (handle_load_dll): Add function description.
3392 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
3393
3394 2014-02-26 Joel Brobecker <brobecker@adacore.com>
3395
3396 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
3397 Add comment.
3398 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
3399 base address when calling win32_add_one_solib.
3400 (handle_load_dll): Delete local variable load_addr.
3401 Remove 0x1000 offset applied to DLL base address when calling
3402 win32_add_one_solib.
3403 (handle_unload_dll): Add comment.
3404
3405 2014-02-26 Joel Brobecker <brobecker@adacore.com>
3406
3407 * win32-low.c (win32_add_all_dlls): Renames
3408 win32_ensure_ntdll_loaded. Rewrite function documentation.
3409 Adjust implementation to always load all DLLs.
3410 Add 0x1000 offset to DLL base address when calling
3411 win32_add_one_solib.
3412 (child_initialization_done): New static global.
3413 (do_initial_child_stuff): Set child_initialization_done to
3414 zero during child initialization, and 1 after. Replace call
3415 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
3416 Add comment.
3417 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
3418 (handle_unload_dll): Add function documentation.
3419 (get_child_debug_event): Ignore load and unload DLL events
3420 during child initialization.
3421
3422 2014-02-20 Doug Evans <dje@google.com>
3423
3424 Remove global all_lwps.
3425 * inferiors.h (ptid_of): Move here from linux-low.h.
3426 (pid_of, lwpid_of): Ditto.
3427 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
3428 parameter is a struct thread_info * now.
3429 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
3430 directly. Pass &all_threads to find_inferior instead of &all_lwps.
3431 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
3432 directly.
3433 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
3434 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
3435 * linux-arm-low.c (update_registers_callback): Update, "entry"
3436 parameter is a struct thread_info * now.
3437 Fetch lwpid from current_inferior directly.
3438 (arm_insert_point): Pass &all_threads to find_inferior instead of
3439 &all_lwps.
3440 (arm_remove_point): Ditto.
3441 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
3442 (arm_prepare_to_resume): Fetch pid from thread.
3443 (arm_read_description): Fetch lwpid from current_inferior directly.
3444 * linux-low.c (all_lwps): Delete.
3445 (delete_lwp): Delete call to remove_inferior.
3446 (handle_extended_wait): Fetch lwpid from thread.
3447 (add_lwp): Don't set lwp->entry.id. Remove call to
3448 add_inferior_to_list.
3449 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
3450 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
3451 (kill_one_lwp_callback): Ditto.
3452 (linux_kill): Don't dereference NULL pointer.
3453 Fetch ptid,lwpid from thread.
3454 (get_detach_signal): Fetch ptid from thread.
3455 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
3456 Simplify call to regcache_invalidate_thread.
3457 (delete_lwp_callback): Update, "entry" parameter is a
3458 struct thread_info * now. Fetch pid from thread.
3459 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
3460 (status_pending_p_callback): Update, "entry" parameter is a
3461 struct thread_info * now. Fetch ptid from thread.
3462 (find_lwp_pid): Update, "entry" parameter is a
3463 struct thread_info * now.
3464 (linux_wait_for_lwp): Fetch pid from thread.
3465 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
3466 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
3467 (enqueue_one_deferred_signal): Fetch lwpid from thread.
3468 (dequeue_one_deferred_signal): Ditto.
3469 (cancel_breakpoint): Fetch ptid from current_inferior.
3470 (linux_wait_for_event): Pass &all_threads to find_inferior,
3471 not &all_lwps. Fetch ptid, lwpid from thread.
3472 (count_events_callback): Update, "entry" parameter is a
3473 struct thread_info * now.
3474 (select_singlestep_lwp_callback): Ditto.
3475 (select_event_lwp_callback): Ditto.
3476 (cancel_breakpoints_callback): Ditto.
3477 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
3478 not &all_lwps.
3479 (select_event_lwp): Ditto. Fetch ptid from event_thread.
3480 (unsuspend_one_lwp): Update, "entry" parameter is a
3481 struct thread_info * now.
3482 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
3483 not &all_lwps.
3484 (linux_stabilize_threads): Ditto. And for for_each_inferior.
3485 Fetch lwpid from thread, not lwp.
3486 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
3487 Pass &all_threads to find_inferior, not &all_lwps.
3488 (send_sigstop): Fetch lwpid from thread, not lwp.
3489 (send_sigstop_callback): Update, "entry" parameter is a
3490 struct thread_info * now.
3491 (suspend_and_send_sigstop_callback): Ditto.
3492 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
3493 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
3494 struct thread_info * now.
3495 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
3496 from thread, lwp.
3497 (lwp_running): Update, "entry" parameter is a
3498 struct thread_info * now.
3499 (stop_all_lwps): Fetch ptid from thread.
3500 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
3501 (linux_resume_one_lwp): Fetch lwpid from thread.
3502 (linux_set_resume_request): Update, "entry" parameter is a
3503 struct thread_info * now. Fetch pid, lwpid from thread.
3504 (resume_status_pending_p): Update, "entry" parameter is a
3505 struct thread_info * now.
3506 (need_step_over_p): Ditto. Fetch lwpid from thread.
3507 (start_step_over): Fetch lwpid from thread.
3508 (linux_resume_one_thread): Update, "entry" parameter is a
3509 struct thread_info * now. Fetch lwpid from thread.
3510 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
3511 (proceed_one_lwp): Update, "entry" parameter is a
3512 struct thread_info * now. Fetch lwpid from thread.
3513 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
3514 struct thread_info * now.
3515 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
3516 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
3517 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
3518 directly.
3519 (regsets_store_inferior_registers): Ditto.
3520 (fetch_register, store_register): Ditto.
3521 (linux_read_memory, linux_write_memory): Ditto.
3522 (linux_request_interrupt): Ditto.
3523 (linux_read_auxv): Ditto.
3524 (linux_xfer_siginfo): Ditto.
3525 (linux_qxfer_spu): Ditto.
3526 (linux_qxfer_libraries_svr4): Ditto.
3527 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
3528 moved to inferiors.h.
3529 (get_lwp): Delete.
3530 (get_thread_lwp): Update.
3531 (struct lwp_info): Delete member "entry". Simplify comment for
3532 member "thread".
3533 (all_lwps): Delete.
3534 * linux-mips-low.c (mips_read_description): Fetch lwpid from
3535 current_inferior directly.
3536 (update_watch_registers_callback): Update, "entry" parameter is a
3537 struct thread_info * now. Fetch pid from thread.
3538 (mips_linux_prepare_to_resume): Fetch ptid from thread.
3539 (mips_insert_point): Fetch lwpid from current_inferior.
3540 Pass &all_threads to find_inferior, not &all_lwps.
3541 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
3542 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
3543 directly.
3544 (mips_stopped_data_address): Ditto.
3545 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
3546 directly.
3547 * linux-tile-low.c (tile_arch_setup): Ditto.
3548 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
3549 (update_debug_registers_callback): Update, "entry" parameter is a
3550 struct thread_info * now. Fetch pid from thread.
3551 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
3552 Pass &all_threads to find_inferior, not &all_lwps.
3553 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
3554 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
3555 Pass &all_threads to find_inferior, not &all_lwps.
3556 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
3557 (i386_dr_low_get_status): Ditto.
3558 (x86_linux_prepare_to_resume): Fetch ptid from thread.
3559 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
3560 (x86_linux_read_description): Ditto.
3561 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
3562
3563 2014-02-20 Doug Evans <dje@google.com>
3564
3565 * inferiors.c (get_first_inferior): Fix buglet.
3566
3567 2014-02-19 Doug Evans <dje@google.com>
3568
3569 * gdbthread.h (add_thread): Change result type to struct thread_info *.
3570 * inferiors.c (add_thread): Change result type to struct thread_info *.
3571 All callers updated.
3572 (add_lwp): Call add_thread here instead of in callers.
3573 All callers updated.
3574 * linux-low.h (get_lwp_thread): Rewrite.
3575 (struct lwp_info): New member "thread".
3576
3577 2014-02-19 Doug Evans <dje@google.com>
3578
3579 * linux-low.c (add_lwp): Change result to struct lwp_info *.
3580 All callers updated.
3581
3582 2014-02-19 Doug Evans <dje@google.com>
3583
3584 * inferiors.c (add_thread): Fix whitespace.
3585
3586 2014-02-19 Doug Evans <dje@google.com>
3587
3588 * dll.c (clear_dlls): Replace accessing list implemention details
3589 with API function.
3590 * gdbthread.h (get_first_thread): Declare.
3591 * inferiors.c (for_each_inferior_with_data): New function.
3592 (get_first_thread): New function.
3593 (find_thread_ptid): Simplify.
3594 (get_first_inferior): New function.
3595 (clear_list): Delete.
3596 (one_inferior_p): New function.
3597 (clear_inferior_list): New function.
3598 (clear_inferiors): Update.
3599 * inferiors.h (for_each_inferior_with_data): Declare.
3600 (clear_inferior_list): Declare.
3601 (one_inferior_p): Declare.
3602 (get_first_inferior): Declare.
3603 * linux-low.c (linux_wait_for_event): Replace accessing list
3604 implemention details with API function.
3605 * server.c (target_running): Ditto.
3606 (accumulate_file_name_length): New function.
3607 (emit_dll_description): New function.
3608 (handle_qxfer_libraries): Replace accessing list implemention
3609 details with API function.
3610 (handle_qxfer_threads_worker): New function.
3611 (handle_qxfer_threads_proper): Replace accessing list implemention
3612 details with API function.
3613 (handle_query): Ditto.
3614 (visit_actioned_threads_callback_ftype): New typedef.
3615 (visit_actioned_threads_data): New struct.
3616 (visit_actioned_threads): Rewrite to be find_inferior callback.
3617 (resume): Call find_inferior.
3618 (handle_status): Replace accessing list implemention
3619 details with API function.
3620 (process_serial_event): Replace accessing list implemention details
3621 with API function.
3622 * target.c (set_desired_inferior): Replace accessing list implemention
3623 details with API function.
3624 * tracepoint.c (same_process_p): New function.
3625 (gdb_agent_about_to_close): Replace accessing list implemention
3626 details with API function.
3627 * win32-low.c (child_delete_thread): Replace accessing list
3628 implemention details with API function.
3629 (match_dll_by_basename): New function.
3630 (dll_is_loaded_by_basename): New function.
3631 (win32_ensure_ntdll_loaded): Replace accessing list implemention
3632 details call to dll_is_loaded_by_basename.
3633
3634 2014-02-19 Doug Evans <dje@google.com>
3635
3636 * dll.h (struct dll_info): Add comment.
3637 * gdbthread.h (struct thread_info): Add comment.
3638 (current_ptid): Simplify.
3639 * inferiors.c (add_process): Update.
3640 (remove_process): Update.
3641 * inferiors.h (struct process_info): Rename member "head" to "entry".
3642 * linux-low.c (delete_lwp): Update.
3643 (add_lwp): Update.
3644 (last_thread_of_process_p): Update.
3645 (kill_one_lwp_callback, linux_kill): Update.
3646 (status_pending_p_callback): Update.
3647 (wait_for_sigstop): Update. Simplify read of ptid.
3648 (start_step_over): Update.
3649 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
3650 (get_lwp_thread): Update.
3651 (struct lwp_info): Rename member "head" to "entry".
3652 * regcache.h (inferior_list_entry): Delete.
3653 * server.c (kill_inferior_callback): Update.
3654 (detach_or_kill_inferior_callback): Update.
3655 (print_started_pid): Update.
3656 (print_attached_pid): Update.
3657 (process_serial_event): Simplify read of ptid.
3658 * thread-db.c (thread_db_create_event): Update.
3659 (thread_db_get_tls_address): Update.
3660 * win32-low.c (current_inferior_ptid): Simplify.
3661
3662 2014-02-19 Tom Tromey <tromey@redhat.com>
3663
3664 * target.h (struct target_ops) <supports_btrace>: Add target_ops
3665 argument.
3666 (target_supports_btrace): Update.
3667
3668 2014-02-14 Yao Qi <yao@codesourcery.com>
3669
3670 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
3671 (rsp-low-ipa.o): New target.
3672
3673 2014-02-12 Tom Tromey <tromey@redhat.com>
3674
3675 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
3676 convert_ascii_to_int.
3677 * regcache.c (registers_to_string): Likewise.
3678 * remote-utils.c (decode_M_packet): Likewise.
3679 * server.c (process_serial_event): Likewise.
3680
3681 2014-02-12 Tom Tromey <tromey@redhat.com>
3682
3683 * server.c (handle_query, handle_v_run): Use hex2bin, not
3684 unhexify.
3685 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
3686
3687 2014-02-12 Tom Tromey <tromey@redhat.com>
3688
3689 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
3690 convert_int_to_ascii.
3691 * regcache.c (registers_to_string, collect_register_as_string):
3692 Likewise.
3693 * remote-utils.c (look_up_one_symbol, relocate_instruction):
3694 Likewise.
3695 * server.c (process_serial_event): Likewise.
3696 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
3697 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
3698
3699 2014-02-12 Tom Tromey <tromey@redhat.com>
3700
3701 * remote-utils.c (look_up_one_symbol, monitor_output): Use
3702 bin2hex, not hexify.
3703 * tracepoint.c (cmd_qtstatus): Likewise.
3704
3705 2014-02-12 Tom Tromey <tromey@redhat.com>
3706
3707 * remote-utils.c (monitor_output): Pass explicit length to
3708 hexify.
3709
3710 2014-02-12 Tom Tromey <tromey@redhat.com>
3711
3712 * tracepoint.c: Include rsp-low.h.
3713 * server.c: Include rsp-low.h.
3714 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
3715 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
3716 declare.
3717 * remote-utils.c: Include rsp-low.h.
3718 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
3719 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
3720 (convert_int_to_ascii, convert_ascii_to_int): Move to
3721 common/rsp-low.c.
3722 * regcache.c: Include rsp-low.h.
3723 * ax.c: Include rsp-low.h.
3724 * Makefile.in (SFILES): Add common/rsp-low.c.
3725 (OBS): Add rsp-low.o.
3726 (rsp-low.o): New target.
3727
3728 2014-02-12 Tom Tromey <tromey@redhat.com>
3729
3730 * utils.h (pulongest, plongest, phex_nz): Don't declare.
3731 Include print-utils.h.
3732 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
3733 (plongest, thirty_two, phex_nz): Remove.
3734 * Makefile.in (SFILES): Add common/print-utils.c.
3735 (OBS): Add print-utils.o.
3736 (print-utils-ipa.o): New target.
3737 (print-utils.o): New target.
3738 (IPA_OBJS): Add print-utils-ipa.o.
3739
3740 2014-02-06 Tom Tromey <tromey@redhat.com>
3741
3742 * Makefile.in (SFILES): Fix indentation.
3743
3744 2014-02-05 Doug Evans <dje@google.com>
3745
3746 * linux-low.c (linux_wait_for_event): Improve comment.
3747 (linux_wait_1): Keep current_inferior in sync with event_child.
3748
3749 2014-01-22 Doug Evans <dje@google.com>
3750
3751 * gdbthread.h (gdb_id_to_thread): Delete, unused.
3752
3753 2014-01-22 Doug Evans <dje@google.com>
3754
3755 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
3756 * configure: Regenerate.
3757 * config.in: Regenerate.
3758 * Makefile.in (SFILES): Add debug.c.
3759 (OBS): Add debug.o.
3760 * debug.c: New file.
3761 * debug.h: New file.
3762 * linux-aarch64-low.c (*): Update all debugging printfs to use
3763 debug_printf instead of fprintf.
3764 * linux-arm-low.c (*): Ditto.
3765 * linux-cris-low.c (*): Ditto.
3766 * linux-crisv32-low.c (*): Ditto.
3767 * linux-m32r-low.c (*): Ditto.
3768 * linux-sparc-low.c (*): Ditto.
3769 * linux-x86.c (*): Ditto.
3770 * linux-low.c (*): Ditto.
3771 (linux_wait_1): Add calls to debug_enter, debug_exit.
3772 (linux_wait): Remove redundant debugging printf.
3773 (stop_all_lwps): Add calls to debug_enter, debug_exit.
3774 (linux_resume, unstop_all_lwps): Ditto.
3775 * mem-break.c (*): Update all debugging printfs to use
3776 debug_printf instead of fprintf.
3777 * remote-utils.c (*): Ditto.
3778 * thread-db.c (*): Ditto.
3779 * server.c #include <ctype.h>, "gdb_vecs.h".
3780 (debug_threads): Moved to debug.c.
3781 (*): Update all debugging printfs to use debug_printf instead of
3782 fprintf.
3783 (start_inferior): Replace call to fflush with call to debug_flush.
3784 (monitor_show_help): Mention set debug-format.
3785 (parse_debug_format_options): New function.
3786 (handle_monitor_command): Handle "monitor set debug-format".
3787 (gdbserver_usage): Mention --debug-format.
3788 (main): Parse --debug-format.
3789 * server.h (debug_threads): Declaration moved to debug.h.
3790 #include "debug.h".
3791 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
3792 trace_debug_1 that uses debug_printf.
3793 (tracepoint_look_up_symbols): Update all debugging printfs to use
3794 debug_printf instead of fprintf.
3795
3796 2014-01-20 Baruch Siach <baruch@tkos.co.il>
3797
3798 * linux-xtensa-low.c: Include asm/ptrace.h instead of
3799 sys/ptrace.h.
3800
3801 2014-01-17 Pedro Alves <palves@redhat.com>
3802
3803 PR build/16445
3804 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
3805 defined after including gdb_proc_service.h.
3806
3807 2014-01-16 Doug Evans <dje@google.com>
3808
3809 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
3810 (match_dll): Use it.
3811
3812 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
3813
3814 * target.h (target_ops) <read_btrace>: Change parameters and
3815 return type to allow error reporting.
3816 * server.c (handle_qxfer_btrace): Support delta reads. Pass
3817 trace reading errors on.
3818 * linux-low.c (linux_low_read_btrace): Pass trace reading
3819 errors on.
3820 (linux_low_disable_btrace): New.
3821
3822 2014-01-15 Doug Evans <dje@google.com>
3823
3824 * inferiors.c (thread_id_to_gdb_id): Delete.
3825 * inferiors.h (thread_id_to_gdb_id): Delete.
3826
3827 2014-01-13 Eli Zaretskii <eliz@gnu.org>
3828
3829 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
3830 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
3831 versions.
3832
3833 2014-01-08 Pedro Alves <palves@redhat.com>
3834
3835 * server.c (handle_status): Don't discard previous queued stop
3836 replies or thread's pending status here.
3837 (main) <disconnection>: Do it here instead.
3838
3839 2014-01-08 Pedro Alves <palves@redhat.com>
3840
3841 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
3842 * server.c (visit_actioned_threads, handle_pending_status): New
3843 function.
3844 (handle_v_cont): Factor out parts to ...
3845 (resume): ... this new function. If in all-stop, and a thread
3846 being resumed has a pending status, report it without actually
3847 resuming.
3848 (myresume): Adjust to use the new 'resume' function.
3849 (clear_pending_status_callback, set_pending_status_callback)
3850 (find_status_pending_thread_callback): New functions.
3851 (handle_status): Handle the case of multiple threads having
3852 interesting statuses to report. Report threads' real last signal
3853 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
3854 with an interesting thread to report the status for, instead of
3855 always reporting the status of the first thread.
3856
3857 2014-01-01 Joel Brobecker <brobecker@adacore.com>
3858
3859 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
3860 * gdbreplay.c (gdbreplay_version): Likewise.
3861
3862 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
3863
3864 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
3865 iov.iov_len with the real length in use.
3866
3867 2013-12-13 Joel Brobecker <brobecker@adacore.com>
3868
3869 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
3870 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
3871 for all targets that use win32-low.c.
3872 * win32-low.c (win32_ensure_ntdll_loaded): New function.
3873 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
3874
3875 2013-12-13 Pedro Alves <palves@redhat.com>
3876
3877 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
3878 if equal to TARGET_WAITKIND_LOADED.
3879 * win32-low.c (cached_status): New static global.
3880 (win32_wait): Add declaration.
3881 (do_initial_child_stuff): Flush all initial pending debug events
3882 up to the initial breakpoint.
3883 (win32_wait): If CACHED_STATUS was set, return that instead
3884 of doing a real wait. Remove the code resuming the execution
3885 of the inferior after receiving a TARGET_WAITKIND_LOADED event
3886 during the initial phase. Also remove the code changing
3887 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
3888 TARGET_WAITKIND_STOPPED.
3889
3890 2013-12-11 Yao Qi <yao@codesourcery.com>
3891
3892 * notif.c (handle_notif_ack): Return 0 if no notification
3893 matches.
3894
3895 2013-11-20 Doug Evans <dje@google.com>
3896
3897 * linux-low.c (linux_set_resume_request): Fix comment.
3898
3899 2013-11-20 Doug Evans <dje@google.com>
3900
3901 * linux-low.c (resume_status_pending_p): Tweak comment.
3902
3903 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
3904
3905 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
3906 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
3907 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
3908 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
3909 (srv_amd64_regobj): Add amd64-mpx.o.
3910 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
3911 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
3912 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
3913 * i387-fp.c (num_pl_bnd_register) Added constant.
3914 (num_pl_bnd_cfg_registers) Added constant.
3915 (struct i387_xsave) Added reserved area and MPX fields.
3916 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
3917 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
3918 function.
3919 (tdesc_i386_mpx_linux): Add MPX amd64 target.
3920 (init_registers_amd64_mpx_linux): Declare new function.
3921 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
3922 (x86_64_regmap): Add MPX registers.
3923 (x86_linux_read_description): Add MPX case.
3924 (initialize_low_arch): Initialize MPX targets.
3925
3926 2013-11-18 Tom Tromey <tromey@redhat.com>
3927
3928 * configure: Rebuild.
3929 * configure.ac: Don't check for stdlib.h.
3930 * gdbreplay.c: Unconditionally include stdlib.h.
3931
3932 2013-11-18 Tom Tromey <tromey@redhat.com>
3933
3934 * config.in: Rebuild.
3935 * configure: Rebuild.
3936 * configure.ac: Don't use AC_HEADER_DIRENT.
3937
3938 2013-11-18 Tom Tromey <tromey@redhat.com>
3939
3940 * server.h: Don't check HAVE_STRING_H.
3941 * gdbreplay.c: Don't check HAVE_STRING_H.
3942 * configure: Rebuild.
3943
3944 2013-11-18 Tom Tromey <tromey@redhat.com>
3945
3946 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
3947 LIBGNU.
3948
3949 2013-11-08 Tom Tromey <tromey@redhat.com>
3950
3951 * configure, config.in: Rebuild.
3952 * configure.ac: Remove unused configury.
3953
3954 2013-11-08 Tom Tromey <tromey@redhat.com>
3955
3956 * acinclude.m4: Include common.m4, codeset.m4.
3957 * configure, config.in: Rebuild.
3958 * configure.ac: Use GDB_AC_COMMON.
3959
3960 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
3961
3962 * linux-s390-low.c (HWCAP_S390_TE): New define.
3963 (s390_arch_setup): Consider the TE field in the HWCAP for
3964 determining 'have_regset_tdb'.
3965
3966 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
3967
3968 PR gdb/16014
3969 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
3970 call to sizeof.
3971
3972 2013-10-02 Pedro Alves <palves@redhat.com>
3973
3974 * server.c (process_serial_event): Don't output "GDBserver
3975 exiting" if GDB is connected through stdio.
3976 * target.c (mywait): Likewise, be silent if GDB is connected
3977 through stdio.
3978
3979 2013-10-01 Joel Brobecker <brobecker@adacore.com>
3980
3981 * lynx-low.c (lynx_add_threads_after_attach): New function.
3982 (lynx_attach): Remove call to add_thread. Add call to
3983 lynx_add_threads_after_attach instead.
3984
3985 2013-09-28 Mike Frysinger <vapier@gentoo.org>
3986
3987 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
3988 * config.in, configure: Regenerated.
3989
3990 2013-09-18 Yao Qi <yao@codesourcery.com>
3991
3992 PR server/15959
3993 * server.c (start_inferior): Clear 'resume_info'.
3994
3995 2013-09-16 Jiong Wang <jiwang@tilera.com>
3996
3997 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
3998 for each register.
3999
4000 2013-09-16 Jiong Wang <jiwang@tilera.com>
4001
4002 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
4003 linux-tile-low.o to srv_tgtobj.
4004
4005 2013-09-16 Will Newton <will.newton@linaro.org>
4006
4007 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
4008 out regs.
4009
4010 2013-09-06 Pedro Alves <palves@redhat.com>
4011
4012 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
4013 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
4014 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
4015 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
4016 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
4017 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
4018
4019 2013-09-06 Pedro Alves <palves@redhat.com>
4020
4021 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
4022 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
4023
4024 2013-09-06 Pedro Alves <palves@redhat.com>
4025
4026 * linux-amd64-ipa.c: Include tracepoint.h.
4027 * linux-i386-ipa.c: Include tracepoint.h.
4028
4029 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
4030
4031 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
4032 (ps_get_thread_area): New function.
4033
4034 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
4035
4036 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
4037 (initialize_low_arch): Call init_registers_crisv32 rather than
4038 init_register_crisv32.
4039
4040 2013-09-05 Pedro Alves <palves@redhat.com>
4041
4042 * server.h (handle_vFile, hostio_last_error_from_errno): Move
4043 to ...
4044 * hostio.h: ... this new file.
4045 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
4046 win32-low.c: Include hostio.h.
4047
4048 2013-09-05 Pedro Alves <palves@redhat.com>
4049
4050 * server.h (gdb_client_data, handler_func, callback_handler_func)
4051 (delete_file_handler, add_file_handler, append_callback_event)
4052 (delete_callback_event, start_event_loop, initialize_event_loop):
4053 Move to event-loop.h and include it.
4054 * event-loop.h: New file.
4055
4056 2013-09-05 Pedro Alves <palves@redhat.com>
4057
4058 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
4059 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
4060 (loaded_dll, unloaded_dll): Move to ...
4061 * dll.h: ... this new file.
4062 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
4063
4064 2013-09-05 Pedro Alves <palves@redhat.com>
4065
4066 * server.h (current_process, get_thread_process, all_processes)
4067 (add_inferior_to_list, for_each_inferior, current_inferior)
4068 (remove_inferior, add_process, remove_process, find_process_pid)
4069 (have_started_inferiors_p, have_attached_inferiors_p)
4070 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
4071 (clear_inferiors, find_inferior, find_inferior_id)
4072 (inferior_target_data, set_inferior_target_data)
4073 (inferior_regcache_data, set_inferior_regcache_data): Move to
4074 inferiors.h, and include it.
4075 * inferiors.h: New file.
4076
4077 2013-09-05 Pedro Alves <palves@redhat.com>
4078
4079 * server.h (struct emit_ops, current_insn_ptr, emit_error):
4080 Move ...
4081 * ax.h: ... here.
4082
4083 2013-09-05 Pedro Alves <palves@redhat.com>
4084
4085 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
4086 tracepoint.h.
4087 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
4088 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
4089 (handle_tracepoint_general_set, handle_tracepoint_query)
4090 (tracepoint_finished_step, tracepoint_was_hit)
4091 (release_while_stepping_state_list, current_traceframe)
4092 (in_readonly_region, traceframe_read_mem)
4093 (fetch_traceframe_registers, traceframe_read_sdata)
4094 (traceframe_read_info, struct fast_tpoint_collect_status)
4095 (fast_tracepoint_collecting, force_unlock_trace_buffer)
4096 (handle_tracepoit_bkpts, initialize_low_tracepoint)
4097 (supply_fast_tracepoint_registers)
4098 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
4099 (ipa_tdesc, claim_trampoline_space)
4100 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
4101 (agent_mem_read, agent_get_trace_state_variable_value)
4102 (agent_set_trace_state_variable_value, agent_tsv_read)
4103 (agent_mem_read_string, get_raw_reg_func_addr)
4104 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
4105 * tracepoint.h: ... this new file.
4106
4107 2013-09-05 Pedro Alves <palves@redhat.com>
4108
4109 * server.h (perror_with_name, error, fatal, warning, paddress)
4110 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
4111 include it.
4112 * utils.h: New file.
4113
4114 2013-09-05 Pedro Alves <palves@redhat.com>
4115
4116 * server.h (remote_debug, noack_mode, transport_is_reliable)
4117 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
4118 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
4119 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
4120 (write_enn, initialize_async_io, enable_async_io)
4121 (disable_async_io, check_remote_input_interrupt_request)
4122 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
4123 (dead_thread_notify, prepare_resume_reply)
4124 (decode_address_to_semicolon, decode_address, decode_m_packet)
4125 (decode_M_packet, decode_X_packet, decode_xfer_write)
4126 (decode_search_memory_packet, unhexify, hexify)
4127 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
4128 (look_up_one_symbol, relocate_instruction)
4129 (monitor_output): Move to remote-utils.h, and include it.
4130 * remote-utils.h: New file.
4131
4132 2013-09-05 Pedro Alves <palves@redhat.com>
4133
4134 * server.h (_): Delete.
4135
4136 2013-09-02 Pedro Alves <palves@redhat.com>
4137
4138 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
4139 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
4140 allocated.
4141 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
4142
4143 2013-09-02 Pierre Muller <muller@sourceware.org>
4144
4145 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
4146 or WriteProcessMemory complete successfully and handle
4147 ERROR_PARTIAL_COPY error.
4148
4149 2013-09-02 Pedro Alves <palves@redhat.com>
4150
4151 * server.c (gdb_read_memory): Return -1 on traceframe memory read
4152 error instead of EIO.
4153
4154 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4155
4156 PR server/15604
4157 * linux-low.c: Include filestuff.h.
4158 (linux_create_inferior) <pid == 0>: Call close_most_fds.
4159 * lynx-low.c: Include filestuff.h.
4160 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
4161 * server.c: Include filestuff.h.
4162 (main): Call notice_open_fds.
4163 * spu-low.c: Include filestuff.h.
4164 (spu_create_inferior) <pid == 0>: Call close_most_fds.
4165
4166 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
4167
4168 * Makefile.in: Explain why ../target and ../nat are not
4169 listed as include file search paths.
4170 (linux-waitpid.o): New object file rule.
4171 * configure.srv (srv_native_linux_obj): New variable.
4172 Replace all occurrences of linux native object files with
4173 $srv_native_linux_obj.
4174 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
4175 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
4176 (linux_enable_event_reporting): Remove declaration.
4177 (my_waitpid): Moved to common/linux-waitpid.c.
4178 (linux_wait_for_event): Pass ptid when calling
4179 linux_enable_event_reporting.
4180 (linux_supports_tracefork_flag): Remove.
4181 (linux_enable_event_reporting): Likewise.
4182 (linux_tracefork_grandchild): Remove.
4183 (STACK_SIZE): Moved to common/linux-ptrace.c.
4184 (linux_tracefork_child): Remove.
4185 (linux_test_for_tracefork): Remove.
4186 (linux_look_up_symbols): Call linux_supports_traceclone.
4187 (initialize_low): Remove call to linux_test_for_tracefork.
4188 * linux-low.h (PTRACE_TYPE_ARG3): Move to
4189 common/linux-ptrace.h.
4190 (PTRACE_TYPE_ARG4): Likewise.
4191 Include linux-ptrace.h.
4192
4193 2013-08-21 Pedro Alves <palves@redhat.com>
4194
4195 * config.in: Renegerate.
4196
4197 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
4198
4199 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
4200 (SFILES): Remove $(srcdir)/common/target-common.c and
4201 add $(srcdir)/target/waitstatus.c.
4202 (OBS): Remove target-common.o and add waitstatus.o.
4203 (server_h): Remove $(srcdir)/../common/target-common.h and
4204 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
4205 and $(srcdir)/../target/waitstatus.h.
4206 (target-common.o): Remove.
4207 (waitstatus.o): New target object file.
4208 * target.h: Do not include target-common.h and
4209 include target/resume.h, target/wait.h and
4210 target/waitstatus.h.
4211
4212 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
4213
4214 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
4215 to PTRACE_TYPE_ARG3.
4216 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
4217 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
4218 PTRACE_TYPE_ARG4.
4219 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
4220 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
4221
4222 2013-07-27 Jie Zhang <jie@codesourcery.com>
4223 Daniel Jacobowitz <dan@codesourcery.com>
4224 Yao Qi <yao@codesourcery.com>
4225
4226 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
4227 (mips-linux-watch.o): New rule.
4228 (mips_linux_watch_h): New variable.
4229 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
4230 srv_tgtobj.
4231 * linux-mips-low.c: Include mips-linux-watch.h.
4232 (struct arch_process_info, struct arch_lwp_info): New.
4233 (update_watch_registers_callback): New function.
4234 (mips_linux_new_process, mips_linux_new_thread) New functions.
4235 (mips_linux_prepare_to_resume, mips_insert_point): New
4236 functions.
4237 (mips_remove_point, mips_stopped_by_watchpoint): New
4238 functions.
4239 (rsp_bp_type_to_target_hw_bp_type): New function.
4240 (mips_stopped_data_address): New function.
4241 (the_low_target): Add watchpoint support functions.
4242
4243 2013-07-27 Yao Qi <yao@codesourcery.com>
4244
4245 * i386-low.c: Include break-common.h.
4246 (enum target_hw_bp_type): Remove.
4247
4248 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
4249
4250 * Makefile.in (SFILES): /common/target-common.c.
4251 (OBS): Add target-common.o.
4252 (server_h): Add $(srcdir)/../common/target-common.h.
4253 (target-common.o): New target.
4254 * server.c (queue_stop_reply_callback): Free
4255 status string after use.
4256 * target.c (target_waitstatus_to_string): Remove.
4257 * target.h: Include target-common.h.
4258 (resume_kind): Likewise.
4259 (target_waitkind): Likewise.
4260 (target_waitstatus): Likewise.
4261 (TARGET_WNOHANG): Likewise.
4262
4263 2013-07-04 Yao Qi <yao@codesourcery.com>
4264
4265 * Makefile.in (host_alias): Use @host_noncanonical@.
4266 (target_alias): Use @target_noncanonical@.
4267 * configure.ac: Use ACX_NONCANONICAL_TARGET and
4268 ACX_NONCANONICAL_HOST.
4269 * configure: Regenerated.
4270
4271 Revert:
4272 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
4273
4274 * configure.ac (version_host, version_target): Set and AC_SUBST them.
4275 * configure: Rebuild.
4276 * Makefile.in (version_host, version_target): Get from configure.
4277 (version.c): Use $(version_host) and $(version_target).
4278
4279 2013-07-03 Pedro Alves <palves@redhat.com>
4280
4281 * Makefile.in (config.status): Depend on development.sh.
4282 * acinclude.m4: Include libmcheck.m4.
4283 * configure: Regenerate.
4284
4285 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
4286
4287 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
4288 attribute inside the parentheses.
4289 (winapi_DebugSetProcessKillOnExit): Ditto.
4290 (winapi_DebugBreakProcess): Ditto.
4291 (winapi_GenerateConsoleCtrlEvent): Ditto.
4292
4293 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
4294
4295 * notif.h (notif_event): Add a dummy member to avoid compiler
4296 errors.
4297
4298 2013-07-01 Pedro Alves <palves@redhat.com>
4299
4300 * hostio.c (HOSTIO_PATH_MAX): Define.
4301 (require_filename, handle_open, handle_unlink, handle_readlink):
4302 Use it.
4303
4304 2013-07-01 Pedro Alves <palves@redhat.com>
4305
4306 * server.h: Include "pathmax.h".
4307 * linux-low.c: Don't include sys/param.h.
4308 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
4309 MAXPATHLEN.
4310 * win32-low.c: Don't include sys/param.h.
4311 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
4312
4313 2013-07-01 Pedro Alves <palves@redhat.com>
4314
4315 * event-loop.c: Don't check HAVE_UNISTD_H before including
4316 <unistd.h>.
4317 * gdbreplay.c: Likewise.
4318 * remote-utils.c: Likewise.
4319 * server.c: Likewise.
4320 * configure.ac: Don't check for unistd.h.
4321 * configure: Regenerate.
4322
4323 2013-06-28 Tom Tromey <tromey@redhat.com>
4324
4325 * Makefile.in (version.c): Use version.in, not
4326 common/version.in.
4327
4328 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
4329
4330 * configure.ac (version_host, version_target): Set and AC_SUBST them.
4331 * configure: Rebuild.
4332 * Makefile.in (version_host, version_target): Get from configure.
4333 (version.c): Use $(version_host) and $(version_target).
4334
4335 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
4336
4337 Fix trace-status to output user name without trailing colon.
4338 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
4339
4340 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
4341
4342 Fix trace-status to output proper start-time and stop-time.
4343 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
4344 output start time and stop time in hex as gdb expects.
4345
4346 2013-06-26 Pedro Alves <pedro@codesourcery.com>
4347
4348 * tracepoint.c (build_traceframe_info_xml): Output trace state
4349 variables present in the trace buffer.
4350
4351 2013-06-24 Tom Tromey <tromey@redhat.com>
4352
4353 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
4354 create-version.sh.
4355 (version.o): Remove.
4356 * gdbreplay.c: Include version.h.
4357 (version, host_name): Don't declare.
4358 * server.h: Include version.h.
4359 (version, host_name): Don't declare.
4360
4361 2013-06-12 Pedro Alves <palves@redhat.com>
4362
4363 * linux-x86-low.c (linux_is_elf64): Delete global.
4364 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
4365 with local linux_pid_exe_is_elf_64_file use.
4366
4367 2013-06-11 Pedro Alves <palves@redhat.com>
4368
4369 * linux-low.c (regset_disabled, disable_regset): New functions.
4370 (regsets_fetch_inferior_registers)
4371 (regsets_store_inferior_registers): Use them.
4372 (initialize_regsets_info); Don't allocate the disabled_regsets
4373 array here.
4374 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
4375 comment.
4376
4377 2013-06-11 Pedro Alves <palves@redhat.com>
4378
4379 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
4380 xmalloc.
4381
4382 2013-06-11 Pedro Alves <palves@redhat.com>
4383
4384 * linux-x86-low.c (initialize_low_arch): Call
4385 init_registers_x32_avx_linux.
4386
4387 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
4388
4389 Fix compatibility with Android Bionic.
4390 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
4391 it is not empty.
4392
4393 2013-06-07 Pedro Alves <palves@redhat.com>
4394
4395 PR server/14823
4396 * Makefile.in (OBS): Add tdesc.o.
4397 (IPA_OBJS): Add tdesc-ipa.o.
4398 (tdesc-ipa.o): New rule.
4399 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
4400 interface.
4401 * linux-low.c (new_inferior): Delete.
4402 (disabled_regsets, num_regsets): Delete.
4403 (linux_add_process): Adjust to set the new per-process
4404 new_inferior flag.
4405 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
4406 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
4407 was a stop. When calling arch_setup, switch the current inferior
4408 to the thread that got an event.
4409 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
4410 (regsets_fetch_inferior_registers)
4411 (regsets_store_inferior_registers): New regsets_info parameter.
4412 Adjust to use it.
4413 (linux_register_in_regsets): New regs_info parameter. Adjust to
4414 use it.
4415 (register_addr, fetch_register, store_register): New usrregs_info
4416 parameter. Adjust to use it.
4417 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
4418 parameter regs_info. Adjust to use it.
4419 (linux_fetch_registers): Get the current inferior's regs_info, and
4420 adjust to use it.
4421 (linux_store_registers): Ditto.
4422 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
4423 (initialize_low): Don't initialize the target_regsets here. Call
4424 initialize_low_arch.
4425 * linux-low.h (target_regsets): Delete declaration.
4426 (struct regsets_info): New.
4427 (struct usrregs_info): New.
4428 (struct regs_info): New.
4429 (struct process_info_private) <new_inferior>: New field.
4430 (struct linux_target_ops): Delete the num_regs, regmap, and
4431 regset_bitmap fields. New field regs_info.
4432 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
4433 * i387-fp.c (num_xmm_registers): Delete.
4434 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
4435 calls to new interface.
4436 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
4437 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
4438 Infer the number of xmm registers from the regcache's target
4439 description.
4440 * i387-fp.h (num_xmm_registers): Delete.
4441 * inferiors.c (add_thread): Don't install the thread's regcache
4442 here.
4443 * proc-service.c (gregset_info): Fetch the current inferior's
4444 regs_info. Adjust to use it.
4445 * regcache.c: Include tdesc.h.
4446 (register_bytes, reg_defs, num_registers)
4447 (gdbserver_expedite_regs): Delete.
4448 (get_thread_regcache): If the thread doesn't have a regcache yet,
4449 create one, instead of aborting gdbserver.
4450 (regcache_invalidate_one): Rename to ...
4451 (regcache_invalidate_thread): ... this.
4452 (regcache_invalidate_one): New.
4453 (regcache_invalidate): Only invalidate registers of the current
4454 process.
4455 (init_register_cache): Add target_desc parameter, and use it.
4456 (new_register_cache): Ditto. Assert the target description has a
4457 non zero registers_size.
4458 (regcache_cpy): Add assertions. Adjust.
4459 (realloc_register_cache, set_register_cache): Delete.
4460 (registers_to_string, registers_from_string): Adjust.
4461 (find_register_by_name, find_regno, find_register_by_number)
4462 (register_cache_size): Add target_desc parameter, and use it.
4463 (free_register_cache_thread, free_register_cache_thread_one)
4464 (regcache_release, register_cache_size): New.
4465 (register_size): Add target_desc parameter, and use it.
4466 (register_data, supply_register, supply_register_zeroed)
4467 (supply_regblock, supply_register_by_name, collect_register)
4468 (collect_register_as_string, collect_register_by_name): Adjust.
4469 * regcache.h (struct target_desc): Forward declare.
4470 (struct regcache) <tdesc>: New field.
4471 (init_register_cache, new_register_cache): Add target_desc
4472 parameter.
4473 (regcache_invalidate_thread): Declare.
4474 (regcache_invalidate_one): Delete declaration.
4475 (regcache_release): Declare.
4476 (find_register_by_number, register_cache_size, register_size)
4477 (find_regno): Add target_desc parameter.
4478 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
4479 declarations.
4480 * remote-utils.c: Include tdesc.h.
4481 (outreg, prepare_resume_reply): Adjust.
4482 * server.c: Include tdesc.h.
4483 (gdbserver_xmltarget): Delete declaration.
4484 (get_features_xml, process_serial_event): Adjust.
4485 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
4486 declare.
4487 (struct process_info) <tdesc>: New field.
4488 (ipa_tdesc): Declare.
4489 * tdesc.c: New file.
4490 * tdesc.h: New file.
4491 * tracepoint.c: Include tdesc.h.
4492 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
4493 (get_context_regcache): Adjust to pass ipa_tdesc down.
4494 (do_action_at_tracepoint): Adjust to get the register cache size
4495 from the context regcache's description.
4496 (traceframe_walk_blocks): Adjust to get the register cache size
4497 from the current trace frame's description.
4498 (traceframe_get_pc): Adjust to get current trace frame's
4499 description and pass it down.
4500 (gdb_collect): Adjust to get the register cache size from the
4501 IPA's description.
4502 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
4503 (gdbserver_xmltarget): Delete.
4504 (initialize_low_tracepoint): Set the ipa's target description.
4505 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
4506 (initialize_low_tracepoint): Set the ipa's target description.
4507 * linux-x86-low.c: Include tdesc.h.
4508 [__x86_64__] (is_64bit_tdesc): New.
4509 (ps_get_thread_area, x86_get_thread_area): Use it.
4510 (i386_cannot_store_register): Rename to ...
4511 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
4512 (i386_cannot_fetch_register): Rename to ...
4513 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
4514 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
4515 to new interface.
4516 (target_regsets): Rename to ...
4517 (x86_regsets): ... this.
4518 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
4519 interface.
4520 (x86_siginfo_fixup): Use is_64bit_tdesc.
4521 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
4522 (tdesc_x32_avx_linux, tdesc_x32_linux)
4523 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
4524 Declare.
4525 (x86_linux_update_xmltarget): Delete.
4526 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
4527 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
4528 (AMD64_LINUX_USER64_CS): New.
4529 (x86_linux_read_description): New, based on
4530 x86_linux_update_xmltarget.
4531 (same_process_callback): New.
4532 (x86_arch_setup_process_callback): New.
4533 (x86_linux_update_xmltarget): New.
4534 (x86_regsets_info): New.
4535 (amd64_linux_regs_info): New.
4536 (i386_linux_usrregs_info): New.
4537 (i386_linux_regs_info): New.
4538 (x86_linux_regs_info): New.
4539 (x86_arch_setup): Reimplement.
4540 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
4541 (x86_emit_ops): Ditto.
4542 (the_low_target): Adjust. Install x86_linux_regs_info,
4543 x86_cannot_fetch_register, and x86_cannot_store_register.
4544 (initialize_low_arch): New.
4545 * linux-ia64-low.c (tdesc_ia64): Declare.
4546 (ia64_fetch_register): Adjust.
4547 (ia64_usrregs_info, regs_info): New globals.
4548 (ia64_regs_info): New function.
4549 (the_low_target): Adjust.
4550 (initialize_low_arch): New function.
4551 * linux-sparc-low.c (tdesc_sparc64): Declare.
4552 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
4553 Adjust.
4554 (sparc_arch_setup): New function.
4555 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
4556 (the_low_target): Adjust.
4557 (initialize_low_arch): New function.
4558 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
4559 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
4560 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
4561 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
4562 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
4563 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
4564 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
4565 (tdesc_powerpc_isa205_vsx64l): Declare.
4566 (ppc_cannot_store_register, ppc_collect_ptrace_register)
4567 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
4568 (ppc_set_pc, ppc_get_hwcap): Adjust.
4569 (ppc_usrregs_info): Forward declare.
4570 (!__powerpc64__) ppc_regmap_adjusted: New global.
4571 (ppc_arch_setup): Adjust to the current process'es target
4572 description.
4573 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
4574 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
4575 (ppc_store_evrregset): Adjust.
4576 (target_regsets): Rename to ...
4577 (ppc_regsets): ... this, and make static.
4578 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
4579 (ppc_regs_info): New function.
4580 (the_low_target): Adjust.
4581 (initialize_low_arch): New function.
4582 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
4583 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
4584 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
4585 (tdesc_s390x_linux64v2): Declare.
4586 (s390_collect_ptrace_register, s390_supply_ptrace_register)
4587 (s390_fill_gregset, s390_store_last_break): Adjust.
4588 (target_regsets): Rename to ...
4589 (s390_regsets): ... this, and make static.
4590 (s390_get_pc, s390_set_pc): Adjust.
4591 (s390_get_hwcap): New target_desc parameter, and use it.
4592 [__s390x__] (have_hwcap_s390_high_gprs): New global.
4593 (s390_arch_setup): Adjust to set the current process'es target
4594 description. Don't adjust the regmap.
4595 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
4596 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
4597 (regs_info_3264): New globals.
4598 (s390_regs_info): New function.
4599 (the_low_target): Adjust.
4600 (initialize_low_arch): New function.
4601 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
4602 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
4603 [__mips64] (init_registers_mips_linux)
4604 (init_registers_mips_dsp_linux): Delete defines.
4605 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
4606 (have_dsp): New global.
4607 (mips_read_description): New, based on mips_arch_setup.
4608 (mips_arch_setup): Reimplement.
4609 (get_usrregs_info): New function.
4610 (mips_cannot_fetch_register, mips_cannot_store_register)
4611 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
4612 (mips_fill_fpregset, mips_store_fpregset): Adjust.
4613 (target_regsets): Rename to ...
4614 (mips_regsets): ... this, and make static.
4615 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
4616 (dsp_regs_info, regs_info): New globals.
4617 (mips_regs_info): New function.
4618 (the_low_target): Adjust.
4619 (initialize_low_arch): New function.
4620 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
4621 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
4622 Declare.
4623 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
4624 (arm_read_description): New, with bits factored from
4625 arm_arch_setup.
4626 (arm_arch_setup): Reimplement.
4627 (target_regsets): Rename to ...
4628 (arm_regsets): ... this, and make static.
4629 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
4630 (arm_regs_info): New function.
4631 (the_low_target): Adjust.
4632 (initialize_low_arch): New function.
4633 * linux-m68k-low.c (tdesc_m68k): Declare.
4634 (target_regsets): Rename to ...
4635 (m68k_regsets): ... this, and make static.
4636 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
4637 (m68k_regs_info): New function.
4638 (m68k_arch_setup): New function.
4639 (the_low_target): Adjust.
4640 (initialize_low_arch): New function.
4641 * linux-sh-low.c (tdesc_sharch): Declare.
4642 (target_regsets): Rename to ...
4643 (sh_regsets): ... this, and make static.
4644 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
4645 (sh_regs_info, sh_arch_setup): New functions.
4646 (the_low_target): Adjust.
4647 (initialize_low_arch): New function.
4648 * linux-bfin-low.c (tdesc_bfin): Declare.
4649 (bfin_arch_setup): New function.
4650 (bfin_usrregs_info, regs_info): New globals.
4651 (bfin_regs_info): New function.
4652 (the_low_target): Adjust.
4653 (initialize_low_arch): New function.
4654 * linux-cris-low.c (tdesc_cris): Declare.
4655 (cris_arch_setup): New function.
4656 (cris_usrregs_info, regs_info): New globals.
4657 (cris_regs_info): New function.
4658 (the_low_target): Adjust.
4659 (initialize_low_arch): New function.
4660 * linux-cris-low.c (tdesc_crisv32): Declare.
4661 (cris_arch_setup): New function.
4662 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
4663 (cris_regs_info): New function.
4664 (the_low_target): Adjust.
4665 (initialize_low_arch): New function.
4666 * linux-m32r-low.c (tdesc_m32r): Declare.
4667 (m32r_arch_setup): New function.
4668 (m32r_usrregs_info, regs_info): New globals.
4669 (m32r_regs_info): Adjust.
4670 (initialize_low_arch): New function.
4671 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
4672 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
4673 (tic6x_usrregs_info): Forward declare.
4674 (tic6x_read_description): New function, based on ...
4675 (tic6x_arch_setup): ... this. Reimplement.
4676 (target_regsets): Rename to ...
4677 (tic6x_regsets): ... this, and make static.
4678 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
4679 (tic6x_regs_info): New function.
4680 (the_low_target): Adjust.
4681 (initialize_low_arch): New function.
4682 * linux-xtensa-low.c (tdesc_xtensa): Declare.
4683 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
4684 (target_regsets): Rename to ...
4685 (xtensa_regsets): ... this, and make static.
4686 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
4687 globals.
4688 (xtensa_arch_setup, xtensa_regs_info): New functions.
4689 (the_low_target): Adjust.
4690 (initialize_low_arch): New function.
4691 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
4692 (nios2_arch_setup): Set the current process'es tdesc.
4693 (target_regsets): Rename to ...
4694 (nios2_regsets): ... this.
4695 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
4696 (nios2_regs_info): New function.
4697 (the_low_target): Adjust.
4698 (initialize_low_arch): New function.
4699 * linux-aarch64-low.c (tdesc_aarch64): Declare.
4700 (aarch64_arch_setup): Set the current process'es tdesc.
4701 (target_regsets): Rename to ...
4702 (aarch64_regsets): ... this.
4703 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
4704 (aarch64_regs_info): New function.
4705 (the_low_target): Adjust.
4706 (initialize_low_arch): New function.
4707 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
4708 globals.
4709 (target_regsets): Rename to ...
4710 (tile_regsets): ... this.
4711 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
4712 (tile_regs_info): New function.
4713 (tile_arch_setup): Set the current process'es tdesc.
4714 (the_low_target): Adjust.
4715 (initialize_low_arch): New function.
4716 * spu-low.c (tdesc_spu): Declare.
4717 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
4718 * win32-arm-low.c (tdesc_arm): Declare.
4719 (arm_arch_setup): New function.
4720 (the_low_target): Install arm_arch_setup instead of
4721 init_registers_arm.
4722 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
4723 (init_windows_x86): Rename to ...
4724 (i386_arch_setup): ... this. Set `win32_tdesc'.
4725 (the_low_target): Adjust.
4726 * win32-low.c (win32_tdesc): New global.
4727 (child_add_thread): Don't create the thread cache here.
4728 (do_initial_child_stuff): Set the new process'es tdesc.
4729 * win32-low.h (struct target_desc): Forward declare.
4730 (win32_tdesc): Declare.
4731 * lynx-i386-low.c (tdesc_i386): Declare global.
4732 (lynx_i386_arch_setup): Set `lynx_tdesc'.
4733 * lynx-low.c (lynx_tdesc): New global.
4734 (lynx_add_process): Set the new process'es tdesc.
4735 * lynx-low.h (struct target_desc): Forward declare.
4736 (lynx_tdesc): Declare global.
4737 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
4738 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
4739 * nto-low.c (nto_tdesc): New global.
4740 (do_attach): Set the new process'es tdesc.
4741 * nto-low.h (struct target_desc): Forward declare.
4742 (nto_tdesc): Declare.
4743 * nto-x86-low.c (tdesc_i386): Declare.
4744 (nto_x86_arch_setup): Set `nto_tdesc'.
4745
4746 2013-06-04 Gary Benson <gbenson@redhat.com>
4747
4748 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
4749 to qSupported response when appropriate.
4750 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
4751 with nonzero-length annex.
4752 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
4753 arguments supplied in annex.
4754
4755 2013-05-31 Doug Evans <dje@google.com>
4756
4757 PR server/15594
4758 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
4759 64 bits in 64-cross-32 environment.
4760
4761 2013-05-28 Pedro Alves <palves@redhat.com>
4762
4763 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
4764 (aarch64-without-fpu.c): Delete rule.
4765 * configure.srv (aarch64*-*-linux*): Remove references to
4766 aarch64-without-fpu.o and aarch64-without-fpu.xml.
4767 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
4768 declaration.
4769
4770 2013-05-24 Pedro Alves <palves@redhat.com>
4771
4772 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
4773 instead of strchr/decode_address. Error if the range isn't split
4774 with a ','. Don't assume there's be a ':' in the action.
4775
4776 2013-05-23 Yao Qi <yao@codesourcery.com>
4777 Pedro Alves <palves@redhat.com>
4778
4779 * linux-low.c (lwp_in_step_range): New function.
4780 (linux_wait_1): If the thread was range stepping and stopped
4781 outside the stepping range, report the stop to GDB. Otherwise,
4782 continue stepping. Add range stepping debug output.
4783 (linux_set_resume_request): Copy the step range from the resume
4784 request to the lwp.
4785 (linux_supports_range_stepping): New.
4786 (linux_target_ops) <supports_range_stepping>: Set to
4787 linux_supports_range_stepping.
4788 * linux-low.h (struct linux_target_ops)
4789 <supports_range_stepping>: New field.
4790 (struct lwp_info) <step_range_start, step_range_end>: New fields.
4791 * linux-x86-low.c (x86_supports_range_stepping): New.
4792 (the_low_target) <supports_range_stepping>: Set to
4793 x86_supports_range_stepping.
4794 * server.c (handle_v_cont): Handle 'r' action.
4795 (handle_v_requests): Append ";r" if the target supports range
4796 stepping.
4797 * target.h (struct thread_resume) <step_range_start,
4798 step_range_end>: New fields.
4799 (struct target_ops) <supports_range_stepping>:
4800 New field.
4801 (target_supports_range_stepping): New macro.
4802
4803 2013-05-17 Joel Brobecker <brobecker@adacore.com>
4804
4805 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
4806 confusion in comment.
4807
4808 2013-05-17 Joel Brobecker <brobecker@adacore.com>
4809
4810 * lynx-low.c (struct process_info_private): New type.
4811 (lynx_add_process): New function.
4812 (lynx_create_inferior, lynx_attach): Replace calls to
4813 add_process by calls to lynx_add_process.
4814 (lynx_resume): If PTID is null, then try using
4815 current_process()->private->last_wait_event_ptid.
4816 Add comments.
4817 (lynx_clear_inferiors): Delete. The contents of that function
4818 has been inlined in lynx_mourn;
4819 (lynx_wait_1): Save the ptid in the process's private data.
4820 (lynx_mourn): Free the process' private data. Replace call
4821 to lynx_clear_inferiors by call to clear_inferiors.
4822
4823 2013-05-17 Yao Qi <yao@codesourcery.com>
4824
4825 * i386-low.c (i386_length_and_rw_bits): Move the comment to
4826 the right place.
4827
4828 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
4829
4830 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
4831 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
4832 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
4833 PT_TEXT_END_ADDR guards. Update comments.
4834 (linux_target_op) <read_offsets>: Conditionally define to
4835 linux_read_offsets if the target is UCLIBC and if it defines
4836 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
4837
4838 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
4839 Andrew Jenner <andrew@codesourcery.com>
4840
4841 * Makefile.in (SFILES): Add linux-nios2-low.c.
4842 (clean): Add action to delete nios2-linux.c.
4843 (nios2-linux.c): New rule.
4844 * configure.srv: Add nios2*-*-linux*.
4845 * linux-nios2-low.c: New.
4846
4847 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
4848
4849 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
4850
4851 2013-04-25 Hui Zhu <hui@codesourcery.com>
4852
4853 PR gdb/15186
4854 * ax.c (ax_printf): Add fflush.
4855
4856 2013-04-22 Tom Tromey <tromey@redhat.com>
4857
4858 * Makefile.in (SFILES): Add filestuff.c.
4859 (OBS): Add filestuff.o.
4860 (filestuff.o): New target.
4861 * config.in, configure: Rebuild.
4862 * configure.ac: Check for fdwalk, pipe2.
4863
4864 2013-04-17 Pedro Alves <palves@redhat.com>
4865
4866 * configure.ac (USE_THREAD_DB): Delete variable.
4867 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
4868 Don't AC_SUBST USE_THREAD_DB.
4869 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
4870 * config.in, configure: Regenerate.
4871
4872 2013-04-16 Pedro Alves <palves@redhat.com>
4873
4874 * linux-low.h (struct lwp_info) <thread_known>: Move under
4875 the USE_THREAD_DB #ifdef.
4876
4877 2013-04-16 Pedro Alves <palves@redhat.com>
4878
4879 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
4880 (linux-low.o): Delete rule.
4881 * linux-low.h: Always include "gdb_thread_db.h" instead of
4882 conditionally including thread_db.h.
4883 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
4884 HAVE_THREAD_DB_H.
4885
4886 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
4887
4888 * Makefile.in (install-only): Fix make install regression.
4889
4890 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
4891
4892 Convert man pages to texinfo, new gdbinit.5 texinfo page.
4893 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
4894 installation.
4895 * gdbserver.1: Remove.
4896
4897 2013-03-22 Pedro Alves <palves@redhat.com>
4898
4899 * linux-low.c (handle_extended_wait): Don't call
4900 linux_enable_event_reporting.
4901
4902 2013-03-15 Tony Theodore <tonyt@logyst.com>
4903
4904 PR build/9098:
4905 * Makefile.in (SHELL): Use @SHELL@.
4906
4907 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
4908
4909 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
4910 compiler warning.
4911
4912 2013-03-13 Joel Brobecker <brobecker@adacore.com>
4913
4914 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
4915 Remove extraneous NULL element.
4916
4917 2013-03-13 Yao Qi <yao@codesourcery.com>
4918
4919 * tracepoint.c (traceframe_read_tsv): Look for the last matched
4920 'V' block in trace frame.
4921
4922 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4923
4924 * target.h (struct target_ops): Add btrace ops.
4925 (target_supports_btrace): New macro.
4926 (target_enable_btrace): New macro.
4927 (target_disable_btrace): New macro.
4928 (target_read_btrace): New macro.
4929 * gdbthread.h (struct thread_info): Add btrace field.
4930 * server.c: Include btrace-common.h.
4931 (handle_btrace_general_set): New function.
4932 (handle_btrace_enable): New function.
4933 (handle_btrace_disable): New function.
4934 (handle_general_set): Call handle_btrace_general_set.
4935 (handle_qxfer_btrace): New function.
4936 (struct qxfer qxfer_packets[]): Add btrace entry.
4937 * inferiors.c (remove_thread): Disable btrace.
4938 * linux-low: Include linux-btrace.h.
4939 (linux_low_enable_btrace): New function.
4940 (linux_low_read_btrace): New function.
4941 (linux_target_ops): Add btrace ops.
4942 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
4943 Add srv_linux_btrace=yes.
4944 (x86_64-*-linux*): Add linux-btrace.o.
4945 Add srv_linux_btrace=yes.
4946 * configure.ac: Define HAVE_LINUX_BTRACE.
4947 * config.in: Regenerated.
4948 * configure: Regenerated.
4949
4950 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4951
4952 * server.c (handle_qxfer): Preserve error message if -3 is
4953 returned.
4954 (qxfer): Document the -3 return value.
4955
4956 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4957
4958 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
4959 (linux_btrace_h): New variable.
4960 (linux-btrace.o): New rule.
4961
4962 2013-03-08 Stan Shebs <stan@codesourcery.com>
4963 Hafiz Abid Qadeer <abidh@codesourcery.com>
4964
4965 * tracepoint.c (trace_buffer_size): New global.
4966 (DEFAULT_TRACE_BUFFER_SIZE): New define.
4967 (init_trace_buffer): Change to one-argument function. Allocate
4968 trace buffer memory.
4969 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
4970 handle QTBuffer:size packet.
4971 (cmd_bigqtbuffer_size): New function.
4972 (initialize_tracepoint): Call init_trace_buffer with
4973 DEFAULT_TRACE_BUFFER_SIZE.
4974 * server.c (handle_query): Add QTBuffer:size in the
4975 supported packets.
4976
4977 2013-03-07 Yao Qi <yao@codesourcery.com>
4978
4979 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
4980 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
4981 of -1.
4982 (cmd_qtsp): Adjust condition. Do post increment.
4983 Set cur_action and cur_step_action back to 0.
4984
4985 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
4986
4987 PR server/15236
4988 * linux-low.c (linux_write_memory): Return early success if LEN is
4989 zero.
4990
4991 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
4992
4993 * configure.srv: Add x86_64-*-cygwin* as target.
4994
4995 2013-02-28 Tom Tromey <tromey@redhat.com>
4996
4997 * configure.ac: Invoke AC_SYS_LARGEFILE.
4998 * configure, config.in: Rebuild.
4999
5000 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
5001
5002 * win32-low.c: Throughout, fix format strings and casts of
5003 printf-like functions to avoid type related warnings on all
5004 platforms.
5005 (get_child_debug_event): Print dwDebugEventCode as hex since
5006 that's how it's usually documented.
5007
5008 2013-02-28 Yao Qi <yao@codesourcery.com>
5009
5010 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
5011 pulongest.
5012
5013 2013-02-27 Jiong Wang <jiwang@tilera.com>
5014
5015 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
5016 (reg-tilegx32.c): New rule.
5017 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
5018 * linux-tile-low.c (tile_arch_setup): New function. Invoke
5019 different register info initializer according to elf class.
5020 (init_registers_tilgx32): New function. The tilegx32 register info
5021 initializer.
5022 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
5023 (tile_store_gregset): Likewise.
5024
5025 2013-02-27 Yao Qi <yao@codesourcery.com>
5026
5027 * server.c (process_point_options): Print debug message when
5028 debug_threads is true.
5029
5030 2013-02-26 Yao Qi <yao@codesourcery.com>
5031
5032 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
5033
5034 2013-02-19 Pedro Alves <palves@redhat.com>
5035 Kai Tietz <ktietz@redhat.com>
5036
5037 PR gdb/15161
5038
5039 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
5040 instead of strtoul to extract address from packet.
5041 (process_serial_event) <'z'>: Likewise.
5042
5043 2013-02-18 Yao Qi <yao@codesourcery.com>
5044
5045 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
5046
5047 2013-02-14 Pedro Alves <palves@redhat.com>
5048
5049 Plug memory leak.
5050
5051 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
5052 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
5053
5054 2013-02-14 Pedro Alves <palves@redhat.com>
5055
5056 * tracepoint.c (cmd_qtdpsrc): Use savestring.
5057
5058 2013-02-14 Pedro Alves <palves@redhat.com>
5059
5060 * tracepoint.c (save_string): Delete.
5061 (add_tracepoint_action): Use savestring instead of save_string.
5062
5063 2013-02-12 Pedro Alves <palves@redhat.com>
5064
5065 * linux-xtensa-low.c: Ditto.
5066 * xtensa-xtregs.c: Ditto.
5067
5068 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
5069
5070 * thread-db.c (thread_db_get_tls_address): NULL pointer check
5071 thread_db.
5072
5073 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
5074
5075 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
5076 aarch64_num_wp_regs and aarch64_num_bp_regs to
5077 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
5078
5079 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
5080
5081 * linux-aarch64-low.c (ps_get_thread_area): Replace
5082 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
5083
5084 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
5085 Marcus Shawcroft <marcus.shawcroft@arm.com>
5086 Nigel Stephens <nigel.stephens@arm.com>
5087 Yufeng Zhang <yufeng.zhang@arm.com>
5088
5089 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
5090 (aarch64.c, aarch64-without-fpu.c): New targets.
5091 * configure.srv (aarch64*-*-linux*): New.
5092 * linux-aarch64-low.c: New file.
5093
5094 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
5095
5096 * linux-low.c (handle_extended_wait, linux_create_inferior)
5097 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
5098 (dequeue_one_deferred_signal, linux_resume_one_thread)
5099 (fetch_register, linux_write_memory, linux_enable_event_reporting)
5100 (linux_tracefork_grandchild, linux_test_for_tracefork)
5101 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
5102 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
5103 where the argument is 0.
5104
5105 2013-01-25 Yao Qi <yao@codesourcery.com>
5106
5107 * event-loop.c: Include "queue.h".
5108 (gdb_event_p): New typedef.
5109 (struct gdb_event) <next_event>: Remove.
5110 (event_queue): Change to QUEUE(gdb_event_p).
5111 (async_queue_event): Remove.
5112 (gdb_event_xfree): New.
5113 (initialize_event_loop): New.
5114 (process_event): Use API from QUEUE.
5115 (wait_for_event): Likewise.
5116 * server.c (main): Call initialize_event_loop.
5117 * server.h (initialize_event_loop): Declare.
5118
5119 2013-01-18 Yao Qi <yao@codesourcery.com>
5120
5121 * ax.h (struct eval_agent_expr_context): New.
5122 (gdb_eval_agent_expr): Update declaration.
5123 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
5124 TFRAME. Add new argument CTX.
5125 * server.h (struct eval_agent_expr_context): Declare.
5126 (agent_mem_read, agent_tsv_read): Update declaration.
5127 (agent_mem_read_string): Likewise.
5128 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
5129 (add_traceframe_block): Add new argument TPOINT.
5130 Increase TPOINT->traceframe_usage.
5131 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
5132 eval_tracepoint_agent_expr.
5133 (condition_true_at_tracepoint): Likewise.
5134 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
5135 (agent_mem_read_string, agent_tsv_read): Likewise.
5136
5137 2013-01-16 Yao Qi <yao@codesourcery.com>
5138
5139 * linux-low.c (linux_resume_one_lwp): Don't check
5140 'lwp->bp_reinsert != 0'.
5141
5142 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5143 Pedro Alves <palves@redhat.com>
5144
5145 * lynx-low.c (ptrace_request_to_str): Define a temporary
5146 macro and use it to simplify this function's implementation.
5147
5148 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5149
5150 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
5151 sets errno.
5152
5153 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5154
5155 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
5156
5157 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5158
5159 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
5160
5161 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5162
5163 * lynx-low.c (lynx_resume): Use the resume_info parameter
5164 to determine the ptid for the lynx_ptrace call, unless
5165 it is equal to minus_one_ptid, in which case we use the
5166 ptid of the current_inferior.
5167 (lynx_wait_1): After having received a thread create/exit
5168 event, resume the inferior's execution using the signaling
5169 thread's ptid, rather than the old ptid.
5170
5171 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5172
5173 * lynx-low.c (lynx_resume): Delete variable ret.
5174
5175 2013-01-01 Joel Brobecker <brobecker@adacore.com>
5176
5177 * gdbreplay.c (gdbreplay_version): Update copyright year.
5178 * server.c (gdbserver_version): Likewise.
5179
5180 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5181
5182 * lynx-low.c (lynx_wait_1): Add debug trace before adding
5183 new thread.
5184
5185 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5186
5187 * lynx-low.c (ptrace_request_to_str): Add handling for
5188 PTRACE_GETTRACESIG.
5189
5190 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5191
5192 * lynx-low.c (lynx_attach): Delete variable new_process.
5193
5194 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5195
5196 * lynx-low.c (lynx_create_inferior): Delete variable
5197 new_process.
5198
5199 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5200
5201 * lynx-low.c (ptrace_request_to_str): Do not handle
5202 PTRACE_GETTHREADLIST if this macro does not exist.
5203
5204 2012-12-15 Yao Qi <yao@codesourcery.com>
5205
5206 * Makefile.in (OBS): Add notif.o.
5207 * notif.c, notif.h: New.
5208 * server.c: Include "notif.h".
5209 (struct vstop_notif) <next>: Remove.
5210 <base>: New field.
5211 (queue_stop_reply): Update.
5212 (push_event, send_next_stop_reply): Remove.
5213 (discard_queued_stop_replies): Update.
5214 (notif_stop): New variable.
5215 (handle_v_stopped): Remove.
5216 (handle_v_requests): Don't call handle_v_stopped. Call
5217 handle_ack_notif instead.
5218 (queue_stop_reply_callback): Call notif_event_enque instead
5219 of queue_stop_reply.
5220 (handle_status): Don't call send_next_stop_reply, call
5221 notif_write_event instead.
5222 (kill_inferior_callback): Likewise.
5223 (detach_or_kill_inferior_callback): Likewise.
5224 (main): Call initialize_notif.
5225 (process_serial_event): Call QUEUE_is_empty.
5226 (handle_target_event): Call notif_push instead of push event.
5227 * server.h (push_event): Remove declaration.
5228
5229 2012-12-10 Tom Tromey <tromey@redhat.com>
5230
5231 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
5232 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
5233 macros.
5234 (.c.o): Rewrite.
5235 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
5236 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
5237 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
5238 (amd64-linux-ipa.o, ax.o): Rewrite.
5239 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
5240 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
5241 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
5242 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
5243 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
5244 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
5245 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
5246 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
5247 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
5248 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
5249 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
5250 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
5251 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
5252 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
5253 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
5254 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
5255 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
5256 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
5257 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
5258 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
5259 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
5260 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
5261 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
5262 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
5263 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
5264 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
5265 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
5266 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
5267 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
5268 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
5269 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
5270 (reg-tilegx.o): Remove.
5271 (all_object_files): New macro.
5272 Include .deps files.
5273 * aclocal.m4, configure: Rebuild.
5274 * acinclude.m4: Include depstand.m4, lead-dot.m4.
5275 * configure.ac: Invoke ZW_CREATE_DEPDIR,
5276 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
5277
5278 2012-12-05 Tom Tromey <tromey@redhat.com>
5279
5280 PR gdb/14917:
5281 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
5282
5283 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
5284
5285 * configure.ac: Check for linux/perf_event.h.
5286 * config.in: Regenerated.
5287 * configure: Regenerated.
5288
5289 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
5290
5291 * hostio.c (handle_readlink): Decrease buffer size
5292 parameter passed to readlink by one byte.
5293
5294 2012-11-26 Yao Qi <yao@codesourcery.com>
5295
5296 * configure.ac (build_warnings): Append '-Wempty-body'.
5297 * configure: Regenerated.
5298 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
5299 body.
5300
5301 2012-11-15 Pierre Muller <muller@sourceware.org>
5302
5303 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
5304 * config.in: Regenerate.
5305 * configure: Regenerate.
5306 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
5307 Use "gdb_wait.h" header instead of <sys/wait.h> header.
5308 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
5309 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
5310 header.
5311 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
5312 instead of <sys/wait.h> header.
5313 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
5314
5315 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
5316
5317 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
5318 (various make rules): Remove -DGDBSERVER
5319
5320 2012-11-09 Yao Qi <yao@codesourcery.com>
5321
5322 * spu-low.c (current_ptid): Move it to ..
5323 * gdbthread.h: ... here. New.
5324 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
5325 * server.c (myresume, process_serial_event): Likewise.
5326 * thread-db.c (thread_db_find_new_threads): Likewise.
5327 * tracepoint.c (run_inferior_command): Likewise.
5328
5329 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
5330
5331 * server.c (handle_search_memory_1): Include access length in
5332 warning message.
5333
5334 2012-09-05 Michael Brandt <michael.brandt@axis.com>
5335
5336 * linux-crisv32-low.c: Fix compile errors.
5337
5338 2012-09-04 Yao Qi <yao@codesourcery.com>
5339
5340 * tracepoint.c (cmd_qtsv): Adjust debug message.
5341 Don't check CUR_TPOINT.
5342
5343 2012-08-28 Yao Qi <yao@codesourcery.com>
5344
5345 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
5346 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
5347 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
5348 Remove declarations of xmalloc, xreallloc, xstrdup and
5349 freeargv.
5350 * Makefile.in (libiberty_h): New.
5351 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
5352 (linux-bfin-low.o): Append dependency 'libiberty.h'.
5353
5354 2012-08-23 Yao Qi <yao@codesourcery.com>
5355
5356 * server.h: Remove declaration of 'xsnprintf'.
5357
5358 2012-08-22 Keith Seitz <keiths@redhat.com>
5359
5360 * server.h: Include build-gnulib-gbserver/config.h.
5361 * gdbreplay.c: Likewise.
5362
5363 2012-08-08 Doug Evans <dje@google.com>
5364
5365 * Makefile.in (SFILES): Add gdb_vecs.c.
5366 (OBS): Add gdb_vecs.o.
5367 (gdb_vecs_h, host_defs_h): New variables.
5368 (thread-db.o): Add $(gdb_vecs_h) dependency.
5369 (gdb_vecs.o): New rule.
5370 * thread-db.c: #include "gdb_vecs.h".
5371 (thread_db_load_search): Use a vector to iterate over path elements.
5372 Handle text appearing after "$pdir".
5373
5374 * configure.ac: Add check for strstr.
5375 * config.in: Regenerate.
5376 * configure: Regenerate.
5377
5378 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
5379
5380 * hostio.c (handle_pread): If pread fails, fall back to attempting
5381 lseek/read.
5382 (handle_pwrite): Likewise for pwrite.
5383
5384 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
5385
5386 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
5387 between unsupported TYPE and unimplementable ADDR/LEN combination.
5388 (arm_insert_point): Act on new return value.
5389
5390 2012-07-31 Pedro Alves <palves@redhat.com>
5391
5392 * server.c (process_point_options): Only skip tokens if we find
5393 one that is unrecognized. Don't treat 'X' specially while
5394 skipping unrecognized tokens.
5395
5396 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
5397
5398 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
5399 to 4-byte-align HW breakpoint addresses for Thumb.
5400
5401 2012-07-27 Yao Qi <yao@codesourcery.com>
5402
5403 PR remote/14161.
5404
5405 * server.h: Declare gdb_agent_about_to_close.
5406 * target.c (kill_inferior): Include "agent.h".
5407 New. Send command 'kill'.
5408 * target.h (kill_inferior): Removed macro.
5409 * tracepoint.c (gdb_agent_about_to_close): New.
5410 (gdb_agent_helper_thread): Handle command 'close'.
5411 Wait endlessly until the inferior stops.
5412 Install gdb_agent_remove_socket to atexit hook.
5413 (agent_socket_name): New static variable.
5414 (gdb_agent_socket_init): Replace local variable 'name' with
5415 'agent_socket_name'.
5416 (gdb_agent_remove_socket): New.
5417
5418 2012-07-27 Yao Qi <yao@codesourcery.com>
5419
5420 * server.c (process_point_options): Stop at 'X' when parsing.
5421
5422 2012-07-19 Michael Eager <eager@eagercon.com>
5423
5424 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
5425 to hw_execute.
5426 * linux-x86-low.c (x86_insert_point, x86_remove_point):
5427 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
5428 hardware breakpoint.
5429
5430 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5431
5432 * gdbserver/linux-low.c (initialize_low): Call
5433 linux_ptrace_init_warnings.
5434
5435 2012-07-02 Doug Evans <dje@google.com>
5436
5437 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
5438 pointer to int.
5439
5440 2012-07-02 Stan Shebs <stan@codesourcery.com>
5441
5442 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
5443 (ax.o): Add it to build rule.
5444 (ax-ipa.o): Ditto.
5445 (OBS): Add format.o.
5446 (IPA_OBS): Add format.o.
5447 * server.c (handle_query): Claim support for breakpoint commands.
5448 (process_point_options): Add command case.
5449 (process_serial_event): Leave running if there are printfs in
5450 effect.
5451 * mem-break.h (any_persistent_commands): Declare.
5452 (add_breakpoint_commands): Declare.
5453 (gdb_no_commands_at_breakpoint): Declare.
5454 (run_breakpoint_commands): Declare.
5455 * mem-break.c (struct point_command_list): New struct.
5456 (struct breakpoint): New field command_list.
5457 (any_persistent_commands): New function.
5458 (add_commands_to_breakpoint): New function.
5459 (add_breakpoint_commands): New function.
5460 (gdb_no_commands_at_breakpoint): New function.
5461 (run_breakpoint_commands): New function.
5462 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
5463 locally.
5464 * ax.c: Include format.h.
5465 (ax_printf): New function.
5466 (gdb_eval_agent_expr): Add printf opcode.
5467
5468 2012-06-13 Yao Qi <yao@codesourcery.com>
5469
5470 * server.c (start_inferior): Remove duplicated writes to fields
5471 'last_resume_kind' and 'last_status' of 'current_inferior'.
5472
5473 2012-06-12 Yao Qi <yao@codesourcery.com>
5474 Pedro Alves <palves@redhat.com>
5475
5476 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
5477 comment.
5478 * server.c (handle_v_cont): Extend comment.
5479
5480 2012-06-11 Yao Qi <yao@codesourcery.com>
5481
5482 * linux-low.c (linux_attach): Add 'static'.
5483
5484 2012-06-06 Yao Qi <yao@codesourcery.com>
5485
5486 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
5487
5488 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
5489
5490 Fix gcc -flto compilation warning.
5491 * server.c (main): Make variable multi_mode and attach volatile.
5492
5493 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5494
5495 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
5496 if the platform doesn't know about it.
5497
5498 2012-05-30 Jeff Kenton <jkenton@tilera.com>
5499
5500 * Makefile.in (SFILES): Add linux-tile-low.c.
5501 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
5502 * configure.srv: Handle tilegx-*-linux*.
5503 * linux-tile-low.c: New file.
5504
5505 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5506
5507 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
5508
5509 2012-05-24 Pedro Alves <palves@redhat.com>
5510
5511 PR gdb/7205
5512
5513 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
5514
5515 2012-05-24 Pedro Alves <palves@redhat.com>
5516
5517 PR gdb/7205
5518
5519 Replace target_signal with gdb_signal throughout.
5520
5521 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
5522
5523 * linux-low.c (linux_store_registers): Avoid the copying sequence
5524 when no data has been retrieved by ptrace.
5525
5526 2012-05-22 Will Deacon <will.deacon@arm.com>
5527
5528 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
5529 Include asm/ptrace.h.
5530 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
5531 already defined.
5532
5533 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
5534
5535 * linux-low.c (linux_store_registers): Don't re-retrieve data
5536 with ptrace that has already been obtained from /proc. Always
5537 copy any data retrieved with ptrace to the buffer supplied.
5538
5539 2012-05-11 Yao Qi <yao@codesourcery.com>
5540 Pedro Alves <palves@redhat.com>
5541
5542 * linux-low.c (enum stopping_threads_kind): New.
5543 (stopping_threads): Change type to `enum stopping_threads_kind'.
5544 (handle_extended_wait): If stopping and suspending threads, leave
5545 the new_lwp suspended too.
5546 (linux_wait_for_event): Adjust.
5547 (stop_all_lwps): Set `stopping_threads' to
5548 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
5549 whether we're suspending threads or just stopping them. Assert no
5550 recursion happens.
5551
5552 2012-04-29 Yao Qi <yao@codesourcery.com>
5553
5554 * server.h: Move some code to ...
5555 * gdbthread.h: ... here. New.
5556 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
5557 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
5558 (nto-low.o, win32-low.o): Likewise.
5559 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
5560 * regcache.c, remote-utils.c, server.c: Likewise.
5561 * target.c, tracepoint.c, win32-low.c: Likewise.
5562
5563 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5564
5565 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
5566 (PTRACE_ARG4_TYPE): Likewise.
5567 (PTRACE_XFER_TYPE): Likewise.
5568 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
5569 ptrace to PTRACE_ARG3_TYPE.
5570 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
5571 (PTRACE_ARG4_TYPE): Likewise.
5572 (PTRACE_XFER_TYPE): Likewise.
5573 (linux_detach_one_lwp): Cast fourth argument of
5574 ptrace to long then PTRACE_ARG4_TYPE.
5575 (regsets_fetch_inferior_registers): Cast third argument of
5576 ptrace to long then PTRACE_ARG3_TYPE.
5577 (regsets_store_inferior_registers): Likewise.
5578
5579 2012-04-20 Pedro Alves <palves@redhat.com>
5580
5581 * configure: Regenerate.
5582
5583 2012-04-19 Pedro Alves <palves@redhat.com>
5584
5585 * Makefile.in (GNULIB_BUILDDIR): New.
5586 (LIBGNU, INCGNU, GNULIB_H): Adjust.
5587 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
5588 (all, install-only, uninstall, clean-info, all-lib, clean): No
5589 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
5590 (maintainer-clean realclean distclean): Use subdir_do.
5591 (subdir_do): New.
5592 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
5593 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
5594 * acinclude.m4: Include acx_configure_dir.m4.
5595 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
5596 calls. Call AC_PROG_RANLIB. Configure gnulib using
5597 ACX_CONFIGURE_DIR.
5598 (GNULIB): New.
5599 (GNULIB_STDINT_H): Adjust.
5600 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
5601 * gdbreplay.c: Include build-gnulib/config.h.
5602 * server.h: Likewise.
5603 * aclocal.m4: Regenerate.
5604 * config.in: Regenerate.
5605 * configure: Regenerate.
5606
5607 2012-04-19 Pedro Alves <palves@redhat.com>
5608
5609 * Makefile.in (LIBGNU, INCGNU): Adjust.
5610 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
5611 (all, install-only, uninstall, clean-info, all-lib, clean)
5612 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
5613 * configure.ac: Adjust AC_OUTPUT output.
5614 * aclocal.m4: Regenerate.
5615 * configure: Regenerate.
5616
5617 2012-04-19 Pedro Alves <palves@redhat.com>
5618
5619 * Makefile.in (generated_files): New.
5620 (server_h): Remove the explicit dependency on config.h, and depend
5621 on $generated_files.
5622
5623 2012-04-19 Pedro Alves <palves@redhat.com>
5624
5625 * Makefile.in (INCGNU): Add -Ignulib.
5626
5627 2012-04-19 Pedro Alves <palves@redhat.com>
5628
5629 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
5630 (INCGNU): ... this, and spell out -I here.
5631 (GNULIB_LIB): Rename to ...
5632 (LIBGNU): ... this.
5633 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
5634
5635 2012-04-19 Pedro Alves <palves@redhat.com>
5636
5637 * config.in: Regenerate.
5638
5639 2012-04-19 Pedro Alves <palves@redhat.com>
5640
5641 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
5642 * server.h (memmem): Remove declaration.
5643 * config.in: Regenerate.
5644 * configure: Regenerate.
5645
5646 2012-04-19 Yao Qi <yao@codesourcery.com>
5647
5648 * Makefile.in (SFILES): Add common/vec.c.
5649 (OBS): Add vec.o.
5650 (vec.o): New rule.
5651
5652 2012-04-19 Yao Qi <yao@codesourcery.com>
5653
5654 * remote-utils.c (prepare_resume_reply): Replace with macro
5655 target_core_of_thread.
5656 * server.c (handle_qxfer_threads_proper): Likewise.
5657 * target.h (traget_core_of_thread): New macro.
5658
5659 2012-04-18 Pedro Alves <palves@redhat.com>
5660
5661 * aclocal.m4: Regenerate.
5662 * configure: Regenerate.
5663
5664 2012-04-16 Yao Qi <yao@codesourcery.com>
5665
5666 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
5667 duplicated on address.
5668
5669 2012-04-16 Yao Qi <yao@codesourcery.com>
5670
5671 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
5672 (struct tracepoint_action_ops) <send>: New field.
5673 (m_tracepoint_action_send, r_tracepoint_action_send): New.
5674 (agent_expr_send, x_tracepoint_action_send): New.
5675 (l_tracepoint_action_send): New.
5676 (cmd_qtdp): Download and install tracepoint
5677 according to `use_agent'.
5678 (run_inferior_command): Add one more parameter `len'.
5679 Update callers.
5680 (tracepoint_send_agent): New.
5681 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
5682
5683 2012-04-16 Yao Qi <yao@codesourcery.com>
5684
5685 * tracepoint.c (download_tracepoints): Moved to ...
5686 (cmd_qtstart): ... here.
5687
5688 2012-04-14 Yao Qi <yao@codesourcery.com>
5689
5690 * tracepoint.c: Include inttypes.h.
5691 (struct collect_memory_action): Use sized types.
5692 (struct tracepoint): Likewise.
5693 (cmd_qtdp, stop_tracing): Update print specifiers.
5694 (cmd_qtp, response_tracepoint): Likewise.
5695 (collect_data_at_tracepoint): Likewise.
5696 (collect_data_at_step): Likewise.
5697
5698 2012-04-14 Yao Qi <yao@codesourcery.com>
5699
5700 Import gnulib module inttypes.
5701 * aclocal.m4, config.in, configure: Regenerated.
5702
5703 2012-04-14 Yao Qi <yao@codesourcery.com>
5704
5705 * Makefile.in (maintainer-clean, realclean, distclean): Remove
5706 Makefile and config.status at last.
5707
5708 2012-04-13 Yao Qi <yao@codesourcery.com>
5709
5710 * tracepoint.c: Include stdint.h unconditionally.
5711
5712 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5713
5714 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
5715 on BFD_HAVE_SYS_PROCFS_TYPE.
5716 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
5717 * configure: Regenerate.
5718 * config.in: Likewise.
5719
5720 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
5721
5722 * Makefile.in (clean): Also remove x32.c x32-linux.c
5723 x32-avx.c x32-avx-linux.c.
5724 (x32.o): New target.
5725 (x32.c): Likewise.
5726 (x32-linux.o): Likewise.
5727 (x32-linux.c): Likewise.
5728 (x32-avx.o): Likewise.
5729 (x32-avx.c): Likewise.
5730 (x32-avx-linux.o): Likewise.
5731 (x32-avx-linux.c): Likewise.
5732
5733 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
5734 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
5735 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
5736 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
5737 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
5738 i386/x32-avx-linux.xml.
5739
5740 * linux-x86-low.c (init_registers_x32_linux): New prototype.
5741 (init_registers_x32_avx_linux): Likwise.
5742 (x86_linux_update_xmltarget): Call init_registers_x32_linux
5743 or init_registers_x32_avx_linux if linux_is_elf64 is false.
5744
5745 2012-04-13 Pedro Alves <palves@redhat.com>
5746
5747 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
5748 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
5749 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
5750 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
5751 the sub-make.
5752
5753 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
5754
5755 * linux-x86-low.c (compat_x32_clock_t): New.
5756 (compat_x32_siginfo_t): Likewise.
5757 (compat_x32_siginfo_from_siginfo): Likewise.
5758 (siginfo_from_compat_x32_siginfo): Likewise.
5759 (linux_is_elf64): Likewise.
5760 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
5761 and siginfo_from_compat_x32_siginfo for x32.
5762 (x86_arch_setup): Set linux_is_elf64.
5763
5764 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
5765
5766 PR gdb/13969
5767 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
5768 e_machine field.
5769 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
5770 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
5771 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
5772 compatible with process.
5773
5774 2012-04-12 Yao Qi <yao@codesourcery.com>
5775
5776 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
5777 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
5778 (install-only, install-info, clean): Handle sub dir gnulib.
5779 (all-lib, am--refresh): New targets.
5780 (memmem.o): Remove target.
5781 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
5782 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
5783 (AC_REPLACE_FUNCS): Remove memmem.
5784 Invoke gl_INIT and AM_INIT_AUTOMAKE.
5785 (AC_OUTPUT): Generate Makefile in gnulib/.
5786 * aclocal.m4, config.in, configure: Regenerated.
5787
5788 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
5789
5790 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
5791
5792 2012-04-05 Pedro Alves <palves@redhat.com>
5793
5794 -Werror=strict-aliasing
5795
5796 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
5797 pointer.
5798
5799 2012-04-04 Pedro Alves <palves@redhat.com>
5800
5801 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
5802 (sparc_store_gregset_from_stack, sparc_store_gregset)
5803 (sparc_breakpoint_at): Fix formatting.
5804
5805 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5806
5807 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
5808 are available.
5809 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
5810 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
5811 * config.in: Regenerate.
5812 * configure: Likewise.
5813
5814 2012-03-29 Pedro Alves <palves@redhat.com>
5815
5816 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
5817 Correct ptrace arguments.
5818
5819 2012-03-28 Pedro Alves <palves@redhat.com>
5820
5821 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
5822 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
5823 (IA64_FR1_REGNUM): New defines.
5824 (ia64_fetch_register): New.
5825 (the_low_target): Install it.
5826 * linux-low.h (struct linux_target_ops) <fetch_register>: New
5827 field.
5828 * linux-low.c (linux_fetch_registers): Try the
5829 the_low_target.fetch_register hook first.
5830
5831 * linux-arm-low.c (the_low_target): Adjust.
5832 * linux-bfin-low.c (the_low_target): Adjust.
5833 * linux-cris-low.c (the_low_target): Adjust.
5834 * linux-crisv32-low.c (the_low_target): Adjust.
5835 * linux-m32r-low.c (the_low_target): Adjust.
5836 * linux-m68k-low.c (the_low_target): Adjust.
5837 * linux-mips-low.c (the_low_target): Adjust.
5838 * linux-ppc-low.c (the_low_target): Adjust.
5839 * linux-s390-low.c (the_low_target): Adjust.
5840 * linux-sh-low.c (the_low_target): Adjust.
5841 * linux-sparc-low.c (the_low_target): Adjust.
5842 * linux-tic6x-low.c (the_low_target): Adjust.
5843 * linux-x86-low.c (the_low_target): Adjust.
5844 * linux-xtensa-low.c (the_low_target): Adjust.
5845
5846 2012-03-26 Pedro Alves <palves@redhat.com>
5847
5848 * server.c (handle_qxfer_libraries): Don't bail early if
5849 the_target->qxfer_libraries_svr4 is not NULL.
5850
5851 2012-03-26 Pedro Alves <palves@redhat.com>
5852
5853 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
5854
5855 2012-03-23 Pedro Alves <palves@redhat.com>
5856
5857 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
5858 "library-list-svr4" element's start tag when the the DSO list is
5859 empty.
5860
5861 2012-03-23 Pedro Alves <palves@redhat.com>
5862
5863 * linux-low.c (read_one_ptr): Read the inferior's pointer through
5864 a variable whose type size is the same as the inferior's pointer
5865 size.
5866
5867 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
5868
5869 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
5870 struct siginfo.
5871 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
5872 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
5873 * linux-low.h: Include <signal.h>.
5874 (struct siginfo): Remove forward declaration.
5875 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
5876 struct siginfo.
5877
5878 2012-03-21 Mike Frysinger <vapier@gentoo.org>
5879
5880 * .gitignore: Ignore more files.
5881
5882 2012-03-19 Pedro Alves <palves@redhat.com>
5883 Jan Kratochvil <jan.kratochvil@redhat.com>
5884
5885 * server.c (cont_thread, general_thread): Add describing comments.
5886 (start_inferior): Clear `cont_thread'.
5887 (handle_v_cont): Don't set `cont_thread' if resuming all threads
5888 of a process.
5889
5890 2012-03-15 Yao Qi <yao@codesourcery.com>
5891
5892 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
5893 handling to ...
5894 (cmd_qtdp): ... here.
5895
5896 2012-03-15 Yao Qi <yao@codesourcery.com>
5897
5898 * tracepoint.c (struct tracepoint_action_ops): New.
5899 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
5900 (m_tracepoint_action_download): New.
5901 (r_tracepoint_action_download): New.
5902 (x_tracepoint_action_download): New.
5903 (l_tracepoint_action_download): New.
5904 (add_tracepoint_action): Install `action->ops' according type.
5905 (download_tracepoint_1): Move code `download' function pointer
5906 of various tracepoint_action_ops.
5907
5908 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
5909
5910 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
5911 linux_ptrace_attach_warnings.
5912
5913 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
5914
5915 * Makefile.in (linux-ptrace.o): New.
5916 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
5917 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
5918 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
5919 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
5920 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
5921 of these targets.
5922 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
5923
5924 2012-03-08 Yao Qi <yao@codesourcery.com>
5925 Pedro Alves <palves@redhat.com>
5926
5927 Fix PR server/13392.
5928 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
5929 offset of JMP insn.
5930 * tracepoint.c (remove_tracepoint): New.
5931 (cmd_qtdp): Call remove_tracepoint when failed to install.
5932
5933 2012-03-07 Pedro Alves <palves@redhat.com>
5934
5935 * linux-low.c (get_detach_signal): New.
5936 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
5937 Pass on pending signals to PTRACE_DETACH. Check the result of the
5938 ptrace call.
5939 * server.c (program_signals, program_signals_p): New.
5940 (handle_general_set): Handle QProgramSignals.
5941 * server.h (program_signals, program_signals_p): Declare.
5942
5943 2012-03-05 Pedro Alves <palves@redhat.com>
5944 Jan Kratochvil <jan.kratochvil@redhat.com>
5945
5946 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
5947 New comment why.
5948
5949 2012-03-03 Yao Qi <yao@codesourcery.com>
5950
5951 * tracepoint.c (tracepoint_look_up_symbols): Update call to
5952 agent_look_up_symbols.
5953
5954 2012-03-03 Yao Qi <yao@codesourcery.com>
5955
5956 * Makefile.in (linux-low.o): Keep dependence on agent.h.
5957 (linux-x86-low.o): Likewise.
5958 * server.h: Remove in_process_agent_loaded.
5959 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
5960 common/agent.c.
5961 Update callers.
5962
5963 2012-03-03 Yao Qi <yao@codesourcery.com>
5964
5965 * tracepoint.c (gdb_agent_capability): New global.
5966 (in_process_agent_loaded_ust): Renamed to
5967 `in_process_agent_supports_ust'.
5968 Update callers.
5969 (in_process_agent_supports_ust): Call agent_capability_check.
5970 (clear_installed_tracepoints): Assert that agent supports
5971 agent.
5972
5973 2012-03-03 Yao Qi <yao@codesourcery.com>
5974
5975 * linux-low.c (linux_supports_agent): New.
5976 (linux_target_ops): Initialize field `supports_agent' with
5977 linux_supports_agent.
5978 * target.h (struct target_ops) <supports_agent>: New.
5979 (target_supports_agent): New macro.
5980 * server.c (handle_general_set): Handle packet 'QAgent'.
5981 (handle_query): Send `QAgent+'.
5982 * Makefile.in (server.o): Depends on agent.h.
5983
5984 2012-03-03 Yao Qi <yao@codesourcery.com>
5985
5986 * Makefile.in (OBS): Add agent.o.
5987 Add new rule for agent.o.
5988 Track dependence of tracepoint.c on agent.h.
5989 * tracepoint.c (run_inferior_command_1):
5990 (run_inferior_command): Call agent_run_command.
5991 (gdb_ust_connect_sync_socket): Deleted. Move it to
5992 common/agent.c.
5993 (resume_thread, stop_thread): Likewise.
5994 (gdb_ust_socket_init): Renamed to ...
5995 (gdb_agent_socket_init): ... New.
5996 (gdb_ust_thread): Renamed to ...
5997 (gdb_agent_helper_thread): ... New.
5998 (gdb_ust_init): Move some code to ...
5999 (gdb_agent_init): ... here. New.
6000 [HAVE_UST]: Call gdb_ust_init.
6001 (initialize_tracepoint_ftlib): Call gdb_agent_init.
6002 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
6003 * config.in, configure: Regenerated.
6004
6005 2012-03-02 Pedro Alves <palves@redhat.com>
6006
6007 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
6008 * linux-low.c (struct simple_pid_list): New.
6009 (stopped_pids): New a struct simple_pid_list pointer.
6010 (add_to_pid_list, pull_pid_from_list): New.
6011 (handle_extended_wait): Don't assume the first signal new children
6012 report is SIGSTOP. Adjust call to pull_pid_from_list.
6013 (linux_wait_for_lwp): Adjust.
6014
6015 2012-03-02 Yao Qi <yao@codesourcery.com>
6016
6017 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
6018 debug log.
6019
6020 2012-03-02 Yao Qi <yao@codesourcery.com>
6021
6022 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
6023 `stop_pc' and `tpoint'. Update caller.
6024
6025 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
6026
6027 * linux-low.h (linux_target_ops): Add regset_bitmap member.
6028 * linux-low.c (use_linux_regsets): New macro.
6029 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
6030 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
6031 (linux_register_in_regsets): New function.
6032 (usr_fetch_inferior_registers): Skip registers covered by
6033 regsets.
6034 (usr_store_inferior_registers): Likewise.
6035 (usr_fetch_inferior_registers): New macro.
6036 (usr_store_inferior_registers): Likewise.
6037 (linux_fetch_registers): Handle mixed regset/non-regset targets.
6038 (linux_store_registers): Likewise.
6039 * linux-mips-low.c (init_registers_mips_dsp_linux): New
6040 prototype.
6041 (init_registers_mips64_dsp_linux): Likewise.
6042 (init_registers_mips_linux): New macro.
6043 (init_registers_mips_dsp_linux): Likewise.
6044 (mips_dsp_num_regs): Likewise.
6045 (DSP_BASE, DSP_CONTROL): New fallback macros.
6046 (mips_base_regs): New macro.
6047 (mips_regmap): Use it. Fix the size.
6048 (mips_dsp_regmap): New variable.
6049 (mips_dsp_regset_bitmap): Likewise.
6050 (mips_arch_setup): New function.
6051 (mips_cannot_fetch_register): Use the_low_target.regmap rather
6052 than mips_regmap.
6053 (mips_cannot_store_register): Likewise.
6054 (the_low_target): Update .arch_setup, .num_regs and .regmap
6055 initializers. Add .regset_bitmap initializer.
6056 * linux-arm-low.c (the_low_target): Add .regset_bitmap
6057 initializer.
6058 * linux-bfin-low.c (the_low_target): Likewise.
6059 * linux-cris-low.c (the_low_target): Likewise.
6060 * linux-crisv32-low.c (the_low_target): Likewise.
6061 * linux-ia64-low.c (the_low_target): Likewise.
6062 * linux-m32r-low.c (the_low_target): Likewise.
6063 * linux-m68k-low.c (the_low_target): Likewise.
6064 * linux-ppc-low.c (the_low_target): Likewise.
6065 * linux-s390-low.c (the_low_target): Likewise.
6066 * linux-sh-low.c (the_low_target): Likewise.
6067 * linux-sparc-low.c (the_low_target): Likewise.
6068 * linux-tic6x-low.c (the_low_target): Likewise.
6069 * linux-x86-low.c (the_low_target): Likewise.
6070 * linux-xtensa-low.c (the_low_target): Likewise.
6071 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
6072 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
6073 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
6074 srv_xmlfiles.
6075 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
6076 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
6077
6078 2012-02-29 Yao Qi <yao@codesourcery.com>
6079 Pedro Alves <palves@redhat.com>
6080
6081 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
6082 `step_over_finished' is true.
6083
6084 2012-02-27 Pedro Alves <palves@redhat.com>
6085
6086 * linux-low.c (pid_is_stopped): Delete, moved to common/.
6087 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
6088
6089 2012-02-27 Pedro Alves <palves@redhat.com>
6090
6091 PR server/9684
6092 * linux-low.c (pid_is_stopped): New.
6093 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
6094
6095 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
6096
6097 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
6098 of conditions.
6099
6100 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
6101
6102 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
6103
6104 2012-02-24 Luis Machado <lgustavo@codesourcery>
6105
6106 * server.c (handle_query): Advertise support for target-side
6107 breakpoint condition evaluation.
6108 (process_point_options): New function.
6109 (process_serial_event): When inserting a breakpoint, check for
6110 a target-side condition that should be evaluated.
6111
6112 * mem-break.c: Include regcache.h and ax.h.
6113 (point_cond_list_t): New data structure.
6114 (breakpoint) <cond_list>: New field.
6115 (find_gdb_breakpoint_at): Make non-static.
6116 (delete_gdb_breakpoint_at): Clear any target-side
6117 conditions.
6118 (clear_gdb_breakpoint_conditions): New function.
6119 (add_condition_to_breakpoint): Likewise.
6120 (add_breakpoint_condition): Likewise.
6121 (gdb_condition_true_at_breakpoint): Likewise.
6122 (gdb_breakpoint_here): Return result directly instead
6123 of going through a local variable.
6124
6125 * mem-break.h (find_gdb_breakpoint_at): New prototype.
6126 (clear_gdb_breakpoint_conditions): Likewise.
6127 (add_breakpoint_condition): Likewise.
6128 (gdb_condition_true_at_breakpoint): Likewise.
6129
6130 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
6131 (need_step_over_p): Take target-side breakpoint condition into
6132 consideration.
6133
6134 2012-02-24 Luis Machado <lgustavo@codesourcery>
6135
6136 * server.h: Include tracepoint.h.
6137 (agent_mem_read, agent_get_trace_state_variable_value,
6138 agent_set_trace_state_variable_value,
6139 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
6140 get_set_tsv_func_addr): New prototypes.
6141
6142 * ax.h: New include file.
6143 * ax.c: New source file.
6144
6145 * tracepoint.c: Include ax.h.
6146 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
6147 agent_expr, eval_result_type): Move to ax.h.
6148 (parse_agent_expr): Rename to ...
6149 (gdb_parse_agent_expr): ... this, make it non-static and move
6150 to ax.h.
6151 (unparse_agent_expr) Rename to ...
6152 (gdb_unparse_agent_expr): ... this, make it non-static and move
6153 to ax.h.
6154 (eval_agent_expr): Rename to ...
6155 (eval_tracepoint_agent_expr): ... this.
6156 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
6157 forward declarations.
6158 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
6159 (agent_get_trace_state_variable_value): New function.
6160 (agent_set_trace_state_variable_value): New function.
6161 (cmd_qtdp): Call gdb_parse_agent_expr (...).
6162 (response_tracepoint): Call gdb_unparse_agent_expr (...).
6163 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
6164 (condition_true_at_tracepoint): Likewise.
6165 (parse_agent_expr): Rename to ...
6166 (gdb_parse_agent_expr): ... this and move to ax.c.
6167 (unparse_agent_expr): Rename to ...
6168 (gdb_unparse_agent_expr): ... this and move to ax.c.
6169 (gdb_agent_op_name): Move to ax.c.
6170 (eval_agent_expr): Rename to ...
6171 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
6172 and move to ax.c.
6173 (eval_tracepoint_agent_expr): New function.
6174 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
6175 non-static.
6176 (current_insn_ptr, emit_error, struct bytecode_address): Move to
6177 ax.c.
6178 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
6179 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
6180 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
6181 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
6182 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
6183 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
6184 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
6185 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
6186 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
6187 (compile_bytecodes): Remove forward declaration.
6188 (is_goto_target): Move to ax.c.
6189 (compile_bytecodes): Move to ax.c and call
6190 agent_get_trace_state_variable_value (...) and
6191 agent_set_trace_state_variable_value (...).
6192
6193 * Makefile.in: Update ax.c and IPA dependencies.
6194
6195 2012-02-24 Pedro Alves <palves@redhat.com>
6196
6197 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
6198 (cmd_bigqtbuffer_circular): ... this. Only handle
6199 'QTBuffer:circular:'.
6200 (handle_tracepoint_general_set): Adjust.
6201
6202 2012-02-16 Yao Qi <yao@codesourcery.com>
6203
6204 * inferiors.c: Move code to ...
6205 * dll.c: .... here. New.
6206 * server.h: Declare clear_dlls.
6207 * Makefile.in (SFILES): Add dll.c.
6208 (OBS): Add dll.o
6209 (dll.o): New rule.
6210
6211 2012-02-11 Yao Qi <yao@codesourcery.com>
6212
6213 * server.c: (handle_monitor_command): Add a new parameter
6214 `own_buf'.
6215 (handle_query): Update caller.
6216
6217 2012-02-09 Joel Brobecker <brobecker@adacore.com>
6218
6219 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
6220 * configure, config.in: Regenerate.
6221 * hostio.c: Provide an alternate implementation if HAVE_READLINK
6222 is not defined.
6223
6224 2012-02-02 Pedro Alves <palves@redhat.com>
6225
6226 Try SIGKILL first, then PTRACE_KILL.
6227 * linux-low.c (linux_kill_one_lwp): New.
6228 (linux_kill_one_lwp): Rename to ...
6229 (kill_one_lwp_callback): ... this. Use the new
6230 linux_kill_one_lwp.
6231
6232 2012-02-02 Pedro Alves <palves@redhat.com>
6233
6234 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
6235 inferior.
6236
6237 2012-01-27 Pedro Alves <palves@redhat.com>
6238
6239 * linux-low.c (linux_child_pid_to_exec_file): Delete.
6240 (elf_64_file_p): Make static.
6241 (linux_pid_exe_is_elf_64_file): New.
6242 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
6243 Delete declarations.
6244 (linux_pid_exe_is_elf_64_file): Declare.
6245 * linux-x86-low.c (x86_arch_setup): Use
6246 linux_pid_exe_is_elf_64_file.
6247
6248 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
6249
6250 * linux-low.c (linux_wait_for_event_1): Rename to ...
6251 (linux_wait_for_event): ... here and merge it with former
6252 linux_wait_for_event - new variable wait_ptid, use it.
6253 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
6254
6255 2012-01-23 Pedro Alves <palves@redhat.com>
6256
6257 * server.c (main): Avoid yet another case of infinite loop while
6258 detaching/killing after a longjmp.
6259
6260 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
6261
6262 Code cleanup.
6263 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
6264
6265 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
6266
6267 * hostio.c (handle_readlink): New function.
6268 (handle_vFile): Call it to handle "vFile:readlink" packets.
6269
6270 2012-01-20 Pedro Alves <palves@redhat.com>
6271 Ulrich Weigand <ulrich.weigand@linaro.org>
6272
6273 * server.c (handle_v_requests): Only support vAttach and vRun to
6274 start multiple processes when in extended protocol mode.
6275
6276 2012-01-17 Pedro Alves <palves@redhat.com>
6277
6278 * tracepoint.c (initialize_tracepoint): Use mmap instead of
6279 memalign plus mprotect to allocate the scratch buffer.
6280
6281 2012-01-13 Pedro Alves <palves@redhat.com>
6282
6283 * server.c (attach_inferior): Clear `cont_thread'.
6284
6285 2012-01-13 Pedro Alves <palves@redhat.com>
6286
6287 * server.c (main): Avoid infinite loop while detaching/killing
6288 after a longjmp.
6289
6290 2012-01-09 Doug Evans <dje@google.com>
6291
6292 * server.c (start_inferior): Set last_ptid in --wrapper case.
6293
6294 2012-01-06 Yao Qi <yao@codesourcery.com>
6295
6296 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
6297 defined.
6298 [IN_PROCESS_AGENT] (debug_agent): New global variable.
6299
6300 2012-01-04 Yao Qi <yao@codesourcery.com>
6301
6302 * tracepoint.c (cmd_qtdp): Print debug message
6303 for static tracepoint.
6304
6305 2012-01-04 Yao Qi <yao@codesourcery.com>
6306
6307 * tracepoint.c (trace_vdebug): Differentiate debug message
6308 between gdbserver and IPA.
6309
6310 2012-01-03 Yao Qi <yao@codesourcery.com>
6311
6312 * tracepoint.c (tracepoint_was_hit): Don't collect for
6313 static tracepoint.
6314
6315 2012-01-02 Joel Brobecker <brobecker@adacore.com>
6316
6317 * terminal.h: Reformat copyright header.
6318
6319 2012-01-02 Joel Brobecker <brobecker@adacore.com>
6320
6321 * server.c (gdbserver_version): Update copyright year.
6322 * gdbreplay.c (gdbreplay_version): Likewise.
6323
6324 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
6325
6326 * linux-low.c (linux_create_inferior): Put empty if clause for write.
6327
6328 Revert:
6329 2011-12-18 Hui Zhu <teawater@gmail.com>
6330 * linux-low.c (linux_create_inferior): Save return value to ret.
6331
6332 2011-12-18 Hui Zhu <teawater@gmail.com>
6333
6334 * linux-low.c (linux_create_inferior): Save return value to ret.
6335
6336 2011-12-16 Doug Evans <dje@google.com>
6337
6338 * linux-low.c (linux_create_inferior): If stdio connection,
6339 redirect stdin from /dev/null, stdout to stderr.
6340 * remote-utils.c (remote_is_stdio): New static global.
6341 (remote_connection_is_stdio): New function.
6342 (remote_prepare): Handle stdio connection.
6343 (remote_open): Ditto.
6344 (remote_close): Don't close stdin for stdio connections.
6345 (read_prim,write_prim): New functions. Replace all calls to
6346 read/write to these.
6347 * server.c (main): Watch for "-" argument. Move call to
6348 remote_prepare before start_inferior.
6349 * server.h (STDIO_CONNECTION_NAME): New macro.
6350 (remote_connection_is_stdio): Declare.
6351
6352 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
6353 in debugging output.
6354
6355 2011-12-15 Yao Qi <yao@codesourcery.com>
6356
6357 * tracepoint.c: Include sys/syscall.h.
6358 (gdb_ust_thread): Remove preprocessor conditional.
6359
6360 2011-12-14 Pedro Alves <pedro@codesourcery.com>
6361
6362 * linux-low.c (linux_detach_one_lwp): Call
6363 the_low_target.prepare_to_resume before detaching.
6364
6365 2011-12-14 Yao Qi <yao@codesourcery.com>
6366
6367 * tracepoint.c (gdb_ust_thread): Don't ignore return value
6368 of write.
6369
6370 2011-12-14 Yao Qi <yao@codesourcery.com>
6371
6372 * i386-low.c (i386_low_stopped_data_address): Initialize local
6373 variable `control'.
6374
6375 2011-12-13 Pedro Alves <pedro@codesourcery.com>
6376
6377 PR remote/13492
6378
6379 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
6380 DR_CONTROL unless necessary. Extend comments.
6381 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
6382 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
6383
6384 2011-12-13 Yao Qi <yao@codesourcery.com>
6385
6386 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
6387 macros.
6388 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
6389
6390 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
6391
6392 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
6393 Print new debug message for such case.
6394
6395 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
6396
6397 Fix overlapping memcpy.
6398 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
6399 the read_inferior_memory transfer.
6400 (delete_fast_tracepoint_jump): New variable buf. Use it for the
6401 write_inferior_memory transfer.
6402 (set_fast_tracepoint_jump): New variable buf. Use it for the
6403 read_inferior_memory and write_inferior_memory transfers.
6404 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
6405 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
6406 Use it for the write_inferior_memory transfer.
6407 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
6408 buffers.
6409
6410 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
6411
6412 * linux-low.c (fetch_register, store_register): Make code
6413 consistent, fix formatting.
6414
6415 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
6416
6417 * linux-low.c (usr_store_inferior_registers): Factor out code
6418 to handle individual registers into...
6419 (store_register): ... this new function.
6420
6421 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
6422
6423 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
6424 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
6425 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
6426 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
6427 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
6428 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
6429 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
6430 (srv_xmlfiles): Add new XML files.
6431
6432 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
6433 and <sys/uio.h>.
6434 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
6435 (init_registers_s390_linux32v1): Add prototype.
6436 (init_registers_s390_linux32v2): Likewise.
6437 (init_registers_s390_linux64v1): Likewise.
6438 (init_registers_s390_linux64v2): Likewise.
6439 (init_registers_s390x_linux64v1): Likewise.
6440 (init_registers_s390x_linux64v2): Likewise.
6441 (s390_num_regs): Increment to 52.
6442 (s390_regmap): Add orig_r2 register.
6443 (s390_num_regs_3264): Increment to 68.
6444 (s390_regmap_3264): Add orig_r2 register.
6445 (s390_collect_ptrace_register): Handle orig_r2 register.
6446 (s390_supply_ptrace_register): Likewise.
6447 (s390_fill_last_break): New function.
6448 (s390_store_last_break): Likewise.
6449 (s390_fill_system_call): New function.
6450 (s390_store_system_call): Likewise.
6451 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
6452 register sets.
6453 (s390_check_regset): New function.
6454 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
6455 NT_S390_SYSTEM_CALL regsets and use appropriate description.
6456 Update target_regsets for available register sets.
6457
6458 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
6459 Jan Kratochvil <jan.kratochvil@redhat.com>
6460
6461 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
6462 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
6463 New.
6464 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
6465 * linux-low.h (struct process_info_private): New member r_debug.
6466 * server.c (handle_qxfer_libraries): Call
6467 the_target->qxfer_libraries_svr4.
6468 (handle_qxfer_libraries_svr4): New function.
6469 (qxfer_packets): New entry "libraries-svr4".
6470 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
6471 * target.h (struct target_ops): New member qxfer_libraries_svr4.
6472 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
6473 PACKET_qXfer_libraries_svr4.
6474
6475 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
6476
6477 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
6478 PSW address/mask between 8-byte and 16-byte formats.
6479 (s390_supply_ptrace_register): Likewise.
6480 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
6481 basic addressing mode bit.
6482
6483 2011-11-24 Stan Shebs <stan@codesourcery.com>
6484
6485 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
6486
6487 2011-11-17 Stan Shebs <stan@codesourcery.com>
6488
6489 * tracepoint.c (struct tracepoint): New field traceframe_usage.
6490 (tracing_start_time): New global.
6491 (tracing_stop_time): New global.
6492 (tracing_user_name): New global.
6493 (tracing_notes): New global.
6494 (tracing_stop_note): New global.
6495 (cmd_qtstart): Set traceframe_usage, start_time.
6496 (stop_tracing): Set stop_time.
6497 (cmd_qtstatus): Report additional status.
6498 (cmd_qtp): New function.
6499 (handle_tracepoint_query): Call it.
6500 (cmd_qtnotes): New function.
6501 (handle_tracepoint_general_set): Call it.
6502 (get_timestamp): Rename from tsv_get_timestamp.
6503
6504 2011-11-14 Stan Shebs <stan@codesourcery.com>
6505 Kwok Cheung Yeung <kcy@codesourcery.com>
6506
6507 * linux-x86-low.c (small_jump_insn): New.
6508 (i386_install_fast_tracepoint_jump_pad): Add arguments for
6509 trampoline and error message, build a trampoline and issue a small
6510 jump instruction to it.
6511 (x86_install_fast_tracepoint_jump_pad): Add arguments for
6512 trampoline and error message.
6513 (x86_get_min_fast_tracepoint_insn_len): New.
6514 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
6515 * linux-low.h (struct linux_target_ops): Add arguments to
6516 install_fast_tracepoint_jump_pad operation, add new operation.
6517 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
6518 arguments.
6519 (linux_get_min_fast_tracepoint_insn_len): New function.
6520 (linux_target_op): Add new operation.
6521 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
6522 (gdb_trampoline_buffer_end): Ditto.
6523 (gdb_trampoline_buffer_error): Ditto.
6524 (struct ipa_sym_addresses): Add fields for new IPA variables.
6525 (symbol_list): Add entries for new IPA variables.
6526 (struct tracepoint): Add fields to hold the address range of the
6527 trampoline used by the tracepoint.
6528 (trampoline_buffer_head): New static variable.
6529 (trampoline_buffer_tail): Ditto.
6530 (claim_trampoline_space): New function.
6531 (have_fast_tracepoint_trampoline_buffer): New function.
6532 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
6533 structure.
6534 (install_fast_tracepoint): Ditto, also add error buffer argument.
6535 (cmd_qtminftpilen): New function.
6536 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
6537 (fast_tracepoint_from_trampoline_address): New function.
6538 (fast_tracepoint_collecting): Handle trampoline as part of jump
6539 pad space.
6540 (set_trampoline_buffer_space): New function.
6541 (initialize_tracepoint): Initialize new IPA variables.
6542 * target.h (struct target_ops): Add arguments to
6543 install_fast_tracepoint_jump_pad operation, add new
6544 get_min_fast_tracepoint_insn_len operation.
6545 (target_get_min_fast_tracepoint_insn_len): New.
6546 (install_fast_tracepoint_jump_pad): Add arguments.
6547 * server.h (IPA_BUFSIZ): Define.
6548 * linux-i386-ipa.c: Include extra header files.
6549 (initialize_fast_tracepoint_trampoline_buffer): New function.
6550 (initialize_low_tracepoint): Call it.
6551 * server.h (set_trampoline_buffer_space): Declare.
6552 (claim_trampoline_space): Ditto.
6553 (have_fast_tracepoint_trampoline_buffer): Ditto.
6554
6555 2011-11-14 Yao Qi <yao@codesourcery.com>
6556
6557 * server.c (handle_query): Handle InstallInTrace for qSupported.
6558 * tracepoint.c (add_tracepoint): Sort list.
6559 (install_tracepoint, download_tracepoint): New.
6560 (cmd_qtdp): Call them to install and download tracepoints.
6561 (sort_tracepoints): Removed.
6562 (cmd_qtstart): Update.
6563
6564 2011-11-14 Yao Qi <yao@codesourcery.com>
6565
6566 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
6567 * mem-break.h: Declare.
6568 * tracepoint.c (cmd_qtstart): Move some code to ...
6569 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
6570 New.
6571 (download_tracepoints): Move some code to ...
6572 (download_tracepoint_1): ... here. New.
6573
6574 2011-11-08 Yao Qi <yao@codesourcery.com>
6575
6576 * remote-utils.c (relocate_instruction): A comment fix.
6577
6578 2011-11-07 Joel Brobecker <brobecker@adacore.com>
6579
6580 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
6581 (i386_dr_low_get_control, i386_dr_low_get_status): Use
6582 dr_status_mirror and dr_control_mirror from debug_reg_state.
6583 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
6584 (i386_initial_stuff): Remove use of deleted globals.
6585 (i386_get_thread_context, i386_set_thread_context,
6586 i386_thread_added): Use dr_status_mirror and dr_control_mirror
6587 from debug_reg_state.
6588
6589 2011-11-05 Yao Qi <yao@codesourcery.com>
6590
6591 * tracepoint.c (gdb_collect): Loop over tracepoints of same
6592 address as TPOINT's.
6593
6594 2011-11-02 Stan Shebs <stan@codesourcery.com>
6595
6596 * tracepoint.c (agent_mem_read_string): New function.
6597 (eval_agent_expr): Call it for tracenz.
6598 * server.c (handle_query): Report support for tracenz.
6599
6600 2011-11-02 Yao Qi <yao@codesourcery.com>
6601
6602 * tracepoint.c (cmd_qtstart): Remove unused local variables.
6603
6604 2011-11-02 Yao Qi <yao@codesourcery.com>
6605
6606 * target.h: Fix a typo in comment.
6607
6608 2011-10-31 Pedro Alves <pedro@codesourcery.com>
6609
6610 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
6611 clobber the breakpoints' shadows with fast tracepoint jumps.
6612 * mem-break.h (check_mem_write): Add `myaddr' parameter.
6613 * target.c (write_inferior_memory): Also pass MYADDR down to
6614 check_mem_write.
6615
6616 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
6617
6618 * configure.ac: Check support for personality routine.
6619 * configure: Regenerate.
6620 * config.in: Likewise.
6621 * linux-low.c: Include <sys/personality.h>.
6622 Define ADDR_NO_RANDOMIZE if necessary.
6623 (linux_create_inferior): Disable address space randomization when
6624 forking inferior, if requested.
6625 (linux_supports_disable_randomization): New function.
6626 (linux_target_ops): Install it.
6627 * server.h (disable_randomization): Declare.
6628 * server.c (disable_randomization): New global variable.
6629 (handle_general_set): Handle QDisableRandomization.
6630 (handle_query): Likewise for qSupported.
6631 (main): Support --disable-randomization and --no-disable-randomization
6632 command line arguments.
6633 * target.h (struct target_ops): Add supports_disable_randomization.
6634 (target_supports_disable_randomization): New macro.
6635
6636 2011-09-29 Mike Frysinger <vapier@gentoo.org>
6637
6638 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
6639 ifdef check.
6640 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
6641 [!PT_GETDSBT] (target_loadmap): New definition.
6642 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
6643 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
6644 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
6645 and PT_GETDSBT to LINUX_LOADMAP.
6646 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
6647 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
6648
6649 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
6650
6651 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
6652 (arm_linux_hwbp_cap): New static variable.
6653 (arm_linux_get_hwbp_cap): Replace by ...
6654 (arm_linux_init_hwbp_cap): ... this new function.
6655 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
6656 (arm_linux_get_hw_watchpoint_count): Likewise.
6657 (arm_linux_get_hw_watchpoint_max_length): Likewise.
6658 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
6659 (arm_prepare_to_resume): Use perror_with_name instead of error.
6660
6661 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
6662
6663 * linux-arm-low.c: Include <signal.h>.
6664 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
6665 (struct arm_linux_hwbp_cap): New data type.
6666 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
6667 (struct arm_linux_hw_breakpoint): New data type.
6668 (MAX_BPTS, MAX_WPTS): Define.
6669 (struct arch_process_info, struct arch_lwp_info): New data types.
6670 (arm_linux_get_hwbp_cap): New function.
6671 (arm_linux_get_hw_breakpoint_count): Likewise.
6672 (arm_linux_get_hw_watchpoint_count): Likewise.
6673 (arm_linux_get_hw_watchpoint_max_length): Likewise.
6674 (arm_hwbp_control_initialize): Likewise.
6675 (arm_hwbp_control_is_enabled): Likewise.
6676 (arm_hwbp_control_is_initialized): Likewise.
6677 (arm_hwbp_control_disable): Likewise.
6678 (arm_linux_hw_breakpoint_equal): Likewise.
6679 (arm_linux_hw_point_initialize): Likewise.
6680 (struct update_registers_data): New data structure.
6681 (update_registers_callback: New function.
6682 (arm_insert_point): Likewise.
6683 (arm_remove_point): Likewise.
6684 (arm_stopped_by_watchpoint): Likewise.
6685 (arm_stopped_data_address): Likewise.
6686 (arm_new_process): Likewise.
6687 (arm_new_thread): Likewise.
6688 (arm_prepare_to_resume): Likewise.
6689 (the_low_target): Register arm_insert_point, arm_remove_point,
6690 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
6691 arm_new_thread, and arm_prepare_to_resume.
6692
6693 2011-09-15 Stan Shebs <stan@codesourcery.com>
6694
6695 * server.h (struct emit_ops): Add compare-goto fields.
6696 * tracepoint.c (gdb_agent_op_sizes): New table.
6697 (emit_eq_goto): New function.
6698 (emit_ne_goto): New function.
6699 (emit_lt_goto): New function.
6700 (emit_le_goto): New function.
6701 (emit_gt_goto): New function.
6702 (emit_ge_goto): New function.
6703 (is_goto_target): New function.
6704 (compile_bytecodes): Recognize special cases of compare-goto
6705 combinations and call specialized emitters for them.
6706 * linux-x86-low.c (amd64_emit_eq_goto): New function.
6707 (amd64_emit_ne_goto): New function.
6708 (amd64_emit_lt_goto): New function.
6709 (amd64_emit_le_goto): New function.
6710 (amd64_emit_gt_goto): New function.
6711 (amd64_emit_ge_goto): New function.
6712 (amd64_emit_ops): Add the new functions.
6713 (i386_emit_eq_goto): New function.
6714 (i386_emit_ne_goto): New function.
6715 (i386_emit_lt_goto): New function.
6716 (i386_emit_le_goto): New function.
6717 (i386_emit_gt_goto): New function.
6718 (i386_emit_ge_goto): New function.
6719 (i386_emit_ops): Add the new functions.
6720
6721 2011-09-08 Stan Shebs <stan@codesourcery.com>
6722
6723 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
6724 (i386_emit_epilogue): Restore %ebx.
6725
6726 2011-08-31 Jie Zhang <jzhang918@gmail.com>
6727
6728 * server.c (step_thread): Remove definition.
6729 (process_serial_event): Don't handle Hs.
6730 * server.h (step_thread): Remove declaration.
6731 * target.c (set_desired_inferior): Remove use of step_thread.
6732
6733 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
6734
6735 * linux-low.c: Include linux-procfs.h.
6736 (linux_attach_lwp_1): Update comments.
6737 (linux_attach): Scan for existing threads when attaching to a
6738 process that is the tgid.
6739 * Makefile.in: Update dependencies.
6740
6741 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
6742
6743 * configure.srv: Add linux-procfs.o dependencies.
6744
6745 2011-08-14 Yao Qi <yao@codesourcery.com>
6746
6747 * target.h (struct target_ops): Fix indent.
6748 * win32-low.c (win32_target_ops): Fix comment.
6749
6750 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
6751 Yao Qi <yao@codesourcery.com>
6752
6753 * Makefile.in (clean): Remove tic6x-*.c files.
6754 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
6755 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
6756 (tic6x-c64xp-linux.c): Likewise.
6757 * configure.srv: Add support for tic6x-*-uclinux.
6758 * linux-tic6x-low.c: New.
6759 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
6760
6761 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
6762 Yao Qi <yao@codesourcery.com>
6763
6764 * target.h (struct target_ops): Add read_loadmap.
6765 * linux-low.c (struct target_loadseg): New type.
6766 (struct target_loadmap): New type.
6767 (linux_read_loadmap): New function.
6768 (linux_target_ops): Add linux_read_loadmap.
6769 * server.c (handle_query): Support qXfer:fdpic:read packet.
6770 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
6771 to NULL.
6772
6773 2011-08-05 Eli Zaretskii <eliz@gnu.org>
6774
6775 * win32-low.c: Include <stdint.h>.
6776
6777 2011-07-22 Pedro Alves <pedro@codesourcery.com>
6778
6779 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
6780 to the inferior here.
6781 (i386_remove_aligned_watchpoint): Ditto.
6782 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
6783 fit part of the watchpoint in the debug registers.
6784 (i386_update_inferior_debug_regs): New.
6785 (i386_low_insert_watchpoint): Work on a local mirror of the debug
6786 registers, and only update the inferior on success.
6787 (i386_low_remove_watchpoint): Ditto.
6788
6789 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
6790
6791 * linux-low.c (compare_ints, unique, list_threads, show_process,
6792 linux_core_of_thread): Delete.
6793 (linux_target_ops): Change linux_core_of_thread to
6794 linux_common_core_of_thread.
6795 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
6796 * utils.c (malloc_failure): Change type of argument.
6797 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
6798 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
6799 common/linux-osdata.c, common/ptid.c and common/buffer.c.
6800 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
6801 (IPA_OBJS): Add common-utils-ipa.o.
6802 (ptid_h, linux_osdata_h): New macros.
6803 (server_h): Add common/common-utils.h, common/xml-utils.h,
6804 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
6805 common/ptid.h.
6806 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
6807 ptid.o, buffer.o): New rules.
6808 (linux-low.o): Add common/linux-osdata.h as a dependency.
6809 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
6810 * configure.ac: Add AC_HEADER_DIRENT check.
6811 * config.in: Regenerate.
6812 * configure: Regenerate.
6813 * remote-utils.c (xml_escape_text): Delete.
6814 (buffer_grow, buffer_free, buffer_init, buffer_finish,
6815 buffer_xml_printf): Move to common/buffer.c.
6816 * server.c (main): Remove call to initialize_inferiors.
6817 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
6818 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
6819 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
6820 internal_error, gdb_assert, gdb_assert_fail): Delete.
6821 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
6822 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
6823 common/buffer.h.
6824 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
6825 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
6826 initialize_inferiors): Delete.
6827
6828 2011-07-20 Pedro Alves <pedro@codesourcery.com>
6829
6830 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
6831 symbol error.
6832
6833 2011-05-31 Pedro Alves <pedro@codesourcery.com>
6834
6835 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
6836 assertion.
6837 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
6838
6839 2011-05-26 Yao Qi <yao@codesourcery.com>
6840
6841 * Makefile.in (thread-db.o): Track dependence to
6842 common/gdb_thread_db.h.
6843 * thread-db.c: include gdb_thread_db.h from right place.
6844
6845 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
6846
6847 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
6848 __FILE__ and __LINE__ to internal_error.
6849
6850 2011-05-13 Doug Evans <dje@google.com>
6851
6852 * thread-db.c (try_thread_db_load_from_sdir): New function.
6853 (try_thread_db_load_from_dir): New function.
6854 (thread_db_load_search): Handle $sdir, ignore $pdir.
6855 Remove trying of system directories if search of
6856 libthread-db-search-path fails, that is now done via $sdir.
6857
6858 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
6859
6860 * server.c (handle_query): Add EnableDisableTracepoints to the list
6861 of supported features.
6862 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
6863 tracepoints.
6864 (cmd_qtenable_disable): New.
6865 (cmd_qtstart): Install tracepoints even if disabled.
6866 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
6867 receiving a QTEnable or QTDisable packet.
6868 (gdb_collect): Skip data collection if fast tracepoint is disabled.
6869 (ust_marker_to_static_tracepoint): Do not ignore disabled static
6870 tracepoints.
6871 (gdb_probe): Skip data collection if static tracepoint is disabled.
6872
6873 2011-05-10 Doug Evans <dje@google.com>
6874
6875 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
6876
6877 2011-05-04 Doug Evans <dje@google.com>
6878
6879 * linux-low.c (linux_join): Skip process lookup.
6880 * spu-low.c (spu_join): Ditto.
6881 * server.c (join_inferiors_callback): Delete.
6882 (process_serial_event): For 'D' packet (detach) call join_inferior
6883 directly.
6884
6885 2011-05-04 Joseph Myers <joseph@codesourcery.com>
6886
6887 * README: Don't mention xscale*-*-linux*.
6888 * configure.srv (xscale*-*-linux*): Don't handle target.
6889
6890 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
6891
6892 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
6893 casting pointers.
6894 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
6895 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
6896 (i386_emit_void_call_2): Likewise.
6897
6898 2011-04-26 Yao Qi <yao@codesourcery.com>
6899
6900 * linux-low.c: Move common macros to linux-ptrace.h.
6901 Include linux-ptrace.h.
6902 * Makefile.in (linux_ptrace_h): New.
6903 (linux-low.o): Depends on linux-ptrace.h.
6904
6905 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
6906
6907 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
6908 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
6909 (remote_prepare): New function with most of the TCP code from ...
6910 (remote_open): ... here. Detect PORT here unconditionally. Move also
6911 setting transport_is_reliable.
6912 * server.c (run_once): New variable.
6913 (gdbserver_usage): Document it.
6914 (main): Set run_once for `--once'. Call remote_prepare. Exit after
6915 the first run if RUN_ONCE.
6916 * server.h (run_once, remote_prepare): New declarations.
6917
6918 2011-04-19 Tom Tromey <tromey@redhat.com>
6919
6920 * win32-low.c (handle_load_dll): Remove duplicate "the".
6921
6922 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
6923
6924 Remove support for old Cygwin 1.5 versions.
6925 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
6926 function to avoid warning.
6927 (win32_add_one_solib): Use cygwin_conv_path function to avoid
6928 warning.
6929
6930 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
6931
6932 * gdbserver/server.h (Macro _): Define it if not available.
6933
6934 2011-03-14 Michael Snyder <msnyder@vmware.com>
6935
6936 * hostio.c (handle_close): Remove unnecessary null test.
6937
6938 2011-03-10 Joel Brobecker <brobecker@adacore.com>
6939
6940 * Makefile.in (maintainer-clean realclean distclean): Remove
6941 "make ... subdir_do" command.
6942
6943 2011-03-10 Michael Snyder <msnyder@vmware.com>
6944
6945 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
6946
6947 * server.c (handle_v_run): Free alloced buffer on early return.
6948
6949 2011-03-09 Yao Qi <yao@codesourcery.com>
6950
6951 Revert:
6952 2011-03-04 Yao Qi <yao@codesourcery.com>
6953
6954 * Makefile.in: Remove GNU make feature --directory.
6955
6956 2011-03-05 Yao Qi <yao@codesourcery.com>
6957
6958 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
6959 (subdir_do): New make target. Copied from gdb/Makefile.
6960 (maintainer-clean, realclean, distclean, clean): Call corresponding
6961 make targets in common/Makefile.
6962
6963 2011-02-11 Yao Qi <yao@codesourcery.com>
6964
6965 * configure.ac: Call AC_PROG_RANLIB.
6966 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
6967 * configure: Regenerate.
6968
6969 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
6970
6971 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
6972
6973 2011-03-06 Yao Qi <yao@codesourcery.com>
6974
6975 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
6976
6977 2011-03-05 Yao Qi <yao@codesourcery.com>
6978
6979 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
6980 (subdir_do): New make target. Copied from gdb/Makefile.
6981 (maintainer-clean, realclean, distclean, clean): Call corresponding
6982 make targets in common/Makefile.
6983
6984 2011-03-04 Yao Qi <yao@codesourcery.com>
6985
6986 * Makefile.in: Remove GNU make feature --directory.
6987
6988 2011-03-04 Michael Snyder <msnyder@vmware.com>
6989
6990 * server.c (queue_stop_reply): Call xmalloc not malloc.
6991
6992 2011-03-02 Michael Snyder <msnyder@vmware.com>
6993
6994 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
6995
6996 2011-02-28 Michael Snyder <msnyder@vmware.com>
6997
6998 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
6999 (cmd_qtframe): Ditto.
7000 (cmd_qtbuffer): Ditto.
7001 (cmd_bigqtbuffer): Ditto.
7002
7003 * utils.c (decimal2str): Initialize 'width' to nine, then
7004 don't mess with it.
7005
7006 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
7007
7008 * hostio.c (require_data): Free *data, not data.
7009
7010 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7011
7012 * hostio.c (require_data): Use free, not xfree.
7013
7014 2011-02-27 Michael Snyder <msnyder@vmware.com>
7015
7016 * server.c (handle_query): Discard unused value.
7017
7018 * hostio.c (require_data): Free malloc memory before returning
7019 error.
7020
7021 2011-02-26 Michael Snyder <msnyder@vmware.com>
7022
7023 * linux-low.c (list_threads): Call closedir for dirent.
7024
7025 2011-02-27 Michael Snyder <msnyder@vmware.com>
7026
7027 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
7028 a case statement falls through.
7029
7030 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
7031
7032 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
7033 in comparison.
7034
7035 2011-02-26 Michael Snyder <msnyder@vmware.com>
7036
7037 * utils.c (decimal2str): Eliminate dead code and dead param.
7038 (pulongest): Drop dead param from call to decimal2str.
7039 (plongest): Ditto.
7040
7041 2011-02-24 Joel Brobecker <brobecker@adacore.com>
7042
7043 Revert the following patch (not approved yet):
7044 2011-02-21 Hui Zhu <teawater@gmail.com>
7045 * tracepoint.c (tp_printf): New function.
7046 (eval_agent_expr): Handle gdb_agent_op_printf.
7047
7048 2011-02-21 Hui Zhu <teawater@gmail.com>
7049
7050 * tracepoint.c (tp_printf): New function.
7051 (eval_agent_expr): Handle gdb_agent_op_printf.
7052
7053 2011-02-18 Tom Tromey <tromey@redhat.com>
7054
7055 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
7056 (tracepoint.o): Likewise.
7057 * tracepoint.c (enum gdb_agent_op): Use ax.def.
7058 (gdb_agent_op_names): Likewise.
7059
7060 2011-02-18 Tom Tromey <tromey@redhat.com>
7061
7062 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
7063 gdb_agent_op_rot>: New constants.
7064 (gdb_agent_op_names): Add pick and roll.
7065 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
7066 cases.
7067
7068 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
7069
7070 * aclocal.m4: Regenerated with aclocal-1.11.1.
7071
7072 2011-02-14 Pedro Alves <pedro@codesourcery.com>
7073
7074 * server.c (handle_qxfer_traceframe_info): New.
7075 (qxfer_packets): Register "traceframe-info".
7076 (handle_query): Report support for qXfer:traceframe-info:read+.
7077 * tracepoint.c (match_blocktype): New.
7078 (traceframe_find_block_type): Rename to ...
7079 (traceframe_walk_blocks): ... this. Add callback filter argument,
7080 and use it.
7081 (traceframe_find_block_type): New, reimplemented on top of
7082 traceframe_walk_blocks.
7083 (build_traceframe_info_xml): New.
7084 (traceframe_read_info): New.
7085 * server.h (traceframe_read_info): Declare.
7086
7087 2011-02-11 Yao Qi <yao@codesourcery.com>
7088
7089 * configure.ac: Call AC_PROG_RANLIB.
7090 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
7091 * configure: Regenerate.
7092
7093 2011-02-07 Pedro Alves <pedro@codesourcery.com>
7094
7095 * server.c (gdb_read_memory): Change return semantics to allow
7096 partial transfers.
7097 (handle_search_memory_1): Adjust.
7098 (process_serial_event) <'m' packet>: Handle partial transfers.
7099 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
7100
7101 2011-01-28 Pedro Alves <pedro@codesourcery.com>
7102
7103 * regcache.c (init_register_cache): Initialize
7104 regcache->register_status.
7105 (free_register_cache): Release regcache->register_status.
7106 (regcache_cpy): Copy register_status.
7107 (registers_to_string): Print 'x's for unavailable registers.
7108 (supply_register): Mark the register's status valid or
7109 unavailable, depending on whether a buffer was passed in or not.
7110 (supply_register_zeroed): New.
7111 (supply_regblock): Mark the registers' status valid or
7112 unavailable, depending on whether a buffer was passed in or not.
7113 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
7114 (struct regcache): New `register_status' field.
7115 (supply_register_zeroed): Declare.
7116 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
7117 supply_register_zeroed, rather than passing a NULL buffer to
7118 supply_register.
7119 * tracepoint.c (fetch_traceframe_registers): Update comment.
7120
7121 2011-01-28 Pedro Alves <pedro@codesourcery.com>
7122
7123 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
7124 buffer explicit.
7125
7126 2011-01-25 Pedro Alves <pedro@codesourcery.com>
7127
7128 * server.h (decode_xfer_write): Change prototype.
7129 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
7130 and don't extract the annex here.
7131 * server.c (decode_xfer_read): Remove `annex' parameter,
7132 and don't extract the annex here.
7133 (decode_xfer): New.
7134 (struct qxfer): New.
7135 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
7136 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
7137 (handle_qxfer_statictrace): New functions, abstracted out from
7138 handle_query, and made to use the struct qxfer interface.
7139 (handle_threads_qxfer_proper): Rename to ...
7140 (handle_qxfer_threads_proper): ... this.
7141 (handle_threads_qxfer): Rename to ...
7142 (handle_qxfer_threads): ... this. Adjust.
7143 (qxfer_packets): New array.
7144 (handle_qxfer): New function.
7145 (handle_query): Use handle_qxfer.
7146
7147 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
7148
7149 * gdbreplay.c: Shorten lines of >= 80 columns.
7150 * linux-low.c: Ditto.
7151 * linux-ppc-low.c: Ditto.
7152 * linux-s390-low.c: Ditto.
7153 * linux-sparc-low.c: Ditto.
7154 * linux-x86-low.c: Ditto.
7155 * linux-xtensa-low.c: Ditto.
7156 * mem-break.c: Ditto.
7157 * nto-low.c: Ditto.
7158 * regcache.h: Ditto.
7159 * remote-utils.c: Ditto.
7160 * server.c: Ditto.
7161 * server.h: Ditto.
7162 * thread-db.c: Ditto.
7163 * tracepoint.c: Ditto.
7164 * utils.c: Ditto.
7165 * win32-low.h: Ditto.
7166
7167 2011-01-05 Joel Brobecker <brobecker@adacore.com>
7168
7169 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
7170 update.
7171
7172 2011-01-01 Joel Brobecker <brobecker@adacore.com>
7173
7174 * server.c (gdbserver_version): Update copyright year in version
7175 output.
7176 * gdbreplay.c (gdbreplay_version): Ditto.
7177
7178 2010-12-29 Jie Zhang <jie.zhang@analog.com>
7179
7180 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
7181 * linux-bfin-low.c: New file.
7182 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
7183 PT_DATA_ADDR for BFIN targets.
7184 * Makefile.in (SFILES): Add linux-bfin-low.c.
7185 (clean): Remove reg-bfin.c.
7186 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
7187 * README: Mention supported Blackfin targets.
7188
7189 2010-12-23 Mike Frysinger <vapier@gentoo.org>
7190
7191 * .gitignore: New file.
7192
7193 2010-11-16 Mike Frysinger <vapier@gentoo.org>
7194
7195 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
7196
7197 2010-10-22 Jie Zhang <jie@codesourcery.com>
7198
7199 * Makefile.in: Add FLAGS_TO_PASS variable.
7200 (install): Remove dependency of install-only and recursively
7201 invoke make for install-only.
7202
7203 2010-10-04 Doug Evans <dje@google.com>
7204
7205 * Makefile.in (uninstall): Use $(DESTDIR).
7206
7207 2010-09-24 Pedro Alves <pedro@codesourcery.com>
7208
7209 PR gdb/11842
7210
7211 * linux-x86-low.c (compat_siginfo_from_siginfo)
7212 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
7213 si_code is < 0. Check for si_code == SI_TIMER before checking for
7214 si_code < 0.
7215
7216 2010-09-13 Joel Brobecker <brobecker@adacore.com>
7217
7218 * lynx-i386-low.c: New file.
7219 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
7220
7221 2010-09-13 Joel Brobecker <brobecker@adacore.com>
7222
7223 * lynx-low.c (ptrace_request_to_str): Remove handling for
7224 request values that have been removed in LynxOS 5.x.
7225
7226 2010-09-13 Joel Brobecker <brobecker@adacore.com>
7227
7228 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
7229 <ptrace.h>
7230
7231 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
7232
7233 * configure.ac: Add --enable-inprocess-agent option.
7234 * configure: Rebuilt.
7235
7236 2010-09-06 Yao Qi <yao@codesourcery.com>
7237
7238 * linux-low.c (linux_kill): Remove unused variable.
7239 (linux_stabilize_threads): Likewise.
7240 * server.c (start_inferior): Likewise.
7241 (queue_stop_reply_callback): Likewise.
7242 * tracepoint.c (do_action_at_tracepoint): Likewise.
7243
7244 2010-09-06 Yao Qi <yao@codesourcery.com>
7245
7246 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
7247 on return.
7248
7249 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
7250
7251 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
7252
7253 2010-09-06 Pedro Alves <pedro@codesourcery.com>
7254
7255 * Makefile.in (install-only): Replace $IPA_DEPFILES with
7256 "$(IPA_DEPFILES)".
7257
7258 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7259
7260 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
7261 gdbserver/lynx-ppc-low.c: New files.
7262 * Makefile.in (lynx_low_h): New variable.
7263 (lynx-low.o, lynx-ppc-low.o): New rules.
7264 * configure.ac: On LynxOS, link with -lnetinet.
7265 * configure.srv: Add handling of powerpc-*-lynxos* targets.
7266 * configure: regenerate.
7267
7268 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7269
7270 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
7271 * configure.ac: Add check for vasprintf and vsnprintf.
7272 * configure, config.in: Regenerate.
7273 * server.h (vasprintf, vsnprintf): Add conditional declarations.
7274
7275 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7276
7277 * gdbreplay.c: Move include of alloca.h up, next to include of
7278 malloc.h.
7279 * server.h: Add include of malloc.h.
7280 * mem-break.c: Remove include of malloc.h.
7281 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
7282
7283 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7284
7285 * Makefile.in (memmem.o): Build with -Wno-error.
7286
7287 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7288
7289 * utils.c (xsnprintf): Make non-static.
7290 * server.h: Add xsnprintf declaration.
7291 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
7292 replace calls to snprintf by calls to xsnprintf throughout.
7293
7294 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7295
7296 * configure.ac: Add configure check for alloca.
7297 * configure, config.in: Regenerate.
7298 * server.h: Include alloca.h if it exists.
7299 * gdbreplay.c: Include alloca.h if it exists.
7300
7301 2010-08-28 Pedro Alves <pedro@codesourcery.com>
7302
7303 * linux-low.c (__SIGRTMIN): Define if not already defined.
7304 (linux_create_inferior): Check for __ANDROID__ rather than
7305 __SIGRTMIN.
7306 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
7307 are already deferred.
7308 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
7309 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
7310 stopped and already has a pending signal to report.
7311 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
7312 a pending signal to report or is moving out of a jump pad.
7313 (linux_init_signals): Check for __ANDROID__ rather than
7314 __SIGRTMIN.
7315
7316 2010-08-28 Pedro Alves <pedro@codesourcery.com>
7317
7318 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
7319 debug_threads check. Avoid a linear search when not doing debug
7320 output.
7321
7322 2010-08-27 Pedro Alves <pedro@codesourcery.com>
7323
7324 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
7325 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
7326 (struct file_handler) <fd>: Change type to gdb_fildes_t.
7327 (process_event): Change local fd's type to gdb_fildes_t.
7328 (create_file_handler): Adjust prototype.
7329 (delete_file_handler): Adjust prototype.
7330 (handle_file_event): Adjust prototype. Use pfildes.
7331 (create_file_event): Adjsut prototype.
7332 * remote-utils.c (remote_desc, listen_desc): Change type to
7333 gdb_fildes_t.
7334 * server.h: New gdb_fildes_t typedef.
7335 [USE_WIN32API]: Include winsock2.h.
7336 (delete_file_handler, add_file_handler): Adjust prototypes.
7337 (pfildes): Declare.
7338 * utils.c (pfildes): New.
7339
7340 2010-08-27 Pedro Alves <pedro@codesourcery.com>
7341
7342 * configure.ac (build_warnings): Add -Wno-char-subscripts.
7343 * configure: Regenerate.
7344
7345 2010-08-27 Pedro Alves <pedro@codesourcery.com>
7346
7347 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
7348 (linux_done_accessing_memory): ... this.
7349 (linux_target_ops): Adjust.
7350 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
7351 * nto-low.c (nto_target_ops): Adjust comment.
7352 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
7353 * spu-low.c (spu_target_ops): Adjust comment.
7354 * target.h (target_ops): Rename unprepare_to_access_memory field
7355 to done_accessing_memory.
7356 (unprepare_to_access_memory): Rename to ...
7357 (done_accessing_memory): ... this.
7358
7359 2010-08-26 Pedro Alves <pedro@codesourcery.com>
7360
7361 * linux-low.c (linux_prepare_to_access_memory): New.
7362 (linux_unprepare_to_access_memory): New.
7363 (linux_target_ops): Install them.
7364 * server.c (read_memory): Rename to ...
7365 (gdb_read_memory): ... this. Use
7366 prepare_to_access_memory/prepare_to_access_memory.
7367 (write_memory): Rename to ...
7368 (gdb_write_memory): ... this. Use
7369 prepare_to_access_memory/prepare_to_access_memory.
7370 (handle_search_memory_1): Adjust.
7371 (process_serial_event): Adjust.
7372 * target.h (struct target_ops): New fields
7373 prepare_to_access_memory and unprepare_to_access_memory.
7374 (prepare_to_access_memory, unprepare_to_access_memory): New.
7375 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
7376 prepare_to_access_memory/prepare_to_access_memory.
7377 * nto-low.c (nto_target_ops): Adjust.
7378 * spu-low.c (spu_target_ops): Adjust.
7379 * win32-low.c (win32_target_ops): Adjust.
7380
7381 2010-08-26 Pedro Alves <pedro@codesourcery.com>
7382
7383 * Makefile.in (WARN_CFLAGS): Get it from configure.
7384 (WERROR_CFLAGS): New.
7385 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
7386 * configure.ac: Introduce --enable-werror, which adds -Werror to
7387 the compiler command line. Enabled by default. Disable with
7388 --disable-werror. Add -Wdeclaration-after-statement
7389 Wpointer-arith and -Wformat-nonliteral to warning flags.
7390 * configure: Regenerate.
7391
7392 2010-08-26 Pedro Alves <pedro@codesourcery.com>
7393
7394 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
7395
7396 2010-08-26 Pedro Alves <pedro@codesourcery.com>
7397
7398 * gdbreplay.c (remote_error): New.
7399 (gdbchar): New.
7400 (expect): Use gdbchar. Check for error reading from GDB.
7401 Clarify sync error output.
7402 (play): Check for errors writing to GDB.
7403 * linux-low.c (sigchld_handler): Really ignore `write' errors.
7404 * remote-utils.c (getpkt): Check for errors writing to the remote
7405 descriptor.
7406
7407 2010-08-25 Pedro Alves <pedro@codesourcery.com>
7408
7409 * linux-low.c (linux_wait_1): Move non-debugging code out of
7410 `debug_threads' control.
7411
7412 2010-08-25 Pedro Alves <pedro@codesourcery.com>
7413
7414 * linux-low.c (linux_wait_1): Don't set last_status here.
7415 * server.c (push_event, queue_stop_reply_callback): Assert we're
7416 not pushing a TARGET_WAITKIND_IGNORE event.
7417 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
7418 (myresume, handle_target_event): Set the thread's last_resume_kind
7419 and last_status from the target returned status.
7420
7421 2010-08-25 Pedro Alves <pedro@codesourcery.com>
7422
7423 PR threads/10729
7424
7425 * linux-x86-low.c (update_debug_registers_callback): New.
7426 (i386_dr_low_set_addr): Use it.
7427 (i386_dr_low_get_addr): New.
7428 (i386_dr_low_set_control): Use update_debug_registers_callback.
7429 (i386_dr_low_get_control): New.
7430 (i386_dr_low_get_status): Adjust.
7431 * linux-low.c (linux_stop_lwp): New.
7432 * linux-low.h (linux_stop_lwp): Declare.
7433
7434 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
7435 argument instead of a i386_debug_reg_state.
7436 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
7437 a i386_debug_reg_state.
7438 (i386_insert_aligned_watchpoint): Adjust.
7439 (i386_remove_aligned_watchpoint): Adjust.
7440 (i386_low_stopped_data_address): Read the debug registers from the
7441 inferior instead of from the mirrors.
7442 * i386-low.h (struct i386_debug_reg_state): Extend comment.
7443 (i386_dr_low_get_addr): Declare.
7444 (i386_dr_low_get_control): Declare.
7445 (i386_dr_low_get_status): Change prototype.
7446
7447 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
7448 (i386_dr_low_get_addr): New.
7449 (i386_dr_low_get_control): New.
7450 (i386_dr_low_get_status): Adjust prototype. Return
7451 dr_status_mirror.
7452 (i386_initial_stuff): Clear dr_status_mirror and
7453 dr_control_mirror.
7454 (i386_get_thread_context): Adjust.
7455 (i386_set_thread_context): Adjust.
7456 (i386_thread_added): Adjust.
7457
7458 2010-08-24 Pedro Alves <pedro@codesourcery.com>
7459
7460 * linux-low.h (linux_thread_area): Delete declaration.
7461
7462 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
7463
7464 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
7465 after its termination.
7466
7467 2010-08-09 Pedro Alves <pedro@codesourcery.com>
7468
7469 * linux-low.c (gdb_wants_lwp_stopped): Delete.
7470 (gdb_wants_all_stopped): Delete.
7471 (linux_wait_1): Don't call them.
7472 * server.c (handle_v_cont): Tag all threads as want-stopped.
7473 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
7474 stopped as "client-wants-stopped".
7475
7476 2010-07-31 Pedro Alves <pedro@codesourcery.com>
7477
7478 * Makefile.in (signals_h): New.
7479 (server_h): Depend on it.
7480 (server.o): Don't depend on $(signals_def).
7481 (signals.o): Depend on $(signals_def).
7482
7483 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
7484
7485 * Makefile.in (signals_def): New.
7486 (server_h): Append include/gdb/signals.h and signals_def.
7487 (server.o): Append signals_def.
7488
7489 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
7490
7491 * server.c (handle_target_event): Use target_signal_to_host for
7492 resume_info.sig initialization.
7493 * target.h (struct thread_resume) <sig>: New comment.
7494
7495 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
7496
7497 * server.c (handle_query): strcpy() the returned string from paddress()
7498 instead of sprintf().
7499 * utils.c (paddress): Return phex_nz().
7500
7501 2010-07-07 Joel Brobecker <brobecker@adacore.com>
7502
7503 * server.c (handle_v_cont): Call mourn_inferior if process
7504 just exited.
7505 (myresume): Likewise.
7506
7507 2010-07-01 Pedro Alves <pedro@codesourcery.com>
7508
7509 Static tracepoints, and integration with UST.
7510
7511 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
7512 * mem-break.c (uninsert_all_breakpoints)
7513 (reinsert_all_breakpoints): New.
7514 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
7515 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
7516 (gdb_agent_ust_loaded, helper_thread_id)
7517 (gdb_agent_helper_thread_id): New macros.
7518 (struct ipa_sym_addresses): Add addr_ust_loaded,
7519 addr_helper_thread_id, addr_cmd_buf.
7520 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
7521 (in_process_agent_loaded_ust): New.
7522 (write_e_ust_not_loaded): New.
7523 (maybe_write_ipa_ust_not_loaded): New.
7524 (struct collect_static_trace_data_action): New.
7525 (enum tracepoint_type) <static_tracepoint>: New.
7526 (struct tracepoint) <handle>: Mention static tracepoints.
7527 (struct static_tracepoint_ctx): New.
7528 (CMD_BUF_SIZE): New.
7529 (add_tracepoint_action): Handle static tracepoint actions.
7530 (unprobe_marker_at): New.
7531 (clear_installed_tracepoints): Handle static tracepoints.
7532 (cmd_qtdp): Handle static tracepoints.
7533 (probe_marker_at): New.
7534 (cmd_qtstart): Handle static tracepoints.
7535 (response_tracepoint): Handle static tracepoints.
7536 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
7537 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
7538 (get_context_regcache): Handle static tracepoints.
7539 (do_action_at_tracepoint): Handle static tracepoint actions.
7540 (traceframe_find_block_type): Handle static trace data blocks.
7541 (traceframe_read_sdata): New.
7542 (download_tracepoints): Download static tracepoint actions.
7543 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
7544 (GDB_PROBE_NAME): New.
7545 (ust_ops): New.
7546 (GET_UST_SYM): New.
7547 (USTF): New.
7548 (dlsym_ust): New.
7549 (ust_marker_to_static_tracepoint): New.
7550 (gdb_probe): New.
7551 (collect_ust_data_at_tracepoint): New.
7552 (gdb_ust_probe): New.
7553 (UNIX_PATH_MAX, SOCK_DIR): New.
7554 (gdb_ust_connect_sync_socket): New.
7555 (resume_thread, stop_thread): New.
7556 (run_inferior_command): New.
7557 (init_named_socket): New.
7558 (gdb_ust_socket_init): New.
7559 (cstr_to_hexstr): New.
7560 (next_st): New.
7561 (first_marker, next_marker): New.
7562 (response_ust_marker): New.
7563 (cmd_qtfstm, cmd_qtsstm): New.
7564 (unprobe_marker_at, probe_marker_at): New.
7565 (cmd_qtstmat, gdb_ust_thread): New.
7566 (gdb_ust_init): New.
7567 (initialize_tracepoint_ftlib): Call gdb_ust_init.
7568 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
7569 (ST_REGENTRY): New.
7570 (x86_64_st_collect_regmap): New.
7571 (X86_64_NUM_ST_COLLECT_GREGS): New.
7572 (AMD64_RIP_REGNUM): New.
7573 (supply_static_tracepoint_registers): New.
7574 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
7575 (ST_REGENTRY): New.
7576 (i386_st_collect_regmap): New.
7577 (i386_NUM_ST_COLLECT_GREGS): New.
7578 (supply_static_tracepoint_registers): New.
7579 * server.c (handle_query): Handle qXfer:statictrace:read.
7580 <qSupported>: Report support for StaticTracepoints, and
7581 qXfer:statictrace:read features.
7582 * server.h (traceframe_read_sdata)
7583 (supply_static_tracepoint_registers): Declare.
7584 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
7585 (unpack_varlen_hex): Include in IPA build.
7586 * Makefile.in (ustlibs, ustinc): New.
7587 (IPA_OBJS): Add remote-utils-ipa.o.
7588 ($(IPA_LIB)): Link -ldl and -lpthread.
7589 (UST_CFLAGS): New.
7590 (IPAGENT_CFLAGS): Add UST_CFLAGS.
7591 * config.in, configure: Regenerate.
7592
7593 2010-06-20 Ian Lance Taylor <iant@google.com>
7594 Pedro Alves <pedro@codesourcery.com>
7595
7596 * linux-x86-low.c (always_true): Delete.
7597 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
7598 trying to fool the compiler with always_true.
7599
7600 2010-06-20 Pedro Alves <pedro@codesourcery.com>
7601
7602 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
7603 conditions in gdbserver.
7604
7605 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
7606
7607 * spu-low.c (spu_read_memory): Wrap around local store limit.
7608 (spu_write_memory): Likewise.
7609
7610 2010-06-15 Pedro Alves <pedro@codesourcery.com>
7611
7612 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
7613 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
7614 LONGEST uses.
7615 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
7616 uses.
7617 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
7618 uses with LONGEST uses.
7619
7620 2010-06-14 Stan Shebs <stan@codesourcery.com>
7621 Pedro Alves <pedro@codesourcery.com>
7622
7623 Bytecode compiler.
7624
7625 * linux-x86-low.c: Include limits.h.
7626 (add_insns): New.
7627 (always_true): New.
7628 (EMIT_ASM): New.
7629 (EMIT_ASM32): New.
7630 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
7631 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
7632 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
7633 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
7634 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
7635 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
7636 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
7637 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
7638 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
7639 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
7640 (amd64_emit_void_call_2): New.
7641 (amd64_emit_ops): New.
7642 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
7643 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
7644 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
7645 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
7646 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
7647 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
7648 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
7649 (i386_emit_call, i386_emit_reg, i386_emit_pop)
7650 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
7651 (i386_emit_stack_adjust, i386_emit_int_call_1)
7652 (i386_emit_void_call_2): New.
7653 (i386_emit_ops): New.
7654 (x86_emit_ops): New.
7655 (the_low_target): Install x86_emit_ops.
7656 * server.h (struct emit_ops): New.
7657 (get_raw_reg_func_addr): Declare.
7658 (current_insn_ptr, emit_error): Declare.
7659 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
7660 (set_trace_state_variable_value): New defines.
7661 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
7662 addr_get_trace_state_variable_value and
7663 addr_set_trace_state_variable_value.
7664 (symbol_list): New fields for get_raw_reg,
7665 get_trace_state_variable_value and set_trace_state_variable_value.
7666 (condfn): New typedef.
7667 (struct tracepoint): New field `compiled_cond'.
7668 (do_action_at_tracepoint): Clear compiled_cond.
7669 (get_trace_state_variable_value, set_trace_state_variable_value):
7670 Export in the IPA.
7671 (condition_true_at_tracepoint): If there's a compiled condition,
7672 run that.
7673 (current_insn_ptr, emit_error): New globals.
7674 (struct bytecode_address): New.
7675 (get_raw_reg_func_addr): New.
7676 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
7677 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
7678 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
7679 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
7680 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
7681 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
7682 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
7683 (compile_tracepoint_condition, compile_bytecodes): New.
7684 * target.h (emit_ops): Forward declare.
7685 (struct target_ops): New field emit_ops.
7686 (target_emit_ops): New.
7687 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
7688 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
7689 * linux-low.c (linux_emit_ops): New.
7690 (linux_target_ops): Install it.
7691 * linux-low.h (struct linux_target_ops): New field emit_ops.
7692
7693 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
7694
7695 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
7696 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
7697
7698 2010-06-01 Pedro Alves <pedro@codesourcery.com>
7699 Stan Shebs <stan@codesourcery.com>
7700
7701 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
7702 (all): Depend on $(extra_libraries).
7703 (install-only): Install the IPA.
7704 (IPA_OBJS, IPA_LIB): New.
7705 (clean): Remove the IPA lib.
7706 (IPAGENT_CFLAGS): New.
7707 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
7708 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
7709 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
7710 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
7711 * configure.ac: Check for atomic builtins support in the compiler.
7712 (IPA_DEPFILES, extra_libraries): Define.
7713 * configure.srv (ipa_obj): Add description.
7714 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
7715 (i[34567]86-*-linux*): Set ipa_obj.
7716 (x86_64-*-linux*): Set ipa_obj.
7717 * linux-low.c (stabilizing_threads): New.
7718 (supports_fast_tracepoints): New.
7719 (linux_detach): Stabilize threads before detaching.
7720 (handle_tracepoints): Handle internal tracing breakpoints. Assert
7721 the lwp is either not stabilizing, or is moving out of a jump pad.
7722 (linux_fast_tracepoint_collecting): New.
7723 (maybe_move_out_of_jump_pad): New.
7724 (enqueue_one_deferred_signal): New.
7725 (dequeue_one_deferred_signal): New.
7726 (linux_wait_for_event_1): If moving out of a jump pad, defer
7727 pending signals to later.
7728 (linux_stabilize_threads): New.
7729 (linux_wait_1): Check if threads need moving out of jump pads, and
7730 do it if so.
7731 (stuck_in_jump_pad_callback): New.
7732 (move_out_of_jump_pad_callback): New.
7733 (lwp_running): New.
7734 (linux_resume_one_lwp): Handle moving out of jump pads.
7735 (linux_set_resume_request): Dequeue deferred signals.
7736 (need_step_over_p): Also step over fast tracepoint jumps.
7737 (start_step_over): Also uninsert fast tracepoint jumps.
7738 (finish_step_over): Also reinsert fast tracepoint jumps.
7739 (linux_install_fast_tracepoint_jump): New.
7740 (linux_target_ops): Install linux_stabilize_threads and
7741 linux_install_fast_tracepoint_jump_pad.
7742 * linux-low.h (linux_target_ops) <get_thread_area,
7743 install_fast_tracepoint_jump_pad>: New fields.
7744 (struct lwp_info) <collecting_fast_tracepoint,
7745 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
7746 (linux_get_thread_area): Declare.
7747 * linux-x86-low.c (jump_insn): New.
7748 (x86_get_thread_area): New.
7749 (append_insns): New.
7750 (push_opcode): New.
7751 (amd64_install_fast_tracepoint_jump_pad): New.
7752 (i386_install_fast_tracepoint_jump_pad): New.
7753 (x86_install_fast_tracepoint_jump_pad): New.
7754 (the_low_target): Install x86_get_thread_area and
7755 x86_install_fast_tracepoint_jump_pad.
7756 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
7757 (struct fast_tracepoint_jump): New.
7758 (fast_tracepoint_jump_insn): New.
7759 (fast_tracepoint_jump_shadow): New.
7760 (find_fast_tracepoint_jump_at): New.
7761 (fast_tracepoint_jump_here): New.
7762 (delete_fast_tracepoint_jump): New.
7763 (set_fast_tracepoint_jump): New.
7764 (uninsert_fast_tracepoint_jumps_at): New.
7765 (reinsert_fast_tracepoint_jumps_at): New.
7766 (set_breakpoint_at): Use write_inferior_memory.
7767 (uninsert_raw_breakpoint): Use write_inferior_memory.
7768 (check_mem_read): Mask out fast tracepoint jumps.
7769 (check_mem_write): Mask out fast tracepoint jumps.
7770 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
7771 (set_fast_tracepoint_jump): Declare.
7772 (delete_fast_tracepoint_jump)
7773 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
7774 (reinsert_fast_tracepoint_jumps_at): Declare.
7775 * regcache.c: Don't compile many functions when building the
7776 in-process agent library.
7777 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
7778 the register buffer in the heap.
7779 (free_register_cache): If the register buffer isn't owned by the
7780 regcache, don't free it.
7781 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
7782 pre-existing register caches.
7783 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
7784 type.
7785 (convert_ascii_to_int): : Constify `from' parameter type.
7786 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
7787 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
7788 the needed buffer in-place.
7789 (relocate_instruction): New.
7790 * server.c (handle_query) <qSymbols>: If the target supports
7791 tracepoints, give it a chance of looking up symbols. Report
7792 support for fast tracepoints.
7793 (handle_status): Stabilize threads.
7794 (process_serial_event): Adjust.
7795 * server.h (struct fast_tracepoint_jump): Forward declare.
7796 (struct process_info) <fast_tracepoint_jumps>: New field.
7797 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
7798 (decode_X_packet, decode_M_packet): Adjust.
7799 (relocate_instruction): Declare.
7800 (in_process_agent_loaded): Declare.
7801 (tracepoint_look_up_symbols): Declare.
7802 (struct fast_tpoint_collect_status): Declare.
7803 (fast_tracepoint_collecting): Declare.
7804 (force_unlock_trace_buffer): Declare.
7805 (handle_tracepoint_bkpts): Declare.
7806 (initialize_low_tracepoint)
7807 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
7808 * target.h (struct target_ops) <stabilize_threads,
7809 install_fast_tracepoint_jump_pad>: New fields.
7810 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
7811 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
7812 [HAVE_STDINT_H]: Include stdint.h.
7813 (trace_debug_1): Rename to ...
7814 (trace_vdebug): ... this.
7815 (trace_debug): Rename to ...
7816 (trace_debug_1): ... this. Add `level' parameter.
7817 (trace_debug): New.
7818 (ATTR_USED, ATTR_NOINLINE): New.
7819 (IP_AGENT_EXPORT): New.
7820 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
7821 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
7822 (about_to_request_buffer_space, trace_buffer_is_full)
7823 (stopping_tracepoint, expr_eval_result, error_tracepoint)
7824 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
7825 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
7826 (traceframe_write_count, traceframes_created)
7827 (trace_state_variables)
7828 New renaming defines.
7829 (struct ipa_sym_addresses): New.
7830 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
7831 (symbol_list): New.
7832 (ipa_sym_addrs): New.
7833 (all_tracepoint_symbols_looked_up): New.
7834 (in_process_agent_loaded): New.
7835 (write_e_ipa_not_loaded): New.
7836 (maybe_write_ipa_not_loaded): New.
7837 (tracepoint_look_up_symbols): New.
7838 (debug_threads) [IN_PROCESS_AGENT]: New.
7839 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
7840 (UNKNOWN_SIDE_EFFECTS): New.
7841 (stop_tracing): New.
7842 (flush_trace_buffer): New.
7843 (stop_tracing_bkpt): New.
7844 (flush_trace_buffer_bkpt): New.
7845 (read_inferior_integer): New.
7846 (read_inferior_uinteger): New.
7847 (read_inferior_data_pointer): New.
7848 (write_inferior_data_pointer): New.
7849 (write_inferior_integer): New.
7850 (write_inferior_uinteger): New.
7851 (struct collect_static_trace_data_action): Delete.
7852 (enum tracepoint_type): New.
7853 (struct tracepoint) <type>: New field `type'.
7854 <actions_str, step_actions, step_actions_str>: Only include in
7855 GDBserver.
7856 <orig_size, obj_addr_on_target, adjusted_insn_addr>
7857 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
7858 (tracepoints): Use IP_AGENT_EXPORT.
7859 (last_tracepoint): Don't include in the IPA.
7860 (stopping_tracepoint): Use IP_AGENT_EXPORT.
7861 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
7862 (alloced_trace_state_variables): New.
7863 (trace_state_variables): Use IP_AGENT_EXPORT.
7864 (traceframe_t): Delete unused variable.
7865 (circular_trace_buffer): Don't include in the IPA.
7866 (trace_buffer_start): Delete.
7867 (struct trace_buffer_control): New.
7868 (trace_buffer_free): Delete.
7869 (struct ipa_trace_buffer_control): New.
7870 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
7871 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
7872 New.
7873 (trace_buffer_ctrl): New.
7874 (TRACE_BUFFER_CTRL_CURR): New.
7875 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
7876 Reimplement as macros.
7877 (trace_buffer_wrap): Delete.
7878 (traceframe_write_count, traceframe_read_count)
7879 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
7880 (struct tracepoint_hit_ctx) <type>: New field.
7881 (struct fast_tracepoint_ctx): New.
7882 (memory_barrier): New.
7883 (cmpxchg): New.
7884 (record_tracepoint_error): Update atomically in the IPA.
7885 (clear_inferior_trace_buffer): New.
7886 (about_to_request_buffer_space): New.
7887 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
7888 updating the same buffer.
7889 (add_tracepoint): Default the tracepoint's type to trap
7890 tracepoint, and orig_size to -1.
7891 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
7892 internal variables.
7893 (create_trace_state_variable): New parameter `gdb'. Handle it.
7894 (clear_installed_tracepoints): Clear fast tracepoint jumps.
7895 (cmd_qtdp): Handle fast tracepoints.
7896 (cmd_qtdv): Adjust.
7897 (max_jump_pad_size): New.
7898 (gdb_jump_pad_head): New.
7899 (get_jump_space_head): New.
7900 (claim_jump_space): New.
7901 (sort_tracepoints): New.
7902 (MAX_JUMP_SIZE): New.
7903 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
7904 IPA.
7905 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
7906 support. Upload fast traceframes, and delete internal IPA
7907 breakpoints.
7908 (stop_tracing_handler): New.
7909 (flush_trace_buffer_handler): New.
7910 (cmd_qtstop): Upload fast tracepoints.
7911 (response_tracepoint): Handle fast tracepoints.
7912 (tracepoint_finished_step): Upload fast traceframes. Set the
7913 tracepoint hit context's tracepoint type.
7914 (handle_tracepoint_bkpts): New.
7915 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
7916 type. Add comment about fast tracepoints.
7917 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
7918 non-existing action_str field.
7919 (get_context_regcache): Handle fast tracepoints.
7920 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
7921 to the regcache.
7922 (fast_tracepoint_from_jump_pad_address): New.
7923 (fast_tracepoint_from_ipa_tpoint_address): New.
7924 (collecting_t): New.
7925 (force_unlock_trace_buffer): New.
7926 (fast_tracepoint_collecting): New.
7927 (collecting): New.
7928 (gdb_collect): New.
7929 (write_inferior_data_ptr): New.
7930 (target_tp_heap): New.
7931 (target_malloc): New.
7932 (download_agent_expr): New.
7933 (UALIGN): New.
7934 (download_tracepoints): New.
7935 (download_trace_state_variables): New.
7936 (upload_fast_traceframes): New.
7937 (IPA_FIRST_TRACEFRAME): New.
7938 (IPA_NEXT_TRACEFRAME_1): New.
7939 (IPA_NEXT_TRACEFRAME): New.
7940 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
7941 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
7942 (gdb_jump_pad_buffer_end): New.
7943 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
7944 (initialize_tracepoint): Adjust.
7945 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
7946 buffer. Initialize the low module.
7947 * utils.c (PREFIX, TOOLNAME): New.
7948 (malloc_failure): Use PREFIX.
7949 (error): In the IPA, an error causes an exit.
7950 (fatal, warning): Use PREFIX.
7951 (internal_error): Use TOOLNAME.
7952 (NUMCELLS): Increase to 10.
7953 * configure, config.in: Regenerate.
7954
7955 2010-06-01 Pedro Alves <pedro@codesourcery.com>
7956
7957 * server.c (handle_query) <qSupported>: Do two passes over the
7958 qSupported string to avoid nesting strtok.
7959
7960 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7961
7962 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
7963 (CDEPS): New.
7964 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
7965 -Wl,--dynamic-list.
7966 * configure: Regenerate.
7967 * proc-service.list: New.
7968
7969 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7970
7971 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
7972 New comment.
7973
7974 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
7975
7976 * gdbreplay.c (remote_open): Check error return from socket() call by
7977 its equality to -1 not by it being negative.
7978 * remote-utils.c (remote_open): Likewise.
7979
7980 2010-05-23 Pedro Alves <pedro@codesourcery.com>
7981
7982 * config.h: Regenerate.
7983
7984 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
7985
7986 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
7987 doesn't provide PTRACE_GET_THREAD_AREA.
7988
7989 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
7990
7991 * linux-m68k-low.c: Include <asm/ptrace.h>
7992 (ps_get_thread_area): Implement.
7993
7994 2010-05-03 Doug Evans <dje@google.com>
7995
7996 * event-loop.c (struct callback_event): New struct.
7997 (callback_list): New global.
7998 (append_callback_event, delete_callback_event): New functions.
7999 (process_callback): New function.
8000 (start_event_loop): Call it.
8001 * remote-utils.c (NOT_SCHEDULED): Define.
8002 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
8003 moved out of readchar.
8004 (readchar): Rewrite. Call reschedule before returning.
8005 (reset_readchar): New function.
8006 (remote_close): Call it.
8007 (process_remaining, reschedule): New functions.
8008 * server.h (callback_handler_func): New typedef.
8009 (append_callback_event, delete_callback_event): Declare.
8010
8011 2010-05-03 Pedro Alves <pedro@codesourcery.com>
8012
8013 * proc-service.c (ps_pglobal_lookup): Use
8014 thread_db_look_up_one_symbol.
8015 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
8016 parameter. Use it instead of all_symbols_looked_up.
8017 * server.h (struct process_info) <all_symbols_looked_up>: Delete
8018 field.
8019 (all_symbols_looked_up): Don't declare.
8020 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
8021 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
8022 field.
8023 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
8024 Set all_symbols_looked_up here.
8025 (thread_db_look_up_one_symbol): New.
8026 (thread_db_get_tls_address): Adjust.
8027 (thread_db_load_search, try_thread_db_load_1): Always allocate the
8028 thread_db object on the heap, and tentatively set it in the
8029 process structure.
8030 (thread_db_init): Don't set all_symbols_looked_up here.
8031 * linux-low.h (thread_db_look_up_one_symbol): Declare.
8032
8033 2010-05-03 Pedro Alves <pedro@codesourcery.com>
8034
8035 * linux-low.c (linux_kill, linux_detach): Adjust.
8036 (status_pending_p_callback): Remove redundant statement. Check
8037 for !TARGET_WAITIKIND_IGNORE, instead of
8038 TARGET_WAITKIND_STOPPED.
8039 (handle_tracepoints): Make sure LWP is locked. Adjust.
8040 (linux_wait_for_event_1): Adjust.
8041 (linux_cancel_breakpoints): New.
8042 (unsuspend_one_lwp): New.
8043 (unsuspend_all_lwps): New.
8044 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
8045 (send_sigstop_callback): Change return type to int, add new
8046 `except' parameter and handle it.
8047 (suspend_and_send_sigstop_callback): New.
8048 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
8049 pass them down. If SUSPEND, also increment the lwp's suspend
8050 count.
8051 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
8052 (need_step_over_p): Don't consider suspended LWPs.
8053 (start_step_over): Adjust.
8054 (proceed_one_lwp): Change return type to int, add new `except'
8055 parameter and handle it.
8056 (unsuspend_and_proceed_one_lwp): New.
8057 (proceed_all_lwps): Use find_inferior instead of
8058 for_each_inferior.
8059 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
8060 also decrement the suspend count of LWPs. Pass `except' down,
8061 instead of hacking its suspend count.
8062 (linux_pause_all): Add `freeze' parameter. Adjust.
8063 (linux_unpause_all): New.
8064 (linux_target_ops): Install linux_unpause_all.
8065 * server.c (handle_status): Adjust.
8066 * target.h (struct target_ops): New fields `unpause_all' and
8067 `cancel_breakpoints'. Add new parameter to `pause_all'.
8068 (pause_all): Add new `freeze' parameter.
8069 (unpause_all): New.
8070 (cancel_breakpoints): New.
8071 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
8072 cancel breakpoints.
8073 (cmd_qtstart): Pause threads.
8074 (stop_tracing): Pause threads, and cancel breakpoints.
8075 * win32-low.c (win32_target_ops): Adjust.
8076
8077 2010-05-03 Pedro Alves <pedro@codesourcery.com>
8078
8079 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
8080 the inferior right away from here...
8081 (linux_wait_1): ... to here, and adjust to check the thread's
8082 last_resume_kind instead of the lwp's step or stop_expected flags.
8083
8084 2010-05-02 Pedro Alves <pedro@codesourcery.com>
8085
8086 * README: Use consistent `GDB' and `GDBserver' spellings.
8087
8088 2010-05-02 Pedro Alves <pedro@codesourcery.com>
8089
8090 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
8091 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
8092 (linux_detach_one_lwp): Assume the lwp is stopped.
8093 (any_thread_of): Delete.
8094 (linux_detach): Stop all lwps here. Don't blindly delete all
8095 breakpoints.
8096 (delete_lwp_callback): New.
8097 (linux_mourn): Delete all lwps of the process that is gone.
8098 (linux_wait_1): Don't delete the last lwp of the process here.
8099 * mem-break.h (mark_breakpoints_out): Declare.
8100 * mem-break.c (mark_breakpoints_out): New.
8101 (free_all_breakpoints): Use it.
8102 * server.c (handle_target_event): If the process is gone, mark
8103 breakpoints out.
8104 * thread-db.c (struct thread_db) <create_bp>: New field.
8105 (thread_db_enable_reporting): Fix prototype. Store a thread event
8106 breakpoint reference in the thread_db struct.
8107 (thread_db_load_search): Clear the thread_db object.
8108 (try_thread_db_load_1): Ditto.
8109 (switch_to_process): New.
8110 (disable_thread_event_reporting): Use it.
8111 (remove_thread_event_breakpoints): New.
8112 (thread_db_detach, thread_db_mourn): Use it.
8113
8114 2010-05-01 Pedro Alves <pedro@codesourcery.com>
8115
8116 * linux-low.c (linux_enable_event_reporting): New.
8117 (linux_wait_for_event_1, handle_extended_wait): Use it.
8118
8119 2010-04-30 Pedro Alves <pedro@codesourcery.com>
8120
8121 * linux-low.c (linux_kill_one_lwp, linux_kill)
8122 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
8123 (send_sigstop): Take an lwp_info as parameter instead. Queue a
8124 SIGSTOP even if the LWP is stopped.
8125 (send_sigstop_callback): New.
8126 (stop_all_lwps): Use send_sigstop_callback instead.
8127 (linux_resume_one_thread): Adjust.
8128 (proceed_one_lwp): Still proceed an LWP that the client has
8129 requested to stop, if we haven't reported it as stopped yet. Make
8130 sure that LWPs the client want stopped, have a pending SIGSTOP.
8131
8132 2010-04-26 Doug Evans <dje@google.com>
8133
8134 * server.c (handle_general_set): Make static.
8135
8136 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
8137 Print received char after testing for error/eof instead of before.
8138 (input_interrupt): Tweak comment.
8139
8140 2010-04-23 Doug Evans <dje@google.com>
8141
8142 * server.c (start_inferior): Print inferior argv if --debug.
8143
8144 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
8145
8146 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
8147 * nto-x86-low.c: Include server.h
8148
8149 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
8150
8151 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
8152 be consistent with other sources of this directory.
8153 (init_registers_amd64): Correct name of source file of this function
8154 in the comment.
8155
8156 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8157
8158 * configure.srv (x86_64-*-mingw*): New configuration for Windows
8159 64-bit executables.
8160
8161 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8162
8163 * win32-i386-low.c: Add 64-bit support.
8164 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
8165 (init_registers_amd64): Declare.
8166 (mappings): Add 64-bit version of array.
8167 (init_windows_x86): New function.
8168 (the_low_target): Change init_arch field to init_windows_x86.
8169
8170 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8171
8172 * win32-low.c: Adapt to support also 64-bit architecture.
8173 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
8174 (get_image_name): Use SIZE_T type for local variable `done'.
8175 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
8176 (toolhelp_get_dll_name): Idem.
8177 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
8178 Use uintptr_t typecast to avoid warning.
8179 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
8180 (handle_exception): Use phex_nz to avoid warning.
8181 (win32_wait): Remove unused local variable `process'.
8182
8183 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8184
8185 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
8186 `amd64-avx.o'.
8187
8188 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
8189
8190 * configure.ac: Use `ws2_32' library for srv_mingw.
8191 * configure: Regenerate.
8192 * gdbreplay.c: Include winsock2.h instead of winsock.h.
8193 * remote-utils.c: Likewise.
8194
8195 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
8196
8197 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
8198 if __x86_64__ is defined.
8199
8200 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
8201
8202 * configure: Regenerate.
8203
8204 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
8205
8206 * server.c (handle_query): Handle 'qGetTIBAddr' query.
8207 * target.h (target_ops): New get_tib_address field.
8208 * win32-low.h (win32_thread_info): Add thread_local_base field.
8209 * win32-low.c (child_add_thread): Add tlb argument.
8210 Set thread_local_base field to TLB.
8211 (get_child_debug_event): Adapt to child_add_thread change.
8212 (win32_get_tib_address): New function.
8213 (win32_target_ops): Set get_tib_address field to
8214 win32_get_tib_address.
8215 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
8216
8217 2010-04-12 Pedro Alves <pedro@codesourcery.com>
8218
8219 * linux-low.c (linux_mourn): Also remove the process.
8220 * server.c (handle_target_event): Don't remove the process here.
8221 * nto-low.c (nto_mourn): New.
8222 (nto_target_ops): Install it.
8223 * spu-low.c (spu_mourn): New.
8224 (spu_target_ops): Install it.
8225 * win32-low.c (win32_mourn): New.
8226 (win32_target_ops): Install it.
8227
8228 2010-04-12 Pedro Alves <pedro@codesourcery.com>
8229
8230 * server.h (buffer_xml_printf): Remove redundant `;'.
8231
8232 2010-04-12 Pedro Alves <pedro@codesourcery.com>
8233
8234 * regcache.c (set_register_cache): Invalidate regcaches before
8235 changing the register cache layout.
8236 (regcache_invalidate_one): Allow a NULL regcache.
8237 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
8238 regcaches before changing the register cache layout or the target
8239 regsets.
8240
8241 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
8242
8243 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
8244 variable warning on Linux/x86-64.
8245
8246 2010-04-11 Pedro Alves <pedro@codesourcery.com>
8247
8248 GDBserver disconnected tracing support.
8249
8250 * linux-low.c (linux_remove_process): Delete.
8251 (add_lwp): Don't set last_resume_kind here.
8252 (linux_kill): Use `mourn'.
8253 (linux_detach): Use `thread_db_detach', and `mourn'.
8254 (linux_mourn): New.
8255 (linux_attach_lwp_1): Adjust comment.
8256 (linux_attach): last_resume_kind moved the thread_info; adjust.
8257 (status_pending_p_callback): Adjust.
8258 (linux_wait_for_event_1): Adjust.
8259 (count_events_callback, select_singlestep_lwp_callback)
8260 (select_event_lwp_callback, cancel_breakpoints_callback)
8261 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
8262 (proceed_one_lwp): Adjust.
8263 (linux_async): Add debug output.
8264 (linux_thread_stopped): New.
8265 (linux_pause_all): New.
8266 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
8267 linux_pause_all.
8268 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
8269 (thread_db_free): Delete declaration.
8270 (thread_db_detach, thread_db_mourn): Declare.
8271 * thread-db.c (thread_db_init): Use thread_db_mourn.
8272 (thread_db_free): Delete, split in two.
8273 (disable_thread_event_reporting): New.
8274 (thread_db_detach): New.
8275 (thread_db_mourn): New.
8276
8277 * server.h (struct thread_info) <last_resume_kind>: New field.
8278 <attached>: Add comment.
8279 <gdb_detached>: New field.
8280 (handler_func): Change return type to int.
8281 (handle_serial_event, handle_target_event): Ditto.
8282 (gdb_connected): Declare.
8283 (tracing): Delete.
8284 (disconnected_tracing): Declare.
8285 (stop_tracing): Declare.
8286
8287 * server.c (handle_query) <qSupported>: Report support for
8288 disconnected tracing.
8289 (queue_stop_reply_callback): Account for running threads.
8290 (gdb_wants_thread_stopped): New.
8291 (gdb_wants_all_threads_stopped): New.
8292 (gdb_reattached_process): New.
8293 (handle_status): Clear the `gdb_detached' flag of all processes.
8294 In all-stop, stop all threads.
8295 (main): Be sure to leave tfind mode. Handle disconnected tracing.
8296 (process_serial_event): If the remote connection breaks, or if an
8297 exit was forced with "monitor exit", force an event loop exit.
8298 Handle disconnected tracing on detach.
8299 (handle_serial_event): Adjust.
8300 (handle_target_event): If GDB isn't connected, forward events back
8301 to the inferior, unless the last process exited, in which case,
8302 exit gdbserver. Adjust interface.
8303
8304 * remote-utils.c (remote_open): Don't block in accept. Instead
8305 register an event loop source on the listen socket file
8306 descriptor. Refactor bits into ...
8307 (listen_desc): ... this new global.
8308 (gdb_connected): ... this new function.
8309 (enable_async_notification): ... this new function.
8310 (handle_accept_event): ... this new function.
8311 (remote_close): Clear remote_desc.
8312
8313 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
8314
8315 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
8316 New fields.
8317 (mourn_inferior): Define.
8318 (target_process_qsupported): Avoid the dangling else problem.
8319 (thread_stopped): Define.
8320 (pause_all): Define.
8321 (target_waitstatus_to_string): Declare.
8322 * target.c (target_waitstatus_to_string): New.
8323
8324 * tracepoint.c (tracing): Make extern.
8325 (disconnected_tracing): New.
8326 (stop_tracing): Make extern. Handle tracing stops due to GDB
8327 disconnecting.
8328 (cmd_qtdisconnected): New.
8329 (cmd_qtstatus): Report disconnected tracing status in trace reply.
8330 (handle_tracepoint_general_set): Handle QTDisconnected.
8331
8332 * event-loop.c (event_handler_func): Change return type to int.
8333 (process_event): Bail out if the event handler wants the event
8334 loop to stop.
8335 (handle_file_event): Ditto.
8336 (start_event_loop): Bail out if the event handler wants the event
8337 loop to stop.
8338
8339 * nto-low.c (nto_target_ops): Adjust.
8340 * spu-low.c (spu_wait): Don't remove the process here.
8341 (spu_target_ops): Adjust.
8342 * win32-low.c (win32_wait): Don't remove the process here.
8343 (win32_target_ops): Adjust.
8344
8345 2010-04-11 Pedro Alves <pedro@codesourcery.com>
8346
8347 * regcache.c (realloc_register_cache): Invalidate inferior's
8348 regcache before recreating it.
8349
8350 2010-04-09 Pedro Alves <pedro@codesourcery.com>
8351
8352 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
8353
8354 2010-04-09 Stan Shebs <stan@codesourcery.com>
8355 Pedro Alves <pedro@codesourcery.com>
8356
8357 * server.h (LONGEST): New.
8358 (struct thread_info) <while_stepping>: New field.
8359 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
8360 Declare.
8361 (initialize_tracepoint, handle_tracepoint_general_set)
8362 (handle_tracepoint_query, tracepoint_finished_step)
8363 (tracepoint_was_hit, release_while_stepping_state_list):
8364 (current_traceframe): Declare.
8365 * server.c (handle_general_set): Handle tracepoint packets.
8366 (read_memory): New.
8367 (write_memory): New.
8368 (handle_search_memory_1): Use read_memory.
8369 (handle_query): Report support for conditional tracepoints, trace
8370 state variables, and tracepoint sources. Handle tracepoint
8371 queries.
8372 (main): Initialize the tracepoints module.
8373 (process_serial_event): Handle traceframe reads/writes.
8374
8375 * linux-low.c (handle_tracepoints): New.
8376 (linux_wait_1): Call it.
8377 (linux_resume_one_lwp): Handle while-stepping.
8378 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
8379 (linux_target_ops): Install them.
8380 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
8381 New field.
8382 * linux-x86-low.c (x86_supports_tracepoints): New.
8383 (the_low_target). Install it.
8384
8385 * mem-break.h (delete_breakpoint): Declare.
8386 * mem-break.c (delete_breakpoint): Make external.
8387
8388 * target.h (struct target_ops): Add `supports_tracepoints',
8389 `read_pc', and `write_pc' fields.
8390 (target_supports_tracepoints): Define.
8391 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
8392 (phex_nz): New.
8393
8394 * regcache.h (struct regcache) <registers_owned>: New field.
8395 (init_register_cache, regcache_cpy): Declare.
8396 (regcache_read_pc, regcache_write_pc): Declare.
8397 (register_cache_size): Declare.
8398 (supply_regblock): Declare.
8399 * regcache.c (init_register_cache): New.
8400 (new_register_cache): Use it.
8401 (regcache_cpy): New.
8402 (register_cache_size): New.
8403 (supply_regblock): New.
8404 (regcache_read_pc, regcache_write_pc): New.
8405
8406 * tracepoint.c: New.
8407
8408 * Makefile.in (OBS): Add tracepoint.o.
8409 (tracepoint.o): New rule.
8410
8411 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
8412
8413 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
8414 (i386-mmx.o): New.
8415 (i386-mmx.c): Likewise.
8416 (i386-mmx-linux.o): Likewise.
8417 (i386-mmx-linux.c): Likewise.
8418
8419 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
8420 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
8421 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
8422 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
8423
8424 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
8425 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
8426 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
8427
8428 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
8429
8430 * Makefile.in (clean): Updated.
8431 (i386-avx.o): New.
8432 (i386-avx.c): Likewise.
8433 (i386-avx-linux.o): Likewise.
8434 (i386-avx-linux.c): Likewise.
8435 (amd64-avx.o): Likewise.
8436 (amd64-avx.c): Likewise.
8437 (amd64-avx-linux.o): Likewise.
8438 (amd64-avx-linux.c): Likewise.
8439
8440 * configure.srv (srv_i386_regobj): Add i386-avx.o.
8441 (srv_i386_linux_regobj): Add i386-avx-linux.o.
8442 (srv_amd64_regobj): Add amd64-avx.o.
8443 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
8444 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
8445 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
8446 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
8447 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
8448 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
8449 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
8450
8451 * i387-fp.c: Include "i386-xstate.h".
8452 (i387_xsave): New.
8453 (i387_cache_to_xsave): Likewise.
8454 (i387_xsave_to_cache): Likewise.
8455 (x86_xcr0): Likewise.
8456
8457 * i387-fp.h (i387_cache_to_xsave): Likewise.
8458 (i387_xsave_to_cache): Likewise.
8459 (x86_xcr0): Likewise.
8460
8461 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
8462 * linux-crisv32-low.c (target_regsets): Likewise.
8463 * linux-m68k-low.c (target_regsets): Likewise.
8464 * linux-mips-low.c (target_regsets): Likewise.
8465 * linux-ppc-low.c (target_regsets): Likewise.
8466 * linux-s390-low.c (target_regsets): Likewise.
8467 * linux-sh-low.c (target_regsets): Likewise.
8468 * linux-sparc-low.c (target_regsets): Likewise.
8469 * linux-xtensa-low.c (target_regsets): Likewise.
8470
8471 * linux-low.c: Include <sys/uio.h>.
8472 (regsets_fetch_inferior_registers): Support nt_type.
8473 (regsets_store_inferior_registers): Likewise.
8474 (linux_process_qsupported): New.
8475 (linux_target_ops): Add linux_process_qsupported.
8476
8477 * linux-low.h (regset_info): Add nt_type.
8478 (linux_target_ops): Add process_qsupported.
8479
8480 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
8481 and <sys/uio.h>.
8482 (init_registers_i386_avx_linux): New.
8483 (init_registers_amd64_avx_linux): Likewise.
8484 (xmltarget_i386_linux_no_xml): Likewise.
8485 (xmltarget_amd64_linux_no_xml): Likewise.
8486 (PTRACE_GETREGSET): Likewise.
8487 (PTRACE_SETREGSET): Likewise.
8488 (x86_fill_xstateregset): Likewise.
8489 (x86_store_xstateregset): Likewise.
8490 (use_xml): Likewise.
8491 (x86_linux_update_xmltarget): Likewise.
8492 (x86_linux_process_qsupported): Likewise.
8493 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
8494 (x86_arch_setup): Don't call init_registers_amd64_linux nor
8495 init_registers_i386_linux here. Call
8496 x86_linux_update_xmltarget.
8497 (the_low_target): Add x86_linux_process_qsupported.
8498
8499 * server.c (handle_query): Call target_process_qsupported.
8500
8501 * target.h (target_ops): Add process_qsupported.
8502 (target_process_qsupported): New.
8503
8504 2010-04-03 Pedro Alves <pedro@codesourcery.com>
8505
8506 * inferiors.c (add_thread): Set last_status kind to
8507 TARGET_WAITKIND_IGNORE.
8508 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
8509 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
8510 (linux_wait_1): Move `thread' local definition to block that uses
8511 it. Don't NULL initialize `event_child'.
8512 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
8513 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
8514 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
8515
8516 2010-04-01 Pedro Alves <pedro@codesourcery.com>
8517
8518 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
8519 an extended waitstatus, or by a watchpoint.
8520 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
8521 thread was stepping or has been stopped by a watchpoint.
8522
8523 2010-04-01 Pedro Alves <pedro@codesourcery.com>
8524
8525 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
8526 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
8527 of another, then delete the previous, and validate all
8528 breakpoints.
8529 (validate_inserted_breakpoint): New.
8530 (delete_disabled_breakpoints): New.
8531 (validate_breakpoints): New.
8532 (check_mem_read): Validate breakpoints before trusting their
8533 shadow. Delete disabled breakpoints.
8534 (check_mem_write): Validate breakpoints before trusting they
8535 should be inserted. Delete disabled breakpoints.
8536 * mem-break.h (validate_breakpoints):
8537 * server.c (handle_query): Validate breakpoints when we see a
8538 qSymbol query.
8539
8540 2010-04-01 Pedro Alves <pedro@codesourcery.com>
8541
8542 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
8543 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
8544 if we could tell there's a GDB breakpoint at stop_pc.
8545 (need_step_over_p): Don't do a step over if we find a GDB
8546 breakpoint at the resume PC.
8547
8548 * mem-break.c (struct raw_breakpoint): New.
8549 (enum bkpt_type): New type `gdb_breakpoint'.
8550 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
8551 fields. New field `raw'.
8552 (find_raw_breakpoint_at): New.
8553 (set_raw_breakpoint_at): Handle refcounting. Create a raw
8554 breakpoint instead.
8555 (set_breakpoint_at): Adjust.
8556 (delete_raw_breakpoint): New.
8557 (release_breakpoint): New.
8558 (delete_breakpoint): Rename to...
8559 (delete_breakpoint_1): ... this. Add proc parameter. Use
8560 release_breakpoint. Return ENOENT.
8561 (delete_breakpoint): Reimplement.
8562 (find_breakpoint_at): Delete.
8563 (find_gdb_breakpoint_at): New.
8564 (delete_breakpoint_at): Delete.
8565 (set_gdb_breakpoint_at): New.
8566 (delete_gdb_breakpoint_at): New.
8567 (gdb_breakpoint_here): New.
8568 (set_reinsert_breakpoint): Use release_breakpoint.
8569 (uninsert_breakpoint): Rename to ...
8570 (uninsert_raw_breakpoint): ... this.
8571 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
8572 (reinsert_raw_breakpoint): Change parameter type to
8573 raw_breakpoint.
8574 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
8575 instead.
8576 (check_breakpoints): Adjust. Use release_breakpoint.
8577 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
8578 (breakpoint_inserted_here): Ditto.
8579 (check_mem_read): Adjust to iterate over raw breakpoints instead.
8580 Don't trust the breakpoint's shadow if it is not inserted.
8581 (check_mem_write): Adjust to iterate over raw breakpoints instead.
8582 (delete_all_breakpoints): Adjust.
8583 (free_all_breakpoints): Mark all breakpoints as uninserted, and
8584 use delete_breakpoint_1.
8585
8586 * mem-break.h (breakpoints_supported): Delete declaration.
8587 (set_gdb_breakpoint_at): Declare.
8588 (gdb_breakpoint_here): Declare.
8589 (delete_breakpoint_at): Delete.
8590 (delete_gdb_breakpoint_at): Declare.
8591
8592 * server.h (struct raw_breakpoint): Forward declare.
8593 (struct process_info): New field `raw_breakpoints'.
8594
8595 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
8596 breakpoints.
8597
8598 2010-03-24 Pedro Alves <pedro@codesourcery.com>
8599
8600 * linux-low.c (status_pending_p_callback): Fix comment.
8601 (linux_wait_for_event_1): Move most of the internal breakpoint
8602 handling from here...
8603 (linux_wait_1): ... to here.
8604 (count_events_callback): New.
8605 (select_singlestep_lwp_callback): New.
8606 (select_event_lwp_callback): New.
8607 (cancel_breakpoints_callback): New.
8608 (select_event_lwp): New.
8609 (linux_wait_1): Simplify internal breakpoint handling. Give equal
8610 priority to all LWPs that have had events that should be reported
8611 to the client. Cancel breakpoints when about to reporting the
8612 event to the client, not while stopping lwps. No longer cancel
8613 finished single-steps here.
8614 (cancel_finished_single_step): Delete.
8615 (cancel_finished_single_steps): Delete.
8616
8617 2010-03-24 Pedro Alves <pedro@codesourcery.com>
8618
8619 * mem-break.c (enum bkpt_type): New.
8620 (struct breakpoint): New field `type'.
8621 (set_breakpoint_at): Change return type to struct breakpoint
8622 pointer. Set type to `other_breakpoint' by default.
8623 (delete_breakpoint): Rewrite, supporting more than one breakpoint
8624 in the breakpoint list.
8625 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
8626 (reinsert_breakpoint): Rename to ...
8627 (reinsert_raw_breakpoint): ... this.
8628 (reinsert_breakpoints_at): Adjust.
8629 * mem-break.h (struct breakpoint): Declare.
8630 (set_breakpoint_at): Change return type to struct breakpoint
8631 pointer.
8632
8633 2010-03-24 Pedro Alves <pedro@codesourcery.com>
8634
8635 * server.c (handle_query): Assign, not compare.
8636
8637 2010-03-24 Pedro Alves <pedro@codesourcery.com>
8638
8639 Teach linux gdbserver to step-over-breakpoints.
8640
8641 * linux-low.c (can_hardware_single_step): New.
8642 (supports_breakpoints): New.
8643 (handle_extended_wait): If stopping threads, read the stop pc of
8644 the new cloned LWP.
8645 (get_pc): New.
8646 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
8647 low target doesn't support retrieving the PC.
8648 (add_lwp): Set last_resume_kind to resume_continue.
8649 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
8650 (linux_attach): Don't clear stop_expected. Set the lwp's
8651 last_resume_kind to resume_stop.
8652 (linux_detach_one_lwp): Don't check for removed breakpoints.
8653 (check_removed_breakpoint): Delete.
8654 (status_pending_p): Rename to ...
8655 (status_pending_p_callback): ... this. Don't check for removed
8656 breakpoints. Don't consider threads that are stopped from GDB's
8657 perspective.
8658 (linux_wait_for_lwp): Always read the stop_pc here.
8659 (cancel_breakpoint): New.
8660 (step_over_bkpt): New global.
8661 (linux_wait_for_event_1): Implement stepping over breakpoints.
8662 (gdb_wants_lwp_stopped): New.
8663 (gdb_wants_all_stopped): New.
8664 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
8665 single-step traps here. Store the thread's last reported target
8666 wait status.
8667 (send_sigstop): Don't clear stop_expected. Always set it,
8668 instead.
8669 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
8670 (cancel_finished_single_step): New.
8671 (cancel_finished_single_steps): New.
8672 (wait_for_sigstop): Don't cancel finished single-step traps here.
8673 (linux_resume_one_lwp): Don't check for removed breakpoints.
8674 Don't set `step' on non-hardware step archs.
8675 (linux_set_resume_request): Ignore resume_stop requests if already
8676 stopping or stopped. Set the lwp's last_resume_kind.
8677 (resume_status_pending_p): Don't check for removed breakpoints.
8678 (need_step_over_p): New.
8679 (start_step_over): New.
8680 (finish_step_over): New.
8681 (linux_resume_one_thread): Always queue a sigstop for resume_stop
8682 requests. Clear the thread's last reported target waitstatus.
8683 Don't use the `suspended' flag. Don't consider pending breakpoints.
8684 (linux_resume): Start a step-over if necessary.
8685 (proceed_one_lwp): New.
8686 (proceed_all_lwps): New.
8687 (unstop_all_lwps): New.
8688 * linux-low.h (struct lwp_info): Rewrite comment for the
8689 `suspended' flag. Add the `stop_pc' field. Delete the
8690 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
8691 Add `'last_resume_kind' and `need_step_over' fields.
8692 * inferiors.c (struct thread_info): Delete, moved elsewhere.
8693 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
8694 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
8695 (set_raw_breakpoint_at): New.
8696 (set_breakpoint_at): Rewrite to use it.
8697 (reinsert_breakpoint_handler): Delete.
8698 (set_reinsert_breakpoint): New.
8699 (reinsert_breakpoint_by_bp): Delete.
8700 (delete_reinsert_breakpoints): New.
8701 (uninsert_breakpoint): Rewrite.
8702 (uninsert_breakpoints_at): New.
8703 (reinsert_breakpoint): Rewrite.
8704 (reinsert_breakpoints_at): New.
8705 (check_breakpoints): Rewrite.
8706 (breakpoint_here): New.
8707 (breakpoint_inserted_here): New.
8708 (check_mem_read): Adjust.
8709 * mem-break.h (breakpoints_supported, breakpoint_here)
8710 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
8711 (reinsert_breakpoint_by_bp): Delete declaration.
8712 (delete_reinsert_breakpoints): Declare.
8713 (reinsert_breakpoint): Delete declaration.
8714 (reinsert_breakpoints_at): Declare.
8715 (uninsert_breakpoint): Delete declaration.
8716 (uninsert_breakpoints_at): Declare.
8717 (check_breakpoints): Adjust prototype.
8718 * server.h: Adjust include order.
8719 (struct thread_info): Declare here. Add a `last_status' field.
8720
8721 2010-03-23 Michael Snyder <msnyder@vmware.com>
8722
8723 * server.c (crc32): New function.
8724 (handle_query): Add handling for 'qCRC:' request.
8725
8726 2010-03-23 Pedro Alves <pedro@codesourcery.com>
8727
8728 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
8729 lwp had been stopped by a watchpoint.
8730
8731 2010-03-16 Pedro Alves <pedro@codesourcery.com>
8732
8733 * server.h (internal_error): Declare.
8734 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
8735 * utils.c (internal_error): New function.
8736
8737 2010-03-15 Andreas Schwab <schwab@redhat.com>
8738
8739 * configure.srv: Fix typo setting srv_regobj.
8740
8741 2010-03-15 Pedro Alves <pedro@codesourcery.com>
8742
8743 * linux-low.c (fetch_register): Avoid passing a non string literal
8744 format to `error'.
8745 (usr_store_inferior_registers): Ditto.
8746
8747 2010-03-14 Pedro Alves <pedro@codesourcery.com>
8748
8749 * linux-low.c (linux_write_memory): Bail out early if peeking
8750 memory failed.
8751
8752 2010-03-14 Pedro Alves <pedro@codesourcery.com>
8753
8754 * linux-low.h (struct lwp_info): New fields
8755 `stopped_by_watchpoint' and `stopped_data_address'.
8756 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
8757 here, and cache them in the lwp object.
8758 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
8759 directly.
8760 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
8761 field.
8762 (linux_stopped_by_watchpoint): Rewrite.
8763 (linux_stopped_data_address): Rewrite.
8764
8765 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
8766
8767 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
8768 switching the current inferior, not before.
8769
8770 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
8771
8772 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
8773 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
8774 i386-linux.c and amd64-linux.c.
8775 (reg-i386.o): Removed.
8776 (reg-i386.c): Likewise.
8777 (reg-i386-linux.o): Likewise.
8778 (reg-i386-linux.c): Likewise.
8779 (reg-x86-64.o): Likewise.
8780 (reg-x86-64.c): Likewise.
8781 (reg-x86-64-linux.o): Likewise.
8782 (reg-x86-64-linux.c): Likewise.
8783 (i386.o): New.
8784 (i386.c): Likewise.
8785 (i386-linux.o): Likewise.
8786 (i386-linux.c): Likewise.
8787 (amd64.o): Likewise.
8788 (amd64.c): Likewise.
8789 (amd64-linux.o): Likewise.
8790 (amd64-linux.c): Likewise.
8791
8792 * configure.srv (srv_i386_regobj): New.
8793 (srv_i386_linux_regobj): Likewise.
8794 (srv_amd64_regobj): Likewise.
8795 (srv_amd64_linux_regobj): Likewise.
8796 (srv_i386_32bit_xmlfiles): Likewise.
8797 (srv_i386_64bit_xmlfiles): Likewise.
8798 (srv_i386_xmlfiles): Likewise.
8799 (srv_amd64_xmlfiles): Likewise.
8800 (srv_i386_linux_xmlfiles): Likewise.
8801 (srv_amd64_linux_xmlfiles): Likewise.
8802 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
8803 srv_xmlfiles to $srv_i386_xmlfiles.
8804 (i[34567]86-*-mingw32ce*): Likewise.
8805 (i[34567]86-*-mingw*): Likewise.
8806 (i[34567]86-*-nto*): Likewise.
8807 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
8808 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
8809 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
8810 (x86_64-*-linux*): Likewise.
8811
8812 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
8813 (init_registers_amd64_linux): New.
8814 (x86_arch_setup): Replace init_registers_x86_64_linux with
8815 init_registers_amd64_linux.
8816
8817 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
8818
8819 * configure.ac: Check for libdl. If it is not available link against
8820 static libthread_db.
8821 * configure: Regenerate.
8822
8823 2010-02-22 Pedro Alves <pedro@codesourcery.com>
8824
8825 PR9605
8826
8827 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
8828 handing a read watchpoint.
8829 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
8830
8831 2010-02-12 Doug Evans <dje@google.com>
8832
8833 * linux-low.c (linux_supports_tracefork_flag): Document.
8834 (linux_look_up_symbols): Add comment.
8835
8836 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
8837
8838 * regcache.c (supply_register): Clear regcache if buf is NULL.
8839
8840 2010-02-02 Nicolas Roche <roche@sourceware.org>
8841 Joel Brobecker <brobecker@adacore.com>
8842
8843 * inferiors.c (find_inferior): Add function documentation.
8844 (unloaded_dll): Handle the case where the unloaded dll has not
8845 been previously registered in the dll list.
8846
8847 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
8848
8849 * linux-arm-low.c (thumb_breakpoint_len): Delete.
8850 (thumb2_breakpoint): New.
8851 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
8852
8853 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
8854
8855 * linux-low.c (get_stop_pc): Check for SIGTRAP.
8856 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
8857 breakpoints.
8858
8859 2010-01-21 Pedro Alves <pedro@codesourcery.com>
8860
8861 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
8862
8863 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
8864
8865 * linux-s390-low.c (s390_collect_ptrace_register)
8866 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
8867
8868 2010-01-21 Doug Evans <dje@google.com>
8869
8870 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
8871 (PTRACE_ARG4_TYPE): New macro.
8872 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
8873 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
8874 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
8875 (usr_store_inferior_registers): Ditto.
8876 (linux_read_memory, linux_write_memory): Ditto.
8877 (linux_test_for_tracefork): Ditto.
8878
8879 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
8880 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
8881
8882 2010-01-21 Pedro Alves <pedro@codesourcery.com>
8883
8884 * proc-service.c (ps_lgetregs): Don't refetch registers from the
8885 target.
8886
8887 2010-01-21 Pedro Alves <pedro@codesourcery.com>
8888
8889 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
8890 prototype to take a regcache. Adjust.
8891
8892 2010-01-20 Pedro Alves <pedro@codesourcery.com>
8893
8894 * regcache.h (struct thread_info): Forward declare.
8895 (struct regcache): New.
8896 (new_register_cache): Adjust prototype.
8897 (get_thread_regcache): Declare.
8898 (free_register_cache): Adjust prototype.
8899 (registers_to_string, registers_from_string): Ditto.
8900 (supply_register, supply_register_by_name, collect_register)
8901 (collect_register_as_string, collect_register_by_name): Ditto.
8902 * regcache.c (struct inferior_regcache_data): Delete.
8903 (get_regcache): Rename to ...
8904 (get_thread_regcache): ... this. Adjust. Switch inferior before
8905 fetching registers.
8906 (regcache_invalidate_one): Adjust.
8907 (regcache_invalidate): Fix prototype.
8908 (new_register_cache): Return the new register cache.
8909 (free_register_cache): Change prototype.
8910 (realloc_register_cache): Adjust.
8911 (registers_to_string): Change prototype to take a regcache. Adjust.
8912 (registers_from_string): Ditto.
8913 (register_data): Ditto.
8914 (supply_register): Ditto.
8915 (supply_register_by_name): Ditto.
8916 (collect_register): Ditto.
8917 (collect_register_as_string): Ditto.
8918 (collect_register_by_name): Ditto.
8919 * server.c (process_serial_event): Adjust.
8920 * linux-low.h (regset_fill_func, regset_store_func): Change
8921 prototype.
8922 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
8923 Change prototype.
8924 * linux-low.c (get_stop_pc): Adjust.
8925 (check_removed_breakpoint): Adjust.
8926 (linux_wait_for_event): Adjust.
8927 (linux_resume_one_lwp): Adjust.
8928 (fetch_register): Add regcache parameter. Adjust.
8929 (usr_store_inferior_registers): Ditto.
8930 (regsets_fetch_inferior_registers): Ditto.
8931 (regsets_store_inferior_registers): Ditto.
8932 (linux_fetch_registers, linux_store_registers): Ditto.
8933 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
8934 regcache. Adjust.
8935 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
8936 Ditto.
8937 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
8938 prototype to take a regcache.
8939 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
8940 * remote-utils.c (convert_ascii_to_int, outreg)
8941 (prepare_resume_reply): Change prototype to take a regcache.
8942 Adjust.
8943 * target.h (struct target_ops) <fetch_registers, store_registers>:
8944 Change prototype to take a regcache.
8945 (fetch_inferior_registers, store_inferior_registers): Change
8946 prototype to take a regcache. Adjust.
8947 * proc-service.c (ps_lgetregs): Adjust.
8948 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
8949 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
8950 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
8951 take a regcache. Adjust.
8952 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
8953 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
8954 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
8955 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
8956 * linux-cris-low.c (cris_get_pc, cris_set_pc)
8957 (cris_cannot_fetch_register):
8958 (cris_breakpoint_at): Change prototype to take a regcache.
8959 Adjust.
8960 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
8961 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
8962 to take a regcache. Adjust.
8963 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
8964 Adjust.
8965 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
8966 take a regcache. Adjust.
8967 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
8968 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
8969 (m68k_set_pc): Change prototype to take a regcache. Adjust.
8970 * linux-mips-low.c (mips_get_pc):
8971 (mips_set_pc): Change prototype to take a regcache. Adjust.
8972 (mips_reinsert_addr): Adjust.
8973 (mips_collect_register): Change prototype to take a regcache.
8974 Adjust.
8975 (mips_supply_register):
8976 (mips_collect_register_32bit, mips_supply_register_32bit)
8977 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
8978 (mips_store_fpregset): Ditto.
8979 * linux-ppc-low.c (ppc_supply_ptrace_register)
8980 (ppc_supply_ptrace_register): Ditto.
8981 (parse_spufs_run): Adjust.
8982 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
8983 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
8984 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
8985 take a regcache. Adjust.
8986 * linux-s390-low.c (s390_collect_ptrace_register)
8987 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
8988 (s390_set_pc): Change prototype to take a regcache. Adjust.
8989 (s390_arch_setup): Adjust.
8990 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
8991 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
8992 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
8993 (sparc_fill_gregset, sparc_store_gregset_from_stack)
8994 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
8995 regcache. Adjust.
8996 (sparc_breakpoint_at): Adjust.
8997 * linux-xtensa-low.c (xtensa_fill_gregset):
8998 (xtensa_store_gregset):
8999 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
9000 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
9001 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
9002 prototype to take a regcache. Adjust.
9003 * win32-arm-low.c (arm_fetch_inferior_register)
9004 (arm_store_inferior_register): Change prototype to take a
9005 regcache. Adjust.
9006 * win32-i386-low.c (i386_fetch_inferior_register)
9007 (i386_store_inferior_register): Change prototype to take a
9008 regcache. Adjust.
9009 * win32-low.c (child_fetch_inferior_registers)
9010 (child_store_inferior_registers): Change prototype to take a
9011 regcache. Adjust.
9012 (win32_wait): Adjust.
9013 (win32_fetch_inferior_registers): Change prototype to take a
9014 regcache. Adjust.
9015 (win32_store_inferior_registers): Adjust.
9016 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
9017 store_inferior_register>: Change prototype to take a regcache.
9018
9019 2010-01-20 Doug Evans <dje@google.com>
9020
9021 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
9022 #ifdef.
9023 (linux_wait_for_event1, linux_init_signals): Ditto.
9024 (W_STOPCODE): Provide definition if missing.
9025
9026 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
9027
9028 * linux-low.c (linux_core_of_thread): New.
9029 (compare_ints, show_process, list_threads): New.
9030 (linux_qxfer_osdata): Report threads and cores.
9031 (linux_target_op): Register linux_core_of_thread.
9032 * remote-utils.c (prepare_resume_reply): Report the core.
9033 (buffer_xml_printf): Support %d specifier.
9034 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
9035 New.
9036 (handle_query): Handle qXfer:threads. Announce availability
9037 thereof.
9038 * target.h (struct target_ops): New field core_of_thread.
9039
9040 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
9041
9042 * Makefile.in (clean): Remove new generated files.
9043 (reg-s390.o, reg-s390.c): Remove rules.
9044 (reg-s390x.o, reg-s390x.c): Likewise.
9045 (s390-linux32.o, s390-linux32.c): Add rules.
9046 (s390-linux64.o, s390-linux64.c): Likewise.
9047 (s390x-linux64.o, s390x-linux64.c): Likewise.
9048 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
9049 * linux-s390-low.c: Include <elf.h>.
9050 (HWCAP_S390_HIGH_GPRS): Define if undefined.
9051 (init_registers_s390): Remove prototype.
9052 (init_registers_s390x): Likewise.
9053 (init_registers_s390_linux32): Add prototype.
9054 (init_registers_s390_linux64): Likewise.
9055 (init_registers_s390x_linux64): Likewise.
9056 (s390_num_regs_3264): New define.
9057 (s390_regmap_3264): New global variable.
9058 (s390_cannot_fetch_register): Remove obsolete check.
9059 (s390_cannot_store_register): Likewise.
9060 (s390_collect_ptrace_register): Handle upper/lower register halves.
9061 (s390_supply_ptrace_register): Likewise.
9062 (s390_fill_gregset): Update to register number changes.
9063 (s390_get_hwcap): New routine.
9064 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
9065 Install appropriate regmap and register set.
9066
9067 2010-01-01 Joel Brobecker <brobecker@adacore.com>
9068
9069 * server.c (gdbserver_version): Update copyright year to 2010.
9070 * gdbreplay.c (gdbreplay_version): Likewise.
9071
9072 2009-12-28 Doug Evans <dje@google.com>
9073
9074 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
9075 elf/external.h. Include <elf.h> instead but only if necessary.
9076
9077 2009-12-28 Pedro Alves <pedro@codesourcery.com>
9078
9079 * linux-low.c (linux_remove_process): Remove `detaching'
9080 parameter. Don't release/detach from thread_db here.
9081 (linux_kill): Release/detach from thread_db here, ...
9082 (linux_detach): ... and here, before actually detaching.
9083 (linux_wait_1): ... and here, when a process exits.
9084 * thread-db.c (any_thread_of): New.
9085 (thread_db_free): Switch the current inferior to a thread of the
9086 passed in process.
9087
9088 2009-12-21 Doug Evans <dje@google.com>
9089
9090 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
9091
9092 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
9093 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
9094 warning ifndef __NR_tkill. Move setting of errno there too.
9095 Delete unnecessary resetting of errno after syscall.
9096 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
9097
9098 * configure.ac: Check for dladdr.
9099 * config.in: Regenerate.
9100 * configure: Regenerate.
9101 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
9102 (try_thread_db_load): Update.
9103
9104 * linux-low.c (my_waitpid): Delete unnecessary prototype.
9105
9106 2009-12-18 Doug Evans <dje@google.com>
9107
9108 * event-loop.c: Include unistd.h if it exists.
9109
9110 * linux-low.c (my_waitpid): Move definition away from being in
9111 between linux_tracefork_child/linux_test_for_tracefork.
9112
9113 * gdb_proc_service.h (psaddr_t): Fix type.
9114 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
9115 signature to match glibc.
9116
9117 2009-12-16 Doug Evans <dje@google.com>
9118
9119 * linux-low.c (linux_read_memory): Fix argument to read.
9120
9121 2009-11-26 Pedro Alves <pedro@codesourcery.com>
9122
9123 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
9124 events, don't leave current_inferior pointing at null.
9125
9126 2009-11-26 Pedro Alves <pedro@codesourcery.com>
9127
9128 * win32-low.c (LOG): Delete.
9129 (OUTMSG): Output to stderr.
9130 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
9131 on compile time LOG macro.
9132 (win32_wait): Fix debug output.
9133
9134 2009-11-26 Pedro Alves <pedro@codesourcery.com>
9135
9136 * win32-low.c (win32_add_one_solib): If the dll name is
9137 "ntdll.dll", prepend the system directory to the dll path.
9138
9139 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
9140
9141 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
9142
9143 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
9144 Vladimir Prus <vladimir@codesourcery.com>
9145
9146 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
9147 * configure.ac: Check for __mcoldfire__ and set
9148 gdb_cv_m68k_is_coldfire.
9149 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
9150 reg-cf.o and reg-m68k.o.
9151 * configure: Regenerated.
9152
9153 2009-11-16 Pedro Alves <pedro@codesourcery.com>
9154
9155 * linux-low.c (linux_remove_process): Add `detaching' parameter.
9156 Pass it to thread_db_free.
9157 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
9158 proper `detaching' argument to linux_remove_process.
9159 * linux-low.h (thread_db_free): Add `detaching' parameter.
9160 * thread-db.c (thread_db_init): Pass false as `detaching' argument
9161 to thread_db_free.
9162 (thread_db_free): Add `detaching' parameter. Only
9163 call td_ta_clear_event if detaching from process.
9164
9165 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
9166
9167 * thread-db.c (thread_db_free): Fix typo.
9168
9169 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
9170
9171 PR gdb/10838
9172 * thread-db.c (thread_db_free): Call td_ta_clear_event.
9173
9174 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
9175
9176 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
9177 with an i686 compiler.
9178 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
9179 needed.
9180 * configure: Rebuilt.
9181
9182 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
9183
9184 PR gdb/10783
9185
9186 * server.c (handle_search_memory_1): Correct read_addr initialization
9187 in loop for searching subsequent chunks.
9188
9189 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
9190
9191 * configure.ac: New --with-libthread-db option.
9192 * thread-db.c: Allow direct dependence on libthread_db.
9193 (thread_db_free): Adjust.
9194 * config.in: Regenerate.
9195 * configure: Likewise.
9196
9197 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
9198
9199 PR gdb/10757
9200 * thread-db.c (attach_thread): New function.
9201 (maybe_attach_thread): Return success/failure.
9202 (find_new_threads_callback): Adjust.
9203 (thread_db_find_new_threads): Loop until no new threads.
9204
9205 2009-10-13 Pedro Alves <pedro@codesourcery.com>
9206
9207 * proc-service.c (ps_lgetregs): Formatting.
9208
9209 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
9210
9211 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
9212 * configure.ac: Adjust.
9213 * linux-low.h (struct process_info_private): Move members to struct
9214 thread_db.
9215 (thread_db_free, thread_db_handle_monitor_command): New prototype.
9216 * linux-low.c (linux_remove_process): Adjust.
9217 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
9218 * server.c (handle_query): Move code ...
9219 (handle_monitor_command): ... here. New function.
9220 * target.h (struct target_ops): New member.
9221 * thread-db.c (struct thread_db): New.
9222 (libthread_db_search_path): New variable.
9223 (thread_db_create_event, thread_db_enable_reporting)
9224 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
9225 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
9226 (try_thread_db_load_1, dladdr_to_soname): New functions.
9227 (try_thread_db_load, thread_db_load_search): New functions.
9228 (thread_db_init): Search for libthread_db.
9229 (thread_db_free): New function.
9230 (thread_db_handle_monitor_command): Likewise.
9231 * config.in: Regenerate.
9232 * configure: Regenerate.
9233
9234 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
9235
9236 * spu-low.c (spu_kill): Wait for inferior to terminate.
9237 Call clear_inferiors.
9238 (spu_detach): Call clear_inferiors.
9239
9240 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9241
9242 * aclocal.m4: Regenerate.
9243 * config.in: Likewise.
9244 * configure: Likewise.
9245
9246 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9247
9248 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
9249 (parse_spufs_run): New function.
9250 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
9251 (ppc_breakpoint_at): Handle SPU breakpoints.
9252
9253 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9254
9255 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
9256 (SPUFS_MAGIC): Define.
9257 (spu_enumerate_spu_ids): New function.
9258 (linux_qxfer_spu): New function.
9259 (linux_target_ops): Install linux_qxfer_spu.
9260
9261 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9262
9263 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
9264 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
9265 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
9266 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
9267 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
9268 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
9269 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
9270 (init_registers_powerpc_cell32l): Add prototype.
9271 (init_registers_powerpc_cell64l): Likewise.
9272 (ppc_arch_setup): Detect Cell/B.E. architecture.
9273
9274 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9275
9276 * Makefile.in (datarootdir): New variable.
9277
9278 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
9279
9280 * linux-low.c (linux_write_memory): Update debugging output.
9281 * Makefile.in (clean): Add new descriptions.
9282 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
9283 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
9284 * configure.srv: Add new files for arm*-*-linux*.
9285 * linux-arm-low.c: Add new declarations.
9286 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
9287 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
9288 (HWCAP_VFPv3D16): New.
9289 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
9290 instead of __IWMMXT__.
9291 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
9292 (arm_arch_setup): New.
9293 (target_regsets): Remove #ifdef. Add VFP regset.
9294 (the_low_target): Use arm_arch_setup.
9295
9296 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
9297
9298 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
9299 the main thread again.
9300
9301 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
9302
9303 Adding Neutrino gdbserver.
9304 * configure: Regenerated.
9305 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
9306 * configure.srv (i[34567]86-*-nto*): New target.
9307 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
9308 * remote-utils.c [__QNX__]: Include sys/iomgr.h
9309 (nto_comctrl) [__QNX__]: New function.
9310 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
9311
9312 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
9313
9314 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
9315 srv_tgtobj.
9316
9317 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
9318 Pedro Alves <pedro@codesourcery.com>
9319
9320 * win32-i386-low.c (i386_get_thread_context): Handle systems that
9321 don't support CONTEXT_EXTENDED_REGISTERS.
9322 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
9323 (the_low_target): Install them.
9324 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
9325 failing with ERROR_PIPE_NOT_CONNECTED.
9326
9327 2009-06-30 Doug Evans <dje@google.com>
9328 Pierre Muller <muller@ics.u-strasbg.fr>
9329
9330 Add h/w watchpoint support to x86-linux, win32-i386.
9331 * Makefile.in (SFILES): Add i386-low.c
9332 (i386_low_h): Define.
9333 (i386-low.o): Add dependencies.
9334 (linux-x86-low.o): Add i386-low.h dependency.
9335 (win32-i386-low.o): Ditto.
9336 * i386-low.c: New file.
9337 * i386-low.h: New file.
9338 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
9339 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
9340 * linux-low.c (linux_add_process): Initialize arch_private.
9341 (linux_remove_process): Free arch_private.
9342 (add_lwp): Initialize arch_private.
9343 (delete_lwp): Free arch_private.
9344 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
9345 provided.
9346 * linux-low.h (process_info_private): New member arch_private.
9347 (lwp_info): New member arch_private.
9348 (linux_target_ops): New members new_process, new_thread,
9349 prepare_to_resume.
9350 (ptid_of): New macro.
9351 * linux-x86-low.c: Include stddef.h, i386-low.h.
9352 (arch_process_info): New struct.
9353 (arch_lwp_info): New struct.
9354 (x86_linux_dr_get, x86_linux_dr_set): New functions.
9355 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
9356 (i386_dr_low_get_status): New function.
9357 (x86_insert_point, x86_remove_point): New functions.
9358 (x86_stopped_by_watchpoint): New function.
9359 (x86_stopped_data_address): New function.
9360 (x86_linux_new_process, x86_linux_new_thread): New functions.
9361 (x86_linux_prepare_to_resume): New function.
9362 (the_low_target): Add entries for insert_point, remove_point,
9363 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
9364 prepare_to_resume.
9365 * server.c (debug_hw_points): New global.
9366 (monitor_show_help): Document set debug-hw-points.
9367 (handle_query): Process "set debug-hw-points".
9368 * server.h (debug_hw_points): Declare.
9369 (paddress): Declare.
9370 * utils.c (NUMCELLS, CELLSIZE): New macros.
9371 (get_sell, xsnprintf, paddress): New functions.
9372 * win32-arm-low.c (the_low_target): Add entries for insert_point,
9373 remove_point, stopped_by_watchpoint, stopped_data_address.
9374 * win32-i386-low.c: Include i386-low.h.
9375 (debug_reg_state): Replaces dr.
9376 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
9377 (i386_dr_low_get_status): New function.
9378 (i386_insert_point, i386_remove_point): New functions.
9379 (i386_stopped_by_watchpoint): New function.
9380 (i386_stopped_data_address): New function.
9381 (i386_initial_stuff): Update.
9382 (get_thread_context,set_thread_context,i386_thread_added): Update.
9383 (the_low_target): Add entries for insert_point,
9384 remove_point, stopped_by_watchpoint, stopped_data_address.
9385 * win32-low.c (win32_insert_watchpoint): New function.
9386 (win32_remove_watchpoint): New function.
9387 (win32_stopped_by_watchpoint): New function.
9388 (win32_stopped_data_address): New function.
9389 (win32_target_ops): Add entries for insert_watchpoint,
9390 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
9391 * win32-low.h (win32_target_ops): New members insert_point,
9392 remove_point, stopped_by_watchpoint, stopped_data_address.
9393
9394 2009-06-25 Pedro Alves <pedro@codesourcery.com>
9395
9396 * server.c (process_serial_event): Re-return unsupported, not
9397 error, if the type isn't recognized. Re-allow supporting only
9398 insert or remove packets. Also call require_running for
9399 breakpoints. Add missing break statement to default case. Tidy.
9400 * target.h (struct target_ops): Rename insert_watchpoint to
9401 insert_point, and remove_watchpoint to remove_point.
9402
9403 * linux-low.h (struct linux_target_ops): Likewise.
9404 * linux-low.c (linux_insert_watchpoint): Rename to ...
9405 (linux_insert_point): ... this. Adjust.
9406 (linux_remove_watchpoint): Rename to ...
9407 (linux_remove_point): ... this. Adjust.
9408 (linux_target_ops): Adjust.
9409 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
9410 (cris_insert_point): ... this.
9411 (cris_remove_watchpoint): Rename to ...
9412 (cris_remove_point): ... this.
9413 (the_low_target): Adjust.
9414
9415 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
9416
9417 * server.c (handle_v_kill): Pass signal_pid to
9418 kill_inferior if multi_process is zero.
9419
9420 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
9421
9422 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
9423 * target.h (target_ops): Comment for *_watchpoint to make it clear
9424 the functions can get types '0' and '1'.
9425
9426 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
9427
9428 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
9429 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
9430 * regcache.c (get_regcache): Likewise.
9431 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
9432 * win32-low.c (child_fetch_inferior_registers): Remove check for
9433 regno 0.
9434
9435 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
9436 Pedro Alves <pedro@codesourcery.com>
9437
9438 * target.h (struct target_ops) <supports_multi_process>: New
9439 callback.
9440 (target_supports_multi_process): New.
9441 * server.c (handle_query): Even if GDB reports support, only
9442 enable multi-process if the target also supports it. Report
9443 multi-process support only if the target backend supports it.
9444 * linux-low.c (linux_supports_multi_process): New function.
9445 (linux_target_ops): Install it as target_supports_multi_process
9446 callback.
9447
9448 2009-05-24 Doug Evans <dje@google.com>
9449
9450 Global renaming of find_thread_pid to find_thread_ptid.
9451 * server.h (find_thread_ptid): Renamed from find_thread_pid.
9452 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
9453 All callers updated.
9454
9455 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
9456 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
9457 directly.
9458
9459 * linux-low.c (get_stop_pc): Print pc if debug_threads.
9460 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
9461 (linux_resume_one_lwp): Ditto.
9462
9463 2009-05-23 Doug Evans <dje@google.com>
9464
9465 * linux-low.c (linux_resume_one_lwp): Change type of first arg
9466 from struct inferior_list_entry * to struct lwp_info *.
9467 All callers updated.
9468
9469 2009-05-13 Doug Evans <dje@google.com>
9470
9471 * linux-x86-low.c: Don't include assert.h.
9472 (x86_siginfo_fixup): Use fatal, not assert.
9473 (x86_arch_setup): Fix comment.
9474
9475 2009-05-12 Doug Evans <dje@google.com>
9476
9477 Biarch support for i386/amd64 gdbserver.
9478 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
9479 Add linux-x86-low.c.
9480 (linux-i386-low.o, linux-x86-64-low.o): Delete.
9481 (linux-x86-low.o): Add.
9482 * linux-x86-64-low.c: Delete.
9483 * linux-i386-low.c: Delete.
9484 * linux-x86-low.c: New file.
9485 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
9486 linux-x86-low.o.
9487 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
9488 linux-x86-low.o.
9489 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
9490 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
9491 (linux_child_pid_to_exec_file): New function.
9492 (elf_64_header_p, elf_64_file_p): New functions.
9493 (siginfo_fixup): New function.
9494 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
9495 give target a chance to convert layout.
9496 * linux-low.h (linux_target_ops): New member siginfo_fixup.
9497 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
9498
9499 2009-05-07 Doug Evans <dje@google.com>
9500
9501 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
9502 (regsets_store_inferior_registers): Ditto.
9503
9504 2009-05-06 Pedro Alves <pedro@codesourcery.com>
9505
9506 PR server/10048
9507
9508 * linux-low.c (must_set_ptrace_flags): Delete.
9509 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
9510 of the global.
9511 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
9512 `lwp->must_set_ptrace_flags' instead.
9513 (linux_wait_for_event_1): Set ptrace options here.
9514 (linux_wait_1): ... not here.
9515
9516 2009-04-30 Doug Evans <dje@google.com>
9517
9518 * inferiors.c (started_inferior_callback): New function.
9519 (attached_inferior_callback): New function.
9520 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
9521 * server.c (print_started_pid, print_attached_pid): New functions.
9522 (detach_or_kill_for_exit): New function.
9523 (main): Call it instead of for_each_inferior (kill_inferior_callback).
9524 * server.h (have_started_inferiors_p): Declare.
9525 (have_attached_inferiors_p): Declare.
9526
9527 * inferiors.c (remove_process): Fix memory leak, free process.
9528 * linux-low.c (linux_remove_process): New function.
9529 (linux_kill): Call it instead of remove_process.
9530 (linux_detach, linux_wait_1): Ditto.
9531
9532 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
9533
9534 * configure.srv: Add x86 Windows CE target.
9535
9536 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
9537
9538 * inferiors.c (get_thread_process): Make global.
9539 * server.h (get_thread_process): Add prototype.
9540 * thread-db.c (find_one_thread): Use get_thread_process
9541 instead of current_process.
9542 (thread_db_get_tls_address): Do not crash if called when
9543 thread layer is not yet initialized.
9544
9545 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
9546
9547 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
9548 * spu-low.c (current_tid): Rename to ...
9549 (current_ptid): ... this.
9550 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
9551 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
9552 ptid_get_lwp (current_ptid) instead of current_tid.
9553 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
9554 instead of current_tid. Use find_process_pid to verify pid
9555 argument is valid. Pass proper argument to remove_process.
9556 (spu_thread_alive): Compare current_ptid instead of current_tid.
9557 (spu_resume): Likewise.
9558
9559 2009-04-02 Pedro Alves <pedro@codesourcery.com>
9560
9561 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
9562 variable.
9563
9564 2009-04-01 Pedro Alves <pedro@codesourcery.com>
9565
9566 Implement the multiprocess extensions, and add linux multiprocess
9567 support.
9568
9569 * server.h (ULONGEST): Declare.
9570 (struct ptid, ptid_t): New.
9571 (minus_one_ptid, null_ptid): Declare.
9572 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
9573 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
9574 (struct inferior_list_entry): Change `id' type from unsigned from
9575 to ptid_t.
9576 (struct sym_cache, struct breakpoint, struct
9577 process_info_private): Forward declare.
9578 (struct process_info): Declare.
9579 (current_process): Declare.
9580 (all_processes): Declare.
9581 (initialize_inferiors): Declare.
9582 (add_thread): Adjust to use ptid_t.
9583 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
9584 (add_process, remove_process, find_thread_pid): Declare.
9585 (find_inferior_id): Adjust to use ptid_t.
9586 (cont_thread, general_thread, step_thread): Change type to ptid_t.
9587 (multi_process): Declare.
9588 (push_event): Adjust to use ptid_t.
9589 (read_ptid, write_ptid): Declare.
9590 (prepare_resume_reply): Adjust to use ptid_t.
9591 (clear_symbol_cache): Declare.
9592 * inferiors.c (all_processes): New.
9593 (null_ptid, minus_one_ptid): New.
9594 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
9595 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
9596 (add_thread): Change unsigned long to ptid. Remove gdb_id
9597 parameter. Adjust.
9598 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
9599 (gdb_id_to_thread): Rename to ...
9600 (find_thread_pid): ... this. Change unsigned long to ptid.
9601 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
9602 (loaded_dll, pull_pid_from_list): Adjust.
9603 (add_process, remove_process, find_process_pid)
9604 (get_thread_process, current_process, initialize_inferiors): New.
9605 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
9606 (struct target_waitstatus) <related_pid>: Ditto.
9607 (struct target_ops) <kill, detach>: Add `pid' argument. Change
9608 return type to int.
9609 (struct target_ops) <join>: Add `pid' argument.
9610 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
9611 (struct target_ops) <wait>: Add `ptid' field. Change return type
9612 to ptid.
9613 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
9614 (mywait): Add `ptid' argument. Change return type to ptid_t.
9615 (target_pid_to_str): Declare.
9616 * target.c (set_desired_inferior): Adjust to use ptids.
9617 (mywait): Add new `ptid' argument. Adjust.
9618 (target_pid_to_str): New.
9619 * mem-break.h (free_all_breakpoints): Declare.
9620 * mem-break.c (breakpoints): Delelete.
9621 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
9622 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
9623 to use per-process breakpoint list.
9624 (free_all_breakpoints): New.
9625 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
9626 (symbol_cache, all_symbols_looked_up): Delete.
9627 (hexchars): New.
9628 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
9629 read_ptid): New.
9630 (prepare_resume_reply): Change ptid argument's type from unsigned
9631 long to ptid_t. Adjust. Implement W;process and X;process.
9632 (free_sym_cache, clear_symbol_cache): New.
9633 (look_up_one_symbol): Adjust to per-process symbol cache. *
9634 * server.c (cont_thread, general_thread, step_thread): Change type
9635 to ptid_t.
9636 (attached): Delete.
9637 (multi_process): New.
9638 (last_ptid): Change type to ptid_t.
9639 (struct vstop_notif) <ptid>: Change type to ptid_t.
9640 (queue_stop_reply, push_event): Change `ptid' argument's type to
9641 ptid_t.
9642 (discard_queued_stop_replies): Add `pid' argument.
9643 (start_inferior): Adjust to use ptids. Adjust to mywait interface
9644 changes. Don't reference the `attached' global.
9645 (attach_inferior): Adjust to mywait interface changes.
9646 (handle_query): Adjust to use ptids. Parse GDB's qSupported
9647 features. Handle and report "multiprocess+". Handle
9648 "qAttached:PID".
9649 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
9650 changes.
9651 (handle_v_kill): New.
9652 (handle_v_stopped): Adjust to use target_pid_to_str.
9653 (handle_v_requests): Allow multiple attaches and runs when
9654 multiprocess extensions are in effect. Handle "vKill".
9655 (myresume): Adjust to use ptids.
9656 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
9657 (handle_status): Adjust to discard_queued_stop_replies interface
9658 change.
9659 (first_thread_of, kill_inferior_callback)
9660 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
9661 (main): Call initialize_inferiors. Adjust to use ptids, killing
9662 and detaching from all inferiors. Handle multiprocess packet
9663 variants.
9664 * linux-low.h: Include gdb_proc_service.h.
9665 (struct process_info_private): New.
9666 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
9667 <lwpid_of>: Use ptid_get_lwp.
9668 (get_lwp_thread): Adjust.
9669 (struct lwp_info): Add `dead' member.
9670 (find_lwp_pid): Declare.
9671 * linux-low.c (thread_db_active): Delete.
9672 (new_inferior): Adjust comment.
9673 (inferior_pid): Delete.
9674 (linux_add_process): New.
9675 (handle_extended_wait): Adjust.
9676 (add_lwp): Change unsigned long to ptid.
9677 (linux_create_inferior): Add process to processes table. Adjust
9678 to use ptids. Don't set new_inferior here.
9679 (linux_attach_lwp): Rename to ...
9680 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
9681 it. Adjust to use ptids.
9682 (linux_attach_lwp): New.
9683 (linux_attach): Add process to processes table. Don't set
9684 new_inferior here.
9685 (struct counter): New.
9686 (second_thread_of_pid_p, last_thread_of_process_p): New.
9687 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
9688 multiple processes.
9689 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
9690 processes. Remove process from process table.
9691 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
9692 to multiple processes.
9693 (any_thread_of): New.
9694 (linux_detach): Add `pid' argument, and handle it. Remove process
9695 from processes table.
9696 (linux_join): Add `pid' argument. Handle it.
9697 (linux_thread_alive): Change unsighed long argument to ptid_t.
9698 Consider dead lwps as not being alive.
9699 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
9700 threads we're not interested in.
9701 (same_lwp, find_lwp_pid): New.
9702 (linux_wait_for_lwp): Change `pid' argument's type from int to
9703 ptid_t. Adjust.
9704 (linux_wait_for_event): Rename to ...
9705 (linux_wait_for_event_1): ... this. Change `pid' argument's type
9706 from int to ptid_t. Adjust.
9707 (linux_wait_for_event): New.
9708 (linux_wait_1): Add `ptid' argument. Change return type to
9709 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
9710 that exit from the process table.
9711 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
9712 Adjust.
9713 (mark_lwp_dead): New.
9714 (wait_for_sigstop): Adjust to use ptids. If a process exits while
9715 stopping all threads, mark its main lwp as dead.
9716 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
9717 ptids.
9718 (fetch_register, usr_store_inferior_registers)
9719 (regsets_fetch_inferior_registers)
9720 (regsets_store_inferior_registers, linux_read_memory)
9721 (linux_write_memory): Inline `inferior_pid'.
9722 (linux_look_up_symbols): Adjust to use per-process
9723 `thread_db_active'.
9724 (linux_request_interrupt): Adjust to use ptids.
9725 (linux_read_auxv): Inline `inferior_pid'.
9726 (initialize_low): Don't reference thread_db_active.
9727 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
9728 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
9729 (ps_getpid): Return the pid of the current inferior.
9730 * thread-db.c (proc_handle, thread_agent): Delete.
9731 (thread_db_create_event, thread_db_enable_reporting): Adjust to
9732 per-process data.
9733 (find_one_thread): Change argument type to ptid_t. Adjust to
9734 per-process data.
9735 (maybe_attach_thread): Adjust to per-process data and ptids.
9736 (thread_db_find_new_threads): Ditto.
9737 (thread_db_init): Ditto.
9738 * spu-low.c (spu_create_inferior, spu_attach): Add process to
9739 processes table. Adjust to use ptids.
9740 (spu_kill, spu_detach): Adjust interface. Remove process from
9741 processes table.
9742 (spu_join, spu_thread_alive): Adjust interface.
9743 (spu_wait): Adjust interface. Remove process from processes
9744 table. Adjust to use ptids.
9745 * win32-low.c (current_inferior_tid): Delete.
9746 (current_inferior_ptid): New.
9747 (debug_event_ptid): New.
9748 (thread_rec): Take a ptid. Adjust.
9749 (child_add_thread): Add `pid' argument. Adjust to use ptids.
9750 (child_delete_thread): Ditto.
9751 (do_initial_child_stuff): Add `attached' argument. Add process to
9752 processes table.
9753 (child_fetch_inferior_registers, child_store_inferior_registers):
9754 Adjust.
9755 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
9756 (win32_attach): Pass 1 to do_initial_child_stuff.
9757 (win32_kill): Adjust interface. Remove process from processes
9758 table.
9759 (win32_detach): Ditto.
9760 (win32_join): Adjust interface.
9761 (win32_thread_alive): Take a ptid.
9762 (win32_resume): Adjust to use ptids.
9763 (get_child_debug_event): Ditto.
9764 (win32_wait): Adjust interface. Remove exiting process from
9765 processes table.
9766
9767 2009-04-01 Pedro Alves <pedro@codesourcery.com>
9768
9769 Non-stop mode support.
9770
9771 * server.h (non_stop): Declare.
9772 (gdb_client_data, handler_func): Declare.
9773 (delete_file_handler, add_file_handler, start_event_loop):
9774 Declare.
9775 (handle_serial_event, handle_target_event, push_event)
9776 (putpkt_notif): Declare.
9777 * target.h (enum resume_kind): New.
9778 (struct thread_resume): Replace `step' field by `kind' field.
9779 (TARGET_WNOHANG): Define.
9780 (struct target_ops) <wait>: Add `options' argument.
9781 <supports_non_stop, async, start_non_stop>: New fields.
9782 (target_supports_non_stop, target_async): New.
9783 (start_non_stop): Declare.
9784 (mywait): Add `options' argument.
9785 * target.c (mywait): Add `options' argument. Print child exit
9786 notifications here.
9787 (start_non_stop): New.
9788 * server.c (non_stop, own_buf, mem_buf): New globals.
9789 (struct vstop_notif): New.
9790 (notif_queue): New global.
9791 (queue_stop_reply, push_event, discard_queued_stop_replies)
9792 (send_next_stop_reply): New.
9793 (start_inferior): Adjust to use resume_kind. Adjust to mywait
9794 interface changes.
9795 (attach_inferior): In non-stop mode, don't wait for the target
9796 here.
9797 (handle_general_set): Handle QNonStop.
9798 (handle_query): When handling qC, return the current general
9799 thread, instead of the first thread of the list.
9800 (handle_query): If the backend supports non-stop mode, include
9801 QNonStop+ in the qSupported query response.
9802 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
9803 and non-stop mode.
9804 (handle_v_attach, handle_v_run): Handle non-stop mode.
9805 (handle_v_stopped): New.
9806 (handle_v_requests): Report support for vCont;t. Handle vStopped.
9807 (myresume): Adjust to use resume_kind. Handle non-stop.
9808 (queue_stop_reply_callback): New.
9809 (handle_status): Handle non-stop mode.
9810 (main): Clear non_stop flag on reconnection. Use the event-loop.
9811 Refactor serial protocol handling from here ...
9812 (process_serial_event): ... to this new function. When GDB
9813 selects any thread, select one here. In non-stop mode, wait until
9814 GDB acks all pending events before exiting.
9815 (handle_serial_event, handle_target_event): New.
9816 * remote-utils.c (remote_open): Install remote_desc in the event
9817 loop.
9818 (remote_close): Remove remote_desc from the event loop.
9819 (putpkt_binary): Rename to...
9820 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
9821 (putpkt_binary): New as wrapper around putpkt_binary_1.
9822 (putpkt_notif): New.
9823 (prepare_resume_reply): In non-stop mode, don't change the
9824 general_thread.
9825 * event-loop.c: New.
9826 * Makefile.in (OBJ): Add event-loop.o.
9827 (event-loop.o): New rule.
9828
9829 * linux-low.h (pid_of): Moved here.
9830 (lwpid_of): New.
9831 (get_lwp_thread): Use lwpid_of.
9832 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
9833 * linux-low.c (pid_of): Delete.
9834 (inferior_pid): Use lwpid_of.
9835 (linux_event_pipe): New.
9836 (target_is_async_p): New.
9837 (delete_lwp): New.
9838 (handle_extended_wait): Use lwpid_of.
9839 (add_lwp): Don't set lwpid field.
9840 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
9841 (linux_kill_one_lwp): If killing a running lwp, stop it first.
9842 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
9843 (linux_detach_one_lwp): If detaching from a running lwp, stop it
9844 first. Adjust to linux_wait_for_event interface changes. Use
9845 lwpid_of.
9846 (linux_detach): Don't delete the main lwp here.
9847 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
9848 (status_pending_p): Don't consider explicitly suspended lwps.
9849 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
9850 pointer. Add OPTIONS argument. Change return type to int. Use
9851 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
9852 (linux_wait_for_event): Take an integer pid instead of a lwp_info
9853 pointer. Add status pointer argument. Return a pid instead of a
9854 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
9855 changes. In non-stop mode, don't switch to a random thread.
9856 (linux_wait): Rename to...
9857 (linux_wait_1): ... this. Add target_options argument, and handle
9858 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
9859 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
9860 clean exit and signal exit code. Don't stop all threads in
9861 non-stop mode. In all-stop mode, only stop all threads when
9862 reporting a stop to GDB. Handle explicit thread stop requests.
9863 (async_file_flush, async_file_mark): New.
9864 (linux_wait): New.
9865 (send_sigstop): Use lwpid_of.
9866 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
9867 interface changes. In non-stop mode, don't switch to a random
9868 thread.
9869 (linux_resume_one_lwp): Use lwpid_of.
9870 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
9871 (linux_resume_one_thread): ... this. Handle resume_stop. In
9872 non-stop mode, don't look for pending flag in all threads.
9873 (resume_status_pending_p): Don't consider explicitly suspended
9874 threads.
9875 (my_waitpid): Reimplement. Emulate __WALL.
9876 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
9877 Use lwpid_of.
9878 (sigchld_handler, linux_supports_non_stop, linux_async)
9879 (linux_start_non_stop): New.
9880 (linux_target_ops): Register linux_supports_non_stop, linux_async
9881 and linux_start_non_stop.
9882 (initialize_low): Install SIGCHLD handler.
9883 * thread-db.c (thread_db_create_event, find_one_thread)
9884 (thread_db_get_tls_address): Use lwpid_of.
9885 * win32-low.c (win32_detach): Adjust to use resume_kind.
9886 (win32_wait): Add `options' argument.
9887 * spu-low.c (spu_resume): Adjust to use resume_kind.
9888 (spu_wait): Add `options' argument.
9889
9890 2009-04-01 Pedro Alves <pedro@codesourcery.com>
9891
9892 Decouple target code from remote protocol.
9893
9894 * target.h (enum target_waitkind): New.
9895 (struct target_waitstatus): New.
9896 (struct target_ops) <wait>: Return an unsigned long. Take a
9897 target_waitstatus pointer instead of a char pointer.
9898 (mywait): Likewise.
9899 * target.c (mywait): Change prototype to return an unsigned long.
9900 Take a target_waitstatus pointer instead of a char pointer. Adjust.
9901 * server.h (thread_from_wait, old_thread_from_wait): Delete
9902 declarations.
9903 (prepare_resume_reply): Change prototype to take a
9904 target_waitstatus.
9905 * server.c (thread_from_wait, old_thread_from_wait): Delete.
9906 (last_status, last_ptid): New.
9907 (start_inferior): Remove "statusptr" argument. Adjust. Return a
9908 pid instead of a signal.
9909 (attach_inferior): Remove "status" and "signal" parameters.
9910 Adjust.
9911 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
9912 not as an address.
9913 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
9914 (handle_v_requests, myresume): Remove "status" and "signal"
9915 parameters. Adjust.
9916 (handle_status): New.
9917 (main): Delete local `status'. Adjust.
9918 * remote-utils.c: Include target.h.
9919 (prepare_resume_reply): Change prototype to take a
9920 target_waitstatus. Adjust.
9921
9922 * linux-low.c (linux_wait): Adjust to new target_ops->wait
9923 interface.
9924 * spu-low.c (spu_wait): Adjust.
9925 * win32-low.c (enum target_waitkind, struct target_waitstatus):
9926 Delete.
9927 (win32_wait): Adjust.
9928
9929 2009-04-01 Pedro Alves <pedro@codesourcery.com>
9930
9931 * target.h (struct thread_resume): Delete leave_stopped member.
9932 (struct target_ops): Add a `n' argument to the `resume' callback.
9933 * server.c (start_inferior): Adjust.
9934 (handle_v_cont, myresume): Adjust.
9935 * linux-low.c (check_removed_breakpoint): Adjust to resume
9936 interface change, and to removed leave_stopped field.
9937 (resume_ptr): Delete.
9938 (struct thread_resume_array): New.
9939 (linux_set_resume_request): Add new `arg' parameter. Adjust to
9940 resume interface change.
9941 (linux_continue_one_thread, linux_queue_one_thread)
9942 (resume_status_pending_p): Check if the resume field is NULL
9943 instead of checking the leave_stopped member.
9944 (linux_resume): Adjust to the target resume interface change.
9945 * spu-low.c (spu_resume): Adjust to the target resume interface
9946 change.
9947 * win32-low.c (win32_detach, win32_resume): Ditto.
9948
9949 2009-04-01 Pedro Alves <pedro@codesourcery.com>
9950
9951 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
9952 flag.
9953 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
9954 pending.
9955 (linux_continue_one_thread): Only preserve the stepping flag if
9956 there's a pending breakpoint.
9957
9958 2009-03-31 Pedro Alves <pedro@codesourcery.com>
9959
9960 * server.c (main): After the inferior having exited, call
9961 remote_close before exiting gdbserver.
9962
9963 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
9964
9965 Fix size of FPSCR in Power 7 processors.
9966 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
9967 (PPC_FEATURE_HAS_DFP): New #define.
9968 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
9969 size of the FPSCR.
9970
9971 2009-03-23 Pedro Alves <pedro@codesourcery.com>
9972
9973 * server.c (handle_query) Whitespace and formatting.
9974
9975 2009-03-22 Pedro Alves <pedro@codesourcery.com>
9976
9977 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
9978 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
9979 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
9980 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
9981 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
9982 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
9983 Makefile.in, configure.ac: Fix whitespace throughout.
9984 * configure: Regenerate.
9985
9986 2009-03-22 Pedro Alves <pedro@codesourcery.com>
9987
9988 * inferiors.c (find_inferior): Make it safe for the callback
9989 function to delete the currently iterated inferior.
9990
9991 2009-03-22 Pedro Alves <pedro@codesourcery.com>
9992
9993 * Makefile.in (linuw_low_h): Move higher.
9994 (thread-db.o): Depend on $(linux_low_h).
9995
9996 2009-03-17 Pedro Alves <pedro@codesourcery.com>
9997
9998 Rename "process" to "lwp" throughout.
9999
10000 * linux-low.c (all_processes): Rename to...
10001 (all_lwps): ... this.
10002 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
10003 (add_process): Rename to ...
10004 (add_lwp): ... this. Adjust.
10005 (linux_create_inferior): Adjust.
10006 (linux_attach_lwp): Adjust.
10007 (linux_attach): Adjust.
10008 (linux_kill_one_process): Rename to ...
10009 (linux_kill_one_lwp): ... this. Adjust.
10010 (linux_kill): Adjust.
10011 (linux_detach_one_process): Rename to ...
10012 (linux_detach_one_lwp): ... this. Adjust.
10013 (linux_detach): Adjust.
10014 (check_removed_breakpoint): Adjust.
10015 (status_pending_p): Adjust.
10016 (linux_wait_for_process): Rename to ...
10017 (linux_wait_for_lwp): ... this. Adjust.
10018 (linux_wait_for_event): Adjust.
10019 (send_sigstop): Adjust.
10020 (wait_for_sigstop): Adjust.
10021 (stop_all_processes): Rename to ...
10022 (stop_all_lwps): ... this.
10023 (linux_resume_one_process): Rename to ...
10024 (linux_resume_one_lwp): ... this. Adjust.
10025 (linux_set_resume_request, linux_continue_one_thread)
10026 (linux_queue_one_thread, resume_status_pending_p)
10027 (usr_store_inferior_registers, regsets_store_inferior_registers)
10028 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
10029 Adjust.
10030 * linux-low.h (get_process): Rename to ...
10031 (get_lwp): ... this. Adjust.
10032 (get_thread_process): Rename to ...
10033 (get_thread_lwp): ... this. Adjust.
10034 (get_process_thread): Rename to ...
10035 (get_lwp_thread): ... this. Adjust.
10036 (struct process_info): Rename to ...
10037 (struct lwp_info): ... this.
10038 (all_processes): Rename to ...
10039 (all_lwps): ... this.
10040 * proc-service.c (ps_lgetregs): Adjust.
10041 * thread-db.c (thread_db_create_event, find_one_thread)
10042 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
10043
10044 2009-03-14 Pedro Alves <pedro@codesourcery.com>
10045
10046 * server.c (handle_query): Handle "qAttached".
10047
10048 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
10049
10050 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
10051 GPLv3, update license URL.
10052
10053 2009-03-01 Doug Evans <dje@google.com>
10054
10055 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
10056 (server_h): Add gdb_signals.h.
10057 (signals.o): Update.
10058 * server.h (target_signal_from_host,target_signal_to_host_p)
10059 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
10060
10061 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
10062
10063 * remote-utils.c (getpkt): Also generate remote-debug
10064 information if noack_mode is set.
10065
10066 2009-02-06 Pedro Alves <pedro@codesourcery.com>
10067
10068 * server.c (handle_query): Report qXfer:siginfo:read and
10069 qXfer:siginfo:write as supported and handle them.
10070 * target.h (struct target_ops) <qxfer_siginfo>: New field.
10071 * linux-low.c (linux_xfer_siginfo): New.
10072 (linux_target_ops): Set it.
10073
10074 2009-01-26 Pedro Alves <pedro@codesourcery.com>
10075
10076 * server.c (gdbserver_usage): Mention --remote-debug.
10077 (main): Accept '--remote-debug' switch.
10078
10079 2009-01-18 Doug Evans <dje@google.com>
10080
10081 * regcache.c (new_register_cache): No need to check result of xcalloc.
10082 * server.c (handle_search_memory): Back out calls to xmalloc,
10083 result is checked and error is returned to user upon failure.
10084 (handle_query): Ditto. Add more checks for result of malloc.
10085 (handle_v_cont): Check result of malloc, report error back to
10086 user upon failure.
10087 (handle_v_run): Ditto. Call freeargv.
10088 * server.h (freeargv): Declare.
10089 * utils.c (freeargv): New fn.
10090
10091 2009-01-15 Doug Evans <dje@google.com>
10092
10093 * gdbreplay.c (perror_with_name): Make arg const char *.
10094 * server.h (target_signal_to_name): Make return type const char *.
10095 * thread-db.c (thread_db_err_str): Make return type const char *.
10096 * utils.c (perror_with_name): Make arg const char *.
10097
10098 2009-01-14 Pedro Alves <pedro@codesourcery.com>
10099
10100 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
10101 when handling a EXIT_PROCESS_DEBUG_EVENT.
10102
10103 2009-01-06 Joel Brobecker <brobecker@adacore.com>
10104
10105 * gdbreplay.c (gdbreplay_version): Update copyright year.
10106 * server.c (gdbserver_version): Likewise.
10107
10108 2009-01-05 Doug Evans <dje@google.com>
10109
10110 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
10111 (handle_extended_wait): Improve comment.
10112
10113 2008-12-13 Doug Evans <dje@google.com>
10114
10115 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
10116 * server.h (ATTR_MALLOC): New macro.
10117 (xmalloc,xcalloc,xstrdup): Declare.
10118 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
10119 * inferiors.c: Ditto.
10120 * linux-low.c: Ditto.
10121 * mem-break.c: Ditto.
10122 * regcache.c: Ditto.
10123 * remote-utils.c: Ditto.
10124 * server.c: Ditto.
10125 * target.c: Ditto.
10126 * win32-low.c: Ditto.
10127
10128 2008-12-12 Doug Evans <dje@google.com>
10129
10130 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
10131 in debugging printf.
10132
10133 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
10134
10135 2008-12-09 Doug Evans <dje@google.com>
10136
10137 * linux-low.h (struct process_info): Delete member tid, unused.
10138 * thread-db.c (find_one_thread): Update.
10139 (maybe_attach_thread): Update.
10140
10141 2008-12-02 Pedro Alves <pedro@codesourcery.com>
10142
10143 * target.h (struct target_ops): Add qxfer_osdata member.
10144 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
10145 and dirent.h.
10146 (linux_qxfer_osdata): New functions.
10147 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
10148 callback.
10149 * server.c (handle_query): Handle "qXfer:osdata:read:".
10150 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
10151 (buffer_xml_printf): New functions.
10152 * server.h (struct buffer): New.
10153 (buffer_grow_str, buffer_grow_str0): New macros.
10154 (buffer_grow, buffer_free, buffer_init, buffer_finish)
10155 (buffer_xml_printf): Declare.
10156
10157 2008-11-24 Doug Evans <dje@google.com>
10158
10159 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
10160
10161 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
10162
10163 * server.c (handle_v_run): Always use the supplied argument list.
10164
10165 2008-11-19 Bob Wilson <bob.wilson@acm.org>
10166
10167 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
10168 (xtensa_regmap_table): Add entry for scompare1.
10169
10170 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
10171
10172 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
10173 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
10174 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
10175 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
10176 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
10177 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
10178 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
10179 XML target descriptions.
10180 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
10181 when inferior is running on an ISA 2.05 or later processor. Add
10182 special case to return offset for full 64-bit slot of FPSCR when
10183 in 32-bits.
10184
10185 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
10186
10187 * Makefile.in (SFILES, clean): Added sparc64 files.
10188 (reg-sparc64.o, reg-sparc64.c): New.
10189 * configure.srv (sparc*-*-linux*): New configuration.
10190 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
10191 syscall arguments for SPARC.
10192 (regsets_store_inferior_registers): Likewise.
10193 * linux-sparc-low.c: New file.
10194
10195 2008-10-21 Doug Evans <dje@google.com>
10196
10197 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
10198 (READLINE_DIR,READLINE_DEP): Delete.
10199 (INTERNAL_CFLAGS): Update.
10200 (LINTFLAGS): Update.
10201
10202 2008-10-10 Pedro Alves <pedro@codesourcery.com>
10203
10204 * server.c (handle_v_run): If GDB didn't specify an argv, use the
10205 whole argv from the last run, not just argv[0].
10206
10207 2008-09-08 Pedro Alves <pedro@codesourcery.com>
10208
10209 * regcache.c (new_register_cache): Return NULL if the register
10210 cache size isn't known yet.
10211 (free_register_cache): Avoid dereferencing a NULL regcache.
10212
10213 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
10214
10215 * configure.srv: Merge MIPS and MIPS64.
10216
10217 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
10218
10219 * Makefile.in (uninstall): Apply $(EXEEXT) too.
10220
10221 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
10222
10223 * Makefile.in: Add required vsx dependencies.
10224
10225 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
10226 Declare init_registers_powerpc_vsx32l.
10227 Declare init_registers_powerpc_vsx64l.
10228 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
10229 (ppc_arch_setup): Check for VSX in hwcap.
10230 (ppc_fill_vsxregset): New function.
10231 (ppc_store_vsxregset): New function.
10232 Add new VSX entry in regset_info target_regsets.
10233
10234 * configure.srv: Add new VSX dependencies.
10235
10236 2008-08-12 Pedro Alves <pedro@codesourcery.com>
10237
10238 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
10239 (remote_open): Set or clear transport_is_reliable.
10240 (putpkt_binary): Don't expect acks in noack mode.
10241 (getpkt): Don't send ack/nac in noack mode.
10242 * server.c (handle_general_set): Handle QStartNoAckMode.
10243 (handle_query): If connected by tcp pass QStartNoAckMode+ in
10244 qSupported.
10245 (main): Reset noack_mode on every connection.
10246 * server.h (noack_mode): Declare.
10247
10248 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
10249
10250 * Makefile.in (GDBREPLAY_OBS): New variable.
10251 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
10252
10253 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
10254 Daniel Jacobowitz <dan@codesourcery.com>
10255
10256 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
10257 (usr_store_inferior_registers): Likewise.
10258 (regsets_store_inferior_registers): Likewise.
10259
10260 2008-07-31 Rolf Jansen <rj@surtec.com>
10261 Pedro Alves <pedro@codesourcery.com>
10262
10263 * configure.ac: Check for memmem declaration.
10264 * server.c [HAVE_MALLOC_H]: Include malloc.h.
10265 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
10266 (disable_packet_qfThreadInfo): Unconditionally compile.
10267 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
10268 * configure, config.in: Regenerate.
10269
10270 2008-07-28 Doug Kwan <dougkwan@google.com>
10271
10272 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
10273 (linux_write_memory): Remove declaration of errno.
10274
10275 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
10276
10277 * linux-low.c (handle_extended_wait): Do not use "status"
10278 variable uninitialized.
10279
10280 2008-07-07 Pedro Alves <pedro@codesourcery.com>
10281
10282 * server.c (handle_v_attach): Inhibit reporting dll changes.
10283
10284 2008-06-27 Pedro Alves <pedro@codesourcery.com>
10285
10286 * remote-utils.c (prepare_resume_reply): If requested, don't
10287 output "thread:TID" in the T stop reply.
10288
10289 * server.c (disable_packet_vCont, disable_packet_Tthread)
10290 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
10291 (handle_query): If requested, disable support for qC, qfThreadInfo
10292 and qsThreadInfo.
10293 (handle_v_requests): If requested, disable support for vCont.
10294 (gdbserver_show_disableable): New.
10295 (main): Handle --disable-packet and --disable-packet=LIST.
10296
10297 * server.h (disable_packet_vCont, disable_packet_Tthread)
10298 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
10299
10300 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
10301
10302 * server.c (gdbserver_usage): Mention --version.
10303
10304 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
10305
10306 * Makefile.in (gdbreplay.o): New rule.
10307
10308 2008-06-06 Joseph Myers <joseph@codesourcery.com>
10309
10310 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
10311 message, not gdbserver.
10312
10313 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
10314 Nathan Sidwell <nathan@codesourcery.com>
10315 Joseph Myers <joseph@codesourcery.com>
10316
10317 * acinclude.m4: Include ../../config/acx.m4.
10318 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
10319 * configure, config.in: Regenerate.
10320 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
10321 * server.c (gdbserver_version): Print PKGVERSION.
10322 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
10323 (main): Adjust gdbserver_usage calls.
10324 * gdbreplay.c (version, host_name): Add declarations.
10325 (gdbreplay_version, gdbreplay_usage): New.
10326 (main): Accept --version and --help options.
10327
10328 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
10329
10330 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
10331 (arm_breakpoint_at): Handle Thumb.
10332 (the_low_target): Add comment.
10333
10334 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
10335
10336 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
10337
10338 2008-05-09 Doug Evans <dje@google.com>
10339
10340 * server.h (decode_search_memory_packet): Declare.
10341 * remote-utils.c (decode_search_memory_packet): New fn.
10342 * server.c (handle_search_memory_1): New fn.
10343 (handle_search_memory): New fn.
10344 (handle_query): Process qSearch:memory packets.
10345
10346 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
10347
10348 * regcache.c (registers_length): Remove.
10349 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
10350 full register packet.
10351 * regcache.h (registers_length): Remove prototype.
10352 * server.h (PBUFSIZ): Define to 16384.
10353
10354 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
10355
10356 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
10357 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
10358 powerpc-64l.o, and powerpc-altivec64l.o.
10359 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
10360 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
10361 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
10362 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
10363 rs6000/power-linux.xml, and rs6000/power64-linux.xml
10364 to srv_xmlfiles.
10365
10366 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
10367 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
10368 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
10369 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
10370 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
10371 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
10372 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
10373 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
10374 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
10375 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
10376 (clean): Update.
10377
10378 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
10379 (init_registers_powerpc_32l): ... this new prototype.
10380 (init_registers_powerpc_32): Remove, replace by ...
10381 (init_registers_powerpc_altivec32l): ... this new prototype.
10382 (init_registers_powerpc_e500): Remove, replace by ...
10383 (init_registers_powerpc_e500l): ... this new prototype.
10384 (init_registers_ppc64): Remove, replace by ...
10385 (init_registers_powerpc_64l): ... this new prototype.
10386 (init_registers_powerpc_64): Remove, replace by ...
10387 (init_registers_powerpc_altivec64l): ... this new prototype.
10388 (ppc_num_regs): Set to 73.
10389 (PT_ORIG_R3, PT_TRAP): Define if necessary.
10390 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
10391 (ppc_cannot_store_register): Handle orig_r3 and trap.
10392 (ppc_arch_setup): Update init_registers_... calls.
10393 (ppc_fill_gregset): Handle orig_r3 and trap.
10394
10395 * inferiors.c (clear_inferiors): Reset current_inferior.
10396
10397 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
10398
10399 * acinclude.m4: Add override.m4.
10400 * configure: Regenerate.
10401
10402 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
10403
10404 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
10405 initial call to init_register_ppc64.
10406
10407 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
10408
10409 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
10410 single powerpc*-*-linux* case.
10411 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
10412
10413 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
10414
10415 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
10416 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
10417 from reg_xmlfiles.
10418 * linux-ppc-low.c: Include <elf.h>.
10419 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
10420 (ppc_hwcap): New global variable.
10421 (ppc_regmap): Remove __SPE__ #ifdef sections.
10422 (ppc_regmap_e500): New global variable.
10423 (ppc_cannot_store_register): Update __SPE__ special case.
10424 (ppc_get_hwcap): New function.
10425 (ppc_arch_setup): Use it to determine whether inferior supports
10426 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
10427 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
10428 Do not access registers if target does not support AltiVec.
10429 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
10430 Do not access registers if target does not support SPE.
10431 (target_regsets): Unconditionally include AltiVec and SPE regsets.
10432
10433 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
10434
10435 * linux-low.c (disabled_regsets, num_regsets): New.
10436 (use_regsets_p): Delete.
10437 (linux_wait_for_process): Clear disabled_regsets.
10438 (regsets_fetch_inferior_registers): Check and set it.
10439 (regsets_store_inferior_registers): Likewise.
10440 (linux_fetch_registers, linux_store_registers): Do not use
10441 use_regsets_p.
10442 (initialize_low): Allocate disabled_regsets.
10443
10444 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
10445
10446 * Makefile.in (LIBOBJS): New.
10447 (OBS): Use LIBOBJS.
10448 (memmem.o): New rule.
10449 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
10450 * configure: Regenerated.
10451
10452 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
10453
10454 * server.c (handle_query): Never return "unsupported" for
10455 qXfer:features:read queries.
10456
10457 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
10458
10459 * server.c (get_features_xml): Fix inverted condition.
10460 (handle_query): Always support qXfer:feature:read.
10461
10462 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
10463
10464 * server.c (wrapper_argv): New.
10465 (start_inferior): Handle wrapper_argv. If set, expect an extra
10466 trap.
10467 (gdbserver_usage): Document --wrapper.
10468 (main): Parse --wrapper.
10469
10470 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10471
10472 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
10473 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
10474 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
10475 (ppc_set_pc): Likewise.
10476 (ppc_arch_setup): New function.
10477 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
10478 of collect_register.
10479 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
10480
10481 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10482
10483 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
10484 instead of linux-ppc64-low.o.
10485 * linux-ppc64-low.c: Remove file.
10486 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
10487 (linux-ppc64-low.o): Remove rule.
10488
10489 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
10490 (init_registers_powerpc_64): Likewise.
10491 (ppc_regmap): Conditionally define depending on __powerpc64__.
10492 (ppc_cannot_store_register): Do not special-case "fpscr" when
10493 compiled on __powerpc64__.
10494 (ppc_collect_ptrace_register): New function.
10495 (ppc_supply_ptrace_register): New function.
10496 (ppc_breakpoint): Change type to "unsigned int".
10497 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
10498 (the_low_target): Conditionally provide initializers for the
10499 arch_setup member depending on __powerpc64__. Install
10500 collect_ptrace_register and supply_ptrace_register members.
10501
10502 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10503
10504 * regcache.h (gdbserver_xmltarget): Add extern declaration.
10505 * server.c (gdbserver_xmltarget): Define.
10506 (get_features_xml): Use it to replace "target.xml" and arch_string.
10507
10508 * configure.srv: Remove srv_xmltarget. Add XML files that were
10509 mentioned there to srv_xmlfiles instead. Remove conditional tests
10510 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
10511 srv_xmlfiles and srv_regobj to include all possible choices.
10512 * configure.ac (srv_xmltarget): Remove.
10513 (srv_xmlfiles): Do not add "target.xml".
10514 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
10515 checks for supplementary target information.
10516 * configure: Regenerate.
10517 * Makefile.in (XML_TARGET): Remove.
10518 (target.xml): Remove rule.
10519 (clean): Do not clean up target.xml.
10520 (.PRECIOUS): Do not mention target.xml.
10521
10522 * target.h (struct target_ops): Remove arch_string member.
10523 * linux-low.c (linux_arch_string): Remove.
10524 (linux_target_ops): Remove arch_string initializer.
10525 * linux-low.h (struct linux_target_ops): Remove arch_string member.
10526 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
10527 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
10528 * spu-low.c (spu_arch_string): Remove.
10529 (spu_target_ops): Remove arch_string initializer.
10530 * win32-low.c (win32_arch_string): Remove.
10531 (win32_target_ops): Remove arch_string initializer.
10532 * win32-low.h (struct win32_target_ops): Remove arch_string member.
10533 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
10534 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
10535
10536 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
10537
10538 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
10539 by collect_ptrace_register and supply_ptrace_register hooks.
10540 * linux-low.c (fetch_register): Use supply_ptrace_register callback
10541 instead of checking for the_low_target.left_pad_xfer.
10542 (usr_store_inferior_registers): Use collect_ptrace_register callback
10543 instead of checking for the_low_target.left_pad_xfer.
10544
10545 * linux-s390-low.c (s390_collect_ptrace_register): New function.
10546 (s390_supply_ptrace_register): Likewise.
10547 (s390_fill_gregset): Call s390_collect_ptrace_register.
10548 (the_low_target): Update.
10549
10550 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
10551 (ppc_supply_ptrace_register): Likewise.
10552 (the_low_target): Update.
10553
10554 * linux-i386-low.c (the_low_target): Update.
10555 * linux-x86-64-low.c (the_low_target): Update.
10556
10557 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
10558
10559 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
10560 reg-s390.o and reg-s390x.o.
10561
10562 * linux-low.c (new_inferior): New global variable.
10563 (linux_create_inferior, linux_attach): Set it.
10564 (linux_wait_for_process): Call the_low_target.arch_setup after the
10565 target has stopped for the first time.
10566 (initialize_low): Do not call the_low_target.arch_setup.
10567
10568 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
10569 (s390_set_pc): Likewise.
10570 (s390_arch_setup): New function.
10571 (the_low_target): Use s390_arch_setup as arch_setup routine.
10572
10573 * regcache.c (realloc_register_cache): New function.
10574 (set_register_cache): Call it for each existing regcache.
10575
10576 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
10577
10578 * server.h (init_registers): Remove prototype.
10579
10580 * linux-low.h (struct linux_target_ops): Add arch_setup field.
10581 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
10582 instead of init_registers ().
10583 * linux-arm-low.c (init_registers_arm): Add prototype.
10584 (init_registers_arm_with_iwmmxt): Likewise.
10585 (the_low_target): Add initializer for arch_setup field.
10586 * linux-cris-low.c (init_registers_cris): Add prototype.
10587 (the_low_target): Add initializer for arch_setup field.
10588 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
10589 (the_low_target): Add initializer for arch_setup field.
10590 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
10591 (the_low_target): Add initializer for arch_setup field.
10592 * linux-ia64-low.c (init_registers_ia64): Add prototype.
10593 (the_low_target): Add initializer for arch_setup field.
10594 * linux-m32r-low.c (init_registers_m32r): Add prototype.
10595 (the_low_target): Add initializer for arch_setup field.
10596 * linux-m68k-low.c (init_registers_m68k): Add prototype.
10597 (the_low_target): Add initializer for arch_setup field.
10598 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
10599 (init_registers_mips64_linux): Likewise.
10600 (the_low_target): Add initializer for arch_setup field.
10601 * linux-ppc-low.c (init_registers_ppc): Add prototype.
10602 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
10603 (the_low_target): Add initializer for arch_setup field.
10604 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
10605 (init_registers_powerpc_64): Likewise.
10606 (the_low_target): Add initializer for arch_setup field.
10607 * linux-s390-low.c (init_registers_s390): Add prototype.
10608 (init_registers_s390x): Likewise.
10609 (the_low_target): Add initializer for arch_setup field.
10610 * linux-sh-low.c (init_registers_sh): Add prototype.
10611 (the_low_target): Add initializer for arch_setup field.
10612 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
10613 (the_low_target): Add initializer for arch_setup field.
10614 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
10615 (the_low_target): Add initializer for arch_setup field.
10616
10617 * win32-low.h (struct win32_target_ops): Add arch_setup field.
10618 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
10619 instead of init_registers ().
10620 * win32-arm-low.c (init_registers_arm): Add prototype.
10621 (the_low_target): Add initializer for arch_setup field.
10622 * win32-i386-low.c (init_registers_i386): Add prototype.
10623 (the_low_target): Add initializer for arch_setup field.
10624
10625 * spu-low.c (init_registers_spu): Add prototype.
10626 (initialize_low): Call initialie_registers_spu () instead of
10627 initialize_registers ().
10628
10629 2008-02-19 Pedro Alves <pedro@codesourcery.com>
10630
10631 * server.c (handle_v_requests): When handling the vRun and vAttach
10632 packets, if already debugging a process, don't kill it. Return an
10633 error instead.
10634
10635 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
10636
10637 * server.c (handle_query): Correct length check.
10638
10639 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
10640
10641 * win32-low.c (do_initial_child_stuff): Add process handle
10642 parameter. Set current_process_handle and current_process_id from the
10643 parameters. Clear globals.
10644 (win32_create_inferior): Don't set current_process_handle and
10645 current_process_id here. Instead pass them on the call to
10646 do_initial_child_stuff.
10647 (win32_attach): Likewise.
10648 (win32_clear_inferiors): New.
10649 (win32_kill): Don't close the current process handle or the
10650 current thread handle here. Instead call win32_clear_inferiors.
10651 (win32_detach): Don't open a new handle to the process. Call
10652 win32_clear_inferiors.
10653 (win32_join): Don't rely on current_process_handle; open a new
10654 handle using the process id.
10655 (win32_wait): Call win32_clear_inferiors when the inferior process
10656 has exited.
10657
10658 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
10659
10660 * server.c (monitor_show_help): Add "exit".
10661
10662 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
10663
10664 * Makefile.in (SFILES): Add linux-xtensa-low.c.
10665 (clean): Add reg-xtensa.c.
10666 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
10667 * configure.srv (xtensa*-*-linux*) New target.
10668 * linux-xtensa-low.c: New.
10669 * xtensa-xtregs.c: New.
10670
10671 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
10672
10673 * hostio.c: Don't include errno.h.
10674 (errno_to_fileio_errno): Move to hostio-errno.
10675 * hostio.c: (hostio_error): Remove the error parameter. Defer the
10676 error number outputting to the target->hostio_last_error callback.
10677 (hostio_packet_error): Use FILEIO_EINVAL directly.
10678 (handle_open, handle_pread, hostio_error, handle_unlink): Update
10679 calls to hostio_error.
10680 * hostio-errno.c: New.
10681 * server.h (hostio_last_error_from_errno): Declare.
10682 * target.h (target_ops): Add hostio_last_error member.
10683 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
10684 as hostio_last_error handler.
10685 * spu-low.c (spu_target_ops): Likewise.
10686 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
10687 (wince_hostio_last_error): New functions.
10688 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
10689 as hostio_last_error handler.
10690 (win32_target_ops) [!_WIN32_WCE]: Register
10691 hostio_last_error_from_errno as hostio_last_error handler.
10692 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
10693 (hostio-errno.o): New rule.
10694 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
10695 * configure.srv (srv_hostio_err_objs): New variable. Default to
10696 hostio-errno.o.
10697 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
10698 * configure: Regenerate.
10699
10700 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
10701
10702 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
10703 (linux_kill, linux_detach): Clean up the process list.
10704 * remote-utils.c (remote_open): Improve port number parsing.
10705 (putpkt_binary, input_interrupt): Only send interrupts if the target
10706 is running.
10707 * server.c (extended_protocol): Make static.
10708 (attached): Define earlier.
10709 (exit_requested, response_needed, program_argv): New variables.
10710 (target_running): New.
10711 (start_inferior): Clear attached here.
10712 (attach_inferior): Set attached here.
10713 (require_running): Define.
10714 (handle_query): Use require_running and target_running. Implement
10715 "monitor exit".
10716 (handle_v_attach, handle_v_run): New.
10717 (handle_v_requests): Use require_running. Handle vAttach and vRun.
10718 (gdbserver_usage): Update.
10719 (main): Redo argument parsing. Handle --debug and --multi. Handle
10720 --attach along with other options or after the port. Save
10721 program_argv. Support no initial program. Resynchronize
10722 communication with GDB after an error. Handle "monitor exit".
10723 Use require_running and target_running. Always allow the extended
10724 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
10725 restart in extended mode.
10726 * README: Refer to the GDB manual. Update --attach usage.
10727
10728 2007-12-20 Andreas Schwab <schwab@suse.de>
10729
10730 * linux-low.c (STACK_SIZE): Define.
10731 (linux_tracefork_child): Use it. Use __clone2 on ia64.
10732 (linux_test_for_tracefork): Likewise.
10733
10734 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
10735
10736 * linux-low.c (linux_wait_for_event): Update messages. Do not
10737 reinsert auto-delete breakpoints.
10738 * mem-break.c (struct breakpoint): Change return type of handler to
10739 int.
10740 (set_breakpoint_at): Update handler type.
10741 (reinsert_breakpoint_handler): Return 1 instead of calling
10742 delete_breakpoint.
10743 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
10744 setting a new one.
10745 (check_breakpoints): Delete auto-delete breakpoints and return 2.
10746 * mem-break.h (set_breakpoint_at): Update handler type.
10747 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
10748 * win32-low.c (auto_delete_breakpoint): New.
10749 (get_child_debug_event): Use it.
10750
10751 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
10752
10753 * configure.ac: Check for pread and pwrite.
10754 * hostio.c (handle_pread): Fall back to lseek and read.
10755 (handle_pwrite): Fall back to lseek and write.
10756 * config.in, configure: Regenerated.
10757
10758 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
10759
10760 * server.c (myresume): Add own_buf argument.
10761 (main): Update calls.
10762
10763 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
10764
10765 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
10766 * remote-utils.c (remote_open): Do not call disable_async_io.
10767 (block_async_io): Delete.
10768 (unblock_async_io): Make static.
10769 (initialize_async_io): New.
10770 * server.c (handle_v_cont): Handle async I/O here.
10771 (myresume): Likewise. Move other common resume tasks here...
10772 (main): ... from here. Call initialize_async_io. Disable async
10773 I/O before the main loop.
10774 * server.h (initialize_async_io): Declare.
10775 (block_async_io, unblock_async_io): Delete prototypes.
10776 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
10777
10778 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
10779
10780 * remote-utils.c (readchar): Allow binary data in received messages.
10781
10782 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10783
10784 * win32-low.c (attaching): New global.
10785 (win32_create_inferior): Clear the `attaching' global.
10786 (win32_attach): Set the `attaching' global.
10787 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
10788 attaching. Only set a breakpoint at the entry point if not
10789 attaching.
10790
10791 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10792
10793 * server.c (main): Don't report dll events on the initial
10794 connection on attaches.
10795
10796 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10797
10798 * server.c (main): Relax numerical bases supported for the pid of
10799 the --attach command line argument.
10800
10801 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10802
10803 * win32-low.c (win32_attach): Call OpenProcess before
10804 DebugActiveProcess, not after. Add last error output to error
10805 call.
10806
10807 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10808
10809 * win32-low.c (win32_get_thread_context)
10810 (win32_set_thread_context): New functions.
10811 (thread_rec): Use win32_get_thread_context.
10812 (continue_one_thread, win32_resume): Use win32_set_thread_context.
10813 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
10814 field.
10815
10816 2007-12-03 Leo Zayas
10817 Pedro Alves <pedro_alves@portugalmail.pt>
10818
10819 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
10820 global variables.
10821 (child_add_thread): Minor cleanup.
10822 (child_continue): Resume artificially suspended threads before
10823 calling ContinueDebugEvent.
10824 (suspend_one_thread): New.
10825 (fake_breakpoint_event): New.
10826 (get_child_debug_event): Change return type to int. Check here if
10827 gdb sent an interrupt request. If a soft interrupt was requested,
10828 fake a breakpoint event. Return 0 if there is no event to handle,
10829 and 1 otherwise.
10830 (win32_wait): Don't check here if gdb sent an interrupt request.
10831 Ensure there is a valid event to handle.
10832 (win32_request_interrupt): Add soft interruption method as last
10833 resort.
10834
10835 2007-12-03 Leo Zayas
10836 Pedro Alves <pedro_alves@portugalmail.pt>
10837
10838 * win32-low.h (win32_thread_info): Add descriptions to the
10839 structure members. Replace `suspend_count' counter by a
10840 `suspended' flag.
10841 * win32-low.c (thread_rec): Update condition of when to get the
10842 context from the inferior. Rely on ContextFlags being set if it
10843 has already been retrieved. Only suspend the inferior thread if
10844 we haven't already. Warn if that fails.
10845 (continue_one_thread): s/suspend_count/suspended/. Only call
10846 ResumeThread once. Warn if that fails.
10847
10848 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
10849
10850 * win32-low.c (win32_wait): Don't read from the inferior when it
10851 has already exited.
10852
10853 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
10854
10855 * Makefile.in (win32_low_h): New variable.
10856 (win32-low.o): Add dependency on $(win32_low_h).
10857 (win32-arm-low.o, win32-i386-low.o): New rules.
10858
10859 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
10860
10861 * hostio.c: Correct copyright year.
10862
10863 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
10864
10865 * Makefile.in (OBS): Add hostio.o.
10866 (hostio.o): New rule.
10867 * server.h (handle_vFile): Declare.
10868 * hostio.c: New file.
10869 * server.c (handle_v_requests): Take packet_len and new_packet_len
10870 for binary packets. Call handle_vFile.
10871 (main): Update call to handle_v_requests.
10872
10873 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
10874
10875 * linux-low.c: Include <sched.h>.
10876
10877 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
10878
10879 * linux-low.c (linux_tracefork_grandchild): New.
10880 (linux_tracefork_child): Use clone.
10881 (linux_test_for_tracefork): Use clone; allocate and free a stack.
10882
10883 2007-10-31 Joel Brobecker <brobecker@adacore.com>
10884
10885 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
10886
10887 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
10888
10889 * linux-low.c (handle_extended_wait): Handle unexpected signals.
10890
10891 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
10892
10893 * inferiors.c (change_inferior_id): Delete.
10894 (add_pid_to_list, pull_pid_from_list): New.
10895 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
10896 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
10897 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
10898 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
10899 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
10900 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
10901 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
10902 (using_threads): Always set to 1.
10903 (handle_extended_wait): New.
10904 (add_process): Do not set TID.
10905 (linux_create_inferior): Set must_set_ptrace_flags.
10906 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
10907 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
10908 (linux_thread_alive): Rename TID argument to LWPID.
10909 (linux_wait_for_process): Handle unknown processes. Do not use TID.
10910 (linux_wait_for_event): Do not use TID or check using_threads. Update
10911 call to dead_thread_notify. Call handle_extended_wait.
10912 (linux_create_inferior): Use PTRACE_SETOPTIONS.
10913 (send_sigstop): Delete sigstop_sent.
10914 (wait_for_sigstop): Avoid TID.
10915 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
10916 (linux_test_for_tracefork): New.
10917 (linux_lookup_signals): Use thread_db_active and
10918 linux_supports_tracefork_flag.
10919 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
10920 * linux-low.h (get_process_thread): Avoid TID.
10921 (struct process_ifo): Move thread_known and tid to the end. Remove
10922 sigstop_sent.
10923 (linux_attach_lwp, thread_db_init): Update prototypes.
10924 * server.h (change_inferior_id): Delete prototype.
10925 (add_pid_to_list, pull_pid_from_list): New prototypes.
10926 * thread-db.c (thread_db_use_events): New.
10927 (find_first_thread): Rename to...
10928 (find_one_thread): ...this. Update callers and messages. Do not
10929 call fatal. Check thread_db_use_events. Do not call
10930 change_inferior_id or new_thread_notify.
10931 (maybe_attach_thread): Update. Do not call new_thread_notify.
10932 (thread_db_init): Set thread_db_use_events. Check use_events.
10933 * utils.c (fatal, warning): Correct message prefix.
10934
10935 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
10936
10937 * Makefile.in (clean): Remove new files.
10938 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
10939 (powerpc-64.o, powerpc-64.c): New rules.
10940 * configure.srv: Use alternate register sets for powerpc64-*-linux*
10941 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
10942 with SPE.
10943 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
10944 SPE targets.
10945 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
10946 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
10947 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
10948 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
10949 (target_regsets): Add AltiVec and SPE register sets.
10950 * configure.ac: Check for AltiVec and SPE.
10951 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
10952 (ppc_fill_vrregset, ppc_store_vrregset): New.
10953 (target_regsets): Add AltiVec register set.
10954 * configure: Regenerated.
10955
10956 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
10957
10958 * linux-low.c (O_LARGEFILE): Define.
10959 (linux_read_memory): Use /proc/PID/mem.
10960 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
10961 * configure, config.in: Regenerated.
10962
10963 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
10964
10965 * linux-low.c (linux_wait_for_event): Do not pass signals while
10966 single-stepping.
10967
10968 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
10969
10970 * win32-low.c (create_process): New.
10971 (win32_create_inferior): Use create_process instead of
10972 CreateProcess. If create_process failed retry appending an ".exe"
10973 suffix. Store the GetLastError result immediatelly after
10974 create_process calls and use it on the call to error.
10975
10976 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
10977
10978 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
10979
10980 2007-08-23 Joel Brobecker <brobecker@adacore.com>
10981
10982 * configure.ac: Switch license to GPLv3.
10983
10984 2007-08-01 Michael Snyder <msnyder@access-company.com>
10985
10986 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
10987
10988 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
10989
10990 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
10991 typedef.
10992 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
10993 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
10994 CloseToolhelp32Snapshot.
10995 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
10996 CloseToolhelp32Snapshot.
10997
10998 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
10999
11000 * server.c (main): Check for inferior exit before main loop.
11001
11002 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
11003
11004 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
11005 instead of on tmp_desc.
11006
11007 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
11008 Daniel Jacobowitz <dan@codesourcery.com>
11009
11010 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
11011 (add_thread): Minor cleanups.
11012 (clear_inferiors): Move lower in the file. Clear the DLL
11013 list.
11014 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
11015 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
11016 (xml_escape_text): New.
11017 * server.c (handle_query): Handle qXfer:libraries:read. Report it
11018 for qSupported.
11019 (handle_v_cont): Report errors.
11020 (gdbserver_version): Update.
11021 (main): Correct size of own_buf. Do not report initial DLL events.
11022 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
11023 (unloaded_dll, xml_escape_text): New.
11024 * win32-low.c (enum target_waitkind): Update comments.
11025 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
11026 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
11027 (win32_EnumProcessModules, win32_GetModuleInformation)
11028 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
11029 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
11030 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
11031 (win32_Module32First, win32_Module32Next, load_toolhelp)
11032 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
11033 (get_child_debug_event): Handle DLL events.
11034 (win32_wait): Likewise.
11035
11036 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
11037
11038 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
11039 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
11040
11041 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
11042
11043 * win32-low.c (handle_output_debug_string): Ignore event if not
11044 waiting.
11045
11046 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
11047
11048 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
11049
11050 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
11051
11052 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
11053
11054 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
11055
11056 * inferiors.c (change_inferior_id): Add comment.
11057 * linux-low.c (check_removed_breakpoint): Add an early
11058 prototype. Improve debug output.
11059 (linux_attach): Doc update.
11060 (linux_detach_one_process, linux_detach): Clean up before releasing
11061 each process.
11062 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
11063 * linux-low.h (struct process_info): Doc improvement.
11064 * mem-break.c (delete_all_breakpoints): New.
11065 * mem-break.h (delete_all_breakpoints): New prototype.
11066 * thread-db.c (find_first_thread): New.
11067 (thread_db_create_event): Call it instead of
11068 thread_db_find_new_threads. Clean up unused variables.
11069 (maybe_attach_thread): Remove first thread handling.
11070 (thread_db_find_new_threads): Use find_first_thread.
11071 (thread_db_get_tls_address): Likewise.
11072
11073 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
11074
11075 * thread-db.c (thread_db_find_new_threads): Add prototype.
11076 (thread_db_create_event): Check for the main thread before adding
11077 a new thread.
11078 (maybe_attach_thread): Only enable event reporting if TID == 0.
11079 (thread_db_get_tls_address): Check for new threads.
11080
11081 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
11082
11083 * linux-low.c (linux_create_inferior): Try execv before execvp.
11084 * spu-low.c (spu_create_inferior): Likewise.
11085
11086 2007-06-13 Mike Frysinger <vapier@gentoo.org>
11087
11088 * linux-low.c (linux_create_inferior): Change execv to execvp.
11089 * spu-low.c (spu_create_inferior): Likewies.
11090
11091 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
11092
11093 * Makefile.in (clean): Clean new files instead of deleted ones.
11094 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
11095 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
11096 rules.
11097 * configure.srv: Specify XML files and new regformats for MIPS and
11098 MIPS64 GNU/Linux.
11099 * linux-mips-low.c (mips_num_regs): Set to only used registers.
11100 (mips_regmap): Do not fetch $0. Remove unused registers. Add
11101 an entry for the restart register.
11102 (mips_cannot_fetch_register, mips_cannot_store_register)
11103 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
11104 register names to match the XML descriptions.
11105 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
11106 restart register instead of $0.
11107
11108 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
11109 Markus Deuling <deuling@de.ibm.com>
11110
11111 * remote-utils.c (decode_xfer_write): New function.
11112 * server.h (decode_xfer_write): Add prototype.
11113 * server.c (handle_query): Add PACKET_LEN argument. Support
11114 qXfer:spu:read and qXfer:spu:write packets.
11115 (main): Pass packet_len to handle_query.
11116 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
11117 * target.h (target_ops): Add qxfer_spu.
11118
11119 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
11120
11121 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
11122 accessing non-seekable spufs files.
11123
11124 2007-05-16 Markus Deuling <deuling@de.ibm.com>
11125
11126 * server.c (handle_query): Add reply for qC packet.
11127
11128 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11129 Leo Zayas <lerele@champenstudios@com>
11130
11131 * server.h (check_remote_input_interrupt_request): New function.
11132 * remote_utils.c (INVALID_DESCRIPTOR): New define.
11133 (remote_desc): Initialize with INVALID_DESCRIPTOR.
11134 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
11135 (check_remote_input_interrupt_request): New function.
11136 * server.h (check_remote_input_interrupt_request): Declare.
11137 * win32-low.c (winapi_DebugBreakProcess,
11138 winapi_GenerateConsoleCtrlEvent): New typedefs.
11139 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
11140 to 250 ms.
11141 (win32_wait): Check for remote interrupt request
11142 with check_remote_input_interrupt_request.
11143 (win32_request_interrupt): New function.
11144 (win32_target_op): Set request_interrupt to win32_request_interrupt.
11145
11146 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11147
11148 * win32-low.c (debug_registers_changed,
11149 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
11150 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
11151 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
11152 (thread_rec): Get context using the low target.
11153 (child_add_thread): Call thread_added on the low target,
11154 which does the same thing.
11155 (regptr): Delete.
11156 (do_initial_child_stuff): Remove debug registers references.
11157 Set context using the low target. Resume threads after
11158 setting the contexts.
11159 (child_continue): Remove dead variable. Remove debug
11160 registers references.
11161 (child_fetch_inferior_registers): Go through the low target.
11162 (do_child_store_inferior_registers): Remove.
11163 (child_store_inferior_registers): Go through the low target.
11164 (win32_resume): Remove debug registers references.
11165 Set context using the low target.
11166 (handle_exception): Change return type to void. Don't record
11167 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
11168 first chance exception.
11169 (get_child_debug_event): Change return type to void. Remove
11170 goto loop. Always return after waiting for debug event.
11171 (win32_wait): Convert to switch statement. Handle spurious
11172 events.
11173
11174 * win32-i386-low.c (debug_registers_changed,
11175 debug_registers_used): New.
11176 (initial_stuff): Rename to ...
11177 (i386_initial_stuff): ... this. Clear debug registers
11178 state variables.
11179 (store_debug_registers): Delete.
11180 (i386_get_thread_context): New.
11181 (load_debug_registers): Delete.
11182 (i386_set_thread_context): New.
11183 (i386_thread_added): New.
11184 (single_step): Rename to ...
11185 (i386_single_step): ... this.
11186 (do_fetch_inferior_registers): Rename to ...
11187 (i386_fetch_inferior_register): ... this.
11188 (i386_store_inferior_register): New.
11189 (the_low_target): Adapt to new interface.
11190
11191 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
11192 (arm_get_thread_context): New.
11193 (arm_set_thread_context): New.
11194 (regptr): New.
11195 (do_fetch_inferior_registers): Rename to ...
11196 (arm_fetch_inferior_register): ... this.
11197 (arm_store_inferior_register): New.
11198 (arm_wince_breakpoint): Reimplement as unsigned long.
11199 (arm_wince_breakpoint_len): Define.
11200 (the_low_target): Adapt to new interface.
11201
11202 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
11203 load_debug_registers. Add get_thread_context, set_thread_context,
11204 thread_added and store_inferior_register. Rename
11205 fetch_inferior_registers to fetch_inferior_register.
11206 (regptr): Remove declaration.
11207
11208 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11209
11210 * linux-low.c (linux_detach): Change return type to int. Return 0.
11211 * spu-low.c (spu_detach): Likewise.
11212
11213 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11214
11215 * target.h (target_ops): Change return type of detach to int.
11216 Add join.
11217 (join_inferior): New.
11218 * server.c (main): Don't skip detach support on mingw32.
11219 If the inferior doesn't support detaching return error.
11220 Call join_inferior instead of using waitpid.
11221 * linux-low.c (linux_join): New.
11222 (linux_target_op): Add linux_join.
11223 * spu-low.c (spu_join): New.
11224 (spu_target_ops): Add spu_join.
11225 * win32-low.c (win32_detach): Adapt to new interface.
11226 Reopen current_process_handle before detaching. Issue a child
11227 resume before detaching.
11228 (win32_join): New.
11229 (win32_target_op): Add win32_join.
11230
11231 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11232
11233 * win32-low.c (win32-attach): Fix return value.
11234 * target.h (target_ops): Describe ATTACH return values.
11235
11236 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11237
11238 * win32-low.c (GETPROCADDRESS): Define.
11239 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
11240 (winapi_DebugSetProcessKillOnExit): Likewise.
11241 (win32_create_inferior): Force usage of ansi CreateProcessA.
11242 (win32_attach): Use GETPROCADDRESS.
11243 (win32_detach): Likewise.
11244
11245 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11246
11247 * win32-low.c (win32_wait): Don't use WSTOPSIG.
11248
11249 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
11250
11251 * win32-low.c: Commit leftover changes from 2007-03-29.
11252
11253 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
11254
11255 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
11256 fields short instead of int. Add explicit padding.
11257 (i387_cache_to_fsave): Remove unnecessary casts.
11258 (i387_fsave_to_cache): Doc fix.
11259 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
11260
11261 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
11262
11263 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
11264 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
11265
11266 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
11267
11268 * configure.srv (arm*-*-mingw32ce*): Move near the other
11269 arm targets.
11270
11271 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
11272
11273 * configure.ac: Add errno checking.
11274 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
11275 sys/file.h and malloc.h.
11276 (AC_CHECK_DECLS): Add perror.
11277 (srv_mingwce): Handle.
11278 * configure.srv (i[34567]86-*-cygwin*): Add
11279 win32-i386-low.o to srv_tgtobj.
11280 (i[34567]86-*-mingw*): Likewise.
11281 (arm*-*-mingw32ce*): Add case.
11282 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
11283 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
11284 [__MINGW32CE__] (strerror): New function.
11285 [__MINGW32CE__] (errno): Define to GetLastError.
11286 [__MINGW32CE__] (COUNTOF): New macro.
11287 (remote_open): Remove extra close call.
11288 * mem-break.c (delete_breakpoint_at): New function.
11289 * mem-break.h (delete_breakpoint_at): Declare.
11290 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
11291 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
11292 [USE_WIN32API] (read, write): Add char* casts.
11293 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
11294 * server.h: Include wincecompat.h on Windows CE.
11295 [HAVE_ERRNO_H]: Check.
11296 (perror): Declare if not declared.
11297 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
11298 (perror_with_name): Remove errno declaration.
11299 * wincecompat.h: New.
11300 * wincecompat.c: New.
11301 * win32-low.h: New.
11302 * win32-arm-low.c: New.
11303 * win32-i386-low.c: New.
11304 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
11305 (OUTMSG2): Make it safe.
11306 (_T): New macro.
11307 (COUNTOF): New macro.
11308 (NUM_REGS): Get it from the low target.
11309 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
11310 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
11311 (thread_rec): Let low target handle debug registers.
11312 (child_add_thread): Likewise.
11313 (child_init_thread_list): Likewise.
11314 (continue_one_thread): Likewise.
11315 (regptr): New.
11316 (do_child_fetch_inferior_registers): Move to ...
11317 * win32-i386-low.c: ... here, and rename to ...
11318 (do_fetch_inferior_registers): ... this.
11319 * win32-low.c (child_fetch_inferior_registers):
11320 Go through the low target.
11321 (do_child_store_inferior_registers): Use regptr.
11322 (strwinerror): New function.
11323 (win32_create_inferior): Handle Windows CE.
11324 Use strwinerror instead of strerror on Windows error
11325 codes. Add program to the error output.
11326 Don't close the main thread handle on Windows CE.
11327 (win32_attach): Use coredll.dll on Windows CE.
11328 (win32_kill): Close current process and current
11329 thread handles.
11330 (win32_detach): Use coredll.dll on Windows CE.
11331 (win32_resume): Let low target handle debug registers, and
11332 step request.
11333 (handle_exception): Add/Remove initial breakpoint. Avoid
11334 non-existant WSTOPSIG on Windows CE.
11335 (win32_read_inferior_memory): Cast to remove warning.
11336 (win32_arch_string): Go through the low target.
11337 (initialize_low): Call set_breakpoint_data with the low
11338 target's breakpoint.
11339 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
11340 FOP_REGNUM, mappings): Move to ...
11341 * win32-i386-low.c: ... here.
11342 * win32-low.c (win32_thread_info): Move to ...
11343 * win32-low.h: ... here.
11344 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
11345 win32-arm-low.c and wincecompat.c.
11346 (all:): Add $EXEEXT.
11347 (install-only:): Likewise.
11348 (gdbserver:): Likewise.
11349 (gdbreplay:): Likewise.
11350 * config.in: Regenerate.
11351 * configure: Regenerate.
11352
11353 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
11354
11355 * win32-low.c: Rename typedef thread_info to
11356 win32_thread_info throughout.
11357
11358 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
11359
11360 * win32-i386-low.c: Rename to ...
11361 * win32-low.c: ... this.
11362 * configure.srv: Replace win32-i386-low.o with win32-low.o.
11363 * Makefile.in: Likewise.
11364
11365 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
11366
11367 * remote-utils.c (monitor_output): Constify msg parameter.
11368 * server.h (monitor_output): Likewise.
11369 * win32-i386-low.c (handle_output_debug_string): New.
11370 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
11371 handle_output_debug_string.
11372 (get_child_debug_event): Likewise.
11373
11374 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
11375
11376 * server.c (main): Correct strtoul check.
11377
11378 2007-03-27 Jon Ringle <jon@ringle.org>
11379
11380 * linux-low.c: Check __ARCH_HAS_MMU__ also.
11381
11382 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
11383
11384 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
11385
11386 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
11387
11388 * terminal.h: Check HAVE_SGTTY_H.
11389
11390 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
11391
11392 * remote-utils.c (remote_open): Print out the assigned port number.
11393
11394 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
11395
11396 * remote-utils.c (monitor_output): New function.
11397 * server.c (debug_threads): Define here.
11398 (monitor_show_help): New function.
11399 (handle_query): Handle qRcmd.
11400 (main): Do not handle 'd' packet.
11401 * server.h (debug_threads, remote_debug, monitor_output): Declare.
11402 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
11403 of debug_threads.
11404
11405 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11406
11407 * Makefile.in (EXEEXT): New.
11408 (clean): Use $(EXEEXT).
11409
11410 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11411
11412 * target.h (target_ops): Rename send_signal to request_interrupt,
11413 and remove enum target_signal parameter.
11414 * linux-low.c (linux_request_interrupt): Rename from
11415 linux_send_signal, and always send SIGINT.
11416 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
11417 and always send SIGINT.
11418 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
11419 of send_signal.
11420 (input_interrupt): Likewise.
11421
11422 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11423
11424 * server.c (get_features_xml): Check if target implemented
11425 arch_string.
11426 * win32-i386-low.c (win32_arch_string): New.
11427 (win32_target_ops): Add win32_arch_string as arch_string member.
11428
11429 2007-02-22 Markus Deuling <deuling@de.ibm.com>
11430
11431 * spu-low.c (spu_arch_string): New.
11432 (spu_target_ops): Add spu_arch_string.
11433
11434 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
11435
11436 * remote-utils.c: Remove HAVE_TERMINAL_H check.
11437 * configure.ac: Do not check for terminal.h.
11438 * configure, config.in: Regenerated.
11439
11440 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
11441
11442 * Makefile.in (OBS): Add $(XML_BUILTIN).
11443 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
11444 (clean): Update.
11445 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
11446 (arm-with-iwmmxt.c): New.
11447 * config.in, configure: Regenerate.
11448 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
11449 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
11450 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
11451 (arm*-*-linux*): Add iWMMXt and regset support.
11452 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
11453 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
11454 (arm_store_wmmxregset, target_regsets): New.
11455 * server.c (get_features_xml): Take annex argument. Check builtin
11456 XML documents.
11457 (handle_query): Handle multiple annexes.
11458
11459 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11460
11461 * remote-utils.c [USE_WIN32API] (read, write): Define.
11462 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
11463 write.
11464
11465 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
11466
11467 * linux-i386-low.c (the_low_target): Set arch_string.
11468 * linux-x86-64-low.c (the_low_target): Likewise.
11469 * linux-low.c (linux_arch_string): New.
11470 (linux_target_ops): Add it.
11471 * linux-low.h (struct linux_target_ops): Add arch_string.
11472 * server.c (write_qxfer_response): Use const void * for DATA.
11473 (get_features_xml): New.
11474 (handle_query): Handle qXfer:features:read. Report it for qSupported.
11475 * target.h (struct target_ops): Add arch_string method.
11476
11477 2007-01-03 Denis Pilat <denis.pilat@st.com>
11478 Daniel Jacobowitz <dan@codesourcery.com>
11479
11480 * linux-low.c (linux_kill): Handle being called with no threads.
11481 * win32-i386-low.c (win32_kill): Likewise.
11482 (get_child_debug_event): Clear current_process_handle.
11483
11484 2006-12-30 Denis PILAT <denis.pilat@st.com>
11485 Daniel Jacobowitz <dan@codesourcery.com>
11486
11487 * remote-utils.c (remote_open): Check the type of specified
11488 serial port devices before opening them.
11489 * server.c (main): Kill the inferior if an error occurs during
11490 the first remote_open.
11491
11492 2006-12-05 Markus Deuling <deuling@de.ibm.com>
11493
11494 * README: Update supported targets.
11495
11496 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
11497
11498 * Makefile.in (clean): Remove reg-mips64.c.
11499 (reg-mips64.c, reg-mips64.o): New rules.
11500 * configure.srv: Handle mips64. Include regset support for mips.
11501 * linux-mips-low.c (union mips_register): New.
11502 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
11503 (mips_breakpoint, mips_breakpoint_at): Use int.
11504 (mips_collect_register, mips_supply_register)
11505 (mips_collect_register_32bit, mips_supply_register_32bit)
11506 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
11507 (mips_store_fpregset, target_regsets): New.
11508 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
11509
11510 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
11511
11512 * configure.srv: Add target "spu*-*-*".
11513 * Makefile.in (clean): Remove reg-spu.c.
11514 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
11515 * spu-low.c: New file.
11516
11517 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
11518
11519 * configure.ac: Correct td_thr_tls_get_addr test.
11520 * configure: Regenerated.
11521
11522 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
11523
11524 * linux-low.c (linux_wait_for_event): Reformat. Use the
11525 pass_signals array.
11526 * remote-utils.c (decode_address_to_semicolon): New.
11527 * server.c (pass_signals, handle_general_set): New.
11528 (handle_query): Mention QPassSignals for qSupported.
11529 (main): Call handle_general_set.
11530 * server.h (pass_signals, decode_address_to_semicolon): New.
11531
11532 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
11533
11534 * server.c (handle_query): Correct error handling for read_auxv.
11535
11536 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
11537
11538 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
11539 and srv_linux_thread_db to yes.
11540 * linux-s390-low.c (s390_fill_gregset): New function.
11541 (target_regsets): Define data structure.
11542
11543 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
11544
11545 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
11546 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
11547 * config.in, configure: Regenerated.
11548 * inferiors.c (gdb_id_to_thread): New function.
11549 (gdb_id_to_thread_id): Use it.
11550 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
11551 * linux-low.h (struct process_info): Add th member.
11552 (thread_db_get_tls_address): New prototype.
11553 * remote-utils.c (decode_address): Make non-static.
11554 * server.c (handle_query): Handle qGetTLSAddr.
11555 * server.h (gdb_id_to_thread, decode_address): New prototypes.
11556 * target.h (struct target_ops): Add get_tls_address.
11557 * thread-db.c (maybe_attach_thread): Save the thread handle.
11558 (thread_db_get_tls_address): New.
11559
11560 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
11561
11562 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
11563 (linux_resume_one_process): Take a siginfo_t *. Update all
11564 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
11565 (struct pending_signals): Add a siginfo_t.
11566 (linux_wait_for_process): Always set last_status.
11567 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
11568 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
11569 * linux-low.h (struct process_info): Add last_status.
11570
11571 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
11572
11573 * remote-utils.c (try_rle): New function.
11574 (putpkt_binary): Use it.
11575
11576 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
11577
11578 * Makefile.in (clean): Clean reg-x86-64-linux.c.
11579 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
11580 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
11581 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
11582 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
11583 point registers.
11584
11585 2006-08-08 Richard Sandiford <richard@codesourcery.com>
11586
11587 * server.c (terminal_fd): New variable.
11588 (old_foreground_pgrp): Likewise.
11589 (restore_old_foreground_pgrp): New function.
11590 (start_inferior): Record the terminal file descriptor in terminal_fd
11591 and its original foreground group in old_foreground_pgrp. Register
11592 restore_old_foreground_pgrp with atexit().
11593
11594 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
11595
11596 * server.c (handle_query): Correct qPart to qXfer.
11597
11598 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
11599
11600 * configure.ac: Check for more headers which are missing on
11601 Windows. Automatically supply -lwsock32 and USE_WIN32API.
11602 * configure.srv: Add Cygwin and mingw32.
11603 * remote-utils.c: Don't include headers unconditionally which
11604 are missing on mingw32. Include <winsock.h> for mingw32.
11605 (remote_open): Adjust for mingw32 support. Flush
11606 standard error after writing to it.
11607 (remote_close, putpkt_binary, input_interrupt, block_async_io)
11608 (unblock_async_io, enable_async_io, disable_async_io)
11609 (readchar, getpkt): Update for Winsock support.
11610 (prepare_resume_reply): Expect a protocol signal number.
11611 * server.c: Disable <sys/wait.h> on mingw32.
11612 (start_inferior): Adjust for mingw32 support. Flush
11613 standard error after writing to it.
11614 (attach_inferior): Likewise. Use protocol signal
11615 numbers.
11616 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
11617 and names.
11618 * win32-i386-low.c: New file.
11619 * Makefile.in (XM_CLIBS): Set.
11620 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
11621 (win32-i386-low.o): New dependency rule.
11622 * linux-low.c (linux_wait): Use target signal numbers.
11623 * target.h (struct target_ops): Doc fix.
11624 * server.h (target_signal_to_name): New prototype.
11625 * gdbreplay.c: Don't include headers unconditionally which
11626 are missing on mingw32. Include <winsock.h> for mingw32.
11627 (remote_close, remote_open): Adjust for Winsock support.
11628 * configure, config.in: Regenerated.
11629
11630 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
11631
11632 * server.c (decode_xfer_read, write_qxfer_response): New.
11633 (handle_query): Take a packet length argument. Handle
11634 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
11635 the qSupported response.
11636 (main): Update call to handle_query.
11637
11638 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
11639
11640 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
11641 (putpkt_binary): Renamed from putpkt and adjusted for binary
11642 data.
11643 (putpkt): New wrapper for putpkt_binary.
11644 (readchar): Don't mask off the high bit.
11645 (decode_X_packet): New function.
11646 * server.c (main): Call putpkt_binary if a handler sets the packet
11647 length. Save the length of the incoming packet. Handle 'X'.
11648 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
11649
11650 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
11651
11652 * server.c (handle_query): Handle qSupported.
11653
11654 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
11655
11656 * remote-utils.c (all_symbols_looked_up): New variable.
11657 (look_up_one_symbol): Check it.
11658 * server.h (look_up_one_symbol): New declaration.
11659 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
11660
11661 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
11662
11663 * Makefile.in (linux-arm-low.o): Update dependencies.
11664 * linux-arm-low.c: Include "gdb_proc_service.h".
11665 (PTRACE_GET_THREAD_AREA): Define.
11666 (ps_get_thread_area): New function.
11667
11668 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
11669
11670 * configure.srv (m68k*-*-uclinux*): New target.
11671 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
11672 (linux_resume_one_process): Remove extraneous cast.
11673 (linux_read_offsets): New.
11674 (linux_target_op): Add linux_read_offsets on mmuless systems.
11675 * server.c (handle_query): Add qOffsets logic.
11676 * target.h (struct target_ops): Add read_offsets.
11677
11678 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
11679
11680 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
11681 (PTRACE_GET_THREAD_AREA): Define.
11682 (ps_get_thread_area): New function.
11683 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
11684 (linux-x86-64-low.o): Update.
11685
11686 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
11687
11688 * configure.ac: Remove checks for prfpregset_t.
11689 * gdb_proc_service.h: New file.
11690 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
11691 new "gdb_proc_service.h".
11692 * proc-service.c: Likewise.
11693 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
11694 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
11695 * Makefile.in (gdb_proc_service_h): Updated.
11696 * configure, config.in: Regenerated.
11697
11698 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
11699
11700 * remote-utils.c (prepare_resume_reply): Move declaration
11701 of gdb_id_from_wait to the top of the block.
11702
11703 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
11704
11705 * linux-low.c (regsets_store_inferior_registers): Read the regset
11706 from the target before filling it.
11707
11708 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
11709
11710 * server.c (attach_inferior): Return SIGTRAP for a successful
11711 attach.
11712
11713 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
11714
11715 * Makefile.in (OBS): Add version.o.
11716 (STAGESTUFF): Delete.
11717 (version.o): Add dependencies.
11718 (version.c): Replace rule.
11719 (clean): Remove version.c.
11720 * server.c (gdbserver_version): New.
11721 (gdbserver_usage): Use printf.
11722 (main): Handle --version and --help.
11723 * server.h (version, host_name): Add declarations.
11724
11725 2005-12-23 Eli Zaretskii <eliz@gnu.org>
11726
11727 * linux-arm-low.c:
11728 * linux-arm-low.c:
11729 * inferiors.c:
11730 * i387-fp.h:
11731 * i387-fp.c:
11732 * gdbreplay.c:
11733 * regcache.c:
11734 * proc-service.c:
11735 * mem-break.h:
11736 * mem-break.c:
11737 * linux-x86-64-low.c:
11738 * linux-sh-low.c:
11739 * linux-s390-low.c:
11740 * linux-ppc64-low.c:
11741 * linux-ppc-low.c:
11742 * linux-mips-low.c:
11743 * linux-m68k-low.c:
11744 * linux-m32r-low.c:
11745 * linux-low.h:
11746 * linux-low.c:
11747 * linux-ia64-low.c:
11748 * linux-i386-low.c:
11749 * linux-crisv32-low.c:
11750 * thread-db.c:
11751 * terminal.h:
11752 * target.h:
11753 * target.c:
11754 * server.h:
11755 * server.c:
11756 * remote-utils.c:
11757 * regcache.h:
11758 * utils.c:
11759 * Makefile.in:
11760 * configure.ac:
11761 * gdbserver.1: Add (C) after Copyright. Update the FSF
11762 address.
11763
11764 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
11765
11766 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
11767 (arm_breakpoint_at): Recognize both breakpoints.
11768 (the_low_target): Use the correct breakpoint instruction.
11769
11770 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
11771
11772 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
11773 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
11774 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
11775 (the_low_target): Update.
11776
11777 2005-10-25 Andreas Schwab <schwab@suse.de>
11778
11779 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
11780
11781 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
11782 (ia64_num_regs): Reduce to 462.
11783
11784 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
11785
11786 * acinclude.m4: Correct quoting.
11787 * aclocal.m4: Regenerated.
11788
11789 Suggested by SZOKOVACS Robert <szo@ies.hu>:
11790 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
11791 (thread_db_init): Call thread_db_err_str.
11792 * configure.ac: Check for TD_VERSION.
11793 * config.in, configure: Regenerated.
11794
11795 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11796
11797 * server.h (error, fatal, warning): Add ATTR_FORMAT.
11798
11799 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
11800
11801 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
11802 is not available. Define HAVE_PTRACE_GETREGS if it is.
11803 * config.in, configure: Regenerated.
11804 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
11805 * linux-i386-low.c, linux-m68k-low.c: Update to use
11806 HAVE_PTRACE_GETREGS.
11807 * linux-low.c (regsets_fetch_inferior_registers)
11808 (regsets_store_inferior_registers): Only return 0 if we processed
11809 GENERAL_REGS.
11810 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
11811 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
11812
11813 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
11814
11815 * inferiors.c (struct thread_info): Add gdb_id.
11816 (add_thread): Add gdb_id argument.
11817 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
11818 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
11819 calls to add_thread.
11820 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
11821 * server.c (handle_query): Use thread_to_gdb_id.
11822 (handle_v_cont, main): Use gdb_id_to_thread_id.
11823 * server.h (add_thread): Update prototype.
11824 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
11825 prototypes.
11826
11827 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
11828
11829 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
11830 left-padded registers.
11831 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
11832 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
11833
11834 2005-07-01 Steve Ellcey <sje@cup.hp.com>
11835
11836 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
11837 * configure: Regenerate.
11838 * config.in: Regenerate.
11839 * server.h (NEED_DECLARATION_STRERROR):
11840 Replace with !HAVE_DECL_STRERROR.
11841
11842 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
11843
11844 * linux-low.c (linux_wait, linux_send_signal): Don't test
11845 an unsigned long variable for > 0 if it could be MAX_ULONG.
11846 * server.c (myresume): Likewise.
11847 * target.c (set_desired_inferior): Likewise.
11848
11849 2005-06-13 Mark Kettenis <kettenis@gnu.org>
11850
11851 * configure.ac: Simplify and improve check for socklen_t.
11852 * configure, config.in: Regenerate.
11853
11854 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
11855
11856 * acconfig.h: Remove.
11857 * configure.ac: Add a test for socklen_t. Use three-argument
11858 AC_DEFINE throughout.
11859 * config.in: Regenerated using autoheader 2.59.
11860 * configure: Regenerated.
11861
11862 * gdbreplay.c (socklen_t): Provide a default.
11863 (remote_open): Use socklen_t.
11864 * remote-utils.c (socklen_t): Provide a default.
11865 (remote_open): Use socklen_t.
11866 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
11867 unsigned char.
11868
11869 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
11870 char for buffers.
11871 * linux-low.c (linux_read_memory, linux_write_memory)
11872 (linux_read_auxv): Likewise.
11873 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
11874 (check_mem_write): Likewise.
11875 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
11876 Likewise.
11877 * regcache.c (struct inferior_rgcache_data, registers_to_string)
11878 (registers_from_string, register_data): Likewise.
11879 * server.c (handle_query, main): Likewise.
11880 * server.h (convert_ascii_to_int, convert_int_to_ascii)
11881 (decode_M_packet): Likewise.
11882 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
11883 * target.h (struct target_ops): Update read_memory, write_memory,
11884 and read_auxv.
11885 (read_inferior_memory, write_inferior_memory): Update.
11886 * linux-low.h (struct linux_target_ops): Change type of breakpoint
11887 to unsigned char *.
11888 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
11889 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
11890 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
11891 linux-s390-low.c, linux-sh-low.c: Update for changes in
11892 read_inferior_memory and the_low_target->breakpoint.
11893
11894 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
11895
11896 * Makefile.in (SFILES): Add linux-ppc64-low.c.
11897 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
11898 * configure.srv: Add powerpc64-*-linux*.
11899 * linux-ppc64-low.c: New file.
11900
11901 2005-05-23 Orjan Friberg <orjanf@axis.com>
11902
11903 * linux-cris-low.c: New file with support for CRIS.
11904 * linux-crisv32-low.c: Ditto for CRISv32.
11905 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
11906 (clean): Add reg-cris.c and reg-crisv32.c.
11907 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
11908 reg-crisv32.o, and reg-crisv32.c to make rules.
11909 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
11910 recognized targets.
11911
11912 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
11913
11914 * linux-low.c (fetch_register): Ensure buffer size is a multiple
11915 of sizeof (PTRACE_XFER_TYPE).
11916 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
11917
11918 2005-05-12 Orjan Friberg <orjanf@axis.com>
11919
11920 * target.h (struct target_ops): Add insert_watchpoint,
11921 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
11922 pointers for hardware watchpoint support.
11923 * linux-low.h (struct linux_target_ops): Ditto.
11924 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
11925 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
11926 to linux_target_ops.
11927 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
11928 reply packet.
11929 * server.c (main): Recognize 'Z' and 'z' packets.
11930
11931 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
11932
11933 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
11934 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
11935 (the_low_target): Add new members.
11936
11937 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
11938
11939 * proc-service.c (ps_lgetregs): Search all_processes instead of
11940 all_threads.
11941
11942 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
11943
11944 * server.c (start_inferior): Change return type to int.
11945 (attach_inferior): Change sigptr to int *.
11946 (handle_v_cont, handle_v_requests): Change signal to int *.
11947 (main): Change signal to int.
11948
11949 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
11950
11951 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
11952 * configure.srv: Add m32r*-*-linux*.
11953 * linux-m32r-low.c: New file.
11954
11955 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
11956
11957 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
11958
11959 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
11960
11961 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
11962 Take unsigned long arguments for PIDs.
11963 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
11964 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
11965 (wait_for_sigstop, linux_resume_one_process)
11966 (regsets_fetch_inferior_registers, linux_send_signal)
11967 (linux_read_auxv): Likewise. Update the types of variables holding
11968 PIDs. Update format string specifiers.
11969 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
11970 * remote-utils.c (prepare_resume_reply): Likewise.
11971 * server.c (cont_thread, general_thread, step_thread)
11972 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
11973 unsigned long.
11974 (handle_query): Update format specifiers.
11975 (handle_v_cont, main): Use strtoul for thread IDs.
11976 * server.h (struct inferior_list_entry): Use unsigned long for ID.
11977 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
11978 (general_thread, step_thread, thread_from_wait)
11979 (old_thread_from_wait): Update.
11980 * target.h (struct thread_resume): Use unsigned long for THREAD.
11981 (struct target_ops): Use unsigned long for arguments to attach and
11982 thread_alive.
11983
11984 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
11985
11986 * acinclude.m4: Include bfd/bfd.m4 directly.
11987 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
11988 <agriffis@toolchain.org>.
11989 * aclocal.m4, configure: Regenerated.
11990
11991 2005-01-07 Andrew Cagney <cagney@gnu.org>
11992
11993 * configure.ac: Rename configure.in, require autoconf 2.59.
11994 * configure: Re-generate.
11995
11996 2004-12-08 Daniel Jacobowitz <dan@debian.org>
11997
11998 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
11999 LIBS when finished.
12000 * aclocal.m4: Regenerated.
12001 * configure: Regenerated.
12002
12003 2004-11-21 Andreas Schwab <schwab@suse.de>
12004
12005 * linux-m68k-low.c (m68k_num_gregs): Define.
12006 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
12007 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
12008 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
12009 (m68k_breakpoint_at): New. Add to the_low_target.
12010
12011 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
12012 srv_linux_thread_db to yes.
12013
12014 2004-10-20 Joel Brobecker <brobecker@gnat.com>
12015
12016 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
12017 (ARCH_SET_FS): Likewise.
12018 (ARCH_GET_FS): Likewise.
12019 (ARCH_GET_GS): Likewise.
12020
12021 2004-10-16 Daniel Jacobowitz <dan@debian.org>
12022
12023 * linux-i386-low.c (ps_get_thread_area): New.
12024 * linux-x86-64-low.c (ps_get_thread_area): New.
12025 * linux-low.c: Include <sys/syscall.h>.
12026 (linux_kill_one_process): Don't kill the first thread here.
12027 (linux_kill): Kill the first thread here.
12028 (kill_lwp): New function.
12029 (send_sigstop, linux_send_signal): Use it.
12030 * proc-service.c: Clean up #ifdefs.
12031 (fpregset_info): Delete.
12032 (ps_lgetregs): Update and enable implementation.
12033 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
12034 implementations.
12035 * remote-utils.c (struct sym_cache, symbol_cache): New.
12036 (input_interrupt): Print a clearer message.
12037 (async_io_enabled): New variable.
12038 (enable_async_io, disable_async_io): Use it. Update comments.
12039 (look_up_one_symbol): Use the symbol cache.
12040 * thread-db.c (thread_db_look_up_symbols): New function.
12041 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
12042
12043 2004-10-16 Daniel Jacobowitz <dan@debian.org>
12044
12045 * configure.in: Test for -rdynamic.
12046 * configure: Regenerated.
12047 * Makefile (INTERNAL_LDFLAGS): New.
12048 (gdbserver, gdbreplay): Use it.
12049
12050 2004-09-02 Andrew Cagney <cagney@gnu.org>
12051
12052 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
12053
12054 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
12055
12056 * linux-low.c (linux_wait): Clear all_processes list also.
12057
12058 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
12059
12060 * linux-low.c: Include <errno.h>. Remove extern declaration of
12061 errno.
12062
12063 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
12064
12065 * gdbreplay.c, server.h, utils.c: Update copyright years.
12066
12067 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
12068
12069 * server.c (main): Print child status or termination signal from
12070 variable 'signal', not 'sig'.
12071
12072 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
12073
12074 * linux-low.c (linux_read_memory): Change return type to
12075 int. Check for and return error from ptrace().
12076 * target.c (read_inferior_memory): Change return type to int. Pass
12077 back return status from the_target->read_memory().
12078 * target.h (struct target_ops): Adapt *read_memory() prototype.
12079 Update comment.
12080 (read_inferior_memory): Adapt prototype.
12081 * server.c (main): Return an error packet if
12082 read_inferior_memory() returns an error.
12083
12084 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
12085
12086 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
12087 Unify with other clean targets.
12088
12089 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
12090
12091 * server.c (handle_v_cont): Call set_desired_inferior.
12092
12093 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
12094
12095 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
12096
12097 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
12098
12099 * linux-low.c (linux_wait): Unblock async I/O.
12100 (linux_resume): Block and enable async I/O.
12101 * remote-utils.c (block_async_io, unblock_async_io): New functions.
12102 * server.h (block_async_io, unblock_async_io): Add prototypes.
12103
12104 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
12105
12106 * remote-utils.c (remote_open): Print a status notice after
12107 opening a TCP port.
12108 * server.c (attach_inferior): Print a status notice after
12109 attaching.
12110
12111 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
12112
12113 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
12114
12115 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
12116
12117 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
12118 error packet.
12119 * server.c, target.h: Update copyright years.
12120
12121 2004-02-25 Roland McGrath <roland@redhat.com>
12122
12123 * target.h (struct target_ops): New member `read_auxv'.
12124 * server.c (handle_query): Handle qPart:auxv:read: query using that.
12125 * linux-low.c (linux_read_auxv): New function.
12126 (linux_target_ops): Initialize `read_auxv' member to that.
12127
12128 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
12129
12130 Committed by Jim Blandy <jimb@redhat.com>.
12131
12132 * linux-s390-low.c (s390_num_regs): Update.
12133 (s390_regmap): Remove control registers. Use __s390x__ predefine
12134 instead of GPR_SIZE to distiguish s390 and s390x targets.
12135
12136 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
12137
12138 * linux-low.c: Update copyright year.
12139 (check_removed_breakpoint): Clear pending_is_breakpoint.
12140 (linux_set_resume_request, linux_queue_one_thread)
12141 (resume_status_pending_p): New functions.
12142 (linux_continue_one_thread): Use process->resume.
12143 (linux_resume): Only resume threads if there are no pending events.
12144 * linux-low.h (struct process_info): Add resume request
12145 pointer.
12146
12147 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
12148
12149 * regcache.c (new_register_cache): Clear the allocated register
12150 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
12151
12152 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
12153
12154 * linux-low.c (linux_resume): Take a struct thread_resume *
12155 argument.
12156 (linux_wait): Update call.
12157 (resume_ptr): New static variable.
12158 (linux_continue_one_thread): Renamed from
12159 linux_continue_one_process. Use resume_ptr.
12160 (linux_resume): Use linux_continue_one_thread.
12161 * server.c (handle_v_cont, handle_v_requests): New functions.
12162 (myresume): New function.
12163 (main): Handle 'v' case.
12164 * target.h (struct thread_resume): New type.
12165 (struct target_ops): Change argument of "resume" to struct
12166 thread_resume *.
12167 (myresume): Delete macro.
12168
12169 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
12170
12171 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
12172 (uninstall): Support DESTDIR.
12173
12174 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
12175
12176 * configure.srv: Add xscale*linux copy of arm*linux entry.
12177
12178 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
12179
12180 * linux-arm-low.c (arm_reinsert_addr): New function.
12181 (the_low_target): Add arm_reinsert_addr.
12182
12183 2003-07-08 Mark Kettenis <kettenis@gnu.org>
12184
12185 * mem-break.c: Remove whitespace at end of file.
12186
12187 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
12188
12189 * configure.in: Check whether we need to prototype strerror.
12190 * server.h: Optionally prototype strerror.
12191 * gdbreplay.c (perror_with_name): Use strerror.
12192 * linux-low.c (linux_attach_lwp): Use strerror.
12193 * utils.c (perror_with_name): Use strerror.
12194 * config.in, configure: Regenerated.
12195
12196 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
12197
12198 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
12199 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
12200
12201 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
12202
12203 * Makefile.in (SFILES): Update.
12204 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
12205 low-sun3.c: Remove files.
12206
12207 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
12208
12209 * linux-low.c: Move comment to linux_thread_alive where it belonged.
12210 (linux_detach_one_process, linux_detach): New functions.
12211 (linux_target_ops): Add linux_detach.
12212 * server.c (main): Handle 'D' packet.
12213 * target.h (struct target_ops): Add "detach" member.
12214 (detach_inferior): Define.
12215
12216 2003-06-13 Mark Kettenis <kettenis@gnu.org>
12217
12218 From Kelley Cook <kelleycook@wideopenwest.com>:
12219 * configure.srv: Accept i[34567]86 variants.
12220
12221 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
12222
12223 * linux-low.c (linux_wait_for_event): Correct comment typos.
12224 (linux_resume_one_process): Call check_removed_breakpoint.
12225 (linux_send_signal): New function.
12226 (linux_target_ops): Add linux_send_signal.
12227 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
12228 of kill.
12229 * target.h (struct target_ops): Add send_signal.
12230
12231 2003-05-29 Jim Blandy <jimb@redhat.com>
12232
12233 * linux-low.c (usr_store_inferior_registers): Transfer buf in
12234 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
12235 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
12236 away part of the register's value.
12237
12238 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
12239
12240 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
12241 (linux_wait_for_event, linux_init_signals): Likewise.
12242
12243 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
12244
12245 * configure.in: Check for stdlib.h.
12246 * configure: Regenerated.
12247 * config.in: Regenerated.
12248
12249 2003-01-04 Andreas Schwab <schwab@suse.de>
12250
12251 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
12252
12253 2003-01-02 Andrew Cagney <ac131313@redhat.com>
12254
12255 * Makefile.in: Remove obsolete code.
12256
12257 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
12258
12259 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
12260 defined(PT_FPR0_HI).
12261
12262 2002-11-17 Stuart Hughes <seh@zee2.com>
12263
12264 * linux-arm-low.c (arm_num_regs): Increase.
12265 (arm_regmap): Include status register.
12266
12267 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
12268
12269 * linux-low.c (register_addr): Remove incorrect -1 check.
12270
12271 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
12272
12273 * linux-low.c (linux_create_inferior): Call setpgid. Return
12274 the new PID.
12275 (unstopped_p, linux_signal_pid): Remove.
12276 (linux_target_ops): Remove linux_signal_pid.
12277 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
12278 global instead of target method.
12279 * target.h (struct target_ops): Remove signal_pid. Update comment
12280 for create_inferior.
12281 * server.c (signal_pid): New variable.
12282 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
12283 gdbserver. Set the child to be the foreground process group.
12284 (attach_inferior): Set signal_pid.
12285
12286 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
12287
12288 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
12289
12290 2002-08-20 Jim Blandy <jimb@redhat.com>
12291
12292 * Makefile.in (LDFLAGS): Allow the configure script to establish a
12293 default for this.
12294
12295 2002-08-01 Andrew Cagney <cagney@redhat.com>
12296
12297 * Makefile.in: Make chill references obsolete.
12298
12299 2002-07-24 Kevin Buettner <kevinb@redhat.com>
12300
12301 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
12302 * configure: Regenerate.
12303 * config.in: Regenerate.
12304
12305 2002-07-09 David O'Brien <obrien@FreeBSD.org>
12306
12307 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
12308 (perror_with_name, remote_close, remote_open, expect, play): Static.
12309
12310 2002-07-04 Michal Ludvig <mludvig@suse.cz>
12311
12312 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
12313 byte offsets instead of an array of indexes.
12314 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
12315
12316 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
12317
12318 * regcache.c: Add comment.
12319
12320 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
12321
12322 * thread-db.c: New file.
12323 * proc-service.c: New file.
12324 * acinclude.m4: New file.
12325 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
12326 proc-service.o, and thread-db.o.
12327 (linux-low.o): Add USE_THREAD_DB.
12328 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
12329 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
12330 * aclocal.m4: Regenerated.
12331 * config.in: Regenerated.
12332 * configure: Regenerated.
12333 * configure.in: Check for proc_service.h, sys/procfs.h,
12334 thread_db.h, and linux/elf.h headrs.
12335 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
12336 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
12337 Check for -lthread_db and thread support.
12338 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
12339 PowerPC, and SuperH.
12340 * i387-fp.c: Constify arguments.
12341 * i387-fp.h: Likewise.
12342 * inferiors.c: (struct thread_info): Renamed from
12343 `struct inferior_info'. Remove PID member. Use generic inferior
12344 list header. All uses updated.
12345 (inferiors, signal_pid): Removed.
12346 (all_threads): New variable.
12347 (get_thread): Define.
12348 (add_inferior_to_list): New function.
12349 (for_each_inferior): New function.
12350 (change_inferior_id): New function.
12351 (add_inferior): Removed.
12352 (remove_inferior): New function.
12353 (add_thread): New function.
12354 (free_one_thread): New function.
12355 (remove_thread): New function.
12356 (clear_inferiors): Use for_each_inferior and free_one_thread.
12357 (find_inferior): New function.
12358 (find_inferior_id): New function.
12359 (inferior_target_data): Update argument type.
12360 (set_inferior_target_data): Likewise.
12361 (inferior_regcache_data): Likewise.
12362 (set_inferior_regcache_data): Likewise.
12363 * linux-low.c (linux_bp_reinsert): Remove.
12364 (all_processes, stopping_threads, using_thrads)
12365 (struct pending_signals, debug_threads, pid_of): New.
12366 (inferior_pid): Replace with macro.
12367 (struct inferior_linux_data): Remove.
12368 (get_stop_pc, add_process): New functions.
12369 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
12370 Use add_process and add_thread.
12371 (linux_attach_lwp): New function, based on old linux_attach. Use
12372 add_process and add_thread. Set stop_expected for new threads.
12373 (linux_attach): New function.
12374 (linux_kill_one_process): New function.
12375 (linux_kill): Kill all LWPs.
12376 (linux_thread_alive): Use find_inferior_id.
12377 (check_removed_breakpoints, status_pending_p): New functions.
12378 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
12379 Update. Use WNOHANG. Wait for cloned processes also. Update process
12380 struct for the found process.
12381 (linux_wait_for_event): New function.
12382 (linux_wait): Use it. Support LWPs.
12383 (send_sigstop, wait_for_sigstop, stop_all_processes)
12384 (linux_resume_one_process, linux_continue_one_process): New functions.
12385 (linux_resume): Support LWPs.
12386 (REGISTER_RAW_SIZE): Remove.
12387 (fetch_register): Use register_size instead. Call supply_register.
12388 (usr_store_inferior_registers): Likewise. Call collect_register.
12389 Fix recursive case.
12390 (regsets_fetch_inferior_registers): Improve error message.
12391 (regsets_store_inferior_registers): Add debugging.
12392 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
12393 (unstopped_p, linux_signal_pid): New functions.
12394 (linux_target_ops): Add linux_signal_pid.
12395 (linux_init_signals): New function.
12396 (initialize_low): Call it. Initialize using_threads.
12397 * regcache.c (inferior_regcache_data): Add valid
12398 flag.
12399 (get_regcache): Fetch registers lazily. Add fetch argument
12400 and update all callers.
12401 (regcache_invalidate_one, regcache_invalidate): New
12402 functions.
12403 (new_register_cache): Renamed from create_register_cache.
12404 Return the new regcache.
12405 (free_register_cache): Change argument to a void *.
12406 (registers_to_string, registers_from_string): Call get_regcache
12407 with fetch flag set.
12408 (register_data): Make static. Pass fetch flag to get_regcache.
12409 (supply_register): Call get_regcache with fetch flag clear.
12410 (collect_register): Call get_regcache with fetch flag set.
12411 (collect_register_as_string): New function.
12412 * regcache.h: Update.
12413 * remote-utils.c (putpkt): Flush after debug output and use
12414 stderr.
12415 Handle input interrupts while waiting for an ACK.
12416 (input_interrupt): Use signal_pid method.
12417 (getpkt): Flush after debug output and use stderr.
12418 (outreg): Use collect_register_as_string.
12419 (new_thread_notify, dead_thread_notify): New functions.
12420 (prepare_resume_reply): Check using_threads. Set thread_from_wait
12421 and general_thread.
12422 (look_up_one_symbol): Flush after debug output.
12423 * server.c (step_thread, server_waiting): New variables.
12424 (start_inferior): Don't use signal_pid. Update call to mywait.
12425 (attach_inferior): Update call to mywait.
12426 (handle_query): Handle qfThreadInfo and qsThreadInfo.
12427 (main): Don't fetch/store registers explicitly. Use
12428 set_desired_inferior. Support proposed ``Hs'' packet. Update
12429 calls to mywait.
12430 * server.h: Update.
12431 (struct inferior_list, struct_inferior_list_entry): New.
12432 * target.c (set_desired_inferior): New.
12433 (write_inferior_memory): Constify.
12434 (mywait): New function.
12435 * target.h: Update.
12436 (struct target_ops): New signal_pid method.
12437 (mywait): Removed macro, added prototype.
12438
12439 * linux-low.h (regset_func): Removed.
12440 (regset_fill_func, regset_store_func): New.
12441 (enum regset_type): New.
12442 (struct regset_info): Add type field. Use new operation types.
12443 (struct linux_target_ops): stop_pc renamed to get_pc.
12444 Add decr_pc_after_break and breakpoint_at.
12445 (get_process, get_thread_proess, get_process_thread)
12446 (strut process_info, all_processes, linux_attach_lwp)
12447 (thread_db_init): New.
12448
12449 * linux-arm-low.c (arm_get_pc, arm_set_pc,
12450 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
12451 (the_low_target): Add new members.
12452 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
12453 (i386_store_fpxregset): Constify.
12454 (target_regsets): Add new kind identifier.
12455 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
12456 (i386_set_pc): Add debugging.
12457 (i386_breakpoint_at): New function.
12458 (the_low_target): Add new members.
12459 * linux-mips-low.c (mips_get_pc, mips_set_pc)
12460 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
12461 (mips_breakpoint_at): New.
12462 (the_low_target): Add new members.
12463 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
12464 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
12465 (the_low_target): Add new members.
12466 * linux-sh-low.c (sh_get_pc, sh_set_pc)
12467 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
12468 (the_low_target): Add new members.
12469 * linux-x86-64-low.c (target_regsets): Add new kind
12470 identifier.
12471
12472 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
12473
12474 From Martin Pool <mbp@samba.org>:
12475 * server.c (gdbserver_usage): New function.
12476 (main): Call it.
12477
12478 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
12479
12480 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
12481 stop_at -> stop_pc.
12482
12483 2002-05-04 Andrew Cagney <ac131313@redhat.com>
12484
12485 * Makefile.in: Remove obsolete code.
12486
12487 2002-04-24 Michal Ludvig <mludvig@suse.cz>
12488
12489 * linux-low.c (regsets_fetch_inferior_registers),
12490 (regsets_store_inferior_registers): Removed cast to int from
12491 ptrace() calls.
12492 * regcache.h: Added declaration of struct inferior_info.
12493
12494 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
12495
12496 * inferiors.c (struct inferior_info): Add regcache_data.
12497 (add_inferior): Call create_register_cache.
12498 (clear_inferiors): Call free_register_cache.
12499 (inferior_regcache_data, set_inferior_regcache_data): New functions.
12500 * regcache.c (struct inferior_regcache_data): New.
12501 (registers): Remove.
12502 (get_regcache): New function.
12503 (create_register_cache, free_register_cache): New functions.
12504 (set_register_cache): Don't initialize the register cache here.
12505 (registers_to_string, registers_from_string, register_data): Call
12506 get_regcache.
12507 * regcache.h: Add prototypes.
12508 * server.h: Likewise.
12509
12510 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
12511
12512 * mem-break.c: New file.
12513 * mem-break.h: New file.
12514 * Makefile.in: Add mem-break.o rule; update server.h
12515 dependencies.
12516 * inferiors.c (struct inferior_info): Add target_data
12517 member.
12518 (clear_inferiors): Free target_data member if set.
12519 (inferior_target_data, set_inferior_target_data): New functions.
12520 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
12521 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
12522 * linux-low.c (linux_bp_reinsert): New variable.
12523 (struct inferior_linux_data): New.
12524 (linux_create_inferior): Use set_inferior_target_data.
12525 (linux_attach): Likewise. Call add_inferior.
12526 (linux_wait_for_one_inferior): New function.
12527 (linux_wait): Call it.
12528 (linux_write_memory): Add const.
12529 (initialize_low): Call set_breakpoint_data.
12530 * linux-low.h (struct linux_target_ops): Add breakpoint
12531 handling members.
12532 * server.c (attach_inferior): Remove extra add_inferior
12533 call.
12534 * server.h: Include mem-break.h. Update inferior.c
12535 prototypes.
12536 * target.c (read_inferior_memory)
12537 (write_inferior_memory): New functions.
12538 * target.h (read_inferior_memory)
12539 (write_inferior_memory): Change macros to prototypes.
12540 (struct target_ops): Update comments. Add const to write_memory
12541 definition.
12542
12543 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
12544
12545 * linux-low.c (usr_store_inferior_registers): Support
12546 registers which are allowed to fail to store.
12547 * linux-low.h (linux_target_ops): Likewise.
12548 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
12549 (ppc_cannot_store_register): FPSCR may not be storable.
12550
12551 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
12552
12553 * server.h: Include <string.h> if HAVE_STRING_H.
12554 * ChangeLog: Correct paths in last ChangeLog entry.
12555
12556 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
12557
12558 * linux-low.h: Remove obsolete prototypes.
12559 (struct linux_target_ops): New.
12560 (extern the_low_target): New.
12561 * linux-low.c (num_regs, regmap): Remove declarations.
12562 (register_addr): Use the_low_target explicitly.
12563 (fetch_register): Likewise.
12564 (usr_fetch_inferior_registers): Likewise.
12565 (usr_store_inferior_registers): Likewise.
12566 * linux-arm-low.c (num_regs): Remove.
12567 (arm_num_regs): Define.
12568 (arm_regmap): Renamed from regmap, made static.
12569 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
12570 made static.
12571 (arm_cannot_store_register): Renamed from cannot_store_register,
12572 made static.
12573 (the_low_target): New.
12574 * linux-i386-low.c (num_regs): Remove.
12575 (i386_num_regs): Define.
12576 (i386_regmap): Renamed from regmap, made static.
12577 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
12578 made static.
12579 (i386_cannot_store_register): Renamed from cannot_store_register,
12580 made static.
12581 (the_low_target): New.
12582 * linux-ia64-low.c (num_regs): Remove.
12583 (ia64_num_regs): Define.
12584 (ia64_regmap): Renamed from regmap, made static.
12585 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
12586 made static.
12587 (ia64_cannot_store_register): Renamed from cannot_store_register,
12588 made static.
12589 (the_low_target): New.
12590 * linux-m68k-low.c (num_regs): Remove.
12591 (m68k_num_regs): Define.
12592 (m68k_regmap): Renamed from regmap, made static.
12593 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
12594 made static.
12595 (m68k_cannot_store_register): Renamed from cannot_store_register,
12596 made static.
12597 (the_low_target): New.
12598 * linux-mips-low.c (num_regs): Remove.
12599 (mips_num_regs): Define.
12600 (mips_regmap): Renamed from regmap, made static.
12601 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
12602 made static.
12603 (mips_cannot_store_register): Renamed from cannot_store_register,
12604 made static.
12605 (the_low_target): New.
12606 * linux-ppc-low.c (num_regs): Remove.
12607 (ppc_num_regs): Define.
12608 (ppc_regmap): Renamed from regmap, made static.
12609 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
12610 made static.
12611 (ppc_cannot_store_register): Renamed from cannot_store_register,
12612 made static.
12613 (the_low_target): New.
12614 * linux-s390-low.c (num_regs): Remove.
12615 (s390_num_regs): Define.
12616 (s390_regmap): Renamed from regmap, made static.
12617 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
12618 made static.
12619 (s390_cannot_store_register): Renamed from cannot_store_register,
12620 made static.
12621 (the_low_target): New.
12622 * linux-sh-low.c (num_regs): Remove.
12623 (sh_num_regs): Define.
12624 (sh_regmap): Renamed from regmap, made static.
12625 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
12626 made static.
12627 (sh_cannot_store_register): Renamed from cannot_store_register,
12628 made static.
12629 (the_low_target): New.
12630 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
12631 (the_low_target): New.
12632
12633 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
12634
12635 * Makefile.in: Add stamp-h target.
12636 * configure.in: Create stamp-h.
12637 * configure: Regenerated.
12638
12639 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
12640
12641 * inferiors.c: New file.
12642 * target.c: New file.
12643 * target.h: New file.
12644 * Makefile.in: Add target.o and inferiors.o. Update
12645 dependencies.
12646 * linux-low.c (inferior_pid): New static variable,
12647 moved from server.c.
12648 (linux_create_inferior): Renamed from create_inferior.
12649 Call add_inferior. Return 0 on success instead of a PID.
12650 (linux_attach): Renamed from myattach.
12651 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
12652 (linux_thread_alive): Renamed from mythread_alive.
12653 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
12654 child dies.
12655 (linux_resume): Renamed from myresume. Add missing ``return 0''.
12656 (regsets_store_inferior_registers): Correct error message.
12657 Add missing ``return 0''.
12658 (linux_fetch_registers): Renamed from fetch_inferior_registers.
12659 (linux_store_registers): Renamed from store_inferior_registers.
12660 (linux_read_memory): Renamed from read_inferior_memory.
12661 (linux_write_memory): Renamed from write_inferior_memory.
12662 (linux_target_ops): New structure.
12663 (initialize_low): Call set_target_ops ().
12664 * remote-utils.c (unhexify): New function.
12665 (hexify): New function.
12666 (input_interrupt): Send signals to ``signal_pid''.
12667 * server.c (inferior_pid): Remove.
12668 (start_inferior): Update create_inferior call.
12669 (attach_inferior): Call add_inferior.
12670 (handle_query): New function.
12671 (main): Call handle_query for `q' packets.
12672 * server.h: Include "target.h". Remove obsolete prototypes.
12673 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
12674
12675 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
12676
12677 * Makefile.in: Add WARN_CFLAGS. Update configury
12678 dependencies.
12679 * configure.in: Check for <string.h>
12680 * configure: Regenerate.
12681 * config.in: Regenerate.
12682 * gdbreplay.c: Include needed system headers.
12683 (remote_open): Remove strchr prototype.
12684 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
12685 * regcache.c (supply_register): Change buf argument to const void *.
12686 (supply_register_by_name): Likewise.
12687 (collect_register): Change buf argument to void *.
12688 (collect_register_by_name): Likewise.
12689 * regcache.h: Add missing prototypes.
12690 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
12691 * server.c (handle_query): New function.
12692 (attached): New static variable, moved out of main.
12693 (main): Quiet longjmp clobber warnings.
12694 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
12695 * utils.c (error): Remove NORETURN.
12696 (fatal): Likewise.
This page took 0.29496 seconds and 4 git commands to generate.