gdbserver: Move pointer dereference to after assert checks.
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
69291610
HW
12015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
2
3 * linux-arm-low.c (arm_new_thread): Move pointer dereference
4 to after assert checks.
5
b42945fd
SM
62015-10-29 Simon Marchi <simon.marchi@ericsson.com>
7
8 * proc-service.c (ps_pdread): Add/adjust casts.
9 (ps_pdwrite): Add/adjust casts.
10
d6f85c84
SM
112015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
12
13 * server.c (handle_search_memory_1): Cast return value of
14 memmem.
15
f98cd059
SM
162015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
17
18 * server.c (write_qxfer_response): Change type of data to
19 gdb_byte *.
20
d2412fa5
PA
212015-10-29 Pedro Alves <palves@redhat.com>
22
23 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
24
c17414a2
PA
252015-10-29 Pedro Alves <palves@redhat.com>
26
27 * tracepoint.c (clear_installed_tracepoints): Add casts.
28
e053fbc4
PA
292015-10-29 Pedro Alves <palves@redhat.com>
30
31 * server.c (handle_v_cont, process_serial_event): Add enum
32 gdb_signal casts to signal parsing code.
33
add67df8
PA
342015-10-29 Pedro Alves <palves@redhat.com>
35
36 * linux-low.h (NULL_REGSET): Define.
37 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
38 * linux-arm-low.c (arm_regsets): Likewise.
39 * linux-crisv32-low.c (cris_regsets): Likewise.
40 * linux-m68k-low.c (m68k_regsets): Likewise.
41 * linux-mips-low.c (mips_regsets): Likewise.
42 * linux-nios2-low.c (nios2_regsets): Likewise.
43 * linux-ppc-low.c (ppc_regsets): Likewise.
44 * linux-s390-low.c (s390_regsets): Likewise.
45 * linux-sh-low.c (sh_regsets): Likewise.
46 * linux-sparc-low.c (sparc_regsets): Likewise.
47 * linux-tic6x-low.c (tic6x_regsets): Likewise.
48 * linux-tile-low.c (tile_regsets): Likewise.
49 * linux-x86-low.c (x86_regsets): Likewise.
50 * linux-xtensa-low.c (xtensa_regsets): Likewise.
51
50bc912a
PA
522015-10-29 Pedro Alves <palves@redhat.com>
53
54 * linux-low.h (NULL_REGSET): Define.
55 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
56 * linux-arm-low.c (arm_regsets): Likewise.
57 * linux-crisv32-low.c (cris_regsets): Likewise.
58 * linux-m68k-low.c (m68k_regsets): Likewise.
59 * linux-mips-low.c (mips_regsets): Likewise.
60 * linux-nios2-low.c (nios2_regsets): Likewise.
61 * linux-ppc-low.c (ppc_regsets): Likewise.
62 * linux-s390-low.c (s390_regsets): Likewise.
63 * linux-sh-low.c (sh_regsets): Likewise.
64 * linux-sparc-low.c (sparc_regsets): Likewise.
65 * linux-tic6x-low.c (tic6x_regsets): Likewise.
66 * linux-tile-low.c (tile_regsets): Likewise.
67 * linux-x86-low.c (x86_regsets): Likewise.
68 * linux-xtensa-low.c (xtensa_regsets): Likewise.
69
682b2546
DE
702015-10-26 Doug Evans <dje@google.com>
71
72 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
73
963843d4
DE
742015-10-26 Doug Evans <dje@google.com>
75
76 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
77
d41401ac
DE
782015-10-26 Doug Evans <dje@google.com>
79
80 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
81 for debug_printf.
82 (attach_thread, find_new_threads_callback): Ditto.
83
3db28855
AT
842015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
85
86 * mem-break.h (set_breakpoint_data): Remove.
87
fb78e89c
AT
882015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
89
90 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
91 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
92 (initialize_low): Remove set_breakpoint_data call.
93 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
94 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
95 (initialize_low): Remove set_breakpoint_data call.
96 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
97 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
98 (initialize_low): Remove set_breakpoint_data call.
99
2e6ee069
AT
1002015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
101
102 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
103 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
104 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
105 * target.h (target_breakpoint_kind_from_pc): New macro.
106
1652a986
AT
1072015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
108
109 * linux-low.c (default_breakpoint_kind_from_pc): New function.
110 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
111 the default breakpoint kind.
112
abeead09
AT
1132015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
114
115 * linux-arm-low.c (arm_supports_z_point_type): Add software
116 breakpoint support.
117
b0b4b501
AT
1182015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
119
120 * linux-arm-low.c: Refactor breakpoint definitions.
121 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
122 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
123
8689682c
AT
1242015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
125
126 * Makefile.in: Add arm.c/o.
127 * configure.srv: Likewise.
128 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
129 (arm_breakpoint_kind_from_pc): New function.
130 (arm_sw_breakpoint_from_kind): Return proper kind.
131 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
132
27165294
AT
1332015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
134
135 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
136 removal.
137 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
138 (struct raw_breakpoint) <size>: Remove.
139 (struct raw_breakpoint) <kind>: Add.
140 (bp_size): New function.
141 (bp_opcode): Likewise.
142 (find_raw_breakpoint_at): Adjust for kind.
143 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
144 (remove_memory_breakpoint): Adjust for kind call bp_size.
145 (set_raw_breakpoint_at): Adjust for kind.
146 (set_breakpoint): Likewise.
147 (set_breakpoint_at): Call breakpoint_kind_from_pc.
148 (delete_raw_breakpoint): Adjust for kind.
149 (delete_breakpoint): Likewise.
150 (find_gdb_breakpoint): Likewise.
151 (set_gdb_breakpoint_1): Likewise.
152 (set_gdb_breakpoint): Likewise.
153 (delete_gdb_breakpoint_1): Likewise.
154 (delete_gdb_breakpoint): Likewise.
155 (uninsert_raw_breakpoint): Likewise.
156 (reinsert_raw_breakpoint): Likewise.
157 (set_breakpoint_data): Remove.
158 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
159 (check_mem_read): Adjust for kind call bp_size.
160 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
161 (clone_one_breakpoint): Adjust for kind.
162 * mem-break.h (set_gdb_breakpoint): Likewise.
163 (delete_gdb_breakpoint): Likewise.
164 * server.c (process_serial_event): Likewise.
165
dd373349
AT
1662015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
167
168 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
169 (struct linux_target_ops) <breakpoint>: Remove.
170 (struct linux_target_ops) <breakpoint_len>: Remove.
171 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
172 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
173 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
174 (arm_sw_breakpoint_from_kind): New function.
175 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
176 (struct linux_target_ops) <breakpoint>: Remove.
177 (struct linux_target_ops) <breakpoint_len>: Remove.
178 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
179 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
180 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
181 (struct linux_target_ops) <breakpoint>: Remove.
182 (struct linux_target_ops) <breakpoint_len>: Remove.
183 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
184 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
185 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
186 (struct linux_target_ops) <breakpoint>: Remove.
187 (struct linux_target_ops) <breakpoint_len>: Remove.
188 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
189 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
190 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
191 and sw_breakpoint_from_kind to increment the pc.
192 (linux_breakpoint_kind_from_pc): New function.
193 (linux_sw_breakpoint_from_kind): New function.
194 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
195 (initialize_low): Call breakpoint_kind_from_pc and
196 sw_breakpoint_from_kind to replace breakpoint_data/len.
197 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
198 New field.
199 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
200 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
201 (struct linux_target_ops) <breakpoint>: Remove.
202 (struct linux_target_ops) <breakpoint_len>: Remove.
203 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
204 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
205 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
206 (struct linux_target_ops) <breakpoint>: Remove.
207 (struct linux_target_ops) <breakpoint_len>: Remove.
208 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
209 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
210 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
211 (struct linux_target_ops) <breakpoint>: Remove.
212 (struct linux_target_ops) <breakpoint_len>: Remove.
213 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
214 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
215 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
216 (struct linux_target_ops) <breakpoint>: Remove.
217 (struct linux_target_ops) <breakpoint_len>: Remove.
218 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
219 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
220 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
221 (struct linux_target_ops) <breakpoint>: Remove.
222 (struct linux_target_ops) <breakpoint_len>: Remove.
223 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
224 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
225 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
226 (struct linux_target_ops) <breakpoint>: Remove.
227 (struct linux_target_ops) <breakpoint_len>: Remove.
228 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
229 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
230 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
231 (struct linux_target_ops) <breakpoint>: Remove.
232 (struct linux_target_ops) <breakpoint_len>: Remove.
233 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
234 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
235 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
236 (struct linux_target_ops) <breakpoint>: Remove.
237 (struct linux_target_ops) <breakpoint_len>: Remove.
238 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
239 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
240 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
241 (struct linux_target_ops) <breakpoint>: Remove.
242 (struct linux_target_ops) <breakpoint_len>: Remove.
243 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
244 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
245 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
246 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
247 (struct linux_target_ops) <breakpoint>: Remove.
248 (struct linux_target_ops) <breakpoint_len>: Remove.
249 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
250 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
251 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
252 (struct linux_target_ops) <breakpoint>: Remove.
253 (struct linux_target_ops) <breakpoint_len>: Remove.
254 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
255 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
256
4cd98a19
AT
2572015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
258
259 * linux-cris-low.c (cris_get_pc): Remove void arg.
260
774ee6d2
AR
2612015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
262
263 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
264 variable name.
265
833dcd29
AR
2662015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
267
268 * inferiors.c (thread_pid_matches_callback): New function.
269 (find_thread_process): New function.
270 (remove_thread): Reset current_thread.
271 (remove_process): Assert threads have been removed first.
272
8d689ee5
YQ
2732015-10-15 Yao Qi <yao.qi@linaro.org>
274
275 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
276 if it is 3.
277 (aarch64_remove_point): Likewise.
278 * regcache.c (regcache_register_size): New function.
279
1c2e1515
YQ
2802015-10-12 Yao Qi <yao.qi@linaro.org>
281
282 * linux-aarch64-low.c: Update all callers as emit_load_store
283 is renamed to aarch64_emit_load_store.
284
e1c587c3
YQ
2852015-10-12 Yao Qi <yao.qi@linaro.org>
286
287 * linux-aarch64-low.c: Update all callers of function renaming
288 from emit_insn to aarch64_emit_insn.
289
b6542f81
YQ
2902015-10-12 Yao Qi <yao.qi@linaro.org>
291
292 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
293 arch/aarch64-insn.h.
294 (struct aarch64_memory_operand): Likewise.
295 (ENCODE): Likewise.
296 (emit_insn): Move to arch/aarch64-insn.c.
297 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
298 (emit_load_store): Move to arch/aarch64-insn.c.
299 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
300 (can_encode_int32): Remove.
301
246994ce
YQ
3022015-10-12 Yao Qi <yao.qi@linaro.org>
303
304 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
305 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
306 (aarch64_relocate_instruction): Likewise.
307 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
308 (struct aarch64_insn_visitor): Likewise.
309
0badd99f
YQ
3102015-10-12 Yao Qi <yao.qi@linaro.org>
311
312 * linux-aarch64-low.c (struct aarch64_insn_data): New.
313 (struct aarch64_insn_visitor): New.
314 (struct aarch64_insn_relocation_data): New.
315 (aarch64_ftrace_insn_reloc_b): New function.
316 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
317 (aarch64_ftrace_insn_reloc_cb): Likewise.
318 (aarch64_ftrace_insn_reloc_tb): Likewise.
319 (aarch64_ftrace_insn_reloc_adr): Likewise.
320 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
321 (aarch64_ftrace_insn_reloc_others): Likewise.
322 (visitor): New.
323 (aarch64_relocate_instruction): Use visitor.
324
dfaffe9d
YQ
3252015-10-12 Yao Qi <yao.qi@linaro.org>
326
327 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
328 int. Add argument buf.
329 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
330 aarch64_relocate_instruction.
331
70b439f0
YQ
3322015-10-12 Yao Qi <yao.qi@linaro.org>
333
334 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
335 argument insn. Remove local variable insn. Don't call
336 target_read_uint32.
337 (aarch64_install_fast_tracepoint_jump_pad): Call
338 target_read_uint32.
339
7781c06f
YQ
3402015-09-30 Yao Qi <yao.qi@linaro.org>
341
342 * linux-aarch64-low.c (emit_movk): Shorten a long line.
343 (emit_load_store_pair): Likewise.
344
9a3c8263
SM
3452015-09-25 Simon Marchi <simon.marchi@ericsson.com>
346
347 * dll.c (match_dll): Add cast(s).
348 (unloaded_dll): Likewise.
349 * linux-low.c (second_thread_of_pid_p): Likewise.
350 (delete_lwp_callback): Likewise.
351 (count_events_callback): Likewise.
352 (select_event_lwp_callback): Likewise.
353 (linux_set_resume_request): Likewise.
354 * server.c (accumulate_file_name_length): Likewise.
355 (emit_dll_description): Likewise.
356 (handle_qxfer_threads_worker): Likewise.
357 (visit_actioned_threads): Likewise.
358 * thread-db.c (any_thread_of): Likewise.
359 * tracepoint.c (same_process_p): Likewise.
360 (match_blocktype): Likewise.
361 (build_traceframe_info_xml): Likewise.
362
224c3ddb
SM
3632015-09-25 Simon Marchi <simon.marchi@ericsson.com>
364
365 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
366 assignment.
367 (gdb_unparse_agent_expr): Likewise.
368 * hostio.c (require_data): Likewise.
369 (handle_pread): Likewise.
370 * linux-low.c (disable_regset): Likewise.
371 (fetch_register): Likewise.
372 (store_register): Likewise.
373 (get_dynamic): Likewise.
374 (linux_qxfer_libraries_svr4): Likewise.
375 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
376 (set_fast_tracepoint_jump): Likewise.
377 (uninsert_fast_tracepoint_jumps_at): Likewise.
378 (reinsert_fast_tracepoint_jumps_at): Likewise.
379 (validate_inserted_breakpoint): Likewise.
380 (clone_agent_expr): Likewise.
381 * regcache.c (init_register_cache): Likewise.
382 * remote-utils.c (putpkt_binary_1): Likewise.
383 (decode_M_packet): Likewise.
384 (decode_X_packet): Likewise.
385 (look_up_one_symbol): Likewise.
386 (relocate_instruction): Likewise.
387 (monitor_output): Likewise.
388 * server.c (handle_search_memory): Likewise.
389 (handle_qxfer_exec_file): Likewise.
390 (handle_qxfer_libraries): Likewise.
391 (handle_qxfer): Likewise.
392 (handle_query): Likewise.
393 (handle_v_cont): Likewise.
394 (handle_v_run): Likewise.
395 (captured_main): Likewise.
396 * target.c (write_inferior_memory): Likewise.
397 * thread-db.c (try_thread_db_load_from_dir): Likewise.
398 * tracepoint.c (init_trace_buffer): Likewise.
399 (add_tracepoint_action): Likewise.
400 (add_traceframe): Likewise.
401 (add_traceframe_block): Likewise.
402 (cmd_qtdpsrc): Likewise.
403 (cmd_qtdv): Likewise.
404 (cmd_qtstatus): Likewise.
405 (response_source): Likewise.
406 (response_tsv): Likewise.
407 (cmd_qtnotes): Likewise.
408 (gdb_collect): Likewise.
409 (initialize_tracepoint): Likewise.
410
afbe19f8
PL
4112015-09-21 Pierre Langlois <pierre.langlois@arm.com>
412
413 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
414 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
415 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
416 <NOP>: New.
417 (enum aarch64_condition_codes): New enum.
418 (w0): New static global.
419 (fp): Likewise.
420 (lr): Likewise.
421 (struct aarch64_memory_operand) <type>: New
422 MEMORY_OPERAND_POSTINDEX type.
423 (postindex_memory_operand): New helper function.
424 (emit_ret): New function.
425 (emit_load_store_pair): New function, factored out of emit_stp
426 with support for MEMORY_OPERAND_POSTINDEX.
427 (emit_stp): Rewrite using emit_load_store_pair.
428 (emit_ldp): New function.
429 (emit_load_store): Likewise.
430 (emit_ldr): Mention post-index instruction in comment.
431 (emit_ldrh): New function.
432 (emit_ldrb): New function.
433 (emit_ldrsw): Mention post-index instruction in comment.
434 (emit_str): Likewise.
435 (emit_subs): New function.
436 (emit_cmp): Likewise.
437 (emit_and): Likewise.
438 (emit_orr): Likewise.
439 (emit_orn): Likewise.
440 (emit_eor): Likewise.
441 (emit_mvn): Likewise.
442 (emit_lslv): Likewise.
443 (emit_lsrv): Likewise.
444 (emit_asrv): Likewise.
445 (emit_mul): Likewise.
446 (emit_sbfm): Likewise.
447 (emit_sbfx): Likewise.
448 (emit_ubfm): Likewise.
449 (emit_ubfx): Likewise.
450 (emit_csinc): Likewise.
451 (emit_cset): Likewise.
452 (emit_nop): Likewise.
453 (emit_ops_insns): New helper function.
454 (emit_pop): Likewise.
455 (emit_push): Likewise.
456 (aarch64_emit_prologue): New function.
457 (aarch64_emit_epilogue): Likewise.
458 (aarch64_emit_add): Likewise.
459 (aarch64_emit_sub): Likewise.
460 (aarch64_emit_mul): Likewise.
461 (aarch64_emit_lsh): Likewise.
462 (aarch64_emit_rsh_signed): Likewise.
463 (aarch64_emit_rsh_unsigned): Likewise.
464 (aarch64_emit_ext): Likewise.
465 (aarch64_emit_log_not): Likewise.
466 (aarch64_emit_bit_and): Likewise.
467 (aarch64_emit_bit_or): Likewise.
468 (aarch64_emit_bit_xor): Likewise.
469 (aarch64_emit_bit_not): Likewise.
470 (aarch64_emit_equal): Likewise.
471 (aarch64_emit_less_signed): Likewise.
472 (aarch64_emit_less_unsigned): Likewise.
473 (aarch64_emit_ref): Likewise.
474 (aarch64_emit_if_goto): Likewise.
475 (aarch64_emit_goto): Likewise.
476 (aarch64_write_goto_address): Likewise.
477 (aarch64_emit_const): Likewise.
478 (aarch64_emit_call): Likewise.
479 (aarch64_emit_reg): Likewise.
480 (aarch64_emit_pop): Likewise.
481 (aarch64_emit_stack_flush): Likewise.
482 (aarch64_emit_zero_ext): Likewise.
483 (aarch64_emit_swap): Likewise.
484 (aarch64_emit_stack_adjust): Likewise.
485 (aarch64_emit_int_call_1): Likewise.
486 (aarch64_emit_void_call_2): Likewise.
487 (aarch64_emit_eq_goto): Likewise.
488 (aarch64_emit_ne_goto): Likewise.
489 (aarch64_emit_lt_goto): Likewise.
490 (aarch64_emit_le_goto): Likewise.
491 (aarch64_emit_gt_goto): Likewise.
492 (aarch64_emit_ge_got): Likewise.
493 (aarch64_emit_ops_impl): New static global variable.
494 (aarch64_emit_ops): New target function, return
495 &aarch64_emit_ops_impl.
496 (struct linux_target_ops): Install it.
497
bb903df0
PL
4982015-09-21 Pierre Langlois <pierre.langlois@arm.com>
499
500 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
501 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
502 aarch64-ipa.o.
503 * linux-aarch64-ipa.c: New file.
504 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
505 and endian.h.
506 (aarch64_get_thread_area): New target method.
507 (extract_signed_bitfield): New helper function.
508 (aarch64_decode_ldr_literal): New function.
509 (enum aarch64_opcodes): New enum.
510 (struct aarch64_register): New struct.
511 (struct aarch64_operand): New struct.
512 (x0): New static global.
513 (x1): Likewise.
514 (x2): Likewise.
515 (x3): Likewise.
516 (x4): Likewise.
517 (w2): Likewise.
518 (ip0): Likewise.
519 (sp): Likewise.
520 (xzr): Likewise.
521 (aarch64_register): New helper function.
522 (register_operand): Likewise.
523 (immediate_operand): Likewise.
524 (struct aarch64_memory_operand): New struct.
525 (offset_memory_operand): New helper function.
526 (preindex_memory_operand): Likewise.
527 (enum aarch64_system_control_registers): New enum.
528 (ENCODE): New macro.
529 (emit_insn): New helper function.
530 (emit_b): New function.
531 (emit_bcond): Likewise.
532 (emit_cb): Likewise.
533 (emit_tb): Likewise.
534 (emit_blr): Likewise.
535 (emit_stp): Likewise.
536 (emit_ldp_q_offset): Likewise.
537 (emit_stp_q_offset): Likewise.
538 (emit_load_store): Likewise.
539 (emit_ldr): Likewise.
540 (emit_ldrsw): Likewise.
541 (emit_str): Likewise.
542 (emit_ldaxr): Likewise.
543 (emit_stxr): Likewise.
544 (emit_stlr): Likewise.
545 (emit_data_processing_reg): Likewise.
546 (emit_data_processing): Likewise.
547 (emit_add): Likewise.
548 (emit_sub): Likewise.
549 (emit_mov): Likewise.
550 (emit_movk): Likewise.
551 (emit_mov_addr): Likewise.
552 (emit_mrs): Likewise.
553 (emit_msr): Likewise.
554 (emit_sevl): Likewise.
555 (emit_wfe): Likewise.
556 (append_insns): Likewise.
557 (can_encode_int32_in): New helper function.
558 (aarch64_relocate_instruction): New function.
559 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
560 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
561 (struct linux_target_ops): Install aarch64_get_thread_area,
562 aarch64_install_fast_tracepoint_jump_pad and
563 aarch64_get_min_fast_tracepoint_insn_len.
564
787749ea
PL
5652015-09-21 Pierre Langlois <pierre.langlois@arm.com>
566
567 * Makefile.in (aarch64-insn.o): New rule.
568 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
569
9812b2e6
YQ
5702015-09-21 Yao Qi <yao.qi@linaro.org>
571
572 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
573
18fe412b
YQ
5742015-09-21 Yao Qi <yao.qi@linaro.org>
575
576 * tracepoint.c (max_jump_pad_size): Remove.
577
a0cc84cd
YQ
5782015-09-18 Yao Qi <yao.qi@linaro.org>
579
580 * linux-aarch64-low.c: Don't include sys/uio.h.
581 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
582
d78908cf
WW
5832015-09-16 Wei-cheng Wang <cole945@gmail.com>
584
585 * tracepoint.c (eval_result_type): Change prototype.
586 (condition_true_at_tracepoint): Fix argument to compiled_cond.
587
d57e0d50
PA
5882015-09-15 Pedro Alves <palves@redhat.com>
589
590 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
591 Check whether to report exec events instead of checking whether
592 multiprocess is enabled.
593
5a676acc
PA
5942015-09-15 Pedro Alves <palves@redhat.com>
595
596 PR remote/18965
597 * remote-utils.c (prepare_resume_reply): Merge
598 TARGET_WAITKIND_VFORK_DONE switch case with the
599 TARGET_WAITKIND_FORKED case.
600
7c5d0fad
YQ
6012015-09-15 Yao Qi <yao.qi@linaro.org>
602
603 * server.c (handle_query): Check string comparison using
604 "else if" instead of "if".
605
750ce8d1
YQ
6062015-09-15 Yao Qi <yao.qi@linaro.org>
607
608 * server.c (vCont_supported): New global variable.
609 (handle_query): Set vCont_supported to 1 if "vContSupported+"
610 matches. Append ";vContSupported+" to own_buf.
611 (handle_v_requests): Append ";s;S" to own_buf if target supports
612 hardware single step or vCont_supported is false.
613 (capture_main): Set vCont_supported to zero.
614
70b90b91
YQ
6152015-09-15 Yao Qi <yao.qi@linaro.org>
616
617 * linux-low.c (linux_supports_conditional_breakpoints): Rename
618 it to ...
619 (linux_supports_hardware_single_step): ... New function.
620 (linux_target_ops): Update.
621 * lynx-low.c (lynx_target_ops): Set field
622 supports_hardware_single_step to target_can_do_hardware_single_step.
623 * nto-low.c (nto_target_ops): Likewise.
624 * spu-low.c (spu_target_ops): Likewise.
625 * win32-low.c (win32_target_ops): Likewise.
626 * target.c (target_can_do_hardware_single_step): New function.
627 * target.h (struct target_ops) <supports_conditional_breakpoints>:
628 Remove. <supports_hardware_single_step>: New field.
629 (target_supports_conditional_breakpoints): Remove.
630 (target_supports_hardware_single_step): New macro.
631 (target_can_do_hardware_single_step): Declare.
632 * server.c (handle_query): Use target_supports_hardware_single_step
633 instead of target_supports_conditional_breakpoints.
634
ade90bde
YQ
6352015-09-15 Yao Qi <yao.qi@linaro.org>
636
637 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
638 function.
639 (struct linux_target_ops the_low_target): Install
640 aarch64_linux_siginfo_fixup.
641
94585166
DB
6422015-09-11 Don Breazeal <donb@codesourcery.com>
643 Luis Machado <lgustavo@codesourcery.com>
644
645 * linux-low.c (linux_mourn): Static declaration.
646 (linux_arch_setup): Move in front of
647 handle_extended_wait.
648 (linux_arch_setup_thread): New function.
649 (handle_extended_wait): Handle exec events. Call
650 linux_arch_setup_thread. Make event_lwp argument a
651 pointer-to-a-pointer.
652 (check_zombie_leaders): Do not check stopped threads.
653 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
654 (linux_low_filter_event): Add lwp and thread for exec'ing
655 non-leader thread if leader thread has been deleted.
656 Refactor code into linux_arch_setup_thread and call it.
657 Pass child lwp pointer by reference to handle_extended_wait.
658 (linux_wait_for_event_filtered): Update comment.
659 (linux_wait_1): Prevent clobbering exec event status.
660 (linux_supports_exec_events): New function.
661 (linux_target_ops) <supports_exec_events>: Initialize new member.
662 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
663 new member.
664 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
665 * server.c (report_exec_events): New global variable.
666 (handle_query): Handle qSupported query for exec-events feature.
667 (captured_main): Initialize report_exec_events.
668 * server.h (report_exec_events): Declare new global variable.
669 * target.h (struct target_ops) <supports_exec_events>: New
670 member.
671 (target_supports_exec_events): New macro.
672 * win32-low.c (win32_target_ops) <supports_exec_events>:
673 Initialize new member.
674
0568462b
MM
6752015-09-09 Markus Metzger <markus.t.metzger@intel.com>
676
677 * linux-low.c (linux_low_enable_btrace): Remove.
678 (linux_target_ops): Replace linux_low_enable_btrace with
679 linux_enable_btrace.
680
39edd165
YQ
6812015-09-03 Yao Qi <yao.qi@linaro.org>
682
683 * linux-aarch64-low.c (aarch64_insert_point): Call
684 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
685 returns true.
686
1db33b5a
UW
6872015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
688
689 * linux-low.c (check_stopped_by_breakpoint): Use
690 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
691
ab290430
PA
6922015-08-27 Pedro Alves <palves@redhat.com>
693
694 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
695
8d749320
SM
6962015-08-26 Simon Marchi <simon.marchi@ericsson.com>
697
6711b7f8
SM
698 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
699 the XNEW-family equivalent.
8d749320
SM
700 (compile_bytecodes): Likewise.
701 * dll.c (loaded_dll): Likewise.
702 * event-loop.c (append_callback_event): Likewise.
703 (create_file_handler): Likewise.
704 (create_file_event): Likewise.
705 * hostio.c (handle_open): Likewise.
706 * inferiors.c (add_thread): Likewise.
707 (add_process): Likewise.
708 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
709 * linux-arm-low.c (arm_new_process): Likewise.
710 (arm_new_thread): Likewise.
711 * linux-low.c (add_to_pid_list): Likewise.
712 (linux_add_process): Likewise.
713 (handle_extended_wait): Likewise.
714 (add_lwp): Likewise.
715 (enqueue_one_deferred_signal): Likewise.
716 (enqueue_pending_signal): Likewise.
717 (linux_resume_one_lwp_throw): Likewise.
718 (linux_resume_one_thread): Likewise.
719 (linux_read_memory): Likewise.
720 (linux_write_memory): Likewise.
721 * linux-mips-low.c (mips_linux_new_process): Likewise.
722 (mips_linux_new_thread): Likewise.
723 (mips_add_watchpoint): Likewise.
724 * linux-x86-low.c (initialize_low_arch): Likewise.
725 * lynx-low.c (lynx_add_process): Likewise.
726 * mem-break.c (set_raw_breakpoint_at): Likewise.
727 (set_breakpoint): Likewise.
728 (add_condition_to_breakpoint): Likewise.
729 (add_commands_to_breakpoint): Likewise.
730 (clone_agent_expr): Likewise.
731 (clone_one_breakpoint): Likewise.
732 * regcache.c (new_register_cache): Likewise.
733 * remote-utils.c (look_up_one_symbol): Likewise.
734 * server.c (queue_stop_reply): Likewise.
735 (start_inferior): Likewise.
736 (queue_stop_reply_callback): Likewise.
737 (handle_target_event): Likewise.
738 * spu-low.c (fetch_ppc_memory): Likewise.
739 (store_ppc_memory): Likewise.
740 * target.c (set_target_ops): Likewise.
741 * thread-db.c (thread_db_load_search): Likewise.
742 (try_thread_db_load_1): Likewise.
743 * tracepoint.c (add_tracepoint): Likewise.
744 (add_tracepoint_action): Likewise.
745 (create_trace_state_variable): Likewise.
746 (cmd_qtdpsrc): Likewise.
747 (cmd_qtro): Likewise.
748 (add_while_stepping_state): Likewise.
749 * win32-low.c (child_add_thread): Likewise.
750 (get_image_name): Likewise.
751
ed8b7b42
YQ
7522015-08-25 Yao Qi <yao.qi@linaro.org>
753
754 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
755
db3cb7cb
YQ
7562015-08-25 Yao Qi <yao.qi@linaro.org>
757
758 * Makefile.in (aarch64-linux.o): New rule.
759 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
760 srv_tgtobj.
761 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
762 (aarch64_init_debug_reg_state): Make it extern.
763 (aarch64_linux_prepare_to_resume): Remove.
764
f6011a1c
YQ
7652015-08-25 Yao Qi <yao.qi@linaro.org>
766
767 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
768 lwp_arch_private_info and ptid_of_lwp.
769
88e2cf7e
YQ
7702015-08-25 Yao Qi <yao.qi@linaro.org>
771
772 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
773 Find proc_info by find_process_pid. All callers updated.
774
5e35436e
YQ
7752015-08-25 Yao Qi <yao.qi@linaro.org>
776
777 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
778 Remove.
779 (debug_reg_change_callback): Remove.
780 (aarch64_notify_debug_reg_change): Remove.
781
4a8a7965
YQ
7822015-08-25 Yao Qi <yao.qi@linaro.org>
783
784 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
785 Call current_lwp_ptid.
786
32a271ee
YQ
7872015-08-25 Yao Qi <yao.qi@linaro.org>
788
789 * linux-aarch64-low.c (debug_reg_change_callback): Use
790 debug_printf.
791
0d51c8d7
YQ
7922015-08-25 Yao Qi <yao.qi@linaro.org>
793
794 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
795
31a43dd5
YQ
7962015-08-25 Yao Qi <yao.qi@linaro.org>
797
798 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
799
8ee52567
YQ
8002015-08-25 Yao Qi <yao.qi@linaro.org>
801
802 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
803 the code.
804
ff3f0f45
YQ
8052015-08-25 Yao Qi <yao.qi@linaro.org>
806
807 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
808 Remove.
809 (debug_reg_change_callback): Remove argument entry and add argument
810 lwp. Remove local variable thread. Don't print thread id in the
811 debugging output. Don't check whether pid of thread equals to pid.
812 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
813 iterate_over_lwps instead find_inferior.
814
3d40fbb5
PA
8152015-08-24 Pedro Alves <palves@redhat.com>
816
817 * inferiors.c (get_first_process): New function.
818 * inferiors.h (get_first_process): New declaration.
819 * remote-utils.c (read_ptid): Default to the first process in the
820 list, instead of to the current thread's process.
821
438e1e42
PA
8222015-08-24 Pedro Alves <palves@redhat.com>
823
824 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
825 * event-loop.c: Likewise.
826 * remote-utils.c: Likewise.
827 * tracepoint.c: Likewise.
828
a8c6d4fc
PA
8292015-08-24 Pedro Alves <palves@redhat.com>
830
831 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
832 ptid_get_lwp.
833
99b0bb12
PA
8342015-08-21 Pedro Alves <palves@redhat.com>
835
836 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
837 instead of literal 1.
838
f8904751
PA
8392015-08-21 Pedro Alves <palves@redhat.com>
840
841 * tdesc.c (default_description): Explicitly zero-initialize.
842
465a859e
PA
8432015-08-21 Pedro Alves <palves@redhat.com>
844
845 PR gdb/18749
846 * inferiors.c (remove_thread): Discard any pending stop reply for
847 this thread.
848 * server.c (remove_all_on_match_pid): Rename to ...
849 (remove_all_on_match_ptid): ... this. Work with a filter ptid
850 instead of a pid.
851 (discard_queued_stop_replies): Change parameter to a ptid. Now
852 extern.
853 (handle_v_kill, kill_inferior_callback, captured_main)
854 (process_serial_event): Adjust.
855 * server.h (discard_queued_stop_replies): Declare.
856
f0db101d
PA
8572015-08-21 Pedro Alves <palves@redhat.com>
858
859 * linux-low.c (wait_for_sigstop): Always switch to no thread
860 selected if the previously current thread dies.
861 * lynx-low.c (lynx_request_interrupt): Use the first thread's
862 process instead of the current thread's.
863 * remote-utils.c (input_interrupt): Don't check if there's no
864 current thread.
865 * server.c (gdb_read_memory, gdb_write_memory): If setting the
866 current thread to the general thread fails, error out.
867 (handle_qxfer_auxv, handle_qxfer_libraries)
868 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
869 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
870 (handle_query): Check if there's a thread selected instead of
871 checking whether there's any thread in the thread list.
872 (handle_qxfer_threads, handle_qxfer_btrace)
873 (handle_qxfer_btrace_conf): Don't error out early if there's no
874 thread in the thread list.
875 (handle_v_cont, myresume): Don't set the current thread to the
876 continue thread.
877 (process_serial_event) <Hg handling>: Also set thread_id if the
878 previous general thread is still alive.
879 (process_serial_event) <g/G handling>: If setting the current
880 thread to the general thread fails, error out.
881 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
882 thread's lwp instead of the current thread's.
883 * target.c (set_desired_thread): If the desired thread was not
884 found, leave the current thread pointing to NULL. Return an int
885 (boolean) indicating success.
886 * target.h (set_desired_thread): Change return type to int.
887
40045d91
MF
8882015-08-20 Max Filippov <jcmvbkbc@gmail.com>
889
890 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
891 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
892 #includes.
893 (ps_get_thread_area): New function.
894
45face3b
GB
8952015-08-19 Gary Benson <gbenson@redhat.com>
896
897 * hostio.c (handle_pread): Do not attempt to read more data
898 than hostio_reply_with_data can fit in a packet.
899
16d5f642
JB
9002015-08-18 Joel Brobecker <brobecker@adacore.com>
901
902 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
903
a738da3a
MF
9042015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
905
906 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
907
33ebda9d
PA
9082015-08-06 Pedro Alves <palves@redhat.com>
909
910 * tracepoint.c (expr_eval_result): Now an int.
911
a44892be
PA
9122015-08-06 Pedro Alves <palves@redhat.com>
913
914 * gdbthread.h (struct regcache): Forward declare.
915 (struct thread_info) <regcache_data>: Now a struct regcache
916 pointer.
917 * inferiors.c (inferior_regcache_data)
918 (set_inferior_regcache_data): Now work with struct regcache
919 pointers.
920 * inferiors.h (struct regcache): Forward declare.
921 (inferior_regcache_data, set_inferior_regcache_data): Now work
922 with struct regcache pointers.
923 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
924 (free_register_cache_thread): Remove struct regcache pointer
925 casts.
926
608a1e46
PA
9272015-08-06 Pedro Alves <palves@redhat.com>
928
929 * server.c (captured_main): On error, print the exception message
930 to stderr, and if run_once is set, throw a quit.
931
f0ce0d3a
PA
9322015-08-06 Pedro Alves <palves@redhat.com>
933
934 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
935 the current thread.
936
bf47e248
PA
9372015-08-06 Pedro Alves <palves@redhat.com>
938
939 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
940 reading beyond the passed in buffer length.
941
b6b9ffcc
PL
9422015-08-06 Pierre Langlois <pierre.langlois@arm.com>
943
944 * tracepoint.c (symbol_list) <required>: Remove.
945
863d01bd
PA
9462015-08-06 Pedro Alves <palves@redhat.com>
947
948 * linux-low.c (handle_extended_wait): Set the fork child's suspend
949 count if stopping and suspending threads.
950 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
951 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
952 (linux_detach): Complete an ongoing step-over.
953 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
954 throughout.
955 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
956 (linux_wait_1): If passing a signal to the inferior after
957 finishing a step-over, unsuspend and re-resume all lwps. If we
958 see a single-step event but the thread should be continuing, don't
959 pass the trap to gdb.
960 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
961 internal_error instead of gdb_assert.
962 (enqueue_pending_signal): New function.
963 (check_ptrace_stopped_lwp_gone): Add debug output.
964 (start_step_over): Use internal_error instead of gdb_assert.
965 (complete_ongoing_step_over): New function.
966 (linux_resume_one_thread): Don't resume a suspended thread.
967 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
968 it stepping.
969
00db26fa
PA
9702015-08-06 Pedro Alves <palves@redhat.com>
971
972 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
973 (linux_thread_alive): Use lwp_is_marked_dead.
974 (extended_event_reported): Delete.
975 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
976 instead of extended_event_reported.
977 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
978 as well.
979 (lwp_is_marked_dead): New function.
980 (lwp_running): Use lwp_is_marked_dead.
981 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
982 comment.
983
ad071a30
PA
9842015-08-06 Pedro Alves <palves@redhat.com>
985
986 * linux-low.c (linux_wait_1): Move fork event output out of the
987 !report_to_gdb check. Pass event_child->waitstatus to
988 target_waitstatus_to_string instead of ourstatus.
989
524b57e6
YQ
9902015-08-04 Yao Qi <yao.qi@linaro.org>
991
992 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
993 if current_thread is 32 bit.
994
6085d6f6
YQ
9952015-08-04 Yao Qi <yao.qi@linaro.org>
996
997 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
998 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
999 * server.c (extended_protocol): Remove "static".
1000 * server.h (extended_protocol): Declare it.
1001
8a7e4587
YQ
10022015-08-04 Yao Qi <yao.qi@linaro.org>
1003
1004 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
1005 both aarch64 and aarch32.
1006 (aarch64_set_pc): Likewise.
1007
3b53ae99
YQ
10082015-08-04 Yao Qi <yao.qi@linaro.org>
1009
1010 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
1011 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
1012 arm-with-neon.xml to srv_xmlfiles.
1013 * linux-aarch64-low.c: Include linux-aarch32-low.h.
1014 (is_64bit_tdesc): New function.
1015 (aarch64_linux_read_description): New function.
1016 (aarch64_arch_setup): Call aarch64_linux_read_description.
1017 (regs_info): Rename to regs_info_aarch64.
1018 (aarch64_regs_info): Return right regs_info.
1019 (initialize_low_arch): Call initialize_low_arch_aarch32.
1020
bd9e6534
YQ
10212015-08-04 Yao Qi <yao.qi@linaro.org>
1022
1023 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
1024 * linux-aarch32-low.c: New file.
1025 * linux-aarch32-low.h: New file.
1026 * linux-arm-low.c (arm_fill_gregset): Move it to
1027 linux-aarch32-low.c.
1028 (arm_store_gregset): Likewise.
1029 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
1030 (arm_store_vfpregset): Call arm_store_vfpregset_num.
1031 (arm_arch_setup): Check if PTRACE_GETREGSET works.
1032 (regs_info): Rename to regs_info_arm.
1033 (arm_regs_info): Return regs_info_aarch32 if
1034 have_ptrace_getregset is 1 and target description is
1035 arm_with_neon or arm_with_vfpv3.
1036 (initialize_low_arch): Don't call init_registers_arm_with_neon.
1037 Call initialize_low_arch_aarch32 instead.
1038
ded48a5e
YQ
10392015-08-04 Yao Qi <yao.qi@linaro.org>
1040
1041 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
1042 * linux-low.c: ... here.
1043 * linux-low.h (have_ptrace_getregset): Declare it.
1044
96e9210f
PA
10452015-08-04 Pedro Alves <palves@redhat.com>
1046
1047 * thread-db.c (struct thread_db): Use new typedefs.
1048 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
1049 CHK calls.
1050 (disable_thread_event_reporting): Cast result of dlsym to
1051 destination function pointer type.
1052 (thread_db_mourn): Use td_ta_delete_ftype.
1053
af60a1ef
SL
10542015-08-03 Sandra Loosemore <sandra@codesourcery.com>
1055
1056 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
1057 arch variant.
1058 (CDX_BREAKPOINT): Define for R2.
1059 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
1060 (the_low_target): Add comments.
1061
e8b41681
YQ
10622015-07-30 Yao Qi <yao.qi@linaro.org>
1063
1064 * linux-arm-low.c (arm_hwcap): Remove it.
1065 (arm_read_description): New local variable arm_hwcap. Don't
1066 set arm_hwcap to zero.
1067
89abb039
YQ
10682015-07-30 Yao Qi <yao.qi@linaro.org>
1069
1070 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
1071 Use regcache->tdesc instead.
1072 (arm_store_wmmxregset): Likewise.
1073 (arm_fill_vfpregset): Likewise.
1074 (arm_store_vfpregset): Likewise.
1075
deca266c
YQ
10762015-07-30 Yao Qi <yao.qi@linaro.org>
1077
1078 * linux-arm-low.c: Include arch/arm.h.
1079 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
1080 (arm_store_gregset): Likewise.
1081
aa58a496
SM
10822015-07-29 Simon Marchi <simon.marchi@ericsson.com>
1083
1084 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
1085 ptrace's 4th parameter.
1086
50904b25
YQ
10872015-07-27 Yao Qi <yao.qi@linaro.org>
1088
1089 * configure.srv (case aarch64*-*-linux*): Don't set
1090 srv_linux_usrregs.
1091
5826e159
PA
10922015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
1093
1094 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
1095 sys/ptrace.h.
1096 * linux-arm-low.c: Likewise.
1097 * linux-cris-low.c: Likewise.
1098 * linux-crisv32-low.c: Likewise.
1099 * linux-low.c: Likewise.
1100 * linux-m68k-low.c: Likewise.
1101 * linux-mips-low.c: Likewise.
1102 * linux-nios2-low.c: Likewise.
1103 * linux-s390-low.c: Likewise.
1104 * linux-sparc-low.c: Likewise.
1105 * linux-tic6x-low.c: Likewise.
1106 * linux-tile-low.c: Likewise.
1107 * linux-x86-low.c: Likewise.
1108
54019719
PA
11092015-07-24 Pedro Alves <palves@redhat.com>
1110
1111 * config.in: Regenerate.
1112 * configure: Regenerate.
1113
eb7aa561
PA
11142015-07-24 Pedro Alves <palves@redhat.com>
1115
1116 * acinclude.m4: Include ../ptrace.m4.
1117 * configure.ac: Call GDB_AC_PTRACE.
1118 * config.in, configure: Regenerate.
1119
55d7b841
YQ
11202015-07-24 Yao Qi <yao.qi@linaro.org>
1121
1122 * linux-low.c (linux_create_inferior): Remove setting to
1123 proc->priv->new_inferior.
1124 (linux_attach): Likewise.
1125 (linux_low_filter_event): Likewise.
1126 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
1127
c06cbd92
YQ
11282015-07-24 Yao Qi <yao.qi@linaro.org>
1129
1130 * linux-low.c (linux_arch_setup): New function.
1131 (linux_low_filter_event): If proc->tdesc is NULL and
1132 proc->attached is true, call the_low_target.arch_setup.
1133 Otherwise, keep status pending, and return.
1134 (linux_resume_one_lwp_throw): Don't call get_pc if
1135 thread->while_stepping isn't NULL. Don't call
1136 get_thread_regcache if proc->tdesc is NULL.
1137 (need_step_over_p): Return 0 if proc->tdesc is NULL.
1138 (linux_target_ops): Install arch_setup.
1139 * server.c (start_inferior): Call the_target->arch_setup.
1140 * target.h (struct target_ops) <arch_setup>: New field.
1141 (target_arch_setup): New marco.
1142 * lynx-low.c (lynx_target_ops): Update.
1143 * nto-low.c (nto_target_ops): Update.
1144 * spu-low.c (spu_target_ops): Update.
1145 * win32-low.c (win32_target_ops): Update.
1146
5ae3ebba
YQ
11472015-07-24 Yao Qi <yao.qi@linaro.org>
1148
1149 * linux-low.c (linux_add_process): Don't set
1150 proc->priv->new_inferior.
1151 (linux_create_inferior): Set proc->priv->new_inferior to 1.
1152 (linux_attach): Likewise.
1153
eb97750b
YQ
11542015-07-24 Yao Qi <yao.qi@linaro.org>
1155
1156 * server.c (start_inferior): Code refactor.
1157
51aee833
YQ
11582015-07-24 Yao Qi <yao.qi@linaro.org>
1159
1160 * server.c (process_serial_event): Set general_thread.
1161
af1b22f3
YQ
11622015-07-21 Yao Qi <yao.qi@linaro.org>
1163
1164 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
1165 aarch64_linux_get_debug_reg_capacity.
1166
554717a3
YQ
11672015-07-17 Yao Qi <yao.qi@linaro.org>
1168
1169 * Makefile.in (aarch64-linux-hw-point.o): New rule.
1170 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
1171 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
1172 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
1173 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
1174 (AARCH64_HWP_ALIGNMENT): Likewise.
1175 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
1176 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
1177 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
1178 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
1179 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
1180 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
1181 (struct aarch64_debug_reg_state): Likewise.
1182 (struct arch_lwp_info): Likewise.
1183 (aarch64_align_watchpoint): Likewise.
1184 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
1185 (aarch64_watchpoint_length): Likewise.
1186 (aarch64_point_encode_ctrl_reg): Likewise
1187 (aarch64_point_is_aligned): Likewise.
1188 (aarch64_align_watchpoint): Likewise.
1189 (aarch64_linux_set_debug_regs):
1190 (aarch64_dr_state_insert_one_point): Likewise.
1191 (aarch64_dr_state_remove_one_point): Likewise.
1192 (aarch64_handle_breakpoint): Likewise.
1193 (aarch64_handle_aligned_watchpoint): Likewise.
1194 (aarch64_handle_unaligned_watchpoint): Likewise.
1195 (aarch64_handle_watchpoint): Likewise.
1196
c67ca4de
YQ
11972015-07-17 Yao Qi <yao.qi@linaro.org>
1198
1199 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
1200 and don't aarch64_get_debug_reg_state. All callers update.
1201 (aarch64_handle_aligned_watchpoint): Likewise.
1202 (aarch64_handle_unaligned_watchpoint): Likewise.
1203 (aarch64_handle_watchpoint): Likewise.
1204 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
1205 (aarch64_remove_point): Likewise.
1206
25abf979
YQ
12072015-07-17 Yao Qi <yao.qi@linaro.org>
1208
1209 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
1210 debug_printf.
1211 (aarch64_handle_unaligned_watchpoint): Likewise.
1212
db1ff28b
JK
12132015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
1214
1215 Revert the previous 3 commits:
1216 Move gdb_regex* to common/
1217 Move linux_find_memory_regions_full & co.
1218 gdbserver build-id attribute generator
1219
700ca40f
JK
12202015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1221 Jan Kratochvil <jan.kratochvil@redhat.com>
1222
1223 gdbserver build-id attribute generator.
1224 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
1225 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
1226 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
1227 (find_phdr): New.
1228 (get_dynamic): Use find_pdhr to traverse program headers.
1229 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
1230 (compare_mapping_entry_range, struct find_memory_region_callback_data)
1231 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
1232 (get_hex_build_id): New.
1233 (linux_qxfer_libraries_svr4): Add optional build-id attribute
1234 to reply XML document.
1235
9904185c
JK
12362015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1237 Jan Kratochvil <jan.kratochvil@redhat.com>
1238
1239 * target.c: Include target/target-utils.h and fcntl.h.
1240 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
1241 (target_fileio_read_stralloc): New functions.
1242
6e5b4429
JK
12432015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
1244
1245 * Makefile.in (OBS): Add gdb_regex.o.
1246 (gdb_regex.o): New.
1247 * config.in: Rebuilt.
1248 * configure: Rebuilt.
1249
ddc98fbf
JK
12502015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1251 Jan Kratochvil <jan.kratochvil@redhat.com>
1252
1253 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
1254 * Makefile.in (OBS): Add target-utils.o.
1255 (linux-maps.o, target-utils.o): New.
1256 * configure.srv (srv_linux_obj): Add linux-maps.o.
1257
e57bb7a0
PL
12582015-07-15 Pierre Langlois <pierre.langlois@arm.com>
1259
1260 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
1261 function, return 1.
1262 (the_low_target): Install it.
1263
586b02a9
PA
12642015-07-14 Pedro Alves <palves@redhat.com>
1265
1266 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
1267 Instead, ignore ECHILD, and throw an error for other errnos.
1268
58c1b36c
PA
12692015-07-10 Pedro Alves <palves@redhat.com>
1270
1271 * event-loop.c (struct callback_event) <data>: Change type to
1272 gdb_client_data instance instead of gdb_client_data pointer.
1273 (append_callback_event): Adjust.
1274
421530db
PL
12752015-07-10 Pierre Langlois <pierre.langlois@arm.com>
1276
1277 * linux-aarch64-low.c: Add comments for each linux_target_ops
1278 method. Remove comments already covered in target_ops and
1279 linux_target_ops definitions.
1280 (the_low_target): Add comments for each unimplemented method.
1281
c2d65f38
YQ
12822015-07-09 Yao Qi <yao.qi@linaro.org>
1283
1284 * linux-aarch64-low.c (aarch64_regmap): Remove.
1285 (aarch64_usrregs_info): Remove.
1286 (regs_info): Set field usrregs to NULL.
1287
b20a6524
MM
12882015-07-02 Markus Metzger <markus.t.metzger@intel.com>
1289
1290 * linux-low.c: Include "rsp-low.h"
1291 (linux_low_encode_pt_config, linux_low_encode_raw): New.
1292 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
1293 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
1294 (handle_btrace_enable_pt): New.
1295 (handle_btrace_general_set): Support "pt".
1296 (handle_btrace_conf_general_set): Support "pt:size".
1297
96c97461
PL
12982015-06-29 Pierre Langlois <pierre.langlois@arm.com>
1299
1300 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
1301 Z_PACKET_SW_BP.
1302
37d66942
PL
13032015-06-29 Pierre Langlois <pierre.langlois@arm.com>
1304
1305 * linux-aarch64-low.c: Remove comment about endianness.
1306 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
1307 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
1308 memcmp.
1309
dc06243f
GB
13102015-06-24 Gary Benson <gbenson@redhat.com>
1311
1312 * linux-i386-ipa.c (stdint.h): Do not include.
1313 * lynx-i386-low.c (stdint.h): Likewise.
1314 * lynx-ppc-low.c (stdint.h): Likewise.
1315 * mem-break.c (stdint.h): Likewise.
1316 * thread-db.c (stdint.h): Likewise.
1317 * tracepoint.c (stdint.h): Likewise.
1318 * win32-low.c (stdint.h): Likewise.
1319
124e13d9
SM
13202015-06-18 Simon Marchi <simon.marchi@ericsson.com>
1321
1322 * server.c (write_qxfer_response): Update call to
1323 remote_escape_output.
1324
909c2cda
JK
13252015-06-15 Aleksandar Ristovski <aristovski@qnx.com
1326 Jan Kratochvil <jan.kratochvil@redhat.com>
1327
1328 Merge multiple hex conversions.
1329 * gdbreplay.c (tohex): Rename to 'fromhex'.
1330 (logchar): Use fromhex.
1331
24c05f46
JK
13322015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
1333
1334 * server.c (handle_qxfer_libraries): Set `version' attribute for
1335 <library-list>.
1336
14d2069a
GB
13372015-06-10 Gary Benson <gbenson@redhat.com>
1338
1339 * target.h (struct target_ops) <multifs_open>: New field.
1340 <multifs_unlink>: Likewise.
1341 <multifs_readlink>: Likewise.
1342 * linux-low.c (nat/linux-namespaces.h): New include.
1343 (linux_target_ops): Initialize the_target->multifs_open,
1344 the_target->multifs_unlink and the_target->multifs_readlink.
1345 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
1346 * hostio.c (hostio_fs_pid): New static variable.
1347 (hostio_handle_new_gdb_connection): New function.
1348 (handle_setfs): Likewise.
1349 (handle_open): Use the_target->multifs_open as appropriate.
1350 (handle_unlink): Use the_target->multifs_unlink as appropriate.
1351 (handle_readlink): Use the_target->multifs_readlink as
1352 appropriate.
1353 (handle_vFile): Handle vFile:setfs packets.
1354 * server.c (handle_query): Call hostio_handle_new_gdb_connection
1355 after target_handle_new_gdb_connection.
1356
4b8b5e72
GB
13572015-06-10 Gary Benson <gbenson@redhat.com>
1358
1359 * configure.ac (AC_CHECK_FUNCS): Add setns.
1360 * config.in: Regenerate.
1361 * configure: Likewise.
1362 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
1363 (linux-namespaces.o): New rule.
1364 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
1365
3ac2e371
GB
13662015-06-09 Gary Benson <gbenson@redhat.com>
1367
1368 * hostio.c (handle_open): Process mode argument with
1369 fileio_to_host_mode.
1370
ca9b78ce
YQ
13712015-06-01 Yao Qi <yao.qi@linaro.org>
1372
1373 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
1374 * linux-x86-low.c: Likewise.
1375
bfacd19d
DB
13762015-05-28 Don Breazeal <donb@codesourcery.com>
1377
1378 * linux-low.c (handle_extended_wait): Initialize
1379 thread_info.last_resume_kind for new fork children.
1380
452003ef
PA
13812015-05-15 Pedro Alves <palves@redhat.com>
1382
1383 * target.h (target_handle_new_gdb_connection): Rewrite using if
1384 wrapped in do/while.
1385
1041a03c
JB
13862015-05-14 Joel Brobecker <brobecker@adacore.com>
1387
1388 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
1389 * configure, config.in: Regenerate.
1390 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
1391 Declare typedef.
1392
c269dbdb
DB
13932015-05-12 Don Breazeal <donb@codesourcery.com>
1394
1395 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
1396 PTRACE_EVENT_VFORK_DONE.
1397 (linux_low_ptrace_options, extended_event_reported): Add vfork
1398 events.
1399 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
1400 and "vforkdone" for RSP 'T' Stop Reply Packet.
1401 * server.h (report_vfork_events): Declare
1402 global variable.
1403
3a8a0396
DB
14042015-05-12 Don Breazeal <donb@codesourcery.com>
1405
1406 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
1407 (the_low_target) <new_fork>: Initialize new member.
1408 * linux-arm-low.c (arm_new_fork): New function.
1409 (the_low_target) <new_fork>: Initialize new member.
1410 * linux-low.c (handle_extended_wait): Call new target function
1411 new_fork.
1412 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
1413 * linux-mips-low.c (mips_add_watchpoint): New function
1414 extracted from mips_insert_point.
1415 (the_low_target) <new_fork>: Initialize new member.
1416 (mips_linux_new_fork): New function.
1417 (mips_insert_point): Call mips_add_watchpoint.
1418 * linux-x86-low.c (x86_linux_new_fork): New function.
1419 (the_low_target) <new_fork>: Initialize new member.
1420
de0d863e
DB
14212015-05-12 Don Breazeal <donb@codesourcery.com>
1422
1423 * linux-low.c (handle_extended_wait): Implement return value,
1424 rename argument 'event_child' to 'event_lwp', handle
1425 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
1426 (linux_low_ptrace_options): New function.
1427 (linux_low_filter_event): Call linux_low_ptrace_options,
1428 use different argument fo linux_enable_event_reporting,
1429 use return value from handle_extended_wait.
1430 (extended_event_reported): New function.
1431 (linux_wait_1): Call extended_event_reported and set
1432 status to report fork events.
1433 (linux_write_memory): Add pid to debug message.
1434 (reset_lwp_ptrace_options_callback): New function.
1435 (linux_handle_new_gdb_connection): New function.
1436 (linux_target_ops): Initialize new structure member.
1437 * linux-low.h (struct lwp_info) <waitstatus>: New member.
1438 * lynx-low.c: Initialize new structure member.
1439 * remote-utils.c (prepare_resume_reply): Implement stop reason
1440 "fork" for "T" stop message.
1441 * server.c (handle_query): Call handle_new_gdb_connection.
1442 * server.h (report_fork_events): Declare global flag.
1443 * target.h (struct target_ops) <handle_new_gdb_connection>:
1444 New member.
1445 (target_handle_new_gdb_connection): New macro.
1446 * win32-low.c: Initialize new structure member.
1447
ddcbc397
DB
14482015-05-12 Don Breazeal <donb@codesourcery.com>
1449
1450 * mem-break.c (APPEND_TO_LIST): Define macro.
1451 (clone_agent_expr): New function.
1452 (clone_one_breakpoint): New function.
1453 (clone_all_breakpoints): New function.
1454 * mem-break.h: Declare new functions.
1455
89245bc0
DB
14562015-05-12 Don Breazeal <donb@codesourcery.com>
1457
1458 * linux-low.c (linux_supports_fork_events): New function.
1459 (linux_supports_vfork_events): New function.
1460 (linux_target_ops): Initialize new structure members.
1461 (initialize_low): Call linux_check_ptrace_features.
1462 * lynx-low.c (lynx_target_ops): Initialize new structure
1463 members.
1464 * server.c (report_fork_events, report_vfork_events):
1465 New global flags.
1466 (handle_query): Add new features to qSupported packet and
1467 response.
1468 (captured_main): Initialize new global variables.
1469 * target.h (struct target_ops) <supports_fork_events>:
1470 New member.
1471 <supports_vfork_events>: New member.
1472 (target_supports_fork_events): New macro.
1473 (target_supports_vfork_events): New macro.
1474 * win32-low.c (win32_target_ops): Initialize new structure
1475 members.
1476
835205d0
GB
14772015-05-12 Gary Benson <gbenson@redhat.com>
1478
1479 * server.c (handle_qxfer_exec_file): Use current process
1480 if annex is empty.
1481
21e94bd9
SL
14822015-05-08 Sandra Loosemore <sandra@codesourcery.com>
1483
1484 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
1485 Remove HAVE_PTRACE_GETREGS conditionals.
1486 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
1487 instead of PTRACE_GETREGS and PTRACE_SETREGS.
1488
45614f15
YQ
14892015-05-08 Yao Qi <yao.qi@linaro.org>
1490
1491 * linux-low.c (linux_supports_conditional_breakpoints): New
1492 function.
1493 (linux_target_ops): Install new target method.
1494 * lynx-low.c (lynx_target_ops): Install NULL hook for
1495 supports_conditional_breakpoints.
1496 * nto-low.c (nto_target_ops): Likewise.
1497 * spu-low.c (spu_target_ops): Likewise.
1498 * win32-low.c (win32_target_ops): Likewise.
1499 * server.c (handle_query): Check
1500 target_supports_conditional_breakpoints.
1501 * target.h (struct target_ops) <supports_conditional_breakpoints>:
1502 New field.
1503 (target_supports_conditional_breakpoints): New macro.
1504
80ad801e
PA
15052015-05-06 Pedro Alves <palves@redhat.com>
1506
1507 PR server/18081
1508 * server.c (start_inferior): If the process exits, mourn it.
1509
819843c7
GB
15102015-04-21 Gary Benson <gbenson@redhat.com>
1511
1512 * hostio.c (fileio_open_flags_to_host): Factored out to
1513 fileio_to_host_openflags in common/fileio.c. Single use
1514 updated.
1515
a2d5a9d7
MF
15162015-04-17 Max Filippov <jcmvbkbc@gmail.com>
1517
1518 * linux-xtensa-low.c (xtensa_fill_gregset)
1519 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
1520 XCHAL_HAVE_LOOP.
1521
deb44829
MF
15222015-04-17 Max Filippov <jcmvbkbc@gmail.com>
1523
1524 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
1525 (regs_info): Replace usrregs pointer with NULL.
1526
e57f1de3
GB
15272015-04-17 Gary Benson <gbenson@redhat.com>
1528
1529 * target.h (struct target_ops) <pid_to_exec_file>: New field.
1530 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
1531 * server.c (handle_qxfer_exec_file): New function.
1532 (qxfer_packets): Add exec-file entry.
1533 (handle_query): Report qXfer:exec-file:read as supported packet.
1534
62828379
RN
15352015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
1536
1537 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
1538
b88bb450
GB
15392015-04-09 Gary Benson <gbenson@redhat.com>
1540
1541 * hostio-errno.c (errno_to_fileio_error): Remove function.
1542 Update caller to use remote_fileio_to_fio_error.
1543
c8f4bfdd
YQ
15442015-04-09 Yao Qi <yao.qi@linaro.org>
1545
1546 * linux-low.c (linux_insert_point): Call
1547 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
1548 (linux_remove_point): Call remove_memory_breakpoint if type is
1549 raw_bkpt_type_sw.
1550 * linux-x86-low.c (x86_insert_point): Don't call
1551 insert_memory_breakpoint.
1552 (x86_remove_point): Don't call remove_memory_breakpoint.
1553
41f98f02
PA
15542015-04-01 Pedro Alves <palves@redhat.com>
1555 Cleber Rosa <crosa@redhat.com>
1556
1557 * server.c (gdbserver_usage): Reorganize and extend the usage
1558 message.
1559
2bf6fb9d
PA
15602015-03-24 Pedro Alves <palves@redhat.com>
1561
1562 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
1563 output. Also dump TRAP_TRACE.
1564 (linux_low_filter_event): In debug output, distinguish a
1565 resume_stop SIGSTOP from a delayed SIGSTOP.
1566
369f6daa
GB
15672015-03-24 Gary Benson <gbenson@redhat.com>
1568
1569 * linux-x86-low.c (x86_linux_new_thread): Moved to
1570 nat/x86-linux.c.
1571 (x86_linux_prepare_to_resume): Likewise.
1572
8e5d4070
GB
15732015-03-24 Gary Benson <gbenson@redhat.com>
1574
1575 * Makefile.in (x86-linux-dregs.o): New rule.
1576 * configure.srv: Add x86-linux-dregs.o to relevant targets.
1577 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
1578 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
1579 (x86_linux_dr_get): Likewise.
1580 (x86_linux_dr_set): Likewise.
1581 (update_debug_registers_callback): Likewise.
1582 (x86_linux_dr_set_addr): Likewise.
1583 (x86_linux_dr_get_addr): Likewise.
1584 (x86_linux_dr_set_control): Likewise.
1585 (x86_linux_dr_get_control): Likewise.
1586 (x86_linux_dr_get_status): Likewise.
1587 (x86_linux_update_debug_registers): Likewise.
1588
2b95d440
GB
15892015-03-24 Gary Benson <gbenson@redhat.com>
1590
1591 * linux-x86-low.c (x86_linux_update_debug_registers):
1592 New function, factored out from...
1593 (x86_linux_prepare_to_resume): ...this.
1594
14b0bc68
GB
15952015-03-24 Gary Benson <gbenson@redhat.com>
1596
1597 * linux-x86-low.c (x86_linux_dr_get): Update comments.
1598 (x86_linux_dr_set): Likewise.
1599 (update_debug_registers_callback): Likewise.
1600 (x86_linux_dr_set_addr): Likewise.
1601 (x86_linux_dr_get_addr): Likewise.
1602 (x86_linux_dr_set_control): Likewise.
1603 (x86_linux_dr_get_control): Likewise.
1604 (x86_linux_dr_get_status): Likewise.
1605 (x86_linux_prepare_to_resume): Likewise.
1606
5dfe6ca8
GB
16072015-03-24 Gary Benson <gbenson@redhat.com>
1608
1609 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
1610 Use perror_with_name. Pass string through gettext.
1611 (x86_linux_dr_set): Likewise.
1612
d33472ad
GB
16132015-03-24 Gary Benson <gbenson@redhat.com>
1614
1615 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
1616 (x86_linux_dr_set_addr): ...this.
1617 (x86_dr_low_get_addr): Rename to...
1618 (x86_linux_dr_get_addr): ...this.
1619 (x86_dr_low_set_control): Rename to...
1620 (x86_linux_dr_set_control): ...this.
1621 (x86_dr_low_get_control): Rename to...
1622 (x86_linux_dr_get_control): ...this.
1623 (x86_dr_low_get_status): Rename to...
1624 (x86_linux_dr_get_status): ...this.
1625 (x86_dr_low): Update with new function names.
1626
4b134ca1
GB
16272015-03-24 Gary Benson <gbenson@redhat.com>
1628
1629 * Makefile.in (x86-linux.o): New rule.
1630 * configure.srv: Add x86-linux.o to relevant targets.
1631 * linux-low.c (lwp_set_arch_private_info): New function.
1632 (lwp_arch_private_info): Likewise.
1633 * linux-x86-low.c: Include nat/x86-linux.h.
1634 (arch_lwp_info): Removed structure.
1635 (update_debug_registers_callback):
1636 Use lwp_set_debug_registers_changed.
1637 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
1638 and lwp_set_debug_registers_changed.
1639 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
1640
34c703da
GB
16412015-03-24 Gary Benson <gbenson@redhat.com>
1642
1643 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
1644 * linux-arm-low.c (arm_new_thread): Likewise.
1645 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
1646 * linux-mips-low.c (mips_linux_new_thread): Likewise.
1647 * linux-x86-low.c (x86_linux_new_thread): Likewise.
1648 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
1649
cff068da
GB
16502015-03-24 Gary Benson <gbenson@redhat.com>
1651
1652 * linux-low.c (ptid_of_lwp): New function.
1653 (lwp_is_stopped): Likewise.
1654 (lwp_stop_reason): Likewise.
1655 * linux-x86-low.c (update_debug_registers_callback):
1656 Use lwp_is_stopped.
1657 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
1658 lwp_stop_reason.
1659
b2f7c7e8
GB
16602015-03-24 Gary Benson <gbenson@redhat.com>
1661
1662 * linux-low.h (linux_stop_lwp): Remove declaration.
1663
6d4ee8c6
GB
16642015-03-24 Gary Benson <gbenson@redhat.com>
1665
1666 * linux-low.h: Include nat/linux-nat.h.
1667 * linux-low.c (iterate_over_lwps_args): New structure.
1668 (iterate_over_lwps_filter): New function.
1669 (iterate_over_lwps): Likewise.
1670 * linux-x86-low.c (update_debug_registers_callback):
1671 Update signature to what iterate_over_lwps expects.
1672 Remove PID check that iterate_over_lwps now performs.
1673 (x86_dr_low_set_addr): Use iterate_over_lwps.
1674 (x86_dr_low_set_control): Likewise.
1675
70a0bb6b
GB
16762015-03-24 Gary Benson <gbenson@redhat.com>
1677
1678 * linux-x86-low.c (x86_debug_reg_state): New function.
1679 (x86_linux_prepare_to_resume): Use the above.
1680
7b669087
GB
16812015-03-24 Gary Benson <gbenson@redhat.com>
1682
1683 * linux-low.c (current_lwp_ptid): New function.
1684 * linux-x86-low.c: Include nat/linux-nat.h.
1685 (x86_dr_low_get_addr): Use current_lwp_ptid.
1686 (x86_dr_low_get_control): Likewise.
1687 (x86_dr_low_get_status): Likewise.
1688
eef49a3d
PA
16892015-03-20 Pedro Alves <palves@redhat.com>
1690
1691 * tracepoint.c (cmd_qtstatus): Make "str" const.
1692
b2333d22
PA
16932015-03-20 Pedro Alves <palves@redhat.com>
1694
1695 * server.c (handle_general_set): Make "req_str" const.
1696
23f238d3
PA
16972015-03-19 Pedro Alves <palves@redhat.com>
1698
1699 * linux-low.c (linux_resume_one_lwp): Rename to ...
1700 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
1701 instead call perror_with_name.
1702 (check_ptrace_stopped_lwp_gone): New function.
1703 (linux_resume_one_lwp): Reimplement as wrapper around
1704 linux_resume_one_lwp_throw that swallows errors if the LWP is
1705 gone.
1706
91baf43f
PA
17072015-03-19 Pedro Alves <palves@redhat.com>
1708
1709 * linux-low.c (count_events_callback, select_event_lwp_callback):
1710 No longer check whether the thread has resume_stop as last resume
1711 kind.
1712
8bf3b159
PA
17132015-03-19 Pedro Alves <palves@redhat.com>
1714
1715 * linux-low.c (count_events_callback, select_event_lwp_callback):
1716 Use the lwp's status_pending_p field, not the thread's.
1717
b90fc188
PA
17182015-03-19 Pedro Alves <palves@redhat.com>
1719
1720 * linux-low.c (select_event_lwp_callback): Update comments to
1721 no longer mention SIGTRAP.
1722
464b0089
GB
17232015-03-18 Gary Benson <gbenson@redhat.com>
1724
1725 * server.c (handle_query): Do not report vFile:fstat as supported.
1726
aa9e327f
GB
17272015-03-11 Gary Benson <gbenson@redhat.com>
1728
1729 * hostio.c (sys/types.h): New include.
1730 (sys/stat.h): Likewise.
1731 (common-remote-fileio.h): Likewise.
1732 (handle_fstat): New function.
1733 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 1734
791c0056
GB
17352015-03-11 Gary Benson <gbenson@redhat.com>
1736
1737 * configure.ac (AC_CHECK_MEMBERS): Add checks for
1738 struct stat.st_blocks and struct stat.st_blksize.
1739 * configure: Regenerate.
1740 * config.in: Likewise.
1741 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
1742 (OBS): Add common-remote-fileio.o.
1743 (common-remote-fileio.o): New rule.
1744
9a9df970
PA
17452015-03-09 Pedro Alves <palves@redhat.com>
1746
1747 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
1748 'struct sockaddr' pointer in 'accept' call.
1749
9eb1356e
PA
17502015-03-09 Pedro Alves <palves@redhat.com>
1751
1752 Revert:
1753 2015-03-07 Pedro Alves <palves@redhat.com>
1754 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
1755 or <winsock2.h> here. Instead include "gdb_socket.h".
1756 (remote_open): Use union gdb_sockaddr_u.
1757 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
1758 or <winsock2.h> here. Instead include "gdb_socket.h".
1759 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
1760 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
1761 or <sys/un.h>.
1762 (init_named_socket, gdb_agent_helper_thread): Use union
1763 gdb_sockaddr_u.
1764
aac331e4
PA
17652015-03-07 Pedro Alves <palves@redhat.com>
1766
1767 * configure.ac (build_warnings): Move
1768 -Wdeclaration-after-statement to the C-specific set.
1769 * configure: Regenerate.
1770
366c75fc
PA
17712015-03-07 Pedro Alves <palves@redhat.com>
1772
1773 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
1774 or <winsock2.h> here. Instead include "gdb_socket.h".
1775 (remote_open): Use union gdb_sockaddr_u.
1776 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
1777 or <winsock2.h> here. Instead include "gdb_socket.h".
1778 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
1779 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
1780 or <sys/un.h>.
1781 (init_named_socket, gdb_agent_helper_thread): Use union
1782 gdb_sockaddr_u.
1783
492d29ea
PA
17842015-03-07 Pedro Alves <palves@redhat.com>
1785
1786 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
1787 instead.
1788
60a191ed
YQ
17892015-03-06 Yao Qi <yao.qi@linaro.org>
1790
1791 * linux-aarch64-low.c (aarch64_insert_point): Use
1792 show_debug_regs as a boolean.
1793 (aarch64_remove_point): Likewise.
1794
f5771b1d
PA
17952015-03-05 Pedro Alves <palves@redhat.com>
1796
1797 * lynx-low.c (lynx_target_ops): Install NULL hooks for
1798 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
1799 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
1800 * nto-low.c (nto_target_ops): Likewise.
1801 * spu-low.c (spu_target_ops): Likewise.
1802 * win32-low.c (win32_target_ops): Likewise.
1803
3e572f71
PA
18042015-03-04 Pedro Alves <palves@redhat.com>
1805
72f4393d 1806 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
1807 Decide whether a breakpoint triggered based on the SIGTRAP's
1808 siginfo.si_code.
72f4393d
L
1809 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
1810 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
1811 (linux_low_filter_event): Check for breakpoints before checking
1812 watchpoints.
1813 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
1814 siginfo.si_code.
72f4393d
L
1815 (linux_stopped_by_sw_breakpoint)
1816 (linux_supports_stopped_by_sw_breakpoint)
1817 (linux_stopped_by_hw_breakpoint)
1818 (linux_supports_stopped_by_hw_breakpoint): New functions.
1819 (linux_target_ops): Install new target methods.
3e572f71 1820
1ec68e26
PA
18212015-03-04 Pedro Alves <palves@redhat.com>
1822
1823 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
1824 * server.c (swbreak_feature, hwbreak_feature): New globals.
1825 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
1826 (captured_main): Clear swbreak_feature and hwbreak_feature.
1827 * server.h (swbreak_feature, hwbreak_feature): Declare.
1828 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
1829 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
1830 supports_stopped_by_hw_breakpoint>: New fields.
1831 (target_supports_stopped_by_sw_breakpoint)
1832 (target_stopped_by_sw_breakpoint)
1833 (target_supports_stopped_by_hw_breakpoint)
1834 (target_stopped_by_hw_breakpoint): Declare.
1835
15c66dd6
PA
18362015-03-04 Pedro Alves <palves@redhat.com>
1837
1838 enum lwp_stop_reason -> enum target_stop_reason
1839 * linux-low.c (check_stopped_by_breakpoint): Adjust.
1840 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
1841 (linux_wait_1, stuck_in_jump_pad_callback)
1842 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
1843 (linux_stopped_by_watchpoint):
1844 * linux-low.h (enum lwp_stop_reason): Delete.
1845 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
1846 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
1847
98fc70d6
YQ
18482015-03-04 Yao Qi <yao.qi@linaro.org>
1849
1850 * Makefile.in (SFILES): Add linux-aarch64-low.c.
1851
dd2ac174
GB
18522015-03-03 Gary Benson <gbenson@redhat.com>
1853
1854 * hostio.c (handle_vFile): Fix prefix lengths.
1855
d68e53f4
MM
18562015-03-03 Markus Metzger <markus.t.metzger@intel.com>
1857
1858 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
1859 ptr_bits.
1860
bf2d68ab
AA
18612015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
1862
1863 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
1864 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
1865 (clean): Add "rm -f" for above C files.
1866 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
1867 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
1868 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
1869 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
1870 * linux-s390-low.c (HWCAP_S390_VX): New macro.
1871 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
1872 (init_registers_s390x_vx_linux64)
1873 (init_registers_s390x_tevx_linux64)
1874 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
1875 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
1876 declarations.
1877 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
1878 (s390_store_vxrs_high): New functions.
1879 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
1880 NT_S390_VXRS_HIGH.
1881 (s390_arch_setup): Add logic for selecting one of the new target
1882 descriptions. Activate the new vector regsets if applicable.
1883 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
1884 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
1885 and init_registers_s390x_tevx_linux64.
1886
c966a859
PA
18872015-03-01 Pedro Alves <palves@redhat.com>
1888
1889 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
1890 parameter.
1891
4180215b
PA
18922015-02-27 Pedro Alves <palves@redhat.com>
1893
1894 * linux-x86-low.c (u_debugreg_offset): New function.
1895 (x86_linux_dr_get, x86_linux_dr_set): Use it.
1896
749bab01
PA
18972015-02-27 Pedro Alves <palves@redhat.com>
1898
1899 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
1900 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
1901 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
1902 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
1903 (ps_lsetfpregs, ps_getpid)
1904 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
1905 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
1906 (ps_lsetxregs, ps_plog): Declare.
1907
3c14e5a3
PA
19082015-02-27 Pedro Alves <palves@redhat.com>
1909
1910 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
1911 IP_AGENT_EXPORT_FUNC.
1912 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
1913 IP_AGENT_EXPORT_FUNC.
1914 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
1915 (IP_AGENT_EXPORT): Delete.
1916 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
1917 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
1918 (gdb_trampoline_buffer_error, collecting, gdb_collect)
1919 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
1920 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
1921 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
1922 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
1923 (traceframe_read_count, traceframe_write_count)
1924 (traceframes_created, trace_state_variables, get_raw_reg)
1925 (get_trace_state_variable_value, set_trace_state_variable_value)
1926 (ust_loaded, helper_thread_id, cmd_buf): Use
1927 IPA_SYM_EXPORTED_NAME.
1928 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
1929 (tracepoints) Use IP_AGENT_EXPORT_VAR.
1930 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
1931 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
1932 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
1933 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
1934 EXTERN_C_PUSH/EXTERN_C_POP.
1935 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
1936 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
1937 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
1938 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
1939 (traceframe_write_count, traceframe_read_count)
1940 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
1941 (about_to_request_buffer_space, get_trace_state_variable_value)
1942 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
1943 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
1944 EXTERN_C_PUSH/EXTERN_C_POP.
1945 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
1946 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
1947 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
1948 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
1949 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
1950 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
1951 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
1952 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
1953 Define.
1954 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
1955 (IP_AGENT_EXPORT_VAR_DECL): Define.
1956 (tracing): Declare.
1957 (gdb_agent_get_raw_reg): Declare.
1958
fe978cb0
PA
19592015-02-27 Tom Tromey <tromey@redhat.com>
1960 Pedro Alves <palves@redhat.com>
1961
1962 Rename symbols whose names are reserved C++ keywords throughout.
1963
3bc3d82a
PA
19642015-02-27 Pedro Alves <palves@redhat.com>
1965
1966 * Makefile.in (COMPILER): New, get it from autoconf.
1967 (CXX): Get from autoconf instead.
1968 (COMPILE.pre): Use COMPILER.
1969 (CC-LD): Rename to ...
1970 (CC_LD): ... this. Use COMPILER.
1971 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
1972 (CXX_FOR_TARGET): Default to g++ instead of gcc.
1973 * acinclude.m4: Include build-with-cxx.m4.
1974 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
1975 Disable -Werror by default if building in C++ mode.
1976 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
1977 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
1978 the C++ compiler. Save/restore CXXFLAGS too.
1979 * configure: Regenerate.
1980
07697489
PA
19812015-02-27 Pedro Alves <palves@redhat.com>
1982
1983 * acinclude.m4: Include libiberty.m4.
1984 * configure.ac: Call libiberty_INIT.
1985 * config.in, configure: Regenerate.
1986
9beb7c4e
PA
19872015-02-26 Pedro Alves <palves@redhat.com>
1988
1989 * linux-low.c (linux_wait_1): When incrementing the PC past a
1990 program breakpoint always use the_low_target.breakpoint_len as
1991 increment, rather than the maximum between that and
1992 the_low_target.decr_pc_after_break.
1993
8090aef2
PA
19942015-02-23 Pedro Alves <palves@redhat.com>
1995
1996 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
1997 thread was doing a step-over; always adjust the PC if
1998 we stepped over a permanent breakpoint.
1999 (linux_wait_1): If we stepped over breakpoint that was on top of a
2000 permanent breakpoint, manually advance the PC past it.
2001
bc9540e8
PA
20022015-02-23 Pedro Alves <palves@redhat.com>
2003
2004 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
2005 modes.
2006 (x86_fill_gregset, x86_store_gregset): Use it when handling
2007 $orig_eax.
2008
2db9a427
PA
20092015-02-20 Pedro Alves <palves@redhat.com>
2010
2011 * thread-db.c: Include "nat/linux-procfs.h".
2012 (thread_db_init): Skip listing new threads if the kernel supports
2013 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
2014
afa8d396
PA
20152015-02-20 Pedro Alves <palves@redhat.com>
2016
2017 * linux-low.c (status_pending_p_callback): Use ptid_match.
2018
c9587f88
AT
20192015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
2020
2021 PR breakpoints/16812
2022 * linux-low.c (wstatus_maybe_breakpoint): Remove.
2023 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
2024 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
2025
b05ec7a5
AT
20262015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
2027
2028 PR breakpoints/15956
2029 * tracepoint.c (cmd_qtinit): Add check for current_thread.
2030
d33501a5
MM
20312015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2032
2033 * linux-low.c (linux_low_btrace_conf): Print size.
2034 * server.c (handle_btrace_conf_general_set): New.
2035 (hanle_general_set): Call handle_btrace_conf_general_set.
2036 (handle_query): Report Qbtrace-conf:bts:size as supported.
2037
f4abbc16
MM
20382015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2039
2040 * linux-low.c (linux_low_enable_btrace): Update parameters.
2041 (linux_low_btrace_conf): New.
2042 (linux_target_ops)<to_btrace_conf>: Initialize.
2043 * server.c (current_btrace_conf): New.
2044 (handle_btrace_enable): Rename to ...
2045 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
2046 to target_enable_btrace. Update comment. Update users.
2047 (handle_qxfer_btrace_conf): New.
2048 (qxfer_packets): Add btrace-conf entry.
2049 (handle_query): Report qXfer:btrace-conf:read as supported packet.
2050 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
2051 (target_ops)<read_btrace_conf>: New.
2052 (target_enable_btrace): Update parameters.
2053 (target_read_btrace_conf): New.
2054
043c3577
MM
20552015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2056
2057 * server.c (handle_btrace_general_set): Remove call to
2058 target_supports_btrace.
2059 (supported_btrace_packets): New.
2060 (handle_query): Call supported_btrace_packets.
2061 * target.h: include btrace-common.h.
2062 (btrace_target_info): Removed.
2063 (supports_btrace, target_supports_btrace): Update parameters.
2064
734b0e4b
MM
20652015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2066
2067 * Makefile.in (SFILES): Add common/btrace-common.c.
2068 (OBS): Add common/btrace-common.o.
2069 (btrace-common.o): Add build rules.
2070 * linux-low: Include btrace-common.h.
2071 (linux_low_read_btrace): Use struct btrace_data. Call
2072 btrace_data_init and btrace_data_fini.
2073
d6c146e9
PA
20742015-02-06 Pedro Alves <palves@redhat.com>
2075
2076 * thread-db.c (find_new_threads_callback): Add debug output.
2077
20ba1ce6
PA
20782015-02-04 Pedro Alves <palves@redhat.com>
2079
2080 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
2081 (resume_stopped_resumed_lwps): New function.
2082 (linux_wait_for_event_filtered): Use it.
2083
8cc73a39
SDJ
20842015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
2085
2086 * Makefile.in (SFILES): Add linux-personality.c.
2087 (linux-personality.o): New rule.
2088 * configure.srv (srv_linux_obj): Add linux-personality.o to the
2089 list of objects to be built.
2090 * linux-low.c: Include nat/linux-personality.h.
2091 (linux_create_inferior): Remove code to disable address space
2092 randomization (moved to ../nat/linux-personality.c). Create
2093 cleanup to disable address space randomization.
2094
fb23d554
SDJ
20952015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
2096
2097 * Makefile.in (posix-strerror.o): New rule.
2098 (mingw-strerror.o): Likewise.
2099 * configure: Regenerated.
2100 * configure.ac: Source file ../common/common.host. Initialize new
2101 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
2102
cdf43629
YQ
21032015-01-14 Yao Qi <yao@codesourcery.com>
2104
2105 * Makefile.in (SFILES): Add nat/ppc-linux.c.
2106 (ppc-linux.o): New rule.
2107 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
2108 * configure.ac: AC_CHECK_FUNCS(getauxval).
2109 * config.in: Re-generated.
2110 * configure: Re-generated.
2111 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
2112 ppc64_64bit_inferior_p
2113
514c5338
YQ
21142015-01-14 Yao Qi <yao@codesourcery.com>
2115
2116 * linux-ppc-low.c: Include "nat/ppc-linux.h".
2117 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
2118 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
2119 (PT_ORIG_R3, PT_TRAP): Likewise.
2120 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
2121 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
2122 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
2123
3368c1e5
JB
21242015-01-10 Joel Brobecker <brobecker@adacore.com>
2125
2126 * i387-fp.c (i387_cache_to_xsave): In look over
2127 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
2128 zmmh_low_space field by use of zmmh_high_space.
2129
582511be
PA
21302015-01-09 Pedro Alves <palves@redhat.com>
2131
2132 * linux-low.c (step_over_bkpt): Move higher up in the file.
2133 (handle_extended_wait): Don't store the stop_pc here.
2134 (get_stop_pc): Adjust comments and rename to ...
2135 (check_stopped_by_breakpoint): ... this. Record whether the LWP
2136 stopped for a software breakpoint or hardware breakpoint.
2137 (thread_still_has_status_pending_p): New function.
2138 (status_pending_p_callback): Use
2139 thread_still_has_status_pending_p. If the event is no longer
2140 interesting, resume the LWP.
2141 (handle_tracepoints): Add assert.
2142 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
2143 (wstatus_maybe_breakpoint): New function.
2144 (cancel_breakpoint): Delete function.
2145 (check_stopped_by_watchpoint): New function, factored out from
2146 linux_low_filter_event.
2147 (lp_status_maybe_breakpoint): Delete function.
2148 (linux_low_filter_event): Remove filter_ptid argument.
2149 Leave thread group exits pending here. Store the LWP's stop PC.
2150 Always leave events pending.
2151 (linux_wait_for_event_filtered): Pull all events out of the
2152 kernel, and leave them all pending.
2153 (count_events_callback, select_event_lwp_callback): Consider all
2154 events.
2155 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
2156 (select_event_lwp): Only give preference to the stepping LWP in
2157 all-stop mode. Adjust comments.
2158 (ignore_event): New function.
2159 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
2160 references to cancel_breakpoints. Adjust to renames. Also give
2161 equal priority to all LWPs that have had events in non-stop mode.
2162 If reporting a software breakpoint event, unadjust the LWP's PC.
2163 (linux_wait): If linux_wait_1 returned an ignored event, retry.
2164 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
2165 Adjust.
2166 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
2167 (resume_status_pending_p): Use thread_still_has_status_pending_p.
2168 (linux_stopped_by_watchpoint): Adjust.
2169 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
2170 * linux-low.h (enum lwp_stop_reason): New.
2171 (struct lwp_info) <stop_pc>: Adjust comment.
2172 <stopped_by_watchpoint>: Delete field.
2173 <stop_reason>: New field.
2174 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
2175 * mem-break.c (software_breakpoint_inserted_here)
2176 (hardware_breakpoint_inserted_here): New function.
2177 * mem-break.h (software_breakpoint_inserted_here)
2178 (hardware_breakpoint_inserted_here): Declare.
2179 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
2180 (cancel_breakpoints): Delete.
2181 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
2182 (upload_fast_traceframes): Remove references to
2183 cancel_breakpoints.
2184
a33e3959
PA
21852015-01-09 Pedro Alves <palves@redhat.com>
2186
2187 * thread-db.c (find_new_threads_callback): Ignore thread if the
2188 kernel thread ID is -1.
2189
8784d563
PA
21902015-01-09 Pedro Alves <palves@redhat.com>
2191
2192 * linux-low.c (linux_attach_fail_reason_string): Move to
2193 nat/linux-ptrace.c, and rename.
2194 (linux_attach_lwp): Update comment.
2195 (attach_proc_task_lwp_callback): New function.
2196 (linux_attach): Adjust to rename and use
2197 linux_proc_attach_tgid_threads.
2198 (linux_attach_fail_reason_string): Delete declaration.
2199
76f2b779
JB
22002015-01-01 Joel Brobecker <brobecker@adacore.com>
2201
2202 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
2203 * server.c (gdbserver_version): Likewise.
2204
fafcc06a
SDJ
22052014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
2206
2207 * remote-utils.c: Include ctype.h.
2208 (input_interrupt): Explicitly handle the case when the char
2209 received is the NUL byte. Improve the printing of non-ASCII
2210 characters.
2211
beed38b8
JB
22122014-12-16 Joel Brobecker <brobecker@adacore.com>
2213
2214 * linux-low.c (linux_low_filter_event): Update call to
2215 linux_enable_event_reporting following the addition of
2216 a new parameter to that function.
2217
bf330350
CU
22182014-12-16 Catalin Udma <catalin.udma@freescale.com>
2219
2220 PR server/17457
2221 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
2222 (AARCH64_FPCR_REGNO): Likewise.
2223 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
2224 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
2225 (aarch64_store_fpregset): Likewise.
2226
5227d625
JB
22272014-12-15 Joel Brobecker <brobecker@adacore.com>
2228
2229 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
2230 Remove FIXME comment about assumption about N.
2231
f93b65a0
JB
22322014-12-13 Joel Brobecker <brobecker@adacore.com>
2233
2234 * configure.ac: If large-file support is disabled in GDBserver,
2235 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
2236 * configure: Regenerate.
2237
e5a9158d
AA
22382014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2239
2240 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
2241 warning upon ENODATA from ptrace.
2242 * linux-s390-low.c (s390_store_tdb): New.
2243 (s390_regsets): Add regset for NT_S390_TDB.
2244
feea5f36
AA
22452014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2246
2247 * linux-low.c (regsets_store_inferior_registers): Skip regsets
2248 without a fill_function.
2249 * linux-s390-low.c (s390_fill_last_break): Remove.
2250 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
2251 (s390_arch_setup): Use regset's size instead of fill_function for
2252 loop end condition.
2253
098dbe61
AA
22542014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2255
2256 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
2257 the regset's store function when ptrace returned an error.
2258 * regcache.c (get_thread_regcache): Invalidate register cache
2259 before fetching inferior's registers.
2260
28eef672
AA
22612014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2262
2263 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
2264 while-loop as for-loop.
2265 (regsets_store_inferior_registers): Likewise.
2266
bdca27a2
YQ
22672014-11-28 Yao Qi <yao@codesourcery.com>
2268
2269 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
2270 * config.in, configure: Re-generate.
2271 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
2272 is defined.
2273
9c232dda
YQ
22742014-11-21 Yao Qi <yao@codesourcery.com>
2275
2276 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
2277 (AC_CHECK_HEADERS): Remove malloc.h.
2278 * configure: Re-generated.
2279 * config.in: Re-generated.
2280 * server.h: Don't include alloca.h and malloc.h.
2281 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
2282 Don't include malloc.h.
2283
43968415
JB
22842014-11-17 Joel Brobecker <brobecker@adacore.com>
2285
2286 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
2287 corresponding ERRNO check in same block.
2288
40e91bc7
PA
22892014-11-12 Pedro Alves <palves@redhat.com>
2290
2291 * server.c (cont_thread): Update comment.
2292 (start_inferior, attach_inferior): No longer clear cont_thread.
2293 (handle_v_cont): No longer set cont_thread.
2294 (captured_main): Clear cont_thread each time a GDB connects.
2295
c2c118cf
PA
22962014-11-12 Pedro Alves <palves@redhat.com>
2297
2298 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
2299 thread, and don't resume all threads if the Hc thread has exited.
2300
78708b7c
PA
23012014-11-12 Pedro Alves <palves@redhat.com>
2302
2303 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
2304 the process group instead of to a specific LWP.
2305
a2abc7de
PA
23062014-10-15 Pedro Alves <palves@redhat.com>
2307
2308 PR server/17487
2309 * win32-arm-low.c (arm_set_thread_context): Remove current_event
2310 parameter.
2311 (arm_set_thread_context): Delete.
2312 (the_low_target): Adjust.
2313 * win32-i386-low.c (debug_registers_changed)
2314 (debug_registers_used): Delete.
2315 (update_debug_registers_callback): New function.
2316 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
2317 needing to update their debug registers.
2318 (win32_get_current_dr): New function.
2319 (x86_dr_low_get_addr, x86_dr_low_get_control)
2320 (x86_dr_low_get_status): Fetch the debug register from the thread
2321 record's context.
2322 (i386_initial_stuff): Adjust.
2323 (i386_get_thread_context): Remove current_event parameter. Don't
2324 clear debug_registers_changed nor copy DR values to
2325 debug_reg_state.
2326 (i386_set_thread_context): Delete.
2327 (i386_prepare_to_resume): New function.
2328 (i386_thread_added): Mark the thread as needing to update irs
2329 debug registers.
2330 (the_low_target): Remove i386_set_thread_context and install
2331 i386_prepare_to_resume.
2332 * win32-low.c (win32_get_thread_context): Adjust.
2333 (win32_set_thread_context): Use SetThreadContext
2334 directly.
2335 (win32_prepare_to_resume): New function.
2336 (win32_require_context): New function, factored out from ...
2337 (thread_rec): ... this.
2338 (continue_one_thread): Call win32_prepare_to_resume on each thread
2339 we're about to continue.
2340 (win32_resume): Call win32_prepare_to_resume on the event thread.
2341 * win32-low.h (struct win32_thread_info)
2342 <debug_registers_changed>: New field.
2343 (struct win32_target_ops): Change prototype of set_thread_context,
2344 delete set_thread_context and add prepare_to_resume.
2345 (win32_require_context): New declaration.
2346
a442d071
GB
23472014-10-08 Gary Benson <gbenson@redhat.com>
2348
2349 * server.h: Do not include common-exceptions.h.
2350
6f1947e8
GB
23512014-10-08 Gary Benson <gbenson@redhat.com>
2352
2353 * server.h: Do not include cleanups.h.
2354
63b434a4
JH
23552014-09-30 James Hogan <james.hogan@imgtec.com>
2356
2357 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
2358 mips64-dsp-linux.c.
2359
c4d9ceb6
YQ
23602014-09-23 Yao Qi <yao@codesourcery.com>
2361
2362 * linux-low.c (lp_status_maybe_breakpoint): New function.
2363 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
2364 (count_events_callback): Likewise.
2365 (select_event_lwp_callback): Likewise.
2366 (cancel_breakpoints_callback): Likewise.
2367
89a5711c
DB
23682014-09-19 Don Breazeal <donb@codesourcery.com>
2369
2370 * linux-low.c (handle_extended_wait): Call
2371 linux_ptrace_get_extended_event.
2372 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
2373 linux_is_extended_waitstatus.
2374
bffc0964
JB
23752014-09-16 Joel Brobecker <brobecker@adacore.com>
2376
2377 * Makefile.in (CPPFLAGS): Define.
2378 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
2379 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
2380
0bfdf32f
GB
23812014-09-16 Gary Benson <gbenson@redhat.com>
2382
2383 * inferiors.h (current_inferior): Renamed as...
2384 (current_thread): New variable. All uses updated.
2385 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
2386 (maybe_move_out_of_jump_pad): Likewise.
2387 (cancel_breakpoint): Likewise.
2388 (linux_low_filter_event): Likewise.
2389 (wait_for_sigstop): Likewise.
2390 (linux_resume_one_lwp): Likewise.
2391 (need_step_over_p): Likewise.
2392 (start_step_over): Likewise.
2393 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
2394 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
2395 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
2396 and save_inferior as saved_thread.
2397 * regcache.c (get_thread_regcache): Renamed saved_inferior as
2398 saved_thread.
2399 (regcache_invalidate_thread): Likewise.
2400 * remote-utils.c (prepare_resume_reply): Likewise.
2401 * thread-db.c (thread_db_get_tls_address): Likewise.
2402 (disable_thread_event_reporting): Likewise.
2403 (remove_thread_event_breakpoints): Likewise.
2404 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
2405 as saved_thread.
2406 * target.h (set_desired_inferior): Renamed as...
2407 (set_desired_thread): New declaration. All uses updated.
2408 * server.c (myresume): Updated comment to reference thread instead
2409 of inferior.
2410 (handle_serial_event): Likewise.
2411 (handle_target_event): Likewise.
2412
361c8ade
GB
24132014-09-12 Tom Tromey <tromey@redhat.com>
2414 Gary Benson <gbenson@redhat.com>
2415
2416 * regcache.h: Include common-regcache.h.
2417 (regcache_read_pc): Don't declare.
2418 * regcache.c (get_thread_regcache_for_ptid): New function.
2419
bd9269f7
GB
24202014-09-11 Tom Tromey <tromey@redhat.com>
2421 Gary Benson <gbenson@redhat.com>
2422
2423 * symbol.c: New file.
2424 * Makefile.in (SFILES): Add symbol.c.
2425 (OBS): Add symbol.o.
2426
f8c1d06b
GB
24272014-09-11 Gary Benson <gbenson@redhat.com>
2428
2429 * target.c (target_stop_ptid, target_continue_ptid): New
2430 functions.
2431
721ec300
GB
24322014-09-11 Tom Tromey <tromey@redhat.com>
2433 Gary Benson <gbenson@redhat.com>
2434
2435 * target.h: Include target/target.h.
2436 * target.c (target_read_memory, target_read_uint32)
2437 (target_write_memory): New functions.
2438
c5e92cca
GB
24392014-09-11 Gary Benson <gbenson@redhat.com>
2440
2441 * server.h (debug_hw_points): Don't declare.
2442 * server.c (debug_hw_points): Don't define. Replace all uses
2443 with show_debug_regs.
2444 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
2445 all uses with show_debug_regs.
2446
2e4bb98a
EBM
24472014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
2448
2449 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
2450 endianness into account.
2451 (ppc_supply_ptrace_register): Likewise.
2452
ac740bc7
JH
24532014-09-03 James Hogan <james.hogan@imgtec.com>
2454
2455 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
2456 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
2457
97ea6506
GB
24582014-09-03 Gary Benson <gbenson@redhat.com>
2459
2460 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
2461 ALL_DEBUG_ADDRESS_REGISTERS.
2462
df7e5265
GB
24632014-09-02 Gary Benson <gbenson@redhat.com>
2464
2465 * i386-low.h: Renamed as...
2466 * x86-low.h: New file. All type, function and variable name
2467 prefixes changed from "i386_" to "x86_". All references updated.
2468 * i386-low.c: Renamed as...
2469 * x86-low.c: New file. All type, function and variable name
2470 prefixes changed from "i386_" to "x86_". All references updated.
2471
ed859da7
GB
24722014-09-02 Gary Benson <gbenson@redhat.com>
2473
2474 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
2475 (x86_linux_new_thread): Likewise.
2476
860789c7
GB
24772014-08-29 Gary Benson <gbenson@redhat.com>
2478
2479 * server.h (setjmp.h): Do not include.
2480 (toplevel): Do not declare.
2481 (common-exceptions.h): Include.
2482 (cleanups.h): Likewise.
2483 * server.c (toplevel): Do not define.
2484 (exit_code): New static global.
2485 (detach_or_kill_for_exit_cleanup): New function.
2486 (main): New function. Original main renamed to...
2487 (captured_main): New function.
2488 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
2489
ff55e1b5
GB
24902014-08-29 Gary Benson <gbenson@redhat.com>
2491
2492 * Makefile.in (SFILES): Add common/common-exceptions.c.
2493 (OBS): Add common-exceptions.o.
2494 (common-exceptions.o): New rule.
2495 * utils.c (prepare_to_throw_exception): New function.
2496
e9bcb658
GB
24972014-08-29 Gary Benson <gbenson@redhat.com>
2498
2499 * config.in: Regenerate.
2500 * configure: Likewise.
2501
e3180625
GB
25022014-08-29 Gary Benson <gbenson@redhat.com>
2503
2504 * Makefile.in (SFILES): Add common/cleanups.c.
2505 (OBS): cleanups.o.
2506 (cleanups.o): New rule.
2507
e3d6ba5d
GB
25082014-08-29 Gary Benson <gbenson@redhat.com>
2509
2510 * utils.c (internal_vwarning): New function.
2511
7096e886
GB
25122014-08-28 Gary Benson <gbenson@redhat.com>
2513
2514 * utils.h (fatal): Remove declaration.
2515 * utils.c (fatal): Remove function.
2516
14ce3192
GB
25172014-08-28 Gary Benson <gbenson@redhat.com>
2518
2519 * tracepoint.c (gdb_agent_init): Replace fatal with
2520 perror_with_name.
2521 (initialize_tracepoint): Likewise.
2522
50278d59
GB
25232014-08-28 Gary Benson <gbenson@redhat.com>
2524
2525 * remote-utils.c (remote_prepare): Replace fatal with error.
2526
aa96c426
GB
25272014-08-28 Gary Benson <gbenson@redhat.com>
2528
2529 * linux-low.c (linux_async): Replace fatal with warning.
2530 Tidy up and return.
2531 (linux_start_non_stop): Return -1 if linux_async failed.
2532
f7160e97
GB
25332014-08-28 Gary Benson <gbenson@redhat.com>
2534
2535 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
2536 gdb_assert.
2537 (i386_dr_low_get_addr): Remove vague comment.
2538 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
2539 gdb_assert.
2540
38e08fca
GB
25412014-08-28 Gary Benson <gbenson@redhat.com>
2542
2543 * inferiors.c (get_thread_process): Replace check with gdb_assert.
2544 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
2545 internal_error.
2546 (linux_resume_one_lwp): Likewise.
2547 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
2548 gdb_assert.
2549 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
2550 with internal_error.
2551 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
2552 (init_register_cache): Replace fatal with gdb_assert_not_reached.
2553 (find_register_by_name): Replace fatal with internal_error.
2554 (find_regno): Likewise.
2555 * tdesc.c (init_target_desc): Replace check with gdb_assert.
2556 * thread-db.c (thread_db_create_event): Likewise.
2557 (thread_db_load_search): Likewise.
2558 (try_thread_db_load_1): Likewise.
2559 * tracepoint.c (get_jump_space_head): Replace fatal with
2560 internal_error.
2561 (claim_trampoline_space): Likewise.
2562 (have_fast_tracepoint_trampoline_buffer): Likewise.
2563 (cmd_qtstart): Likewise.
2564 (stop_tracing): Likewise.
2565 (fast_tracepoint_collecting): Likewise.
2566 (target_malloc): Likewise.
2567 (download_tracepoint): Likewise.
2568 (download_trace_state_variables): Replace check with gdb_assert.
2569 (upload_fast_traceframes): Replace fatal with internal_error.
2570
34abf635
GB
25712014-08-19 Tom Tromey <tromey@redhat.com>
2572 Gary Benson <gbenson@redhat.com>
2573
2574 * Makefile.in (SFILES): Add common/common-debug.c.
2575 (OBS): Add common-debug.o.
2576 (common-debug.o): New rule.
2577 * debug.h (debug_printf): Don't declare.
2578 * debug.c (debug_printf): Renamed and rewritten as...
2579 (debug_vprintf): New function.
2580
f6e94d78
GB
25812014-08-19 Gary Benson <gbenson@redhat.com>
2582
2583 * utils.h: Do not include print-utils.h.
2584
9239eeab
GB
25852014-08-19 Tom Tromey <tromey@redhat.com>
2586 Gary Benson <gbenson@redhat.com>
2587
2588 * server.h: Add static assertion.
2589 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
2590
ef87c8bb
GB
25912014-08-19 Tom Tromey <tromey@redhat.com>
2592 Gary Benson <gbenson@redhat.com>
2593
2594 * Makefile.in (SFILES): Add common/errors.c.
2595 (OBS): Add errors.o.
2596 (IPA_OBS): Add errors-ipa.o.
2597 (errors.o): New rule.
2598 (errors-ipa.o): Likewise.
2599 * utils.h (perror_with_name, error, warning): Don't declare.
2600 * utils.c (warning): Renamed and rewritten as...
2601 (vwarning): New function.
2602 (error): Renamed and rewritten as...
2603 (verror): New function.
2604 (internal_error): Renamed and rewritten as...
2605 (internal_verror): New function.
2606
bb974a24
GB
26072014-08-07 Gary Benson <gbenson@redhat.com>
2608
2609 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
2610 * configure: Regenerate.
2611 * config.in: Likewise.
2612 * server.h: Do not include errno.h.
2613 * event-loop.c: Likewise.
2614 * hostio-errno.c: Likewise.
2615 * linux-low.c: Likewise.
2616 * remote-utils.c: Likewise.
2617 * spu-low.c: Likewise.
2618 * utils.c: Likewise.
2619 * gdbreplay.c: Unconditionally include errno.h.
2620
6d3d12eb
GB
26212014-08-07 Gary Benson <gbenson@redhat.com>
2622
2623 * server.h: Do not include string.h.
2624 * event-loop.c: Likewise.
2625 * linux-low.c: Likewise.
2626 * regcache.c: Likewise.
2627 * remote-utils.c: Likewise.
2628 * spu-low.c: Likewise.
2629 * utils.c: Likewise.
2630
dccbb609
GB
26312014-08-07 Gary Benson <gbenson@redhat.com>
2632
2633 * server.h: Do not include gdb_assert.h.
2634
e76df0d0
GB
26352014-08-07 Gary Benson <gbenson@redhat.com>
2636
2637 * server.h: Do not include common-utils.h.
2638
4cb9c816
GB
26392014-08-07 Gary Benson <gbenson@redhat.com>
2640
2641 * server.h: Do not include ptid.h.
2642 * notif.h: Likewise.
2643
3995eeee
GB
26442014-08-07 Gary Benson <gbenson@redhat.com>
2645
2646 * server.h: Do not include gdb_locale.h.
2647
cb9f1a9b
GB
26482014-08-07 Gary Benson <gbenson@redhat.com>
2649
2650 * server.h: Do not include gdb/signals.h.
2651 * win32-low.c: Likewise.
2652
a5fceff8
GB
26532014-08-07 Gary Benson <gbenson@redhat.com>
2654
2655 * server.h: Do not include pathmax.h.
2656
b9391142
GB
26572014-08-07 Gary Benson <gbenson@redhat.com>
2658
2659 * server.h: Do not include libiberty.h.
2660 * linux-bfin-low.c: Likewise.
2661
0e443c87
GB
26622014-08-07 Gary Benson <gbenson@redhat.com>
2663
2664 * server.h: Do not include ansidecl.h.
2665
8ebb3f56
GB
26662014-08-07 Gary Benson <gbenson@redhat.com>
2667
2668 * linux-x86-low.c: Do not include stddef.h.
2669 * lynx-ppc-low.c: Likewise.
2670 * tracepoint.c: Likewise.
2671
8980bdf6
GB
26722014-08-07 Gary Benson <gbenson@redhat.com>
2673
2674 * server.h: Do not include stdarg.h.
2675 * nto-low.c: Likewise.
2676
d7096f71
GB
26772014-08-07 Gary Benson <gbenson@redhat.com>
2678
2679 * server.h: Do not include stdlib.h.
2680 * inferiors.c: Likewise.
2681 * linux-low.c: Likewise.
2682 * regcache.c: Likewise.
2683 * spu-low.c: Likewise.
2684 * tracepoint.c: Likewise.
2685 * utils.c: Likewise.
2686
d02f550d
GB
26872014-08-07 Gary Benson <gbenson@redhat.com>
2688
2689 * server.h: Do not include stdio.h.
2690 * linux-low.c: Likewise.
2691 * remote-utils.c: Likewise.
2692 * spu-low.c: Likewise.
2693 * utils.c: Likewise.
2694 * wincecompat.c: Likewise.
2695
87f6c4e3
GB
26962014-08-06 Gary Benson <gbenson@redhat.com>
2697
2698 * regcache.c (init_register_cache): Move conditionals inside if.
2699
7089dca4
GB
27002014-08-06 Gary Benson <gbenson@redhat.com>
2701
2702 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
2703
462f517e
GB
27042014-07-31 Gary Benson <gbenson@redhat.com>
2705
2706 * ax.h: Do not include server.h.
2707 * gdbthread.h: Likewise.
2708 * lynx-low.h: Likewise.
2709 * notif.h: Likewise.
2710
976411d6
GB
27112014-07-30 Gary Benson <gbenson@redhat.com>
2712
2713 * server.h: Include common-defs.h.
2714 Do not include config.h or build-gnulib-gdbserver/config.h.
2715
d41f6d8e
GB
27162014-07-30 Gary Benson <gbenson@redhat.com>
2717
2718 * hostio-errno.c: Move server.h to top of includes list.
2719 * inferiors.c: Likewise.
2720 * linux-x86-low.c: Likewise.
2721 * notif.c: Include server.h.
2722
314c6a35
TT
27232014-07-24 Tom Tromey <tromey@redhat.com>
2724 Gary Benson <gbenson@redhat.com>
2725
2726 * server.h (CORE_ADDR): Now unsigned.
2727
69ff6be5
PA
27282014-07-16 Pedro Alves <palves@redhat.com>
2729
2730 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
2731
ce9e3fe7
PA
27322014-07-15 Pedro Alves <palves@redhat.com>
2733
2734 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
2735 copy.
2736
e76126e8
PA
27372014-07-11 Pedro Alves <palves@redhat.com>
2738
2739 * linux-low.c (kill_wait_lwp): New function, based on
2740 kill_one_lwp_callback, but use my_waitpid directly.
2741 (kill_one_lwp_callback, linux_kill): Use it.
2742
8e9db26e
PA
27432014-06-23 Pedro Alves <palves@redhat.com>
2744
2745 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
2746 before setting DR0..DR3.
2747
698b3e08
GB
27482014-06-20 Gary Benson <gbenson@redhat.com>
2749
2750 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
2751 * configure: Regenerated.
2752 * config.in: Likewise.
2753
125f8a3d
GB
27542014-06-20 Gary Benson <gbenson@redhat.com>
2755
2756 * Makefile.in (SFILES): Update locations for files moved
2757 from common to nat.
2758 (object file files): Reordered.
2759
42995dbd
GB
27602014-06-20 Gary Benson <gbenson@redhat.com>
2761
2762 * i386-low.h (i386_dr_low_can_set_addr): Removed.
2763 (i386_dr_low_set_addr): Likewise.
2764 (i386_dr_low_get_addr): Likewise.
2765 (i386_dr_low_can_set_control): Likewise.
2766 (i386_dr_low_set_control): Likewise.
2767 (i386_dr_low_get_control): Likewise.
2768 (i386_dr_low_get_status): Likewise.
2769 (i386_get_debug_register_length): Likewise.
2770 * linux-x86-low.c (i386_dr_low_set_addr):
2771 Changed signature. Made static.
2772 (i386_dr_low_get_addr): Likewise.
2773 (i386_dr_low_set_control): Likewise.
2774 (i386_dr_low_get_control): Likewise.
2775 (i386_dr_low_get_status): Likewise.
2776 (i386_dr_low): New global variable.
2777 * win32-i386-low.c (i386_dr_low_set_addr):
2778 Changed signature. Made static.
2779 (i386_dr_low_get_addr): Likewise.
2780 (i386_dr_low_set_control): Likewise.
2781 (i386_dr_low_get_control): Likewise.
2782 (i386_dr_low_get_status): Likewise.
2783 (i386_dr_low): New global variable.
2784
e1d2394b
MS
27852014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
2786
2787 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
2788 * Makefile.in (AR, AR_FLAGS): Define.
2789 * configure: Regenerate.
2790
3a8ee006
GB
27912014-06-19 Gary Benson <gbenson@redhat.com>
2792
2793 * Makefile.in (i386-dregs.o): New rule.
2794 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
2795 * i386-low.c (target.h): Remove include.
2796 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
2797 (DR_CONTROL_SHIFT): Likewise.
2798 (DR_CONTROL_SIZE): Likewise.
2799 (DR_RW_EXECUTE): Likewise.
2800 (DR_RW_WRITE): Likewise.
2801 (DR_RW_READ): Likewise.
2802 (DR_RW_IORW): Likewise.
2803 (DR_LEN_1): Likewise.
2804 (DR_LEN_2): Likewise.
2805 (DR_LEN_4): Likewise.
2806 (DR_LEN_8): Likewise.
2807 (DR_LOCAL_ENABLE_SHIFT): Likewise.
2808 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
2809 (DR_ENABLE_SIZE): Likewise.
2810 (DR_LOCAL_SLOWDOWN): Likewise.
2811 (DR_GLOBAL_SLOWDOWN): Likewise.
2812 (DR_CONTROL_RESERVED): Likewise.
2813 (I386_DR_CONTROL_MASK): Likewise.
2814 (I386_DR_VACANT): Likewise.
2815 (I386_DR_LOCAL_ENABLE): Likewise.
2816 (I386_DR_GLOBAL_ENABLE): Likewise.
2817 (I386_DR_DISABLE): Likewise.
2818 (I386_DR_SET_RW_LEN): Likewise.
2819 (I386_DR_GET_RW_LEN): Likewise.
2820 (I386_DR_WATCH_HIT): Likewise.
2821 (i386_wp_op_t): Likewise.
2822 (i386_show_dr): Likewise.
2823 (i386_length_and_rw_bits): Likewise.
2824 (i386_insert_aligned_watchpoint): Likewise.
2825 (i386_remove_aligned_watchpoint): Likewise.
2826 (i386_handle_nonaligned_watchpoint): Likewise.
2827 i386_update_inferior_debug_regs(): Likewise.
2828 (i386_dr_insert_watchpoint): Likewise.
2829 (i386_dr_remove_watchpoint): Likewise.
2830 (i386_dr_region_ok_for_watchpoint): Likewise.
2831 (i386_dr_stopped_data_address): Likewise.
2832 (i386_dr_stopped_by_watchpoint): Likewise.
2833
8f26655c
GB
28342014-06-19 Gary Benson <gbenson@redhat.com>
2835
2836 * i386-low.c (i386_dr_show): Renamed to
2837 i386_show_dr and made static. All uses updated.
2838 (i386_dr_length_and_rw_bits): Renamed to
2839 i386_length_and_rw_bits and made static.
2840 All uses updated.
2841 (i386_dr_insert_aligned_watchpoint): Renamed to
2842 i386_insert_aligned_watchpoint and made static.
2843 All uses updated.
2844 (i386_dr_remove_aligned_watchpoint): Renamed to
2845 i386_remove_aligned_watchpoint and made static.
2846 All uses updated.
2847 (i386_dr_update_inferior_debug_regs): Renamed to
2848 i386_update_inferior_debug_regs and made static.
2849 All uses updated.
2850
b9228891
GB
28512014-06-18 Gary Benson <gbenson@redhat.com>
2852
5171def3
GB
2853 * i386-low.h (i386_dr_low_can_set_addr): New macro.
2854 (i386_dr_low_can_set_control): Likewise.
2855 (i386_get_debug_register_length): Likewise.
2856 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
2857 (i386_dr_low_can_set_control): Likewise.
2858 (i386_get_debug_register_length): Likewise.
2859
28602014-06-17 Gary Benson <gbenson@redhat.com>
2861
b9228891
GB
2862 * i386-low.h (i386-dregs.h): New include.
2863 (DR_FIRSTADDR): Now in i386-dregs.h.
2864 (DR_LASTADDR): Likewise.
2865 (DR_NADDR): Likewise.
2866 (DR_STATUS): Likewise.
2867 (DR_CONTROL): Likewise.
2868 (i386_debug_reg_state): Likewise.
2869 (i386_dr_insert_watchpoint): Likewise.
2870 (i386_dr_remove_watchpoint): Likewise.
2871 (i386_dr_region_ok_for_watchpoint): Likewise.
2872 (i386_dr_stopped_data_address): Likewise.
2873 (i386_dr_stopped_by_watchpoint): Likewise.
2874 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
2875
4be83cc2
GB
28762014-06-18 Gary Benson <gbenson@redhat.com>
2877
2878 * i386-low.h (i386_low_insert_watchpoint): Renamed to
2879 i386_dr_insert_watchpoint.
2880 (i386_low_remove_watchpoint): Renamed to
2881 i386_dr_remove_watchpoint.
2882 (i386_low_region_ok_for_watchpoint): Renamed to
2883 i386_dr_region_ok_for_watchpoint.
2884 (i386_low_stopped_data_address): Renamed to
2885 i386_dr_stopped_data_address.
2886 (i386_low_stopped_by_watchpoint): Renamed to
2887 i386_dr_stopped_by_watchpoint.
2888 * i386-low.c (i386_show_dr): Renamed to
2889 i386_dr_show and made nonstatic. All uses updated.
2890 (i386_length_and_rw_bits): Renamed to
2891 i386_dr_length_and_rw_bits and made nonstatic.
2892 All uses updated.
2893 (i386_insert_aligned_watchpoint): Renamed to
2894 i386_dr_insert_aligned_watchpoint and made nonstatic.
2895 All uses updated.
2896 (i386_remove_aligned_watchpoint): Renamed to
2897 i386_dr_remove_aligned_watchpoint and made nonstatic.
2898 All uses updated.
2899 (i386_update_inferior_debug_regs): Renamed to
2900 i386_dr_update_inferior_debug_regs and made nonstatic.
2901 All uses updated.
2902 (i386_low_insert_watchpoint): Renamed to
2903 i386_dr_insert_watchpoint. All uses updated.
2904 (i386_low_remove_watchpoint): Renamed to
2905 i386_dr_remove_watchpoint. All uses updated.
2906 (i386_low_region_ok_for_watchpoint): Renamed to
2907 i386_dr_region_ok_for_watchpoint. All uses updated.
2908 (i386_low_stopped_data_address): Renamed to
2909 i386_dr_stopped_data_address. All uses updated.
2910 (i386_low_stopped_by_watchpoint): Renamed to
2911 i386_dr_stopped_by_watchpoint. All uses updated.
2912
131aa0d4
GB
29132014-06-18 Gary Benson <gbenson@redhat.com>
2914
2915 * i386-low.c (i386_dr_low_can_set_addr): New macro.
2916 (i386_dr_low_can_set_control): Likewise.
2917 (i386_insert_aligned_watchpoint): New check.
2918
d9305f7f
GB
29192014-06-18 Gary Benson <gbenson@redhat.com>
2920
2921 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
2922 Renamed to state.
2923
e927c9fc
GB
29242014-06-18 Gary Benson <gbenson@redhat.com>
2925
2926 * i386-low.c (i386_length_and_rw_bits): Use internal_error
2927 instead of fatal and error.
2928 (i386_handle_nonaligned_watchpoint): Likewise.
2929
1b6d4134
GB
29302014-06-18 Gary Benson <gbenson@redhat.com>
2931
2932 * i386-low.c (i386_get_debug_register_length): New macro.
2933 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
2934 (i386_show_dr): Use debug_printf instead of fprintf. Use
2935 phex to format values.
2936
6e62758f
GB
29372014-06-18 Gary Benson <gbenson@redhat.com>
2938
2939 * i386-low.h: Comment changes.
2940 * i386-low.c: Likewise.
2941
fc6e2f03
GB
29422014-06-18 Gary Benson <gbenson@redhat.com>
2943
2944 * i386-low.c: Whitespace changes.
2945
f9d1eeed
TT
29462014-06-12 Tom Tromey <tromey@redhat.com>
2947
2948 * utils.c (freeargv): Remove.
2949
0b04e523
TT
29502014-06-12 Tom Tromey <tromey@redhat.com>
2951
2952 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
2953 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
2954 (parse_debug_format_options): Likewise.
2955 (gdbserver_usage): Likewise.
2956 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
2957 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
2958 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
2959 against libiberty.
2960 ($(LIBGNU)): Depend on libiberty.
2961 (all-lib): Recurse into all subdirs.
2962 (install-only): Invoke "install" target in subdirs.
2963 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
2964 targets.
2965 * configure: Rebuild.
2966 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
2967 for vasprintf, vsnprintf, or gettimeofday.
2968 * configure.srv: Don't add safe-ctype.o or lbasename.o to
2969 srv_tgtobj.
2970
270c9937
JB
29712014-06-05 Joel Brobecker <brobecker@adacore.com>
2972
2973 * development.sh: Delete.
2974 * Makefile.in (config.status): Adjust dependency on development.sh.
2975 * configure.ac: Adjust development.sh source call.
2976 * configure: Regenerate.
2977
0a261ed8
PA
29782014-06-02 Pedro Alves <palves@redhat.com>
2979
2980 * ax.c (gdb_free_agent_expr): New function.
2981 * ax.h (gdb_free_agent_expr): New declaration.
2982 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
2983 list.
2984 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
2985 static.
2986 (clear_breakpoint_conditions_and_commands): New function.
2987 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
2988 (clear_breakpoint_conditions_and_commands): New declaration.
2989
e9dae05e
RR
29902014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
2991
2992 * linux-aarch64-low.c (asm/ptrace.h): Include.
2993
5876f503
JK
29942014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
2995
2996 Fix TLS access for -static -pthread.
2997 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
2998 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
2999 (thread_db_load_search, try_thread_db_load_1): Initialize it.
3000
802e8e6d
PA
30012014-05-20 Pedro Alves <palves@redhat.com>
3002
3003 * linux-aarch64-low.c (aarch64_insert_point)
3004 (aarch64_remove_point): No longer check whether the type is
3005 supported here. Adjust to new interface.
3006 (the_low_target): Install aarch64_supports_z_point_type as
3007 supports_z_point_type method.
3008 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
3009 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
3010 instead of a Z packet char. Adjust.
3011 (arm_supports_z_point_type): New function.
3012 (arm_insert_point, arm_remove_point): Adjust to new interface.
3013 (the_low_target): Install arm_supports_z_point_type.
3014 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
3015 (cris_insert_point, cris_remove_point): Adjust to new interface.
3016 Don't check whether the type is supported here.
3017 (the_low_target): Install cris_supports_z_point_type.
3018 * linux-low.c (linux_supports_z_point_type): New function.
3019 (linux_insert_point, linux_remove_point): Adjust to new interface.
3020 * linux-low.h (struct linux_target_ops) <insert_point,
3021 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
3022 raw_breakpoint pointer parameter.
3023 <supports_z_point_type>: New method.
3024 * linux-mips-low.c (mips_supports_z_point_type): New function.
3025 (mips_insert_point, mips_remove_point): Adjust to new interface.
3026 Use mips_supports_z_point_type.
3027 (the_low_target): Install mips_supports_z_point_type.
3028 * linux-ppc-low.c (the_low_target): Install NULL as
3029 supports_z_point_type method.
3030 * linux-s390-low.c (the_low_target): Install NULL as
3031 supports_z_point_type method.
3032 * linux-sparc-low.c (the_low_target): Install NULL as
3033 supports_z_point_type method.
3034 * linux-x86-low.c (x86_supports_z_point_type): New function.
3035 (x86_insert_point): Adjust to new insert_point interface. Use
3036 insert_memory_breakpoint. Adjust to new
3037 i386_low_insert_watchpoint interface.
3038 (x86_remove_point): Adjust to remove_point interface. Use
3039 remove_memory_breakpoint. Adjust to new
3040 i386_low_remove_watchpoint interface.
3041 (the_low_target): Install x86_supports_z_point_type.
3042 * lynx-low.c (lynx_target_ops): Install NULL as
3043 supports_z_point_type callback.
3044 * nto-low.c (nto_supports_z_point_type): New.
3045 (nto_insert_point, nto_remove_point): Adjust to new interface.
3046 (nto_target_ops): Install nto_supports_z_point_type.
3047 * mem-break.c: Adjust intro comment.
3048 (struct raw_breakpoint) <raw_type, size>: New fields.
3049 <inserted>: Update comment.
3050 <shlib_disabled>: Delete field.
3051 (enum bkpt_type) <gdb_breakpoint>: Delete value.
3052 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
3053 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
3054 (raw_bkpt_type_to_target_hw_bp_type): New function.
3055 (find_enabled_raw_code_breakpoint_at): New function.
3056 (find_raw_breakpoint_at): New type and size parameters. Use them.
3057 (insert_memory_breakpoint): New function, based off
3058 set_raw_breakpoint_at.
3059 (remove_memory_breakpoint): New function.
3060 (set_raw_breakpoint_at): Reimplement.
3061 (set_breakpoint): New, based on set_breakpoint_at.
3062 (set_breakpoint_at): Reimplement.
3063 (delete_raw_breakpoint): Go through the_target->remove_point
3064 instead of assuming memory breakpoints.
3065 (find_gdb_breakpoint_at): Delete.
3066 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
3067 (find_gdb_breakpoint): New function.
3068 (set_gdb_breakpoint_at): Delete.
3069 (z_type_supported): New function.
3070 (set_gdb_breakpoint_1): New function, loosely based off
3071 set_gdb_breakpoint_at.
3072 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
3073 (delete_gdb_breakpoint_at): Delete.
3074 (delete_gdb_breakpoint_1): New function, loosely based off
3075 delete_gdb_breakpoint_at.
3076 (delete_gdb_breakpoint): New function.
3077 (clear_gdb_breakpoint_conditions): Rename to ...
3078 (clear_breakpoint_conditions): ... this. Don't handle a NULL
3079 breakpoint.
3080 (add_condition_to_breakpoint): Make static.
3081 (add_breakpoint_condition): Take a struct breakpoint pointer
3082 instead of an address. Adjust.
3083 (gdb_condition_true_at_breakpoint): Rename to ...
3084 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
3085 z_type parameter.
3086 (gdb_condition_true_at_breakpoint): Reimplement.
3087 (add_breakpoint_commands): Take a struct breakpoint pointer
3088 instead of an address. Adjust.
3089 (gdb_no_commands_at_breakpoint): Rename to ...
3090 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
3091 parameter. Return true if no breakpoint was found. Change debug
3092 output.
3093 (gdb_no_commands_at_breakpoint): Reimplement.
3094 (run_breakpoint_commands): Rename to ...
3095 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
3096 and change return type to boolean.
3097 (run_breakpoint_commands): New function.
3098 (gdb_breakpoint_here): Also check for Z1 breakpoints.
3099 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
3100 breakpoint. Go through the_target->remove_point instead of
3101 assuming memory breakpoint.
3102 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
3103 software and hardware breakpoints.
3104 (reinsert_raw_breakpoint): Go through the_target->insert_point
3105 instead of assuming memory breakpoint.
3106 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
3107 software and hardware breakpoints.
3108 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
3109 Check both software and hardware breakpoints.
3110 (validate_inserted_breakpoint): Assert the breakpoint is a
3111 software breakpoint. Set the inserted flag to -1 instead of
3112 setting shlib_disabled.
3113 (delete_disabled_breakpoints): Adjust.
3114 (validate_breakpoints): Only validate software breakpoints.
3115 Adjust to inserted flag change.
3116 (check_mem_read, check_mem_write): Skip breakpoint types other
3117 than software breakpoints. Adjust to inserted flag change.
3118 * mem-break.h (enum raw_bkpt_type): New enum.
3119 (raw_breakpoint, struct process_info): Forward declare.
3120 (Z_packet_to_target_hw_bp_type): Delete declaration.
3121 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
3122 (set_gdb_breakpoint, delete_gdb_breakpoint)
3123 (clear_breakpoint_conditions): New declarations.
3124 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
3125 (breakpoint_inserted_here): Update comment.
3126 (add_breakpoint_condition, add_breakpoint_commands): Replace
3127 address parameter with a breakpoint pointer parameter.
3128 (gdb_breakpoint_here): Update comment.
3129 (delete_gdb_breakpoint_at): Delete.
3130 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
3131 * server.c (process_point_options): Take a struct breakpoint
3132 pointer instead of an address. Adjust.
3133 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
3134 delete_gdb_breakpoint.
3135 * spu-low.c (spu_target_ops): Install NULL as
3136 supports_z_point_type method.
3137 * target.h: Include mem-break.h.
3138 (struct target_ops) <prepare_to_access_memory>: Update comment.
3139 <supports_z_point_type>: New field.
3140 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
3141 instead of a char. Also take a raw breakpoint pointer.
3142 * win32-arm-low.c (the_low_target): Install NULL as
3143 supports_z_point_type.
3144 * win32-i386-low.c (i386_supports_z_point_type): New function.
3145 (i386_insert_point, i386_remove_point): Adjust to new interface.
3146 (the_low_target): Install i386_supports_z_point_type.
3147 * win32-low.c (win32_supports_z_point_type): New function.
3148 (win32_insert_point, win32_remove_point): Adjust to new interface.
3149 (win32_target_ops): Install win32_supports_z_point_type.
3150 * win32-low.h (struct win32_target_ops):
3151 <supports_z_point_type>: New method.
3152 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
3153 instead of a char. Also take a raw breakpoint pointer.
3154
932539e3
PA
31552014-05-20 Pedro Alves <palves@redhat.com>
3156
3157 * mem-break.h: Include break-common.h.
3158 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
3159 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
3160 (Z_packet_to_target_hw_bp_type): New declaration.
3161 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
3162 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
3163 (Z_PACKET_ACCESS_WP): Delete macros.
3164 (Z_packet_to_hw_type): Delete function.
3165 * i386-low.h: Don't include break-common.h here.
3166 (Z_packet_to_hw_type): Delete declaration.
3167 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
3168 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
3169 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
3170 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
3171 * linux-aarch64-low.c: Don't include break-common.h here.
3172 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
3173 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
3174 (Z_packet_to_target_hw_bp_type): Delete function.
3175 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
3176 function.
3177 (mips_insert_point, mips_remove_point): Use
3178 Z_packet_to_target_hw_bp_type.
3179
4ff0d3d8
PA
31802014-05-20 Pedro Alves <palves@redhat.com>
3181
3182 * linux-aarch64-low.c: Include break-common.h.
3183 (enum target_point_type): Delete.
3184 (Z_packet_to_point_type): Rename to ...
3185 (Z_packet_to_target_hw_bp_type): ... this, and return a
3186 target_hw_bp_type instead.
3187 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
3188 instead of an enum target_point_type.
3189 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
3190 breakpoint type.
3191 (aarch64_dr_state_insert_one_point)
3192 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
3193 (aarch64_handle_aligned_watchpoint)
3194 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
3195 Take an enum target_hw_bp_type instead of an enum
3196 target_point_type.
3197 (aarch64_supports_z_point_type): New function.
3198 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
3199 use Z_packet_to_target_hw_bp_type.
3200
786dc519
JB
32012014-05-20 Joel Brobecker <brobecker@adacore.com>
3202
3203 * configure.ac: Only use -Werror by default when DEVELOPMENT
3204 is true.
3205 * configure: Regenerate.
3206
9e0aa64f
JK
32072014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
3208
3209 Fix gdbserver qGetTLSAddr for x86_64 -m32.
3210 * linux-x86-low.c (X86_64_USER_REGS): New.
3211 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
3212
2b577b92
YQ
32132014-04-28 Yao Qi <yao@codesourcery.com>
3214
3215 * Makefile.in (i386-avx512.c): Fix the typo of generated file
3216 name.
3217
94611da2
PA
32182014-04-25 Pedro Alves <palves@redhat.com>
3219
3220 PR server/16255
3221 * linux-low.c (linux_attach_fail_reason_string): New function.
3222 (linux_attach_lwp): Delete.
3223 (linux_attach_lwp_1): Rename to ...
3224 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
3225 argument. Remove "initial" parameter. Return int instead of
3226 void. Don't error or warn here.
3227 (linux_attach): Adjust to call linux_attach_lwp. Call error on
3228 failure to attach to the tgid. Call warning when failing to
3229 attach to an lwp.
3230 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
3231 argument. Remove "initial" parameter. Return int instead of
3232 void. Don't error or warn here.
3233 (linux_attach_fail_reason_string): New declaration.
3234 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
3235 interface change. Use linux_attach_fail_reason_string.
3236
01f9f808
MS
32372014-04-24 Michael Sturm <michael.sturm@mintel.com>
3238 Walfred Tedeschi <walfred.tedeschi@intel.com>
3239
3240 * Makefile.in: Added rules to handle new files
3241 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
3242 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
3243 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
3244 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
3245 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
3246 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
3247 x32-avx512-linux.o.
3248 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
3249 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
3250 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
3251 i386/x32-avx512.xml.
3252 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
3253 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
3254 i386/x32-avx512-linux.xml.
3255 * i387-fp.c (num_avx512_k_registers): New constant for number
3256 of K registers.
3257 (num_avx512_zmmh_low_registers): New constant for number of
3258 lower ZMM registers (0-15).
3259 (num_avx512_zmmh_high_registers): New constant for number of
3260 higher ZMM registers (16-31).
3261 (num_avx512_ymmh_registers): New contant for number of higher
3262 YMM registers (ymm16-31 added by avx521 on x86_64).
3263 (num_avx512_xmm_registers): New constant for number of higher
3264 XMM registers (xmm16-31 added by AVX512 on x86_64).
3265 (struct i387_xsave): Add space for AVX512 registers.
3266 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
3267 Add code to handle AVX512 registers.
3268 (i387_xsave_to_cache): Add code to handle AVX512 registers.
3269 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
3270 prototypei from generated file.
3271 (tdesc_amd64_avx512_linux): Likewise.
3272 (init_registers_x32_avx512_linux): Likewise.
3273 (tdesc_x32_avx512_linux): Likewise.
3274 (init_registers_i386_avx512_linux): Likewise.
3275 (tdesc_i386_avx512_linux): Likewise.
3276 (x86_64_regmap): Add AVX512 registers.
3277 (x86_linux_read_description): Add code to handle AVX512 XSTATE
3278 mask.
3279 (initialize_low_arch): Add code to initialize AVX512 registers.
3280
51aa91f9
PA
32812014-04-23 Pedro Alves <palves@redhat.com>
3282
3283 * mem-break.c (find_gdb_breakpoint_at): Make static.
3284 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
3285
a4165e94
PA
32862014-04-23 Pedro Alves <palves@redhat.com>
3287
3288 * i386-low.c: Don't include break-common.h here.
3289 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
3290 prototype to take target_hw_bp_type as argument instead of a Z
3291 packet char.
3292 * i386-low.h: Include break-common.h here.
3293 (Z_packet_to_hw_type): Declare.
3294 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
3295 prototypes.
3296 * linux-x86-low.c (x86_insert_point): Convert the packet number to
3297 a target_hw_bp_type before calling i386_low_insert_watchpoint.
3298 (x86_remove_point): Convert the packet number to a
3299 target_hw_bp_type before calling i386_low_remove_watchpoint.
3300 * win32-i386-low.c (i386_insert_point): Convert the packet number
3301 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
3302 (i386_remove_point): Convert the packet number to a
3303 target_hw_bp_type before calling i386_low_remove_watchpoint.
3304
b8acf843
PA
33052014-04-23 Pedro Alves <palves@redhat.com>
3306
3307 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
3308
d708bcd1
PA
33092014-04-10 Pedro Alves <palves@redhat.com>
3310
3311 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
3312 Check if the condition or command is NULL before checking if the
3313 breakpoint is known. On success, return true.
3314 * mem-break.h (add_breakpoint_condition): Document return.
3315 (add_breakpoint_commands): Add describing comment.
3316 * server.c (skip_to_semicolon): New function.
3317 (process_point_options): Use it.
3318
2eec7d5b
PA
33192014-04-09 Pedro Alves <palves@redhat.com>
3320
3321 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
3322 to lwpid_of.
3323
fa96cb38
PA
33242014-02-27 Pedro Alves <palves@redhat.com>
3325
3326 PR 12702
3327 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
3328 macros.
3329 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
3330 output.
3331 (last_thread_of_process_p): Take a PID argument instead of a
3332 thread pointer.
3333 (linux_wait_for_lwp): Delete.
3334 (num_lwps, check_zombie_leaders, not_stopped_callback): New
3335 functions.
3336 (linux_low_filter_event): New function, party factored out from
3337 linux_wait_for_event.
3338 (linux_wait_for_event): Rename to ...
3339 (linux_wait_for_event_filtered): ... this. Add new filter ptid
3340 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
3341 sigsuspend. Check for zombie leaders.
3342 (linux_wait_for_event): Reimplement as wrapper around
3343 linux_wait_for_event_filtered.
3344 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
3345 a normal or signal exit is seen, it's the whole process exiting.
3346 (wait_for_sigstop): No longer a for_each_inferior callback.
3347 Rewrite on top of linux_wait_for_event_filtered.
3348 (stop_all_lwps): Call wait_for_sigstop directly.
3349 * server.c (resume, handle_target_event): Handle
3350 TARGET_WAITKIND_NO_RESUMED.
3351
d763de10
JB
33522014-02-26 Joel Brobecker <brobecker@adacore.com>
3353
3354 * win32-low.c (psapi_get_dll_name,
3355 * win32_CreateToolhelp32Snapshot): Delete.
3356 (win32_CreateToolhelp32Snapshot, win32_Module32First)
3357 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
3358 Delete.
3359 (handle_load_dll): Add function description.
3360 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
3361
850a0f76
JB
33622014-02-26 Joel Brobecker <brobecker@adacore.com>
3363
3364 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
3365 Add comment.
3366 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
3367 base address when calling win32_add_one_solib.
3368 (handle_load_dll): Delete local variable load_addr.
3369 Remove 0x1000 offset applied to DLL base address when calling
3370 win32_add_one_solib.
3371 (handle_unload_dll): Add comment.
3372
f25b3fc3
JB
33732014-02-26 Joel Brobecker <brobecker@adacore.com>
3374
3375 * win32-low.c (win32_add_all_dlls): Renames
3376 win32_ensure_ntdll_loaded. Rewrite function documentation.
3377 Adjust implementation to always load all DLLs.
3378 Add 0x1000 offset to DLL base address when calling
3379 win32_add_one_solib.
3380 (child_initialization_done): New static global.
3381 (do_initial_child_stuff): Set child_initialization_done to
3382 zero during child initialization, and 1 after. Replace call
3383 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
3384 Add comment.
3385 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
3386 (handle_unload_dll): Add function documentation.
3387 (get_child_debug_event): Ignore load and unload DLL events
3388 during child initialization.
3389
d86d4aaf
DE
33902014-02-20 Doug Evans <dje@google.com>
3391
3bc32da3 3392 Remove global all_lwps.
d86d4aaf
DE
3393 * inferiors.h (ptid_of): Move here from linux-low.h.
3394 (pid_of, lwpid_of): Ditto.
3395 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
3396 parameter is a struct thread_info * now.
3397 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
3398 directly. Pass &all_threads to find_inferior instead of &all_lwps.
3399 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
3400 directly.
3401 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
3402 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
3403 * linux-arm-low.c (update_registers_callback): Update, "entry"
3404 parameter is a struct thread_info * now.
3405 Fetch lwpid from current_inferior directly.
3406 (arm_insert_point): Pass &all_threads to find_inferior instead of
3407 &all_lwps.
3408 (arm_remove_point): Ditto.
3409 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
3410 (arm_prepare_to_resume): Fetch pid from thread.
3411 (arm_read_description): Fetch lwpid from current_inferior directly.
3412 * linux-low.c (all_lwps): Delete.
3413 (delete_lwp): Delete call to remove_inferior.
3414 (handle_extended_wait): Fetch lwpid from thread.
3415 (add_lwp): Don't set lwp->entry.id. Remove call to
3416 add_inferior_to_list.
3417 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
3418 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
3419 (kill_one_lwp_callback): Ditto.
3420 (linux_kill): Don't dereference NULL pointer.
3421 Fetch ptid,lwpid from thread.
3422 (get_detach_signal): Fetch ptid from thread.
3423 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
3424 Simplify call to regcache_invalidate_thread.
3425 (delete_lwp_callback): Update, "entry" parameter is a
3426 struct thread_info * now. Fetch pid from thread.
3427 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
3428 (status_pending_p_callback): Update, "entry" parameter is a
3429 struct thread_info * now. Fetch ptid from thread.
3430 (find_lwp_pid): Update, "entry" parameter is a
3431 struct thread_info * now.
3432 (linux_wait_for_lwp): Fetch pid from thread.
3433 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
3434 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
3435 (enqueue_one_deferred_signal): Fetch lwpid from thread.
3436 (dequeue_one_deferred_signal): Ditto.
3437 (cancel_breakpoint): Fetch ptid from current_inferior.
3438 (linux_wait_for_event): Pass &all_threads to find_inferior,
3439 not &all_lwps. Fetch ptid, lwpid from thread.
3440 (count_events_callback): Update, "entry" parameter is a
3441 struct thread_info * now.
3442 (select_singlestep_lwp_callback): Ditto.
3443 (select_event_lwp_callback): Ditto.
3444 (cancel_breakpoints_callback): Ditto.
3445 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
3446 not &all_lwps.
3447 (select_event_lwp): Ditto. Fetch ptid from event_thread.
3448 (unsuspend_one_lwp): Update, "entry" parameter is a
3449 struct thread_info * now.
3450 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
3451 not &all_lwps.
3452 (linux_stabilize_threads): Ditto. And for for_each_inferior.
3453 Fetch lwpid from thread, not lwp.
3454 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
3455 Pass &all_threads to find_inferior, not &all_lwps.
3456 (send_sigstop): Fetch lwpid from thread, not lwp.
3457 (send_sigstop_callback): Update, "entry" parameter is a
3458 struct thread_info * now.
3459 (suspend_and_send_sigstop_callback): Ditto.
3460 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
3461 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
3462 struct thread_info * now.
3463 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
3464 from thread, lwp.
3465 (lwp_running): Update, "entry" parameter is a
3466 struct thread_info * now.
3467 (stop_all_lwps): Fetch ptid from thread.
3468 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
3469 (linux_resume_one_lwp): Fetch lwpid from thread.
3470 (linux_set_resume_request): Update, "entry" parameter is a
3471 struct thread_info * now. Fetch pid, lwpid from thread.
3472 (resume_status_pending_p): Update, "entry" parameter is a
3473 struct thread_info * now.
3474 (need_step_over_p): Ditto. Fetch lwpid from thread.
3475 (start_step_over): Fetch lwpid from thread.
3476 (linux_resume_one_thread): Update, "entry" parameter is a
3477 struct thread_info * now. Fetch lwpid from thread.
3478 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
3479 (proceed_one_lwp): Update, "entry" parameter is a
3480 struct thread_info * now. Fetch lwpid from thread.
3481 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
3482 struct thread_info * now.
3483 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
3484 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
3485 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
3486 directly.
3487 (regsets_store_inferior_registers): Ditto.
3488 (fetch_register, store_register): Ditto.
3489 (linux_read_memory, linux_write_memory): Ditto.
3490 (linux_request_interrupt): Ditto.
3491 (linux_read_auxv): Ditto.
3492 (linux_xfer_siginfo): Ditto.
3493 (linux_qxfer_spu): Ditto.
3494 (linux_qxfer_libraries_svr4): Ditto.
3495 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
3496 moved to inferiors.h.
3497 (get_lwp): Delete.
3498 (get_thread_lwp): Update.
3499 (struct lwp_info): Delete member "entry". Simplify comment for
3500 member "thread".
3501 (all_lwps): Delete.
3502 * linux-mips-low.c (mips_read_description): Fetch lwpid from
3503 current_inferior directly.
3504 (update_watch_registers_callback): Update, "entry" parameter is a
3505 struct thread_info * now. Fetch pid from thread.
3506 (mips_linux_prepare_to_resume): Fetch ptid from thread.
3507 (mips_insert_point): Fetch lwpid from current_inferior.
3508 Pass &all_threads to find_inferior, not &all_lwps.
3509 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
3510 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
3511 directly.
3512 (mips_stopped_data_address): Ditto.
3513 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
3514 directly.
3515 * linux-tile-low.c (tile_arch_setup): Ditto.
3516 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
3517 (update_debug_registers_callback): Update, "entry" parameter is a
3518 struct thread_info * now. Fetch pid from thread.
3519 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
3520 Pass &all_threads to find_inferior, not &all_lwps.
3521 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
3522 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
3523 Pass &all_threads to find_inferior, not &all_lwps.
3524 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
3525 (i386_dr_low_get_status): Ditto.
3526 (x86_linux_prepare_to_resume): Fetch ptid from thread.
3527 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
3528 (x86_linux_read_description): Ditto.
3529 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
3530
3b8361aa
DE
35312014-02-20 Doug Evans <dje@google.com>
3532
3533 * inferiors.c (get_first_inferior): Fix buglet.
3534
f7667f0d
DE
35352014-02-19 Doug Evans <dje@google.com>
3536
3537 * gdbthread.h (add_thread): Change result type to struct thread_info *.
3538 * inferiors.c (add_thread): Change result type to struct thread_info *.
3539 All callers updated.
3540 (add_lwp): Call add_thread here instead of in callers.
3541 All callers updated.
3542 * linux-low.h (get_lwp_thread): Rewrite.
3543 (struct lwp_info): New member "thread".
3544
b3312d80
DE
35452014-02-19 Doug Evans <dje@google.com>
3546
3547 * linux-low.c (add_lwp): Change result to struct lwp_info *.
3548 All callers updated.
3549
ecc6f45c
DE
35502014-02-19 Doug Evans <dje@google.com>
3551
3552 * inferiors.c (add_thread): Fix whitespace.
3553
649ebbca
DE
35542014-02-19 Doug Evans <dje@google.com>
3555
3556 * dll.c (clear_dlls): Replace accessing list implemention details
3557 with API function.
3558 * gdbthread.h (get_first_thread): Declare.
3559 * inferiors.c (for_each_inferior_with_data): New function.
3560 (get_first_thread): New function.
3561 (find_thread_ptid): Simplify.
3562 (get_first_inferior): New function.
3563 (clear_list): Delete.
3564 (one_inferior_p): New function.
3565 (clear_inferior_list): New function.
3566 (clear_inferiors): Update.
3567 * inferiors.h (for_each_inferior_with_data): Declare.
3568 (clear_inferior_list): Declare.
3569 (one_inferior_p): Declare.
3570 (get_first_inferior): Declare.
3571 * linux-low.c (linux_wait_for_event): Replace accessing list
3572 implemention details with API function.
3573 * server.c (target_running): Ditto.
3574 (accumulate_file_name_length): New function.
3575 (emit_dll_description): New function.
3576 (handle_qxfer_libraries): Replace accessing list implemention
3577 details with API function.
3578 (handle_qxfer_threads_worker): New function.
3579 (handle_qxfer_threads_proper): Replace accessing list implemention
3580 details with API function.
3581 (handle_query): Ditto.
3582 (visit_actioned_threads_callback_ftype): New typedef.
3583 (visit_actioned_threads_data): New struct.
3584 (visit_actioned_threads): Rewrite to be find_inferior callback.
3585 (resume): Call find_inferior.
3586 (handle_status): Replace accessing list implemention
3587 details with API function.
3588 (process_serial_event): Replace accessing list implemention details
3589 with API function.
3590 * target.c (set_desired_inferior): Replace accessing list implemention
3591 details with API function.
3592 * tracepoint.c (same_process_p): New function.
3593 (gdb_agent_about_to_close): Replace accessing list implemention
3594 details with API function.
3595 * win32-low.c (child_delete_thread): Replace accessing list
3596 implemention details with API function.
3597 (match_dll_by_basename): New function.
3598 (dll_is_loaded_by_basename): New function.
3599 (win32_ensure_ntdll_loaded): Replace accessing list implemention
3600 details call to dll_is_loaded_by_basename.
3601
80894984
DE
36022014-02-19 Doug Evans <dje@google.com>
3603
3604 * dll.h (struct dll_info): Add comment.
3605 * gdbthread.h (struct thread_info): Add comment.
3606 (current_ptid): Simplify.
3607 * inferiors.c (add_process): Update.
3608 (remove_process): Update.
3609 * inferiors.h (struct process_info): Rename member "head" to "entry".
3610 * linux-low.c (delete_lwp): Update.
3611 (add_lwp): Update.
3612 (last_thread_of_process_p): Update.
3613 (kill_one_lwp_callback, linux_kill): Update.
3614 (status_pending_p_callback): Update.
3615 (wait_for_sigstop): Update. Simplify read of ptid.
3616 (start_step_over): Update.
3617 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
3618 (get_lwp_thread): Update.
3619 (struct lwp_info): Rename member "head" to "entry".
3620 * regcache.h (inferior_list_entry): Delete.
3621 * server.c (kill_inferior_callback): Update.
3622 (detach_or_kill_inferior_callback): Update.
3623 (print_started_pid): Update.
3624 (print_attached_pid): Update.
3625 (process_serial_event): Simplify read of ptid.
3626 * thread-db.c (thread_db_create_event): Update.
3627 (thread_db_get_tls_address): Update.
3628 * win32-low.c (current_inferior_ptid): Simplify.
3629
46917d26
TT
36302014-02-19 Tom Tromey <tromey@redhat.com>
3631
3632 * target.h (struct target_ops) <supports_btrace>: Add target_ops
3633 argument.
3634 (target_supports_btrace): Update.
3635
0759a81e
YQ
36362014-02-14 Yao Qi <yao@codesourcery.com>
3637
3638 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
3639 (rsp-low-ipa.o): New target.
3640
a7191e8b
TT
36412014-02-12 Tom Tromey <tromey@redhat.com>
3642
3643 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
3644 convert_ascii_to_int.
3645 * regcache.c (registers_to_string): Likewise.
3646 * remote-utils.c (decode_M_packet): Likewise.
3647 * server.c (process_serial_event): Likewise.
3648
ff0e980e
TT
36492014-02-12 Tom Tromey <tromey@redhat.com>
3650
3651 * server.c (handle_query, handle_v_run): Use hex2bin, not
3652 unhexify.
3653 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
3654
e9371aff
TT
36552014-02-12 Tom Tromey <tromey@redhat.com>
3656
3657 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
3658 convert_int_to_ascii.
3659 * regcache.c (registers_to_string, collect_register_as_string):
3660 Likewise.
3661 * remote-utils.c (look_up_one_symbol, relocate_instruction):
3662 Likewise.
3663 * server.c (process_serial_event): Likewise.
3664 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
3665 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
3666
971dc0b8
TT
36672014-02-12 Tom Tromey <tromey@redhat.com>
3668
3669 * remote-utils.c (look_up_one_symbol, monitor_output): Use
3670 bin2hex, not hexify.
3671 * tracepoint.c (cmd_qtstatus): Likewise.
3672
0a822afb
TT
36732014-02-12 Tom Tromey <tromey@redhat.com>
3674
3675 * remote-utils.c (monitor_output): Pass explicit length to
3676 hexify.
3677
9c3d6531
TT
36782014-02-12 Tom Tromey <tromey@redhat.com>
3679
3680 * tracepoint.c: Include rsp-low.h.
3681 * server.c: Include rsp-low.h.
3682 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
3683 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
3684 declare.
3685 * remote-utils.c: Include rsp-low.h.
3686 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
3687 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
3688 (convert_int_to_ascii, convert_ascii_to_int): Move to
3689 common/rsp-low.c.
3690 * regcache.c: Include rsp-low.h.
3691 * ax.c: Include rsp-low.h.
3692 * Makefile.in (SFILES): Add common/rsp-low.c.
3693 (OBS): Add rsp-low.o.
3694 (rsp-low.o): New target.
3695
01fd3ea5
TT
36962014-02-12 Tom Tromey <tromey@redhat.com>
3697
3698 * utils.h (pulongest, plongest, phex_nz): Don't declare.
3699 Include print-utils.h.
3700 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
3701 (plongest, thirty_two, phex_nz): Remove.
3702 * Makefile.in (SFILES): Add common/print-utils.c.
3703 (OBS): Add print-utils.o.
3704 (print-utils-ipa.o): New target.
3705 (print-utils.o): New target.
3706 (IPA_OBJS): Add print-utils-ipa.o.
3707
e99dc820
TT
37082014-02-06 Tom Tromey <tromey@redhat.com>
3709
3710 * Makefile.in (SFILES): Fix indentation.
3711
ee1e2d4f
DE
37122014-02-05 Doug Evans <dje@google.com>
3713
3714 * linux-low.c (linux_wait_for_event): Improve comment.
3715 (linux_wait_1): Keep current_inferior in sync with event_child.
3716
f5a02773
DE
37172014-01-22 Doug Evans <dje@google.com>
3718
3719 * gdbthread.h (gdb_id_to_thread): Delete, unused.
3720
87ce2a04
DE
37212014-01-22 Doug Evans <dje@google.com>
3722
3723 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
3724 * configure: Regenerate.
3725 * config.in: Regenerate.
3726 * Makefile.in (SFILES): Add debug.c.
3727 (OBS): Add debug.o.
3728 * debug.c: New file.
3729 * debug.h: New file.
3730 * linux-aarch64-low.c (*): Update all debugging printfs to use
3731 debug_printf instead of fprintf.
3732 * linux-arm-low.c (*): Ditto.
3733 * linux-cris-low.c (*): Ditto.
3734 * linux-crisv32-low.c (*): Ditto.
3735 * linux-m32r-low.c (*): Ditto.
3736 * linux-sparc-low.c (*): Ditto.
3737 * linux-x86.c (*): Ditto.
3738 * linux-low.c (*): Ditto.
3739 (linux_wait_1): Add calls to debug_enter, debug_exit.
3740 (linux_wait): Remove redundant debugging printf.
3741 (stop_all_lwps): Add calls to debug_enter, debug_exit.
3742 (linux_resume, unstop_all_lwps): Ditto.
3743 * mem-break.c (*): Update all debugging printfs to use
3744 debug_printf instead of fprintf.
3745 * remote-utils.c (*): Ditto.
3746 * thread-db.c (*): Ditto.
3747 * server.c #include <ctype.h>, "gdb_vecs.h".
3748 (debug_threads): Moved to debug.c.
3749 (*): Update all debugging printfs to use debug_printf instead of
3750 fprintf.
3751 (start_inferior): Replace call to fflush with call to debug_flush.
3752 (monitor_show_help): Mention set debug-format.
3753 (parse_debug_format_options): New function.
3754 (handle_monitor_command): Handle "monitor set debug-format".
3755 (gdbserver_usage): Mention --debug-format.
3756 (main): Parse --debug-format.
3757 * server.h (debug_threads): Declaration moved to debug.h.
3758 #include "debug.h".
3759 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
3760 trace_debug_1 that uses debug_printf.
3761 (tracepoint_look_up_symbols): Update all debugging printfs to use
3762 debug_printf instead of fprintf.
3763
e671835b
BS
37642014-01-20 Baruch Siach <baruch@tkos.co.il>
3765
3766 * linux-xtensa-low.c: Include asm/ptrace.h instead of
3767 sys/ptrace.h.
3768
b5737fa9
PA
37692014-01-17 Pedro Alves <palves@redhat.com>
3770
ea38d2a9 3771 PR build/16445
c7faa97a
PA
3772 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
3773 defined after including gdb_proc_service.h.
b5737fa9 3774
40ed484e
DE
37752014-01-16 Doug Evans <dje@google.com>
3776
3777 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
3778 (match_dll): Use it.
3779
969c39fb
MM
37802014-01-16 Markus Metzger <markus.t.metzger@intel.com>
3781
3782 * target.h (target_ops) <read_btrace>: Change parameters and
3783 return type to allow error reporting.
3784 * server.c (handle_qxfer_btrace): Support delta reads. Pass
3785 trace reading errors on.
3786 * linux-low.c (linux_low_read_btrace): Pass trace reading
3787 errors on.
3788 (linux_low_disable_btrace): New.
3789
ab7f45ba
DE
37902014-01-15 Doug Evans <dje@google.com>
3791
3792 * inferiors.c (thread_id_to_gdb_id): Delete.
3793 * inferiors.h (thread_id_to_gdb_id): Delete.
3794
66af0f44
EZ
37952014-01-13 Eli Zaretskii <eliz@gnu.org>
3796
3797 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
3798 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
3799 versions.
3800
9939e131
PA
38012014-01-08 Pedro Alves <palves@redhat.com>
3802
3803 * server.c (handle_status): Don't discard previous queued stop
3804 replies or thread's pending status here.
3805 (main) <disconnection>: Do it here instead.
3806
b7ea362b
PA
38072014-01-08 Pedro Alves <palves@redhat.com>
3808
3809 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
3810 * server.c (visit_actioned_threads, handle_pending_status): New
3811 function.
3812 (handle_v_cont): Factor out parts to ...
3813 (resume): ... this new function. If in all-stop, and a thread
3814 being resumed has a pending status, report it without actually
3815 resuming.
3816 (myresume): Adjust to use the new 'resume' function.
3817 (clear_pending_status_callback, set_pending_status_callback)
3818 (find_status_pending_thread_callback): New functions.
3819 (handle_status): Handle the case of multiple threads having
3820 interesting statuses to report. Report threads' real last signal
3821 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
3822 with an interesting thread to report the status for, instead of
3823 always reporting the status of the first thread.
3824
28498c42
JB
38252014-01-01 Joel Brobecker <brobecker@adacore.com>
3826
3827 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
3828 * gdbreplay.c (gdbreplay_version): Likewise.
3829
f45c82da
YZ
38302013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
3831
3832 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
3833 iov.iov_len with the real length in use.
3834
379a5e2d
JB
38352013-12-13 Joel Brobecker <brobecker@adacore.com>
3836
3837 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
3838 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
3839 for all targets that use win32-low.c.
3840 * win32-low.c (win32_ensure_ntdll_loaded): New function.
3841 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
3842
4210d83e
PA
38432013-12-13 Pedro Alves <palves@redhat.com>
3844
3845 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
3846 if equal to TARGET_WAITKIND_LOADED.
3847 * win32-low.c (cached_status): New static global.
3848 (win32_wait): Add declaration.
3849 (do_initial_child_stuff): Flush all initial pending debug events
3850 up to the initial breakpoint.
3851 (win32_wait): If CACHED_STATUS was set, return that instead
3852 of doing a real wait. Remove the code resuming the execution
3853 of the inferior after receiving a TARGET_WAITKIND_LOADED event
3854 during the initial phase. Also remove the code changing
3855 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
3856 TARGET_WAITKIND_STOPPED.
3857
e7f0d979
YQ
38582013-12-11 Yao Qi <yao@codesourcery.com>
3859
3860 * notif.c (handle_notif_ack): Return 0 if no notification
3861 matches.
3862
ebcf782c
DE
38632013-11-20 Doug Evans <dje@google.com>
3864
3865 * linux-low.c (linux_set_resume_request): Fix comment.
3866
20ad9378
DE
38672013-11-20 Doug Evans <dje@google.com>
3868
3869 * linux-low.c (resume_status_pending_p): Tweak comment.
3870
a196ebeb
WT
38712013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
3872
3873 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
3874 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
3875 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
3876 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
3877 (srv_amd64_regobj): Add amd64-mpx.o.
3878 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
3879 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
3880 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
3881 * i387-fp.c (num_pl_bnd_register) Added constant.
3882 (num_pl_bnd_cfg_registers) Added constant.
3883 (struct i387_xsave) Added reserved area and MPX fields.
3884 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
3885 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
3886 function.
3887 (tdesc_i386_mpx_linux): Add MPX amd64 target.
3888 (init_registers_amd64_mpx_linux): Declare new function.
3889 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
3890 (x86_64_regmap): Add MPX registers.
3891 (x86_linux_read_description): Add MPX case.
3892 (initialize_low_arch): Initialize MPX targets.
3893
0080a2f6
TT
38942013-11-18 Tom Tromey <tromey@redhat.com>
3895
3896 * configure: Rebuild.
3897 * configure.ac: Don't check for stdlib.h.
3898 * gdbreplay.c: Unconditionally include stdlib.h.
3899
2978b111
TT
39002013-11-18 Tom Tromey <tromey@redhat.com>
3901
3902 * config.in: Rebuild.
3903 * configure: Rebuild.
3904 * configure.ac: Don't use AC_HEADER_DIRENT.
3905
a3d08894
TT
39062013-11-18 Tom Tromey <tromey@redhat.com>
3907
3908 * server.h: Don't check HAVE_STRING_H.
3909 * gdbreplay.c: Don't check HAVE_STRING_H.
3910 * configure: Rebuild.
3911
0a5dd17d
TT
39122013-11-18 Tom Tromey <tromey@redhat.com>
3913
3914 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
3915 LIBGNU.
3916
1bd2f0ba
TT
39172013-11-08 Tom Tromey <tromey@redhat.com>
3918
3919 * configure, config.in: Rebuild.
3920 * configure.ac: Remove unused configury.
3921
3266f10b
TT
39222013-11-08 Tom Tromey <tromey@redhat.com>
3923
3924 * acinclude.m4: Include common.m4, codeset.m4.
3925 * configure, config.in: Rebuild.
3926 * configure.ac: Use GDB_AC_COMMON.
3927
6682d959
AA
39282013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
3929
3930 * linux-s390-low.c (HWCAP_S390_TE): New define.
3931 (s390_arch_setup): Consider the TE field in the HWCAP for
3932 determining 'have_regset_tdb'.
3933
fd0a4d76
SDJ
39342013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
3935
3936 PR gdb/16014
3937 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
3938 call to sizeof.
3939
1a3d890b
PA
39402013-10-02 Pedro Alves <palves@redhat.com>
3941
3942 * server.c (process_serial_event): Don't output "GDBserver
3943 exiting" if GDB is connected through stdio.
3944 * target.c (mywait): Likewise, be silent if GDB is connected
3945 through stdio.
3946
97ad4581
JB
39472013-10-01 Joel Brobecker <brobecker@adacore.com>
3948
3949 * lynx-low.c (lynx_add_threads_after_attach): New function.
3950 (lynx_attach): Remove call to add_thread. Add call to
3951 lynx_add_threads_after_attach instead.
3952
5b4e221c
MF
39532013-09-28 Mike Frysinger <vapier@gentoo.org>
3954
3955 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
3956 * config.in, configure: Regenerated.
3957
ee47b2f8
YQ
39582013-09-18 Yao Qi <yao@codesourcery.com>
3959
3960 PR server/15959
3961 * server.c (start_inferior): Clear 'resume_info'.
3962
d6707650 39632013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 3964
d6707650
JW
3965 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
3966 for each register.
3967
9243dd0e 39682013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 3969
9243dd0e
JW
3970 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
3971 linux-tile-low.o to srv_tgtobj.
3972
c623a6ef
WN
39732013-09-16 Will Newton <will.newton@linaro.org>
3974
3975 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
3976 out regs.
3977
fb71d39e
PA
39782013-09-06 Pedro Alves <palves@redhat.com>
3979
3980 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
3981 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
3982 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
3983 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
3984 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
3985 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
3986
8e7e9910
PA
39872013-09-06 Pedro Alves <palves@redhat.com>
3988
3989 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
3990 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
3991
7c3a12ca
PA
39922013-09-06 Pedro Alves <palves@redhat.com>
3993
3994 * linux-amd64-ipa.c: Include tracepoint.h.
3995 * linux-i386-ipa.c: Include tracepoint.h.
3996
8eb3d7b6
RW
39972013-09-06 Ricard Wanderlof <ricardw@axis.com>
3998
3999 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
4000 (ps_get_thread_area): New function.
4001
eddddb9d
RW
40022013-09-06 Ricard Wanderlof <ricardw@axis.com>
4003
4004 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
4005 (initialize_low_arch): Call init_registers_crisv32 rather than
4006 init_register_crisv32.
4007
533b0600
PA
40082013-09-05 Pedro Alves <palves@redhat.com>
4009
4010 * server.h (handle_vFile, hostio_last_error_from_errno): Move
4011 to ...
4012 * hostio.h: ... this new file.
4013 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
4014 win32-low.c: Include hostio.h.
4015
0ce3d3b5
PA
40162013-09-05 Pedro Alves <palves@redhat.com>
4017
4018 * server.h (gdb_client_data, handler_func, callback_handler_func)
4019 (delete_file_handler, add_file_handler, append_callback_event)
4020 (delete_callback_event, start_event_loop, initialize_event_loop):
4021 Move to event-loop.h and include it.
4022 * event-loop.h: New file.
4023
799cdc37
PA
40242013-09-05 Pedro Alves <palves@redhat.com>
4025
4026 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
4027 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
4028 (loaded_dll, unloaded_dll): Move to ...
4029 * dll.h: ... this new file.
4030 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
4031
6a6bbd9d
PA
40322013-09-05 Pedro Alves <palves@redhat.com>
4033
4034 * server.h (current_process, get_thread_process, all_processes)
4035 (add_inferior_to_list, for_each_inferior, current_inferior)
4036 (remove_inferior, add_process, remove_process, find_process_pid)
4037 (have_started_inferiors_p, have_attached_inferiors_p)
4038 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
4039 (clear_inferiors, find_inferior, find_inferior_id)
4040 (inferior_target_data, set_inferior_target_data)
4041 (inferior_regcache_data, set_inferior_regcache_data): Move to
4042 inferiors.h, and include it.
4043 * inferiors.h: New file.
4044
f699aaba
PA
40452013-09-05 Pedro Alves <palves@redhat.com>
4046
4047 * server.h (struct emit_ops, current_insn_ptr, emit_error):
4048 Move ...
72f4393d 4049 * ax.h: ... here.
f699aaba 4050
c144c7a0
PA
40512013-09-05 Pedro Alves <palves@redhat.com>
4052
4053 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
4054 tracepoint.h.
4055 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
4056 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
4057 (handle_tracepoint_general_set, handle_tracepoint_query)
4058 (tracepoint_finished_step, tracepoint_was_hit)
4059 (release_while_stepping_state_list, current_traceframe)
4060 (in_readonly_region, traceframe_read_mem)
4061 (fetch_traceframe_registers, traceframe_read_sdata)
4062 (traceframe_read_info, struct fast_tpoint_collect_status)
4063 (fast_tracepoint_collecting, force_unlock_trace_buffer)
4064 (handle_tracepoit_bkpts, initialize_low_tracepoint)
4065 (supply_fast_tracepoint_registers)
4066 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
4067 (ipa_tdesc, claim_trampoline_space)
4068 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
4069 (agent_mem_read, agent_get_trace_state_variable_value)
4070 (agent_set_trace_state_variable_value, agent_tsv_read)
4071 (agent_mem_read_string, get_raw_reg_func_addr)
4072 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
4073 * tracepoint.h: ... this new file.
4074
ff42e6ab
PA
40752013-09-05 Pedro Alves <palves@redhat.com>
4076
4077 * server.h (perror_with_name, error, fatal, warning, paddress)
4078 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
4079 include it.
4080 * utils.h: New file.
4081
541af0f4
PA
40822013-09-05 Pedro Alves <palves@redhat.com>
4083
4084 * server.h (remote_debug, noack_mode, transport_is_reliable)
4085 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
4086 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
4087 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
4088 (write_enn, initialize_async_io, enable_async_io)
4089 (disable_async_io, check_remote_input_interrupt_request)
4090 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
4091 (dead_thread_notify, prepare_resume_reply)
4092 (decode_address_to_semicolon, decode_address, decode_m_packet)
4093 (decode_M_packet, decode_X_packet, decode_xfer_write)
4094 (decode_search_memory_packet, unhexify, hexify)
4095 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
4096 (look_up_one_symbol, relocate_instruction)
4097 (monitor_output): Move to remote-utils.h, and include it.
4098 * remote-utils.h: New file.
4099
eebdf26b
PA
41002013-09-05 Pedro Alves <palves@redhat.com>
4101
4102 * server.h (_): Delete.
4103
3aafd2ff
PA
41042013-09-02 Pedro Alves <palves@redhat.com>
4105
4106 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
4107 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
4108 allocated.
4109 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
4110
cee83bcb
PM
41112013-09-02 Pierre Muller <muller@sourceware.org>
4112
4113 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
4114 or WriteProcessMemory complete successfully and handle
4115 ERROR_PARTIAL_COPY error.
4116
9a13b2fa
PA
41172013-09-02 Pedro Alves <palves@redhat.com>
4118
4119 * server.c (gdb_read_memory): Return -1 on traceframe memory read
4120 error instead of EIO.
4121
602e3198
JK
41222013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4123
4124 PR server/15604
4125 * linux-low.c: Include filestuff.h.
4126 (linux_create_inferior) <pid == 0>: Call close_most_fds.
4127 * lynx-low.c: Include filestuff.h.
4128 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
4129 * server.c: Include filestuff.h.
4130 (main): Call notice_open_fds.
4131 * spu-low.c: Include filestuff.h.
4132 (spu_create_inferior) <pid == 0>: Call close_most_fds.
4133
96d7229d
LM
41342013-08-22 Luis Machado <lgustavo@codesourcery.com>
4135
4136 * Makefile.in: Explain why ../target and ../nat are not
4137 listed as include file search paths.
4138 (linux-waitpid.o): New object file rule.
4139 * configure.srv (srv_native_linux_obj): New variable.
4140 Replace all occurrences of linux native object files with
4141 $srv_native_linux_obj.
4142 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
4143 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
4144 (linux_enable_event_reporting): Remove declaration.
4145 (my_waitpid): Moved to common/linux-waitpid.c.
4146 (linux_wait_for_event): Pass ptid when calling
4147 linux_enable_event_reporting.
4148 (linux_supports_tracefork_flag): Remove.
4149 (linux_enable_event_reporting): Likewise.
4150 (linux_tracefork_grandchild): Remove.
4151 (STACK_SIZE): Moved to common/linux-ptrace.c.
4152 (linux_tracefork_child): Remove.
4153 (linux_test_for_tracefork): Remove.
4154 (linux_look_up_symbols): Call linux_supports_traceclone.
4155 (initialize_low): Remove call to linux_test_for_tracefork.
4156 * linux-low.h (PTRACE_TYPE_ARG3): Move to
4157 common/linux-ptrace.h.
4158 (PTRACE_TYPE_ARG4): Likewise.
4159 Include linux-ptrace.h.
4160
32940073
PA
41612013-08-21 Pedro Alves <palves@redhat.com>
4162
4163 * config.in: Renegerate.
4164
33b60d58 41652013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 4166
33b60d58
LM
4167 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
4168 (SFILES): Remove $(srcdir)/common/target-common.c and
4169 add $(srcdir)/target/waitstatus.c.
4170 (OBS): Remove target-common.o and add waitstatus.o.
4171 (server_h): Remove $(srcdir)/../common/target-common.h and
4172 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
4173 and $(srcdir)/../target/waitstatus.h.
4174 (target-common.o): Remove.
4175 (waitstatus.o): New target object file.
4176 * target.h: Do not include target-common.h and
4177 include target/resume.h, target/wait.h and
4178 target/waitstatus.h.
4179
b8e1b30e
LM
41802013-08-13 Luis Machado <lgustavo@codesourcery.com>
4181
4182 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
4183 to PTRACE_TYPE_ARG3.
4184 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
4185 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
4186 PTRACE_TYPE_ARG4.
4187 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
4188 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
4189
7a60ad40
YQ
41902013-07-27 Jie Zhang <jie@codesourcery.com>
4191 Daniel Jacobowitz <dan@codesourcery.com>
4192 Yao Qi <yao@codesourcery.com>
4193
4194 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
4195 (mips-linux-watch.o): New rule.
4196 (mips_linux_watch_h): New variable.
4197 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
4198 srv_tgtobj.
4199 * linux-mips-low.c: Include mips-linux-watch.h.
4200 (struct arch_process_info, struct arch_lwp_info): New.
4201 (update_watch_registers_callback): New function.
4202 (mips_linux_new_process, mips_linux_new_thread) New functions.
4203 (mips_linux_prepare_to_resume, mips_insert_point): New
4204 functions.
4205 (mips_remove_point, mips_stopped_by_watchpoint): New
4206 functions.
4207 (rsp_bp_type_to_target_hw_bp_type): New function.
4208 (mips_stopped_data_address): New function.
4209 (the_low_target): Add watchpoint support functions.
4210
de6f69ad
YQ
42112013-07-27 Yao Qi <yao@codesourcery.com>
4212
4213 * i386-low.c: Include break-common.h.
4214 (enum target_hw_bp_type): Remove.
4215
3360c0bf
LM
42162013-07-24 Luis Machado <lgustavo@codesourcery.com>
4217
4218 * Makefile.in (SFILES): /common/target-common.c.
4219 (OBS): Add target-common.o.
4220 (server_h): Add $(srcdir)/../common/target-common.h.
4221 (target-common.o): New target.
4222 * server.c (queue_stop_reply_callback): Free
4223 status string after use.
4224 * target.c (target_waitstatus_to_string): Remove.
4225 * target.h: Include target-common.h.
4226 (resume_kind): Likewise.
4227 (target_waitkind): Likewise.
4228 (target_waitstatus): Likewise.
4229 (TARGET_WNOHANG): Likewise.
4230
bd885420
YQ
42312013-07-04 Yao Qi <yao@codesourcery.com>
4232
4233 * Makefile.in (host_alias): Use @host_noncanonical@.
4234 (target_alias): Use @target_noncanonical@.
4235 * configure.ac: Use ACX_NONCANONICAL_TARGET and
4236 ACX_NONCANONICAL_HOST.
4237 * configure: Regenerated.
4238
4239 Revert:
4240 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
4241
4242 * configure.ac (version_host, version_target): Set and AC_SUBST them.
4243 * configure: Rebuild.
4244 * Makefile.in (version_host, version_target): Get from configure.
4245 (version.c): Use $(version_host) and $(version_target).
4246
17ef446e
PA
42472013-07-03 Pedro Alves <palves@redhat.com>
4248
4249 * Makefile.in (config.status): Depend on development.sh.
4250 * acinclude.m4: Include libmcheck.m4.
4251 * configure: Regenerate.
4252
7a9a7487
MG
42532013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
4254
4255 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
4256 attribute inside the parentheses.
4257 (winapi_DebugSetProcessKillOnExit): Ditto.
4258 (winapi_DebugBreakProcess): Ditto.
4259 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 4260
49b64de6
MG
42612013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
4262
4263 * notif.h (notif_event): Add a dummy member to avoid compiler
4264 errors.
4265
d5749ee7
PA
42662013-07-01 Pedro Alves <palves@redhat.com>
4267
4268 * hostio.c (HOSTIO_PATH_MAX): Define.
4269 (require_filename, handle_open, handle_unlink, handle_readlink):
4270 Use it.
4271
d8d2a3ee
PA
42722013-07-01 Pedro Alves <palves@redhat.com>
4273
4274 * server.h: Include "pathmax.h".
4275 * linux-low.c: Don't include sys/param.h.
4276 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
4277 MAXPATHLEN.
4278 * win32-low.c: Don't include sys/param.h.
4279 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
4280
bc7dea8d
PA
42812013-07-01 Pedro Alves <palves@redhat.com>
4282
4283 * event-loop.c: Don't check HAVE_UNISTD_H before including
4284 <unistd.h>.
4285 * gdbreplay.c: Likewise.
4286 * remote-utils.c: Likewise.
4287 * server.c: Likewise.
4288 * configure.ac: Don't check for unistd.h.
4289 * configure: Regenerate.
4290
d6c2da54
TT
42912013-06-28 Tom Tromey <tromey@redhat.com>
4292
4293 * Makefile.in (version.c): Use version.in, not
4294 common/version.in.
4295
257b6bec
MG
42962013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
4297
4298 * configure.ac (version_host, version_target): Set and AC_SUBST them.
4299 * configure: Rebuild.
4300 * Makefile.in (version_host, version_target): Get from configure.
4301 (version.c): Use $(version_host) and $(version_target).
4302
86ebe149
DK
43032013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
4304
4305 Fix trace-status to output user name without trailing colon.
4306 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
4307
f30aa5af
DK
43082013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
4309
4310 Fix trace-status to output proper start-time and stop-time.
4311 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
4312 output start time and stop time in hex as gdb expects.
4313
28a93511
YQ
43142013-06-26 Pedro Alves <pedro@codesourcery.com>
4315
4316 * tracepoint.c (build_traceframe_info_xml): Output trace state
4317 variables present in the trace buffer.
4318
01208463
TT
43192013-06-24 Tom Tromey <tromey@redhat.com>
4320
4321 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
4322 create-version.sh.
4323 (version.o): Remove.
4324 * gdbreplay.c: Include version.h.
4325 (version, host_name): Don't declare.
4326 * server.h: Include version.h.
4327 (version, host_name): Don't declare.
4328
760256f9
PA
43292013-06-12 Pedro Alves <palves@redhat.com>
4330
4331 * linux-x86-low.c (linux_is_elf64): Delete global.
4332 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
4333 with local linux_pid_exe_is_elf_64_file use.
4334
030031ee
PA
43352013-06-11 Pedro Alves <palves@redhat.com>
4336
4337 * linux-low.c (regset_disabled, disable_regset): New functions.
4338 (regsets_fetch_inferior_registers)
4339 (regsets_store_inferior_registers): Use them.
4340 (initialize_regsets_info); Don't allocate the disabled_regsets
4341 array here.
4342 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
4343 comment.
4344
5da6eb0a
PA
43452013-06-11 Pedro Alves <palves@redhat.com>
4346
4347 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
4348 xmalloc.
4349
7e5aaa09
PA
43502013-06-11 Pedro Alves <palves@redhat.com>
4351
4352 * linux-x86-low.c (initialize_low_arch): Call
4353 init_registers_x32_avx_linux.
4354
d878444c
JK
43552013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
4356
4357 Fix compatibility with Android Bionic.
4358 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
4359 it is not empty.
4360
3aee8918
PA
43612013-06-07 Pedro Alves <palves@redhat.com>
4362
5f2b57b5 4363 PR server/14823
3aee8918
PA
4364 * Makefile.in (OBS): Add tdesc.o.
4365 (IPA_OBJS): Add tdesc-ipa.o.
4366 (tdesc-ipa.o): New rule.
4367 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
4368 interface.
4369 * linux-low.c (new_inferior): Delete.
4370 (disabled_regsets, num_regsets): Delete.
4371 (linux_add_process): Adjust to set the new per-process
4372 new_inferior flag.
4373 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
4374 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
4375 was a stop. When calling arch_setup, switch the current inferior
4376 to the thread that got an event.
4377 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
4378 (regsets_fetch_inferior_registers)
4379 (regsets_store_inferior_registers): New regsets_info parameter.
4380 Adjust to use it.
4381 (linux_register_in_regsets): New regs_info parameter. Adjust to
4382 use it.
4383 (register_addr, fetch_register, store_register): New usrregs_info
4384 parameter. Adjust to use it.
4385 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
4386 parameter regs_info. Adjust to use it.
4387 (linux_fetch_registers): Get the current inferior's regs_info, and
4388 adjust to use it.
4389 (linux_store_registers): Ditto.
4390 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
4391 (initialize_low): Don't initialize the target_regsets here. Call
4392 initialize_low_arch.
4393 * linux-low.h (target_regsets): Delete declaration.
4394 (struct regsets_info): New.
4395 (struct usrregs_info): New.
4396 (struct regs_info): New.
4397 (struct process_info_private) <new_inferior>: New field.
4398 (struct linux_target_ops): Delete the num_regs, regmap, and
4399 regset_bitmap fields. New field regs_info.
4400 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
4401 * i387-fp.c (num_xmm_registers): Delete.
4402 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
4403 calls to new interface.
4404 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
4405 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
4406 Infer the number of xmm registers from the regcache's target
4407 description.
4408 * i387-fp.h (num_xmm_registers): Delete.
4409 * inferiors.c (add_thread): Don't install the thread's regcache
4410 here.
4411 * proc-service.c (gregset_info): Fetch the current inferior's
4412 regs_info. Adjust to use it.
4413 * regcache.c: Include tdesc.h.
4414 (register_bytes, reg_defs, num_registers)
4415 (gdbserver_expedite_regs): Delete.
4416 (get_thread_regcache): If the thread doesn't have a regcache yet,
4417 create one, instead of aborting gdbserver.
4418 (regcache_invalidate_one): Rename to ...
4419 (regcache_invalidate_thread): ... this.
4420 (regcache_invalidate_one): New.
4421 (regcache_invalidate): Only invalidate registers of the current
4422 process.
4423 (init_register_cache): Add target_desc parameter, and use it.
4424 (new_register_cache): Ditto. Assert the target description has a
4425 non zero registers_size.
4426 (regcache_cpy): Add assertions. Adjust.
4427 (realloc_register_cache, set_register_cache): Delete.
4428 (registers_to_string, registers_from_string): Adjust.
4429 (find_register_by_name, find_regno, find_register_by_number)
4430 (register_cache_size): Add target_desc parameter, and use it.
4431 (free_register_cache_thread, free_register_cache_thread_one)
4432 (regcache_release, register_cache_size): New.
4433 (register_size): Add target_desc parameter, and use it.
4434 (register_data, supply_register, supply_register_zeroed)
4435 (supply_regblock, supply_register_by_name, collect_register)
4436 (collect_register_as_string, collect_register_by_name): Adjust.
4437 * regcache.h (struct target_desc): Forward declare.
4438 (struct regcache) <tdesc>: New field.
4439 (init_register_cache, new_register_cache): Add target_desc
4440 parameter.
4441 (regcache_invalidate_thread): Declare.
4442 (regcache_invalidate_one): Delete declaration.
4443 (regcache_release): Declare.
4444 (find_register_by_number, register_cache_size, register_size)
4445 (find_regno): Add target_desc parameter.
4446 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
4447 declarations.
4448 * remote-utils.c: Include tdesc.h.
4449 (outreg, prepare_resume_reply): Adjust.
4450 * server.c: Include tdesc.h.
4451 (gdbserver_xmltarget): Delete declaration.
4452 (get_features_xml, process_serial_event): Adjust.
4453 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
4454 declare.
4455 (struct process_info) <tdesc>: New field.
4456 (ipa_tdesc): Declare.
4457 * tdesc.c: New file.
4458 * tdesc.h: New file.
4459 * tracepoint.c: Include tdesc.h.
4460 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
4461 (get_context_regcache): Adjust to pass ipa_tdesc down.
4462 (do_action_at_tracepoint): Adjust to get the register cache size
4463 from the context regcache's description.
4464 (traceframe_walk_blocks): Adjust to get the register cache size
4465 from the current trace frame's description.
4466 (traceframe_get_pc): Adjust to get current trace frame's
4467 description and pass it down.
4468 (gdb_collect): Adjust to get the register cache size from the
4469 IPA's description.
4470 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
4471 (gdbserver_xmltarget): Delete.
4472 (initialize_low_tracepoint): Set the ipa's target description.
4473 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
4474 (initialize_low_tracepoint): Set the ipa's target description.
4475 * linux-x86-low.c: Include tdesc.h.
4476 [__x86_64__] (is_64bit_tdesc): New.
4477 (ps_get_thread_area, x86_get_thread_area): Use it.
4478 (i386_cannot_store_register): Rename to ...
4479 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
4480 (i386_cannot_fetch_register): Rename to ...
4481 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
4482 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
4483 to new interface.
4484 (target_regsets): Rename to ...
4485 (x86_regsets): ... this.
4486 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
4487 interface.
4488 (x86_siginfo_fixup): Use is_64bit_tdesc.
4489 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
4490 (tdesc_x32_avx_linux, tdesc_x32_linux)
4491 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
4492 Declare.
4493 (x86_linux_update_xmltarget): Delete.
4494 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
4495 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
4496 (AMD64_LINUX_USER64_CS): New.
4497 (x86_linux_read_description): New, based on
4498 x86_linux_update_xmltarget.
4499 (same_process_callback): New.
4500 (x86_arch_setup_process_callback): New.
4501 (x86_linux_update_xmltarget): New.
4502 (x86_regsets_info): New.
4503 (amd64_linux_regs_info): New.
4504 (i386_linux_usrregs_info): New.
4505 (i386_linux_regs_info): New.
4506 (x86_linux_regs_info): New.
4507 (x86_arch_setup): Reimplement.
4508 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
4509 (x86_emit_ops): Ditto.
4510 (the_low_target): Adjust. Install x86_linux_regs_info,
4511 x86_cannot_fetch_register, and x86_cannot_store_register.
4512 (initialize_low_arch): New.
4513 * linux-ia64-low.c (tdesc_ia64): Declare.
4514 (ia64_fetch_register): Adjust.
4515 (ia64_usrregs_info, regs_info): New globals.
4516 (ia64_regs_info): New function.
4517 (the_low_target): Adjust.
4518 (initialize_low_arch): New function.
4519 * linux-sparc-low.c (tdesc_sparc64): Declare.
4520 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
4521 Adjust.
4522 (sparc_arch_setup): New function.
4523 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
4524 (the_low_target): Adjust.
4525 (initialize_low_arch): New function.
4526 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
4527 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
4528 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
4529 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
4530 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
4531 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
4532 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
4533 (tdesc_powerpc_isa205_vsx64l): Declare.
4534 (ppc_cannot_store_register, ppc_collect_ptrace_register)
4535 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
4536 (ppc_set_pc, ppc_get_hwcap): Adjust.
4537 (ppc_usrregs_info): Forward declare.
4538 (!__powerpc64__) ppc_regmap_adjusted: New global.
4539 (ppc_arch_setup): Adjust to the current process'es target
4540 description.
4541 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
4542 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
4543 (ppc_store_evrregset): Adjust.
4544 (target_regsets): Rename to ...
4545 (ppc_regsets): ... this, and make static.
4546 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
4547 (ppc_regs_info): New function.
4548 (the_low_target): Adjust.
4549 (initialize_low_arch): New function.
4550 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
4551 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
4552 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
4553 (tdesc_s390x_linux64v2): Declare.
4554 (s390_collect_ptrace_register, s390_supply_ptrace_register)
4555 (s390_fill_gregset, s390_store_last_break): Adjust.
4556 (target_regsets): Rename to ...
4557 (s390_regsets): ... this, and make static.
4558 (s390_get_pc, s390_set_pc): Adjust.
4559 (s390_get_hwcap): New target_desc parameter, and use it.
4560 [__s390x__] (have_hwcap_s390_high_gprs): New global.
4561 (s390_arch_setup): Adjust to set the current process'es target
4562 description. Don't adjust the regmap.
4563 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
4564 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
4565 (regs_info_3264): New globals.
4566 (s390_regs_info): New function.
4567 (the_low_target): Adjust.
4568 (initialize_low_arch): New function.
4569 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
4570 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
4571 [__mips64] (init_registers_mips_linux)
4572 (init_registers_mips_dsp_linux): Delete defines.
4573 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
4574 (have_dsp): New global.
4575 (mips_read_description): New, based on mips_arch_setup.
4576 (mips_arch_setup): Reimplement.
4577 (get_usrregs_info): New function.
4578 (mips_cannot_fetch_register, mips_cannot_store_register)
4579 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
4580 (mips_fill_fpregset, mips_store_fpregset): Adjust.
4581 (target_regsets): Rename to ...
4582 (mips_regsets): ... this, and make static.
4583 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
4584 (dsp_regs_info, regs_info): New globals.
4585 (mips_regs_info): New function.
4586 (the_low_target): Adjust.
4587 (initialize_low_arch): New function.
4588 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
4589 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
4590 Declare.
4591 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
4592 (arm_read_description): New, with bits factored from
4593 arm_arch_setup.
4594 (arm_arch_setup): Reimplement.
4595 (target_regsets): Rename to ...
4596 (arm_regsets): ... this, and make static.
4597 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
4598 (arm_regs_info): New function.
4599 (the_low_target): Adjust.
4600 (initialize_low_arch): New function.
4601 * linux-m68k-low.c (tdesc_m68k): Declare.
4602 (target_regsets): Rename to ...
4603 (m68k_regsets): ... this, and make static.
4604 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
4605 (m68k_regs_info): New function.
4606 (m68k_arch_setup): New function.
4607 (the_low_target): Adjust.
4608 (initialize_low_arch): New function.
4609 * linux-sh-low.c (tdesc_sharch): Declare.
4610 (target_regsets): Rename to ...
4611 (sh_regsets): ... this, and make static.
4612 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
4613 (sh_regs_info, sh_arch_setup): New functions.
4614 (the_low_target): Adjust.
4615 (initialize_low_arch): New function.
4616 * linux-bfin-low.c (tdesc_bfin): Declare.
4617 (bfin_arch_setup): New function.
4618 (bfin_usrregs_info, regs_info): New globals.
4619 (bfin_regs_info): New function.
4620 (the_low_target): Adjust.
4621 (initialize_low_arch): New function.
4622 * linux-cris-low.c (tdesc_cris): Declare.
4623 (cris_arch_setup): New function.
4624 (cris_usrregs_info, regs_info): New globals.
4625 (cris_regs_info): New function.
4626 (the_low_target): Adjust.
4627 (initialize_low_arch): New function.
4628 * linux-cris-low.c (tdesc_crisv32): Declare.
4629 (cris_arch_setup): New function.
4630 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
4631 (cris_regs_info): New function.
4632 (the_low_target): Adjust.
4633 (initialize_low_arch): New function.
4634 * linux-m32r-low.c (tdesc_m32r): Declare.
4635 (m32r_arch_setup): New function.
4636 (m32r_usrregs_info, regs_info): New globals.
4637 (m32r_regs_info): Adjust.
4638 (initialize_low_arch): New function.
4639 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
4640 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
4641 (tic6x_usrregs_info): Forward declare.
4642 (tic6x_read_description): New function, based on ...
4643 (tic6x_arch_setup): ... this. Reimplement.
4644 (target_regsets): Rename to ...
4645 (tic6x_regsets): ... this, and make static.
4646 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
4647 (tic6x_regs_info): New function.
4648 (the_low_target): Adjust.
4649 (initialize_low_arch): New function.
4650 * linux-xtensa-low.c (tdesc_xtensa): Declare.
4651 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
4652 (target_regsets): Rename to ...
4653 (xtensa_regsets): ... this, and make static.
4654 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
4655 globals.
4656 (xtensa_arch_setup, xtensa_regs_info): New functions.
4657 (the_low_target): Adjust.
4658 (initialize_low_arch): New function.
4659 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
4660 (nios2_arch_setup): Set the current process'es tdesc.
4661 (target_regsets): Rename to ...
4662 (nios2_regsets): ... this.
4663 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
4664 (nios2_regs_info): New function.
4665 (the_low_target): Adjust.
4666 (initialize_low_arch): New function.
a261b8f5
PA
4667 * linux-aarch64-low.c (tdesc_aarch64): Declare.
4668 (aarch64_arch_setup): Set the current process'es tdesc.
4669 (target_regsets): Rename to ...
4670 (aarch64_regsets): ... this.
4671 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
4672 (aarch64_regs_info): New function.
4673 (the_low_target): Adjust.
4674 (initialize_low_arch): New function.
3aee8918
PA
4675 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
4676 globals.
4677 (target_regsets): Rename to ...
4678 (tile_regsets): ... this.
4679 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
4680 (tile_regs_info): New function.
4681 (tile_arch_setup): Set the current process'es tdesc.
4682 (the_low_target): Adjust.
4683 (initialize_low_arch): New function.
4684 * spu-low.c (tdesc_spu): Declare.
4685 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
4686 * win32-arm-low.c (tdesc_arm): Declare.
4687 (arm_arch_setup): New function.
4688 (the_low_target): Install arm_arch_setup instead of
4689 init_registers_arm.
4690 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
4691 (init_windows_x86): Rename to ...
4692 (i386_arch_setup): ... this. Set `win32_tdesc'.
4693 (the_low_target): Adjust.
4694 * win32-low.c (win32_tdesc): New global.
4695 (child_add_thread): Don't create the thread cache here.
4696 (do_initial_child_stuff): Set the new process'es tdesc.
4697 * win32-low.h (struct target_desc): Forward declare.
4698 (win32_tdesc): Declare.
4699 * lynx-i386-low.c (tdesc_i386): Declare global.
4700 (lynx_i386_arch_setup): Set `lynx_tdesc'.
4701 * lynx-low.c (lynx_tdesc): New global.
4702 (lynx_add_process): Set the new process'es tdesc.
4703 * lynx-low.h (struct target_desc): Forward declare.
4704 (lynx_tdesc): Declare global.
4705 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
4706 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
4707 * nto-low.c (nto_tdesc): New global.
4708 (do_attach): Set the new process'es tdesc.
4709 * nto-low.h (struct target_desc): Forward declare.
4710 (nto_tdesc): Declare.
4711 * nto-x86-low.c (tdesc_i386): Declare.
4712 (nto_x86_arch_setup): Set `nto_tdesc'.
4713
b1fbec62
GB
47142013-06-04 Gary Benson <gbenson@redhat.com>
4715
4716 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
4717 to qSupported response when appropriate.
4718 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
4719 with nonzero-length annex.
4720 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
4721 arguments supplied in annex.
4722
d1ec4ce7
DE
47232013-05-31 Doug Evans <dje@google.com>
4724
ac44adcb 4725 PR server/15594
d1ec4ce7
DE
4726 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
4727 64 bits in 64-cross-32 environment.
4728
9b25f2d3
PA
47292013-05-28 Pedro Alves <palves@redhat.com>
4730
4731 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
4732 (aarch64-without-fpu.c): Delete rule.
4733 * configure.srv (aarch64*-*-linux*): Remove references to
4734 aarch64-without-fpu.o and aarch64-without-fpu.xml.
4735 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
4736 declaration.
4737
6740dc9c
PA
47382013-05-24 Pedro Alves <palves@redhat.com>
4739
4740 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
4741 instead of strchr/decode_address. Error if the range isn't split
4742 with a ','. Don't assume there's be a ':' in the action.
4743
c2d6af84
PA
47442013-05-23 Yao Qi <yao@codesourcery.com>
4745 Pedro Alves <palves@redhat.com>
4746
4747 * linux-low.c (lwp_in_step_range): New function.
4748 (linux_wait_1): If the thread was range stepping and stopped
4749 outside the stepping range, report the stop to GDB. Otherwise,
4750 continue stepping. Add range stepping debug output.
4751 (linux_set_resume_request): Copy the step range from the resume
4752 request to the lwp.
4753 (linux_supports_range_stepping): New.
4754 (linux_target_ops) <supports_range_stepping>: Set to
4755 linux_supports_range_stepping.
4756 * linux-low.h (struct linux_target_ops)
4757 <supports_range_stepping>: New field.
4758 (struct lwp_info) <step_range_start, step_range_end>: New fields.
4759 * linux-x86-low.c (x86_supports_range_stepping): New.
4760 (the_low_target) <supports_range_stepping>: Set to
4761 x86_supports_range_stepping.
4762 * server.c (handle_v_cont): Handle 'r' action.
4763 (handle_v_requests): Append ";r" if the target supports range
4764 stepping.
4765 * target.h (struct thread_resume) <step_range_start,
4766 step_range_end>: New fields.
4767 (struct target_ops) <supports_range_stepping>:
4768 New field.
4769 (target_supports_range_stepping): New macro.
4770
58794e1a
JB
47712013-05-17 Joel Brobecker <brobecker@adacore.com>
4772
4773 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
4774 confusion in comment.
4775
d631c5a7
JB
47762013-05-17 Joel Brobecker <brobecker@adacore.com>
4777
4778 * lynx-low.c (struct process_info_private): New type.
4779 (lynx_add_process): New function.
4780 (lynx_create_inferior, lynx_attach): Replace calls to
4781 add_process by calls to lynx_add_process.
4782 (lynx_resume): If PTID is null, then try using
4783 current_process()->private->last_wait_event_ptid.
4784 Add comments.
4785 (lynx_clear_inferiors): Delete. The contents of that function
4786 has been inlined in lynx_mourn;
4787 (lynx_wait_1): Save the ptid in the process's private data.
4788 (lynx_mourn): Free the process' private data. Replace call
4789 to lynx_clear_inferiors by call to clear_inferiors.
4790
96f7a20f
YQ
47912013-05-17 Yao Qi <yao@codesourcery.com>
4792
4793 * i386-low.c (i386_length_and_rw_bits): Move the comment to
4794 the right place.
4795
db0dfaa0
LM
47962013-05-16 Luis Machado <lgustavo@codesourcery.com>
4797
4798 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
4799 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
4800 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
4801 PT_TEXT_END_ADDR guards. Update comments.
4802 (linux_target_op) <read_offsets>: Conditionally define to
4803 linux_read_offsets if the target is UCLIBC and if it defines
4804 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
4805
68f5f838
SL
48062013-05-06 Sandra Loosemore <sandra@codesourcery.com>
4807 Andrew Jenner <andrew@codesourcery.com>
4808
4809 * Makefile.in (SFILES): Add linux-nios2-low.c.
4810 (clean): Add action to delete nios2-linux.c.
4811 (nios2-linux.c): New rule.
4812 * configure.srv: Add nios2*-*-linux*.
4813 * linux-nios2-low.c: New.
4814
1ebff1fd
HAQ
48152013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
4816
4817 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
4818
f6150862
HZ
48192013-04-25 Hui Zhu <hui@codesourcery.com>
4820
4821 PR gdb/15186
f6150862
HZ
4822 * ax.c (ax_printf): Add fflush.
4823
614c279d
TT
48242013-04-22 Tom Tromey <tromey@redhat.com>
4825
4826 * Makefile.in (SFILES): Add filestuff.c.
4827 (OBS): Add filestuff.o.
4828 (filestuff.o): New target.
4829 * config.in, configure: Rebuild.
4830 * configure.ac: Check for fdwalk, pipe2.
4831
7d4e5717
PA
48322013-04-17 Pedro Alves <palves@redhat.com>
4833
4834 * configure.ac (USE_THREAD_DB): Delete variable.
4835 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
4836 Don't AC_SUBST USE_THREAD_DB.
4837 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
4838 * config.in, configure: Regenerate.
4839
d5c93e41
PA
48402013-04-16 Pedro Alves <palves@redhat.com>
4841
4842 * linux-low.h (struct lwp_info) <thread_known>: Move under
4843 the USE_THREAD_DB #ifdef.
4844
04f5fe89
PA
48452013-04-16 Pedro Alves <palves@redhat.com>
4846
4847 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
4848 (linux-low.o): Delete rule.
4849 * linux-low.h: Always include "gdb_thread_db.h" instead of
4850 conditionally including thread_db.h.
4851 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
4852 HAVE_THREAD_DB_H.
4853
480b27bf
JK
48542013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
4855
4856 * Makefile.in (install-only): Fix make install regression.
4857
43662968
JK
48582013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
4859
4860 Convert man pages to texinfo, new gdbinit.5 texinfo page.
4861 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
4862 installation.
4863 * gdbserver.1: Remove.
4864
3e74e146
PA
48652013-03-22 Pedro Alves <palves@redhat.com>
4866
4867 * linux-low.c (handle_extended_wait): Don't call
4868 linux_enable_event_reporting.
4869
a8347a2a
TT
48702013-03-15 Tony Theodore <tonyt@logyst.com>
4871
4872 PR build/9098:
4873 * Makefile.in (SHELL): Use @SHELL@.
4874
eeb56fa7
SDJ
48752013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
4876
4877 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
4878 compiler warning.
4879
4fa7e2ff
JB
48802013-03-13 Joel Brobecker <brobecker@adacore.com>
4881
4882 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
4883 Remove extraneous NULL element.
4884
8ddb1965
YQ
48852013-03-13 Yao Qi <yao@codesourcery.com>
4886
4887 * tracepoint.c (traceframe_read_tsv): Look for the last matched
4888 'V' block in trace frame.
4889
9accd112
MM
48902013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4891
4892 * target.h (struct target_ops): Add btrace ops.
4893 (target_supports_btrace): New macro.
4894 (target_enable_btrace): New macro.
4895 (target_disable_btrace): New macro.
4896 (target_read_btrace): New macro.
4897 * gdbthread.h (struct thread_info): Add btrace field.
4898 * server.c: Include btrace-common.h.
4899 (handle_btrace_general_set): New function.
4900 (handle_btrace_enable): New function.
4901 (handle_btrace_disable): New function.
4902 (handle_general_set): Call handle_btrace_general_set.
4903 (handle_qxfer_btrace): New function.
4904 (struct qxfer qxfer_packets[]): Add btrace entry.
4905 * inferiors.c (remove_thread): Disable btrace.
4906 * linux-low: Include linux-btrace.h.
4907 (linux_low_enable_btrace): New function.
4908 (linux_low_read_btrace): New function.
4909 (linux_target_ops): Add btrace ops.
4910 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
4911 Add srv_linux_btrace=yes.
4912 (x86_64-*-linux*): Add linux-btrace.o.
4913 Add srv_linux_btrace=yes.
4914 * configure.ac: Define HAVE_LINUX_BTRACE.
4915 * config.in: Regenerated.
4916 * configure: Regenerated.
4917
5cc22e4c
MM
49182013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4919
4920 * server.c (handle_qxfer): Preserve error message if -3 is
4921 returned.
4922 (qxfer): Document the -3 return value.
4923
7c97f91e
MM
49242013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4925
4926 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
4927 (linux_btrace_h): New variable.
4928 (linux-btrace.o): New rule.
4929
be9a119c 49302013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
4931 Hafiz Abid Qadeer <abidh@codesourcery.com>
4932
4933 * tracepoint.c (trace_buffer_size): New global.
4934 (DEFAULT_TRACE_BUFFER_SIZE): New define.
4935 (init_trace_buffer): Change to one-argument function. Allocate
4936 trace buffer memory.
4937 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
4938 handle QTBuffer:size packet.
4939 (cmd_bigqtbuffer_size): New function.
4940 (initialize_tracepoint): Call init_trace_buffer with
4941 DEFAULT_TRACE_BUFFER_SIZE.
4942 * server.c (handle_query): Add QTBuffer:size in the
4943 supported packets.
4944
e64f7499
YQ
49452013-03-07 Yao Qi <yao@codesourcery.com>
4946
4947 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
4948 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
4949 of -1.
4950 (cmd_qtsp): Adjust condition. Do post increment.
4951 Set cur_action and cur_step_action back to 0.
4952
f0ae6fc3
PA
49532013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
4954
4955 PR server/15236
4956 * linux-low.c (linux_write_memory): Return early success if LEN is
4957 zero.
4958
b5b0b0af
CV
49592013-03-05 Corinna Vinschen <vinschen@redhat.de>
4960
334ad4a8 4961 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 4962
589bc927
TT
49632013-02-28 Tom Tromey <tromey@redhat.com>
4964
4965 * configure.ac: Invoke AC_SYS_LARGEFILE.
4966 * configure, config.in: Rebuild.
4967
dfe07582
CV
49682013-02-28 Corinna Vinschen <vinschen@redhat.com>
4969
4970 * win32-low.c: Throughout, fix format strings and casts of
4971 printf-like functions to avoid type related warnings on all
4972 platforms.
4973 (get_child_debug_event): Print dwDebugEventCode as hex since
4974 that's how it's usually documented.
4975
736cd585
YQ
49762013-02-28 Yao Qi <yao@codesourcery.com>
4977
4978 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
4979 pulongest.
4980
e1f58301
JW
49812013-02-27 Jiong Wang <jiwang@tilera.com>
4982
4983 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
4984 (reg-tilegx32.c): New rule.
4985 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
4986 * linux-tile-low.c (tile_arch_setup): New function. Invoke
4987 different register info initializer according to elf class.
4988 (init_registers_tilgx32): New function. The tilegx32 register info
4989 initializer.
4990 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
4991 (tile_store_gregset): Likewise.
4992
d171ca78
YQ
49932013-02-27 Yao Qi <yao@codesourcery.com>
4994
4995 * server.c (process_point_options): Print debug message when
4996 debug_threads is true.
4997
282bbdf3
YQ
49982013-02-26 Yao Qi <yao@codesourcery.com>
4999
5000 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
5001
aca22551
PA
50022013-02-19 Pedro Alves <palves@redhat.com>
5003 Kai Tietz <ktietz@redhat.com>
5004
5005 PR gdb/15161
5006
5007 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
5008 instead of strtoul to extract address from packet.
5009 (process_serial_event) <'z'>: Likewise.
5010
4f3cee1c
YQ
50112013-02-18 Yao Qi <yao@codesourcery.com>
5012
5013 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
5014
8e1d55a3
PA
50152013-02-14 Pedro Alves <palves@redhat.com>
5016
5017 Plug memory leak.
5018
5019 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
5020 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
5021
458820da
PA
50222013-02-14 Pedro Alves <palves@redhat.com>
5023
5024 * tracepoint.c (cmd_qtdpsrc): Use savestring.
5025
baea0dae
PA
50262013-02-14 Pedro Alves <palves@redhat.com>
5027
5028 * tracepoint.c (save_string): Delete.
5029 (add_tracepoint_action): Use savestring instead of save_string.
5030
0b1afbb3
PA
50312013-02-12 Pedro Alves <palves@redhat.com>
5032
5033 * linux-xtensa-low.c: Ditto.
5034 * xtensa-xtregs.c: Ditto.
5035
8a4ac37e
PA
50362013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
5037
5038 * thread-db.c (thread_db_get_tls_address): NULL pointer check
5039 thread_db.
5040
148de6bb
MS
50412013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
5042
5043 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
5044 aarch64_num_wp_regs and aarch64_num_bp_regs to
5045 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
5046
55fac6e0
MS
50472013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
5048
5049 * linux-aarch64-low.c (ps_get_thread_area): Replace
5050 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
5051
176eb98c
MS
50522013-02-04 Jim MacArthur <jim.macarthur@arm.com>
5053 Marcus Shawcroft <marcus.shawcroft@arm.com>
5054 Nigel Stephens <nigel.stephens@arm.com>
5055 Yufeng Zhang <yufeng.zhang@arm.com>
5056
5057 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
5058 (aarch64.c, aarch64-without-fpu.c): New targets.
5059 * configure.srv (aarch64*-*-linux*): New.
5060 * linux-aarch64-low.c: New file.
5061
56f7af9c
MS
50622013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
5063
43aaf8b6 5064 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
5065 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
5066 (dequeue_one_deferred_signal, linux_resume_one_thread)
5067 (fetch_register, linux_write_memory, linux_enable_event_reporting)
5068 (linux_tracefork_grandchild, linux_test_for_tracefork)
5069 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
5070 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
5071 where the argument is 0.
5072
60f662b0
YQ
50732013-01-25 Yao Qi <yao@codesourcery.com>
5074
5075 * event-loop.c: Include "queue.h".
5076 (gdb_event_p): New typedef.
5077 (struct gdb_event) <next_event>: Remove.
5078 (event_queue): Change to QUEUE(gdb_event_p).
5079 (async_queue_event): Remove.
5080 (gdb_event_xfree): New.
5081 (initialize_event_loop): New.
5082 (process_event): Use API from QUEUE.
5083 (wait_for_event): Likewise.
5084 * server.c (main): Call initialize_event_loop.
5085 * server.h (initialize_event_loop): Declare.
5086
5ae4861a
YQ
50872013-01-18 Yao Qi <yao@codesourcery.com>
5088
5089 * ax.h (struct eval_agent_expr_context): New.
5090 (gdb_eval_agent_expr): Update declaration.
5091 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
5092 TFRAME. Add new argument CTX.
5093 * server.h (struct eval_agent_expr_context): Declare.
5094 (agent_mem_read, agent_tsv_read): Update declaration.
5095 (agent_mem_read_string): Likewise.
5096 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
5097 (add_traceframe_block): Add new argument TPOINT.
5098 Increase TPOINT->traceframe_usage.
5099 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
5100 eval_tracepoint_agent_expr.
5101 (condition_true_at_tracepoint): Likewise.
5102 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
5103 (agent_mem_read_string, agent_tsv_read): Likewise.
5104
85e00e85
YQ
51052013-01-16 Yao Qi <yao@codesourcery.com>
5106
5107 * linux-low.c (linux_resume_one_lwp): Don't check
5108 'lwp->bp_reinsert != 0'.
5109
4039cf45
JB
51102013-01-07 Joel Brobecker <brobecker@adacore.com>
5111 Pedro Alves <palves@redhat.com>
5112
5113 * lynx-low.c (ptrace_request_to_str): Define a temporary
5114 macro and use it to simplify this function's implementation.
5115
9044dee2
JB
51162013-01-07 Joel Brobecker <brobecker@adacore.com>
5117
5118 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
5119 sets errno.
5120
e6352c8f
JB
51212013-01-07 Joel Brobecker <brobecker@adacore.com>
5122
5123 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
5124
50681a27
JB
51252013-01-07 Joel Brobecker <brobecker@adacore.com>
5126
5127 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
5128
3f6e77ef
JB
51292013-01-07 Joel Brobecker <brobecker@adacore.com>
5130
5131 * lynx-low.c (lynx_resume): Use the resume_info parameter
5132 to determine the ptid for the lynx_ptrace call, unless
5133 it is equal to minus_one_ptid, in which case we use the
5134 ptid of the current_inferior.
5135 (lynx_wait_1): After having received a thread create/exit
5136 event, resume the inferior's execution using the signaling
5137 thread's ptid, rather than the old ptid.
5138
7fda33ae
JB
51392013-01-07 Joel Brobecker <brobecker@adacore.com>
5140
5141 * lynx-low.c (lynx_resume): Delete variable ret.
5142
b9786c74
JB
51432013-01-01 Joel Brobecker <brobecker@adacore.com>
5144
5145 * gdbreplay.c (gdbreplay_version): Update copyright year.
5146 * server.c (gdbserver_version): Likewise.
5147
8b93d60f
JB
51482012-12-17 Joel Brobecker <brobecker@adacore.com>
5149
5150 * lynx-low.c (lynx_wait_1): Add debug trace before adding
5151 new thread.
5152
037335a7
JB
51532012-12-17 Joel Brobecker <brobecker@adacore.com>
5154
5155 * lynx-low.c (ptrace_request_to_str): Add handling for
5156 PTRACE_GETTRACESIG.
5157
52d4cbd8
JB
51582012-12-17 Joel Brobecker <brobecker@adacore.com>
5159
5160 * lynx-low.c (lynx_attach): Delete variable new_process.
5161
ab8f6ca9
JB
51622012-12-17 Joel Brobecker <brobecker@adacore.com>
5163
5164 * lynx-low.c (lynx_create_inferior): Delete variable
5165 new_process.
5166
78cbc024
JB
51672012-12-17 Joel Brobecker <brobecker@adacore.com>
5168
5169 * lynx-low.c (ptrace_request_to_str): Do not handle
5170 PTRACE_GETTHREADLIST if this macro does not exist.
5171
14a00470
YQ
51722012-12-15 Yao Qi <yao@codesourcery.com>
5173
5174 * Makefile.in (OBS): Add notif.o.
5175 * notif.c, notif.h: New.
5176 * server.c: Include "notif.h".
5177 (struct vstop_notif) <next>: Remove.
5178 <base>: New field.
5179 (queue_stop_reply): Update.
5180 (push_event, send_next_stop_reply): Remove.
5181 (discard_queued_stop_replies): Update.
5182 (notif_stop): New variable.
5183 (handle_v_stopped): Remove.
5184 (handle_v_requests): Don't call handle_v_stopped. Call
5185 handle_ack_notif instead.
5186 (queue_stop_reply_callback): Call notif_event_enque instead
5187 of queue_stop_reply.
5188 (handle_status): Don't call send_next_stop_reply, call
5189 notif_write_event instead.
5190 (kill_inferior_callback): Likewise.
5191 (detach_or_kill_inferior_callback): Likewise.
5192 (main): Call initialize_notif.
5193 (process_serial_event): Call QUEUE_is_empty.
5194 (handle_target_event): Call notif_push instead of push event.
5195 * server.h (push_event): Remove declaration.
5196
61c125b9
TT
51972012-12-10 Tom Tromey <tromey@redhat.com>
5198
5199 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
5200 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
5201 macros.
5202 (.c.o): Rewrite.
5203 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
5204 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
5205 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
5206 (amd64-linux-ipa.o, ax.o): Rewrite.
5207 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
5208 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
5209 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
5210 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
5211 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
5212 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
5213 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
5214 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
5215 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
5216 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
5217 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
5218 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
5219 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
5220 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
5221 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
5222 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
5223 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
5224 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
5225 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
5226 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
5227 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
5228 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
5229 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
5230 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
5231 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
5232 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
5233 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
5234 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
5235 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
5236 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
5237 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
5238 (reg-tilegx.o): Remove.
5239 (all_object_files): New macro.
5240 Include .deps files.
5241 * aclocal.m4, configure: Rebuild.
5242 * acinclude.m4: Include depstand.m4, lead-dot.m4.
5243 * configure.ac: Invoke ZW_CREATE_DEPDIR,
5244 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
5245
e90e9ad9
TT
52462012-12-05 Tom Tromey <tromey@redhat.com>
5247
5248 PR gdb/14917:
5249 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
5250
02d403bf 52512012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
5252
5253 * configure.ac: Check for linux/perf_event.h.
5254 * config.in: Regenerated.
5255 * configure: Regenerated.
5256
0270a750
PA
52572012-11-26 Maxime Villard <rustyBSD@gmx.fr>
5258
5259 * hostio.c (handle_readlink): Decrease buffer size
5260 parameter passed to readlink by one byte.
5261
8c29b58e
YQ
52622012-11-26 Yao Qi <yao@codesourcery.com>
5263
5264 * configure.ac (build_warnings): Append '-Wempty-body'.
5265 * configure: Regenerated.
5266 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
5267 body.
5268
8bdce1ff
PM
52692012-11-15 Pierre Muller <muller@sourceware.org>
5270
5271 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
5272 * config.in: Regenerate.
5273 * configure: Regenerate.
5274 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
5275 Use "gdb_wait.h" header instead of <sys/wait.h> header.
5276 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
5277 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
5278 header.
5279 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
5280 instead of <sys/wait.h> header.
5281 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
5282
02d403bf 52832012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
5284
5285 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
5286 (various make rules): Remove -DGDBSERVER
5287
fbd5db48
YQ
52882012-11-09 Yao Qi <yao@codesourcery.com>
5289
5290 * spu-low.c (current_ptid): Move it to ..
5291 * gdbthread.h: ... here. New.
5292 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
5293 * server.c (myresume, process_serial_event): Likewise.
5294 * thread-db.c (thread_db_find_new_threads): Likewise.
5295 * tracepoint.c (run_inferior_command): Likewise.
5296
b3dc46ff
AB
52972012-10-01 Andrew Burgess <aburgess@broadcom.com>
5298
5299 * server.c (handle_search_memory_1): Include access length in
5300 warning message.
5301
07c04788
HPN
53022012-09-05 Michael Brandt <michael.brandt@axis.com>
5303
5304 * linux-crisv32-low.c: Fix compile errors.
5305
918d227b
YQ
53062012-09-04 Yao Qi <yao@codesourcery.com>
5307
5308 * tracepoint.c (cmd_qtsv): Adjust debug message.
5309 Don't check CUR_TPOINT.
5310
18c1b81a
YQ
53112012-08-28 Yao Qi <yao@codesourcery.com>
5312
5313 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
5314 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
5315 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
5316 Remove declarations of xmalloc, xreallloc, xstrdup and
5317 freeargv.
5318 * Makefile.in (libiberty_h): New.
5319 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
5320 (linux-bfin-low.o): Append dependency 'libiberty.h'.
5321
dc82f37b
YQ
53222012-08-23 Yao Qi <yao@codesourcery.com>
5323
5324 * server.h: Remove declaration of 'xsnprintf'.
5325
406b1477
KS
53262012-08-22 Keith Seitz <keiths@redhat.com>
5327
5328 * server.h: Include build-gnulib-gbserver/config.h.
5329 * gdbreplay.c: Likewise.
5330
e6712ff1
DE
53312012-08-08 Doug Evans <dje@google.com>
5332
5333 * Makefile.in (SFILES): Add gdb_vecs.c.
5334 (OBS): Add gdb_vecs.o.
5335 (gdb_vecs_h, host_defs_h): New variables.
5336 (thread-db.o): Add $(gdb_vecs_h) dependency.
5337 (gdb_vecs.o): New rule.
5338 * thread-db.c: #include "gdb_vecs.h".
5339 (thread_db_load_search): Use a vector to iterate over path elements.
5340 Handle text appearing after "$pdir".
5341
5342 * configure.ac: Add check for strstr.
5343 * config.in: Regenerate.
5344 * configure: Regenerate.
5345
7c3270ae
UW
53462012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
5347
5348 * hostio.c (handle_pread): If pread fails, fall back to attempting
5349 lseek/read.
5350 (handle_pwrite): Likewise for pwrite.
5351
b62e2b27
UW
53522012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
5353
5354 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
5355 between unsupported TYPE and unimplementable ADDR/LEN combination.
5356 (arm_insert_point): Act on new return value.
5357
78a99e91
PA
53582012-07-31 Pedro Alves <palves@redhat.com>
5359
5360 * server.c (process_point_options): Only skip tokens if we find
5361 one that is unrecognized. Don't treat 'X' specially while
5362 skipping unrecognized tokens.
5363
fcf303ab
UW
53642012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
5365
5366 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
5367 to 4-byte-align HW breakpoint addresses for Thumb.
5368
7255706c
YQ
53692012-07-27 Yao Qi <yao@codesourcery.com>
5370
5371 PR remote/14161.
5372
5373 * server.h: Declare gdb_agent_about_to_close.
5374 * target.c (kill_inferior): Include "agent.h".
5375 New. Send command 'kill'.
5376 * target.h (kill_inferior): Removed macro.
5377 * tracepoint.c (gdb_agent_about_to_close): New.
5378 (gdb_agent_helper_thread): Handle command 'close'.
5379 Wait endlessly until the inferior stops.
5380 Install gdb_agent_remove_socket to atexit hook.
5381 (agent_socket_name): New static variable.
5382 (gdb_agent_socket_init): Replace local variable 'name' with
5383 'agent_socket_name'.
5384 (gdb_agent_remove_socket): New.
5385
5a3f286f
YQ
53862012-07-27 Yao Qi <yao@codesourcery.com>
5387
5388 * server.c (process_point_options): Stop at 'X' when parsing.
5389
961bd387
ME
53902012-07-19 Michael Eager <eager@eagercon.com>
5391
a261b8f5 5392 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
5393 to hw_execute.
5394 * linux-x86-low.c (x86_insert_point, x86_remove_point):
5395 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
5396 hardware breakpoint.
5397
aa7c7447
JK
53982012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5399
5400 * gdbserver/linux-low.c (initialize_low): Call
5401 linux_ptrace_init_warnings.
5402
7f216e7c
DE
54032012-07-02 Doug Evans <dje@google.com>
5404
5405 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
5406 pointer to int.
5407
d3ce09f5
SS
54082012-07-02 Stan Shebs <stan@codesourcery.com>
5409
5410 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
5411 (ax.o): Add it to build rule.
5412 (ax-ipa.o): Ditto.
5413 (OBS): Add format.o.
5414 (IPA_OBS): Add format.o.
5415 * server.c (handle_query): Claim support for breakpoint commands.
5416 (process_point_options): Add command case.
5417 (process_serial_event): Leave running if there are printfs in
5418 effect.
5419 * mem-break.h (any_persistent_commands): Declare.
5420 (add_breakpoint_commands): Declare.
5421 (gdb_no_commands_at_breakpoint): Declare.
5422 (run_breakpoint_commands): Declare.
5423 * mem-break.c (struct point_command_list): New struct.
5424 (struct breakpoint): New field command_list.
5425 (any_persistent_commands): New function.
5426 (add_commands_to_breakpoint): New function.
5427 (add_breakpoint_commands): New function.
5428 (gdb_no_commands_at_breakpoint): New function.
5429 (run_breakpoint_commands): New function.
5430 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
5431 locally.
5432 * ax.c: Include format.h.
5433 (ax_printf): New function.
5434 (gdb_eval_agent_expr): Add printf opcode.
5435
2f8f6aed
YQ
54362012-06-13 Yao Qi <yao@codesourcery.com>
5437
5438 * server.c (start_inferior): Remove duplicated writes to fields
5439 'last_resume_kind' and 'last_status' of 'current_inferior'.
5440
0c9070b3
YQ
54412012-06-12 Yao Qi <yao@codesourcery.com>
5442 Pedro Alves <palves@redhat.com>
5443
5444 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
5445 comment.
5446 * server.c (handle_v_cont): Extend comment.
5447
c52daf70
YQ
54482012-06-11 Yao Qi <yao@codesourcery.com>
5449
5450 * linux-low.c (linux_attach): Add 'static'.
5451
d38bbb0a
YQ
54522012-06-06 Yao Qi <yao@codesourcery.com>
5453
5454 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
5455
89dc0afd
JK
54562012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
5457
5458 Fix gcc -flto compilation warning.
5459 * server.c (main): Make variable multi_mode and attach volatile.
5460
75f62ce7
TJB
54612012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5462
5463 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
5464 if the platform doesn't know about it.
5465
65f479b6
PA
54662012-05-30 Jeff Kenton <jkenton@tilera.com>
5467
5468 * Makefile.in (SFILES): Add linux-tile-low.c.
5469 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
5470 * configure.srv: Handle tilegx-*-linux*.
5471 * linux-tile-low.c: New file.
5472
0c5bf5a9
JK
54732012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5474
5475 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
5476
a493e3e2
PA
54772012-05-24 Pedro Alves <palves@redhat.com>
5478
5479 PR gdb/7205
5480
43aaf8b6 5481 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 5482
2ea28649
PA
54832012-05-24 Pedro Alves <palves@redhat.com>
5484
5485 PR gdb/7205
5486
5487 Replace target_signal with gdb_signal throughout.
5488
8d409d16
MR
54892012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
5490
5491 * linux-low.c (linux_store_registers): Avoid the copying sequence
5492 when no data has been retrieved by ptrace.
5493
23512c01
MGD
54942012-05-22 Will Deacon <will.deacon@arm.com>
5495
5496 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
5497 Include asm/ptrace.h.
5498 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
5499 already defined.
5500
4934b29e
MR
55012012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
5502
5503 * linux-low.c (linux_store_registers): Don't re-retrieve data
5504 with ptrace that has already been obtained from /proc. Always
5505 copy any data retrieved with ptrace to the buffer supplied.
5506
bde24c0a
PA
55072012-05-11 Yao Qi <yao@codesourcery.com>
5508 Pedro Alves <palves@redhat.com>
5509
5510 * linux-low.c (enum stopping_threads_kind): New.
5511 (stopping_threads): Change type to `enum stopping_threads_kind'.
5512 (handle_extended_wait): If stopping and suspending threads, leave
5513 the new_lwp suspended too.
5514 (linux_wait_for_event): Adjust.
5515 (stop_all_lwps): Set `stopping_threads' to
5516 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
5517 whether we're suspending threads or just stopping them. Assert no
5518 recursion happens.
5519
623b6bdf
YQ
55202012-04-29 Yao Qi <yao@codesourcery.com>
5521
5522 * server.h: Move some code to ...
5523 * gdbthread.h: ... here. New.
5524 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
5525 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
5526 (nto-low.o, win32-low.o): Likewise.
5527 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
5528 * regcache.c, remote-utils.c, server.c: Likewise.
5529 * target.c, tracepoint.c, win32-low.c: Likewise.
5530
f15f9948
TJB
55312012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5532
5533 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
5534 (PTRACE_ARG4_TYPE): Likewise.
5535 (PTRACE_XFER_TYPE): Likewise.
5536 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
5537 ptrace to PTRACE_ARG3_TYPE.
5538 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
5539 (PTRACE_ARG4_TYPE): Likewise.
5540 (PTRACE_XFER_TYPE): Likewise.
5541 (linux_detach_one_lwp): Cast fourth argument of
5542 ptrace to long then PTRACE_ARG4_TYPE.
5543 (regsets_fetch_inferior_registers): Cast third argument of
5544 ptrace to long then PTRACE_ARG3_TYPE.
5545 (regsets_store_inferior_registers): Likewise.
5546
38ea300a
PA
55472012-04-20 Pedro Alves <palves@redhat.com>
5548
5549 * configure: Regenerate.
5550
c971b7fa
PA
55512012-04-19 Pedro Alves <palves@redhat.com>
5552
43aaf8b6 5553 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 5554 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
5555 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
5556 (all, install-only, uninstall, clean-info, all-lib, clean): No
5557 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
5558 (maintainer-clean realclean distclean): Use subdir_do.
5559 (subdir_do): New.
5560 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 5561 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
5562 * acinclude.m4: Include acx_configure_dir.m4.
5563 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
5564 calls. Call AC_PROG_RANLIB. Configure gnulib using
5565 ACX_CONFIGURE_DIR.
5566 (GNULIB): New.
5567 (GNULIB_STDINT_H): Adjust.
5568 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
5569 * gdbreplay.c: Include build-gnulib/config.h.
5570 * server.h: Likewise.
5571 * aclocal.m4: Regenerate.
5572 * config.in: Regenerate.
5573 * configure: Regenerate.
c971b7fa 5574
809277f8
PA
55752012-04-19 Pedro Alves <palves@redhat.com>
5576
5577 * Makefile.in (LIBGNU, INCGNU): Adjust.
5578 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
5579 (all, install-only, uninstall, clean-info, all-lib, clean)
5580 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
5581 * configure.ac: Adjust AC_OUTPUT output.
5582 * aclocal.m4: Regenerate.
5583 * configure: Regenerate.
5584
fd9bb8b8
PA
55852012-04-19 Pedro Alves <palves@redhat.com>
5586
5587 * Makefile.in (generated_files): New.
5588 (server_h): Remove the explicit dependency on config.h, and depend
5589 on $generated_files.
5590
1c298c66
PA
55912012-04-19 Pedro Alves <palves@redhat.com>
5592
5593 * Makefile.in (INCGNU): Add -Ignulib.
5594
57c4b50b
PA
55952012-04-19 Pedro Alves <palves@redhat.com>
5596
5597 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
5598 (INCGNU): ... this, and spell out -I here.
5599 (GNULIB_LIB): Rename to ...
5600 (LIBGNU): ... this.
5601 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
5602
1030e047
PA
56032012-04-19 Pedro Alves <palves@redhat.com>
5604
5605 * config.in: Regenerate.
5606
447d4319
PA
56072012-04-19 Pedro Alves <palves@redhat.com>
5608
5609 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
5610 * server.h (memmem): Remove declaration.
5611 * config.in: Regenerate.
5612 * configure: Regenerate.
5613
aad9eab9
YQ
56142012-04-19 Yao Qi <yao@codesourcery.com>
5615
5616 * Makefile.in (SFILES): Add common/vec.c.
5617 (OBS): Add vec.o.
5618 (vec.o): New rule.
5619
3e10640f
YQ
56202012-04-19 Yao Qi <yao@codesourcery.com>
5621
5622 * remote-utils.c (prepare_resume_reply): Replace with macro
5623 target_core_of_thread.
5624 * server.c (handle_qxfer_threads_proper): Likewise.
5625 * target.h (traget_core_of_thread): New macro.
5626
71622373
PA
56272012-04-18 Pedro Alves <palves@redhat.com>
5628
5629 * aclocal.m4: Regenerate.
5630 * configure: Regenerate.
5631
80d26939
YQ
56322012-04-16 Yao Qi <yao@codesourcery.com>
5633
5634 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
5635 duplicated on address.
5636
42476b70
YQ
56372012-04-16 Yao Qi <yao@codesourcery.com>
5638
5639 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
5640 (struct tracepoint_action_ops) <send>: New field.
5641 (m_tracepoint_action_send, r_tracepoint_action_send): New.
5642 (agent_expr_send, x_tracepoint_action_send): New.
5643 (l_tracepoint_action_send): New.
5644 (cmd_qtdp): Download and install tracepoint
5645 according to `use_agent'.
5646 (run_inferior_command): Add one more parameter `len'.
5647 Update callers.
5648 (tracepoint_send_agent): New.
5649 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
5650
7bc83639
YQ
56512012-04-16 Yao Qi <yao@codesourcery.com>
5652
5653 * tracepoint.c (download_tracepoints): Moved to ...
5654 (cmd_qtstart): ... here.
5655
5f18041e
YQ
56562012-04-14 Yao Qi <yao@codesourcery.com>
5657
5658 * tracepoint.c: Include inttypes.h.
5659 (struct collect_memory_action): Use sized types.
5660 (struct tracepoint): Likewise.
5661 (cmd_qtdp, stop_tracing): Update print specifiers.
5662 (cmd_qtp, response_tracepoint): Likewise.
5663 (collect_data_at_tracepoint): Likewise.
5664 (collect_data_at_step): Likewise.
5665
55a8c076
YQ
56662012-04-14 Yao Qi <yao@codesourcery.com>
5667
5668 Import gnulib module inttypes.
5669 * aclocal.m4, config.in, configure: Regenerated.
5670
dc750257
YQ
56712012-04-14 Yao Qi <yao@codesourcery.com>
5672
5673 * Makefile.in (maintainer-clean, realclean, distclean): Remove
5674 Makefile and config.status at last.
5675
0ab5faf9
YQ
56762012-04-13 Yao Qi <yao@codesourcery.com>
5677
5678 * tracepoint.c: Include stdint.h unconditionally.
5679
18f5fd81
TJB
56802012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5681
5682 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
5683 on BFD_HAVE_SYS_PROCFS_TYPE.
5684 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
5685 * configure: Regenerate.
5686 * config.in: Likewise.
5687
4d47af5c
L
56882012-04-13 H.J. Lu <hongjiu.lu@intel.com>
5689
5690 * Makefile.in (clean): Also remove x32.c x32-linux.c
5691 x32-avx.c x32-avx-linux.c.
5692 (x32.o): New target.
5693 (x32.c): Likewise.
5694 (x32-linux.o): Likewise.
5695 (x32-linux.c): Likewise.
5696 (x32-avx.o): Likewise.
5697 (x32-avx.c): Likewise.
5698 (x32-avx-linux.o): Likewise.
5699 (x32-avx-linux.c): Likewise.
5700
5701 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
5702 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
5703 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
5704 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
5705 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
5706 i386/x32-avx-linux.xml.
5707
5708 * linux-x86-low.c (init_registers_x32_linux): New prototype.
5709 (init_registers_x32_avx_linux): Likwise.
5710 (x86_linux_update_xmltarget): Call init_registers_x32_linux
5711 or init_registers_x32_avx_linux if linux_is_elf64 is false.
5712
ecedbe58
PA
57132012-04-13 Pedro Alves <palves@redhat.com>
5714
5715 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
5716 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
5717 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
5718 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
5719 the sub-make.
5720
c92b5177
L
57212012-04-12 H.J. Lu <hongjiu.lu@intel.com>
5722
5723 * linux-x86-low.c (compat_x32_clock_t): New.
5724 (compat_x32_siginfo_t): Likewise.
5725 (compat_x32_siginfo_from_siginfo): Likewise.
5726 (siginfo_from_compat_x32_siginfo): Likewise.
5727 (linux_is_elf64): Likewise.
5728 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
5729 and siginfo_from_compat_x32_siginfo for x32.
5730 (x86_arch_setup): Set linux_is_elf64.
5731
214d508e
L
57322012-04-12 H.J. Lu <hongjiu.lu@intel.com>
5733
5734 PR gdb/13969
5735 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
5736 e_machine field.
5737 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
5738 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
5739 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
5740 compatible with process.
5741
c9a1864a
YQ
57422012-04-12 Yao Qi <yao@codesourcery.com>
5743
5744 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
5745 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
5746 (install-only, install-info, clean): Handle sub dir gnulib.
5747 (all-lib, am--refresh): New targets.
5748 (memmem.o): Remove target.
5749 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
5750 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
5751 (AC_REPLACE_FUNCS): Remove memmem.
5752 Invoke gl_INIT and AM_INIT_AUTOMAKE.
5753 (AC_OUTPUT): Generate Makefile in gnulib/.
5754 * aclocal.m4, config.in, configure: Regenerated.
5755
367ba2c2
MR
57562012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
5757
5758 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
5759
9d236627
PA
57602012-04-05 Pedro Alves <palves@redhat.com>
5761
5762 -Werror=strict-aliasing
5763
5764 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
5765 pointer.
5766
111217b3
PA
57672012-04-04 Pedro Alves <palves@redhat.com>
5768
5769 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
5770 (sparc_store_gregset_from_stack, sparc_store_gregset)
5771 (sparc_breakpoint_at): Fix formatting.
5772
8365dcf5
TJB
57732012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5774
5775 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
5776 are available.
5777 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
5778 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
5779 * config.in: Regenerate.
5780 * configure: Likewise.
5781
689cc2ae
PA
57822012-03-29 Pedro Alves <palves@redhat.com>
5783
5784 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
5785 Correct ptrace arguments.
5786
c14dfd32
PA
57872012-03-28 Pedro Alves <palves@redhat.com>
5788
5789 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
5790 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
5791 (IA64_FR1_REGNUM): New defines.
5792 (ia64_fetch_register): New.
5793 (the_low_target): Install it.
5794 * linux-low.h (struct linux_target_ops) <fetch_register>: New
5795 field.
5796 * linux-low.c (linux_fetch_registers): Try the
5797 the_low_target.fetch_register hook first.
5798
5799 * linux-arm-low.c (the_low_target): Adjust.
5800 * linux-bfin-low.c (the_low_target): Adjust.
5801 * linux-cris-low.c (the_low_target): Adjust.
5802 * linux-crisv32-low.c (the_low_target): Adjust.
5803 * linux-m32r-low.c (the_low_target): Adjust.
5804 * linux-m68k-low.c (the_low_target): Adjust.
5805 * linux-mips-low.c (the_low_target): Adjust.
5806 * linux-ppc-low.c (the_low_target): Adjust.
5807 * linux-s390-low.c (the_low_target): Adjust.
5808 * linux-sh-low.c (the_low_target): Adjust.
5809 * linux-sparc-low.c (the_low_target): Adjust.
5810 * linux-tic6x-low.c (the_low_target): Adjust.
5811 * linux-x86-low.c (the_low_target): Adjust.
5812 * linux-xtensa-low.c (the_low_target): Adjust.
5813
63c88e13
PA
58142012-03-26 Pedro Alves <palves@redhat.com>
5815
5816 * server.c (handle_qxfer_libraries): Don't bail early if
5817 the_target->qxfer_libraries_svr4 is not NULL.
5818
fb723180
PA
58192012-03-26 Pedro Alves <palves@redhat.com>
5820
5821 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
5822
0afae3cf
PA
58232012-03-23 Pedro Alves <palves@redhat.com>
5824
5825 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
5826 "library-list-svr4" element's start tag when the the DSO list is
5827 empty.
5828
485f1ee4
PA
58292012-03-23 Pedro Alves <palves@redhat.com>
5830
5831 * linux-low.c (read_one_ptr): Read the inferior's pointer through
5832 a variable whose type size is the same as the inferior's pointer
5833 size.
5834
a5362b9a
TS
58352012-03-21 Thomas Schwinge <thomas@codesourcery.com>
5836
5837 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
5838 struct siginfo.
5839 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
5840 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
5841 * linux-low.h: Include <signal.h>.
5842 (struct siginfo): Remove forward declaration.
5843 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
5844 struct siginfo.
5845
d226c142
MF
58462012-03-21 Mike Frysinger <vapier@gentoo.org>
5847
5848 * .gitignore: Ignore more files.
5849
122f36ef
PA
58502012-03-19 Pedro Alves <palves@redhat.com>
5851 Jan Kratochvil <jan.kratochvil@redhat.com>
5852
5853 * server.c (cont_thread, general_thread): Add describing comments.
5854 (start_inferior): Clear `cont_thread'.
5855 (handle_v_cont): Don't set `cont_thread' if resuming all threads
5856 of a process.
5857
fc3e5175
YQ
58582012-03-15 Yao Qi <yao@codesourcery.com>
5859
5860 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
5861 handling to ...
5862 (cmd_qtdp): ... here.
5863
8d0d92cd
YQ
58642012-03-15 Yao Qi <yao@codesourcery.com>
5865
5866 * tracepoint.c (struct tracepoint_action_ops): New.
5867 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
5868 (m_tracepoint_action_download): New.
5869 (r_tracepoint_action_download): New.
5870 (x_tracepoint_action_download): New.
5871 (l_tracepoint_action_download): New.
5872 (add_tracepoint_action): Install `action->ops' according type.
5873 (download_tracepoint_1): Move code `download' function pointer
5874 of various tracepoint_action_ops.
5875
87b0bb13
JK
58762012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
5877
5878 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
5879 linux_ptrace_attach_warnings.
5880
5f572dec
JK
58812012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
5882
5883 * Makefile.in (linux-ptrace.o): New.
5884 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
5885 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
5886 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
5887 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
5888 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
5889 of these targets.
5890 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
5891
f4647387
YQ
58922012-03-08 Yao Qi <yao@codesourcery.com>
5893 Pedro Alves <palves@redhat.com>
5894
5895 Fix PR server/13392.
5896 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
5897 offset of JMP insn.
5898 * tracepoint.c (remove_tracepoint): New.
5899 (cmd_qtdp): Call remove_tracepoint when failed to install.
5900
9b224c5e
PA
59012012-03-07 Pedro Alves <palves@redhat.com>
5902
5903 * linux-low.c (get_detach_signal): New.
5904 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
5905 Pass on pending signals to PTRACE_DETACH. Check the result of the
5906 ptrace call.
5907 * server.c (program_signals, program_signals_p): New.
5908 (handle_general_set): Handle QProgramSignals.
5909 * server.h (program_signals, program_signals_p): Declare.
5910
e237a7e2
JK
59112012-03-05 Pedro Alves <palves@redhat.com>
5912 Jan Kratochvil <jan.kratochvil@redhat.com>
5913
5914 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
5915 New comment why.
5916
5808517f
YQ
59172012-03-03 Yao Qi <yao@codesourcery.com>
5918
5919 * tracepoint.c (tracepoint_look_up_symbols): Update call to
5920 agent_look_up_symbols.
5921
58b4daa5
YQ
59222012-03-03 Yao Qi <yao@codesourcery.com>
5923
5924 * Makefile.in (linux-low.o): Keep dependence on agent.h.
5925 (linux-x86-low.o): Likewise.
5926 * server.h: Remove in_process_agent_loaded.
5927 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
5928 common/agent.c.
5929 Update callers.
5930
8ffcbaaf
YQ
59312012-03-03 Yao Qi <yao@codesourcery.com>
5932
5933 * tracepoint.c (gdb_agent_capability): New global.
5934 (in_process_agent_loaded_ust): Renamed to
5935 `in_process_agent_supports_ust'.
5936 Update callers.
5937 (in_process_agent_supports_ust): Call agent_capability_check.
5938 (clear_installed_tracepoints): Assert that agent supports
5939 agent.
5940
d1feda86
YQ
59412012-03-03 Yao Qi <yao@codesourcery.com>
5942
5943 * linux-low.c (linux_supports_agent): New.
5944 (linux_target_ops): Initialize field `supports_agent' with
5945 linux_supports_agent.
5946 * target.h (struct target_ops) <supports_agent>: New.
5947 (target_supports_agent): New macro.
5948 * server.c (handle_general_set): Handle packet 'QAgent'.
5949 (handle_query): Send `QAgent+'.
5950 * Makefile.in (server.o): Depends on agent.h.
5951
2fa291ac
YQ
59522012-03-03 Yao Qi <yao@codesourcery.com>
5953
5954 * Makefile.in (OBS): Add agent.o.
5955 Add new rule for agent.o.
5956 Track dependence of tracepoint.c on agent.h.
5957 * tracepoint.c (run_inferior_command_1):
5958 (run_inferior_command): Call agent_run_command.
5959 (gdb_ust_connect_sync_socket): Deleted. Move it to
5960 common/agent.c.
5961 (resume_thread, stop_thread): Likewise.
5962 (gdb_ust_socket_init): Renamed to ...
5963 (gdb_agent_socket_init): ... New.
5964 (gdb_ust_thread): Renamed to ...
5965 (gdb_agent_helper_thread): ... New.
5966 (gdb_ust_init): Move some code to ...
5967 (gdb_agent_init): ... here. New.
5968 [HAVE_UST]: Call gdb_ust_init.
5969 (initialize_tracepoint_ftlib): Call gdb_agent_init.
5970 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
5971 * config.in, configure: Regenerated.
5972
05044653
PA
59732012-03-02 Pedro Alves <palves@redhat.com>
5974
5975 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
5976 * linux-low.c (struct simple_pid_list): New.
5977 (stopped_pids): New a struct simple_pid_list pointer.
5978 (add_to_pid_list, pull_pid_from_list): New.
5979 (handle_extended_wait): Don't assume the first signal new children
5980 report is SIGSTOP. Adjust call to pull_pid_from_list.
5981 (linux_wait_for_lwp): Adjust.
5982
8d00225b
YQ
59832012-03-02 Yao Qi <yao@codesourcery.com>
5984
5985 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
5986 debug log.
5987
19560ba5
YQ
59882012-03-02 Yao Qi <yao@codesourcery.com>
5989
5990 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
5991 `stop_pc' and `tpoint'. Update caller.
5992
1faeff08
MR
59932012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
5994
5995 * linux-low.h (linux_target_ops): Add regset_bitmap member.
5996 * linux-low.c (use_linux_regsets): New macro.
5997 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
5998 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
5999 (linux_register_in_regsets): New function.
6000 (usr_fetch_inferior_registers): Skip registers covered by
6001 regsets.
6002 (usr_store_inferior_registers): Likewise.
6003 (usr_fetch_inferior_registers): New macro.
6004 (usr_store_inferior_registers): Likewise.
6005 (linux_fetch_registers): Handle mixed regset/non-regset targets.
6006 (linux_store_registers): Likewise.
6007 * linux-mips-low.c (init_registers_mips_dsp_linux): New
6008 prototype.
6009 (init_registers_mips64_dsp_linux): Likewise.
6010 (init_registers_mips_linux): New macro.
6011 (init_registers_mips_dsp_linux): Likewise.
6012 (mips_dsp_num_regs): Likewise.
6013 (DSP_BASE, DSP_CONTROL): New fallback macros.
6014 (mips_base_regs): New macro.
6015 (mips_regmap): Use it. Fix the size.
6016 (mips_dsp_regmap): New variable.
6017 (mips_dsp_regset_bitmap): Likewise.
6018 (mips_arch_setup): New function.
6019 (mips_cannot_fetch_register): Use the_low_target.regmap rather
6020 than mips_regmap.
6021 (mips_cannot_store_register): Likewise.
6022 (the_low_target): Update .arch_setup, .num_regs and .regmap
6023 initializers. Add .regset_bitmap initializer.
6024 * linux-arm-low.c (the_low_target): Add .regset_bitmap
6025 initializer.
6026 * linux-bfin-low.c (the_low_target): Likewise.
6027 * linux-cris-low.c (the_low_target): Likewise.
6028 * linux-crisv32-low.c (the_low_target): Likewise.
6029 * linux-ia64-low.c (the_low_target): Likewise.
6030 * linux-m32r-low.c (the_low_target): Likewise.
6031 * linux-m68k-low.c (the_low_target): Likewise.
6032 * linux-ppc-low.c (the_low_target): Likewise.
6033 * linux-s390-low.c (the_low_target): Likewise.
6034 * linux-sh-low.c (the_low_target): Likewise.
6035 * linux-sparc-low.c (the_low_target): Likewise.
6036 * linux-tic6x-low.c (the_low_target): Likewise.
6037 * linux-x86-low.c (the_low_target): Likewise.
6038 * linux-xtensa-low.c (the_low_target): Likewise.
6039 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
6040 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
6041 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
6042 srv_xmlfiles.
6043 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
6044 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
6045
c03e6ccc
YQ
60462012-02-29 Yao Qi <yao@codesourcery.com>
6047 Pedro Alves <palves@redhat.com>
6048
6049 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
6050 `step_over_finished' is true.
6051
644cebc9
PA
60522012-02-27 Pedro Alves <palves@redhat.com>
6053
6054 * linux-low.c (pid_is_stopped): Delete, moved to common/.
6055 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
6056
c14d7ab2
PA
60572012-02-27 Pedro Alves <palves@redhat.com>
6058
6059 PR server/9684
6060 * linux-low.c (pid_is_stopped): New.
6061 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
6062
412c89dd
LM
60632012-02-25 Luis Machado <lgustavo@codesourcery.com>
6064
6065 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
6066 of conditions.
6067
b745defe
MR
60682012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
6069
6070 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
6071
9f3a5c85
LM
60722012-02-24 Luis Machado <lgustavo@codesourcery>
6073
6074 * server.c (handle_query): Advertise support for target-side
6075 breakpoint condition evaluation.
6076 (process_point_options): New function.
6077 (process_serial_event): When inserting a breakpoint, check for
6078 a target-side condition that should be evaluated.
6079
6080 * mem-break.c: Include regcache.h and ax.h.
6081 (point_cond_list_t): New data structure.
6082 (breakpoint) <cond_list>: New field.
6083 (find_gdb_breakpoint_at): Make non-static.
6084 (delete_gdb_breakpoint_at): Clear any target-side
6085 conditions.
6086 (clear_gdb_breakpoint_conditions): New function.
6087 (add_condition_to_breakpoint): Likewise.
6088 (add_breakpoint_condition): Likewise.
6089 (gdb_condition_true_at_breakpoint): Likewise.
6090 (gdb_breakpoint_here): Return result directly instead
6091 of going through a local variable.
6092
6093 * mem-break.h (find_gdb_breakpoint_at): New prototype.
6094 (clear_gdb_breakpoint_conditions): Likewise.
6095 (add_breakpoint_condition): Likewise.
6096 (gdb_condition_true_at_breakpoint): Likewise.
6097
6098 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
6099 (need_step_over_p): Take target-side breakpoint condition into
6100 consideration.
6101
5e1dc496
LM
61022012-02-24 Luis Machado <lgustavo@codesourcery>
6103
6104 * server.h: Include tracepoint.h.
6105 (agent_mem_read, agent_get_trace_state_variable_value,
6106 agent_set_trace_state_variable_value,
6107 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
6108 get_set_tsv_func_addr): New prototypes.
6109
6110 * ax.h: New include file.
6111 * ax.c: New source file.
6112
6113 * tracepoint.c: Include ax.h.
6114 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
6115 agent_expr, eval_result_type): Move to ax.h.
6116 (parse_agent_expr): Rename to ...
6117 (gdb_parse_agent_expr): ... this, make it non-static and move
6118 to ax.h.
6119 (unparse_agent_expr) Rename to ...
6120 (gdb_unparse_agent_expr): ... this, make it non-static and move
6121 to ax.h.
6122 (eval_agent_expr): Rename to ...
6123 (eval_tracepoint_agent_expr): ... this.
6124 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
6125 forward declarations.
6126 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
6127 (agent_get_trace_state_variable_value): New function.
6128 (agent_set_trace_state_variable_value): New function.
6129 (cmd_qtdp): Call gdb_parse_agent_expr (...).
6130 (response_tracepoint): Call gdb_unparse_agent_expr (...).
6131 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
6132 (condition_true_at_tracepoint): Likewise.
6133 (parse_agent_expr): Rename to ...
6134 (gdb_parse_agent_expr): ... this and move to ax.c.
6135 (unparse_agent_expr): Rename to ...
6136 (gdb_unparse_agent_expr): ... this and move to ax.c.
6137 (gdb_agent_op_name): Move to ax.c.
6138 (eval_agent_expr): Rename to ...
6139 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
6140 and move to ax.c.
6141 (eval_tracepoint_agent_expr): New function.
6142 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 6143 non-static.
5e1dc496
LM
6144 (current_insn_ptr, emit_error, struct bytecode_address): Move to
6145 ax.c.
6146 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
6147 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
6148 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
6149 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
6150 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
6151 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
6152 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
6153 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
6154 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
6155 (compile_bytecodes): Remove forward declaration.
6156 (is_goto_target): Move to ax.c.
6157 (compile_bytecodes): Move to ax.c and call
6158 agent_get_trace_state_variable_value (...) and
6159 agent_set_trace_state_variable_value (...).
6160
6161 * Makefile.in: Update ax.c and IPA dependencies.
6162
277e4e52
PA
61632012-02-24 Pedro Alves <palves@redhat.com>
6164
6165 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
6166 (cmd_bigqtbuffer_circular): ... this. Only handle
6167 'QTBuffer:circular:'.
6168 (handle_tracepoint_general_set): Adjust.
6169
bf4c19f7
YQ
61702012-02-16 Yao Qi <yao@codesourcery.com>
6171
6172 * inferiors.c: Move code to ...
6173 * dll.c: .... here. New.
6174 * server.h: Declare clear_dlls.
6175 * Makefile.in (SFILES): Add dll.c.
6176 (OBS): Add dll.o
6177 (dll.o): New rule.
6178
d73f2619
YQ
61792012-02-11 Yao Qi <yao@codesourcery.com>
6180
6181 * server.c: (handle_monitor_command): Add a new parameter
6182 `own_buf'.
6183 (handle_query): Update caller.
6184
f8255c2a
JB
61852012-02-09 Joel Brobecker <brobecker@adacore.com>
6186
6187 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
6188 * configure, config.in: Regenerate.
6189 * hostio.c: Provide an alternate implementation if HAVE_READLINK
6190 is not defined.
6191
da84f473
PA
61922012-02-02 Pedro Alves <palves@redhat.com>
6193
6194 Try SIGKILL first, then PTRACE_KILL.
6195 * linux-low.c (linux_kill_one_lwp): New.
6196 (linux_kill_one_lwp): Rename to ...
6197 (kill_one_lwp_callback): ... this. Use the new
6198 linux_kill_one_lwp.
6199
e886a173
PA
62002012-02-02 Pedro Alves <palves@redhat.com>
6201
6202 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
6203 inferior.
6204
be07f1a2
PA
62052012-01-27 Pedro Alves <palves@redhat.com>
6206
6207 * linux-low.c (linux_child_pid_to_exec_file): Delete.
6208 (elf_64_file_p): Make static.
6209 (linux_pid_exe_is_elf_64_file): New.
6210 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
6211 Delete declarations.
6212 (linux_pid_exe_is_elf_64_file): Declare.
6213 * linux-x86-low.c (x86_arch_setup): Use
6214 linux_pid_exe_is_elf_64_file.
6215
d8301ad1
JK
62162012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
6217
6218 * linux-low.c (linux_wait_for_event_1): Rename to ...
6219 (linux_wait_for_event): ... here and merge it with former
6220 linux_wait_for_event - new variable wait_ptid, use it.
6221 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
6222
01b17894
PA
62232012-01-23 Pedro Alves <palves@redhat.com>
6224
6225 * server.c (main): Avoid yet another case of infinite loop while
6226 detaching/killing after a longjmp.
6227
e825046f
JK
62282012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
6229
6230 Code cleanup.
6231 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
6232
b9e7b9c3
UW
62332012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
6234
6235 * hostio.c (handle_readlink): New function.
6236 (handle_vFile): Call it to handle "vFile:readlink" packets.
6237
901f9912
UW
62382012-01-20 Pedro Alves <palves@redhat.com>
6239 Ulrich Weigand <ulrich.weigand@linaro.org>
6240
6241 * server.c (handle_v_requests): Only support vAttach and vRun to
6242 start multiple processes when in extended protocol mode.
6243
fc1ab1a0
PA
62442012-01-17 Pedro Alves <palves@redhat.com>
6245
6246 * tracepoint.c (initialize_tracepoint): Use mmap instead of
6247 memalign plus mprotect to allocate the scratch buffer.
6248
7d5d4e98
PA
62492012-01-13 Pedro Alves <palves@redhat.com>
6250
6251 * server.c (attach_inferior): Clear `cont_thread'.
6252
f128d5e9
PA
62532012-01-13 Pedro Alves <palves@redhat.com>
6254
6255 * server.c (main): Avoid infinite loop while detaching/killing
6256 after a longjmp.
6257
06db92f0
DE
62582012-01-09 Doug Evans <dje@google.com>
6259
6260 * server.c (start_inferior): Set last_ptid in --wrapper case.
6261
32d92999
YQ
62622012-01-06 Yao Qi <yao@codesourcery.com>
6263
6264 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
6265 defined.
6266 [IN_PROCESS_AGENT] (debug_agent): New global variable.
6267
5e0a92a9
YQ
62682012-01-04 Yao Qi <yao@codesourcery.com>
6269
6270 * tracepoint.c (cmd_qtdp): Print debug message
6271 for static tracepoint.
6272
ae639e8c
YQ
62732012-01-04 Yao Qi <yao@codesourcery.com>
6274
6275 * tracepoint.c (trace_vdebug): Differentiate debug message
6276 between gdbserver and IPA.
6277
f72429c5
YQ
62782012-01-03 Yao Qi <yao@codesourcery.com>
6279
6280 * tracepoint.c (tracepoint_was_hit): Don't collect for
6281 static tracepoint.
6282
12c3e59c
JB
62832012-01-02 Joel Brobecker <brobecker@adacore.com>
6284
6285 * terminal.h: Reformat copyright header.
6286
67827812
JB
62872012-01-02 Joel Brobecker <brobecker@adacore.com>
6288
6289 * server.c (gdbserver_version): Update copyright year.
6290 * gdbreplay.c (gdbreplay_version): Likewise.
6291
3e52c33d
JK
62922011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
6293
6294 * linux-low.c (linux_create_inferior): Put empty if clause for write.
6295
6296 Revert:
6297 2011-12-18 Hui Zhu <teawater@gmail.com>
6298 * linux-low.c (linux_create_inferior): Save return value to ret.
6299
66f1260e
HZ
63002011-12-18 Hui Zhu <teawater@gmail.com>
6301
6302 * linux-low.c (linux_create_inferior): Save return value to ret.
6303
e77616d7
DE
63042011-12-16 Doug Evans <dje@google.com>
6305
e7b06c57
DE
6306 * linux-low.c (linux_create_inferior): If stdio connection,
6307 redirect stdin from /dev/null, stdout to stderr.
6308 * remote-utils.c (remote_is_stdio): New static global.
6309 (remote_connection_is_stdio): New function.
6310 (remote_prepare): Handle stdio connection.
6311 (remote_open): Ditto.
6312 (remote_close): Don't close stdin for stdio connections.
6313 (read_prim,write_prim): New functions. Replace all calls to
6314 read/write to these.
6315 * server.c (main): Watch for "-" argument. Move call to
6316 remote_prepare before start_inferior.
6317 * server.h (STDIO_CONNECTION_NAME): New macro.
6318 (remote_connection_is_stdio): Declare.
6319
e77616d7
DE
6320 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
6321 in debugging output.
6322
82067193
YQ
63232011-12-15 Yao Qi <yao@codesourcery.com>
6324
6325 * tracepoint.c: Include sys/syscall.h.
6326 (gdb_ust_thread): Remove preprocessor conditional.
6327
82bfbe7e
PA
63282011-12-14 Pedro Alves <pedro@codesourcery.com>
6329
6330 * linux-low.c (linux_detach_one_lwp): Call
6331 the_low_target.prepare_to_resume before detaching.
6332
712c6575
YQ
63332011-12-14 Yao Qi <yao@codesourcery.com>
6334
6335 * tracepoint.c (gdb_ust_thread): Don't ignore return value
6336 of write.
6337
d54d1edf
YQ
63382011-12-14 Yao Qi <yao@codesourcery.com>
6339
6340 * i386-low.c (i386_low_stopped_data_address): Initialize local
6341 variable `control'.
6342
6210a125
PA
63432011-12-13 Pedro Alves <pedro@codesourcery.com>
6344
6345 PR remote/13492
6346
6347 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
6348 DR_CONTROL unless necessary. Extend comments.
6349 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
6350 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
6351
2ece8244
YQ
63522011-12-13 Yao Qi <yao@codesourcery.com>
6353
6354 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
6355 macros.
6356 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
6357
784867a5
JK
63582011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
6359
6360 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
6361 Print new debug message for such case.
6362
6bf36717
JK
63632011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
6364
6365 Fix overlapping memcpy.
6366 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
6367 the read_inferior_memory transfer.
6368 (delete_fast_tracepoint_jump): New variable buf. Use it for the
6369 write_inferior_memory transfer.
6370 (set_fast_tracepoint_jump): New variable buf. Use it for the
6371 read_inferior_memory and write_inferior_memory transfers.
6372 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
6373 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
6374 Use it for the write_inferior_memory transfer.
6375 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
6376 buffers.
6377
50275556
MR
63782011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
6379
6380 * linux-low.c (fetch_register, store_register): Make code
6381 consistent, fix formatting.
6382
7325beb4
MR
63832011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
6384
6385 * linux-low.c (usr_store_inferior_registers): Factor out code
6386 to handle individual registers into...
6387 (store_register): ... this new function.
6388
c642a434
UW
63892011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
6390
6391 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
6392 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
6393 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
6394 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
6395 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
6396 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
6397 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
6398 (srv_xmlfiles): Add new XML files.
6399
6400 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
6401 and <sys/uio.h>.
6402 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
6403 (init_registers_s390_linux32v1): Add prototype.
6404 (init_registers_s390_linux32v2): Likewise.
6405 (init_registers_s390_linux64v1): Likewise.
6406 (init_registers_s390_linux64v2): Likewise.
6407 (init_registers_s390x_linux64v1): Likewise.
6408 (init_registers_s390x_linux64v2): Likewise.
6409 (s390_num_regs): Increment to 52.
6410 (s390_regmap): Add orig_r2 register.
6411 (s390_num_regs_3264): Increment to 68.
6412 (s390_regmap_3264): Add orig_r2 register.
6413 (s390_collect_ptrace_register): Handle orig_r2 register.
6414 (s390_supply_ptrace_register): Likewise.
6415 (s390_fill_last_break): New function.
6416 (s390_store_last_break): Likewise.
6417 (s390_fill_system_call): New function.
6418 (s390_store_system_call): Likewise.
6419 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
6420 register sets.
6421 (s390_check_regset): New function.
6422 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
6423 NT_S390_SYSTEM_CALL regsets and use appropriate description.
6424 Update target_regsets for available register sets.
6425
2268b414
JK
64262011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
6427 Jan Kratochvil <jan.kratochvil@redhat.com>
6428
6429 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
6430 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
6431 New.
6432 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
6433 * linux-low.h (struct process_info_private): New member r_debug.
6434 * server.c (handle_qxfer_libraries): Call
6435 the_target->qxfer_libraries_svr4.
6436 (handle_qxfer_libraries_svr4): New function.
6437 (qxfer_packets): New entry "libraries-svr4".
6438 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
6439 * target.h (struct target_ops): New member qxfer_libraries_svr4.
6440 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
6441 PACKET_qXfer_libraries_svr4.
6442
d6db1fab
UW
64432011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
6444
6445 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
6446 PSW address/mask between 8-byte and 16-byte formats.
6447 (s390_supply_ptrace_register): Likewise.
6448 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
6449 basic addressing mode bit.
6450
242f5f1c
SS
64512011-11-24 Stan Shebs <stan@codesourcery.com>
6452
6453 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
6454
f196051f
SS
64552011-11-17 Stan Shebs <stan@codesourcery.com>
6456
6457 * tracepoint.c (struct tracepoint): New field traceframe_usage.
6458 (tracing_start_time): New global.
6459 (tracing_stop_time): New global.
6460 (tracing_user_name): New global.
6461 (tracing_notes): New global.
6462 (tracing_stop_note): New global.
6463 (cmd_qtstart): Set traceframe_usage, start_time.
6464 (stop_tracing): Set stop_time.
6465 (cmd_qtstatus): Report additional status.
6466 (cmd_qtp): New function.
6467 (handle_tracepoint_query): Call it.
6468 (cmd_qtnotes): New function.
6469 (handle_tracepoint_general_set): Call it.
6470 (get_timestamp): Rename from tsv_get_timestamp.
6471
405f8e94
SS
64722011-11-14 Stan Shebs <stan@codesourcery.com>
6473 Kwok Cheung Yeung <kcy@codesourcery.com>
6474
6475 * linux-x86-low.c (small_jump_insn): New.
6476 (i386_install_fast_tracepoint_jump_pad): Add arguments for
6477 trampoline and error message, build a trampoline and issue a small
6478 jump instruction to it.
6479 (x86_install_fast_tracepoint_jump_pad): Add arguments for
6480 trampoline and error message.
6481 (x86_get_min_fast_tracepoint_insn_len): New.
6482 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
6483 * linux-low.h (struct linux_target_ops): Add arguments to
6484 install_fast_tracepoint_jump_pad operation, add new operation.
6485 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
6486 arguments.
6487 (linux_get_min_fast_tracepoint_insn_len): New function.
6488 (linux_target_op): Add new operation.
6489 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
6490 (gdb_trampoline_buffer_end): Ditto.
6491 (gdb_trampoline_buffer_error): Ditto.
6492 (struct ipa_sym_addresses): Add fields for new IPA variables.
6493 (symbol_list): Add entries for new IPA variables.
6494 (struct tracepoint): Add fields to hold the address range of the
6495 trampoline used by the tracepoint.
6496 (trampoline_buffer_head): New static variable.
6497 (trampoline_buffer_tail): Ditto.
6498 (claim_trampoline_space): New function.
6499 (have_fast_tracepoint_trampoline_buffer): New function.
6500 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
6501 structure.
6502 (install_fast_tracepoint): Ditto, also add error buffer argument.
6503 (cmd_qtminftpilen): New function.
6504 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
6505 (fast_tracepoint_from_trampoline_address): New function.
6506 (fast_tracepoint_collecting): Handle trampoline as part of jump
6507 pad space.
6508 (set_trampoline_buffer_space): New function.
6509 (initialize_tracepoint): Initialize new IPA variables.
6510 * target.h (struct target_ops): Add arguments to
6511 install_fast_tracepoint_jump_pad operation, add new
6512 get_min_fast_tracepoint_insn_len operation.
6513 (target_get_min_fast_tracepoint_insn_len): New.
6514 (install_fast_tracepoint_jump_pad): Add arguments.
6515 * server.h (IPA_BUFSIZ): Define.
6516 * linux-i386-ipa.c: Include extra header files.
6517 (initialize_fast_tracepoint_trampoline_buffer): New function.
6518 (initialize_low_tracepoint): Call it.
6519 * server.h (set_trampoline_buffer_space): Declare.
6520 (claim_trampoline_space): Ditto.
6521 (have_fast_tracepoint_trampoline_buffer): Ditto.
6522
1e4d1764
YQ
65232011-11-14 Yao Qi <yao@codesourcery.com>
6524
6525 * server.c (handle_query): Handle InstallInTrace for qSupported.
6526 * tracepoint.c (add_tracepoint): Sort list.
6527 (install_tracepoint, download_tracepoint): New.
6528 (cmd_qtdp): Call them to install and download tracepoints.
6529 (sort_tracepoints): Removed.
6530 (cmd_qtstart): Update.
6531
5c73ff4e
YQ
65322011-11-14 Yao Qi <yao@codesourcery.com>
6533
6534 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
6535 * mem-break.h: Declare.
6536 * tracepoint.c (cmd_qtstart): Move some code to ...
6537 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
6538 New.
6539 (download_tracepoints): Move some code to ...
6540 (download_tracepoint_1): ... here. New.
6541
86a30030
YQ
65422011-11-08 Yao Qi <yao@codesourcery.com>
6543
6544 * remote-utils.c (relocate_instruction): A comment fix.
6545
8d26e50c
JB
65462011-11-07 Joel Brobecker <brobecker@adacore.com>
6547
6548 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
6549 (i386_dr_low_get_control, i386_dr_low_get_status): Use
6550 dr_status_mirror and dr_control_mirror from debug_reg_state.
6551 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
6552 (i386_initial_stuff): Remove use of deleted globals.
6553 (i386_get_thread_context, i386_set_thread_context,
6554 i386_thread_added): Use dr_status_mirror and dr_control_mirror
6555 from debug_reg_state.
6556
a59306a3
YQ
65572011-11-05 Yao Qi <yao@codesourcery.com>
6558
6559 * tracepoint.c (gdb_collect): Loop over tracepoints of same
6560 address as TPOINT's.
6561
3065dfb6
SS
65622011-11-02 Stan Shebs <stan@codesourcery.com>
6563
6564 * tracepoint.c (agent_mem_read_string): New function.
6565 (eval_agent_expr): Call it for tracenz.
6566 * server.c (handle_query): Report support for tracenz.
6567
fd0d8c7c
YQ
65682011-11-02 Yao Qi <yao@codesourcery.com>
6569
6570 * tracepoint.c (cmd_qtstart): Remove unused local variables.
6571
609086b1
YQ
65722011-11-02 Yao Qi <yao@codesourcery.com>
6573
6574 * target.h: Fix a typo in comment.
6575
b9fd1791
PA
65762011-10-31 Pedro Alves <pedro@codesourcery.com>
6577
6578 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
6579 clobber the breakpoints' shadows with fast tracepoint jumps.
6580 * mem-break.h (check_mem_write): Add `myaddr' parameter.
6581 * target.c (write_inferior_memory): Also pass MYADDR down to
6582 check_mem_write.
6583
03583c20
UW
65842011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
6585
6586 * configure.ac: Check support for personality routine.
6587 * configure: Regenerate.
6588 * config.in: Likewise.
6589 * linux-low.c: Include <sys/personality.h>.
6590 Define ADDR_NO_RANDOMIZE if necessary.
6591 (linux_create_inferior): Disable address space randomization when
6592 forking inferior, if requested.
6593 (linux_supports_disable_randomization): New function.
6594 (linux_target_ops): Install it.
6595 * server.h (disable_randomization): Declare.
6596 * server.c (disable_randomization): New global variable.
6597 (handle_general_set): Handle QDisableRandomization.
6598 (handle_query): Likewise for qSupported.
6599 (main): Support --disable-randomization and --no-disable-randomization
6600 command line arguments.
6601 * target.h (struct target_ops): Add supports_disable_randomization.
6602 (target_supports_disable_randomization): New macro.
6603
723b724b
MF
66042011-09-29 Mike Frysinger <vapier@gentoo.org>
6605
6606 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
6607 ifdef check.
6608 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
6609 [!PT_GETDSBT] (target_loadmap): New definition.
6610 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
6611 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
6612 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
6613 and PT_GETDSBT to LINUX_LOADMAP.
6614 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
6615 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
6616
55329a5c 66172011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
6618
6619 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
6620 (arm_linux_hwbp_cap): New static variable.
6621 (arm_linux_get_hwbp_cap): Replace by ...
6622 (arm_linux_init_hwbp_cap): ... this new function.
6623 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
6624 (arm_linux_get_hw_watchpoint_count): Likewise.
6625 (arm_linux_get_hw_watchpoint_max_length): Likewise.
6626 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
6627 (arm_prepare_to_resume): Use perror_with_name instead of error.
6628
55329a5c 66292011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
6630
6631 * linux-arm-low.c: Include <signal.h>.
6632 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
6633 (struct arm_linux_hwbp_cap): New data type.
6634 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
6635 (struct arm_linux_hw_breakpoint): New data type.
6636 (MAX_BPTS, MAX_WPTS): Define.
6637 (struct arch_process_info, struct arch_lwp_info): New data types.
6638 (arm_linux_get_hwbp_cap): New function.
6639 (arm_linux_get_hw_breakpoint_count): Likewise.
6640 (arm_linux_get_hw_watchpoint_count): Likewise.
6641 (arm_linux_get_hw_watchpoint_max_length): Likewise.
6642 (arm_hwbp_control_initialize): Likewise.
6643 (arm_hwbp_control_is_enabled): Likewise.
6644 (arm_hwbp_control_is_initialized): Likewise.
6645 (arm_hwbp_control_disable): Likewise.
6646 (arm_linux_hw_breakpoint_equal): Likewise.
6647 (arm_linux_hw_point_initialize): Likewise.
6648 (struct update_registers_data): New data structure.
6649 (update_registers_callback: New function.
6650 (arm_insert_point): Likewise.
6651 (arm_remove_point): Likewise.
6652 (arm_stopped_by_watchpoint): Likewise.
6653 (arm_stopped_data_address): Likewise.
6654 (arm_new_process): Likewise.
6655 (arm_new_thread): Likewise.
6656 (arm_prepare_to_resume): Likewise.
6657 (the_low_target): Register arm_insert_point, arm_remove_point,
6658 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
6659 arm_new_thread, and arm_prepare_to_resume.
6660
6b9801d4
SS
66612011-09-15 Stan Shebs <stan@codesourcery.com>
6662
6663 * server.h (struct emit_ops): Add compare-goto fields.
6664 * tracepoint.c (gdb_agent_op_sizes): New table.
6665 (emit_eq_goto): New function.
6666 (emit_ne_goto): New function.
6667 (emit_lt_goto): New function.
6668 (emit_le_goto): New function.
6669 (emit_gt_goto): New function.
6670 (emit_ge_goto): New function.
6671 (is_goto_target): New function.
6672 (compile_bytecodes): Recognize special cases of compare-goto
6673 combinations and call specialized emitters for them.
6674 * linux-x86-low.c (amd64_emit_eq_goto): New function.
6675 (amd64_emit_ne_goto): New function.
6676 (amd64_emit_lt_goto): New function.
6677 (amd64_emit_le_goto): New function.
6678 (amd64_emit_gt_goto): New function.
6679 (amd64_emit_ge_goto): New function.
6680 (amd64_emit_ops): Add the new functions.
6681 (i386_emit_eq_goto): New function.
6682 (i386_emit_ne_goto): New function.
6683 (i386_emit_lt_goto): New function.
6684 (i386_emit_le_goto): New function.
6685 (i386_emit_gt_goto): New function.
6686 (i386_emit_ge_goto): New function.
6687 (i386_emit_ops): Add the new functions.
6688
bf15cbda
SS
66892011-09-08 Stan Shebs <stan@codesourcery.com>
6690
6691 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
6692 (i386_emit_epilogue): Restore %ebx.
6693
943ca1dd
JZ
66942011-08-31 Jie Zhang <jzhang918@gmail.com>
6695
6696 * server.c (step_thread): Remove definition.
6697 (process_serial_event): Don't handle Hs.
6698 * server.h (step_thread): Remove declaration.
6699 * target.c (set_desired_inferior): Remove use of step_thread.
6700
e3deef73
LM
67012011-08-24 Luis Machado <lgustavo@codesourcery.com>
6702
6703 * linux-low.c: Include linux-procfs.h.
6704 (linux_attach_lwp_1): Update comments.
6705 (linux_attach): Scan for existing threads when attaching to a
6706 process that is the tgid.
6707 * Makefile.in: Update dependencies.
6708
13da1c97
LM
67092011-08-24 Luis Machado <lgustavo@codesourcery.com>
6710
6711 * configure.srv: Add linux-procfs.o dependencies.
6712
881127c9
YQ
67132011-08-14 Yao Qi <yao@codesourcery.com>
6714
6715 * target.h (struct target_ops): Fix indent.
6716 * win32-low.c (win32_target_ops): Fix comment.
6717
58dbd541
YQ
67182011-08-14 Andrew Jenner <andrew@codesourcery.com>
6719 Yao Qi <yao@codesourcery.com>
6720
6721 * Makefile.in (clean): Remove tic6x-*.c files.
6722 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
6723 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
6724 (tic6x-c64xp-linux.c): Likewise.
6725 * configure.srv: Add support for tic6x-*-uclinux.
6726 * linux-tic6x-low.c: New.
6727 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
6728
78d85199
YQ
67292011-08-14 Andrew Stubbs <ams@codesourcery.com>
6730 Yao Qi <yao@codesourcery.com>
6731
6732 * target.h (struct target_ops): Add read_loadmap.
6733 * linux-low.c (struct target_loadseg): New type.
6734 (struct target_loadmap): New type.
6735 (linux_read_loadmap): New function.
6736 (linux_target_ops): Add linux_read_loadmap.
6737 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
6738 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
6739 to NULL.
78d85199 6740
a959a88d
EZ
67412011-08-05 Eli Zaretskii <eliz@gnu.org>
6742
6743 * win32-low.c: Include <stdint.h>.
6744
1ced966e
PA
67452011-07-22 Pedro Alves <pedro@codesourcery.com>
6746
6747 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
6748 to the inferior here.
6749 (i386_remove_aligned_watchpoint): Ditto.
6750 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
6751 fit part of the watchpoint in the debug registers.
6752 (i386_update_inferior_debug_regs): New.
6753 (i386_low_insert_watchpoint): Work on a local mirror of the debug
6754 registers, and only update the inferior on success.
6755 (i386_low_remove_watchpoint): Ditto.
6756
d26e3629
KY
67572011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
6758
6759 * linux-low.c (compare_ints, unique, list_threads, show_process,
6760 linux_core_of_thread): Delete.
6761 (linux_target_ops): Change linux_core_of_thread to
6762 linux_common_core_of_thread.
6763 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
6764 * utils.c (malloc_failure): Change type of argument.
6765 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
6766 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
6767 common/linux-osdata.c, common/ptid.c and common/buffer.c.
6768 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
6769 (IPA_OBJS): Add common-utils-ipa.o.
6770 (ptid_h, linux_osdata_h): New macros.
6771 (server_h): Add common/common-utils.h, common/xml-utils.h,
6772 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
6773 common/ptid.h.
6774 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
6775 ptid.o, buffer.o): New rules.
6776 (linux-low.o): Add common/linux-osdata.h as a dependency.
6777 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
6778 * configure.ac: Add AC_HEADER_DIRENT check.
6779 * config.in: Regenerate.
6780 * configure: Regenerate.
6781 * remote-utils.c (xml_escape_text): Delete.
6782 (buffer_grow, buffer_free, buffer_init, buffer_finish,
6783 buffer_xml_printf): Move to common/buffer.c.
6784 * server.c (main): Remove call to initialize_inferiors.
6785 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
6786 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
6787 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
6788 internal_error, gdb_assert, gdb_assert_fail): Delete.
6789 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
6790 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
6791 common/buffer.h.
6792 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
6793 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
6794 initialize_inferiors): Delete.
6795
2275a1a7
PA
67962011-07-20 Pedro Alves <pedro@codesourcery.com>
6797
6798 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
6799 symbol error.
6800
0a5b1e09
PA
68012011-05-31 Pedro Alves <pedro@codesourcery.com>
6802
6803 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
6804 assertion.
6805 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
6806
6938fd34
YQ
68072011-05-26 Yao Qi <yao@codesourcery.com>
6808
6809 * Makefile.in (thread-db.o): Track dependence to
6810 common/gdb_thread_db.h.
6811 * thread-db.c: include gdb_thread_db.h from right place.
6812
b481f9e0
TT
68132011-05-16 Adrian Cornish <gnu@bluedreamer.com>
6814
6815 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
6816 __FILE__ and __LINE__ to internal_error.
6817
98a5dd13
DE
68182011-05-13 Doug Evans <dje@google.com>
6819
6820 * thread-db.c (try_thread_db_load_from_sdir): New function.
6821 (try_thread_db_load_from_dir): New function.
6822 (thread_db_load_search): Handle $sdir, ignore $pdir.
6823 Remove trying of system directories if search of
6824 libthread-db-search-path fails, that is now done via $sdir.
6825
d248b706
KY
68262011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
6827
6828 * server.c (handle_query): Add EnableDisableTracepoints to the list
6829 of supported features.
43aaf8b6 6830 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 6831 tracepoints.
43aaf8b6
PA
6832 (cmd_qtenable_disable): New.
6833 (cmd_qtstart): Install tracepoints even if disabled.
6834 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
6835 receiving a QTEnable or QTDisable packet.
6836 (gdb_collect): Skip data collection if fast tracepoint is disabled.
6837 (ust_marker_to_static_tracepoint): Do not ignore disabled static
6838 tracepoints.
6839 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 6840
84e578fb
DE
68412011-05-10 Doug Evans <dje@google.com>
6842
6843 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
6844
71f55dd8
DE
68452011-05-04 Doug Evans <dje@google.com>
6846
6847 * linux-low.c (linux_join): Skip process lookup.
6848 * spu-low.c (spu_join): Ditto.
6849 * server.c (join_inferiors_callback): Delete.
6850 (process_serial_event): For 'D' packet (detach) call join_inferior
6851 directly.
6852
4d393d60
JM
68532011-05-04 Joseph Myers <joseph@codesourcery.com>
6854
6855 * README: Don't mention xscale*-*-linux*.
6856 * configure.srv (xscale*-*-linux*): Don't handle target.
6857
b00ad6ff
NF
68582011-04-27 Nathan Froyd <froydnj@codesourcery.com>
6859
6860 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
6861 casting pointers.
6862 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
6863 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
6864 (i386_emit_void_call_2): Likewise.
6865
af96c192
YQ
68662011-04-26 Yao Qi <yao@codesourcery.com>
6867
43aaf8b6
PA
6868 * linux-low.c: Move common macros to linux-ptrace.h.
6869 Include linux-ptrace.h.
af96c192
YQ
6870 * Makefile.in (linux_ptrace_h): New.
6871 (linux-low.o): Depends on linux-ptrace.h.
6872
03f2bd59
JK
68732011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
6874
6875 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
6876 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
6877 (remote_prepare): New function with most of the TCP code from ...
6878 (remote_open): ... here. Detect PORT here unconditionally. Move also
6879 setting transport_is_reliable.
6880 * server.c (run_once): New variable.
6881 (gdbserver_usage): Document it.
6882 (main): Set run_once for `--once'. Call remote_prepare. Exit after
6883 the first run if RUN_ONCE.
6884 * server.h (run_once, remote_prepare): New declarations.
6885
7a9dd1b2
TT
68862011-04-19 Tom Tromey <tromey@redhat.com>
6887
6888 * win32-low.c (handle_load_dll): Remove duplicate "the".
6889
81239425
PM
68902011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
6891
6892 Remove support for old Cygwin 1.5 versions.
6893 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
6894 function to avoid warning.
6895 (win32_add_one_solib): Use cygwin_conv_path function to avoid
6896 warning.
6897
9e0627f1
PM
68982011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
6899
6900 * gdbserver/server.h (Macro _): Define it if not available.
6901
588eebee
MS
69022011-03-14 Michael Snyder <msnyder@vmware.com>
6903
348af9f7 6904 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 6905
43f70d4c
JB
69062011-03-10 Joel Brobecker <brobecker@adacore.com>
6907
6908 * Makefile.in (maintainer-clean realclean distclean): Remove
6909 "make ... subdir_do" command.
6910
348af9f7
MS
69112011-03-10 Michael Snyder <msnyder@vmware.com>
6912
6913 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
6914
6915 * server.c (handle_v_run): Free alloced buffer on early return.
6916
e637a4f5
YQ
69172011-03-09 Yao Qi <yao@codesourcery.com>
6918
6919 Revert:
6920 2011-03-04 Yao Qi <yao@codesourcery.com>
6921
6922 * Makefile.in: Remove GNU make feature --directory.
6923
6924 2011-03-05 Yao Qi <yao@codesourcery.com>
6925
6926 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
6927 (subdir_do): New make target. Copied from gdb/Makefile.
6928 (maintainer-clean, realclean, distclean, clean): Call corresponding
6929 make targets in common/Makefile.
6930
6931 2011-02-11 Yao Qi <yao@codesourcery.com>
6932
6933 * configure.ac: Call AC_PROG_RANLIB.
6934 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
6935 * configure: Regenerate.
6936
e6edda56
JK
69372011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
6938
6939 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
6940
e5141119
JB
69412011-03-06 Yao Qi <yao@codesourcery.com>
6942
6943 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
6944
64794aa4
JB
69452011-03-05 Yao Qi <yao@codesourcery.com>
6946
6947 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
6948 (subdir_do): New make target. Copied from gdb/Makefile.
6949 (maintainer-clean, realclean, distclean, clean): Call corresponding
6950 make targets in common/Makefile.
6951
7a762829
YQ
69522011-03-04 Yao Qi <yao@codesourcery.com>
6953
6954 * Makefile.in: Remove GNU make feature --directory.
6955
348af9f7
MS
69562011-03-04 Michael Snyder <msnyder@vmware.com>
6957
6958 * server.c (queue_stop_reply): Call xmalloc not malloc.
6959
69602011-03-02 Michael Snyder <msnyder@vmware.com>
6961
6962 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
6963
9f72fee2
MS
69642011-02-28 Michael Snyder <msnyder@vmware.com>
6965
588eebee
MS
6966 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
6967 (cmd_qtframe): Ditto.
6968 (cmd_qtbuffer): Ditto.
6969 (cmd_bigqtbuffer): Ditto.
6970
9f72fee2
MS
6971 * utils.c (decimal2str): Initialize 'width' to nine, then
6972 don't mess with it.
6973
8040bd49
UW
69742011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
6975
6976 * hostio.c (require_data): Free *data, not data.
6977
7e52cbd0
JK
69782011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6979
6980 * hostio.c (require_data): Use free, not xfree.
6981
9130f83e
MS
69822011-02-27 Michael Snyder <msnyder@vmware.com>
6983
4b812f4e
MS
6984 * server.c (handle_query): Discard unused value.
6985
9130f83e
MS
6986 * hostio.c (require_data): Free malloc memory before returning
6987 error.
6988
69d37113
MS
69892011-02-26 Michael Snyder <msnyder@vmware.com>
6990
6991 * linux-low.c (list_threads): Call closedir for dirent.
6992
35f5825a
MS
69932011-02-27 Michael Snyder <msnyder@vmware.com>
6994
2a589cef
MS
6995 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
6996 a case statement falls through.
6997
0adea5f7
MS
6998 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
6999
35f5825a
MS
7000 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
7001 in comparison.
7002
238f1c74
MS
70032011-02-26 Michael Snyder <msnyder@vmware.com>
7004
7005 * utils.c (decimal2str): Eliminate dead code and dead param.
7006 (pulongest): Drop dead param from call to decimal2str.
7007 (plongest): Ditto.
7008
633ff500
JB
70092011-02-24 Joel Brobecker <brobecker@adacore.com>
7010
7011 Revert the following patch (not approved yet):
7012 2011-02-21 Hui Zhu <teawater@gmail.com>
7013 * tracepoint.c (tp_printf): New function.
7014 (eval_agent_expr): Handle gdb_agent_op_printf.
7015
f9c6ff72
HZ
70162011-02-21 Hui Zhu <teawater@gmail.com>
7017
7018 * tracepoint.c (tp_printf): New function.
7019 (eval_agent_expr): Handle gdb_agent_op_printf.
7020
94d5e490
TT
70212011-02-18 Tom Tromey <tromey@redhat.com>
7022
7023 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
7024 (tracepoint.o): Likewise.
7025 * tracepoint.c (enum gdb_agent_op): Use ax.def.
7026 (gdb_agent_op_names): Likewise.
7027
c7f96d2b
TT
70282011-02-18 Tom Tromey <tromey@redhat.com>
7029
7030 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
7031 gdb_agent_op_rot>: New constants.
7032 (gdb_agent_op_names): Add pick and roll.
7033 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
7034 cases.
7035
0feedb2c
JK
70362011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
7037
7038 * aclocal.m4: Regenerated with aclocal-1.11.1.
7039
b3b9301e
PA
70402011-02-14 Pedro Alves <pedro@codesourcery.com>
7041
7042 * server.c (handle_qxfer_traceframe_info): New.
7043 (qxfer_packets): Register "traceframe-info".
7044 (handle_query): Report support for qXfer:traceframe-info:read+.
7045 * tracepoint.c (match_blocktype): New.
7046 (traceframe_find_block_type): Rename to ...
7047 (traceframe_walk_blocks): ... this. Add callback filter argument,
7048 and use it.
7049 (traceframe_find_block_type): New, reimplemented on top of
7050 traceframe_walk_blocks.
7051 (build_traceframe_info_xml): New.
7052 (traceframe_read_info): New.
7053 * server.h (traceframe_read_info): Declare.
7054
4f3e6fb7
YQ
70552011-02-11 Yao Qi <yao@codesourcery.com>
7056
7057 * configure.ac: Call AC_PROG_RANLIB.
7058 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
7059 * configure: Regenerate.
7060
764880b7
PA
70612011-02-07 Pedro Alves <pedro@codesourcery.com>
7062
7063 * server.c (gdb_read_memory): Change return semantics to allow
7064 partial transfers.
7065 (handle_search_memory_1): Adjust.
7066 (process_serial_event) <'m' packet>: Handle partial transfers.
7067 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
7068
1c79eb8a
PA
70692011-01-28 Pedro Alves <pedro@codesourcery.com>
7070
7071 * regcache.c (init_register_cache): Initialize
7072 regcache->register_status.
7073 (free_register_cache): Release regcache->register_status.
7074 (regcache_cpy): Copy register_status.
7075 (registers_to_string): Print 'x's for unavailable registers.
7076 (supply_register): Mark the register's status valid or
7077 unavailable, depending on whether a buffer was passed in or not.
7078 (supply_register_zeroed): New.
7079 (supply_regblock): Mark the registers' status valid or
7080 unavailable, depending on whether a buffer was passed in or not.
7081 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
7082 (struct regcache): New `register_status' field.
7083 (supply_register_zeroed): Declare.
7084 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
7085 supply_register_zeroed, rather than passing a NULL buffer to
7086 supply_register.
7087 * tracepoint.c (fetch_traceframe_registers): Update comment.
7088
85724a0e
PA
70892011-01-28 Pedro Alves <pedro@codesourcery.com>
7090
7091 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
7092 buffer explicit.
7093
d08aafef
PA
70942011-01-25 Pedro Alves <pedro@codesourcery.com>
7095
7096 * server.h (decode_xfer_write): Change prototype.
7097 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
7098 and don't extract the annex here.
7099 * server.c (decode_xfer_read): Remove `annex' parameter,
7100 and don't extract the annex here.
7101 (decode_xfer): New.
7102 (struct qxfer): New.
7103 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
7104 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
7105 (handle_qxfer_statictrace): New functions, abstracted out from
7106 handle_query, and made to use the struct qxfer interface.
7107 (handle_threads_qxfer_proper): Rename to ...
7108 (handle_qxfer_threads_proper): ... this.
7109 (handle_threads_qxfer): Rename to ...
7110 (handle_qxfer_threads): ... this. Adjust.
7111 (qxfer_packets): New array.
7112 (handle_qxfer): New function.
7113 (handle_query): Use handle_qxfer.
7114
493e2a69
MS
71152011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
7116
7117 * gdbreplay.c: Shorten lines of >= 80 columns.
7118 * linux-low.c: Ditto.
7119 * linux-ppc-low.c: Ditto.
7120 * linux-s390-low.c: Ditto.
7121 * linux-sparc-low.c: Ditto.
7122 * linux-x86-low.c: Ditto.
7123 * linux-xtensa-low.c: Ditto.
7124 * mem-break.c: Ditto.
7125 * nto-low.c: Ditto.
7126 * regcache.h: Ditto.
7127 * remote-utils.c: Ditto.
7128 * server.c: Ditto.
7129 * server.h: Ditto.
7130 * thread-db.c: Ditto.
7131 * tracepoint.c: Ditto.
7132 * utils.c: Ditto.
7133 * win32-low.h: Ditto.
7134
44944448
JB
71352011-01-05 Joel Brobecker <brobecker@adacore.com>
7136
7137 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
7138 update.
7139
71ce852c
JB
71402011-01-01 Joel Brobecker <brobecker@adacore.com>
7141
7142 * server.c (gdbserver_version): Update copyright year in version
7143 output.
7144 * gdbreplay.c (gdbreplay_version): Ditto.
7145
eb826dc6
MF
71462010-12-29 Jie Zhang <jie.zhang@analog.com>
7147
7148 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
7149 * linux-bfin-low.c: New file.
7150 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
7151 PT_DATA_ADDR for BFIN targets.
7152 * Makefile.in (SFILES): Add linux-bfin-low.c.
7153 (clean): Remove reg-bfin.c.
7154 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
7155 * README: Mention supported Blackfin targets.
7156
39ab222a
MF
71572010-12-23 Mike Frysinger <vapier@gentoo.org>
7158
7159 * .gitignore: New file.
7160
a1f2ce7d
MF
71612010-11-16 Mike Frysinger <vapier@gentoo.org>
7162
7163 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
7164
f474844c
JZ
71652010-10-22 Jie Zhang <jie@codesourcery.com>
7166
7167 * Makefile.in: Add FLAGS_TO_PASS variable.
7168 (install): Remove dependency of install-only and recursively
7169 invoke make for install-only.
7170
f1048712
DE
71712010-10-04 Doug Evans <dje@google.com>
7172
7173 * Makefile.in (uninstall): Use $(DESTDIR).
7174
b53a1623
PA
71752010-09-24 Pedro Alves <pedro@codesourcery.com>
7176
e6ee044d
PA
7177 PR gdb/11842
7178
b53a1623
PA
7179 * linux-x86-low.c (compat_siginfo_from_siginfo)
7180 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
7181 si_code is < 0. Check for si_code == SI_TIMER before checking for
7182 si_code < 0.
7183
fa1bd1e4
JB
71842010-09-13 Joel Brobecker <brobecker@adacore.com>
7185
7186 * lynx-i386-low.c: New file.
7187 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
7188
47fac8f8
JB
71892010-09-13 Joel Brobecker <brobecker@adacore.com>
7190
7191 * lynx-low.c (ptrace_request_to_str): Remove handling for
7192 request values that have been removed in LynxOS 5.x.
7193
1adfc54d
JB
71942010-09-13 Joel Brobecker <brobecker@adacore.com>
7195
7196 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
7197 <ptrace.h>
7198
c2a66c29
NS
71992010-09-09 Nathan Sidwell <nathan@codesourcery.com>
7200
7201 * configure.ac: Add --enable-inprocess-agent option.
7202 * configure: Rebuilt.
7203
32fcada3
YQ
72042010-09-06 Yao Qi <yao@codesourcery.com>
7205
7206 * linux-low.c (linux_kill): Remove unused variable.
7207 (linux_stabilize_threads): Likewise.
7208 * server.c (start_inferior): Likewise.
7209 (queue_stop_reply_callback): Likewise.
7210 * tracepoint.c (do_action_at_tracepoint): Likewise.
7211
0cccb683
YQ
72122010-09-06 Yao Qi <yao@codesourcery.com>
7213
7214 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
7215 on return.
7216
423ec54c
JK
72172010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
7218
7219 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
7220
12ac6819
PA
72212010-09-06 Pedro Alves <pedro@codesourcery.com>
7222
7223 * Makefile.in (install-only): Replace $IPA_DEPFILES with
7224 "$(IPA_DEPFILES)".
7225
8ed54b31
JB
72262010-09-01 Joel Brobecker <brobecker@adacore.com>
7227
7228 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
7229 gdbserver/lynx-ppc-low.c: New files.
7230 * Makefile.in (lynx_low_h): New variable.
7231 (lynx-low.o, lynx-ppc-low.o): New rules.
7232 * configure.ac: On LynxOS, link with -lnetinet.
7233 * configure.srv: Add handling of powerpc-*-lynxos* targets.
7234 * configure: regenerate.
7235
bb0116a4
JB
72362010-09-01 Joel Brobecker <brobecker@adacore.com>
7237
7238 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
7239 * configure.ac: Add check for vasprintf and vsnprintf.
7240 * configure, config.in: Regenerate.
7241 * server.h (vasprintf, vsnprintf): Add conditional declarations.
7242
a778ab81 72432010-09-01 Joel Brobecker <brobecker@adacore.com>
7244
7245 * gdbreplay.c: Move include of alloca.h up, next to include of
7246 malloc.h.
7247 * server.h: Add include of malloc.h.
7248 * mem-break.c: Remove include of malloc.h.
7249 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
7250
8b034a19 72512010-09-01 Joel Brobecker <brobecker@adacore.com>
7252
7253 * Makefile.in (memmem.o): Build with -Wno-error.
7254
72552010-09-01 Joel Brobecker <brobecker@adacore.com>
7256
7257 * utils.c (xsnprintf): Make non-static.
7258 * server.h: Add xsnprintf declaration.
7259 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
7260 replace calls to snprintf by calls to xsnprintf throughout.
7261
72622010-09-01 Joel Brobecker <brobecker@adacore.com>
7263
7264 * configure.ac: Add configure check for alloca.
7265 * configure, config.in: Regenerate.
7266 * server.h: Include alloca.h if it exists.
7267 * gdbreplay.c: Include alloca.h if it exists.
7268
1a981360
PA
72692010-08-28 Pedro Alves <pedro@codesourcery.com>
7270
7271 * linux-low.c (__SIGRTMIN): Define if not already defined.
7272 (linux_create_inferior): Check for __ANDROID__ rather than
7273 __SIGRTMIN.
7274 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
7275 are already deferred.
7276 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
7277 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
7278 stopped and already has a pending signal to report.
7279 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
7280 a pending signal to report or is moving out of a jump pad.
7281 (linux_init_signals): Check for __ANDROID__ rather than
7282 __SIGRTMIN.
7283
b4d51a55
PA
72842010-08-28 Pedro Alves <pedro@codesourcery.com>
7285
7286 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
7287 debug_threads check. Avoid a linear search when not doing debug
7288 output.
7289
ec48365d
PA
72902010-08-27 Pedro Alves <pedro@codesourcery.com>
7291
7292 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
7293 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
7294 (struct file_handler) <fd>: Change type to gdb_fildes_t.
7295 (process_event): Change local fd's type to gdb_fildes_t.
7296 (create_file_handler): Adjust prototype.
7297 (delete_file_handler): Adjust prototype.
7298 (handle_file_event): Adjust prototype. Use pfildes.
7299 (create_file_event): Adjsut prototype.
7300 * remote-utils.c (remote_desc, listen_desc): Change type to
7301 gdb_fildes_t.
7302 * server.h: New gdb_fildes_t typedef.
7303 [USE_WIN32API]: Include winsock2.h.
7304 (delete_file_handler, add_file_handler): Adjust prototypes.
7305 (pfildes): Declare.
7306 * utils.c (pfildes): New.
7307
854d88f0
PA
73082010-08-27 Pedro Alves <pedro@codesourcery.com>
7309
7310 * configure.ac (build_warnings): Add -Wno-char-subscripts.
7311 * configure: Regenerate.
7312
0146f85b
PA
73132010-08-27 Pedro Alves <pedro@codesourcery.com>
7314
7315 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
7316 (linux_done_accessing_memory): ... this.
7317 (linux_target_ops): Adjust.
7318 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
7319 * nto-low.c (nto_target_ops): Adjust comment.
7320 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
7321 * spu-low.c (spu_target_ops): Adjust comment.
7322 * target.h (target_ops): Rename unprepare_to_access_memory field
7323 to done_accessing_memory.
7324 (unprepare_to_access_memory): Rename to ...
7325 (done_accessing_memory): ... this.
7326
90d74c30
PA
73272010-08-26 Pedro Alves <pedro@codesourcery.com>
7328
7329 * linux-low.c (linux_prepare_to_access_memory): New.
7330 (linux_unprepare_to_access_memory): New.
7331 (linux_target_ops): Install them.
7332 * server.c (read_memory): Rename to ...
7333 (gdb_read_memory): ... this. Use
7334 prepare_to_access_memory/prepare_to_access_memory.
7335 (write_memory): Rename to ...
7336 (gdb_write_memory): ... this. Use
7337 prepare_to_access_memory/prepare_to_access_memory.
7338 (handle_search_memory_1): Adjust.
7339 (process_serial_event): Adjust.
7340 * target.h (struct target_ops): New fields
7341 prepare_to_access_memory and unprepare_to_access_memory.
7342 (prepare_to_access_memory, unprepare_to_access_memory): New.
7343 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
7344 prepare_to_access_memory/prepare_to_access_memory.
7345 * nto-low.c (nto_target_ops): Adjust.
7346 * spu-low.c (spu_target_ops): Adjust.
7347 * win32-low.c (win32_target_ops): Adjust.
7348
fd467969
PA
73492010-08-26 Pedro Alves <pedro@codesourcery.com>
7350
7351 * Makefile.in (WARN_CFLAGS): Get it from configure.
7352 (WERROR_CFLAGS): New.
7353 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
7354 * configure.ac: Introduce --enable-werror, which adds -Werror to
7355 the compiler command line. Enabled by default. Disable with
7356 --disable-werror. Add -Wdeclaration-after-statement
7357 Wpointer-arith and -Wformat-nonliteral to warning flags.
7358 * configure: Regenerate.
7359
331e2f5f
PA
73602010-08-26 Pedro Alves <pedro@codesourcery.com>
7361
7362 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
7363
e581f2b4
PA
73642010-08-26 Pedro Alves <pedro@codesourcery.com>
7365
7366 * gdbreplay.c (remote_error): New.
7367 (gdbchar): New.
7368 (expect): Use gdbchar. Check for error reading from GDB.
7369 Clarify sync error output.
7370 (play): Check for errors writing to GDB.
7371 * linux-low.c (sigchld_handler): Really ignore `write' errors.
7372 * remote-utils.c (getpkt): Check for errors writing to the remote
7373 descriptor.
7374
3c11dd79
PA
73752010-08-25 Pedro Alves <pedro@codesourcery.com>
7376
7377 * linux-low.c (linux_wait_1): Move non-debugging code out of
7378 `debug_threads' control.
7379
d20a8ad9
PA
73802010-08-25 Pedro Alves <pedro@codesourcery.com>
7381
7382 * linux-low.c (linux_wait_1): Don't set last_status here.
7383 * server.c (push_event, queue_stop_reply_callback): Assert we're
7384 not pushing a TARGET_WAITKIND_IGNORE event.
7385 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
7386 (myresume, handle_target_event): Set the thread's last_resume_kind
7387 and last_status from the target returned status.
7388
964e4306
PA
73892010-08-25 Pedro Alves <pedro@codesourcery.com>
7390
7391 PR threads/10729
7392
7393 * linux-x86-low.c (update_debug_registers_callback): New.
7394 (i386_dr_low_set_addr): Use it.
7395 (i386_dr_low_get_addr): New.
7396 (i386_dr_low_set_control): Use update_debug_registers_callback.
7397 (i386_dr_low_get_control): New.
7398 (i386_dr_low_get_status): Adjust.
7399 * linux-low.c (linux_stop_lwp): New.
7400 * linux-low.h (linux_stop_lwp): Declare.
7401
7402 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
7403 argument instead of a i386_debug_reg_state.
7404 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
7405 a i386_debug_reg_state.
7406 (i386_insert_aligned_watchpoint): Adjust.
7407 (i386_remove_aligned_watchpoint): Adjust.
7408 (i386_low_stopped_data_address): Read the debug registers from the
7409 inferior instead of from the mirrors.
7410 * i386-low.h (struct i386_debug_reg_state): Extend comment.
7411 (i386_dr_low_get_addr): Declare.
7412 (i386_dr_low_get_control): Declare.
7413 (i386_dr_low_get_status): Change prototype.
7414
7415 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
7416 (i386_dr_low_get_addr): New.
7417 (i386_dr_low_get_control): New.
7418 (i386_dr_low_get_status): Adjust prototype. Return
7419 dr_status_mirror.
7420 (i386_initial_stuff): Clear dr_status_mirror and
7421 dr_control_mirror.
7422 (i386_get_thread_context): Adjust.
7423 (i386_set_thread_context): Adjust.
7424 (i386_thread_added): Adjust.
7425
5f21a75b
PA
74262010-08-24 Pedro Alves <pedro@codesourcery.com>
7427
7428 * linux-low.h (linux_thread_area): Delete declaration.
7429
3e4c1235
TS
74302010-08-11 Thomas Schwinge <thomas@codesourcery.com>
7431
7432 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
7433 after its termination.
7434
1971b033
PA
74352010-08-09 Pedro Alves <pedro@codesourcery.com>
7436
7437 * linux-low.c (gdb_wants_lwp_stopped): Delete.
7438 (gdb_wants_all_stopped): Delete.
7439 (linux_wait_1): Don't call them.
7440 * server.c (handle_v_cont): Tag all threads as want-stopped.
7441 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
7442 stopped as "client-wants-stopped".
7443
310444ac
PA
74442010-07-31 Pedro Alves <pedro@codesourcery.com>
7445
7446 * Makefile.in (signals_h): New.
7447 (server_h): Depend on it.
7448 (server.o): Don't depend on $(signals_def).
7449 (signals.o): Depend on $(signals_def).
7450
a19cae16
JK
74512010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
7452
7453 * Makefile.in (signals_def): New.
7454 (server_h): Append include/gdb/signals.h and signals_def.
7455 (server.o): Append signals_def.
7456
30d50328
JK
74572010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
7458
7459 * server.c (handle_target_event): Use target_signal_to_host for
7460 resume_info.sig initialization.
7461 * target.h (struct thread_resume) <sig>: New comment.
7462
5c3216e2
OS
74632010-07-20 Ozkan Sezer <sezeroz@gmail.com>
7464
c6f46ca0
OS
7465 * server.c (handle_query): strcpy() the returned string from paddress()
7466 instead of sprintf().
5c3216e2
OS
7467 * utils.c (paddress): Return phex_nz().
7468
6bd31874
JB
74692010-07-07 Joel Brobecker <brobecker@adacore.com>
7470
7471 * server.c (handle_v_cont): Call mourn_inferior if process
7472 just exited.
7473 (myresume): Likewise.
7474
0fb4aa4b
PA
74752010-07-01 Pedro Alves <pedro@codesourcery.com>
7476
7477 Static tracepoints, and integration with UST.
7478
7479 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
7480 * mem-break.c (uninsert_all_breakpoints)
7481 (reinsert_all_breakpoints): New.
7482 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
7483 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
7484 (gdb_agent_ust_loaded, helper_thread_id)
7485 (gdb_agent_helper_thread_id): New macros.
7486 (struct ipa_sym_addresses): Add addr_ust_loaded,
7487 addr_helper_thread_id, addr_cmd_buf.
7488 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
7489 (in_process_agent_loaded_ust): New.
7490 (write_e_ust_not_loaded): New.
7491 (maybe_write_ipa_ust_not_loaded): New.
7492 (struct collect_static_trace_data_action): New.
7493 (enum tracepoint_type) <static_tracepoint>: New.
7494 (struct tracepoint) <handle>: Mention static tracepoints.
7495 (struct static_tracepoint_ctx): New.
7496 (CMD_BUF_SIZE): New.
7497 (add_tracepoint_action): Handle static tracepoint actions.
7498 (unprobe_marker_at): New.
7499 (clear_installed_tracepoints): Handle static tracepoints.
7500 (cmd_qtdp): Handle static tracepoints.
7501 (probe_marker_at): New.
7502 (cmd_qtstart): Handle static tracepoints.
7503 (response_tracepoint): Handle static tracepoints.
7504 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
7505 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
7506 (get_context_regcache): Handle static tracepoints.
7507 (do_action_at_tracepoint): Handle static tracepoint actions.
7508 (traceframe_find_block_type): Handle static trace data blocks.
7509 (traceframe_read_sdata): New.
7510 (download_tracepoints): Download static tracepoint actions.
7511 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
7512 (GDB_PROBE_NAME): New.
7513 (ust_ops): New.
7514 (GET_UST_SYM): New.
7515 (USTF): New.
7516 (dlsym_ust): New.
7517 (ust_marker_to_static_tracepoint): New.
7518 (gdb_probe): New.
7519 (collect_ust_data_at_tracepoint): New.
7520 (gdb_ust_probe): New.
7521 (UNIX_PATH_MAX, SOCK_DIR): New.
7522 (gdb_ust_connect_sync_socket): New.
7523 (resume_thread, stop_thread): New.
7524 (run_inferior_command): New.
7525 (init_named_socket): New.
7526 (gdb_ust_socket_init): New.
7527 (cstr_to_hexstr): New.
7528 (next_st): New.
7529 (first_marker, next_marker): New.
7530 (response_ust_marker): New.
7531 (cmd_qtfstm, cmd_qtsstm): New.
7532 (unprobe_marker_at, probe_marker_at): New.
7533 (cmd_qtstmat, gdb_ust_thread): New.
7534 (gdb_ust_init): New.
7535 (initialize_tracepoint_ftlib): Call gdb_ust_init.
7536 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
7537 (ST_REGENTRY): New.
7538 (x86_64_st_collect_regmap): New.
7539 (X86_64_NUM_ST_COLLECT_GREGS): New.
7540 (AMD64_RIP_REGNUM): New.
7541 (supply_static_tracepoint_registers): New.
7542 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
7543 (ST_REGENTRY): New.
7544 (i386_st_collect_regmap): New.
7545 (i386_NUM_ST_COLLECT_GREGS): New.
7546 (supply_static_tracepoint_registers): New.
7547 * server.c (handle_query): Handle qXfer:statictrace:read.
7548 <qSupported>: Report support for StaticTracepoints, and
7549 qXfer:statictrace:read features.
7550 * server.h (traceframe_read_sdata)
7551 (supply_static_tracepoint_registers): Declare.
7552 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
7553 (unpack_varlen_hex): Include in IPA build.
7554 * Makefile.in (ustlibs, ustinc): New.
7555 (IPA_OBJS): Add remote-utils-ipa.o.
7556 ($(IPA_LIB)): Link -ldl and -lpthread.
7557 (UST_CFLAGS): New.
7558 (IPAGENT_CFLAGS): Add UST_CFLAGS.
7559 * config.in, configure: Regenerate.
7560
9e4344e5
PA
75612010-06-20 Ian Lance Taylor <iant@google.com>
7562 Pedro Alves <pedro@codesourcery.com>
7563
7564 * linux-x86-low.c (always_true): Delete.
7565 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
7566 trying to fool the compiler with always_true.
7567
c6beb2cb
PA
75682010-06-20 Pedro Alves <pedro@codesourcery.com>
7569
7570 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
7571 conditions in gdbserver.
7572
d2ed6730
UW
75732010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
7574
7575 * spu-low.c (spu_read_memory): Wrap around local store limit.
7576 (spu_write_memory): Likewise.
7577
4e29fb54
PA
75782010-06-15 Pedro Alves <pedro@codesourcery.com>
7579
7580 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
7581 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
7582 LONGEST uses.
7583 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
7584 uses.
7585 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
7586 uses with LONGEST uses.
7587
6a271cae
PA
75882010-06-14 Stan Shebs <stan@codesourcery.com>
7589 Pedro Alves <pedro@codesourcery.com>
7590
7591 Bytecode compiler.
7592
7593 * linux-x86-low.c: Include limits.h.
7594 (add_insns): New.
7595 (always_true): New.
7596 (EMIT_ASM): New.
7597 (EMIT_ASM32): New.
7598 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
7599 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
7600 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
7601 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
7602 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
7603 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
7604 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
7605 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
7606 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
7607 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
7608 (amd64_emit_void_call_2): New.
7609 (amd64_emit_ops): New.
7610 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
7611 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
7612 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
7613 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
7614 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
7615 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
7616 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
7617 (i386_emit_call, i386_emit_reg, i386_emit_pop)
7618 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
7619 (i386_emit_stack_adjust, i386_emit_int_call_1)
7620 (i386_emit_void_call_2): New.
7621 (i386_emit_ops): New.
7622 (x86_emit_ops): New.
7623 (the_low_target): Install x86_emit_ops.
7624 * server.h (struct emit_ops): New.
7625 (get_raw_reg_func_addr): Declare.
7626 (current_insn_ptr, emit_error): Declare.
7627 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
7628 (set_trace_state_variable_value): New defines.
7629 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
7630 addr_get_trace_state_variable_value and
7631 addr_set_trace_state_variable_value.
7632 (symbol_list): New fields for get_raw_reg,
7633 get_trace_state_variable_value and set_trace_state_variable_value.
7634 (condfn): New typedef.
7635 (struct tracepoint): New field `compiled_cond'.
7636 (do_action_at_tracepoint): Clear compiled_cond.
7637 (get_trace_state_variable_value, set_trace_state_variable_value):
7638 Export in the IPA.
7639 (condition_true_at_tracepoint): If there's a compiled condition,
7640 run that.
7641 (current_insn_ptr, emit_error): New globals.
7642 (struct bytecode_address): New.
7643 (get_raw_reg_func_addr): New.
7644 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
7645 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
7646 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
7647 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
7648 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
7649 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
7650 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
7651 (compile_tracepoint_condition, compile_bytecodes): New.
7652 * target.h (emit_ops): Forward declare.
7653 (struct target_ops): New field emit_ops.
7654 (target_emit_ops): New.
7655 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
7656 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
7657 * linux-low.c (linux_emit_ops): New.
7658 (linux_target_ops): Install it.
7659 * linux-low.h (struct linux_target_ops): New field emit_ops.
7660
92b72907
UW
76612010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
7662
7663 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
7664 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
7665
fa593d66
PA
76662010-06-01 Pedro Alves <pedro@codesourcery.com>
7667 Stan Shebs <stan@codesourcery.com>
7668
7669 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
7670 (all): Depend on $(extra_libraries).
7671 (install-only): Install the IPA.
7672 (IPA_OBJS, IPA_LIB): New.
7673 (clean): Remove the IPA lib.
7674 (IPAGENT_CFLAGS): New.
7675 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
7676 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
7677 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
7678 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
7679 * configure.ac: Check for atomic builtins support in the compiler.
7680 (IPA_DEPFILES, extra_libraries): Define.
7681 * configure.srv (ipa_obj): Add description.
7682 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
7683 (i[34567]86-*-linux*): Set ipa_obj.
7684 (x86_64-*-linux*): Set ipa_obj.
7685 * linux-low.c (stabilizing_threads): New.
7686 (supports_fast_tracepoints): New.
7687 (linux_detach): Stabilize threads before detaching.
7688 (handle_tracepoints): Handle internal tracing breakpoints. Assert
7689 the lwp is either not stabilizing, or is moving out of a jump pad.
7690 (linux_fast_tracepoint_collecting): New.
7691 (maybe_move_out_of_jump_pad): New.
7692 (enqueue_one_deferred_signal): New.
7693 (dequeue_one_deferred_signal): New.
7694 (linux_wait_for_event_1): If moving out of a jump pad, defer
7695 pending signals to later.
7696 (linux_stabilize_threads): New.
7697 (linux_wait_1): Check if threads need moving out of jump pads, and
7698 do it if so.
7699 (stuck_in_jump_pad_callback): New.
7700 (move_out_of_jump_pad_callback): New.
7701 (lwp_running): New.
7702 (linux_resume_one_lwp): Handle moving out of jump pads.
7703 (linux_set_resume_request): Dequeue deferred signals.
7704 (need_step_over_p): Also step over fast tracepoint jumps.
7705 (start_step_over): Also uninsert fast tracepoint jumps.
7706 (finish_step_over): Also reinsert fast tracepoint jumps.
7707 (linux_install_fast_tracepoint_jump): New.
7708 (linux_target_ops): Install linux_stabilize_threads and
7709 linux_install_fast_tracepoint_jump_pad.
7710 * linux-low.h (linux_target_ops) <get_thread_area,
7711 install_fast_tracepoint_jump_pad>: New fields.
7712 (struct lwp_info) <collecting_fast_tracepoint,
7713 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
7714 (linux_get_thread_area): Declare.
7715 * linux-x86-low.c (jump_insn): New.
7716 (x86_get_thread_area): New.
7717 (append_insns): New.
7718 (push_opcode): New.
7719 (amd64_install_fast_tracepoint_jump_pad): New.
7720 (i386_install_fast_tracepoint_jump_pad): New.
7721 (x86_install_fast_tracepoint_jump_pad): New.
7722 (the_low_target): Install x86_get_thread_area and
7723 x86_install_fast_tracepoint_jump_pad.
7724 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
7725 (struct fast_tracepoint_jump): New.
7726 (fast_tracepoint_jump_insn): New.
7727 (fast_tracepoint_jump_shadow): New.
7728 (find_fast_tracepoint_jump_at): New.
7729 (fast_tracepoint_jump_here): New.
7730 (delete_fast_tracepoint_jump): New.
7731 (set_fast_tracepoint_jump): New.
7732 (uninsert_fast_tracepoint_jumps_at): New.
7733 (reinsert_fast_tracepoint_jumps_at): New.
7734 (set_breakpoint_at): Use write_inferior_memory.
7735 (uninsert_raw_breakpoint): Use write_inferior_memory.
7736 (check_mem_read): Mask out fast tracepoint jumps.
7737 (check_mem_write): Mask out fast tracepoint jumps.
7738 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
7739 (set_fast_tracepoint_jump): Declare.
7740 (delete_fast_tracepoint_jump)
7741 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
7742 (reinsert_fast_tracepoint_jumps_at): Declare.
7743 * regcache.c: Don't compile many functions when building the
7744 in-process agent library.
7745 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
7746 the register buffer in the heap.
7747 (free_register_cache): If the register buffer isn't owned by the
7748 regcache, don't free it.
7749 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
7750 pre-existing register caches.
7751 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
7752 type.
7753 (convert_ascii_to_int): : Constify `from' parameter type.
7754 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
7755 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
7756 the needed buffer in-place.
7757 (relocate_instruction): New.
7758 * server.c (handle_query) <qSymbols>: If the target supports
7759 tracepoints, give it a chance of looking up symbols. Report
7760 support for fast tracepoints.
7761 (handle_status): Stabilize threads.
7762 (process_serial_event): Adjust.
7763 * server.h (struct fast_tracepoint_jump): Forward declare.
7764 (struct process_info) <fast_tracepoint_jumps>: New field.
7765 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
7766 (decode_X_packet, decode_M_packet): Adjust.
7767 (relocate_instruction): Declare.
7768 (in_process_agent_loaded): Declare.
7769 (tracepoint_look_up_symbols): Declare.
7770 (struct fast_tpoint_collect_status): Declare.
7771 (fast_tracepoint_collecting): Declare.
7772 (force_unlock_trace_buffer): Declare.
7773 (handle_tracepoint_bkpts): Declare.
7774 (initialize_low_tracepoint)
7775 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
7776 * target.h (struct target_ops) <stabilize_threads,
7777 install_fast_tracepoint_jump_pad>: New fields.
7778 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
7779 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
7780 [HAVE_STDINT_H]: Include stdint.h.
7781 (trace_debug_1): Rename to ...
7782 (trace_vdebug): ... this.
7783 (trace_debug): Rename to ...
7784 (trace_debug_1): ... this. Add `level' parameter.
7785 (trace_debug): New.
7786 (ATTR_USED, ATTR_NOINLINE): New.
7787 (IP_AGENT_EXPORT): New.
7788 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
7789 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
7790 (about_to_request_buffer_space, trace_buffer_is_full)
7791 (stopping_tracepoint, expr_eval_result, error_tracepoint)
7792 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
7793 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
7794 (traceframe_write_count, traceframes_created)
7795 (trace_state_variables)
7796 New renaming defines.
7797 (struct ipa_sym_addresses): New.
7798 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
7799 (symbol_list): New.
7800 (ipa_sym_addrs): New.
7801 (all_tracepoint_symbols_looked_up): New.
7802 (in_process_agent_loaded): New.
7803 (write_e_ipa_not_loaded): New.
7804 (maybe_write_ipa_not_loaded): New.
7805 (tracepoint_look_up_symbols): New.
7806 (debug_threads) [IN_PROCESS_AGENT]: New.
7807 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
7808 (UNKNOWN_SIDE_EFFECTS): New.
7809 (stop_tracing): New.
7810 (flush_trace_buffer): New.
7811 (stop_tracing_bkpt): New.
7812 (flush_trace_buffer_bkpt): New.
7813 (read_inferior_integer): New.
7814 (read_inferior_uinteger): New.
7815 (read_inferior_data_pointer): New.
7816 (write_inferior_data_pointer): New.
7817 (write_inferior_integer): New.
7818 (write_inferior_uinteger): New.
7819 (struct collect_static_trace_data_action): Delete.
7820 (enum tracepoint_type): New.
7821 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
7822 <actions_str, step_actions, step_actions_str>: Only include in
7823 GDBserver.
fa593d66
PA
7824 <orig_size, obj_addr_on_target, adjusted_insn_addr>
7825 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
7826 (tracepoints): Use IP_AGENT_EXPORT.
7827 (last_tracepoint): Don't include in the IPA.
7828 (stopping_tracepoint): Use IP_AGENT_EXPORT.
7829 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
7830 (alloced_trace_state_variables): New.
7831 (trace_state_variables): Use IP_AGENT_EXPORT.
7832 (traceframe_t): Delete unused variable.
7833 (circular_trace_buffer): Don't include in the IPA.
7834 (trace_buffer_start): Delete.
7835 (struct trace_buffer_control): New.
7836 (trace_buffer_free): Delete.
7837 (struct ipa_trace_buffer_control): New.
7838 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
7839 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
7840 New.
7841 (trace_buffer_ctrl): New.
7842 (TRACE_BUFFER_CTRL_CURR): New.
7843 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
7844 Reimplement as macros.
7845 (trace_buffer_wrap): Delete.
7846 (traceframe_write_count, traceframe_read_count)
7847 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
7848 (struct tracepoint_hit_ctx) <type>: New field.
7849 (struct fast_tracepoint_ctx): New.
7850 (memory_barrier): New.
7851 (cmpxchg): New.
7852 (record_tracepoint_error): Update atomically in the IPA.
7853 (clear_inferior_trace_buffer): New.
7854 (about_to_request_buffer_space): New.
7855 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
7856 updating the same buffer.
7857 (add_tracepoint): Default the tracepoint's type to trap
7858 tracepoint, and orig_size to -1.
7859 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
7860 internal variables.
7861 (create_trace_state_variable): New parameter `gdb'. Handle it.
7862 (clear_installed_tracepoints): Clear fast tracepoint jumps.
7863 (cmd_qtdp): Handle fast tracepoints.
7864 (cmd_qtdv): Adjust.
7865 (max_jump_pad_size): New.
7866 (gdb_jump_pad_head): New.
7867 (get_jump_space_head): New.
7868 (claim_jump_space): New.
7869 (sort_tracepoints): New.
7870 (MAX_JUMP_SIZE): New.
7871 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
7872 IPA.
7873 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
7874 support. Upload fast traceframes, and delete internal IPA
7875 breakpoints.
7876 (stop_tracing_handler): New.
7877 (flush_trace_buffer_handler): New.
7878 (cmd_qtstop): Upload fast tracepoints.
7879 (response_tracepoint): Handle fast tracepoints.
7880 (tracepoint_finished_step): Upload fast traceframes. Set the
7881 tracepoint hit context's tracepoint type.
7882 (handle_tracepoint_bkpts): New.
7883 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
7884 type. Add comment about fast tracepoints.
7885 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
7886 non-existing action_str field.
7887 (get_context_regcache): Handle fast tracepoints.
7888 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
7889 to the regcache.
7890 (fast_tracepoint_from_jump_pad_address): New.
7891 (fast_tracepoint_from_ipa_tpoint_address): New.
7892 (collecting_t): New.
7893 (force_unlock_trace_buffer): New.
7894 (fast_tracepoint_collecting): New.
7895 (collecting): New.
7896 (gdb_collect): New.
7897 (write_inferior_data_ptr): New.
7898 (target_tp_heap): New.
7899 (target_malloc): New.
7900 (download_agent_expr): New.
7901 (UALIGN): New.
7902 (download_tracepoints): New.
7903 (download_trace_state_variables): New.
7904 (upload_fast_traceframes): New.
7905 (IPA_FIRST_TRACEFRAME): New.
7906 (IPA_NEXT_TRACEFRAME_1): New.
7907 (IPA_NEXT_TRACEFRAME): New.
7908 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
7909 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
7910 (gdb_jump_pad_buffer_end): New.
7911 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
7912 (initialize_tracepoint): Adjust.
7913 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
7914 buffer. Initialize the low module.
7915 * utils.c (PREFIX, TOOLNAME): New.
7916 (malloc_failure): Use PREFIX.
7917 (error): In the IPA, an error causes an exit.
7918 (fatal, warning): Use PREFIX.
7919 (internal_error): Use TOOLNAME.
7920 (NUMCELLS): Increase to 10.
7921 * configure, config.in: Regenerate.
7922
d149dd1d
PA
79232010-06-01 Pedro Alves <pedro@codesourcery.com>
7924
7925 * server.c (handle_query) <qSupported>: Do two passes over the
7926 qSupported string to avoid nesting strtok.
7927
f6528abd
JK
79282010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7929
7930 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
7931 (CDEPS): New.
7932 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
7933 -Wl,--dynamic-list.
7934 * configure: Regenerate.
7935 * proc-service.list: New.
7936
ca2a87a0
JK
79372010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7938
7939 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
7940 New comment.
7941
363a6e9f
OS
79422010-05-26 Ozkan Sezer <sezeroz@gmail.com>
7943
7944 * gdbreplay.c (remote_open): Check error return from socket() call by
7945 its equality to -1 not by it being negative.
7946 * remote-utils.c (remote_open): Likewise.
7947
d23b6cb1
PA
79482010-05-23 Pedro Alves <pedro@codesourcery.com>
7949
7950 * config.h: Regenerate.
7951
28d3cf85
MK
79522010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
7953
7954 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
7955 doesn't provide PTRACE_GET_THREAD_AREA.
7956
fea36a59
MK
79572010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
7958
7959 * linux-m68k-low.c: Include <asm/ptrace.h>
7960 (ps_get_thread_area): Implement.
7961
24b066ba
DE
79622010-05-03 Doug Evans <dje@google.com>
7963
7964 * event-loop.c (struct callback_event): New struct.
7965 (callback_list): New global.
7966 (append_callback_event, delete_callback_event): New functions.
7967 (process_callback): New function.
7968 (start_event_loop): Call it.
7969 * remote-utils.c (NOT_SCHEDULED): Define.
7970 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
7971 moved out of readchar.
7972 (readchar): Rewrite. Call reschedule before returning.
7973 (reset_readchar): New function.
7974 (remote_close): Call it.
7975 (process_remaining, reschedule): New functions.
7976 * server.h (callback_handler_func): New typedef.
7977 (append_callback_event, delete_callback_event): Declare.
7978
9836d6ea
PA
79792010-05-03 Pedro Alves <pedro@codesourcery.com>
7980
7981 * proc-service.c (ps_pglobal_lookup): Use
7982 thread_db_look_up_one_symbol.
7983 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
7984 parameter. Use it instead of all_symbols_looked_up.
7985 * server.h (struct process_info) <all_symbols_looked_up>: Delete
7986 field.
7987 (all_symbols_looked_up): Don't declare.
7988 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
7989 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
7990 field.
7991 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
7992 Set all_symbols_looked_up here.
7993 (thread_db_look_up_one_symbol): New.
7994 (thread_db_get_tls_address): Adjust.
7995 (thread_db_load_search, try_thread_db_load_1): Always allocate the
7996 thread_db object on the heap, and tentatively set it in the
7997 process structure.
7998 (thread_db_init): Don't set all_symbols_looked_up here.
7999 * linux-low.h (thread_db_look_up_one_symbol): Declare.
8000
7984d532
PA
80012010-05-03 Pedro Alves <pedro@codesourcery.com>
8002
8003 * linux-low.c (linux_kill, linux_detach): Adjust.
8004 (status_pending_p_callback): Remove redundant statement. Check
8005 for !TARGET_WAITIKIND_IGNORE, instead of
8006 TARGET_WAITKIND_STOPPED.
8007 (handle_tracepoints): Make sure LWP is locked. Adjust.
8008 (linux_wait_for_event_1): Adjust.
8009 (linux_cancel_breakpoints): New.
8010 (unsuspend_one_lwp): New.
8011 (unsuspend_all_lwps): New.
8012 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
8013 (send_sigstop_callback): Change return type to int, add new
8014 `except' parameter and handle it.
8015 (suspend_and_send_sigstop_callback): New.
8016 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
8017 pass them down. If SUSPEND, also increment the lwp's suspend
8018 count.
8019 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
8020 (need_step_over_p): Don't consider suspended LWPs.
8021 (start_step_over): Adjust.
8022 (proceed_one_lwp): Change return type to int, add new `except'
8023 parameter and handle it.
8024 (unsuspend_and_proceed_one_lwp): New.
8025 (proceed_all_lwps): Use find_inferior instead of
8026 for_each_inferior.
8027 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
8028 also decrement the suspend count of LWPs. Pass `except' down,
8029 instead of hacking its suspend count.
8030 (linux_pause_all): Add `freeze' parameter. Adjust.
8031 (linux_unpause_all): New.
8032 (linux_target_ops): Install linux_unpause_all.
8033 * server.c (handle_status): Adjust.
8034 * target.h (struct target_ops): New fields `unpause_all' and
8035 `cancel_breakpoints'. Add new parameter to `pause_all'.
8036 (pause_all): Add new `freeze' parameter.
8037 (unpause_all): New.
8038 (cancel_breakpoints): New.
8039 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
8040 cancel breakpoints.
8041 (cmd_qtstart): Pause threads.
8042 (stop_tracing): Pause threads, and cancel breakpoints.
8043 * win32-low.c (win32_target_ops): Adjust.
8044
e471f25b
PA
80452010-05-03 Pedro Alves <pedro@codesourcery.com>
8046
8047 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
8048 the inferior right away from here...
8049 (linux_wait_1): ... to here, and adjust to check the thread's
8050 last_resume_kind instead of the lwp's step or stop_expected flags.
8051
1915ef4f
PA
80522010-05-02 Pedro Alves <pedro@codesourcery.com>
8053
8054 * README: Use consistent `GDB' and `GDBserver' spellings.
8055
f9e39928
PA
80562010-05-02 Pedro Alves <pedro@codesourcery.com>
8057
8058 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
8059 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
8060 (linux_detach_one_lwp): Assume the lwp is stopped.
8061 (any_thread_of): Delete.
8062 (linux_detach): Stop all lwps here. Don't blindly delete all
8063 breakpoints.
8064 (delete_lwp_callback): New.
8065 (linux_mourn): Delete all lwps of the process that is gone.
8066 (linux_wait_1): Don't delete the last lwp of the process here.
8067 * mem-break.h (mark_breakpoints_out): Declare.
8068 * mem-break.c (mark_breakpoints_out): New.
8069 (free_all_breakpoints): Use it.
8070 * server.c (handle_target_event): If the process is gone, mark
8071 breakpoints out.
8072 * thread-db.c (struct thread_db) <create_bp>: New field.
8073 (thread_db_enable_reporting): Fix prototype. Store a thread event
8074 breakpoint reference in the thread_db struct.
8075 (thread_db_load_search): Clear the thread_db object.
8076 (try_thread_db_load_1): Ditto.
8077 (switch_to_process): New.
8078 (disable_thread_event_reporting): Use it.
8079 (remove_thread_event_breakpoints): New.
8080 (thread_db_detach, thread_db_mourn): Use it.
8081
1e7fc18c
PA
80822010-05-01 Pedro Alves <pedro@codesourcery.com>
8083
8084 * linux-low.c (linux_enable_event_reporting): New.
8085 (linux_wait_for_event_1, handle_extended_wait): Use it.
8086
02fc4de7
PA
80872010-04-30 Pedro Alves <pedro@codesourcery.com>
8088
8089 * linux-low.c (linux_kill_one_lwp, linux_kill)
8090 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
8091 (send_sigstop): Take an lwp_info as parameter instead. Queue a
8092 SIGSTOP even if the LWP is stopped.
8093 (send_sigstop_callback): New.
8094 (stop_all_lwps): Use send_sigstop_callback instead.
8095 (linux_resume_one_thread): Adjust.
8096 (proceed_one_lwp): Still proceed an LWP that the client has
8097 requested to stop, if we haven't reported it as stopped yet. Make
8098 sure that LWPs the client want stopped, have a pending SIGSTOP.
8099
bc3b5632
DE
81002010-04-26 Doug Evans <dje@google.com>
8101
ae1ada35
DE
8102 * server.c (handle_general_set): Make static.
8103
bc3b5632
DE
8104 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
8105 Print received char after testing for error/eof instead of before.
8106 (input_interrupt): Tweak comment.
8107
65730243
DE
81082010-04-23 Doug Evans <dje@google.com>
8109
8110 * server.c (start_inferior): Print inferior argv if --debug.
8111
a8ae7dc0
AR
81122010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
8113
8114 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
8115 * nto-x86-low.c: Include server.h
8116
1c07cc19
PM
81172010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
8118
8119 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
8120 be consistent with other sources of this directory.
8121 (init_registers_amd64): Correct name of source file of this function
8122 in the comment.
8123
e0a61e09
PM
81242010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8125
8126 * configure.srv (x86_64-*-mingw*): New configuration for Windows
8127 64-bit executables.
8128
54709339
PM
81292010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8130
8131 * win32-i386-low.c: Add 64-bit support.
8132 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
8133 (init_registers_amd64): Declare.
8134 (mappings): Add 64-bit version of array.
8135 (init_windows_x86): New function.
8136 (the_low_target): Change init_arch field to init_windows_x86.
8137
e8f0053d
PM
81382010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8139
8140 * win32-low.c: Adapt to support also 64-bit architecture.
8141 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
8142 (get_image_name): Use SIZE_T type for local variable `done'.
8143 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
8144 (toolhelp_get_dll_name): Idem.
8145 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
8146 Use uintptr_t typecast to avoid warning.
8147 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
8148 (handle_exception): Use phex_nz to avoid warning.
8149 (win32_wait): Remove unused local variable `process'.
8150
c481e77e
PM
81512010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8152
8153 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
8154 `amd64-avx.o'.
8155
12ea4b69
PM
81562010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
8157
8158 * configure.ac: Use `ws2_32' library for srv_mingw.
8159 * configure: Regenerate.
8160 * gdbreplay.c: Include winsock2.h instead of winsock.h.
8161 * remote-utils.c: Likewise.
8162
f6d1620c
L
81632010-04-17 H.J. Lu <hongjiu.lu@intel.com>
8164
8165 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
8166 if __x86_64__ is defined.
8167
8e642873
PM
81682010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
8169
8170 * configure: Regenerate.
8171
711e434b
PM
81722010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
8173
8174 * server.c (handle_query): Handle 'qGetTIBAddr' query.
8175 * target.h (target_ops): New get_tib_address field.
8176 * win32-low.h (win32_thread_info): Add thread_local_base field.
8177 * win32-low.c (child_add_thread): Add tlb argument.
8178 Set thread_local_base field to TLB.
8179 (get_child_debug_event): Adapt to child_add_thread change.
8180 (win32_get_tib_address): New function.
8181 (win32_target_ops): Set get_tib_address field to
8182 win32_get_tib_address.
8183 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
8184
505106cd
PA
81852010-04-12 Pedro Alves <pedro@codesourcery.com>
8186
505106cd
PA
8187 * linux-low.c (linux_mourn): Also remove the process.
8188 * server.c (handle_target_event): Don't remove the process here.
8189 * nto-low.c (nto_mourn): New.
8190 (nto_target_ops): Install it.
8191 * spu-low.c (spu_mourn): New.
8192 (spu_target_ops): Install it.
8193 * win32-low.c (win32_mourn): New.
8194 (win32_target_ops): Install it.
8195
e8470a06
PA
81962010-04-12 Pedro Alves <pedro@codesourcery.com>
8197
8198 * server.h (buffer_xml_printf): Remove redundant `;'.
8199
45ba0d02
PA
82002010-04-12 Pedro Alves <pedro@codesourcery.com>
8201
8202 * regcache.c (set_register_cache): Invalidate regcaches before
8203 changing the register cache layout.
8204 (regcache_invalidate_one): Allow a NULL regcache.
8205 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
8206 regcaches before changing the register cache layout or the target
8207 regsets.
8208
59e04013
L
82092010-04-12 H.J. Lu <hongjiu.lu@intel.com>
8210
8211 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
8212 variable warning on Linux/x86-64.
8213
8336d594
PA
82142010-04-11 Pedro Alves <pedro@codesourcery.com>
8215
8216 GDBserver disconnected tracing support.
8217
8218 * linux-low.c (linux_remove_process): Delete.
8219 (add_lwp): Don't set last_resume_kind here.
8220 (linux_kill): Use `mourn'.
8221 (linux_detach): Use `thread_db_detach', and `mourn'.
8222 (linux_mourn): New.
8223 (linux_attach_lwp_1): Adjust comment.
8224 (linux_attach): last_resume_kind moved the thread_info; adjust.
8225 (status_pending_p_callback): Adjust.
8226 (linux_wait_for_event_1): Adjust.
8227 (count_events_callback, select_singlestep_lwp_callback)
8228 (select_event_lwp_callback, cancel_breakpoints_callback)
8229 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
8230 (proceed_one_lwp): Adjust.
8231 (linux_async): Add debug output.
8232 (linux_thread_stopped): New.
8233 (linux_pause_all): New.
8234 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
8235 linux_pause_all.
8236 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
8237 (thread_db_free): Delete declaration.
8238 (thread_db_detach, thread_db_mourn): Declare.
8239 * thread-db.c (thread_db_init): Use thread_db_mourn.
8240 (thread_db_free): Delete, split in two.
8241 (disable_thread_event_reporting): New.
8242 (thread_db_detach): New.
8243 (thread_db_mourn): New.
8244
8245 * server.h (struct thread_info) <last_resume_kind>: New field.
8246 <attached>: Add comment.
8247 <gdb_detached>: New field.
8248 (handler_func): Change return type to int.
8249 (handle_serial_event, handle_target_event): Ditto.
8250 (gdb_connected): Declare.
8251 (tracing): Delete.
8252 (disconnected_tracing): Declare.
8253 (stop_tracing): Declare.
8254
8255 * server.c (handle_query) <qSupported>: Report support for
8256 disconnected tracing.
8257 (queue_stop_reply_callback): Account for running threads.
8258 (gdb_wants_thread_stopped): New.
8259 (gdb_wants_all_threads_stopped): New.
8260 (gdb_reattached_process): New.
8261 (handle_status): Clear the `gdb_detached' flag of all processes.
8262 In all-stop, stop all threads.
8263 (main): Be sure to leave tfind mode. Handle disconnected tracing.
8264 (process_serial_event): If the remote connection breaks, or if an
8265 exit was forced with "monitor exit", force an event loop exit.
8266 Handle disconnected tracing on detach.
8267 (handle_serial_event): Adjust.
8268 (handle_target_event): If GDB isn't connected, forward events back
8269 to the inferior, unless the last process exited, in which case,
8270 exit gdbserver. Adjust interface.
8271
8272 * remote-utils.c (remote_open): Don't block in accept. Instead
8273 register an event loop source on the listen socket file
8274 descriptor. Refactor bits into ...
8275 (listen_desc): ... this new global.
8276 (gdb_connected): ... this new function.
8277 (enable_async_notification): ... this new function.
8278 (handle_accept_event): ... this new function.
8279 (remote_close): Clear remote_desc.
8280
8281 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
8282
8283 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
8284 New fields.
8285 (mourn_inferior): Define.
8286 (target_process_qsupported): Avoid the dangling else problem.
8287 (thread_stopped): Define.
8288 (pause_all): Define.
8289 (target_waitstatus_to_string): Declare.
8290 * target.c (target_waitstatus_to_string): New.
8291
8292 * tracepoint.c (tracing): Make extern.
8293 (disconnected_tracing): New.
8294 (stop_tracing): Make extern. Handle tracing stops due to GDB
8295 disconnecting.
8296 (cmd_qtdisconnected): New.
8297 (cmd_qtstatus): Report disconnected tracing status in trace reply.
8298 (handle_tracepoint_general_set): Handle QTDisconnected.
8299
8300 * event-loop.c (event_handler_func): Change return type to int.
8301 (process_event): Bail out if the event handler wants the event
8302 loop to stop.
8303 (handle_file_event): Ditto.
8304 (start_event_loop): Bail out if the event handler wants the event
8305 loop to stop.
8306
8307 * nto-low.c (nto_target_ops): Adjust.
8308 * spu-low.c (spu_wait): Don't remove the process here.
8309 (spu_target_ops): Adjust.
8310 * win32-low.c (win32_wait): Don't remove the process here.
8311 (win32_target_ops): Adjust.
8312
5d267c4c
PA
83132010-04-11 Pedro Alves <pedro@codesourcery.com>
8314
8315 * regcache.c (realloc_register_cache): Invalidate inferior's
8316 regcache before recreating it.
8317
623ccd72
PA
83182010-04-09 Pedro Alves <pedro@codesourcery.com>
8319
8320 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
8321
219f2f23
PA
83222010-04-09 Stan Shebs <stan@codesourcery.com>
8323 Pedro Alves <pedro@codesourcery.com>
8324
8325 * server.h (LONGEST): New.
8326 (struct thread_info) <while_stepping>: New field.
8327 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
8328 Declare.
8329 (initialize_tracepoint, handle_tracepoint_general_set)
8330 (handle_tracepoint_query, tracepoint_finished_step)
8331 (tracepoint_was_hit, release_while_stepping_state_list):
8332 (current_traceframe): Declare.
8333 * server.c (handle_general_set): Handle tracepoint packets.
8334 (read_memory): New.
8335 (write_memory): New.
8336 (handle_search_memory_1): Use read_memory.
8337 (handle_query): Report support for conditional tracepoints, trace
8338 state variables, and tracepoint sources. Handle tracepoint
8339 queries.
8340 (main): Initialize the tracepoints module.
8341 (process_serial_event): Handle traceframe reads/writes.
8342
8343 * linux-low.c (handle_tracepoints): New.
8344 (linux_wait_1): Call it.
8345 (linux_resume_one_lwp): Handle while-stepping.
8346 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
8347 (linux_target_ops): Install them.
8348 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
8349 New field.
8350 * linux-x86-low.c (x86_supports_tracepoints): New.
8351 (the_low_target). Install it.
8352
8353 * mem-break.h (delete_breakpoint): Declare.
8354 * mem-break.c (delete_breakpoint): Make external.
8355
8356 * target.h (struct target_ops): Add `supports_tracepoints',
8357 `read_pc', and `write_pc' fields.
8358 (target_supports_tracepoints): Define.
8359 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
8360 (phex_nz): New.
8361
8362 * regcache.h (struct regcache) <registers_owned>: New field.
8363 (init_register_cache, regcache_cpy): Declare.
8364 (regcache_read_pc, regcache_write_pc): Declare.
8365 (register_cache_size): Declare.
8366 (supply_regblock): Declare.
8367 * regcache.c (init_register_cache): New.
8368 (new_register_cache): Use it.
8369 (regcache_cpy): New.
8370 (register_cache_size): New.
8371 (supply_regblock): New.
8372 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 8373
219f2f23
PA
8374 * tracepoint.c: New.
8375
8376 * Makefile.in (OBS): Add tracepoint.o.
8377 (tracepoint.o): New rule.
8378
3a13a53b
L
83792010-04-08 H.J. Lu <hongjiu.lu@intel.com>
8380
8381 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
8382 (i386-mmx.o): New.
8383 (i386-mmx.c): Likewise.
8384 (i386-mmx-linux.o): Likewise.
8385 (i386-mmx-linux.c): Likewise.
8386
8387 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
8388 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
8389 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
8390 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
8391
8392 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
8393 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
8394 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
8395
1570b33e
L
83962010-04-07 H.J. Lu <hongjiu.lu@intel.com>
8397
8398 * Makefile.in (clean): Updated.
8399 (i386-avx.o): New.
8400 (i386-avx.c): Likewise.
8401 (i386-avx-linux.o): Likewise.
8402 (i386-avx-linux.c): Likewise.
8403 (amd64-avx.o): Likewise.
8404 (amd64-avx.c): Likewise.
8405 (amd64-avx-linux.o): Likewise.
8406 (amd64-avx-linux.c): Likewise.
8407
8408 * configure.srv (srv_i386_regobj): Add i386-avx.o.
8409 (srv_i386_linux_regobj): Add i386-avx-linux.o.
8410 (srv_amd64_regobj): Add amd64-avx.o.
8411 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
8412 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
8413 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
8414 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
8415 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
8416 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
8417 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
8418
8419 * i387-fp.c: Include "i386-xstate.h".
8420 (i387_xsave): New.
8421 (i387_cache_to_xsave): Likewise.
8422 (i387_xsave_to_cache): Likewise.
8423 (x86_xcr0): Likewise.
8424
8425 * i387-fp.h (i387_cache_to_xsave): Likewise.
8426 (i387_xsave_to_cache): Likewise.
8427 (x86_xcr0): Likewise.
8428
8429 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
8430 * linux-crisv32-low.c (target_regsets): Likewise.
8431 * linux-m68k-low.c (target_regsets): Likewise.
8432 * linux-mips-low.c (target_regsets): Likewise.
8433 * linux-ppc-low.c (target_regsets): Likewise.
8434 * linux-s390-low.c (target_regsets): Likewise.
8435 * linux-sh-low.c (target_regsets): Likewise.
8436 * linux-sparc-low.c (target_regsets): Likewise.
8437 * linux-xtensa-low.c (target_regsets): Likewise.
8438
8439 * linux-low.c: Include <sys/uio.h>.
8440 (regsets_fetch_inferior_registers): Support nt_type.
8441 (regsets_store_inferior_registers): Likewise.
8442 (linux_process_qsupported): New.
8443 (linux_target_ops): Add linux_process_qsupported.
8444
8445 * linux-low.h (regset_info): Add nt_type.
8446 (linux_target_ops): Add process_qsupported.
8447
8448 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
8449 and <sys/uio.h>.
8450 (init_registers_i386_avx_linux): New.
8451 (init_registers_amd64_avx_linux): Likewise.
8452 (xmltarget_i386_linux_no_xml): Likewise.
8453 (xmltarget_amd64_linux_no_xml): Likewise.
8454 (PTRACE_GETREGSET): Likewise.
8455 (PTRACE_SETREGSET): Likewise.
8456 (x86_fill_xstateregset): Likewise.
8457 (x86_store_xstateregset): Likewise.
8458 (use_xml): Likewise.
8459 (x86_linux_update_xmltarget): Likewise.
8460 (x86_linux_process_qsupported): Likewise.
8461 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
8462 (x86_arch_setup): Don't call init_registers_amd64_linux nor
8463 init_registers_i386_linux here. Call
8464 x86_linux_update_xmltarget.
8465 (the_low_target): Add x86_linux_process_qsupported.
8466
8467 * server.c (handle_query): Call target_process_qsupported.
8468
8469 * target.h (target_ops): Add process_qsupported.
8470 (target_process_qsupported): New.
8471
fc7238bb
PA
84722010-04-03 Pedro Alves <pedro@codesourcery.com>
8473
8474 * inferiors.c (add_thread): Set last_status kind to
8475 TARGET_WAITKIND_IGNORE.
8476 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
8477 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
8478 (linux_wait_1): Move `thread' local definition to block that uses
8479 it. Don't NULL initialize `event_child'.
8480 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
8481 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
8482 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
8483
bdabb078
PA
84842010-04-01 Pedro Alves <pedro@codesourcery.com>
8485
8486 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
8487 an extended waitstatus, or by a watchpoint.
8488 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
8489 thread was stepping or has been stopped by a watchpoint.
8490
d3bbe7a0
PA
84912010-04-01 Pedro Alves <pedro@codesourcery.com>
8492
8493 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
8494 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
8495 of another, then delete the previous, and validate all
8496 breakpoints.
8497 (validate_inserted_breakpoint): New.
8498 (delete_disabled_breakpoints): New.
8499 (validate_breakpoints): New.
8500 (check_mem_read): Validate breakpoints before trusting their
8501 shadow. Delete disabled breakpoints.
8502 (check_mem_write): Validate breakpoints before trusting they
8503 should be inserted. Delete disabled breakpoints.
8504 * mem-break.h (validate_breakpoints):
8505 * server.c (handle_query): Validate breakpoints when we see a
8506 qSymbol query.
8507
8b07ae33
PA
85082010-04-01 Pedro Alves <pedro@codesourcery.com>
8509
8510 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
8511 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
8512 if we could tell there's a GDB breakpoint at stop_pc.
8513 (need_step_over_p): Don't do a step over if we find a GDB
8514 breakpoint at the resume PC.
8515
8516 * mem-break.c (struct raw_breakpoint): New.
8517 (enum bkpt_type): New type `gdb_breakpoint'.
8518 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
8519 fields. New field `raw'.
8520 (find_raw_breakpoint_at): New.
8521 (set_raw_breakpoint_at): Handle refcounting. Create a raw
8522 breakpoint instead.
8523 (set_breakpoint_at): Adjust.
8524 (delete_raw_breakpoint): New.
8525 (release_breakpoint): New.
8526 (delete_breakpoint): Rename to...
8527 (delete_breakpoint_1): ... this. Add proc parameter. Use
8528 release_breakpoint. Return ENOENT.
8529 (delete_breakpoint): Reimplement.
8530 (find_breakpoint_at): Delete.
8531 (find_gdb_breakpoint_at): New.
8532 (delete_breakpoint_at): Delete.
8533 (set_gdb_breakpoint_at): New.
8534 (delete_gdb_breakpoint_at): New.
8535 (gdb_breakpoint_here): New.
8536 (set_reinsert_breakpoint): Use release_breakpoint.
8537 (uninsert_breakpoint): Rename to ...
8538 (uninsert_raw_breakpoint): ... this.
8539 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
8540 (reinsert_raw_breakpoint): Change parameter type to
8541 raw_breakpoint.
8542 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
8543 instead.
8544 (check_breakpoints): Adjust. Use release_breakpoint.
8545 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
8546 (breakpoint_inserted_here): Ditto.
8547 (check_mem_read): Adjust to iterate over raw breakpoints instead.
8548 Don't trust the breakpoint's shadow if it is not inserted.
8549 (check_mem_write): Adjust to iterate over raw breakpoints instead.
8550 (delete_all_breakpoints): Adjust.
8551 (free_all_breakpoints): Mark all breakpoints as uninserted, and
8552 use delete_breakpoint_1.
8553
8554 * mem-break.h (breakpoints_supported): Delete declaration.
8555 (set_gdb_breakpoint_at): Declare.
8556 (gdb_breakpoint_here): Declare.
8557 (delete_breakpoint_at): Delete.
8558 (delete_gdb_breakpoint_at): Declare.
8559
8560 * server.h (struct raw_breakpoint): Forward declare.
8561 (struct process_info): New field `raw_breakpoints'.
8562
8563 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
8564 breakpoints.
8565
6bf5e0ba
PA
85662010-03-24 Pedro Alves <pedro@codesourcery.com>
8567
8568 * linux-low.c (status_pending_p_callback): Fix comment.
8569 (linux_wait_for_event_1): Move most of the internal breakpoint
8570 handling from here...
8571 (linux_wait_1): ... to here.
8572 (count_events_callback): New.
8573 (select_singlestep_lwp_callback): New.
8574 (select_event_lwp_callback): New.
8575 (cancel_breakpoints_callback): New.
8576 (select_event_lwp): New.
8577 (linux_wait_1): Simplify internal breakpoint handling. Give equal
8578 priority to all LWPs that have had events that should be reported
8579 to the client. Cancel breakpoints when about to reporting the
8580 event to the client, not while stopping lwps. No longer cancel
8581 finished single-steps here.
8582 (cancel_finished_single_step): Delete.
8583 (cancel_finished_single_steps): Delete.
8584
414a389f
PA
85852010-03-24 Pedro Alves <pedro@codesourcery.com>
8586
8587 * mem-break.c (enum bkpt_type): New.
8588 (struct breakpoint): New field `type'.
8589 (set_breakpoint_at): Change return type to struct breakpoint
8590 pointer. Set type to `other_breakpoint' by default.
8591 (delete_breakpoint): Rewrite, supporting more than one breakpoint
8592 in the breakpoint list.
8593 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
8594 (reinsert_breakpoint): Rename to ...
8595 (reinsert_raw_breakpoint): ... this.
8596 (reinsert_breakpoints_at): Adjust.
8597 * mem-break.h (struct breakpoint): Declare.
8598 (set_breakpoint_at): Change return type to struct breakpoint
8599 pointer.
8600
2280c721
PA
86012010-03-24 Pedro Alves <pedro@codesourcery.com>
8602
8603 * server.c (handle_query): Assign, not compare.
8604
d50171e4
PA
86052010-03-24 Pedro Alves <pedro@codesourcery.com>
8606
8607 Teach linux gdbserver to step-over-breakpoints.
8608
8609 * linux-low.c (can_hardware_single_step): New.
8610 (supports_breakpoints): New.
8611 (handle_extended_wait): If stopping threads, read the stop pc of
8612 the new cloned LWP.
8613 (get_pc): New.
8614 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
8615 low target doesn't support retrieving the PC.
8616 (add_lwp): Set last_resume_kind to resume_continue.
8617 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
8618 (linux_attach): Don't clear stop_expected. Set the lwp's
8619 last_resume_kind to resume_stop.
8620 (linux_detach_one_lwp): Don't check for removed breakpoints.
8621 (check_removed_breakpoint): Delete.
8622 (status_pending_p): Rename to ...
8623 (status_pending_p_callback): ... this. Don't check for removed
8624 breakpoints. Don't consider threads that are stopped from GDB's
8625 perspective.
8626 (linux_wait_for_lwp): Always read the stop_pc here.
8627 (cancel_breakpoint): New.
8628 (step_over_bkpt): New global.
8629 (linux_wait_for_event_1): Implement stepping over breakpoints.
8630 (gdb_wants_lwp_stopped): New.
8631 (gdb_wants_all_stopped): New.
8632 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
8633 single-step traps here. Store the thread's last reported target
8634 wait status.
8635 (send_sigstop): Don't clear stop_expected. Always set it,
8636 instead.
8637 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
8638 (cancel_finished_single_step): New.
8639 (cancel_finished_single_steps): New.
8640 (wait_for_sigstop): Don't cancel finished single-step traps here.
8641 (linux_resume_one_lwp): Don't check for removed breakpoints.
8642 Don't set `step' on non-hardware step archs.
8643 (linux_set_resume_request): Ignore resume_stop requests if already
8644 stopping or stopped. Set the lwp's last_resume_kind.
8645 (resume_status_pending_p): Don't check for removed breakpoints.
8646 (need_step_over_p): New.
8647 (start_step_over): New.
8648 (finish_step_over): New.
8649 (linux_resume_one_thread): Always queue a sigstop for resume_stop
8650 requests. Clear the thread's last reported target waitstatus.
8651 Don't use the `suspended' flag. Don't consider pending breakpoints.
8652 (linux_resume): Start a step-over if necessary.
8653 (proceed_one_lwp): New.
8654 (proceed_all_lwps): New.
8655 (unstop_all_lwps): New.
8656 * linux-low.h (struct lwp_info): Rewrite comment for the
8657 `suspended' flag. Add the `stop_pc' field. Delete the
8658 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
8659 Add `'last_resume_kind' and `need_step_over' fields.
8660 * inferiors.c (struct thread_info): Delete, moved elsewhere.
8661 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
8662 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
8663 (set_raw_breakpoint_at): New.
8664 (set_breakpoint_at): Rewrite to use it.
8665 (reinsert_breakpoint_handler): Delete.
8666 (set_reinsert_breakpoint): New.
8667 (reinsert_breakpoint_by_bp): Delete.
8668 (delete_reinsert_breakpoints): New.
8669 (uninsert_breakpoint): Rewrite.
8670 (uninsert_breakpoints_at): New.
8671 (reinsert_breakpoint): Rewrite.
8672 (reinsert_breakpoints_at): New.
8673 (check_breakpoints): Rewrite.
8674 (breakpoint_here): New.
8675 (breakpoint_inserted_here): New.
8676 (check_mem_read): Adjust.
8677 * mem-break.h (breakpoints_supported, breakpoint_here)
8678 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
8679 (reinsert_breakpoint_by_bp): Delete declaration.
8680 (delete_reinsert_breakpoints): Declare.
8681 (reinsert_breakpoint): Delete declaration.
8682 (reinsert_breakpoints_at): Declare.
8683 (uninsert_breakpoint): Delete declaration.
8684 (uninsert_breakpoints_at): Declare.
8685 (check_breakpoints): Adjust prototype.
8686 * server.h: Adjust include order.
8687 (struct thread_info): Declare here. Add a `last_status' field.
8688
30ba68cb
MS
86892010-03-23 Michael Snyder <msnyder@vmware.com>
8690
8691 * server.c (crc32): New function.
8692 (handle_query): Add handling for 'qCRC:' request.
8693
b9a881c2
PA
86942010-03-23 Pedro Alves <pedro@codesourcery.com>
8695
8696 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
8697 lwp had been stopped by a watchpoint.
8698
e92d13d5
PA
86992010-03-16 Pedro Alves <pedro@codesourcery.com>
8700
8701 * server.h (internal_error): Declare.
8702 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
8703 * utils.c (internal_error): New function.
8704
64daa791
AS
87052010-03-15 Andreas Schwab <schwab@redhat.com>
8706
8707 * configure.srv: Fix typo setting srv_regobj.
8708
f52cd8cd
PA
87092010-03-15 Pedro Alves <pedro@codesourcery.com>
8710
8711 * linux-low.c (fetch_register): Avoid passing a non string literal
8712 format to `error'.
8713 (usr_store_inferior_registers): Ditto.
8714
93ae6fdc
PA
87152010-03-14 Pedro Alves <pedro@codesourcery.com>
8716
8717 * linux-low.c (linux_write_memory): Bail out early if peeking
8718 memory failed.
8719
c3adc08c
PA
87202010-03-14 Pedro Alves <pedro@codesourcery.com>
8721
8722 * linux-low.h (struct lwp_info): New fields
8723 `stopped_by_watchpoint' and `stopped_data_address'.
8724 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
8725 here, and cache them in the lwp object.
8726 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
8727 directly.
8728 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
8729 field.
8730 (linux_stopped_by_watchpoint): Rewrite.
8731 (linux_stopped_data_address): Rewrite.
8732
bce522a2
PA
87332010-03-06 Simo Melenius <simo.melenius@iki.fi>
8734
8735 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
8736 switching the current inferior, not before.
8737
90884b2b
L
87382010-03-01 H.J. Lu <hongjiu.lu@intel.com>
8739
8740 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
8741 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
8742 i386-linux.c and amd64-linux.c.
8743 (reg-i386.o): Removed.
8744 (reg-i386.c): Likewise.
8745 (reg-i386-linux.o): Likewise.
8746 (reg-i386-linux.c): Likewise.
8747 (reg-x86-64.o): Likewise.
8748 (reg-x86-64.c): Likewise.
8749 (reg-x86-64-linux.o): Likewise.
8750 (reg-x86-64-linux.c): Likewise.
8751 (i386.o): New.
8752 (i386.c): Likewise.
8753 (i386-linux.o): Likewise.
8754 (i386-linux.c): Likewise.
8755 (amd64.o): Likewise.
8756 (amd64.c): Likewise.
8757 (amd64-linux.o): Likewise.
8758 (amd64-linux.c): Likewise.
8759
8760 * configure.srv (srv_i386_regobj): New.
8761 (srv_i386_linux_regobj): Likewise.
8762 (srv_amd64_regobj): Likewise.
8763 (srv_amd64_linux_regobj): Likewise.
8764 (srv_i386_32bit_xmlfiles): Likewise.
8765 (srv_i386_64bit_xmlfiles): Likewise.
8766 (srv_i386_xmlfiles): Likewise.
8767 (srv_amd64_xmlfiles): Likewise.
8768 (srv_i386_linux_xmlfiles): Likewise.
8769 (srv_amd64_linux_xmlfiles): Likewise.
8770 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
8771 srv_xmlfiles to $srv_i386_xmlfiles.
8772 (i[34567]86-*-mingw32ce*): Likewise.
8773 (i[34567]86-*-mingw*): Likewise.
8774 (i[34567]86-*-nto*): Likewise.
8775 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
8776 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
8777 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
8778 (x86_64-*-linux*): Likewise.
8779
8780 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
8781 (init_registers_amd64_linux): New.
8782 (x86_arch_setup): Replace init_registers_x86_64_linux with
8783 init_registers_amd64_linux.
8784
193f13e6
MK
87852010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
8786
8787 * configure.ac: Check for libdl. If it is not available link against
8788 static libthread_db.
8789 * configure: Regenerate.
8790
85d721b8
PA
87912010-02-22 Pedro Alves <pedro@codesourcery.com>
8792
8793 PR9605
8794
8795 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
8796 handing a read watchpoint.
8797 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
8798
6076632b
DE
87992010-02-12 Doug Evans <dje@google.com>
8800
8801 * linux-low.c (linux_supports_tracefork_flag): Document.
8802 (linux_look_up_symbols): Add comment.
8803
3327ccf7
L
88042010-02-03 H.J. Lu <hongjiu.lu@intel.com>
8805
8806 * regcache.c (supply_register): Clear regcache if buf is NULL.
8807
0718675c 88082010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 8809 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
8810
8811 * inferiors.c (find_inferior): Add function documentation.
8812 (unloaded_dll): Handle the case where the unloaded dll has not
8813 been previously registered in the dll list.
8814
177321bd
DJ
88152010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
8816
8817 * linux-arm-low.c (thumb_breakpoint_len): Delete.
8818 (thumb2_breakpoint): New.
8819 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
8820
2b009048
DJ
88212010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
8822
8823 * linux-low.c (get_stop_pc): Check for SIGTRAP.
8824 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
8825 breakpoints.
8826
3be029c7
PA
88272010-01-21 Pedro Alves <pedro@codesourcery.com>
8828
8829 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
8830
18f5de3b
JK
88312010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
8832
8833 * linux-s390-low.c (s390_collect_ptrace_register)
8834 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
8835
3743bb4f
DE
88362010-01-21 Doug Evans <dje@google.com>
8837
14ce3065
DE
8838 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
8839 (PTRACE_ARG4_TYPE): New macro.
8840 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
8841 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
8842 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
8843 (usr_store_inferior_registers): Ditto.
8844 (linux_read_memory, linux_write_memory): Ditto.
8845 (linux_test_for_tracefork): Ditto.
8846
3743bb4f
DE
8847 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
8848 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
8849
8b315be5
PA
88502010-01-21 Pedro Alves <pedro@codesourcery.com>
8851
8852 * proc-service.c (ps_lgetregs): Don't refetch registers from the
8853 target.
8854
85492558
PA
88552010-01-21 Pedro Alves <pedro@codesourcery.com>
8856
8857 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
8858 prototype to take a regcache. Adjust.
8859
442ea881
PA
88602010-01-20 Pedro Alves <pedro@codesourcery.com>
8861
8862 * regcache.h (struct thread_info): Forward declare.
8863 (struct regcache): New.
8864 (new_register_cache): Adjust prototype.
8865 (get_thread_regcache): Declare.
8866 (free_register_cache): Adjust prototype.
8867 (registers_to_string, registers_from_string): Ditto.
8868 (supply_register, supply_register_by_name, collect_register)
8869 (collect_register_as_string, collect_register_by_name): Ditto.
8870 * regcache.c (struct inferior_regcache_data): Delete.
8871 (get_regcache): Rename to ...
8872 (get_thread_regcache): ... this. Adjust. Switch inferior before
8873 fetching registers.
8874 (regcache_invalidate_one): Adjust.
8875 (regcache_invalidate): Fix prototype.
8876 (new_register_cache): Return the new register cache.
8877 (free_register_cache): Change prototype.
8878 (realloc_register_cache): Adjust.
8879 (registers_to_string): Change prototype to take a regcache. Adjust.
8880 (registers_from_string): Ditto.
8881 (register_data): Ditto.
8882 (supply_register): Ditto.
8883 (supply_register_by_name): Ditto.
8884 (collect_register): Ditto.
8885 (collect_register_as_string): Ditto.
8886 (collect_register_by_name): Ditto.
8887 * server.c (process_serial_event): Adjust.
8888 * linux-low.h (regset_fill_func, regset_store_func): Change
8889 prototype.
8890 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
8891 Change prototype.
8892 * linux-low.c (get_stop_pc): Adjust.
8893 (check_removed_breakpoint): Adjust.
8894 (linux_wait_for_event): Adjust.
8895 (linux_resume_one_lwp): Adjust.
8896 (fetch_register): Add regcache parameter. Adjust.
8897 (usr_store_inferior_registers): Ditto.
8898 (regsets_fetch_inferior_registers): Ditto.
8899 (regsets_store_inferior_registers): Ditto.
8900 (linux_fetch_registers, linux_store_registers): Ditto.
8901 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
8902 regcache. Adjust.
43aaf8b6
PA
8903 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
8904 Ditto.
442ea881
PA
8905 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
8906 prototype to take a regcache.
8907 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
8908 * remote-utils.c (convert_ascii_to_int, outreg)
8909 (prepare_resume_reply): Change prototype to take a regcache.
8910 Adjust.
8911 * target.h (struct target_ops) <fetch_registers, store_registers>:
8912 Change prototype to take a regcache.
8913 (fetch_inferior_registers, store_inferior_registers): Change
8914 prototype to take a regcache. Adjust.
8915 * proc-service.c (ps_lgetregs): Adjust.
8916 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
8917 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
8918 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
8919 take a regcache. Adjust.
8920 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
8921 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
8922 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
8923 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
8924 * linux-cris-low.c (cris_get_pc, cris_set_pc)
8925 (cris_cannot_fetch_register):
8926 (cris_breakpoint_at): Change prototype to take a regcache.
8927 Adjust.
8928 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
8929 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
8930 to take a regcache. Adjust.
8931 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
8932 Adjust.
8933 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
8934 take a regcache. Adjust.
8935 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
8936 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
8937 (m68k_set_pc): Change prototype to take a regcache. Adjust.
8938 * linux-mips-low.c (mips_get_pc):
8939 (mips_set_pc): Change prototype to take a regcache. Adjust.
8940 (mips_reinsert_addr): Adjust.
8941 (mips_collect_register): Change prototype to take a regcache.
8942 Adjust.
8943 (mips_supply_register):
8944 (mips_collect_register_32bit, mips_supply_register_32bit)
8945 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
8946 (mips_store_fpregset): Ditto.
43aaf8b6
PA
8947 * linux-ppc-low.c (ppc_supply_ptrace_register)
8948 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
8949 (parse_spufs_run): Adjust.
8950 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
8951 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
8952 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
8953 take a regcache. Adjust.
8954 * linux-s390-low.c (s390_collect_ptrace_register)
8955 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
8956 (s390_set_pc): Change prototype to take a regcache. Adjust.
8957 (s390_arch_setup): Adjust.
8958 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
8959 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
8960 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
8961 (sparc_fill_gregset, sparc_store_gregset_from_stack)
8962 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
8963 regcache. Adjust.
8964 (sparc_breakpoint_at): Adjust.
8965 * linux-xtensa-low.c (xtensa_fill_gregset):
8966 (xtensa_store_gregset):
8967 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
8968 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
8969 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
8970 prototype to take a regcache. Adjust.
8971 * win32-arm-low.c (arm_fetch_inferior_register)
8972 (arm_store_inferior_register): Change prototype to take a
8973 regcache. Adjust.
8974 * win32-i386-low.c (i386_fetch_inferior_register)
8975 (i386_store_inferior_register): Change prototype to take a
8976 regcache. Adjust.
8977 * win32-low.c (child_fetch_inferior_registers)
8978 (child_store_inferior_registers): Change prototype to take a
8979 regcache. Adjust.
8980 (win32_wait): Adjust.
8981 (win32_fetch_inferior_registers): Change prototype to take a
8982 regcache. Adjust.
8983 (win32_store_inferior_registers): Adjust.
8984 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
8985 store_inferior_register>: Change prototype to take a regcache.
8986
60c3d7b0
DE
89872010-01-20 Doug Evans <dje@google.com>
8988
8989 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
8990 #ifdef.
8991 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 8992 (W_STOPCODE): Provide definition if missing.
60c3d7b0 8993
dc146f7c
VP
89942010-01-13 Vladimir Prus <vladimir@codesourcery.com>
8995
8996 * linux-low.c (linux_core_of_thread): New.
8997 (compare_ints, show_process, list_threads): New.
8998 (linux_qxfer_osdata): Report threads and cores.
8999 (linux_target_op): Register linux_core_of_thread.
9000 * remote-utils.c (prepare_resume_reply): Report the core.
9001 (buffer_xml_printf): Support %d specifier.
9002 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
9003 New.
9004 (handle_query): Handle qXfer:threads. Announce availability
9005 thereof.
9006 * target.h (struct target_ops): New field core_of_thread.
9007
7803799a
UW
90082010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
9009
9010 * Makefile.in (clean): Remove new generated files.
9011 (reg-s390.o, reg-s390.c): Remove rules.
9012 (reg-s390x.o, reg-s390x.c): Likewise.
9013 (s390-linux32.o, s390-linux32.c): Add rules.
9014 (s390-linux64.o, s390-linux64.c): Likewise.
9015 (s390x-linux64.o, s390x-linux64.c): Likewise.
9016 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
9017 * linux-s390-low.c: Include <elf.h>.
9018 (HWCAP_S390_HIGH_GPRS): Define if undefined.
9019 (init_registers_s390): Remove prototype.
9020 (init_registers_s390x): Likewise.
9021 (init_registers_s390_linux32): Add prototype.
9022 (init_registers_s390_linux64): Likewise.
9023 (init_registers_s390x_linux64): Likewise.
9024 (s390_num_regs_3264): New define.
9025 (s390_regmap_3264): New global variable.
9026 (s390_cannot_fetch_register): Remove obsolete check.
9027 (s390_cannot_store_register): Likewise.
9028 (s390_collect_ptrace_register): Handle upper/lower register halves.
9029 (s390_supply_ptrace_register): Likewise.
9030 (s390_fill_gregset): Update to register number changes.
9031 (s390_get_hwcap): New routine.
9032 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
9033 Install appropriate regmap and register set.
9034
6e7ffa39
JB
90352010-01-01 Joel Brobecker <brobecker@adacore.com>
9036
9037 * server.c (gdbserver_version): Update copyright year to 2010.
9038 * gdbreplay.c (gdbreplay_version): Likewise.
9039
957f3f49
DE
90402009-12-28 Doug Evans <dje@google.com>
9041
9042 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
9043 elf/external.h. Include <elf.h> instead but only if necessary.
9044
ca5c370d
PA
90452009-12-28 Pedro Alves <pedro@codesourcery.com>
9046
9047 * linux-low.c (linux_remove_process): Remove `detaching'
9048 parameter. Don't release/detach from thread_db here.
9049 (linux_kill): Release/detach from thread_db here, ...
9050 (linux_detach): ... and here, before actually detaching.
9051 (linux_wait_1): ... and here, when a process exits.
9052 * thread-db.c (any_thread_of): New.
9053 (thread_db_free): Switch the current inferior to a thread of the
9054 passed in process.
9055
4ee62156
DE
90562009-12-21 Doug Evans <dje@google.com>
9057
d90e6a88
DE
9058 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
9059
c5f62d5f
DE
9060 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
9061 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
9062 warning ifndef __NR_tkill. Move setting of errno there too.
9063 Delete unnecessary resetting of errno after syscall.
9064 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
9065
10e86dd7
DE
9066 * configure.ac: Check for dladdr.
9067 * config.in: Regenerate.
9068 * configure: Regenerate.
9069 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
9070 (try_thread_db_load): Update.
9071
4ee62156
DE
9072 * linux-low.c (my_waitpid): Delete unnecessary prototype.
9073
00f515da
DE
90742009-12-18 Doug Evans <dje@google.com>
9075
e9464885
DE
9076 * event-loop.c: Include unistd.h if it exists.
9077
07d4f67e
DE
9078 * linux-low.c (my_waitpid): Move definition away from being in
9079 between linux_tracefork_child/linux_test_for_tracefork.
9080
00f515da
DE
9081 * gdb_proc_service.h (psaddr_t): Fix type.
9082 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
9083 signature to match glibc.
9084
1de1badb
DE
90852009-12-16 Doug Evans <dje@google.com>
9086
9087 * linux-low.c (linux_read_memory): Fix argument to read.
9088
aeeb81d1
PA
90892009-11-26 Pedro Alves <pedro@codesourcery.com>
9090
9091 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
9092 events, don't leave current_inferior pointing at null.
9093
10357975
PA
90942009-11-26 Pedro Alves <pedro@codesourcery.com>
9095
9096 * win32-low.c (LOG): Delete.
9097 (OUTMSG): Output to stderr.
9098 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
9099 on compile time LOG macro.
9100 (win32_wait): Fix debug output.
9101
cf6e3471
PA
91022009-11-26 Pedro Alves <pedro@codesourcery.com>
9103
9104 * win32-low.c (win32_add_one_solib): If the dll name is
9105 "ntdll.dll", prepend the system directory to the dll path.
9106
0c85e18e
MK
91072009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
9108
9109 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
9110
9ac544ce 91112009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 9112 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
9113
9114 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
9115 * configure.ac: Check for __mcoldfire__ and set
9116 gdb_cv_m68k_is_coldfire.
9117 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
9118 reg-cf.o and reg-m68k.o.
9119 * configure: Regenerated.
9120
fd7dd3e6
PA
91212009-11-16 Pedro Alves <pedro@codesourcery.com>
9122
9123 * linux-low.c (linux_remove_process): Add `detaching' parameter.
9124 Pass it to thread_db_free.
9125 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
9126 proper `detaching' argument to linux_remove_process.
9127 * linux-low.h (thread_db_free): Add `detaching' parameter.
9128 * thread-db.c (thread_db_init): Pass false as `detaching' argument
9129 to thread_db_free.
9130 (thread_db_free): Add `detaching' parameter. Only
9131 call td_ta_clear_event if detaching from process.
9132
75aa492e
MK
91332009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
9134
9135 * thread-db.c (thread_db_free): Fix typo.
9136
21e1bee4
PP
91372009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
9138
9139 PR gdb/10838
9140 * thread-db.c (thread_db_free): Call td_ta_clear_event.
9141
8838b45e
NS
91422009-11-03 Nathan Sidwell <nathan@codesourcery.com>
9143
9144 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
9145 with an i686 compiler.
9146 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
9147 needed.
9148 * configure: Rebuilt.
9149
8a35fb51
SL
91502009-10-29 Sandra Loosemore <sandra@codesourcery.com>
9151
9152 PR gdb/10783
9153
9154 * server.c (handle_search_memory_1): Correct read_addr initialization
9155 in loop for searching subsequent chunks.
9156
96f15937
PP
91572009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
9158
9159 * configure.ac: New --with-libthread-db option.
9160 * thread-db.c: Allow direct dependence on libthread_db.
9161 (thread_db_free): Adjust.
9162 * config.in: Regenerate.
9163 * configure: Likewise.
889bf7c5 9164
5f7d1694
PP
91652009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
9166
9167 PR gdb/10757
9168 * thread-db.c (attach_thread): New function.
9169 (maybe_attach_thread): Return success/failure.
9170 (find_new_threads_callback): Adjust.
889bf7c5
PA
9171 (thread_db_find_new_threads): Loop until no new threads.
9172
88e3b899
PA
91732009-10-13 Pedro Alves <pedro@codesourcery.com>
9174
9175 * proc-service.c (ps_lgetregs): Formatting.
9176
cdbfd419
PP
91772009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
9178
9179 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
9180 * configure.ac: Adjust.
9181 * linux-low.h (struct process_info_private): Move members to struct
9182 thread_db.
9183 (thread_db_free, thread_db_handle_monitor_command): New prototype.
9184 * linux-low.c (linux_remove_process): Adjust.
9185 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
9186 * server.c (handle_query): Move code ...
9187 (handle_monitor_command): ... here. New function.
9188 * target.h (struct target_ops): New member.
9189 * thread-db.c (struct thread_db): New.
9190 (libthread_db_search_path): New variable.
9191 (thread_db_create_event, thread_db_enable_reporting)
9192 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
9193 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
9194 (try_thread_db_load_1, dladdr_to_soname): New functions.
9195 (try_thread_db_load, thread_db_load_search): New functions.
9196 (thread_db_init): Search for libthread_db.
9197 (thread_db_free): New function.
9198 (thread_db_handle_monitor_command): Likewise.
9199 * config.in: Regenerate.
9200 * configure: Regenerate.
889bf7c5 9201
4168d2d6
UW
92022009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
9203
9204 * spu-low.c (spu_kill): Wait for inferior to terminate.
9205 Call clear_inferiors.
9206 (spu_detach): Call clear_inferiors.
9207
81ecdfbb
RW
92082009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9209
9210 * aclocal.m4: Regenerate.
9211 * config.in: Likewise.
9212 * configure: Likewise.
9213
0b9ff2c0
UW
92142009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9215
9216 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
9217 (parse_spufs_run): New function.
9218 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
9219 (ppc_breakpoint_at): Handle SPU breakpoints.
9220
efcbbd14
UW
92212009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9222
9223 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
9224 (SPUFS_MAGIC): Define.
9225 (spu_enumerate_spu_ids): New function.
9226 (linux_qxfer_spu): New function.
9227 (linux_target_ops): Install linux_qxfer_spu.
9228
f4d9bade
UW
92292009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9230
9231 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
9232 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
9233 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
9234 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
9235 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
9236 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
9237 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
9238 (init_registers_powerpc_cell32l): Add prototype.
9239 (init_registers_powerpc_cell64l): Likewise.
9240 (ppc_arch_setup): Detect Cell/B.E. architecture.
9241
96e946ca
RW
92422009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9243
9244 * Makefile.in (datarootdir): New variable.
9245
58d6951d
DJ
92462009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
9247
9248 * linux-low.c (linux_write_memory): Update debugging output.
9249 * Makefile.in (clean): Add new descriptions.
9250 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
9251 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
9252 * configure.srv: Add new files for arm*-*-linux*.
9253 * linux-arm-low.c: Add new declarations.
9254 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
9255 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
9256 (HWCAP_VFPv3D16): New.
9257 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
9258 instead of __IWMMXT__.
9259 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
9260 (arm_arch_setup): New.
9261 (target_regsets): Remove #ifdef. Add VFP regset.
9262 (the_low_target): Use arm_arch_setup.
9263
12b42a12
DJ
92642009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
9265
9266 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
9267 the main thread again.
9268
ac8c974e
AR
92692009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
9270
9271 Adding Neutrino gdbserver.
9272 * configure: Regenerated.
9273 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
9274 * configure.srv (i[34567]86-*-nto*): New target.
9275 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
9276 * remote-utils.c [__QNX__]: Include sys/iomgr.h
9277 (nto_comctrl) [__QNX__]: New function.
9278 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
9279
4424e0c3 92802009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
9281
9282 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
9283 srv_tgtobj.
9284
912cf4ba
PA
92852009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
9286 Pedro Alves <pedro@codesourcery.com>
9287
9288 * win32-i386-low.c (i386_get_thread_context): Handle systems that
9289 don't support CONTEXT_EXTENDED_REGISTERS.
9290 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
9291 (the_low_target): Install them.
9292 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
9293 failing with ERROR_PIPE_NOT_CONNECTED.
9294
aa5ca48f
DE
92952009-06-30 Doug Evans <dje@google.com>
9296 Pierre Muller <muller@ics.u-strasbg.fr>
9297
9298 Add h/w watchpoint support to x86-linux, win32-i386.
9299 * Makefile.in (SFILES): Add i386-low.c
9300 (i386_low_h): Define.
9301 (i386-low.o): Add dependencies.
9302 (linux-x86-low.o): Add i386-low.h dependency.
9303 (win32-i386-low.o): Ditto.
9304 * i386-low.c: New file.
9305 * i386-low.h: New file.
9306 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
9307 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
9308 * linux-low.c (linux_add_process): Initialize arch_private.
9309 (linux_remove_process): Free arch_private.
9310 (add_lwp): Initialize arch_private.
9311 (delete_lwp): Free arch_private.
9312 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
9313 provided.
9314 * linux-low.h (process_info_private): New member arch_private.
9315 (lwp_info): New member arch_private.
9316 (linux_target_ops): New members new_process, new_thread,
9317 prepare_to_resume.
9318 (ptid_of): New macro.
9319 * linux-x86-low.c: Include stddef.h, i386-low.h.
9320 (arch_process_info): New struct.
9321 (arch_lwp_info): New struct.
9322 (x86_linux_dr_get, x86_linux_dr_set): New functions.
9323 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
9324 (i386_dr_low_get_status): New function.
9325 (x86_insert_point, x86_remove_point): New functions.
9326 (x86_stopped_by_watchpoint): New function.
9327 (x86_stopped_data_address): New function.
9328 (x86_linux_new_process, x86_linux_new_thread): New functions.
9329 (x86_linux_prepare_to_resume): New function.
9330 (the_low_target): Add entries for insert_point, remove_point,
9331 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
9332 prepare_to_resume.
9333 * server.c (debug_hw_points): New global.
9334 (monitor_show_help): Document set debug-hw-points.
9335 (handle_query): Process "set debug-hw-points".
9336 * server.h (debug_hw_points): Declare.
9337 (paddress): Declare.
9338 * utils.c (NUMCELLS, CELLSIZE): New macros.
9339 (get_sell, xsnprintf, paddress): New functions.
9340 * win32-arm-low.c (the_low_target): Add entries for insert_point,
9341 remove_point, stopped_by_watchpoint, stopped_data_address.
9342 * win32-i386-low.c: Include i386-low.h.
9343 (debug_reg_state): Replaces dr.
9344 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
9345 (i386_dr_low_get_status): New function.
9346 (i386_insert_point, i386_remove_point): New functions.
9347 (i386_stopped_by_watchpoint): New function.
9348 (i386_stopped_data_address): New function.
9349 (i386_initial_stuff): Update.
9350 (get_thread_context,set_thread_context,i386_thread_added): Update.
9351 (the_low_target): Add entries for insert_point,
9352 remove_point, stopped_by_watchpoint, stopped_data_address.
9353 * win32-low.c (win32_insert_watchpoint): New function.
9354 (win32_remove_watchpoint): New function.
9355 (win32_stopped_by_watchpoint): New function.
9356 (win32_stopped_data_address): New function.
9357 (win32_target_ops): Add entries for insert_watchpoint,
9358 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
9359 * win32-low.h (win32_target_ops): New members insert_point,
9360 remove_point, stopped_by_watchpoint, stopped_data_address.
9361
d993e290
PA
93622009-06-25 Pedro Alves <pedro@codesourcery.com>
9363
9364 * server.c (process_serial_event): Re-return unsupported, not
9365 error, if the type isn't recognized. Re-allow supporting only
9366 insert or remove packets. Also call require_running for
9367 breakpoints. Add missing break statement to default case. Tidy.
9368 * target.h (struct target_ops): Rename insert_watchpoint to
9369 insert_point, and remove_watchpoint to remove_point.
9370
9371 * linux-low.h (struct linux_target_ops): Likewise.
9372 * linux-low.c (linux_insert_watchpoint): Rename to ...
9373 (linux_insert_point): ... this. Adjust.
9374 (linux_remove_watchpoint): Rename to ...
9375 (linux_remove_point): ... this. Adjust.
9376 (linux_target_ops): Adjust.
9377 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
9378 (cris_insert_point): ... this.
9379 (cris_remove_watchpoint): Rename to ...
9380 (cris_remove_point): ... this.
9381 (the_low_target): Adjust.
9382
0f54c268
PM
93832009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
9384
9385 * server.c (handle_v_kill): Pass signal_pid to
9386 kill_inferior if multi_process is zero.
9387
c6314022
AR
93882009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
9389
9390 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
9391 * target.h (target_ops): Comment for *_watchpoint to make it clear
9392 the functions can get types '0' and '1'.
9393
4463ce24
AR
93942009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
9395
9396 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
9397 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
9398 * regcache.c (get_regcache): Likewise.
9399 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
9400 * win32-low.c (child_fetch_inferior_registers): Remove check for
9401 regno 0.
9402
cf8fd78b
PA
94032009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
9404 Pedro Alves <pedro@codesourcery.com>
9405
9406 * target.h (struct target_ops) <supports_multi_process>: New
9407 callback.
9408 (target_supports_multi_process): New.
9409 * server.c (handle_query): Even if GDB reports support, only
9410 enable multi-process if the target also supports it. Report
9411 multi-process support only if the target backend supports it.
9412 * linux-low.c (linux_supports_multi_process): New function.
9413 (linux_target_ops): Install it as target_supports_multi_process
9414 callback.
9415
47c0c975
DE
94162009-05-24 Doug Evans <dje@google.com>
9417
e09875d4
DE
9418 Global renaming of find_thread_pid to find_thread_ptid.
9419 * server.h (find_thread_ptid): Renamed from find_thread_pid.
9420 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
9421 All callers updated.
9422
e27d73f6
DE
9423 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
9424 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
9425 directly.
9426
47c0c975
DE
9427 * linux-low.c (get_stop_pc): Print pc if debug_threads.
9428 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
9429 (linux_resume_one_lwp): Ditto.
9430
2acc282a
DE
94312009-05-23 Doug Evans <dje@google.com>
9432
9433 * linux-low.c (linux_resume_one_lwp): Change type of first arg
9434 from struct inferior_list_entry * to struct lwp_info *.
9435 All callers updated.
9436
9f1036c1
DE
94372009-05-13 Doug Evans <dje@google.com>
9438
9439 * linux-x86-low.c: Don't include assert.h.
9440 (x86_siginfo_fixup): Use fatal, not assert.
9441 (x86_arch_setup): Fix comment.
9442
d0722149
DE
94432009-05-12 Doug Evans <dje@google.com>
9444
9445 Biarch support for i386/amd64 gdbserver.
9446 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
9447 Add linux-x86-low.c.
9448 (linux-i386-low.o, linux-x86-64-low.o): Delete.
9449 (linux-x86-low.o): Add.
9450 * linux-x86-64-low.c: Delete.
9451 * linux-i386-low.c: Delete.
9452 * linux-x86-low.c: New file.
9453 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
9454 linux-x86-low.o.
9455 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
9456 linux-x86-low.o.
9457 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
9458 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
9459 (linux_child_pid_to_exec_file): New function.
9460 (elf_64_header_p, elf_64_file_p): New functions.
9461 (siginfo_fixup): New function.
9462 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
9463 give target a chance to convert layout.
9464 * linux-low.h (linux_target_ops): New member siginfo_fixup.
9465 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
9466
fdeb2a12
DE
94672009-05-07 Doug Evans <dje@google.com>
9468
9469 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
9470 (regsets_store_inferior_registers): Ditto.
9471
a6dbe5df
PA
94722009-05-06 Pedro Alves <pedro@codesourcery.com>
9473
9474 PR server/10048
9475
9476 * linux-low.c (must_set_ptrace_flags): Delete.
9477 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
9478 of the global.
9479 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
9480 `lwp->must_set_ptrace_flags' instead.
ba42693b 9481 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
9482 (linux_wait_1): ... not here.
9483
5091eb23
DE
94842009-04-30 Doug Evans <dje@google.com>
9485
9f767825
DE
9486 * inferiors.c (started_inferior_callback): New function.
9487 (attached_inferior_callback): New function.
9488 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
9489 * server.c (print_started_pid, print_attached_pid): New functions.
9490 (detach_or_kill_for_exit): New function.
9491 (main): Call it instead of for_each_inferior (kill_inferior_callback).
9492 * server.h (have_started_inferiors_p): Declare.
9493 (have_attached_inferiors_p): Declare.
9494
5091eb23
DE
9495 * inferiors.c (remove_process): Fix memory leak, free process.
9496 * linux-low.c (linux_remove_process): New function.
9497 (linux_kill): Call it instead of remove_process.
9498 (linux_detach, linux_wait_1): Ditto.
9499
155c8968
PA
95002009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
9501
9502 * configure.srv: Add x86 Windows CE target.
9503
7fe519cb
UW
95042009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
9505
9506 * inferiors.c (get_thread_process): Make global.
9507 * server.h (get_thread_process): Add prototype.
9508 * thread-db.c (find_one_thread): Use get_thread_process
9509 instead of current_process.
9510 (thread_db_get_tls_address): Do not crash if called when
9511 thread layer is not yet initialized.
9512
5472f405
UW
95132009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
9514
9515 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
9516 * spu-low.c (current_tid): Rename to ...
9517 (current_ptid): ... this.
9518 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
9519 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
9520 ptid_get_lwp (current_ptid) instead of current_tid.
9521 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
9522 instead of current_tid. Use find_process_pid to verify pid
9523 argument is valid. Pass proper argument to remove_process.
9524 (spu_thread_alive): Compare current_ptid instead of current_tid.
9525 (spu_resume): Likewise.
9526
55ac2b99
PA
95272009-04-02 Pedro Alves <pedro@codesourcery.com>
9528
9529 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
9530 variable.
9531
95954743
PA
95322009-04-01 Pedro Alves <pedro@codesourcery.com>
9533
9534 Implement the multiprocess extensions, and add linux multiprocess
9535 support.
9536
9537 * server.h (ULONGEST): Declare.
9538 (struct ptid, ptid_t): New.
9539 (minus_one_ptid, null_ptid): Declare.
9540 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
9541 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
9542 (struct inferior_list_entry): Change `id' type from unsigned from
9543 to ptid_t.
9544 (struct sym_cache, struct breakpoint, struct
9545 process_info_private): Forward declare.
9546 (struct process_info): Declare.
9547 (current_process): Declare.
9548 (all_processes): Declare.
9549 (initialize_inferiors): Declare.
9550 (add_thread): Adjust to use ptid_t.
9551 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
9552 (add_process, remove_process, find_thread_pid): Declare.
9553 (find_inferior_id): Adjust to use ptid_t.
9554 (cont_thread, general_thread, step_thread): Change type to ptid_t.
9555 (multi_process): Declare.
9556 (push_event): Adjust to use ptid_t.
9557 (read_ptid, write_ptid): Declare.
9558 (prepare_resume_reply): Adjust to use ptid_t.
9559 (clear_symbol_cache): Declare.
9560 * inferiors.c (all_processes): New.
9561 (null_ptid, minus_one_ptid): New.
9562 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
9563 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
9564 (add_thread): Change unsigned long to ptid. Remove gdb_id
9565 parameter. Adjust.
9566 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
9567 (gdb_id_to_thread): Rename to ...
9568 (find_thread_pid): ... this. Change unsigned long to ptid.
9569 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
9570 (loaded_dll, pull_pid_from_list): Adjust.
9571 (add_process, remove_process, find_process_pid)
9572 (get_thread_process, current_process, initialize_inferiors): New.
9573 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
9574 (struct target_waitstatus) <related_pid>: Ditto.
9575 (struct target_ops) <kill, detach>: Add `pid' argument. Change
9576 return type to int.
9577 (struct target_ops) <join>: Add `pid' argument.
9578 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
9579 (struct target_ops) <wait>: Add `ptid' field. Change return type
9580 to ptid.
9581 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
9582 (mywait): Add `ptid' argument. Change return type to ptid_t.
9583 (target_pid_to_str): Declare.
9584 * target.c (set_desired_inferior): Adjust to use ptids.
9585 (mywait): Add new `ptid' argument. Adjust.
9586 (target_pid_to_str): New.
9587 * mem-break.h (free_all_breakpoints): Declare.
9588 * mem-break.c (breakpoints): Delelete.
9589 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
9590 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
9591 to use per-process breakpoint list.
9592 (free_all_breakpoints): New.
9593 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
9594 (symbol_cache, all_symbols_looked_up): Delete.
9595 (hexchars): New.
9596 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
9597 read_ptid): New.
9598 (prepare_resume_reply): Change ptid argument's type from unsigned
9599 long to ptid_t. Adjust. Implement W;process and X;process.
9600 (free_sym_cache, clear_symbol_cache): New.
9601 (look_up_one_symbol): Adjust to per-process symbol cache. *
9602 * server.c (cont_thread, general_thread, step_thread): Change type
9603 to ptid_t.
9604 (attached): Delete.
9605 (multi_process): New.
9606 (last_ptid): Change type to ptid_t.
9607 (struct vstop_notif) <ptid>: Change type to ptid_t.
9608 (queue_stop_reply, push_event): Change `ptid' argument's type to
9609 ptid_t.
9610 (discard_queued_stop_replies): Add `pid' argument.
9611 (start_inferior): Adjust to use ptids. Adjust to mywait interface
9612 changes. Don't reference the `attached' global.
9613 (attach_inferior): Adjust to mywait interface changes.
9614 (handle_query): Adjust to use ptids. Parse GDB's qSupported
9615 features. Handle and report "multiprocess+". Handle
9616 "qAttached:PID".
9617 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
9618 changes.
9619 (handle_v_kill): New.
9620 (handle_v_stopped): Adjust to use target_pid_to_str.
9621 (handle_v_requests): Allow multiple attaches and runs when
9622 multiprocess extensions are in effect. Handle "vKill".
9623 (myresume): Adjust to use ptids.
9624 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
9625 (handle_status): Adjust to discard_queued_stop_replies interface
9626 change.
9627 (first_thread_of, kill_inferior_callback)
9628 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
9629 (main): Call initialize_inferiors. Adjust to use ptids, killing
9630 and detaching from all inferiors. Handle multiprocess packet
9631 variants.
9632 * linux-low.h: Include gdb_proc_service.h.
9633 (struct process_info_private): New.
9634 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
9635 <lwpid_of>: Use ptid_get_lwp.
9636 (get_lwp_thread): Adjust.
9637 (struct lwp_info): Add `dead' member.
9638 (find_lwp_pid): Declare.
9639 * linux-low.c (thread_db_active): Delete.
9640 (new_inferior): Adjust comment.
9641 (inferior_pid): Delete.
9642 (linux_add_process): New.
9643 (handle_extended_wait): Adjust.
9644 (add_lwp): Change unsigned long to ptid.
9645 (linux_create_inferior): Add process to processes table. Adjust
9646 to use ptids. Don't set new_inferior here.
9647 (linux_attach_lwp): Rename to ...
9648 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
9649 it. Adjust to use ptids.
9650 (linux_attach_lwp): New.
9651 (linux_attach): Add process to processes table. Don't set
9652 new_inferior here.
9653 (struct counter): New.
9654 (second_thread_of_pid_p, last_thread_of_process_p): New.
9655 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
9656 multiple processes.
9657 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
9658 processes. Remove process from process table.
9659 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
9660 to multiple processes.
9661 (any_thread_of): New.
9662 (linux_detach): Add `pid' argument, and handle it. Remove process
9663 from processes table.
9664 (linux_join): Add `pid' argument. Handle it.
9665 (linux_thread_alive): Change unsighed long argument to ptid_t.
9666 Consider dead lwps as not being alive.
9667 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
9668 threads we're not interested in.
9669 (same_lwp, find_lwp_pid): New.
9670 (linux_wait_for_lwp): Change `pid' argument's type from int to
9671 ptid_t. Adjust.
9672 (linux_wait_for_event): Rename to ...
9673 (linux_wait_for_event_1): ... this. Change `pid' argument's type
9674 from int to ptid_t. Adjust.
9675 (linux_wait_for_event): New.
9676 (linux_wait_1): Add `ptid' argument. Change return type to
9677 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
9678 that exit from the process table.
9679 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
9680 Adjust.
9681 (mark_lwp_dead): New.
9682 (wait_for_sigstop): Adjust to use ptids. If a process exits while
9683 stopping all threads, mark its main lwp as dead.
9684 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
9685 ptids.
9686 (fetch_register, usr_store_inferior_registers)
9687 (regsets_fetch_inferior_registers)
9688 (regsets_store_inferior_registers, linux_read_memory)
9689 (linux_write_memory): Inline `inferior_pid'.
9690 (linux_look_up_symbols): Adjust to use per-process
9691 `thread_db_active'.
9692 (linux_request_interrupt): Adjust to use ptids.
9693 (linux_read_auxv): Inline `inferior_pid'.
9694 (initialize_low): Don't reference thread_db_active.
9695 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
9696 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
9697 (ps_getpid): Return the pid of the current inferior.
9698 * thread-db.c (proc_handle, thread_agent): Delete.
9699 (thread_db_create_event, thread_db_enable_reporting): Adjust to
9700 per-process data.
9701 (find_one_thread): Change argument type to ptid_t. Adjust to
9702 per-process data.
9703 (maybe_attach_thread): Adjust to per-process data and ptids.
9704 (thread_db_find_new_threads): Ditto.
9705 (thread_db_init): Ditto.
9706 * spu-low.c (spu_create_inferior, spu_attach): Add process to
9707 processes table. Adjust to use ptids.
9708 (spu_kill, spu_detach): Adjust interface. Remove process from
9709 processes table.
9710 (spu_join, spu_thread_alive): Adjust interface.
9711 (spu_wait): Adjust interface. Remove process from processes
9712 table. Adjust to use ptids.
9713 * win32-low.c (current_inferior_tid): Delete.
9714 (current_inferior_ptid): New.
9715 (debug_event_ptid): New.
9716 (thread_rec): Take a ptid. Adjust.
9717 (child_add_thread): Add `pid' argument. Adjust to use ptids.
9718 (child_delete_thread): Ditto.
9719 (do_initial_child_stuff): Add `attached' argument. Add process to
9720 processes table.
9721 (child_fetch_inferior_registers, child_store_inferior_registers):
9722 Adjust.
9723 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
9724 (win32_attach): Pass 1 to do_initial_child_stuff.
9725 (win32_kill): Adjust interface. Remove process from processes
9726 table.
9727 (win32_detach): Ditto.
9728 (win32_join): Adjust interface.
9729 (win32_thread_alive): Take a ptid.
9730 (win32_resume): Adjust to use ptids.
9731 (get_child_debug_event): Ditto.
9732 (win32_wait): Adjust interface. Remove exiting process from
9733 processes table.
9734
bd99dc85
PA
97352009-04-01 Pedro Alves <pedro@codesourcery.com>
9736
9737 Non-stop mode support.
9738
9739 * server.h (non_stop): Declare.
9740 (gdb_client_data, handler_func): Declare.
9741 (delete_file_handler, add_file_handler, start_event_loop):
9742 Declare.
9743 (handle_serial_event, handle_target_event, push_event)
9744 (putpkt_notif): Declare.
9745 * target.h (enum resume_kind): New.
9746 (struct thread_resume): Replace `step' field by `kind' field.
9747 (TARGET_WNOHANG): Define.
9748 (struct target_ops) <wait>: Add `options' argument.
9749 <supports_non_stop, async, start_non_stop>: New fields.
9750 (target_supports_non_stop, target_async): New.
9751 (start_non_stop): Declare.
9752 (mywait): Add `options' argument.
9753 * target.c (mywait): Add `options' argument. Print child exit
9754 notifications here.
9755 (start_non_stop): New.
9756 * server.c (non_stop, own_buf, mem_buf): New globals.
9757 (struct vstop_notif): New.
9758 (notif_queue): New global.
9759 (queue_stop_reply, push_event, discard_queued_stop_replies)
9760 (send_next_stop_reply): New.
9761 (start_inferior): Adjust to use resume_kind. Adjust to mywait
9762 interface changes.
9763 (attach_inferior): In non-stop mode, don't wait for the target
9764 here.
9765 (handle_general_set): Handle QNonStop.
9766 (handle_query): When handling qC, return the current general
9767 thread, instead of the first thread of the list.
9768 (handle_query): If the backend supports non-stop mode, include
9769 QNonStop+ in the qSupported query response.
9770 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
9771 and non-stop mode.
9772 (handle_v_attach, handle_v_run): Handle non-stop mode.
9773 (handle_v_stopped): New.
9774 (handle_v_requests): Report support for vCont;t. Handle vStopped.
9775 (myresume): Adjust to use resume_kind. Handle non-stop.
9776 (queue_stop_reply_callback): New.
9777 (handle_status): Handle non-stop mode.
9778 (main): Clear non_stop flag on reconnection. Use the event-loop.
9779 Refactor serial protocol handling from here ...
9780 (process_serial_event): ... to this new function. When GDB
9781 selects any thread, select one here. In non-stop mode, wait until
9782 GDB acks all pending events before exiting.
9783 (handle_serial_event, handle_target_event): New.
9784 * remote-utils.c (remote_open): Install remote_desc in the event
9785 loop.
9786 (remote_close): Remove remote_desc from the event loop.
9787 (putpkt_binary): Rename to...
9788 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
9789 (putpkt_binary): New as wrapper around putpkt_binary_1.
9790 (putpkt_notif): New.
9791 (prepare_resume_reply): In non-stop mode, don't change the
9792 general_thread.
9793 * event-loop.c: New.
9794 * Makefile.in (OBJ): Add event-loop.o.
9795 (event-loop.o): New rule.
9796
9797 * linux-low.h (pid_of): Moved here.
9798 (lwpid_of): New.
9799 (get_lwp_thread): Use lwpid_of.
9800 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
9801 * linux-low.c (pid_of): Delete.
9802 (inferior_pid): Use lwpid_of.
9803 (linux_event_pipe): New.
9804 (target_is_async_p): New.
9805 (delete_lwp): New.
9806 (handle_extended_wait): Use lwpid_of.
9807 (add_lwp): Don't set lwpid field.
9808 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
9809 (linux_kill_one_lwp): If killing a running lwp, stop it first.
9810 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
9811 (linux_detach_one_lwp): If detaching from a running lwp, stop it
9812 first. Adjust to linux_wait_for_event interface changes. Use
9813 lwpid_of.
9814 (linux_detach): Don't delete the main lwp here.
9815 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
9816 (status_pending_p): Don't consider explicitly suspended lwps.
9817 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
9818 pointer. Add OPTIONS argument. Change return type to int. Use
9819 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
9820 (linux_wait_for_event): Take an integer pid instead of a lwp_info
9821 pointer. Add status pointer argument. Return a pid instead of a
9822 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
9823 changes. In non-stop mode, don't switch to a random thread.
9824 (linux_wait): Rename to...
9825 (linux_wait_1): ... this. Add target_options argument, and handle
9826 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
9827 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
9828 clean exit and signal exit code. Don't stop all threads in
9829 non-stop mode. In all-stop mode, only stop all threads when
9830 reporting a stop to GDB. Handle explicit thread stop requests.
9831 (async_file_flush, async_file_mark): New.
9832 (linux_wait): New.
9833 (send_sigstop): Use lwpid_of.
9834 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
9835 interface changes. In non-stop mode, don't switch to a random
9836 thread.
9837 (linux_resume_one_lwp): Use lwpid_of.
9838 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
9839 (linux_resume_one_thread): ... this. Handle resume_stop. In
9840 non-stop mode, don't look for pending flag in all threads.
9841 (resume_status_pending_p): Don't consider explicitly suspended
9842 threads.
9843 (my_waitpid): Reimplement. Emulate __WALL.
9844 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
9845 Use lwpid_of.
9846 (sigchld_handler, linux_supports_non_stop, linux_async)
9847 (linux_start_non_stop): New.
9848 (linux_target_ops): Register linux_supports_non_stop, linux_async
9849 and linux_start_non_stop.
9850 (initialize_low): Install SIGCHLD handler.
9851 * thread-db.c (thread_db_create_event, find_one_thread)
9852 (thread_db_get_tls_address): Use lwpid_of.
9853 * win32-low.c (win32_detach): Adjust to use resume_kind.
9854 (win32_wait): Add `options' argument.
9855 * spu-low.c (spu_resume): Adjust to use resume_kind.
9856 (spu_wait): Add `options' argument.
9857
5b1c542e
PA
98582009-04-01 Pedro Alves <pedro@codesourcery.com>
9859
9860 Decouple target code from remote protocol.
9861
9862 * target.h (enum target_waitkind): New.
9863 (struct target_waitstatus): New.
9864 (struct target_ops) <wait>: Return an unsigned long. Take a
9865 target_waitstatus pointer instead of a char pointer.
9866 (mywait): Likewise.
9867 * target.c (mywait): Change prototype to return an unsigned long.
9868 Take a target_waitstatus pointer instead of a char pointer. Adjust.
9869 * server.h (thread_from_wait, old_thread_from_wait): Delete
9870 declarations.
9871 (prepare_resume_reply): Change prototype to take a
9872 target_waitstatus.
9873 * server.c (thread_from_wait, old_thread_from_wait): Delete.
9874 (last_status, last_ptid): New.
9875 (start_inferior): Remove "statusptr" argument. Adjust. Return a
9876 pid instead of a signal.
9877 (attach_inferior): Remove "status" and "signal" parameters.
9878 Adjust.
9879 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
9880 not as an address.
9881 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
9882 (handle_v_requests, myresume): Remove "status" and "signal"
9883 parameters. Adjust.
9884 (handle_status): New.
9885 (main): Delete local `status'. Adjust.
9886 * remote-utils.c: Include target.h.
9887 (prepare_resume_reply): Change prototype to take a
9888 target_waitstatus. Adjust.
9889
9890 * linux-low.c (linux_wait): Adjust to new target_ops->wait
9891 interface.
9892 * spu-low.c (spu_wait): Adjust.
9893 * win32-low.c (enum target_waitkind, struct target_waitstatus):
9894 Delete.
9895 (win32_wait): Adjust.
9896
2bd7c093
PA
98972009-04-01 Pedro Alves <pedro@codesourcery.com>
9898
9899 * target.h (struct thread_resume): Delete leave_stopped member.
9900 (struct target_ops): Add a `n' argument to the `resume' callback.
9901 * server.c (start_inferior): Adjust.
9902 (handle_v_cont, myresume): Adjust.
9903 * linux-low.c (check_removed_breakpoint): Adjust to resume
9904 interface change, and to removed leave_stopped field.
9905 (resume_ptr): Delete.
9906 (struct thread_resume_array): New.
9907 (linux_set_resume_request): Add new `arg' parameter. Adjust to
9908 resume interface change.
9909 (linux_continue_one_thread, linux_queue_one_thread)
9910 (resume_status_pending_p): Check if the resume field is NULL
9911 instead of checking the leave_stopped member.
9912 (linux_resume): Adjust to the target resume interface change.
9913 * spu-low.c (spu_resume): Adjust to the target resume interface
9914 change.
9915 * win32-low.c (win32_detach, win32_resume): Ditto.
9916
c35fafde
PA
99172009-04-01 Pedro Alves <pedro@codesourcery.com>
9918
9919 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
9920 flag.
9921 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
9922 pending.
9923 (linux_continue_one_thread): Only preserve the stepping flag if
9924 there's a pending breakpoint.
9925
0a59d50b
PA
99262009-03-31 Pedro Alves <pedro@codesourcery.com>
9927
9928 * server.c (main): After the inferior having exited, call
9929 remote_close before exiting gdbserver.
9930
f04c6d38
TJB
99312009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
9932
9933 Fix size of FPSCR in Power 7 processors.
9934 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
9935 (PPC_FEATURE_HAS_DFP): New #define.
9936 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
9937 size of the FPSCR.
9938
78e5cee6
PA
99392009-03-23 Pedro Alves <pedro@codesourcery.com>
9940
9941 * server.c (handle_query) Whitespace and formatting.
9942
1b3f6016
PA
99432009-03-22 Pedro Alves <pedro@codesourcery.com>
9944
9945 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
9946 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
9947 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
9948 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
9949 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
9950 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
9951 Makefile.in, configure.ac: Fix whitespace throughout.
9952 * configure: Regenerate.
9953
a07b2135
PA
99542009-03-22 Pedro Alves <pedro@codesourcery.com>
9955
9956 * inferiors.c (find_inferior): Make it safe for the callback
9957 function to delete the currently iterated inferior.
9958
67cc2626
PA
99592009-03-22 Pedro Alves <pedro@codesourcery.com>
9960
9961 * Makefile.in (linuw_low_h): Move higher.
9962 (thread-db.o): Depend on $(linux_low_h).
9963
54a0b537
PA
99642009-03-17 Pedro Alves <pedro@codesourcery.com>
9965
9966 Rename "process" to "lwp" throughout.
9967
9968 * linux-low.c (all_processes): Rename to...
9969 (all_lwps): ... this.
9970 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
9971 (add_process): Rename to ...
9972 (add_lwp): ... this. Adjust.
9973 (linux_create_inferior): Adjust.
9974 (linux_attach_lwp): Adjust.
9975 (linux_attach): Adjust.
9976 (linux_kill_one_process): Rename to ...
9977 (linux_kill_one_lwp): ... this. Adjust.
9978 (linux_kill): Adjust.
9979 (linux_detach_one_process): Rename to ...
9980 (linux_detach_one_lwp): ... this. Adjust.
9981 (linux_detach): Adjust.
9982 (check_removed_breakpoint): Adjust.
9983 (status_pending_p): Adjust.
9984 (linux_wait_for_process): Rename to ...
9985 (linux_wait_for_lwp): ... this. Adjust.
9986 (linux_wait_for_event): Adjust.
9987 (send_sigstop): Adjust.
9988 (wait_for_sigstop): Adjust.
9989 (stop_all_processes): Rename to ...
9990 (stop_all_lwps): ... this.
9991 (linux_resume_one_process): Rename to ...
9992 (linux_resume_one_lwp): ... this. Adjust.
9993 (linux_set_resume_request, linux_continue_one_thread)
9994 (linux_queue_one_thread, resume_status_pending_p)
9995 (usr_store_inferior_registers, regsets_store_inferior_registers)
9996 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
9997 Adjust.
9998 * linux-low.h (get_process): Rename to ...
9999 (get_lwp): ... this. Adjust.
10000 (get_thread_process): Rename to ...
10001 (get_thread_lwp): ... this. Adjust.
10002 (get_process_thread): Rename to ...
10003 (get_lwp_thread): ... this. Adjust.
10004 (struct process_info): Rename to ...
10005 (struct lwp_info): ... this.
10006 (all_processes): Rename to ...
10007 (all_lwps): ... this.
10008 * proc-service.c (ps_lgetregs): Adjust.
10009 * thread-db.c (thread_db_create_event, find_one_thread)
10010 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
10011
0b16c5cf
PA
100122009-03-14 Pedro Alves <pedro@codesourcery.com>
10013
10014 * server.c (handle_query): Handle "qAttached".
10015
32de4b9d
NS
100162009-03-13 Nathan Sidwell <nathan@codesourcery.com>
10017
10018 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
10019 GPLv3, update license URL.
10020
2aecd87f
DE
100212009-03-01 Doug Evans <dje@google.com>
10022
93efd302 10023 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
10024 (server_h): Add gdb_signals.h.
10025 (signals.o): Update.
10026 * server.h (target_signal_from_host,target_signal_to_host_p)
10027 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
10028
86b1f9c5
PM
100292009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
10030
10031 * remote-utils.c (getpkt): Also generate remote-debug
10032 information if noack_mode is set.
10033
4aa995e1
PA
100342009-02-06 Pedro Alves <pedro@codesourcery.com>
10035
10036 * server.c (handle_query): Report qXfer:siginfo:read and
10037 qXfer:siginfo:write as supported and handle them.
10038 * target.h (struct target_ops) <qxfer_siginfo>: New field.
10039 * linux-low.c (linux_xfer_siginfo): New.
10040 (linux_target_ops): Set it.
10041
62709adf
PA
100422009-01-26 Pedro Alves <pedro@codesourcery.com>
10043
10044 * server.c (gdbserver_usage): Mention --remote-debug.
10045 (main): Accept '--remote-debug' switch.
10046
aef93bd7
DE
100472009-01-18 Doug Evans <dje@google.com>
10048
10049 * regcache.c (new_register_cache): No need to check result of xcalloc.
10050 * server.c (handle_search_memory): Back out calls to xmalloc,
10051 result is checked and error is returned to user upon failure.
10052 (handle_query): Ditto. Add more checks for result of malloc.
10053 (handle_v_cont): Check result of malloc, report error back to
10054 user upon failure.
10055 (handle_v_run): Ditto. Call freeargv.
10056 * server.h (freeargv): Declare.
10057 * utils.c (freeargv): New fn.
10058
54363045
DE
100592009-01-15 Doug Evans <dje@google.com>
10060
f626972c
DE
10061 * gdbreplay.c (perror_with_name): Make arg const char *.
10062 * server.h (target_signal_to_name): Make return type const char *.
0842e787 10063 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 10064 * utils.c (perror_with_name): Make arg const char *.
54363045 10065
18aae699
PA
100662009-01-14 Pedro Alves <pedro@codesourcery.com>
10067
10068 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
10069 when handling a EXIT_PROCESS_DEBUG_EVENT.
10070
ff703abe
JB
100712009-01-06 Joel Brobecker <brobecker@adacore.com>
10072
10073 * gdbreplay.c (gdbreplay_version): Update copyright year.
10074 * server.c (gdbserver_version): Likewise.
10075
f21cc1a2 100762009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
10077
10078 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 10079 (handle_extended_wait): Improve comment.
0e21c1ec 10080
bca929d3
DE
100812008-12-13 Doug Evans <dje@google.com>
10082
10083 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
10084 * server.h (ATTR_MALLOC): New macro.
10085 (xmalloc,xcalloc,xstrdup): Declare.
10086 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
10087 * inferiors.c: Ditto.
10088 * linux-low.c: Ditto.
10089 * mem-break.c: Ditto.
10090 * regcache.c: Ditto.
10091 * remote-utils.c: Ditto.
10092 * server.c: Ditto.
10093 * target.c: Ditto.
10094 * win32-low.c: Ditto.
10095
97438e3f
DE
100962008-12-12 Doug Evans <dje@google.com>
10097
896c7fbb
DE
10098 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
10099 in debugging printf.
10100
97438e3f
DE
10101 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
10102
e3b886f8
DE
101032008-12-09 Doug Evans <dje@google.com>
10104
10105 * linux-low.h (struct process_info): Delete member tid, unused.
10106 * thread-db.c (find_one_thread): Update.
10107 (maybe_attach_thread): Update.
10108
07e059b5
VP
101092008-12-02 Pedro Alves <pedro@codesourcery.com>
10110
889bf7c5
PA
10111 * target.h (struct target_ops): Add qxfer_osdata member.
10112 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
10113 and dirent.h.
10114 (linux_qxfer_osdata): New functions.
10115 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
10116 callback.
10117 * server.c (handle_query): Handle "qXfer:osdata:read:".
10118 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
10119 (buffer_xml_printf): New functions.
10120 * server.h (struct buffer): New.
10121 (buffer_grow_str, buffer_grow_str0): New macros.
10122 (buffer_grow, buffer_free, buffer_init, buffer_finish)
10123 (buffer_xml_printf): Declare.
07e059b5 10124
4cab47ab
DE
101252008-11-24 Doug Evans <dje@google.com>
10126
10127 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
10128
f142445f
DJ
101292008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
10130
10131 * server.c (handle_v_run): Always use the supplied argument list.
10132
d0107bb6 101332008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 10134
d0107bb6
BW
10135 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
10136 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 10137
2c4ad781
TJB
101382008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
10139
10140 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
10141 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
10142 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
10143 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
10144 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
10145 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
10146 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
10147 XML target descriptions.
10148 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
10149 when inferior is running on an ISA 2.05 or later processor. Add
10150 special case to return offset for full 64-bit slot of FPSCR when
10151 in 32-bits.
10152
dfb64f85
DJ
101532008-11-14 Daniel Gutson <dgutson@codesourcery.com>
10154
10155 * Makefile.in (SFILES, clean): Added sparc64 files.
10156 (reg-sparc64.o, reg-sparc64.c): New.
10157 * configure.srv (sparc*-*-linux*): New configuration.
10158 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
10159 syscall arguments for SPARC.
10160 (regsets_store_inferior_registers): Likewise.
10161 * linux-sparc-low.c: New file.
10162
66b6e1dd
DE
101632008-10-21 Doug Evans <dje@google.com>
10164
10165 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
10166 (READLINE_DIR,READLINE_DEP): Delete.
10167 (INTERNAL_CFLAGS): Update.
10168 (LINTFLAGS): Update.
10169
9b710a42
PA
101702008-10-10 Pedro Alves <pedro@codesourcery.com>
10171
10172 * server.c (handle_v_run): If GDB didn't specify an argv, use the
10173 whole argv from the last run, not just argv[0].
10174
5822d809
PA
101752008-09-08 Pedro Alves <pedro@codesourcery.com>
10176
10177 * regcache.c (new_register_cache): Return NULL if the register
10178 cache size isn't known yet.
10179 (free_register_cache): Avoid dereferencing a NULL regcache.
10180
74aac56f
DJ
101812008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
10182
10183 * configure.srv: Merge MIPS and MIPS64.
10184
400b20f5
MR
101852008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
10186
10187 * Makefile.in (uninstall): Apply $(EXEEXT) too.
10188
677c5bb1
LM
101892008-08-18 Luis Machado <luisgpm@br.ibm.com>
10190
10191 * Makefile.in: Add required vsx dependencies.
10192
10193 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
10194 Declare init_registers_powerpc_vsx32l.
10195 Declare init_registers_powerpc_vsx64l.
10196 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
10197 (ppc_arch_setup): Check for VSX in hwcap.
10198 (ppc_fill_vsxregset): New function.
10199 (ppc_store_vsxregset): New function.
10200 Add new VSX entry in regset_info target_regsets.
10201
10202 * configure.srv: Add new VSX dependencies.
10203
a6f3e723
SL
102042008-08-12 Pedro Alves <pedro@codesourcery.com>
10205
10206 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
10207 (remote_open): Set or clear transport_is_reliable.
10208 (putpkt_binary): Don't expect acks in noack mode.
10209 (getpkt): Don't send ack/nac in noack mode.
10210 * server.c (handle_general_set): Handle QStartNoAckMode.
10211 (handle_query): If connected by tcp pass QStartNoAckMode+ in
10212 qSupported.
10213 (main): Reset noack_mode on every connection.
10214 * server.h (noack_mode): Declare.
10215
a417dc56
RW
102162008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
10217
10218 * Makefile.in (GDBREPLAY_OBS): New variable.
10219 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
10220
3221518c
UW
102212008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
10222 Daniel Jacobowitz <dan@codesourcery.com>
10223
10224 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
10225 (usr_store_inferior_registers): Likewise.
10226 (regsets_store_inferior_registers): Likewise.
10227
ec56be1b
PA
102282008-07-31 Rolf Jansen <rj@surtec.com>
10229 Pedro Alves <pedro@codesourcery.com>
10230
10231 * configure.ac: Check for memmem declaration.
10232 * server.c [HAVE_MALLOC_H]: Include malloc.h.
10233 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
10234 (disable_packet_qfThreadInfo): Unconditionally compile.
10235 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
10236 * configure, config.in: Regenerate.
10237
2fe5e3ff
DE
102382008-07-28 Doug Kwan <dougkwan@google.com>
10239
10240 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
10241 (linux_write_memory): Remove declaration of errno.
10242
836acd6d
UW
102432008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
10244
10245 * linux-low.c (handle_extended_wait): Do not use "status"
10246 variable uninitialized.
10247
aeba519e
PA
102482008-07-07 Pedro Alves <pedro@codesourcery.com>
10249
10250 * server.c (handle_v_attach): Inhibit reporting dll changes.
10251
db42f210
PA
102522008-06-27 Pedro Alves <pedro@codesourcery.com>
10253
10254 * remote-utils.c (prepare_resume_reply): If requested, don't
10255 output "thread:TID" in the T stop reply.
10256
10257 * server.c (disable_packet_vCont, disable_packet_Tthread)
10258 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
10259 (handle_query): If requested, disable support for qC, qfThreadInfo
10260 and qsThreadInfo.
10261 (handle_v_requests): If requested, disable support for vCont.
10262 (gdbserver_show_disableable): New.
10263 (main): Handle --disable-packet and --disable-packet=LIST.
10264
10265 * server.h (disable_packet_vCont, disable_packet_Tthread)
10266 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
10267
8e4c5421
CD
102682008-06-20 Carlos O'Donell <carlos@codesourcery.com>
10269
10270 * server.c (gdbserver_usage): Mention --version.
10271
6e23a804
DJ
102722008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
10273
10274 * Makefile.in (gdbreplay.o): New rule.
10275
90aa6a40
JM
102762008-06-06 Joseph Myers <joseph@codesourcery.com>
10277
10278 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
10279 message, not gdbserver.
10280
c16158bc 102812008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
10282 Nathan Sidwell <nathan@codesourcery.com>
10283 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
10284
10285 * acinclude.m4: Include ../../config/acx.m4.
10286 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
10287 * configure, config.in: Regenerate.
10288 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
10289 * server.c (gdbserver_version): Print PKGVERSION.
10290 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
10291 (main): Adjust gdbserver_usage calls.
10292 * gdbreplay.c (version, host_name): Add declarations.
10293 (gdbreplay_version, gdbreplay_usage): New.
10294 (main): Accept --version and --help options.
10295
aeb75bf5
DJ
102962008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
10297
10298 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
10299 (arm_breakpoint_at): Handle Thumb.
10300 (the_low_target): Add comment.
10301
76b233dd
UW
103022008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
10303
10304 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
10305
08388c79
DE
103062008-05-09 Doug Evans <dje@google.com>
10307
a3c83fae
DE
10308 * server.h (decode_search_memory_packet): Declare.
10309 * remote-utils.c (decode_search_memory_packet): New fn.
10310 * server.c (handle_search_memory_1): New fn.
08388c79
DE
10311 (handle_search_memory): New fn.
10312 (handle_query): Process qSearch:memory packets.
10313
bb9c3d36
UW
103142008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
10315
10316 * regcache.c (registers_length): Remove.
10317 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
10318 full register packet.
10319 * regcache.h (registers_length): Remove prototype.
10320 * server.h (PBUFSIZ): Define to 16384.
10321
7284e1be
UW
103222008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
10323
10324 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
10325 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
10326 powerpc-64l.o, and powerpc-altivec64l.o.
10327 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
10328 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
10329 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
10330 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
10331 rs6000/power-linux.xml, and rs6000/power64-linux.xml
10332 to srv_xmlfiles.
10333
10334 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
10335 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
10336 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
10337 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
10338 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
10339 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
10340 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
10341 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
10342 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
10343 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
10344 (clean): Update.
10345
10346 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
10347 (init_registers_powerpc_32l): ... this new prototype.
10348 (init_registers_powerpc_32): Remove, replace by ...
10349 (init_registers_powerpc_altivec32l): ... this new prototype.
10350 (init_registers_powerpc_e500): Remove, replace by ...
10351 (init_registers_powerpc_e500l): ... this new prototype.
10352 (init_registers_ppc64): Remove, replace by ...
10353 (init_registers_powerpc_64l): ... this new prototype.
10354 (init_registers_powerpc_64): Remove, replace by ...
10355 (init_registers_powerpc_altivec64l): ... this new prototype.
10356 (ppc_num_regs): Set to 73.
10357 (PT_ORIG_R3, PT_TRAP): Define if necessary.
10358 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
10359 (ppc_cannot_store_register): Handle orig_r3 and trap.
10360 (ppc_arch_setup): Update init_registers_... calls.
10361 (ppc_fill_gregset): Handle orig_r3 and trap.
10362
10363 * inferiors.c (clear_inferiors): Reset current_inferior.
10364
fdc59709
PB
103652008-04-23 Paolo Bonzini <bonzini@gnu.org>
10366
889bf7c5
PA
10367 * acinclude.m4: Add override.m4.
10368 * configure: Regenerate.
fdc59709 10369
c9b2f845
UW
103702008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
10371
10372 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
10373 initial call to init_register_ppc64.
10374
550512b8
UW
103752008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
10376
43aaf8b6
PA
10377 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
10378 single powerpc*-*-linux* case.
550512b8
UW
10379 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
10380
b6430ec3
UW
103812008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
10382
10383 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 10384 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
10385 from reg_xmlfiles.
10386 * linux-ppc-low.c: Include <elf.h>.
10387 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
10388 (ppc_hwcap): New global variable.
10389 (ppc_regmap): Remove __SPE__ #ifdef sections.
10390 (ppc_regmap_e500): New global variable.
10391 (ppc_cannot_store_register): Update __SPE__ special case.
10392 (ppc_get_hwcap): New function.
10393 (ppc_arch_setup): Use it to determine whether inferior supports
10394 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
10395 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
10396 Do not access registers if target does not support AltiVec.
10397 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
10398 Do not access registers if target does not support SPE.
10399 (target_regsets): Unconditionally include AltiVec and SPE regsets.
10400
52fa2412
UW
104012008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
10402
10403 * linux-low.c (disabled_regsets, num_regsets): New.
10404 (use_regsets_p): Delete.
10405 (linux_wait_for_process): Clear disabled_regsets.
10406 (regsets_fetch_inferior_registers): Check and set it.
10407 (regsets_store_inferior_registers): Likewise.
10408 (linux_fetch_registers, linux_store_registers): Do not use
10409 use_regsets_p.
10410 (initialize_low): Allocate disabled_regsets.
10411
e28b3332
DJ
104122008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
10413
10414 * Makefile.in (LIBOBJS): New.
10415 (OBS): Use LIBOBJS.
10416 (memmem.o): New rule.
10417 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
10418 * configure: Regenerated.
10419
4536995d
UW
104202008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
10421
10422 * server.c (handle_query): Never return "unsupported" for
10423 qXfer:features:read queries.
10424
221c031f
UW
104252008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
10426
10427 * server.c (get_features_xml): Fix inverted condition.
10428 (handle_query): Always support qXfer:feature:read.
10429
ccd213ac
DJ
104302008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
10431
10432 * server.c (wrapper_argv): New.
10433 (start_inferior): Handle wrapper_argv. If set, expect an extra
10434 trap.
10435 (gdbserver_usage): Document --wrapper.
10436 (main): Parse --wrapper.
10437
6fe305f7
UW
104382008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10439
10440 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
10441 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
10442 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
10443 (ppc_set_pc): Likewise.
10444 (ppc_arch_setup): New function.
10445 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
10446 of collect_register.
889bf7c5 10447 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 10448
5b0a002e
UW
104492008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10450
10451 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
10452 instead of linux-ppc64-low.o.
10453 * linux-ppc64-low.c: Remove file.
10454 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
10455 (linux-ppc64-low.o): Remove rule.
10456
10457 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
10458 (init_registers_powerpc_64): Likewise.
10459 (ppc_regmap): Conditionally define depending on __powerpc64__.
10460 (ppc_cannot_store_register): Do not special-case "fpscr" when
10461 compiled on __powerpc64__.
10462 (ppc_collect_ptrace_register): New function.
10463 (ppc_supply_ptrace_register): New function.
10464 (ppc_breakpoint): Change type to "unsigned int".
10465 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
10466 (the_low_target): Conditionally provide initializers for the
889bf7c5 10467 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
10468 collect_ptrace_register and supply_ptrace_register members.
10469
9b4b61c8
UW
104702008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10471
10472 * regcache.h (gdbserver_xmltarget): Add extern declaration.
10473 * server.c (gdbserver_xmltarget): Define.
10474 (get_features_xml): Use it to replace "target.xml" and arch_string.
10475
10476 * configure.srv: Remove srv_xmltarget. Add XML files that were
10477 mentioned there to srv_xmlfiles instead. Remove conditional tests
10478 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
10479 srv_xmlfiles and srv_regobj to include all possible choices.
10480 * configure.ac (srv_xmltarget): Remove.
10481 (srv_xmlfiles): Do not add "target.xml".
10482 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
10483 checks for supplementary target information.
10484 * configure: Regenerate.
10485 * Makefile.in (XML_TARGET): Remove.
10486 (target.xml): Remove rule.
10487 (clean): Do not clean up target.xml.
10488 (.PRECIOUS): Do not mention target.xml.
10489
10490 * target.h (struct target_ops): Remove arch_string member.
10491 * linux-low.c (linux_arch_string): Remove.
10492 (linux_target_ops): Remove arch_string initializer.
10493 * linux-low.h (struct linux_target_ops): Remove arch_string member.
10494 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
10495 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
10496 * spu-low.c (spu_arch_string): Remove.
10497 (spu_target_ops): Remove arch_string initializer.
10498 * win32-low.c (win32_arch_string): Remove.
10499 (win32_target_ops): Remove arch_string initializer.
10500 * win32-low.h (struct win32_target_ops): Remove arch_string member.
10501 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
10502 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
10503
ee1a7ae4
UW
105042008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
10505
10506 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
10507 by collect_ptrace_register and supply_ptrace_register hooks.
10508 * linux-low.c (fetch_register): Use supply_ptrace_register callback
10509 instead of checking for the_low_target.left_pad_xfer.
10510 (usr_store_inferior_registers): Use collect_ptrace_register callback
10511 instead of checking for the_low_target.left_pad_xfer.
10512
10513 * linux-s390-low.c (s390_collect_ptrace_register): New function.
10514 (s390_supply_ptrace_register): Likewise.
10515 (s390_fill_gregset): Call s390_collect_ptrace_register.
10516 (the_low_target): Update.
10517
10518 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
10519 (ppc_supply_ptrace_register): Likewise.
10520 (the_low_target): Update.
10521
10522 * linux-i386-low.c (the_low_target): Update.
10523 * linux-x86-64-low.c (the_low_target): Update.
10524
d61ddec4
UW
105252008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
10526
10527 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
10528 reg-s390.o and reg-s390x.o.
10529
10530 * linux-low.c (new_inferior): New global variable.
10531 (linux_create_inferior, linux_attach): Set it.
10532 (linux_wait_for_process): Call the_low_target.arch_setup after the
10533 target has stopped for the first time.
10534 (initialize_low): Do not call the_low_target.arch_setup.
10535
10536 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
10537 (s390_set_pc): Likewise.
10538 (s390_arch_setup): New function.
10539 (the_low_target): Use s390_arch_setup as arch_setup routine.
10540
10541 * regcache.c (realloc_register_cache): New function.
10542 (set_register_cache): Call it for each existing regcache.
10543
d05b4ac3
UW
105442008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
10545
10546 * server.h (init_registers): Remove prototype.
10547
10548 * linux-low.h (struct linux_target_ops): Add arch_setup field.
10549 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
10550 instead of init_registers ().
10551 * linux-arm-low.c (init_registers_arm): Add prototype.
10552 (init_registers_arm_with_iwmmxt): Likewise.
10553 (the_low_target): Add initializer for arch_setup field.
10554 * linux-cris-low.c (init_registers_cris): Add prototype.
10555 (the_low_target): Add initializer for arch_setup field.
10556 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
10557 (the_low_target): Add initializer for arch_setup field.
10558 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
10559 (the_low_target): Add initializer for arch_setup field.
10560 * linux-ia64-low.c (init_registers_ia64): Add prototype.
10561 (the_low_target): Add initializer for arch_setup field.
10562 * linux-m32r-low.c (init_registers_m32r): Add prototype.
10563 (the_low_target): Add initializer for arch_setup field.
10564 * linux-m68k-low.c (init_registers_m68k): Add prototype.
10565 (the_low_target): Add initializer for arch_setup field.
10566 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
10567 (init_registers_mips64_linux): Likewise.
10568 (the_low_target): Add initializer for arch_setup field.
10569 * linux-ppc-low.c (init_registers_ppc): Add prototype.
10570 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
10571 (the_low_target): Add initializer for arch_setup field.
10572 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
10573 (init_registers_powerpc_64): Likewise.
10574 (the_low_target): Add initializer for arch_setup field.
10575 * linux-s390-low.c (init_registers_s390): Add prototype.
10576 (init_registers_s390x): Likewise.
10577 (the_low_target): Add initializer for arch_setup field.
10578 * linux-sh-low.c (init_registers_sh): Add prototype.
10579 (the_low_target): Add initializer for arch_setup field.
10580 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
10581 (the_low_target): Add initializer for arch_setup field.
10582 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
10583 (the_low_target): Add initializer for arch_setup field.
10584
10585 * win32-low.h (struct win32_target_ops): Add arch_setup field.
10586 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
10587 instead of init_registers ().
10588 * win32-arm-low.c (init_registers_arm): Add prototype.
10589 (the_low_target): Add initializer for arch_setup field.
10590 * win32-i386-low.c (init_registers_i386): Add prototype.
10591 (the_low_target): Add initializer for arch_setup field.
10592
10593 * spu-low.c (init_registers_spu): Add prototype.
10594 (initialize_low): Call initialie_registers_spu () instead of
10595 initialize_registers ().
10596
fd96d250
PA
105972008-02-19 Pedro Alves <pedro@codesourcery.com>
10598
10599 * server.c (handle_v_requests): When handling the vRun and vAttach
10600 packets, if already debugging a process, don't kill it. Return an
10601 error instead.
10602
d41b6bb4
DJ
106032008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
10604
10605 * server.c (handle_query): Correct length check.
10606
5ac588cf
PA
106072008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
10608
10609 * win32-low.c (do_initial_child_stuff): Add process handle
10610 parameter. Set current_process_handle and current_process_id from the
10611 parameters. Clear globals.
10612 (win32_create_inferior): Don't set current_process_handle and
10613 current_process_id here. Instead pass them on the call to
10614 do_initial_child_stuff.
10615 (win32_attach): Likewise.
10616 (win32_clear_inferiors): New.
10617 (win32_kill): Don't close the current process handle or the
10618 current thread handle here. Instead call win32_clear_inferiors.
10619 (win32_detach): Don't open a new handle to the process. Call
10620 win32_clear_inferiors.
10621 (win32_join): Don't rely on current_process_handle; open a new
10622 handle using the process id.
10623 (win32_wait): Call win32_clear_inferiors when the inferior process
10624 has exited.
10625
ecd7ecbc
DJ
106262008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
10627
10628 * server.c (monitor_show_help): Add "exit".
10629
1525d545
MG
106302008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
10631
ecd7ecbc 10632 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
10633 (clean): Add reg-xtensa.c.
10634 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
10635 * configure.srv (xtensa*-*-linux*) New target.
10636 * linux-xtensa-low.c: New.
10637 * xtensa-xtregs.c: New.
1525d545 10638
59a016f0
PA
106392008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
10640
10641 * hostio.c: Don't include errno.h.
10642 (errno_to_fileio_errno): Move to hostio-errno.
10643 * hostio.c: (hostio_error): Remove the error parameter. Defer the
10644 error number outputting to the target->hostio_last_error callback.
10645 (hostio_packet_error): Use FILEIO_EINVAL directly.
10646 (handle_open, handle_pread, hostio_error, handle_unlink): Update
10647 calls to hostio_error.
10648 * hostio-errno.c: New.
10649 * server.h (hostio_last_error_from_errno): Declare.
10650 * target.h (target_ops): Add hostio_last_error member.
10651 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
10652 as hostio_last_error handler.
889bf7c5 10653 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
10654 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
10655 (wince_hostio_last_error): New functions.
10656 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
10657 as hostio_last_error handler.
10658 (win32_target_ops) [!_WIN32_WCE]: Register
10659 hostio_last_error_from_errno as hostio_last_error handler.
10660 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
10661 (hostio-errno.o): New rule.
10662 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
10663 * configure.srv (srv_hostio_err_objs): New variable. Default to
10664 hostio-errno.o.
10665 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
10666 * configure: Regenerate.
10667
2d717e4f
DJ
106682008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
10669
10670 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
10671 (linux_kill, linux_detach): Clean up the process list.
10672 * remote-utils.c (remote_open): Improve port number parsing.
10673 (putpkt_binary, input_interrupt): Only send interrupts if the target
10674 is running.
10675 * server.c (extended_protocol): Make static.
10676 (attached): Define earlier.
10677 (exit_requested, response_needed, program_argv): New variables.
10678 (target_running): New.
10679 (start_inferior): Clear attached here.
10680 (attach_inferior): Set attached here.
10681 (require_running): Define.
10682 (handle_query): Use require_running and target_running. Implement
10683 "monitor exit".
10684 (handle_v_attach, handle_v_run): New.
10685 (handle_v_requests): Use require_running. Handle vAttach and vRun.
10686 (gdbserver_usage): Update.
10687 (main): Redo argument parsing. Handle --debug and --multi. Handle
10688 --attach along with other options or after the port. Save
10689 program_argv. Support no initial program. Resynchronize
10690 communication with GDB after an error. Handle "monitor exit".
10691 Use require_running and target_running. Always allow the extended
10692 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
10693 restart in extended mode.
10694 * README: Refer to the GDB manual. Update --attach usage.
10695
7407e2de
AS
106962007-12-20 Andreas Schwab <schwab@suse.de>
10697
10698 * linux-low.c (STACK_SIZE): Define.
10699 (linux_tracefork_child): Use it. Use __clone2 on ia64.
10700 (linux_test_for_tracefork): Likewise.
10701
b65d95c5
DJ
107022007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
10703
10704 * linux-low.c (linux_wait_for_event): Update messages. Do not
10705 reinsert auto-delete breakpoints.
10706 * mem-break.c (struct breakpoint): Change return type of handler to
10707 int.
10708 (set_breakpoint_at): Update handler type.
10709 (reinsert_breakpoint_handler): Return 1 instead of calling
10710 delete_breakpoint.
10711 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
10712 setting a new one.
10713 (check_breakpoints): Delete auto-delete breakpoints and return 2.
10714 * mem-break.h (set_breakpoint_at): Update handler type.
10715 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
10716 * win32-low.c (auto_delete_breakpoint): New.
10717 (get_child_debug_event): Use it.
10718
4e799345
DJ
107192007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
10720
10721 * configure.ac: Check for pread and pwrite.
10722 * hostio.c (handle_pread): Fall back to lseek and read.
10723 (handle_pwrite): Fall back to lseek and write.
10724 * config.in, configure: Regenerated.
10725
27524b67
DJ
107262007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
10727
10728 * server.c (myresume): Add own_buf argument.
10729 (main): Update calls.
10730
a20d5e98
DJ
107312007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
10732
10733 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
10734 * remote-utils.c (remote_open): Do not call disable_async_io.
10735 (block_async_io): Delete.
10736 (unblock_async_io): Make static.
10737 (initialize_async_io): New.
10738 * server.c (handle_v_cont): Handle async I/O here.
10739 (myresume): Likewise. Move other common resume tasks here...
10740 (main): ... from here. Call initialize_async_io. Disable async
10741 I/O before the main loop.
10742 * server.h (initialize_async_io): Declare.
10743 (block_async_io, unblock_async_io): Delete prototypes.
10744 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
10745
b79d787e
DJ
107462007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
10747
10748 * remote-utils.c (readchar): Allow binary data in received messages.
10749
d97903b2
PA
107502007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10751
10752 * win32-low.c (attaching): New global.
10753 (win32_create_inferior): Clear the `attaching' global.
10754 (win32_attach): Set the `attaching' global.
10755 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
10756 attaching. Only set a breakpoint at the entry point if not
10757 attaching.
10758
311de423
PA
107592007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10760
10761 * server.c (main): Don't report dll events on the initial
10762 connection on attaches.
10763
6c2d16d2
PA
107642007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10765
10766 * server.c (main): Relax numerical bases supported for the pid of
10767 the --attach command line argument.
10768
5ca906e6
PA
107692007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10770
10771 * win32-low.c (win32_attach): Call OpenProcess before
10772 DebugActiveProcess, not after. Add last error output to error
10773 call.
10774
9c6c8194
PA
107752007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10776
10777 * win32-low.c (win32_get_thread_context)
10778 (win32_set_thread_context): New functions.
10779 (thread_rec): Use win32_get_thread_context.
10780 (continue_one_thread, win32_resume): Use win32_set_thread_context.
10781 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
10782 field.
10783
4d5d1aaa
PA
107842007-12-03 Leo Zayas
10785 Pedro Alves <pedro_alves@portugalmail.pt>
10786
10787 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
10788 global variables.
10789 (child_add_thread): Minor cleanup.
10790 (child_continue): Resume artificially suspended threads before
10791 calling ContinueDebugEvent.
10792 (suspend_one_thread): New.
10793 (fake_breakpoint_event): New.
10794 (get_child_debug_event): Change return type to int. Check here if
10795 gdb sent an interrupt request. If a soft interrupt was requested,
10796 fake a breakpoint event. Return 0 if there is no event to handle,
10797 and 1 otherwise.
10798 (win32_wait): Don't check here if gdb sent an interrupt request.
10799 Ensure there is a valid event to handle.
10800 (win32_request_interrupt): Add soft interruption method as last
10801 resort.
10802
c436e841
PA
108032007-12-03 Leo Zayas
10804 Pedro Alves <pedro_alves@portugalmail.pt>
10805
10806 * win32-low.h (win32_thread_info): Add descriptions to the
10807 structure members. Replace `suspend_count' counter by a
10808 `suspended' flag.
10809 * win32-low.c (thread_rec): Update condition of when to get the
10810 context from the inferior. Rely on ContextFlags being set if it
10811 has already been retrieved. Only suspend the inferior thread if
10812 we haven't already. Warn if that fails.
10813 (continue_one_thread): s/suspend_count/suspended/. Only call
10814 ResumeThread once. Warn if that fails.
10815
e7b5fa67
PA
108162007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
10817
10818 * win32-low.c (win32_wait): Don't read from the inferior when it
10819 has already exited.
10820
a385171d
PA
108212007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
10822
10823 * Makefile.in (win32_low_h): New variable.
10824 (win32-low.o): Add dependency on $(win32_low_h).
10825 (win32-arm-low.o, win32-i386-low.o): New rules.
10826
f80c84b3
DJ
108272007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
10828
10829 * hostio.c: Correct copyright year.
10830
a6b151f1
DJ
108312007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
10832
10833 * Makefile.in (OBS): Add hostio.o.
10834 (hostio.o): New rule.
10835 * server.h (handle_vFile): Declare.
10836 * hostio.c: New file.
10837 * server.c (handle_v_requests): Take packet_len and new_packet_len
10838 for binary packets. Call handle_vFile.
10839 (main): Update call to handle_v_requests.
10840
f9387fc3
DJ
108412007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
10842
10843 * linux-low.c: Include <sched.h>.
10844
51c2684e
DJ
108452007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
10846
10847 * linux-low.c (linux_tracefork_grandchild): New.
10848 (linux_tracefork_child): Use clone.
10849 (linux_test_for_tracefork): Use clone; allocate and free a stack.
10850
75f83163
JB
108512007-10-31 Joel Brobecker <brobecker@adacore.com>
10852
10853 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
10854
da5898ce
DJ
108552007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
10856
10857 * linux-low.c (handle_extended_wait): Handle unexpected signals.
10858
24a09b5f
DJ
108592007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
10860
10861 * inferiors.c (change_inferior_id): Delete.
10862 (add_pid_to_list, pull_pid_from_list): New.
10863 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
10864 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
10865 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
10866 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
10867 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
10868 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
10869 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
10870 (using_threads): Always set to 1.
10871 (handle_extended_wait): New.
10872 (add_process): Do not set TID.
10873 (linux_create_inferior): Set must_set_ptrace_flags.
10874 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
10875 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
10876 (linux_thread_alive): Rename TID argument to LWPID.
10877 (linux_wait_for_process): Handle unknown processes. Do not use TID.
10878 (linux_wait_for_event): Do not use TID or check using_threads. Update
10879 call to dead_thread_notify. Call handle_extended_wait.
10880 (linux_create_inferior): Use PTRACE_SETOPTIONS.
10881 (send_sigstop): Delete sigstop_sent.
10882 (wait_for_sigstop): Avoid TID.
10883 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
10884 (linux_test_for_tracefork): New.
10885 (linux_lookup_signals): Use thread_db_active and
10886 linux_supports_tracefork_flag.
10887 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
10888 * linux-low.h (get_process_thread): Avoid TID.
10889 (struct process_ifo): Move thread_known and tid to the end. Remove
10890 sigstop_sent.
10891 (linux_attach_lwp, thread_db_init): Update prototypes.
10892 * server.h (change_inferior_id): Delete prototype.
10893 (add_pid_to_list, pull_pid_from_list): New prototypes.
10894 * thread-db.c (thread_db_use_events): New.
10895 (find_first_thread): Rename to...
10896 (find_one_thread): ...this. Update callers and messages. Do not
10897 call fatal. Check thread_db_use_events. Do not call
10898 change_inferior_id or new_thread_notify.
10899 (maybe_attach_thread): Update. Do not call new_thread_notify.
10900 (thread_db_init): Set thread_db_use_events. Check use_events.
10901 * utils.c (fatal, warning): Correct message prefix.
10902
30ed0a8f
DJ
109032007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
10904
10905 * Makefile.in (clean): Remove new files.
10906 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
10907 (powerpc-64.o, powerpc-64.c): New rules.
10908 * configure.srv: Use alternate register sets for powerpc64-*-linux*
10909 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
10910 with SPE.
10911 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
10912 SPE targets.
10913 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
10914 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
10915 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
10916 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
10917 (target_regsets): Add AltiVec and SPE register sets.
10918 * configure.ac: Check for AltiVec and SPE.
10919 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
10920 (ppc_fill_vrregset, ppc_store_vrregset): New.
10921 (target_regsets): Add AltiVec register set.
10922 * configure: Regenerated.
10923
fd462a61
DJ
109242007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
10925
10926 * linux-low.c (O_LARGEFILE): Define.
10927 (linux_read_memory): Use /proc/PID/mem.
10928 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
10929 * configure, config.in: Regenerated.
10930
69f223ed
DJ
109312007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
10932
10933 * linux-low.c (linux_wait_for_event): Do not pass signals while
10934 single-stepping.
10935
aec18585
PA
109362007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
10937
10938 * win32-low.c (create_process): New.
10939 (win32_create_inferior): Use create_process instead of
10940 CreateProcess. If create_process failed retry appending an ".exe"
10941 suffix. Store the GetLastError result immediatelly after
10942 create_process calls and use it on the call to error.
10943
34d86ddd
PA
109442007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
10945
10946 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
10947
5a0e3bd0
JB
109482007-08-23 Joel Brobecker <brobecker@adacore.com>
10949
10950 * configure.ac: Switch license to GPLv3.
10951
f88c79e6
MS
109522007-08-01 Michael Snyder <msnyder@access-company.com>
10953
10954 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
10955
6b3d9b83
PA
109562007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
10957
10958 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
10959 typedef.
10960 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
10961 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
10962 CloseToolhelp32Snapshot.
10963 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
10964 CloseToolhelp32Snapshot.
10965
c588c53c
MS
109662007-07-27 Michael Snyder <michael.snyder@access-company.com>
10967
10968 * server.c (main): Check for inferior exit before main loop.
10969
aa0403d9
PA
109702007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
10971
10972 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
10973 instead of on tmp_desc.
10974
255e7678
DJ
109752007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
10976 Daniel Jacobowitz <dan@codesourcery.com>
10977
10978 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
10979 (add_thread): Minor cleanups.
10980 (clear_inferiors): Move lower in the file. Clear the DLL
10981 list.
10982 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
10983 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
10984 (xml_escape_text): New.
10985 * server.c (handle_query): Handle qXfer:libraries:read. Report it
10986 for qSupported.
10987 (handle_v_cont): Report errors.
10988 (gdbserver_version): Update.
10989 (main): Correct size of own_buf. Do not report initial DLL events.
10990 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
10991 (unloaded_dll, xml_escape_text): New.
10992 * win32-low.c (enum target_waitkind): Update comments.
10993 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
10994 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
10995 (win32_EnumProcessModules, win32_GetModuleInformation)
10996 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
10997 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
10998 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
10999 (win32_Module32First, win32_Module32Next, load_toolhelp)
11000 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
11001 (get_child_debug_event): Handle DLL events.
11002 (win32_wait): Likewise.
11003
0d37add9
DJ
110042007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
11005
11006 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
11007 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
11008
45e2715e
PA
110092007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
11010
11011 * win32-low.c (handle_output_debug_string): Ignore event if not
11012 waiting.
11013
c5674cf1
PA
110142007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
11015
11016 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
11017
2bbe3cc1
DJ
110182007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
11019
11020 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
11021
ae13219e
DJ
110222007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
11023
11024 * inferiors.c (change_inferior_id): Add comment.
11025 * linux-low.c (check_removed_breakpoint): Add an early
11026 prototype. Improve debug output.
11027 (linux_attach): Doc update.
11028 (linux_detach_one_process, linux_detach): Clean up before releasing
11029 each process.
11030 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
11031 * linux-low.h (struct process_info): Doc improvement.
11032 * mem-break.c (delete_all_breakpoints): New.
11033 * mem-break.h (delete_all_breakpoints): New prototype.
11034 * thread-db.c (find_first_thread): New.
11035 (thread_db_create_event): Call it instead of
11036 thread_db_find_new_threads. Clean up unused variables.
11037 (maybe_attach_thread): Remove first thread handling.
11038 (thread_db_find_new_threads): Use find_first_thread.
11039 (thread_db_get_tls_address): Likewise.
11040
4105de34
DJ
110412007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
11042
11043 * thread-db.c (thread_db_find_new_threads): Add prototype.
11044 (thread_db_create_event): Check for the main thread before adding
11045 a new thread.
11046 (maybe_attach_thread): Only enable event reporting if TID == 0.
11047 (thread_db_get_tls_address): Check for new threads.
11048
2b876972
DJ
110492007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
11050
11051 * linux-low.c (linux_create_inferior): Try execv before execvp.
11052 * spu-low.c (spu_create_inferior): Likewise.
11053
7a245884
DJ
110542007-06-13 Mike Frysinger <vapier@gentoo.org>
11055
11056 * linux-low.c (linux_create_inferior): Change execv to execvp.
11057 * spu-low.c (spu_create_inferior): Likewies.
11058
117ce543
DJ
110592007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
11060
11061 * Makefile.in (clean): Clean new files instead of deleted ones.
11062 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
11063 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
11064 rules.
11065 * configure.srv: Specify XML files and new regformats for MIPS and
11066 MIPS64 GNU/Linux.
11067 * linux-mips-low.c (mips_num_regs): Set to only used registers.
11068 (mips_regmap): Do not fetch $0. Remove unused registers. Add
11069 an entry for the restart register.
11070 (mips_cannot_fetch_register, mips_cannot_store_register)
11071 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
11072 register names to match the XML descriptions.
11073 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
11074 restart register instead of $0.
11075
0e7f50da
UW
110762007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
11077 Markus Deuling <deuling@de.ibm.com>
11078
11079 * remote-utils.c (decode_xfer_write): New function.
11080 * server.h (decode_xfer_write): Add prototype.
11081 * server.c (handle_query): Add PACKET_LEN argument. Support
11082 qXfer:spu:read and qXfer:spu:write packets.
11083 (main): Pass packet_len to handle_query.
11084 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
11085 * target.h (target_ops): Add qxfer_spu.
11086
374c1d38
UW
110872007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
11088
11089 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
11090 accessing non-seekable spufs files.
11091
bb63802a
UW
110922007-05-16 Markus Deuling <deuling@de.ibm.com>
11093
889bf7c5 11094 * server.c (handle_query): Add reply for qC packet.
bb63802a 11095
7390519e
PA
110962007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11097 Leo Zayas <lerele@champenstudios@com>
11098
11099 * server.h (check_remote_input_interrupt_request): New function.
11100 * remote_utils.c (INVALID_DESCRIPTOR): New define.
11101 (remote_desc): Initialize with INVALID_DESCRIPTOR.
11102 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
11103 (check_remote_input_interrupt_request): New function.
11104 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 11105 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
11106 winapi_GenerateConsoleCtrlEvent): New typedefs.
11107 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
11108 to 250 ms.
11109 (win32_wait): Check for remote interrupt request
11110 with check_remote_input_interrupt_request.
11111 (win32_request_interrupt): New function.
11112 (win32_target_op): Set request_interrupt to win32_request_interrupt.
11113
34b34921
PA
111142007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11115
11116 * win32-low.c (debug_registers_changed,
11117 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
11118 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
11119 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
11120 (thread_rec): Get context using the low target.
11121 (child_add_thread): Call thread_added on the low target,
11122 which does the same thing.
11123 (regptr): Delete.
11124 (do_initial_child_stuff): Remove debug registers references.
11125 Set context using the low target. Resume threads after
11126 setting the contexts.
11127 (child_continue): Remove dead variable. Remove debug
11128 registers references.
11129 (child_fetch_inferior_registers): Go through the low target.
11130 (do_child_store_inferior_registers): Remove.
11131 (child_store_inferior_registers): Go through the low target.
11132 (win32_resume): Remove debug registers references.
11133 Set context using the low target.
11134 (handle_exception): Change return type to void. Don't record
11135 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
11136 first chance exception.
889bf7c5 11137 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
11138 goto loop. Always return after waiting for debug event.
11139 (win32_wait): Convert to switch statement. Handle spurious
11140 events.
11141
11142 * win32-i386-low.c (debug_registers_changed,
11143 debug_registers_used): New.
11144 (initial_stuff): Rename to ...
11145 (i386_initial_stuff): ... this. Clear debug registers
11146 state variables.
11147 (store_debug_registers): Delete.
11148 (i386_get_thread_context): New.
11149 (load_debug_registers): Delete.
11150 (i386_set_thread_context): New.
11151 (i386_thread_added): New.
11152 (single_step): Rename to ...
11153 (i386_single_step): ... this.
11154 (do_fetch_inferior_registers): Rename to ...
11155 (i386_fetch_inferior_register): ... this.
11156 (i386_store_inferior_register): New.
11157 (the_low_target): Adapt to new interface.
11158
11159 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
11160 (arm_get_thread_context): New.
11161 (arm_set_thread_context): New.
11162 (regptr): New.
11163 (do_fetch_inferior_registers): Rename to ...
11164 (arm_fetch_inferior_register): ... this.
11165 (arm_store_inferior_register): New.
11166 (arm_wince_breakpoint): Reimplement as unsigned long.
11167 (arm_wince_breakpoint_len): Define.
11168 (the_low_target): Adapt to new interface.
11169
11170 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
11171 load_debug_registers. Add get_thread_context, set_thread_context,
11172 thread_added and store_inferior_register. Rename
11173 fetch_inferior_registers to fetch_inferior_register.
11174 (regptr): Remove declaration.
11175
dd6953e1
PA
111762007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11177
11178 * linux-low.c (linux_detach): Change return type to int. Return 0.
11179 * spu-low.c (spu_detach): Likewise.
11180
444d6139
PA
111812007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11182
11183 * target.h (target_ops): Change return type of detach to int.
11184 Add join.
11185 (join_inferior): New.
11186 * server.c (main): Don't skip detach support on mingw32.
11187 If the inferior doesn't support detaching return error.
11188 Call join_inferior instead of using waitpid.
11189 * linux-low.c (linux_join): New.
11190 (linux_target_op): Add linux_join.
11191 * spu-low.c (spu_join): New.
11192 (spu_target_ops): Add spu_join.
11193 * win32-low.c (win32_detach): Adapt to new interface.
11194 Reopen current_process_handle before detaching. Issue a child
11195 resume before detaching.
11196 (win32_join): New.
11197 (win32_target_op): Add win32_join.
11198
1d5315fe
PA
111992007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11200
11201 * win32-low.c (win32-attach): Fix return value.
11202 * target.h (target_ops): Describe ATTACH return values.
11203
bf914831
PA
112042007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11205
11206 * win32-low.c (GETPROCADDRESS): Define.
11207 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
11208 (winapi_DebugSetProcessKillOnExit): Likewise.
11209 (win32_create_inferior): Force usage of ansi CreateProcessA.
11210 (win32_attach): Use GETPROCADDRESS.
11211 (win32_detach): Likewise.
11212
f72f3e60
PA
112132007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11214
11215 * win32-low.c (win32_wait): Don't use WSTOPSIG.
11216
ed50f18f
PA
112172007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
11218
11219 * win32-low.c: Commit leftover changes from 2007-03-29.
11220
0c2ead7e
DJ
112212007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
11222
11223 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
11224 fields short instead of int. Add explicit padding.
11225 (i387_cache_to_fsave): Remove unnecessary casts.
11226 (i387_fsave_to_cache): Doc fix.
11227 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
11228
73725ff3
DJ
112292007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
11230
11231 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
11232 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
11233
d99f33d8
PA
112342007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
11235
11236 * configure.srv (arm*-*-mingw32ce*): Move near the other
11237 arm targets.
11238
68070c10
PA
112392007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
11240
2482afc6 11241 * configure.ac: Add errno checking.
68070c10
PA
11242 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
11243 sys/file.h and malloc.h.
11244 (AC_CHECK_DECLS): Add perror.
11245 (srv_mingwce): Handle.
2482afc6 11246 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
11247 win32-i386-low.o to srv_tgtobj.
11248 (i[34567]86-*-mingw*): Likewise.
11249 (arm*-*-mingw32ce*): Add case.
11250 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
11251 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
11252 [__MINGW32CE__] (strerror): New function.
11253 [__MINGW32CE__] (errno): Define to GetLastError.
11254 [__MINGW32CE__] (COUNTOF): New macro.
11255 (remote_open): Remove extra close call.
11256 * mem-break.c (delete_breakpoint_at): New function.
11257 * mem-break.h (delete_breakpoint_at): Declare.
11258 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
11259 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
11260 [USE_WIN32API] (read, write): Add char* casts.
11261 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
11262 * server.h: Include wincecompat.h on Windows CE.
11263 [HAVE_ERRNO_H]: Check.
11264 (perror): Declare if not declared.
11265 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
11266 (perror_with_name): Remove errno declaration.
11267 * wincecompat.h: New.
11268 * wincecompat.c: New.
11269 * win32-low.h: New.
11270 * win32-arm-low.c: New.
11271 * win32-i386-low.c: New.
11272 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
11273 (OUTMSG2): Make it safe.
11274 (_T): New macro.
11275 (COUNTOF): New macro.
11276 (NUM_REGS): Get it from the low target.
11277 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
11278 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
11279 (thread_rec): Let low target handle debug registers.
11280 (child_add_thread): Likewise.
11281 (child_init_thread_list): Likewise.
11282 (continue_one_thread): Likewise.
11283 (regptr): New.
11284 (do_child_fetch_inferior_registers): Move to ...
11285 * win32-i386-low.c: ... here, and rename to ...
11286 (do_fetch_inferior_registers): ... this.
889bf7c5 11287 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
11288 Go through the low target.
11289 (do_child_store_inferior_registers): Use regptr.
11290 (strwinerror): New function.
11291 (win32_create_inferior): Handle Windows CE.
11292 Use strwinerror instead of strerror on Windows error
11293 codes. Add program to the error output.
11294 Don't close the main thread handle on Windows CE.
11295 (win32_attach): Use coredll.dll on Windows CE.
11296 (win32_kill): Close current process and current
11297 thread handles.
11298 (win32_detach): Use coredll.dll on Windows CE.
11299 (win32_resume): Let low target handle debug registers, and
11300 step request.
11301 (handle_exception): Add/Remove initial breakpoint. Avoid
11302 non-existant WSTOPSIG on Windows CE.
11303 (win32_read_inferior_memory): Cast to remove warning.
11304 (win32_arch_string): Go through the low target.
11305 (initialize_low): Call set_breakpoint_data with the low
11306 target's breakpoint.
11307 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
11308 FOP_REGNUM, mappings): Move to ...
11309 * win32-i386-low.c: ... here.
11310 * win32-low.c (win32_thread_info): Move to ...
11311 * win32-low.h: ... here.
11312 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
11313 win32-arm-low.c and wincecompat.c.
11314 (all:): Add $EXEEXT.
11315 (install-only:): Likewise.
11316 (gdbserver:): Likewise.
11317 (gdbreplay:): Likewise.
11318 * config.in: Regenerate.
11319 * configure: Regenerate.
11320
41093d81
PA
113212007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
11322
11323 * win32-low.c: Rename typedef thread_info to
11324 win32_thread_info throughout.
11325
544afa54
PA
113262007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
11327
11328 * win32-i386-low.c: Rename to ...
11329 * win32-low.c: ... this.
11330 * configure.srv: Replace win32-i386-low.o with win32-low.o.
11331 * Makefile.in: Likewise.
11332
bce7165d
PA
113332007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
11334
11335 * remote-utils.c (monitor_output): Constify msg parameter.
11336 * server.h (monitor_output): Likewise.
11337 * win32-i386-low.c (handle_output_debug_string): New.
11338 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
11339 handle_output_debug_string.
11340 (get_child_debug_event): Likewise.
11341
506c7aa0
DJ
113422007-03-27 Mat Hostetter <mat@lcs.mit.edu>
11343
11344 * server.c (main): Correct strtoul check.
11345
42c81e2a
DJ
113462007-03-27 Jon Ringle <jon@ringle.org>
11347
11348 * linux-low.c: Check __ARCH_HAS_MMU__ also.
11349
9453113a
DJ
113502007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
11351
11352 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
11353
64a69107
DJ
113542007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
11355
11356 * terminal.h: Check HAVE_SGTTY_H.
11357
113582007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
11359
11360 * remote-utils.c (remote_open): Print out the assigned port number.
11361
c74d0ad8
DJ
113622007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
11363
11364 * remote-utils.c (monitor_output): New function.
11365 * server.c (debug_threads): Define here.
11366 (monitor_show_help): New function.
11367 (handle_query): Handle qRcmd.
11368 (main): Do not handle 'd' packet.
11369 * server.h (debug_threads, remote_debug, monitor_output): Declare.
11370 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
11371 of debug_threads.
11372
de7c3b4a
PA
113732007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11374
11375 * Makefile.in (EXEEXT): New.
11376 (clean): Use $(EXEEXT).
11377
ef57601b
PA
113782007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11379
11380 * target.h (target_ops): Rename send_signal to request_interrupt,
11381 and remove enum target_signal parameter.
11382 * linux-low.c (linux_request_interrupt): Rename from
11383 linux_send_signal, and always send SIGINT.
11384 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
11385 and always send SIGINT.
11386 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
11387 of send_signal.
11388 (input_interrupt): Likewise.
11389
820f2bda
PA
113902007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11391
11392 * server.c (get_features_xml): Check if target implemented
11393 arch_string.
11394 * win32-i386-low.c (win32_arch_string): New.
11395 (win32_target_ops): Add win32_arch_string as arch_string member.
11396
ab39bf24
UW
113972007-02-22 Markus Deuling <deuling@de.ibm.com>
11398
11399 * spu-low.c (spu_arch_string): New.
11400 (spu_target_ops): Add spu_arch_string.
11401
61ff6e04
DJ
114022007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
11403
11404 * remote-utils.c: Remove HAVE_TERMINAL_H check.
11405 * configure.ac: Do not check for terminal.h.
11406 * configure, config.in: Regenerated.
11407
fb1e4ffc
DJ
114082007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
11409
11410 * Makefile.in (OBS): Add $(XML_BUILTIN).
11411 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
11412 (clean): Update.
11413 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
11414 (arm-with-iwmmxt.c): New.
11415 * config.in, configure: Regenerate.
11416 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
11417 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
11418 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
11419 (arm*-*-linux*): Add iWMMXt and regset support.
11420 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
11421 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
11422 (arm_store_wmmxregset, target_regsets): New.
11423 * server.c (get_features_xml): Take annex argument. Check builtin
11424 XML documents.
11425 (handle_query): Handle multiple annexes.
11426
0f48aa01
DJ
114272007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11428
11429 * remote-utils.c [USE_WIN32API] (read, write): Define.
11430 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
11431 write.
11432
23181151
DJ
114332007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
11434
11435 * linux-i386-low.c (the_low_target): Set arch_string.
11436 * linux-x86-64-low.c (the_low_target): Likewise.
11437 * linux-low.c (linux_arch_string): New.
11438 (linux_target_ops): Add it.
11439 * linux-low.h (struct linux_target_ops): Add arch_string.
11440 * server.c (write_qxfer_response): Use const void * for DATA.
11441 (get_features_xml): New.
11442 (handle_query): Handle qXfer:features:read. Report it for qSupported.
11443 * target.h (struct target_ops): Add arch_string method.
11444
9d606399
DJ
114452007-01-03 Denis Pilat <denis.pilat@st.com>
11446 Daniel Jacobowitz <dan@codesourcery.com>
11447
11448 * linux-low.c (linux_kill): Handle being called with no threads.
11449 * win32-i386-low.c (win32_kill): Likewise.
11450 (get_child_debug_event): Clear current_process_handle.
11451
114522006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
11453 Daniel Jacobowitz <dan@codesourcery.com>
11454
11455 * remote-utils.c (remote_open): Check the type of specified
11456 serial port devices before opening them.
11457 * server.c (main): Kill the inferior if an error occurs during
11458 the first remote_open.
11459
a5e13d24
DJ
114602006-12-05 Markus Deuling <deuling@de.ibm.com>
11461
11462 * README: Update supported targets.
11463
186947f7
DJ
114642006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
11465
11466 * Makefile.in (clean): Remove reg-mips64.c.
11467 (reg-mips64.c, reg-mips64.o): New rules.
11468 * configure.srv: Handle mips64. Include regset support for mips.
11469 * linux-mips-low.c (union mips_register): New.
11470 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
11471 (mips_breakpoint, mips_breakpoint_at): Use int.
11472 (mips_collect_register, mips_supply_register)
11473 (mips_collect_register_32bit, mips_supply_register_32bit)
11474 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
11475 (mips_store_fpregset, target_regsets): New.
11476 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
11477
a13e2c95
UW
114782006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
11479
11480 * configure.srv: Add target "spu*-*-*".
11481 * Makefile.in (clean): Remove reg-spu.c.
11482 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
11483 * spu-low.c: New file.
11484
cb7283db
DJ
114852006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
11486
11487 * configure.ac: Correct td_thr_tls_get_addr test.
11488 * configure: Regenerated.
11489
89be2091
DJ
114902006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
11491
11492 * linux-low.c (linux_wait_for_event): Reformat. Use the
11493 pass_signals array.
11494 * remote-utils.c (decode_address_to_semicolon): New.
11495 * server.c (pass_signals, handle_general_set): New.
11496 (handle_query): Mention QPassSignals for qSupported.
11497 (main): Call handle_general_set.
11498 * server.h (pass_signals, decode_address_to_semicolon): New.
11499
000ef4f0
DJ
115002006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
11501
11502 * server.c (handle_query): Correct error handling for read_auxv.
11503
b7149293
UW
115042005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
11505
11506 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
11507 and srv_linux_thread_db to yes.
11508 * linux-s390-low.c (s390_fill_gregset): New function.
11509 (target_regsets): Define data structure.
11510
dae5f5cf
DJ
115112006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
11512
11513 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
11514 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
11515 * config.in, configure: Regenerated.
11516 * inferiors.c (gdb_id_to_thread): New function.
11517 (gdb_id_to_thread_id): Use it.
11518 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
11519 * linux-low.h (struct process_info): Add th member.
11520 (thread_db_get_tls_address): New prototype.
11521 * remote-utils.c (decode_address): Make non-static.
11522 * server.c (handle_query): Handle qGetTLSAddr.
11523 * server.h (gdb_id_to_thread, decode_address): New prototypes.
11524 * target.h (struct target_ops): Add get_tls_address.
11525 * thread-db.c (maybe_attach_thread): Save the thread handle.
11526 (thread_db_get_tls_address): New.
11527
32ca6d61
DJ
115282006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
11529
11530 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
11531 (linux_resume_one_process): Take a siginfo_t *. Update all
11532 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
11533 (struct pending_signals): Add a siginfo_t.
11534 (linux_wait_for_process): Always set last_status.
11535 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
11536 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
11537 * linux-low.h (struct process_info): Add last_status.
11538
5ffff7c1
DJ
115392006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
11540
11541 * remote-utils.c (try_rle): New function.
11542 (putpkt_binary): Use it.
11543
8695c747
DJ
115442006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
11545
11546 * Makefile.in (clean): Clean reg-x86-64-linux.c.
11547 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
11548 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
11549 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
11550 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
11551 point registers.
11552
290fadea
RS
115532006-08-08 Richard Sandiford <richard@codesourcery.com>
11554
11555 * server.c (terminal_fd): New variable.
11556 (old_foreground_pgrp): Likewise.
11557 (restore_old_foreground_pgrp): New function.
11558 (start_inferior): Record the terminal file descriptor in terminal_fd
11559 and its original foreground group in old_foreground_pgrp. Register
11560 restore_old_foreground_pgrp with atexit().
11561
9f2e1e63
DJ
115622006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
11563
11564 * server.c (handle_query): Correct qPart to qXfer.
11565
b80864fb
DJ
115662006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
11567
11568 * configure.ac: Check for more headers which are missing on
11569 Windows. Automatically supply -lwsock32 and USE_WIN32API.
11570 * configure.srv: Add Cygwin and mingw32.
11571 * remote-utils.c: Don't include headers unconditionally which
11572 are missing on mingw32. Include <winsock.h> for mingw32.
11573 (remote_open): Adjust for mingw32 support. Flush
11574 standard error after writing to it.
11575 (remote_close, putpkt_binary, input_interrupt, block_async_io)
11576 (unblock_async_io, enable_async_io, disable_async_io)
11577 (readchar, getpkt): Update for Winsock support.
11578 (prepare_resume_reply): Expect a protocol signal number.
11579 * server.c: Disable <sys/wait.h> on mingw32.
11580 (start_inferior): Adjust for mingw32 support. Flush
11581 standard error after writing to it.
11582 (attach_inferior): Likewise. Use protocol signal
11583 numbers.
11584 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
11585 and names.
11586 * win32-i386-low.c: New file.
11587 * Makefile.in (XM_CLIBS): Set.
11588 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
11589 (win32-i386-low.o): New dependency rule.
11590 * linux-low.c (linux_wait): Use target signal numbers.
11591 * target.h (struct target_ops): Doc fix.
11592 * server.h (target_signal_to_name): New prototype.
11593 * gdbreplay.c: Don't include headers unconditionally which
11594 are missing on mingw32. Include <winsock.h> for mingw32.
11595 (remote_close, remote_open): Adjust for Winsock support.
11596 * configure, config.in: Regenerated.
11597
0876f84a
DJ
115982006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
11599
11600 * server.c (decode_xfer_read, write_qxfer_response): New.
11601 (handle_query): Take a packet length argument. Handle
11602 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
11603 the qSupported response.
11604 (main): Update call to handle_query.
11605
01f9e8fa
DJ
116062006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
11607
11608 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
11609 (putpkt_binary): Renamed from putpkt and adjusted for binary
11610 data.
11611 (putpkt): New wrapper for putpkt_binary.
11612 (readchar): Don't mask off the high bit.
11613 (decode_X_packet): New function.
11614 * server.c (main): Call putpkt_binary if a handler sets the packet
11615 length. Save the length of the incoming packet. Handle 'X'.
11616 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
11617
be2a5f71
DJ
116182006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
11619
11620 * server.c (handle_query): Handle qSupported.
11621
ea025f5f
DJ
116222006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
11623
11624 * remote-utils.c (all_symbols_looked_up): New variable.
11625 (look_up_one_symbol): Check it.
11626 * server.h (look_up_one_symbol): New declaration.
11627 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
11628
9308fc88
DJ
116292006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
11630
11631 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 11632 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
11633 (PTRACE_GET_THREAD_AREA): Define.
11634 (ps_get_thread_area): New function.
11635
52fb6437
NS
116362006-05-09 Nathan Sidwell <nathan@codesourcery.com>
11637
11638 * configure.srv (m68k*-*-uclinux*): New target.
11639 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
11640 (linux_resume_one_process): Remove extraneous cast.
11641 (linux_read_offsets): New.
11642 (linux_target_op): Add linux_read_offsets on mmuless systems.
11643 * server.c (handle_query): Add qOffsets logic.
11644 * target.h (struct target_ops): Add read_offsets.
11645
21b0f40c
DJ
116462006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
11647
11648 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
11649 (PTRACE_GET_THREAD_AREA): Define.
11650 (ps_get_thread_area): New function.
11651 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
11652 (linux-x86-64-low.o): Update.
11653
0050a760
DJ
116542006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
11655
11656 * configure.ac: Remove checks for prfpregset_t.
11657 * gdb_proc_service.h: New file.
11658 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
11659 new "gdb_proc_service.h".
11660 * proc-service.c: Likewise.
11661 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
11662 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
11663 * Makefile.in (gdb_proc_service_h): Updated.
11664 * configure, config.in: Regenerated.
11665
b92a518e
DJ
116662006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
11667
11668 * remote-utils.c (prepare_resume_reply): Move declaration
11669 of gdb_id_from_wait to the top of the block.
11670
545587ee
DJ
116712006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
11672
11673 * linux-low.c (regsets_store_inferior_registers): Read the regset
11674 from the target before filling it.
11675
9db87ebd
DJ
116762006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
11677
11678 * server.c (attach_inferior): Return SIGTRAP for a successful
11679 attach.
11680
dd24457d
DJ
116812006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
11682
11683 * Makefile.in (OBS): Add version.o.
11684 (STAGESTUFF): Delete.
11685 (version.o): Add dependencies.
11686 (version.c): Replace rule.
11687 (clean): Remove version.c.
11688 * server.c (gdbserver_version): New.
11689 (gdbserver_usage): Use printf.
11690 (main): Handle --version and --help.
11691 * server.h (version, host_name): Add declarations.
11692
6f0f660e
EZ
116932005-12-23 Eli Zaretskii <eliz@gnu.org>
11694
889bf7c5
PA
11695 * linux-arm-low.c:
11696 * linux-arm-low.c:
11697 * inferiors.c:
11698 * i387-fp.h:
11699 * i387-fp.c:
11700 * gdbreplay.c:
11701 * regcache.c:
11702 * proc-service.c:
11703 * mem-break.h:
11704 * mem-break.c:
11705 * linux-x86-64-low.c:
11706 * linux-sh-low.c:
11707 * linux-s390-low.c:
11708 * linux-ppc64-low.c:
11709 * linux-ppc-low.c:
11710 * linux-mips-low.c:
11711 * linux-m68k-low.c:
11712 * linux-m32r-low.c:
11713 * linux-low.h:
11714 * linux-low.c:
11715 * linux-ia64-low.c:
11716 * linux-i386-low.c:
11717 * linux-crisv32-low.c:
11718 * thread-db.c:
11719 * terminal.h:
11720 * target.h:
11721 * target.c:
11722 * server.h:
11723 * server.c:
11724 * remote-utils.c:
11725 * regcache.h:
11726 * utils.c:
11727 * Makefile.in:
11728 * configure.ac:
6f0f660e
EZ
11729 * gdbserver.1: Add (C) after Copyright. Update the FSF
11730 address.
11731
9d1fb177
DJ
117322005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
11733
11734 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
11735 (arm_breakpoint_at): Recognize both breakpoints.
11736 (the_low_target): Use the correct breakpoint instruction.
11737
011a70c2
DJ
117382005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
11739
11740 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
11741 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
11742 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
11743 (the_low_target): Update.
11744
7fb85e41
AS
117452005-10-25 Andreas Schwab <schwab@suse.de>
11746
11747 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
11748
11749 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
11750 (ia64_num_regs): Reduce to 462.
11751
3db0444b
DJ
117522005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
11753
11754 * acinclude.m4: Correct quoting.
11755 * aclocal.m4: Regenerated.
11756
11757 Suggested by SZOKOVACS Robert <szo@ies.hu>:
11758 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
11759 (thread_db_init): Call thread_db_err_str.
11760 * configure.ac: Check for TD_VERSION.
11761 * config.in, configure: Regenerated.
11762
bee0189a
DJ
117632005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11764
11765 * server.h (error, fatal, warning): Add ATTR_FORMAT.
11766
e9d25b98
DJ
117672005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
11768
11769 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
11770 is not available. Define HAVE_PTRACE_GETREGS if it is.
11771 * config.in, configure: Regenerated.
11772 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
11773 * linux-i386-low.c, linux-m68k-low.c: Update to use
11774 HAVE_PTRACE_GETREGS.
11775 * linux-low.c (regsets_fetch_inferior_registers)
11776 (regsets_store_inferior_registers): Only return 0 if we processed
11777 GENERAL_REGS.
11778 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
11779 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
11780
a06660f7
DJ
117812005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
11782
11783 * inferiors.c (struct thread_info): Add gdb_id.
11784 (add_thread): Add gdb_id argument.
11785 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
11786 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
11787 calls to add_thread.
11788 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
11789 * server.c (handle_query): Use thread_to_gdb_id.
11790 (handle_v_cont, main): Use gdb_id_to_thread_id.
11791 * server.h (add_thread): Update prototype.
11792 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
11793 prototypes.
11794
5a1f5858
DJ
117952005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
11796
11797 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
11798 left-padded registers.
11799 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
11800 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
11801
e122f1f5
SE
118022005-07-01 Steve Ellcey <sje@cup.hp.com>
11803
11804 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
11805 * configure: Regenerate.
11806 * config.in: Regenerate.
11807 * server.h (NEED_DECLARATION_STRERROR):
11808 Replace with !HAVE_DECL_STRERROR.
11809
d592fa2f
DJ
118102005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
11811
11812 * linux-low.c (linux_wait, linux_send_signal): Don't test
11813 an unsigned long variable for > 0 if it could be MAX_ULONG.
11814 * server.c (myresume): Likewise.
11815 * target.c (set_desired_inferior): Likewise.
11816
ccbd4912
MK
118172005-06-13 Mark Kettenis <kettenis@gnu.org>
11818
11819 * configure.ac: Simplify and improve check for socklen_t.
11820 * configure, config.in: Regenerate.
11821
f450004a
DJ
118222005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
11823
11824 * acconfig.h: Remove.
11825 * configure.ac: Add a test for socklen_t. Use three-argument
11826 AC_DEFINE throughout.
11827 * config.in: Regenerated using autoheader 2.59.
11828 * configure: Regenerated.
11829
11830 * gdbreplay.c (socklen_t): Provide a default.
11831 (remote_open): Use socklen_t.
11832 * remote-utils.c (socklen_t): Provide a default.
11833 (remote_open): Use socklen_t.
11834 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
11835 unsigned char.
11836
11837 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
11838 char for buffers.
11839 * linux-low.c (linux_read_memory, linux_write_memory)
11840 (linux_read_auxv): Likewise.
11841 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
11842 (check_mem_write): Likewise.
11843 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
11844 Likewise.
11845 * regcache.c (struct inferior_rgcache_data, registers_to_string)
11846 (registers_from_string, register_data): Likewise.
11847 * server.c (handle_query, main): Likewise.
11848 * server.h (convert_ascii_to_int, convert_int_to_ascii)
11849 (decode_M_packet): Likewise.
11850 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
11851 * target.h (struct target_ops): Update read_memory, write_memory,
11852 and read_auxv.
11853 (read_inferior_memory, write_inferior_memory): Update.
11854 * linux-low.h (struct linux_target_ops): Change type of breakpoint
11855 to unsigned char *.
11856 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
11857 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
11858 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
11859 linux-s390-low.c, linux-sh-low.c: Update for changes in
11860 read_inferior_memory and the_low_target->breakpoint.
11861
eee84df1
DJ
118622005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
11863
11864 * Makefile.in (SFILES): Add linux-ppc64-low.c.
11865 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
11866 * configure.srv: Add powerpc64-*-linux*.
11867 * linux-ppc64-low.c: New file.
11868
45b134e5
OF
118692005-05-23 Orjan Friberg <orjanf@axis.com>
11870
11871 * linux-cris-low.c: New file with support for CRIS.
11872 * linux-crisv32-low.c: Ditto for CRISv32.
11873 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
11874 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 11875 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
11876 reg-crisv32.o, and reg-crisv32.c to make rules.
11877 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
11878 recognized targets.
11879
48d93c75
UW
118802005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
11881
11882 * linux-low.c (fetch_register): Ensure buffer size is a multiple
11883 of sizeof (PTRACE_XFER_TYPE).
11884 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
11885
e013ee27
OF
118862005-05-12 Orjan Friberg <orjanf@axis.com>
11887
889bf7c5 11888 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
11889 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
11890 pointers for hardware watchpoint support.
11891 * linux-low.h (struct linux_target_ops): Ditto.
11892 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
11893 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
11894 to linux_target_ops.
11895 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
11896 reply packet.
11897 * server.c (main): Recognize 'Z' and 'z' packets.
11898
b0ded00b
UW
118992005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
11900
11901 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
11902 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
11903 (the_low_target): Add new members.
11904
8643e2ad
DJ
119052005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
11906
11907 * proc-service.c (ps_lgetregs): Search all_processes instead of
11908 all_threads.
11909
fc620387
DJ
119102005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
11911
11912 * server.c (start_inferior): Change return type to int.
11913 (attach_inferior): Change sigptr to int *.
11914 (handle_v_cont, handle_v_requests): Change signal to int *.
11915 (main): Change signal to int.
11916
119172005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
11918
11919 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
11920 * configure.srv: Add m32r*-*-linux*.
11921 * linux-m32r-low.c: New file.
11922
e0e76420
DJ
119232005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
11924
11925 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
11926
a1928bad
DJ
119272005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
11928
11929 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
11930 Take unsigned long arguments for PIDs.
11931 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
11932 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
11933 (wait_for_sigstop, linux_resume_one_process)
11934 (regsets_fetch_inferior_registers, linux_send_signal)
11935 (linux_read_auxv): Likewise. Update the types of variables holding
11936 PIDs. Update format string specifiers.
11937 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
11938 * remote-utils.c (prepare_resume_reply): Likewise.
11939 * server.c (cont_thread, general_thread, step_thread)
11940 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
11941 unsigned long.
11942 (handle_query): Update format specifiers.
11943 (handle_v_cont, main): Use strtoul for thread IDs.
11944 * server.h (struct inferior_list_entry): Use unsigned long for ID.
11945 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
11946 (general_thread, step_thread, thread_from_wait)
11947 (old_thread_from_wait): Update.
11948 * target.h (struct thread_resume): Use unsigned long for THREAD.
11949 (struct target_ops): Use unsigned long for arguments to attach and
11950 thread_alive.
11951
dcdb98d2
DJ
119522005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
11953
11954 * acinclude.m4: Include bfd/bfd.m4 directly.
11955 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
11956 <agriffis@toolchain.org>.
11957 * aclocal.m4, configure: Regenerated.
11958
bec39cab
AC
119592005-01-07 Andrew Cagney <cagney@gnu.org>
11960
11961 * configure.ac: Rename configure.in, require autoconf 2.59.
11962 * configure: Re-generate.
11963
434c4c77
DJ
119642004-12-08 Daniel Jacobowitz <dan@debian.org>
11965
11966 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
11967 LIBS when finished.
11968 * aclocal.m4: Regenerated.
11969 * configure: Regenerated.
11970
db1d3e1b
AS
119712004-11-21 Andreas Schwab <schwab@suse.de>
11972
11973 * linux-m68k-low.c (m68k_num_gregs): Define.
11974 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
11975 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
11976 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
11977 (m68k_breakpoint_at): New. Add to the_low_target.
11978
11979 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
11980 srv_linux_thread_db to yes.
11981
43360365
JB
119822004-10-20 Joel Brobecker <brobecker@gnat.com>
11983
11984 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
11985 (ARCH_SET_FS): Likewise.
11986 (ARCH_GET_FS): Likewise.
11987 (ARCH_GET_GS): Likewise.
11988
fd500816
DJ
119892004-10-16 Daniel Jacobowitz <dan@debian.org>
11990
11991 * linux-i386-low.c (ps_get_thread_area): New.
11992 * linux-x86-64-low.c (ps_get_thread_area): New.
11993 * linux-low.c: Include <sys/syscall.h>.
11994 (linux_kill_one_process): Don't kill the first thread here.
11995 (linux_kill): Kill the first thread here.
11996 (kill_lwp): New function.
11997 (send_sigstop, linux_send_signal): Use it.
11998 * proc-service.c: Clean up #ifdefs.
11999 (fpregset_info): Delete.
12000 (ps_lgetregs): Update and enable implementation.
12001 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
12002 implementations.
12003 * remote-utils.c (struct sym_cache, symbol_cache): New.
12004 (input_interrupt): Print a clearer message.
12005 (async_io_enabled): New variable.
12006 (enable_async_io, disable_async_io): Use it. Update comments.
12007 (look_up_one_symbol): Use the symbol cache.
12008 * thread-db.c (thread_db_look_up_symbols): New function.
12009 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
12010
f6de3c42
DJ
120112004-10-16 Daniel Jacobowitz <dan@debian.org>
12012
12013 * configure.in: Test for -rdynamic.
12014 * configure: Regenerated.
12015 * Makefile (INTERNAL_LDFLAGS): New.
12016 (gdbserver, gdbreplay): Use it.
12017
2c0fc042
AC
120182004-09-02 Andrew Cagney <cagney@gnu.org>
12019
12020 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
12021
075b3282
DJ
120222004-03-23 Daniel Jacobowitz <drow@mvista.com>
12023
12024 * linux-low.c (linux_wait): Clear all_processes list also.
12025
fa6a77dc
DJ
120262004-03-12 Daniel Jacobowitz <drow@mvista.com>
12027
12028 * linux-low.c: Include <errno.h>. Remove extern declaration of
12029 errno.
12030
6d782a97
DJ
120312004-03-12 Daniel Jacobowitz <drow@mvista.com>
12032
12033 * gdbreplay.c, server.h, utils.c: Update copyright years.
12034
3a7fb99b
DJ
120352004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
12036
12037 * server.c (main): Print child status or termination signal from
12038 variable 'signal', not 'sig'.
12039
c3e735a6
DJ
120402004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
12041
12042 * linux-low.c (linux_read_memory): Change return type to
12043 int. Check for and return error from ptrace().
12044 * target.c (read_inferior_memory): Change return type to int. Pass
12045 back return status from the_target->read_memory().
12046 * target.h (struct target_ops): Adapt *read_memory() prototype.
12047 Update comment.
12048 (read_inferior_memory): Adapt prototype.
12049 * server.c (main): Return an error packet if
12050 read_inferior_memory() returns an error.
12051
a59d1c82
DJ
120522004-03-04 Daniel Jacobowitz <drow@mvista.com>
12053
12054 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
12055 Unify with other clean targets.
12056
dc3f8883
DJ
120572004-02-29 Daniel Jacobowitz <drow@mvista.com>
12058
12059 * server.c (handle_v_cont): Call set_desired_inferior.
12060
89a208da
DJ
120612004-02-29 Daniel Jacobowitz <drow@mvista.com>
12062
12063 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
12064
62ea82f5
DJ
120652004-02-29 Daniel Jacobowitz <drow@mvista.com>
12066
12067 * linux-low.c (linux_wait): Unblock async I/O.
12068 (linux_resume): Block and enable async I/O.
12069 * remote-utils.c (block_async_io, unblock_async_io): New functions.
12070 * server.h (block_async_io, unblock_async_io): Add prototypes.
12071
6910d122
DJ
120722004-02-29 Daniel Jacobowitz <drow@mvista.com>
12073
12074 * remote-utils.c (remote_open): Print a status notice after
12075 opening a TCP port.
12076 * server.c (attach_inferior): Print a status notice after
12077 attaching.
12078
120792004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
12080
12081 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
12082
c89dc5d4
DJ
120832004-02-26 Daniel Jacobowitz <drow@mvista.com>
12084
12085 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
12086 error packet.
12087 * server.c, target.h: Update copyright years.
12088
4b8dad4a
RM
120892004-02-25 Roland McGrath <roland@redhat.com>
12090
12091 * target.h (struct target_ops): New member `read_auxv'.
12092 * server.c (handle_query): Handle qPart:auxv:read: query using that.
12093 * linux-low.c (linux_read_auxv): New function.
12094 (linux_target_ops): Initialize `read_auxv' member to that.
12095
d7446758
JB
120962004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
12097
12098 Committed by Jim Blandy <jimb@redhat.com>.
12099
12100 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 12101 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
12102 instead of GPR_SIZE to distiguish s390 and s390x targets.
12103
5544ad89
DJ
121042004-01-31 Daniel Jacobowitz <drow@mvista.com>
12105
12106 * linux-low.c: Update copyright year.
12107 (check_removed_breakpoint): Clear pending_is_breakpoint.
12108 (linux_set_resume_request, linux_queue_one_thread)
12109 (resume_status_pending_p): New functions.
12110 (linux_continue_one_thread): Use process->resume.
12111 (linux_resume): Only resume threads if there are no pending events.
12112 * linux-low.h (struct process_info): Add resume request
12113 pointer.
12114
2a68b70e
DJ
121152004-01-30 Daniel Jacobowitz <drow@mvista.com>
12116
12117 * regcache.c (new_register_cache): Clear the allocated register
12118 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
12119
64386c31
DJ
121202003-10-13 Daniel Jacobowitz <drow@mvista.com>
12121
12122 * linux-low.c (linux_resume): Take a struct thread_resume *
12123 argument.
12124 (linux_wait): Update call.
12125 (resume_ptr): New static variable.
12126 (linux_continue_one_thread): Renamed from
12127 linux_continue_one_process. Use resume_ptr.
12128 (linux_resume): Use linux_continue_one_thread.
12129 * server.c (handle_v_cont, handle_v_requests): New functions.
12130 (myresume): New function.
12131 (main): Handle 'v' case.
12132 * target.h (struct thread_resume): New type.
12133 (struct target_ops): Change argument of "resume" to struct
12134 thread_resume *.
12135 (myresume): Delete macro.
12136
c938e9b0
L
121372003-08-08 H.J. Lu <hongjiu.lu@intel.com>
12138
12139 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
12140 (uninstall): Support DESTDIR.
12141
7f313d07
BC
12142Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
12143
12144 * configure.srv: Add xscale*linux copy of arm*linux entry.
12145
3b2fc2ea
DJ
121462003-07-24 Daniel Jacobowitz <drow@mvista.com>
12147
12148 * linux-arm-low.c (arm_reinsert_addr): New function.
12149 (the_low_target): Add arm_reinsert_addr.
12150
1c0a559e
MK
121512003-07-08 Mark Kettenis <kettenis@gnu.org>
12152
12153 * mem-break.c: Remove whitespace at end of file.
12154
43d5792c
DJ
121552003-06-28 Daniel Jacobowitz <drow@mvista.com>
12156
12157 * configure.in: Check whether we need to prototype strerror.
12158 * server.h: Optionally prototype strerror.
12159 * gdbreplay.c (perror_with_name): Use strerror.
12160 * linux-low.c (linux_attach_lwp): Use strerror.
12161 * utils.c (perror_with_name): Use strerror.
12162 * config.in, configure: Regenerated.
12163
c8a86edf
DJ
121642003-06-28 Daniel Jacobowitz <drow@mvista.com>
12165
12166 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
12167 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
12168
73d37363
DJ
121692003-06-20 Daniel Jacobowitz <drow@mvista.com>
12170
12171 * Makefile.in (SFILES): Update.
12172 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
12173 low-sun3.c: Remove files.
12174
6ad8ae5c
DJ
121752003-06-17 Daniel Jacobowitz <drow@mvista.com>
12176
12177 * linux-low.c: Move comment to linux_thread_alive where it belonged.
12178 (linux_detach_one_process, linux_detach): New functions.
12179 (linux_target_ops): Add linux_detach.
12180 * server.c (main): Handle 'D' packet.
12181 * target.h (struct target_ops): Add "detach" member.
12182 (detach_inferior): Define.
12183
1581182a
MK
121842003-06-13 Mark Kettenis <kettenis@gnu.org>
12185
12186 From Kelley Cook <kelleycook@wideopenwest.com>:
12187 * configure.srv: Accept i[34567]86 variants.
12188
e5379b03
DJ
121892003-06-05 Daniel Jacobowitz <drow@mvista.com>
12190
12191 * linux-low.c (linux_wait_for_event): Correct comment typos.
12192 (linux_resume_one_process): Call check_removed_breakpoint.
12193 (linux_send_signal): New function.
12194 (linux_target_ops): Add linux_send_signal.
12195 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
12196 of kill.
12197 * target.h (struct target_ops): Add send_signal.
12198
2ff29de4
JB
121992003-05-29 Jim Blandy <jimb@redhat.com>
12200
12201 * linux-low.c (usr_store_inferior_registers): Transfer buf in
12202 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
12203 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
12204 away part of the register's value.
12205
254787d4
DJ
122062003-03-26 Daniel Jacobowitz <drow@mvista.com>
12207
12208 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
12209 (linux_wait_for_event, linux_init_signals): Likewise.
12210
94e10508
DJ
122112003-03-17 Daniel Jacobowitz <drow@mvista.com>
12212
12213 * configure.in: Check for stdlib.h.
12214 * configure: Regenerated.
12215 * config.in: Regenerated.
12216
4c0711e0
DJ
122172003-01-04 Andreas Schwab <schwab@suse.de>
12218
12219 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
12220
ef66e766
AC
122212003-01-02 Andrew Cagney <ac131313@redhat.com>
12222
12223 * Makefile.in: Remove obsolete code.
12224
a1358604
DJ
122252002-11-20 Daniel Jacobowitz <drow@mvista.com>
12226
12227 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
12228 defined(PT_FPR0_HI).
12229
23ce3b1c
DJ
122302002-11-17 Stuart Hughes <seh@zee2.com>
12231
12232 * linux-arm-low.c (arm_num_regs): Increase.
12233 (arm_regmap): Include status register.
12234
122352002-11-17 Daniel Jacobowitz <drow@mvista.com>
12236
12237 * linux-low.c (register_addr): Remove incorrect -1 check.
12238
a9fa9f7d
DJ
122392002-08-29 Daniel Jacobowitz <drow@mvista.com>
12240
12241 * linux-low.c (linux_create_inferior): Call setpgid. Return
12242 the new PID.
12243 (unstopped_p, linux_signal_pid): Remove.
12244 (linux_target_ops): Remove linux_signal_pid.
12245 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
12246 global instead of target method.
12247 * target.h (struct target_ops): Remove signal_pid. Update comment
12248 for create_inferior.
12249 * server.c (signal_pid): New variable.
12250 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 12251 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
12252 (attach_inferior): Set signal_pid.
12253
17574093
DJ
122542002-08-23 Daniel Jacobowitz <drow@mvista.com>
12255
12256 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
12257
122582002-08-20 Jim Blandy <jimb@redhat.com>
12259
12260 * Makefile.in (LDFLAGS): Allow the configure script to establish a
12261 default for this.
12262
122632002-08-01 Andrew Cagney <cagney@redhat.com>
12264
12265 * Makefile.in: Make chill references obsolete.
12266
122672002-07-24 Kevin Buettner <kevinb@redhat.com>
12268
12269 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
12270 * configure: Regenerate.
12271 * config.in: Regenerate.
12272
122732002-07-09 David O'Brien <obrien@FreeBSD.org>
12274
12275 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
12276 (perror_with_name, remote_close, remote_open, expect, play): Static.
12277
122782002-07-04 Michal Ludvig <mludvig@suse.cz>
12279
4b8dad4a 12280 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
12281 byte offsets instead of an array of indexes.
12282 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
12283
122842002-06-13 Daniel Jacobowitz <drow@mvista.com>
12285
12286 * regcache.c: Add comment.
12287
122882002-06-11 Daniel Jacobowitz <drow@mvista.com>
12289
12290 * thread-db.c: New file.
12291 * proc-service.c: New file.
12292 * acinclude.m4: New file.
12293 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
12294 proc-service.o, and thread-db.o.
12295 (linux-low.o): Add USE_THREAD_DB.
12296 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
12297 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
12298 * aclocal.m4: Regenerated.
12299 * config.in: Regenerated.
12300 * configure: Regenerated.
12301 * configure.in: Check for proc_service.h, sys/procfs.h,
12302 thread_db.h, and linux/elf.h headrs.
12303 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
12304 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
12305 Check for -lthread_db and thread support.
12306 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
12307 PowerPC, and SuperH.
12308 * i387-fp.c: Constify arguments.
12309 * i387-fp.h: Likewise.
12310 * inferiors.c: (struct thread_info): Renamed from
12311 `struct inferior_info'. Remove PID member. Use generic inferior
12312 list header. All uses updated.
12313 (inferiors, signal_pid): Removed.
12314 (all_threads): New variable.
12315 (get_thread): Define.
12316 (add_inferior_to_list): New function.
12317 (for_each_inferior): New function.
12318 (change_inferior_id): New function.
12319 (add_inferior): Removed.
12320 (remove_inferior): New function.
12321 (add_thread): New function.
12322 (free_one_thread): New function.
12323 (remove_thread): New function.
12324 (clear_inferiors): Use for_each_inferior and free_one_thread.
12325 (find_inferior): New function.
12326 (find_inferior_id): New function.
12327 (inferior_target_data): Update argument type.
12328 (set_inferior_target_data): Likewise.
12329 (inferior_regcache_data): Likewise.
12330 (set_inferior_regcache_data): Likewise.
12331 * linux-low.c (linux_bp_reinsert): Remove.
12332 (all_processes, stopping_threads, using_thrads)
12333 (struct pending_signals, debug_threads, pid_of): New.
12334 (inferior_pid): Replace with macro.
12335 (struct inferior_linux_data): Remove.
12336 (get_stop_pc, add_process): New functions.
12337 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
12338 Use add_process and add_thread.
12339 (linux_attach_lwp): New function, based on old linux_attach. Use
12340 add_process and add_thread. Set stop_expected for new threads.
12341 (linux_attach): New function.
12342 (linux_kill_one_process): New function.
12343 (linux_kill): Kill all LWPs.
12344 (linux_thread_alive): Use find_inferior_id.
12345 (check_removed_breakpoints, status_pending_p): New functions.
12346 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
12347 Update. Use WNOHANG. Wait for cloned processes also. Update process
12348 struct for the found process.
12349 (linux_wait_for_event): New function.
12350 (linux_wait): Use it. Support LWPs.
12351 (send_sigstop, wait_for_sigstop, stop_all_processes)
12352 (linux_resume_one_process, linux_continue_one_process): New functions.
12353 (linux_resume): Support LWPs.
12354 (REGISTER_RAW_SIZE): Remove.
12355 (fetch_register): Use register_size instead. Call supply_register.
12356 (usr_store_inferior_registers): Likewise. Call collect_register.
12357 Fix recursive case.
12358 (regsets_fetch_inferior_registers): Improve error message.
12359 (regsets_store_inferior_registers): Add debugging.
12360 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
12361 (unstopped_p, linux_signal_pid): New functions.
12362 (linux_target_ops): Add linux_signal_pid.
12363 (linux_init_signals): New function.
12364 (initialize_low): Call it. Initialize using_threads.
12365 * regcache.c (inferior_regcache_data): Add valid
12366 flag.
12367 (get_regcache): Fetch registers lazily. Add fetch argument
12368 and update all callers.
12369 (regcache_invalidate_one, regcache_invalidate): New
12370 functions.
12371 (new_register_cache): Renamed from create_register_cache.
12372 Return the new regcache.
12373 (free_register_cache): Change argument to a void *.
12374 (registers_to_string, registers_from_string): Call get_regcache
12375 with fetch flag set.
12376 (register_data): Make static. Pass fetch flag to get_regcache.
12377 (supply_register): Call get_regcache with fetch flag clear.
12378 (collect_register): Call get_regcache with fetch flag set.
12379 (collect_register_as_string): New function.
12380 * regcache.h: Update.
12381 * remote-utils.c (putpkt): Flush after debug output and use
12382 stderr.
12383 Handle input interrupts while waiting for an ACK.
12384 (input_interrupt): Use signal_pid method.
12385 (getpkt): Flush after debug output and use stderr.
12386 (outreg): Use collect_register_as_string.
12387 (new_thread_notify, dead_thread_notify): New functions.
12388 (prepare_resume_reply): Check using_threads. Set thread_from_wait
12389 and general_thread.
12390 (look_up_one_symbol): Flush after debug output.
12391 * server.c (step_thread, server_waiting): New variables.
12392 (start_inferior): Don't use signal_pid. Update call to mywait.
12393 (attach_inferior): Update call to mywait.
12394 (handle_query): Handle qfThreadInfo and qsThreadInfo.
12395 (main): Don't fetch/store registers explicitly. Use
12396 set_desired_inferior. Support proposed ``Hs'' packet. Update
12397 calls to mywait.
12398 * server.h: Update.
12399 (struct inferior_list, struct_inferior_list_entry): New.
12400 * target.c (set_desired_inferior): New.
12401 (write_inferior_memory): Constify.
12402 (mywait): New function.
12403 * target.h: Update.
12404 (struct target_ops): New signal_pid method.
12405 (mywait): Removed macro, added prototype.
12406
12407 * linux-low.h (regset_func): Removed.
12408 (regset_fill_func, regset_store_func): New.
12409 (enum regset_type): New.
12410 (struct regset_info): Add type field. Use new operation types.
12411 (struct linux_target_ops): stop_pc renamed to get_pc.
12412 Add decr_pc_after_break and breakpoint_at.
12413 (get_process, get_thread_proess, get_process_thread)
12414 (strut process_info, all_processes, linux_attach_lwp)
12415 (thread_db_init): New.
12416
12417 * linux-arm-low.c (arm_get_pc, arm_set_pc,
12418 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
12419 (the_low_target): Add new members.
12420 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
12421 (i386_store_fpxregset): Constify.
12422 (target_regsets): Add new kind identifier.
12423 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
12424 (i386_set_pc): Add debugging.
12425 (i386_breakpoint_at): New function.
12426 (the_low_target): Add new members.
12427 * linux-mips-low.c (mips_get_pc, mips_set_pc)
12428 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
12429 (mips_breakpoint_at): New.
12430 (the_low_target): Add new members.
12431 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
12432 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
12433 (the_low_target): Add new members.
12434 * linux-sh-low.c (sh_get_pc, sh_set_pc)
12435 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
12436 (the_low_target): Add new members.
12437 * linux-x86-64-low.c (target_regsets): Add new kind
12438 identifier.
12439
124402002-05-15 Daniel Jacobowitz <drow@mvista.com>
12441
12442 From Martin Pool <mbp@samba.org>:
12443 * server.c (gdbserver_usage): New function.
12444 (main): Call it.
12445
124462002-05-14 Daniel Jacobowitz <drow@mvista.com>
12447
12448 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
12449 stop_at -> stop_pc.
12450
124512002-05-04 Andrew Cagney <ac131313@redhat.com>
12452
12453 * Makefile.in: Remove obsolete code.
12454
124552002-04-24 Michal Ludvig <mludvig@suse.cz>
12456
12457 * linux-low.c (regsets_fetch_inferior_registers),
12458 (regsets_store_inferior_registers): Removed cast to int from
12459 ptrace() calls.
12460 * regcache.h: Added declaration of struct inferior_info.
12461
124622002-04-20 Daniel Jacobowitz <drow@mvista.com>
12463
12464 * inferiors.c (struct inferior_info): Add regcache_data.
12465 (add_inferior): Call create_register_cache.
12466 (clear_inferiors): Call free_register_cache.
12467 (inferior_regcache_data, set_inferior_regcache_data): New functions.
12468 * regcache.c (struct inferior_regcache_data): New.
12469 (registers): Remove.
12470 (get_regcache): New function.
12471 (create_register_cache, free_register_cache): New functions.
12472 (set_register_cache): Don't initialize the register cache here.
12473 (registers_to_string, registers_from_string, register_data): Call
12474 get_regcache.
12475 * regcache.h: Add prototypes.
12476 * server.h: Likewise.
12477
124782002-04-20 Daniel Jacobowitz <drow@mvista.com>
12479
12480 * mem-break.c: New file.
12481 * mem-break.h: New file.
12482 * Makefile.in: Add mem-break.o rule; update server.h
12483 dependencies.
12484 * inferiors.c (struct inferior_info): Add target_data
12485 member.
12486 (clear_inferiors): Free target_data member if set.
12487 (inferior_target_data, set_inferior_target_data): New functions.
12488 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
12489 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
12490 * linux-low.c (linux_bp_reinsert): New variable.
12491 (struct inferior_linux_data): New.
12492 (linux_create_inferior): Use set_inferior_target_data.
12493 (linux_attach): Likewise. Call add_inferior.
12494 (linux_wait_for_one_inferior): New function.
12495 (linux_wait): Call it.
12496 (linux_write_memory): Add const.
12497 (initialize_low): Call set_breakpoint_data.
12498 * linux-low.h (struct linux_target_ops): Add breakpoint
12499 handling members.
12500 * server.c (attach_inferior): Remove extra add_inferior
12501 call.
12502 * server.h: Include mem-break.h. Update inferior.c
12503 prototypes.
12504 * target.c (read_inferior_memory)
12505 (write_inferior_memory): New functions.
12506 * target.h (read_inferior_memory)
12507 (write_inferior_memory): Change macros to prototypes.
12508 (struct target_ops): Update comments. Add const to write_memory
12509 definition.
12510
125112002-04-11 Daniel Jacobowitz <drow@mvista.com>
12512
12513 * linux-low.c (usr_store_inferior_registers): Support
12514 registers which are allowed to fail to store.
12515 * linux-low.h (linux_target_ops): Likewise.
12516 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
12517 (ppc_cannot_store_register): FPSCR may not be storable.
12518
125192002-04-09 Daniel Jacobowitz <drow@mvista.com>
12520
12521 * server.h: Include <string.h> if HAVE_STRING_H.
12522 * ChangeLog: Correct paths in last ChangeLog entry.
12523
125242002-04-09 Daniel Jacobowitz <drow@mvista.com>
12525
12526 * linux-low.h: Remove obsolete prototypes.
12527 (struct linux_target_ops): New.
12528 (extern the_low_target): New.
12529 * linux-low.c (num_regs, regmap): Remove declarations.
12530 (register_addr): Use the_low_target explicitly.
12531 (fetch_register): Likewise.
12532 (usr_fetch_inferior_registers): Likewise.
12533 (usr_store_inferior_registers): Likewise.
12534 * linux-arm-low.c (num_regs): Remove.
12535 (arm_num_regs): Define.
12536 (arm_regmap): Renamed from regmap, made static.
12537 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
12538 made static.
12539 (arm_cannot_store_register): Renamed from cannot_store_register,
12540 made static.
12541 (the_low_target): New.
12542 * linux-i386-low.c (num_regs): Remove.
12543 (i386_num_regs): Define.
12544 (i386_regmap): Renamed from regmap, made static.
12545 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
12546 made static.
12547 (i386_cannot_store_register): Renamed from cannot_store_register,
12548 made static.
12549 (the_low_target): New.
12550 * linux-ia64-low.c (num_regs): Remove.
12551 (ia64_num_regs): Define.
12552 (ia64_regmap): Renamed from regmap, made static.
12553 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
12554 made static.
12555 (ia64_cannot_store_register): Renamed from cannot_store_register,
12556 made static.
12557 (the_low_target): New.
12558 * linux-m68k-low.c (num_regs): Remove.
12559 (m68k_num_regs): Define.
12560 (m68k_regmap): Renamed from regmap, made static.
12561 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
12562 made static.
12563 (m68k_cannot_store_register): Renamed from cannot_store_register,
12564 made static.
12565 (the_low_target): New.
12566 * linux-mips-low.c (num_regs): Remove.
12567 (mips_num_regs): Define.
12568 (mips_regmap): Renamed from regmap, made static.
12569 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
12570 made static.
12571 (mips_cannot_store_register): Renamed from cannot_store_register,
12572 made static.
12573 (the_low_target): New.
12574 * linux-ppc-low.c (num_regs): Remove.
12575 (ppc_num_regs): Define.
12576 (ppc_regmap): Renamed from regmap, made static.
12577 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
12578 made static.
12579 (ppc_cannot_store_register): Renamed from cannot_store_register,
12580 made static.
12581 (the_low_target): New.
12582 * linux-s390-low.c (num_regs): Remove.
12583 (s390_num_regs): Define.
12584 (s390_regmap): Renamed from regmap, made static.
12585 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
12586 made static.
12587 (s390_cannot_store_register): Renamed from cannot_store_register,
12588 made static.
12589 (the_low_target): New.
12590 * linux-sh-low.c (num_regs): Remove.
12591 (sh_num_regs): Define.
12592 (sh_regmap): Renamed from regmap, made static.
12593 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
12594 made static.
12595 (sh_cannot_store_register): Renamed from cannot_store_register,
12596 made static.
12597 (the_low_target): New.
12598 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
12599 (the_low_target): New.
12600
126012002-04-09 Daniel Jacobowitz <drow@mvista.com>
12602
12603 * Makefile.in: Add stamp-h target.
12604 * configure.in: Create stamp-h.
12605 * configure: Regenerated.
12606
126072002-04-09 Daniel Jacobowitz <drow@mvista.com>
12608
12609 * inferiors.c: New file.
12610 * target.c: New file.
12611 * target.h: New file.
12612 * Makefile.in: Add target.o and inferiors.o. Update
12613 dependencies.
12614 * linux-low.c (inferior_pid): New static variable,
12615 moved from server.c.
12616 (linux_create_inferior): Renamed from create_inferior.
12617 Call add_inferior. Return 0 on success instead of a PID.
12618 (linux_attach): Renamed from myattach.
12619 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
12620 (linux_thread_alive): Renamed from mythread_alive.
12621 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
12622 child dies.
12623 (linux_resume): Renamed from myresume. Add missing ``return 0''.
12624 (regsets_store_inferior_registers): Correct error message.
12625 Add missing ``return 0''.
12626 (linux_fetch_registers): Renamed from fetch_inferior_registers.
12627 (linux_store_registers): Renamed from store_inferior_registers.
12628 (linux_read_memory): Renamed from read_inferior_memory.
12629 (linux_write_memory): Renamed from write_inferior_memory.
12630 (linux_target_ops): New structure.
12631 (initialize_low): Call set_target_ops ().
12632 * remote-utils.c (unhexify): New function.
12633 (hexify): New function.
12634 (input_interrupt): Send signals to ``signal_pid''.
12635 * server.c (inferior_pid): Remove.
12636 (start_inferior): Update create_inferior call.
12637 (attach_inferior): Call add_inferior.
12638 (handle_query): New function.
12639 (main): Call handle_query for `q' packets.
12640 * server.h: Include "target.h". Remove obsolete prototypes.
12641 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
12642
126432002-04-09 Daniel Jacobowitz <drow@mvista.com>
12644
12645 * Makefile.in: Add WARN_CFLAGS. Update configury
12646 dependencies.
12647 * configure.in: Check for <string.h>
12648 * configure: Regenerate.
12649 * config.in: Regenerate.
12650 * gdbreplay.c: Include needed system headers.
12651 (remote_open): Remove strchr prototype.
12652 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
12653 * regcache.c (supply_register): Change buf argument to const void *.
12654 (supply_register_by_name): Likewise.
12655 (collect_register): Change buf argument to void *.
12656 (collect_register_by_name): Likewise.
12657 * regcache.h: Add missing prototypes.
12658 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
12659 * server.c (handle_query): New function.
12660 (attached): New static variable, moved out of main.
12661 (main): Quiet longjmp clobber warnings.
12662 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
12663 * utils.c (error): Remove NORETURN.
12664 (fatal): Likewise.
This page took 1.523792 seconds and 4 git commands to generate.