]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/gdbserver/ChangeLog
[C++/mingw] ser-tcp.c casts
[thirdparty/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
1996e237
SM
12015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2
3 * linux-mips-low.c (mips_fill_gregset): Add cast.
4 (mips_store_gregset): Likewise.
5 (mips_fill_fpregset): Likewise.
6 (mips_store_fpregset): Likewise.
7
cbec665b
SM
82015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9
10 * linux-mips-low.c (mips_add_watchpoint): Rename private to
11 priv.
12
eb3e3c67
SM
132015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
14
15 * linux-mips-low.c (mips_linux_new_thread): Change type of
16 watch_type to enum target_hw_bp_type.
17
171de4b8
SM
182015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
19
20 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
21 Change return type to arm_hwbp_type.
22
04248ead
SM
232015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
24
25 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
26 (arm_store_gregset): Likewise.
27 * linux-arm-low.c (arm_get_hwcap): Likewise.
28 (arm_read_description): Likewise.
29
04b3479c
SM
302015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
31
32 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
33
2bc84e8a
SM
342015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
35
36 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
37 (ppc_fill_vsxregset): Likewise.
38 (ppc_store_vsxregset): Likewise.
39 (ppc_fill_vrregset): Likewise.
40 (ppc_store_vrregset): Likewise.
41 (ppc_fill_evrregset): Likewise.
42 (ppc_store_evrregset): Likewise.
43
e6c5bb05
SM
442015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
45
46 * linux-ppc-low.c (ppc_usrregs_info): Remove
47 forward-declaration.
48 (ppc_arch_setup): Move lower in file.
49
7ea45d72
SM
502015-10-30 Simon Marchi <simon.marchi@ericsson.com>
51
52 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
53 (ps_pdwrite): Likewise.
54
69291610
HW
552015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
56
57 * linux-arm-low.c (arm_new_thread): Move pointer dereference
58 to after assert checks.
59
b42945fd
SM
602015-10-29 Simon Marchi <simon.marchi@ericsson.com>
61
62 * proc-service.c (ps_pdread): Add/adjust casts.
63 (ps_pdwrite): Add/adjust casts.
64
d6f85c84
SM
652015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
66
67 * server.c (handle_search_memory_1): Cast return value of
68 memmem.
69
f98cd059
SM
702015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
71
72 * server.c (write_qxfer_response): Change type of data to
73 gdb_byte *.
74
d2412fa5
PA
752015-10-29 Pedro Alves <palves@redhat.com>
76
77 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
78
c17414a2
PA
792015-10-29 Pedro Alves <palves@redhat.com>
80
81 * tracepoint.c (clear_installed_tracepoints): Add casts.
82
e053fbc4
PA
832015-10-29 Pedro Alves <palves@redhat.com>
84
85 * server.c (handle_v_cont, process_serial_event): Add enum
86 gdb_signal casts to signal parsing code.
87
add67df8
PA
882015-10-29 Pedro Alves <palves@redhat.com>
89
90 * linux-low.h (NULL_REGSET): Define.
91 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
92 * linux-arm-low.c (arm_regsets): Likewise.
93 * linux-crisv32-low.c (cris_regsets): Likewise.
94 * linux-m68k-low.c (m68k_regsets): Likewise.
95 * linux-mips-low.c (mips_regsets): Likewise.
96 * linux-nios2-low.c (nios2_regsets): Likewise.
97 * linux-ppc-low.c (ppc_regsets): Likewise.
98 * linux-s390-low.c (s390_regsets): Likewise.
99 * linux-sh-low.c (sh_regsets): Likewise.
100 * linux-sparc-low.c (sparc_regsets): Likewise.
101 * linux-tic6x-low.c (tic6x_regsets): Likewise.
102 * linux-tile-low.c (tile_regsets): Likewise.
103 * linux-x86-low.c (x86_regsets): Likewise.
104 * linux-xtensa-low.c (xtensa_regsets): Likewise.
105
50bc912a
PA
1062015-10-29 Pedro Alves <palves@redhat.com>
107
108 * linux-low.h (NULL_REGSET): Define.
109 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
110 * linux-arm-low.c (arm_regsets): Likewise.
111 * linux-crisv32-low.c (cris_regsets): Likewise.
112 * linux-m68k-low.c (m68k_regsets): Likewise.
113 * linux-mips-low.c (mips_regsets): Likewise.
114 * linux-nios2-low.c (nios2_regsets): Likewise.
115 * linux-ppc-low.c (ppc_regsets): Likewise.
116 * linux-s390-low.c (s390_regsets): Likewise.
117 * linux-sh-low.c (sh_regsets): Likewise.
118 * linux-sparc-low.c (sparc_regsets): Likewise.
119 * linux-tic6x-low.c (tic6x_regsets): Likewise.
120 * linux-tile-low.c (tile_regsets): Likewise.
121 * linux-x86-low.c (x86_regsets): Likewise.
122 * linux-xtensa-low.c (xtensa_regsets): Likewise.
123
682b2546
DE
1242015-10-26 Doug Evans <dje@google.com>
125
126 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
127
963843d4
DE
1282015-10-26 Doug Evans <dje@google.com>
129
130 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
131
d41401ac
DE
1322015-10-26 Doug Evans <dje@google.com>
133
134 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
135 for debug_printf.
136 (attach_thread, find_new_threads_callback): Ditto.
137
3db28855
AT
1382015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
139
140 * mem-break.h (set_breakpoint_data): Remove.
141
fb78e89c
AT
1422015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
143
144 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
145 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
146 (initialize_low): Remove set_breakpoint_data call.
147 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
148 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
149 (initialize_low): Remove set_breakpoint_data call.
150 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
151 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
152 (initialize_low): Remove set_breakpoint_data call.
153
2e6ee069
AT
1542015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
155
156 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
157 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
158 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
159 * target.h (target_breakpoint_kind_from_pc): New macro.
160
1652a986
AT
1612015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
162
163 * linux-low.c (default_breakpoint_kind_from_pc): New function.
164 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
165 the default breakpoint kind.
166
abeead09
AT
1672015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
168
169 * linux-arm-low.c (arm_supports_z_point_type): Add software
170 breakpoint support.
171
b0b4b501
AT
1722015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
173
174 * linux-arm-low.c: Refactor breakpoint definitions.
175 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
176 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
177
8689682c
AT
1782015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
179
180 * Makefile.in: Add arm.c/o.
181 * configure.srv: Likewise.
182 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
183 (arm_breakpoint_kind_from_pc): New function.
184 (arm_sw_breakpoint_from_kind): Return proper kind.
185 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
186
27165294
AT
1872015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
188
189 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
190 removal.
191 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
192 (struct raw_breakpoint) <size>: Remove.
193 (struct raw_breakpoint) <kind>: Add.
194 (bp_size): New function.
195 (bp_opcode): Likewise.
196 (find_raw_breakpoint_at): Adjust for kind.
197 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
198 (remove_memory_breakpoint): Adjust for kind call bp_size.
199 (set_raw_breakpoint_at): Adjust for kind.
200 (set_breakpoint): Likewise.
201 (set_breakpoint_at): Call breakpoint_kind_from_pc.
202 (delete_raw_breakpoint): Adjust for kind.
203 (delete_breakpoint): Likewise.
204 (find_gdb_breakpoint): Likewise.
205 (set_gdb_breakpoint_1): Likewise.
206 (set_gdb_breakpoint): Likewise.
207 (delete_gdb_breakpoint_1): Likewise.
208 (delete_gdb_breakpoint): Likewise.
209 (uninsert_raw_breakpoint): Likewise.
210 (reinsert_raw_breakpoint): Likewise.
211 (set_breakpoint_data): Remove.
212 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
213 (check_mem_read): Adjust for kind call bp_size.
214 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
215 (clone_one_breakpoint): Adjust for kind.
216 * mem-break.h (set_gdb_breakpoint): Likewise.
217 (delete_gdb_breakpoint): Likewise.
218 * server.c (process_serial_event): Likewise.
219
dd373349
AT
2202015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
221
222 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
223 (struct linux_target_ops) <breakpoint>: Remove.
224 (struct linux_target_ops) <breakpoint_len>: Remove.
225 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
226 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
227 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
228 (arm_sw_breakpoint_from_kind): New function.
229 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
230 (struct linux_target_ops) <breakpoint>: Remove.
231 (struct linux_target_ops) <breakpoint_len>: Remove.
232 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
233 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
234 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
235 (struct linux_target_ops) <breakpoint>: Remove.
236 (struct linux_target_ops) <breakpoint_len>: Remove.
237 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
238 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
239 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
240 (struct linux_target_ops) <breakpoint>: Remove.
241 (struct linux_target_ops) <breakpoint_len>: Remove.
242 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
243 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
244 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
245 and sw_breakpoint_from_kind to increment the pc.
246 (linux_breakpoint_kind_from_pc): New function.
247 (linux_sw_breakpoint_from_kind): New function.
248 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
249 (initialize_low): Call breakpoint_kind_from_pc and
250 sw_breakpoint_from_kind to replace breakpoint_data/len.
251 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
252 New field.
253 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
254 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
255 (struct linux_target_ops) <breakpoint>: Remove.
256 (struct linux_target_ops) <breakpoint_len>: Remove.
257 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
258 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
259 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
260 (struct linux_target_ops) <breakpoint>: Remove.
261 (struct linux_target_ops) <breakpoint_len>: Remove.
262 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
263 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
264 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
265 (struct linux_target_ops) <breakpoint>: Remove.
266 (struct linux_target_ops) <breakpoint_len>: Remove.
267 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
268 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
269 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
270 (struct linux_target_ops) <breakpoint>: Remove.
271 (struct linux_target_ops) <breakpoint_len>: Remove.
272 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
273 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
274 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
275 (struct linux_target_ops) <breakpoint>: Remove.
276 (struct linux_target_ops) <breakpoint_len>: Remove.
277 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
278 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
279 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
280 (struct linux_target_ops) <breakpoint>: Remove.
281 (struct linux_target_ops) <breakpoint_len>: Remove.
282 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
283 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
284 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
285 (struct linux_target_ops) <breakpoint>: Remove.
286 (struct linux_target_ops) <breakpoint_len>: Remove.
287 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
288 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
289 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
290 (struct linux_target_ops) <breakpoint>: Remove.
291 (struct linux_target_ops) <breakpoint_len>: Remove.
292 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
293 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
294 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
295 (struct linux_target_ops) <breakpoint>: Remove.
296 (struct linux_target_ops) <breakpoint_len>: Remove.
297 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
298 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
299 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
300 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
301 (struct linux_target_ops) <breakpoint>: Remove.
302 (struct linux_target_ops) <breakpoint_len>: Remove.
303 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
304 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
305 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
306 (struct linux_target_ops) <breakpoint>: Remove.
307 (struct linux_target_ops) <breakpoint_len>: Remove.
308 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
309 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
310
4cd98a19
AT
3112015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
312
313 * linux-cris-low.c (cris_get_pc): Remove void arg.
314
774ee6d2
AR
3152015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
316
317 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
318 variable name.
319
833dcd29
AR
3202015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
321
322 * inferiors.c (thread_pid_matches_callback): New function.
323 (find_thread_process): New function.
324 (remove_thread): Reset current_thread.
325 (remove_process): Assert threads have been removed first.
326
8d689ee5
YQ
3272015-10-15 Yao Qi <yao.qi@linaro.org>
328
329 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
330 if it is 3.
331 (aarch64_remove_point): Likewise.
332 * regcache.c (regcache_register_size): New function.
333
1c2e1515
YQ
3342015-10-12 Yao Qi <yao.qi@linaro.org>
335
336 * linux-aarch64-low.c: Update all callers as emit_load_store
337 is renamed to aarch64_emit_load_store.
338
e1c587c3
YQ
3392015-10-12 Yao Qi <yao.qi@linaro.org>
340
341 * linux-aarch64-low.c: Update all callers of function renaming
342 from emit_insn to aarch64_emit_insn.
343
b6542f81
YQ
3442015-10-12 Yao Qi <yao.qi@linaro.org>
345
346 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
347 arch/aarch64-insn.h.
348 (struct aarch64_memory_operand): Likewise.
349 (ENCODE): Likewise.
350 (emit_insn): Move to arch/aarch64-insn.c.
351 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
352 (emit_load_store): Move to arch/aarch64-insn.c.
353 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
354 (can_encode_int32): Remove.
355
246994ce
YQ
3562015-10-12 Yao Qi <yao.qi@linaro.org>
357
358 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
359 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
360 (aarch64_relocate_instruction): Likewise.
361 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
362 (struct aarch64_insn_visitor): Likewise.
363
0badd99f
YQ
3642015-10-12 Yao Qi <yao.qi@linaro.org>
365
366 * linux-aarch64-low.c (struct aarch64_insn_data): New.
367 (struct aarch64_insn_visitor): New.
368 (struct aarch64_insn_relocation_data): New.
369 (aarch64_ftrace_insn_reloc_b): New function.
370 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
371 (aarch64_ftrace_insn_reloc_cb): Likewise.
372 (aarch64_ftrace_insn_reloc_tb): Likewise.
373 (aarch64_ftrace_insn_reloc_adr): Likewise.
374 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
375 (aarch64_ftrace_insn_reloc_others): Likewise.
376 (visitor): New.
377 (aarch64_relocate_instruction): Use visitor.
378
dfaffe9d
YQ
3792015-10-12 Yao Qi <yao.qi@linaro.org>
380
381 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
382 int. Add argument buf.
383 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
384 aarch64_relocate_instruction.
385
70b439f0
YQ
3862015-10-12 Yao Qi <yao.qi@linaro.org>
387
388 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
389 argument insn. Remove local variable insn. Don't call
390 target_read_uint32.
391 (aarch64_install_fast_tracepoint_jump_pad): Call
392 target_read_uint32.
393
7781c06f
YQ
3942015-09-30 Yao Qi <yao.qi@linaro.org>
395
396 * linux-aarch64-low.c (emit_movk): Shorten a long line.
397 (emit_load_store_pair): Likewise.
398
9a3c8263
SM
3992015-09-25 Simon Marchi <simon.marchi@ericsson.com>
400
401 * dll.c (match_dll): Add cast(s).
402 (unloaded_dll): Likewise.
403 * linux-low.c (second_thread_of_pid_p): Likewise.
404 (delete_lwp_callback): Likewise.
405 (count_events_callback): Likewise.
406 (select_event_lwp_callback): Likewise.
407 (linux_set_resume_request): Likewise.
408 * server.c (accumulate_file_name_length): Likewise.
409 (emit_dll_description): Likewise.
410 (handle_qxfer_threads_worker): Likewise.
411 (visit_actioned_threads): Likewise.
412 * thread-db.c (any_thread_of): Likewise.
413 * tracepoint.c (same_process_p): Likewise.
414 (match_blocktype): Likewise.
415 (build_traceframe_info_xml): Likewise.
416
224c3ddb
SM
4172015-09-25 Simon Marchi <simon.marchi@ericsson.com>
418
419 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
420 assignment.
421 (gdb_unparse_agent_expr): Likewise.
422 * hostio.c (require_data): Likewise.
423 (handle_pread): Likewise.
424 * linux-low.c (disable_regset): Likewise.
425 (fetch_register): Likewise.
426 (store_register): Likewise.
427 (get_dynamic): Likewise.
428 (linux_qxfer_libraries_svr4): Likewise.
429 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
430 (set_fast_tracepoint_jump): Likewise.
431 (uninsert_fast_tracepoint_jumps_at): Likewise.
432 (reinsert_fast_tracepoint_jumps_at): Likewise.
433 (validate_inserted_breakpoint): Likewise.
434 (clone_agent_expr): Likewise.
435 * regcache.c (init_register_cache): Likewise.
436 * remote-utils.c (putpkt_binary_1): Likewise.
437 (decode_M_packet): Likewise.
438 (decode_X_packet): Likewise.
439 (look_up_one_symbol): Likewise.
440 (relocate_instruction): Likewise.
441 (monitor_output): Likewise.
442 * server.c (handle_search_memory): Likewise.
443 (handle_qxfer_exec_file): Likewise.
444 (handle_qxfer_libraries): Likewise.
445 (handle_qxfer): Likewise.
446 (handle_query): Likewise.
447 (handle_v_cont): Likewise.
448 (handle_v_run): Likewise.
449 (captured_main): Likewise.
450 * target.c (write_inferior_memory): Likewise.
451 * thread-db.c (try_thread_db_load_from_dir): Likewise.
452 * tracepoint.c (init_trace_buffer): Likewise.
453 (add_tracepoint_action): Likewise.
454 (add_traceframe): Likewise.
455 (add_traceframe_block): Likewise.
456 (cmd_qtdpsrc): Likewise.
457 (cmd_qtdv): Likewise.
458 (cmd_qtstatus): Likewise.
459 (response_source): Likewise.
460 (response_tsv): Likewise.
461 (cmd_qtnotes): Likewise.
462 (gdb_collect): Likewise.
463 (initialize_tracepoint): Likewise.
464
afbe19f8
PL
4652015-09-21 Pierre Langlois <pierre.langlois@arm.com>
466
467 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
468 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
469 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
470 <NOP>: New.
471 (enum aarch64_condition_codes): New enum.
472 (w0): New static global.
473 (fp): Likewise.
474 (lr): Likewise.
475 (struct aarch64_memory_operand) <type>: New
476 MEMORY_OPERAND_POSTINDEX type.
477 (postindex_memory_operand): New helper function.
478 (emit_ret): New function.
479 (emit_load_store_pair): New function, factored out of emit_stp
480 with support for MEMORY_OPERAND_POSTINDEX.
481 (emit_stp): Rewrite using emit_load_store_pair.
482 (emit_ldp): New function.
483 (emit_load_store): Likewise.
484 (emit_ldr): Mention post-index instruction in comment.
485 (emit_ldrh): New function.
486 (emit_ldrb): New function.
487 (emit_ldrsw): Mention post-index instruction in comment.
488 (emit_str): Likewise.
489 (emit_subs): New function.
490 (emit_cmp): Likewise.
491 (emit_and): Likewise.
492 (emit_orr): Likewise.
493 (emit_orn): Likewise.
494 (emit_eor): Likewise.
495 (emit_mvn): Likewise.
496 (emit_lslv): Likewise.
497 (emit_lsrv): Likewise.
498 (emit_asrv): Likewise.
499 (emit_mul): Likewise.
500 (emit_sbfm): Likewise.
501 (emit_sbfx): Likewise.
502 (emit_ubfm): Likewise.
503 (emit_ubfx): Likewise.
504 (emit_csinc): Likewise.
505 (emit_cset): Likewise.
506 (emit_nop): Likewise.
507 (emit_ops_insns): New helper function.
508 (emit_pop): Likewise.
509 (emit_push): Likewise.
510 (aarch64_emit_prologue): New function.
511 (aarch64_emit_epilogue): Likewise.
512 (aarch64_emit_add): Likewise.
513 (aarch64_emit_sub): Likewise.
514 (aarch64_emit_mul): Likewise.
515 (aarch64_emit_lsh): Likewise.
516 (aarch64_emit_rsh_signed): Likewise.
517 (aarch64_emit_rsh_unsigned): Likewise.
518 (aarch64_emit_ext): Likewise.
519 (aarch64_emit_log_not): Likewise.
520 (aarch64_emit_bit_and): Likewise.
521 (aarch64_emit_bit_or): Likewise.
522 (aarch64_emit_bit_xor): Likewise.
523 (aarch64_emit_bit_not): Likewise.
524 (aarch64_emit_equal): Likewise.
525 (aarch64_emit_less_signed): Likewise.
526 (aarch64_emit_less_unsigned): Likewise.
527 (aarch64_emit_ref): Likewise.
528 (aarch64_emit_if_goto): Likewise.
529 (aarch64_emit_goto): Likewise.
530 (aarch64_write_goto_address): Likewise.
531 (aarch64_emit_const): Likewise.
532 (aarch64_emit_call): Likewise.
533 (aarch64_emit_reg): Likewise.
534 (aarch64_emit_pop): Likewise.
535 (aarch64_emit_stack_flush): Likewise.
536 (aarch64_emit_zero_ext): Likewise.
537 (aarch64_emit_swap): Likewise.
538 (aarch64_emit_stack_adjust): Likewise.
539 (aarch64_emit_int_call_1): Likewise.
540 (aarch64_emit_void_call_2): Likewise.
541 (aarch64_emit_eq_goto): Likewise.
542 (aarch64_emit_ne_goto): Likewise.
543 (aarch64_emit_lt_goto): Likewise.
544 (aarch64_emit_le_goto): Likewise.
545 (aarch64_emit_gt_goto): Likewise.
546 (aarch64_emit_ge_got): Likewise.
547 (aarch64_emit_ops_impl): New static global variable.
548 (aarch64_emit_ops): New target function, return
549 &aarch64_emit_ops_impl.
550 (struct linux_target_ops): Install it.
551
bb903df0
PL
5522015-09-21 Pierre Langlois <pierre.langlois@arm.com>
553
554 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
555 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
556 aarch64-ipa.o.
557 * linux-aarch64-ipa.c: New file.
558 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
559 and endian.h.
560 (aarch64_get_thread_area): New target method.
561 (extract_signed_bitfield): New helper function.
562 (aarch64_decode_ldr_literal): New function.
563 (enum aarch64_opcodes): New enum.
564 (struct aarch64_register): New struct.
565 (struct aarch64_operand): New struct.
566 (x0): New static global.
567 (x1): Likewise.
568 (x2): Likewise.
569 (x3): Likewise.
570 (x4): Likewise.
571 (w2): Likewise.
572 (ip0): Likewise.
573 (sp): Likewise.
574 (xzr): Likewise.
575 (aarch64_register): New helper function.
576 (register_operand): Likewise.
577 (immediate_operand): Likewise.
578 (struct aarch64_memory_operand): New struct.
579 (offset_memory_operand): New helper function.
580 (preindex_memory_operand): Likewise.
581 (enum aarch64_system_control_registers): New enum.
582 (ENCODE): New macro.
583 (emit_insn): New helper function.
584 (emit_b): New function.
585 (emit_bcond): Likewise.
586 (emit_cb): Likewise.
587 (emit_tb): Likewise.
588 (emit_blr): Likewise.
589 (emit_stp): Likewise.
590 (emit_ldp_q_offset): Likewise.
591 (emit_stp_q_offset): Likewise.
592 (emit_load_store): Likewise.
593 (emit_ldr): Likewise.
594 (emit_ldrsw): Likewise.
595 (emit_str): Likewise.
596 (emit_ldaxr): Likewise.
597 (emit_stxr): Likewise.
598 (emit_stlr): Likewise.
599 (emit_data_processing_reg): Likewise.
600 (emit_data_processing): Likewise.
601 (emit_add): Likewise.
602 (emit_sub): Likewise.
603 (emit_mov): Likewise.
604 (emit_movk): Likewise.
605 (emit_mov_addr): Likewise.
606 (emit_mrs): Likewise.
607 (emit_msr): Likewise.
608 (emit_sevl): Likewise.
609 (emit_wfe): Likewise.
610 (append_insns): Likewise.
611 (can_encode_int32_in): New helper function.
612 (aarch64_relocate_instruction): New function.
613 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
614 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
615 (struct linux_target_ops): Install aarch64_get_thread_area,
616 aarch64_install_fast_tracepoint_jump_pad and
617 aarch64_get_min_fast_tracepoint_insn_len.
618
787749ea
PL
6192015-09-21 Pierre Langlois <pierre.langlois@arm.com>
620
621 * Makefile.in (aarch64-insn.o): New rule.
622 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
623
9812b2e6
YQ
6242015-09-21 Yao Qi <yao.qi@linaro.org>
625
626 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
627
18fe412b
YQ
6282015-09-21 Yao Qi <yao.qi@linaro.org>
629
630 * tracepoint.c (max_jump_pad_size): Remove.
631
a0cc84cd
YQ
6322015-09-18 Yao Qi <yao.qi@linaro.org>
633
634 * linux-aarch64-low.c: Don't include sys/uio.h.
635 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
636
d78908cf
WW
6372015-09-16 Wei-cheng Wang <cole945@gmail.com>
638
639 * tracepoint.c (eval_result_type): Change prototype.
640 (condition_true_at_tracepoint): Fix argument to compiled_cond.
641
d57e0d50
PA
6422015-09-15 Pedro Alves <palves@redhat.com>
643
644 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
645 Check whether to report exec events instead of checking whether
646 multiprocess is enabled.
647
5a676acc
PA
6482015-09-15 Pedro Alves <palves@redhat.com>
649
650 PR remote/18965
651 * remote-utils.c (prepare_resume_reply): Merge
652 TARGET_WAITKIND_VFORK_DONE switch case with the
653 TARGET_WAITKIND_FORKED case.
654
7c5d0fad
YQ
6552015-09-15 Yao Qi <yao.qi@linaro.org>
656
657 * server.c (handle_query): Check string comparison using
658 "else if" instead of "if".
659
750ce8d1
YQ
6602015-09-15 Yao Qi <yao.qi@linaro.org>
661
662 * server.c (vCont_supported): New global variable.
663 (handle_query): Set vCont_supported to 1 if "vContSupported+"
664 matches. Append ";vContSupported+" to own_buf.
665 (handle_v_requests): Append ";s;S" to own_buf if target supports
666 hardware single step or vCont_supported is false.
667 (capture_main): Set vCont_supported to zero.
668
70b90b91
YQ
6692015-09-15 Yao Qi <yao.qi@linaro.org>
670
671 * linux-low.c (linux_supports_conditional_breakpoints): Rename
672 it to ...
673 (linux_supports_hardware_single_step): ... New function.
674 (linux_target_ops): Update.
675 * lynx-low.c (lynx_target_ops): Set field
676 supports_hardware_single_step to target_can_do_hardware_single_step.
677 * nto-low.c (nto_target_ops): Likewise.
678 * spu-low.c (spu_target_ops): Likewise.
679 * win32-low.c (win32_target_ops): Likewise.
680 * target.c (target_can_do_hardware_single_step): New function.
681 * target.h (struct target_ops) <supports_conditional_breakpoints>:
682 Remove. <supports_hardware_single_step>: New field.
683 (target_supports_conditional_breakpoints): Remove.
684 (target_supports_hardware_single_step): New macro.
685 (target_can_do_hardware_single_step): Declare.
686 * server.c (handle_query): Use target_supports_hardware_single_step
687 instead of target_supports_conditional_breakpoints.
688
ade90bde
YQ
6892015-09-15 Yao Qi <yao.qi@linaro.org>
690
691 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
692 function.
693 (struct linux_target_ops the_low_target): Install
694 aarch64_linux_siginfo_fixup.
695
94585166
DB
6962015-09-11 Don Breazeal <donb@codesourcery.com>
697 Luis Machado <lgustavo@codesourcery.com>
698
699 * linux-low.c (linux_mourn): Static declaration.
700 (linux_arch_setup): Move in front of
701 handle_extended_wait.
702 (linux_arch_setup_thread): New function.
703 (handle_extended_wait): Handle exec events. Call
704 linux_arch_setup_thread. Make event_lwp argument a
705 pointer-to-a-pointer.
706 (check_zombie_leaders): Do not check stopped threads.
707 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
708 (linux_low_filter_event): Add lwp and thread for exec'ing
709 non-leader thread if leader thread has been deleted.
710 Refactor code into linux_arch_setup_thread and call it.
711 Pass child lwp pointer by reference to handle_extended_wait.
712 (linux_wait_for_event_filtered): Update comment.
713 (linux_wait_1): Prevent clobbering exec event status.
714 (linux_supports_exec_events): New function.
715 (linux_target_ops) <supports_exec_events>: Initialize new member.
716 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
717 new member.
718 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
719 * server.c (report_exec_events): New global variable.
720 (handle_query): Handle qSupported query for exec-events feature.
721 (captured_main): Initialize report_exec_events.
722 * server.h (report_exec_events): Declare new global variable.
723 * target.h (struct target_ops) <supports_exec_events>: New
724 member.
725 (target_supports_exec_events): New macro.
726 * win32-low.c (win32_target_ops) <supports_exec_events>:
727 Initialize new member.
728
0568462b
MM
7292015-09-09 Markus Metzger <markus.t.metzger@intel.com>
730
731 * linux-low.c (linux_low_enable_btrace): Remove.
732 (linux_target_ops): Replace linux_low_enable_btrace with
733 linux_enable_btrace.
734
39edd165
YQ
7352015-09-03 Yao Qi <yao.qi@linaro.org>
736
737 * linux-aarch64-low.c (aarch64_insert_point): Call
738 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
739 returns true.
740
1db33b5a
UW
7412015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
742
743 * linux-low.c (check_stopped_by_breakpoint): Use
744 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
745
ab290430
PA
7462015-08-27 Pedro Alves <palves@redhat.com>
747
748 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
749
8d749320
SM
7502015-08-26 Simon Marchi <simon.marchi@ericsson.com>
751
6711b7f8
SM
752 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
753 the XNEW-family equivalent.
8d749320
SM
754 (compile_bytecodes): Likewise.
755 * dll.c (loaded_dll): Likewise.
756 * event-loop.c (append_callback_event): Likewise.
757 (create_file_handler): Likewise.
758 (create_file_event): Likewise.
759 * hostio.c (handle_open): Likewise.
760 * inferiors.c (add_thread): Likewise.
761 (add_process): Likewise.
762 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
763 * linux-arm-low.c (arm_new_process): Likewise.
764 (arm_new_thread): Likewise.
765 * linux-low.c (add_to_pid_list): Likewise.
766 (linux_add_process): Likewise.
767 (handle_extended_wait): Likewise.
768 (add_lwp): Likewise.
769 (enqueue_one_deferred_signal): Likewise.
770 (enqueue_pending_signal): Likewise.
771 (linux_resume_one_lwp_throw): Likewise.
772 (linux_resume_one_thread): Likewise.
773 (linux_read_memory): Likewise.
774 (linux_write_memory): Likewise.
775 * linux-mips-low.c (mips_linux_new_process): Likewise.
776 (mips_linux_new_thread): Likewise.
777 (mips_add_watchpoint): Likewise.
778 * linux-x86-low.c (initialize_low_arch): Likewise.
779 * lynx-low.c (lynx_add_process): Likewise.
780 * mem-break.c (set_raw_breakpoint_at): Likewise.
781 (set_breakpoint): Likewise.
782 (add_condition_to_breakpoint): Likewise.
783 (add_commands_to_breakpoint): Likewise.
784 (clone_agent_expr): Likewise.
785 (clone_one_breakpoint): Likewise.
786 * regcache.c (new_register_cache): Likewise.
787 * remote-utils.c (look_up_one_symbol): Likewise.
788 * server.c (queue_stop_reply): Likewise.
789 (start_inferior): Likewise.
790 (queue_stop_reply_callback): Likewise.
791 (handle_target_event): Likewise.
792 * spu-low.c (fetch_ppc_memory): Likewise.
793 (store_ppc_memory): Likewise.
794 * target.c (set_target_ops): Likewise.
795 * thread-db.c (thread_db_load_search): Likewise.
796 (try_thread_db_load_1): Likewise.
797 * tracepoint.c (add_tracepoint): Likewise.
798 (add_tracepoint_action): Likewise.
799 (create_trace_state_variable): Likewise.
800 (cmd_qtdpsrc): Likewise.
801 (cmd_qtro): Likewise.
802 (add_while_stepping_state): Likewise.
803 * win32-low.c (child_add_thread): Likewise.
804 (get_image_name): Likewise.
805
ed8b7b42
YQ
8062015-08-25 Yao Qi <yao.qi@linaro.org>
807
808 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
809
db3cb7cb
YQ
8102015-08-25 Yao Qi <yao.qi@linaro.org>
811
812 * Makefile.in (aarch64-linux.o): New rule.
813 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
814 srv_tgtobj.
815 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
816 (aarch64_init_debug_reg_state): Make it extern.
817 (aarch64_linux_prepare_to_resume): Remove.
818
f6011a1c
YQ
8192015-08-25 Yao Qi <yao.qi@linaro.org>
820
821 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
822 lwp_arch_private_info and ptid_of_lwp.
823
88e2cf7e
YQ
8242015-08-25 Yao Qi <yao.qi@linaro.org>
825
826 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
827 Find proc_info by find_process_pid. All callers updated.
828
5e35436e
YQ
8292015-08-25 Yao Qi <yao.qi@linaro.org>
830
831 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
832 Remove.
833 (debug_reg_change_callback): Remove.
834 (aarch64_notify_debug_reg_change): Remove.
835
4a8a7965
YQ
8362015-08-25 Yao Qi <yao.qi@linaro.org>
837
838 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
839 Call current_lwp_ptid.
840
32a271ee
YQ
8412015-08-25 Yao Qi <yao.qi@linaro.org>
842
843 * linux-aarch64-low.c (debug_reg_change_callback): Use
844 debug_printf.
845
0d51c8d7
YQ
8462015-08-25 Yao Qi <yao.qi@linaro.org>
847
848 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
849
31a43dd5
YQ
8502015-08-25 Yao Qi <yao.qi@linaro.org>
851
852 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
853
8ee52567
YQ
8542015-08-25 Yao Qi <yao.qi@linaro.org>
855
856 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
857 the code.
858
ff3f0f45
YQ
8592015-08-25 Yao Qi <yao.qi@linaro.org>
860
861 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
862 Remove.
863 (debug_reg_change_callback): Remove argument entry and add argument
864 lwp. Remove local variable thread. Don't print thread id in the
865 debugging output. Don't check whether pid of thread equals to pid.
866 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
867 iterate_over_lwps instead find_inferior.
868
3d40fbb5
PA
8692015-08-24 Pedro Alves <palves@redhat.com>
870
871 * inferiors.c (get_first_process): New function.
872 * inferiors.h (get_first_process): New declaration.
873 * remote-utils.c (read_ptid): Default to the first process in the
874 list, instead of to the current thread's process.
875
438e1e42
PA
8762015-08-24 Pedro Alves <palves@redhat.com>
877
878 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
879 * event-loop.c: Likewise.
880 * remote-utils.c: Likewise.
881 * tracepoint.c: Likewise.
882
a8c6d4fc
PA
8832015-08-24 Pedro Alves <palves@redhat.com>
884
885 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
886 ptid_get_lwp.
887
99b0bb12
PA
8882015-08-21 Pedro Alves <palves@redhat.com>
889
890 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
891 instead of literal 1.
892
f8904751
PA
8932015-08-21 Pedro Alves <palves@redhat.com>
894
895 * tdesc.c (default_description): Explicitly zero-initialize.
896
465a859e
PA
8972015-08-21 Pedro Alves <palves@redhat.com>
898
899 PR gdb/18749
900 * inferiors.c (remove_thread): Discard any pending stop reply for
901 this thread.
902 * server.c (remove_all_on_match_pid): Rename to ...
903 (remove_all_on_match_ptid): ... this. Work with a filter ptid
904 instead of a pid.
905 (discard_queued_stop_replies): Change parameter to a ptid. Now
906 extern.
907 (handle_v_kill, kill_inferior_callback, captured_main)
908 (process_serial_event): Adjust.
909 * server.h (discard_queued_stop_replies): Declare.
910
f0db101d
PA
9112015-08-21 Pedro Alves <palves@redhat.com>
912
913 * linux-low.c (wait_for_sigstop): Always switch to no thread
914 selected if the previously current thread dies.
915 * lynx-low.c (lynx_request_interrupt): Use the first thread's
916 process instead of the current thread's.
917 * remote-utils.c (input_interrupt): Don't check if there's no
918 current thread.
919 * server.c (gdb_read_memory, gdb_write_memory): If setting the
920 current thread to the general thread fails, error out.
921 (handle_qxfer_auxv, handle_qxfer_libraries)
922 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
923 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
924 (handle_query): Check if there's a thread selected instead of
925 checking whether there's any thread in the thread list.
926 (handle_qxfer_threads, handle_qxfer_btrace)
927 (handle_qxfer_btrace_conf): Don't error out early if there's no
928 thread in the thread list.
929 (handle_v_cont, myresume): Don't set the current thread to the
930 continue thread.
931 (process_serial_event) <Hg handling>: Also set thread_id if the
932 previous general thread is still alive.
933 (process_serial_event) <g/G handling>: If setting the current
934 thread to the general thread fails, error out.
935 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
936 thread's lwp instead of the current thread's.
937 * target.c (set_desired_thread): If the desired thread was not
938 found, leave the current thread pointing to NULL. Return an int
939 (boolean) indicating success.
940 * target.h (set_desired_thread): Change return type to int.
941
40045d91
MF
9422015-08-20 Max Filippov <jcmvbkbc@gmail.com>
943
944 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
945 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
946 #includes.
947 (ps_get_thread_area): New function.
948
45face3b
GB
9492015-08-19 Gary Benson <gbenson@redhat.com>
950
951 * hostio.c (handle_pread): Do not attempt to read more data
952 than hostio_reply_with_data can fit in a packet.
953
16d5f642
JB
9542015-08-18 Joel Brobecker <brobecker@adacore.com>
955
956 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
957
a738da3a
MF
9582015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
959
960 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
961
33ebda9d
PA
9622015-08-06 Pedro Alves <palves@redhat.com>
963
964 * tracepoint.c (expr_eval_result): Now an int.
965
a44892be
PA
9662015-08-06 Pedro Alves <palves@redhat.com>
967
968 * gdbthread.h (struct regcache): Forward declare.
969 (struct thread_info) <regcache_data>: Now a struct regcache
970 pointer.
971 * inferiors.c (inferior_regcache_data)
972 (set_inferior_regcache_data): Now work with struct regcache
973 pointers.
974 * inferiors.h (struct regcache): Forward declare.
975 (inferior_regcache_data, set_inferior_regcache_data): Now work
976 with struct regcache pointers.
977 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
978 (free_register_cache_thread): Remove struct regcache pointer
979 casts.
980
608a1e46
PA
9812015-08-06 Pedro Alves <palves@redhat.com>
982
983 * server.c (captured_main): On error, print the exception message
984 to stderr, and if run_once is set, throw a quit.
985
f0ce0d3a
PA
9862015-08-06 Pedro Alves <palves@redhat.com>
987
988 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
989 the current thread.
990
bf47e248
PA
9912015-08-06 Pedro Alves <palves@redhat.com>
992
993 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
994 reading beyond the passed in buffer length.
995
b6b9ffcc
PL
9962015-08-06 Pierre Langlois <pierre.langlois@arm.com>
997
998 * tracepoint.c (symbol_list) <required>: Remove.
999
863d01bd
PA
10002015-08-06 Pedro Alves <palves@redhat.com>
1001
1002 * linux-low.c (handle_extended_wait): Set the fork child's suspend
1003 count if stopping and suspending threads.
1004 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
1005 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
1006 (linux_detach): Complete an ongoing step-over.
1007 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
1008 throughout.
1009 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
1010 (linux_wait_1): If passing a signal to the inferior after
1011 finishing a step-over, unsuspend and re-resume all lwps. If we
1012 see a single-step event but the thread should be continuing, don't
1013 pass the trap to gdb.
1014 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
1015 internal_error instead of gdb_assert.
1016 (enqueue_pending_signal): New function.
1017 (check_ptrace_stopped_lwp_gone): Add debug output.
1018 (start_step_over): Use internal_error instead of gdb_assert.
1019 (complete_ongoing_step_over): New function.
1020 (linux_resume_one_thread): Don't resume a suspended thread.
1021 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
1022 it stepping.
1023
00db26fa
PA
10242015-08-06 Pedro Alves <palves@redhat.com>
1025
1026 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
1027 (linux_thread_alive): Use lwp_is_marked_dead.
1028 (extended_event_reported): Delete.
1029 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
1030 instead of extended_event_reported.
1031 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
1032 as well.
1033 (lwp_is_marked_dead): New function.
1034 (lwp_running): Use lwp_is_marked_dead.
1035 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
1036 comment.
1037
ad071a30
PA
10382015-08-06 Pedro Alves <palves@redhat.com>
1039
1040 * linux-low.c (linux_wait_1): Move fork event output out of the
1041 !report_to_gdb check. Pass event_child->waitstatus to
1042 target_waitstatus_to_string instead of ourstatus.
1043
524b57e6
YQ
10442015-08-04 Yao Qi <yao.qi@linaro.org>
1045
1046 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
1047 if current_thread is 32 bit.
1048
6085d6f6
YQ
10492015-08-04 Yao Qi <yao.qi@linaro.org>
1050
1051 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
1052 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
1053 * server.c (extended_protocol): Remove "static".
1054 * server.h (extended_protocol): Declare it.
1055
8a7e4587
YQ
10562015-08-04 Yao Qi <yao.qi@linaro.org>
1057
1058 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
1059 both aarch64 and aarch32.
1060 (aarch64_set_pc): Likewise.
1061
3b53ae99
YQ
10622015-08-04 Yao Qi <yao.qi@linaro.org>
1063
1064 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
1065 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
1066 arm-with-neon.xml to srv_xmlfiles.
1067 * linux-aarch64-low.c: Include linux-aarch32-low.h.
1068 (is_64bit_tdesc): New function.
1069 (aarch64_linux_read_description): New function.
1070 (aarch64_arch_setup): Call aarch64_linux_read_description.
1071 (regs_info): Rename to regs_info_aarch64.
1072 (aarch64_regs_info): Return right regs_info.
1073 (initialize_low_arch): Call initialize_low_arch_aarch32.
1074
bd9e6534
YQ
10752015-08-04 Yao Qi <yao.qi@linaro.org>
1076
1077 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
1078 * linux-aarch32-low.c: New file.
1079 * linux-aarch32-low.h: New file.
1080 * linux-arm-low.c (arm_fill_gregset): Move it to
1081 linux-aarch32-low.c.
1082 (arm_store_gregset): Likewise.
1083 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
1084 (arm_store_vfpregset): Call arm_store_vfpregset_num.
1085 (arm_arch_setup): Check if PTRACE_GETREGSET works.
1086 (regs_info): Rename to regs_info_arm.
1087 (arm_regs_info): Return regs_info_aarch32 if
1088 have_ptrace_getregset is 1 and target description is
1089 arm_with_neon or arm_with_vfpv3.
1090 (initialize_low_arch): Don't call init_registers_arm_with_neon.
1091 Call initialize_low_arch_aarch32 instead.
1092
ded48a5e
YQ
10932015-08-04 Yao Qi <yao.qi@linaro.org>
1094
1095 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
1096 * linux-low.c: ... here.
1097 * linux-low.h (have_ptrace_getregset): Declare it.
1098
96e9210f
PA
10992015-08-04 Pedro Alves <palves@redhat.com>
1100
1101 * thread-db.c (struct thread_db): Use new typedefs.
1102 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
1103 CHK calls.
1104 (disable_thread_event_reporting): Cast result of dlsym to
1105 destination function pointer type.
1106 (thread_db_mourn): Use td_ta_delete_ftype.
1107
af60a1ef
SL
11082015-08-03 Sandra Loosemore <sandra@codesourcery.com>
1109
1110 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
1111 arch variant.
1112 (CDX_BREAKPOINT): Define for R2.
1113 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
1114 (the_low_target): Add comments.
1115
e8b41681
YQ
11162015-07-30 Yao Qi <yao.qi@linaro.org>
1117
1118 * linux-arm-low.c (arm_hwcap): Remove it.
1119 (arm_read_description): New local variable arm_hwcap. Don't
1120 set arm_hwcap to zero.
1121
89abb039
YQ
11222015-07-30 Yao Qi <yao.qi@linaro.org>
1123
1124 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
1125 Use regcache->tdesc instead.
1126 (arm_store_wmmxregset): Likewise.
1127 (arm_fill_vfpregset): Likewise.
1128 (arm_store_vfpregset): Likewise.
1129
deca266c
YQ
11302015-07-30 Yao Qi <yao.qi@linaro.org>
1131
1132 * linux-arm-low.c: Include arch/arm.h.
1133 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
1134 (arm_store_gregset): Likewise.
1135
aa58a496
SM
11362015-07-29 Simon Marchi <simon.marchi@ericsson.com>
1137
1138 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
1139 ptrace's 4th parameter.
1140
50904b25
YQ
11412015-07-27 Yao Qi <yao.qi@linaro.org>
1142
1143 * configure.srv (case aarch64*-*-linux*): Don't set
1144 srv_linux_usrregs.
1145
5826e159
PA
11462015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
1147
1148 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
1149 sys/ptrace.h.
1150 * linux-arm-low.c: Likewise.
1151 * linux-cris-low.c: Likewise.
1152 * linux-crisv32-low.c: Likewise.
1153 * linux-low.c: Likewise.
1154 * linux-m68k-low.c: Likewise.
1155 * linux-mips-low.c: Likewise.
1156 * linux-nios2-low.c: Likewise.
1157 * linux-s390-low.c: Likewise.
1158 * linux-sparc-low.c: Likewise.
1159 * linux-tic6x-low.c: Likewise.
1160 * linux-tile-low.c: Likewise.
1161 * linux-x86-low.c: Likewise.
1162
54019719
PA
11632015-07-24 Pedro Alves <palves@redhat.com>
1164
1165 * config.in: Regenerate.
1166 * configure: Regenerate.
1167
eb7aa561
PA
11682015-07-24 Pedro Alves <palves@redhat.com>
1169
1170 * acinclude.m4: Include ../ptrace.m4.
1171 * configure.ac: Call GDB_AC_PTRACE.
1172 * config.in, configure: Regenerate.
1173
55d7b841
YQ
11742015-07-24 Yao Qi <yao.qi@linaro.org>
1175
1176 * linux-low.c (linux_create_inferior): Remove setting to
1177 proc->priv->new_inferior.
1178 (linux_attach): Likewise.
1179 (linux_low_filter_event): Likewise.
1180 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
1181
c06cbd92
YQ
11822015-07-24 Yao Qi <yao.qi@linaro.org>
1183
1184 * linux-low.c (linux_arch_setup): New function.
1185 (linux_low_filter_event): If proc->tdesc is NULL and
1186 proc->attached is true, call the_low_target.arch_setup.
1187 Otherwise, keep status pending, and return.
1188 (linux_resume_one_lwp_throw): Don't call get_pc if
1189 thread->while_stepping isn't NULL. Don't call
1190 get_thread_regcache if proc->tdesc is NULL.
1191 (need_step_over_p): Return 0 if proc->tdesc is NULL.
1192 (linux_target_ops): Install arch_setup.
1193 * server.c (start_inferior): Call the_target->arch_setup.
1194 * target.h (struct target_ops) <arch_setup>: New field.
1195 (target_arch_setup): New marco.
1196 * lynx-low.c (lynx_target_ops): Update.
1197 * nto-low.c (nto_target_ops): Update.
1198 * spu-low.c (spu_target_ops): Update.
1199 * win32-low.c (win32_target_ops): Update.
1200
5ae3ebba
YQ
12012015-07-24 Yao Qi <yao.qi@linaro.org>
1202
1203 * linux-low.c (linux_add_process): Don't set
1204 proc->priv->new_inferior.
1205 (linux_create_inferior): Set proc->priv->new_inferior to 1.
1206 (linux_attach): Likewise.
1207
eb97750b
YQ
12082015-07-24 Yao Qi <yao.qi@linaro.org>
1209
1210 * server.c (start_inferior): Code refactor.
1211
51aee833
YQ
12122015-07-24 Yao Qi <yao.qi@linaro.org>
1213
1214 * server.c (process_serial_event): Set general_thread.
1215
af1b22f3
YQ
12162015-07-21 Yao Qi <yao.qi@linaro.org>
1217
1218 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
1219 aarch64_linux_get_debug_reg_capacity.
1220
554717a3
YQ
12212015-07-17 Yao Qi <yao.qi@linaro.org>
1222
1223 * Makefile.in (aarch64-linux-hw-point.o): New rule.
1224 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
1225 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
1226 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
1227 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
1228 (AARCH64_HWP_ALIGNMENT): Likewise.
1229 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
1230 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
1231 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
1232 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
1233 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
1234 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
1235 (struct aarch64_debug_reg_state): Likewise.
1236 (struct arch_lwp_info): Likewise.
1237 (aarch64_align_watchpoint): Likewise.
1238 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
1239 (aarch64_watchpoint_length): Likewise.
1240 (aarch64_point_encode_ctrl_reg): Likewise
1241 (aarch64_point_is_aligned): Likewise.
1242 (aarch64_align_watchpoint): Likewise.
1243 (aarch64_linux_set_debug_regs):
1244 (aarch64_dr_state_insert_one_point): Likewise.
1245 (aarch64_dr_state_remove_one_point): Likewise.
1246 (aarch64_handle_breakpoint): Likewise.
1247 (aarch64_handle_aligned_watchpoint): Likewise.
1248 (aarch64_handle_unaligned_watchpoint): Likewise.
1249 (aarch64_handle_watchpoint): Likewise.
1250
c67ca4de
YQ
12512015-07-17 Yao Qi <yao.qi@linaro.org>
1252
1253 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
1254 and don't aarch64_get_debug_reg_state. All callers update.
1255 (aarch64_handle_aligned_watchpoint): Likewise.
1256 (aarch64_handle_unaligned_watchpoint): Likewise.
1257 (aarch64_handle_watchpoint): Likewise.
1258 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
1259 (aarch64_remove_point): Likewise.
1260
25abf979
YQ
12612015-07-17 Yao Qi <yao.qi@linaro.org>
1262
1263 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
1264 debug_printf.
1265 (aarch64_handle_unaligned_watchpoint): Likewise.
1266
db1ff28b
JK
12672015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
1268
1269 Revert the previous 3 commits:
1270 Move gdb_regex* to common/
1271 Move linux_find_memory_regions_full & co.
1272 gdbserver build-id attribute generator
1273
700ca40f
JK
12742015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1275 Jan Kratochvil <jan.kratochvil@redhat.com>
1276
1277 gdbserver build-id attribute generator.
1278 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
1279 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
1280 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
1281 (find_phdr): New.
1282 (get_dynamic): Use find_pdhr to traverse program headers.
1283 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
1284 (compare_mapping_entry_range, struct find_memory_region_callback_data)
1285 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
1286 (get_hex_build_id): New.
1287 (linux_qxfer_libraries_svr4): Add optional build-id attribute
1288 to reply XML document.
1289
9904185c
JK
12902015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1291 Jan Kratochvil <jan.kratochvil@redhat.com>
1292
1293 * target.c: Include target/target-utils.h and fcntl.h.
1294 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
1295 (target_fileio_read_stralloc): New functions.
1296
6e5b4429
JK
12972015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
1298
1299 * Makefile.in (OBS): Add gdb_regex.o.
1300 (gdb_regex.o): New.
1301 * config.in: Rebuilt.
1302 * configure: Rebuilt.
1303
ddc98fbf
JK
13042015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1305 Jan Kratochvil <jan.kratochvil@redhat.com>
1306
1307 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
1308 * Makefile.in (OBS): Add target-utils.o.
1309 (linux-maps.o, target-utils.o): New.
1310 * configure.srv (srv_linux_obj): Add linux-maps.o.
1311
e57bb7a0
PL
13122015-07-15 Pierre Langlois <pierre.langlois@arm.com>
1313
1314 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
1315 function, return 1.
1316 (the_low_target): Install it.
1317
586b02a9
PA
13182015-07-14 Pedro Alves <palves@redhat.com>
1319
1320 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
1321 Instead, ignore ECHILD, and throw an error for other errnos.
1322
58c1b36c
PA
13232015-07-10 Pedro Alves <palves@redhat.com>
1324
1325 * event-loop.c (struct callback_event) <data>: Change type to
1326 gdb_client_data instance instead of gdb_client_data pointer.
1327 (append_callback_event): Adjust.
1328
421530db
PL
13292015-07-10 Pierre Langlois <pierre.langlois@arm.com>
1330
1331 * linux-aarch64-low.c: Add comments for each linux_target_ops
1332 method. Remove comments already covered in target_ops and
1333 linux_target_ops definitions.
1334 (the_low_target): Add comments for each unimplemented method.
1335
c2d65f38
YQ
13362015-07-09 Yao Qi <yao.qi@linaro.org>
1337
1338 * linux-aarch64-low.c (aarch64_regmap): Remove.
1339 (aarch64_usrregs_info): Remove.
1340 (regs_info): Set field usrregs to NULL.
1341
b20a6524
MM
13422015-07-02 Markus Metzger <markus.t.metzger@intel.com>
1343
1344 * linux-low.c: Include "rsp-low.h"
1345 (linux_low_encode_pt_config, linux_low_encode_raw): New.
1346 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
1347 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
1348 (handle_btrace_enable_pt): New.
1349 (handle_btrace_general_set): Support "pt".
1350 (handle_btrace_conf_general_set): Support "pt:size".
1351
96c97461
PL
13522015-06-29 Pierre Langlois <pierre.langlois@arm.com>
1353
1354 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
1355 Z_PACKET_SW_BP.
1356
37d66942
PL
13572015-06-29 Pierre Langlois <pierre.langlois@arm.com>
1358
1359 * linux-aarch64-low.c: Remove comment about endianness.
1360 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
1361 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
1362 memcmp.
1363
dc06243f
GB
13642015-06-24 Gary Benson <gbenson@redhat.com>
1365
1366 * linux-i386-ipa.c (stdint.h): Do not include.
1367 * lynx-i386-low.c (stdint.h): Likewise.
1368 * lynx-ppc-low.c (stdint.h): Likewise.
1369 * mem-break.c (stdint.h): Likewise.
1370 * thread-db.c (stdint.h): Likewise.
1371 * tracepoint.c (stdint.h): Likewise.
1372 * win32-low.c (stdint.h): Likewise.
1373
124e13d9
SM
13742015-06-18 Simon Marchi <simon.marchi@ericsson.com>
1375
1376 * server.c (write_qxfer_response): Update call to
1377 remote_escape_output.
1378
909c2cda
JK
13792015-06-15 Aleksandar Ristovski <aristovski@qnx.com
1380 Jan Kratochvil <jan.kratochvil@redhat.com>
1381
1382 Merge multiple hex conversions.
1383 * gdbreplay.c (tohex): Rename to 'fromhex'.
1384 (logchar): Use fromhex.
1385
24c05f46
JK
13862015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
1387
1388 * server.c (handle_qxfer_libraries): Set `version' attribute for
1389 <library-list>.
1390
14d2069a
GB
13912015-06-10 Gary Benson <gbenson@redhat.com>
1392
1393 * target.h (struct target_ops) <multifs_open>: New field.
1394 <multifs_unlink>: Likewise.
1395 <multifs_readlink>: Likewise.
1396 * linux-low.c (nat/linux-namespaces.h): New include.
1397 (linux_target_ops): Initialize the_target->multifs_open,
1398 the_target->multifs_unlink and the_target->multifs_readlink.
1399 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
1400 * hostio.c (hostio_fs_pid): New static variable.
1401 (hostio_handle_new_gdb_connection): New function.
1402 (handle_setfs): Likewise.
1403 (handle_open): Use the_target->multifs_open as appropriate.
1404 (handle_unlink): Use the_target->multifs_unlink as appropriate.
1405 (handle_readlink): Use the_target->multifs_readlink as
1406 appropriate.
1407 (handle_vFile): Handle vFile:setfs packets.
1408 * server.c (handle_query): Call hostio_handle_new_gdb_connection
1409 after target_handle_new_gdb_connection.
1410
4b8b5e72
GB
14112015-06-10 Gary Benson <gbenson@redhat.com>
1412
1413 * configure.ac (AC_CHECK_FUNCS): Add setns.
1414 * config.in: Regenerate.
1415 * configure: Likewise.
1416 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
1417 (linux-namespaces.o): New rule.
1418 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
1419
3ac2e371
GB
14202015-06-09 Gary Benson <gbenson@redhat.com>
1421
1422 * hostio.c (handle_open): Process mode argument with
1423 fileio_to_host_mode.
1424
ca9b78ce
YQ
14252015-06-01 Yao Qi <yao.qi@linaro.org>
1426
1427 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
1428 * linux-x86-low.c: Likewise.
1429
bfacd19d
DB
14302015-05-28 Don Breazeal <donb@codesourcery.com>
1431
1432 * linux-low.c (handle_extended_wait): Initialize
1433 thread_info.last_resume_kind for new fork children.
1434
452003ef
PA
14352015-05-15 Pedro Alves <palves@redhat.com>
1436
1437 * target.h (target_handle_new_gdb_connection): Rewrite using if
1438 wrapped in do/while.
1439
1041a03c
JB
14402015-05-14 Joel Brobecker <brobecker@adacore.com>
1441
1442 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
1443 * configure, config.in: Regenerate.
1444 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
1445 Declare typedef.
1446
c269dbdb
DB
14472015-05-12 Don Breazeal <donb@codesourcery.com>
1448
1449 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
1450 PTRACE_EVENT_VFORK_DONE.
1451 (linux_low_ptrace_options, extended_event_reported): Add vfork
1452 events.
1453 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
1454 and "vforkdone" for RSP 'T' Stop Reply Packet.
1455 * server.h (report_vfork_events): Declare
1456 global variable.
1457
3a8a0396
DB
14582015-05-12 Don Breazeal <donb@codesourcery.com>
1459
1460 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
1461 (the_low_target) <new_fork>: Initialize new member.
1462 * linux-arm-low.c (arm_new_fork): New function.
1463 (the_low_target) <new_fork>: Initialize new member.
1464 * linux-low.c (handle_extended_wait): Call new target function
1465 new_fork.
1466 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
1467 * linux-mips-low.c (mips_add_watchpoint): New function
1468 extracted from mips_insert_point.
1469 (the_low_target) <new_fork>: Initialize new member.
1470 (mips_linux_new_fork): New function.
1471 (mips_insert_point): Call mips_add_watchpoint.
1472 * linux-x86-low.c (x86_linux_new_fork): New function.
1473 (the_low_target) <new_fork>: Initialize new member.
1474
de0d863e
DB
14752015-05-12 Don Breazeal <donb@codesourcery.com>
1476
1477 * linux-low.c (handle_extended_wait): Implement return value,
1478 rename argument 'event_child' to 'event_lwp', handle
1479 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
1480 (linux_low_ptrace_options): New function.
1481 (linux_low_filter_event): Call linux_low_ptrace_options,
1482 use different argument fo linux_enable_event_reporting,
1483 use return value from handle_extended_wait.
1484 (extended_event_reported): New function.
1485 (linux_wait_1): Call extended_event_reported and set
1486 status to report fork events.
1487 (linux_write_memory): Add pid to debug message.
1488 (reset_lwp_ptrace_options_callback): New function.
1489 (linux_handle_new_gdb_connection): New function.
1490 (linux_target_ops): Initialize new structure member.
1491 * linux-low.h (struct lwp_info) <waitstatus>: New member.
1492 * lynx-low.c: Initialize new structure member.
1493 * remote-utils.c (prepare_resume_reply): Implement stop reason
1494 "fork" for "T" stop message.
1495 * server.c (handle_query): Call handle_new_gdb_connection.
1496 * server.h (report_fork_events): Declare global flag.
1497 * target.h (struct target_ops) <handle_new_gdb_connection>:
1498 New member.
1499 (target_handle_new_gdb_connection): New macro.
1500 * win32-low.c: Initialize new structure member.
1501
ddcbc397
DB
15022015-05-12 Don Breazeal <donb@codesourcery.com>
1503
1504 * mem-break.c (APPEND_TO_LIST): Define macro.
1505 (clone_agent_expr): New function.
1506 (clone_one_breakpoint): New function.
1507 (clone_all_breakpoints): New function.
1508 * mem-break.h: Declare new functions.
1509
89245bc0
DB
15102015-05-12 Don Breazeal <donb@codesourcery.com>
1511
1512 * linux-low.c (linux_supports_fork_events): New function.
1513 (linux_supports_vfork_events): New function.
1514 (linux_target_ops): Initialize new structure members.
1515 (initialize_low): Call linux_check_ptrace_features.
1516 * lynx-low.c (lynx_target_ops): Initialize new structure
1517 members.
1518 * server.c (report_fork_events, report_vfork_events):
1519 New global flags.
1520 (handle_query): Add new features to qSupported packet and
1521 response.
1522 (captured_main): Initialize new global variables.
1523 * target.h (struct target_ops) <supports_fork_events>:
1524 New member.
1525 <supports_vfork_events>: New member.
1526 (target_supports_fork_events): New macro.
1527 (target_supports_vfork_events): New macro.
1528 * win32-low.c (win32_target_ops): Initialize new structure
1529 members.
1530
835205d0
GB
15312015-05-12 Gary Benson <gbenson@redhat.com>
1532
1533 * server.c (handle_qxfer_exec_file): Use current process
1534 if annex is empty.
1535
21e94bd9
SL
15362015-05-08 Sandra Loosemore <sandra@codesourcery.com>
1537
1538 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
1539 Remove HAVE_PTRACE_GETREGS conditionals.
1540 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
1541 instead of PTRACE_GETREGS and PTRACE_SETREGS.
1542
45614f15
YQ
15432015-05-08 Yao Qi <yao.qi@linaro.org>
1544
1545 * linux-low.c (linux_supports_conditional_breakpoints): New
1546 function.
1547 (linux_target_ops): Install new target method.
1548 * lynx-low.c (lynx_target_ops): Install NULL hook for
1549 supports_conditional_breakpoints.
1550 * nto-low.c (nto_target_ops): Likewise.
1551 * spu-low.c (spu_target_ops): Likewise.
1552 * win32-low.c (win32_target_ops): Likewise.
1553 * server.c (handle_query): Check
1554 target_supports_conditional_breakpoints.
1555 * target.h (struct target_ops) <supports_conditional_breakpoints>:
1556 New field.
1557 (target_supports_conditional_breakpoints): New macro.
1558
80ad801e
PA
15592015-05-06 Pedro Alves <palves@redhat.com>
1560
1561 PR server/18081
1562 * server.c (start_inferior): If the process exits, mourn it.
1563
819843c7
GB
15642015-04-21 Gary Benson <gbenson@redhat.com>
1565
1566 * hostio.c (fileio_open_flags_to_host): Factored out to
1567 fileio_to_host_openflags in common/fileio.c. Single use
1568 updated.
1569
a2d5a9d7
MF
15702015-04-17 Max Filippov <jcmvbkbc@gmail.com>
1571
1572 * linux-xtensa-low.c (xtensa_fill_gregset)
1573 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
1574 XCHAL_HAVE_LOOP.
1575
deb44829
MF
15762015-04-17 Max Filippov <jcmvbkbc@gmail.com>
1577
1578 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
1579 (regs_info): Replace usrregs pointer with NULL.
1580
e57f1de3
GB
15812015-04-17 Gary Benson <gbenson@redhat.com>
1582
1583 * target.h (struct target_ops) <pid_to_exec_file>: New field.
1584 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
1585 * server.c (handle_qxfer_exec_file): New function.
1586 (qxfer_packets): Add exec-file entry.
1587 (handle_query): Report qXfer:exec-file:read as supported packet.
1588
62828379
RN
15892015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
1590
1591 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
1592
b88bb450
GB
15932015-04-09 Gary Benson <gbenson@redhat.com>
1594
1595 * hostio-errno.c (errno_to_fileio_error): Remove function.
1596 Update caller to use remote_fileio_to_fio_error.
1597
c8f4bfdd
YQ
15982015-04-09 Yao Qi <yao.qi@linaro.org>
1599
1600 * linux-low.c (linux_insert_point): Call
1601 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
1602 (linux_remove_point): Call remove_memory_breakpoint if type is
1603 raw_bkpt_type_sw.
1604 * linux-x86-low.c (x86_insert_point): Don't call
1605 insert_memory_breakpoint.
1606 (x86_remove_point): Don't call remove_memory_breakpoint.
1607
41f98f02
PA
16082015-04-01 Pedro Alves <palves@redhat.com>
1609 Cleber Rosa <crosa@redhat.com>
1610
1611 * server.c (gdbserver_usage): Reorganize and extend the usage
1612 message.
1613
2bf6fb9d
PA
16142015-03-24 Pedro Alves <palves@redhat.com>
1615
1616 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
1617 output. Also dump TRAP_TRACE.
1618 (linux_low_filter_event): In debug output, distinguish a
1619 resume_stop SIGSTOP from a delayed SIGSTOP.
1620
369f6daa
GB
16212015-03-24 Gary Benson <gbenson@redhat.com>
1622
1623 * linux-x86-low.c (x86_linux_new_thread): Moved to
1624 nat/x86-linux.c.
1625 (x86_linux_prepare_to_resume): Likewise.
1626
8e5d4070
GB
16272015-03-24 Gary Benson <gbenson@redhat.com>
1628
1629 * Makefile.in (x86-linux-dregs.o): New rule.
1630 * configure.srv: Add x86-linux-dregs.o to relevant targets.
1631 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
1632 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
1633 (x86_linux_dr_get): Likewise.
1634 (x86_linux_dr_set): Likewise.
1635 (update_debug_registers_callback): Likewise.
1636 (x86_linux_dr_set_addr): Likewise.
1637 (x86_linux_dr_get_addr): Likewise.
1638 (x86_linux_dr_set_control): Likewise.
1639 (x86_linux_dr_get_control): Likewise.
1640 (x86_linux_dr_get_status): Likewise.
1641 (x86_linux_update_debug_registers): Likewise.
1642
2b95d440
GB
16432015-03-24 Gary Benson <gbenson@redhat.com>
1644
1645 * linux-x86-low.c (x86_linux_update_debug_registers):
1646 New function, factored out from...
1647 (x86_linux_prepare_to_resume): ...this.
1648
14b0bc68
GB
16492015-03-24 Gary Benson <gbenson@redhat.com>
1650
1651 * linux-x86-low.c (x86_linux_dr_get): Update comments.
1652 (x86_linux_dr_set): Likewise.
1653 (update_debug_registers_callback): Likewise.
1654 (x86_linux_dr_set_addr): Likewise.
1655 (x86_linux_dr_get_addr): Likewise.
1656 (x86_linux_dr_set_control): Likewise.
1657 (x86_linux_dr_get_control): Likewise.
1658 (x86_linux_dr_get_status): Likewise.
1659 (x86_linux_prepare_to_resume): Likewise.
1660
5dfe6ca8
GB
16612015-03-24 Gary Benson <gbenson@redhat.com>
1662
1663 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
1664 Use perror_with_name. Pass string through gettext.
1665 (x86_linux_dr_set): Likewise.
1666
d33472ad
GB
16672015-03-24 Gary Benson <gbenson@redhat.com>
1668
1669 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
1670 (x86_linux_dr_set_addr): ...this.
1671 (x86_dr_low_get_addr): Rename to...
1672 (x86_linux_dr_get_addr): ...this.
1673 (x86_dr_low_set_control): Rename to...
1674 (x86_linux_dr_set_control): ...this.
1675 (x86_dr_low_get_control): Rename to...
1676 (x86_linux_dr_get_control): ...this.
1677 (x86_dr_low_get_status): Rename to...
1678 (x86_linux_dr_get_status): ...this.
1679 (x86_dr_low): Update with new function names.
1680
4b134ca1
GB
16812015-03-24 Gary Benson <gbenson@redhat.com>
1682
1683 * Makefile.in (x86-linux.o): New rule.
1684 * configure.srv: Add x86-linux.o to relevant targets.
1685 * linux-low.c (lwp_set_arch_private_info): New function.
1686 (lwp_arch_private_info): Likewise.
1687 * linux-x86-low.c: Include nat/x86-linux.h.
1688 (arch_lwp_info): Removed structure.
1689 (update_debug_registers_callback):
1690 Use lwp_set_debug_registers_changed.
1691 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
1692 and lwp_set_debug_registers_changed.
1693 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
1694
34c703da
GB
16952015-03-24 Gary Benson <gbenson@redhat.com>
1696
1697 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
1698 * linux-arm-low.c (arm_new_thread): Likewise.
1699 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
1700 * linux-mips-low.c (mips_linux_new_thread): Likewise.
1701 * linux-x86-low.c (x86_linux_new_thread): Likewise.
1702 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
1703
cff068da
GB
17042015-03-24 Gary Benson <gbenson@redhat.com>
1705
1706 * linux-low.c (ptid_of_lwp): New function.
1707 (lwp_is_stopped): Likewise.
1708 (lwp_stop_reason): Likewise.
1709 * linux-x86-low.c (update_debug_registers_callback):
1710 Use lwp_is_stopped.
1711 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
1712 lwp_stop_reason.
1713
b2f7c7e8
GB
17142015-03-24 Gary Benson <gbenson@redhat.com>
1715
1716 * linux-low.h (linux_stop_lwp): Remove declaration.
1717
6d4ee8c6
GB
17182015-03-24 Gary Benson <gbenson@redhat.com>
1719
1720 * linux-low.h: Include nat/linux-nat.h.
1721 * linux-low.c (iterate_over_lwps_args): New structure.
1722 (iterate_over_lwps_filter): New function.
1723 (iterate_over_lwps): Likewise.
1724 * linux-x86-low.c (update_debug_registers_callback):
1725 Update signature to what iterate_over_lwps expects.
1726 Remove PID check that iterate_over_lwps now performs.
1727 (x86_dr_low_set_addr): Use iterate_over_lwps.
1728 (x86_dr_low_set_control): Likewise.
1729
70a0bb6b
GB
17302015-03-24 Gary Benson <gbenson@redhat.com>
1731
1732 * linux-x86-low.c (x86_debug_reg_state): New function.
1733 (x86_linux_prepare_to_resume): Use the above.
1734
7b669087
GB
17352015-03-24 Gary Benson <gbenson@redhat.com>
1736
1737 * linux-low.c (current_lwp_ptid): New function.
1738 * linux-x86-low.c: Include nat/linux-nat.h.
1739 (x86_dr_low_get_addr): Use current_lwp_ptid.
1740 (x86_dr_low_get_control): Likewise.
1741 (x86_dr_low_get_status): Likewise.
1742
eef49a3d
PA
17432015-03-20 Pedro Alves <palves@redhat.com>
1744
1745 * tracepoint.c (cmd_qtstatus): Make "str" const.
1746
b2333d22
PA
17472015-03-20 Pedro Alves <palves@redhat.com>
1748
1749 * server.c (handle_general_set): Make "req_str" const.
1750
23f238d3
PA
17512015-03-19 Pedro Alves <palves@redhat.com>
1752
1753 * linux-low.c (linux_resume_one_lwp): Rename to ...
1754 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
1755 instead call perror_with_name.
1756 (check_ptrace_stopped_lwp_gone): New function.
1757 (linux_resume_one_lwp): Reimplement as wrapper around
1758 linux_resume_one_lwp_throw that swallows errors if the LWP is
1759 gone.
1760
91baf43f
PA
17612015-03-19 Pedro Alves <palves@redhat.com>
1762
1763 * linux-low.c (count_events_callback, select_event_lwp_callback):
1764 No longer check whether the thread has resume_stop as last resume
1765 kind.
1766
8bf3b159
PA
17672015-03-19 Pedro Alves <palves@redhat.com>
1768
1769 * linux-low.c (count_events_callback, select_event_lwp_callback):
1770 Use the lwp's status_pending_p field, not the thread's.
1771
b90fc188
PA
17722015-03-19 Pedro Alves <palves@redhat.com>
1773
1774 * linux-low.c (select_event_lwp_callback): Update comments to
1775 no longer mention SIGTRAP.
1776
464b0089
GB
17772015-03-18 Gary Benson <gbenson@redhat.com>
1778
1779 * server.c (handle_query): Do not report vFile:fstat as supported.
1780
aa9e327f
GB
17812015-03-11 Gary Benson <gbenson@redhat.com>
1782
1783 * hostio.c (sys/types.h): New include.
1784 (sys/stat.h): Likewise.
1785 (common-remote-fileio.h): Likewise.
1786 (handle_fstat): New function.
1787 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 1788
791c0056
GB
17892015-03-11 Gary Benson <gbenson@redhat.com>
1790
1791 * configure.ac (AC_CHECK_MEMBERS): Add checks for
1792 struct stat.st_blocks and struct stat.st_blksize.
1793 * configure: Regenerate.
1794 * config.in: Likewise.
1795 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
1796 (OBS): Add common-remote-fileio.o.
1797 (common-remote-fileio.o): New rule.
1798
9a9df970
PA
17992015-03-09 Pedro Alves <palves@redhat.com>
1800
1801 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
1802 'struct sockaddr' pointer in 'accept' call.
1803
9eb1356e
PA
18042015-03-09 Pedro Alves <palves@redhat.com>
1805
1806 Revert:
1807 2015-03-07 Pedro Alves <palves@redhat.com>
1808 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
1809 or <winsock2.h> here. Instead include "gdb_socket.h".
1810 (remote_open): Use union gdb_sockaddr_u.
1811 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
1812 or <winsock2.h> here. Instead include "gdb_socket.h".
1813 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
1814 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
1815 or <sys/un.h>.
1816 (init_named_socket, gdb_agent_helper_thread): Use union
1817 gdb_sockaddr_u.
1818
aac331e4
PA
18192015-03-07 Pedro Alves <palves@redhat.com>
1820
1821 * configure.ac (build_warnings): Move
1822 -Wdeclaration-after-statement to the C-specific set.
1823 * configure: Regenerate.
1824
366c75fc
PA
18252015-03-07 Pedro Alves <palves@redhat.com>
1826
1827 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
1828 or <winsock2.h> here. Instead include "gdb_socket.h".
1829 (remote_open): Use union gdb_sockaddr_u.
1830 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
1831 or <winsock2.h> here. Instead include "gdb_socket.h".
1832 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
1833 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
1834 or <sys/un.h>.
1835 (init_named_socket, gdb_agent_helper_thread): Use union
1836 gdb_sockaddr_u.
1837
492d29ea
PA
18382015-03-07 Pedro Alves <palves@redhat.com>
1839
1840 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
1841 instead.
1842
60a191ed
YQ
18432015-03-06 Yao Qi <yao.qi@linaro.org>
1844
1845 * linux-aarch64-low.c (aarch64_insert_point): Use
1846 show_debug_regs as a boolean.
1847 (aarch64_remove_point): Likewise.
1848
f5771b1d
PA
18492015-03-05 Pedro Alves <palves@redhat.com>
1850
1851 * lynx-low.c (lynx_target_ops): Install NULL hooks for
1852 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
1853 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
1854 * nto-low.c (nto_target_ops): Likewise.
1855 * spu-low.c (spu_target_ops): Likewise.
1856 * win32-low.c (win32_target_ops): Likewise.
1857
3e572f71
PA
18582015-03-04 Pedro Alves <palves@redhat.com>
1859
72f4393d 1860 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
1861 Decide whether a breakpoint triggered based on the SIGTRAP's
1862 siginfo.si_code.
72f4393d
L
1863 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
1864 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
1865 (linux_low_filter_event): Check for breakpoints before checking
1866 watchpoints.
1867 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
1868 siginfo.si_code.
72f4393d
L
1869 (linux_stopped_by_sw_breakpoint)
1870 (linux_supports_stopped_by_sw_breakpoint)
1871 (linux_stopped_by_hw_breakpoint)
1872 (linux_supports_stopped_by_hw_breakpoint): New functions.
1873 (linux_target_ops): Install new target methods.
3e572f71 1874
1ec68e26
PA
18752015-03-04 Pedro Alves <palves@redhat.com>
1876
1877 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
1878 * server.c (swbreak_feature, hwbreak_feature): New globals.
1879 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
1880 (captured_main): Clear swbreak_feature and hwbreak_feature.
1881 * server.h (swbreak_feature, hwbreak_feature): Declare.
1882 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
1883 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
1884 supports_stopped_by_hw_breakpoint>: New fields.
1885 (target_supports_stopped_by_sw_breakpoint)
1886 (target_stopped_by_sw_breakpoint)
1887 (target_supports_stopped_by_hw_breakpoint)
1888 (target_stopped_by_hw_breakpoint): Declare.
1889
15c66dd6
PA
18902015-03-04 Pedro Alves <palves@redhat.com>
1891
1892 enum lwp_stop_reason -> enum target_stop_reason
1893 * linux-low.c (check_stopped_by_breakpoint): Adjust.
1894 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
1895 (linux_wait_1, stuck_in_jump_pad_callback)
1896 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
1897 (linux_stopped_by_watchpoint):
1898 * linux-low.h (enum lwp_stop_reason): Delete.
1899 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
1900 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
1901
98fc70d6
YQ
19022015-03-04 Yao Qi <yao.qi@linaro.org>
1903
1904 * Makefile.in (SFILES): Add linux-aarch64-low.c.
1905
dd2ac174
GB
19062015-03-03 Gary Benson <gbenson@redhat.com>
1907
1908 * hostio.c (handle_vFile): Fix prefix lengths.
1909
d68e53f4
MM
19102015-03-03 Markus Metzger <markus.t.metzger@intel.com>
1911
1912 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
1913 ptr_bits.
1914
bf2d68ab
AA
19152015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
1916
1917 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
1918 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
1919 (clean): Add "rm -f" for above C files.
1920 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
1921 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
1922 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
1923 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
1924 * linux-s390-low.c (HWCAP_S390_VX): New macro.
1925 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
1926 (init_registers_s390x_vx_linux64)
1927 (init_registers_s390x_tevx_linux64)
1928 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
1929 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
1930 declarations.
1931 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
1932 (s390_store_vxrs_high): New functions.
1933 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
1934 NT_S390_VXRS_HIGH.
1935 (s390_arch_setup): Add logic for selecting one of the new target
1936 descriptions. Activate the new vector regsets if applicable.
1937 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
1938 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
1939 and init_registers_s390x_tevx_linux64.
1940
c966a859
PA
19412015-03-01 Pedro Alves <palves@redhat.com>
1942
1943 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
1944 parameter.
1945
4180215b
PA
19462015-02-27 Pedro Alves <palves@redhat.com>
1947
1948 * linux-x86-low.c (u_debugreg_offset): New function.
1949 (x86_linux_dr_get, x86_linux_dr_set): Use it.
1950
749bab01
PA
19512015-02-27 Pedro Alves <palves@redhat.com>
1952
1953 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
1954 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
1955 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
1956 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
1957 (ps_lsetfpregs, ps_getpid)
1958 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
1959 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
1960 (ps_lsetxregs, ps_plog): Declare.
1961
3c14e5a3
PA
19622015-02-27 Pedro Alves <palves@redhat.com>
1963
1964 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
1965 IP_AGENT_EXPORT_FUNC.
1966 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
1967 IP_AGENT_EXPORT_FUNC.
1968 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
1969 (IP_AGENT_EXPORT): Delete.
1970 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
1971 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
1972 (gdb_trampoline_buffer_error, collecting, gdb_collect)
1973 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
1974 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
1975 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
1976 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
1977 (traceframe_read_count, traceframe_write_count)
1978 (traceframes_created, trace_state_variables, get_raw_reg)
1979 (get_trace_state_variable_value, set_trace_state_variable_value)
1980 (ust_loaded, helper_thread_id, cmd_buf): Use
1981 IPA_SYM_EXPORTED_NAME.
1982 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
1983 (tracepoints) Use IP_AGENT_EXPORT_VAR.
1984 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
1985 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
1986 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
1987 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
1988 EXTERN_C_PUSH/EXTERN_C_POP.
1989 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
1990 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
1991 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
1992 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
1993 (traceframe_write_count, traceframe_read_count)
1994 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
1995 (about_to_request_buffer_space, get_trace_state_variable_value)
1996 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
1997 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
1998 EXTERN_C_PUSH/EXTERN_C_POP.
1999 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
2000 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
2001 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
2002 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2003 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
2004 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
2005 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
2006 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
2007 Define.
2008 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
2009 (IP_AGENT_EXPORT_VAR_DECL): Define.
2010 (tracing): Declare.
2011 (gdb_agent_get_raw_reg): Declare.
2012
fe978cb0
PA
20132015-02-27 Tom Tromey <tromey@redhat.com>
2014 Pedro Alves <palves@redhat.com>
2015
2016 Rename symbols whose names are reserved C++ keywords throughout.
2017
3bc3d82a
PA
20182015-02-27 Pedro Alves <palves@redhat.com>
2019
2020 * Makefile.in (COMPILER): New, get it from autoconf.
2021 (CXX): Get from autoconf instead.
2022 (COMPILE.pre): Use COMPILER.
2023 (CC-LD): Rename to ...
2024 (CC_LD): ... this. Use COMPILER.
2025 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
2026 (CXX_FOR_TARGET): Default to g++ instead of gcc.
2027 * acinclude.m4: Include build-with-cxx.m4.
2028 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
2029 Disable -Werror by default if building in C++ mode.
2030 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
2031 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
2032 the C++ compiler. Save/restore CXXFLAGS too.
2033 * configure: Regenerate.
2034
07697489
PA
20352015-02-27 Pedro Alves <palves@redhat.com>
2036
2037 * acinclude.m4: Include libiberty.m4.
2038 * configure.ac: Call libiberty_INIT.
2039 * config.in, configure: Regenerate.
2040
9beb7c4e
PA
20412015-02-26 Pedro Alves <palves@redhat.com>
2042
2043 * linux-low.c (linux_wait_1): When incrementing the PC past a
2044 program breakpoint always use the_low_target.breakpoint_len as
2045 increment, rather than the maximum between that and
2046 the_low_target.decr_pc_after_break.
2047
8090aef2
PA
20482015-02-23 Pedro Alves <palves@redhat.com>
2049
2050 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
2051 thread was doing a step-over; always adjust the PC if
2052 we stepped over a permanent breakpoint.
2053 (linux_wait_1): If we stepped over breakpoint that was on top of a
2054 permanent breakpoint, manually advance the PC past it.
2055
bc9540e8
PA
20562015-02-23 Pedro Alves <palves@redhat.com>
2057
2058 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
2059 modes.
2060 (x86_fill_gregset, x86_store_gregset): Use it when handling
2061 $orig_eax.
2062
2db9a427
PA
20632015-02-20 Pedro Alves <palves@redhat.com>
2064
2065 * thread-db.c: Include "nat/linux-procfs.h".
2066 (thread_db_init): Skip listing new threads if the kernel supports
2067 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
2068
afa8d396
PA
20692015-02-20 Pedro Alves <palves@redhat.com>
2070
2071 * linux-low.c (status_pending_p_callback): Use ptid_match.
2072
c9587f88
AT
20732015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
2074
2075 PR breakpoints/16812
2076 * linux-low.c (wstatus_maybe_breakpoint): Remove.
2077 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
2078 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
2079
b05ec7a5
AT
20802015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
2081
2082 PR breakpoints/15956
2083 * tracepoint.c (cmd_qtinit): Add check for current_thread.
2084
d33501a5
MM
20852015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2086
2087 * linux-low.c (linux_low_btrace_conf): Print size.
2088 * server.c (handle_btrace_conf_general_set): New.
2089 (hanle_general_set): Call handle_btrace_conf_general_set.
2090 (handle_query): Report Qbtrace-conf:bts:size as supported.
2091
f4abbc16
MM
20922015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2093
2094 * linux-low.c (linux_low_enable_btrace): Update parameters.
2095 (linux_low_btrace_conf): New.
2096 (linux_target_ops)<to_btrace_conf>: Initialize.
2097 * server.c (current_btrace_conf): New.
2098 (handle_btrace_enable): Rename to ...
2099 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
2100 to target_enable_btrace. Update comment. Update users.
2101 (handle_qxfer_btrace_conf): New.
2102 (qxfer_packets): Add btrace-conf entry.
2103 (handle_query): Report qXfer:btrace-conf:read as supported packet.
2104 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
2105 (target_ops)<read_btrace_conf>: New.
2106 (target_enable_btrace): Update parameters.
2107 (target_read_btrace_conf): New.
2108
043c3577
MM
21092015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2110
2111 * server.c (handle_btrace_general_set): Remove call to
2112 target_supports_btrace.
2113 (supported_btrace_packets): New.
2114 (handle_query): Call supported_btrace_packets.
2115 * target.h: include btrace-common.h.
2116 (btrace_target_info): Removed.
2117 (supports_btrace, target_supports_btrace): Update parameters.
2118
734b0e4b
MM
21192015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2120
2121 * Makefile.in (SFILES): Add common/btrace-common.c.
2122 (OBS): Add common/btrace-common.o.
2123 (btrace-common.o): Add build rules.
2124 * linux-low: Include btrace-common.h.
2125 (linux_low_read_btrace): Use struct btrace_data. Call
2126 btrace_data_init and btrace_data_fini.
2127
d6c146e9
PA
21282015-02-06 Pedro Alves <palves@redhat.com>
2129
2130 * thread-db.c (find_new_threads_callback): Add debug output.
2131
20ba1ce6
PA
21322015-02-04 Pedro Alves <palves@redhat.com>
2133
2134 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
2135 (resume_stopped_resumed_lwps): New function.
2136 (linux_wait_for_event_filtered): Use it.
2137
8cc73a39
SDJ
21382015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
2139
2140 * Makefile.in (SFILES): Add linux-personality.c.
2141 (linux-personality.o): New rule.
2142 * configure.srv (srv_linux_obj): Add linux-personality.o to the
2143 list of objects to be built.
2144 * linux-low.c: Include nat/linux-personality.h.
2145 (linux_create_inferior): Remove code to disable address space
2146 randomization (moved to ../nat/linux-personality.c). Create
2147 cleanup to disable address space randomization.
2148
fb23d554
SDJ
21492015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
2150
2151 * Makefile.in (posix-strerror.o): New rule.
2152 (mingw-strerror.o): Likewise.
2153 * configure: Regenerated.
2154 * configure.ac: Source file ../common/common.host. Initialize new
2155 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
2156
cdf43629
YQ
21572015-01-14 Yao Qi <yao@codesourcery.com>
2158
2159 * Makefile.in (SFILES): Add nat/ppc-linux.c.
2160 (ppc-linux.o): New rule.
2161 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
2162 * configure.ac: AC_CHECK_FUNCS(getauxval).
2163 * config.in: Re-generated.
2164 * configure: Re-generated.
2165 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
2166 ppc64_64bit_inferior_p
2167
514c5338
YQ
21682015-01-14 Yao Qi <yao@codesourcery.com>
2169
2170 * linux-ppc-low.c: Include "nat/ppc-linux.h".
2171 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
2172 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
2173 (PT_ORIG_R3, PT_TRAP): Likewise.
2174 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
2175 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
2176 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
2177
3368c1e5
JB
21782015-01-10 Joel Brobecker <brobecker@adacore.com>
2179
2180 * i387-fp.c (i387_cache_to_xsave): In look over
2181 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
2182 zmmh_low_space field by use of zmmh_high_space.
2183
582511be
PA
21842015-01-09 Pedro Alves <palves@redhat.com>
2185
2186 * linux-low.c (step_over_bkpt): Move higher up in the file.
2187 (handle_extended_wait): Don't store the stop_pc here.
2188 (get_stop_pc): Adjust comments and rename to ...
2189 (check_stopped_by_breakpoint): ... this. Record whether the LWP
2190 stopped for a software breakpoint or hardware breakpoint.
2191 (thread_still_has_status_pending_p): New function.
2192 (status_pending_p_callback): Use
2193 thread_still_has_status_pending_p. If the event is no longer
2194 interesting, resume the LWP.
2195 (handle_tracepoints): Add assert.
2196 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
2197 (wstatus_maybe_breakpoint): New function.
2198 (cancel_breakpoint): Delete function.
2199 (check_stopped_by_watchpoint): New function, factored out from
2200 linux_low_filter_event.
2201 (lp_status_maybe_breakpoint): Delete function.
2202 (linux_low_filter_event): Remove filter_ptid argument.
2203 Leave thread group exits pending here. Store the LWP's stop PC.
2204 Always leave events pending.
2205 (linux_wait_for_event_filtered): Pull all events out of the
2206 kernel, and leave them all pending.
2207 (count_events_callback, select_event_lwp_callback): Consider all
2208 events.
2209 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
2210 (select_event_lwp): Only give preference to the stepping LWP in
2211 all-stop mode. Adjust comments.
2212 (ignore_event): New function.
2213 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
2214 references to cancel_breakpoints. Adjust to renames. Also give
2215 equal priority to all LWPs that have had events in non-stop mode.
2216 If reporting a software breakpoint event, unadjust the LWP's PC.
2217 (linux_wait): If linux_wait_1 returned an ignored event, retry.
2218 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
2219 Adjust.
2220 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
2221 (resume_status_pending_p): Use thread_still_has_status_pending_p.
2222 (linux_stopped_by_watchpoint): Adjust.
2223 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
2224 * linux-low.h (enum lwp_stop_reason): New.
2225 (struct lwp_info) <stop_pc>: Adjust comment.
2226 <stopped_by_watchpoint>: Delete field.
2227 <stop_reason>: New field.
2228 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
2229 * mem-break.c (software_breakpoint_inserted_here)
2230 (hardware_breakpoint_inserted_here): New function.
2231 * mem-break.h (software_breakpoint_inserted_here)
2232 (hardware_breakpoint_inserted_here): Declare.
2233 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
2234 (cancel_breakpoints): Delete.
2235 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
2236 (upload_fast_traceframes): Remove references to
2237 cancel_breakpoints.
2238
a33e3959
PA
22392015-01-09 Pedro Alves <palves@redhat.com>
2240
2241 * thread-db.c (find_new_threads_callback): Ignore thread if the
2242 kernel thread ID is -1.
2243
8784d563
PA
22442015-01-09 Pedro Alves <palves@redhat.com>
2245
2246 * linux-low.c (linux_attach_fail_reason_string): Move to
2247 nat/linux-ptrace.c, and rename.
2248 (linux_attach_lwp): Update comment.
2249 (attach_proc_task_lwp_callback): New function.
2250 (linux_attach): Adjust to rename and use
2251 linux_proc_attach_tgid_threads.
2252 (linux_attach_fail_reason_string): Delete declaration.
2253
76f2b779
JB
22542015-01-01 Joel Brobecker <brobecker@adacore.com>
2255
2256 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
2257 * server.c (gdbserver_version): Likewise.
2258
fafcc06a
SDJ
22592014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
2260
2261 * remote-utils.c: Include ctype.h.
2262 (input_interrupt): Explicitly handle the case when the char
2263 received is the NUL byte. Improve the printing of non-ASCII
2264 characters.
2265
beed38b8
JB
22662014-12-16 Joel Brobecker <brobecker@adacore.com>
2267
2268 * linux-low.c (linux_low_filter_event): Update call to
2269 linux_enable_event_reporting following the addition of
2270 a new parameter to that function.
2271
bf330350
CU
22722014-12-16 Catalin Udma <catalin.udma@freescale.com>
2273
2274 PR server/17457
2275 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
2276 (AARCH64_FPCR_REGNO): Likewise.
2277 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
2278 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
2279 (aarch64_store_fpregset): Likewise.
2280
5227d625
JB
22812014-12-15 Joel Brobecker <brobecker@adacore.com>
2282
2283 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
2284 Remove FIXME comment about assumption about N.
2285
f93b65a0
JB
22862014-12-13 Joel Brobecker <brobecker@adacore.com>
2287
2288 * configure.ac: If large-file support is disabled in GDBserver,
2289 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
2290 * configure: Regenerate.
2291
e5a9158d
AA
22922014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2293
2294 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
2295 warning upon ENODATA from ptrace.
2296 * linux-s390-low.c (s390_store_tdb): New.
2297 (s390_regsets): Add regset for NT_S390_TDB.
2298
feea5f36
AA
22992014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2300
2301 * linux-low.c (regsets_store_inferior_registers): Skip regsets
2302 without a fill_function.
2303 * linux-s390-low.c (s390_fill_last_break): Remove.
2304 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
2305 (s390_arch_setup): Use regset's size instead of fill_function for
2306 loop end condition.
2307
098dbe61
AA
23082014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2309
2310 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
2311 the regset's store function when ptrace returned an error.
2312 * regcache.c (get_thread_regcache): Invalidate register cache
2313 before fetching inferior's registers.
2314
28eef672
AA
23152014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2316
2317 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
2318 while-loop as for-loop.
2319 (regsets_store_inferior_registers): Likewise.
2320
bdca27a2
YQ
23212014-11-28 Yao Qi <yao@codesourcery.com>
2322
2323 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
2324 * config.in, configure: Re-generate.
2325 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
2326 is defined.
2327
9c232dda
YQ
23282014-11-21 Yao Qi <yao@codesourcery.com>
2329
2330 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
2331 (AC_CHECK_HEADERS): Remove malloc.h.
2332 * configure: Re-generated.
2333 * config.in: Re-generated.
2334 * server.h: Don't include alloca.h and malloc.h.
2335 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
2336 Don't include malloc.h.
2337
43968415
JB
23382014-11-17 Joel Brobecker <brobecker@adacore.com>
2339
2340 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
2341 corresponding ERRNO check in same block.
2342
40e91bc7
PA
23432014-11-12 Pedro Alves <palves@redhat.com>
2344
2345 * server.c (cont_thread): Update comment.
2346 (start_inferior, attach_inferior): No longer clear cont_thread.
2347 (handle_v_cont): No longer set cont_thread.
2348 (captured_main): Clear cont_thread each time a GDB connects.
2349
c2c118cf
PA
23502014-11-12 Pedro Alves <palves@redhat.com>
2351
2352 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
2353 thread, and don't resume all threads if the Hc thread has exited.
2354
78708b7c
PA
23552014-11-12 Pedro Alves <palves@redhat.com>
2356
2357 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
2358 the process group instead of to a specific LWP.
2359
a2abc7de
PA
23602014-10-15 Pedro Alves <palves@redhat.com>
2361
2362 PR server/17487
2363 * win32-arm-low.c (arm_set_thread_context): Remove current_event
2364 parameter.
2365 (arm_set_thread_context): Delete.
2366 (the_low_target): Adjust.
2367 * win32-i386-low.c (debug_registers_changed)
2368 (debug_registers_used): Delete.
2369 (update_debug_registers_callback): New function.
2370 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
2371 needing to update their debug registers.
2372 (win32_get_current_dr): New function.
2373 (x86_dr_low_get_addr, x86_dr_low_get_control)
2374 (x86_dr_low_get_status): Fetch the debug register from the thread
2375 record's context.
2376 (i386_initial_stuff): Adjust.
2377 (i386_get_thread_context): Remove current_event parameter. Don't
2378 clear debug_registers_changed nor copy DR values to
2379 debug_reg_state.
2380 (i386_set_thread_context): Delete.
2381 (i386_prepare_to_resume): New function.
2382 (i386_thread_added): Mark the thread as needing to update irs
2383 debug registers.
2384 (the_low_target): Remove i386_set_thread_context and install
2385 i386_prepare_to_resume.
2386 * win32-low.c (win32_get_thread_context): Adjust.
2387 (win32_set_thread_context): Use SetThreadContext
2388 directly.
2389 (win32_prepare_to_resume): New function.
2390 (win32_require_context): New function, factored out from ...
2391 (thread_rec): ... this.
2392 (continue_one_thread): Call win32_prepare_to_resume on each thread
2393 we're about to continue.
2394 (win32_resume): Call win32_prepare_to_resume on the event thread.
2395 * win32-low.h (struct win32_thread_info)
2396 <debug_registers_changed>: New field.
2397 (struct win32_target_ops): Change prototype of set_thread_context,
2398 delete set_thread_context and add prepare_to_resume.
2399 (win32_require_context): New declaration.
2400
a442d071
GB
24012014-10-08 Gary Benson <gbenson@redhat.com>
2402
2403 * server.h: Do not include common-exceptions.h.
2404
6f1947e8
GB
24052014-10-08 Gary Benson <gbenson@redhat.com>
2406
2407 * server.h: Do not include cleanups.h.
2408
63b434a4
JH
24092014-09-30 James Hogan <james.hogan@imgtec.com>
2410
2411 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
2412 mips64-dsp-linux.c.
2413
c4d9ceb6
YQ
24142014-09-23 Yao Qi <yao@codesourcery.com>
2415
2416 * linux-low.c (lp_status_maybe_breakpoint): New function.
2417 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
2418 (count_events_callback): Likewise.
2419 (select_event_lwp_callback): Likewise.
2420 (cancel_breakpoints_callback): Likewise.
2421
89a5711c
DB
24222014-09-19 Don Breazeal <donb@codesourcery.com>
2423
2424 * linux-low.c (handle_extended_wait): Call
2425 linux_ptrace_get_extended_event.
2426 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
2427 linux_is_extended_waitstatus.
2428
bffc0964
JB
24292014-09-16 Joel Brobecker <brobecker@adacore.com>
2430
2431 * Makefile.in (CPPFLAGS): Define.
2432 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
2433 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
2434
0bfdf32f
GB
24352014-09-16 Gary Benson <gbenson@redhat.com>
2436
2437 * inferiors.h (current_inferior): Renamed as...
2438 (current_thread): New variable. All uses updated.
2439 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
2440 (maybe_move_out_of_jump_pad): Likewise.
2441 (cancel_breakpoint): Likewise.
2442 (linux_low_filter_event): Likewise.
2443 (wait_for_sigstop): Likewise.
2444 (linux_resume_one_lwp): Likewise.
2445 (need_step_over_p): Likewise.
2446 (start_step_over): Likewise.
2447 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
2448 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
2449 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
2450 and save_inferior as saved_thread.
2451 * regcache.c (get_thread_regcache): Renamed saved_inferior as
2452 saved_thread.
2453 (regcache_invalidate_thread): Likewise.
2454 * remote-utils.c (prepare_resume_reply): Likewise.
2455 * thread-db.c (thread_db_get_tls_address): Likewise.
2456 (disable_thread_event_reporting): Likewise.
2457 (remove_thread_event_breakpoints): Likewise.
2458 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
2459 as saved_thread.
2460 * target.h (set_desired_inferior): Renamed as...
2461 (set_desired_thread): New declaration. All uses updated.
2462 * server.c (myresume): Updated comment to reference thread instead
2463 of inferior.
2464 (handle_serial_event): Likewise.
2465 (handle_target_event): Likewise.
2466
361c8ade
GB
24672014-09-12 Tom Tromey <tromey@redhat.com>
2468 Gary Benson <gbenson@redhat.com>
2469
2470 * regcache.h: Include common-regcache.h.
2471 (regcache_read_pc): Don't declare.
2472 * regcache.c (get_thread_regcache_for_ptid): New function.
2473
bd9269f7
GB
24742014-09-11 Tom Tromey <tromey@redhat.com>
2475 Gary Benson <gbenson@redhat.com>
2476
2477 * symbol.c: New file.
2478 * Makefile.in (SFILES): Add symbol.c.
2479 (OBS): Add symbol.o.
2480
f8c1d06b
GB
24812014-09-11 Gary Benson <gbenson@redhat.com>
2482
2483 * target.c (target_stop_ptid, target_continue_ptid): New
2484 functions.
2485
721ec300
GB
24862014-09-11 Tom Tromey <tromey@redhat.com>
2487 Gary Benson <gbenson@redhat.com>
2488
2489 * target.h: Include target/target.h.
2490 * target.c (target_read_memory, target_read_uint32)
2491 (target_write_memory): New functions.
2492
c5e92cca
GB
24932014-09-11 Gary Benson <gbenson@redhat.com>
2494
2495 * server.h (debug_hw_points): Don't declare.
2496 * server.c (debug_hw_points): Don't define. Replace all uses
2497 with show_debug_regs.
2498 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
2499 all uses with show_debug_regs.
2500
2e4bb98a
EBM
25012014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
2502
2503 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
2504 endianness into account.
2505 (ppc_supply_ptrace_register): Likewise.
2506
ac740bc7
JH
25072014-09-03 James Hogan <james.hogan@imgtec.com>
2508
2509 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
2510 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
2511
97ea6506
GB
25122014-09-03 Gary Benson <gbenson@redhat.com>
2513
2514 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
2515 ALL_DEBUG_ADDRESS_REGISTERS.
2516
df7e5265
GB
25172014-09-02 Gary Benson <gbenson@redhat.com>
2518
2519 * i386-low.h: Renamed as...
2520 * x86-low.h: New file. All type, function and variable name
2521 prefixes changed from "i386_" to "x86_". All references updated.
2522 * i386-low.c: Renamed as...
2523 * x86-low.c: New file. All type, function and variable name
2524 prefixes changed from "i386_" to "x86_". All references updated.
2525
ed859da7
GB
25262014-09-02 Gary Benson <gbenson@redhat.com>
2527
2528 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
2529 (x86_linux_new_thread): Likewise.
2530
860789c7
GB
25312014-08-29 Gary Benson <gbenson@redhat.com>
2532
2533 * server.h (setjmp.h): Do not include.
2534 (toplevel): Do not declare.
2535 (common-exceptions.h): Include.
2536 (cleanups.h): Likewise.
2537 * server.c (toplevel): Do not define.
2538 (exit_code): New static global.
2539 (detach_or_kill_for_exit_cleanup): New function.
2540 (main): New function. Original main renamed to...
2541 (captured_main): New function.
2542 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
2543
ff55e1b5
GB
25442014-08-29 Gary Benson <gbenson@redhat.com>
2545
2546 * Makefile.in (SFILES): Add common/common-exceptions.c.
2547 (OBS): Add common-exceptions.o.
2548 (common-exceptions.o): New rule.
2549 * utils.c (prepare_to_throw_exception): New function.
2550
e9bcb658
GB
25512014-08-29 Gary Benson <gbenson@redhat.com>
2552
2553 * config.in: Regenerate.
2554 * configure: Likewise.
2555
e3180625
GB
25562014-08-29 Gary Benson <gbenson@redhat.com>
2557
2558 * Makefile.in (SFILES): Add common/cleanups.c.
2559 (OBS): cleanups.o.
2560 (cleanups.o): New rule.
2561
e3d6ba5d
GB
25622014-08-29 Gary Benson <gbenson@redhat.com>
2563
2564 * utils.c (internal_vwarning): New function.
2565
7096e886
GB
25662014-08-28 Gary Benson <gbenson@redhat.com>
2567
2568 * utils.h (fatal): Remove declaration.
2569 * utils.c (fatal): Remove function.
2570
14ce3192
GB
25712014-08-28 Gary Benson <gbenson@redhat.com>
2572
2573 * tracepoint.c (gdb_agent_init): Replace fatal with
2574 perror_with_name.
2575 (initialize_tracepoint): Likewise.
2576
50278d59
GB
25772014-08-28 Gary Benson <gbenson@redhat.com>
2578
2579 * remote-utils.c (remote_prepare): Replace fatal with error.
2580
aa96c426
GB
25812014-08-28 Gary Benson <gbenson@redhat.com>
2582
2583 * linux-low.c (linux_async): Replace fatal with warning.
2584 Tidy up and return.
2585 (linux_start_non_stop): Return -1 if linux_async failed.
2586
f7160e97
GB
25872014-08-28 Gary Benson <gbenson@redhat.com>
2588
2589 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
2590 gdb_assert.
2591 (i386_dr_low_get_addr): Remove vague comment.
2592 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
2593 gdb_assert.
2594
38e08fca
GB
25952014-08-28 Gary Benson <gbenson@redhat.com>
2596
2597 * inferiors.c (get_thread_process): Replace check with gdb_assert.
2598 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
2599 internal_error.
2600 (linux_resume_one_lwp): Likewise.
2601 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
2602 gdb_assert.
2603 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
2604 with internal_error.
2605 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
2606 (init_register_cache): Replace fatal with gdb_assert_not_reached.
2607 (find_register_by_name): Replace fatal with internal_error.
2608 (find_regno): Likewise.
2609 * tdesc.c (init_target_desc): Replace check with gdb_assert.
2610 * thread-db.c (thread_db_create_event): Likewise.
2611 (thread_db_load_search): Likewise.
2612 (try_thread_db_load_1): Likewise.
2613 * tracepoint.c (get_jump_space_head): Replace fatal with
2614 internal_error.
2615 (claim_trampoline_space): Likewise.
2616 (have_fast_tracepoint_trampoline_buffer): Likewise.
2617 (cmd_qtstart): Likewise.
2618 (stop_tracing): Likewise.
2619 (fast_tracepoint_collecting): Likewise.
2620 (target_malloc): Likewise.
2621 (download_tracepoint): Likewise.
2622 (download_trace_state_variables): Replace check with gdb_assert.
2623 (upload_fast_traceframes): Replace fatal with internal_error.
2624
34abf635
GB
26252014-08-19 Tom Tromey <tromey@redhat.com>
2626 Gary Benson <gbenson@redhat.com>
2627
2628 * Makefile.in (SFILES): Add common/common-debug.c.
2629 (OBS): Add common-debug.o.
2630 (common-debug.o): New rule.
2631 * debug.h (debug_printf): Don't declare.
2632 * debug.c (debug_printf): Renamed and rewritten as...
2633 (debug_vprintf): New function.
2634
f6e94d78
GB
26352014-08-19 Gary Benson <gbenson@redhat.com>
2636
2637 * utils.h: Do not include print-utils.h.
2638
9239eeab
GB
26392014-08-19 Tom Tromey <tromey@redhat.com>
2640 Gary Benson <gbenson@redhat.com>
2641
2642 * server.h: Add static assertion.
2643 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
2644
ef87c8bb
GB
26452014-08-19 Tom Tromey <tromey@redhat.com>
2646 Gary Benson <gbenson@redhat.com>
2647
2648 * Makefile.in (SFILES): Add common/errors.c.
2649 (OBS): Add errors.o.
2650 (IPA_OBS): Add errors-ipa.o.
2651 (errors.o): New rule.
2652 (errors-ipa.o): Likewise.
2653 * utils.h (perror_with_name, error, warning): Don't declare.
2654 * utils.c (warning): Renamed and rewritten as...
2655 (vwarning): New function.
2656 (error): Renamed and rewritten as...
2657 (verror): New function.
2658 (internal_error): Renamed and rewritten as...
2659 (internal_verror): New function.
2660
bb974a24
GB
26612014-08-07 Gary Benson <gbenson@redhat.com>
2662
2663 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
2664 * configure: Regenerate.
2665 * config.in: Likewise.
2666 * server.h: Do not include errno.h.
2667 * event-loop.c: Likewise.
2668 * hostio-errno.c: Likewise.
2669 * linux-low.c: Likewise.
2670 * remote-utils.c: Likewise.
2671 * spu-low.c: Likewise.
2672 * utils.c: Likewise.
2673 * gdbreplay.c: Unconditionally include errno.h.
2674
6d3d12eb
GB
26752014-08-07 Gary Benson <gbenson@redhat.com>
2676
2677 * server.h: Do not include string.h.
2678 * event-loop.c: Likewise.
2679 * linux-low.c: Likewise.
2680 * regcache.c: Likewise.
2681 * remote-utils.c: Likewise.
2682 * spu-low.c: Likewise.
2683 * utils.c: Likewise.
2684
dccbb609
GB
26852014-08-07 Gary Benson <gbenson@redhat.com>
2686
2687 * server.h: Do not include gdb_assert.h.
2688
e76df0d0
GB
26892014-08-07 Gary Benson <gbenson@redhat.com>
2690
2691 * server.h: Do not include common-utils.h.
2692
4cb9c816
GB
26932014-08-07 Gary Benson <gbenson@redhat.com>
2694
2695 * server.h: Do not include ptid.h.
2696 * notif.h: Likewise.
2697
3995eeee
GB
26982014-08-07 Gary Benson <gbenson@redhat.com>
2699
2700 * server.h: Do not include gdb_locale.h.
2701
cb9f1a9b
GB
27022014-08-07 Gary Benson <gbenson@redhat.com>
2703
2704 * server.h: Do not include gdb/signals.h.
2705 * win32-low.c: Likewise.
2706
a5fceff8
GB
27072014-08-07 Gary Benson <gbenson@redhat.com>
2708
2709 * server.h: Do not include pathmax.h.
2710
b9391142
GB
27112014-08-07 Gary Benson <gbenson@redhat.com>
2712
2713 * server.h: Do not include libiberty.h.
2714 * linux-bfin-low.c: Likewise.
2715
0e443c87
GB
27162014-08-07 Gary Benson <gbenson@redhat.com>
2717
2718 * server.h: Do not include ansidecl.h.
2719
8ebb3f56
GB
27202014-08-07 Gary Benson <gbenson@redhat.com>
2721
2722 * linux-x86-low.c: Do not include stddef.h.
2723 * lynx-ppc-low.c: Likewise.
2724 * tracepoint.c: Likewise.
2725
8980bdf6
GB
27262014-08-07 Gary Benson <gbenson@redhat.com>
2727
2728 * server.h: Do not include stdarg.h.
2729 * nto-low.c: Likewise.
2730
d7096f71
GB
27312014-08-07 Gary Benson <gbenson@redhat.com>
2732
2733 * server.h: Do not include stdlib.h.
2734 * inferiors.c: Likewise.
2735 * linux-low.c: Likewise.
2736 * regcache.c: Likewise.
2737 * spu-low.c: Likewise.
2738 * tracepoint.c: Likewise.
2739 * utils.c: Likewise.
2740
d02f550d
GB
27412014-08-07 Gary Benson <gbenson@redhat.com>
2742
2743 * server.h: Do not include stdio.h.
2744 * linux-low.c: Likewise.
2745 * remote-utils.c: Likewise.
2746 * spu-low.c: Likewise.
2747 * utils.c: Likewise.
2748 * wincecompat.c: Likewise.
2749
87f6c4e3
GB
27502014-08-06 Gary Benson <gbenson@redhat.com>
2751
2752 * regcache.c (init_register_cache): Move conditionals inside if.
2753
7089dca4
GB
27542014-08-06 Gary Benson <gbenson@redhat.com>
2755
2756 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
2757
462f517e
GB
27582014-07-31 Gary Benson <gbenson@redhat.com>
2759
2760 * ax.h: Do not include server.h.
2761 * gdbthread.h: Likewise.
2762 * lynx-low.h: Likewise.
2763 * notif.h: Likewise.
2764
976411d6
GB
27652014-07-30 Gary Benson <gbenson@redhat.com>
2766
2767 * server.h: Include common-defs.h.
2768 Do not include config.h or build-gnulib-gdbserver/config.h.
2769
d41f6d8e
GB
27702014-07-30 Gary Benson <gbenson@redhat.com>
2771
2772 * hostio-errno.c: Move server.h to top of includes list.
2773 * inferiors.c: Likewise.
2774 * linux-x86-low.c: Likewise.
2775 * notif.c: Include server.h.
2776
314c6a35
TT
27772014-07-24 Tom Tromey <tromey@redhat.com>
2778 Gary Benson <gbenson@redhat.com>
2779
2780 * server.h (CORE_ADDR): Now unsigned.
2781
69ff6be5
PA
27822014-07-16 Pedro Alves <palves@redhat.com>
2783
2784 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
2785
ce9e3fe7
PA
27862014-07-15 Pedro Alves <palves@redhat.com>
2787
2788 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
2789 copy.
2790
e76126e8
PA
27912014-07-11 Pedro Alves <palves@redhat.com>
2792
2793 * linux-low.c (kill_wait_lwp): New function, based on
2794 kill_one_lwp_callback, but use my_waitpid directly.
2795 (kill_one_lwp_callback, linux_kill): Use it.
2796
8e9db26e
PA
27972014-06-23 Pedro Alves <palves@redhat.com>
2798
2799 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
2800 before setting DR0..DR3.
2801
698b3e08
GB
28022014-06-20 Gary Benson <gbenson@redhat.com>
2803
2804 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
2805 * configure: Regenerated.
2806 * config.in: Likewise.
2807
125f8a3d
GB
28082014-06-20 Gary Benson <gbenson@redhat.com>
2809
2810 * Makefile.in (SFILES): Update locations for files moved
2811 from common to nat.
2812 (object file files): Reordered.
2813
42995dbd
GB
28142014-06-20 Gary Benson <gbenson@redhat.com>
2815
2816 * i386-low.h (i386_dr_low_can_set_addr): Removed.
2817 (i386_dr_low_set_addr): Likewise.
2818 (i386_dr_low_get_addr): Likewise.
2819 (i386_dr_low_can_set_control): Likewise.
2820 (i386_dr_low_set_control): Likewise.
2821 (i386_dr_low_get_control): Likewise.
2822 (i386_dr_low_get_status): Likewise.
2823 (i386_get_debug_register_length): Likewise.
2824 * linux-x86-low.c (i386_dr_low_set_addr):
2825 Changed signature. Made static.
2826 (i386_dr_low_get_addr): Likewise.
2827 (i386_dr_low_set_control): Likewise.
2828 (i386_dr_low_get_control): Likewise.
2829 (i386_dr_low_get_status): Likewise.
2830 (i386_dr_low): New global variable.
2831 * win32-i386-low.c (i386_dr_low_set_addr):
2832 Changed signature. Made static.
2833 (i386_dr_low_get_addr): Likewise.
2834 (i386_dr_low_set_control): Likewise.
2835 (i386_dr_low_get_control): Likewise.
2836 (i386_dr_low_get_status): Likewise.
2837 (i386_dr_low): New global variable.
2838
e1d2394b
MS
28392014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
2840
2841 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
2842 * Makefile.in (AR, AR_FLAGS): Define.
2843 * configure: Regenerate.
2844
3a8ee006
GB
28452014-06-19 Gary Benson <gbenson@redhat.com>
2846
2847 * Makefile.in (i386-dregs.o): New rule.
2848 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
2849 * i386-low.c (target.h): Remove include.
2850 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
2851 (DR_CONTROL_SHIFT): Likewise.
2852 (DR_CONTROL_SIZE): Likewise.
2853 (DR_RW_EXECUTE): Likewise.
2854 (DR_RW_WRITE): Likewise.
2855 (DR_RW_READ): Likewise.
2856 (DR_RW_IORW): Likewise.
2857 (DR_LEN_1): Likewise.
2858 (DR_LEN_2): Likewise.
2859 (DR_LEN_4): Likewise.
2860 (DR_LEN_8): Likewise.
2861 (DR_LOCAL_ENABLE_SHIFT): Likewise.
2862 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
2863 (DR_ENABLE_SIZE): Likewise.
2864 (DR_LOCAL_SLOWDOWN): Likewise.
2865 (DR_GLOBAL_SLOWDOWN): Likewise.
2866 (DR_CONTROL_RESERVED): Likewise.
2867 (I386_DR_CONTROL_MASK): Likewise.
2868 (I386_DR_VACANT): Likewise.
2869 (I386_DR_LOCAL_ENABLE): Likewise.
2870 (I386_DR_GLOBAL_ENABLE): Likewise.
2871 (I386_DR_DISABLE): Likewise.
2872 (I386_DR_SET_RW_LEN): Likewise.
2873 (I386_DR_GET_RW_LEN): Likewise.
2874 (I386_DR_WATCH_HIT): Likewise.
2875 (i386_wp_op_t): Likewise.
2876 (i386_show_dr): Likewise.
2877 (i386_length_and_rw_bits): Likewise.
2878 (i386_insert_aligned_watchpoint): Likewise.
2879 (i386_remove_aligned_watchpoint): Likewise.
2880 (i386_handle_nonaligned_watchpoint): Likewise.
2881 i386_update_inferior_debug_regs(): Likewise.
2882 (i386_dr_insert_watchpoint): Likewise.
2883 (i386_dr_remove_watchpoint): Likewise.
2884 (i386_dr_region_ok_for_watchpoint): Likewise.
2885 (i386_dr_stopped_data_address): Likewise.
2886 (i386_dr_stopped_by_watchpoint): Likewise.
2887
8f26655c
GB
28882014-06-19 Gary Benson <gbenson@redhat.com>
2889
2890 * i386-low.c (i386_dr_show): Renamed to
2891 i386_show_dr and made static. All uses updated.
2892 (i386_dr_length_and_rw_bits): Renamed to
2893 i386_length_and_rw_bits and made static.
2894 All uses updated.
2895 (i386_dr_insert_aligned_watchpoint): Renamed to
2896 i386_insert_aligned_watchpoint and made static.
2897 All uses updated.
2898 (i386_dr_remove_aligned_watchpoint): Renamed to
2899 i386_remove_aligned_watchpoint and made static.
2900 All uses updated.
2901 (i386_dr_update_inferior_debug_regs): Renamed to
2902 i386_update_inferior_debug_regs and made static.
2903 All uses updated.
2904
b9228891
GB
29052014-06-18 Gary Benson <gbenson@redhat.com>
2906
5171def3
GB
2907 * i386-low.h (i386_dr_low_can_set_addr): New macro.
2908 (i386_dr_low_can_set_control): Likewise.
2909 (i386_get_debug_register_length): Likewise.
2910 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
2911 (i386_dr_low_can_set_control): Likewise.
2912 (i386_get_debug_register_length): Likewise.
2913
29142014-06-17 Gary Benson <gbenson@redhat.com>
2915
b9228891
GB
2916 * i386-low.h (i386-dregs.h): New include.
2917 (DR_FIRSTADDR): Now in i386-dregs.h.
2918 (DR_LASTADDR): Likewise.
2919 (DR_NADDR): Likewise.
2920 (DR_STATUS): Likewise.
2921 (DR_CONTROL): Likewise.
2922 (i386_debug_reg_state): Likewise.
2923 (i386_dr_insert_watchpoint): Likewise.
2924 (i386_dr_remove_watchpoint): Likewise.
2925 (i386_dr_region_ok_for_watchpoint): Likewise.
2926 (i386_dr_stopped_data_address): Likewise.
2927 (i386_dr_stopped_by_watchpoint): Likewise.
2928 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
2929
4be83cc2
GB
29302014-06-18 Gary Benson <gbenson@redhat.com>
2931
2932 * i386-low.h (i386_low_insert_watchpoint): Renamed to
2933 i386_dr_insert_watchpoint.
2934 (i386_low_remove_watchpoint): Renamed to
2935 i386_dr_remove_watchpoint.
2936 (i386_low_region_ok_for_watchpoint): Renamed to
2937 i386_dr_region_ok_for_watchpoint.
2938 (i386_low_stopped_data_address): Renamed to
2939 i386_dr_stopped_data_address.
2940 (i386_low_stopped_by_watchpoint): Renamed to
2941 i386_dr_stopped_by_watchpoint.
2942 * i386-low.c (i386_show_dr): Renamed to
2943 i386_dr_show and made nonstatic. All uses updated.
2944 (i386_length_and_rw_bits): Renamed to
2945 i386_dr_length_and_rw_bits and made nonstatic.
2946 All uses updated.
2947 (i386_insert_aligned_watchpoint): Renamed to
2948 i386_dr_insert_aligned_watchpoint and made nonstatic.
2949 All uses updated.
2950 (i386_remove_aligned_watchpoint): Renamed to
2951 i386_dr_remove_aligned_watchpoint and made nonstatic.
2952 All uses updated.
2953 (i386_update_inferior_debug_regs): Renamed to
2954 i386_dr_update_inferior_debug_regs and made nonstatic.
2955 All uses updated.
2956 (i386_low_insert_watchpoint): Renamed to
2957 i386_dr_insert_watchpoint. All uses updated.
2958 (i386_low_remove_watchpoint): Renamed to
2959 i386_dr_remove_watchpoint. All uses updated.
2960 (i386_low_region_ok_for_watchpoint): Renamed to
2961 i386_dr_region_ok_for_watchpoint. All uses updated.
2962 (i386_low_stopped_data_address): Renamed to
2963 i386_dr_stopped_data_address. All uses updated.
2964 (i386_low_stopped_by_watchpoint): Renamed to
2965 i386_dr_stopped_by_watchpoint. All uses updated.
2966
131aa0d4
GB
29672014-06-18 Gary Benson <gbenson@redhat.com>
2968
2969 * i386-low.c (i386_dr_low_can_set_addr): New macro.
2970 (i386_dr_low_can_set_control): Likewise.
2971 (i386_insert_aligned_watchpoint): New check.
2972
d9305f7f
GB
29732014-06-18 Gary Benson <gbenson@redhat.com>
2974
2975 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
2976 Renamed to state.
2977
e927c9fc
GB
29782014-06-18 Gary Benson <gbenson@redhat.com>
2979
2980 * i386-low.c (i386_length_and_rw_bits): Use internal_error
2981 instead of fatal and error.
2982 (i386_handle_nonaligned_watchpoint): Likewise.
2983
1b6d4134
GB
29842014-06-18 Gary Benson <gbenson@redhat.com>
2985
2986 * i386-low.c (i386_get_debug_register_length): New macro.
2987 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
2988 (i386_show_dr): Use debug_printf instead of fprintf. Use
2989 phex to format values.
2990
6e62758f
GB
29912014-06-18 Gary Benson <gbenson@redhat.com>
2992
2993 * i386-low.h: Comment changes.
2994 * i386-low.c: Likewise.
2995
fc6e2f03
GB
29962014-06-18 Gary Benson <gbenson@redhat.com>
2997
2998 * i386-low.c: Whitespace changes.
2999
f9d1eeed
TT
30002014-06-12 Tom Tromey <tromey@redhat.com>
3001
3002 * utils.c (freeargv): Remove.
3003
0b04e523
TT
30042014-06-12 Tom Tromey <tromey@redhat.com>
3005
3006 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
3007 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
3008 (parse_debug_format_options): Likewise.
3009 (gdbserver_usage): Likewise.
3010 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
3011 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
3012 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
3013 against libiberty.
3014 ($(LIBGNU)): Depend on libiberty.
3015 (all-lib): Recurse into all subdirs.
3016 (install-only): Invoke "install" target in subdirs.
3017 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
3018 targets.
3019 * configure: Rebuild.
3020 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
3021 for vasprintf, vsnprintf, or gettimeofday.
3022 * configure.srv: Don't add safe-ctype.o or lbasename.o to
3023 srv_tgtobj.
3024
270c9937
JB
30252014-06-05 Joel Brobecker <brobecker@adacore.com>
3026
3027 * development.sh: Delete.
3028 * Makefile.in (config.status): Adjust dependency on development.sh.
3029 * configure.ac: Adjust development.sh source call.
3030 * configure: Regenerate.
3031
0a261ed8
PA
30322014-06-02 Pedro Alves <palves@redhat.com>
3033
3034 * ax.c (gdb_free_agent_expr): New function.
3035 * ax.h (gdb_free_agent_expr): New declaration.
3036 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
3037 list.
3038 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
3039 static.
3040 (clear_breakpoint_conditions_and_commands): New function.
3041 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
3042 (clear_breakpoint_conditions_and_commands): New declaration.
3043
e9dae05e
RR
30442014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
3045
3046 * linux-aarch64-low.c (asm/ptrace.h): Include.
3047
5876f503
JK
30482014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
3049
3050 Fix TLS access for -static -pthread.
3051 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
3052 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
3053 (thread_db_load_search, try_thread_db_load_1): Initialize it.
3054
802e8e6d
PA
30552014-05-20 Pedro Alves <palves@redhat.com>
3056
3057 * linux-aarch64-low.c (aarch64_insert_point)
3058 (aarch64_remove_point): No longer check whether the type is
3059 supported here. Adjust to new interface.
3060 (the_low_target): Install aarch64_supports_z_point_type as
3061 supports_z_point_type method.
3062 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
3063 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
3064 instead of a Z packet char. Adjust.
3065 (arm_supports_z_point_type): New function.
3066 (arm_insert_point, arm_remove_point): Adjust to new interface.
3067 (the_low_target): Install arm_supports_z_point_type.
3068 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
3069 (cris_insert_point, cris_remove_point): Adjust to new interface.
3070 Don't check whether the type is supported here.
3071 (the_low_target): Install cris_supports_z_point_type.
3072 * linux-low.c (linux_supports_z_point_type): New function.
3073 (linux_insert_point, linux_remove_point): Adjust to new interface.
3074 * linux-low.h (struct linux_target_ops) <insert_point,
3075 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
3076 raw_breakpoint pointer parameter.
3077 <supports_z_point_type>: New method.
3078 * linux-mips-low.c (mips_supports_z_point_type): New function.
3079 (mips_insert_point, mips_remove_point): Adjust to new interface.
3080 Use mips_supports_z_point_type.
3081 (the_low_target): Install mips_supports_z_point_type.
3082 * linux-ppc-low.c (the_low_target): Install NULL as
3083 supports_z_point_type method.
3084 * linux-s390-low.c (the_low_target): Install NULL as
3085 supports_z_point_type method.
3086 * linux-sparc-low.c (the_low_target): Install NULL as
3087 supports_z_point_type method.
3088 * linux-x86-low.c (x86_supports_z_point_type): New function.
3089 (x86_insert_point): Adjust to new insert_point interface. Use
3090 insert_memory_breakpoint. Adjust to new
3091 i386_low_insert_watchpoint interface.
3092 (x86_remove_point): Adjust to remove_point interface. Use
3093 remove_memory_breakpoint. Adjust to new
3094 i386_low_remove_watchpoint interface.
3095 (the_low_target): Install x86_supports_z_point_type.
3096 * lynx-low.c (lynx_target_ops): Install NULL as
3097 supports_z_point_type callback.
3098 * nto-low.c (nto_supports_z_point_type): New.
3099 (nto_insert_point, nto_remove_point): Adjust to new interface.
3100 (nto_target_ops): Install nto_supports_z_point_type.
3101 * mem-break.c: Adjust intro comment.
3102 (struct raw_breakpoint) <raw_type, size>: New fields.
3103 <inserted>: Update comment.
3104 <shlib_disabled>: Delete field.
3105 (enum bkpt_type) <gdb_breakpoint>: Delete value.
3106 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
3107 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
3108 (raw_bkpt_type_to_target_hw_bp_type): New function.
3109 (find_enabled_raw_code_breakpoint_at): New function.
3110 (find_raw_breakpoint_at): New type and size parameters. Use them.
3111 (insert_memory_breakpoint): New function, based off
3112 set_raw_breakpoint_at.
3113 (remove_memory_breakpoint): New function.
3114 (set_raw_breakpoint_at): Reimplement.
3115 (set_breakpoint): New, based on set_breakpoint_at.
3116 (set_breakpoint_at): Reimplement.
3117 (delete_raw_breakpoint): Go through the_target->remove_point
3118 instead of assuming memory breakpoints.
3119 (find_gdb_breakpoint_at): Delete.
3120 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
3121 (find_gdb_breakpoint): New function.
3122 (set_gdb_breakpoint_at): Delete.
3123 (z_type_supported): New function.
3124 (set_gdb_breakpoint_1): New function, loosely based off
3125 set_gdb_breakpoint_at.
3126 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
3127 (delete_gdb_breakpoint_at): Delete.
3128 (delete_gdb_breakpoint_1): New function, loosely based off
3129 delete_gdb_breakpoint_at.
3130 (delete_gdb_breakpoint): New function.
3131 (clear_gdb_breakpoint_conditions): Rename to ...
3132 (clear_breakpoint_conditions): ... this. Don't handle a NULL
3133 breakpoint.
3134 (add_condition_to_breakpoint): Make static.
3135 (add_breakpoint_condition): Take a struct breakpoint pointer
3136 instead of an address. Adjust.
3137 (gdb_condition_true_at_breakpoint): Rename to ...
3138 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
3139 z_type parameter.
3140 (gdb_condition_true_at_breakpoint): Reimplement.
3141 (add_breakpoint_commands): Take a struct breakpoint pointer
3142 instead of an address. Adjust.
3143 (gdb_no_commands_at_breakpoint): Rename to ...
3144 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
3145 parameter. Return true if no breakpoint was found. Change debug
3146 output.
3147 (gdb_no_commands_at_breakpoint): Reimplement.
3148 (run_breakpoint_commands): Rename to ...
3149 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
3150 and change return type to boolean.
3151 (run_breakpoint_commands): New function.
3152 (gdb_breakpoint_here): Also check for Z1 breakpoints.
3153 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
3154 breakpoint. Go through the_target->remove_point instead of
3155 assuming memory breakpoint.
3156 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
3157 software and hardware breakpoints.
3158 (reinsert_raw_breakpoint): Go through the_target->insert_point
3159 instead of assuming memory breakpoint.
3160 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
3161 software and hardware breakpoints.
3162 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
3163 Check both software and hardware breakpoints.
3164 (validate_inserted_breakpoint): Assert the breakpoint is a
3165 software breakpoint. Set the inserted flag to -1 instead of
3166 setting shlib_disabled.
3167 (delete_disabled_breakpoints): Adjust.
3168 (validate_breakpoints): Only validate software breakpoints.
3169 Adjust to inserted flag change.
3170 (check_mem_read, check_mem_write): Skip breakpoint types other
3171 than software breakpoints. Adjust to inserted flag change.
3172 * mem-break.h (enum raw_bkpt_type): New enum.
3173 (raw_breakpoint, struct process_info): Forward declare.
3174 (Z_packet_to_target_hw_bp_type): Delete declaration.
3175 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
3176 (set_gdb_breakpoint, delete_gdb_breakpoint)
3177 (clear_breakpoint_conditions): New declarations.
3178 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
3179 (breakpoint_inserted_here): Update comment.
3180 (add_breakpoint_condition, add_breakpoint_commands): Replace
3181 address parameter with a breakpoint pointer parameter.
3182 (gdb_breakpoint_here): Update comment.
3183 (delete_gdb_breakpoint_at): Delete.
3184 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
3185 * server.c (process_point_options): Take a struct breakpoint
3186 pointer instead of an address. Adjust.
3187 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
3188 delete_gdb_breakpoint.
3189 * spu-low.c (spu_target_ops): Install NULL as
3190 supports_z_point_type method.
3191 * target.h: Include mem-break.h.
3192 (struct target_ops) <prepare_to_access_memory>: Update comment.
3193 <supports_z_point_type>: New field.
3194 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
3195 instead of a char. Also take a raw breakpoint pointer.
3196 * win32-arm-low.c (the_low_target): Install NULL as
3197 supports_z_point_type.
3198 * win32-i386-low.c (i386_supports_z_point_type): New function.
3199 (i386_insert_point, i386_remove_point): Adjust to new interface.
3200 (the_low_target): Install i386_supports_z_point_type.
3201 * win32-low.c (win32_supports_z_point_type): New function.
3202 (win32_insert_point, win32_remove_point): Adjust to new interface.
3203 (win32_target_ops): Install win32_supports_z_point_type.
3204 * win32-low.h (struct win32_target_ops):
3205 <supports_z_point_type>: New method.
3206 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
3207 instead of a char. Also take a raw breakpoint pointer.
3208
932539e3
PA
32092014-05-20 Pedro Alves <palves@redhat.com>
3210
3211 * mem-break.h: Include break-common.h.
3212 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
3213 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
3214 (Z_packet_to_target_hw_bp_type): New declaration.
3215 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
3216 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
3217 (Z_PACKET_ACCESS_WP): Delete macros.
3218 (Z_packet_to_hw_type): Delete function.
3219 * i386-low.h: Don't include break-common.h here.
3220 (Z_packet_to_hw_type): Delete declaration.
3221 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
3222 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
3223 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
3224 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
3225 * linux-aarch64-low.c: Don't include break-common.h here.
3226 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
3227 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
3228 (Z_packet_to_target_hw_bp_type): Delete function.
3229 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
3230 function.
3231 (mips_insert_point, mips_remove_point): Use
3232 Z_packet_to_target_hw_bp_type.
3233
4ff0d3d8
PA
32342014-05-20 Pedro Alves <palves@redhat.com>
3235
3236 * linux-aarch64-low.c: Include break-common.h.
3237 (enum target_point_type): Delete.
3238 (Z_packet_to_point_type): Rename to ...
3239 (Z_packet_to_target_hw_bp_type): ... this, and return a
3240 target_hw_bp_type instead.
3241 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
3242 instead of an enum target_point_type.
3243 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
3244 breakpoint type.
3245 (aarch64_dr_state_insert_one_point)
3246 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
3247 (aarch64_handle_aligned_watchpoint)
3248 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
3249 Take an enum target_hw_bp_type instead of an enum
3250 target_point_type.
3251 (aarch64_supports_z_point_type): New function.
3252 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
3253 use Z_packet_to_target_hw_bp_type.
3254
786dc519
JB
32552014-05-20 Joel Brobecker <brobecker@adacore.com>
3256
3257 * configure.ac: Only use -Werror by default when DEVELOPMENT
3258 is true.
3259 * configure: Regenerate.
3260
9e0aa64f
JK
32612014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
3262
3263 Fix gdbserver qGetTLSAddr for x86_64 -m32.
3264 * linux-x86-low.c (X86_64_USER_REGS): New.
3265 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
3266
2b577b92
YQ
32672014-04-28 Yao Qi <yao@codesourcery.com>
3268
3269 * Makefile.in (i386-avx512.c): Fix the typo of generated file
3270 name.
3271
94611da2
PA
32722014-04-25 Pedro Alves <palves@redhat.com>
3273
3274 PR server/16255
3275 * linux-low.c (linux_attach_fail_reason_string): New function.
3276 (linux_attach_lwp): Delete.
3277 (linux_attach_lwp_1): Rename to ...
3278 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
3279 argument. Remove "initial" parameter. Return int instead of
3280 void. Don't error or warn here.
3281 (linux_attach): Adjust to call linux_attach_lwp. Call error on
3282 failure to attach to the tgid. Call warning when failing to
3283 attach to an lwp.
3284 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
3285 argument. Remove "initial" parameter. Return int instead of
3286 void. Don't error or warn here.
3287 (linux_attach_fail_reason_string): New declaration.
3288 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
3289 interface change. Use linux_attach_fail_reason_string.
3290
01f9f808
MS
32912014-04-24 Michael Sturm <michael.sturm@mintel.com>
3292 Walfred Tedeschi <walfred.tedeschi@intel.com>
3293
3294 * Makefile.in: Added rules to handle new files
3295 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
3296 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
3297 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
3298 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
3299 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
3300 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
3301 x32-avx512-linux.o.
3302 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
3303 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
3304 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
3305 i386/x32-avx512.xml.
3306 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
3307 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
3308 i386/x32-avx512-linux.xml.
3309 * i387-fp.c (num_avx512_k_registers): New constant for number
3310 of K registers.
3311 (num_avx512_zmmh_low_registers): New constant for number of
3312 lower ZMM registers (0-15).
3313 (num_avx512_zmmh_high_registers): New constant for number of
3314 higher ZMM registers (16-31).
3315 (num_avx512_ymmh_registers): New contant for number of higher
3316 YMM registers (ymm16-31 added by avx521 on x86_64).
3317 (num_avx512_xmm_registers): New constant for number of higher
3318 XMM registers (xmm16-31 added by AVX512 on x86_64).
3319 (struct i387_xsave): Add space for AVX512 registers.
3320 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
3321 Add code to handle AVX512 registers.
3322 (i387_xsave_to_cache): Add code to handle AVX512 registers.
3323 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
3324 prototypei from generated file.
3325 (tdesc_amd64_avx512_linux): Likewise.
3326 (init_registers_x32_avx512_linux): Likewise.
3327 (tdesc_x32_avx512_linux): Likewise.
3328 (init_registers_i386_avx512_linux): Likewise.
3329 (tdesc_i386_avx512_linux): Likewise.
3330 (x86_64_regmap): Add AVX512 registers.
3331 (x86_linux_read_description): Add code to handle AVX512 XSTATE
3332 mask.
3333 (initialize_low_arch): Add code to initialize AVX512 registers.
3334
51aa91f9
PA
33352014-04-23 Pedro Alves <palves@redhat.com>
3336
3337 * mem-break.c (find_gdb_breakpoint_at): Make static.
3338 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
3339
a4165e94
PA
33402014-04-23 Pedro Alves <palves@redhat.com>
3341
3342 * i386-low.c: Don't include break-common.h here.
3343 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
3344 prototype to take target_hw_bp_type as argument instead of a Z
3345 packet char.
3346 * i386-low.h: Include break-common.h here.
3347 (Z_packet_to_hw_type): Declare.
3348 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
3349 prototypes.
3350 * linux-x86-low.c (x86_insert_point): Convert the packet number to
3351 a target_hw_bp_type before calling i386_low_insert_watchpoint.
3352 (x86_remove_point): Convert the packet number to a
3353 target_hw_bp_type before calling i386_low_remove_watchpoint.
3354 * win32-i386-low.c (i386_insert_point): Convert the packet number
3355 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
3356 (i386_remove_point): Convert the packet number to a
3357 target_hw_bp_type before calling i386_low_remove_watchpoint.
3358
b8acf843
PA
33592014-04-23 Pedro Alves <palves@redhat.com>
3360
3361 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
3362
d708bcd1
PA
33632014-04-10 Pedro Alves <palves@redhat.com>
3364
3365 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
3366 Check if the condition or command is NULL before checking if the
3367 breakpoint is known. On success, return true.
3368 * mem-break.h (add_breakpoint_condition): Document return.
3369 (add_breakpoint_commands): Add describing comment.
3370 * server.c (skip_to_semicolon): New function.
3371 (process_point_options): Use it.
3372
2eec7d5b
PA
33732014-04-09 Pedro Alves <palves@redhat.com>
3374
3375 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
3376 to lwpid_of.
3377
fa96cb38
PA
33782014-02-27 Pedro Alves <palves@redhat.com>
3379
3380 PR 12702
3381 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
3382 macros.
3383 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
3384 output.
3385 (last_thread_of_process_p): Take a PID argument instead of a
3386 thread pointer.
3387 (linux_wait_for_lwp): Delete.
3388 (num_lwps, check_zombie_leaders, not_stopped_callback): New
3389 functions.
3390 (linux_low_filter_event): New function, party factored out from
3391 linux_wait_for_event.
3392 (linux_wait_for_event): Rename to ...
3393 (linux_wait_for_event_filtered): ... this. Add new filter ptid
3394 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
3395 sigsuspend. Check for zombie leaders.
3396 (linux_wait_for_event): Reimplement as wrapper around
3397 linux_wait_for_event_filtered.
3398 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
3399 a normal or signal exit is seen, it's the whole process exiting.
3400 (wait_for_sigstop): No longer a for_each_inferior callback.
3401 Rewrite on top of linux_wait_for_event_filtered.
3402 (stop_all_lwps): Call wait_for_sigstop directly.
3403 * server.c (resume, handle_target_event): Handle
3404 TARGET_WAITKIND_NO_RESUMED.
3405
d763de10
JB
34062014-02-26 Joel Brobecker <brobecker@adacore.com>
3407
3408 * win32-low.c (psapi_get_dll_name,
3409 * win32_CreateToolhelp32Snapshot): Delete.
3410 (win32_CreateToolhelp32Snapshot, win32_Module32First)
3411 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
3412 Delete.
3413 (handle_load_dll): Add function description.
3414 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
3415
850a0f76
JB
34162014-02-26 Joel Brobecker <brobecker@adacore.com>
3417
3418 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
3419 Add comment.
3420 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
3421 base address when calling win32_add_one_solib.
3422 (handle_load_dll): Delete local variable load_addr.
3423 Remove 0x1000 offset applied to DLL base address when calling
3424 win32_add_one_solib.
3425 (handle_unload_dll): Add comment.
3426
f25b3fc3
JB
34272014-02-26 Joel Brobecker <brobecker@adacore.com>
3428
3429 * win32-low.c (win32_add_all_dlls): Renames
3430 win32_ensure_ntdll_loaded. Rewrite function documentation.
3431 Adjust implementation to always load all DLLs.
3432 Add 0x1000 offset to DLL base address when calling
3433 win32_add_one_solib.
3434 (child_initialization_done): New static global.
3435 (do_initial_child_stuff): Set child_initialization_done to
3436 zero during child initialization, and 1 after. Replace call
3437 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
3438 Add comment.
3439 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
3440 (handle_unload_dll): Add function documentation.
3441 (get_child_debug_event): Ignore load and unload DLL events
3442 during child initialization.
3443
d86d4aaf
DE
34442014-02-20 Doug Evans <dje@google.com>
3445
3bc32da3 3446 Remove global all_lwps.
d86d4aaf
DE
3447 * inferiors.h (ptid_of): Move here from linux-low.h.
3448 (pid_of, lwpid_of): Ditto.
3449 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
3450 parameter is a struct thread_info * now.
3451 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
3452 directly. Pass &all_threads to find_inferior instead of &all_lwps.
3453 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
3454 directly.
3455 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
3456 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
3457 * linux-arm-low.c (update_registers_callback): Update, "entry"
3458 parameter is a struct thread_info * now.
3459 Fetch lwpid from current_inferior directly.
3460 (arm_insert_point): Pass &all_threads to find_inferior instead of
3461 &all_lwps.
3462 (arm_remove_point): Ditto.
3463 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
3464 (arm_prepare_to_resume): Fetch pid from thread.
3465 (arm_read_description): Fetch lwpid from current_inferior directly.
3466 * linux-low.c (all_lwps): Delete.
3467 (delete_lwp): Delete call to remove_inferior.
3468 (handle_extended_wait): Fetch lwpid from thread.
3469 (add_lwp): Don't set lwp->entry.id. Remove call to
3470 add_inferior_to_list.
3471 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
3472 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
3473 (kill_one_lwp_callback): Ditto.
3474 (linux_kill): Don't dereference NULL pointer.
3475 Fetch ptid,lwpid from thread.
3476 (get_detach_signal): Fetch ptid from thread.
3477 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
3478 Simplify call to regcache_invalidate_thread.
3479 (delete_lwp_callback): Update, "entry" parameter is a
3480 struct thread_info * now. Fetch pid from thread.
3481 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
3482 (status_pending_p_callback): Update, "entry" parameter is a
3483 struct thread_info * now. Fetch ptid from thread.
3484 (find_lwp_pid): Update, "entry" parameter is a
3485 struct thread_info * now.
3486 (linux_wait_for_lwp): Fetch pid from thread.
3487 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
3488 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
3489 (enqueue_one_deferred_signal): Fetch lwpid from thread.
3490 (dequeue_one_deferred_signal): Ditto.
3491 (cancel_breakpoint): Fetch ptid from current_inferior.
3492 (linux_wait_for_event): Pass &all_threads to find_inferior,
3493 not &all_lwps. Fetch ptid, lwpid from thread.
3494 (count_events_callback): Update, "entry" parameter is a
3495 struct thread_info * now.
3496 (select_singlestep_lwp_callback): Ditto.
3497 (select_event_lwp_callback): Ditto.
3498 (cancel_breakpoints_callback): Ditto.
3499 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
3500 not &all_lwps.
3501 (select_event_lwp): Ditto. Fetch ptid from event_thread.
3502 (unsuspend_one_lwp): Update, "entry" parameter is a
3503 struct thread_info * now.
3504 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
3505 not &all_lwps.
3506 (linux_stabilize_threads): Ditto. And for for_each_inferior.
3507 Fetch lwpid from thread, not lwp.
3508 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
3509 Pass &all_threads to find_inferior, not &all_lwps.
3510 (send_sigstop): Fetch lwpid from thread, not lwp.
3511 (send_sigstop_callback): Update, "entry" parameter is a
3512 struct thread_info * now.
3513 (suspend_and_send_sigstop_callback): Ditto.
3514 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
3515 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
3516 struct thread_info * now.
3517 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
3518 from thread, lwp.
3519 (lwp_running): Update, "entry" parameter is a
3520 struct thread_info * now.
3521 (stop_all_lwps): Fetch ptid from thread.
3522 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
3523 (linux_resume_one_lwp): Fetch lwpid from thread.
3524 (linux_set_resume_request): Update, "entry" parameter is a
3525 struct thread_info * now. Fetch pid, lwpid from thread.
3526 (resume_status_pending_p): Update, "entry" parameter is a
3527 struct thread_info * now.
3528 (need_step_over_p): Ditto. Fetch lwpid from thread.
3529 (start_step_over): Fetch lwpid from thread.
3530 (linux_resume_one_thread): Update, "entry" parameter is a
3531 struct thread_info * now. Fetch lwpid from thread.
3532 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
3533 (proceed_one_lwp): Update, "entry" parameter is a
3534 struct thread_info * now. Fetch lwpid from thread.
3535 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
3536 struct thread_info * now.
3537 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
3538 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
3539 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
3540 directly.
3541 (regsets_store_inferior_registers): Ditto.
3542 (fetch_register, store_register): Ditto.
3543 (linux_read_memory, linux_write_memory): Ditto.
3544 (linux_request_interrupt): Ditto.
3545 (linux_read_auxv): Ditto.
3546 (linux_xfer_siginfo): Ditto.
3547 (linux_qxfer_spu): Ditto.
3548 (linux_qxfer_libraries_svr4): Ditto.
3549 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
3550 moved to inferiors.h.
3551 (get_lwp): Delete.
3552 (get_thread_lwp): Update.
3553 (struct lwp_info): Delete member "entry". Simplify comment for
3554 member "thread".
3555 (all_lwps): Delete.
3556 * linux-mips-low.c (mips_read_description): Fetch lwpid from
3557 current_inferior directly.
3558 (update_watch_registers_callback): Update, "entry" parameter is a
3559 struct thread_info * now. Fetch pid from thread.
3560 (mips_linux_prepare_to_resume): Fetch ptid from thread.
3561 (mips_insert_point): Fetch lwpid from current_inferior.
3562 Pass &all_threads to find_inferior, not &all_lwps.
3563 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
3564 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
3565 directly.
3566 (mips_stopped_data_address): Ditto.
3567 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
3568 directly.
3569 * linux-tile-low.c (tile_arch_setup): Ditto.
3570 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
3571 (update_debug_registers_callback): Update, "entry" parameter is a
3572 struct thread_info * now. Fetch pid from thread.
3573 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
3574 Pass &all_threads to find_inferior, not &all_lwps.
3575 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
3576 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
3577 Pass &all_threads to find_inferior, not &all_lwps.
3578 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
3579 (i386_dr_low_get_status): Ditto.
3580 (x86_linux_prepare_to_resume): Fetch ptid from thread.
3581 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
3582 (x86_linux_read_description): Ditto.
3583 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
3584
3b8361aa
DE
35852014-02-20 Doug Evans <dje@google.com>
3586
3587 * inferiors.c (get_first_inferior): Fix buglet.
3588
f7667f0d
DE
35892014-02-19 Doug Evans <dje@google.com>
3590
3591 * gdbthread.h (add_thread): Change result type to struct thread_info *.
3592 * inferiors.c (add_thread): Change result type to struct thread_info *.
3593 All callers updated.
3594 (add_lwp): Call add_thread here instead of in callers.
3595 All callers updated.
3596 * linux-low.h (get_lwp_thread): Rewrite.
3597 (struct lwp_info): New member "thread".
3598
b3312d80
DE
35992014-02-19 Doug Evans <dje@google.com>
3600
3601 * linux-low.c (add_lwp): Change result to struct lwp_info *.
3602 All callers updated.
3603
ecc6f45c
DE
36042014-02-19 Doug Evans <dje@google.com>
3605
3606 * inferiors.c (add_thread): Fix whitespace.
3607
649ebbca
DE
36082014-02-19 Doug Evans <dje@google.com>
3609
3610 * dll.c (clear_dlls): Replace accessing list implemention details
3611 with API function.
3612 * gdbthread.h (get_first_thread): Declare.
3613 * inferiors.c (for_each_inferior_with_data): New function.
3614 (get_first_thread): New function.
3615 (find_thread_ptid): Simplify.
3616 (get_first_inferior): New function.
3617 (clear_list): Delete.
3618 (one_inferior_p): New function.
3619 (clear_inferior_list): New function.
3620 (clear_inferiors): Update.
3621 * inferiors.h (for_each_inferior_with_data): Declare.
3622 (clear_inferior_list): Declare.
3623 (one_inferior_p): Declare.
3624 (get_first_inferior): Declare.
3625 * linux-low.c (linux_wait_for_event): Replace accessing list
3626 implemention details with API function.
3627 * server.c (target_running): Ditto.
3628 (accumulate_file_name_length): New function.
3629 (emit_dll_description): New function.
3630 (handle_qxfer_libraries): Replace accessing list implemention
3631 details with API function.
3632 (handle_qxfer_threads_worker): New function.
3633 (handle_qxfer_threads_proper): Replace accessing list implemention
3634 details with API function.
3635 (handle_query): Ditto.
3636 (visit_actioned_threads_callback_ftype): New typedef.
3637 (visit_actioned_threads_data): New struct.
3638 (visit_actioned_threads): Rewrite to be find_inferior callback.
3639 (resume): Call find_inferior.
3640 (handle_status): Replace accessing list implemention
3641 details with API function.
3642 (process_serial_event): Replace accessing list implemention details
3643 with API function.
3644 * target.c (set_desired_inferior): Replace accessing list implemention
3645 details with API function.
3646 * tracepoint.c (same_process_p): New function.
3647 (gdb_agent_about_to_close): Replace accessing list implemention
3648 details with API function.
3649 * win32-low.c (child_delete_thread): Replace accessing list
3650 implemention details with API function.
3651 (match_dll_by_basename): New function.
3652 (dll_is_loaded_by_basename): New function.
3653 (win32_ensure_ntdll_loaded): Replace accessing list implemention
3654 details call to dll_is_loaded_by_basename.
3655
80894984
DE
36562014-02-19 Doug Evans <dje@google.com>
3657
3658 * dll.h (struct dll_info): Add comment.
3659 * gdbthread.h (struct thread_info): Add comment.
3660 (current_ptid): Simplify.
3661 * inferiors.c (add_process): Update.
3662 (remove_process): Update.
3663 * inferiors.h (struct process_info): Rename member "head" to "entry".
3664 * linux-low.c (delete_lwp): Update.
3665 (add_lwp): Update.
3666 (last_thread_of_process_p): Update.
3667 (kill_one_lwp_callback, linux_kill): Update.
3668 (status_pending_p_callback): Update.
3669 (wait_for_sigstop): Update. Simplify read of ptid.
3670 (start_step_over): Update.
3671 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
3672 (get_lwp_thread): Update.
3673 (struct lwp_info): Rename member "head" to "entry".
3674 * regcache.h (inferior_list_entry): Delete.
3675 * server.c (kill_inferior_callback): Update.
3676 (detach_or_kill_inferior_callback): Update.
3677 (print_started_pid): Update.
3678 (print_attached_pid): Update.
3679 (process_serial_event): Simplify read of ptid.
3680 * thread-db.c (thread_db_create_event): Update.
3681 (thread_db_get_tls_address): Update.
3682 * win32-low.c (current_inferior_ptid): Simplify.
3683
46917d26
TT
36842014-02-19 Tom Tromey <tromey@redhat.com>
3685
3686 * target.h (struct target_ops) <supports_btrace>: Add target_ops
3687 argument.
3688 (target_supports_btrace): Update.
3689
0759a81e
YQ
36902014-02-14 Yao Qi <yao@codesourcery.com>
3691
3692 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
3693 (rsp-low-ipa.o): New target.
3694
a7191e8b
TT
36952014-02-12 Tom Tromey <tromey@redhat.com>
3696
3697 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
3698 convert_ascii_to_int.
3699 * regcache.c (registers_to_string): Likewise.
3700 * remote-utils.c (decode_M_packet): Likewise.
3701 * server.c (process_serial_event): Likewise.
3702
ff0e980e
TT
37032014-02-12 Tom Tromey <tromey@redhat.com>
3704
3705 * server.c (handle_query, handle_v_run): Use hex2bin, not
3706 unhexify.
3707 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
3708
e9371aff
TT
37092014-02-12 Tom Tromey <tromey@redhat.com>
3710
3711 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
3712 convert_int_to_ascii.
3713 * regcache.c (registers_to_string, collect_register_as_string):
3714 Likewise.
3715 * remote-utils.c (look_up_one_symbol, relocate_instruction):
3716 Likewise.
3717 * server.c (process_serial_event): Likewise.
3718 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
3719 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
3720
971dc0b8
TT
37212014-02-12 Tom Tromey <tromey@redhat.com>
3722
3723 * remote-utils.c (look_up_one_symbol, monitor_output): Use
3724 bin2hex, not hexify.
3725 * tracepoint.c (cmd_qtstatus): Likewise.
3726
0a822afb
TT
37272014-02-12 Tom Tromey <tromey@redhat.com>
3728
3729 * remote-utils.c (monitor_output): Pass explicit length to
3730 hexify.
3731
9c3d6531
TT
37322014-02-12 Tom Tromey <tromey@redhat.com>
3733
3734 * tracepoint.c: Include rsp-low.h.
3735 * server.c: Include rsp-low.h.
3736 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
3737 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
3738 declare.
3739 * remote-utils.c: Include rsp-low.h.
3740 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
3741 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
3742 (convert_int_to_ascii, convert_ascii_to_int): Move to
3743 common/rsp-low.c.
3744 * regcache.c: Include rsp-low.h.
3745 * ax.c: Include rsp-low.h.
3746 * Makefile.in (SFILES): Add common/rsp-low.c.
3747 (OBS): Add rsp-low.o.
3748 (rsp-low.o): New target.
3749
01fd3ea5
TT
37502014-02-12 Tom Tromey <tromey@redhat.com>
3751
3752 * utils.h (pulongest, plongest, phex_nz): Don't declare.
3753 Include print-utils.h.
3754 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
3755 (plongest, thirty_two, phex_nz): Remove.
3756 * Makefile.in (SFILES): Add common/print-utils.c.
3757 (OBS): Add print-utils.o.
3758 (print-utils-ipa.o): New target.
3759 (print-utils.o): New target.
3760 (IPA_OBJS): Add print-utils-ipa.o.
3761
e99dc820
TT
37622014-02-06 Tom Tromey <tromey@redhat.com>
3763
3764 * Makefile.in (SFILES): Fix indentation.
3765
ee1e2d4f
DE
37662014-02-05 Doug Evans <dje@google.com>
3767
3768 * linux-low.c (linux_wait_for_event): Improve comment.
3769 (linux_wait_1): Keep current_inferior in sync with event_child.
3770
f5a02773
DE
37712014-01-22 Doug Evans <dje@google.com>
3772
3773 * gdbthread.h (gdb_id_to_thread): Delete, unused.
3774
87ce2a04
DE
37752014-01-22 Doug Evans <dje@google.com>
3776
3777 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
3778 * configure: Regenerate.
3779 * config.in: Regenerate.
3780 * Makefile.in (SFILES): Add debug.c.
3781 (OBS): Add debug.o.
3782 * debug.c: New file.
3783 * debug.h: New file.
3784 * linux-aarch64-low.c (*): Update all debugging printfs to use
3785 debug_printf instead of fprintf.
3786 * linux-arm-low.c (*): Ditto.
3787 * linux-cris-low.c (*): Ditto.
3788 * linux-crisv32-low.c (*): Ditto.
3789 * linux-m32r-low.c (*): Ditto.
3790 * linux-sparc-low.c (*): Ditto.
3791 * linux-x86.c (*): Ditto.
3792 * linux-low.c (*): Ditto.
3793 (linux_wait_1): Add calls to debug_enter, debug_exit.
3794 (linux_wait): Remove redundant debugging printf.
3795 (stop_all_lwps): Add calls to debug_enter, debug_exit.
3796 (linux_resume, unstop_all_lwps): Ditto.
3797 * mem-break.c (*): Update all debugging printfs to use
3798 debug_printf instead of fprintf.
3799 * remote-utils.c (*): Ditto.
3800 * thread-db.c (*): Ditto.
3801 * server.c #include <ctype.h>, "gdb_vecs.h".
3802 (debug_threads): Moved to debug.c.
3803 (*): Update all debugging printfs to use debug_printf instead of
3804 fprintf.
3805 (start_inferior): Replace call to fflush with call to debug_flush.
3806 (monitor_show_help): Mention set debug-format.
3807 (parse_debug_format_options): New function.
3808 (handle_monitor_command): Handle "monitor set debug-format".
3809 (gdbserver_usage): Mention --debug-format.
3810 (main): Parse --debug-format.
3811 * server.h (debug_threads): Declaration moved to debug.h.
3812 #include "debug.h".
3813 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
3814 trace_debug_1 that uses debug_printf.
3815 (tracepoint_look_up_symbols): Update all debugging printfs to use
3816 debug_printf instead of fprintf.
3817
e671835b
BS
38182014-01-20 Baruch Siach <baruch@tkos.co.il>
3819
3820 * linux-xtensa-low.c: Include asm/ptrace.h instead of
3821 sys/ptrace.h.
3822
b5737fa9
PA
38232014-01-17 Pedro Alves <palves@redhat.com>
3824
ea38d2a9 3825 PR build/16445
c7faa97a
PA
3826 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
3827 defined after including gdb_proc_service.h.
b5737fa9 3828
40ed484e
DE
38292014-01-16 Doug Evans <dje@google.com>
3830
3831 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
3832 (match_dll): Use it.
3833
969c39fb
MM
38342014-01-16 Markus Metzger <markus.t.metzger@intel.com>
3835
3836 * target.h (target_ops) <read_btrace>: Change parameters and
3837 return type to allow error reporting.
3838 * server.c (handle_qxfer_btrace): Support delta reads. Pass
3839 trace reading errors on.
3840 * linux-low.c (linux_low_read_btrace): Pass trace reading
3841 errors on.
3842 (linux_low_disable_btrace): New.
3843
ab7f45ba
DE
38442014-01-15 Doug Evans <dje@google.com>
3845
3846 * inferiors.c (thread_id_to_gdb_id): Delete.
3847 * inferiors.h (thread_id_to_gdb_id): Delete.
3848
66af0f44
EZ
38492014-01-13 Eli Zaretskii <eliz@gnu.org>
3850
3851 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
3852 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
3853 versions.
3854
9939e131
PA
38552014-01-08 Pedro Alves <palves@redhat.com>
3856
3857 * server.c (handle_status): Don't discard previous queued stop
3858 replies or thread's pending status here.
3859 (main) <disconnection>: Do it here instead.
3860
b7ea362b
PA
38612014-01-08 Pedro Alves <palves@redhat.com>
3862
3863 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
3864 * server.c (visit_actioned_threads, handle_pending_status): New
3865 function.
3866 (handle_v_cont): Factor out parts to ...
3867 (resume): ... this new function. If in all-stop, and a thread
3868 being resumed has a pending status, report it without actually
3869 resuming.
3870 (myresume): Adjust to use the new 'resume' function.
3871 (clear_pending_status_callback, set_pending_status_callback)
3872 (find_status_pending_thread_callback): New functions.
3873 (handle_status): Handle the case of multiple threads having
3874 interesting statuses to report. Report threads' real last signal
3875 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
3876 with an interesting thread to report the status for, instead of
3877 always reporting the status of the first thread.
3878
28498c42
JB
38792014-01-01 Joel Brobecker <brobecker@adacore.com>
3880
3881 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
3882 * gdbreplay.c (gdbreplay_version): Likewise.
3883
f45c82da
YZ
38842013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
3885
3886 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
3887 iov.iov_len with the real length in use.
3888
379a5e2d
JB
38892013-12-13 Joel Brobecker <brobecker@adacore.com>
3890
3891 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
3892 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
3893 for all targets that use win32-low.c.
3894 * win32-low.c (win32_ensure_ntdll_loaded): New function.
3895 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
3896
4210d83e
PA
38972013-12-13 Pedro Alves <palves@redhat.com>
3898
3899 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
3900 if equal to TARGET_WAITKIND_LOADED.
3901 * win32-low.c (cached_status): New static global.
3902 (win32_wait): Add declaration.
3903 (do_initial_child_stuff): Flush all initial pending debug events
3904 up to the initial breakpoint.
3905 (win32_wait): If CACHED_STATUS was set, return that instead
3906 of doing a real wait. Remove the code resuming the execution
3907 of the inferior after receiving a TARGET_WAITKIND_LOADED event
3908 during the initial phase. Also remove the code changing
3909 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
3910 TARGET_WAITKIND_STOPPED.
3911
e7f0d979
YQ
39122013-12-11 Yao Qi <yao@codesourcery.com>
3913
3914 * notif.c (handle_notif_ack): Return 0 if no notification
3915 matches.
3916
ebcf782c
DE
39172013-11-20 Doug Evans <dje@google.com>
3918
3919 * linux-low.c (linux_set_resume_request): Fix comment.
3920
20ad9378
DE
39212013-11-20 Doug Evans <dje@google.com>
3922
3923 * linux-low.c (resume_status_pending_p): Tweak comment.
3924
a196ebeb
WT
39252013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
3926
3927 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
3928 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
3929 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
3930 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
3931 (srv_amd64_regobj): Add amd64-mpx.o.
3932 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
3933 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
3934 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
3935 * i387-fp.c (num_pl_bnd_register) Added constant.
3936 (num_pl_bnd_cfg_registers) Added constant.
3937 (struct i387_xsave) Added reserved area and MPX fields.
3938 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
3939 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
3940 function.
3941 (tdesc_i386_mpx_linux): Add MPX amd64 target.
3942 (init_registers_amd64_mpx_linux): Declare new function.
3943 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
3944 (x86_64_regmap): Add MPX registers.
3945 (x86_linux_read_description): Add MPX case.
3946 (initialize_low_arch): Initialize MPX targets.
3947
0080a2f6
TT
39482013-11-18 Tom Tromey <tromey@redhat.com>
3949
3950 * configure: Rebuild.
3951 * configure.ac: Don't check for stdlib.h.
3952 * gdbreplay.c: Unconditionally include stdlib.h.
3953
2978b111
TT
39542013-11-18 Tom Tromey <tromey@redhat.com>
3955
3956 * config.in: Rebuild.
3957 * configure: Rebuild.
3958 * configure.ac: Don't use AC_HEADER_DIRENT.
3959
a3d08894
TT
39602013-11-18 Tom Tromey <tromey@redhat.com>
3961
3962 * server.h: Don't check HAVE_STRING_H.
3963 * gdbreplay.c: Don't check HAVE_STRING_H.
3964 * configure: Rebuild.
3965
0a5dd17d
TT
39662013-11-18 Tom Tromey <tromey@redhat.com>
3967
3968 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
3969 LIBGNU.
3970
1bd2f0ba
TT
39712013-11-08 Tom Tromey <tromey@redhat.com>
3972
3973 * configure, config.in: Rebuild.
3974 * configure.ac: Remove unused configury.
3975
3266f10b
TT
39762013-11-08 Tom Tromey <tromey@redhat.com>
3977
3978 * acinclude.m4: Include common.m4, codeset.m4.
3979 * configure, config.in: Rebuild.
3980 * configure.ac: Use GDB_AC_COMMON.
3981
6682d959
AA
39822013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
3983
3984 * linux-s390-low.c (HWCAP_S390_TE): New define.
3985 (s390_arch_setup): Consider the TE field in the HWCAP for
3986 determining 'have_regset_tdb'.
3987
fd0a4d76
SDJ
39882013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
3989
3990 PR gdb/16014
3991 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
3992 call to sizeof.
3993
1a3d890b
PA
39942013-10-02 Pedro Alves <palves@redhat.com>
3995
3996 * server.c (process_serial_event): Don't output "GDBserver
3997 exiting" if GDB is connected through stdio.
3998 * target.c (mywait): Likewise, be silent if GDB is connected
3999 through stdio.
4000
97ad4581
JB
40012013-10-01 Joel Brobecker <brobecker@adacore.com>
4002
4003 * lynx-low.c (lynx_add_threads_after_attach): New function.
4004 (lynx_attach): Remove call to add_thread. Add call to
4005 lynx_add_threads_after_attach instead.
4006
5b4e221c
MF
40072013-09-28 Mike Frysinger <vapier@gentoo.org>
4008
4009 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
4010 * config.in, configure: Regenerated.
4011
ee47b2f8
YQ
40122013-09-18 Yao Qi <yao@codesourcery.com>
4013
4014 PR server/15959
4015 * server.c (start_inferior): Clear 'resume_info'.
4016
d6707650 40172013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 4018
d6707650
JW
4019 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
4020 for each register.
4021
9243dd0e 40222013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 4023
9243dd0e
JW
4024 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
4025 linux-tile-low.o to srv_tgtobj.
4026
c623a6ef
WN
40272013-09-16 Will Newton <will.newton@linaro.org>
4028
4029 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
4030 out regs.
4031
fb71d39e
PA
40322013-09-06 Pedro Alves <palves@redhat.com>
4033
4034 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
4035 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
4036 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
4037 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
4038 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
4039 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
4040
8e7e9910
PA
40412013-09-06 Pedro Alves <palves@redhat.com>
4042
4043 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
4044 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
4045
7c3a12ca
PA
40462013-09-06 Pedro Alves <palves@redhat.com>
4047
4048 * linux-amd64-ipa.c: Include tracepoint.h.
4049 * linux-i386-ipa.c: Include tracepoint.h.
4050
8eb3d7b6
RW
40512013-09-06 Ricard Wanderlof <ricardw@axis.com>
4052
4053 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
4054 (ps_get_thread_area): New function.
4055
eddddb9d
RW
40562013-09-06 Ricard Wanderlof <ricardw@axis.com>
4057
4058 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
4059 (initialize_low_arch): Call init_registers_crisv32 rather than
4060 init_register_crisv32.
4061
533b0600
PA
40622013-09-05 Pedro Alves <palves@redhat.com>
4063
4064 * server.h (handle_vFile, hostio_last_error_from_errno): Move
4065 to ...
4066 * hostio.h: ... this new file.
4067 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
4068 win32-low.c: Include hostio.h.
4069
0ce3d3b5
PA
40702013-09-05 Pedro Alves <palves@redhat.com>
4071
4072 * server.h (gdb_client_data, handler_func, callback_handler_func)
4073 (delete_file_handler, add_file_handler, append_callback_event)
4074 (delete_callback_event, start_event_loop, initialize_event_loop):
4075 Move to event-loop.h and include it.
4076 * event-loop.h: New file.
4077
799cdc37
PA
40782013-09-05 Pedro Alves <palves@redhat.com>
4079
4080 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
4081 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
4082 (loaded_dll, unloaded_dll): Move to ...
4083 * dll.h: ... this new file.
4084 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
4085
6a6bbd9d
PA
40862013-09-05 Pedro Alves <palves@redhat.com>
4087
4088 * server.h (current_process, get_thread_process, all_processes)
4089 (add_inferior_to_list, for_each_inferior, current_inferior)
4090 (remove_inferior, add_process, remove_process, find_process_pid)
4091 (have_started_inferiors_p, have_attached_inferiors_p)
4092 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
4093 (clear_inferiors, find_inferior, find_inferior_id)
4094 (inferior_target_data, set_inferior_target_data)
4095 (inferior_regcache_data, set_inferior_regcache_data): Move to
4096 inferiors.h, and include it.
4097 * inferiors.h: New file.
4098
f699aaba
PA
40992013-09-05 Pedro Alves <palves@redhat.com>
4100
4101 * server.h (struct emit_ops, current_insn_ptr, emit_error):
4102 Move ...
72f4393d 4103 * ax.h: ... here.
f699aaba 4104
c144c7a0
PA
41052013-09-05 Pedro Alves <palves@redhat.com>
4106
4107 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
4108 tracepoint.h.
4109 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
4110 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
4111 (handle_tracepoint_general_set, handle_tracepoint_query)
4112 (tracepoint_finished_step, tracepoint_was_hit)
4113 (release_while_stepping_state_list, current_traceframe)
4114 (in_readonly_region, traceframe_read_mem)
4115 (fetch_traceframe_registers, traceframe_read_sdata)
4116 (traceframe_read_info, struct fast_tpoint_collect_status)
4117 (fast_tracepoint_collecting, force_unlock_trace_buffer)
4118 (handle_tracepoit_bkpts, initialize_low_tracepoint)
4119 (supply_fast_tracepoint_registers)
4120 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
4121 (ipa_tdesc, claim_trampoline_space)
4122 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
4123 (agent_mem_read, agent_get_trace_state_variable_value)
4124 (agent_set_trace_state_variable_value, agent_tsv_read)
4125 (agent_mem_read_string, get_raw_reg_func_addr)
4126 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
4127 * tracepoint.h: ... this new file.
4128
ff42e6ab
PA
41292013-09-05 Pedro Alves <palves@redhat.com>
4130
4131 * server.h (perror_with_name, error, fatal, warning, paddress)
4132 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
4133 include it.
4134 * utils.h: New file.
4135
541af0f4
PA
41362013-09-05 Pedro Alves <palves@redhat.com>
4137
4138 * server.h (remote_debug, noack_mode, transport_is_reliable)
4139 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
4140 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
4141 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
4142 (write_enn, initialize_async_io, enable_async_io)
4143 (disable_async_io, check_remote_input_interrupt_request)
4144 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
4145 (dead_thread_notify, prepare_resume_reply)
4146 (decode_address_to_semicolon, decode_address, decode_m_packet)
4147 (decode_M_packet, decode_X_packet, decode_xfer_write)
4148 (decode_search_memory_packet, unhexify, hexify)
4149 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
4150 (look_up_one_symbol, relocate_instruction)
4151 (monitor_output): Move to remote-utils.h, and include it.
4152 * remote-utils.h: New file.
4153
eebdf26b
PA
41542013-09-05 Pedro Alves <palves@redhat.com>
4155
4156 * server.h (_): Delete.
4157
3aafd2ff
PA
41582013-09-02 Pedro Alves <palves@redhat.com>
4159
4160 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
4161 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
4162 allocated.
4163 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
4164
cee83bcb
PM
41652013-09-02 Pierre Muller <muller@sourceware.org>
4166
4167 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
4168 or WriteProcessMemory complete successfully and handle
4169 ERROR_PARTIAL_COPY error.
4170
9a13b2fa
PA
41712013-09-02 Pedro Alves <palves@redhat.com>
4172
4173 * server.c (gdb_read_memory): Return -1 on traceframe memory read
4174 error instead of EIO.
4175
602e3198
JK
41762013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4177
4178 PR server/15604
4179 * linux-low.c: Include filestuff.h.
4180 (linux_create_inferior) <pid == 0>: Call close_most_fds.
4181 * lynx-low.c: Include filestuff.h.
4182 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
4183 * server.c: Include filestuff.h.
4184 (main): Call notice_open_fds.
4185 * spu-low.c: Include filestuff.h.
4186 (spu_create_inferior) <pid == 0>: Call close_most_fds.
4187
96d7229d
LM
41882013-08-22 Luis Machado <lgustavo@codesourcery.com>
4189
4190 * Makefile.in: Explain why ../target and ../nat are not
4191 listed as include file search paths.
4192 (linux-waitpid.o): New object file rule.
4193 * configure.srv (srv_native_linux_obj): New variable.
4194 Replace all occurrences of linux native object files with
4195 $srv_native_linux_obj.
4196 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
4197 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
4198 (linux_enable_event_reporting): Remove declaration.
4199 (my_waitpid): Moved to common/linux-waitpid.c.
4200 (linux_wait_for_event): Pass ptid when calling
4201 linux_enable_event_reporting.
4202 (linux_supports_tracefork_flag): Remove.
4203 (linux_enable_event_reporting): Likewise.
4204 (linux_tracefork_grandchild): Remove.
4205 (STACK_SIZE): Moved to common/linux-ptrace.c.
4206 (linux_tracefork_child): Remove.
4207 (linux_test_for_tracefork): Remove.
4208 (linux_look_up_symbols): Call linux_supports_traceclone.
4209 (initialize_low): Remove call to linux_test_for_tracefork.
4210 * linux-low.h (PTRACE_TYPE_ARG3): Move to
4211 common/linux-ptrace.h.
4212 (PTRACE_TYPE_ARG4): Likewise.
4213 Include linux-ptrace.h.
4214
32940073
PA
42152013-08-21 Pedro Alves <palves@redhat.com>
4216
4217 * config.in: Renegerate.
4218
33b60d58 42192013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 4220
33b60d58
LM
4221 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
4222 (SFILES): Remove $(srcdir)/common/target-common.c and
4223 add $(srcdir)/target/waitstatus.c.
4224 (OBS): Remove target-common.o and add waitstatus.o.
4225 (server_h): Remove $(srcdir)/../common/target-common.h and
4226 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
4227 and $(srcdir)/../target/waitstatus.h.
4228 (target-common.o): Remove.
4229 (waitstatus.o): New target object file.
4230 * target.h: Do not include target-common.h and
4231 include target/resume.h, target/wait.h and
4232 target/waitstatus.h.
4233
b8e1b30e
LM
42342013-08-13 Luis Machado <lgustavo@codesourcery.com>
4235
4236 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
4237 to PTRACE_TYPE_ARG3.
4238 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
4239 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
4240 PTRACE_TYPE_ARG4.
4241 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
4242 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
4243
7a60ad40
YQ
42442013-07-27 Jie Zhang <jie@codesourcery.com>
4245 Daniel Jacobowitz <dan@codesourcery.com>
4246 Yao Qi <yao@codesourcery.com>
4247
4248 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
4249 (mips-linux-watch.o): New rule.
4250 (mips_linux_watch_h): New variable.
4251 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
4252 srv_tgtobj.
4253 * linux-mips-low.c: Include mips-linux-watch.h.
4254 (struct arch_process_info, struct arch_lwp_info): New.
4255 (update_watch_registers_callback): New function.
4256 (mips_linux_new_process, mips_linux_new_thread) New functions.
4257 (mips_linux_prepare_to_resume, mips_insert_point): New
4258 functions.
4259 (mips_remove_point, mips_stopped_by_watchpoint): New
4260 functions.
4261 (rsp_bp_type_to_target_hw_bp_type): New function.
4262 (mips_stopped_data_address): New function.
4263 (the_low_target): Add watchpoint support functions.
4264
de6f69ad
YQ
42652013-07-27 Yao Qi <yao@codesourcery.com>
4266
4267 * i386-low.c: Include break-common.h.
4268 (enum target_hw_bp_type): Remove.
4269
3360c0bf
LM
42702013-07-24 Luis Machado <lgustavo@codesourcery.com>
4271
4272 * Makefile.in (SFILES): /common/target-common.c.
4273 (OBS): Add target-common.o.
4274 (server_h): Add $(srcdir)/../common/target-common.h.
4275 (target-common.o): New target.
4276 * server.c (queue_stop_reply_callback): Free
4277 status string after use.
4278 * target.c (target_waitstatus_to_string): Remove.
4279 * target.h: Include target-common.h.
4280 (resume_kind): Likewise.
4281 (target_waitkind): Likewise.
4282 (target_waitstatus): Likewise.
4283 (TARGET_WNOHANG): Likewise.
4284
bd885420
YQ
42852013-07-04 Yao Qi <yao@codesourcery.com>
4286
4287 * Makefile.in (host_alias): Use @host_noncanonical@.
4288 (target_alias): Use @target_noncanonical@.
4289 * configure.ac: Use ACX_NONCANONICAL_TARGET and
4290 ACX_NONCANONICAL_HOST.
4291 * configure: Regenerated.
4292
4293 Revert:
4294 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
4295
4296 * configure.ac (version_host, version_target): Set and AC_SUBST them.
4297 * configure: Rebuild.
4298 * Makefile.in (version_host, version_target): Get from configure.
4299 (version.c): Use $(version_host) and $(version_target).
4300
17ef446e
PA
43012013-07-03 Pedro Alves <palves@redhat.com>
4302
4303 * Makefile.in (config.status): Depend on development.sh.
4304 * acinclude.m4: Include libmcheck.m4.
4305 * configure: Regenerate.
4306
7a9a7487
MG
43072013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
4308
4309 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
4310 attribute inside the parentheses.
4311 (winapi_DebugSetProcessKillOnExit): Ditto.
4312 (winapi_DebugBreakProcess): Ditto.
4313 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 4314
49b64de6
MG
43152013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
4316
4317 * notif.h (notif_event): Add a dummy member to avoid compiler
4318 errors.
4319
d5749ee7
PA
43202013-07-01 Pedro Alves <palves@redhat.com>
4321
4322 * hostio.c (HOSTIO_PATH_MAX): Define.
4323 (require_filename, handle_open, handle_unlink, handle_readlink):
4324 Use it.
4325
d8d2a3ee
PA
43262013-07-01 Pedro Alves <palves@redhat.com>
4327
4328 * server.h: Include "pathmax.h".
4329 * linux-low.c: Don't include sys/param.h.
4330 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
4331 MAXPATHLEN.
4332 * win32-low.c: Don't include sys/param.h.
4333 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
4334
bc7dea8d
PA
43352013-07-01 Pedro Alves <palves@redhat.com>
4336
4337 * event-loop.c: Don't check HAVE_UNISTD_H before including
4338 <unistd.h>.
4339 * gdbreplay.c: Likewise.
4340 * remote-utils.c: Likewise.
4341 * server.c: Likewise.
4342 * configure.ac: Don't check for unistd.h.
4343 * configure: Regenerate.
4344
d6c2da54
TT
43452013-06-28 Tom Tromey <tromey@redhat.com>
4346
4347 * Makefile.in (version.c): Use version.in, not
4348 common/version.in.
4349
257b6bec
MG
43502013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
4351
4352 * configure.ac (version_host, version_target): Set and AC_SUBST them.
4353 * configure: Rebuild.
4354 * Makefile.in (version_host, version_target): Get from configure.
4355 (version.c): Use $(version_host) and $(version_target).
4356
86ebe149
DK
43572013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
4358
4359 Fix trace-status to output user name without trailing colon.
4360 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
4361
f30aa5af
DK
43622013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
4363
4364 Fix trace-status to output proper start-time and stop-time.
4365 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
4366 output start time and stop time in hex as gdb expects.
4367
28a93511
YQ
43682013-06-26 Pedro Alves <pedro@codesourcery.com>
4369
4370 * tracepoint.c (build_traceframe_info_xml): Output trace state
4371 variables present in the trace buffer.
4372
01208463
TT
43732013-06-24 Tom Tromey <tromey@redhat.com>
4374
4375 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
4376 create-version.sh.
4377 (version.o): Remove.
4378 * gdbreplay.c: Include version.h.
4379 (version, host_name): Don't declare.
4380 * server.h: Include version.h.
4381 (version, host_name): Don't declare.
4382
760256f9
PA
43832013-06-12 Pedro Alves <palves@redhat.com>
4384
4385 * linux-x86-low.c (linux_is_elf64): Delete global.
4386 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
4387 with local linux_pid_exe_is_elf_64_file use.
4388
030031ee
PA
43892013-06-11 Pedro Alves <palves@redhat.com>
4390
4391 * linux-low.c (regset_disabled, disable_regset): New functions.
4392 (regsets_fetch_inferior_registers)
4393 (regsets_store_inferior_registers): Use them.
4394 (initialize_regsets_info); Don't allocate the disabled_regsets
4395 array here.
4396 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
4397 comment.
4398
5da6eb0a
PA
43992013-06-11 Pedro Alves <palves@redhat.com>
4400
4401 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
4402 xmalloc.
4403
7e5aaa09
PA
44042013-06-11 Pedro Alves <palves@redhat.com>
4405
4406 * linux-x86-low.c (initialize_low_arch): Call
4407 init_registers_x32_avx_linux.
4408
d878444c
JK
44092013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
4410
4411 Fix compatibility with Android Bionic.
4412 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
4413 it is not empty.
4414
3aee8918
PA
44152013-06-07 Pedro Alves <palves@redhat.com>
4416
5f2b57b5 4417 PR server/14823
3aee8918
PA
4418 * Makefile.in (OBS): Add tdesc.o.
4419 (IPA_OBJS): Add tdesc-ipa.o.
4420 (tdesc-ipa.o): New rule.
4421 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
4422 interface.
4423 * linux-low.c (new_inferior): Delete.
4424 (disabled_regsets, num_regsets): Delete.
4425 (linux_add_process): Adjust to set the new per-process
4426 new_inferior flag.
4427 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
4428 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
4429 was a stop. When calling arch_setup, switch the current inferior
4430 to the thread that got an event.
4431 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
4432 (regsets_fetch_inferior_registers)
4433 (regsets_store_inferior_registers): New regsets_info parameter.
4434 Adjust to use it.
4435 (linux_register_in_regsets): New regs_info parameter. Adjust to
4436 use it.
4437 (register_addr, fetch_register, store_register): New usrregs_info
4438 parameter. Adjust to use it.
4439 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
4440 parameter regs_info. Adjust to use it.
4441 (linux_fetch_registers): Get the current inferior's regs_info, and
4442 adjust to use it.
4443 (linux_store_registers): Ditto.
4444 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
4445 (initialize_low): Don't initialize the target_regsets here. Call
4446 initialize_low_arch.
4447 * linux-low.h (target_regsets): Delete declaration.
4448 (struct regsets_info): New.
4449 (struct usrregs_info): New.
4450 (struct regs_info): New.
4451 (struct process_info_private) <new_inferior>: New field.
4452 (struct linux_target_ops): Delete the num_regs, regmap, and
4453 regset_bitmap fields. New field regs_info.
4454 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
4455 * i387-fp.c (num_xmm_registers): Delete.
4456 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
4457 calls to new interface.
4458 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
4459 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
4460 Infer the number of xmm registers from the regcache's target
4461 description.
4462 * i387-fp.h (num_xmm_registers): Delete.
4463 * inferiors.c (add_thread): Don't install the thread's regcache
4464 here.
4465 * proc-service.c (gregset_info): Fetch the current inferior's
4466 regs_info. Adjust to use it.
4467 * regcache.c: Include tdesc.h.
4468 (register_bytes, reg_defs, num_registers)
4469 (gdbserver_expedite_regs): Delete.
4470 (get_thread_regcache): If the thread doesn't have a regcache yet,
4471 create one, instead of aborting gdbserver.
4472 (regcache_invalidate_one): Rename to ...
4473 (regcache_invalidate_thread): ... this.
4474 (regcache_invalidate_one): New.
4475 (regcache_invalidate): Only invalidate registers of the current
4476 process.
4477 (init_register_cache): Add target_desc parameter, and use it.
4478 (new_register_cache): Ditto. Assert the target description has a
4479 non zero registers_size.
4480 (regcache_cpy): Add assertions. Adjust.
4481 (realloc_register_cache, set_register_cache): Delete.
4482 (registers_to_string, registers_from_string): Adjust.
4483 (find_register_by_name, find_regno, find_register_by_number)
4484 (register_cache_size): Add target_desc parameter, and use it.
4485 (free_register_cache_thread, free_register_cache_thread_one)
4486 (regcache_release, register_cache_size): New.
4487 (register_size): Add target_desc parameter, and use it.
4488 (register_data, supply_register, supply_register_zeroed)
4489 (supply_regblock, supply_register_by_name, collect_register)
4490 (collect_register_as_string, collect_register_by_name): Adjust.
4491 * regcache.h (struct target_desc): Forward declare.
4492 (struct regcache) <tdesc>: New field.
4493 (init_register_cache, new_register_cache): Add target_desc
4494 parameter.
4495 (regcache_invalidate_thread): Declare.
4496 (regcache_invalidate_one): Delete declaration.
4497 (regcache_release): Declare.
4498 (find_register_by_number, register_cache_size, register_size)
4499 (find_regno): Add target_desc parameter.
4500 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
4501 declarations.
4502 * remote-utils.c: Include tdesc.h.
4503 (outreg, prepare_resume_reply): Adjust.
4504 * server.c: Include tdesc.h.
4505 (gdbserver_xmltarget): Delete declaration.
4506 (get_features_xml, process_serial_event): Adjust.
4507 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
4508 declare.
4509 (struct process_info) <tdesc>: New field.
4510 (ipa_tdesc): Declare.
4511 * tdesc.c: New file.
4512 * tdesc.h: New file.
4513 * tracepoint.c: Include tdesc.h.
4514 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
4515 (get_context_regcache): Adjust to pass ipa_tdesc down.
4516 (do_action_at_tracepoint): Adjust to get the register cache size
4517 from the context regcache's description.
4518 (traceframe_walk_blocks): Adjust to get the register cache size
4519 from the current trace frame's description.
4520 (traceframe_get_pc): Adjust to get current trace frame's
4521 description and pass it down.
4522 (gdb_collect): Adjust to get the register cache size from the
4523 IPA's description.
4524 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
4525 (gdbserver_xmltarget): Delete.
4526 (initialize_low_tracepoint): Set the ipa's target description.
4527 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
4528 (initialize_low_tracepoint): Set the ipa's target description.
4529 * linux-x86-low.c: Include tdesc.h.
4530 [__x86_64__] (is_64bit_tdesc): New.
4531 (ps_get_thread_area, x86_get_thread_area): Use it.
4532 (i386_cannot_store_register): Rename to ...
4533 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
4534 (i386_cannot_fetch_register): Rename to ...
4535 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
4536 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
4537 to new interface.
4538 (target_regsets): Rename to ...
4539 (x86_regsets): ... this.
4540 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
4541 interface.
4542 (x86_siginfo_fixup): Use is_64bit_tdesc.
4543 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
4544 (tdesc_x32_avx_linux, tdesc_x32_linux)
4545 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
4546 Declare.
4547 (x86_linux_update_xmltarget): Delete.
4548 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
4549 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
4550 (AMD64_LINUX_USER64_CS): New.
4551 (x86_linux_read_description): New, based on
4552 x86_linux_update_xmltarget.
4553 (same_process_callback): New.
4554 (x86_arch_setup_process_callback): New.
4555 (x86_linux_update_xmltarget): New.
4556 (x86_regsets_info): New.
4557 (amd64_linux_regs_info): New.
4558 (i386_linux_usrregs_info): New.
4559 (i386_linux_regs_info): New.
4560 (x86_linux_regs_info): New.
4561 (x86_arch_setup): Reimplement.
4562 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
4563 (x86_emit_ops): Ditto.
4564 (the_low_target): Adjust. Install x86_linux_regs_info,
4565 x86_cannot_fetch_register, and x86_cannot_store_register.
4566 (initialize_low_arch): New.
4567 * linux-ia64-low.c (tdesc_ia64): Declare.
4568 (ia64_fetch_register): Adjust.
4569 (ia64_usrregs_info, regs_info): New globals.
4570 (ia64_regs_info): New function.
4571 (the_low_target): Adjust.
4572 (initialize_low_arch): New function.
4573 * linux-sparc-low.c (tdesc_sparc64): Declare.
4574 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
4575 Adjust.
4576 (sparc_arch_setup): New function.
4577 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
4578 (the_low_target): Adjust.
4579 (initialize_low_arch): New function.
4580 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
4581 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
4582 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
4583 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
4584 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
4585 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
4586 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
4587 (tdesc_powerpc_isa205_vsx64l): Declare.
4588 (ppc_cannot_store_register, ppc_collect_ptrace_register)
4589 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
4590 (ppc_set_pc, ppc_get_hwcap): Adjust.
4591 (ppc_usrregs_info): Forward declare.
4592 (!__powerpc64__) ppc_regmap_adjusted: New global.
4593 (ppc_arch_setup): Adjust to the current process'es target
4594 description.
4595 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
4596 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
4597 (ppc_store_evrregset): Adjust.
4598 (target_regsets): Rename to ...
4599 (ppc_regsets): ... this, and make static.
4600 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
4601 (ppc_regs_info): New function.
4602 (the_low_target): Adjust.
4603 (initialize_low_arch): New function.
4604 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
4605 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
4606 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
4607 (tdesc_s390x_linux64v2): Declare.
4608 (s390_collect_ptrace_register, s390_supply_ptrace_register)
4609 (s390_fill_gregset, s390_store_last_break): Adjust.
4610 (target_regsets): Rename to ...
4611 (s390_regsets): ... this, and make static.
4612 (s390_get_pc, s390_set_pc): Adjust.
4613 (s390_get_hwcap): New target_desc parameter, and use it.
4614 [__s390x__] (have_hwcap_s390_high_gprs): New global.
4615 (s390_arch_setup): Adjust to set the current process'es target
4616 description. Don't adjust the regmap.
4617 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
4618 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
4619 (regs_info_3264): New globals.
4620 (s390_regs_info): New function.
4621 (the_low_target): Adjust.
4622 (initialize_low_arch): New function.
4623 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
4624 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
4625 [__mips64] (init_registers_mips_linux)
4626 (init_registers_mips_dsp_linux): Delete defines.
4627 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
4628 (have_dsp): New global.
4629 (mips_read_description): New, based on mips_arch_setup.
4630 (mips_arch_setup): Reimplement.
4631 (get_usrregs_info): New function.
4632 (mips_cannot_fetch_register, mips_cannot_store_register)
4633 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
4634 (mips_fill_fpregset, mips_store_fpregset): Adjust.
4635 (target_regsets): Rename to ...
4636 (mips_regsets): ... this, and make static.
4637 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
4638 (dsp_regs_info, regs_info): New globals.
4639 (mips_regs_info): New function.
4640 (the_low_target): Adjust.
4641 (initialize_low_arch): New function.
4642 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
4643 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
4644 Declare.
4645 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
4646 (arm_read_description): New, with bits factored from
4647 arm_arch_setup.
4648 (arm_arch_setup): Reimplement.
4649 (target_regsets): Rename to ...
4650 (arm_regsets): ... this, and make static.
4651 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
4652 (arm_regs_info): New function.
4653 (the_low_target): Adjust.
4654 (initialize_low_arch): New function.
4655 * linux-m68k-low.c (tdesc_m68k): Declare.
4656 (target_regsets): Rename to ...
4657 (m68k_regsets): ... this, and make static.
4658 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
4659 (m68k_regs_info): New function.
4660 (m68k_arch_setup): New function.
4661 (the_low_target): Adjust.
4662 (initialize_low_arch): New function.
4663 * linux-sh-low.c (tdesc_sharch): Declare.
4664 (target_regsets): Rename to ...
4665 (sh_regsets): ... this, and make static.
4666 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
4667 (sh_regs_info, sh_arch_setup): New functions.
4668 (the_low_target): Adjust.
4669 (initialize_low_arch): New function.
4670 * linux-bfin-low.c (tdesc_bfin): Declare.
4671 (bfin_arch_setup): New function.
4672 (bfin_usrregs_info, regs_info): New globals.
4673 (bfin_regs_info): New function.
4674 (the_low_target): Adjust.
4675 (initialize_low_arch): New function.
4676 * linux-cris-low.c (tdesc_cris): Declare.
4677 (cris_arch_setup): New function.
4678 (cris_usrregs_info, regs_info): New globals.
4679 (cris_regs_info): New function.
4680 (the_low_target): Adjust.
4681 (initialize_low_arch): New function.
4682 * linux-cris-low.c (tdesc_crisv32): Declare.
4683 (cris_arch_setup): New function.
4684 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
4685 (cris_regs_info): New function.
4686 (the_low_target): Adjust.
4687 (initialize_low_arch): New function.
4688 * linux-m32r-low.c (tdesc_m32r): Declare.
4689 (m32r_arch_setup): New function.
4690 (m32r_usrregs_info, regs_info): New globals.
4691 (m32r_regs_info): Adjust.
4692 (initialize_low_arch): New function.
4693 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
4694 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
4695 (tic6x_usrregs_info): Forward declare.
4696 (tic6x_read_description): New function, based on ...
4697 (tic6x_arch_setup): ... this. Reimplement.
4698 (target_regsets): Rename to ...
4699 (tic6x_regsets): ... this, and make static.
4700 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
4701 (tic6x_regs_info): New function.
4702 (the_low_target): Adjust.
4703 (initialize_low_arch): New function.
4704 * linux-xtensa-low.c (tdesc_xtensa): Declare.
4705 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
4706 (target_regsets): Rename to ...
4707 (xtensa_regsets): ... this, and make static.
4708 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
4709 globals.
4710 (xtensa_arch_setup, xtensa_regs_info): New functions.
4711 (the_low_target): Adjust.
4712 (initialize_low_arch): New function.
4713 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
4714 (nios2_arch_setup): Set the current process'es tdesc.
4715 (target_regsets): Rename to ...
4716 (nios2_regsets): ... this.
4717 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
4718 (nios2_regs_info): New function.
4719 (the_low_target): Adjust.
4720 (initialize_low_arch): New function.
a261b8f5
PA
4721 * linux-aarch64-low.c (tdesc_aarch64): Declare.
4722 (aarch64_arch_setup): Set the current process'es tdesc.
4723 (target_regsets): Rename to ...
4724 (aarch64_regsets): ... this.
4725 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
4726 (aarch64_regs_info): New function.
4727 (the_low_target): Adjust.
4728 (initialize_low_arch): New function.
3aee8918
PA
4729 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
4730 globals.
4731 (target_regsets): Rename to ...
4732 (tile_regsets): ... this.
4733 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
4734 (tile_regs_info): New function.
4735 (tile_arch_setup): Set the current process'es tdesc.
4736 (the_low_target): Adjust.
4737 (initialize_low_arch): New function.
4738 * spu-low.c (tdesc_spu): Declare.
4739 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
4740 * win32-arm-low.c (tdesc_arm): Declare.
4741 (arm_arch_setup): New function.
4742 (the_low_target): Install arm_arch_setup instead of
4743 init_registers_arm.
4744 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
4745 (init_windows_x86): Rename to ...
4746 (i386_arch_setup): ... this. Set `win32_tdesc'.
4747 (the_low_target): Adjust.
4748 * win32-low.c (win32_tdesc): New global.
4749 (child_add_thread): Don't create the thread cache here.
4750 (do_initial_child_stuff): Set the new process'es tdesc.
4751 * win32-low.h (struct target_desc): Forward declare.
4752 (win32_tdesc): Declare.
4753 * lynx-i386-low.c (tdesc_i386): Declare global.
4754 (lynx_i386_arch_setup): Set `lynx_tdesc'.
4755 * lynx-low.c (lynx_tdesc): New global.
4756 (lynx_add_process): Set the new process'es tdesc.
4757 * lynx-low.h (struct target_desc): Forward declare.
4758 (lynx_tdesc): Declare global.
4759 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
4760 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
4761 * nto-low.c (nto_tdesc): New global.
4762 (do_attach): Set the new process'es tdesc.
4763 * nto-low.h (struct target_desc): Forward declare.
4764 (nto_tdesc): Declare.
4765 * nto-x86-low.c (tdesc_i386): Declare.
4766 (nto_x86_arch_setup): Set `nto_tdesc'.
4767
b1fbec62
GB
47682013-06-04 Gary Benson <gbenson@redhat.com>
4769
4770 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
4771 to qSupported response when appropriate.
4772 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
4773 with nonzero-length annex.
4774 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
4775 arguments supplied in annex.
4776
d1ec4ce7
DE
47772013-05-31 Doug Evans <dje@google.com>
4778
ac44adcb 4779 PR server/15594
d1ec4ce7
DE
4780 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
4781 64 bits in 64-cross-32 environment.
4782
9b25f2d3
PA
47832013-05-28 Pedro Alves <palves@redhat.com>
4784
4785 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
4786 (aarch64-without-fpu.c): Delete rule.
4787 * configure.srv (aarch64*-*-linux*): Remove references to
4788 aarch64-without-fpu.o and aarch64-without-fpu.xml.
4789 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
4790 declaration.
4791
6740dc9c
PA
47922013-05-24 Pedro Alves <palves@redhat.com>
4793
4794 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
4795 instead of strchr/decode_address. Error if the range isn't split
4796 with a ','. Don't assume there's be a ':' in the action.
4797
c2d6af84
PA
47982013-05-23 Yao Qi <yao@codesourcery.com>
4799 Pedro Alves <palves@redhat.com>
4800
4801 * linux-low.c (lwp_in_step_range): New function.
4802 (linux_wait_1): If the thread was range stepping and stopped
4803 outside the stepping range, report the stop to GDB. Otherwise,
4804 continue stepping. Add range stepping debug output.
4805 (linux_set_resume_request): Copy the step range from the resume
4806 request to the lwp.
4807 (linux_supports_range_stepping): New.
4808 (linux_target_ops) <supports_range_stepping>: Set to
4809 linux_supports_range_stepping.
4810 * linux-low.h (struct linux_target_ops)
4811 <supports_range_stepping>: New field.
4812 (struct lwp_info) <step_range_start, step_range_end>: New fields.
4813 * linux-x86-low.c (x86_supports_range_stepping): New.
4814 (the_low_target) <supports_range_stepping>: Set to
4815 x86_supports_range_stepping.
4816 * server.c (handle_v_cont): Handle 'r' action.
4817 (handle_v_requests): Append ";r" if the target supports range
4818 stepping.
4819 * target.h (struct thread_resume) <step_range_start,
4820 step_range_end>: New fields.
4821 (struct target_ops) <supports_range_stepping>:
4822 New field.
4823 (target_supports_range_stepping): New macro.
4824
58794e1a
JB
48252013-05-17 Joel Brobecker <brobecker@adacore.com>
4826
4827 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
4828 confusion in comment.
4829
d631c5a7
JB
48302013-05-17 Joel Brobecker <brobecker@adacore.com>
4831
4832 * lynx-low.c (struct process_info_private): New type.
4833 (lynx_add_process): New function.
4834 (lynx_create_inferior, lynx_attach): Replace calls to
4835 add_process by calls to lynx_add_process.
4836 (lynx_resume): If PTID is null, then try using
4837 current_process()->private->last_wait_event_ptid.
4838 Add comments.
4839 (lynx_clear_inferiors): Delete. The contents of that function
4840 has been inlined in lynx_mourn;
4841 (lynx_wait_1): Save the ptid in the process's private data.
4842 (lynx_mourn): Free the process' private data. Replace call
4843 to lynx_clear_inferiors by call to clear_inferiors.
4844
96f7a20f
YQ
48452013-05-17 Yao Qi <yao@codesourcery.com>
4846
4847 * i386-low.c (i386_length_and_rw_bits): Move the comment to
4848 the right place.
4849
db0dfaa0
LM
48502013-05-16 Luis Machado <lgustavo@codesourcery.com>
4851
4852 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
4853 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
4854 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
4855 PT_TEXT_END_ADDR guards. Update comments.
4856 (linux_target_op) <read_offsets>: Conditionally define to
4857 linux_read_offsets if the target is UCLIBC and if it defines
4858 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
4859
68f5f838
SL
48602013-05-06 Sandra Loosemore <sandra@codesourcery.com>
4861 Andrew Jenner <andrew@codesourcery.com>
4862
4863 * Makefile.in (SFILES): Add linux-nios2-low.c.
4864 (clean): Add action to delete nios2-linux.c.
4865 (nios2-linux.c): New rule.
4866 * configure.srv: Add nios2*-*-linux*.
4867 * linux-nios2-low.c: New.
4868
1ebff1fd
HAQ
48692013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
4870
4871 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
4872
f6150862
HZ
48732013-04-25 Hui Zhu <hui@codesourcery.com>
4874
4875 PR gdb/15186
f6150862
HZ
4876 * ax.c (ax_printf): Add fflush.
4877
614c279d
TT
48782013-04-22 Tom Tromey <tromey@redhat.com>
4879
4880 * Makefile.in (SFILES): Add filestuff.c.
4881 (OBS): Add filestuff.o.
4882 (filestuff.o): New target.
4883 * config.in, configure: Rebuild.
4884 * configure.ac: Check for fdwalk, pipe2.
4885
7d4e5717
PA
48862013-04-17 Pedro Alves <palves@redhat.com>
4887
4888 * configure.ac (USE_THREAD_DB): Delete variable.
4889 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
4890 Don't AC_SUBST USE_THREAD_DB.
4891 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
4892 * config.in, configure: Regenerate.
4893
d5c93e41
PA
48942013-04-16 Pedro Alves <palves@redhat.com>
4895
4896 * linux-low.h (struct lwp_info) <thread_known>: Move under
4897 the USE_THREAD_DB #ifdef.
4898
04f5fe89
PA
48992013-04-16 Pedro Alves <palves@redhat.com>
4900
4901 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
4902 (linux-low.o): Delete rule.
4903 * linux-low.h: Always include "gdb_thread_db.h" instead of
4904 conditionally including thread_db.h.
4905 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
4906 HAVE_THREAD_DB_H.
4907
480b27bf
JK
49082013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
4909
4910 * Makefile.in (install-only): Fix make install regression.
4911
43662968
JK
49122013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
4913
4914 Convert man pages to texinfo, new gdbinit.5 texinfo page.
4915 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
4916 installation.
4917 * gdbserver.1: Remove.
4918
3e74e146
PA
49192013-03-22 Pedro Alves <palves@redhat.com>
4920
4921 * linux-low.c (handle_extended_wait): Don't call
4922 linux_enable_event_reporting.
4923
a8347a2a
TT
49242013-03-15 Tony Theodore <tonyt@logyst.com>
4925
4926 PR build/9098:
4927 * Makefile.in (SHELL): Use @SHELL@.
4928
eeb56fa7
SDJ
49292013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
4930
4931 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
4932 compiler warning.
4933
4fa7e2ff
JB
49342013-03-13 Joel Brobecker <brobecker@adacore.com>
4935
4936 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
4937 Remove extraneous NULL element.
4938
8ddb1965
YQ
49392013-03-13 Yao Qi <yao@codesourcery.com>
4940
4941 * tracepoint.c (traceframe_read_tsv): Look for the last matched
4942 'V' block in trace frame.
4943
9accd112
MM
49442013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4945
4946 * target.h (struct target_ops): Add btrace ops.
4947 (target_supports_btrace): New macro.
4948 (target_enable_btrace): New macro.
4949 (target_disable_btrace): New macro.
4950 (target_read_btrace): New macro.
4951 * gdbthread.h (struct thread_info): Add btrace field.
4952 * server.c: Include btrace-common.h.
4953 (handle_btrace_general_set): New function.
4954 (handle_btrace_enable): New function.
4955 (handle_btrace_disable): New function.
4956 (handle_general_set): Call handle_btrace_general_set.
4957 (handle_qxfer_btrace): New function.
4958 (struct qxfer qxfer_packets[]): Add btrace entry.
4959 * inferiors.c (remove_thread): Disable btrace.
4960 * linux-low: Include linux-btrace.h.
4961 (linux_low_enable_btrace): New function.
4962 (linux_low_read_btrace): New function.
4963 (linux_target_ops): Add btrace ops.
4964 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
4965 Add srv_linux_btrace=yes.
4966 (x86_64-*-linux*): Add linux-btrace.o.
4967 Add srv_linux_btrace=yes.
4968 * configure.ac: Define HAVE_LINUX_BTRACE.
4969 * config.in: Regenerated.
4970 * configure: Regenerated.
4971
5cc22e4c
MM
49722013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4973
4974 * server.c (handle_qxfer): Preserve error message if -3 is
4975 returned.
4976 (qxfer): Document the -3 return value.
4977
7c97f91e
MM
49782013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4979
4980 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
4981 (linux_btrace_h): New variable.
4982 (linux-btrace.o): New rule.
4983
be9a119c 49842013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
4985 Hafiz Abid Qadeer <abidh@codesourcery.com>
4986
4987 * tracepoint.c (trace_buffer_size): New global.
4988 (DEFAULT_TRACE_BUFFER_SIZE): New define.
4989 (init_trace_buffer): Change to one-argument function. Allocate
4990 trace buffer memory.
4991 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
4992 handle QTBuffer:size packet.
4993 (cmd_bigqtbuffer_size): New function.
4994 (initialize_tracepoint): Call init_trace_buffer with
4995 DEFAULT_TRACE_BUFFER_SIZE.
4996 * server.c (handle_query): Add QTBuffer:size in the
4997 supported packets.
4998
e64f7499
YQ
49992013-03-07 Yao Qi <yao@codesourcery.com>
5000
5001 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
5002 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
5003 of -1.
5004 (cmd_qtsp): Adjust condition. Do post increment.
5005 Set cur_action and cur_step_action back to 0.
5006
f0ae6fc3
PA
50072013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
5008
5009 PR server/15236
5010 * linux-low.c (linux_write_memory): Return early success if LEN is
5011 zero.
5012
b5b0b0af
CV
50132013-03-05 Corinna Vinschen <vinschen@redhat.de>
5014
334ad4a8 5015 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 5016
589bc927
TT
50172013-02-28 Tom Tromey <tromey@redhat.com>
5018
5019 * configure.ac: Invoke AC_SYS_LARGEFILE.
5020 * configure, config.in: Rebuild.
5021
dfe07582
CV
50222013-02-28 Corinna Vinschen <vinschen@redhat.com>
5023
5024 * win32-low.c: Throughout, fix format strings and casts of
5025 printf-like functions to avoid type related warnings on all
5026 platforms.
5027 (get_child_debug_event): Print dwDebugEventCode as hex since
5028 that's how it's usually documented.
5029
736cd585
YQ
50302013-02-28 Yao Qi <yao@codesourcery.com>
5031
5032 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
5033 pulongest.
5034
e1f58301
JW
50352013-02-27 Jiong Wang <jiwang@tilera.com>
5036
5037 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
5038 (reg-tilegx32.c): New rule.
5039 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
5040 * linux-tile-low.c (tile_arch_setup): New function. Invoke
5041 different register info initializer according to elf class.
5042 (init_registers_tilgx32): New function. The tilegx32 register info
5043 initializer.
5044 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
5045 (tile_store_gregset): Likewise.
5046
d171ca78
YQ
50472013-02-27 Yao Qi <yao@codesourcery.com>
5048
5049 * server.c (process_point_options): Print debug message when
5050 debug_threads is true.
5051
282bbdf3
YQ
50522013-02-26 Yao Qi <yao@codesourcery.com>
5053
5054 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
5055
aca22551
PA
50562013-02-19 Pedro Alves <palves@redhat.com>
5057 Kai Tietz <ktietz@redhat.com>
5058
5059 PR gdb/15161
5060
5061 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
5062 instead of strtoul to extract address from packet.
5063 (process_serial_event) <'z'>: Likewise.
5064
4f3cee1c
YQ
50652013-02-18 Yao Qi <yao@codesourcery.com>
5066
5067 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
5068
8e1d55a3
PA
50692013-02-14 Pedro Alves <palves@redhat.com>
5070
5071 Plug memory leak.
5072
5073 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
5074 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
5075
458820da
PA
50762013-02-14 Pedro Alves <palves@redhat.com>
5077
5078 * tracepoint.c (cmd_qtdpsrc): Use savestring.
5079
baea0dae
PA
50802013-02-14 Pedro Alves <palves@redhat.com>
5081
5082 * tracepoint.c (save_string): Delete.
5083 (add_tracepoint_action): Use savestring instead of save_string.
5084
0b1afbb3
PA
50852013-02-12 Pedro Alves <palves@redhat.com>
5086
5087 * linux-xtensa-low.c: Ditto.
5088 * xtensa-xtregs.c: Ditto.
5089
8a4ac37e
PA
50902013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
5091
5092 * thread-db.c (thread_db_get_tls_address): NULL pointer check
5093 thread_db.
5094
148de6bb
MS
50952013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
5096
5097 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
5098 aarch64_num_wp_regs and aarch64_num_bp_regs to
5099 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
5100
55fac6e0
MS
51012013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
5102
5103 * linux-aarch64-low.c (ps_get_thread_area): Replace
5104 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
5105
176eb98c
MS
51062013-02-04 Jim MacArthur <jim.macarthur@arm.com>
5107 Marcus Shawcroft <marcus.shawcroft@arm.com>
5108 Nigel Stephens <nigel.stephens@arm.com>
5109 Yufeng Zhang <yufeng.zhang@arm.com>
5110
5111 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
5112 (aarch64.c, aarch64-without-fpu.c): New targets.
5113 * configure.srv (aarch64*-*-linux*): New.
5114 * linux-aarch64-low.c: New file.
5115
56f7af9c
MS
51162013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
5117
43aaf8b6 5118 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
5119 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
5120 (dequeue_one_deferred_signal, linux_resume_one_thread)
5121 (fetch_register, linux_write_memory, linux_enable_event_reporting)
5122 (linux_tracefork_grandchild, linux_test_for_tracefork)
5123 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
5124 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
5125 where the argument is 0.
5126
60f662b0
YQ
51272013-01-25 Yao Qi <yao@codesourcery.com>
5128
5129 * event-loop.c: Include "queue.h".
5130 (gdb_event_p): New typedef.
5131 (struct gdb_event) <next_event>: Remove.
5132 (event_queue): Change to QUEUE(gdb_event_p).
5133 (async_queue_event): Remove.
5134 (gdb_event_xfree): New.
5135 (initialize_event_loop): New.
5136 (process_event): Use API from QUEUE.
5137 (wait_for_event): Likewise.
5138 * server.c (main): Call initialize_event_loop.
5139 * server.h (initialize_event_loop): Declare.
5140
5ae4861a
YQ
51412013-01-18 Yao Qi <yao@codesourcery.com>
5142
5143 * ax.h (struct eval_agent_expr_context): New.
5144 (gdb_eval_agent_expr): Update declaration.
5145 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
5146 TFRAME. Add new argument CTX.
5147 * server.h (struct eval_agent_expr_context): Declare.
5148 (agent_mem_read, agent_tsv_read): Update declaration.
5149 (agent_mem_read_string): Likewise.
5150 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
5151 (add_traceframe_block): Add new argument TPOINT.
5152 Increase TPOINT->traceframe_usage.
5153 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
5154 eval_tracepoint_agent_expr.
5155 (condition_true_at_tracepoint): Likewise.
5156 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
5157 (agent_mem_read_string, agent_tsv_read): Likewise.
5158
85e00e85
YQ
51592013-01-16 Yao Qi <yao@codesourcery.com>
5160
5161 * linux-low.c (linux_resume_one_lwp): Don't check
5162 'lwp->bp_reinsert != 0'.
5163
4039cf45
JB
51642013-01-07 Joel Brobecker <brobecker@adacore.com>
5165 Pedro Alves <palves@redhat.com>
5166
5167 * lynx-low.c (ptrace_request_to_str): Define a temporary
5168 macro and use it to simplify this function's implementation.
5169
9044dee2
JB
51702013-01-07 Joel Brobecker <brobecker@adacore.com>
5171
5172 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
5173 sets errno.
5174
e6352c8f
JB
51752013-01-07 Joel Brobecker <brobecker@adacore.com>
5176
5177 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
5178
50681a27
JB
51792013-01-07 Joel Brobecker <brobecker@adacore.com>
5180
5181 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
5182
3f6e77ef
JB
51832013-01-07 Joel Brobecker <brobecker@adacore.com>
5184
5185 * lynx-low.c (lynx_resume): Use the resume_info parameter
5186 to determine the ptid for the lynx_ptrace call, unless
5187 it is equal to minus_one_ptid, in which case we use the
5188 ptid of the current_inferior.
5189 (lynx_wait_1): After having received a thread create/exit
5190 event, resume the inferior's execution using the signaling
5191 thread's ptid, rather than the old ptid.
5192
7fda33ae
JB
51932013-01-07 Joel Brobecker <brobecker@adacore.com>
5194
5195 * lynx-low.c (lynx_resume): Delete variable ret.
5196
b9786c74
JB
51972013-01-01 Joel Brobecker <brobecker@adacore.com>
5198
5199 * gdbreplay.c (gdbreplay_version): Update copyright year.
5200 * server.c (gdbserver_version): Likewise.
5201
8b93d60f
JB
52022012-12-17 Joel Brobecker <brobecker@adacore.com>
5203
5204 * lynx-low.c (lynx_wait_1): Add debug trace before adding
5205 new thread.
5206
037335a7
JB
52072012-12-17 Joel Brobecker <brobecker@adacore.com>
5208
5209 * lynx-low.c (ptrace_request_to_str): Add handling for
5210 PTRACE_GETTRACESIG.
5211
52d4cbd8
JB
52122012-12-17 Joel Brobecker <brobecker@adacore.com>
5213
5214 * lynx-low.c (lynx_attach): Delete variable new_process.
5215
ab8f6ca9
JB
52162012-12-17 Joel Brobecker <brobecker@adacore.com>
5217
5218 * lynx-low.c (lynx_create_inferior): Delete variable
5219 new_process.
5220
78cbc024
JB
52212012-12-17 Joel Brobecker <brobecker@adacore.com>
5222
5223 * lynx-low.c (ptrace_request_to_str): Do not handle
5224 PTRACE_GETTHREADLIST if this macro does not exist.
5225
14a00470
YQ
52262012-12-15 Yao Qi <yao@codesourcery.com>
5227
5228 * Makefile.in (OBS): Add notif.o.
5229 * notif.c, notif.h: New.
5230 * server.c: Include "notif.h".
5231 (struct vstop_notif) <next>: Remove.
5232 <base>: New field.
5233 (queue_stop_reply): Update.
5234 (push_event, send_next_stop_reply): Remove.
5235 (discard_queued_stop_replies): Update.
5236 (notif_stop): New variable.
5237 (handle_v_stopped): Remove.
5238 (handle_v_requests): Don't call handle_v_stopped. Call
5239 handle_ack_notif instead.
5240 (queue_stop_reply_callback): Call notif_event_enque instead
5241 of queue_stop_reply.
5242 (handle_status): Don't call send_next_stop_reply, call
5243 notif_write_event instead.
5244 (kill_inferior_callback): Likewise.
5245 (detach_or_kill_inferior_callback): Likewise.
5246 (main): Call initialize_notif.
5247 (process_serial_event): Call QUEUE_is_empty.
5248 (handle_target_event): Call notif_push instead of push event.
5249 * server.h (push_event): Remove declaration.
5250
61c125b9
TT
52512012-12-10 Tom Tromey <tromey@redhat.com>
5252
5253 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
5254 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
5255 macros.
5256 (.c.o): Rewrite.
5257 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
5258 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
5259 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
5260 (amd64-linux-ipa.o, ax.o): Rewrite.
5261 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
5262 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
5263 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
5264 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
5265 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
5266 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
5267 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
5268 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
5269 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
5270 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
5271 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
5272 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
5273 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
5274 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
5275 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
5276 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
5277 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
5278 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
5279 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
5280 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
5281 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
5282 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
5283 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
5284 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
5285 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
5286 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
5287 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
5288 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
5289 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
5290 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
5291 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
5292 (reg-tilegx.o): Remove.
5293 (all_object_files): New macro.
5294 Include .deps files.
5295 * aclocal.m4, configure: Rebuild.
5296 * acinclude.m4: Include depstand.m4, lead-dot.m4.
5297 * configure.ac: Invoke ZW_CREATE_DEPDIR,
5298 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
5299
e90e9ad9
TT
53002012-12-05 Tom Tromey <tromey@redhat.com>
5301
5302 PR gdb/14917:
5303 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
5304
02d403bf 53052012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
5306
5307 * configure.ac: Check for linux/perf_event.h.
5308 * config.in: Regenerated.
5309 * configure: Regenerated.
5310
0270a750
PA
53112012-11-26 Maxime Villard <rustyBSD@gmx.fr>
5312
5313 * hostio.c (handle_readlink): Decrease buffer size
5314 parameter passed to readlink by one byte.
5315
8c29b58e
YQ
53162012-11-26 Yao Qi <yao@codesourcery.com>
5317
5318 * configure.ac (build_warnings): Append '-Wempty-body'.
5319 * configure: Regenerated.
5320 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
5321 body.
5322
8bdce1ff
PM
53232012-11-15 Pierre Muller <muller@sourceware.org>
5324
5325 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
5326 * config.in: Regenerate.
5327 * configure: Regenerate.
5328 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
5329 Use "gdb_wait.h" header instead of <sys/wait.h> header.
5330 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
5331 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
5332 header.
5333 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
5334 instead of <sys/wait.h> header.
5335 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
5336
02d403bf 53372012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
5338
5339 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
5340 (various make rules): Remove -DGDBSERVER
5341
fbd5db48
YQ
53422012-11-09 Yao Qi <yao@codesourcery.com>
5343
5344 * spu-low.c (current_ptid): Move it to ..
5345 * gdbthread.h: ... here. New.
5346 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
5347 * server.c (myresume, process_serial_event): Likewise.
5348 * thread-db.c (thread_db_find_new_threads): Likewise.
5349 * tracepoint.c (run_inferior_command): Likewise.
5350
b3dc46ff
AB
53512012-10-01 Andrew Burgess <aburgess@broadcom.com>
5352
5353 * server.c (handle_search_memory_1): Include access length in
5354 warning message.
5355
07c04788
HPN
53562012-09-05 Michael Brandt <michael.brandt@axis.com>
5357
5358 * linux-crisv32-low.c: Fix compile errors.
5359
918d227b
YQ
53602012-09-04 Yao Qi <yao@codesourcery.com>
5361
5362 * tracepoint.c (cmd_qtsv): Adjust debug message.
5363 Don't check CUR_TPOINT.
5364
18c1b81a
YQ
53652012-08-28 Yao Qi <yao@codesourcery.com>
5366
5367 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
5368 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
5369 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
5370 Remove declarations of xmalloc, xreallloc, xstrdup and
5371 freeargv.
5372 * Makefile.in (libiberty_h): New.
5373 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
5374 (linux-bfin-low.o): Append dependency 'libiberty.h'.
5375
dc82f37b
YQ
53762012-08-23 Yao Qi <yao@codesourcery.com>
5377
5378 * server.h: Remove declaration of 'xsnprintf'.
5379
406b1477
KS
53802012-08-22 Keith Seitz <keiths@redhat.com>
5381
5382 * server.h: Include build-gnulib-gbserver/config.h.
5383 * gdbreplay.c: Likewise.
5384
e6712ff1
DE
53852012-08-08 Doug Evans <dje@google.com>
5386
5387 * Makefile.in (SFILES): Add gdb_vecs.c.
5388 (OBS): Add gdb_vecs.o.
5389 (gdb_vecs_h, host_defs_h): New variables.
5390 (thread-db.o): Add $(gdb_vecs_h) dependency.
5391 (gdb_vecs.o): New rule.
5392 * thread-db.c: #include "gdb_vecs.h".
5393 (thread_db_load_search): Use a vector to iterate over path elements.
5394 Handle text appearing after "$pdir".
5395
5396 * configure.ac: Add check for strstr.
5397 * config.in: Regenerate.
5398 * configure: Regenerate.
5399
7c3270ae
UW
54002012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
5401
5402 * hostio.c (handle_pread): If pread fails, fall back to attempting
5403 lseek/read.
5404 (handle_pwrite): Likewise for pwrite.
5405
b62e2b27
UW
54062012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
5407
5408 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
5409 between unsupported TYPE and unimplementable ADDR/LEN combination.
5410 (arm_insert_point): Act on new return value.
5411
78a99e91
PA
54122012-07-31 Pedro Alves <palves@redhat.com>
5413
5414 * server.c (process_point_options): Only skip tokens if we find
5415 one that is unrecognized. Don't treat 'X' specially while
5416 skipping unrecognized tokens.
5417
fcf303ab
UW
54182012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
5419
5420 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
5421 to 4-byte-align HW breakpoint addresses for Thumb.
5422
7255706c
YQ
54232012-07-27 Yao Qi <yao@codesourcery.com>
5424
5425 PR remote/14161.
5426
5427 * server.h: Declare gdb_agent_about_to_close.
5428 * target.c (kill_inferior): Include "agent.h".
5429 New. Send command 'kill'.
5430 * target.h (kill_inferior): Removed macro.
5431 * tracepoint.c (gdb_agent_about_to_close): New.
5432 (gdb_agent_helper_thread): Handle command 'close'.
5433 Wait endlessly until the inferior stops.
5434 Install gdb_agent_remove_socket to atexit hook.
5435 (agent_socket_name): New static variable.
5436 (gdb_agent_socket_init): Replace local variable 'name' with
5437 'agent_socket_name'.
5438 (gdb_agent_remove_socket): New.
5439
5a3f286f
YQ
54402012-07-27 Yao Qi <yao@codesourcery.com>
5441
5442 * server.c (process_point_options): Stop at 'X' when parsing.
5443
961bd387
ME
54442012-07-19 Michael Eager <eager@eagercon.com>
5445
a261b8f5 5446 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
5447 to hw_execute.
5448 * linux-x86-low.c (x86_insert_point, x86_remove_point):
5449 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
5450 hardware breakpoint.
5451
aa7c7447
JK
54522012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5453
5454 * gdbserver/linux-low.c (initialize_low): Call
5455 linux_ptrace_init_warnings.
5456
7f216e7c
DE
54572012-07-02 Doug Evans <dje@google.com>
5458
5459 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
5460 pointer to int.
5461
d3ce09f5
SS
54622012-07-02 Stan Shebs <stan@codesourcery.com>
5463
5464 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
5465 (ax.o): Add it to build rule.
5466 (ax-ipa.o): Ditto.
5467 (OBS): Add format.o.
5468 (IPA_OBS): Add format.o.
5469 * server.c (handle_query): Claim support for breakpoint commands.
5470 (process_point_options): Add command case.
5471 (process_serial_event): Leave running if there are printfs in
5472 effect.
5473 * mem-break.h (any_persistent_commands): Declare.
5474 (add_breakpoint_commands): Declare.
5475 (gdb_no_commands_at_breakpoint): Declare.
5476 (run_breakpoint_commands): Declare.
5477 * mem-break.c (struct point_command_list): New struct.
5478 (struct breakpoint): New field command_list.
5479 (any_persistent_commands): New function.
5480 (add_commands_to_breakpoint): New function.
5481 (add_breakpoint_commands): New function.
5482 (gdb_no_commands_at_breakpoint): New function.
5483 (run_breakpoint_commands): New function.
5484 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
5485 locally.
5486 * ax.c: Include format.h.
5487 (ax_printf): New function.
5488 (gdb_eval_agent_expr): Add printf opcode.
5489
2f8f6aed
YQ
54902012-06-13 Yao Qi <yao@codesourcery.com>
5491
5492 * server.c (start_inferior): Remove duplicated writes to fields
5493 'last_resume_kind' and 'last_status' of 'current_inferior'.
5494
0c9070b3
YQ
54952012-06-12 Yao Qi <yao@codesourcery.com>
5496 Pedro Alves <palves@redhat.com>
5497
5498 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
5499 comment.
5500 * server.c (handle_v_cont): Extend comment.
5501
c52daf70
YQ
55022012-06-11 Yao Qi <yao@codesourcery.com>
5503
5504 * linux-low.c (linux_attach): Add 'static'.
5505
d38bbb0a
YQ
55062012-06-06 Yao Qi <yao@codesourcery.com>
5507
5508 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
5509
89dc0afd
JK
55102012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
5511
5512 Fix gcc -flto compilation warning.
5513 * server.c (main): Make variable multi_mode and attach volatile.
5514
75f62ce7
TJB
55152012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5516
5517 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
5518 if the platform doesn't know about it.
5519
65f479b6
PA
55202012-05-30 Jeff Kenton <jkenton@tilera.com>
5521
5522 * Makefile.in (SFILES): Add linux-tile-low.c.
5523 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
5524 * configure.srv: Handle tilegx-*-linux*.
5525 * linux-tile-low.c: New file.
5526
0c5bf5a9
JK
55272012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5528
5529 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
5530
a493e3e2
PA
55312012-05-24 Pedro Alves <palves@redhat.com>
5532
5533 PR gdb/7205
5534
43aaf8b6 5535 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 5536
2ea28649
PA
55372012-05-24 Pedro Alves <palves@redhat.com>
5538
5539 PR gdb/7205
5540
5541 Replace target_signal with gdb_signal throughout.
5542
8d409d16
MR
55432012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
5544
5545 * linux-low.c (linux_store_registers): Avoid the copying sequence
5546 when no data has been retrieved by ptrace.
5547
23512c01
MGD
55482012-05-22 Will Deacon <will.deacon@arm.com>
5549
5550 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
5551 Include asm/ptrace.h.
5552 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
5553 already defined.
5554
4934b29e
MR
55552012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
5556
5557 * linux-low.c (linux_store_registers): Don't re-retrieve data
5558 with ptrace that has already been obtained from /proc. Always
5559 copy any data retrieved with ptrace to the buffer supplied.
5560
bde24c0a
PA
55612012-05-11 Yao Qi <yao@codesourcery.com>
5562 Pedro Alves <palves@redhat.com>
5563
5564 * linux-low.c (enum stopping_threads_kind): New.
5565 (stopping_threads): Change type to `enum stopping_threads_kind'.
5566 (handle_extended_wait): If stopping and suspending threads, leave
5567 the new_lwp suspended too.
5568 (linux_wait_for_event): Adjust.
5569 (stop_all_lwps): Set `stopping_threads' to
5570 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
5571 whether we're suspending threads or just stopping them. Assert no
5572 recursion happens.
5573
623b6bdf
YQ
55742012-04-29 Yao Qi <yao@codesourcery.com>
5575
5576 * server.h: Move some code to ...
5577 * gdbthread.h: ... here. New.
5578 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
5579 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
5580 (nto-low.o, win32-low.o): Likewise.
5581 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
5582 * regcache.c, remote-utils.c, server.c: Likewise.
5583 * target.c, tracepoint.c, win32-low.c: Likewise.
5584
f15f9948
TJB
55852012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5586
5587 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
5588 (PTRACE_ARG4_TYPE): Likewise.
5589 (PTRACE_XFER_TYPE): Likewise.
5590 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
5591 ptrace to PTRACE_ARG3_TYPE.
5592 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
5593 (PTRACE_ARG4_TYPE): Likewise.
5594 (PTRACE_XFER_TYPE): Likewise.
5595 (linux_detach_one_lwp): Cast fourth argument of
5596 ptrace to long then PTRACE_ARG4_TYPE.
5597 (regsets_fetch_inferior_registers): Cast third argument of
5598 ptrace to long then PTRACE_ARG3_TYPE.
5599 (regsets_store_inferior_registers): Likewise.
5600
38ea300a
PA
56012012-04-20 Pedro Alves <palves@redhat.com>
5602
5603 * configure: Regenerate.
5604
c971b7fa
PA
56052012-04-19 Pedro Alves <palves@redhat.com>
5606
43aaf8b6 5607 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 5608 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
5609 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
5610 (all, install-only, uninstall, clean-info, all-lib, clean): No
5611 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
5612 (maintainer-clean realclean distclean): Use subdir_do.
5613 (subdir_do): New.
5614 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 5615 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
5616 * acinclude.m4: Include acx_configure_dir.m4.
5617 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
5618 calls. Call AC_PROG_RANLIB. Configure gnulib using
5619 ACX_CONFIGURE_DIR.
5620 (GNULIB): New.
5621 (GNULIB_STDINT_H): Adjust.
5622 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
5623 * gdbreplay.c: Include build-gnulib/config.h.
5624 * server.h: Likewise.
5625 * aclocal.m4: Regenerate.
5626 * config.in: Regenerate.
5627 * configure: Regenerate.
c971b7fa 5628
809277f8
PA
56292012-04-19 Pedro Alves <palves@redhat.com>
5630
5631 * Makefile.in (LIBGNU, INCGNU): Adjust.
5632 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
5633 (all, install-only, uninstall, clean-info, all-lib, clean)
5634 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
5635 * configure.ac: Adjust AC_OUTPUT output.
5636 * aclocal.m4: Regenerate.
5637 * configure: Regenerate.
5638
fd9bb8b8
PA
56392012-04-19 Pedro Alves <palves@redhat.com>
5640
5641 * Makefile.in (generated_files): New.
5642 (server_h): Remove the explicit dependency on config.h, and depend
5643 on $generated_files.
5644
1c298c66
PA
56452012-04-19 Pedro Alves <palves@redhat.com>
5646
5647 * Makefile.in (INCGNU): Add -Ignulib.
5648
57c4b50b
PA
56492012-04-19 Pedro Alves <palves@redhat.com>
5650
5651 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
5652 (INCGNU): ... this, and spell out -I here.
5653 (GNULIB_LIB): Rename to ...
5654 (LIBGNU): ... this.
5655 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
5656
1030e047
PA
56572012-04-19 Pedro Alves <palves@redhat.com>
5658
5659 * config.in: Regenerate.
5660
447d4319
PA
56612012-04-19 Pedro Alves <palves@redhat.com>
5662
5663 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
5664 * server.h (memmem): Remove declaration.
5665 * config.in: Regenerate.
5666 * configure: Regenerate.
5667
aad9eab9
YQ
56682012-04-19 Yao Qi <yao@codesourcery.com>
5669
5670 * Makefile.in (SFILES): Add common/vec.c.
5671 (OBS): Add vec.o.
5672 (vec.o): New rule.
5673
3e10640f
YQ
56742012-04-19 Yao Qi <yao@codesourcery.com>
5675
5676 * remote-utils.c (prepare_resume_reply): Replace with macro
5677 target_core_of_thread.
5678 * server.c (handle_qxfer_threads_proper): Likewise.
5679 * target.h (traget_core_of_thread): New macro.
5680
71622373
PA
56812012-04-18 Pedro Alves <palves@redhat.com>
5682
5683 * aclocal.m4: Regenerate.
5684 * configure: Regenerate.
5685
80d26939
YQ
56862012-04-16 Yao Qi <yao@codesourcery.com>
5687
5688 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
5689 duplicated on address.
5690
42476b70
YQ
56912012-04-16 Yao Qi <yao@codesourcery.com>
5692
5693 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
5694 (struct tracepoint_action_ops) <send>: New field.
5695 (m_tracepoint_action_send, r_tracepoint_action_send): New.
5696 (agent_expr_send, x_tracepoint_action_send): New.
5697 (l_tracepoint_action_send): New.
5698 (cmd_qtdp): Download and install tracepoint
5699 according to `use_agent'.
5700 (run_inferior_command): Add one more parameter `len'.
5701 Update callers.
5702 (tracepoint_send_agent): New.
5703 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
5704
7bc83639
YQ
57052012-04-16 Yao Qi <yao@codesourcery.com>
5706
5707 * tracepoint.c (download_tracepoints): Moved to ...
5708 (cmd_qtstart): ... here.
5709
5f18041e
YQ
57102012-04-14 Yao Qi <yao@codesourcery.com>
5711
5712 * tracepoint.c: Include inttypes.h.
5713 (struct collect_memory_action): Use sized types.
5714 (struct tracepoint): Likewise.
5715 (cmd_qtdp, stop_tracing): Update print specifiers.
5716 (cmd_qtp, response_tracepoint): Likewise.
5717 (collect_data_at_tracepoint): Likewise.
5718 (collect_data_at_step): Likewise.
5719
55a8c076
YQ
57202012-04-14 Yao Qi <yao@codesourcery.com>
5721
5722 Import gnulib module inttypes.
5723 * aclocal.m4, config.in, configure: Regenerated.
5724
dc750257
YQ
57252012-04-14 Yao Qi <yao@codesourcery.com>
5726
5727 * Makefile.in (maintainer-clean, realclean, distclean): Remove
5728 Makefile and config.status at last.
5729
0ab5faf9
YQ
57302012-04-13 Yao Qi <yao@codesourcery.com>
5731
5732 * tracepoint.c: Include stdint.h unconditionally.
5733
18f5fd81
TJB
57342012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5735
5736 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
5737 on BFD_HAVE_SYS_PROCFS_TYPE.
5738 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
5739 * configure: Regenerate.
5740 * config.in: Likewise.
5741
4d47af5c
L
57422012-04-13 H.J. Lu <hongjiu.lu@intel.com>
5743
5744 * Makefile.in (clean): Also remove x32.c x32-linux.c
5745 x32-avx.c x32-avx-linux.c.
5746 (x32.o): New target.
5747 (x32.c): Likewise.
5748 (x32-linux.o): Likewise.
5749 (x32-linux.c): Likewise.
5750 (x32-avx.o): Likewise.
5751 (x32-avx.c): Likewise.
5752 (x32-avx-linux.o): Likewise.
5753 (x32-avx-linux.c): Likewise.
5754
5755 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
5756 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
5757 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
5758 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
5759 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
5760 i386/x32-avx-linux.xml.
5761
5762 * linux-x86-low.c (init_registers_x32_linux): New prototype.
5763 (init_registers_x32_avx_linux): Likwise.
5764 (x86_linux_update_xmltarget): Call init_registers_x32_linux
5765 or init_registers_x32_avx_linux if linux_is_elf64 is false.
5766
ecedbe58
PA
57672012-04-13 Pedro Alves <palves@redhat.com>
5768
5769 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
5770 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
5771 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
5772 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
5773 the sub-make.
5774
c92b5177
L
57752012-04-12 H.J. Lu <hongjiu.lu@intel.com>
5776
5777 * linux-x86-low.c (compat_x32_clock_t): New.
5778 (compat_x32_siginfo_t): Likewise.
5779 (compat_x32_siginfo_from_siginfo): Likewise.
5780 (siginfo_from_compat_x32_siginfo): Likewise.
5781 (linux_is_elf64): Likewise.
5782 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
5783 and siginfo_from_compat_x32_siginfo for x32.
5784 (x86_arch_setup): Set linux_is_elf64.
5785
214d508e
L
57862012-04-12 H.J. Lu <hongjiu.lu@intel.com>
5787
5788 PR gdb/13969
5789 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
5790 e_machine field.
5791 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
5792 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
5793 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
5794 compatible with process.
5795
c9a1864a
YQ
57962012-04-12 Yao Qi <yao@codesourcery.com>
5797
5798 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
5799 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
5800 (install-only, install-info, clean): Handle sub dir gnulib.
5801 (all-lib, am--refresh): New targets.
5802 (memmem.o): Remove target.
5803 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
5804 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
5805 (AC_REPLACE_FUNCS): Remove memmem.
5806 Invoke gl_INIT and AM_INIT_AUTOMAKE.
5807 (AC_OUTPUT): Generate Makefile in gnulib/.
5808 * aclocal.m4, config.in, configure: Regenerated.
5809
367ba2c2
MR
58102012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
5811
5812 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
5813
9d236627
PA
58142012-04-05 Pedro Alves <palves@redhat.com>
5815
5816 -Werror=strict-aliasing
5817
5818 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
5819 pointer.
5820
111217b3
PA
58212012-04-04 Pedro Alves <palves@redhat.com>
5822
5823 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
5824 (sparc_store_gregset_from_stack, sparc_store_gregset)
5825 (sparc_breakpoint_at): Fix formatting.
5826
8365dcf5
TJB
58272012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5828
5829 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
5830 are available.
5831 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
5832 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
5833 * config.in: Regenerate.
5834 * configure: Likewise.
5835
689cc2ae
PA
58362012-03-29 Pedro Alves <palves@redhat.com>
5837
5838 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
5839 Correct ptrace arguments.
5840
c14dfd32
PA
58412012-03-28 Pedro Alves <palves@redhat.com>
5842
5843 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
5844 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
5845 (IA64_FR1_REGNUM): New defines.
5846 (ia64_fetch_register): New.
5847 (the_low_target): Install it.
5848 * linux-low.h (struct linux_target_ops) <fetch_register>: New
5849 field.
5850 * linux-low.c (linux_fetch_registers): Try the
5851 the_low_target.fetch_register hook first.
5852
5853 * linux-arm-low.c (the_low_target): Adjust.
5854 * linux-bfin-low.c (the_low_target): Adjust.
5855 * linux-cris-low.c (the_low_target): Adjust.
5856 * linux-crisv32-low.c (the_low_target): Adjust.
5857 * linux-m32r-low.c (the_low_target): Adjust.
5858 * linux-m68k-low.c (the_low_target): Adjust.
5859 * linux-mips-low.c (the_low_target): Adjust.
5860 * linux-ppc-low.c (the_low_target): Adjust.
5861 * linux-s390-low.c (the_low_target): Adjust.
5862 * linux-sh-low.c (the_low_target): Adjust.
5863 * linux-sparc-low.c (the_low_target): Adjust.
5864 * linux-tic6x-low.c (the_low_target): Adjust.
5865 * linux-x86-low.c (the_low_target): Adjust.
5866 * linux-xtensa-low.c (the_low_target): Adjust.
5867
63c88e13
PA
58682012-03-26 Pedro Alves <palves@redhat.com>
5869
5870 * server.c (handle_qxfer_libraries): Don't bail early if
5871 the_target->qxfer_libraries_svr4 is not NULL.
5872
fb723180
PA
58732012-03-26 Pedro Alves <palves@redhat.com>
5874
5875 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
5876
0afae3cf
PA
58772012-03-23 Pedro Alves <palves@redhat.com>
5878
5879 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
5880 "library-list-svr4" element's start tag when the the DSO list is
5881 empty.
5882
485f1ee4
PA
58832012-03-23 Pedro Alves <palves@redhat.com>
5884
5885 * linux-low.c (read_one_ptr): Read the inferior's pointer through
5886 a variable whose type size is the same as the inferior's pointer
5887 size.
5888
a5362b9a
TS
58892012-03-21 Thomas Schwinge <thomas@codesourcery.com>
5890
5891 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
5892 struct siginfo.
5893 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
5894 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
5895 * linux-low.h: Include <signal.h>.
5896 (struct siginfo): Remove forward declaration.
5897 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
5898 struct siginfo.
5899
d226c142
MF
59002012-03-21 Mike Frysinger <vapier@gentoo.org>
5901
5902 * .gitignore: Ignore more files.
5903
122f36ef
PA
59042012-03-19 Pedro Alves <palves@redhat.com>
5905 Jan Kratochvil <jan.kratochvil@redhat.com>
5906
5907 * server.c (cont_thread, general_thread): Add describing comments.
5908 (start_inferior): Clear `cont_thread'.
5909 (handle_v_cont): Don't set `cont_thread' if resuming all threads
5910 of a process.
5911
fc3e5175
YQ
59122012-03-15 Yao Qi <yao@codesourcery.com>
5913
5914 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
5915 handling to ...
5916 (cmd_qtdp): ... here.
5917
8d0d92cd
YQ
59182012-03-15 Yao Qi <yao@codesourcery.com>
5919
5920 * tracepoint.c (struct tracepoint_action_ops): New.
5921 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
5922 (m_tracepoint_action_download): New.
5923 (r_tracepoint_action_download): New.
5924 (x_tracepoint_action_download): New.
5925 (l_tracepoint_action_download): New.
5926 (add_tracepoint_action): Install `action->ops' according type.
5927 (download_tracepoint_1): Move code `download' function pointer
5928 of various tracepoint_action_ops.
5929
87b0bb13
JK
59302012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
5931
5932 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
5933 linux_ptrace_attach_warnings.
5934
5f572dec
JK
59352012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
5936
5937 * Makefile.in (linux-ptrace.o): New.
5938 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
5939 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
5940 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
5941 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
5942 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
5943 of these targets.
5944 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
5945
f4647387
YQ
59462012-03-08 Yao Qi <yao@codesourcery.com>
5947 Pedro Alves <palves@redhat.com>
5948
5949 Fix PR server/13392.
5950 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
5951 offset of JMP insn.
5952 * tracepoint.c (remove_tracepoint): New.
5953 (cmd_qtdp): Call remove_tracepoint when failed to install.
5954
9b224c5e
PA
59552012-03-07 Pedro Alves <palves@redhat.com>
5956
5957 * linux-low.c (get_detach_signal): New.
5958 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
5959 Pass on pending signals to PTRACE_DETACH. Check the result of the
5960 ptrace call.
5961 * server.c (program_signals, program_signals_p): New.
5962 (handle_general_set): Handle QProgramSignals.
5963 * server.h (program_signals, program_signals_p): Declare.
5964
e237a7e2
JK
59652012-03-05 Pedro Alves <palves@redhat.com>
5966 Jan Kratochvil <jan.kratochvil@redhat.com>
5967
5968 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
5969 New comment why.
5970
5808517f
YQ
59712012-03-03 Yao Qi <yao@codesourcery.com>
5972
5973 * tracepoint.c (tracepoint_look_up_symbols): Update call to
5974 agent_look_up_symbols.
5975
58b4daa5
YQ
59762012-03-03 Yao Qi <yao@codesourcery.com>
5977
5978 * Makefile.in (linux-low.o): Keep dependence on agent.h.
5979 (linux-x86-low.o): Likewise.
5980 * server.h: Remove in_process_agent_loaded.
5981 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
5982 common/agent.c.
5983 Update callers.
5984
8ffcbaaf
YQ
59852012-03-03 Yao Qi <yao@codesourcery.com>
5986
5987 * tracepoint.c (gdb_agent_capability): New global.
5988 (in_process_agent_loaded_ust): Renamed to
5989 `in_process_agent_supports_ust'.
5990 Update callers.
5991 (in_process_agent_supports_ust): Call agent_capability_check.
5992 (clear_installed_tracepoints): Assert that agent supports
5993 agent.
5994
d1feda86
YQ
59952012-03-03 Yao Qi <yao@codesourcery.com>
5996
5997 * linux-low.c (linux_supports_agent): New.
5998 (linux_target_ops): Initialize field `supports_agent' with
5999 linux_supports_agent.
6000 * target.h (struct target_ops) <supports_agent>: New.
6001 (target_supports_agent): New macro.
6002 * server.c (handle_general_set): Handle packet 'QAgent'.
6003 (handle_query): Send `QAgent+'.
6004 * Makefile.in (server.o): Depends on agent.h.
6005
2fa291ac
YQ
60062012-03-03 Yao Qi <yao@codesourcery.com>
6007
6008 * Makefile.in (OBS): Add agent.o.
6009 Add new rule for agent.o.
6010 Track dependence of tracepoint.c on agent.h.
6011 * tracepoint.c (run_inferior_command_1):
6012 (run_inferior_command): Call agent_run_command.
6013 (gdb_ust_connect_sync_socket): Deleted. Move it to
6014 common/agent.c.
6015 (resume_thread, stop_thread): Likewise.
6016 (gdb_ust_socket_init): Renamed to ...
6017 (gdb_agent_socket_init): ... New.
6018 (gdb_ust_thread): Renamed to ...
6019 (gdb_agent_helper_thread): ... New.
6020 (gdb_ust_init): Move some code to ...
6021 (gdb_agent_init): ... here. New.
6022 [HAVE_UST]: Call gdb_ust_init.
6023 (initialize_tracepoint_ftlib): Call gdb_agent_init.
6024 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
6025 * config.in, configure: Regenerated.
6026
05044653
PA
60272012-03-02 Pedro Alves <palves@redhat.com>
6028
6029 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
6030 * linux-low.c (struct simple_pid_list): New.
6031 (stopped_pids): New a struct simple_pid_list pointer.
6032 (add_to_pid_list, pull_pid_from_list): New.
6033 (handle_extended_wait): Don't assume the first signal new children
6034 report is SIGSTOP. Adjust call to pull_pid_from_list.
6035 (linux_wait_for_lwp): Adjust.
6036
8d00225b
YQ
60372012-03-02 Yao Qi <yao@codesourcery.com>
6038
6039 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
6040 debug log.
6041
19560ba5
YQ
60422012-03-02 Yao Qi <yao@codesourcery.com>
6043
6044 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
6045 `stop_pc' and `tpoint'. Update caller.
6046
1faeff08
MR
60472012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
6048
6049 * linux-low.h (linux_target_ops): Add regset_bitmap member.
6050 * linux-low.c (use_linux_regsets): New macro.
6051 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
6052 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
6053 (linux_register_in_regsets): New function.
6054 (usr_fetch_inferior_registers): Skip registers covered by
6055 regsets.
6056 (usr_store_inferior_registers): Likewise.
6057 (usr_fetch_inferior_registers): New macro.
6058 (usr_store_inferior_registers): Likewise.
6059 (linux_fetch_registers): Handle mixed regset/non-regset targets.
6060 (linux_store_registers): Likewise.
6061 * linux-mips-low.c (init_registers_mips_dsp_linux): New
6062 prototype.
6063 (init_registers_mips64_dsp_linux): Likewise.
6064 (init_registers_mips_linux): New macro.
6065 (init_registers_mips_dsp_linux): Likewise.
6066 (mips_dsp_num_regs): Likewise.
6067 (DSP_BASE, DSP_CONTROL): New fallback macros.
6068 (mips_base_regs): New macro.
6069 (mips_regmap): Use it. Fix the size.
6070 (mips_dsp_regmap): New variable.
6071 (mips_dsp_regset_bitmap): Likewise.
6072 (mips_arch_setup): New function.
6073 (mips_cannot_fetch_register): Use the_low_target.regmap rather
6074 than mips_regmap.
6075 (mips_cannot_store_register): Likewise.
6076 (the_low_target): Update .arch_setup, .num_regs and .regmap
6077 initializers. Add .regset_bitmap initializer.
6078 * linux-arm-low.c (the_low_target): Add .regset_bitmap
6079 initializer.
6080 * linux-bfin-low.c (the_low_target): Likewise.
6081 * linux-cris-low.c (the_low_target): Likewise.
6082 * linux-crisv32-low.c (the_low_target): Likewise.
6083 * linux-ia64-low.c (the_low_target): Likewise.
6084 * linux-m32r-low.c (the_low_target): Likewise.
6085 * linux-m68k-low.c (the_low_target): Likewise.
6086 * linux-ppc-low.c (the_low_target): Likewise.
6087 * linux-s390-low.c (the_low_target): Likewise.
6088 * linux-sh-low.c (the_low_target): Likewise.
6089 * linux-sparc-low.c (the_low_target): Likewise.
6090 * linux-tic6x-low.c (the_low_target): Likewise.
6091 * linux-x86-low.c (the_low_target): Likewise.
6092 * linux-xtensa-low.c (the_low_target): Likewise.
6093 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
6094 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
6095 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
6096 srv_xmlfiles.
6097 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
6098 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
6099
c03e6ccc
YQ
61002012-02-29 Yao Qi <yao@codesourcery.com>
6101 Pedro Alves <palves@redhat.com>
6102
6103 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
6104 `step_over_finished' is true.
6105
644cebc9
PA
61062012-02-27 Pedro Alves <palves@redhat.com>
6107
6108 * linux-low.c (pid_is_stopped): Delete, moved to common/.
6109 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
6110
c14d7ab2
PA
61112012-02-27 Pedro Alves <palves@redhat.com>
6112
6113 PR server/9684
6114 * linux-low.c (pid_is_stopped): New.
6115 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
6116
412c89dd
LM
61172012-02-25 Luis Machado <lgustavo@codesourcery.com>
6118
6119 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
6120 of conditions.
6121
b745defe
MR
61222012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
6123
6124 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
6125
9f3a5c85
LM
61262012-02-24 Luis Machado <lgustavo@codesourcery>
6127
6128 * server.c (handle_query): Advertise support for target-side
6129 breakpoint condition evaluation.
6130 (process_point_options): New function.
6131 (process_serial_event): When inserting a breakpoint, check for
6132 a target-side condition that should be evaluated.
6133
6134 * mem-break.c: Include regcache.h and ax.h.
6135 (point_cond_list_t): New data structure.
6136 (breakpoint) <cond_list>: New field.
6137 (find_gdb_breakpoint_at): Make non-static.
6138 (delete_gdb_breakpoint_at): Clear any target-side
6139 conditions.
6140 (clear_gdb_breakpoint_conditions): New function.
6141 (add_condition_to_breakpoint): Likewise.
6142 (add_breakpoint_condition): Likewise.
6143 (gdb_condition_true_at_breakpoint): Likewise.
6144 (gdb_breakpoint_here): Return result directly instead
6145 of going through a local variable.
6146
6147 * mem-break.h (find_gdb_breakpoint_at): New prototype.
6148 (clear_gdb_breakpoint_conditions): Likewise.
6149 (add_breakpoint_condition): Likewise.
6150 (gdb_condition_true_at_breakpoint): Likewise.
6151
6152 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
6153 (need_step_over_p): Take target-side breakpoint condition into
6154 consideration.
6155
5e1dc496
LM
61562012-02-24 Luis Machado <lgustavo@codesourcery>
6157
6158 * server.h: Include tracepoint.h.
6159 (agent_mem_read, agent_get_trace_state_variable_value,
6160 agent_set_trace_state_variable_value,
6161 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
6162 get_set_tsv_func_addr): New prototypes.
6163
6164 * ax.h: New include file.
6165 * ax.c: New source file.
6166
6167 * tracepoint.c: Include ax.h.
6168 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
6169 agent_expr, eval_result_type): Move to ax.h.
6170 (parse_agent_expr): Rename to ...
6171 (gdb_parse_agent_expr): ... this, make it non-static and move
6172 to ax.h.
6173 (unparse_agent_expr) Rename to ...
6174 (gdb_unparse_agent_expr): ... this, make it non-static and move
6175 to ax.h.
6176 (eval_agent_expr): Rename to ...
6177 (eval_tracepoint_agent_expr): ... this.
6178 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
6179 forward declarations.
6180 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
6181 (agent_get_trace_state_variable_value): New function.
6182 (agent_set_trace_state_variable_value): New function.
6183 (cmd_qtdp): Call gdb_parse_agent_expr (...).
6184 (response_tracepoint): Call gdb_unparse_agent_expr (...).
6185 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
6186 (condition_true_at_tracepoint): Likewise.
6187 (parse_agent_expr): Rename to ...
6188 (gdb_parse_agent_expr): ... this and move to ax.c.
6189 (unparse_agent_expr): Rename to ...
6190 (gdb_unparse_agent_expr): ... this and move to ax.c.
6191 (gdb_agent_op_name): Move to ax.c.
6192 (eval_agent_expr): Rename to ...
6193 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
6194 and move to ax.c.
6195 (eval_tracepoint_agent_expr): New function.
6196 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 6197 non-static.
5e1dc496
LM
6198 (current_insn_ptr, emit_error, struct bytecode_address): Move to
6199 ax.c.
6200 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
6201 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
6202 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
6203 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
6204 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
6205 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
6206 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
6207 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
6208 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
6209 (compile_bytecodes): Remove forward declaration.
6210 (is_goto_target): Move to ax.c.
6211 (compile_bytecodes): Move to ax.c and call
6212 agent_get_trace_state_variable_value (...) and
6213 agent_set_trace_state_variable_value (...).
6214
6215 * Makefile.in: Update ax.c and IPA dependencies.
6216
277e4e52
PA
62172012-02-24 Pedro Alves <palves@redhat.com>
6218
6219 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
6220 (cmd_bigqtbuffer_circular): ... this. Only handle
6221 'QTBuffer:circular:'.
6222 (handle_tracepoint_general_set): Adjust.
6223
bf4c19f7
YQ
62242012-02-16 Yao Qi <yao@codesourcery.com>
6225
6226 * inferiors.c: Move code to ...
6227 * dll.c: .... here. New.
6228 * server.h: Declare clear_dlls.
6229 * Makefile.in (SFILES): Add dll.c.
6230 (OBS): Add dll.o
6231 (dll.o): New rule.
6232
d73f2619
YQ
62332012-02-11 Yao Qi <yao@codesourcery.com>
6234
6235 * server.c: (handle_monitor_command): Add a new parameter
6236 `own_buf'.
6237 (handle_query): Update caller.
6238
f8255c2a
JB
62392012-02-09 Joel Brobecker <brobecker@adacore.com>
6240
6241 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
6242 * configure, config.in: Regenerate.
6243 * hostio.c: Provide an alternate implementation if HAVE_READLINK
6244 is not defined.
6245
da84f473
PA
62462012-02-02 Pedro Alves <palves@redhat.com>
6247
6248 Try SIGKILL first, then PTRACE_KILL.
6249 * linux-low.c (linux_kill_one_lwp): New.
6250 (linux_kill_one_lwp): Rename to ...
6251 (kill_one_lwp_callback): ... this. Use the new
6252 linux_kill_one_lwp.
6253
e886a173
PA
62542012-02-02 Pedro Alves <palves@redhat.com>
6255
6256 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
6257 inferior.
6258
be07f1a2
PA
62592012-01-27 Pedro Alves <palves@redhat.com>
6260
6261 * linux-low.c (linux_child_pid_to_exec_file): Delete.
6262 (elf_64_file_p): Make static.
6263 (linux_pid_exe_is_elf_64_file): New.
6264 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
6265 Delete declarations.
6266 (linux_pid_exe_is_elf_64_file): Declare.
6267 * linux-x86-low.c (x86_arch_setup): Use
6268 linux_pid_exe_is_elf_64_file.
6269
d8301ad1
JK
62702012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
6271
6272 * linux-low.c (linux_wait_for_event_1): Rename to ...
6273 (linux_wait_for_event): ... here and merge it with former
6274 linux_wait_for_event - new variable wait_ptid, use it.
6275 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
6276
01b17894
PA
62772012-01-23 Pedro Alves <palves@redhat.com>
6278
6279 * server.c (main): Avoid yet another case of infinite loop while
6280 detaching/killing after a longjmp.
6281
e825046f
JK
62822012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
6283
6284 Code cleanup.
6285 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
6286
b9e7b9c3
UW
62872012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
6288
6289 * hostio.c (handle_readlink): New function.
6290 (handle_vFile): Call it to handle "vFile:readlink" packets.
6291
901f9912
UW
62922012-01-20 Pedro Alves <palves@redhat.com>
6293 Ulrich Weigand <ulrich.weigand@linaro.org>
6294
6295 * server.c (handle_v_requests): Only support vAttach and vRun to
6296 start multiple processes when in extended protocol mode.
6297
fc1ab1a0
PA
62982012-01-17 Pedro Alves <palves@redhat.com>
6299
6300 * tracepoint.c (initialize_tracepoint): Use mmap instead of
6301 memalign plus mprotect to allocate the scratch buffer.
6302
7d5d4e98
PA
63032012-01-13 Pedro Alves <palves@redhat.com>
6304
6305 * server.c (attach_inferior): Clear `cont_thread'.
6306
f128d5e9
PA
63072012-01-13 Pedro Alves <palves@redhat.com>
6308
6309 * server.c (main): Avoid infinite loop while detaching/killing
6310 after a longjmp.
6311
06db92f0
DE
63122012-01-09 Doug Evans <dje@google.com>
6313
6314 * server.c (start_inferior): Set last_ptid in --wrapper case.
6315
32d92999
YQ
63162012-01-06 Yao Qi <yao@codesourcery.com>
6317
6318 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
6319 defined.
6320 [IN_PROCESS_AGENT] (debug_agent): New global variable.
6321
5e0a92a9
YQ
63222012-01-04 Yao Qi <yao@codesourcery.com>
6323
6324 * tracepoint.c (cmd_qtdp): Print debug message
6325 for static tracepoint.
6326
ae639e8c
YQ
63272012-01-04 Yao Qi <yao@codesourcery.com>
6328
6329 * tracepoint.c (trace_vdebug): Differentiate debug message
6330 between gdbserver and IPA.
6331
f72429c5
YQ
63322012-01-03 Yao Qi <yao@codesourcery.com>
6333
6334 * tracepoint.c (tracepoint_was_hit): Don't collect for
6335 static tracepoint.
6336
12c3e59c
JB
63372012-01-02 Joel Brobecker <brobecker@adacore.com>
6338
6339 * terminal.h: Reformat copyright header.
6340
67827812
JB
63412012-01-02 Joel Brobecker <brobecker@adacore.com>
6342
6343 * server.c (gdbserver_version): Update copyright year.
6344 * gdbreplay.c (gdbreplay_version): Likewise.
6345
3e52c33d
JK
63462011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
6347
6348 * linux-low.c (linux_create_inferior): Put empty if clause for write.
6349
6350 Revert:
6351 2011-12-18 Hui Zhu <teawater@gmail.com>
6352 * linux-low.c (linux_create_inferior): Save return value to ret.
6353
66f1260e
HZ
63542011-12-18 Hui Zhu <teawater@gmail.com>
6355
6356 * linux-low.c (linux_create_inferior): Save return value to ret.
6357
e77616d7
DE
63582011-12-16 Doug Evans <dje@google.com>
6359
e7b06c57
DE
6360 * linux-low.c (linux_create_inferior): If stdio connection,
6361 redirect stdin from /dev/null, stdout to stderr.
6362 * remote-utils.c (remote_is_stdio): New static global.
6363 (remote_connection_is_stdio): New function.
6364 (remote_prepare): Handle stdio connection.
6365 (remote_open): Ditto.
6366 (remote_close): Don't close stdin for stdio connections.
6367 (read_prim,write_prim): New functions. Replace all calls to
6368 read/write to these.
6369 * server.c (main): Watch for "-" argument. Move call to
6370 remote_prepare before start_inferior.
6371 * server.h (STDIO_CONNECTION_NAME): New macro.
6372 (remote_connection_is_stdio): Declare.
6373
e77616d7
DE
6374 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
6375 in debugging output.
6376
82067193
YQ
63772011-12-15 Yao Qi <yao@codesourcery.com>
6378
6379 * tracepoint.c: Include sys/syscall.h.
6380 (gdb_ust_thread): Remove preprocessor conditional.
6381
82bfbe7e
PA
63822011-12-14 Pedro Alves <pedro@codesourcery.com>
6383
6384 * linux-low.c (linux_detach_one_lwp): Call
6385 the_low_target.prepare_to_resume before detaching.
6386
712c6575
YQ
63872011-12-14 Yao Qi <yao@codesourcery.com>
6388
6389 * tracepoint.c (gdb_ust_thread): Don't ignore return value
6390 of write.
6391
d54d1edf
YQ
63922011-12-14 Yao Qi <yao@codesourcery.com>
6393
6394 * i386-low.c (i386_low_stopped_data_address): Initialize local
6395 variable `control'.
6396
6210a125
PA
63972011-12-13 Pedro Alves <pedro@codesourcery.com>
6398
6399 PR remote/13492
6400
6401 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
6402 DR_CONTROL unless necessary. Extend comments.
6403 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
6404 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
6405
2ece8244
YQ
64062011-12-13 Yao Qi <yao@codesourcery.com>
6407
6408 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
6409 macros.
6410 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
6411
784867a5
JK
64122011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
6413
6414 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
6415 Print new debug message for such case.
6416
6bf36717
JK
64172011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
6418
6419 Fix overlapping memcpy.
6420 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
6421 the read_inferior_memory transfer.
6422 (delete_fast_tracepoint_jump): New variable buf. Use it for the
6423 write_inferior_memory transfer.
6424 (set_fast_tracepoint_jump): New variable buf. Use it for the
6425 read_inferior_memory and write_inferior_memory transfers.
6426 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
6427 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
6428 Use it for the write_inferior_memory transfer.
6429 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
6430 buffers.
6431
50275556
MR
64322011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
6433
6434 * linux-low.c (fetch_register, store_register): Make code
6435 consistent, fix formatting.
6436
7325beb4
MR
64372011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
6438
6439 * linux-low.c (usr_store_inferior_registers): Factor out code
6440 to handle individual registers into...
6441 (store_register): ... this new function.
6442
c642a434
UW
64432011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
6444
6445 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
6446 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
6447 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
6448 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
6449 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
6450 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
6451 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
6452 (srv_xmlfiles): Add new XML files.
6453
6454 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
6455 and <sys/uio.h>.
6456 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
6457 (init_registers_s390_linux32v1): Add prototype.
6458 (init_registers_s390_linux32v2): Likewise.
6459 (init_registers_s390_linux64v1): Likewise.
6460 (init_registers_s390_linux64v2): Likewise.
6461 (init_registers_s390x_linux64v1): Likewise.
6462 (init_registers_s390x_linux64v2): Likewise.
6463 (s390_num_regs): Increment to 52.
6464 (s390_regmap): Add orig_r2 register.
6465 (s390_num_regs_3264): Increment to 68.
6466 (s390_regmap_3264): Add orig_r2 register.
6467 (s390_collect_ptrace_register): Handle orig_r2 register.
6468 (s390_supply_ptrace_register): Likewise.
6469 (s390_fill_last_break): New function.
6470 (s390_store_last_break): Likewise.
6471 (s390_fill_system_call): New function.
6472 (s390_store_system_call): Likewise.
6473 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
6474 register sets.
6475 (s390_check_regset): New function.
6476 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
6477 NT_S390_SYSTEM_CALL regsets and use appropriate description.
6478 Update target_regsets for available register sets.
6479
2268b414
JK
64802011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
6481 Jan Kratochvil <jan.kratochvil@redhat.com>
6482
6483 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
6484 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
6485 New.
6486 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
6487 * linux-low.h (struct process_info_private): New member r_debug.
6488 * server.c (handle_qxfer_libraries): Call
6489 the_target->qxfer_libraries_svr4.
6490 (handle_qxfer_libraries_svr4): New function.
6491 (qxfer_packets): New entry "libraries-svr4".
6492 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
6493 * target.h (struct target_ops): New member qxfer_libraries_svr4.
6494 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
6495 PACKET_qXfer_libraries_svr4.
6496
d6db1fab
UW
64972011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
6498
6499 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
6500 PSW address/mask between 8-byte and 16-byte formats.
6501 (s390_supply_ptrace_register): Likewise.
6502 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
6503 basic addressing mode bit.
6504
242f5f1c
SS
65052011-11-24 Stan Shebs <stan@codesourcery.com>
6506
6507 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
6508
f196051f
SS
65092011-11-17 Stan Shebs <stan@codesourcery.com>
6510
6511 * tracepoint.c (struct tracepoint): New field traceframe_usage.
6512 (tracing_start_time): New global.
6513 (tracing_stop_time): New global.
6514 (tracing_user_name): New global.
6515 (tracing_notes): New global.
6516 (tracing_stop_note): New global.
6517 (cmd_qtstart): Set traceframe_usage, start_time.
6518 (stop_tracing): Set stop_time.
6519 (cmd_qtstatus): Report additional status.
6520 (cmd_qtp): New function.
6521 (handle_tracepoint_query): Call it.
6522 (cmd_qtnotes): New function.
6523 (handle_tracepoint_general_set): Call it.
6524 (get_timestamp): Rename from tsv_get_timestamp.
6525
405f8e94
SS
65262011-11-14 Stan Shebs <stan@codesourcery.com>
6527 Kwok Cheung Yeung <kcy@codesourcery.com>
6528
6529 * linux-x86-low.c (small_jump_insn): New.
6530 (i386_install_fast_tracepoint_jump_pad): Add arguments for
6531 trampoline and error message, build a trampoline and issue a small
6532 jump instruction to it.
6533 (x86_install_fast_tracepoint_jump_pad): Add arguments for
6534 trampoline and error message.
6535 (x86_get_min_fast_tracepoint_insn_len): New.
6536 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
6537 * linux-low.h (struct linux_target_ops): Add arguments to
6538 install_fast_tracepoint_jump_pad operation, add new operation.
6539 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
6540 arguments.
6541 (linux_get_min_fast_tracepoint_insn_len): New function.
6542 (linux_target_op): Add new operation.
6543 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
6544 (gdb_trampoline_buffer_end): Ditto.
6545 (gdb_trampoline_buffer_error): Ditto.
6546 (struct ipa_sym_addresses): Add fields for new IPA variables.
6547 (symbol_list): Add entries for new IPA variables.
6548 (struct tracepoint): Add fields to hold the address range of the
6549 trampoline used by the tracepoint.
6550 (trampoline_buffer_head): New static variable.
6551 (trampoline_buffer_tail): Ditto.
6552 (claim_trampoline_space): New function.
6553 (have_fast_tracepoint_trampoline_buffer): New function.
6554 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
6555 structure.
6556 (install_fast_tracepoint): Ditto, also add error buffer argument.
6557 (cmd_qtminftpilen): New function.
6558 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
6559 (fast_tracepoint_from_trampoline_address): New function.
6560 (fast_tracepoint_collecting): Handle trampoline as part of jump
6561 pad space.
6562 (set_trampoline_buffer_space): New function.
6563 (initialize_tracepoint): Initialize new IPA variables.
6564 * target.h (struct target_ops): Add arguments to
6565 install_fast_tracepoint_jump_pad operation, add new
6566 get_min_fast_tracepoint_insn_len operation.
6567 (target_get_min_fast_tracepoint_insn_len): New.
6568 (install_fast_tracepoint_jump_pad): Add arguments.
6569 * server.h (IPA_BUFSIZ): Define.
6570 * linux-i386-ipa.c: Include extra header files.
6571 (initialize_fast_tracepoint_trampoline_buffer): New function.
6572 (initialize_low_tracepoint): Call it.
6573 * server.h (set_trampoline_buffer_space): Declare.
6574 (claim_trampoline_space): Ditto.
6575 (have_fast_tracepoint_trampoline_buffer): Ditto.
6576
1e4d1764
YQ
65772011-11-14 Yao Qi <yao@codesourcery.com>
6578
6579 * server.c (handle_query): Handle InstallInTrace for qSupported.
6580 * tracepoint.c (add_tracepoint): Sort list.
6581 (install_tracepoint, download_tracepoint): New.
6582 (cmd_qtdp): Call them to install and download tracepoints.
6583 (sort_tracepoints): Removed.
6584 (cmd_qtstart): Update.
6585
5c73ff4e
YQ
65862011-11-14 Yao Qi <yao@codesourcery.com>
6587
6588 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
6589 * mem-break.h: Declare.
6590 * tracepoint.c (cmd_qtstart): Move some code to ...
6591 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
6592 New.
6593 (download_tracepoints): Move some code to ...
6594 (download_tracepoint_1): ... here. New.
6595
86a30030
YQ
65962011-11-08 Yao Qi <yao@codesourcery.com>
6597
6598 * remote-utils.c (relocate_instruction): A comment fix.
6599
8d26e50c
JB
66002011-11-07 Joel Brobecker <brobecker@adacore.com>
6601
6602 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
6603 (i386_dr_low_get_control, i386_dr_low_get_status): Use
6604 dr_status_mirror and dr_control_mirror from debug_reg_state.
6605 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
6606 (i386_initial_stuff): Remove use of deleted globals.
6607 (i386_get_thread_context, i386_set_thread_context,
6608 i386_thread_added): Use dr_status_mirror and dr_control_mirror
6609 from debug_reg_state.
6610
a59306a3
YQ
66112011-11-05 Yao Qi <yao@codesourcery.com>
6612
6613 * tracepoint.c (gdb_collect): Loop over tracepoints of same
6614 address as TPOINT's.
6615
3065dfb6
SS
66162011-11-02 Stan Shebs <stan@codesourcery.com>
6617
6618 * tracepoint.c (agent_mem_read_string): New function.
6619 (eval_agent_expr): Call it for tracenz.
6620 * server.c (handle_query): Report support for tracenz.
6621
fd0d8c7c
YQ
66222011-11-02 Yao Qi <yao@codesourcery.com>
6623
6624 * tracepoint.c (cmd_qtstart): Remove unused local variables.
6625
609086b1
YQ
66262011-11-02 Yao Qi <yao@codesourcery.com>
6627
6628 * target.h: Fix a typo in comment.
6629
b9fd1791
PA
66302011-10-31 Pedro Alves <pedro@codesourcery.com>
6631
6632 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
6633 clobber the breakpoints' shadows with fast tracepoint jumps.
6634 * mem-break.h (check_mem_write): Add `myaddr' parameter.
6635 * target.c (write_inferior_memory): Also pass MYADDR down to
6636 check_mem_write.
6637
03583c20
UW
66382011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
6639
6640 * configure.ac: Check support for personality routine.
6641 * configure: Regenerate.
6642 * config.in: Likewise.
6643 * linux-low.c: Include <sys/personality.h>.
6644 Define ADDR_NO_RANDOMIZE if necessary.
6645 (linux_create_inferior): Disable address space randomization when
6646 forking inferior, if requested.
6647 (linux_supports_disable_randomization): New function.
6648 (linux_target_ops): Install it.
6649 * server.h (disable_randomization): Declare.
6650 * server.c (disable_randomization): New global variable.
6651 (handle_general_set): Handle QDisableRandomization.
6652 (handle_query): Likewise for qSupported.
6653 (main): Support --disable-randomization and --no-disable-randomization
6654 command line arguments.
6655 * target.h (struct target_ops): Add supports_disable_randomization.
6656 (target_supports_disable_randomization): New macro.
6657
723b724b
MF
66582011-09-29 Mike Frysinger <vapier@gentoo.org>
6659
6660 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
6661 ifdef check.
6662 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
6663 [!PT_GETDSBT] (target_loadmap): New definition.
6664 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
6665 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
6666 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
6667 and PT_GETDSBT to LINUX_LOADMAP.
6668 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
6669 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
6670
55329a5c 66712011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
6672
6673 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
6674 (arm_linux_hwbp_cap): New static variable.
6675 (arm_linux_get_hwbp_cap): Replace by ...
6676 (arm_linux_init_hwbp_cap): ... this new function.
6677 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
6678 (arm_linux_get_hw_watchpoint_count): Likewise.
6679 (arm_linux_get_hw_watchpoint_max_length): Likewise.
6680 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
6681 (arm_prepare_to_resume): Use perror_with_name instead of error.
6682
55329a5c 66832011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
6684
6685 * linux-arm-low.c: Include <signal.h>.
6686 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
6687 (struct arm_linux_hwbp_cap): New data type.
6688 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
6689 (struct arm_linux_hw_breakpoint): New data type.
6690 (MAX_BPTS, MAX_WPTS): Define.
6691 (struct arch_process_info, struct arch_lwp_info): New data types.
6692 (arm_linux_get_hwbp_cap): New function.
6693 (arm_linux_get_hw_breakpoint_count): Likewise.
6694 (arm_linux_get_hw_watchpoint_count): Likewise.
6695 (arm_linux_get_hw_watchpoint_max_length): Likewise.
6696 (arm_hwbp_control_initialize): Likewise.
6697 (arm_hwbp_control_is_enabled): Likewise.
6698 (arm_hwbp_control_is_initialized): Likewise.
6699 (arm_hwbp_control_disable): Likewise.
6700 (arm_linux_hw_breakpoint_equal): Likewise.
6701 (arm_linux_hw_point_initialize): Likewise.
6702 (struct update_registers_data): New data structure.
6703 (update_registers_callback: New function.
6704 (arm_insert_point): Likewise.
6705 (arm_remove_point): Likewise.
6706 (arm_stopped_by_watchpoint): Likewise.
6707 (arm_stopped_data_address): Likewise.
6708 (arm_new_process): Likewise.
6709 (arm_new_thread): Likewise.
6710 (arm_prepare_to_resume): Likewise.
6711 (the_low_target): Register arm_insert_point, arm_remove_point,
6712 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
6713 arm_new_thread, and arm_prepare_to_resume.
6714
6b9801d4
SS
67152011-09-15 Stan Shebs <stan@codesourcery.com>
6716
6717 * server.h (struct emit_ops): Add compare-goto fields.
6718 * tracepoint.c (gdb_agent_op_sizes): New table.
6719 (emit_eq_goto): New function.
6720 (emit_ne_goto): New function.
6721 (emit_lt_goto): New function.
6722 (emit_le_goto): New function.
6723 (emit_gt_goto): New function.
6724 (emit_ge_goto): New function.
6725 (is_goto_target): New function.
6726 (compile_bytecodes): Recognize special cases of compare-goto
6727 combinations and call specialized emitters for them.
6728 * linux-x86-low.c (amd64_emit_eq_goto): New function.
6729 (amd64_emit_ne_goto): New function.
6730 (amd64_emit_lt_goto): New function.
6731 (amd64_emit_le_goto): New function.
6732 (amd64_emit_gt_goto): New function.
6733 (amd64_emit_ge_goto): New function.
6734 (amd64_emit_ops): Add the new functions.
6735 (i386_emit_eq_goto): New function.
6736 (i386_emit_ne_goto): New function.
6737 (i386_emit_lt_goto): New function.
6738 (i386_emit_le_goto): New function.
6739 (i386_emit_gt_goto): New function.
6740 (i386_emit_ge_goto): New function.
6741 (i386_emit_ops): Add the new functions.
6742
bf15cbda
SS
67432011-09-08 Stan Shebs <stan@codesourcery.com>
6744
6745 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
6746 (i386_emit_epilogue): Restore %ebx.
6747
943ca1dd
JZ
67482011-08-31 Jie Zhang <jzhang918@gmail.com>
6749
6750 * server.c (step_thread): Remove definition.
6751 (process_serial_event): Don't handle Hs.
6752 * server.h (step_thread): Remove declaration.
6753 * target.c (set_desired_inferior): Remove use of step_thread.
6754
e3deef73
LM
67552011-08-24 Luis Machado <lgustavo@codesourcery.com>
6756
6757 * linux-low.c: Include linux-procfs.h.
6758 (linux_attach_lwp_1): Update comments.
6759 (linux_attach): Scan for existing threads when attaching to a
6760 process that is the tgid.
6761 * Makefile.in: Update dependencies.
6762
13da1c97
LM
67632011-08-24 Luis Machado <lgustavo@codesourcery.com>
6764
6765 * configure.srv: Add linux-procfs.o dependencies.
6766
881127c9
YQ
67672011-08-14 Yao Qi <yao@codesourcery.com>
6768
6769 * target.h (struct target_ops): Fix indent.
6770 * win32-low.c (win32_target_ops): Fix comment.
6771
58dbd541
YQ
67722011-08-14 Andrew Jenner <andrew@codesourcery.com>
6773 Yao Qi <yao@codesourcery.com>
6774
6775 * Makefile.in (clean): Remove tic6x-*.c files.
6776 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
6777 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
6778 (tic6x-c64xp-linux.c): Likewise.
6779 * configure.srv: Add support for tic6x-*-uclinux.
6780 * linux-tic6x-low.c: New.
6781 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
6782
78d85199
YQ
67832011-08-14 Andrew Stubbs <ams@codesourcery.com>
6784 Yao Qi <yao@codesourcery.com>
6785
6786 * target.h (struct target_ops): Add read_loadmap.
6787 * linux-low.c (struct target_loadseg): New type.
6788 (struct target_loadmap): New type.
6789 (linux_read_loadmap): New function.
6790 (linux_target_ops): Add linux_read_loadmap.
6791 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
6792 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
6793 to NULL.
78d85199 6794
a959a88d
EZ
67952011-08-05 Eli Zaretskii <eliz@gnu.org>
6796
6797 * win32-low.c: Include <stdint.h>.
6798
1ced966e
PA
67992011-07-22 Pedro Alves <pedro@codesourcery.com>
6800
6801 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
6802 to the inferior here.
6803 (i386_remove_aligned_watchpoint): Ditto.
6804 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
6805 fit part of the watchpoint in the debug registers.
6806 (i386_update_inferior_debug_regs): New.
6807 (i386_low_insert_watchpoint): Work on a local mirror of the debug
6808 registers, and only update the inferior on success.
6809 (i386_low_remove_watchpoint): Ditto.
6810
d26e3629
KY
68112011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
6812
6813 * linux-low.c (compare_ints, unique, list_threads, show_process,
6814 linux_core_of_thread): Delete.
6815 (linux_target_ops): Change linux_core_of_thread to
6816 linux_common_core_of_thread.
6817 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
6818 * utils.c (malloc_failure): Change type of argument.
6819 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
6820 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
6821 common/linux-osdata.c, common/ptid.c and common/buffer.c.
6822 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
6823 (IPA_OBJS): Add common-utils-ipa.o.
6824 (ptid_h, linux_osdata_h): New macros.
6825 (server_h): Add common/common-utils.h, common/xml-utils.h,
6826 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
6827 common/ptid.h.
6828 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
6829 ptid.o, buffer.o): New rules.
6830 (linux-low.o): Add common/linux-osdata.h as a dependency.
6831 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
6832 * configure.ac: Add AC_HEADER_DIRENT check.
6833 * config.in: Regenerate.
6834 * configure: Regenerate.
6835 * remote-utils.c (xml_escape_text): Delete.
6836 (buffer_grow, buffer_free, buffer_init, buffer_finish,
6837 buffer_xml_printf): Move to common/buffer.c.
6838 * server.c (main): Remove call to initialize_inferiors.
6839 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
6840 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
6841 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
6842 internal_error, gdb_assert, gdb_assert_fail): Delete.
6843 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
6844 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
6845 common/buffer.h.
6846 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
6847 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
6848 initialize_inferiors): Delete.
6849
2275a1a7
PA
68502011-07-20 Pedro Alves <pedro@codesourcery.com>
6851
6852 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
6853 symbol error.
6854
0a5b1e09
PA
68552011-05-31 Pedro Alves <pedro@codesourcery.com>
6856
6857 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
6858 assertion.
6859 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
6860
6938fd34
YQ
68612011-05-26 Yao Qi <yao@codesourcery.com>
6862
6863 * Makefile.in (thread-db.o): Track dependence to
6864 common/gdb_thread_db.h.
6865 * thread-db.c: include gdb_thread_db.h from right place.
6866
b481f9e0
TT
68672011-05-16 Adrian Cornish <gnu@bluedreamer.com>
6868
6869 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
6870 __FILE__ and __LINE__ to internal_error.
6871
98a5dd13
DE
68722011-05-13 Doug Evans <dje@google.com>
6873
6874 * thread-db.c (try_thread_db_load_from_sdir): New function.
6875 (try_thread_db_load_from_dir): New function.
6876 (thread_db_load_search): Handle $sdir, ignore $pdir.
6877 Remove trying of system directories if search of
6878 libthread-db-search-path fails, that is now done via $sdir.
6879
d248b706
KY
68802011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
6881
6882 * server.c (handle_query): Add EnableDisableTracepoints to the list
6883 of supported features.
43aaf8b6 6884 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 6885 tracepoints.
43aaf8b6
PA
6886 (cmd_qtenable_disable): New.
6887 (cmd_qtstart): Install tracepoints even if disabled.
6888 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
6889 receiving a QTEnable or QTDisable packet.
6890 (gdb_collect): Skip data collection if fast tracepoint is disabled.
6891 (ust_marker_to_static_tracepoint): Do not ignore disabled static
6892 tracepoints.
6893 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 6894
84e578fb
DE
68952011-05-10 Doug Evans <dje@google.com>
6896
6897 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
6898
71f55dd8
DE
68992011-05-04 Doug Evans <dje@google.com>
6900
6901 * linux-low.c (linux_join): Skip process lookup.
6902 * spu-low.c (spu_join): Ditto.
6903 * server.c (join_inferiors_callback): Delete.
6904 (process_serial_event): For 'D' packet (detach) call join_inferior
6905 directly.
6906
4d393d60
JM
69072011-05-04 Joseph Myers <joseph@codesourcery.com>
6908
6909 * README: Don't mention xscale*-*-linux*.
6910 * configure.srv (xscale*-*-linux*): Don't handle target.
6911
b00ad6ff
NF
69122011-04-27 Nathan Froyd <froydnj@codesourcery.com>
6913
6914 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
6915 casting pointers.
6916 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
6917 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
6918 (i386_emit_void_call_2): Likewise.
6919
af96c192
YQ
69202011-04-26 Yao Qi <yao@codesourcery.com>
6921
43aaf8b6
PA
6922 * linux-low.c: Move common macros to linux-ptrace.h.
6923 Include linux-ptrace.h.
af96c192
YQ
6924 * Makefile.in (linux_ptrace_h): New.
6925 (linux-low.o): Depends on linux-ptrace.h.
6926
03f2bd59
JK
69272011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
6928
6929 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
6930 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
6931 (remote_prepare): New function with most of the TCP code from ...
6932 (remote_open): ... here. Detect PORT here unconditionally. Move also
6933 setting transport_is_reliable.
6934 * server.c (run_once): New variable.
6935 (gdbserver_usage): Document it.
6936 (main): Set run_once for `--once'. Call remote_prepare. Exit after
6937 the first run if RUN_ONCE.
6938 * server.h (run_once, remote_prepare): New declarations.
6939
7a9dd1b2
TT
69402011-04-19 Tom Tromey <tromey@redhat.com>
6941
6942 * win32-low.c (handle_load_dll): Remove duplicate "the".
6943
81239425
PM
69442011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
6945
6946 Remove support for old Cygwin 1.5 versions.
6947 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
6948 function to avoid warning.
6949 (win32_add_one_solib): Use cygwin_conv_path function to avoid
6950 warning.
6951
9e0627f1
PM
69522011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
6953
6954 * gdbserver/server.h (Macro _): Define it if not available.
6955
588eebee
MS
69562011-03-14 Michael Snyder <msnyder@vmware.com>
6957
348af9f7 6958 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 6959
43f70d4c
JB
69602011-03-10 Joel Brobecker <brobecker@adacore.com>
6961
6962 * Makefile.in (maintainer-clean realclean distclean): Remove
6963 "make ... subdir_do" command.
6964
348af9f7
MS
69652011-03-10 Michael Snyder <msnyder@vmware.com>
6966
6967 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
6968
6969 * server.c (handle_v_run): Free alloced buffer on early return.
6970
e637a4f5
YQ
69712011-03-09 Yao Qi <yao@codesourcery.com>
6972
6973 Revert:
6974 2011-03-04 Yao Qi <yao@codesourcery.com>
6975
6976 * Makefile.in: Remove GNU make feature --directory.
6977
6978 2011-03-05 Yao Qi <yao@codesourcery.com>
6979
6980 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
6981 (subdir_do): New make target. Copied from gdb/Makefile.
6982 (maintainer-clean, realclean, distclean, clean): Call corresponding
6983 make targets in common/Makefile.
6984
6985 2011-02-11 Yao Qi <yao@codesourcery.com>
6986
6987 * configure.ac: Call AC_PROG_RANLIB.
6988 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
6989 * configure: Regenerate.
6990
e6edda56
JK
69912011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
6992
6993 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
6994
e5141119
JB
69952011-03-06 Yao Qi <yao@codesourcery.com>
6996
6997 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
6998
64794aa4
JB
69992011-03-05 Yao Qi <yao@codesourcery.com>
7000
7001 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
7002 (subdir_do): New make target. Copied from gdb/Makefile.
7003 (maintainer-clean, realclean, distclean, clean): Call corresponding
7004 make targets in common/Makefile.
7005
7a762829
YQ
70062011-03-04 Yao Qi <yao@codesourcery.com>
7007
7008 * Makefile.in: Remove GNU make feature --directory.
7009
348af9f7
MS
70102011-03-04 Michael Snyder <msnyder@vmware.com>
7011
7012 * server.c (queue_stop_reply): Call xmalloc not malloc.
7013
70142011-03-02 Michael Snyder <msnyder@vmware.com>
7015
7016 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
7017
9f72fee2
MS
70182011-02-28 Michael Snyder <msnyder@vmware.com>
7019
588eebee
MS
7020 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
7021 (cmd_qtframe): Ditto.
7022 (cmd_qtbuffer): Ditto.
7023 (cmd_bigqtbuffer): Ditto.
7024
9f72fee2
MS
7025 * utils.c (decimal2str): Initialize 'width' to nine, then
7026 don't mess with it.
7027
8040bd49
UW
70282011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
7029
7030 * hostio.c (require_data): Free *data, not data.
7031
7e52cbd0
JK
70322011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7033
7034 * hostio.c (require_data): Use free, not xfree.
7035
9130f83e
MS
70362011-02-27 Michael Snyder <msnyder@vmware.com>
7037
4b812f4e
MS
7038 * server.c (handle_query): Discard unused value.
7039
9130f83e
MS
7040 * hostio.c (require_data): Free malloc memory before returning
7041 error.
7042
69d37113
MS
70432011-02-26 Michael Snyder <msnyder@vmware.com>
7044
7045 * linux-low.c (list_threads): Call closedir for dirent.
7046
35f5825a
MS
70472011-02-27 Michael Snyder <msnyder@vmware.com>
7048
2a589cef
MS
7049 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
7050 a case statement falls through.
7051
0adea5f7
MS
7052 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
7053
35f5825a
MS
7054 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
7055 in comparison.
7056
238f1c74
MS
70572011-02-26 Michael Snyder <msnyder@vmware.com>
7058
7059 * utils.c (decimal2str): Eliminate dead code and dead param.
7060 (pulongest): Drop dead param from call to decimal2str.
7061 (plongest): Ditto.
7062
633ff500
JB
70632011-02-24 Joel Brobecker <brobecker@adacore.com>
7064
7065 Revert the following patch (not approved yet):
7066 2011-02-21 Hui Zhu <teawater@gmail.com>
7067 * tracepoint.c (tp_printf): New function.
7068 (eval_agent_expr): Handle gdb_agent_op_printf.
7069
f9c6ff72
HZ
70702011-02-21 Hui Zhu <teawater@gmail.com>
7071
7072 * tracepoint.c (tp_printf): New function.
7073 (eval_agent_expr): Handle gdb_agent_op_printf.
7074
94d5e490
TT
70752011-02-18 Tom Tromey <tromey@redhat.com>
7076
7077 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
7078 (tracepoint.o): Likewise.
7079 * tracepoint.c (enum gdb_agent_op): Use ax.def.
7080 (gdb_agent_op_names): Likewise.
7081
c7f96d2b
TT
70822011-02-18 Tom Tromey <tromey@redhat.com>
7083
7084 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
7085 gdb_agent_op_rot>: New constants.
7086 (gdb_agent_op_names): Add pick and roll.
7087 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
7088 cases.
7089
0feedb2c
JK
70902011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
7091
7092 * aclocal.m4: Regenerated with aclocal-1.11.1.
7093
b3b9301e
PA
70942011-02-14 Pedro Alves <pedro@codesourcery.com>
7095
7096 * server.c (handle_qxfer_traceframe_info): New.
7097 (qxfer_packets): Register "traceframe-info".
7098 (handle_query): Report support for qXfer:traceframe-info:read+.
7099 * tracepoint.c (match_blocktype): New.
7100 (traceframe_find_block_type): Rename to ...
7101 (traceframe_walk_blocks): ... this. Add callback filter argument,
7102 and use it.
7103 (traceframe_find_block_type): New, reimplemented on top of
7104 traceframe_walk_blocks.
7105 (build_traceframe_info_xml): New.
7106 (traceframe_read_info): New.
7107 * server.h (traceframe_read_info): Declare.
7108
4f3e6fb7
YQ
71092011-02-11 Yao Qi <yao@codesourcery.com>
7110
7111 * configure.ac: Call AC_PROG_RANLIB.
7112 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
7113 * configure: Regenerate.
7114
764880b7
PA
71152011-02-07 Pedro Alves <pedro@codesourcery.com>
7116
7117 * server.c (gdb_read_memory): Change return semantics to allow
7118 partial transfers.
7119 (handle_search_memory_1): Adjust.
7120 (process_serial_event) <'m' packet>: Handle partial transfers.
7121 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
7122
1c79eb8a
PA
71232011-01-28 Pedro Alves <pedro@codesourcery.com>
7124
7125 * regcache.c (init_register_cache): Initialize
7126 regcache->register_status.
7127 (free_register_cache): Release regcache->register_status.
7128 (regcache_cpy): Copy register_status.
7129 (registers_to_string): Print 'x's for unavailable registers.
7130 (supply_register): Mark the register's status valid or
7131 unavailable, depending on whether a buffer was passed in or not.
7132 (supply_register_zeroed): New.
7133 (supply_regblock): Mark the registers' status valid or
7134 unavailable, depending on whether a buffer was passed in or not.
7135 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
7136 (struct regcache): New `register_status' field.
7137 (supply_register_zeroed): Declare.
7138 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
7139 supply_register_zeroed, rather than passing a NULL buffer to
7140 supply_register.
7141 * tracepoint.c (fetch_traceframe_registers): Update comment.
7142
85724a0e
PA
71432011-01-28 Pedro Alves <pedro@codesourcery.com>
7144
7145 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
7146 buffer explicit.
7147
d08aafef
PA
71482011-01-25 Pedro Alves <pedro@codesourcery.com>
7149
7150 * server.h (decode_xfer_write): Change prototype.
7151 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
7152 and don't extract the annex here.
7153 * server.c (decode_xfer_read): Remove `annex' parameter,
7154 and don't extract the annex here.
7155 (decode_xfer): New.
7156 (struct qxfer): New.
7157 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
7158 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
7159 (handle_qxfer_statictrace): New functions, abstracted out from
7160 handle_query, and made to use the struct qxfer interface.
7161 (handle_threads_qxfer_proper): Rename to ...
7162 (handle_qxfer_threads_proper): ... this.
7163 (handle_threads_qxfer): Rename to ...
7164 (handle_qxfer_threads): ... this. Adjust.
7165 (qxfer_packets): New array.
7166 (handle_qxfer): New function.
7167 (handle_query): Use handle_qxfer.
7168
493e2a69
MS
71692011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
7170
7171 * gdbreplay.c: Shorten lines of >= 80 columns.
7172 * linux-low.c: Ditto.
7173 * linux-ppc-low.c: Ditto.
7174 * linux-s390-low.c: Ditto.
7175 * linux-sparc-low.c: Ditto.
7176 * linux-x86-low.c: Ditto.
7177 * linux-xtensa-low.c: Ditto.
7178 * mem-break.c: Ditto.
7179 * nto-low.c: Ditto.
7180 * regcache.h: Ditto.
7181 * remote-utils.c: Ditto.
7182 * server.c: Ditto.
7183 * server.h: Ditto.
7184 * thread-db.c: Ditto.
7185 * tracepoint.c: Ditto.
7186 * utils.c: Ditto.
7187 * win32-low.h: Ditto.
7188
44944448
JB
71892011-01-05 Joel Brobecker <brobecker@adacore.com>
7190
7191 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
7192 update.
7193
71ce852c
JB
71942011-01-01 Joel Brobecker <brobecker@adacore.com>
7195
7196 * server.c (gdbserver_version): Update copyright year in version
7197 output.
7198 * gdbreplay.c (gdbreplay_version): Ditto.
7199
eb826dc6
MF
72002010-12-29 Jie Zhang <jie.zhang@analog.com>
7201
7202 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
7203 * linux-bfin-low.c: New file.
7204 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
7205 PT_DATA_ADDR for BFIN targets.
7206 * Makefile.in (SFILES): Add linux-bfin-low.c.
7207 (clean): Remove reg-bfin.c.
7208 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
7209 * README: Mention supported Blackfin targets.
7210
39ab222a
MF
72112010-12-23 Mike Frysinger <vapier@gentoo.org>
7212
7213 * .gitignore: New file.
7214
a1f2ce7d
MF
72152010-11-16 Mike Frysinger <vapier@gentoo.org>
7216
7217 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
7218
f474844c
JZ
72192010-10-22 Jie Zhang <jie@codesourcery.com>
7220
7221 * Makefile.in: Add FLAGS_TO_PASS variable.
7222 (install): Remove dependency of install-only and recursively
7223 invoke make for install-only.
7224
f1048712
DE
72252010-10-04 Doug Evans <dje@google.com>
7226
7227 * Makefile.in (uninstall): Use $(DESTDIR).
7228
b53a1623
PA
72292010-09-24 Pedro Alves <pedro@codesourcery.com>
7230
e6ee044d
PA
7231 PR gdb/11842
7232
b53a1623
PA
7233 * linux-x86-low.c (compat_siginfo_from_siginfo)
7234 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
7235 si_code is < 0. Check for si_code == SI_TIMER before checking for
7236 si_code < 0.
7237
fa1bd1e4
JB
72382010-09-13 Joel Brobecker <brobecker@adacore.com>
7239
7240 * lynx-i386-low.c: New file.
7241 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
7242
47fac8f8
JB
72432010-09-13 Joel Brobecker <brobecker@adacore.com>
7244
7245 * lynx-low.c (ptrace_request_to_str): Remove handling for
7246 request values that have been removed in LynxOS 5.x.
7247
1adfc54d
JB
72482010-09-13 Joel Brobecker <brobecker@adacore.com>
7249
7250 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
7251 <ptrace.h>
7252
c2a66c29
NS
72532010-09-09 Nathan Sidwell <nathan@codesourcery.com>
7254
7255 * configure.ac: Add --enable-inprocess-agent option.
7256 * configure: Rebuilt.
7257
32fcada3
YQ
72582010-09-06 Yao Qi <yao@codesourcery.com>
7259
7260 * linux-low.c (linux_kill): Remove unused variable.
7261 (linux_stabilize_threads): Likewise.
7262 * server.c (start_inferior): Likewise.
7263 (queue_stop_reply_callback): Likewise.
7264 * tracepoint.c (do_action_at_tracepoint): Likewise.
7265
0cccb683
YQ
72662010-09-06 Yao Qi <yao@codesourcery.com>
7267
7268 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
7269 on return.
7270
423ec54c
JK
72712010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
7272
7273 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
7274
12ac6819
PA
72752010-09-06 Pedro Alves <pedro@codesourcery.com>
7276
7277 * Makefile.in (install-only): Replace $IPA_DEPFILES with
7278 "$(IPA_DEPFILES)".
7279
8ed54b31
JB
72802010-09-01 Joel Brobecker <brobecker@adacore.com>
7281
7282 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
7283 gdbserver/lynx-ppc-low.c: New files.
7284 * Makefile.in (lynx_low_h): New variable.
7285 (lynx-low.o, lynx-ppc-low.o): New rules.
7286 * configure.ac: On LynxOS, link with -lnetinet.
7287 * configure.srv: Add handling of powerpc-*-lynxos* targets.
7288 * configure: regenerate.
7289
bb0116a4
JB
72902010-09-01 Joel Brobecker <brobecker@adacore.com>
7291
7292 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
7293 * configure.ac: Add check for vasprintf and vsnprintf.
7294 * configure, config.in: Regenerate.
7295 * server.h (vasprintf, vsnprintf): Add conditional declarations.
7296
a778ab81 72972010-09-01 Joel Brobecker <brobecker@adacore.com>
7298
7299 * gdbreplay.c: Move include of alloca.h up, next to include of
7300 malloc.h.
7301 * server.h: Add include of malloc.h.
7302 * mem-break.c: Remove include of malloc.h.
7303 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
7304
8b034a19 73052010-09-01 Joel Brobecker <brobecker@adacore.com>
7306
7307 * Makefile.in (memmem.o): Build with -Wno-error.
7308
73092010-09-01 Joel Brobecker <brobecker@adacore.com>
7310
7311 * utils.c (xsnprintf): Make non-static.
7312 * server.h: Add xsnprintf declaration.
7313 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
7314 replace calls to snprintf by calls to xsnprintf throughout.
7315
73162010-09-01 Joel Brobecker <brobecker@adacore.com>
7317
7318 * configure.ac: Add configure check for alloca.
7319 * configure, config.in: Regenerate.
7320 * server.h: Include alloca.h if it exists.
7321 * gdbreplay.c: Include alloca.h if it exists.
7322
1a981360
PA
73232010-08-28 Pedro Alves <pedro@codesourcery.com>
7324
7325 * linux-low.c (__SIGRTMIN): Define if not already defined.
7326 (linux_create_inferior): Check for __ANDROID__ rather than
7327 __SIGRTMIN.
7328 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
7329 are already deferred.
7330 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
7331 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
7332 stopped and already has a pending signal to report.
7333 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
7334 a pending signal to report or is moving out of a jump pad.
7335 (linux_init_signals): Check for __ANDROID__ rather than
7336 __SIGRTMIN.
7337
b4d51a55
PA
73382010-08-28 Pedro Alves <pedro@codesourcery.com>
7339
7340 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
7341 debug_threads check. Avoid a linear search when not doing debug
7342 output.
7343
ec48365d
PA
73442010-08-27 Pedro Alves <pedro@codesourcery.com>
7345
7346 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
7347 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
7348 (struct file_handler) <fd>: Change type to gdb_fildes_t.
7349 (process_event): Change local fd's type to gdb_fildes_t.
7350 (create_file_handler): Adjust prototype.
7351 (delete_file_handler): Adjust prototype.
7352 (handle_file_event): Adjust prototype. Use pfildes.
7353 (create_file_event): Adjsut prototype.
7354 * remote-utils.c (remote_desc, listen_desc): Change type to
7355 gdb_fildes_t.
7356 * server.h: New gdb_fildes_t typedef.
7357 [USE_WIN32API]: Include winsock2.h.
7358 (delete_file_handler, add_file_handler): Adjust prototypes.
7359 (pfildes): Declare.
7360 * utils.c (pfildes): New.
7361
854d88f0
PA
73622010-08-27 Pedro Alves <pedro@codesourcery.com>
7363
7364 * configure.ac (build_warnings): Add -Wno-char-subscripts.
7365 * configure: Regenerate.
7366
0146f85b
PA
73672010-08-27 Pedro Alves <pedro@codesourcery.com>
7368
7369 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
7370 (linux_done_accessing_memory): ... this.
7371 (linux_target_ops): Adjust.
7372 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
7373 * nto-low.c (nto_target_ops): Adjust comment.
7374 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
7375 * spu-low.c (spu_target_ops): Adjust comment.
7376 * target.h (target_ops): Rename unprepare_to_access_memory field
7377 to done_accessing_memory.
7378 (unprepare_to_access_memory): Rename to ...
7379 (done_accessing_memory): ... this.
7380
90d74c30
PA
73812010-08-26 Pedro Alves <pedro@codesourcery.com>
7382
7383 * linux-low.c (linux_prepare_to_access_memory): New.
7384 (linux_unprepare_to_access_memory): New.
7385 (linux_target_ops): Install them.
7386 * server.c (read_memory): Rename to ...
7387 (gdb_read_memory): ... this. Use
7388 prepare_to_access_memory/prepare_to_access_memory.
7389 (write_memory): Rename to ...
7390 (gdb_write_memory): ... this. Use
7391 prepare_to_access_memory/prepare_to_access_memory.
7392 (handle_search_memory_1): Adjust.
7393 (process_serial_event): Adjust.
7394 * target.h (struct target_ops): New fields
7395 prepare_to_access_memory and unprepare_to_access_memory.
7396 (prepare_to_access_memory, unprepare_to_access_memory): New.
7397 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
7398 prepare_to_access_memory/prepare_to_access_memory.
7399 * nto-low.c (nto_target_ops): Adjust.
7400 * spu-low.c (spu_target_ops): Adjust.
7401 * win32-low.c (win32_target_ops): Adjust.
7402
fd467969
PA
74032010-08-26 Pedro Alves <pedro@codesourcery.com>
7404
7405 * Makefile.in (WARN_CFLAGS): Get it from configure.
7406 (WERROR_CFLAGS): New.
7407 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
7408 * configure.ac: Introduce --enable-werror, which adds -Werror to
7409 the compiler command line. Enabled by default. Disable with
7410 --disable-werror. Add -Wdeclaration-after-statement
7411 Wpointer-arith and -Wformat-nonliteral to warning flags.
7412 * configure: Regenerate.
7413
331e2f5f
PA
74142010-08-26 Pedro Alves <pedro@codesourcery.com>
7415
7416 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
7417
e581f2b4
PA
74182010-08-26 Pedro Alves <pedro@codesourcery.com>
7419
7420 * gdbreplay.c (remote_error): New.
7421 (gdbchar): New.
7422 (expect): Use gdbchar. Check for error reading from GDB.
7423 Clarify sync error output.
7424 (play): Check for errors writing to GDB.
7425 * linux-low.c (sigchld_handler): Really ignore `write' errors.
7426 * remote-utils.c (getpkt): Check for errors writing to the remote
7427 descriptor.
7428
3c11dd79
PA
74292010-08-25 Pedro Alves <pedro@codesourcery.com>
7430
7431 * linux-low.c (linux_wait_1): Move non-debugging code out of
7432 `debug_threads' control.
7433
d20a8ad9
PA
74342010-08-25 Pedro Alves <pedro@codesourcery.com>
7435
7436 * linux-low.c (linux_wait_1): Don't set last_status here.
7437 * server.c (push_event, queue_stop_reply_callback): Assert we're
7438 not pushing a TARGET_WAITKIND_IGNORE event.
7439 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
7440 (myresume, handle_target_event): Set the thread's last_resume_kind
7441 and last_status from the target returned status.
7442
964e4306
PA
74432010-08-25 Pedro Alves <pedro@codesourcery.com>
7444
7445 PR threads/10729
7446
7447 * linux-x86-low.c (update_debug_registers_callback): New.
7448 (i386_dr_low_set_addr): Use it.
7449 (i386_dr_low_get_addr): New.
7450 (i386_dr_low_set_control): Use update_debug_registers_callback.
7451 (i386_dr_low_get_control): New.
7452 (i386_dr_low_get_status): Adjust.
7453 * linux-low.c (linux_stop_lwp): New.
7454 * linux-low.h (linux_stop_lwp): Declare.
7455
7456 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
7457 argument instead of a i386_debug_reg_state.
7458 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
7459 a i386_debug_reg_state.
7460 (i386_insert_aligned_watchpoint): Adjust.
7461 (i386_remove_aligned_watchpoint): Adjust.
7462 (i386_low_stopped_data_address): Read the debug registers from the
7463 inferior instead of from the mirrors.
7464 * i386-low.h (struct i386_debug_reg_state): Extend comment.
7465 (i386_dr_low_get_addr): Declare.
7466 (i386_dr_low_get_control): Declare.
7467 (i386_dr_low_get_status): Change prototype.
7468
7469 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
7470 (i386_dr_low_get_addr): New.
7471 (i386_dr_low_get_control): New.
7472 (i386_dr_low_get_status): Adjust prototype. Return
7473 dr_status_mirror.
7474 (i386_initial_stuff): Clear dr_status_mirror and
7475 dr_control_mirror.
7476 (i386_get_thread_context): Adjust.
7477 (i386_set_thread_context): Adjust.
7478 (i386_thread_added): Adjust.
7479
5f21a75b
PA
74802010-08-24 Pedro Alves <pedro@codesourcery.com>
7481
7482 * linux-low.h (linux_thread_area): Delete declaration.
7483
3e4c1235
TS
74842010-08-11 Thomas Schwinge <thomas@codesourcery.com>
7485
7486 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
7487 after its termination.
7488
1971b033
PA
74892010-08-09 Pedro Alves <pedro@codesourcery.com>
7490
7491 * linux-low.c (gdb_wants_lwp_stopped): Delete.
7492 (gdb_wants_all_stopped): Delete.
7493 (linux_wait_1): Don't call them.
7494 * server.c (handle_v_cont): Tag all threads as want-stopped.
7495 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
7496 stopped as "client-wants-stopped".
7497
310444ac
PA
74982010-07-31 Pedro Alves <pedro@codesourcery.com>
7499
7500 * Makefile.in (signals_h): New.
7501 (server_h): Depend on it.
7502 (server.o): Don't depend on $(signals_def).
7503 (signals.o): Depend on $(signals_def).
7504
a19cae16
JK
75052010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
7506
7507 * Makefile.in (signals_def): New.
7508 (server_h): Append include/gdb/signals.h and signals_def.
7509 (server.o): Append signals_def.
7510
30d50328
JK
75112010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
7512
7513 * server.c (handle_target_event): Use target_signal_to_host for
7514 resume_info.sig initialization.
7515 * target.h (struct thread_resume) <sig>: New comment.
7516
5c3216e2
OS
75172010-07-20 Ozkan Sezer <sezeroz@gmail.com>
7518
c6f46ca0
OS
7519 * server.c (handle_query): strcpy() the returned string from paddress()
7520 instead of sprintf().
5c3216e2
OS
7521 * utils.c (paddress): Return phex_nz().
7522
6bd31874
JB
75232010-07-07 Joel Brobecker <brobecker@adacore.com>
7524
7525 * server.c (handle_v_cont): Call mourn_inferior if process
7526 just exited.
7527 (myresume): Likewise.
7528
0fb4aa4b
PA
75292010-07-01 Pedro Alves <pedro@codesourcery.com>
7530
7531 Static tracepoints, and integration with UST.
7532
7533 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
7534 * mem-break.c (uninsert_all_breakpoints)
7535 (reinsert_all_breakpoints): New.
7536 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
7537 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
7538 (gdb_agent_ust_loaded, helper_thread_id)
7539 (gdb_agent_helper_thread_id): New macros.
7540 (struct ipa_sym_addresses): Add addr_ust_loaded,
7541 addr_helper_thread_id, addr_cmd_buf.
7542 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
7543 (in_process_agent_loaded_ust): New.
7544 (write_e_ust_not_loaded): New.
7545 (maybe_write_ipa_ust_not_loaded): New.
7546 (struct collect_static_trace_data_action): New.
7547 (enum tracepoint_type) <static_tracepoint>: New.
7548 (struct tracepoint) <handle>: Mention static tracepoints.
7549 (struct static_tracepoint_ctx): New.
7550 (CMD_BUF_SIZE): New.
7551 (add_tracepoint_action): Handle static tracepoint actions.
7552 (unprobe_marker_at): New.
7553 (clear_installed_tracepoints): Handle static tracepoints.
7554 (cmd_qtdp): Handle static tracepoints.
7555 (probe_marker_at): New.
7556 (cmd_qtstart): Handle static tracepoints.
7557 (response_tracepoint): Handle static tracepoints.
7558 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
7559 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
7560 (get_context_regcache): Handle static tracepoints.
7561 (do_action_at_tracepoint): Handle static tracepoint actions.
7562 (traceframe_find_block_type): Handle static trace data blocks.
7563 (traceframe_read_sdata): New.
7564 (download_tracepoints): Download static tracepoint actions.
7565 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
7566 (GDB_PROBE_NAME): New.
7567 (ust_ops): New.
7568 (GET_UST_SYM): New.
7569 (USTF): New.
7570 (dlsym_ust): New.
7571 (ust_marker_to_static_tracepoint): New.
7572 (gdb_probe): New.
7573 (collect_ust_data_at_tracepoint): New.
7574 (gdb_ust_probe): New.
7575 (UNIX_PATH_MAX, SOCK_DIR): New.
7576 (gdb_ust_connect_sync_socket): New.
7577 (resume_thread, stop_thread): New.
7578 (run_inferior_command): New.
7579 (init_named_socket): New.
7580 (gdb_ust_socket_init): New.
7581 (cstr_to_hexstr): New.
7582 (next_st): New.
7583 (first_marker, next_marker): New.
7584 (response_ust_marker): New.
7585 (cmd_qtfstm, cmd_qtsstm): New.
7586 (unprobe_marker_at, probe_marker_at): New.
7587 (cmd_qtstmat, gdb_ust_thread): New.
7588 (gdb_ust_init): New.
7589 (initialize_tracepoint_ftlib): Call gdb_ust_init.
7590 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
7591 (ST_REGENTRY): New.
7592 (x86_64_st_collect_regmap): New.
7593 (X86_64_NUM_ST_COLLECT_GREGS): New.
7594 (AMD64_RIP_REGNUM): New.
7595 (supply_static_tracepoint_registers): New.
7596 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
7597 (ST_REGENTRY): New.
7598 (i386_st_collect_regmap): New.
7599 (i386_NUM_ST_COLLECT_GREGS): New.
7600 (supply_static_tracepoint_registers): New.
7601 * server.c (handle_query): Handle qXfer:statictrace:read.
7602 <qSupported>: Report support for StaticTracepoints, and
7603 qXfer:statictrace:read features.
7604 * server.h (traceframe_read_sdata)
7605 (supply_static_tracepoint_registers): Declare.
7606 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
7607 (unpack_varlen_hex): Include in IPA build.
7608 * Makefile.in (ustlibs, ustinc): New.
7609 (IPA_OBJS): Add remote-utils-ipa.o.
7610 ($(IPA_LIB)): Link -ldl and -lpthread.
7611 (UST_CFLAGS): New.
7612 (IPAGENT_CFLAGS): Add UST_CFLAGS.
7613 * config.in, configure: Regenerate.
7614
9e4344e5
PA
76152010-06-20 Ian Lance Taylor <iant@google.com>
7616 Pedro Alves <pedro@codesourcery.com>
7617
7618 * linux-x86-low.c (always_true): Delete.
7619 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
7620 trying to fool the compiler with always_true.
7621
c6beb2cb
PA
76222010-06-20 Pedro Alves <pedro@codesourcery.com>
7623
7624 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
7625 conditions in gdbserver.
7626
d2ed6730
UW
76272010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
7628
7629 * spu-low.c (spu_read_memory): Wrap around local store limit.
7630 (spu_write_memory): Likewise.
7631
4e29fb54
PA
76322010-06-15 Pedro Alves <pedro@codesourcery.com>
7633
7634 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
7635 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
7636 LONGEST uses.
7637 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
7638 uses.
7639 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
7640 uses with LONGEST uses.
7641
6a271cae
PA
76422010-06-14 Stan Shebs <stan@codesourcery.com>
7643 Pedro Alves <pedro@codesourcery.com>
7644
7645 Bytecode compiler.
7646
7647 * linux-x86-low.c: Include limits.h.
7648 (add_insns): New.
7649 (always_true): New.
7650 (EMIT_ASM): New.
7651 (EMIT_ASM32): New.
7652 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
7653 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
7654 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
7655 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
7656 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
7657 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
7658 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
7659 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
7660 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
7661 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
7662 (amd64_emit_void_call_2): New.
7663 (amd64_emit_ops): New.
7664 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
7665 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
7666 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
7667 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
7668 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
7669 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
7670 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
7671 (i386_emit_call, i386_emit_reg, i386_emit_pop)
7672 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
7673 (i386_emit_stack_adjust, i386_emit_int_call_1)
7674 (i386_emit_void_call_2): New.
7675 (i386_emit_ops): New.
7676 (x86_emit_ops): New.
7677 (the_low_target): Install x86_emit_ops.
7678 * server.h (struct emit_ops): New.
7679 (get_raw_reg_func_addr): Declare.
7680 (current_insn_ptr, emit_error): Declare.
7681 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
7682 (set_trace_state_variable_value): New defines.
7683 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
7684 addr_get_trace_state_variable_value and
7685 addr_set_trace_state_variable_value.
7686 (symbol_list): New fields for get_raw_reg,
7687 get_trace_state_variable_value and set_trace_state_variable_value.
7688 (condfn): New typedef.
7689 (struct tracepoint): New field `compiled_cond'.
7690 (do_action_at_tracepoint): Clear compiled_cond.
7691 (get_trace_state_variable_value, set_trace_state_variable_value):
7692 Export in the IPA.
7693 (condition_true_at_tracepoint): If there's a compiled condition,
7694 run that.
7695 (current_insn_ptr, emit_error): New globals.
7696 (struct bytecode_address): New.
7697 (get_raw_reg_func_addr): New.
7698 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
7699 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
7700 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
7701 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
7702 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
7703 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
7704 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
7705 (compile_tracepoint_condition, compile_bytecodes): New.
7706 * target.h (emit_ops): Forward declare.
7707 (struct target_ops): New field emit_ops.
7708 (target_emit_ops): New.
7709 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
7710 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
7711 * linux-low.c (linux_emit_ops): New.
7712 (linux_target_ops): Install it.
7713 * linux-low.h (struct linux_target_ops): New field emit_ops.
7714
92b72907
UW
77152010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
7716
7717 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
7718 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
7719
fa593d66
PA
77202010-06-01 Pedro Alves <pedro@codesourcery.com>
7721 Stan Shebs <stan@codesourcery.com>
7722
7723 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
7724 (all): Depend on $(extra_libraries).
7725 (install-only): Install the IPA.
7726 (IPA_OBJS, IPA_LIB): New.
7727 (clean): Remove the IPA lib.
7728 (IPAGENT_CFLAGS): New.
7729 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
7730 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
7731 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
7732 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
7733 * configure.ac: Check for atomic builtins support in the compiler.
7734 (IPA_DEPFILES, extra_libraries): Define.
7735 * configure.srv (ipa_obj): Add description.
7736 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
7737 (i[34567]86-*-linux*): Set ipa_obj.
7738 (x86_64-*-linux*): Set ipa_obj.
7739 * linux-low.c (stabilizing_threads): New.
7740 (supports_fast_tracepoints): New.
7741 (linux_detach): Stabilize threads before detaching.
7742 (handle_tracepoints): Handle internal tracing breakpoints. Assert
7743 the lwp is either not stabilizing, or is moving out of a jump pad.
7744 (linux_fast_tracepoint_collecting): New.
7745 (maybe_move_out_of_jump_pad): New.
7746 (enqueue_one_deferred_signal): New.
7747 (dequeue_one_deferred_signal): New.
7748 (linux_wait_for_event_1): If moving out of a jump pad, defer
7749 pending signals to later.
7750 (linux_stabilize_threads): New.
7751 (linux_wait_1): Check if threads need moving out of jump pads, and
7752 do it if so.
7753 (stuck_in_jump_pad_callback): New.
7754 (move_out_of_jump_pad_callback): New.
7755 (lwp_running): New.
7756 (linux_resume_one_lwp): Handle moving out of jump pads.
7757 (linux_set_resume_request): Dequeue deferred signals.
7758 (need_step_over_p): Also step over fast tracepoint jumps.
7759 (start_step_over): Also uninsert fast tracepoint jumps.
7760 (finish_step_over): Also reinsert fast tracepoint jumps.
7761 (linux_install_fast_tracepoint_jump): New.
7762 (linux_target_ops): Install linux_stabilize_threads and
7763 linux_install_fast_tracepoint_jump_pad.
7764 * linux-low.h (linux_target_ops) <get_thread_area,
7765 install_fast_tracepoint_jump_pad>: New fields.
7766 (struct lwp_info) <collecting_fast_tracepoint,
7767 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
7768 (linux_get_thread_area): Declare.
7769 * linux-x86-low.c (jump_insn): New.
7770 (x86_get_thread_area): New.
7771 (append_insns): New.
7772 (push_opcode): New.
7773 (amd64_install_fast_tracepoint_jump_pad): New.
7774 (i386_install_fast_tracepoint_jump_pad): New.
7775 (x86_install_fast_tracepoint_jump_pad): New.
7776 (the_low_target): Install x86_get_thread_area and
7777 x86_install_fast_tracepoint_jump_pad.
7778 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
7779 (struct fast_tracepoint_jump): New.
7780 (fast_tracepoint_jump_insn): New.
7781 (fast_tracepoint_jump_shadow): New.
7782 (find_fast_tracepoint_jump_at): New.
7783 (fast_tracepoint_jump_here): New.
7784 (delete_fast_tracepoint_jump): New.
7785 (set_fast_tracepoint_jump): New.
7786 (uninsert_fast_tracepoint_jumps_at): New.
7787 (reinsert_fast_tracepoint_jumps_at): New.
7788 (set_breakpoint_at): Use write_inferior_memory.
7789 (uninsert_raw_breakpoint): Use write_inferior_memory.
7790 (check_mem_read): Mask out fast tracepoint jumps.
7791 (check_mem_write): Mask out fast tracepoint jumps.
7792 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
7793 (set_fast_tracepoint_jump): Declare.
7794 (delete_fast_tracepoint_jump)
7795 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
7796 (reinsert_fast_tracepoint_jumps_at): Declare.
7797 * regcache.c: Don't compile many functions when building the
7798 in-process agent library.
7799 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
7800 the register buffer in the heap.
7801 (free_register_cache): If the register buffer isn't owned by the
7802 regcache, don't free it.
7803 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
7804 pre-existing register caches.
7805 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
7806 type.
7807 (convert_ascii_to_int): : Constify `from' parameter type.
7808 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
7809 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
7810 the needed buffer in-place.
7811 (relocate_instruction): New.
7812 * server.c (handle_query) <qSymbols>: If the target supports
7813 tracepoints, give it a chance of looking up symbols. Report
7814 support for fast tracepoints.
7815 (handle_status): Stabilize threads.
7816 (process_serial_event): Adjust.
7817 * server.h (struct fast_tracepoint_jump): Forward declare.
7818 (struct process_info) <fast_tracepoint_jumps>: New field.
7819 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
7820 (decode_X_packet, decode_M_packet): Adjust.
7821 (relocate_instruction): Declare.
7822 (in_process_agent_loaded): Declare.
7823 (tracepoint_look_up_symbols): Declare.
7824 (struct fast_tpoint_collect_status): Declare.
7825 (fast_tracepoint_collecting): Declare.
7826 (force_unlock_trace_buffer): Declare.
7827 (handle_tracepoint_bkpts): Declare.
7828 (initialize_low_tracepoint)
7829 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
7830 * target.h (struct target_ops) <stabilize_threads,
7831 install_fast_tracepoint_jump_pad>: New fields.
7832 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
7833 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
7834 [HAVE_STDINT_H]: Include stdint.h.
7835 (trace_debug_1): Rename to ...
7836 (trace_vdebug): ... this.
7837 (trace_debug): Rename to ...
7838 (trace_debug_1): ... this. Add `level' parameter.
7839 (trace_debug): New.
7840 (ATTR_USED, ATTR_NOINLINE): New.
7841 (IP_AGENT_EXPORT): New.
7842 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
7843 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
7844 (about_to_request_buffer_space, trace_buffer_is_full)
7845 (stopping_tracepoint, expr_eval_result, error_tracepoint)
7846 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
7847 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
7848 (traceframe_write_count, traceframes_created)
7849 (trace_state_variables)
7850 New renaming defines.
7851 (struct ipa_sym_addresses): New.
7852 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
7853 (symbol_list): New.
7854 (ipa_sym_addrs): New.
7855 (all_tracepoint_symbols_looked_up): New.
7856 (in_process_agent_loaded): New.
7857 (write_e_ipa_not_loaded): New.
7858 (maybe_write_ipa_not_loaded): New.
7859 (tracepoint_look_up_symbols): New.
7860 (debug_threads) [IN_PROCESS_AGENT]: New.
7861 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
7862 (UNKNOWN_SIDE_EFFECTS): New.
7863 (stop_tracing): New.
7864 (flush_trace_buffer): New.
7865 (stop_tracing_bkpt): New.
7866 (flush_trace_buffer_bkpt): New.
7867 (read_inferior_integer): New.
7868 (read_inferior_uinteger): New.
7869 (read_inferior_data_pointer): New.
7870 (write_inferior_data_pointer): New.
7871 (write_inferior_integer): New.
7872 (write_inferior_uinteger): New.
7873 (struct collect_static_trace_data_action): Delete.
7874 (enum tracepoint_type): New.
7875 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
7876 <actions_str, step_actions, step_actions_str>: Only include in
7877 GDBserver.
fa593d66
PA
7878 <orig_size, obj_addr_on_target, adjusted_insn_addr>
7879 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
7880 (tracepoints): Use IP_AGENT_EXPORT.
7881 (last_tracepoint): Don't include in the IPA.
7882 (stopping_tracepoint): Use IP_AGENT_EXPORT.
7883 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
7884 (alloced_trace_state_variables): New.
7885 (trace_state_variables): Use IP_AGENT_EXPORT.
7886 (traceframe_t): Delete unused variable.
7887 (circular_trace_buffer): Don't include in the IPA.
7888 (trace_buffer_start): Delete.
7889 (struct trace_buffer_control): New.
7890 (trace_buffer_free): Delete.
7891 (struct ipa_trace_buffer_control): New.
7892 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
7893 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
7894 New.
7895 (trace_buffer_ctrl): New.
7896 (TRACE_BUFFER_CTRL_CURR): New.
7897 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
7898 Reimplement as macros.
7899 (trace_buffer_wrap): Delete.
7900 (traceframe_write_count, traceframe_read_count)
7901 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
7902 (struct tracepoint_hit_ctx) <type>: New field.
7903 (struct fast_tracepoint_ctx): New.
7904 (memory_barrier): New.
7905 (cmpxchg): New.
7906 (record_tracepoint_error): Update atomically in the IPA.
7907 (clear_inferior_trace_buffer): New.
7908 (about_to_request_buffer_space): New.
7909 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
7910 updating the same buffer.
7911 (add_tracepoint): Default the tracepoint's type to trap
7912 tracepoint, and orig_size to -1.
7913 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
7914 internal variables.
7915 (create_trace_state_variable): New parameter `gdb'. Handle it.
7916 (clear_installed_tracepoints): Clear fast tracepoint jumps.
7917 (cmd_qtdp): Handle fast tracepoints.
7918 (cmd_qtdv): Adjust.
7919 (max_jump_pad_size): New.
7920 (gdb_jump_pad_head): New.
7921 (get_jump_space_head): New.
7922 (claim_jump_space): New.
7923 (sort_tracepoints): New.
7924 (MAX_JUMP_SIZE): New.
7925 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
7926 IPA.
7927 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
7928 support. Upload fast traceframes, and delete internal IPA
7929 breakpoints.
7930 (stop_tracing_handler): New.
7931 (flush_trace_buffer_handler): New.
7932 (cmd_qtstop): Upload fast tracepoints.
7933 (response_tracepoint): Handle fast tracepoints.
7934 (tracepoint_finished_step): Upload fast traceframes. Set the
7935 tracepoint hit context's tracepoint type.
7936 (handle_tracepoint_bkpts): New.
7937 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
7938 type. Add comment about fast tracepoints.
7939 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
7940 non-existing action_str field.
7941 (get_context_regcache): Handle fast tracepoints.
7942 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
7943 to the regcache.
7944 (fast_tracepoint_from_jump_pad_address): New.
7945 (fast_tracepoint_from_ipa_tpoint_address): New.
7946 (collecting_t): New.
7947 (force_unlock_trace_buffer): New.
7948 (fast_tracepoint_collecting): New.
7949 (collecting): New.
7950 (gdb_collect): New.
7951 (write_inferior_data_ptr): New.
7952 (target_tp_heap): New.
7953 (target_malloc): New.
7954 (download_agent_expr): New.
7955 (UALIGN): New.
7956 (download_tracepoints): New.
7957 (download_trace_state_variables): New.
7958 (upload_fast_traceframes): New.
7959 (IPA_FIRST_TRACEFRAME): New.
7960 (IPA_NEXT_TRACEFRAME_1): New.
7961 (IPA_NEXT_TRACEFRAME): New.
7962 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
7963 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
7964 (gdb_jump_pad_buffer_end): New.
7965 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
7966 (initialize_tracepoint): Adjust.
7967 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
7968 buffer. Initialize the low module.
7969 * utils.c (PREFIX, TOOLNAME): New.
7970 (malloc_failure): Use PREFIX.
7971 (error): In the IPA, an error causes an exit.
7972 (fatal, warning): Use PREFIX.
7973 (internal_error): Use TOOLNAME.
7974 (NUMCELLS): Increase to 10.
7975 * configure, config.in: Regenerate.
7976
d149dd1d
PA
79772010-06-01 Pedro Alves <pedro@codesourcery.com>
7978
7979 * server.c (handle_query) <qSupported>: Do two passes over the
7980 qSupported string to avoid nesting strtok.
7981
f6528abd
JK
79822010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7983
7984 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
7985 (CDEPS): New.
7986 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
7987 -Wl,--dynamic-list.
7988 * configure: Regenerate.
7989 * proc-service.list: New.
7990
ca2a87a0
JK
79912010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7992
7993 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
7994 New comment.
7995
363a6e9f
OS
79962010-05-26 Ozkan Sezer <sezeroz@gmail.com>
7997
7998 * gdbreplay.c (remote_open): Check error return from socket() call by
7999 its equality to -1 not by it being negative.
8000 * remote-utils.c (remote_open): Likewise.
8001
d23b6cb1
PA
80022010-05-23 Pedro Alves <pedro@codesourcery.com>
8003
8004 * config.h: Regenerate.
8005
28d3cf85
MK
80062010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
8007
8008 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
8009 doesn't provide PTRACE_GET_THREAD_AREA.
8010
fea36a59
MK
80112010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
8012
8013 * linux-m68k-low.c: Include <asm/ptrace.h>
8014 (ps_get_thread_area): Implement.
8015
24b066ba
DE
80162010-05-03 Doug Evans <dje@google.com>
8017
8018 * event-loop.c (struct callback_event): New struct.
8019 (callback_list): New global.
8020 (append_callback_event, delete_callback_event): New functions.
8021 (process_callback): New function.
8022 (start_event_loop): Call it.
8023 * remote-utils.c (NOT_SCHEDULED): Define.
8024 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
8025 moved out of readchar.
8026 (readchar): Rewrite. Call reschedule before returning.
8027 (reset_readchar): New function.
8028 (remote_close): Call it.
8029 (process_remaining, reschedule): New functions.
8030 * server.h (callback_handler_func): New typedef.
8031 (append_callback_event, delete_callback_event): Declare.
8032
9836d6ea
PA
80332010-05-03 Pedro Alves <pedro@codesourcery.com>
8034
8035 * proc-service.c (ps_pglobal_lookup): Use
8036 thread_db_look_up_one_symbol.
8037 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
8038 parameter. Use it instead of all_symbols_looked_up.
8039 * server.h (struct process_info) <all_symbols_looked_up>: Delete
8040 field.
8041 (all_symbols_looked_up): Don't declare.
8042 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
8043 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
8044 field.
8045 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
8046 Set all_symbols_looked_up here.
8047 (thread_db_look_up_one_symbol): New.
8048 (thread_db_get_tls_address): Adjust.
8049 (thread_db_load_search, try_thread_db_load_1): Always allocate the
8050 thread_db object on the heap, and tentatively set it in the
8051 process structure.
8052 (thread_db_init): Don't set all_symbols_looked_up here.
8053 * linux-low.h (thread_db_look_up_one_symbol): Declare.
8054
7984d532
PA
80552010-05-03 Pedro Alves <pedro@codesourcery.com>
8056
8057 * linux-low.c (linux_kill, linux_detach): Adjust.
8058 (status_pending_p_callback): Remove redundant statement. Check
8059 for !TARGET_WAITIKIND_IGNORE, instead of
8060 TARGET_WAITKIND_STOPPED.
8061 (handle_tracepoints): Make sure LWP is locked. Adjust.
8062 (linux_wait_for_event_1): Adjust.
8063 (linux_cancel_breakpoints): New.
8064 (unsuspend_one_lwp): New.
8065 (unsuspend_all_lwps): New.
8066 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
8067 (send_sigstop_callback): Change return type to int, add new
8068 `except' parameter and handle it.
8069 (suspend_and_send_sigstop_callback): New.
8070 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
8071 pass them down. If SUSPEND, also increment the lwp's suspend
8072 count.
8073 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
8074 (need_step_over_p): Don't consider suspended LWPs.
8075 (start_step_over): Adjust.
8076 (proceed_one_lwp): Change return type to int, add new `except'
8077 parameter and handle it.
8078 (unsuspend_and_proceed_one_lwp): New.
8079 (proceed_all_lwps): Use find_inferior instead of
8080 for_each_inferior.
8081 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
8082 also decrement the suspend count of LWPs. Pass `except' down,
8083 instead of hacking its suspend count.
8084 (linux_pause_all): Add `freeze' parameter. Adjust.
8085 (linux_unpause_all): New.
8086 (linux_target_ops): Install linux_unpause_all.
8087 * server.c (handle_status): Adjust.
8088 * target.h (struct target_ops): New fields `unpause_all' and
8089 `cancel_breakpoints'. Add new parameter to `pause_all'.
8090 (pause_all): Add new `freeze' parameter.
8091 (unpause_all): New.
8092 (cancel_breakpoints): New.
8093 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
8094 cancel breakpoints.
8095 (cmd_qtstart): Pause threads.
8096 (stop_tracing): Pause threads, and cancel breakpoints.
8097 * win32-low.c (win32_target_ops): Adjust.
8098
e471f25b
PA
80992010-05-03 Pedro Alves <pedro@codesourcery.com>
8100
8101 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
8102 the inferior right away from here...
8103 (linux_wait_1): ... to here, and adjust to check the thread's
8104 last_resume_kind instead of the lwp's step or stop_expected flags.
8105
1915ef4f
PA
81062010-05-02 Pedro Alves <pedro@codesourcery.com>
8107
8108 * README: Use consistent `GDB' and `GDBserver' spellings.
8109
f9e39928
PA
81102010-05-02 Pedro Alves <pedro@codesourcery.com>
8111
8112 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
8113 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
8114 (linux_detach_one_lwp): Assume the lwp is stopped.
8115 (any_thread_of): Delete.
8116 (linux_detach): Stop all lwps here. Don't blindly delete all
8117 breakpoints.
8118 (delete_lwp_callback): New.
8119 (linux_mourn): Delete all lwps of the process that is gone.
8120 (linux_wait_1): Don't delete the last lwp of the process here.
8121 * mem-break.h (mark_breakpoints_out): Declare.
8122 * mem-break.c (mark_breakpoints_out): New.
8123 (free_all_breakpoints): Use it.
8124 * server.c (handle_target_event): If the process is gone, mark
8125 breakpoints out.
8126 * thread-db.c (struct thread_db) <create_bp>: New field.
8127 (thread_db_enable_reporting): Fix prototype. Store a thread event
8128 breakpoint reference in the thread_db struct.
8129 (thread_db_load_search): Clear the thread_db object.
8130 (try_thread_db_load_1): Ditto.
8131 (switch_to_process): New.
8132 (disable_thread_event_reporting): Use it.
8133 (remove_thread_event_breakpoints): New.
8134 (thread_db_detach, thread_db_mourn): Use it.
8135
1e7fc18c
PA
81362010-05-01 Pedro Alves <pedro@codesourcery.com>
8137
8138 * linux-low.c (linux_enable_event_reporting): New.
8139 (linux_wait_for_event_1, handle_extended_wait): Use it.
8140
02fc4de7
PA
81412010-04-30 Pedro Alves <pedro@codesourcery.com>
8142
8143 * linux-low.c (linux_kill_one_lwp, linux_kill)
8144 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
8145 (send_sigstop): Take an lwp_info as parameter instead. Queue a
8146 SIGSTOP even if the LWP is stopped.
8147 (send_sigstop_callback): New.
8148 (stop_all_lwps): Use send_sigstop_callback instead.
8149 (linux_resume_one_thread): Adjust.
8150 (proceed_one_lwp): Still proceed an LWP that the client has
8151 requested to stop, if we haven't reported it as stopped yet. Make
8152 sure that LWPs the client want stopped, have a pending SIGSTOP.
8153
bc3b5632
DE
81542010-04-26 Doug Evans <dje@google.com>
8155
ae1ada35
DE
8156 * server.c (handle_general_set): Make static.
8157
bc3b5632
DE
8158 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
8159 Print received char after testing for error/eof instead of before.
8160 (input_interrupt): Tweak comment.
8161
65730243
DE
81622010-04-23 Doug Evans <dje@google.com>
8163
8164 * server.c (start_inferior): Print inferior argv if --debug.
8165
a8ae7dc0
AR
81662010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
8167
8168 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
8169 * nto-x86-low.c: Include server.h
8170
1c07cc19
PM
81712010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
8172
8173 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
8174 be consistent with other sources of this directory.
8175 (init_registers_amd64): Correct name of source file of this function
8176 in the comment.
8177
e0a61e09
PM
81782010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8179
8180 * configure.srv (x86_64-*-mingw*): New configuration for Windows
8181 64-bit executables.
8182
54709339
PM
81832010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8184
8185 * win32-i386-low.c: Add 64-bit support.
8186 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
8187 (init_registers_amd64): Declare.
8188 (mappings): Add 64-bit version of array.
8189 (init_windows_x86): New function.
8190 (the_low_target): Change init_arch field to init_windows_x86.
8191
e8f0053d
PM
81922010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8193
8194 * win32-low.c: Adapt to support also 64-bit architecture.
8195 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
8196 (get_image_name): Use SIZE_T type for local variable `done'.
8197 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
8198 (toolhelp_get_dll_name): Idem.
8199 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
8200 Use uintptr_t typecast to avoid warning.
8201 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
8202 (handle_exception): Use phex_nz to avoid warning.
8203 (win32_wait): Remove unused local variable `process'.
8204
c481e77e
PM
82052010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8206
8207 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
8208 `amd64-avx.o'.
8209
12ea4b69
PM
82102010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
8211
8212 * configure.ac: Use `ws2_32' library for srv_mingw.
8213 * configure: Regenerate.
8214 * gdbreplay.c: Include winsock2.h instead of winsock.h.
8215 * remote-utils.c: Likewise.
8216
f6d1620c
L
82172010-04-17 H.J. Lu <hongjiu.lu@intel.com>
8218
8219 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
8220 if __x86_64__ is defined.
8221
8e642873
PM
82222010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
8223
8224 * configure: Regenerate.
8225
711e434b
PM
82262010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
8227
8228 * server.c (handle_query): Handle 'qGetTIBAddr' query.
8229 * target.h (target_ops): New get_tib_address field.
8230 * win32-low.h (win32_thread_info): Add thread_local_base field.
8231 * win32-low.c (child_add_thread): Add tlb argument.
8232 Set thread_local_base field to TLB.
8233 (get_child_debug_event): Adapt to child_add_thread change.
8234 (win32_get_tib_address): New function.
8235 (win32_target_ops): Set get_tib_address field to
8236 win32_get_tib_address.
8237 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
8238
505106cd
PA
82392010-04-12 Pedro Alves <pedro@codesourcery.com>
8240
505106cd
PA
8241 * linux-low.c (linux_mourn): Also remove the process.
8242 * server.c (handle_target_event): Don't remove the process here.
8243 * nto-low.c (nto_mourn): New.
8244 (nto_target_ops): Install it.
8245 * spu-low.c (spu_mourn): New.
8246 (spu_target_ops): Install it.
8247 * win32-low.c (win32_mourn): New.
8248 (win32_target_ops): Install it.
8249
e8470a06
PA
82502010-04-12 Pedro Alves <pedro@codesourcery.com>
8251
8252 * server.h (buffer_xml_printf): Remove redundant `;'.
8253
45ba0d02
PA
82542010-04-12 Pedro Alves <pedro@codesourcery.com>
8255
8256 * regcache.c (set_register_cache): Invalidate regcaches before
8257 changing the register cache layout.
8258 (regcache_invalidate_one): Allow a NULL regcache.
8259 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
8260 regcaches before changing the register cache layout or the target
8261 regsets.
8262
59e04013
L
82632010-04-12 H.J. Lu <hongjiu.lu@intel.com>
8264
8265 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
8266 variable warning on Linux/x86-64.
8267
8336d594
PA
82682010-04-11 Pedro Alves <pedro@codesourcery.com>
8269
8270 GDBserver disconnected tracing support.
8271
8272 * linux-low.c (linux_remove_process): Delete.
8273 (add_lwp): Don't set last_resume_kind here.
8274 (linux_kill): Use `mourn'.
8275 (linux_detach): Use `thread_db_detach', and `mourn'.
8276 (linux_mourn): New.
8277 (linux_attach_lwp_1): Adjust comment.
8278 (linux_attach): last_resume_kind moved the thread_info; adjust.
8279 (status_pending_p_callback): Adjust.
8280 (linux_wait_for_event_1): Adjust.
8281 (count_events_callback, select_singlestep_lwp_callback)
8282 (select_event_lwp_callback, cancel_breakpoints_callback)
8283 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
8284 (proceed_one_lwp): Adjust.
8285 (linux_async): Add debug output.
8286 (linux_thread_stopped): New.
8287 (linux_pause_all): New.
8288 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
8289 linux_pause_all.
8290 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
8291 (thread_db_free): Delete declaration.
8292 (thread_db_detach, thread_db_mourn): Declare.
8293 * thread-db.c (thread_db_init): Use thread_db_mourn.
8294 (thread_db_free): Delete, split in two.
8295 (disable_thread_event_reporting): New.
8296 (thread_db_detach): New.
8297 (thread_db_mourn): New.
8298
8299 * server.h (struct thread_info) <last_resume_kind>: New field.
8300 <attached>: Add comment.
8301 <gdb_detached>: New field.
8302 (handler_func): Change return type to int.
8303 (handle_serial_event, handle_target_event): Ditto.
8304 (gdb_connected): Declare.
8305 (tracing): Delete.
8306 (disconnected_tracing): Declare.
8307 (stop_tracing): Declare.
8308
8309 * server.c (handle_query) <qSupported>: Report support for
8310 disconnected tracing.
8311 (queue_stop_reply_callback): Account for running threads.
8312 (gdb_wants_thread_stopped): New.
8313 (gdb_wants_all_threads_stopped): New.
8314 (gdb_reattached_process): New.
8315 (handle_status): Clear the `gdb_detached' flag of all processes.
8316 In all-stop, stop all threads.
8317 (main): Be sure to leave tfind mode. Handle disconnected tracing.
8318 (process_serial_event): If the remote connection breaks, or if an
8319 exit was forced with "monitor exit", force an event loop exit.
8320 Handle disconnected tracing on detach.
8321 (handle_serial_event): Adjust.
8322 (handle_target_event): If GDB isn't connected, forward events back
8323 to the inferior, unless the last process exited, in which case,
8324 exit gdbserver. Adjust interface.
8325
8326 * remote-utils.c (remote_open): Don't block in accept. Instead
8327 register an event loop source on the listen socket file
8328 descriptor. Refactor bits into ...
8329 (listen_desc): ... this new global.
8330 (gdb_connected): ... this new function.
8331 (enable_async_notification): ... this new function.
8332 (handle_accept_event): ... this new function.
8333 (remote_close): Clear remote_desc.
8334
8335 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
8336
8337 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
8338 New fields.
8339 (mourn_inferior): Define.
8340 (target_process_qsupported): Avoid the dangling else problem.
8341 (thread_stopped): Define.
8342 (pause_all): Define.
8343 (target_waitstatus_to_string): Declare.
8344 * target.c (target_waitstatus_to_string): New.
8345
8346 * tracepoint.c (tracing): Make extern.
8347 (disconnected_tracing): New.
8348 (stop_tracing): Make extern. Handle tracing stops due to GDB
8349 disconnecting.
8350 (cmd_qtdisconnected): New.
8351 (cmd_qtstatus): Report disconnected tracing status in trace reply.
8352 (handle_tracepoint_general_set): Handle QTDisconnected.
8353
8354 * event-loop.c (event_handler_func): Change return type to int.
8355 (process_event): Bail out if the event handler wants the event
8356 loop to stop.
8357 (handle_file_event): Ditto.
8358 (start_event_loop): Bail out if the event handler wants the event
8359 loop to stop.
8360
8361 * nto-low.c (nto_target_ops): Adjust.
8362 * spu-low.c (spu_wait): Don't remove the process here.
8363 (spu_target_ops): Adjust.
8364 * win32-low.c (win32_wait): Don't remove the process here.
8365 (win32_target_ops): Adjust.
8366
5d267c4c
PA
83672010-04-11 Pedro Alves <pedro@codesourcery.com>
8368
8369 * regcache.c (realloc_register_cache): Invalidate inferior's
8370 regcache before recreating it.
8371
623ccd72
PA
83722010-04-09 Pedro Alves <pedro@codesourcery.com>
8373
8374 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
8375
219f2f23
PA
83762010-04-09 Stan Shebs <stan@codesourcery.com>
8377 Pedro Alves <pedro@codesourcery.com>
8378
8379 * server.h (LONGEST): New.
8380 (struct thread_info) <while_stepping>: New field.
8381 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
8382 Declare.
8383 (initialize_tracepoint, handle_tracepoint_general_set)
8384 (handle_tracepoint_query, tracepoint_finished_step)
8385 (tracepoint_was_hit, release_while_stepping_state_list):
8386 (current_traceframe): Declare.
8387 * server.c (handle_general_set): Handle tracepoint packets.
8388 (read_memory): New.
8389 (write_memory): New.
8390 (handle_search_memory_1): Use read_memory.
8391 (handle_query): Report support for conditional tracepoints, trace
8392 state variables, and tracepoint sources. Handle tracepoint
8393 queries.
8394 (main): Initialize the tracepoints module.
8395 (process_serial_event): Handle traceframe reads/writes.
8396
8397 * linux-low.c (handle_tracepoints): New.
8398 (linux_wait_1): Call it.
8399 (linux_resume_one_lwp): Handle while-stepping.
8400 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
8401 (linux_target_ops): Install them.
8402 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
8403 New field.
8404 * linux-x86-low.c (x86_supports_tracepoints): New.
8405 (the_low_target). Install it.
8406
8407 * mem-break.h (delete_breakpoint): Declare.
8408 * mem-break.c (delete_breakpoint): Make external.
8409
8410 * target.h (struct target_ops): Add `supports_tracepoints',
8411 `read_pc', and `write_pc' fields.
8412 (target_supports_tracepoints): Define.
8413 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
8414 (phex_nz): New.
8415
8416 * regcache.h (struct regcache) <registers_owned>: New field.
8417 (init_register_cache, regcache_cpy): Declare.
8418 (regcache_read_pc, regcache_write_pc): Declare.
8419 (register_cache_size): Declare.
8420 (supply_regblock): Declare.
8421 * regcache.c (init_register_cache): New.
8422 (new_register_cache): Use it.
8423 (regcache_cpy): New.
8424 (register_cache_size): New.
8425 (supply_regblock): New.
8426 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 8427
219f2f23
PA
8428 * tracepoint.c: New.
8429
8430 * Makefile.in (OBS): Add tracepoint.o.
8431 (tracepoint.o): New rule.
8432
3a13a53b
L
84332010-04-08 H.J. Lu <hongjiu.lu@intel.com>
8434
8435 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
8436 (i386-mmx.o): New.
8437 (i386-mmx.c): Likewise.
8438 (i386-mmx-linux.o): Likewise.
8439 (i386-mmx-linux.c): Likewise.
8440
8441 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
8442 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
8443 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
8444 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
8445
8446 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
8447 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
8448 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
8449
1570b33e
L
84502010-04-07 H.J. Lu <hongjiu.lu@intel.com>
8451
8452 * Makefile.in (clean): Updated.
8453 (i386-avx.o): New.
8454 (i386-avx.c): Likewise.
8455 (i386-avx-linux.o): Likewise.
8456 (i386-avx-linux.c): Likewise.
8457 (amd64-avx.o): Likewise.
8458 (amd64-avx.c): Likewise.
8459 (amd64-avx-linux.o): Likewise.
8460 (amd64-avx-linux.c): Likewise.
8461
8462 * configure.srv (srv_i386_regobj): Add i386-avx.o.
8463 (srv_i386_linux_regobj): Add i386-avx-linux.o.
8464 (srv_amd64_regobj): Add amd64-avx.o.
8465 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
8466 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
8467 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
8468 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
8469 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
8470 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
8471 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
8472
8473 * i387-fp.c: Include "i386-xstate.h".
8474 (i387_xsave): New.
8475 (i387_cache_to_xsave): Likewise.
8476 (i387_xsave_to_cache): Likewise.
8477 (x86_xcr0): Likewise.
8478
8479 * i387-fp.h (i387_cache_to_xsave): Likewise.
8480 (i387_xsave_to_cache): Likewise.
8481 (x86_xcr0): Likewise.
8482
8483 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
8484 * linux-crisv32-low.c (target_regsets): Likewise.
8485 * linux-m68k-low.c (target_regsets): Likewise.
8486 * linux-mips-low.c (target_regsets): Likewise.
8487 * linux-ppc-low.c (target_regsets): Likewise.
8488 * linux-s390-low.c (target_regsets): Likewise.
8489 * linux-sh-low.c (target_regsets): Likewise.
8490 * linux-sparc-low.c (target_regsets): Likewise.
8491 * linux-xtensa-low.c (target_regsets): Likewise.
8492
8493 * linux-low.c: Include <sys/uio.h>.
8494 (regsets_fetch_inferior_registers): Support nt_type.
8495 (regsets_store_inferior_registers): Likewise.
8496 (linux_process_qsupported): New.
8497 (linux_target_ops): Add linux_process_qsupported.
8498
8499 * linux-low.h (regset_info): Add nt_type.
8500 (linux_target_ops): Add process_qsupported.
8501
8502 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
8503 and <sys/uio.h>.
8504 (init_registers_i386_avx_linux): New.
8505 (init_registers_amd64_avx_linux): Likewise.
8506 (xmltarget_i386_linux_no_xml): Likewise.
8507 (xmltarget_amd64_linux_no_xml): Likewise.
8508 (PTRACE_GETREGSET): Likewise.
8509 (PTRACE_SETREGSET): Likewise.
8510 (x86_fill_xstateregset): Likewise.
8511 (x86_store_xstateregset): Likewise.
8512 (use_xml): Likewise.
8513 (x86_linux_update_xmltarget): Likewise.
8514 (x86_linux_process_qsupported): Likewise.
8515 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
8516 (x86_arch_setup): Don't call init_registers_amd64_linux nor
8517 init_registers_i386_linux here. Call
8518 x86_linux_update_xmltarget.
8519 (the_low_target): Add x86_linux_process_qsupported.
8520
8521 * server.c (handle_query): Call target_process_qsupported.
8522
8523 * target.h (target_ops): Add process_qsupported.
8524 (target_process_qsupported): New.
8525
fc7238bb
PA
85262010-04-03 Pedro Alves <pedro@codesourcery.com>
8527
8528 * inferiors.c (add_thread): Set last_status kind to
8529 TARGET_WAITKIND_IGNORE.
8530 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
8531 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
8532 (linux_wait_1): Move `thread' local definition to block that uses
8533 it. Don't NULL initialize `event_child'.
8534 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
8535 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
8536 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
8537
bdabb078
PA
85382010-04-01 Pedro Alves <pedro@codesourcery.com>
8539
8540 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
8541 an extended waitstatus, or by a watchpoint.
8542 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
8543 thread was stepping or has been stopped by a watchpoint.
8544
d3bbe7a0
PA
85452010-04-01 Pedro Alves <pedro@codesourcery.com>
8546
8547 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
8548 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
8549 of another, then delete the previous, and validate all
8550 breakpoints.
8551 (validate_inserted_breakpoint): New.
8552 (delete_disabled_breakpoints): New.
8553 (validate_breakpoints): New.
8554 (check_mem_read): Validate breakpoints before trusting their
8555 shadow. Delete disabled breakpoints.
8556 (check_mem_write): Validate breakpoints before trusting they
8557 should be inserted. Delete disabled breakpoints.
8558 * mem-break.h (validate_breakpoints):
8559 * server.c (handle_query): Validate breakpoints when we see a
8560 qSymbol query.
8561
8b07ae33
PA
85622010-04-01 Pedro Alves <pedro@codesourcery.com>
8563
8564 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
8565 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
8566 if we could tell there's a GDB breakpoint at stop_pc.
8567 (need_step_over_p): Don't do a step over if we find a GDB
8568 breakpoint at the resume PC.
8569
8570 * mem-break.c (struct raw_breakpoint): New.
8571 (enum bkpt_type): New type `gdb_breakpoint'.
8572 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
8573 fields. New field `raw'.
8574 (find_raw_breakpoint_at): New.
8575 (set_raw_breakpoint_at): Handle refcounting. Create a raw
8576 breakpoint instead.
8577 (set_breakpoint_at): Adjust.
8578 (delete_raw_breakpoint): New.
8579 (release_breakpoint): New.
8580 (delete_breakpoint): Rename to...
8581 (delete_breakpoint_1): ... this. Add proc parameter. Use
8582 release_breakpoint. Return ENOENT.
8583 (delete_breakpoint): Reimplement.
8584 (find_breakpoint_at): Delete.
8585 (find_gdb_breakpoint_at): New.
8586 (delete_breakpoint_at): Delete.
8587 (set_gdb_breakpoint_at): New.
8588 (delete_gdb_breakpoint_at): New.
8589 (gdb_breakpoint_here): New.
8590 (set_reinsert_breakpoint): Use release_breakpoint.
8591 (uninsert_breakpoint): Rename to ...
8592 (uninsert_raw_breakpoint): ... this.
8593 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
8594 (reinsert_raw_breakpoint): Change parameter type to
8595 raw_breakpoint.
8596 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
8597 instead.
8598 (check_breakpoints): Adjust. Use release_breakpoint.
8599 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
8600 (breakpoint_inserted_here): Ditto.
8601 (check_mem_read): Adjust to iterate over raw breakpoints instead.
8602 Don't trust the breakpoint's shadow if it is not inserted.
8603 (check_mem_write): Adjust to iterate over raw breakpoints instead.
8604 (delete_all_breakpoints): Adjust.
8605 (free_all_breakpoints): Mark all breakpoints as uninserted, and
8606 use delete_breakpoint_1.
8607
8608 * mem-break.h (breakpoints_supported): Delete declaration.
8609 (set_gdb_breakpoint_at): Declare.
8610 (gdb_breakpoint_here): Declare.
8611 (delete_breakpoint_at): Delete.
8612 (delete_gdb_breakpoint_at): Declare.
8613
8614 * server.h (struct raw_breakpoint): Forward declare.
8615 (struct process_info): New field `raw_breakpoints'.
8616
8617 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
8618 breakpoints.
8619
6bf5e0ba
PA
86202010-03-24 Pedro Alves <pedro@codesourcery.com>
8621
8622 * linux-low.c (status_pending_p_callback): Fix comment.
8623 (linux_wait_for_event_1): Move most of the internal breakpoint
8624 handling from here...
8625 (linux_wait_1): ... to here.
8626 (count_events_callback): New.
8627 (select_singlestep_lwp_callback): New.
8628 (select_event_lwp_callback): New.
8629 (cancel_breakpoints_callback): New.
8630 (select_event_lwp): New.
8631 (linux_wait_1): Simplify internal breakpoint handling. Give equal
8632 priority to all LWPs that have had events that should be reported
8633 to the client. Cancel breakpoints when about to reporting the
8634 event to the client, not while stopping lwps. No longer cancel
8635 finished single-steps here.
8636 (cancel_finished_single_step): Delete.
8637 (cancel_finished_single_steps): Delete.
8638
414a389f
PA
86392010-03-24 Pedro Alves <pedro@codesourcery.com>
8640
8641 * mem-break.c (enum bkpt_type): New.
8642 (struct breakpoint): New field `type'.
8643 (set_breakpoint_at): Change return type to struct breakpoint
8644 pointer. Set type to `other_breakpoint' by default.
8645 (delete_breakpoint): Rewrite, supporting more than one breakpoint
8646 in the breakpoint list.
8647 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
8648 (reinsert_breakpoint): Rename to ...
8649 (reinsert_raw_breakpoint): ... this.
8650 (reinsert_breakpoints_at): Adjust.
8651 * mem-break.h (struct breakpoint): Declare.
8652 (set_breakpoint_at): Change return type to struct breakpoint
8653 pointer.
8654
2280c721
PA
86552010-03-24 Pedro Alves <pedro@codesourcery.com>
8656
8657 * server.c (handle_query): Assign, not compare.
8658
d50171e4
PA
86592010-03-24 Pedro Alves <pedro@codesourcery.com>
8660
8661 Teach linux gdbserver to step-over-breakpoints.
8662
8663 * linux-low.c (can_hardware_single_step): New.
8664 (supports_breakpoints): New.
8665 (handle_extended_wait): If stopping threads, read the stop pc of
8666 the new cloned LWP.
8667 (get_pc): New.
8668 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
8669 low target doesn't support retrieving the PC.
8670 (add_lwp): Set last_resume_kind to resume_continue.
8671 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
8672 (linux_attach): Don't clear stop_expected. Set the lwp's
8673 last_resume_kind to resume_stop.
8674 (linux_detach_one_lwp): Don't check for removed breakpoints.
8675 (check_removed_breakpoint): Delete.
8676 (status_pending_p): Rename to ...
8677 (status_pending_p_callback): ... this. Don't check for removed
8678 breakpoints. Don't consider threads that are stopped from GDB's
8679 perspective.
8680 (linux_wait_for_lwp): Always read the stop_pc here.
8681 (cancel_breakpoint): New.
8682 (step_over_bkpt): New global.
8683 (linux_wait_for_event_1): Implement stepping over breakpoints.
8684 (gdb_wants_lwp_stopped): New.
8685 (gdb_wants_all_stopped): New.
8686 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
8687 single-step traps here. Store the thread's last reported target
8688 wait status.
8689 (send_sigstop): Don't clear stop_expected. Always set it,
8690 instead.
8691 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
8692 (cancel_finished_single_step): New.
8693 (cancel_finished_single_steps): New.
8694 (wait_for_sigstop): Don't cancel finished single-step traps here.
8695 (linux_resume_one_lwp): Don't check for removed breakpoints.
8696 Don't set `step' on non-hardware step archs.
8697 (linux_set_resume_request): Ignore resume_stop requests if already
8698 stopping or stopped. Set the lwp's last_resume_kind.
8699 (resume_status_pending_p): Don't check for removed breakpoints.
8700 (need_step_over_p): New.
8701 (start_step_over): New.
8702 (finish_step_over): New.
8703 (linux_resume_one_thread): Always queue a sigstop for resume_stop
8704 requests. Clear the thread's last reported target waitstatus.
8705 Don't use the `suspended' flag. Don't consider pending breakpoints.
8706 (linux_resume): Start a step-over if necessary.
8707 (proceed_one_lwp): New.
8708 (proceed_all_lwps): New.
8709 (unstop_all_lwps): New.
8710 * linux-low.h (struct lwp_info): Rewrite comment for the
8711 `suspended' flag. Add the `stop_pc' field. Delete the
8712 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
8713 Add `'last_resume_kind' and `need_step_over' fields.
8714 * inferiors.c (struct thread_info): Delete, moved elsewhere.
8715 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
8716 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
8717 (set_raw_breakpoint_at): New.
8718 (set_breakpoint_at): Rewrite to use it.
8719 (reinsert_breakpoint_handler): Delete.
8720 (set_reinsert_breakpoint): New.
8721 (reinsert_breakpoint_by_bp): Delete.
8722 (delete_reinsert_breakpoints): New.
8723 (uninsert_breakpoint): Rewrite.
8724 (uninsert_breakpoints_at): New.
8725 (reinsert_breakpoint): Rewrite.
8726 (reinsert_breakpoints_at): New.
8727 (check_breakpoints): Rewrite.
8728 (breakpoint_here): New.
8729 (breakpoint_inserted_here): New.
8730 (check_mem_read): Adjust.
8731 * mem-break.h (breakpoints_supported, breakpoint_here)
8732 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
8733 (reinsert_breakpoint_by_bp): Delete declaration.
8734 (delete_reinsert_breakpoints): Declare.
8735 (reinsert_breakpoint): Delete declaration.
8736 (reinsert_breakpoints_at): Declare.
8737 (uninsert_breakpoint): Delete declaration.
8738 (uninsert_breakpoints_at): Declare.
8739 (check_breakpoints): Adjust prototype.
8740 * server.h: Adjust include order.
8741 (struct thread_info): Declare here. Add a `last_status' field.
8742
30ba68cb
MS
87432010-03-23 Michael Snyder <msnyder@vmware.com>
8744
8745 * server.c (crc32): New function.
8746 (handle_query): Add handling for 'qCRC:' request.
8747
b9a881c2
PA
87482010-03-23 Pedro Alves <pedro@codesourcery.com>
8749
8750 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
8751 lwp had been stopped by a watchpoint.
8752
e92d13d5
PA
87532010-03-16 Pedro Alves <pedro@codesourcery.com>
8754
8755 * server.h (internal_error): Declare.
8756 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
8757 * utils.c (internal_error): New function.
8758
64daa791
AS
87592010-03-15 Andreas Schwab <schwab@redhat.com>
8760
8761 * configure.srv: Fix typo setting srv_regobj.
8762
f52cd8cd
PA
87632010-03-15 Pedro Alves <pedro@codesourcery.com>
8764
8765 * linux-low.c (fetch_register): Avoid passing a non string literal
8766 format to `error'.
8767 (usr_store_inferior_registers): Ditto.
8768
93ae6fdc
PA
87692010-03-14 Pedro Alves <pedro@codesourcery.com>
8770
8771 * linux-low.c (linux_write_memory): Bail out early if peeking
8772 memory failed.
8773
c3adc08c
PA
87742010-03-14 Pedro Alves <pedro@codesourcery.com>
8775
8776 * linux-low.h (struct lwp_info): New fields
8777 `stopped_by_watchpoint' and `stopped_data_address'.
8778 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
8779 here, and cache them in the lwp object.
8780 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
8781 directly.
8782 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
8783 field.
8784 (linux_stopped_by_watchpoint): Rewrite.
8785 (linux_stopped_data_address): Rewrite.
8786
bce522a2
PA
87872010-03-06 Simo Melenius <simo.melenius@iki.fi>
8788
8789 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
8790 switching the current inferior, not before.
8791
90884b2b
L
87922010-03-01 H.J. Lu <hongjiu.lu@intel.com>
8793
8794 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
8795 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
8796 i386-linux.c and amd64-linux.c.
8797 (reg-i386.o): Removed.
8798 (reg-i386.c): Likewise.
8799 (reg-i386-linux.o): Likewise.
8800 (reg-i386-linux.c): Likewise.
8801 (reg-x86-64.o): Likewise.
8802 (reg-x86-64.c): Likewise.
8803 (reg-x86-64-linux.o): Likewise.
8804 (reg-x86-64-linux.c): Likewise.
8805 (i386.o): New.
8806 (i386.c): Likewise.
8807 (i386-linux.o): Likewise.
8808 (i386-linux.c): Likewise.
8809 (amd64.o): Likewise.
8810 (amd64.c): Likewise.
8811 (amd64-linux.o): Likewise.
8812 (amd64-linux.c): Likewise.
8813
8814 * configure.srv (srv_i386_regobj): New.
8815 (srv_i386_linux_regobj): Likewise.
8816 (srv_amd64_regobj): Likewise.
8817 (srv_amd64_linux_regobj): Likewise.
8818 (srv_i386_32bit_xmlfiles): Likewise.
8819 (srv_i386_64bit_xmlfiles): Likewise.
8820 (srv_i386_xmlfiles): Likewise.
8821 (srv_amd64_xmlfiles): Likewise.
8822 (srv_i386_linux_xmlfiles): Likewise.
8823 (srv_amd64_linux_xmlfiles): Likewise.
8824 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
8825 srv_xmlfiles to $srv_i386_xmlfiles.
8826 (i[34567]86-*-mingw32ce*): Likewise.
8827 (i[34567]86-*-mingw*): Likewise.
8828 (i[34567]86-*-nto*): Likewise.
8829 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
8830 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
8831 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
8832 (x86_64-*-linux*): Likewise.
8833
8834 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
8835 (init_registers_amd64_linux): New.
8836 (x86_arch_setup): Replace init_registers_x86_64_linux with
8837 init_registers_amd64_linux.
8838
193f13e6
MK
88392010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
8840
8841 * configure.ac: Check for libdl. If it is not available link against
8842 static libthread_db.
8843 * configure: Regenerate.
8844
85d721b8
PA
88452010-02-22 Pedro Alves <pedro@codesourcery.com>
8846
8847 PR9605
8848
8849 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
8850 handing a read watchpoint.
8851 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
8852
6076632b
DE
88532010-02-12 Doug Evans <dje@google.com>
8854
8855 * linux-low.c (linux_supports_tracefork_flag): Document.
8856 (linux_look_up_symbols): Add comment.
8857
3327ccf7
L
88582010-02-03 H.J. Lu <hongjiu.lu@intel.com>
8859
8860 * regcache.c (supply_register): Clear regcache if buf is NULL.
8861
0718675c 88622010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 8863 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
8864
8865 * inferiors.c (find_inferior): Add function documentation.
8866 (unloaded_dll): Handle the case where the unloaded dll has not
8867 been previously registered in the dll list.
8868
177321bd
DJ
88692010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
8870
8871 * linux-arm-low.c (thumb_breakpoint_len): Delete.
8872 (thumb2_breakpoint): New.
8873 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
8874
2b009048
DJ
88752010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
8876
8877 * linux-low.c (get_stop_pc): Check for SIGTRAP.
8878 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
8879 breakpoints.
8880
3be029c7
PA
88812010-01-21 Pedro Alves <pedro@codesourcery.com>
8882
8883 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
8884
18f5de3b
JK
88852010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
8886
8887 * linux-s390-low.c (s390_collect_ptrace_register)
8888 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
8889
3743bb4f
DE
88902010-01-21 Doug Evans <dje@google.com>
8891
14ce3065
DE
8892 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
8893 (PTRACE_ARG4_TYPE): New macro.
8894 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
8895 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
8896 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
8897 (usr_store_inferior_registers): Ditto.
8898 (linux_read_memory, linux_write_memory): Ditto.
8899 (linux_test_for_tracefork): Ditto.
8900
3743bb4f
DE
8901 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
8902 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
8903
8b315be5
PA
89042010-01-21 Pedro Alves <pedro@codesourcery.com>
8905
8906 * proc-service.c (ps_lgetregs): Don't refetch registers from the
8907 target.
8908
85492558
PA
89092010-01-21 Pedro Alves <pedro@codesourcery.com>
8910
8911 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
8912 prototype to take a regcache. Adjust.
8913
442ea881
PA
89142010-01-20 Pedro Alves <pedro@codesourcery.com>
8915
8916 * regcache.h (struct thread_info): Forward declare.
8917 (struct regcache): New.
8918 (new_register_cache): Adjust prototype.
8919 (get_thread_regcache): Declare.
8920 (free_register_cache): Adjust prototype.
8921 (registers_to_string, registers_from_string): Ditto.
8922 (supply_register, supply_register_by_name, collect_register)
8923 (collect_register_as_string, collect_register_by_name): Ditto.
8924 * regcache.c (struct inferior_regcache_data): Delete.
8925 (get_regcache): Rename to ...
8926 (get_thread_regcache): ... this. Adjust. Switch inferior before
8927 fetching registers.
8928 (regcache_invalidate_one): Adjust.
8929 (regcache_invalidate): Fix prototype.
8930 (new_register_cache): Return the new register cache.
8931 (free_register_cache): Change prototype.
8932 (realloc_register_cache): Adjust.
8933 (registers_to_string): Change prototype to take a regcache. Adjust.
8934 (registers_from_string): Ditto.
8935 (register_data): Ditto.
8936 (supply_register): Ditto.
8937 (supply_register_by_name): Ditto.
8938 (collect_register): Ditto.
8939 (collect_register_as_string): Ditto.
8940 (collect_register_by_name): Ditto.
8941 * server.c (process_serial_event): Adjust.
8942 * linux-low.h (regset_fill_func, regset_store_func): Change
8943 prototype.
8944 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
8945 Change prototype.
8946 * linux-low.c (get_stop_pc): Adjust.
8947 (check_removed_breakpoint): Adjust.
8948 (linux_wait_for_event): Adjust.
8949 (linux_resume_one_lwp): Adjust.
8950 (fetch_register): Add regcache parameter. Adjust.
8951 (usr_store_inferior_registers): Ditto.
8952 (regsets_fetch_inferior_registers): Ditto.
8953 (regsets_store_inferior_registers): Ditto.
8954 (linux_fetch_registers, linux_store_registers): Ditto.
8955 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
8956 regcache. Adjust.
43aaf8b6
PA
8957 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
8958 Ditto.
442ea881
PA
8959 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
8960 prototype to take a regcache.
8961 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
8962 * remote-utils.c (convert_ascii_to_int, outreg)
8963 (prepare_resume_reply): Change prototype to take a regcache.
8964 Adjust.
8965 * target.h (struct target_ops) <fetch_registers, store_registers>:
8966 Change prototype to take a regcache.
8967 (fetch_inferior_registers, store_inferior_registers): Change
8968 prototype to take a regcache. Adjust.
8969 * proc-service.c (ps_lgetregs): Adjust.
8970 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
8971 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
8972 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
8973 take a regcache. Adjust.
8974 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
8975 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
8976 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
8977 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
8978 * linux-cris-low.c (cris_get_pc, cris_set_pc)
8979 (cris_cannot_fetch_register):
8980 (cris_breakpoint_at): Change prototype to take a regcache.
8981 Adjust.
8982 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
8983 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
8984 to take a regcache. Adjust.
8985 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
8986 Adjust.
8987 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
8988 take a regcache. Adjust.
8989 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
8990 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
8991 (m68k_set_pc): Change prototype to take a regcache. Adjust.
8992 * linux-mips-low.c (mips_get_pc):
8993 (mips_set_pc): Change prototype to take a regcache. Adjust.
8994 (mips_reinsert_addr): Adjust.
8995 (mips_collect_register): Change prototype to take a regcache.
8996 Adjust.
8997 (mips_supply_register):
8998 (mips_collect_register_32bit, mips_supply_register_32bit)
8999 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
9000 (mips_store_fpregset): Ditto.
43aaf8b6
PA
9001 * linux-ppc-low.c (ppc_supply_ptrace_register)
9002 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
9003 (parse_spufs_run): Adjust.
9004 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
9005 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
9006 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
9007 take a regcache. Adjust.
9008 * linux-s390-low.c (s390_collect_ptrace_register)
9009 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
9010 (s390_set_pc): Change prototype to take a regcache. Adjust.
9011 (s390_arch_setup): Adjust.
9012 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
9013 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
9014 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
9015 (sparc_fill_gregset, sparc_store_gregset_from_stack)
9016 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
9017 regcache. Adjust.
9018 (sparc_breakpoint_at): Adjust.
9019 * linux-xtensa-low.c (xtensa_fill_gregset):
9020 (xtensa_store_gregset):
9021 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
9022 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
9023 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
9024 prototype to take a regcache. Adjust.
9025 * win32-arm-low.c (arm_fetch_inferior_register)
9026 (arm_store_inferior_register): Change prototype to take a
9027 regcache. Adjust.
9028 * win32-i386-low.c (i386_fetch_inferior_register)
9029 (i386_store_inferior_register): Change prototype to take a
9030 regcache. Adjust.
9031 * win32-low.c (child_fetch_inferior_registers)
9032 (child_store_inferior_registers): Change prototype to take a
9033 regcache. Adjust.
9034 (win32_wait): Adjust.
9035 (win32_fetch_inferior_registers): Change prototype to take a
9036 regcache. Adjust.
9037 (win32_store_inferior_registers): Adjust.
9038 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
9039 store_inferior_register>: Change prototype to take a regcache.
9040
60c3d7b0
DE
90412010-01-20 Doug Evans <dje@google.com>
9042
9043 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
9044 #ifdef.
9045 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 9046 (W_STOPCODE): Provide definition if missing.
60c3d7b0 9047
dc146f7c
VP
90482010-01-13 Vladimir Prus <vladimir@codesourcery.com>
9049
9050 * linux-low.c (linux_core_of_thread): New.
9051 (compare_ints, show_process, list_threads): New.
9052 (linux_qxfer_osdata): Report threads and cores.
9053 (linux_target_op): Register linux_core_of_thread.
9054 * remote-utils.c (prepare_resume_reply): Report the core.
9055 (buffer_xml_printf): Support %d specifier.
9056 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
9057 New.
9058 (handle_query): Handle qXfer:threads. Announce availability
9059 thereof.
9060 * target.h (struct target_ops): New field core_of_thread.
9061
7803799a
UW
90622010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
9063
9064 * Makefile.in (clean): Remove new generated files.
9065 (reg-s390.o, reg-s390.c): Remove rules.
9066 (reg-s390x.o, reg-s390x.c): Likewise.
9067 (s390-linux32.o, s390-linux32.c): Add rules.
9068 (s390-linux64.o, s390-linux64.c): Likewise.
9069 (s390x-linux64.o, s390x-linux64.c): Likewise.
9070 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
9071 * linux-s390-low.c: Include <elf.h>.
9072 (HWCAP_S390_HIGH_GPRS): Define if undefined.
9073 (init_registers_s390): Remove prototype.
9074 (init_registers_s390x): Likewise.
9075 (init_registers_s390_linux32): Add prototype.
9076 (init_registers_s390_linux64): Likewise.
9077 (init_registers_s390x_linux64): Likewise.
9078 (s390_num_regs_3264): New define.
9079 (s390_regmap_3264): New global variable.
9080 (s390_cannot_fetch_register): Remove obsolete check.
9081 (s390_cannot_store_register): Likewise.
9082 (s390_collect_ptrace_register): Handle upper/lower register halves.
9083 (s390_supply_ptrace_register): Likewise.
9084 (s390_fill_gregset): Update to register number changes.
9085 (s390_get_hwcap): New routine.
9086 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
9087 Install appropriate regmap and register set.
9088
6e7ffa39
JB
90892010-01-01 Joel Brobecker <brobecker@adacore.com>
9090
9091 * server.c (gdbserver_version): Update copyright year to 2010.
9092 * gdbreplay.c (gdbreplay_version): Likewise.
9093
957f3f49
DE
90942009-12-28 Doug Evans <dje@google.com>
9095
9096 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
9097 elf/external.h. Include <elf.h> instead but only if necessary.
9098
ca5c370d
PA
90992009-12-28 Pedro Alves <pedro@codesourcery.com>
9100
9101 * linux-low.c (linux_remove_process): Remove `detaching'
9102 parameter. Don't release/detach from thread_db here.
9103 (linux_kill): Release/detach from thread_db here, ...
9104 (linux_detach): ... and here, before actually detaching.
9105 (linux_wait_1): ... and here, when a process exits.
9106 * thread-db.c (any_thread_of): New.
9107 (thread_db_free): Switch the current inferior to a thread of the
9108 passed in process.
9109
4ee62156
DE
91102009-12-21 Doug Evans <dje@google.com>
9111
d90e6a88
DE
9112 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
9113
c5f62d5f
DE
9114 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
9115 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
9116 warning ifndef __NR_tkill. Move setting of errno there too.
9117 Delete unnecessary resetting of errno after syscall.
9118 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
9119
10e86dd7
DE
9120 * configure.ac: Check for dladdr.
9121 * config.in: Regenerate.
9122 * configure: Regenerate.
9123 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
9124 (try_thread_db_load): Update.
9125
4ee62156
DE
9126 * linux-low.c (my_waitpid): Delete unnecessary prototype.
9127
00f515da
DE
91282009-12-18 Doug Evans <dje@google.com>
9129
e9464885
DE
9130 * event-loop.c: Include unistd.h if it exists.
9131
07d4f67e
DE
9132 * linux-low.c (my_waitpid): Move definition away from being in
9133 between linux_tracefork_child/linux_test_for_tracefork.
9134
00f515da
DE
9135 * gdb_proc_service.h (psaddr_t): Fix type.
9136 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
9137 signature to match glibc.
9138
1de1badb
DE
91392009-12-16 Doug Evans <dje@google.com>
9140
9141 * linux-low.c (linux_read_memory): Fix argument to read.
9142
aeeb81d1
PA
91432009-11-26 Pedro Alves <pedro@codesourcery.com>
9144
9145 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
9146 events, don't leave current_inferior pointing at null.
9147
10357975
PA
91482009-11-26 Pedro Alves <pedro@codesourcery.com>
9149
9150 * win32-low.c (LOG): Delete.
9151 (OUTMSG): Output to stderr.
9152 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
9153 on compile time LOG macro.
9154 (win32_wait): Fix debug output.
9155
cf6e3471
PA
91562009-11-26 Pedro Alves <pedro@codesourcery.com>
9157
9158 * win32-low.c (win32_add_one_solib): If the dll name is
9159 "ntdll.dll", prepend the system directory to the dll path.
9160
0c85e18e
MK
91612009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
9162
9163 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
9164
9ac544ce 91652009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 9166 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
9167
9168 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
9169 * configure.ac: Check for __mcoldfire__ and set
9170 gdb_cv_m68k_is_coldfire.
9171 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
9172 reg-cf.o and reg-m68k.o.
9173 * configure: Regenerated.
9174
fd7dd3e6
PA
91752009-11-16 Pedro Alves <pedro@codesourcery.com>
9176
9177 * linux-low.c (linux_remove_process): Add `detaching' parameter.
9178 Pass it to thread_db_free.
9179 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
9180 proper `detaching' argument to linux_remove_process.
9181 * linux-low.h (thread_db_free): Add `detaching' parameter.
9182 * thread-db.c (thread_db_init): Pass false as `detaching' argument
9183 to thread_db_free.
9184 (thread_db_free): Add `detaching' parameter. Only
9185 call td_ta_clear_event if detaching from process.
9186
75aa492e
MK
91872009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
9188
9189 * thread-db.c (thread_db_free): Fix typo.
9190
21e1bee4
PP
91912009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
9192
9193 PR gdb/10838
9194 * thread-db.c (thread_db_free): Call td_ta_clear_event.
9195
8838b45e
NS
91962009-11-03 Nathan Sidwell <nathan@codesourcery.com>
9197
9198 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
9199 with an i686 compiler.
9200 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
9201 needed.
9202 * configure: Rebuilt.
9203
8a35fb51
SL
92042009-10-29 Sandra Loosemore <sandra@codesourcery.com>
9205
9206 PR gdb/10783
9207
9208 * server.c (handle_search_memory_1): Correct read_addr initialization
9209 in loop for searching subsequent chunks.
9210
96f15937
PP
92112009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
9212
9213 * configure.ac: New --with-libthread-db option.
9214 * thread-db.c: Allow direct dependence on libthread_db.
9215 (thread_db_free): Adjust.
9216 * config.in: Regenerate.
9217 * configure: Likewise.
889bf7c5 9218
5f7d1694
PP
92192009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
9220
9221 PR gdb/10757
9222 * thread-db.c (attach_thread): New function.
9223 (maybe_attach_thread): Return success/failure.
9224 (find_new_threads_callback): Adjust.
889bf7c5
PA
9225 (thread_db_find_new_threads): Loop until no new threads.
9226
88e3b899
PA
92272009-10-13 Pedro Alves <pedro@codesourcery.com>
9228
9229 * proc-service.c (ps_lgetregs): Formatting.
9230
cdbfd419
PP
92312009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
9232
9233 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
9234 * configure.ac: Adjust.
9235 * linux-low.h (struct process_info_private): Move members to struct
9236 thread_db.
9237 (thread_db_free, thread_db_handle_monitor_command): New prototype.
9238 * linux-low.c (linux_remove_process): Adjust.
9239 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
9240 * server.c (handle_query): Move code ...
9241 (handle_monitor_command): ... here. New function.
9242 * target.h (struct target_ops): New member.
9243 * thread-db.c (struct thread_db): New.
9244 (libthread_db_search_path): New variable.
9245 (thread_db_create_event, thread_db_enable_reporting)
9246 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
9247 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
9248 (try_thread_db_load_1, dladdr_to_soname): New functions.
9249 (try_thread_db_load, thread_db_load_search): New functions.
9250 (thread_db_init): Search for libthread_db.
9251 (thread_db_free): New function.
9252 (thread_db_handle_monitor_command): Likewise.
9253 * config.in: Regenerate.
9254 * configure: Regenerate.
889bf7c5 9255
4168d2d6
UW
92562009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
9257
9258 * spu-low.c (spu_kill): Wait for inferior to terminate.
9259 Call clear_inferiors.
9260 (spu_detach): Call clear_inferiors.
9261
81ecdfbb
RW
92622009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9263
9264 * aclocal.m4: Regenerate.
9265 * config.in: Likewise.
9266 * configure: Likewise.
9267
0b9ff2c0
UW
92682009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9269
9270 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
9271 (parse_spufs_run): New function.
9272 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
9273 (ppc_breakpoint_at): Handle SPU breakpoints.
9274
efcbbd14
UW
92752009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9276
9277 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
9278 (SPUFS_MAGIC): Define.
9279 (spu_enumerate_spu_ids): New function.
9280 (linux_qxfer_spu): New function.
9281 (linux_target_ops): Install linux_qxfer_spu.
9282
f4d9bade
UW
92832009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9284
9285 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
9286 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
9287 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
9288 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
9289 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
9290 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
9291 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
9292 (init_registers_powerpc_cell32l): Add prototype.
9293 (init_registers_powerpc_cell64l): Likewise.
9294 (ppc_arch_setup): Detect Cell/B.E. architecture.
9295
96e946ca
RW
92962009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9297
9298 * Makefile.in (datarootdir): New variable.
9299
58d6951d
DJ
93002009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
9301
9302 * linux-low.c (linux_write_memory): Update debugging output.
9303 * Makefile.in (clean): Add new descriptions.
9304 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
9305 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
9306 * configure.srv: Add new files for arm*-*-linux*.
9307 * linux-arm-low.c: Add new declarations.
9308 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
9309 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
9310 (HWCAP_VFPv3D16): New.
9311 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
9312 instead of __IWMMXT__.
9313 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
9314 (arm_arch_setup): New.
9315 (target_regsets): Remove #ifdef. Add VFP regset.
9316 (the_low_target): Use arm_arch_setup.
9317
12b42a12
DJ
93182009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
9319
9320 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
9321 the main thread again.
9322
ac8c974e
AR
93232009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
9324
9325 Adding Neutrino gdbserver.
9326 * configure: Regenerated.
9327 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
9328 * configure.srv (i[34567]86-*-nto*): New target.
9329 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
9330 * remote-utils.c [__QNX__]: Include sys/iomgr.h
9331 (nto_comctrl) [__QNX__]: New function.
9332 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
9333
4424e0c3 93342009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
9335
9336 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
9337 srv_tgtobj.
9338
912cf4ba
PA
93392009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
9340 Pedro Alves <pedro@codesourcery.com>
9341
9342 * win32-i386-low.c (i386_get_thread_context): Handle systems that
9343 don't support CONTEXT_EXTENDED_REGISTERS.
9344 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
9345 (the_low_target): Install them.
9346 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
9347 failing with ERROR_PIPE_NOT_CONNECTED.
9348
aa5ca48f
DE
93492009-06-30 Doug Evans <dje@google.com>
9350 Pierre Muller <muller@ics.u-strasbg.fr>
9351
9352 Add h/w watchpoint support to x86-linux, win32-i386.
9353 * Makefile.in (SFILES): Add i386-low.c
9354 (i386_low_h): Define.
9355 (i386-low.o): Add dependencies.
9356 (linux-x86-low.o): Add i386-low.h dependency.
9357 (win32-i386-low.o): Ditto.
9358 * i386-low.c: New file.
9359 * i386-low.h: New file.
9360 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
9361 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
9362 * linux-low.c (linux_add_process): Initialize arch_private.
9363 (linux_remove_process): Free arch_private.
9364 (add_lwp): Initialize arch_private.
9365 (delete_lwp): Free arch_private.
9366 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
9367 provided.
9368 * linux-low.h (process_info_private): New member arch_private.
9369 (lwp_info): New member arch_private.
9370 (linux_target_ops): New members new_process, new_thread,
9371 prepare_to_resume.
9372 (ptid_of): New macro.
9373 * linux-x86-low.c: Include stddef.h, i386-low.h.
9374 (arch_process_info): New struct.
9375 (arch_lwp_info): New struct.
9376 (x86_linux_dr_get, x86_linux_dr_set): New functions.
9377 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
9378 (i386_dr_low_get_status): New function.
9379 (x86_insert_point, x86_remove_point): New functions.
9380 (x86_stopped_by_watchpoint): New function.
9381 (x86_stopped_data_address): New function.
9382 (x86_linux_new_process, x86_linux_new_thread): New functions.
9383 (x86_linux_prepare_to_resume): New function.
9384 (the_low_target): Add entries for insert_point, remove_point,
9385 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
9386 prepare_to_resume.
9387 * server.c (debug_hw_points): New global.
9388 (monitor_show_help): Document set debug-hw-points.
9389 (handle_query): Process "set debug-hw-points".
9390 * server.h (debug_hw_points): Declare.
9391 (paddress): Declare.
9392 * utils.c (NUMCELLS, CELLSIZE): New macros.
9393 (get_sell, xsnprintf, paddress): New functions.
9394 * win32-arm-low.c (the_low_target): Add entries for insert_point,
9395 remove_point, stopped_by_watchpoint, stopped_data_address.
9396 * win32-i386-low.c: Include i386-low.h.
9397 (debug_reg_state): Replaces dr.
9398 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
9399 (i386_dr_low_get_status): New function.
9400 (i386_insert_point, i386_remove_point): New functions.
9401 (i386_stopped_by_watchpoint): New function.
9402 (i386_stopped_data_address): New function.
9403 (i386_initial_stuff): Update.
9404 (get_thread_context,set_thread_context,i386_thread_added): Update.
9405 (the_low_target): Add entries for insert_point,
9406 remove_point, stopped_by_watchpoint, stopped_data_address.
9407 * win32-low.c (win32_insert_watchpoint): New function.
9408 (win32_remove_watchpoint): New function.
9409 (win32_stopped_by_watchpoint): New function.
9410 (win32_stopped_data_address): New function.
9411 (win32_target_ops): Add entries for insert_watchpoint,
9412 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
9413 * win32-low.h (win32_target_ops): New members insert_point,
9414 remove_point, stopped_by_watchpoint, stopped_data_address.
9415
d993e290
PA
94162009-06-25 Pedro Alves <pedro@codesourcery.com>
9417
9418 * server.c (process_serial_event): Re-return unsupported, not
9419 error, if the type isn't recognized. Re-allow supporting only
9420 insert or remove packets. Also call require_running for
9421 breakpoints. Add missing break statement to default case. Tidy.
9422 * target.h (struct target_ops): Rename insert_watchpoint to
9423 insert_point, and remove_watchpoint to remove_point.
9424
9425 * linux-low.h (struct linux_target_ops): Likewise.
9426 * linux-low.c (linux_insert_watchpoint): Rename to ...
9427 (linux_insert_point): ... this. Adjust.
9428 (linux_remove_watchpoint): Rename to ...
9429 (linux_remove_point): ... this. Adjust.
9430 (linux_target_ops): Adjust.
9431 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
9432 (cris_insert_point): ... this.
9433 (cris_remove_watchpoint): Rename to ...
9434 (cris_remove_point): ... this.
9435 (the_low_target): Adjust.
9436
0f54c268
PM
94372009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
9438
9439 * server.c (handle_v_kill): Pass signal_pid to
9440 kill_inferior if multi_process is zero.
9441
c6314022
AR
94422009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
9443
9444 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
9445 * target.h (target_ops): Comment for *_watchpoint to make it clear
9446 the functions can get types '0' and '1'.
9447
4463ce24
AR
94482009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
9449
9450 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
9451 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
9452 * regcache.c (get_regcache): Likewise.
9453 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
9454 * win32-low.c (child_fetch_inferior_registers): Remove check for
9455 regno 0.
9456
cf8fd78b
PA
94572009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
9458 Pedro Alves <pedro@codesourcery.com>
9459
9460 * target.h (struct target_ops) <supports_multi_process>: New
9461 callback.
9462 (target_supports_multi_process): New.
9463 * server.c (handle_query): Even if GDB reports support, only
9464 enable multi-process if the target also supports it. Report
9465 multi-process support only if the target backend supports it.
9466 * linux-low.c (linux_supports_multi_process): New function.
9467 (linux_target_ops): Install it as target_supports_multi_process
9468 callback.
9469
47c0c975
DE
94702009-05-24 Doug Evans <dje@google.com>
9471
e09875d4
DE
9472 Global renaming of find_thread_pid to find_thread_ptid.
9473 * server.h (find_thread_ptid): Renamed from find_thread_pid.
9474 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
9475 All callers updated.
9476
e27d73f6
DE
9477 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
9478 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
9479 directly.
9480
47c0c975
DE
9481 * linux-low.c (get_stop_pc): Print pc if debug_threads.
9482 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
9483 (linux_resume_one_lwp): Ditto.
9484
2acc282a
DE
94852009-05-23 Doug Evans <dje@google.com>
9486
9487 * linux-low.c (linux_resume_one_lwp): Change type of first arg
9488 from struct inferior_list_entry * to struct lwp_info *.
9489 All callers updated.
9490
9f1036c1
DE
94912009-05-13 Doug Evans <dje@google.com>
9492
9493 * linux-x86-low.c: Don't include assert.h.
9494 (x86_siginfo_fixup): Use fatal, not assert.
9495 (x86_arch_setup): Fix comment.
9496
d0722149
DE
94972009-05-12 Doug Evans <dje@google.com>
9498
9499 Biarch support for i386/amd64 gdbserver.
9500 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
9501 Add linux-x86-low.c.
9502 (linux-i386-low.o, linux-x86-64-low.o): Delete.
9503 (linux-x86-low.o): Add.
9504 * linux-x86-64-low.c: Delete.
9505 * linux-i386-low.c: Delete.
9506 * linux-x86-low.c: New file.
9507 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
9508 linux-x86-low.o.
9509 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
9510 linux-x86-low.o.
9511 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
9512 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
9513 (linux_child_pid_to_exec_file): New function.
9514 (elf_64_header_p, elf_64_file_p): New functions.
9515 (siginfo_fixup): New function.
9516 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
9517 give target a chance to convert layout.
9518 * linux-low.h (linux_target_ops): New member siginfo_fixup.
9519 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
9520
fdeb2a12
DE
95212009-05-07 Doug Evans <dje@google.com>
9522
9523 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
9524 (regsets_store_inferior_registers): Ditto.
9525
a6dbe5df
PA
95262009-05-06 Pedro Alves <pedro@codesourcery.com>
9527
9528 PR server/10048
9529
9530 * linux-low.c (must_set_ptrace_flags): Delete.
9531 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
9532 of the global.
9533 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
9534 `lwp->must_set_ptrace_flags' instead.
ba42693b 9535 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
9536 (linux_wait_1): ... not here.
9537
5091eb23
DE
95382009-04-30 Doug Evans <dje@google.com>
9539
9f767825
DE
9540 * inferiors.c (started_inferior_callback): New function.
9541 (attached_inferior_callback): New function.
9542 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
9543 * server.c (print_started_pid, print_attached_pid): New functions.
9544 (detach_or_kill_for_exit): New function.
9545 (main): Call it instead of for_each_inferior (kill_inferior_callback).
9546 * server.h (have_started_inferiors_p): Declare.
9547 (have_attached_inferiors_p): Declare.
9548
5091eb23
DE
9549 * inferiors.c (remove_process): Fix memory leak, free process.
9550 * linux-low.c (linux_remove_process): New function.
9551 (linux_kill): Call it instead of remove_process.
9552 (linux_detach, linux_wait_1): Ditto.
9553
155c8968
PA
95542009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
9555
9556 * configure.srv: Add x86 Windows CE target.
9557
7fe519cb
UW
95582009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
9559
9560 * inferiors.c (get_thread_process): Make global.
9561 * server.h (get_thread_process): Add prototype.
9562 * thread-db.c (find_one_thread): Use get_thread_process
9563 instead of current_process.
9564 (thread_db_get_tls_address): Do not crash if called when
9565 thread layer is not yet initialized.
9566
5472f405
UW
95672009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
9568
9569 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
9570 * spu-low.c (current_tid): Rename to ...
9571 (current_ptid): ... this.
9572 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
9573 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
9574 ptid_get_lwp (current_ptid) instead of current_tid.
9575 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
9576 instead of current_tid. Use find_process_pid to verify pid
9577 argument is valid. Pass proper argument to remove_process.
9578 (spu_thread_alive): Compare current_ptid instead of current_tid.
9579 (spu_resume): Likewise.
9580
55ac2b99
PA
95812009-04-02 Pedro Alves <pedro@codesourcery.com>
9582
9583 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
9584 variable.
9585
95954743
PA
95862009-04-01 Pedro Alves <pedro@codesourcery.com>
9587
9588 Implement the multiprocess extensions, and add linux multiprocess
9589 support.
9590
9591 * server.h (ULONGEST): Declare.
9592 (struct ptid, ptid_t): New.
9593 (minus_one_ptid, null_ptid): Declare.
9594 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
9595 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
9596 (struct inferior_list_entry): Change `id' type from unsigned from
9597 to ptid_t.
9598 (struct sym_cache, struct breakpoint, struct
9599 process_info_private): Forward declare.
9600 (struct process_info): Declare.
9601 (current_process): Declare.
9602 (all_processes): Declare.
9603 (initialize_inferiors): Declare.
9604 (add_thread): Adjust to use ptid_t.
9605 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
9606 (add_process, remove_process, find_thread_pid): Declare.
9607 (find_inferior_id): Adjust to use ptid_t.
9608 (cont_thread, general_thread, step_thread): Change type to ptid_t.
9609 (multi_process): Declare.
9610 (push_event): Adjust to use ptid_t.
9611 (read_ptid, write_ptid): Declare.
9612 (prepare_resume_reply): Adjust to use ptid_t.
9613 (clear_symbol_cache): Declare.
9614 * inferiors.c (all_processes): New.
9615 (null_ptid, minus_one_ptid): New.
9616 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
9617 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
9618 (add_thread): Change unsigned long to ptid. Remove gdb_id
9619 parameter. Adjust.
9620 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
9621 (gdb_id_to_thread): Rename to ...
9622 (find_thread_pid): ... this. Change unsigned long to ptid.
9623 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
9624 (loaded_dll, pull_pid_from_list): Adjust.
9625 (add_process, remove_process, find_process_pid)
9626 (get_thread_process, current_process, initialize_inferiors): New.
9627 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
9628 (struct target_waitstatus) <related_pid>: Ditto.
9629 (struct target_ops) <kill, detach>: Add `pid' argument. Change
9630 return type to int.
9631 (struct target_ops) <join>: Add `pid' argument.
9632 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
9633 (struct target_ops) <wait>: Add `ptid' field. Change return type
9634 to ptid.
9635 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
9636 (mywait): Add `ptid' argument. Change return type to ptid_t.
9637 (target_pid_to_str): Declare.
9638 * target.c (set_desired_inferior): Adjust to use ptids.
9639 (mywait): Add new `ptid' argument. Adjust.
9640 (target_pid_to_str): New.
9641 * mem-break.h (free_all_breakpoints): Declare.
9642 * mem-break.c (breakpoints): Delelete.
9643 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
9644 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
9645 to use per-process breakpoint list.
9646 (free_all_breakpoints): New.
9647 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
9648 (symbol_cache, all_symbols_looked_up): Delete.
9649 (hexchars): New.
9650 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
9651 read_ptid): New.
9652 (prepare_resume_reply): Change ptid argument's type from unsigned
9653 long to ptid_t. Adjust. Implement W;process and X;process.
9654 (free_sym_cache, clear_symbol_cache): New.
9655 (look_up_one_symbol): Adjust to per-process symbol cache. *
9656 * server.c (cont_thread, general_thread, step_thread): Change type
9657 to ptid_t.
9658 (attached): Delete.
9659 (multi_process): New.
9660 (last_ptid): Change type to ptid_t.
9661 (struct vstop_notif) <ptid>: Change type to ptid_t.
9662 (queue_stop_reply, push_event): Change `ptid' argument's type to
9663 ptid_t.
9664 (discard_queued_stop_replies): Add `pid' argument.
9665 (start_inferior): Adjust to use ptids. Adjust to mywait interface
9666 changes. Don't reference the `attached' global.
9667 (attach_inferior): Adjust to mywait interface changes.
9668 (handle_query): Adjust to use ptids. Parse GDB's qSupported
9669 features. Handle and report "multiprocess+". Handle
9670 "qAttached:PID".
9671 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
9672 changes.
9673 (handle_v_kill): New.
9674 (handle_v_stopped): Adjust to use target_pid_to_str.
9675 (handle_v_requests): Allow multiple attaches and runs when
9676 multiprocess extensions are in effect. Handle "vKill".
9677 (myresume): Adjust to use ptids.
9678 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
9679 (handle_status): Adjust to discard_queued_stop_replies interface
9680 change.
9681 (first_thread_of, kill_inferior_callback)
9682 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
9683 (main): Call initialize_inferiors. Adjust to use ptids, killing
9684 and detaching from all inferiors. Handle multiprocess packet
9685 variants.
9686 * linux-low.h: Include gdb_proc_service.h.
9687 (struct process_info_private): New.
9688 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
9689 <lwpid_of>: Use ptid_get_lwp.
9690 (get_lwp_thread): Adjust.
9691 (struct lwp_info): Add `dead' member.
9692 (find_lwp_pid): Declare.
9693 * linux-low.c (thread_db_active): Delete.
9694 (new_inferior): Adjust comment.
9695 (inferior_pid): Delete.
9696 (linux_add_process): New.
9697 (handle_extended_wait): Adjust.
9698 (add_lwp): Change unsigned long to ptid.
9699 (linux_create_inferior): Add process to processes table. Adjust
9700 to use ptids. Don't set new_inferior here.
9701 (linux_attach_lwp): Rename to ...
9702 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
9703 it. Adjust to use ptids.
9704 (linux_attach_lwp): New.
9705 (linux_attach): Add process to processes table. Don't set
9706 new_inferior here.
9707 (struct counter): New.
9708 (second_thread_of_pid_p, last_thread_of_process_p): New.
9709 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
9710 multiple processes.
9711 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
9712 processes. Remove process from process table.
9713 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
9714 to multiple processes.
9715 (any_thread_of): New.
9716 (linux_detach): Add `pid' argument, and handle it. Remove process
9717 from processes table.
9718 (linux_join): Add `pid' argument. Handle it.
9719 (linux_thread_alive): Change unsighed long argument to ptid_t.
9720 Consider dead lwps as not being alive.
9721 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
9722 threads we're not interested in.
9723 (same_lwp, find_lwp_pid): New.
9724 (linux_wait_for_lwp): Change `pid' argument's type from int to
9725 ptid_t. Adjust.
9726 (linux_wait_for_event): Rename to ...
9727 (linux_wait_for_event_1): ... this. Change `pid' argument's type
9728 from int to ptid_t. Adjust.
9729 (linux_wait_for_event): New.
9730 (linux_wait_1): Add `ptid' argument. Change return type to
9731 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
9732 that exit from the process table.
9733 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
9734 Adjust.
9735 (mark_lwp_dead): New.
9736 (wait_for_sigstop): Adjust to use ptids. If a process exits while
9737 stopping all threads, mark its main lwp as dead.
9738 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
9739 ptids.
9740 (fetch_register, usr_store_inferior_registers)
9741 (regsets_fetch_inferior_registers)
9742 (regsets_store_inferior_registers, linux_read_memory)
9743 (linux_write_memory): Inline `inferior_pid'.
9744 (linux_look_up_symbols): Adjust to use per-process
9745 `thread_db_active'.
9746 (linux_request_interrupt): Adjust to use ptids.
9747 (linux_read_auxv): Inline `inferior_pid'.
9748 (initialize_low): Don't reference thread_db_active.
9749 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
9750 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
9751 (ps_getpid): Return the pid of the current inferior.
9752 * thread-db.c (proc_handle, thread_agent): Delete.
9753 (thread_db_create_event, thread_db_enable_reporting): Adjust to
9754 per-process data.
9755 (find_one_thread): Change argument type to ptid_t. Adjust to
9756 per-process data.
9757 (maybe_attach_thread): Adjust to per-process data and ptids.
9758 (thread_db_find_new_threads): Ditto.
9759 (thread_db_init): Ditto.
9760 * spu-low.c (spu_create_inferior, spu_attach): Add process to
9761 processes table. Adjust to use ptids.
9762 (spu_kill, spu_detach): Adjust interface. Remove process from
9763 processes table.
9764 (spu_join, spu_thread_alive): Adjust interface.
9765 (spu_wait): Adjust interface. Remove process from processes
9766 table. Adjust to use ptids.
9767 * win32-low.c (current_inferior_tid): Delete.
9768 (current_inferior_ptid): New.
9769 (debug_event_ptid): New.
9770 (thread_rec): Take a ptid. Adjust.
9771 (child_add_thread): Add `pid' argument. Adjust to use ptids.
9772 (child_delete_thread): Ditto.
9773 (do_initial_child_stuff): Add `attached' argument. Add process to
9774 processes table.
9775 (child_fetch_inferior_registers, child_store_inferior_registers):
9776 Adjust.
9777 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
9778 (win32_attach): Pass 1 to do_initial_child_stuff.
9779 (win32_kill): Adjust interface. Remove process from processes
9780 table.
9781 (win32_detach): Ditto.
9782 (win32_join): Adjust interface.
9783 (win32_thread_alive): Take a ptid.
9784 (win32_resume): Adjust to use ptids.
9785 (get_child_debug_event): Ditto.
9786 (win32_wait): Adjust interface. Remove exiting process from
9787 processes table.
9788
bd99dc85
PA
97892009-04-01 Pedro Alves <pedro@codesourcery.com>
9790
9791 Non-stop mode support.
9792
9793 * server.h (non_stop): Declare.
9794 (gdb_client_data, handler_func): Declare.
9795 (delete_file_handler, add_file_handler, start_event_loop):
9796 Declare.
9797 (handle_serial_event, handle_target_event, push_event)
9798 (putpkt_notif): Declare.
9799 * target.h (enum resume_kind): New.
9800 (struct thread_resume): Replace `step' field by `kind' field.
9801 (TARGET_WNOHANG): Define.
9802 (struct target_ops) <wait>: Add `options' argument.
9803 <supports_non_stop, async, start_non_stop>: New fields.
9804 (target_supports_non_stop, target_async): New.
9805 (start_non_stop): Declare.
9806 (mywait): Add `options' argument.
9807 * target.c (mywait): Add `options' argument. Print child exit
9808 notifications here.
9809 (start_non_stop): New.
9810 * server.c (non_stop, own_buf, mem_buf): New globals.
9811 (struct vstop_notif): New.
9812 (notif_queue): New global.
9813 (queue_stop_reply, push_event, discard_queued_stop_replies)
9814 (send_next_stop_reply): New.
9815 (start_inferior): Adjust to use resume_kind. Adjust to mywait
9816 interface changes.
9817 (attach_inferior): In non-stop mode, don't wait for the target
9818 here.
9819 (handle_general_set): Handle QNonStop.
9820 (handle_query): When handling qC, return the current general
9821 thread, instead of the first thread of the list.
9822 (handle_query): If the backend supports non-stop mode, include
9823 QNonStop+ in the qSupported query response.
9824 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
9825 and non-stop mode.
9826 (handle_v_attach, handle_v_run): Handle non-stop mode.
9827 (handle_v_stopped): New.
9828 (handle_v_requests): Report support for vCont;t. Handle vStopped.
9829 (myresume): Adjust to use resume_kind. Handle non-stop.
9830 (queue_stop_reply_callback): New.
9831 (handle_status): Handle non-stop mode.
9832 (main): Clear non_stop flag on reconnection. Use the event-loop.
9833 Refactor serial protocol handling from here ...
9834 (process_serial_event): ... to this new function. When GDB
9835 selects any thread, select one here. In non-stop mode, wait until
9836 GDB acks all pending events before exiting.
9837 (handle_serial_event, handle_target_event): New.
9838 * remote-utils.c (remote_open): Install remote_desc in the event
9839 loop.
9840 (remote_close): Remove remote_desc from the event loop.
9841 (putpkt_binary): Rename to...
9842 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
9843 (putpkt_binary): New as wrapper around putpkt_binary_1.
9844 (putpkt_notif): New.
9845 (prepare_resume_reply): In non-stop mode, don't change the
9846 general_thread.
9847 * event-loop.c: New.
9848 * Makefile.in (OBJ): Add event-loop.o.
9849 (event-loop.o): New rule.
9850
9851 * linux-low.h (pid_of): Moved here.
9852 (lwpid_of): New.
9853 (get_lwp_thread): Use lwpid_of.
9854 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
9855 * linux-low.c (pid_of): Delete.
9856 (inferior_pid): Use lwpid_of.
9857 (linux_event_pipe): New.
9858 (target_is_async_p): New.
9859 (delete_lwp): New.
9860 (handle_extended_wait): Use lwpid_of.
9861 (add_lwp): Don't set lwpid field.
9862 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
9863 (linux_kill_one_lwp): If killing a running lwp, stop it first.
9864 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
9865 (linux_detach_one_lwp): If detaching from a running lwp, stop it
9866 first. Adjust to linux_wait_for_event interface changes. Use
9867 lwpid_of.
9868 (linux_detach): Don't delete the main lwp here.
9869 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
9870 (status_pending_p): Don't consider explicitly suspended lwps.
9871 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
9872 pointer. Add OPTIONS argument. Change return type to int. Use
9873 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
9874 (linux_wait_for_event): Take an integer pid instead of a lwp_info
9875 pointer. Add status pointer argument. Return a pid instead of a
9876 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
9877 changes. In non-stop mode, don't switch to a random thread.
9878 (linux_wait): Rename to...
9879 (linux_wait_1): ... this. Add target_options argument, and handle
9880 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
9881 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
9882 clean exit and signal exit code. Don't stop all threads in
9883 non-stop mode. In all-stop mode, only stop all threads when
9884 reporting a stop to GDB. Handle explicit thread stop requests.
9885 (async_file_flush, async_file_mark): New.
9886 (linux_wait): New.
9887 (send_sigstop): Use lwpid_of.
9888 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
9889 interface changes. In non-stop mode, don't switch to a random
9890 thread.
9891 (linux_resume_one_lwp): Use lwpid_of.
9892 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
9893 (linux_resume_one_thread): ... this. Handle resume_stop. In
9894 non-stop mode, don't look for pending flag in all threads.
9895 (resume_status_pending_p): Don't consider explicitly suspended
9896 threads.
9897 (my_waitpid): Reimplement. Emulate __WALL.
9898 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
9899 Use lwpid_of.
9900 (sigchld_handler, linux_supports_non_stop, linux_async)
9901 (linux_start_non_stop): New.
9902 (linux_target_ops): Register linux_supports_non_stop, linux_async
9903 and linux_start_non_stop.
9904 (initialize_low): Install SIGCHLD handler.
9905 * thread-db.c (thread_db_create_event, find_one_thread)
9906 (thread_db_get_tls_address): Use lwpid_of.
9907 * win32-low.c (win32_detach): Adjust to use resume_kind.
9908 (win32_wait): Add `options' argument.
9909 * spu-low.c (spu_resume): Adjust to use resume_kind.
9910 (spu_wait): Add `options' argument.
9911
5b1c542e
PA
99122009-04-01 Pedro Alves <pedro@codesourcery.com>
9913
9914 Decouple target code from remote protocol.
9915
9916 * target.h (enum target_waitkind): New.
9917 (struct target_waitstatus): New.
9918 (struct target_ops) <wait>: Return an unsigned long. Take a
9919 target_waitstatus pointer instead of a char pointer.
9920 (mywait): Likewise.
9921 * target.c (mywait): Change prototype to return an unsigned long.
9922 Take a target_waitstatus pointer instead of a char pointer. Adjust.
9923 * server.h (thread_from_wait, old_thread_from_wait): Delete
9924 declarations.
9925 (prepare_resume_reply): Change prototype to take a
9926 target_waitstatus.
9927 * server.c (thread_from_wait, old_thread_from_wait): Delete.
9928 (last_status, last_ptid): New.
9929 (start_inferior): Remove "statusptr" argument. Adjust. Return a
9930 pid instead of a signal.
9931 (attach_inferior): Remove "status" and "signal" parameters.
9932 Adjust.
9933 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
9934 not as an address.
9935 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
9936 (handle_v_requests, myresume): Remove "status" and "signal"
9937 parameters. Adjust.
9938 (handle_status): New.
9939 (main): Delete local `status'. Adjust.
9940 * remote-utils.c: Include target.h.
9941 (prepare_resume_reply): Change prototype to take a
9942 target_waitstatus. Adjust.
9943
9944 * linux-low.c (linux_wait): Adjust to new target_ops->wait
9945 interface.
9946 * spu-low.c (spu_wait): Adjust.
9947 * win32-low.c (enum target_waitkind, struct target_waitstatus):
9948 Delete.
9949 (win32_wait): Adjust.
9950
2bd7c093
PA
99512009-04-01 Pedro Alves <pedro@codesourcery.com>
9952
9953 * target.h (struct thread_resume): Delete leave_stopped member.
9954 (struct target_ops): Add a `n' argument to the `resume' callback.
9955 * server.c (start_inferior): Adjust.
9956 (handle_v_cont, myresume): Adjust.
9957 * linux-low.c (check_removed_breakpoint): Adjust to resume
9958 interface change, and to removed leave_stopped field.
9959 (resume_ptr): Delete.
9960 (struct thread_resume_array): New.
9961 (linux_set_resume_request): Add new `arg' parameter. Adjust to
9962 resume interface change.
9963 (linux_continue_one_thread, linux_queue_one_thread)
9964 (resume_status_pending_p): Check if the resume field is NULL
9965 instead of checking the leave_stopped member.
9966 (linux_resume): Adjust to the target resume interface change.
9967 * spu-low.c (spu_resume): Adjust to the target resume interface
9968 change.
9969 * win32-low.c (win32_detach, win32_resume): Ditto.
9970
c35fafde
PA
99712009-04-01 Pedro Alves <pedro@codesourcery.com>
9972
9973 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
9974 flag.
9975 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
9976 pending.
9977 (linux_continue_one_thread): Only preserve the stepping flag if
9978 there's a pending breakpoint.
9979
0a59d50b
PA
99802009-03-31 Pedro Alves <pedro@codesourcery.com>
9981
9982 * server.c (main): After the inferior having exited, call
9983 remote_close before exiting gdbserver.
9984
f04c6d38
TJB
99852009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
9986
9987 Fix size of FPSCR in Power 7 processors.
9988 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
9989 (PPC_FEATURE_HAS_DFP): New #define.
9990 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
9991 size of the FPSCR.
9992
78e5cee6
PA
99932009-03-23 Pedro Alves <pedro@codesourcery.com>
9994
9995 * server.c (handle_query) Whitespace and formatting.
9996
1b3f6016
PA
99972009-03-22 Pedro Alves <pedro@codesourcery.com>
9998
9999 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
10000 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
10001 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
10002 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
10003 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
10004 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
10005 Makefile.in, configure.ac: Fix whitespace throughout.
10006 * configure: Regenerate.
10007
a07b2135
PA
100082009-03-22 Pedro Alves <pedro@codesourcery.com>
10009
10010 * inferiors.c (find_inferior): Make it safe for the callback
10011 function to delete the currently iterated inferior.
10012
67cc2626
PA
100132009-03-22 Pedro Alves <pedro@codesourcery.com>
10014
10015 * Makefile.in (linuw_low_h): Move higher.
10016 (thread-db.o): Depend on $(linux_low_h).
10017
54a0b537
PA
100182009-03-17 Pedro Alves <pedro@codesourcery.com>
10019
10020 Rename "process" to "lwp" throughout.
10021
10022 * linux-low.c (all_processes): Rename to...
10023 (all_lwps): ... this.
10024 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
10025 (add_process): Rename to ...
10026 (add_lwp): ... this. Adjust.
10027 (linux_create_inferior): Adjust.
10028 (linux_attach_lwp): Adjust.
10029 (linux_attach): Adjust.
10030 (linux_kill_one_process): Rename to ...
10031 (linux_kill_one_lwp): ... this. Adjust.
10032 (linux_kill): Adjust.
10033 (linux_detach_one_process): Rename to ...
10034 (linux_detach_one_lwp): ... this. Adjust.
10035 (linux_detach): Adjust.
10036 (check_removed_breakpoint): Adjust.
10037 (status_pending_p): Adjust.
10038 (linux_wait_for_process): Rename to ...
10039 (linux_wait_for_lwp): ... this. Adjust.
10040 (linux_wait_for_event): Adjust.
10041 (send_sigstop): Adjust.
10042 (wait_for_sigstop): Adjust.
10043 (stop_all_processes): Rename to ...
10044 (stop_all_lwps): ... this.
10045 (linux_resume_one_process): Rename to ...
10046 (linux_resume_one_lwp): ... this. Adjust.
10047 (linux_set_resume_request, linux_continue_one_thread)
10048 (linux_queue_one_thread, resume_status_pending_p)
10049 (usr_store_inferior_registers, regsets_store_inferior_registers)
10050 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
10051 Adjust.
10052 * linux-low.h (get_process): Rename to ...
10053 (get_lwp): ... this. Adjust.
10054 (get_thread_process): Rename to ...
10055 (get_thread_lwp): ... this. Adjust.
10056 (get_process_thread): Rename to ...
10057 (get_lwp_thread): ... this. Adjust.
10058 (struct process_info): Rename to ...
10059 (struct lwp_info): ... this.
10060 (all_processes): Rename to ...
10061 (all_lwps): ... this.
10062 * proc-service.c (ps_lgetregs): Adjust.
10063 * thread-db.c (thread_db_create_event, find_one_thread)
10064 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
10065
0b16c5cf
PA
100662009-03-14 Pedro Alves <pedro@codesourcery.com>
10067
10068 * server.c (handle_query): Handle "qAttached".
10069
32de4b9d
NS
100702009-03-13 Nathan Sidwell <nathan@codesourcery.com>
10071
10072 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
10073 GPLv3, update license URL.
10074
2aecd87f
DE
100752009-03-01 Doug Evans <dje@google.com>
10076
93efd302 10077 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
10078 (server_h): Add gdb_signals.h.
10079 (signals.o): Update.
10080 * server.h (target_signal_from_host,target_signal_to_host_p)
10081 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
10082
86b1f9c5
PM
100832009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
10084
10085 * remote-utils.c (getpkt): Also generate remote-debug
10086 information if noack_mode is set.
10087
4aa995e1
PA
100882009-02-06 Pedro Alves <pedro@codesourcery.com>
10089
10090 * server.c (handle_query): Report qXfer:siginfo:read and
10091 qXfer:siginfo:write as supported and handle them.
10092 * target.h (struct target_ops) <qxfer_siginfo>: New field.
10093 * linux-low.c (linux_xfer_siginfo): New.
10094 (linux_target_ops): Set it.
10095
62709adf
PA
100962009-01-26 Pedro Alves <pedro@codesourcery.com>
10097
10098 * server.c (gdbserver_usage): Mention --remote-debug.
10099 (main): Accept '--remote-debug' switch.
10100
aef93bd7
DE
101012009-01-18 Doug Evans <dje@google.com>
10102
10103 * regcache.c (new_register_cache): No need to check result of xcalloc.
10104 * server.c (handle_search_memory): Back out calls to xmalloc,
10105 result is checked and error is returned to user upon failure.
10106 (handle_query): Ditto. Add more checks for result of malloc.
10107 (handle_v_cont): Check result of malloc, report error back to
10108 user upon failure.
10109 (handle_v_run): Ditto. Call freeargv.
10110 * server.h (freeargv): Declare.
10111 * utils.c (freeargv): New fn.
10112
54363045
DE
101132009-01-15 Doug Evans <dje@google.com>
10114
f626972c
DE
10115 * gdbreplay.c (perror_with_name): Make arg const char *.
10116 * server.h (target_signal_to_name): Make return type const char *.
0842e787 10117 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 10118 * utils.c (perror_with_name): Make arg const char *.
54363045 10119
18aae699
PA
101202009-01-14 Pedro Alves <pedro@codesourcery.com>
10121
10122 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
10123 when handling a EXIT_PROCESS_DEBUG_EVENT.
10124
ff703abe
JB
101252009-01-06 Joel Brobecker <brobecker@adacore.com>
10126
10127 * gdbreplay.c (gdbreplay_version): Update copyright year.
10128 * server.c (gdbserver_version): Likewise.
10129
f21cc1a2 101302009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
10131
10132 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 10133 (handle_extended_wait): Improve comment.
0e21c1ec 10134
bca929d3
DE
101352008-12-13 Doug Evans <dje@google.com>
10136
10137 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
10138 * server.h (ATTR_MALLOC): New macro.
10139 (xmalloc,xcalloc,xstrdup): Declare.
10140 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
10141 * inferiors.c: Ditto.
10142 * linux-low.c: Ditto.
10143 * mem-break.c: Ditto.
10144 * regcache.c: Ditto.
10145 * remote-utils.c: Ditto.
10146 * server.c: Ditto.
10147 * target.c: Ditto.
10148 * win32-low.c: Ditto.
10149
97438e3f
DE
101502008-12-12 Doug Evans <dje@google.com>
10151
896c7fbb
DE
10152 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
10153 in debugging printf.
10154
97438e3f
DE
10155 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
10156
e3b886f8
DE
101572008-12-09 Doug Evans <dje@google.com>
10158
10159 * linux-low.h (struct process_info): Delete member tid, unused.
10160 * thread-db.c (find_one_thread): Update.
10161 (maybe_attach_thread): Update.
10162
07e059b5
VP
101632008-12-02 Pedro Alves <pedro@codesourcery.com>
10164
889bf7c5
PA
10165 * target.h (struct target_ops): Add qxfer_osdata member.
10166 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
10167 and dirent.h.
10168 (linux_qxfer_osdata): New functions.
10169 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
10170 callback.
10171 * server.c (handle_query): Handle "qXfer:osdata:read:".
10172 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
10173 (buffer_xml_printf): New functions.
10174 * server.h (struct buffer): New.
10175 (buffer_grow_str, buffer_grow_str0): New macros.
10176 (buffer_grow, buffer_free, buffer_init, buffer_finish)
10177 (buffer_xml_printf): Declare.
07e059b5 10178
4cab47ab
DE
101792008-11-24 Doug Evans <dje@google.com>
10180
10181 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
10182
f142445f
DJ
101832008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
10184
10185 * server.c (handle_v_run): Always use the supplied argument list.
10186
d0107bb6 101872008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 10188
d0107bb6
BW
10189 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
10190 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 10191
2c4ad781
TJB
101922008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
10193
10194 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
10195 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
10196 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
10197 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
10198 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
10199 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
10200 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
10201 XML target descriptions.
10202 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
10203 when inferior is running on an ISA 2.05 or later processor. Add
10204 special case to return offset for full 64-bit slot of FPSCR when
10205 in 32-bits.
10206
dfb64f85
DJ
102072008-11-14 Daniel Gutson <dgutson@codesourcery.com>
10208
10209 * Makefile.in (SFILES, clean): Added sparc64 files.
10210 (reg-sparc64.o, reg-sparc64.c): New.
10211 * configure.srv (sparc*-*-linux*): New configuration.
10212 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
10213 syscall arguments for SPARC.
10214 (regsets_store_inferior_registers): Likewise.
10215 * linux-sparc-low.c: New file.
10216
66b6e1dd
DE
102172008-10-21 Doug Evans <dje@google.com>
10218
10219 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
10220 (READLINE_DIR,READLINE_DEP): Delete.
10221 (INTERNAL_CFLAGS): Update.
10222 (LINTFLAGS): Update.
10223
9b710a42
PA
102242008-10-10 Pedro Alves <pedro@codesourcery.com>
10225
10226 * server.c (handle_v_run): If GDB didn't specify an argv, use the
10227 whole argv from the last run, not just argv[0].
10228
5822d809
PA
102292008-09-08 Pedro Alves <pedro@codesourcery.com>
10230
10231 * regcache.c (new_register_cache): Return NULL if the register
10232 cache size isn't known yet.
10233 (free_register_cache): Avoid dereferencing a NULL regcache.
10234
74aac56f
DJ
102352008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
10236
10237 * configure.srv: Merge MIPS and MIPS64.
10238
400b20f5
MR
102392008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
10240
10241 * Makefile.in (uninstall): Apply $(EXEEXT) too.
10242
677c5bb1
LM
102432008-08-18 Luis Machado <luisgpm@br.ibm.com>
10244
10245 * Makefile.in: Add required vsx dependencies.
10246
10247 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
10248 Declare init_registers_powerpc_vsx32l.
10249 Declare init_registers_powerpc_vsx64l.
10250 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
10251 (ppc_arch_setup): Check for VSX in hwcap.
10252 (ppc_fill_vsxregset): New function.
10253 (ppc_store_vsxregset): New function.
10254 Add new VSX entry in regset_info target_regsets.
10255
10256 * configure.srv: Add new VSX dependencies.
10257
a6f3e723
SL
102582008-08-12 Pedro Alves <pedro@codesourcery.com>
10259
10260 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
10261 (remote_open): Set or clear transport_is_reliable.
10262 (putpkt_binary): Don't expect acks in noack mode.
10263 (getpkt): Don't send ack/nac in noack mode.
10264 * server.c (handle_general_set): Handle QStartNoAckMode.
10265 (handle_query): If connected by tcp pass QStartNoAckMode+ in
10266 qSupported.
10267 (main): Reset noack_mode on every connection.
10268 * server.h (noack_mode): Declare.
10269
a417dc56
RW
102702008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
10271
10272 * Makefile.in (GDBREPLAY_OBS): New variable.
10273 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
10274
3221518c
UW
102752008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
10276 Daniel Jacobowitz <dan@codesourcery.com>
10277
10278 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
10279 (usr_store_inferior_registers): Likewise.
10280 (regsets_store_inferior_registers): Likewise.
10281
ec56be1b
PA
102822008-07-31 Rolf Jansen <rj@surtec.com>
10283 Pedro Alves <pedro@codesourcery.com>
10284
10285 * configure.ac: Check for memmem declaration.
10286 * server.c [HAVE_MALLOC_H]: Include malloc.h.
10287 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
10288 (disable_packet_qfThreadInfo): Unconditionally compile.
10289 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
10290 * configure, config.in: Regenerate.
10291
2fe5e3ff
DE
102922008-07-28 Doug Kwan <dougkwan@google.com>
10293
10294 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
10295 (linux_write_memory): Remove declaration of errno.
10296
836acd6d
UW
102972008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
10298
10299 * linux-low.c (handle_extended_wait): Do not use "status"
10300 variable uninitialized.
10301
aeba519e
PA
103022008-07-07 Pedro Alves <pedro@codesourcery.com>
10303
10304 * server.c (handle_v_attach): Inhibit reporting dll changes.
10305
db42f210
PA
103062008-06-27 Pedro Alves <pedro@codesourcery.com>
10307
10308 * remote-utils.c (prepare_resume_reply): If requested, don't
10309 output "thread:TID" in the T stop reply.
10310
10311 * server.c (disable_packet_vCont, disable_packet_Tthread)
10312 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
10313 (handle_query): If requested, disable support for qC, qfThreadInfo
10314 and qsThreadInfo.
10315 (handle_v_requests): If requested, disable support for vCont.
10316 (gdbserver_show_disableable): New.
10317 (main): Handle --disable-packet and --disable-packet=LIST.
10318
10319 * server.h (disable_packet_vCont, disable_packet_Tthread)
10320 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
10321
8e4c5421
CD
103222008-06-20 Carlos O'Donell <carlos@codesourcery.com>
10323
10324 * server.c (gdbserver_usage): Mention --version.
10325
6e23a804
DJ
103262008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
10327
10328 * Makefile.in (gdbreplay.o): New rule.
10329
90aa6a40
JM
103302008-06-06 Joseph Myers <joseph@codesourcery.com>
10331
10332 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
10333 message, not gdbserver.
10334
c16158bc 103352008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
10336 Nathan Sidwell <nathan@codesourcery.com>
10337 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
10338
10339 * acinclude.m4: Include ../../config/acx.m4.
10340 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
10341 * configure, config.in: Regenerate.
10342 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
10343 * server.c (gdbserver_version): Print PKGVERSION.
10344 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
10345 (main): Adjust gdbserver_usage calls.
10346 * gdbreplay.c (version, host_name): Add declarations.
10347 (gdbreplay_version, gdbreplay_usage): New.
10348 (main): Accept --version and --help options.
10349
aeb75bf5
DJ
103502008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
10351
10352 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
10353 (arm_breakpoint_at): Handle Thumb.
10354 (the_low_target): Add comment.
10355
76b233dd
UW
103562008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
10357
10358 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
10359
08388c79
DE
103602008-05-09 Doug Evans <dje@google.com>
10361
a3c83fae
DE
10362 * server.h (decode_search_memory_packet): Declare.
10363 * remote-utils.c (decode_search_memory_packet): New fn.
10364 * server.c (handle_search_memory_1): New fn.
08388c79
DE
10365 (handle_search_memory): New fn.
10366 (handle_query): Process qSearch:memory packets.
10367
bb9c3d36
UW
103682008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
10369
10370 * regcache.c (registers_length): Remove.
10371 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
10372 full register packet.
10373 * regcache.h (registers_length): Remove prototype.
10374 * server.h (PBUFSIZ): Define to 16384.
10375
7284e1be
UW
103762008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
10377
10378 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
10379 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
10380 powerpc-64l.o, and powerpc-altivec64l.o.
10381 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
10382 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
10383 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
10384 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
10385 rs6000/power-linux.xml, and rs6000/power64-linux.xml
10386 to srv_xmlfiles.
10387
10388 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
10389 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
10390 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
10391 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
10392 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
10393 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
10394 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
10395 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
10396 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
10397 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
10398 (clean): Update.
10399
10400 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
10401 (init_registers_powerpc_32l): ... this new prototype.
10402 (init_registers_powerpc_32): Remove, replace by ...
10403 (init_registers_powerpc_altivec32l): ... this new prototype.
10404 (init_registers_powerpc_e500): Remove, replace by ...
10405 (init_registers_powerpc_e500l): ... this new prototype.
10406 (init_registers_ppc64): Remove, replace by ...
10407 (init_registers_powerpc_64l): ... this new prototype.
10408 (init_registers_powerpc_64): Remove, replace by ...
10409 (init_registers_powerpc_altivec64l): ... this new prototype.
10410 (ppc_num_regs): Set to 73.
10411 (PT_ORIG_R3, PT_TRAP): Define if necessary.
10412 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
10413 (ppc_cannot_store_register): Handle orig_r3 and trap.
10414 (ppc_arch_setup): Update init_registers_... calls.
10415 (ppc_fill_gregset): Handle orig_r3 and trap.
10416
10417 * inferiors.c (clear_inferiors): Reset current_inferior.
10418
fdc59709
PB
104192008-04-23 Paolo Bonzini <bonzini@gnu.org>
10420
889bf7c5
PA
10421 * acinclude.m4: Add override.m4.
10422 * configure: Regenerate.
fdc59709 10423
c9b2f845
UW
104242008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
10425
10426 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
10427 initial call to init_register_ppc64.
10428
550512b8
UW
104292008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
10430
43aaf8b6
PA
10431 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
10432 single powerpc*-*-linux* case.
550512b8
UW
10433 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
10434
b6430ec3
UW
104352008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
10436
10437 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 10438 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
10439 from reg_xmlfiles.
10440 * linux-ppc-low.c: Include <elf.h>.
10441 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
10442 (ppc_hwcap): New global variable.
10443 (ppc_regmap): Remove __SPE__ #ifdef sections.
10444 (ppc_regmap_e500): New global variable.
10445 (ppc_cannot_store_register): Update __SPE__ special case.
10446 (ppc_get_hwcap): New function.
10447 (ppc_arch_setup): Use it to determine whether inferior supports
10448 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
10449 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
10450 Do not access registers if target does not support AltiVec.
10451 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
10452 Do not access registers if target does not support SPE.
10453 (target_regsets): Unconditionally include AltiVec and SPE regsets.
10454
52fa2412
UW
104552008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
10456
10457 * linux-low.c (disabled_regsets, num_regsets): New.
10458 (use_regsets_p): Delete.
10459 (linux_wait_for_process): Clear disabled_regsets.
10460 (regsets_fetch_inferior_registers): Check and set it.
10461 (regsets_store_inferior_registers): Likewise.
10462 (linux_fetch_registers, linux_store_registers): Do not use
10463 use_regsets_p.
10464 (initialize_low): Allocate disabled_regsets.
10465
e28b3332
DJ
104662008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
10467
10468 * Makefile.in (LIBOBJS): New.
10469 (OBS): Use LIBOBJS.
10470 (memmem.o): New rule.
10471 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
10472 * configure: Regenerated.
10473
4536995d
UW
104742008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
10475
10476 * server.c (handle_query): Never return "unsupported" for
10477 qXfer:features:read queries.
10478
221c031f
UW
104792008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
10480
10481 * server.c (get_features_xml): Fix inverted condition.
10482 (handle_query): Always support qXfer:feature:read.
10483
ccd213ac
DJ
104842008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
10485
10486 * server.c (wrapper_argv): New.
10487 (start_inferior): Handle wrapper_argv. If set, expect an extra
10488 trap.
10489 (gdbserver_usage): Document --wrapper.
10490 (main): Parse --wrapper.
10491
6fe305f7
UW
104922008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10493
10494 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
10495 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
10496 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
10497 (ppc_set_pc): Likewise.
10498 (ppc_arch_setup): New function.
10499 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
10500 of collect_register.
889bf7c5 10501 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 10502
5b0a002e
UW
105032008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10504
10505 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
10506 instead of linux-ppc64-low.o.
10507 * linux-ppc64-low.c: Remove file.
10508 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
10509 (linux-ppc64-low.o): Remove rule.
10510
10511 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
10512 (init_registers_powerpc_64): Likewise.
10513 (ppc_regmap): Conditionally define depending on __powerpc64__.
10514 (ppc_cannot_store_register): Do not special-case "fpscr" when
10515 compiled on __powerpc64__.
10516 (ppc_collect_ptrace_register): New function.
10517 (ppc_supply_ptrace_register): New function.
10518 (ppc_breakpoint): Change type to "unsigned int".
10519 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
10520 (the_low_target): Conditionally provide initializers for the
889bf7c5 10521 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
10522 collect_ptrace_register and supply_ptrace_register members.
10523
9b4b61c8
UW
105242008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10525
10526 * regcache.h (gdbserver_xmltarget): Add extern declaration.
10527 * server.c (gdbserver_xmltarget): Define.
10528 (get_features_xml): Use it to replace "target.xml" and arch_string.
10529
10530 * configure.srv: Remove srv_xmltarget. Add XML files that were
10531 mentioned there to srv_xmlfiles instead. Remove conditional tests
10532 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
10533 srv_xmlfiles and srv_regobj to include all possible choices.
10534 * configure.ac (srv_xmltarget): Remove.
10535 (srv_xmlfiles): Do not add "target.xml".
10536 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
10537 checks for supplementary target information.
10538 * configure: Regenerate.
10539 * Makefile.in (XML_TARGET): Remove.
10540 (target.xml): Remove rule.
10541 (clean): Do not clean up target.xml.
10542 (.PRECIOUS): Do not mention target.xml.
10543
10544 * target.h (struct target_ops): Remove arch_string member.
10545 * linux-low.c (linux_arch_string): Remove.
10546 (linux_target_ops): Remove arch_string initializer.
10547 * linux-low.h (struct linux_target_ops): Remove arch_string member.
10548 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
10549 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
10550 * spu-low.c (spu_arch_string): Remove.
10551 (spu_target_ops): Remove arch_string initializer.
10552 * win32-low.c (win32_arch_string): Remove.
10553 (win32_target_ops): Remove arch_string initializer.
10554 * win32-low.h (struct win32_target_ops): Remove arch_string member.
10555 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
10556 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
10557
ee1a7ae4
UW
105582008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
10559
10560 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
10561 by collect_ptrace_register and supply_ptrace_register hooks.
10562 * linux-low.c (fetch_register): Use supply_ptrace_register callback
10563 instead of checking for the_low_target.left_pad_xfer.
10564 (usr_store_inferior_registers): Use collect_ptrace_register callback
10565 instead of checking for the_low_target.left_pad_xfer.
10566
10567 * linux-s390-low.c (s390_collect_ptrace_register): New function.
10568 (s390_supply_ptrace_register): Likewise.
10569 (s390_fill_gregset): Call s390_collect_ptrace_register.
10570 (the_low_target): Update.
10571
10572 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
10573 (ppc_supply_ptrace_register): Likewise.
10574 (the_low_target): Update.
10575
10576 * linux-i386-low.c (the_low_target): Update.
10577 * linux-x86-64-low.c (the_low_target): Update.
10578
d61ddec4
UW
105792008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
10580
10581 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
10582 reg-s390.o and reg-s390x.o.
10583
10584 * linux-low.c (new_inferior): New global variable.
10585 (linux_create_inferior, linux_attach): Set it.
10586 (linux_wait_for_process): Call the_low_target.arch_setup after the
10587 target has stopped for the first time.
10588 (initialize_low): Do not call the_low_target.arch_setup.
10589
10590 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
10591 (s390_set_pc): Likewise.
10592 (s390_arch_setup): New function.
10593 (the_low_target): Use s390_arch_setup as arch_setup routine.
10594
10595 * regcache.c (realloc_register_cache): New function.
10596 (set_register_cache): Call it for each existing regcache.
10597
d05b4ac3
UW
105982008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
10599
10600 * server.h (init_registers): Remove prototype.
10601
10602 * linux-low.h (struct linux_target_ops): Add arch_setup field.
10603 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
10604 instead of init_registers ().
10605 * linux-arm-low.c (init_registers_arm): Add prototype.
10606 (init_registers_arm_with_iwmmxt): Likewise.
10607 (the_low_target): Add initializer for arch_setup field.
10608 * linux-cris-low.c (init_registers_cris): Add prototype.
10609 (the_low_target): Add initializer for arch_setup field.
10610 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
10611 (the_low_target): Add initializer for arch_setup field.
10612 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
10613 (the_low_target): Add initializer for arch_setup field.
10614 * linux-ia64-low.c (init_registers_ia64): Add prototype.
10615 (the_low_target): Add initializer for arch_setup field.
10616 * linux-m32r-low.c (init_registers_m32r): Add prototype.
10617 (the_low_target): Add initializer for arch_setup field.
10618 * linux-m68k-low.c (init_registers_m68k): Add prototype.
10619 (the_low_target): Add initializer for arch_setup field.
10620 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
10621 (init_registers_mips64_linux): Likewise.
10622 (the_low_target): Add initializer for arch_setup field.
10623 * linux-ppc-low.c (init_registers_ppc): Add prototype.
10624 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
10625 (the_low_target): Add initializer for arch_setup field.
10626 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
10627 (init_registers_powerpc_64): Likewise.
10628 (the_low_target): Add initializer for arch_setup field.
10629 * linux-s390-low.c (init_registers_s390): Add prototype.
10630 (init_registers_s390x): Likewise.
10631 (the_low_target): Add initializer for arch_setup field.
10632 * linux-sh-low.c (init_registers_sh): Add prototype.
10633 (the_low_target): Add initializer for arch_setup field.
10634 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
10635 (the_low_target): Add initializer for arch_setup field.
10636 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
10637 (the_low_target): Add initializer for arch_setup field.
10638
10639 * win32-low.h (struct win32_target_ops): Add arch_setup field.
10640 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
10641 instead of init_registers ().
10642 * win32-arm-low.c (init_registers_arm): Add prototype.
10643 (the_low_target): Add initializer for arch_setup field.
10644 * win32-i386-low.c (init_registers_i386): Add prototype.
10645 (the_low_target): Add initializer for arch_setup field.
10646
10647 * spu-low.c (init_registers_spu): Add prototype.
10648 (initialize_low): Call initialie_registers_spu () instead of
10649 initialize_registers ().
10650
fd96d250
PA
106512008-02-19 Pedro Alves <pedro@codesourcery.com>
10652
10653 * server.c (handle_v_requests): When handling the vRun and vAttach
10654 packets, if already debugging a process, don't kill it. Return an
10655 error instead.
10656
d41b6bb4
DJ
106572008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
10658
10659 * server.c (handle_query): Correct length check.
10660
5ac588cf
PA
106612008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
10662
10663 * win32-low.c (do_initial_child_stuff): Add process handle
10664 parameter. Set current_process_handle and current_process_id from the
10665 parameters. Clear globals.
10666 (win32_create_inferior): Don't set current_process_handle and
10667 current_process_id here. Instead pass them on the call to
10668 do_initial_child_stuff.
10669 (win32_attach): Likewise.
10670 (win32_clear_inferiors): New.
10671 (win32_kill): Don't close the current process handle or the
10672 current thread handle here. Instead call win32_clear_inferiors.
10673 (win32_detach): Don't open a new handle to the process. Call
10674 win32_clear_inferiors.
10675 (win32_join): Don't rely on current_process_handle; open a new
10676 handle using the process id.
10677 (win32_wait): Call win32_clear_inferiors when the inferior process
10678 has exited.
10679
ecd7ecbc
DJ
106802008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
10681
10682 * server.c (monitor_show_help): Add "exit".
10683
1525d545
MG
106842008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
10685
ecd7ecbc 10686 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
10687 (clean): Add reg-xtensa.c.
10688 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
10689 * configure.srv (xtensa*-*-linux*) New target.
10690 * linux-xtensa-low.c: New.
10691 * xtensa-xtregs.c: New.
1525d545 10692
59a016f0
PA
106932008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
10694
10695 * hostio.c: Don't include errno.h.
10696 (errno_to_fileio_errno): Move to hostio-errno.
10697 * hostio.c: (hostio_error): Remove the error parameter. Defer the
10698 error number outputting to the target->hostio_last_error callback.
10699 (hostio_packet_error): Use FILEIO_EINVAL directly.
10700 (handle_open, handle_pread, hostio_error, handle_unlink): Update
10701 calls to hostio_error.
10702 * hostio-errno.c: New.
10703 * server.h (hostio_last_error_from_errno): Declare.
10704 * target.h (target_ops): Add hostio_last_error member.
10705 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
10706 as hostio_last_error handler.
889bf7c5 10707 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
10708 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
10709 (wince_hostio_last_error): New functions.
10710 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
10711 as hostio_last_error handler.
10712 (win32_target_ops) [!_WIN32_WCE]: Register
10713 hostio_last_error_from_errno as hostio_last_error handler.
10714 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
10715 (hostio-errno.o): New rule.
10716 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
10717 * configure.srv (srv_hostio_err_objs): New variable. Default to
10718 hostio-errno.o.
10719 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
10720 * configure: Regenerate.
10721
2d717e4f
DJ
107222008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
10723
10724 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
10725 (linux_kill, linux_detach): Clean up the process list.
10726 * remote-utils.c (remote_open): Improve port number parsing.
10727 (putpkt_binary, input_interrupt): Only send interrupts if the target
10728 is running.
10729 * server.c (extended_protocol): Make static.
10730 (attached): Define earlier.
10731 (exit_requested, response_needed, program_argv): New variables.
10732 (target_running): New.
10733 (start_inferior): Clear attached here.
10734 (attach_inferior): Set attached here.
10735 (require_running): Define.
10736 (handle_query): Use require_running and target_running. Implement
10737 "monitor exit".
10738 (handle_v_attach, handle_v_run): New.
10739 (handle_v_requests): Use require_running. Handle vAttach and vRun.
10740 (gdbserver_usage): Update.
10741 (main): Redo argument parsing. Handle --debug and --multi. Handle
10742 --attach along with other options or after the port. Save
10743 program_argv. Support no initial program. Resynchronize
10744 communication with GDB after an error. Handle "monitor exit".
10745 Use require_running and target_running. Always allow the extended
10746 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
10747 restart in extended mode.
10748 * README: Refer to the GDB manual. Update --attach usage.
10749
7407e2de
AS
107502007-12-20 Andreas Schwab <schwab@suse.de>
10751
10752 * linux-low.c (STACK_SIZE): Define.
10753 (linux_tracefork_child): Use it. Use __clone2 on ia64.
10754 (linux_test_for_tracefork): Likewise.
10755
b65d95c5
DJ
107562007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
10757
10758 * linux-low.c (linux_wait_for_event): Update messages. Do not
10759 reinsert auto-delete breakpoints.
10760 * mem-break.c (struct breakpoint): Change return type of handler to
10761 int.
10762 (set_breakpoint_at): Update handler type.
10763 (reinsert_breakpoint_handler): Return 1 instead of calling
10764 delete_breakpoint.
10765 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
10766 setting a new one.
10767 (check_breakpoints): Delete auto-delete breakpoints and return 2.
10768 * mem-break.h (set_breakpoint_at): Update handler type.
10769 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
10770 * win32-low.c (auto_delete_breakpoint): New.
10771 (get_child_debug_event): Use it.
10772
4e799345
DJ
107732007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
10774
10775 * configure.ac: Check for pread and pwrite.
10776 * hostio.c (handle_pread): Fall back to lseek and read.
10777 (handle_pwrite): Fall back to lseek and write.
10778 * config.in, configure: Regenerated.
10779
27524b67
DJ
107802007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
10781
10782 * server.c (myresume): Add own_buf argument.
10783 (main): Update calls.
10784
a20d5e98
DJ
107852007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
10786
10787 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
10788 * remote-utils.c (remote_open): Do not call disable_async_io.
10789 (block_async_io): Delete.
10790 (unblock_async_io): Make static.
10791 (initialize_async_io): New.
10792 * server.c (handle_v_cont): Handle async I/O here.
10793 (myresume): Likewise. Move other common resume tasks here...
10794 (main): ... from here. Call initialize_async_io. Disable async
10795 I/O before the main loop.
10796 * server.h (initialize_async_io): Declare.
10797 (block_async_io, unblock_async_io): Delete prototypes.
10798 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
10799
b79d787e
DJ
108002007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
10801
10802 * remote-utils.c (readchar): Allow binary data in received messages.
10803
d97903b2
PA
108042007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10805
10806 * win32-low.c (attaching): New global.
10807 (win32_create_inferior): Clear the `attaching' global.
10808 (win32_attach): Set the `attaching' global.
10809 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
10810 attaching. Only set a breakpoint at the entry point if not
10811 attaching.
10812
311de423
PA
108132007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10814
10815 * server.c (main): Don't report dll events on the initial
10816 connection on attaches.
10817
6c2d16d2
PA
108182007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10819
10820 * server.c (main): Relax numerical bases supported for the pid of
10821 the --attach command line argument.
10822
5ca906e6
PA
108232007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10824
10825 * win32-low.c (win32_attach): Call OpenProcess before
10826 DebugActiveProcess, not after. Add last error output to error
10827 call.
10828
9c6c8194
PA
108292007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10830
10831 * win32-low.c (win32_get_thread_context)
10832 (win32_set_thread_context): New functions.
10833 (thread_rec): Use win32_get_thread_context.
10834 (continue_one_thread, win32_resume): Use win32_set_thread_context.
10835 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
10836 field.
10837
4d5d1aaa
PA
108382007-12-03 Leo Zayas
10839 Pedro Alves <pedro_alves@portugalmail.pt>
10840
10841 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
10842 global variables.
10843 (child_add_thread): Minor cleanup.
10844 (child_continue): Resume artificially suspended threads before
10845 calling ContinueDebugEvent.
10846 (suspend_one_thread): New.
10847 (fake_breakpoint_event): New.
10848 (get_child_debug_event): Change return type to int. Check here if
10849 gdb sent an interrupt request. If a soft interrupt was requested,
10850 fake a breakpoint event. Return 0 if there is no event to handle,
10851 and 1 otherwise.
10852 (win32_wait): Don't check here if gdb sent an interrupt request.
10853 Ensure there is a valid event to handle.
10854 (win32_request_interrupt): Add soft interruption method as last
10855 resort.
10856
c436e841
PA
108572007-12-03 Leo Zayas
10858 Pedro Alves <pedro_alves@portugalmail.pt>
10859
10860 * win32-low.h (win32_thread_info): Add descriptions to the
10861 structure members. Replace `suspend_count' counter by a
10862 `suspended' flag.
10863 * win32-low.c (thread_rec): Update condition of when to get the
10864 context from the inferior. Rely on ContextFlags being set if it
10865 has already been retrieved. Only suspend the inferior thread if
10866 we haven't already. Warn if that fails.
10867 (continue_one_thread): s/suspend_count/suspended/. Only call
10868 ResumeThread once. Warn if that fails.
10869
e7b5fa67
PA
108702007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
10871
10872 * win32-low.c (win32_wait): Don't read from the inferior when it
10873 has already exited.
10874
a385171d
PA
108752007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
10876
10877 * Makefile.in (win32_low_h): New variable.
10878 (win32-low.o): Add dependency on $(win32_low_h).
10879 (win32-arm-low.o, win32-i386-low.o): New rules.
10880
f80c84b3
DJ
108812007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
10882
10883 * hostio.c: Correct copyright year.
10884
a6b151f1
DJ
108852007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
10886
10887 * Makefile.in (OBS): Add hostio.o.
10888 (hostio.o): New rule.
10889 * server.h (handle_vFile): Declare.
10890 * hostio.c: New file.
10891 * server.c (handle_v_requests): Take packet_len and new_packet_len
10892 for binary packets. Call handle_vFile.
10893 (main): Update call to handle_v_requests.
10894
f9387fc3
DJ
108952007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
10896
10897 * linux-low.c: Include <sched.h>.
10898
51c2684e
DJ
108992007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
10900
10901 * linux-low.c (linux_tracefork_grandchild): New.
10902 (linux_tracefork_child): Use clone.
10903 (linux_test_for_tracefork): Use clone; allocate and free a stack.
10904
75f83163
JB
109052007-10-31 Joel Brobecker <brobecker@adacore.com>
10906
10907 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
10908
da5898ce
DJ
109092007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
10910
10911 * linux-low.c (handle_extended_wait): Handle unexpected signals.
10912
24a09b5f
DJ
109132007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
10914
10915 * inferiors.c (change_inferior_id): Delete.
10916 (add_pid_to_list, pull_pid_from_list): New.
10917 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
10918 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
10919 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
10920 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
10921 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
10922 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
10923 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
10924 (using_threads): Always set to 1.
10925 (handle_extended_wait): New.
10926 (add_process): Do not set TID.
10927 (linux_create_inferior): Set must_set_ptrace_flags.
10928 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
10929 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
10930 (linux_thread_alive): Rename TID argument to LWPID.
10931 (linux_wait_for_process): Handle unknown processes. Do not use TID.
10932 (linux_wait_for_event): Do not use TID or check using_threads. Update
10933 call to dead_thread_notify. Call handle_extended_wait.
10934 (linux_create_inferior): Use PTRACE_SETOPTIONS.
10935 (send_sigstop): Delete sigstop_sent.
10936 (wait_for_sigstop): Avoid TID.
10937 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
10938 (linux_test_for_tracefork): New.
10939 (linux_lookup_signals): Use thread_db_active and
10940 linux_supports_tracefork_flag.
10941 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
10942 * linux-low.h (get_process_thread): Avoid TID.
10943 (struct process_ifo): Move thread_known and tid to the end. Remove
10944 sigstop_sent.
10945 (linux_attach_lwp, thread_db_init): Update prototypes.
10946 * server.h (change_inferior_id): Delete prototype.
10947 (add_pid_to_list, pull_pid_from_list): New prototypes.
10948 * thread-db.c (thread_db_use_events): New.
10949 (find_first_thread): Rename to...
10950 (find_one_thread): ...this. Update callers and messages. Do not
10951 call fatal. Check thread_db_use_events. Do not call
10952 change_inferior_id or new_thread_notify.
10953 (maybe_attach_thread): Update. Do not call new_thread_notify.
10954 (thread_db_init): Set thread_db_use_events. Check use_events.
10955 * utils.c (fatal, warning): Correct message prefix.
10956
30ed0a8f
DJ
109572007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
10958
10959 * Makefile.in (clean): Remove new files.
10960 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
10961 (powerpc-64.o, powerpc-64.c): New rules.
10962 * configure.srv: Use alternate register sets for powerpc64-*-linux*
10963 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
10964 with SPE.
10965 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
10966 SPE targets.
10967 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
10968 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
10969 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
10970 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
10971 (target_regsets): Add AltiVec and SPE register sets.
10972 * configure.ac: Check for AltiVec and SPE.
10973 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
10974 (ppc_fill_vrregset, ppc_store_vrregset): New.
10975 (target_regsets): Add AltiVec register set.
10976 * configure: Regenerated.
10977
fd462a61
DJ
109782007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
10979
10980 * linux-low.c (O_LARGEFILE): Define.
10981 (linux_read_memory): Use /proc/PID/mem.
10982 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
10983 * configure, config.in: Regenerated.
10984
69f223ed
DJ
109852007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
10986
10987 * linux-low.c (linux_wait_for_event): Do not pass signals while
10988 single-stepping.
10989
aec18585
PA
109902007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
10991
10992 * win32-low.c (create_process): New.
10993 (win32_create_inferior): Use create_process instead of
10994 CreateProcess. If create_process failed retry appending an ".exe"
10995 suffix. Store the GetLastError result immediatelly after
10996 create_process calls and use it on the call to error.
10997
34d86ddd
PA
109982007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
10999
11000 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
11001
5a0e3bd0
JB
110022007-08-23 Joel Brobecker <brobecker@adacore.com>
11003
11004 * configure.ac: Switch license to GPLv3.
11005
f88c79e6
MS
110062007-08-01 Michael Snyder <msnyder@access-company.com>
11007
11008 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
11009
6b3d9b83
PA
110102007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
11011
11012 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
11013 typedef.
11014 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
11015 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
11016 CloseToolhelp32Snapshot.
11017 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
11018 CloseToolhelp32Snapshot.
11019
c588c53c
MS
110202007-07-27 Michael Snyder <michael.snyder@access-company.com>
11021
11022 * server.c (main): Check for inferior exit before main loop.
11023
aa0403d9
PA
110242007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
11025
11026 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
11027 instead of on tmp_desc.
11028
255e7678
DJ
110292007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
11030 Daniel Jacobowitz <dan@codesourcery.com>
11031
11032 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
11033 (add_thread): Minor cleanups.
11034 (clear_inferiors): Move lower in the file. Clear the DLL
11035 list.
11036 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
11037 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
11038 (xml_escape_text): New.
11039 * server.c (handle_query): Handle qXfer:libraries:read. Report it
11040 for qSupported.
11041 (handle_v_cont): Report errors.
11042 (gdbserver_version): Update.
11043 (main): Correct size of own_buf. Do not report initial DLL events.
11044 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
11045 (unloaded_dll, xml_escape_text): New.
11046 * win32-low.c (enum target_waitkind): Update comments.
11047 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
11048 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
11049 (win32_EnumProcessModules, win32_GetModuleInformation)
11050 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
11051 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
11052 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
11053 (win32_Module32First, win32_Module32Next, load_toolhelp)
11054 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
11055 (get_child_debug_event): Handle DLL events.
11056 (win32_wait): Likewise.
11057
0d37add9
DJ
110582007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
11059
11060 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
11061 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
11062
45e2715e
PA
110632007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
11064
11065 * win32-low.c (handle_output_debug_string): Ignore event if not
11066 waiting.
11067
c5674cf1
PA
110682007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
11069
11070 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
11071
2bbe3cc1
DJ
110722007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
11073
11074 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
11075
ae13219e
DJ
110762007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
11077
11078 * inferiors.c (change_inferior_id): Add comment.
11079 * linux-low.c (check_removed_breakpoint): Add an early
11080 prototype. Improve debug output.
11081 (linux_attach): Doc update.
11082 (linux_detach_one_process, linux_detach): Clean up before releasing
11083 each process.
11084 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
11085 * linux-low.h (struct process_info): Doc improvement.
11086 * mem-break.c (delete_all_breakpoints): New.
11087 * mem-break.h (delete_all_breakpoints): New prototype.
11088 * thread-db.c (find_first_thread): New.
11089 (thread_db_create_event): Call it instead of
11090 thread_db_find_new_threads. Clean up unused variables.
11091 (maybe_attach_thread): Remove first thread handling.
11092 (thread_db_find_new_threads): Use find_first_thread.
11093 (thread_db_get_tls_address): Likewise.
11094
4105de34
DJ
110952007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
11096
11097 * thread-db.c (thread_db_find_new_threads): Add prototype.
11098 (thread_db_create_event): Check for the main thread before adding
11099 a new thread.
11100 (maybe_attach_thread): Only enable event reporting if TID == 0.
11101 (thread_db_get_tls_address): Check for new threads.
11102
2b876972
DJ
111032007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
11104
11105 * linux-low.c (linux_create_inferior): Try execv before execvp.
11106 * spu-low.c (spu_create_inferior): Likewise.
11107
7a245884
DJ
111082007-06-13 Mike Frysinger <vapier@gentoo.org>
11109
11110 * linux-low.c (linux_create_inferior): Change execv to execvp.
11111 * spu-low.c (spu_create_inferior): Likewies.
11112
117ce543
DJ
111132007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
11114
11115 * Makefile.in (clean): Clean new files instead of deleted ones.
11116 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
11117 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
11118 rules.
11119 * configure.srv: Specify XML files and new regformats for MIPS and
11120 MIPS64 GNU/Linux.
11121 * linux-mips-low.c (mips_num_regs): Set to only used registers.
11122 (mips_regmap): Do not fetch $0. Remove unused registers. Add
11123 an entry for the restart register.
11124 (mips_cannot_fetch_register, mips_cannot_store_register)
11125 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
11126 register names to match the XML descriptions.
11127 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
11128 restart register instead of $0.
11129
0e7f50da
UW
111302007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
11131 Markus Deuling <deuling@de.ibm.com>
11132
11133 * remote-utils.c (decode_xfer_write): New function.
11134 * server.h (decode_xfer_write): Add prototype.
11135 * server.c (handle_query): Add PACKET_LEN argument. Support
11136 qXfer:spu:read and qXfer:spu:write packets.
11137 (main): Pass packet_len to handle_query.
11138 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
11139 * target.h (target_ops): Add qxfer_spu.
11140
374c1d38
UW
111412007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
11142
11143 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
11144 accessing non-seekable spufs files.
11145
bb63802a
UW
111462007-05-16 Markus Deuling <deuling@de.ibm.com>
11147
889bf7c5 11148 * server.c (handle_query): Add reply for qC packet.
bb63802a 11149
7390519e
PA
111502007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11151 Leo Zayas <lerele@champenstudios@com>
11152
11153 * server.h (check_remote_input_interrupt_request): New function.
11154 * remote_utils.c (INVALID_DESCRIPTOR): New define.
11155 (remote_desc): Initialize with INVALID_DESCRIPTOR.
11156 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
11157 (check_remote_input_interrupt_request): New function.
11158 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 11159 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
11160 winapi_GenerateConsoleCtrlEvent): New typedefs.
11161 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
11162 to 250 ms.
11163 (win32_wait): Check for remote interrupt request
11164 with check_remote_input_interrupt_request.
11165 (win32_request_interrupt): New function.
11166 (win32_target_op): Set request_interrupt to win32_request_interrupt.
11167
34b34921
PA
111682007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11169
11170 * win32-low.c (debug_registers_changed,
11171 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
11172 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
11173 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
11174 (thread_rec): Get context using the low target.
11175 (child_add_thread): Call thread_added on the low target,
11176 which does the same thing.
11177 (regptr): Delete.
11178 (do_initial_child_stuff): Remove debug registers references.
11179 Set context using the low target. Resume threads after
11180 setting the contexts.
11181 (child_continue): Remove dead variable. Remove debug
11182 registers references.
11183 (child_fetch_inferior_registers): Go through the low target.
11184 (do_child_store_inferior_registers): Remove.
11185 (child_store_inferior_registers): Go through the low target.
11186 (win32_resume): Remove debug registers references.
11187 Set context using the low target.
11188 (handle_exception): Change return type to void. Don't record
11189 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
11190 first chance exception.
889bf7c5 11191 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
11192 goto loop. Always return after waiting for debug event.
11193 (win32_wait): Convert to switch statement. Handle spurious
11194 events.
11195
11196 * win32-i386-low.c (debug_registers_changed,
11197 debug_registers_used): New.
11198 (initial_stuff): Rename to ...
11199 (i386_initial_stuff): ... this. Clear debug registers
11200 state variables.
11201 (store_debug_registers): Delete.
11202 (i386_get_thread_context): New.
11203 (load_debug_registers): Delete.
11204 (i386_set_thread_context): New.
11205 (i386_thread_added): New.
11206 (single_step): Rename to ...
11207 (i386_single_step): ... this.
11208 (do_fetch_inferior_registers): Rename to ...
11209 (i386_fetch_inferior_register): ... this.
11210 (i386_store_inferior_register): New.
11211 (the_low_target): Adapt to new interface.
11212
11213 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
11214 (arm_get_thread_context): New.
11215 (arm_set_thread_context): New.
11216 (regptr): New.
11217 (do_fetch_inferior_registers): Rename to ...
11218 (arm_fetch_inferior_register): ... this.
11219 (arm_store_inferior_register): New.
11220 (arm_wince_breakpoint): Reimplement as unsigned long.
11221 (arm_wince_breakpoint_len): Define.
11222 (the_low_target): Adapt to new interface.
11223
11224 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
11225 load_debug_registers. Add get_thread_context, set_thread_context,
11226 thread_added and store_inferior_register. Rename
11227 fetch_inferior_registers to fetch_inferior_register.
11228 (regptr): Remove declaration.
11229
dd6953e1
PA
112302007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11231
11232 * linux-low.c (linux_detach): Change return type to int. Return 0.
11233 * spu-low.c (spu_detach): Likewise.
11234
444d6139
PA
112352007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11236
11237 * target.h (target_ops): Change return type of detach to int.
11238 Add join.
11239 (join_inferior): New.
11240 * server.c (main): Don't skip detach support on mingw32.
11241 If the inferior doesn't support detaching return error.
11242 Call join_inferior instead of using waitpid.
11243 * linux-low.c (linux_join): New.
11244 (linux_target_op): Add linux_join.
11245 * spu-low.c (spu_join): New.
11246 (spu_target_ops): Add spu_join.
11247 * win32-low.c (win32_detach): Adapt to new interface.
11248 Reopen current_process_handle before detaching. Issue a child
11249 resume before detaching.
11250 (win32_join): New.
11251 (win32_target_op): Add win32_join.
11252
1d5315fe
PA
112532007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11254
11255 * win32-low.c (win32-attach): Fix return value.
11256 * target.h (target_ops): Describe ATTACH return values.
11257
bf914831
PA
112582007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11259
11260 * win32-low.c (GETPROCADDRESS): Define.
11261 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
11262 (winapi_DebugSetProcessKillOnExit): Likewise.
11263 (win32_create_inferior): Force usage of ansi CreateProcessA.
11264 (win32_attach): Use GETPROCADDRESS.
11265 (win32_detach): Likewise.
11266
f72f3e60
PA
112672007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11268
11269 * win32-low.c (win32_wait): Don't use WSTOPSIG.
11270
ed50f18f
PA
112712007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
11272
11273 * win32-low.c: Commit leftover changes from 2007-03-29.
11274
0c2ead7e
DJ
112752007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
11276
11277 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
11278 fields short instead of int. Add explicit padding.
11279 (i387_cache_to_fsave): Remove unnecessary casts.
11280 (i387_fsave_to_cache): Doc fix.
11281 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
11282
73725ff3
DJ
112832007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
11284
11285 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
11286 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
11287
d99f33d8
PA
112882007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
11289
11290 * configure.srv (arm*-*-mingw32ce*): Move near the other
11291 arm targets.
11292
68070c10
PA
112932007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
11294
2482afc6 11295 * configure.ac: Add errno checking.
68070c10
PA
11296 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
11297 sys/file.h and malloc.h.
11298 (AC_CHECK_DECLS): Add perror.
11299 (srv_mingwce): Handle.
2482afc6 11300 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
11301 win32-i386-low.o to srv_tgtobj.
11302 (i[34567]86-*-mingw*): Likewise.
11303 (arm*-*-mingw32ce*): Add case.
11304 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
11305 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
11306 [__MINGW32CE__] (strerror): New function.
11307 [__MINGW32CE__] (errno): Define to GetLastError.
11308 [__MINGW32CE__] (COUNTOF): New macro.
11309 (remote_open): Remove extra close call.
11310 * mem-break.c (delete_breakpoint_at): New function.
11311 * mem-break.h (delete_breakpoint_at): Declare.
11312 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
11313 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
11314 [USE_WIN32API] (read, write): Add char* casts.
11315 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
11316 * server.h: Include wincecompat.h on Windows CE.
11317 [HAVE_ERRNO_H]: Check.
11318 (perror): Declare if not declared.
11319 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
11320 (perror_with_name): Remove errno declaration.
11321 * wincecompat.h: New.
11322 * wincecompat.c: New.
11323 * win32-low.h: New.
11324 * win32-arm-low.c: New.
11325 * win32-i386-low.c: New.
11326 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
11327 (OUTMSG2): Make it safe.
11328 (_T): New macro.
11329 (COUNTOF): New macro.
11330 (NUM_REGS): Get it from the low target.
11331 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
11332 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
11333 (thread_rec): Let low target handle debug registers.
11334 (child_add_thread): Likewise.
11335 (child_init_thread_list): Likewise.
11336 (continue_one_thread): Likewise.
11337 (regptr): New.
11338 (do_child_fetch_inferior_registers): Move to ...
11339 * win32-i386-low.c: ... here, and rename to ...
11340 (do_fetch_inferior_registers): ... this.
889bf7c5 11341 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
11342 Go through the low target.
11343 (do_child_store_inferior_registers): Use regptr.
11344 (strwinerror): New function.
11345 (win32_create_inferior): Handle Windows CE.
11346 Use strwinerror instead of strerror on Windows error
11347 codes. Add program to the error output.
11348 Don't close the main thread handle on Windows CE.
11349 (win32_attach): Use coredll.dll on Windows CE.
11350 (win32_kill): Close current process and current
11351 thread handles.
11352 (win32_detach): Use coredll.dll on Windows CE.
11353 (win32_resume): Let low target handle debug registers, and
11354 step request.
11355 (handle_exception): Add/Remove initial breakpoint. Avoid
11356 non-existant WSTOPSIG on Windows CE.
11357 (win32_read_inferior_memory): Cast to remove warning.
11358 (win32_arch_string): Go through the low target.
11359 (initialize_low): Call set_breakpoint_data with the low
11360 target's breakpoint.
11361 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
11362 FOP_REGNUM, mappings): Move to ...
11363 * win32-i386-low.c: ... here.
11364 * win32-low.c (win32_thread_info): Move to ...
11365 * win32-low.h: ... here.
11366 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
11367 win32-arm-low.c and wincecompat.c.
11368 (all:): Add $EXEEXT.
11369 (install-only:): Likewise.
11370 (gdbserver:): Likewise.
11371 (gdbreplay:): Likewise.
11372 * config.in: Regenerate.
11373 * configure: Regenerate.
11374
41093d81
PA
113752007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
11376
11377 * win32-low.c: Rename typedef thread_info to
11378 win32_thread_info throughout.
11379
544afa54
PA
113802007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
11381
11382 * win32-i386-low.c: Rename to ...
11383 * win32-low.c: ... this.
11384 * configure.srv: Replace win32-i386-low.o with win32-low.o.
11385 * Makefile.in: Likewise.
11386
bce7165d
PA
113872007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
11388
11389 * remote-utils.c (monitor_output): Constify msg parameter.
11390 * server.h (monitor_output): Likewise.
11391 * win32-i386-low.c (handle_output_debug_string): New.
11392 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
11393 handle_output_debug_string.
11394 (get_child_debug_event): Likewise.
11395
506c7aa0
DJ
113962007-03-27 Mat Hostetter <mat@lcs.mit.edu>
11397
11398 * server.c (main): Correct strtoul check.
11399
42c81e2a
DJ
114002007-03-27 Jon Ringle <jon@ringle.org>
11401
11402 * linux-low.c: Check __ARCH_HAS_MMU__ also.
11403
9453113a
DJ
114042007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
11405
11406 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
11407
64a69107
DJ
114082007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
11409
11410 * terminal.h: Check HAVE_SGTTY_H.
11411
114122007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
11413
11414 * remote-utils.c (remote_open): Print out the assigned port number.
11415
c74d0ad8
DJ
114162007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
11417
11418 * remote-utils.c (monitor_output): New function.
11419 * server.c (debug_threads): Define here.
11420 (monitor_show_help): New function.
11421 (handle_query): Handle qRcmd.
11422 (main): Do not handle 'd' packet.
11423 * server.h (debug_threads, remote_debug, monitor_output): Declare.
11424 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
11425 of debug_threads.
11426
de7c3b4a
PA
114272007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11428
11429 * Makefile.in (EXEEXT): New.
11430 (clean): Use $(EXEEXT).
11431
ef57601b
PA
114322007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11433
11434 * target.h (target_ops): Rename send_signal to request_interrupt,
11435 and remove enum target_signal parameter.
11436 * linux-low.c (linux_request_interrupt): Rename from
11437 linux_send_signal, and always send SIGINT.
11438 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
11439 and always send SIGINT.
11440 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
11441 of send_signal.
11442 (input_interrupt): Likewise.
11443
820f2bda
PA
114442007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11445
11446 * server.c (get_features_xml): Check if target implemented
11447 arch_string.
11448 * win32-i386-low.c (win32_arch_string): New.
11449 (win32_target_ops): Add win32_arch_string as arch_string member.
11450
ab39bf24
UW
114512007-02-22 Markus Deuling <deuling@de.ibm.com>
11452
11453 * spu-low.c (spu_arch_string): New.
11454 (spu_target_ops): Add spu_arch_string.
11455
61ff6e04
DJ
114562007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
11457
11458 * remote-utils.c: Remove HAVE_TERMINAL_H check.
11459 * configure.ac: Do not check for terminal.h.
11460 * configure, config.in: Regenerated.
11461
fb1e4ffc
DJ
114622007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
11463
11464 * Makefile.in (OBS): Add $(XML_BUILTIN).
11465 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
11466 (clean): Update.
11467 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
11468 (arm-with-iwmmxt.c): New.
11469 * config.in, configure: Regenerate.
11470 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
11471 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
11472 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
11473 (arm*-*-linux*): Add iWMMXt and regset support.
11474 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
11475 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
11476 (arm_store_wmmxregset, target_regsets): New.
11477 * server.c (get_features_xml): Take annex argument. Check builtin
11478 XML documents.
11479 (handle_query): Handle multiple annexes.
11480
0f48aa01
DJ
114812007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11482
11483 * remote-utils.c [USE_WIN32API] (read, write): Define.
11484 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
11485 write.
11486
23181151
DJ
114872007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
11488
11489 * linux-i386-low.c (the_low_target): Set arch_string.
11490 * linux-x86-64-low.c (the_low_target): Likewise.
11491 * linux-low.c (linux_arch_string): New.
11492 (linux_target_ops): Add it.
11493 * linux-low.h (struct linux_target_ops): Add arch_string.
11494 * server.c (write_qxfer_response): Use const void * for DATA.
11495 (get_features_xml): New.
11496 (handle_query): Handle qXfer:features:read. Report it for qSupported.
11497 * target.h (struct target_ops): Add arch_string method.
11498
9d606399
DJ
114992007-01-03 Denis Pilat <denis.pilat@st.com>
11500 Daniel Jacobowitz <dan@codesourcery.com>
11501
11502 * linux-low.c (linux_kill): Handle being called with no threads.
11503 * win32-i386-low.c (win32_kill): Likewise.
11504 (get_child_debug_event): Clear current_process_handle.
11505
115062006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
11507 Daniel Jacobowitz <dan@codesourcery.com>
11508
11509 * remote-utils.c (remote_open): Check the type of specified
11510 serial port devices before opening them.
11511 * server.c (main): Kill the inferior if an error occurs during
11512 the first remote_open.
11513
a5e13d24
DJ
115142006-12-05 Markus Deuling <deuling@de.ibm.com>
11515
11516 * README: Update supported targets.
11517
186947f7
DJ
115182006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
11519
11520 * Makefile.in (clean): Remove reg-mips64.c.
11521 (reg-mips64.c, reg-mips64.o): New rules.
11522 * configure.srv: Handle mips64. Include regset support for mips.
11523 * linux-mips-low.c (union mips_register): New.
11524 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
11525 (mips_breakpoint, mips_breakpoint_at): Use int.
11526 (mips_collect_register, mips_supply_register)
11527 (mips_collect_register_32bit, mips_supply_register_32bit)
11528 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
11529 (mips_store_fpregset, target_regsets): New.
11530 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
11531
a13e2c95
UW
115322006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
11533
11534 * configure.srv: Add target "spu*-*-*".
11535 * Makefile.in (clean): Remove reg-spu.c.
11536 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
11537 * spu-low.c: New file.
11538
cb7283db
DJ
115392006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
11540
11541 * configure.ac: Correct td_thr_tls_get_addr test.
11542 * configure: Regenerated.
11543
89be2091
DJ
115442006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
11545
11546 * linux-low.c (linux_wait_for_event): Reformat. Use the
11547 pass_signals array.
11548 * remote-utils.c (decode_address_to_semicolon): New.
11549 * server.c (pass_signals, handle_general_set): New.
11550 (handle_query): Mention QPassSignals for qSupported.
11551 (main): Call handle_general_set.
11552 * server.h (pass_signals, decode_address_to_semicolon): New.
11553
000ef4f0
DJ
115542006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
11555
11556 * server.c (handle_query): Correct error handling for read_auxv.
11557
b7149293
UW
115582005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
11559
11560 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
11561 and srv_linux_thread_db to yes.
11562 * linux-s390-low.c (s390_fill_gregset): New function.
11563 (target_regsets): Define data structure.
11564
dae5f5cf
DJ
115652006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
11566
11567 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
11568 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
11569 * config.in, configure: Regenerated.
11570 * inferiors.c (gdb_id_to_thread): New function.
11571 (gdb_id_to_thread_id): Use it.
11572 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
11573 * linux-low.h (struct process_info): Add th member.
11574 (thread_db_get_tls_address): New prototype.
11575 * remote-utils.c (decode_address): Make non-static.
11576 * server.c (handle_query): Handle qGetTLSAddr.
11577 * server.h (gdb_id_to_thread, decode_address): New prototypes.
11578 * target.h (struct target_ops): Add get_tls_address.
11579 * thread-db.c (maybe_attach_thread): Save the thread handle.
11580 (thread_db_get_tls_address): New.
11581
32ca6d61
DJ
115822006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
11583
11584 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
11585 (linux_resume_one_process): Take a siginfo_t *. Update all
11586 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
11587 (struct pending_signals): Add a siginfo_t.
11588 (linux_wait_for_process): Always set last_status.
11589 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
11590 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
11591 * linux-low.h (struct process_info): Add last_status.
11592
5ffff7c1
DJ
115932006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
11594
11595 * remote-utils.c (try_rle): New function.
11596 (putpkt_binary): Use it.
11597
8695c747
DJ
115982006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
11599
11600 * Makefile.in (clean): Clean reg-x86-64-linux.c.
11601 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
11602 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
11603 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
11604 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
11605 point registers.
11606
290fadea
RS
116072006-08-08 Richard Sandiford <richard@codesourcery.com>
11608
11609 * server.c (terminal_fd): New variable.
11610 (old_foreground_pgrp): Likewise.
11611 (restore_old_foreground_pgrp): New function.
11612 (start_inferior): Record the terminal file descriptor in terminal_fd
11613 and its original foreground group in old_foreground_pgrp. Register
11614 restore_old_foreground_pgrp with atexit().
11615
9f2e1e63
DJ
116162006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
11617
11618 * server.c (handle_query): Correct qPart to qXfer.
11619
b80864fb
DJ
116202006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
11621
11622 * configure.ac: Check for more headers which are missing on
11623 Windows. Automatically supply -lwsock32 and USE_WIN32API.
11624 * configure.srv: Add Cygwin and mingw32.
11625 * remote-utils.c: Don't include headers unconditionally which
11626 are missing on mingw32. Include <winsock.h> for mingw32.
11627 (remote_open): Adjust for mingw32 support. Flush
11628 standard error after writing to it.
11629 (remote_close, putpkt_binary, input_interrupt, block_async_io)
11630 (unblock_async_io, enable_async_io, disable_async_io)
11631 (readchar, getpkt): Update for Winsock support.
11632 (prepare_resume_reply): Expect a protocol signal number.
11633 * server.c: Disable <sys/wait.h> on mingw32.
11634 (start_inferior): Adjust for mingw32 support. Flush
11635 standard error after writing to it.
11636 (attach_inferior): Likewise. Use protocol signal
11637 numbers.
11638 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
11639 and names.
11640 * win32-i386-low.c: New file.
11641 * Makefile.in (XM_CLIBS): Set.
11642 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
11643 (win32-i386-low.o): New dependency rule.
11644 * linux-low.c (linux_wait): Use target signal numbers.
11645 * target.h (struct target_ops): Doc fix.
11646 * server.h (target_signal_to_name): New prototype.
11647 * gdbreplay.c: Don't include headers unconditionally which
11648 are missing on mingw32. Include <winsock.h> for mingw32.
11649 (remote_close, remote_open): Adjust for Winsock support.
11650 * configure, config.in: Regenerated.
11651
0876f84a
DJ
116522006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
11653
11654 * server.c (decode_xfer_read, write_qxfer_response): New.
11655 (handle_query): Take a packet length argument. Handle
11656 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
11657 the qSupported response.
11658 (main): Update call to handle_query.
11659
01f9e8fa
DJ
116602006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
11661
11662 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
11663 (putpkt_binary): Renamed from putpkt and adjusted for binary
11664 data.
11665 (putpkt): New wrapper for putpkt_binary.
11666 (readchar): Don't mask off the high bit.
11667 (decode_X_packet): New function.
11668 * server.c (main): Call putpkt_binary if a handler sets the packet
11669 length. Save the length of the incoming packet. Handle 'X'.
11670 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
11671
be2a5f71
DJ
116722006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
11673
11674 * server.c (handle_query): Handle qSupported.
11675
ea025f5f
DJ
116762006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
11677
11678 * remote-utils.c (all_symbols_looked_up): New variable.
11679 (look_up_one_symbol): Check it.
11680 * server.h (look_up_one_symbol): New declaration.
11681 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
11682
9308fc88
DJ
116832006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
11684
11685 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 11686 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
11687 (PTRACE_GET_THREAD_AREA): Define.
11688 (ps_get_thread_area): New function.
11689
52fb6437
NS
116902006-05-09 Nathan Sidwell <nathan@codesourcery.com>
11691
11692 * configure.srv (m68k*-*-uclinux*): New target.
11693 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
11694 (linux_resume_one_process): Remove extraneous cast.
11695 (linux_read_offsets): New.
11696 (linux_target_op): Add linux_read_offsets on mmuless systems.
11697 * server.c (handle_query): Add qOffsets logic.
11698 * target.h (struct target_ops): Add read_offsets.
11699
21b0f40c
DJ
117002006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
11701
11702 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
11703 (PTRACE_GET_THREAD_AREA): Define.
11704 (ps_get_thread_area): New function.
11705 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
11706 (linux-x86-64-low.o): Update.
11707
0050a760
DJ
117082006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
11709
11710 * configure.ac: Remove checks for prfpregset_t.
11711 * gdb_proc_service.h: New file.
11712 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
11713 new "gdb_proc_service.h".
11714 * proc-service.c: Likewise.
11715 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
11716 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
11717 * Makefile.in (gdb_proc_service_h): Updated.
11718 * configure, config.in: Regenerated.
11719
b92a518e
DJ
117202006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
11721
11722 * remote-utils.c (prepare_resume_reply): Move declaration
11723 of gdb_id_from_wait to the top of the block.
11724
545587ee
DJ
117252006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
11726
11727 * linux-low.c (regsets_store_inferior_registers): Read the regset
11728 from the target before filling it.
11729
9db87ebd
DJ
117302006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
11731
11732 * server.c (attach_inferior): Return SIGTRAP for a successful
11733 attach.
11734
dd24457d
DJ
117352006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
11736
11737 * Makefile.in (OBS): Add version.o.
11738 (STAGESTUFF): Delete.
11739 (version.o): Add dependencies.
11740 (version.c): Replace rule.
11741 (clean): Remove version.c.
11742 * server.c (gdbserver_version): New.
11743 (gdbserver_usage): Use printf.
11744 (main): Handle --version and --help.
11745 * server.h (version, host_name): Add declarations.
11746
6f0f660e
EZ
117472005-12-23 Eli Zaretskii <eliz@gnu.org>
11748
889bf7c5
PA
11749 * linux-arm-low.c:
11750 * linux-arm-low.c:
11751 * inferiors.c:
11752 * i387-fp.h:
11753 * i387-fp.c:
11754 * gdbreplay.c:
11755 * regcache.c:
11756 * proc-service.c:
11757 * mem-break.h:
11758 * mem-break.c:
11759 * linux-x86-64-low.c:
11760 * linux-sh-low.c:
11761 * linux-s390-low.c:
11762 * linux-ppc64-low.c:
11763 * linux-ppc-low.c:
11764 * linux-mips-low.c:
11765 * linux-m68k-low.c:
11766 * linux-m32r-low.c:
11767 * linux-low.h:
11768 * linux-low.c:
11769 * linux-ia64-low.c:
11770 * linux-i386-low.c:
11771 * linux-crisv32-low.c:
11772 * thread-db.c:
11773 * terminal.h:
11774 * target.h:
11775 * target.c:
11776 * server.h:
11777 * server.c:
11778 * remote-utils.c:
11779 * regcache.h:
11780 * utils.c:
11781 * Makefile.in:
11782 * configure.ac:
6f0f660e
EZ
11783 * gdbserver.1: Add (C) after Copyright. Update the FSF
11784 address.
11785
9d1fb177
DJ
117862005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
11787
11788 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
11789 (arm_breakpoint_at): Recognize both breakpoints.
11790 (the_low_target): Use the correct breakpoint instruction.
11791
011a70c2
DJ
117922005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
11793
11794 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
11795 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
11796 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
11797 (the_low_target): Update.
11798
7fb85e41
AS
117992005-10-25 Andreas Schwab <schwab@suse.de>
11800
11801 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
11802
11803 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
11804 (ia64_num_regs): Reduce to 462.
11805
3db0444b
DJ
118062005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
11807
11808 * acinclude.m4: Correct quoting.
11809 * aclocal.m4: Regenerated.
11810
11811 Suggested by SZOKOVACS Robert <szo@ies.hu>:
11812 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
11813 (thread_db_init): Call thread_db_err_str.
11814 * configure.ac: Check for TD_VERSION.
11815 * config.in, configure: Regenerated.
11816
bee0189a
DJ
118172005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11818
11819 * server.h (error, fatal, warning): Add ATTR_FORMAT.
11820
e9d25b98
DJ
118212005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
11822
11823 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
11824 is not available. Define HAVE_PTRACE_GETREGS if it is.
11825 * config.in, configure: Regenerated.
11826 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
11827 * linux-i386-low.c, linux-m68k-low.c: Update to use
11828 HAVE_PTRACE_GETREGS.
11829 * linux-low.c (regsets_fetch_inferior_registers)
11830 (regsets_store_inferior_registers): Only return 0 if we processed
11831 GENERAL_REGS.
11832 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
11833 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
11834
a06660f7
DJ
118352005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
11836
11837 * inferiors.c (struct thread_info): Add gdb_id.
11838 (add_thread): Add gdb_id argument.
11839 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
11840 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
11841 calls to add_thread.
11842 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
11843 * server.c (handle_query): Use thread_to_gdb_id.
11844 (handle_v_cont, main): Use gdb_id_to_thread_id.
11845 * server.h (add_thread): Update prototype.
11846 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
11847 prototypes.
11848
5a1f5858
DJ
118492005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
11850
11851 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
11852 left-padded registers.
11853 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
11854 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
11855
e122f1f5
SE
118562005-07-01 Steve Ellcey <sje@cup.hp.com>
11857
11858 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
11859 * configure: Regenerate.
11860 * config.in: Regenerate.
11861 * server.h (NEED_DECLARATION_STRERROR):
11862 Replace with !HAVE_DECL_STRERROR.
11863
d592fa2f
DJ
118642005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
11865
11866 * linux-low.c (linux_wait, linux_send_signal): Don't test
11867 an unsigned long variable for > 0 if it could be MAX_ULONG.
11868 * server.c (myresume): Likewise.
11869 * target.c (set_desired_inferior): Likewise.
11870
ccbd4912
MK
118712005-06-13 Mark Kettenis <kettenis@gnu.org>
11872
11873 * configure.ac: Simplify and improve check for socklen_t.
11874 * configure, config.in: Regenerate.
11875
f450004a
DJ
118762005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
11877
11878 * acconfig.h: Remove.
11879 * configure.ac: Add a test for socklen_t. Use three-argument
11880 AC_DEFINE throughout.
11881 * config.in: Regenerated using autoheader 2.59.
11882 * configure: Regenerated.
11883
11884 * gdbreplay.c (socklen_t): Provide a default.
11885 (remote_open): Use socklen_t.
11886 * remote-utils.c (socklen_t): Provide a default.
11887 (remote_open): Use socklen_t.
11888 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
11889 unsigned char.
11890
11891 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
11892 char for buffers.
11893 * linux-low.c (linux_read_memory, linux_write_memory)
11894 (linux_read_auxv): Likewise.
11895 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
11896 (check_mem_write): Likewise.
11897 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
11898 Likewise.
11899 * regcache.c (struct inferior_rgcache_data, registers_to_string)
11900 (registers_from_string, register_data): Likewise.
11901 * server.c (handle_query, main): Likewise.
11902 * server.h (convert_ascii_to_int, convert_int_to_ascii)
11903 (decode_M_packet): Likewise.
11904 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
11905 * target.h (struct target_ops): Update read_memory, write_memory,
11906 and read_auxv.
11907 (read_inferior_memory, write_inferior_memory): Update.
11908 * linux-low.h (struct linux_target_ops): Change type of breakpoint
11909 to unsigned char *.
11910 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
11911 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
11912 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
11913 linux-s390-low.c, linux-sh-low.c: Update for changes in
11914 read_inferior_memory and the_low_target->breakpoint.
11915
eee84df1
DJ
119162005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
11917
11918 * Makefile.in (SFILES): Add linux-ppc64-low.c.
11919 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
11920 * configure.srv: Add powerpc64-*-linux*.
11921 * linux-ppc64-low.c: New file.
11922
45b134e5
OF
119232005-05-23 Orjan Friberg <orjanf@axis.com>
11924
11925 * linux-cris-low.c: New file with support for CRIS.
11926 * linux-crisv32-low.c: Ditto for CRISv32.
11927 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
11928 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 11929 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
11930 reg-crisv32.o, and reg-crisv32.c to make rules.
11931 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
11932 recognized targets.
11933
48d93c75
UW
119342005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
11935
11936 * linux-low.c (fetch_register): Ensure buffer size is a multiple
11937 of sizeof (PTRACE_XFER_TYPE).
11938 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
11939
e013ee27
OF
119402005-05-12 Orjan Friberg <orjanf@axis.com>
11941
889bf7c5 11942 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
11943 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
11944 pointers for hardware watchpoint support.
11945 * linux-low.h (struct linux_target_ops): Ditto.
11946 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
11947 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
11948 to linux_target_ops.
11949 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
11950 reply packet.
11951 * server.c (main): Recognize 'Z' and 'z' packets.
11952
b0ded00b
UW
119532005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
11954
11955 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
11956 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
11957 (the_low_target): Add new members.
11958
8643e2ad
DJ
119592005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
11960
11961 * proc-service.c (ps_lgetregs): Search all_processes instead of
11962 all_threads.
11963
fc620387
DJ
119642005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
11965
11966 * server.c (start_inferior): Change return type to int.
11967 (attach_inferior): Change sigptr to int *.
11968 (handle_v_cont, handle_v_requests): Change signal to int *.
11969 (main): Change signal to int.
11970
119712005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
11972
11973 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
11974 * configure.srv: Add m32r*-*-linux*.
11975 * linux-m32r-low.c: New file.
11976
e0e76420
DJ
119772005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
11978
11979 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
11980
a1928bad
DJ
119812005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
11982
11983 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
11984 Take unsigned long arguments for PIDs.
11985 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
11986 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
11987 (wait_for_sigstop, linux_resume_one_process)
11988 (regsets_fetch_inferior_registers, linux_send_signal)
11989 (linux_read_auxv): Likewise. Update the types of variables holding
11990 PIDs. Update format string specifiers.
11991 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
11992 * remote-utils.c (prepare_resume_reply): Likewise.
11993 * server.c (cont_thread, general_thread, step_thread)
11994 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
11995 unsigned long.
11996 (handle_query): Update format specifiers.
11997 (handle_v_cont, main): Use strtoul for thread IDs.
11998 * server.h (struct inferior_list_entry): Use unsigned long for ID.
11999 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
12000 (general_thread, step_thread, thread_from_wait)
12001 (old_thread_from_wait): Update.
12002 * target.h (struct thread_resume): Use unsigned long for THREAD.
12003 (struct target_ops): Use unsigned long for arguments to attach and
12004 thread_alive.
12005
dcdb98d2
DJ
120062005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
12007
12008 * acinclude.m4: Include bfd/bfd.m4 directly.
12009 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
12010 <agriffis@toolchain.org>.
12011 * aclocal.m4, configure: Regenerated.
12012
bec39cab
AC
120132005-01-07 Andrew Cagney <cagney@gnu.org>
12014
12015 * configure.ac: Rename configure.in, require autoconf 2.59.
12016 * configure: Re-generate.
12017
434c4c77
DJ
120182004-12-08 Daniel Jacobowitz <dan@debian.org>
12019
12020 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
12021 LIBS when finished.
12022 * aclocal.m4: Regenerated.
12023 * configure: Regenerated.
12024
db1d3e1b
AS
120252004-11-21 Andreas Schwab <schwab@suse.de>
12026
12027 * linux-m68k-low.c (m68k_num_gregs): Define.
12028 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
12029 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
12030 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
12031 (m68k_breakpoint_at): New. Add to the_low_target.
12032
12033 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
12034 srv_linux_thread_db to yes.
12035
43360365
JB
120362004-10-20 Joel Brobecker <brobecker@gnat.com>
12037
12038 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
12039 (ARCH_SET_FS): Likewise.
12040 (ARCH_GET_FS): Likewise.
12041 (ARCH_GET_GS): Likewise.
12042
fd500816
DJ
120432004-10-16 Daniel Jacobowitz <dan@debian.org>
12044
12045 * linux-i386-low.c (ps_get_thread_area): New.
12046 * linux-x86-64-low.c (ps_get_thread_area): New.
12047 * linux-low.c: Include <sys/syscall.h>.
12048 (linux_kill_one_process): Don't kill the first thread here.
12049 (linux_kill): Kill the first thread here.
12050 (kill_lwp): New function.
12051 (send_sigstop, linux_send_signal): Use it.
12052 * proc-service.c: Clean up #ifdefs.
12053 (fpregset_info): Delete.
12054 (ps_lgetregs): Update and enable implementation.
12055 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
12056 implementations.
12057 * remote-utils.c (struct sym_cache, symbol_cache): New.
12058 (input_interrupt): Print a clearer message.
12059 (async_io_enabled): New variable.
12060 (enable_async_io, disable_async_io): Use it. Update comments.
12061 (look_up_one_symbol): Use the symbol cache.
12062 * thread-db.c (thread_db_look_up_symbols): New function.
12063 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
12064
f6de3c42
DJ
120652004-10-16 Daniel Jacobowitz <dan@debian.org>
12066
12067 * configure.in: Test for -rdynamic.
12068 * configure: Regenerated.
12069 * Makefile (INTERNAL_LDFLAGS): New.
12070 (gdbserver, gdbreplay): Use it.
12071
2c0fc042
AC
120722004-09-02 Andrew Cagney <cagney@gnu.org>
12073
12074 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
12075
075b3282
DJ
120762004-03-23 Daniel Jacobowitz <drow@mvista.com>
12077
12078 * linux-low.c (linux_wait): Clear all_processes list also.
12079
fa6a77dc
DJ
120802004-03-12 Daniel Jacobowitz <drow@mvista.com>
12081
12082 * linux-low.c: Include <errno.h>. Remove extern declaration of
12083 errno.
12084
6d782a97
DJ
120852004-03-12 Daniel Jacobowitz <drow@mvista.com>
12086
12087 * gdbreplay.c, server.h, utils.c: Update copyright years.
12088
3a7fb99b
DJ
120892004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
12090
12091 * server.c (main): Print child status or termination signal from
12092 variable 'signal', not 'sig'.
12093
c3e735a6
DJ
120942004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
12095
12096 * linux-low.c (linux_read_memory): Change return type to
12097 int. Check for and return error from ptrace().
12098 * target.c (read_inferior_memory): Change return type to int. Pass
12099 back return status from the_target->read_memory().
12100 * target.h (struct target_ops): Adapt *read_memory() prototype.
12101 Update comment.
12102 (read_inferior_memory): Adapt prototype.
12103 * server.c (main): Return an error packet if
12104 read_inferior_memory() returns an error.
12105
a59d1c82
DJ
121062004-03-04 Daniel Jacobowitz <drow@mvista.com>
12107
12108 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
12109 Unify with other clean targets.
12110
dc3f8883
DJ
121112004-02-29 Daniel Jacobowitz <drow@mvista.com>
12112
12113 * server.c (handle_v_cont): Call set_desired_inferior.
12114
89a208da
DJ
121152004-02-29 Daniel Jacobowitz <drow@mvista.com>
12116
12117 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
12118
62ea82f5
DJ
121192004-02-29 Daniel Jacobowitz <drow@mvista.com>
12120
12121 * linux-low.c (linux_wait): Unblock async I/O.
12122 (linux_resume): Block and enable async I/O.
12123 * remote-utils.c (block_async_io, unblock_async_io): New functions.
12124 * server.h (block_async_io, unblock_async_io): Add prototypes.
12125
6910d122
DJ
121262004-02-29 Daniel Jacobowitz <drow@mvista.com>
12127
12128 * remote-utils.c (remote_open): Print a status notice after
12129 opening a TCP port.
12130 * server.c (attach_inferior): Print a status notice after
12131 attaching.
12132
121332004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
12134
12135 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
12136
c89dc5d4
DJ
121372004-02-26 Daniel Jacobowitz <drow@mvista.com>
12138
12139 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
12140 error packet.
12141 * server.c, target.h: Update copyright years.
12142
4b8dad4a
RM
121432004-02-25 Roland McGrath <roland@redhat.com>
12144
12145 * target.h (struct target_ops): New member `read_auxv'.
12146 * server.c (handle_query): Handle qPart:auxv:read: query using that.
12147 * linux-low.c (linux_read_auxv): New function.
12148 (linux_target_ops): Initialize `read_auxv' member to that.
12149
d7446758
JB
121502004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
12151
12152 Committed by Jim Blandy <jimb@redhat.com>.
12153
12154 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 12155 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
12156 instead of GPR_SIZE to distiguish s390 and s390x targets.
12157
5544ad89
DJ
121582004-01-31 Daniel Jacobowitz <drow@mvista.com>
12159
12160 * linux-low.c: Update copyright year.
12161 (check_removed_breakpoint): Clear pending_is_breakpoint.
12162 (linux_set_resume_request, linux_queue_one_thread)
12163 (resume_status_pending_p): New functions.
12164 (linux_continue_one_thread): Use process->resume.
12165 (linux_resume): Only resume threads if there are no pending events.
12166 * linux-low.h (struct process_info): Add resume request
12167 pointer.
12168
2a68b70e
DJ
121692004-01-30 Daniel Jacobowitz <drow@mvista.com>
12170
12171 * regcache.c (new_register_cache): Clear the allocated register
12172 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
12173
64386c31
DJ
121742003-10-13 Daniel Jacobowitz <drow@mvista.com>
12175
12176 * linux-low.c (linux_resume): Take a struct thread_resume *
12177 argument.
12178 (linux_wait): Update call.
12179 (resume_ptr): New static variable.
12180 (linux_continue_one_thread): Renamed from
12181 linux_continue_one_process. Use resume_ptr.
12182 (linux_resume): Use linux_continue_one_thread.
12183 * server.c (handle_v_cont, handle_v_requests): New functions.
12184 (myresume): New function.
12185 (main): Handle 'v' case.
12186 * target.h (struct thread_resume): New type.
12187 (struct target_ops): Change argument of "resume" to struct
12188 thread_resume *.
12189 (myresume): Delete macro.
12190
c938e9b0
L
121912003-08-08 H.J. Lu <hongjiu.lu@intel.com>
12192
12193 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
12194 (uninstall): Support DESTDIR.
12195
7f313d07
BC
12196Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
12197
12198 * configure.srv: Add xscale*linux copy of arm*linux entry.
12199
3b2fc2ea
DJ
122002003-07-24 Daniel Jacobowitz <drow@mvista.com>
12201
12202 * linux-arm-low.c (arm_reinsert_addr): New function.
12203 (the_low_target): Add arm_reinsert_addr.
12204
1c0a559e
MK
122052003-07-08 Mark Kettenis <kettenis@gnu.org>
12206
12207 * mem-break.c: Remove whitespace at end of file.
12208
43d5792c
DJ
122092003-06-28 Daniel Jacobowitz <drow@mvista.com>
12210
12211 * configure.in: Check whether we need to prototype strerror.
12212 * server.h: Optionally prototype strerror.
12213 * gdbreplay.c (perror_with_name): Use strerror.
12214 * linux-low.c (linux_attach_lwp): Use strerror.
12215 * utils.c (perror_with_name): Use strerror.
12216 * config.in, configure: Regenerated.
12217
c8a86edf
DJ
122182003-06-28 Daniel Jacobowitz <drow@mvista.com>
12219
12220 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
12221 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
12222
73d37363
DJ
122232003-06-20 Daniel Jacobowitz <drow@mvista.com>
12224
12225 * Makefile.in (SFILES): Update.
12226 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
12227 low-sun3.c: Remove files.
12228
6ad8ae5c
DJ
122292003-06-17 Daniel Jacobowitz <drow@mvista.com>
12230
12231 * linux-low.c: Move comment to linux_thread_alive where it belonged.
12232 (linux_detach_one_process, linux_detach): New functions.
12233 (linux_target_ops): Add linux_detach.
12234 * server.c (main): Handle 'D' packet.
12235 * target.h (struct target_ops): Add "detach" member.
12236 (detach_inferior): Define.
12237
1581182a
MK
122382003-06-13 Mark Kettenis <kettenis@gnu.org>
12239
12240 From Kelley Cook <kelleycook@wideopenwest.com>:
12241 * configure.srv: Accept i[34567]86 variants.
12242
e5379b03
DJ
122432003-06-05 Daniel Jacobowitz <drow@mvista.com>
12244
12245 * linux-low.c (linux_wait_for_event): Correct comment typos.
12246 (linux_resume_one_process): Call check_removed_breakpoint.
12247 (linux_send_signal): New function.
12248 (linux_target_ops): Add linux_send_signal.
12249 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
12250 of kill.
12251 * target.h (struct target_ops): Add send_signal.
12252
2ff29de4
JB
122532003-05-29 Jim Blandy <jimb@redhat.com>
12254
12255 * linux-low.c (usr_store_inferior_registers): Transfer buf in
12256 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
12257 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
12258 away part of the register's value.
12259
254787d4
DJ
122602003-03-26 Daniel Jacobowitz <drow@mvista.com>
12261
12262 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
12263 (linux_wait_for_event, linux_init_signals): Likewise.
12264
94e10508
DJ
122652003-03-17 Daniel Jacobowitz <drow@mvista.com>
12266
12267 * configure.in: Check for stdlib.h.
12268 * configure: Regenerated.
12269 * config.in: Regenerated.
12270
4c0711e0
DJ
122712003-01-04 Andreas Schwab <schwab@suse.de>
12272
12273 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
12274
ef66e766
AC
122752003-01-02 Andrew Cagney <ac131313@redhat.com>
12276
12277 * Makefile.in: Remove obsolete code.
12278
a1358604
DJ
122792002-11-20 Daniel Jacobowitz <drow@mvista.com>
12280
12281 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
12282 defined(PT_FPR0_HI).
12283
23ce3b1c
DJ
122842002-11-17 Stuart Hughes <seh@zee2.com>
12285
12286 * linux-arm-low.c (arm_num_regs): Increase.
12287 (arm_regmap): Include status register.
12288
122892002-11-17 Daniel Jacobowitz <drow@mvista.com>
12290
12291 * linux-low.c (register_addr): Remove incorrect -1 check.
12292
a9fa9f7d
DJ
122932002-08-29 Daniel Jacobowitz <drow@mvista.com>
12294
12295 * linux-low.c (linux_create_inferior): Call setpgid. Return
12296 the new PID.
12297 (unstopped_p, linux_signal_pid): Remove.
12298 (linux_target_ops): Remove linux_signal_pid.
12299 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
12300 global instead of target method.
12301 * target.h (struct target_ops): Remove signal_pid. Update comment
12302 for create_inferior.
12303 * server.c (signal_pid): New variable.
12304 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 12305 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
12306 (attach_inferior): Set signal_pid.
12307
17574093
DJ
123082002-08-23 Daniel Jacobowitz <drow@mvista.com>
12309
12310 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
12311
123122002-08-20 Jim Blandy <jimb@redhat.com>
12313
12314 * Makefile.in (LDFLAGS): Allow the configure script to establish a
12315 default for this.
12316
123172002-08-01 Andrew Cagney <cagney@redhat.com>
12318
12319 * Makefile.in: Make chill references obsolete.
12320
123212002-07-24 Kevin Buettner <kevinb@redhat.com>
12322
12323 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
12324 * configure: Regenerate.
12325 * config.in: Regenerate.
12326
123272002-07-09 David O'Brien <obrien@FreeBSD.org>
12328
12329 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
12330 (perror_with_name, remote_close, remote_open, expect, play): Static.
12331
123322002-07-04 Michal Ludvig <mludvig@suse.cz>
12333
4b8dad4a 12334 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
12335 byte offsets instead of an array of indexes.
12336 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
12337
123382002-06-13 Daniel Jacobowitz <drow@mvista.com>
12339
12340 * regcache.c: Add comment.
12341
123422002-06-11 Daniel Jacobowitz <drow@mvista.com>
12343
12344 * thread-db.c: New file.
12345 * proc-service.c: New file.
12346 * acinclude.m4: New file.
12347 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
12348 proc-service.o, and thread-db.o.
12349 (linux-low.o): Add USE_THREAD_DB.
12350 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
12351 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
12352 * aclocal.m4: Regenerated.
12353 * config.in: Regenerated.
12354 * configure: Regenerated.
12355 * configure.in: Check for proc_service.h, sys/procfs.h,
12356 thread_db.h, and linux/elf.h headrs.
12357 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
12358 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
12359 Check for -lthread_db and thread support.
12360 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
12361 PowerPC, and SuperH.
12362 * i387-fp.c: Constify arguments.
12363 * i387-fp.h: Likewise.
12364 * inferiors.c: (struct thread_info): Renamed from
12365 `struct inferior_info'. Remove PID member. Use generic inferior
12366 list header. All uses updated.
12367 (inferiors, signal_pid): Removed.
12368 (all_threads): New variable.
12369 (get_thread): Define.
12370 (add_inferior_to_list): New function.
12371 (for_each_inferior): New function.
12372 (change_inferior_id): New function.
12373 (add_inferior): Removed.
12374 (remove_inferior): New function.
12375 (add_thread): New function.
12376 (free_one_thread): New function.
12377 (remove_thread): New function.
12378 (clear_inferiors): Use for_each_inferior and free_one_thread.
12379 (find_inferior): New function.
12380 (find_inferior_id): New function.
12381 (inferior_target_data): Update argument type.
12382 (set_inferior_target_data): Likewise.
12383 (inferior_regcache_data): Likewise.
12384 (set_inferior_regcache_data): Likewise.
12385 * linux-low.c (linux_bp_reinsert): Remove.
12386 (all_processes, stopping_threads, using_thrads)
12387 (struct pending_signals, debug_threads, pid_of): New.
12388 (inferior_pid): Replace with macro.
12389 (struct inferior_linux_data): Remove.
12390 (get_stop_pc, add_process): New functions.
12391 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
12392 Use add_process and add_thread.
12393 (linux_attach_lwp): New function, based on old linux_attach. Use
12394 add_process and add_thread. Set stop_expected for new threads.
12395 (linux_attach): New function.
12396 (linux_kill_one_process): New function.
12397 (linux_kill): Kill all LWPs.
12398 (linux_thread_alive): Use find_inferior_id.
12399 (check_removed_breakpoints, status_pending_p): New functions.
12400 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
12401 Update. Use WNOHANG. Wait for cloned processes also. Update process
12402 struct for the found process.
12403 (linux_wait_for_event): New function.
12404 (linux_wait): Use it. Support LWPs.
12405 (send_sigstop, wait_for_sigstop, stop_all_processes)
12406 (linux_resume_one_process, linux_continue_one_process): New functions.
12407 (linux_resume): Support LWPs.
12408 (REGISTER_RAW_SIZE): Remove.
12409 (fetch_register): Use register_size instead. Call supply_register.
12410 (usr_store_inferior_registers): Likewise. Call collect_register.
12411 Fix recursive case.
12412 (regsets_fetch_inferior_registers): Improve error message.
12413 (regsets_store_inferior_registers): Add debugging.
12414 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
12415 (unstopped_p, linux_signal_pid): New functions.
12416 (linux_target_ops): Add linux_signal_pid.
12417 (linux_init_signals): New function.
12418 (initialize_low): Call it. Initialize using_threads.
12419 * regcache.c (inferior_regcache_data): Add valid
12420 flag.
12421 (get_regcache): Fetch registers lazily. Add fetch argument
12422 and update all callers.
12423 (regcache_invalidate_one, regcache_invalidate): New
12424 functions.
12425 (new_register_cache): Renamed from create_register_cache.
12426 Return the new regcache.
12427 (free_register_cache): Change argument to a void *.
12428 (registers_to_string, registers_from_string): Call get_regcache
12429 with fetch flag set.
12430 (register_data): Make static. Pass fetch flag to get_regcache.
12431 (supply_register): Call get_regcache with fetch flag clear.
12432 (collect_register): Call get_regcache with fetch flag set.
12433 (collect_register_as_string): New function.
12434 * regcache.h: Update.
12435 * remote-utils.c (putpkt): Flush after debug output and use
12436 stderr.
12437 Handle input interrupts while waiting for an ACK.
12438 (input_interrupt): Use signal_pid method.
12439 (getpkt): Flush after debug output and use stderr.
12440 (outreg): Use collect_register_as_string.
12441 (new_thread_notify, dead_thread_notify): New functions.
12442 (prepare_resume_reply): Check using_threads. Set thread_from_wait
12443 and general_thread.
12444 (look_up_one_symbol): Flush after debug output.
12445 * server.c (step_thread, server_waiting): New variables.
12446 (start_inferior): Don't use signal_pid. Update call to mywait.
12447 (attach_inferior): Update call to mywait.
12448 (handle_query): Handle qfThreadInfo and qsThreadInfo.
12449 (main): Don't fetch/store registers explicitly. Use
12450 set_desired_inferior. Support proposed ``Hs'' packet. Update
12451 calls to mywait.
12452 * server.h: Update.
12453 (struct inferior_list, struct_inferior_list_entry): New.
12454 * target.c (set_desired_inferior): New.
12455 (write_inferior_memory): Constify.
12456 (mywait): New function.
12457 * target.h: Update.
12458 (struct target_ops): New signal_pid method.
12459 (mywait): Removed macro, added prototype.
12460
12461 * linux-low.h (regset_func): Removed.
12462 (regset_fill_func, regset_store_func): New.
12463 (enum regset_type): New.
12464 (struct regset_info): Add type field. Use new operation types.
12465 (struct linux_target_ops): stop_pc renamed to get_pc.
12466 Add decr_pc_after_break and breakpoint_at.
12467 (get_process, get_thread_proess, get_process_thread)
12468 (strut process_info, all_processes, linux_attach_lwp)
12469 (thread_db_init): New.
12470
12471 * linux-arm-low.c (arm_get_pc, arm_set_pc,
12472 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
12473 (the_low_target): Add new members.
12474 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
12475 (i386_store_fpxregset): Constify.
12476 (target_regsets): Add new kind identifier.
12477 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
12478 (i386_set_pc): Add debugging.
12479 (i386_breakpoint_at): New function.
12480 (the_low_target): Add new members.
12481 * linux-mips-low.c (mips_get_pc, mips_set_pc)
12482 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
12483 (mips_breakpoint_at): New.
12484 (the_low_target): Add new members.
12485 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
12486 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
12487 (the_low_target): Add new members.
12488 * linux-sh-low.c (sh_get_pc, sh_set_pc)
12489 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
12490 (the_low_target): Add new members.
12491 * linux-x86-64-low.c (target_regsets): Add new kind
12492 identifier.
12493
124942002-05-15 Daniel Jacobowitz <drow@mvista.com>
12495
12496 From Martin Pool <mbp@samba.org>:
12497 * server.c (gdbserver_usage): New function.
12498 (main): Call it.
12499
125002002-05-14 Daniel Jacobowitz <drow@mvista.com>
12501
12502 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
12503 stop_at -> stop_pc.
12504
125052002-05-04 Andrew Cagney <ac131313@redhat.com>
12506
12507 * Makefile.in: Remove obsolete code.
12508
125092002-04-24 Michal Ludvig <mludvig@suse.cz>
12510
12511 * linux-low.c (regsets_fetch_inferior_registers),
12512 (regsets_store_inferior_registers): Removed cast to int from
12513 ptrace() calls.
12514 * regcache.h: Added declaration of struct inferior_info.
12515
125162002-04-20 Daniel Jacobowitz <drow@mvista.com>
12517
12518 * inferiors.c (struct inferior_info): Add regcache_data.
12519 (add_inferior): Call create_register_cache.
12520 (clear_inferiors): Call free_register_cache.
12521 (inferior_regcache_data, set_inferior_regcache_data): New functions.
12522 * regcache.c (struct inferior_regcache_data): New.
12523 (registers): Remove.
12524 (get_regcache): New function.
12525 (create_register_cache, free_register_cache): New functions.
12526 (set_register_cache): Don't initialize the register cache here.
12527 (registers_to_string, registers_from_string, register_data): Call
12528 get_regcache.
12529 * regcache.h: Add prototypes.
12530 * server.h: Likewise.
12531
125322002-04-20 Daniel Jacobowitz <drow@mvista.com>
12533
12534 * mem-break.c: New file.
12535 * mem-break.h: New file.
12536 * Makefile.in: Add mem-break.o rule; update server.h
12537 dependencies.
12538 * inferiors.c (struct inferior_info): Add target_data
12539 member.
12540 (clear_inferiors): Free target_data member if set.
12541 (inferior_target_data, set_inferior_target_data): New functions.
12542 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
12543 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
12544 * linux-low.c (linux_bp_reinsert): New variable.
12545 (struct inferior_linux_data): New.
12546 (linux_create_inferior): Use set_inferior_target_data.
12547 (linux_attach): Likewise. Call add_inferior.
12548 (linux_wait_for_one_inferior): New function.
12549 (linux_wait): Call it.
12550 (linux_write_memory): Add const.
12551 (initialize_low): Call set_breakpoint_data.
12552 * linux-low.h (struct linux_target_ops): Add breakpoint
12553 handling members.
12554 * server.c (attach_inferior): Remove extra add_inferior
12555 call.
12556 * server.h: Include mem-break.h. Update inferior.c
12557 prototypes.
12558 * target.c (read_inferior_memory)
12559 (write_inferior_memory): New functions.
12560 * target.h (read_inferior_memory)
12561 (write_inferior_memory): Change macros to prototypes.
12562 (struct target_ops): Update comments. Add const to write_memory
12563 definition.
12564
125652002-04-11 Daniel Jacobowitz <drow@mvista.com>
12566
12567 * linux-low.c (usr_store_inferior_registers): Support
12568 registers which are allowed to fail to store.
12569 * linux-low.h (linux_target_ops): Likewise.
12570 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
12571 (ppc_cannot_store_register): FPSCR may not be storable.
12572
125732002-04-09 Daniel Jacobowitz <drow@mvista.com>
12574
12575 * server.h: Include <string.h> if HAVE_STRING_H.
12576 * ChangeLog: Correct paths in last ChangeLog entry.
12577
125782002-04-09 Daniel Jacobowitz <drow@mvista.com>
12579
12580 * linux-low.h: Remove obsolete prototypes.
12581 (struct linux_target_ops): New.
12582 (extern the_low_target): New.
12583 * linux-low.c (num_regs, regmap): Remove declarations.
12584 (register_addr): Use the_low_target explicitly.
12585 (fetch_register): Likewise.
12586 (usr_fetch_inferior_registers): Likewise.
12587 (usr_store_inferior_registers): Likewise.
12588 * linux-arm-low.c (num_regs): Remove.
12589 (arm_num_regs): Define.
12590 (arm_regmap): Renamed from regmap, made static.
12591 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
12592 made static.
12593 (arm_cannot_store_register): Renamed from cannot_store_register,
12594 made static.
12595 (the_low_target): New.
12596 * linux-i386-low.c (num_regs): Remove.
12597 (i386_num_regs): Define.
12598 (i386_regmap): Renamed from regmap, made static.
12599 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
12600 made static.
12601 (i386_cannot_store_register): Renamed from cannot_store_register,
12602 made static.
12603 (the_low_target): New.
12604 * linux-ia64-low.c (num_regs): Remove.
12605 (ia64_num_regs): Define.
12606 (ia64_regmap): Renamed from regmap, made static.
12607 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
12608 made static.
12609 (ia64_cannot_store_register): Renamed from cannot_store_register,
12610 made static.
12611 (the_low_target): New.
12612 * linux-m68k-low.c (num_regs): Remove.
12613 (m68k_num_regs): Define.
12614 (m68k_regmap): Renamed from regmap, made static.
12615 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
12616 made static.
12617 (m68k_cannot_store_register): Renamed from cannot_store_register,
12618 made static.
12619 (the_low_target): New.
12620 * linux-mips-low.c (num_regs): Remove.
12621 (mips_num_regs): Define.
12622 (mips_regmap): Renamed from regmap, made static.
12623 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
12624 made static.
12625 (mips_cannot_store_register): Renamed from cannot_store_register,
12626 made static.
12627 (the_low_target): New.
12628 * linux-ppc-low.c (num_regs): Remove.
12629 (ppc_num_regs): Define.
12630 (ppc_regmap): Renamed from regmap, made static.
12631 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
12632 made static.
12633 (ppc_cannot_store_register): Renamed from cannot_store_register,
12634 made static.
12635 (the_low_target): New.
12636 * linux-s390-low.c (num_regs): Remove.
12637 (s390_num_regs): Define.
12638 (s390_regmap): Renamed from regmap, made static.
12639 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
12640 made static.
12641 (s390_cannot_store_register): Renamed from cannot_store_register,
12642 made static.
12643 (the_low_target): New.
12644 * linux-sh-low.c (num_regs): Remove.
12645 (sh_num_regs): Define.
12646 (sh_regmap): Renamed from regmap, made static.
12647 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
12648 made static.
12649 (sh_cannot_store_register): Renamed from cannot_store_register,
12650 made static.
12651 (the_low_target): New.
12652 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
12653 (the_low_target): New.
12654
126552002-04-09 Daniel Jacobowitz <drow@mvista.com>
12656
12657 * Makefile.in: Add stamp-h target.
12658 * configure.in: Create stamp-h.
12659 * configure: Regenerated.
12660
126612002-04-09 Daniel Jacobowitz <drow@mvista.com>
12662
12663 * inferiors.c: New file.
12664 * target.c: New file.
12665 * target.h: New file.
12666 * Makefile.in: Add target.o and inferiors.o. Update
12667 dependencies.
12668 * linux-low.c (inferior_pid): New static variable,
12669 moved from server.c.
12670 (linux_create_inferior): Renamed from create_inferior.
12671 Call add_inferior. Return 0 on success instead of a PID.
12672 (linux_attach): Renamed from myattach.
12673 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
12674 (linux_thread_alive): Renamed from mythread_alive.
12675 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
12676 child dies.
12677 (linux_resume): Renamed from myresume. Add missing ``return 0''.
12678 (regsets_store_inferior_registers): Correct error message.
12679 Add missing ``return 0''.
12680 (linux_fetch_registers): Renamed from fetch_inferior_registers.
12681 (linux_store_registers): Renamed from store_inferior_registers.
12682 (linux_read_memory): Renamed from read_inferior_memory.
12683 (linux_write_memory): Renamed from write_inferior_memory.
12684 (linux_target_ops): New structure.
12685 (initialize_low): Call set_target_ops ().
12686 * remote-utils.c (unhexify): New function.
12687 (hexify): New function.
12688 (input_interrupt): Send signals to ``signal_pid''.
12689 * server.c (inferior_pid): Remove.
12690 (start_inferior): Update create_inferior call.
12691 (attach_inferior): Call add_inferior.
12692 (handle_query): New function.
12693 (main): Call handle_query for `q' packets.
12694 * server.h: Include "target.h". Remove obsolete prototypes.
12695 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
12696
126972002-04-09 Daniel Jacobowitz <drow@mvista.com>
12698
12699 * Makefile.in: Add WARN_CFLAGS. Update configury
12700 dependencies.
12701 * configure.in: Check for <string.h>
12702 * configure: Regenerate.
12703 * config.in: Regenerate.
12704 * gdbreplay.c: Include needed system headers.
12705 (remote_open): Remove strchr prototype.
12706 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
12707 * regcache.c (supply_register): Change buf argument to const void *.
12708 (supply_register_by_name): Likewise.
12709 (collect_register): Change buf argument to void *.
12710 (collect_register_by_name): Likewise.
12711 * regcache.h: Add missing prototypes.
12712 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
12713 * server.c (handle_query): New function.
12714 (attached): New static variable, moved out of main.
12715 (main): Quiet longjmp clobber warnings.
12716 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
12717 * utils.c (error): Remove NORETURN.
12718 (fatal): Likewise.