]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/gdbserver/ChangeLog
Add/adjust casts in gdbserver's proc-service
[thirdparty/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
b42945fd
SM
12015-10-29 Simon Marchi <simon.marchi@ericsson.com>
2
3 * proc-service.c (ps_pdread): Add/adjust casts.
4 (ps_pdwrite): Add/adjust casts.
5
d6f85c84
SM
62015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
7
8 * server.c (handle_search_memory_1): Cast return value of
9 memmem.
10
f98cd059
SM
112015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
12
13 * server.c (write_qxfer_response): Change type of data to
14 gdb_byte *.
15
d2412fa5
PA
162015-10-29 Pedro Alves <palves@redhat.com>
17
18 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
19
c17414a2
PA
202015-10-29 Pedro Alves <palves@redhat.com>
21
22 * tracepoint.c (clear_installed_tracepoints): Add casts.
23
e053fbc4
PA
242015-10-29 Pedro Alves <palves@redhat.com>
25
26 * server.c (handle_v_cont, process_serial_event): Add enum
27 gdb_signal casts to signal parsing code.
28
add67df8
PA
292015-10-29 Pedro Alves <palves@redhat.com>
30
31 * linux-low.h (NULL_REGSET): Define.
32 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
33 * linux-arm-low.c (arm_regsets): Likewise.
34 * linux-crisv32-low.c (cris_regsets): Likewise.
35 * linux-m68k-low.c (m68k_regsets): Likewise.
36 * linux-mips-low.c (mips_regsets): Likewise.
37 * linux-nios2-low.c (nios2_regsets): Likewise.
38 * linux-ppc-low.c (ppc_regsets): Likewise.
39 * linux-s390-low.c (s390_regsets): Likewise.
40 * linux-sh-low.c (sh_regsets): Likewise.
41 * linux-sparc-low.c (sparc_regsets): Likewise.
42 * linux-tic6x-low.c (tic6x_regsets): Likewise.
43 * linux-tile-low.c (tile_regsets): Likewise.
44 * linux-x86-low.c (x86_regsets): Likewise.
45 * linux-xtensa-low.c (xtensa_regsets): Likewise.
46
50bc912a
PA
472015-10-29 Pedro Alves <palves@redhat.com>
48
49 * linux-low.h (NULL_REGSET): Define.
50 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
51 * linux-arm-low.c (arm_regsets): Likewise.
52 * linux-crisv32-low.c (cris_regsets): Likewise.
53 * linux-m68k-low.c (m68k_regsets): Likewise.
54 * linux-mips-low.c (mips_regsets): Likewise.
55 * linux-nios2-low.c (nios2_regsets): Likewise.
56 * linux-ppc-low.c (ppc_regsets): Likewise.
57 * linux-s390-low.c (s390_regsets): Likewise.
58 * linux-sh-low.c (sh_regsets): Likewise.
59 * linux-sparc-low.c (sparc_regsets): Likewise.
60 * linux-tic6x-low.c (tic6x_regsets): Likewise.
61 * linux-tile-low.c (tile_regsets): Likewise.
62 * linux-x86-low.c (x86_regsets): Likewise.
63 * linux-xtensa-low.c (xtensa_regsets): Likewise.
64
682b2546
DE
652015-10-26 Doug Evans <dje@google.com>
66
67 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
68
963843d4
DE
692015-10-26 Doug Evans <dje@google.com>
70
71 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
72
d41401ac
DE
732015-10-26 Doug Evans <dje@google.com>
74
75 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
76 for debug_printf.
77 (attach_thread, find_new_threads_callback): Ditto.
78
3db28855
AT
792015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
80
81 * mem-break.h (set_breakpoint_data): Remove.
82
fb78e89c
AT
832015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
84
85 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
86 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
87 (initialize_low): Remove set_breakpoint_data call.
88 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
89 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
90 (initialize_low): Remove set_breakpoint_data call.
91 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
92 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
93 (initialize_low): Remove set_breakpoint_data call.
94
2e6ee069
AT
952015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
96
97 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
98 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
99 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
100 * target.h (target_breakpoint_kind_from_pc): New macro.
101
1652a986
AT
1022015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
103
104 * linux-low.c (default_breakpoint_kind_from_pc): New function.
105 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
106 the default breakpoint kind.
107
abeead09
AT
1082015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
109
110 * linux-arm-low.c (arm_supports_z_point_type): Add software
111 breakpoint support.
112
b0b4b501
AT
1132015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
114
115 * linux-arm-low.c: Refactor breakpoint definitions.
116 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
117 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
118
8689682c
AT
1192015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
120
121 * Makefile.in: Add arm.c/o.
122 * configure.srv: Likewise.
123 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
124 (arm_breakpoint_kind_from_pc): New function.
125 (arm_sw_breakpoint_from_kind): Return proper kind.
126 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
127
27165294
AT
1282015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
129
130 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
131 removal.
132 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
133 (struct raw_breakpoint) <size>: Remove.
134 (struct raw_breakpoint) <kind>: Add.
135 (bp_size): New function.
136 (bp_opcode): Likewise.
137 (find_raw_breakpoint_at): Adjust for kind.
138 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
139 (remove_memory_breakpoint): Adjust for kind call bp_size.
140 (set_raw_breakpoint_at): Adjust for kind.
141 (set_breakpoint): Likewise.
142 (set_breakpoint_at): Call breakpoint_kind_from_pc.
143 (delete_raw_breakpoint): Adjust for kind.
144 (delete_breakpoint): Likewise.
145 (find_gdb_breakpoint): Likewise.
146 (set_gdb_breakpoint_1): Likewise.
147 (set_gdb_breakpoint): Likewise.
148 (delete_gdb_breakpoint_1): Likewise.
149 (delete_gdb_breakpoint): Likewise.
150 (uninsert_raw_breakpoint): Likewise.
151 (reinsert_raw_breakpoint): Likewise.
152 (set_breakpoint_data): Remove.
153 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
154 (check_mem_read): Adjust for kind call bp_size.
155 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
156 (clone_one_breakpoint): Adjust for kind.
157 * mem-break.h (set_gdb_breakpoint): Likewise.
158 (delete_gdb_breakpoint): Likewise.
159 * server.c (process_serial_event): Likewise.
160
dd373349
AT
1612015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
162
163 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
164 (struct linux_target_ops) <breakpoint>: Remove.
165 (struct linux_target_ops) <breakpoint_len>: Remove.
166 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
167 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
168 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
169 (arm_sw_breakpoint_from_kind): New function.
170 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
171 (struct linux_target_ops) <breakpoint>: Remove.
172 (struct linux_target_ops) <breakpoint_len>: Remove.
173 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
174 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
175 * linux-cris-low.c (cris_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-crisv32-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-low.c (linux_wait_1): Call breakpoint_kind_from_pc
186 and sw_breakpoint_from_kind to increment the pc.
187 (linux_breakpoint_kind_from_pc): New function.
188 (linux_sw_breakpoint_from_kind): New function.
189 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
190 (initialize_low): Call breakpoint_kind_from_pc and
191 sw_breakpoint_from_kind to replace breakpoint_data/len.
192 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
193 New field.
194 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
195 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
196 (struct linux_target_ops) <breakpoint>: Remove.
197 (struct linux_target_ops) <breakpoint_len>: Remove.
198 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
199 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
200 * linux-m68k-low.c (m68k_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-mips-low.c (mips_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-nios2-low.c (nios2_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-ppc-low.c (ppc_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-s390-low.c (s390_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-sh-low.c (sh_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-sparc-low.c (sparc_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-tic6x-low.c (tic6x_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-tile-low.c (tile_sw_breakpoint_from_kind): New function.
241 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
242 (struct linux_target_ops) <breakpoint>: Remove.
243 (struct linux_target_ops) <breakpoint_len>: Remove.
244 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
245 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
246 * linux-xtensa-low.c (xtensa_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
4cd98a19
AT
2522015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
253
254 * linux-cris-low.c (cris_get_pc): Remove void arg.
255
774ee6d2
AR
2562015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
257
258 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
259 variable name.
260
833dcd29
AR
2612015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
262
263 * inferiors.c (thread_pid_matches_callback): New function.
264 (find_thread_process): New function.
265 (remove_thread): Reset current_thread.
266 (remove_process): Assert threads have been removed first.
267
8d689ee5
YQ
2682015-10-15 Yao Qi <yao.qi@linaro.org>
269
270 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
271 if it is 3.
272 (aarch64_remove_point): Likewise.
273 * regcache.c (regcache_register_size): New function.
274
1c2e1515
YQ
2752015-10-12 Yao Qi <yao.qi@linaro.org>
276
277 * linux-aarch64-low.c: Update all callers as emit_load_store
278 is renamed to aarch64_emit_load_store.
279
e1c587c3
YQ
2802015-10-12 Yao Qi <yao.qi@linaro.org>
281
282 * linux-aarch64-low.c: Update all callers of function renaming
283 from emit_insn to aarch64_emit_insn.
284
b6542f81
YQ
2852015-10-12 Yao Qi <yao.qi@linaro.org>
286
287 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
288 arch/aarch64-insn.h.
289 (struct aarch64_memory_operand): Likewise.
290 (ENCODE): Likewise.
291 (emit_insn): Move to arch/aarch64-insn.c.
292 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
293 (emit_load_store): Move to arch/aarch64-insn.c.
294 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
295 (can_encode_int32): Remove.
296
246994ce
YQ
2972015-10-12 Yao Qi <yao.qi@linaro.org>
298
299 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
300 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
301 (aarch64_relocate_instruction): Likewise.
302 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
303 (struct aarch64_insn_visitor): Likewise.
304
0badd99f
YQ
3052015-10-12 Yao Qi <yao.qi@linaro.org>
306
307 * linux-aarch64-low.c (struct aarch64_insn_data): New.
308 (struct aarch64_insn_visitor): New.
309 (struct aarch64_insn_relocation_data): New.
310 (aarch64_ftrace_insn_reloc_b): New function.
311 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
312 (aarch64_ftrace_insn_reloc_cb): Likewise.
313 (aarch64_ftrace_insn_reloc_tb): Likewise.
314 (aarch64_ftrace_insn_reloc_adr): Likewise.
315 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
316 (aarch64_ftrace_insn_reloc_others): Likewise.
317 (visitor): New.
318 (aarch64_relocate_instruction): Use visitor.
319
dfaffe9d
YQ
3202015-10-12 Yao Qi <yao.qi@linaro.org>
321
322 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
323 int. Add argument buf.
324 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
325 aarch64_relocate_instruction.
326
70b439f0
YQ
3272015-10-12 Yao Qi <yao.qi@linaro.org>
328
329 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
330 argument insn. Remove local variable insn. Don't call
331 target_read_uint32.
332 (aarch64_install_fast_tracepoint_jump_pad): Call
333 target_read_uint32.
334
7781c06f
YQ
3352015-09-30 Yao Qi <yao.qi@linaro.org>
336
337 * linux-aarch64-low.c (emit_movk): Shorten a long line.
338 (emit_load_store_pair): Likewise.
339
9a3c8263
SM
3402015-09-25 Simon Marchi <simon.marchi@ericsson.com>
341
342 * dll.c (match_dll): Add cast(s).
343 (unloaded_dll): Likewise.
344 * linux-low.c (second_thread_of_pid_p): Likewise.
345 (delete_lwp_callback): Likewise.
346 (count_events_callback): Likewise.
347 (select_event_lwp_callback): Likewise.
348 (linux_set_resume_request): Likewise.
349 * server.c (accumulate_file_name_length): Likewise.
350 (emit_dll_description): Likewise.
351 (handle_qxfer_threads_worker): Likewise.
352 (visit_actioned_threads): Likewise.
353 * thread-db.c (any_thread_of): Likewise.
354 * tracepoint.c (same_process_p): Likewise.
355 (match_blocktype): Likewise.
356 (build_traceframe_info_xml): Likewise.
357
224c3ddb
SM
3582015-09-25 Simon Marchi <simon.marchi@ericsson.com>
359
360 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
361 assignment.
362 (gdb_unparse_agent_expr): Likewise.
363 * hostio.c (require_data): Likewise.
364 (handle_pread): Likewise.
365 * linux-low.c (disable_regset): Likewise.
366 (fetch_register): Likewise.
367 (store_register): Likewise.
368 (get_dynamic): Likewise.
369 (linux_qxfer_libraries_svr4): Likewise.
370 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
371 (set_fast_tracepoint_jump): Likewise.
372 (uninsert_fast_tracepoint_jumps_at): Likewise.
373 (reinsert_fast_tracepoint_jumps_at): Likewise.
374 (validate_inserted_breakpoint): Likewise.
375 (clone_agent_expr): Likewise.
376 * regcache.c (init_register_cache): Likewise.
377 * remote-utils.c (putpkt_binary_1): Likewise.
378 (decode_M_packet): Likewise.
379 (decode_X_packet): Likewise.
380 (look_up_one_symbol): Likewise.
381 (relocate_instruction): Likewise.
382 (monitor_output): Likewise.
383 * server.c (handle_search_memory): Likewise.
384 (handle_qxfer_exec_file): Likewise.
385 (handle_qxfer_libraries): Likewise.
386 (handle_qxfer): Likewise.
387 (handle_query): Likewise.
388 (handle_v_cont): Likewise.
389 (handle_v_run): Likewise.
390 (captured_main): Likewise.
391 * target.c (write_inferior_memory): Likewise.
392 * thread-db.c (try_thread_db_load_from_dir): Likewise.
393 * tracepoint.c (init_trace_buffer): Likewise.
394 (add_tracepoint_action): Likewise.
395 (add_traceframe): Likewise.
396 (add_traceframe_block): Likewise.
397 (cmd_qtdpsrc): Likewise.
398 (cmd_qtdv): Likewise.
399 (cmd_qtstatus): Likewise.
400 (response_source): Likewise.
401 (response_tsv): Likewise.
402 (cmd_qtnotes): Likewise.
403 (gdb_collect): Likewise.
404 (initialize_tracepoint): Likewise.
405
afbe19f8
PL
4062015-09-21 Pierre Langlois <pierre.langlois@arm.com>
407
408 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
409 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
410 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
411 <NOP>: New.
412 (enum aarch64_condition_codes): New enum.
413 (w0): New static global.
414 (fp): Likewise.
415 (lr): Likewise.
416 (struct aarch64_memory_operand) <type>: New
417 MEMORY_OPERAND_POSTINDEX type.
418 (postindex_memory_operand): New helper function.
419 (emit_ret): New function.
420 (emit_load_store_pair): New function, factored out of emit_stp
421 with support for MEMORY_OPERAND_POSTINDEX.
422 (emit_stp): Rewrite using emit_load_store_pair.
423 (emit_ldp): New function.
424 (emit_load_store): Likewise.
425 (emit_ldr): Mention post-index instruction in comment.
426 (emit_ldrh): New function.
427 (emit_ldrb): New function.
428 (emit_ldrsw): Mention post-index instruction in comment.
429 (emit_str): Likewise.
430 (emit_subs): New function.
431 (emit_cmp): Likewise.
432 (emit_and): Likewise.
433 (emit_orr): Likewise.
434 (emit_orn): Likewise.
435 (emit_eor): Likewise.
436 (emit_mvn): Likewise.
437 (emit_lslv): Likewise.
438 (emit_lsrv): Likewise.
439 (emit_asrv): Likewise.
440 (emit_mul): Likewise.
441 (emit_sbfm): Likewise.
442 (emit_sbfx): Likewise.
443 (emit_ubfm): Likewise.
444 (emit_ubfx): Likewise.
445 (emit_csinc): Likewise.
446 (emit_cset): Likewise.
447 (emit_nop): Likewise.
448 (emit_ops_insns): New helper function.
449 (emit_pop): Likewise.
450 (emit_push): Likewise.
451 (aarch64_emit_prologue): New function.
452 (aarch64_emit_epilogue): Likewise.
453 (aarch64_emit_add): Likewise.
454 (aarch64_emit_sub): Likewise.
455 (aarch64_emit_mul): Likewise.
456 (aarch64_emit_lsh): Likewise.
457 (aarch64_emit_rsh_signed): Likewise.
458 (aarch64_emit_rsh_unsigned): Likewise.
459 (aarch64_emit_ext): Likewise.
460 (aarch64_emit_log_not): Likewise.
461 (aarch64_emit_bit_and): Likewise.
462 (aarch64_emit_bit_or): Likewise.
463 (aarch64_emit_bit_xor): Likewise.
464 (aarch64_emit_bit_not): Likewise.
465 (aarch64_emit_equal): Likewise.
466 (aarch64_emit_less_signed): Likewise.
467 (aarch64_emit_less_unsigned): Likewise.
468 (aarch64_emit_ref): Likewise.
469 (aarch64_emit_if_goto): Likewise.
470 (aarch64_emit_goto): Likewise.
471 (aarch64_write_goto_address): Likewise.
472 (aarch64_emit_const): Likewise.
473 (aarch64_emit_call): Likewise.
474 (aarch64_emit_reg): Likewise.
475 (aarch64_emit_pop): Likewise.
476 (aarch64_emit_stack_flush): Likewise.
477 (aarch64_emit_zero_ext): Likewise.
478 (aarch64_emit_swap): Likewise.
479 (aarch64_emit_stack_adjust): Likewise.
480 (aarch64_emit_int_call_1): Likewise.
481 (aarch64_emit_void_call_2): Likewise.
482 (aarch64_emit_eq_goto): Likewise.
483 (aarch64_emit_ne_goto): Likewise.
484 (aarch64_emit_lt_goto): Likewise.
485 (aarch64_emit_le_goto): Likewise.
486 (aarch64_emit_gt_goto): Likewise.
487 (aarch64_emit_ge_got): Likewise.
488 (aarch64_emit_ops_impl): New static global variable.
489 (aarch64_emit_ops): New target function, return
490 &aarch64_emit_ops_impl.
491 (struct linux_target_ops): Install it.
492
bb903df0
PL
4932015-09-21 Pierre Langlois <pierre.langlois@arm.com>
494
495 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
496 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
497 aarch64-ipa.o.
498 * linux-aarch64-ipa.c: New file.
499 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
500 and endian.h.
501 (aarch64_get_thread_area): New target method.
502 (extract_signed_bitfield): New helper function.
503 (aarch64_decode_ldr_literal): New function.
504 (enum aarch64_opcodes): New enum.
505 (struct aarch64_register): New struct.
506 (struct aarch64_operand): New struct.
507 (x0): New static global.
508 (x1): Likewise.
509 (x2): Likewise.
510 (x3): Likewise.
511 (x4): Likewise.
512 (w2): Likewise.
513 (ip0): Likewise.
514 (sp): Likewise.
515 (xzr): Likewise.
516 (aarch64_register): New helper function.
517 (register_operand): Likewise.
518 (immediate_operand): Likewise.
519 (struct aarch64_memory_operand): New struct.
520 (offset_memory_operand): New helper function.
521 (preindex_memory_operand): Likewise.
522 (enum aarch64_system_control_registers): New enum.
523 (ENCODE): New macro.
524 (emit_insn): New helper function.
525 (emit_b): New function.
526 (emit_bcond): Likewise.
527 (emit_cb): Likewise.
528 (emit_tb): Likewise.
529 (emit_blr): Likewise.
530 (emit_stp): Likewise.
531 (emit_ldp_q_offset): Likewise.
532 (emit_stp_q_offset): Likewise.
533 (emit_load_store): Likewise.
534 (emit_ldr): Likewise.
535 (emit_ldrsw): Likewise.
536 (emit_str): Likewise.
537 (emit_ldaxr): Likewise.
538 (emit_stxr): Likewise.
539 (emit_stlr): Likewise.
540 (emit_data_processing_reg): Likewise.
541 (emit_data_processing): Likewise.
542 (emit_add): Likewise.
543 (emit_sub): Likewise.
544 (emit_mov): Likewise.
545 (emit_movk): Likewise.
546 (emit_mov_addr): Likewise.
547 (emit_mrs): Likewise.
548 (emit_msr): Likewise.
549 (emit_sevl): Likewise.
550 (emit_wfe): Likewise.
551 (append_insns): Likewise.
552 (can_encode_int32_in): New helper function.
553 (aarch64_relocate_instruction): New function.
554 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
555 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
556 (struct linux_target_ops): Install aarch64_get_thread_area,
557 aarch64_install_fast_tracepoint_jump_pad and
558 aarch64_get_min_fast_tracepoint_insn_len.
559
787749ea
PL
5602015-09-21 Pierre Langlois <pierre.langlois@arm.com>
561
562 * Makefile.in (aarch64-insn.o): New rule.
563 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
564
9812b2e6
YQ
5652015-09-21 Yao Qi <yao.qi@linaro.org>
566
567 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
568
18fe412b
YQ
5692015-09-21 Yao Qi <yao.qi@linaro.org>
570
571 * tracepoint.c (max_jump_pad_size): Remove.
572
a0cc84cd
YQ
5732015-09-18 Yao Qi <yao.qi@linaro.org>
574
575 * linux-aarch64-low.c: Don't include sys/uio.h.
576 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
577
d78908cf
WW
5782015-09-16 Wei-cheng Wang <cole945@gmail.com>
579
580 * tracepoint.c (eval_result_type): Change prototype.
581 (condition_true_at_tracepoint): Fix argument to compiled_cond.
582
d57e0d50
PA
5832015-09-15 Pedro Alves <palves@redhat.com>
584
585 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
586 Check whether to report exec events instead of checking whether
587 multiprocess is enabled.
588
5a676acc
PA
5892015-09-15 Pedro Alves <palves@redhat.com>
590
591 PR remote/18965
592 * remote-utils.c (prepare_resume_reply): Merge
593 TARGET_WAITKIND_VFORK_DONE switch case with the
594 TARGET_WAITKIND_FORKED case.
595
7c5d0fad
YQ
5962015-09-15 Yao Qi <yao.qi@linaro.org>
597
598 * server.c (handle_query): Check string comparison using
599 "else if" instead of "if".
600
750ce8d1
YQ
6012015-09-15 Yao Qi <yao.qi@linaro.org>
602
603 * server.c (vCont_supported): New global variable.
604 (handle_query): Set vCont_supported to 1 if "vContSupported+"
605 matches. Append ";vContSupported+" to own_buf.
606 (handle_v_requests): Append ";s;S" to own_buf if target supports
607 hardware single step or vCont_supported is false.
608 (capture_main): Set vCont_supported to zero.
609
70b90b91
YQ
6102015-09-15 Yao Qi <yao.qi@linaro.org>
611
612 * linux-low.c (linux_supports_conditional_breakpoints): Rename
613 it to ...
614 (linux_supports_hardware_single_step): ... New function.
615 (linux_target_ops): Update.
616 * lynx-low.c (lynx_target_ops): Set field
617 supports_hardware_single_step to target_can_do_hardware_single_step.
618 * nto-low.c (nto_target_ops): Likewise.
619 * spu-low.c (spu_target_ops): Likewise.
620 * win32-low.c (win32_target_ops): Likewise.
621 * target.c (target_can_do_hardware_single_step): New function.
622 * target.h (struct target_ops) <supports_conditional_breakpoints>:
623 Remove. <supports_hardware_single_step>: New field.
624 (target_supports_conditional_breakpoints): Remove.
625 (target_supports_hardware_single_step): New macro.
626 (target_can_do_hardware_single_step): Declare.
627 * server.c (handle_query): Use target_supports_hardware_single_step
628 instead of target_supports_conditional_breakpoints.
629
ade90bde
YQ
6302015-09-15 Yao Qi <yao.qi@linaro.org>
631
632 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
633 function.
634 (struct linux_target_ops the_low_target): Install
635 aarch64_linux_siginfo_fixup.
636
94585166
DB
6372015-09-11 Don Breazeal <donb@codesourcery.com>
638 Luis Machado <lgustavo@codesourcery.com>
639
640 * linux-low.c (linux_mourn): Static declaration.
641 (linux_arch_setup): Move in front of
642 handle_extended_wait.
643 (linux_arch_setup_thread): New function.
644 (handle_extended_wait): Handle exec events. Call
645 linux_arch_setup_thread. Make event_lwp argument a
646 pointer-to-a-pointer.
647 (check_zombie_leaders): Do not check stopped threads.
648 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
649 (linux_low_filter_event): Add lwp and thread for exec'ing
650 non-leader thread if leader thread has been deleted.
651 Refactor code into linux_arch_setup_thread and call it.
652 Pass child lwp pointer by reference to handle_extended_wait.
653 (linux_wait_for_event_filtered): Update comment.
654 (linux_wait_1): Prevent clobbering exec event status.
655 (linux_supports_exec_events): New function.
656 (linux_target_ops) <supports_exec_events>: Initialize new member.
657 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
658 new member.
659 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
660 * server.c (report_exec_events): New global variable.
661 (handle_query): Handle qSupported query for exec-events feature.
662 (captured_main): Initialize report_exec_events.
663 * server.h (report_exec_events): Declare new global variable.
664 * target.h (struct target_ops) <supports_exec_events>: New
665 member.
666 (target_supports_exec_events): New macro.
667 * win32-low.c (win32_target_ops) <supports_exec_events>:
668 Initialize new member.
669
0568462b
MM
6702015-09-09 Markus Metzger <markus.t.metzger@intel.com>
671
672 * linux-low.c (linux_low_enable_btrace): Remove.
673 (linux_target_ops): Replace linux_low_enable_btrace with
674 linux_enable_btrace.
675
39edd165
YQ
6762015-09-03 Yao Qi <yao.qi@linaro.org>
677
678 * linux-aarch64-low.c (aarch64_insert_point): Call
679 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
680 returns true.
681
1db33b5a
UW
6822015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
683
684 * linux-low.c (check_stopped_by_breakpoint): Use
685 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
686
ab290430
PA
6872015-08-27 Pedro Alves <palves@redhat.com>
688
689 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
690
8d749320
SM
6912015-08-26 Simon Marchi <simon.marchi@ericsson.com>
692
6711b7f8
SM
693 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
694 the XNEW-family equivalent.
8d749320
SM
695 (compile_bytecodes): Likewise.
696 * dll.c (loaded_dll): Likewise.
697 * event-loop.c (append_callback_event): Likewise.
698 (create_file_handler): Likewise.
699 (create_file_event): Likewise.
700 * hostio.c (handle_open): Likewise.
701 * inferiors.c (add_thread): Likewise.
702 (add_process): Likewise.
703 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
704 * linux-arm-low.c (arm_new_process): Likewise.
705 (arm_new_thread): Likewise.
706 * linux-low.c (add_to_pid_list): Likewise.
707 (linux_add_process): Likewise.
708 (handle_extended_wait): Likewise.
709 (add_lwp): Likewise.
710 (enqueue_one_deferred_signal): Likewise.
711 (enqueue_pending_signal): Likewise.
712 (linux_resume_one_lwp_throw): Likewise.
713 (linux_resume_one_thread): Likewise.
714 (linux_read_memory): Likewise.
715 (linux_write_memory): Likewise.
716 * linux-mips-low.c (mips_linux_new_process): Likewise.
717 (mips_linux_new_thread): Likewise.
718 (mips_add_watchpoint): Likewise.
719 * linux-x86-low.c (initialize_low_arch): Likewise.
720 * lynx-low.c (lynx_add_process): Likewise.
721 * mem-break.c (set_raw_breakpoint_at): Likewise.
722 (set_breakpoint): Likewise.
723 (add_condition_to_breakpoint): Likewise.
724 (add_commands_to_breakpoint): Likewise.
725 (clone_agent_expr): Likewise.
726 (clone_one_breakpoint): Likewise.
727 * regcache.c (new_register_cache): Likewise.
728 * remote-utils.c (look_up_one_symbol): Likewise.
729 * server.c (queue_stop_reply): Likewise.
730 (start_inferior): Likewise.
731 (queue_stop_reply_callback): Likewise.
732 (handle_target_event): Likewise.
733 * spu-low.c (fetch_ppc_memory): Likewise.
734 (store_ppc_memory): Likewise.
735 * target.c (set_target_ops): Likewise.
736 * thread-db.c (thread_db_load_search): Likewise.
737 (try_thread_db_load_1): Likewise.
738 * tracepoint.c (add_tracepoint): Likewise.
739 (add_tracepoint_action): Likewise.
740 (create_trace_state_variable): Likewise.
741 (cmd_qtdpsrc): Likewise.
742 (cmd_qtro): Likewise.
743 (add_while_stepping_state): Likewise.
744 * win32-low.c (child_add_thread): Likewise.
745 (get_image_name): Likewise.
746
ed8b7b42
YQ
7472015-08-25 Yao Qi <yao.qi@linaro.org>
748
749 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
750
db3cb7cb
YQ
7512015-08-25 Yao Qi <yao.qi@linaro.org>
752
753 * Makefile.in (aarch64-linux.o): New rule.
754 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
755 srv_tgtobj.
756 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
757 (aarch64_init_debug_reg_state): Make it extern.
758 (aarch64_linux_prepare_to_resume): Remove.
759
f6011a1c
YQ
7602015-08-25 Yao Qi <yao.qi@linaro.org>
761
762 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
763 lwp_arch_private_info and ptid_of_lwp.
764
88e2cf7e
YQ
7652015-08-25 Yao Qi <yao.qi@linaro.org>
766
767 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
768 Find proc_info by find_process_pid. All callers updated.
769
5e35436e
YQ
7702015-08-25 Yao Qi <yao.qi@linaro.org>
771
772 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
773 Remove.
774 (debug_reg_change_callback): Remove.
775 (aarch64_notify_debug_reg_change): Remove.
776
4a8a7965
YQ
7772015-08-25 Yao Qi <yao.qi@linaro.org>
778
779 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
780 Call current_lwp_ptid.
781
32a271ee
YQ
7822015-08-25 Yao Qi <yao.qi@linaro.org>
783
784 * linux-aarch64-low.c (debug_reg_change_callback): Use
785 debug_printf.
786
0d51c8d7
YQ
7872015-08-25 Yao Qi <yao.qi@linaro.org>
788
789 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
790
31a43dd5
YQ
7912015-08-25 Yao Qi <yao.qi@linaro.org>
792
793 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
794
8ee52567
YQ
7952015-08-25 Yao Qi <yao.qi@linaro.org>
796
797 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
798 the code.
799
ff3f0f45
YQ
8002015-08-25 Yao Qi <yao.qi@linaro.org>
801
802 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
803 Remove.
804 (debug_reg_change_callback): Remove argument entry and add argument
805 lwp. Remove local variable thread. Don't print thread id in the
806 debugging output. Don't check whether pid of thread equals to pid.
807 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
808 iterate_over_lwps instead find_inferior.
809
3d40fbb5
PA
8102015-08-24 Pedro Alves <palves@redhat.com>
811
812 * inferiors.c (get_first_process): New function.
813 * inferiors.h (get_first_process): New declaration.
814 * remote-utils.c (read_ptid): Default to the first process in the
815 list, instead of to the current thread's process.
816
438e1e42
PA
8172015-08-24 Pedro Alves <palves@redhat.com>
818
819 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
820 * event-loop.c: Likewise.
821 * remote-utils.c: Likewise.
822 * tracepoint.c: Likewise.
823
a8c6d4fc
PA
8242015-08-24 Pedro Alves <palves@redhat.com>
825
826 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
827 ptid_get_lwp.
828
99b0bb12
PA
8292015-08-21 Pedro Alves <palves@redhat.com>
830
831 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
832 instead of literal 1.
833
f8904751
PA
8342015-08-21 Pedro Alves <palves@redhat.com>
835
836 * tdesc.c (default_description): Explicitly zero-initialize.
837
465a859e
PA
8382015-08-21 Pedro Alves <palves@redhat.com>
839
840 PR gdb/18749
841 * inferiors.c (remove_thread): Discard any pending stop reply for
842 this thread.
843 * server.c (remove_all_on_match_pid): Rename to ...
844 (remove_all_on_match_ptid): ... this. Work with a filter ptid
845 instead of a pid.
846 (discard_queued_stop_replies): Change parameter to a ptid. Now
847 extern.
848 (handle_v_kill, kill_inferior_callback, captured_main)
849 (process_serial_event): Adjust.
850 * server.h (discard_queued_stop_replies): Declare.
851
f0db101d
PA
8522015-08-21 Pedro Alves <palves@redhat.com>
853
854 * linux-low.c (wait_for_sigstop): Always switch to no thread
855 selected if the previously current thread dies.
856 * lynx-low.c (lynx_request_interrupt): Use the first thread's
857 process instead of the current thread's.
858 * remote-utils.c (input_interrupt): Don't check if there's no
859 current thread.
860 * server.c (gdb_read_memory, gdb_write_memory): If setting the
861 current thread to the general thread fails, error out.
862 (handle_qxfer_auxv, handle_qxfer_libraries)
863 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
864 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
865 (handle_query): Check if there's a thread selected instead of
866 checking whether there's any thread in the thread list.
867 (handle_qxfer_threads, handle_qxfer_btrace)
868 (handle_qxfer_btrace_conf): Don't error out early if there's no
869 thread in the thread list.
870 (handle_v_cont, myresume): Don't set the current thread to the
871 continue thread.
872 (process_serial_event) <Hg handling>: Also set thread_id if the
873 previous general thread is still alive.
874 (process_serial_event) <g/G handling>: If setting the current
875 thread to the general thread fails, error out.
876 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
877 thread's lwp instead of the current thread's.
878 * target.c (set_desired_thread): If the desired thread was not
879 found, leave the current thread pointing to NULL. Return an int
880 (boolean) indicating success.
881 * target.h (set_desired_thread): Change return type to int.
882
40045d91
MF
8832015-08-20 Max Filippov <jcmvbkbc@gmail.com>
884
885 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
886 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
887 #includes.
888 (ps_get_thread_area): New function.
889
45face3b
GB
8902015-08-19 Gary Benson <gbenson@redhat.com>
891
892 * hostio.c (handle_pread): Do not attempt to read more data
893 than hostio_reply_with_data can fit in a packet.
894
16d5f642
JB
8952015-08-18 Joel Brobecker <brobecker@adacore.com>
896
897 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
898
a738da3a
MF
8992015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
900
901 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
902
33ebda9d
PA
9032015-08-06 Pedro Alves <palves@redhat.com>
904
905 * tracepoint.c (expr_eval_result): Now an int.
906
a44892be
PA
9072015-08-06 Pedro Alves <palves@redhat.com>
908
909 * gdbthread.h (struct regcache): Forward declare.
910 (struct thread_info) <regcache_data>: Now a struct regcache
911 pointer.
912 * inferiors.c (inferior_regcache_data)
913 (set_inferior_regcache_data): Now work with struct regcache
914 pointers.
915 * inferiors.h (struct regcache): Forward declare.
916 (inferior_regcache_data, set_inferior_regcache_data): Now work
917 with struct regcache pointers.
918 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
919 (free_register_cache_thread): Remove struct regcache pointer
920 casts.
921
608a1e46
PA
9222015-08-06 Pedro Alves <palves@redhat.com>
923
924 * server.c (captured_main): On error, print the exception message
925 to stderr, and if run_once is set, throw a quit.
926
f0ce0d3a
PA
9272015-08-06 Pedro Alves <palves@redhat.com>
928
929 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
930 the current thread.
931
bf47e248
PA
9322015-08-06 Pedro Alves <palves@redhat.com>
933
934 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
935 reading beyond the passed in buffer length.
936
b6b9ffcc
PL
9372015-08-06 Pierre Langlois <pierre.langlois@arm.com>
938
939 * tracepoint.c (symbol_list) <required>: Remove.
940
863d01bd
PA
9412015-08-06 Pedro Alves <palves@redhat.com>
942
943 * linux-low.c (handle_extended_wait): Set the fork child's suspend
944 count if stopping and suspending threads.
945 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
946 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
947 (linux_detach): Complete an ongoing step-over.
948 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
949 throughout.
950 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
951 (linux_wait_1): If passing a signal to the inferior after
952 finishing a step-over, unsuspend and re-resume all lwps. If we
953 see a single-step event but the thread should be continuing, don't
954 pass the trap to gdb.
955 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
956 internal_error instead of gdb_assert.
957 (enqueue_pending_signal): New function.
958 (check_ptrace_stopped_lwp_gone): Add debug output.
959 (start_step_over): Use internal_error instead of gdb_assert.
960 (complete_ongoing_step_over): New function.
961 (linux_resume_one_thread): Don't resume a suspended thread.
962 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
963 it stepping.
964
00db26fa
PA
9652015-08-06 Pedro Alves <palves@redhat.com>
966
967 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
968 (linux_thread_alive): Use lwp_is_marked_dead.
969 (extended_event_reported): Delete.
970 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
971 instead of extended_event_reported.
972 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
973 as well.
974 (lwp_is_marked_dead): New function.
975 (lwp_running): Use lwp_is_marked_dead.
976 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
977 comment.
978
ad071a30
PA
9792015-08-06 Pedro Alves <palves@redhat.com>
980
981 * linux-low.c (linux_wait_1): Move fork event output out of the
982 !report_to_gdb check. Pass event_child->waitstatus to
983 target_waitstatus_to_string instead of ourstatus.
984
524b57e6
YQ
9852015-08-04 Yao Qi <yao.qi@linaro.org>
986
987 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
988 if current_thread is 32 bit.
989
6085d6f6
YQ
9902015-08-04 Yao Qi <yao.qi@linaro.org>
991
992 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
993 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
994 * server.c (extended_protocol): Remove "static".
995 * server.h (extended_protocol): Declare it.
996
8a7e4587
YQ
9972015-08-04 Yao Qi <yao.qi@linaro.org>
998
999 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
1000 both aarch64 and aarch32.
1001 (aarch64_set_pc): Likewise.
1002
3b53ae99
YQ
10032015-08-04 Yao Qi <yao.qi@linaro.org>
1004
1005 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
1006 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
1007 arm-with-neon.xml to srv_xmlfiles.
1008 * linux-aarch64-low.c: Include linux-aarch32-low.h.
1009 (is_64bit_tdesc): New function.
1010 (aarch64_linux_read_description): New function.
1011 (aarch64_arch_setup): Call aarch64_linux_read_description.
1012 (regs_info): Rename to regs_info_aarch64.
1013 (aarch64_regs_info): Return right regs_info.
1014 (initialize_low_arch): Call initialize_low_arch_aarch32.
1015
bd9e6534
YQ
10162015-08-04 Yao Qi <yao.qi@linaro.org>
1017
1018 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
1019 * linux-aarch32-low.c: New file.
1020 * linux-aarch32-low.h: New file.
1021 * linux-arm-low.c (arm_fill_gregset): Move it to
1022 linux-aarch32-low.c.
1023 (arm_store_gregset): Likewise.
1024 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
1025 (arm_store_vfpregset): Call arm_store_vfpregset_num.
1026 (arm_arch_setup): Check if PTRACE_GETREGSET works.
1027 (regs_info): Rename to regs_info_arm.
1028 (arm_regs_info): Return regs_info_aarch32 if
1029 have_ptrace_getregset is 1 and target description is
1030 arm_with_neon or arm_with_vfpv3.
1031 (initialize_low_arch): Don't call init_registers_arm_with_neon.
1032 Call initialize_low_arch_aarch32 instead.
1033
ded48a5e
YQ
10342015-08-04 Yao Qi <yao.qi@linaro.org>
1035
1036 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
1037 * linux-low.c: ... here.
1038 * linux-low.h (have_ptrace_getregset): Declare it.
1039
96e9210f
PA
10402015-08-04 Pedro Alves <palves@redhat.com>
1041
1042 * thread-db.c (struct thread_db): Use new typedefs.
1043 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
1044 CHK calls.
1045 (disable_thread_event_reporting): Cast result of dlsym to
1046 destination function pointer type.
1047 (thread_db_mourn): Use td_ta_delete_ftype.
1048
af60a1ef
SL
10492015-08-03 Sandra Loosemore <sandra@codesourcery.com>
1050
1051 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
1052 arch variant.
1053 (CDX_BREAKPOINT): Define for R2.
1054 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
1055 (the_low_target): Add comments.
1056
e8b41681
YQ
10572015-07-30 Yao Qi <yao.qi@linaro.org>
1058
1059 * linux-arm-low.c (arm_hwcap): Remove it.
1060 (arm_read_description): New local variable arm_hwcap. Don't
1061 set arm_hwcap to zero.
1062
89abb039
YQ
10632015-07-30 Yao Qi <yao.qi@linaro.org>
1064
1065 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
1066 Use regcache->tdesc instead.
1067 (arm_store_wmmxregset): Likewise.
1068 (arm_fill_vfpregset): Likewise.
1069 (arm_store_vfpregset): Likewise.
1070
deca266c
YQ
10712015-07-30 Yao Qi <yao.qi@linaro.org>
1072
1073 * linux-arm-low.c: Include arch/arm.h.
1074 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
1075 (arm_store_gregset): Likewise.
1076
aa58a496
SM
10772015-07-29 Simon Marchi <simon.marchi@ericsson.com>
1078
1079 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
1080 ptrace's 4th parameter.
1081
50904b25
YQ
10822015-07-27 Yao Qi <yao.qi@linaro.org>
1083
1084 * configure.srv (case aarch64*-*-linux*): Don't set
1085 srv_linux_usrregs.
1086
5826e159
PA
10872015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
1088
1089 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
1090 sys/ptrace.h.
1091 * linux-arm-low.c: Likewise.
1092 * linux-cris-low.c: Likewise.
1093 * linux-crisv32-low.c: Likewise.
1094 * linux-low.c: Likewise.
1095 * linux-m68k-low.c: Likewise.
1096 * linux-mips-low.c: Likewise.
1097 * linux-nios2-low.c: Likewise.
1098 * linux-s390-low.c: Likewise.
1099 * linux-sparc-low.c: Likewise.
1100 * linux-tic6x-low.c: Likewise.
1101 * linux-tile-low.c: Likewise.
1102 * linux-x86-low.c: Likewise.
1103
54019719
PA
11042015-07-24 Pedro Alves <palves@redhat.com>
1105
1106 * config.in: Regenerate.
1107 * configure: Regenerate.
1108
eb7aa561
PA
11092015-07-24 Pedro Alves <palves@redhat.com>
1110
1111 * acinclude.m4: Include ../ptrace.m4.
1112 * configure.ac: Call GDB_AC_PTRACE.
1113 * config.in, configure: Regenerate.
1114
55d7b841
YQ
11152015-07-24 Yao Qi <yao.qi@linaro.org>
1116
1117 * linux-low.c (linux_create_inferior): Remove setting to
1118 proc->priv->new_inferior.
1119 (linux_attach): Likewise.
1120 (linux_low_filter_event): Likewise.
1121 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
1122
c06cbd92
YQ
11232015-07-24 Yao Qi <yao.qi@linaro.org>
1124
1125 * linux-low.c (linux_arch_setup): New function.
1126 (linux_low_filter_event): If proc->tdesc is NULL and
1127 proc->attached is true, call the_low_target.arch_setup.
1128 Otherwise, keep status pending, and return.
1129 (linux_resume_one_lwp_throw): Don't call get_pc if
1130 thread->while_stepping isn't NULL. Don't call
1131 get_thread_regcache if proc->tdesc is NULL.
1132 (need_step_over_p): Return 0 if proc->tdesc is NULL.
1133 (linux_target_ops): Install arch_setup.
1134 * server.c (start_inferior): Call the_target->arch_setup.
1135 * target.h (struct target_ops) <arch_setup>: New field.
1136 (target_arch_setup): New marco.
1137 * lynx-low.c (lynx_target_ops): Update.
1138 * nto-low.c (nto_target_ops): Update.
1139 * spu-low.c (spu_target_ops): Update.
1140 * win32-low.c (win32_target_ops): Update.
1141
5ae3ebba
YQ
11422015-07-24 Yao Qi <yao.qi@linaro.org>
1143
1144 * linux-low.c (linux_add_process): Don't set
1145 proc->priv->new_inferior.
1146 (linux_create_inferior): Set proc->priv->new_inferior to 1.
1147 (linux_attach): Likewise.
1148
eb97750b
YQ
11492015-07-24 Yao Qi <yao.qi@linaro.org>
1150
1151 * server.c (start_inferior): Code refactor.
1152
51aee833
YQ
11532015-07-24 Yao Qi <yao.qi@linaro.org>
1154
1155 * server.c (process_serial_event): Set general_thread.
1156
af1b22f3
YQ
11572015-07-21 Yao Qi <yao.qi@linaro.org>
1158
1159 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
1160 aarch64_linux_get_debug_reg_capacity.
1161
554717a3
YQ
11622015-07-17 Yao Qi <yao.qi@linaro.org>
1163
1164 * Makefile.in (aarch64-linux-hw-point.o): New rule.
1165 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
1166 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
1167 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
1168 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
1169 (AARCH64_HWP_ALIGNMENT): Likewise.
1170 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
1171 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
1172 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
1173 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
1174 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
1175 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
1176 (struct aarch64_debug_reg_state): Likewise.
1177 (struct arch_lwp_info): Likewise.
1178 (aarch64_align_watchpoint): Likewise.
1179 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
1180 (aarch64_watchpoint_length): Likewise.
1181 (aarch64_point_encode_ctrl_reg): Likewise
1182 (aarch64_point_is_aligned): Likewise.
1183 (aarch64_align_watchpoint): Likewise.
1184 (aarch64_linux_set_debug_regs):
1185 (aarch64_dr_state_insert_one_point): Likewise.
1186 (aarch64_dr_state_remove_one_point): Likewise.
1187 (aarch64_handle_breakpoint): Likewise.
1188 (aarch64_handle_aligned_watchpoint): Likewise.
1189 (aarch64_handle_unaligned_watchpoint): Likewise.
1190 (aarch64_handle_watchpoint): Likewise.
1191
c67ca4de
YQ
11922015-07-17 Yao Qi <yao.qi@linaro.org>
1193
1194 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
1195 and don't aarch64_get_debug_reg_state. All callers update.
1196 (aarch64_handle_aligned_watchpoint): Likewise.
1197 (aarch64_handle_unaligned_watchpoint): Likewise.
1198 (aarch64_handle_watchpoint): Likewise.
1199 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
1200 (aarch64_remove_point): Likewise.
1201
25abf979
YQ
12022015-07-17 Yao Qi <yao.qi@linaro.org>
1203
1204 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
1205 debug_printf.
1206 (aarch64_handle_unaligned_watchpoint): Likewise.
1207
db1ff28b
JK
12082015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
1209
1210 Revert the previous 3 commits:
1211 Move gdb_regex* to common/
1212 Move linux_find_memory_regions_full & co.
1213 gdbserver build-id attribute generator
1214
700ca40f
JK
12152015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1216 Jan Kratochvil <jan.kratochvil@redhat.com>
1217
1218 gdbserver build-id attribute generator.
1219 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
1220 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
1221 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
1222 (find_phdr): New.
1223 (get_dynamic): Use find_pdhr to traverse program headers.
1224 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
1225 (compare_mapping_entry_range, struct find_memory_region_callback_data)
1226 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
1227 (get_hex_build_id): New.
1228 (linux_qxfer_libraries_svr4): Add optional build-id attribute
1229 to reply XML document.
1230
9904185c
JK
12312015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1232 Jan Kratochvil <jan.kratochvil@redhat.com>
1233
1234 * target.c: Include target/target-utils.h and fcntl.h.
1235 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
1236 (target_fileio_read_stralloc): New functions.
1237
6e5b4429
JK
12382015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
1239
1240 * Makefile.in (OBS): Add gdb_regex.o.
1241 (gdb_regex.o): New.
1242 * config.in: Rebuilt.
1243 * configure: Rebuilt.
1244
ddc98fbf
JK
12452015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1246 Jan Kratochvil <jan.kratochvil@redhat.com>
1247
1248 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
1249 * Makefile.in (OBS): Add target-utils.o.
1250 (linux-maps.o, target-utils.o): New.
1251 * configure.srv (srv_linux_obj): Add linux-maps.o.
1252
e57bb7a0
PL
12532015-07-15 Pierre Langlois <pierre.langlois@arm.com>
1254
1255 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
1256 function, return 1.
1257 (the_low_target): Install it.
1258
586b02a9
PA
12592015-07-14 Pedro Alves <palves@redhat.com>
1260
1261 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
1262 Instead, ignore ECHILD, and throw an error for other errnos.
1263
58c1b36c
PA
12642015-07-10 Pedro Alves <palves@redhat.com>
1265
1266 * event-loop.c (struct callback_event) <data>: Change type to
1267 gdb_client_data instance instead of gdb_client_data pointer.
1268 (append_callback_event): Adjust.
1269
421530db
PL
12702015-07-10 Pierre Langlois <pierre.langlois@arm.com>
1271
1272 * linux-aarch64-low.c: Add comments for each linux_target_ops
1273 method. Remove comments already covered in target_ops and
1274 linux_target_ops definitions.
1275 (the_low_target): Add comments for each unimplemented method.
1276
c2d65f38
YQ
12772015-07-09 Yao Qi <yao.qi@linaro.org>
1278
1279 * linux-aarch64-low.c (aarch64_regmap): Remove.
1280 (aarch64_usrregs_info): Remove.
1281 (regs_info): Set field usrregs to NULL.
1282
b20a6524
MM
12832015-07-02 Markus Metzger <markus.t.metzger@intel.com>
1284
1285 * linux-low.c: Include "rsp-low.h"
1286 (linux_low_encode_pt_config, linux_low_encode_raw): New.
1287 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
1288 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
1289 (handle_btrace_enable_pt): New.
1290 (handle_btrace_general_set): Support "pt".
1291 (handle_btrace_conf_general_set): Support "pt:size".
1292
96c97461
PL
12932015-06-29 Pierre Langlois <pierre.langlois@arm.com>
1294
1295 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
1296 Z_PACKET_SW_BP.
1297
37d66942
PL
12982015-06-29 Pierre Langlois <pierre.langlois@arm.com>
1299
1300 * linux-aarch64-low.c: Remove comment about endianness.
1301 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
1302 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
1303 memcmp.
1304
dc06243f
GB
13052015-06-24 Gary Benson <gbenson@redhat.com>
1306
1307 * linux-i386-ipa.c (stdint.h): Do not include.
1308 * lynx-i386-low.c (stdint.h): Likewise.
1309 * lynx-ppc-low.c (stdint.h): Likewise.
1310 * mem-break.c (stdint.h): Likewise.
1311 * thread-db.c (stdint.h): Likewise.
1312 * tracepoint.c (stdint.h): Likewise.
1313 * win32-low.c (stdint.h): Likewise.
1314
124e13d9
SM
13152015-06-18 Simon Marchi <simon.marchi@ericsson.com>
1316
1317 * server.c (write_qxfer_response): Update call to
1318 remote_escape_output.
1319
909c2cda
JK
13202015-06-15 Aleksandar Ristovski <aristovski@qnx.com
1321 Jan Kratochvil <jan.kratochvil@redhat.com>
1322
1323 Merge multiple hex conversions.
1324 * gdbreplay.c (tohex): Rename to 'fromhex'.
1325 (logchar): Use fromhex.
1326
24c05f46
JK
13272015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
1328
1329 * server.c (handle_qxfer_libraries): Set `version' attribute for
1330 <library-list>.
1331
14d2069a
GB
13322015-06-10 Gary Benson <gbenson@redhat.com>
1333
1334 * target.h (struct target_ops) <multifs_open>: New field.
1335 <multifs_unlink>: Likewise.
1336 <multifs_readlink>: Likewise.
1337 * linux-low.c (nat/linux-namespaces.h): New include.
1338 (linux_target_ops): Initialize the_target->multifs_open,
1339 the_target->multifs_unlink and the_target->multifs_readlink.
1340 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
1341 * hostio.c (hostio_fs_pid): New static variable.
1342 (hostio_handle_new_gdb_connection): New function.
1343 (handle_setfs): Likewise.
1344 (handle_open): Use the_target->multifs_open as appropriate.
1345 (handle_unlink): Use the_target->multifs_unlink as appropriate.
1346 (handle_readlink): Use the_target->multifs_readlink as
1347 appropriate.
1348 (handle_vFile): Handle vFile:setfs packets.
1349 * server.c (handle_query): Call hostio_handle_new_gdb_connection
1350 after target_handle_new_gdb_connection.
1351
4b8b5e72
GB
13522015-06-10 Gary Benson <gbenson@redhat.com>
1353
1354 * configure.ac (AC_CHECK_FUNCS): Add setns.
1355 * config.in: Regenerate.
1356 * configure: Likewise.
1357 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
1358 (linux-namespaces.o): New rule.
1359 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
1360
3ac2e371
GB
13612015-06-09 Gary Benson <gbenson@redhat.com>
1362
1363 * hostio.c (handle_open): Process mode argument with
1364 fileio_to_host_mode.
1365
ca9b78ce
YQ
13662015-06-01 Yao Qi <yao.qi@linaro.org>
1367
1368 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
1369 * linux-x86-low.c: Likewise.
1370
bfacd19d
DB
13712015-05-28 Don Breazeal <donb@codesourcery.com>
1372
1373 * linux-low.c (handle_extended_wait): Initialize
1374 thread_info.last_resume_kind for new fork children.
1375
452003ef
PA
13762015-05-15 Pedro Alves <palves@redhat.com>
1377
1378 * target.h (target_handle_new_gdb_connection): Rewrite using if
1379 wrapped in do/while.
1380
1041a03c
JB
13812015-05-14 Joel Brobecker <brobecker@adacore.com>
1382
1383 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
1384 * configure, config.in: Regenerate.
1385 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
1386 Declare typedef.
1387
c269dbdb
DB
13882015-05-12 Don Breazeal <donb@codesourcery.com>
1389
1390 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
1391 PTRACE_EVENT_VFORK_DONE.
1392 (linux_low_ptrace_options, extended_event_reported): Add vfork
1393 events.
1394 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
1395 and "vforkdone" for RSP 'T' Stop Reply Packet.
1396 * server.h (report_vfork_events): Declare
1397 global variable.
1398
3a8a0396
DB
13992015-05-12 Don Breazeal <donb@codesourcery.com>
1400
1401 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
1402 (the_low_target) <new_fork>: Initialize new member.
1403 * linux-arm-low.c (arm_new_fork): New function.
1404 (the_low_target) <new_fork>: Initialize new member.
1405 * linux-low.c (handle_extended_wait): Call new target function
1406 new_fork.
1407 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
1408 * linux-mips-low.c (mips_add_watchpoint): New function
1409 extracted from mips_insert_point.
1410 (the_low_target) <new_fork>: Initialize new member.
1411 (mips_linux_new_fork): New function.
1412 (mips_insert_point): Call mips_add_watchpoint.
1413 * linux-x86-low.c (x86_linux_new_fork): New function.
1414 (the_low_target) <new_fork>: Initialize new member.
1415
de0d863e
DB
14162015-05-12 Don Breazeal <donb@codesourcery.com>
1417
1418 * linux-low.c (handle_extended_wait): Implement return value,
1419 rename argument 'event_child' to 'event_lwp', handle
1420 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
1421 (linux_low_ptrace_options): New function.
1422 (linux_low_filter_event): Call linux_low_ptrace_options,
1423 use different argument fo linux_enable_event_reporting,
1424 use return value from handle_extended_wait.
1425 (extended_event_reported): New function.
1426 (linux_wait_1): Call extended_event_reported and set
1427 status to report fork events.
1428 (linux_write_memory): Add pid to debug message.
1429 (reset_lwp_ptrace_options_callback): New function.
1430 (linux_handle_new_gdb_connection): New function.
1431 (linux_target_ops): Initialize new structure member.
1432 * linux-low.h (struct lwp_info) <waitstatus>: New member.
1433 * lynx-low.c: Initialize new structure member.
1434 * remote-utils.c (prepare_resume_reply): Implement stop reason
1435 "fork" for "T" stop message.
1436 * server.c (handle_query): Call handle_new_gdb_connection.
1437 * server.h (report_fork_events): Declare global flag.
1438 * target.h (struct target_ops) <handle_new_gdb_connection>:
1439 New member.
1440 (target_handle_new_gdb_connection): New macro.
1441 * win32-low.c: Initialize new structure member.
1442
ddcbc397
DB
14432015-05-12 Don Breazeal <donb@codesourcery.com>
1444
1445 * mem-break.c (APPEND_TO_LIST): Define macro.
1446 (clone_agent_expr): New function.
1447 (clone_one_breakpoint): New function.
1448 (clone_all_breakpoints): New function.
1449 * mem-break.h: Declare new functions.
1450
89245bc0
DB
14512015-05-12 Don Breazeal <donb@codesourcery.com>
1452
1453 * linux-low.c (linux_supports_fork_events): New function.
1454 (linux_supports_vfork_events): New function.
1455 (linux_target_ops): Initialize new structure members.
1456 (initialize_low): Call linux_check_ptrace_features.
1457 * lynx-low.c (lynx_target_ops): Initialize new structure
1458 members.
1459 * server.c (report_fork_events, report_vfork_events):
1460 New global flags.
1461 (handle_query): Add new features to qSupported packet and
1462 response.
1463 (captured_main): Initialize new global variables.
1464 * target.h (struct target_ops) <supports_fork_events>:
1465 New member.
1466 <supports_vfork_events>: New member.
1467 (target_supports_fork_events): New macro.
1468 (target_supports_vfork_events): New macro.
1469 * win32-low.c (win32_target_ops): Initialize new structure
1470 members.
1471
835205d0
GB
14722015-05-12 Gary Benson <gbenson@redhat.com>
1473
1474 * server.c (handle_qxfer_exec_file): Use current process
1475 if annex is empty.
1476
21e94bd9
SL
14772015-05-08 Sandra Loosemore <sandra@codesourcery.com>
1478
1479 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
1480 Remove HAVE_PTRACE_GETREGS conditionals.
1481 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
1482 instead of PTRACE_GETREGS and PTRACE_SETREGS.
1483
45614f15
YQ
14842015-05-08 Yao Qi <yao.qi@linaro.org>
1485
1486 * linux-low.c (linux_supports_conditional_breakpoints): New
1487 function.
1488 (linux_target_ops): Install new target method.
1489 * lynx-low.c (lynx_target_ops): Install NULL hook for
1490 supports_conditional_breakpoints.
1491 * nto-low.c (nto_target_ops): Likewise.
1492 * spu-low.c (spu_target_ops): Likewise.
1493 * win32-low.c (win32_target_ops): Likewise.
1494 * server.c (handle_query): Check
1495 target_supports_conditional_breakpoints.
1496 * target.h (struct target_ops) <supports_conditional_breakpoints>:
1497 New field.
1498 (target_supports_conditional_breakpoints): New macro.
1499
80ad801e
PA
15002015-05-06 Pedro Alves <palves@redhat.com>
1501
1502 PR server/18081
1503 * server.c (start_inferior): If the process exits, mourn it.
1504
819843c7
GB
15052015-04-21 Gary Benson <gbenson@redhat.com>
1506
1507 * hostio.c (fileio_open_flags_to_host): Factored out to
1508 fileio_to_host_openflags in common/fileio.c. Single use
1509 updated.
1510
a2d5a9d7
MF
15112015-04-17 Max Filippov <jcmvbkbc@gmail.com>
1512
1513 * linux-xtensa-low.c (xtensa_fill_gregset)
1514 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
1515 XCHAL_HAVE_LOOP.
1516
deb44829
MF
15172015-04-17 Max Filippov <jcmvbkbc@gmail.com>
1518
1519 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
1520 (regs_info): Replace usrregs pointer with NULL.
1521
e57f1de3
GB
15222015-04-17 Gary Benson <gbenson@redhat.com>
1523
1524 * target.h (struct target_ops) <pid_to_exec_file>: New field.
1525 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
1526 * server.c (handle_qxfer_exec_file): New function.
1527 (qxfer_packets): Add exec-file entry.
1528 (handle_query): Report qXfer:exec-file:read as supported packet.
1529
62828379
RN
15302015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
1531
1532 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
1533
b88bb450
GB
15342015-04-09 Gary Benson <gbenson@redhat.com>
1535
1536 * hostio-errno.c (errno_to_fileio_error): Remove function.
1537 Update caller to use remote_fileio_to_fio_error.
1538
c8f4bfdd
YQ
15392015-04-09 Yao Qi <yao.qi@linaro.org>
1540
1541 * linux-low.c (linux_insert_point): Call
1542 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
1543 (linux_remove_point): Call remove_memory_breakpoint if type is
1544 raw_bkpt_type_sw.
1545 * linux-x86-low.c (x86_insert_point): Don't call
1546 insert_memory_breakpoint.
1547 (x86_remove_point): Don't call remove_memory_breakpoint.
1548
41f98f02
PA
15492015-04-01 Pedro Alves <palves@redhat.com>
1550 Cleber Rosa <crosa@redhat.com>
1551
1552 * server.c (gdbserver_usage): Reorganize and extend the usage
1553 message.
1554
2bf6fb9d
PA
15552015-03-24 Pedro Alves <palves@redhat.com>
1556
1557 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
1558 output. Also dump TRAP_TRACE.
1559 (linux_low_filter_event): In debug output, distinguish a
1560 resume_stop SIGSTOP from a delayed SIGSTOP.
1561
369f6daa
GB
15622015-03-24 Gary Benson <gbenson@redhat.com>
1563
1564 * linux-x86-low.c (x86_linux_new_thread): Moved to
1565 nat/x86-linux.c.
1566 (x86_linux_prepare_to_resume): Likewise.
1567
8e5d4070
GB
15682015-03-24 Gary Benson <gbenson@redhat.com>
1569
1570 * Makefile.in (x86-linux-dregs.o): New rule.
1571 * configure.srv: Add x86-linux-dregs.o to relevant targets.
1572 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
1573 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
1574 (x86_linux_dr_get): Likewise.
1575 (x86_linux_dr_set): Likewise.
1576 (update_debug_registers_callback): Likewise.
1577 (x86_linux_dr_set_addr): Likewise.
1578 (x86_linux_dr_get_addr): Likewise.
1579 (x86_linux_dr_set_control): Likewise.
1580 (x86_linux_dr_get_control): Likewise.
1581 (x86_linux_dr_get_status): Likewise.
1582 (x86_linux_update_debug_registers): Likewise.
1583
2b95d440
GB
15842015-03-24 Gary Benson <gbenson@redhat.com>
1585
1586 * linux-x86-low.c (x86_linux_update_debug_registers):
1587 New function, factored out from...
1588 (x86_linux_prepare_to_resume): ...this.
1589
14b0bc68
GB
15902015-03-24 Gary Benson <gbenson@redhat.com>
1591
1592 * linux-x86-low.c (x86_linux_dr_get): Update comments.
1593 (x86_linux_dr_set): Likewise.
1594 (update_debug_registers_callback): Likewise.
1595 (x86_linux_dr_set_addr): Likewise.
1596 (x86_linux_dr_get_addr): Likewise.
1597 (x86_linux_dr_set_control): Likewise.
1598 (x86_linux_dr_get_control): Likewise.
1599 (x86_linux_dr_get_status): Likewise.
1600 (x86_linux_prepare_to_resume): Likewise.
1601
5dfe6ca8
GB
16022015-03-24 Gary Benson <gbenson@redhat.com>
1603
1604 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
1605 Use perror_with_name. Pass string through gettext.
1606 (x86_linux_dr_set): Likewise.
1607
d33472ad
GB
16082015-03-24 Gary Benson <gbenson@redhat.com>
1609
1610 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
1611 (x86_linux_dr_set_addr): ...this.
1612 (x86_dr_low_get_addr): Rename to...
1613 (x86_linux_dr_get_addr): ...this.
1614 (x86_dr_low_set_control): Rename to...
1615 (x86_linux_dr_set_control): ...this.
1616 (x86_dr_low_get_control): Rename to...
1617 (x86_linux_dr_get_control): ...this.
1618 (x86_dr_low_get_status): Rename to...
1619 (x86_linux_dr_get_status): ...this.
1620 (x86_dr_low): Update with new function names.
1621
4b134ca1
GB
16222015-03-24 Gary Benson <gbenson@redhat.com>
1623
1624 * Makefile.in (x86-linux.o): New rule.
1625 * configure.srv: Add x86-linux.o to relevant targets.
1626 * linux-low.c (lwp_set_arch_private_info): New function.
1627 (lwp_arch_private_info): Likewise.
1628 * linux-x86-low.c: Include nat/x86-linux.h.
1629 (arch_lwp_info): Removed structure.
1630 (update_debug_registers_callback):
1631 Use lwp_set_debug_registers_changed.
1632 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
1633 and lwp_set_debug_registers_changed.
1634 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
1635
34c703da
GB
16362015-03-24 Gary Benson <gbenson@redhat.com>
1637
1638 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
1639 * linux-arm-low.c (arm_new_thread): Likewise.
1640 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
1641 * linux-mips-low.c (mips_linux_new_thread): Likewise.
1642 * linux-x86-low.c (x86_linux_new_thread): Likewise.
1643 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
1644
cff068da
GB
16452015-03-24 Gary Benson <gbenson@redhat.com>
1646
1647 * linux-low.c (ptid_of_lwp): New function.
1648 (lwp_is_stopped): Likewise.
1649 (lwp_stop_reason): Likewise.
1650 * linux-x86-low.c (update_debug_registers_callback):
1651 Use lwp_is_stopped.
1652 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
1653 lwp_stop_reason.
1654
b2f7c7e8
GB
16552015-03-24 Gary Benson <gbenson@redhat.com>
1656
1657 * linux-low.h (linux_stop_lwp): Remove declaration.
1658
6d4ee8c6
GB
16592015-03-24 Gary Benson <gbenson@redhat.com>
1660
1661 * linux-low.h: Include nat/linux-nat.h.
1662 * linux-low.c (iterate_over_lwps_args): New structure.
1663 (iterate_over_lwps_filter): New function.
1664 (iterate_over_lwps): Likewise.
1665 * linux-x86-low.c (update_debug_registers_callback):
1666 Update signature to what iterate_over_lwps expects.
1667 Remove PID check that iterate_over_lwps now performs.
1668 (x86_dr_low_set_addr): Use iterate_over_lwps.
1669 (x86_dr_low_set_control): Likewise.
1670
70a0bb6b
GB
16712015-03-24 Gary Benson <gbenson@redhat.com>
1672
1673 * linux-x86-low.c (x86_debug_reg_state): New function.
1674 (x86_linux_prepare_to_resume): Use the above.
1675
7b669087
GB
16762015-03-24 Gary Benson <gbenson@redhat.com>
1677
1678 * linux-low.c (current_lwp_ptid): New function.
1679 * linux-x86-low.c: Include nat/linux-nat.h.
1680 (x86_dr_low_get_addr): Use current_lwp_ptid.
1681 (x86_dr_low_get_control): Likewise.
1682 (x86_dr_low_get_status): Likewise.
1683
eef49a3d
PA
16842015-03-20 Pedro Alves <palves@redhat.com>
1685
1686 * tracepoint.c (cmd_qtstatus): Make "str" const.
1687
b2333d22
PA
16882015-03-20 Pedro Alves <palves@redhat.com>
1689
1690 * server.c (handle_general_set): Make "req_str" const.
1691
23f238d3
PA
16922015-03-19 Pedro Alves <palves@redhat.com>
1693
1694 * linux-low.c (linux_resume_one_lwp): Rename to ...
1695 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
1696 instead call perror_with_name.
1697 (check_ptrace_stopped_lwp_gone): New function.
1698 (linux_resume_one_lwp): Reimplement as wrapper around
1699 linux_resume_one_lwp_throw that swallows errors if the LWP is
1700 gone.
1701
91baf43f
PA
17022015-03-19 Pedro Alves <palves@redhat.com>
1703
1704 * linux-low.c (count_events_callback, select_event_lwp_callback):
1705 No longer check whether the thread has resume_stop as last resume
1706 kind.
1707
8bf3b159
PA
17082015-03-19 Pedro Alves <palves@redhat.com>
1709
1710 * linux-low.c (count_events_callback, select_event_lwp_callback):
1711 Use the lwp's status_pending_p field, not the thread's.
1712
b90fc188
PA
17132015-03-19 Pedro Alves <palves@redhat.com>
1714
1715 * linux-low.c (select_event_lwp_callback): Update comments to
1716 no longer mention SIGTRAP.
1717
464b0089
GB
17182015-03-18 Gary Benson <gbenson@redhat.com>
1719
1720 * server.c (handle_query): Do not report vFile:fstat as supported.
1721
aa9e327f
GB
17222015-03-11 Gary Benson <gbenson@redhat.com>
1723
1724 * hostio.c (sys/types.h): New include.
1725 (sys/stat.h): Likewise.
1726 (common-remote-fileio.h): Likewise.
1727 (handle_fstat): New function.
1728 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 1729
791c0056
GB
17302015-03-11 Gary Benson <gbenson@redhat.com>
1731
1732 * configure.ac (AC_CHECK_MEMBERS): Add checks for
1733 struct stat.st_blocks and struct stat.st_blksize.
1734 * configure: Regenerate.
1735 * config.in: Likewise.
1736 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
1737 (OBS): Add common-remote-fileio.o.
1738 (common-remote-fileio.o): New rule.
1739
9a9df970
PA
17402015-03-09 Pedro Alves <palves@redhat.com>
1741
1742 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
1743 'struct sockaddr' pointer in 'accept' call.
1744
9eb1356e
PA
17452015-03-09 Pedro Alves <palves@redhat.com>
1746
1747 Revert:
1748 2015-03-07 Pedro Alves <palves@redhat.com>
1749 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
1750 or <winsock2.h> here. Instead include "gdb_socket.h".
1751 (remote_open): Use union gdb_sockaddr_u.
1752 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
1753 or <winsock2.h> here. Instead include "gdb_socket.h".
1754 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
1755 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
1756 or <sys/un.h>.
1757 (init_named_socket, gdb_agent_helper_thread): Use union
1758 gdb_sockaddr_u.
1759
aac331e4
PA
17602015-03-07 Pedro Alves <palves@redhat.com>
1761
1762 * configure.ac (build_warnings): Move
1763 -Wdeclaration-after-statement to the C-specific set.
1764 * configure: Regenerate.
1765
366c75fc
PA
17662015-03-07 Pedro Alves <palves@redhat.com>
1767
1768 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
1769 or <winsock2.h> here. Instead include "gdb_socket.h".
1770 (remote_open): Use union gdb_sockaddr_u.
1771 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
1772 or <winsock2.h> here. Instead include "gdb_socket.h".
1773 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
1774 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
1775 or <sys/un.h>.
1776 (init_named_socket, gdb_agent_helper_thread): Use union
1777 gdb_sockaddr_u.
1778
492d29ea
PA
17792015-03-07 Pedro Alves <palves@redhat.com>
1780
1781 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
1782 instead.
1783
60a191ed
YQ
17842015-03-06 Yao Qi <yao.qi@linaro.org>
1785
1786 * linux-aarch64-low.c (aarch64_insert_point): Use
1787 show_debug_regs as a boolean.
1788 (aarch64_remove_point): Likewise.
1789
f5771b1d
PA
17902015-03-05 Pedro Alves <palves@redhat.com>
1791
1792 * lynx-low.c (lynx_target_ops): Install NULL hooks for
1793 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
1794 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
1795 * nto-low.c (nto_target_ops): Likewise.
1796 * spu-low.c (spu_target_ops): Likewise.
1797 * win32-low.c (win32_target_ops): Likewise.
1798
3e572f71
PA
17992015-03-04 Pedro Alves <palves@redhat.com>
1800
72f4393d 1801 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
1802 Decide whether a breakpoint triggered based on the SIGTRAP's
1803 siginfo.si_code.
72f4393d
L
1804 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
1805 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
1806 (linux_low_filter_event): Check for breakpoints before checking
1807 watchpoints.
1808 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
1809 siginfo.si_code.
72f4393d
L
1810 (linux_stopped_by_sw_breakpoint)
1811 (linux_supports_stopped_by_sw_breakpoint)
1812 (linux_stopped_by_hw_breakpoint)
1813 (linux_supports_stopped_by_hw_breakpoint): New functions.
1814 (linux_target_ops): Install new target methods.
3e572f71 1815
1ec68e26
PA
18162015-03-04 Pedro Alves <palves@redhat.com>
1817
1818 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
1819 * server.c (swbreak_feature, hwbreak_feature): New globals.
1820 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
1821 (captured_main): Clear swbreak_feature and hwbreak_feature.
1822 * server.h (swbreak_feature, hwbreak_feature): Declare.
1823 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
1824 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
1825 supports_stopped_by_hw_breakpoint>: New fields.
1826 (target_supports_stopped_by_sw_breakpoint)
1827 (target_stopped_by_sw_breakpoint)
1828 (target_supports_stopped_by_hw_breakpoint)
1829 (target_stopped_by_hw_breakpoint): Declare.
1830
15c66dd6
PA
18312015-03-04 Pedro Alves <palves@redhat.com>
1832
1833 enum lwp_stop_reason -> enum target_stop_reason
1834 * linux-low.c (check_stopped_by_breakpoint): Adjust.
1835 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
1836 (linux_wait_1, stuck_in_jump_pad_callback)
1837 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
1838 (linux_stopped_by_watchpoint):
1839 * linux-low.h (enum lwp_stop_reason): Delete.
1840 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
1841 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
1842
98fc70d6
YQ
18432015-03-04 Yao Qi <yao.qi@linaro.org>
1844
1845 * Makefile.in (SFILES): Add linux-aarch64-low.c.
1846
dd2ac174
GB
18472015-03-03 Gary Benson <gbenson@redhat.com>
1848
1849 * hostio.c (handle_vFile): Fix prefix lengths.
1850
d68e53f4
MM
18512015-03-03 Markus Metzger <markus.t.metzger@intel.com>
1852
1853 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
1854 ptr_bits.
1855
bf2d68ab
AA
18562015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
1857
1858 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
1859 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
1860 (clean): Add "rm -f" for above C files.
1861 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
1862 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
1863 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
1864 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
1865 * linux-s390-low.c (HWCAP_S390_VX): New macro.
1866 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
1867 (init_registers_s390x_vx_linux64)
1868 (init_registers_s390x_tevx_linux64)
1869 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
1870 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
1871 declarations.
1872 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
1873 (s390_store_vxrs_high): New functions.
1874 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
1875 NT_S390_VXRS_HIGH.
1876 (s390_arch_setup): Add logic for selecting one of the new target
1877 descriptions. Activate the new vector regsets if applicable.
1878 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
1879 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
1880 and init_registers_s390x_tevx_linux64.
1881
c966a859
PA
18822015-03-01 Pedro Alves <palves@redhat.com>
1883
1884 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
1885 parameter.
1886
4180215b
PA
18872015-02-27 Pedro Alves <palves@redhat.com>
1888
1889 * linux-x86-low.c (u_debugreg_offset): New function.
1890 (x86_linux_dr_get, x86_linux_dr_set): Use it.
1891
749bab01
PA
18922015-02-27 Pedro Alves <palves@redhat.com>
1893
1894 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
1895 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
1896 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
1897 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
1898 (ps_lsetfpregs, ps_getpid)
1899 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
1900 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
1901 (ps_lsetxregs, ps_plog): Declare.
1902
3c14e5a3
PA
19032015-02-27 Pedro Alves <palves@redhat.com>
1904
1905 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
1906 IP_AGENT_EXPORT_FUNC.
1907 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
1908 IP_AGENT_EXPORT_FUNC.
1909 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
1910 (IP_AGENT_EXPORT): Delete.
1911 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
1912 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
1913 (gdb_trampoline_buffer_error, collecting, gdb_collect)
1914 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
1915 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
1916 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
1917 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
1918 (traceframe_read_count, traceframe_write_count)
1919 (traceframes_created, trace_state_variables, get_raw_reg)
1920 (get_trace_state_variable_value, set_trace_state_variable_value)
1921 (ust_loaded, helper_thread_id, cmd_buf): Use
1922 IPA_SYM_EXPORTED_NAME.
1923 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
1924 (tracepoints) Use IP_AGENT_EXPORT_VAR.
1925 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
1926 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
1927 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
1928 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
1929 EXTERN_C_PUSH/EXTERN_C_POP.
1930 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
1931 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
1932 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
1933 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
1934 (traceframe_write_count, traceframe_read_count)
1935 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
1936 (about_to_request_buffer_space, get_trace_state_variable_value)
1937 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
1938 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
1939 EXTERN_C_PUSH/EXTERN_C_POP.
1940 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
1941 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
1942 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
1943 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
1944 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
1945 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
1946 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
1947 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
1948 Define.
1949 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
1950 (IP_AGENT_EXPORT_VAR_DECL): Define.
1951 (tracing): Declare.
1952 (gdb_agent_get_raw_reg): Declare.
1953
fe978cb0
PA
19542015-02-27 Tom Tromey <tromey@redhat.com>
1955 Pedro Alves <palves@redhat.com>
1956
1957 Rename symbols whose names are reserved C++ keywords throughout.
1958
3bc3d82a
PA
19592015-02-27 Pedro Alves <palves@redhat.com>
1960
1961 * Makefile.in (COMPILER): New, get it from autoconf.
1962 (CXX): Get from autoconf instead.
1963 (COMPILE.pre): Use COMPILER.
1964 (CC-LD): Rename to ...
1965 (CC_LD): ... this. Use COMPILER.
1966 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
1967 (CXX_FOR_TARGET): Default to g++ instead of gcc.
1968 * acinclude.m4: Include build-with-cxx.m4.
1969 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
1970 Disable -Werror by default if building in C++ mode.
1971 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
1972 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
1973 the C++ compiler. Save/restore CXXFLAGS too.
1974 * configure: Regenerate.
1975
07697489
PA
19762015-02-27 Pedro Alves <palves@redhat.com>
1977
1978 * acinclude.m4: Include libiberty.m4.
1979 * configure.ac: Call libiberty_INIT.
1980 * config.in, configure: Regenerate.
1981
9beb7c4e
PA
19822015-02-26 Pedro Alves <palves@redhat.com>
1983
1984 * linux-low.c (linux_wait_1): When incrementing the PC past a
1985 program breakpoint always use the_low_target.breakpoint_len as
1986 increment, rather than the maximum between that and
1987 the_low_target.decr_pc_after_break.
1988
8090aef2
PA
19892015-02-23 Pedro Alves <palves@redhat.com>
1990
1991 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
1992 thread was doing a step-over; always adjust the PC if
1993 we stepped over a permanent breakpoint.
1994 (linux_wait_1): If we stepped over breakpoint that was on top of a
1995 permanent breakpoint, manually advance the PC past it.
1996
bc9540e8
PA
19972015-02-23 Pedro Alves <palves@redhat.com>
1998
1999 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
2000 modes.
2001 (x86_fill_gregset, x86_store_gregset): Use it when handling
2002 $orig_eax.
2003
2db9a427
PA
20042015-02-20 Pedro Alves <palves@redhat.com>
2005
2006 * thread-db.c: Include "nat/linux-procfs.h".
2007 (thread_db_init): Skip listing new threads if the kernel supports
2008 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
2009
afa8d396
PA
20102015-02-20 Pedro Alves <palves@redhat.com>
2011
2012 * linux-low.c (status_pending_p_callback): Use ptid_match.
2013
c9587f88
AT
20142015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
2015
2016 PR breakpoints/16812
2017 * linux-low.c (wstatus_maybe_breakpoint): Remove.
2018 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
2019 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
2020
b05ec7a5
AT
20212015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
2022
2023 PR breakpoints/15956
2024 * tracepoint.c (cmd_qtinit): Add check for current_thread.
2025
d33501a5
MM
20262015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2027
2028 * linux-low.c (linux_low_btrace_conf): Print size.
2029 * server.c (handle_btrace_conf_general_set): New.
2030 (hanle_general_set): Call handle_btrace_conf_general_set.
2031 (handle_query): Report Qbtrace-conf:bts:size as supported.
2032
f4abbc16
MM
20332015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2034
2035 * linux-low.c (linux_low_enable_btrace): Update parameters.
2036 (linux_low_btrace_conf): New.
2037 (linux_target_ops)<to_btrace_conf>: Initialize.
2038 * server.c (current_btrace_conf): New.
2039 (handle_btrace_enable): Rename to ...
2040 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
2041 to target_enable_btrace. Update comment. Update users.
2042 (handle_qxfer_btrace_conf): New.
2043 (qxfer_packets): Add btrace-conf entry.
2044 (handle_query): Report qXfer:btrace-conf:read as supported packet.
2045 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
2046 (target_ops)<read_btrace_conf>: New.
2047 (target_enable_btrace): Update parameters.
2048 (target_read_btrace_conf): New.
2049
043c3577
MM
20502015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2051
2052 * server.c (handle_btrace_general_set): Remove call to
2053 target_supports_btrace.
2054 (supported_btrace_packets): New.
2055 (handle_query): Call supported_btrace_packets.
2056 * target.h: include btrace-common.h.
2057 (btrace_target_info): Removed.
2058 (supports_btrace, target_supports_btrace): Update parameters.
2059
734b0e4b
MM
20602015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2061
2062 * Makefile.in (SFILES): Add common/btrace-common.c.
2063 (OBS): Add common/btrace-common.o.
2064 (btrace-common.o): Add build rules.
2065 * linux-low: Include btrace-common.h.
2066 (linux_low_read_btrace): Use struct btrace_data. Call
2067 btrace_data_init and btrace_data_fini.
2068
d6c146e9
PA
20692015-02-06 Pedro Alves <palves@redhat.com>
2070
2071 * thread-db.c (find_new_threads_callback): Add debug output.
2072
20ba1ce6
PA
20732015-02-04 Pedro Alves <palves@redhat.com>
2074
2075 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
2076 (resume_stopped_resumed_lwps): New function.
2077 (linux_wait_for_event_filtered): Use it.
2078
8cc73a39
SDJ
20792015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
2080
2081 * Makefile.in (SFILES): Add linux-personality.c.
2082 (linux-personality.o): New rule.
2083 * configure.srv (srv_linux_obj): Add linux-personality.o to the
2084 list of objects to be built.
2085 * linux-low.c: Include nat/linux-personality.h.
2086 (linux_create_inferior): Remove code to disable address space
2087 randomization (moved to ../nat/linux-personality.c). Create
2088 cleanup to disable address space randomization.
2089
fb23d554
SDJ
20902015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
2091
2092 * Makefile.in (posix-strerror.o): New rule.
2093 (mingw-strerror.o): Likewise.
2094 * configure: Regenerated.
2095 * configure.ac: Source file ../common/common.host. Initialize new
2096 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
2097
cdf43629
YQ
20982015-01-14 Yao Qi <yao@codesourcery.com>
2099
2100 * Makefile.in (SFILES): Add nat/ppc-linux.c.
2101 (ppc-linux.o): New rule.
2102 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
2103 * configure.ac: AC_CHECK_FUNCS(getauxval).
2104 * config.in: Re-generated.
2105 * configure: Re-generated.
2106 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
2107 ppc64_64bit_inferior_p
2108
514c5338
YQ
21092015-01-14 Yao Qi <yao@codesourcery.com>
2110
2111 * linux-ppc-low.c: Include "nat/ppc-linux.h".
2112 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
2113 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
2114 (PT_ORIG_R3, PT_TRAP): Likewise.
2115 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
2116 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
2117 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
2118
3368c1e5
JB
21192015-01-10 Joel Brobecker <brobecker@adacore.com>
2120
2121 * i387-fp.c (i387_cache_to_xsave): In look over
2122 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
2123 zmmh_low_space field by use of zmmh_high_space.
2124
582511be
PA
21252015-01-09 Pedro Alves <palves@redhat.com>
2126
2127 * linux-low.c (step_over_bkpt): Move higher up in the file.
2128 (handle_extended_wait): Don't store the stop_pc here.
2129 (get_stop_pc): Adjust comments and rename to ...
2130 (check_stopped_by_breakpoint): ... this. Record whether the LWP
2131 stopped for a software breakpoint or hardware breakpoint.
2132 (thread_still_has_status_pending_p): New function.
2133 (status_pending_p_callback): Use
2134 thread_still_has_status_pending_p. If the event is no longer
2135 interesting, resume the LWP.
2136 (handle_tracepoints): Add assert.
2137 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
2138 (wstatus_maybe_breakpoint): New function.
2139 (cancel_breakpoint): Delete function.
2140 (check_stopped_by_watchpoint): New function, factored out from
2141 linux_low_filter_event.
2142 (lp_status_maybe_breakpoint): Delete function.
2143 (linux_low_filter_event): Remove filter_ptid argument.
2144 Leave thread group exits pending here. Store the LWP's stop PC.
2145 Always leave events pending.
2146 (linux_wait_for_event_filtered): Pull all events out of the
2147 kernel, and leave them all pending.
2148 (count_events_callback, select_event_lwp_callback): Consider all
2149 events.
2150 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
2151 (select_event_lwp): Only give preference to the stepping LWP in
2152 all-stop mode. Adjust comments.
2153 (ignore_event): New function.
2154 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
2155 references to cancel_breakpoints. Adjust to renames. Also give
2156 equal priority to all LWPs that have had events in non-stop mode.
2157 If reporting a software breakpoint event, unadjust the LWP's PC.
2158 (linux_wait): If linux_wait_1 returned an ignored event, retry.
2159 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
2160 Adjust.
2161 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
2162 (resume_status_pending_p): Use thread_still_has_status_pending_p.
2163 (linux_stopped_by_watchpoint): Adjust.
2164 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
2165 * linux-low.h (enum lwp_stop_reason): New.
2166 (struct lwp_info) <stop_pc>: Adjust comment.
2167 <stopped_by_watchpoint>: Delete field.
2168 <stop_reason>: New field.
2169 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
2170 * mem-break.c (software_breakpoint_inserted_here)
2171 (hardware_breakpoint_inserted_here): New function.
2172 * mem-break.h (software_breakpoint_inserted_here)
2173 (hardware_breakpoint_inserted_here): Declare.
2174 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
2175 (cancel_breakpoints): Delete.
2176 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
2177 (upload_fast_traceframes): Remove references to
2178 cancel_breakpoints.
2179
a33e3959
PA
21802015-01-09 Pedro Alves <palves@redhat.com>
2181
2182 * thread-db.c (find_new_threads_callback): Ignore thread if the
2183 kernel thread ID is -1.
2184
8784d563
PA
21852015-01-09 Pedro Alves <palves@redhat.com>
2186
2187 * linux-low.c (linux_attach_fail_reason_string): Move to
2188 nat/linux-ptrace.c, and rename.
2189 (linux_attach_lwp): Update comment.
2190 (attach_proc_task_lwp_callback): New function.
2191 (linux_attach): Adjust to rename and use
2192 linux_proc_attach_tgid_threads.
2193 (linux_attach_fail_reason_string): Delete declaration.
2194
76f2b779
JB
21952015-01-01 Joel Brobecker <brobecker@adacore.com>
2196
2197 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
2198 * server.c (gdbserver_version): Likewise.
2199
fafcc06a
SDJ
22002014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
2201
2202 * remote-utils.c: Include ctype.h.
2203 (input_interrupt): Explicitly handle the case when the char
2204 received is the NUL byte. Improve the printing of non-ASCII
2205 characters.
2206
beed38b8
JB
22072014-12-16 Joel Brobecker <brobecker@adacore.com>
2208
2209 * linux-low.c (linux_low_filter_event): Update call to
2210 linux_enable_event_reporting following the addition of
2211 a new parameter to that function.
2212
bf330350
CU
22132014-12-16 Catalin Udma <catalin.udma@freescale.com>
2214
2215 PR server/17457
2216 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
2217 (AARCH64_FPCR_REGNO): Likewise.
2218 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
2219 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
2220 (aarch64_store_fpregset): Likewise.
2221
5227d625
JB
22222014-12-15 Joel Brobecker <brobecker@adacore.com>
2223
2224 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
2225 Remove FIXME comment about assumption about N.
2226
f93b65a0
JB
22272014-12-13 Joel Brobecker <brobecker@adacore.com>
2228
2229 * configure.ac: If large-file support is disabled in GDBserver,
2230 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
2231 * configure: Regenerate.
2232
e5a9158d
AA
22332014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2234
2235 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
2236 warning upon ENODATA from ptrace.
2237 * linux-s390-low.c (s390_store_tdb): New.
2238 (s390_regsets): Add regset for NT_S390_TDB.
2239
feea5f36
AA
22402014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2241
2242 * linux-low.c (regsets_store_inferior_registers): Skip regsets
2243 without a fill_function.
2244 * linux-s390-low.c (s390_fill_last_break): Remove.
2245 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
2246 (s390_arch_setup): Use regset's size instead of fill_function for
2247 loop end condition.
2248
098dbe61
AA
22492014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2250
2251 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
2252 the regset's store function when ptrace returned an error.
2253 * regcache.c (get_thread_regcache): Invalidate register cache
2254 before fetching inferior's registers.
2255
28eef672
AA
22562014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2257
2258 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
2259 while-loop as for-loop.
2260 (regsets_store_inferior_registers): Likewise.
2261
bdca27a2
YQ
22622014-11-28 Yao Qi <yao@codesourcery.com>
2263
2264 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
2265 * config.in, configure: Re-generate.
2266 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
2267 is defined.
2268
9c232dda
YQ
22692014-11-21 Yao Qi <yao@codesourcery.com>
2270
2271 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
2272 (AC_CHECK_HEADERS): Remove malloc.h.
2273 * configure: Re-generated.
2274 * config.in: Re-generated.
2275 * server.h: Don't include alloca.h and malloc.h.
2276 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
2277 Don't include malloc.h.
2278
43968415
JB
22792014-11-17 Joel Brobecker <brobecker@adacore.com>
2280
2281 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
2282 corresponding ERRNO check in same block.
2283
40e91bc7
PA
22842014-11-12 Pedro Alves <palves@redhat.com>
2285
2286 * server.c (cont_thread): Update comment.
2287 (start_inferior, attach_inferior): No longer clear cont_thread.
2288 (handle_v_cont): No longer set cont_thread.
2289 (captured_main): Clear cont_thread each time a GDB connects.
2290
c2c118cf
PA
22912014-11-12 Pedro Alves <palves@redhat.com>
2292
2293 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
2294 thread, and don't resume all threads if the Hc thread has exited.
2295
78708b7c
PA
22962014-11-12 Pedro Alves <palves@redhat.com>
2297
2298 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
2299 the process group instead of to a specific LWP.
2300
a2abc7de
PA
23012014-10-15 Pedro Alves <palves@redhat.com>
2302
2303 PR server/17487
2304 * win32-arm-low.c (arm_set_thread_context): Remove current_event
2305 parameter.
2306 (arm_set_thread_context): Delete.
2307 (the_low_target): Adjust.
2308 * win32-i386-low.c (debug_registers_changed)
2309 (debug_registers_used): Delete.
2310 (update_debug_registers_callback): New function.
2311 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
2312 needing to update their debug registers.
2313 (win32_get_current_dr): New function.
2314 (x86_dr_low_get_addr, x86_dr_low_get_control)
2315 (x86_dr_low_get_status): Fetch the debug register from the thread
2316 record's context.
2317 (i386_initial_stuff): Adjust.
2318 (i386_get_thread_context): Remove current_event parameter. Don't
2319 clear debug_registers_changed nor copy DR values to
2320 debug_reg_state.
2321 (i386_set_thread_context): Delete.
2322 (i386_prepare_to_resume): New function.
2323 (i386_thread_added): Mark the thread as needing to update irs
2324 debug registers.
2325 (the_low_target): Remove i386_set_thread_context and install
2326 i386_prepare_to_resume.
2327 * win32-low.c (win32_get_thread_context): Adjust.
2328 (win32_set_thread_context): Use SetThreadContext
2329 directly.
2330 (win32_prepare_to_resume): New function.
2331 (win32_require_context): New function, factored out from ...
2332 (thread_rec): ... this.
2333 (continue_one_thread): Call win32_prepare_to_resume on each thread
2334 we're about to continue.
2335 (win32_resume): Call win32_prepare_to_resume on the event thread.
2336 * win32-low.h (struct win32_thread_info)
2337 <debug_registers_changed>: New field.
2338 (struct win32_target_ops): Change prototype of set_thread_context,
2339 delete set_thread_context and add prepare_to_resume.
2340 (win32_require_context): New declaration.
2341
a442d071
GB
23422014-10-08 Gary Benson <gbenson@redhat.com>
2343
2344 * server.h: Do not include common-exceptions.h.
2345
6f1947e8
GB
23462014-10-08 Gary Benson <gbenson@redhat.com>
2347
2348 * server.h: Do not include cleanups.h.
2349
63b434a4
JH
23502014-09-30 James Hogan <james.hogan@imgtec.com>
2351
2352 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
2353 mips64-dsp-linux.c.
2354
c4d9ceb6
YQ
23552014-09-23 Yao Qi <yao@codesourcery.com>
2356
2357 * linux-low.c (lp_status_maybe_breakpoint): New function.
2358 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
2359 (count_events_callback): Likewise.
2360 (select_event_lwp_callback): Likewise.
2361 (cancel_breakpoints_callback): Likewise.
2362
89a5711c
DB
23632014-09-19 Don Breazeal <donb@codesourcery.com>
2364
2365 * linux-low.c (handle_extended_wait): Call
2366 linux_ptrace_get_extended_event.
2367 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
2368 linux_is_extended_waitstatus.
2369
bffc0964
JB
23702014-09-16 Joel Brobecker <brobecker@adacore.com>
2371
2372 * Makefile.in (CPPFLAGS): Define.
2373 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
2374 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
2375
0bfdf32f
GB
23762014-09-16 Gary Benson <gbenson@redhat.com>
2377
2378 * inferiors.h (current_inferior): Renamed as...
2379 (current_thread): New variable. All uses updated.
2380 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
2381 (maybe_move_out_of_jump_pad): Likewise.
2382 (cancel_breakpoint): Likewise.
2383 (linux_low_filter_event): Likewise.
2384 (wait_for_sigstop): Likewise.
2385 (linux_resume_one_lwp): Likewise.
2386 (need_step_over_p): Likewise.
2387 (start_step_over): Likewise.
2388 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
2389 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
2390 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
2391 and save_inferior as saved_thread.
2392 * regcache.c (get_thread_regcache): Renamed saved_inferior as
2393 saved_thread.
2394 (regcache_invalidate_thread): Likewise.
2395 * remote-utils.c (prepare_resume_reply): Likewise.
2396 * thread-db.c (thread_db_get_tls_address): Likewise.
2397 (disable_thread_event_reporting): Likewise.
2398 (remove_thread_event_breakpoints): Likewise.
2399 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
2400 as saved_thread.
2401 * target.h (set_desired_inferior): Renamed as...
2402 (set_desired_thread): New declaration. All uses updated.
2403 * server.c (myresume): Updated comment to reference thread instead
2404 of inferior.
2405 (handle_serial_event): Likewise.
2406 (handle_target_event): Likewise.
2407
361c8ade
GB
24082014-09-12 Tom Tromey <tromey@redhat.com>
2409 Gary Benson <gbenson@redhat.com>
2410
2411 * regcache.h: Include common-regcache.h.
2412 (regcache_read_pc): Don't declare.
2413 * regcache.c (get_thread_regcache_for_ptid): New function.
2414
bd9269f7
GB
24152014-09-11 Tom Tromey <tromey@redhat.com>
2416 Gary Benson <gbenson@redhat.com>
2417
2418 * symbol.c: New file.
2419 * Makefile.in (SFILES): Add symbol.c.
2420 (OBS): Add symbol.o.
2421
f8c1d06b
GB
24222014-09-11 Gary Benson <gbenson@redhat.com>
2423
2424 * target.c (target_stop_ptid, target_continue_ptid): New
2425 functions.
2426
721ec300
GB
24272014-09-11 Tom Tromey <tromey@redhat.com>
2428 Gary Benson <gbenson@redhat.com>
2429
2430 * target.h: Include target/target.h.
2431 * target.c (target_read_memory, target_read_uint32)
2432 (target_write_memory): New functions.
2433
c5e92cca
GB
24342014-09-11 Gary Benson <gbenson@redhat.com>
2435
2436 * server.h (debug_hw_points): Don't declare.
2437 * server.c (debug_hw_points): Don't define. Replace all uses
2438 with show_debug_regs.
2439 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
2440 all uses with show_debug_regs.
2441
2e4bb98a
EBM
24422014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
2443
2444 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
2445 endianness into account.
2446 (ppc_supply_ptrace_register): Likewise.
2447
ac740bc7
JH
24482014-09-03 James Hogan <james.hogan@imgtec.com>
2449
2450 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
2451 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
2452
97ea6506
GB
24532014-09-03 Gary Benson <gbenson@redhat.com>
2454
2455 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
2456 ALL_DEBUG_ADDRESS_REGISTERS.
2457
df7e5265
GB
24582014-09-02 Gary Benson <gbenson@redhat.com>
2459
2460 * i386-low.h: Renamed as...
2461 * x86-low.h: New file. All type, function and variable name
2462 prefixes changed from "i386_" to "x86_". All references updated.
2463 * i386-low.c: Renamed as...
2464 * x86-low.c: New file. All type, function and variable name
2465 prefixes changed from "i386_" to "x86_". All references updated.
2466
ed859da7
GB
24672014-09-02 Gary Benson <gbenson@redhat.com>
2468
2469 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
2470 (x86_linux_new_thread): Likewise.
2471
860789c7
GB
24722014-08-29 Gary Benson <gbenson@redhat.com>
2473
2474 * server.h (setjmp.h): Do not include.
2475 (toplevel): Do not declare.
2476 (common-exceptions.h): Include.
2477 (cleanups.h): Likewise.
2478 * server.c (toplevel): Do not define.
2479 (exit_code): New static global.
2480 (detach_or_kill_for_exit_cleanup): New function.
2481 (main): New function. Original main renamed to...
2482 (captured_main): New function.
2483 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
2484
ff55e1b5
GB
24852014-08-29 Gary Benson <gbenson@redhat.com>
2486
2487 * Makefile.in (SFILES): Add common/common-exceptions.c.
2488 (OBS): Add common-exceptions.o.
2489 (common-exceptions.o): New rule.
2490 * utils.c (prepare_to_throw_exception): New function.
2491
e9bcb658
GB
24922014-08-29 Gary Benson <gbenson@redhat.com>
2493
2494 * config.in: Regenerate.
2495 * configure: Likewise.
2496
e3180625
GB
24972014-08-29 Gary Benson <gbenson@redhat.com>
2498
2499 * Makefile.in (SFILES): Add common/cleanups.c.
2500 (OBS): cleanups.o.
2501 (cleanups.o): New rule.
2502
e3d6ba5d
GB
25032014-08-29 Gary Benson <gbenson@redhat.com>
2504
2505 * utils.c (internal_vwarning): New function.
2506
7096e886
GB
25072014-08-28 Gary Benson <gbenson@redhat.com>
2508
2509 * utils.h (fatal): Remove declaration.
2510 * utils.c (fatal): Remove function.
2511
14ce3192
GB
25122014-08-28 Gary Benson <gbenson@redhat.com>
2513
2514 * tracepoint.c (gdb_agent_init): Replace fatal with
2515 perror_with_name.
2516 (initialize_tracepoint): Likewise.
2517
50278d59
GB
25182014-08-28 Gary Benson <gbenson@redhat.com>
2519
2520 * remote-utils.c (remote_prepare): Replace fatal with error.
2521
aa96c426
GB
25222014-08-28 Gary Benson <gbenson@redhat.com>
2523
2524 * linux-low.c (linux_async): Replace fatal with warning.
2525 Tidy up and return.
2526 (linux_start_non_stop): Return -1 if linux_async failed.
2527
f7160e97
GB
25282014-08-28 Gary Benson <gbenson@redhat.com>
2529
2530 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
2531 gdb_assert.
2532 (i386_dr_low_get_addr): Remove vague comment.
2533 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
2534 gdb_assert.
2535
38e08fca
GB
25362014-08-28 Gary Benson <gbenson@redhat.com>
2537
2538 * inferiors.c (get_thread_process): Replace check with gdb_assert.
2539 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
2540 internal_error.
2541 (linux_resume_one_lwp): Likewise.
2542 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
2543 gdb_assert.
2544 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
2545 with internal_error.
2546 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
2547 (init_register_cache): Replace fatal with gdb_assert_not_reached.
2548 (find_register_by_name): Replace fatal with internal_error.
2549 (find_regno): Likewise.
2550 * tdesc.c (init_target_desc): Replace check with gdb_assert.
2551 * thread-db.c (thread_db_create_event): Likewise.
2552 (thread_db_load_search): Likewise.
2553 (try_thread_db_load_1): Likewise.
2554 * tracepoint.c (get_jump_space_head): Replace fatal with
2555 internal_error.
2556 (claim_trampoline_space): Likewise.
2557 (have_fast_tracepoint_trampoline_buffer): Likewise.
2558 (cmd_qtstart): Likewise.
2559 (stop_tracing): Likewise.
2560 (fast_tracepoint_collecting): Likewise.
2561 (target_malloc): Likewise.
2562 (download_tracepoint): Likewise.
2563 (download_trace_state_variables): Replace check with gdb_assert.
2564 (upload_fast_traceframes): Replace fatal with internal_error.
2565
34abf635
GB
25662014-08-19 Tom Tromey <tromey@redhat.com>
2567 Gary Benson <gbenson@redhat.com>
2568
2569 * Makefile.in (SFILES): Add common/common-debug.c.
2570 (OBS): Add common-debug.o.
2571 (common-debug.o): New rule.
2572 * debug.h (debug_printf): Don't declare.
2573 * debug.c (debug_printf): Renamed and rewritten as...
2574 (debug_vprintf): New function.
2575
f6e94d78
GB
25762014-08-19 Gary Benson <gbenson@redhat.com>
2577
2578 * utils.h: Do not include print-utils.h.
2579
9239eeab
GB
25802014-08-19 Tom Tromey <tromey@redhat.com>
2581 Gary Benson <gbenson@redhat.com>
2582
2583 * server.h: Add static assertion.
2584 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
2585
ef87c8bb
GB
25862014-08-19 Tom Tromey <tromey@redhat.com>
2587 Gary Benson <gbenson@redhat.com>
2588
2589 * Makefile.in (SFILES): Add common/errors.c.
2590 (OBS): Add errors.o.
2591 (IPA_OBS): Add errors-ipa.o.
2592 (errors.o): New rule.
2593 (errors-ipa.o): Likewise.
2594 * utils.h (perror_with_name, error, warning): Don't declare.
2595 * utils.c (warning): Renamed and rewritten as...
2596 (vwarning): New function.
2597 (error): Renamed and rewritten as...
2598 (verror): New function.
2599 (internal_error): Renamed and rewritten as...
2600 (internal_verror): New function.
2601
bb974a24
GB
26022014-08-07 Gary Benson <gbenson@redhat.com>
2603
2604 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
2605 * configure: Regenerate.
2606 * config.in: Likewise.
2607 * server.h: Do not include errno.h.
2608 * event-loop.c: Likewise.
2609 * hostio-errno.c: Likewise.
2610 * linux-low.c: Likewise.
2611 * remote-utils.c: Likewise.
2612 * spu-low.c: Likewise.
2613 * utils.c: Likewise.
2614 * gdbreplay.c: Unconditionally include errno.h.
2615
6d3d12eb
GB
26162014-08-07 Gary Benson <gbenson@redhat.com>
2617
2618 * server.h: Do not include string.h.
2619 * event-loop.c: Likewise.
2620 * linux-low.c: Likewise.
2621 * regcache.c: Likewise.
2622 * remote-utils.c: Likewise.
2623 * spu-low.c: Likewise.
2624 * utils.c: Likewise.
2625
dccbb609
GB
26262014-08-07 Gary Benson <gbenson@redhat.com>
2627
2628 * server.h: Do not include gdb_assert.h.
2629
e76df0d0
GB
26302014-08-07 Gary Benson <gbenson@redhat.com>
2631
2632 * server.h: Do not include common-utils.h.
2633
4cb9c816
GB
26342014-08-07 Gary Benson <gbenson@redhat.com>
2635
2636 * server.h: Do not include ptid.h.
2637 * notif.h: Likewise.
2638
3995eeee
GB
26392014-08-07 Gary Benson <gbenson@redhat.com>
2640
2641 * server.h: Do not include gdb_locale.h.
2642
cb9f1a9b
GB
26432014-08-07 Gary Benson <gbenson@redhat.com>
2644
2645 * server.h: Do not include gdb/signals.h.
2646 * win32-low.c: Likewise.
2647
a5fceff8
GB
26482014-08-07 Gary Benson <gbenson@redhat.com>
2649
2650 * server.h: Do not include pathmax.h.
2651
b9391142
GB
26522014-08-07 Gary Benson <gbenson@redhat.com>
2653
2654 * server.h: Do not include libiberty.h.
2655 * linux-bfin-low.c: Likewise.
2656
0e443c87
GB
26572014-08-07 Gary Benson <gbenson@redhat.com>
2658
2659 * server.h: Do not include ansidecl.h.
2660
8ebb3f56
GB
26612014-08-07 Gary Benson <gbenson@redhat.com>
2662
2663 * linux-x86-low.c: Do not include stddef.h.
2664 * lynx-ppc-low.c: Likewise.
2665 * tracepoint.c: Likewise.
2666
8980bdf6
GB
26672014-08-07 Gary Benson <gbenson@redhat.com>
2668
2669 * server.h: Do not include stdarg.h.
2670 * nto-low.c: Likewise.
2671
d7096f71
GB
26722014-08-07 Gary Benson <gbenson@redhat.com>
2673
2674 * server.h: Do not include stdlib.h.
2675 * inferiors.c: Likewise.
2676 * linux-low.c: Likewise.
2677 * regcache.c: Likewise.
2678 * spu-low.c: Likewise.
2679 * tracepoint.c: Likewise.
2680 * utils.c: Likewise.
2681
d02f550d
GB
26822014-08-07 Gary Benson <gbenson@redhat.com>
2683
2684 * server.h: Do not include stdio.h.
2685 * linux-low.c: Likewise.
2686 * remote-utils.c: Likewise.
2687 * spu-low.c: Likewise.
2688 * utils.c: Likewise.
2689 * wincecompat.c: Likewise.
2690
87f6c4e3
GB
26912014-08-06 Gary Benson <gbenson@redhat.com>
2692
2693 * regcache.c (init_register_cache): Move conditionals inside if.
2694
7089dca4
GB
26952014-08-06 Gary Benson <gbenson@redhat.com>
2696
2697 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
2698
462f517e
GB
26992014-07-31 Gary Benson <gbenson@redhat.com>
2700
2701 * ax.h: Do not include server.h.
2702 * gdbthread.h: Likewise.
2703 * lynx-low.h: Likewise.
2704 * notif.h: Likewise.
2705
976411d6
GB
27062014-07-30 Gary Benson <gbenson@redhat.com>
2707
2708 * server.h: Include common-defs.h.
2709 Do not include config.h or build-gnulib-gdbserver/config.h.
2710
d41f6d8e
GB
27112014-07-30 Gary Benson <gbenson@redhat.com>
2712
2713 * hostio-errno.c: Move server.h to top of includes list.
2714 * inferiors.c: Likewise.
2715 * linux-x86-low.c: Likewise.
2716 * notif.c: Include server.h.
2717
314c6a35
TT
27182014-07-24 Tom Tromey <tromey@redhat.com>
2719 Gary Benson <gbenson@redhat.com>
2720
2721 * server.h (CORE_ADDR): Now unsigned.
2722
69ff6be5
PA
27232014-07-16 Pedro Alves <palves@redhat.com>
2724
2725 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
2726
ce9e3fe7
PA
27272014-07-15 Pedro Alves <palves@redhat.com>
2728
2729 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
2730 copy.
2731
e76126e8
PA
27322014-07-11 Pedro Alves <palves@redhat.com>
2733
2734 * linux-low.c (kill_wait_lwp): New function, based on
2735 kill_one_lwp_callback, but use my_waitpid directly.
2736 (kill_one_lwp_callback, linux_kill): Use it.
2737
8e9db26e
PA
27382014-06-23 Pedro Alves <palves@redhat.com>
2739
2740 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
2741 before setting DR0..DR3.
2742
698b3e08
GB
27432014-06-20 Gary Benson <gbenson@redhat.com>
2744
2745 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
2746 * configure: Regenerated.
2747 * config.in: Likewise.
2748
125f8a3d
GB
27492014-06-20 Gary Benson <gbenson@redhat.com>
2750
2751 * Makefile.in (SFILES): Update locations for files moved
2752 from common to nat.
2753 (object file files): Reordered.
2754
42995dbd
GB
27552014-06-20 Gary Benson <gbenson@redhat.com>
2756
2757 * i386-low.h (i386_dr_low_can_set_addr): Removed.
2758 (i386_dr_low_set_addr): Likewise.
2759 (i386_dr_low_get_addr): Likewise.
2760 (i386_dr_low_can_set_control): Likewise.
2761 (i386_dr_low_set_control): Likewise.
2762 (i386_dr_low_get_control): Likewise.
2763 (i386_dr_low_get_status): Likewise.
2764 (i386_get_debug_register_length): Likewise.
2765 * linux-x86-low.c (i386_dr_low_set_addr):
2766 Changed signature. Made static.
2767 (i386_dr_low_get_addr): Likewise.
2768 (i386_dr_low_set_control): Likewise.
2769 (i386_dr_low_get_control): Likewise.
2770 (i386_dr_low_get_status): Likewise.
2771 (i386_dr_low): New global variable.
2772 * win32-i386-low.c (i386_dr_low_set_addr):
2773 Changed signature. Made static.
2774 (i386_dr_low_get_addr): Likewise.
2775 (i386_dr_low_set_control): Likewise.
2776 (i386_dr_low_get_control): Likewise.
2777 (i386_dr_low_get_status): Likewise.
2778 (i386_dr_low): New global variable.
2779
e1d2394b
MS
27802014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
2781
2782 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
2783 * Makefile.in (AR, AR_FLAGS): Define.
2784 * configure: Regenerate.
2785
3a8ee006
GB
27862014-06-19 Gary Benson <gbenson@redhat.com>
2787
2788 * Makefile.in (i386-dregs.o): New rule.
2789 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
2790 * i386-low.c (target.h): Remove include.
2791 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
2792 (DR_CONTROL_SHIFT): Likewise.
2793 (DR_CONTROL_SIZE): Likewise.
2794 (DR_RW_EXECUTE): Likewise.
2795 (DR_RW_WRITE): Likewise.
2796 (DR_RW_READ): Likewise.
2797 (DR_RW_IORW): Likewise.
2798 (DR_LEN_1): Likewise.
2799 (DR_LEN_2): Likewise.
2800 (DR_LEN_4): Likewise.
2801 (DR_LEN_8): Likewise.
2802 (DR_LOCAL_ENABLE_SHIFT): Likewise.
2803 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
2804 (DR_ENABLE_SIZE): Likewise.
2805 (DR_LOCAL_SLOWDOWN): Likewise.
2806 (DR_GLOBAL_SLOWDOWN): Likewise.
2807 (DR_CONTROL_RESERVED): Likewise.
2808 (I386_DR_CONTROL_MASK): Likewise.
2809 (I386_DR_VACANT): Likewise.
2810 (I386_DR_LOCAL_ENABLE): Likewise.
2811 (I386_DR_GLOBAL_ENABLE): Likewise.
2812 (I386_DR_DISABLE): Likewise.
2813 (I386_DR_SET_RW_LEN): Likewise.
2814 (I386_DR_GET_RW_LEN): Likewise.
2815 (I386_DR_WATCH_HIT): Likewise.
2816 (i386_wp_op_t): Likewise.
2817 (i386_show_dr): Likewise.
2818 (i386_length_and_rw_bits): Likewise.
2819 (i386_insert_aligned_watchpoint): Likewise.
2820 (i386_remove_aligned_watchpoint): Likewise.
2821 (i386_handle_nonaligned_watchpoint): Likewise.
2822 i386_update_inferior_debug_regs(): Likewise.
2823 (i386_dr_insert_watchpoint): Likewise.
2824 (i386_dr_remove_watchpoint): Likewise.
2825 (i386_dr_region_ok_for_watchpoint): Likewise.
2826 (i386_dr_stopped_data_address): Likewise.
2827 (i386_dr_stopped_by_watchpoint): Likewise.
2828
8f26655c
GB
28292014-06-19 Gary Benson <gbenson@redhat.com>
2830
2831 * i386-low.c (i386_dr_show): Renamed to
2832 i386_show_dr and made static. All uses updated.
2833 (i386_dr_length_and_rw_bits): Renamed to
2834 i386_length_and_rw_bits and made static.
2835 All uses updated.
2836 (i386_dr_insert_aligned_watchpoint): Renamed to
2837 i386_insert_aligned_watchpoint and made static.
2838 All uses updated.
2839 (i386_dr_remove_aligned_watchpoint): Renamed to
2840 i386_remove_aligned_watchpoint and made static.
2841 All uses updated.
2842 (i386_dr_update_inferior_debug_regs): Renamed to
2843 i386_update_inferior_debug_regs and made static.
2844 All uses updated.
2845
b9228891
GB
28462014-06-18 Gary Benson <gbenson@redhat.com>
2847
5171def3
GB
2848 * i386-low.h (i386_dr_low_can_set_addr): New macro.
2849 (i386_dr_low_can_set_control): Likewise.
2850 (i386_get_debug_register_length): Likewise.
2851 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
2852 (i386_dr_low_can_set_control): Likewise.
2853 (i386_get_debug_register_length): Likewise.
2854
28552014-06-17 Gary Benson <gbenson@redhat.com>
2856
b9228891
GB
2857 * i386-low.h (i386-dregs.h): New include.
2858 (DR_FIRSTADDR): Now in i386-dregs.h.
2859 (DR_LASTADDR): Likewise.
2860 (DR_NADDR): Likewise.
2861 (DR_STATUS): Likewise.
2862 (DR_CONTROL): Likewise.
2863 (i386_debug_reg_state): Likewise.
2864 (i386_dr_insert_watchpoint): Likewise.
2865 (i386_dr_remove_watchpoint): Likewise.
2866 (i386_dr_region_ok_for_watchpoint): Likewise.
2867 (i386_dr_stopped_data_address): Likewise.
2868 (i386_dr_stopped_by_watchpoint): Likewise.
2869 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
2870
4be83cc2
GB
28712014-06-18 Gary Benson <gbenson@redhat.com>
2872
2873 * i386-low.h (i386_low_insert_watchpoint): Renamed to
2874 i386_dr_insert_watchpoint.
2875 (i386_low_remove_watchpoint): Renamed to
2876 i386_dr_remove_watchpoint.
2877 (i386_low_region_ok_for_watchpoint): Renamed to
2878 i386_dr_region_ok_for_watchpoint.
2879 (i386_low_stopped_data_address): Renamed to
2880 i386_dr_stopped_data_address.
2881 (i386_low_stopped_by_watchpoint): Renamed to
2882 i386_dr_stopped_by_watchpoint.
2883 * i386-low.c (i386_show_dr): Renamed to
2884 i386_dr_show and made nonstatic. All uses updated.
2885 (i386_length_and_rw_bits): Renamed to
2886 i386_dr_length_and_rw_bits and made nonstatic.
2887 All uses updated.
2888 (i386_insert_aligned_watchpoint): Renamed to
2889 i386_dr_insert_aligned_watchpoint and made nonstatic.
2890 All uses updated.
2891 (i386_remove_aligned_watchpoint): Renamed to
2892 i386_dr_remove_aligned_watchpoint and made nonstatic.
2893 All uses updated.
2894 (i386_update_inferior_debug_regs): Renamed to
2895 i386_dr_update_inferior_debug_regs and made nonstatic.
2896 All uses updated.
2897 (i386_low_insert_watchpoint): Renamed to
2898 i386_dr_insert_watchpoint. All uses updated.
2899 (i386_low_remove_watchpoint): Renamed to
2900 i386_dr_remove_watchpoint. All uses updated.
2901 (i386_low_region_ok_for_watchpoint): Renamed to
2902 i386_dr_region_ok_for_watchpoint. All uses updated.
2903 (i386_low_stopped_data_address): Renamed to
2904 i386_dr_stopped_data_address. All uses updated.
2905 (i386_low_stopped_by_watchpoint): Renamed to
2906 i386_dr_stopped_by_watchpoint. All uses updated.
2907
131aa0d4
GB
29082014-06-18 Gary Benson <gbenson@redhat.com>
2909
2910 * i386-low.c (i386_dr_low_can_set_addr): New macro.
2911 (i386_dr_low_can_set_control): Likewise.
2912 (i386_insert_aligned_watchpoint): New check.
2913
d9305f7f
GB
29142014-06-18 Gary Benson <gbenson@redhat.com>
2915
2916 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
2917 Renamed to state.
2918
e927c9fc
GB
29192014-06-18 Gary Benson <gbenson@redhat.com>
2920
2921 * i386-low.c (i386_length_and_rw_bits): Use internal_error
2922 instead of fatal and error.
2923 (i386_handle_nonaligned_watchpoint): Likewise.
2924
1b6d4134
GB
29252014-06-18 Gary Benson <gbenson@redhat.com>
2926
2927 * i386-low.c (i386_get_debug_register_length): New macro.
2928 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
2929 (i386_show_dr): Use debug_printf instead of fprintf. Use
2930 phex to format values.
2931
6e62758f
GB
29322014-06-18 Gary Benson <gbenson@redhat.com>
2933
2934 * i386-low.h: Comment changes.
2935 * i386-low.c: Likewise.
2936
fc6e2f03
GB
29372014-06-18 Gary Benson <gbenson@redhat.com>
2938
2939 * i386-low.c: Whitespace changes.
2940
f9d1eeed
TT
29412014-06-12 Tom Tromey <tromey@redhat.com>
2942
2943 * utils.c (freeargv): Remove.
2944
0b04e523
TT
29452014-06-12 Tom Tromey <tromey@redhat.com>
2946
2947 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
2948 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
2949 (parse_debug_format_options): Likewise.
2950 (gdbserver_usage): Likewise.
2951 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
2952 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
2953 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
2954 against libiberty.
2955 ($(LIBGNU)): Depend on libiberty.
2956 (all-lib): Recurse into all subdirs.
2957 (install-only): Invoke "install" target in subdirs.
2958 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
2959 targets.
2960 * configure: Rebuild.
2961 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
2962 for vasprintf, vsnprintf, or gettimeofday.
2963 * configure.srv: Don't add safe-ctype.o or lbasename.o to
2964 srv_tgtobj.
2965
270c9937
JB
29662014-06-05 Joel Brobecker <brobecker@adacore.com>
2967
2968 * development.sh: Delete.
2969 * Makefile.in (config.status): Adjust dependency on development.sh.
2970 * configure.ac: Adjust development.sh source call.
2971 * configure: Regenerate.
2972
0a261ed8
PA
29732014-06-02 Pedro Alves <palves@redhat.com>
2974
2975 * ax.c (gdb_free_agent_expr): New function.
2976 * ax.h (gdb_free_agent_expr): New declaration.
2977 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
2978 list.
2979 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
2980 static.
2981 (clear_breakpoint_conditions_and_commands): New function.
2982 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
2983 (clear_breakpoint_conditions_and_commands): New declaration.
2984
e9dae05e
RR
29852014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
2986
2987 * linux-aarch64-low.c (asm/ptrace.h): Include.
2988
5876f503
JK
29892014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
2990
2991 Fix TLS access for -static -pthread.
2992 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
2993 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
2994 (thread_db_load_search, try_thread_db_load_1): Initialize it.
2995
802e8e6d
PA
29962014-05-20 Pedro Alves <palves@redhat.com>
2997
2998 * linux-aarch64-low.c (aarch64_insert_point)
2999 (aarch64_remove_point): No longer check whether the type is
3000 supported here. Adjust to new interface.
3001 (the_low_target): Install aarch64_supports_z_point_type as
3002 supports_z_point_type method.
3003 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
3004 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
3005 instead of a Z packet char. Adjust.
3006 (arm_supports_z_point_type): New function.
3007 (arm_insert_point, arm_remove_point): Adjust to new interface.
3008 (the_low_target): Install arm_supports_z_point_type.
3009 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
3010 (cris_insert_point, cris_remove_point): Adjust to new interface.
3011 Don't check whether the type is supported here.
3012 (the_low_target): Install cris_supports_z_point_type.
3013 * linux-low.c (linux_supports_z_point_type): New function.
3014 (linux_insert_point, linux_remove_point): Adjust to new interface.
3015 * linux-low.h (struct linux_target_ops) <insert_point,
3016 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
3017 raw_breakpoint pointer parameter.
3018 <supports_z_point_type>: New method.
3019 * linux-mips-low.c (mips_supports_z_point_type): New function.
3020 (mips_insert_point, mips_remove_point): Adjust to new interface.
3021 Use mips_supports_z_point_type.
3022 (the_low_target): Install mips_supports_z_point_type.
3023 * linux-ppc-low.c (the_low_target): Install NULL as
3024 supports_z_point_type method.
3025 * linux-s390-low.c (the_low_target): Install NULL as
3026 supports_z_point_type method.
3027 * linux-sparc-low.c (the_low_target): Install NULL as
3028 supports_z_point_type method.
3029 * linux-x86-low.c (x86_supports_z_point_type): New function.
3030 (x86_insert_point): Adjust to new insert_point interface. Use
3031 insert_memory_breakpoint. Adjust to new
3032 i386_low_insert_watchpoint interface.
3033 (x86_remove_point): Adjust to remove_point interface. Use
3034 remove_memory_breakpoint. Adjust to new
3035 i386_low_remove_watchpoint interface.
3036 (the_low_target): Install x86_supports_z_point_type.
3037 * lynx-low.c (lynx_target_ops): Install NULL as
3038 supports_z_point_type callback.
3039 * nto-low.c (nto_supports_z_point_type): New.
3040 (nto_insert_point, nto_remove_point): Adjust to new interface.
3041 (nto_target_ops): Install nto_supports_z_point_type.
3042 * mem-break.c: Adjust intro comment.
3043 (struct raw_breakpoint) <raw_type, size>: New fields.
3044 <inserted>: Update comment.
3045 <shlib_disabled>: Delete field.
3046 (enum bkpt_type) <gdb_breakpoint>: Delete value.
3047 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
3048 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
3049 (raw_bkpt_type_to_target_hw_bp_type): New function.
3050 (find_enabled_raw_code_breakpoint_at): New function.
3051 (find_raw_breakpoint_at): New type and size parameters. Use them.
3052 (insert_memory_breakpoint): New function, based off
3053 set_raw_breakpoint_at.
3054 (remove_memory_breakpoint): New function.
3055 (set_raw_breakpoint_at): Reimplement.
3056 (set_breakpoint): New, based on set_breakpoint_at.
3057 (set_breakpoint_at): Reimplement.
3058 (delete_raw_breakpoint): Go through the_target->remove_point
3059 instead of assuming memory breakpoints.
3060 (find_gdb_breakpoint_at): Delete.
3061 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
3062 (find_gdb_breakpoint): New function.
3063 (set_gdb_breakpoint_at): Delete.
3064 (z_type_supported): New function.
3065 (set_gdb_breakpoint_1): New function, loosely based off
3066 set_gdb_breakpoint_at.
3067 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
3068 (delete_gdb_breakpoint_at): Delete.
3069 (delete_gdb_breakpoint_1): New function, loosely based off
3070 delete_gdb_breakpoint_at.
3071 (delete_gdb_breakpoint): New function.
3072 (clear_gdb_breakpoint_conditions): Rename to ...
3073 (clear_breakpoint_conditions): ... this. Don't handle a NULL
3074 breakpoint.
3075 (add_condition_to_breakpoint): Make static.
3076 (add_breakpoint_condition): Take a struct breakpoint pointer
3077 instead of an address. Adjust.
3078 (gdb_condition_true_at_breakpoint): Rename to ...
3079 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
3080 z_type parameter.
3081 (gdb_condition_true_at_breakpoint): Reimplement.
3082 (add_breakpoint_commands): Take a struct breakpoint pointer
3083 instead of an address. Adjust.
3084 (gdb_no_commands_at_breakpoint): Rename to ...
3085 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
3086 parameter. Return true if no breakpoint was found. Change debug
3087 output.
3088 (gdb_no_commands_at_breakpoint): Reimplement.
3089 (run_breakpoint_commands): Rename to ...
3090 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
3091 and change return type to boolean.
3092 (run_breakpoint_commands): New function.
3093 (gdb_breakpoint_here): Also check for Z1 breakpoints.
3094 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
3095 breakpoint. Go through the_target->remove_point instead of
3096 assuming memory breakpoint.
3097 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
3098 software and hardware breakpoints.
3099 (reinsert_raw_breakpoint): Go through the_target->insert_point
3100 instead of assuming memory breakpoint.
3101 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
3102 software and hardware breakpoints.
3103 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
3104 Check both software and hardware breakpoints.
3105 (validate_inserted_breakpoint): Assert the breakpoint is a
3106 software breakpoint. Set the inserted flag to -1 instead of
3107 setting shlib_disabled.
3108 (delete_disabled_breakpoints): Adjust.
3109 (validate_breakpoints): Only validate software breakpoints.
3110 Adjust to inserted flag change.
3111 (check_mem_read, check_mem_write): Skip breakpoint types other
3112 than software breakpoints. Adjust to inserted flag change.
3113 * mem-break.h (enum raw_bkpt_type): New enum.
3114 (raw_breakpoint, struct process_info): Forward declare.
3115 (Z_packet_to_target_hw_bp_type): Delete declaration.
3116 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
3117 (set_gdb_breakpoint, delete_gdb_breakpoint)
3118 (clear_breakpoint_conditions): New declarations.
3119 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
3120 (breakpoint_inserted_here): Update comment.
3121 (add_breakpoint_condition, add_breakpoint_commands): Replace
3122 address parameter with a breakpoint pointer parameter.
3123 (gdb_breakpoint_here): Update comment.
3124 (delete_gdb_breakpoint_at): Delete.
3125 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
3126 * server.c (process_point_options): Take a struct breakpoint
3127 pointer instead of an address. Adjust.
3128 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
3129 delete_gdb_breakpoint.
3130 * spu-low.c (spu_target_ops): Install NULL as
3131 supports_z_point_type method.
3132 * target.h: Include mem-break.h.
3133 (struct target_ops) <prepare_to_access_memory>: Update comment.
3134 <supports_z_point_type>: New field.
3135 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
3136 instead of a char. Also take a raw breakpoint pointer.
3137 * win32-arm-low.c (the_low_target): Install NULL as
3138 supports_z_point_type.
3139 * win32-i386-low.c (i386_supports_z_point_type): New function.
3140 (i386_insert_point, i386_remove_point): Adjust to new interface.
3141 (the_low_target): Install i386_supports_z_point_type.
3142 * win32-low.c (win32_supports_z_point_type): New function.
3143 (win32_insert_point, win32_remove_point): Adjust to new interface.
3144 (win32_target_ops): Install win32_supports_z_point_type.
3145 * win32-low.h (struct win32_target_ops):
3146 <supports_z_point_type>: New method.
3147 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
3148 instead of a char. Also take a raw breakpoint pointer.
3149
932539e3
PA
31502014-05-20 Pedro Alves <palves@redhat.com>
3151
3152 * mem-break.h: Include break-common.h.
3153 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
3154 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
3155 (Z_packet_to_target_hw_bp_type): New declaration.
3156 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
3157 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
3158 (Z_PACKET_ACCESS_WP): Delete macros.
3159 (Z_packet_to_hw_type): Delete function.
3160 * i386-low.h: Don't include break-common.h here.
3161 (Z_packet_to_hw_type): Delete declaration.
3162 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
3163 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
3164 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
3165 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
3166 * linux-aarch64-low.c: Don't include break-common.h here.
3167 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
3168 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
3169 (Z_packet_to_target_hw_bp_type): Delete function.
3170 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
3171 function.
3172 (mips_insert_point, mips_remove_point): Use
3173 Z_packet_to_target_hw_bp_type.
3174
4ff0d3d8
PA
31752014-05-20 Pedro Alves <palves@redhat.com>
3176
3177 * linux-aarch64-low.c: Include break-common.h.
3178 (enum target_point_type): Delete.
3179 (Z_packet_to_point_type): Rename to ...
3180 (Z_packet_to_target_hw_bp_type): ... this, and return a
3181 target_hw_bp_type instead.
3182 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
3183 instead of an enum target_point_type.
3184 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
3185 breakpoint type.
3186 (aarch64_dr_state_insert_one_point)
3187 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
3188 (aarch64_handle_aligned_watchpoint)
3189 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
3190 Take an enum target_hw_bp_type instead of an enum
3191 target_point_type.
3192 (aarch64_supports_z_point_type): New function.
3193 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
3194 use Z_packet_to_target_hw_bp_type.
3195
786dc519
JB
31962014-05-20 Joel Brobecker <brobecker@adacore.com>
3197
3198 * configure.ac: Only use -Werror by default when DEVELOPMENT
3199 is true.
3200 * configure: Regenerate.
3201
9e0aa64f
JK
32022014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
3203
3204 Fix gdbserver qGetTLSAddr for x86_64 -m32.
3205 * linux-x86-low.c (X86_64_USER_REGS): New.
3206 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
3207
2b577b92
YQ
32082014-04-28 Yao Qi <yao@codesourcery.com>
3209
3210 * Makefile.in (i386-avx512.c): Fix the typo of generated file
3211 name.
3212
94611da2
PA
32132014-04-25 Pedro Alves <palves@redhat.com>
3214
3215 PR server/16255
3216 * linux-low.c (linux_attach_fail_reason_string): New function.
3217 (linux_attach_lwp): Delete.
3218 (linux_attach_lwp_1): Rename to ...
3219 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
3220 argument. Remove "initial" parameter. Return int instead of
3221 void. Don't error or warn here.
3222 (linux_attach): Adjust to call linux_attach_lwp. Call error on
3223 failure to attach to the tgid. Call warning when failing to
3224 attach to an lwp.
3225 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
3226 argument. Remove "initial" parameter. Return int instead of
3227 void. Don't error or warn here.
3228 (linux_attach_fail_reason_string): New declaration.
3229 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
3230 interface change. Use linux_attach_fail_reason_string.
3231
01f9f808
MS
32322014-04-24 Michael Sturm <michael.sturm@mintel.com>
3233 Walfred Tedeschi <walfred.tedeschi@intel.com>
3234
3235 * Makefile.in: Added rules to handle new files
3236 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
3237 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
3238 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
3239 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
3240 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
3241 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
3242 x32-avx512-linux.o.
3243 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
3244 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
3245 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
3246 i386/x32-avx512.xml.
3247 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
3248 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
3249 i386/x32-avx512-linux.xml.
3250 * i387-fp.c (num_avx512_k_registers): New constant for number
3251 of K registers.
3252 (num_avx512_zmmh_low_registers): New constant for number of
3253 lower ZMM registers (0-15).
3254 (num_avx512_zmmh_high_registers): New constant for number of
3255 higher ZMM registers (16-31).
3256 (num_avx512_ymmh_registers): New contant for number of higher
3257 YMM registers (ymm16-31 added by avx521 on x86_64).
3258 (num_avx512_xmm_registers): New constant for number of higher
3259 XMM registers (xmm16-31 added by AVX512 on x86_64).
3260 (struct i387_xsave): Add space for AVX512 registers.
3261 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
3262 Add code to handle AVX512 registers.
3263 (i387_xsave_to_cache): Add code to handle AVX512 registers.
3264 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
3265 prototypei from generated file.
3266 (tdesc_amd64_avx512_linux): Likewise.
3267 (init_registers_x32_avx512_linux): Likewise.
3268 (tdesc_x32_avx512_linux): Likewise.
3269 (init_registers_i386_avx512_linux): Likewise.
3270 (tdesc_i386_avx512_linux): Likewise.
3271 (x86_64_regmap): Add AVX512 registers.
3272 (x86_linux_read_description): Add code to handle AVX512 XSTATE
3273 mask.
3274 (initialize_low_arch): Add code to initialize AVX512 registers.
3275
51aa91f9
PA
32762014-04-23 Pedro Alves <palves@redhat.com>
3277
3278 * mem-break.c (find_gdb_breakpoint_at): Make static.
3279 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
3280
a4165e94
PA
32812014-04-23 Pedro Alves <palves@redhat.com>
3282
3283 * i386-low.c: Don't include break-common.h here.
3284 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
3285 prototype to take target_hw_bp_type as argument instead of a Z
3286 packet char.
3287 * i386-low.h: Include break-common.h here.
3288 (Z_packet_to_hw_type): Declare.
3289 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
3290 prototypes.
3291 * linux-x86-low.c (x86_insert_point): Convert the packet number to
3292 a target_hw_bp_type before calling i386_low_insert_watchpoint.
3293 (x86_remove_point): Convert the packet number to a
3294 target_hw_bp_type before calling i386_low_remove_watchpoint.
3295 * win32-i386-low.c (i386_insert_point): Convert the packet number
3296 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
3297 (i386_remove_point): Convert the packet number to a
3298 target_hw_bp_type before calling i386_low_remove_watchpoint.
3299
b8acf843
PA
33002014-04-23 Pedro Alves <palves@redhat.com>
3301
3302 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
3303
d708bcd1
PA
33042014-04-10 Pedro Alves <palves@redhat.com>
3305
3306 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
3307 Check if the condition or command is NULL before checking if the
3308 breakpoint is known. On success, return true.
3309 * mem-break.h (add_breakpoint_condition): Document return.
3310 (add_breakpoint_commands): Add describing comment.
3311 * server.c (skip_to_semicolon): New function.
3312 (process_point_options): Use it.
3313
2eec7d5b
PA
33142014-04-09 Pedro Alves <palves@redhat.com>
3315
3316 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
3317 to lwpid_of.
3318
fa96cb38
PA
33192014-02-27 Pedro Alves <palves@redhat.com>
3320
3321 PR 12702
3322 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
3323 macros.
3324 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
3325 output.
3326 (last_thread_of_process_p): Take a PID argument instead of a
3327 thread pointer.
3328 (linux_wait_for_lwp): Delete.
3329 (num_lwps, check_zombie_leaders, not_stopped_callback): New
3330 functions.
3331 (linux_low_filter_event): New function, party factored out from
3332 linux_wait_for_event.
3333 (linux_wait_for_event): Rename to ...
3334 (linux_wait_for_event_filtered): ... this. Add new filter ptid
3335 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
3336 sigsuspend. Check for zombie leaders.
3337 (linux_wait_for_event): Reimplement as wrapper around
3338 linux_wait_for_event_filtered.
3339 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
3340 a normal or signal exit is seen, it's the whole process exiting.
3341 (wait_for_sigstop): No longer a for_each_inferior callback.
3342 Rewrite on top of linux_wait_for_event_filtered.
3343 (stop_all_lwps): Call wait_for_sigstop directly.
3344 * server.c (resume, handle_target_event): Handle
3345 TARGET_WAITKIND_NO_RESUMED.
3346
d763de10
JB
33472014-02-26 Joel Brobecker <brobecker@adacore.com>
3348
3349 * win32-low.c (psapi_get_dll_name,
3350 * win32_CreateToolhelp32Snapshot): Delete.
3351 (win32_CreateToolhelp32Snapshot, win32_Module32First)
3352 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
3353 Delete.
3354 (handle_load_dll): Add function description.
3355 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
3356
850a0f76
JB
33572014-02-26 Joel Brobecker <brobecker@adacore.com>
3358
3359 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
3360 Add comment.
3361 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
3362 base address when calling win32_add_one_solib.
3363 (handle_load_dll): Delete local variable load_addr.
3364 Remove 0x1000 offset applied to DLL base address when calling
3365 win32_add_one_solib.
3366 (handle_unload_dll): Add comment.
3367
f25b3fc3
JB
33682014-02-26 Joel Brobecker <brobecker@adacore.com>
3369
3370 * win32-low.c (win32_add_all_dlls): Renames
3371 win32_ensure_ntdll_loaded. Rewrite function documentation.
3372 Adjust implementation to always load all DLLs.
3373 Add 0x1000 offset to DLL base address when calling
3374 win32_add_one_solib.
3375 (child_initialization_done): New static global.
3376 (do_initial_child_stuff): Set child_initialization_done to
3377 zero during child initialization, and 1 after. Replace call
3378 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
3379 Add comment.
3380 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
3381 (handle_unload_dll): Add function documentation.
3382 (get_child_debug_event): Ignore load and unload DLL events
3383 during child initialization.
3384
d86d4aaf
DE
33852014-02-20 Doug Evans <dje@google.com>
3386
3bc32da3 3387 Remove global all_lwps.
d86d4aaf
DE
3388 * inferiors.h (ptid_of): Move here from linux-low.h.
3389 (pid_of, lwpid_of): Ditto.
3390 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
3391 parameter is a struct thread_info * now.
3392 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
3393 directly. Pass &all_threads to find_inferior instead of &all_lwps.
3394 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
3395 directly.
3396 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
3397 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
3398 * linux-arm-low.c (update_registers_callback): Update, "entry"
3399 parameter is a struct thread_info * now.
3400 Fetch lwpid from current_inferior directly.
3401 (arm_insert_point): Pass &all_threads to find_inferior instead of
3402 &all_lwps.
3403 (arm_remove_point): Ditto.
3404 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
3405 (arm_prepare_to_resume): Fetch pid from thread.
3406 (arm_read_description): Fetch lwpid from current_inferior directly.
3407 * linux-low.c (all_lwps): Delete.
3408 (delete_lwp): Delete call to remove_inferior.
3409 (handle_extended_wait): Fetch lwpid from thread.
3410 (add_lwp): Don't set lwp->entry.id. Remove call to
3411 add_inferior_to_list.
3412 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
3413 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
3414 (kill_one_lwp_callback): Ditto.
3415 (linux_kill): Don't dereference NULL pointer.
3416 Fetch ptid,lwpid from thread.
3417 (get_detach_signal): Fetch ptid from thread.
3418 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
3419 Simplify call to regcache_invalidate_thread.
3420 (delete_lwp_callback): Update, "entry" parameter is a
3421 struct thread_info * now. Fetch pid from thread.
3422 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
3423 (status_pending_p_callback): Update, "entry" parameter is a
3424 struct thread_info * now. Fetch ptid from thread.
3425 (find_lwp_pid): Update, "entry" parameter is a
3426 struct thread_info * now.
3427 (linux_wait_for_lwp): Fetch pid from thread.
3428 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
3429 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
3430 (enqueue_one_deferred_signal): Fetch lwpid from thread.
3431 (dequeue_one_deferred_signal): Ditto.
3432 (cancel_breakpoint): Fetch ptid from current_inferior.
3433 (linux_wait_for_event): Pass &all_threads to find_inferior,
3434 not &all_lwps. Fetch ptid, lwpid from thread.
3435 (count_events_callback): Update, "entry" parameter is a
3436 struct thread_info * now.
3437 (select_singlestep_lwp_callback): Ditto.
3438 (select_event_lwp_callback): Ditto.
3439 (cancel_breakpoints_callback): Ditto.
3440 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
3441 not &all_lwps.
3442 (select_event_lwp): Ditto. Fetch ptid from event_thread.
3443 (unsuspend_one_lwp): Update, "entry" parameter is a
3444 struct thread_info * now.
3445 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
3446 not &all_lwps.
3447 (linux_stabilize_threads): Ditto. And for for_each_inferior.
3448 Fetch lwpid from thread, not lwp.
3449 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
3450 Pass &all_threads to find_inferior, not &all_lwps.
3451 (send_sigstop): Fetch lwpid from thread, not lwp.
3452 (send_sigstop_callback): Update, "entry" parameter is a
3453 struct thread_info * now.
3454 (suspend_and_send_sigstop_callback): Ditto.
3455 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
3456 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
3457 struct thread_info * now.
3458 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
3459 from thread, lwp.
3460 (lwp_running): Update, "entry" parameter is a
3461 struct thread_info * now.
3462 (stop_all_lwps): Fetch ptid from thread.
3463 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
3464 (linux_resume_one_lwp): Fetch lwpid from thread.
3465 (linux_set_resume_request): Update, "entry" parameter is a
3466 struct thread_info * now. Fetch pid, lwpid from thread.
3467 (resume_status_pending_p): Update, "entry" parameter is a
3468 struct thread_info * now.
3469 (need_step_over_p): Ditto. Fetch lwpid from thread.
3470 (start_step_over): Fetch lwpid from thread.
3471 (linux_resume_one_thread): Update, "entry" parameter is a
3472 struct thread_info * now. Fetch lwpid from thread.
3473 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
3474 (proceed_one_lwp): Update, "entry" parameter is a
3475 struct thread_info * now. Fetch lwpid from thread.
3476 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
3477 struct thread_info * now.
3478 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
3479 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
3480 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
3481 directly.
3482 (regsets_store_inferior_registers): Ditto.
3483 (fetch_register, store_register): Ditto.
3484 (linux_read_memory, linux_write_memory): Ditto.
3485 (linux_request_interrupt): Ditto.
3486 (linux_read_auxv): Ditto.
3487 (linux_xfer_siginfo): Ditto.
3488 (linux_qxfer_spu): Ditto.
3489 (linux_qxfer_libraries_svr4): Ditto.
3490 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
3491 moved to inferiors.h.
3492 (get_lwp): Delete.
3493 (get_thread_lwp): Update.
3494 (struct lwp_info): Delete member "entry". Simplify comment for
3495 member "thread".
3496 (all_lwps): Delete.
3497 * linux-mips-low.c (mips_read_description): Fetch lwpid from
3498 current_inferior directly.
3499 (update_watch_registers_callback): Update, "entry" parameter is a
3500 struct thread_info * now. Fetch pid from thread.
3501 (mips_linux_prepare_to_resume): Fetch ptid from thread.
3502 (mips_insert_point): Fetch lwpid from current_inferior.
3503 Pass &all_threads to find_inferior, not &all_lwps.
3504 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
3505 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
3506 directly.
3507 (mips_stopped_data_address): Ditto.
3508 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
3509 directly.
3510 * linux-tile-low.c (tile_arch_setup): Ditto.
3511 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
3512 (update_debug_registers_callback): Update, "entry" parameter is a
3513 struct thread_info * now. Fetch pid from thread.
3514 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
3515 Pass &all_threads to find_inferior, not &all_lwps.
3516 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
3517 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
3518 Pass &all_threads to find_inferior, not &all_lwps.
3519 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
3520 (i386_dr_low_get_status): Ditto.
3521 (x86_linux_prepare_to_resume): Fetch ptid from thread.
3522 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
3523 (x86_linux_read_description): Ditto.
3524 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
3525
3b8361aa
DE
35262014-02-20 Doug Evans <dje@google.com>
3527
3528 * inferiors.c (get_first_inferior): Fix buglet.
3529
f7667f0d
DE
35302014-02-19 Doug Evans <dje@google.com>
3531
3532 * gdbthread.h (add_thread): Change result type to struct thread_info *.
3533 * inferiors.c (add_thread): Change result type to struct thread_info *.
3534 All callers updated.
3535 (add_lwp): Call add_thread here instead of in callers.
3536 All callers updated.
3537 * linux-low.h (get_lwp_thread): Rewrite.
3538 (struct lwp_info): New member "thread".
3539
b3312d80
DE
35402014-02-19 Doug Evans <dje@google.com>
3541
3542 * linux-low.c (add_lwp): Change result to struct lwp_info *.
3543 All callers updated.
3544
ecc6f45c
DE
35452014-02-19 Doug Evans <dje@google.com>
3546
3547 * inferiors.c (add_thread): Fix whitespace.
3548
649ebbca
DE
35492014-02-19 Doug Evans <dje@google.com>
3550
3551 * dll.c (clear_dlls): Replace accessing list implemention details
3552 with API function.
3553 * gdbthread.h (get_first_thread): Declare.
3554 * inferiors.c (for_each_inferior_with_data): New function.
3555 (get_first_thread): New function.
3556 (find_thread_ptid): Simplify.
3557 (get_first_inferior): New function.
3558 (clear_list): Delete.
3559 (one_inferior_p): New function.
3560 (clear_inferior_list): New function.
3561 (clear_inferiors): Update.
3562 * inferiors.h (for_each_inferior_with_data): Declare.
3563 (clear_inferior_list): Declare.
3564 (one_inferior_p): Declare.
3565 (get_first_inferior): Declare.
3566 * linux-low.c (linux_wait_for_event): Replace accessing list
3567 implemention details with API function.
3568 * server.c (target_running): Ditto.
3569 (accumulate_file_name_length): New function.
3570 (emit_dll_description): New function.
3571 (handle_qxfer_libraries): Replace accessing list implemention
3572 details with API function.
3573 (handle_qxfer_threads_worker): New function.
3574 (handle_qxfer_threads_proper): Replace accessing list implemention
3575 details with API function.
3576 (handle_query): Ditto.
3577 (visit_actioned_threads_callback_ftype): New typedef.
3578 (visit_actioned_threads_data): New struct.
3579 (visit_actioned_threads): Rewrite to be find_inferior callback.
3580 (resume): Call find_inferior.
3581 (handle_status): Replace accessing list implemention
3582 details with API function.
3583 (process_serial_event): Replace accessing list implemention details
3584 with API function.
3585 * target.c (set_desired_inferior): Replace accessing list implemention
3586 details with API function.
3587 * tracepoint.c (same_process_p): New function.
3588 (gdb_agent_about_to_close): Replace accessing list implemention
3589 details with API function.
3590 * win32-low.c (child_delete_thread): Replace accessing list
3591 implemention details with API function.
3592 (match_dll_by_basename): New function.
3593 (dll_is_loaded_by_basename): New function.
3594 (win32_ensure_ntdll_loaded): Replace accessing list implemention
3595 details call to dll_is_loaded_by_basename.
3596
80894984
DE
35972014-02-19 Doug Evans <dje@google.com>
3598
3599 * dll.h (struct dll_info): Add comment.
3600 * gdbthread.h (struct thread_info): Add comment.
3601 (current_ptid): Simplify.
3602 * inferiors.c (add_process): Update.
3603 (remove_process): Update.
3604 * inferiors.h (struct process_info): Rename member "head" to "entry".
3605 * linux-low.c (delete_lwp): Update.
3606 (add_lwp): Update.
3607 (last_thread_of_process_p): Update.
3608 (kill_one_lwp_callback, linux_kill): Update.
3609 (status_pending_p_callback): Update.
3610 (wait_for_sigstop): Update. Simplify read of ptid.
3611 (start_step_over): Update.
3612 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
3613 (get_lwp_thread): Update.
3614 (struct lwp_info): Rename member "head" to "entry".
3615 * regcache.h (inferior_list_entry): Delete.
3616 * server.c (kill_inferior_callback): Update.
3617 (detach_or_kill_inferior_callback): Update.
3618 (print_started_pid): Update.
3619 (print_attached_pid): Update.
3620 (process_serial_event): Simplify read of ptid.
3621 * thread-db.c (thread_db_create_event): Update.
3622 (thread_db_get_tls_address): Update.
3623 * win32-low.c (current_inferior_ptid): Simplify.
3624
46917d26
TT
36252014-02-19 Tom Tromey <tromey@redhat.com>
3626
3627 * target.h (struct target_ops) <supports_btrace>: Add target_ops
3628 argument.
3629 (target_supports_btrace): Update.
3630
0759a81e
YQ
36312014-02-14 Yao Qi <yao@codesourcery.com>
3632
3633 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
3634 (rsp-low-ipa.o): New target.
3635
a7191e8b
TT
36362014-02-12 Tom Tromey <tromey@redhat.com>
3637
3638 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
3639 convert_ascii_to_int.
3640 * regcache.c (registers_to_string): Likewise.
3641 * remote-utils.c (decode_M_packet): Likewise.
3642 * server.c (process_serial_event): Likewise.
3643
ff0e980e
TT
36442014-02-12 Tom Tromey <tromey@redhat.com>
3645
3646 * server.c (handle_query, handle_v_run): Use hex2bin, not
3647 unhexify.
3648 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
3649
e9371aff
TT
36502014-02-12 Tom Tromey <tromey@redhat.com>
3651
3652 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
3653 convert_int_to_ascii.
3654 * regcache.c (registers_to_string, collect_register_as_string):
3655 Likewise.
3656 * remote-utils.c (look_up_one_symbol, relocate_instruction):
3657 Likewise.
3658 * server.c (process_serial_event): Likewise.
3659 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
3660 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
3661
971dc0b8
TT
36622014-02-12 Tom Tromey <tromey@redhat.com>
3663
3664 * remote-utils.c (look_up_one_symbol, monitor_output): Use
3665 bin2hex, not hexify.
3666 * tracepoint.c (cmd_qtstatus): Likewise.
3667
0a822afb
TT
36682014-02-12 Tom Tromey <tromey@redhat.com>
3669
3670 * remote-utils.c (monitor_output): Pass explicit length to
3671 hexify.
3672
9c3d6531
TT
36732014-02-12 Tom Tromey <tromey@redhat.com>
3674
3675 * tracepoint.c: Include rsp-low.h.
3676 * server.c: Include rsp-low.h.
3677 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
3678 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
3679 declare.
3680 * remote-utils.c: Include rsp-low.h.
3681 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
3682 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
3683 (convert_int_to_ascii, convert_ascii_to_int): Move to
3684 common/rsp-low.c.
3685 * regcache.c: Include rsp-low.h.
3686 * ax.c: Include rsp-low.h.
3687 * Makefile.in (SFILES): Add common/rsp-low.c.
3688 (OBS): Add rsp-low.o.
3689 (rsp-low.o): New target.
3690
01fd3ea5
TT
36912014-02-12 Tom Tromey <tromey@redhat.com>
3692
3693 * utils.h (pulongest, plongest, phex_nz): Don't declare.
3694 Include print-utils.h.
3695 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
3696 (plongest, thirty_two, phex_nz): Remove.
3697 * Makefile.in (SFILES): Add common/print-utils.c.
3698 (OBS): Add print-utils.o.
3699 (print-utils-ipa.o): New target.
3700 (print-utils.o): New target.
3701 (IPA_OBJS): Add print-utils-ipa.o.
3702
e99dc820
TT
37032014-02-06 Tom Tromey <tromey@redhat.com>
3704
3705 * Makefile.in (SFILES): Fix indentation.
3706
ee1e2d4f
DE
37072014-02-05 Doug Evans <dje@google.com>
3708
3709 * linux-low.c (linux_wait_for_event): Improve comment.
3710 (linux_wait_1): Keep current_inferior in sync with event_child.
3711
f5a02773
DE
37122014-01-22 Doug Evans <dje@google.com>
3713
3714 * gdbthread.h (gdb_id_to_thread): Delete, unused.
3715
87ce2a04
DE
37162014-01-22 Doug Evans <dje@google.com>
3717
3718 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
3719 * configure: Regenerate.
3720 * config.in: Regenerate.
3721 * Makefile.in (SFILES): Add debug.c.
3722 (OBS): Add debug.o.
3723 * debug.c: New file.
3724 * debug.h: New file.
3725 * linux-aarch64-low.c (*): Update all debugging printfs to use
3726 debug_printf instead of fprintf.
3727 * linux-arm-low.c (*): Ditto.
3728 * linux-cris-low.c (*): Ditto.
3729 * linux-crisv32-low.c (*): Ditto.
3730 * linux-m32r-low.c (*): Ditto.
3731 * linux-sparc-low.c (*): Ditto.
3732 * linux-x86.c (*): Ditto.
3733 * linux-low.c (*): Ditto.
3734 (linux_wait_1): Add calls to debug_enter, debug_exit.
3735 (linux_wait): Remove redundant debugging printf.
3736 (stop_all_lwps): Add calls to debug_enter, debug_exit.
3737 (linux_resume, unstop_all_lwps): Ditto.
3738 * mem-break.c (*): Update all debugging printfs to use
3739 debug_printf instead of fprintf.
3740 * remote-utils.c (*): Ditto.
3741 * thread-db.c (*): Ditto.
3742 * server.c #include <ctype.h>, "gdb_vecs.h".
3743 (debug_threads): Moved to debug.c.
3744 (*): Update all debugging printfs to use debug_printf instead of
3745 fprintf.
3746 (start_inferior): Replace call to fflush with call to debug_flush.
3747 (monitor_show_help): Mention set debug-format.
3748 (parse_debug_format_options): New function.
3749 (handle_monitor_command): Handle "monitor set debug-format".
3750 (gdbserver_usage): Mention --debug-format.
3751 (main): Parse --debug-format.
3752 * server.h (debug_threads): Declaration moved to debug.h.
3753 #include "debug.h".
3754 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
3755 trace_debug_1 that uses debug_printf.
3756 (tracepoint_look_up_symbols): Update all debugging printfs to use
3757 debug_printf instead of fprintf.
3758
e671835b
BS
37592014-01-20 Baruch Siach <baruch@tkos.co.il>
3760
3761 * linux-xtensa-low.c: Include asm/ptrace.h instead of
3762 sys/ptrace.h.
3763
b5737fa9
PA
37642014-01-17 Pedro Alves <palves@redhat.com>
3765
ea38d2a9 3766 PR build/16445
c7faa97a
PA
3767 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
3768 defined after including gdb_proc_service.h.
b5737fa9 3769
40ed484e
DE
37702014-01-16 Doug Evans <dje@google.com>
3771
3772 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
3773 (match_dll): Use it.
3774
969c39fb
MM
37752014-01-16 Markus Metzger <markus.t.metzger@intel.com>
3776
3777 * target.h (target_ops) <read_btrace>: Change parameters and
3778 return type to allow error reporting.
3779 * server.c (handle_qxfer_btrace): Support delta reads. Pass
3780 trace reading errors on.
3781 * linux-low.c (linux_low_read_btrace): Pass trace reading
3782 errors on.
3783 (linux_low_disable_btrace): New.
3784
ab7f45ba
DE
37852014-01-15 Doug Evans <dje@google.com>
3786
3787 * inferiors.c (thread_id_to_gdb_id): Delete.
3788 * inferiors.h (thread_id_to_gdb_id): Delete.
3789
66af0f44
EZ
37902014-01-13 Eli Zaretskii <eliz@gnu.org>
3791
3792 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
3793 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
3794 versions.
3795
9939e131
PA
37962014-01-08 Pedro Alves <palves@redhat.com>
3797
3798 * server.c (handle_status): Don't discard previous queued stop
3799 replies or thread's pending status here.
3800 (main) <disconnection>: Do it here instead.
3801
b7ea362b
PA
38022014-01-08 Pedro Alves <palves@redhat.com>
3803
3804 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
3805 * server.c (visit_actioned_threads, handle_pending_status): New
3806 function.
3807 (handle_v_cont): Factor out parts to ...
3808 (resume): ... this new function. If in all-stop, and a thread
3809 being resumed has a pending status, report it without actually
3810 resuming.
3811 (myresume): Adjust to use the new 'resume' function.
3812 (clear_pending_status_callback, set_pending_status_callback)
3813 (find_status_pending_thread_callback): New functions.
3814 (handle_status): Handle the case of multiple threads having
3815 interesting statuses to report. Report threads' real last signal
3816 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
3817 with an interesting thread to report the status for, instead of
3818 always reporting the status of the first thread.
3819
28498c42
JB
38202014-01-01 Joel Brobecker <brobecker@adacore.com>
3821
3822 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
3823 * gdbreplay.c (gdbreplay_version): Likewise.
3824
f45c82da
YZ
38252013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
3826
3827 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
3828 iov.iov_len with the real length in use.
3829
379a5e2d
JB
38302013-12-13 Joel Brobecker <brobecker@adacore.com>
3831
3832 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
3833 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
3834 for all targets that use win32-low.c.
3835 * win32-low.c (win32_ensure_ntdll_loaded): New function.
3836 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
3837
4210d83e
PA
38382013-12-13 Pedro Alves <palves@redhat.com>
3839
3840 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
3841 if equal to TARGET_WAITKIND_LOADED.
3842 * win32-low.c (cached_status): New static global.
3843 (win32_wait): Add declaration.
3844 (do_initial_child_stuff): Flush all initial pending debug events
3845 up to the initial breakpoint.
3846 (win32_wait): If CACHED_STATUS was set, return that instead
3847 of doing a real wait. Remove the code resuming the execution
3848 of the inferior after receiving a TARGET_WAITKIND_LOADED event
3849 during the initial phase. Also remove the code changing
3850 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
3851 TARGET_WAITKIND_STOPPED.
3852
e7f0d979
YQ
38532013-12-11 Yao Qi <yao@codesourcery.com>
3854
3855 * notif.c (handle_notif_ack): Return 0 if no notification
3856 matches.
3857
ebcf782c
DE
38582013-11-20 Doug Evans <dje@google.com>
3859
3860 * linux-low.c (linux_set_resume_request): Fix comment.
3861
20ad9378
DE
38622013-11-20 Doug Evans <dje@google.com>
3863
3864 * linux-low.c (resume_status_pending_p): Tweak comment.
3865
a196ebeb
WT
38662013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
3867
3868 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
3869 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
3870 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
3871 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
3872 (srv_amd64_regobj): Add amd64-mpx.o.
3873 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
3874 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
3875 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
3876 * i387-fp.c (num_pl_bnd_register) Added constant.
3877 (num_pl_bnd_cfg_registers) Added constant.
3878 (struct i387_xsave) Added reserved area and MPX fields.
3879 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
3880 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
3881 function.
3882 (tdesc_i386_mpx_linux): Add MPX amd64 target.
3883 (init_registers_amd64_mpx_linux): Declare new function.
3884 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
3885 (x86_64_regmap): Add MPX registers.
3886 (x86_linux_read_description): Add MPX case.
3887 (initialize_low_arch): Initialize MPX targets.
3888
0080a2f6
TT
38892013-11-18 Tom Tromey <tromey@redhat.com>
3890
3891 * configure: Rebuild.
3892 * configure.ac: Don't check for stdlib.h.
3893 * gdbreplay.c: Unconditionally include stdlib.h.
3894
2978b111
TT
38952013-11-18 Tom Tromey <tromey@redhat.com>
3896
3897 * config.in: Rebuild.
3898 * configure: Rebuild.
3899 * configure.ac: Don't use AC_HEADER_DIRENT.
3900
a3d08894
TT
39012013-11-18 Tom Tromey <tromey@redhat.com>
3902
3903 * server.h: Don't check HAVE_STRING_H.
3904 * gdbreplay.c: Don't check HAVE_STRING_H.
3905 * configure: Rebuild.
3906
0a5dd17d
TT
39072013-11-18 Tom Tromey <tromey@redhat.com>
3908
3909 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
3910 LIBGNU.
3911
1bd2f0ba
TT
39122013-11-08 Tom Tromey <tromey@redhat.com>
3913
3914 * configure, config.in: Rebuild.
3915 * configure.ac: Remove unused configury.
3916
3266f10b
TT
39172013-11-08 Tom Tromey <tromey@redhat.com>
3918
3919 * acinclude.m4: Include common.m4, codeset.m4.
3920 * configure, config.in: Rebuild.
3921 * configure.ac: Use GDB_AC_COMMON.
3922
6682d959
AA
39232013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
3924
3925 * linux-s390-low.c (HWCAP_S390_TE): New define.
3926 (s390_arch_setup): Consider the TE field in the HWCAP for
3927 determining 'have_regset_tdb'.
3928
fd0a4d76
SDJ
39292013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
3930
3931 PR gdb/16014
3932 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
3933 call to sizeof.
3934
1a3d890b
PA
39352013-10-02 Pedro Alves <palves@redhat.com>
3936
3937 * server.c (process_serial_event): Don't output "GDBserver
3938 exiting" if GDB is connected through stdio.
3939 * target.c (mywait): Likewise, be silent if GDB is connected
3940 through stdio.
3941
97ad4581
JB
39422013-10-01 Joel Brobecker <brobecker@adacore.com>
3943
3944 * lynx-low.c (lynx_add_threads_after_attach): New function.
3945 (lynx_attach): Remove call to add_thread. Add call to
3946 lynx_add_threads_after_attach instead.
3947
5b4e221c
MF
39482013-09-28 Mike Frysinger <vapier@gentoo.org>
3949
3950 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
3951 * config.in, configure: Regenerated.
3952
ee47b2f8
YQ
39532013-09-18 Yao Qi <yao@codesourcery.com>
3954
3955 PR server/15959
3956 * server.c (start_inferior): Clear 'resume_info'.
3957
d6707650 39582013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 3959
d6707650
JW
3960 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
3961 for each register.
3962
9243dd0e 39632013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 3964
9243dd0e
JW
3965 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
3966 linux-tile-low.o to srv_tgtobj.
3967
c623a6ef
WN
39682013-09-16 Will Newton <will.newton@linaro.org>
3969
3970 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
3971 out regs.
3972
fb71d39e
PA
39732013-09-06 Pedro Alves <palves@redhat.com>
3974
3975 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
3976 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
3977 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
3978 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
3979 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
3980 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
3981
8e7e9910
PA
39822013-09-06 Pedro Alves <palves@redhat.com>
3983
3984 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
3985 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
3986
7c3a12ca
PA
39872013-09-06 Pedro Alves <palves@redhat.com>
3988
3989 * linux-amd64-ipa.c: Include tracepoint.h.
3990 * linux-i386-ipa.c: Include tracepoint.h.
3991
8eb3d7b6
RW
39922013-09-06 Ricard Wanderlof <ricardw@axis.com>
3993
3994 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
3995 (ps_get_thread_area): New function.
3996
eddddb9d
RW
39972013-09-06 Ricard Wanderlof <ricardw@axis.com>
3998
3999 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
4000 (initialize_low_arch): Call init_registers_crisv32 rather than
4001 init_register_crisv32.
4002
533b0600
PA
40032013-09-05 Pedro Alves <palves@redhat.com>
4004
4005 * server.h (handle_vFile, hostio_last_error_from_errno): Move
4006 to ...
4007 * hostio.h: ... this new file.
4008 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
4009 win32-low.c: Include hostio.h.
4010
0ce3d3b5
PA
40112013-09-05 Pedro Alves <palves@redhat.com>
4012
4013 * server.h (gdb_client_data, handler_func, callback_handler_func)
4014 (delete_file_handler, add_file_handler, append_callback_event)
4015 (delete_callback_event, start_event_loop, initialize_event_loop):
4016 Move to event-loop.h and include it.
4017 * event-loop.h: New file.
4018
799cdc37
PA
40192013-09-05 Pedro Alves <palves@redhat.com>
4020
4021 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
4022 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
4023 (loaded_dll, unloaded_dll): Move to ...
4024 * dll.h: ... this new file.
4025 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
4026
6a6bbd9d
PA
40272013-09-05 Pedro Alves <palves@redhat.com>
4028
4029 * server.h (current_process, get_thread_process, all_processes)
4030 (add_inferior_to_list, for_each_inferior, current_inferior)
4031 (remove_inferior, add_process, remove_process, find_process_pid)
4032 (have_started_inferiors_p, have_attached_inferiors_p)
4033 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
4034 (clear_inferiors, find_inferior, find_inferior_id)
4035 (inferior_target_data, set_inferior_target_data)
4036 (inferior_regcache_data, set_inferior_regcache_data): Move to
4037 inferiors.h, and include it.
4038 * inferiors.h: New file.
4039
f699aaba
PA
40402013-09-05 Pedro Alves <palves@redhat.com>
4041
4042 * server.h (struct emit_ops, current_insn_ptr, emit_error):
4043 Move ...
72f4393d 4044 * ax.h: ... here.
f699aaba 4045
c144c7a0
PA
40462013-09-05 Pedro Alves <palves@redhat.com>
4047
4048 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
4049 tracepoint.h.
4050 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
4051 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
4052 (handle_tracepoint_general_set, handle_tracepoint_query)
4053 (tracepoint_finished_step, tracepoint_was_hit)
4054 (release_while_stepping_state_list, current_traceframe)
4055 (in_readonly_region, traceframe_read_mem)
4056 (fetch_traceframe_registers, traceframe_read_sdata)
4057 (traceframe_read_info, struct fast_tpoint_collect_status)
4058 (fast_tracepoint_collecting, force_unlock_trace_buffer)
4059 (handle_tracepoit_bkpts, initialize_low_tracepoint)
4060 (supply_fast_tracepoint_registers)
4061 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
4062 (ipa_tdesc, claim_trampoline_space)
4063 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
4064 (agent_mem_read, agent_get_trace_state_variable_value)
4065 (agent_set_trace_state_variable_value, agent_tsv_read)
4066 (agent_mem_read_string, get_raw_reg_func_addr)
4067 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
4068 * tracepoint.h: ... this new file.
4069
ff42e6ab
PA
40702013-09-05 Pedro Alves <palves@redhat.com>
4071
4072 * server.h (perror_with_name, error, fatal, warning, paddress)
4073 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
4074 include it.
4075 * utils.h: New file.
4076
541af0f4
PA
40772013-09-05 Pedro Alves <palves@redhat.com>
4078
4079 * server.h (remote_debug, noack_mode, transport_is_reliable)
4080 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
4081 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
4082 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
4083 (write_enn, initialize_async_io, enable_async_io)
4084 (disable_async_io, check_remote_input_interrupt_request)
4085 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
4086 (dead_thread_notify, prepare_resume_reply)
4087 (decode_address_to_semicolon, decode_address, decode_m_packet)
4088 (decode_M_packet, decode_X_packet, decode_xfer_write)
4089 (decode_search_memory_packet, unhexify, hexify)
4090 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
4091 (look_up_one_symbol, relocate_instruction)
4092 (monitor_output): Move to remote-utils.h, and include it.
4093 * remote-utils.h: New file.
4094
eebdf26b
PA
40952013-09-05 Pedro Alves <palves@redhat.com>
4096
4097 * server.h (_): Delete.
4098
3aafd2ff
PA
40992013-09-02 Pedro Alves <palves@redhat.com>
4100
4101 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
4102 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
4103 allocated.
4104 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
4105
cee83bcb
PM
41062013-09-02 Pierre Muller <muller@sourceware.org>
4107
4108 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
4109 or WriteProcessMemory complete successfully and handle
4110 ERROR_PARTIAL_COPY error.
4111
9a13b2fa
PA
41122013-09-02 Pedro Alves <palves@redhat.com>
4113
4114 * server.c (gdb_read_memory): Return -1 on traceframe memory read
4115 error instead of EIO.
4116
602e3198
JK
41172013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4118
4119 PR server/15604
4120 * linux-low.c: Include filestuff.h.
4121 (linux_create_inferior) <pid == 0>: Call close_most_fds.
4122 * lynx-low.c: Include filestuff.h.
4123 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
4124 * server.c: Include filestuff.h.
4125 (main): Call notice_open_fds.
4126 * spu-low.c: Include filestuff.h.
4127 (spu_create_inferior) <pid == 0>: Call close_most_fds.
4128
96d7229d
LM
41292013-08-22 Luis Machado <lgustavo@codesourcery.com>
4130
4131 * Makefile.in: Explain why ../target and ../nat are not
4132 listed as include file search paths.
4133 (linux-waitpid.o): New object file rule.
4134 * configure.srv (srv_native_linux_obj): New variable.
4135 Replace all occurrences of linux native object files with
4136 $srv_native_linux_obj.
4137 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
4138 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
4139 (linux_enable_event_reporting): Remove declaration.
4140 (my_waitpid): Moved to common/linux-waitpid.c.
4141 (linux_wait_for_event): Pass ptid when calling
4142 linux_enable_event_reporting.
4143 (linux_supports_tracefork_flag): Remove.
4144 (linux_enable_event_reporting): Likewise.
4145 (linux_tracefork_grandchild): Remove.
4146 (STACK_SIZE): Moved to common/linux-ptrace.c.
4147 (linux_tracefork_child): Remove.
4148 (linux_test_for_tracefork): Remove.
4149 (linux_look_up_symbols): Call linux_supports_traceclone.
4150 (initialize_low): Remove call to linux_test_for_tracefork.
4151 * linux-low.h (PTRACE_TYPE_ARG3): Move to
4152 common/linux-ptrace.h.
4153 (PTRACE_TYPE_ARG4): Likewise.
4154 Include linux-ptrace.h.
4155
32940073
PA
41562013-08-21 Pedro Alves <palves@redhat.com>
4157
4158 * config.in: Renegerate.
4159
33b60d58 41602013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 4161
33b60d58
LM
4162 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
4163 (SFILES): Remove $(srcdir)/common/target-common.c and
4164 add $(srcdir)/target/waitstatus.c.
4165 (OBS): Remove target-common.o and add waitstatus.o.
4166 (server_h): Remove $(srcdir)/../common/target-common.h and
4167 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
4168 and $(srcdir)/../target/waitstatus.h.
4169 (target-common.o): Remove.
4170 (waitstatus.o): New target object file.
4171 * target.h: Do not include target-common.h and
4172 include target/resume.h, target/wait.h and
4173 target/waitstatus.h.
4174
b8e1b30e
LM
41752013-08-13 Luis Machado <lgustavo@codesourcery.com>
4176
4177 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
4178 to PTRACE_TYPE_ARG3.
4179 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
4180 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
4181 PTRACE_TYPE_ARG4.
4182 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
4183 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
4184
7a60ad40
YQ
41852013-07-27 Jie Zhang <jie@codesourcery.com>
4186 Daniel Jacobowitz <dan@codesourcery.com>
4187 Yao Qi <yao@codesourcery.com>
4188
4189 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
4190 (mips-linux-watch.o): New rule.
4191 (mips_linux_watch_h): New variable.
4192 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
4193 srv_tgtobj.
4194 * linux-mips-low.c: Include mips-linux-watch.h.
4195 (struct arch_process_info, struct arch_lwp_info): New.
4196 (update_watch_registers_callback): New function.
4197 (mips_linux_new_process, mips_linux_new_thread) New functions.
4198 (mips_linux_prepare_to_resume, mips_insert_point): New
4199 functions.
4200 (mips_remove_point, mips_stopped_by_watchpoint): New
4201 functions.
4202 (rsp_bp_type_to_target_hw_bp_type): New function.
4203 (mips_stopped_data_address): New function.
4204 (the_low_target): Add watchpoint support functions.
4205
de6f69ad
YQ
42062013-07-27 Yao Qi <yao@codesourcery.com>
4207
4208 * i386-low.c: Include break-common.h.
4209 (enum target_hw_bp_type): Remove.
4210
3360c0bf
LM
42112013-07-24 Luis Machado <lgustavo@codesourcery.com>
4212
4213 * Makefile.in (SFILES): /common/target-common.c.
4214 (OBS): Add target-common.o.
4215 (server_h): Add $(srcdir)/../common/target-common.h.
4216 (target-common.o): New target.
4217 * server.c (queue_stop_reply_callback): Free
4218 status string after use.
4219 * target.c (target_waitstatus_to_string): Remove.
4220 * target.h: Include target-common.h.
4221 (resume_kind): Likewise.
4222 (target_waitkind): Likewise.
4223 (target_waitstatus): Likewise.
4224 (TARGET_WNOHANG): Likewise.
4225
bd885420
YQ
42262013-07-04 Yao Qi <yao@codesourcery.com>
4227
4228 * Makefile.in (host_alias): Use @host_noncanonical@.
4229 (target_alias): Use @target_noncanonical@.
4230 * configure.ac: Use ACX_NONCANONICAL_TARGET and
4231 ACX_NONCANONICAL_HOST.
4232 * configure: Regenerated.
4233
4234 Revert:
4235 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
4236
4237 * configure.ac (version_host, version_target): Set and AC_SUBST them.
4238 * configure: Rebuild.
4239 * Makefile.in (version_host, version_target): Get from configure.
4240 (version.c): Use $(version_host) and $(version_target).
4241
17ef446e
PA
42422013-07-03 Pedro Alves <palves@redhat.com>
4243
4244 * Makefile.in (config.status): Depend on development.sh.
4245 * acinclude.m4: Include libmcheck.m4.
4246 * configure: Regenerate.
4247
7a9a7487
MG
42482013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
4249
4250 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
4251 attribute inside the parentheses.
4252 (winapi_DebugSetProcessKillOnExit): Ditto.
4253 (winapi_DebugBreakProcess): Ditto.
4254 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 4255
49b64de6
MG
42562013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
4257
4258 * notif.h (notif_event): Add a dummy member to avoid compiler
4259 errors.
4260
d5749ee7
PA
42612013-07-01 Pedro Alves <palves@redhat.com>
4262
4263 * hostio.c (HOSTIO_PATH_MAX): Define.
4264 (require_filename, handle_open, handle_unlink, handle_readlink):
4265 Use it.
4266
d8d2a3ee
PA
42672013-07-01 Pedro Alves <palves@redhat.com>
4268
4269 * server.h: Include "pathmax.h".
4270 * linux-low.c: Don't include sys/param.h.
4271 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
4272 MAXPATHLEN.
4273 * win32-low.c: Don't include sys/param.h.
4274 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
4275
bc7dea8d
PA
42762013-07-01 Pedro Alves <palves@redhat.com>
4277
4278 * event-loop.c: Don't check HAVE_UNISTD_H before including
4279 <unistd.h>.
4280 * gdbreplay.c: Likewise.
4281 * remote-utils.c: Likewise.
4282 * server.c: Likewise.
4283 * configure.ac: Don't check for unistd.h.
4284 * configure: Regenerate.
4285
d6c2da54
TT
42862013-06-28 Tom Tromey <tromey@redhat.com>
4287
4288 * Makefile.in (version.c): Use version.in, not
4289 common/version.in.
4290
257b6bec
MG
42912013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
4292
4293 * configure.ac (version_host, version_target): Set and AC_SUBST them.
4294 * configure: Rebuild.
4295 * Makefile.in (version_host, version_target): Get from configure.
4296 (version.c): Use $(version_host) and $(version_target).
4297
86ebe149
DK
42982013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
4299
4300 Fix trace-status to output user name without trailing colon.
4301 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
4302
f30aa5af
DK
43032013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
4304
4305 Fix trace-status to output proper start-time and stop-time.
4306 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
4307 output start time and stop time in hex as gdb expects.
4308
28a93511
YQ
43092013-06-26 Pedro Alves <pedro@codesourcery.com>
4310
4311 * tracepoint.c (build_traceframe_info_xml): Output trace state
4312 variables present in the trace buffer.
4313
01208463
TT
43142013-06-24 Tom Tromey <tromey@redhat.com>
4315
4316 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
4317 create-version.sh.
4318 (version.o): Remove.
4319 * gdbreplay.c: Include version.h.
4320 (version, host_name): Don't declare.
4321 * server.h: Include version.h.
4322 (version, host_name): Don't declare.
4323
760256f9
PA
43242013-06-12 Pedro Alves <palves@redhat.com>
4325
4326 * linux-x86-low.c (linux_is_elf64): Delete global.
4327 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
4328 with local linux_pid_exe_is_elf_64_file use.
4329
030031ee
PA
43302013-06-11 Pedro Alves <palves@redhat.com>
4331
4332 * linux-low.c (regset_disabled, disable_regset): New functions.
4333 (regsets_fetch_inferior_registers)
4334 (regsets_store_inferior_registers): Use them.
4335 (initialize_regsets_info); Don't allocate the disabled_regsets
4336 array here.
4337 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
4338 comment.
4339
5da6eb0a
PA
43402013-06-11 Pedro Alves <palves@redhat.com>
4341
4342 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
4343 xmalloc.
4344
7e5aaa09
PA
43452013-06-11 Pedro Alves <palves@redhat.com>
4346
4347 * linux-x86-low.c (initialize_low_arch): Call
4348 init_registers_x32_avx_linux.
4349
d878444c
JK
43502013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
4351
4352 Fix compatibility with Android Bionic.
4353 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
4354 it is not empty.
4355
3aee8918
PA
43562013-06-07 Pedro Alves <palves@redhat.com>
4357
5f2b57b5 4358 PR server/14823
3aee8918
PA
4359 * Makefile.in (OBS): Add tdesc.o.
4360 (IPA_OBJS): Add tdesc-ipa.o.
4361 (tdesc-ipa.o): New rule.
4362 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
4363 interface.
4364 * linux-low.c (new_inferior): Delete.
4365 (disabled_regsets, num_regsets): Delete.
4366 (linux_add_process): Adjust to set the new per-process
4367 new_inferior flag.
4368 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
4369 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
4370 was a stop. When calling arch_setup, switch the current inferior
4371 to the thread that got an event.
4372 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
4373 (regsets_fetch_inferior_registers)
4374 (regsets_store_inferior_registers): New regsets_info parameter.
4375 Adjust to use it.
4376 (linux_register_in_regsets): New regs_info parameter. Adjust to
4377 use it.
4378 (register_addr, fetch_register, store_register): New usrregs_info
4379 parameter. Adjust to use it.
4380 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
4381 parameter regs_info. Adjust to use it.
4382 (linux_fetch_registers): Get the current inferior's regs_info, and
4383 adjust to use it.
4384 (linux_store_registers): Ditto.
4385 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
4386 (initialize_low): Don't initialize the target_regsets here. Call
4387 initialize_low_arch.
4388 * linux-low.h (target_regsets): Delete declaration.
4389 (struct regsets_info): New.
4390 (struct usrregs_info): New.
4391 (struct regs_info): New.
4392 (struct process_info_private) <new_inferior>: New field.
4393 (struct linux_target_ops): Delete the num_regs, regmap, and
4394 regset_bitmap fields. New field regs_info.
4395 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
4396 * i387-fp.c (num_xmm_registers): Delete.
4397 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
4398 calls to new interface.
4399 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
4400 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
4401 Infer the number of xmm registers from the regcache's target
4402 description.
4403 * i387-fp.h (num_xmm_registers): Delete.
4404 * inferiors.c (add_thread): Don't install the thread's regcache
4405 here.
4406 * proc-service.c (gregset_info): Fetch the current inferior's
4407 regs_info. Adjust to use it.
4408 * regcache.c: Include tdesc.h.
4409 (register_bytes, reg_defs, num_registers)
4410 (gdbserver_expedite_regs): Delete.
4411 (get_thread_regcache): If the thread doesn't have a regcache yet,
4412 create one, instead of aborting gdbserver.
4413 (regcache_invalidate_one): Rename to ...
4414 (regcache_invalidate_thread): ... this.
4415 (regcache_invalidate_one): New.
4416 (regcache_invalidate): Only invalidate registers of the current
4417 process.
4418 (init_register_cache): Add target_desc parameter, and use it.
4419 (new_register_cache): Ditto. Assert the target description has a
4420 non zero registers_size.
4421 (regcache_cpy): Add assertions. Adjust.
4422 (realloc_register_cache, set_register_cache): Delete.
4423 (registers_to_string, registers_from_string): Adjust.
4424 (find_register_by_name, find_regno, find_register_by_number)
4425 (register_cache_size): Add target_desc parameter, and use it.
4426 (free_register_cache_thread, free_register_cache_thread_one)
4427 (regcache_release, register_cache_size): New.
4428 (register_size): Add target_desc parameter, and use it.
4429 (register_data, supply_register, supply_register_zeroed)
4430 (supply_regblock, supply_register_by_name, collect_register)
4431 (collect_register_as_string, collect_register_by_name): Adjust.
4432 * regcache.h (struct target_desc): Forward declare.
4433 (struct regcache) <tdesc>: New field.
4434 (init_register_cache, new_register_cache): Add target_desc
4435 parameter.
4436 (regcache_invalidate_thread): Declare.
4437 (regcache_invalidate_one): Delete declaration.
4438 (regcache_release): Declare.
4439 (find_register_by_number, register_cache_size, register_size)
4440 (find_regno): Add target_desc parameter.
4441 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
4442 declarations.
4443 * remote-utils.c: Include tdesc.h.
4444 (outreg, prepare_resume_reply): Adjust.
4445 * server.c: Include tdesc.h.
4446 (gdbserver_xmltarget): Delete declaration.
4447 (get_features_xml, process_serial_event): Adjust.
4448 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
4449 declare.
4450 (struct process_info) <tdesc>: New field.
4451 (ipa_tdesc): Declare.
4452 * tdesc.c: New file.
4453 * tdesc.h: New file.
4454 * tracepoint.c: Include tdesc.h.
4455 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
4456 (get_context_regcache): Adjust to pass ipa_tdesc down.
4457 (do_action_at_tracepoint): Adjust to get the register cache size
4458 from the context regcache's description.
4459 (traceframe_walk_blocks): Adjust to get the register cache size
4460 from the current trace frame's description.
4461 (traceframe_get_pc): Adjust to get current trace frame's
4462 description and pass it down.
4463 (gdb_collect): Adjust to get the register cache size from the
4464 IPA's description.
4465 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
4466 (gdbserver_xmltarget): Delete.
4467 (initialize_low_tracepoint): Set the ipa's target description.
4468 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
4469 (initialize_low_tracepoint): Set the ipa's target description.
4470 * linux-x86-low.c: Include tdesc.h.
4471 [__x86_64__] (is_64bit_tdesc): New.
4472 (ps_get_thread_area, x86_get_thread_area): Use it.
4473 (i386_cannot_store_register): Rename to ...
4474 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
4475 (i386_cannot_fetch_register): Rename to ...
4476 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
4477 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
4478 to new interface.
4479 (target_regsets): Rename to ...
4480 (x86_regsets): ... this.
4481 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
4482 interface.
4483 (x86_siginfo_fixup): Use is_64bit_tdesc.
4484 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
4485 (tdesc_x32_avx_linux, tdesc_x32_linux)
4486 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
4487 Declare.
4488 (x86_linux_update_xmltarget): Delete.
4489 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
4490 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
4491 (AMD64_LINUX_USER64_CS): New.
4492 (x86_linux_read_description): New, based on
4493 x86_linux_update_xmltarget.
4494 (same_process_callback): New.
4495 (x86_arch_setup_process_callback): New.
4496 (x86_linux_update_xmltarget): New.
4497 (x86_regsets_info): New.
4498 (amd64_linux_regs_info): New.
4499 (i386_linux_usrregs_info): New.
4500 (i386_linux_regs_info): New.
4501 (x86_linux_regs_info): New.
4502 (x86_arch_setup): Reimplement.
4503 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
4504 (x86_emit_ops): Ditto.
4505 (the_low_target): Adjust. Install x86_linux_regs_info,
4506 x86_cannot_fetch_register, and x86_cannot_store_register.
4507 (initialize_low_arch): New.
4508 * linux-ia64-low.c (tdesc_ia64): Declare.
4509 (ia64_fetch_register): Adjust.
4510 (ia64_usrregs_info, regs_info): New globals.
4511 (ia64_regs_info): New function.
4512 (the_low_target): Adjust.
4513 (initialize_low_arch): New function.
4514 * linux-sparc-low.c (tdesc_sparc64): Declare.
4515 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
4516 Adjust.
4517 (sparc_arch_setup): New function.
4518 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
4519 (the_low_target): Adjust.
4520 (initialize_low_arch): New function.
4521 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
4522 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
4523 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
4524 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
4525 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
4526 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
4527 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
4528 (tdesc_powerpc_isa205_vsx64l): Declare.
4529 (ppc_cannot_store_register, ppc_collect_ptrace_register)
4530 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
4531 (ppc_set_pc, ppc_get_hwcap): Adjust.
4532 (ppc_usrregs_info): Forward declare.
4533 (!__powerpc64__) ppc_regmap_adjusted: New global.
4534 (ppc_arch_setup): Adjust to the current process'es target
4535 description.
4536 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
4537 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
4538 (ppc_store_evrregset): Adjust.
4539 (target_regsets): Rename to ...
4540 (ppc_regsets): ... this, and make static.
4541 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
4542 (ppc_regs_info): New function.
4543 (the_low_target): Adjust.
4544 (initialize_low_arch): New function.
4545 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
4546 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
4547 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
4548 (tdesc_s390x_linux64v2): Declare.
4549 (s390_collect_ptrace_register, s390_supply_ptrace_register)
4550 (s390_fill_gregset, s390_store_last_break): Adjust.
4551 (target_regsets): Rename to ...
4552 (s390_regsets): ... this, and make static.
4553 (s390_get_pc, s390_set_pc): Adjust.
4554 (s390_get_hwcap): New target_desc parameter, and use it.
4555 [__s390x__] (have_hwcap_s390_high_gprs): New global.
4556 (s390_arch_setup): Adjust to set the current process'es target
4557 description. Don't adjust the regmap.
4558 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
4559 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
4560 (regs_info_3264): New globals.
4561 (s390_regs_info): New function.
4562 (the_low_target): Adjust.
4563 (initialize_low_arch): New function.
4564 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
4565 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
4566 [__mips64] (init_registers_mips_linux)
4567 (init_registers_mips_dsp_linux): Delete defines.
4568 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
4569 (have_dsp): New global.
4570 (mips_read_description): New, based on mips_arch_setup.
4571 (mips_arch_setup): Reimplement.
4572 (get_usrregs_info): New function.
4573 (mips_cannot_fetch_register, mips_cannot_store_register)
4574 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
4575 (mips_fill_fpregset, mips_store_fpregset): Adjust.
4576 (target_regsets): Rename to ...
4577 (mips_regsets): ... this, and make static.
4578 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
4579 (dsp_regs_info, regs_info): New globals.
4580 (mips_regs_info): New function.
4581 (the_low_target): Adjust.
4582 (initialize_low_arch): New function.
4583 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
4584 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
4585 Declare.
4586 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
4587 (arm_read_description): New, with bits factored from
4588 arm_arch_setup.
4589 (arm_arch_setup): Reimplement.
4590 (target_regsets): Rename to ...
4591 (arm_regsets): ... this, and make static.
4592 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
4593 (arm_regs_info): New function.
4594 (the_low_target): Adjust.
4595 (initialize_low_arch): New function.
4596 * linux-m68k-low.c (tdesc_m68k): Declare.
4597 (target_regsets): Rename to ...
4598 (m68k_regsets): ... this, and make static.
4599 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
4600 (m68k_regs_info): New function.
4601 (m68k_arch_setup): New function.
4602 (the_low_target): Adjust.
4603 (initialize_low_arch): New function.
4604 * linux-sh-low.c (tdesc_sharch): Declare.
4605 (target_regsets): Rename to ...
4606 (sh_regsets): ... this, and make static.
4607 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
4608 (sh_regs_info, sh_arch_setup): New functions.
4609 (the_low_target): Adjust.
4610 (initialize_low_arch): New function.
4611 * linux-bfin-low.c (tdesc_bfin): Declare.
4612 (bfin_arch_setup): New function.
4613 (bfin_usrregs_info, regs_info): New globals.
4614 (bfin_regs_info): New function.
4615 (the_low_target): Adjust.
4616 (initialize_low_arch): New function.
4617 * linux-cris-low.c (tdesc_cris): Declare.
4618 (cris_arch_setup): New function.
4619 (cris_usrregs_info, regs_info): New globals.
4620 (cris_regs_info): New function.
4621 (the_low_target): Adjust.
4622 (initialize_low_arch): New function.
4623 * linux-cris-low.c (tdesc_crisv32): Declare.
4624 (cris_arch_setup): New function.
4625 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
4626 (cris_regs_info): New function.
4627 (the_low_target): Adjust.
4628 (initialize_low_arch): New function.
4629 * linux-m32r-low.c (tdesc_m32r): Declare.
4630 (m32r_arch_setup): New function.
4631 (m32r_usrregs_info, regs_info): New globals.
4632 (m32r_regs_info): Adjust.
4633 (initialize_low_arch): New function.
4634 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
4635 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
4636 (tic6x_usrregs_info): Forward declare.
4637 (tic6x_read_description): New function, based on ...
4638 (tic6x_arch_setup): ... this. Reimplement.
4639 (target_regsets): Rename to ...
4640 (tic6x_regsets): ... this, and make static.
4641 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
4642 (tic6x_regs_info): New function.
4643 (the_low_target): Adjust.
4644 (initialize_low_arch): New function.
4645 * linux-xtensa-low.c (tdesc_xtensa): Declare.
4646 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
4647 (target_regsets): Rename to ...
4648 (xtensa_regsets): ... this, and make static.
4649 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
4650 globals.
4651 (xtensa_arch_setup, xtensa_regs_info): New functions.
4652 (the_low_target): Adjust.
4653 (initialize_low_arch): New function.
4654 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
4655 (nios2_arch_setup): Set the current process'es tdesc.
4656 (target_regsets): Rename to ...
4657 (nios2_regsets): ... this.
4658 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
4659 (nios2_regs_info): New function.
4660 (the_low_target): Adjust.
4661 (initialize_low_arch): New function.
a261b8f5
PA
4662 * linux-aarch64-low.c (tdesc_aarch64): Declare.
4663 (aarch64_arch_setup): Set the current process'es tdesc.
4664 (target_regsets): Rename to ...
4665 (aarch64_regsets): ... this.
4666 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
4667 (aarch64_regs_info): New function.
4668 (the_low_target): Adjust.
4669 (initialize_low_arch): New function.
3aee8918
PA
4670 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
4671 globals.
4672 (target_regsets): Rename to ...
4673 (tile_regsets): ... this.
4674 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
4675 (tile_regs_info): New function.
4676 (tile_arch_setup): Set the current process'es tdesc.
4677 (the_low_target): Adjust.
4678 (initialize_low_arch): New function.
4679 * spu-low.c (tdesc_spu): Declare.
4680 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
4681 * win32-arm-low.c (tdesc_arm): Declare.
4682 (arm_arch_setup): New function.
4683 (the_low_target): Install arm_arch_setup instead of
4684 init_registers_arm.
4685 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
4686 (init_windows_x86): Rename to ...
4687 (i386_arch_setup): ... this. Set `win32_tdesc'.
4688 (the_low_target): Adjust.
4689 * win32-low.c (win32_tdesc): New global.
4690 (child_add_thread): Don't create the thread cache here.
4691 (do_initial_child_stuff): Set the new process'es tdesc.
4692 * win32-low.h (struct target_desc): Forward declare.
4693 (win32_tdesc): Declare.
4694 * lynx-i386-low.c (tdesc_i386): Declare global.
4695 (lynx_i386_arch_setup): Set `lynx_tdesc'.
4696 * lynx-low.c (lynx_tdesc): New global.
4697 (lynx_add_process): Set the new process'es tdesc.
4698 * lynx-low.h (struct target_desc): Forward declare.
4699 (lynx_tdesc): Declare global.
4700 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
4701 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
4702 * nto-low.c (nto_tdesc): New global.
4703 (do_attach): Set the new process'es tdesc.
4704 * nto-low.h (struct target_desc): Forward declare.
4705 (nto_tdesc): Declare.
4706 * nto-x86-low.c (tdesc_i386): Declare.
4707 (nto_x86_arch_setup): Set `nto_tdesc'.
4708
b1fbec62
GB
47092013-06-04 Gary Benson <gbenson@redhat.com>
4710
4711 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
4712 to qSupported response when appropriate.
4713 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
4714 with nonzero-length annex.
4715 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
4716 arguments supplied in annex.
4717
d1ec4ce7
DE
47182013-05-31 Doug Evans <dje@google.com>
4719
ac44adcb 4720 PR server/15594
d1ec4ce7
DE
4721 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
4722 64 bits in 64-cross-32 environment.
4723
9b25f2d3
PA
47242013-05-28 Pedro Alves <palves@redhat.com>
4725
4726 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
4727 (aarch64-without-fpu.c): Delete rule.
4728 * configure.srv (aarch64*-*-linux*): Remove references to
4729 aarch64-without-fpu.o and aarch64-without-fpu.xml.
4730 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
4731 declaration.
4732
6740dc9c
PA
47332013-05-24 Pedro Alves <palves@redhat.com>
4734
4735 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
4736 instead of strchr/decode_address. Error if the range isn't split
4737 with a ','. Don't assume there's be a ':' in the action.
4738
c2d6af84
PA
47392013-05-23 Yao Qi <yao@codesourcery.com>
4740 Pedro Alves <palves@redhat.com>
4741
4742 * linux-low.c (lwp_in_step_range): New function.
4743 (linux_wait_1): If the thread was range stepping and stopped
4744 outside the stepping range, report the stop to GDB. Otherwise,
4745 continue stepping. Add range stepping debug output.
4746 (linux_set_resume_request): Copy the step range from the resume
4747 request to the lwp.
4748 (linux_supports_range_stepping): New.
4749 (linux_target_ops) <supports_range_stepping>: Set to
4750 linux_supports_range_stepping.
4751 * linux-low.h (struct linux_target_ops)
4752 <supports_range_stepping>: New field.
4753 (struct lwp_info) <step_range_start, step_range_end>: New fields.
4754 * linux-x86-low.c (x86_supports_range_stepping): New.
4755 (the_low_target) <supports_range_stepping>: Set to
4756 x86_supports_range_stepping.
4757 * server.c (handle_v_cont): Handle 'r' action.
4758 (handle_v_requests): Append ";r" if the target supports range
4759 stepping.
4760 * target.h (struct thread_resume) <step_range_start,
4761 step_range_end>: New fields.
4762 (struct target_ops) <supports_range_stepping>:
4763 New field.
4764 (target_supports_range_stepping): New macro.
4765
58794e1a
JB
47662013-05-17 Joel Brobecker <brobecker@adacore.com>
4767
4768 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
4769 confusion in comment.
4770
d631c5a7
JB
47712013-05-17 Joel Brobecker <brobecker@adacore.com>
4772
4773 * lynx-low.c (struct process_info_private): New type.
4774 (lynx_add_process): New function.
4775 (lynx_create_inferior, lynx_attach): Replace calls to
4776 add_process by calls to lynx_add_process.
4777 (lynx_resume): If PTID is null, then try using
4778 current_process()->private->last_wait_event_ptid.
4779 Add comments.
4780 (lynx_clear_inferiors): Delete. The contents of that function
4781 has been inlined in lynx_mourn;
4782 (lynx_wait_1): Save the ptid in the process's private data.
4783 (lynx_mourn): Free the process' private data. Replace call
4784 to lynx_clear_inferiors by call to clear_inferiors.
4785
96f7a20f
YQ
47862013-05-17 Yao Qi <yao@codesourcery.com>
4787
4788 * i386-low.c (i386_length_and_rw_bits): Move the comment to
4789 the right place.
4790
db0dfaa0
LM
47912013-05-16 Luis Machado <lgustavo@codesourcery.com>
4792
4793 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
4794 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
4795 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
4796 PT_TEXT_END_ADDR guards. Update comments.
4797 (linux_target_op) <read_offsets>: Conditionally define to
4798 linux_read_offsets if the target is UCLIBC and if it defines
4799 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
4800
68f5f838
SL
48012013-05-06 Sandra Loosemore <sandra@codesourcery.com>
4802 Andrew Jenner <andrew@codesourcery.com>
4803
4804 * Makefile.in (SFILES): Add linux-nios2-low.c.
4805 (clean): Add action to delete nios2-linux.c.
4806 (nios2-linux.c): New rule.
4807 * configure.srv: Add nios2*-*-linux*.
4808 * linux-nios2-low.c: New.
4809
1ebff1fd
HAQ
48102013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
4811
4812 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
4813
f6150862
HZ
48142013-04-25 Hui Zhu <hui@codesourcery.com>
4815
4816 PR gdb/15186
f6150862
HZ
4817 * ax.c (ax_printf): Add fflush.
4818
614c279d
TT
48192013-04-22 Tom Tromey <tromey@redhat.com>
4820
4821 * Makefile.in (SFILES): Add filestuff.c.
4822 (OBS): Add filestuff.o.
4823 (filestuff.o): New target.
4824 * config.in, configure: Rebuild.
4825 * configure.ac: Check for fdwalk, pipe2.
4826
7d4e5717
PA
48272013-04-17 Pedro Alves <palves@redhat.com>
4828
4829 * configure.ac (USE_THREAD_DB): Delete variable.
4830 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
4831 Don't AC_SUBST USE_THREAD_DB.
4832 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
4833 * config.in, configure: Regenerate.
4834
d5c93e41
PA
48352013-04-16 Pedro Alves <palves@redhat.com>
4836
4837 * linux-low.h (struct lwp_info) <thread_known>: Move under
4838 the USE_THREAD_DB #ifdef.
4839
04f5fe89
PA
48402013-04-16 Pedro Alves <palves@redhat.com>
4841
4842 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
4843 (linux-low.o): Delete rule.
4844 * linux-low.h: Always include "gdb_thread_db.h" instead of
4845 conditionally including thread_db.h.
4846 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
4847 HAVE_THREAD_DB_H.
4848
480b27bf
JK
48492013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
4850
4851 * Makefile.in (install-only): Fix make install regression.
4852
43662968
JK
48532013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
4854
4855 Convert man pages to texinfo, new gdbinit.5 texinfo page.
4856 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
4857 installation.
4858 * gdbserver.1: Remove.
4859
3e74e146
PA
48602013-03-22 Pedro Alves <palves@redhat.com>
4861
4862 * linux-low.c (handle_extended_wait): Don't call
4863 linux_enable_event_reporting.
4864
a8347a2a
TT
48652013-03-15 Tony Theodore <tonyt@logyst.com>
4866
4867 PR build/9098:
4868 * Makefile.in (SHELL): Use @SHELL@.
4869
eeb56fa7
SDJ
48702013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
4871
4872 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
4873 compiler warning.
4874
4fa7e2ff
JB
48752013-03-13 Joel Brobecker <brobecker@adacore.com>
4876
4877 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
4878 Remove extraneous NULL element.
4879
8ddb1965
YQ
48802013-03-13 Yao Qi <yao@codesourcery.com>
4881
4882 * tracepoint.c (traceframe_read_tsv): Look for the last matched
4883 'V' block in trace frame.
4884
9accd112
MM
48852013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4886
4887 * target.h (struct target_ops): Add btrace ops.
4888 (target_supports_btrace): New macro.
4889 (target_enable_btrace): New macro.
4890 (target_disable_btrace): New macro.
4891 (target_read_btrace): New macro.
4892 * gdbthread.h (struct thread_info): Add btrace field.
4893 * server.c: Include btrace-common.h.
4894 (handle_btrace_general_set): New function.
4895 (handle_btrace_enable): New function.
4896 (handle_btrace_disable): New function.
4897 (handle_general_set): Call handle_btrace_general_set.
4898 (handle_qxfer_btrace): New function.
4899 (struct qxfer qxfer_packets[]): Add btrace entry.
4900 * inferiors.c (remove_thread): Disable btrace.
4901 * linux-low: Include linux-btrace.h.
4902 (linux_low_enable_btrace): New function.
4903 (linux_low_read_btrace): New function.
4904 (linux_target_ops): Add btrace ops.
4905 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
4906 Add srv_linux_btrace=yes.
4907 (x86_64-*-linux*): Add linux-btrace.o.
4908 Add srv_linux_btrace=yes.
4909 * configure.ac: Define HAVE_LINUX_BTRACE.
4910 * config.in: Regenerated.
4911 * configure: Regenerated.
4912
5cc22e4c
MM
49132013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4914
4915 * server.c (handle_qxfer): Preserve error message if -3 is
4916 returned.
4917 (qxfer): Document the -3 return value.
4918
7c97f91e
MM
49192013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4920
4921 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
4922 (linux_btrace_h): New variable.
4923 (linux-btrace.o): New rule.
4924
be9a119c 49252013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
4926 Hafiz Abid Qadeer <abidh@codesourcery.com>
4927
4928 * tracepoint.c (trace_buffer_size): New global.
4929 (DEFAULT_TRACE_BUFFER_SIZE): New define.
4930 (init_trace_buffer): Change to one-argument function. Allocate
4931 trace buffer memory.
4932 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
4933 handle QTBuffer:size packet.
4934 (cmd_bigqtbuffer_size): New function.
4935 (initialize_tracepoint): Call init_trace_buffer with
4936 DEFAULT_TRACE_BUFFER_SIZE.
4937 * server.c (handle_query): Add QTBuffer:size in the
4938 supported packets.
4939
e64f7499
YQ
49402013-03-07 Yao Qi <yao@codesourcery.com>
4941
4942 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
4943 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
4944 of -1.
4945 (cmd_qtsp): Adjust condition. Do post increment.
4946 Set cur_action and cur_step_action back to 0.
4947
f0ae6fc3
PA
49482013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
4949
4950 PR server/15236
4951 * linux-low.c (linux_write_memory): Return early success if LEN is
4952 zero.
4953
b5b0b0af
CV
49542013-03-05 Corinna Vinschen <vinschen@redhat.de>
4955
334ad4a8 4956 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 4957
589bc927
TT
49582013-02-28 Tom Tromey <tromey@redhat.com>
4959
4960 * configure.ac: Invoke AC_SYS_LARGEFILE.
4961 * configure, config.in: Rebuild.
4962
dfe07582
CV
49632013-02-28 Corinna Vinschen <vinschen@redhat.com>
4964
4965 * win32-low.c: Throughout, fix format strings and casts of
4966 printf-like functions to avoid type related warnings on all
4967 platforms.
4968 (get_child_debug_event): Print dwDebugEventCode as hex since
4969 that's how it's usually documented.
4970
736cd585
YQ
49712013-02-28 Yao Qi <yao@codesourcery.com>
4972
4973 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
4974 pulongest.
4975
e1f58301
JW
49762013-02-27 Jiong Wang <jiwang@tilera.com>
4977
4978 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
4979 (reg-tilegx32.c): New rule.
4980 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
4981 * linux-tile-low.c (tile_arch_setup): New function. Invoke
4982 different register info initializer according to elf class.
4983 (init_registers_tilgx32): New function. The tilegx32 register info
4984 initializer.
4985 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
4986 (tile_store_gregset): Likewise.
4987
d171ca78
YQ
49882013-02-27 Yao Qi <yao@codesourcery.com>
4989
4990 * server.c (process_point_options): Print debug message when
4991 debug_threads is true.
4992
282bbdf3
YQ
49932013-02-26 Yao Qi <yao@codesourcery.com>
4994
4995 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
4996
aca22551
PA
49972013-02-19 Pedro Alves <palves@redhat.com>
4998 Kai Tietz <ktietz@redhat.com>
4999
5000 PR gdb/15161
5001
5002 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
5003 instead of strtoul to extract address from packet.
5004 (process_serial_event) <'z'>: Likewise.
5005
4f3cee1c
YQ
50062013-02-18 Yao Qi <yao@codesourcery.com>
5007
5008 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
5009
8e1d55a3
PA
50102013-02-14 Pedro Alves <palves@redhat.com>
5011
5012 Plug memory leak.
5013
5014 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
5015 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
5016
458820da
PA
50172013-02-14 Pedro Alves <palves@redhat.com>
5018
5019 * tracepoint.c (cmd_qtdpsrc): Use savestring.
5020
baea0dae
PA
50212013-02-14 Pedro Alves <palves@redhat.com>
5022
5023 * tracepoint.c (save_string): Delete.
5024 (add_tracepoint_action): Use savestring instead of save_string.
5025
0b1afbb3
PA
50262013-02-12 Pedro Alves <palves@redhat.com>
5027
5028 * linux-xtensa-low.c: Ditto.
5029 * xtensa-xtregs.c: Ditto.
5030
8a4ac37e
PA
50312013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
5032
5033 * thread-db.c (thread_db_get_tls_address): NULL pointer check
5034 thread_db.
5035
148de6bb
MS
50362013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
5037
5038 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
5039 aarch64_num_wp_regs and aarch64_num_bp_regs to
5040 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
5041
55fac6e0
MS
50422013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
5043
5044 * linux-aarch64-low.c (ps_get_thread_area): Replace
5045 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
5046
176eb98c
MS
50472013-02-04 Jim MacArthur <jim.macarthur@arm.com>
5048 Marcus Shawcroft <marcus.shawcroft@arm.com>
5049 Nigel Stephens <nigel.stephens@arm.com>
5050 Yufeng Zhang <yufeng.zhang@arm.com>
5051
5052 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
5053 (aarch64.c, aarch64-without-fpu.c): New targets.
5054 * configure.srv (aarch64*-*-linux*): New.
5055 * linux-aarch64-low.c: New file.
5056
56f7af9c
MS
50572013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
5058
43aaf8b6 5059 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
5060 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
5061 (dequeue_one_deferred_signal, linux_resume_one_thread)
5062 (fetch_register, linux_write_memory, linux_enable_event_reporting)
5063 (linux_tracefork_grandchild, linux_test_for_tracefork)
5064 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
5065 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
5066 where the argument is 0.
5067
60f662b0
YQ
50682013-01-25 Yao Qi <yao@codesourcery.com>
5069
5070 * event-loop.c: Include "queue.h".
5071 (gdb_event_p): New typedef.
5072 (struct gdb_event) <next_event>: Remove.
5073 (event_queue): Change to QUEUE(gdb_event_p).
5074 (async_queue_event): Remove.
5075 (gdb_event_xfree): New.
5076 (initialize_event_loop): New.
5077 (process_event): Use API from QUEUE.
5078 (wait_for_event): Likewise.
5079 * server.c (main): Call initialize_event_loop.
5080 * server.h (initialize_event_loop): Declare.
5081
5ae4861a
YQ
50822013-01-18 Yao Qi <yao@codesourcery.com>
5083
5084 * ax.h (struct eval_agent_expr_context): New.
5085 (gdb_eval_agent_expr): Update declaration.
5086 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
5087 TFRAME. Add new argument CTX.
5088 * server.h (struct eval_agent_expr_context): Declare.
5089 (agent_mem_read, agent_tsv_read): Update declaration.
5090 (agent_mem_read_string): Likewise.
5091 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
5092 (add_traceframe_block): Add new argument TPOINT.
5093 Increase TPOINT->traceframe_usage.
5094 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
5095 eval_tracepoint_agent_expr.
5096 (condition_true_at_tracepoint): Likewise.
5097 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
5098 (agent_mem_read_string, agent_tsv_read): Likewise.
5099
85e00e85
YQ
51002013-01-16 Yao Qi <yao@codesourcery.com>
5101
5102 * linux-low.c (linux_resume_one_lwp): Don't check
5103 'lwp->bp_reinsert != 0'.
5104
4039cf45
JB
51052013-01-07 Joel Brobecker <brobecker@adacore.com>
5106 Pedro Alves <palves@redhat.com>
5107
5108 * lynx-low.c (ptrace_request_to_str): Define a temporary
5109 macro and use it to simplify this function's implementation.
5110
9044dee2
JB
51112013-01-07 Joel Brobecker <brobecker@adacore.com>
5112
5113 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
5114 sets errno.
5115
e6352c8f
JB
51162013-01-07 Joel Brobecker <brobecker@adacore.com>
5117
5118 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
5119
50681a27
JB
51202013-01-07 Joel Brobecker <brobecker@adacore.com>
5121
5122 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
5123
3f6e77ef
JB
51242013-01-07 Joel Brobecker <brobecker@adacore.com>
5125
5126 * lynx-low.c (lynx_resume): Use the resume_info parameter
5127 to determine the ptid for the lynx_ptrace call, unless
5128 it is equal to minus_one_ptid, in which case we use the
5129 ptid of the current_inferior.
5130 (lynx_wait_1): After having received a thread create/exit
5131 event, resume the inferior's execution using the signaling
5132 thread's ptid, rather than the old ptid.
5133
7fda33ae
JB
51342013-01-07 Joel Brobecker <brobecker@adacore.com>
5135
5136 * lynx-low.c (lynx_resume): Delete variable ret.
5137
b9786c74
JB
51382013-01-01 Joel Brobecker <brobecker@adacore.com>
5139
5140 * gdbreplay.c (gdbreplay_version): Update copyright year.
5141 * server.c (gdbserver_version): Likewise.
5142
8b93d60f
JB
51432012-12-17 Joel Brobecker <brobecker@adacore.com>
5144
5145 * lynx-low.c (lynx_wait_1): Add debug trace before adding
5146 new thread.
5147
037335a7
JB
51482012-12-17 Joel Brobecker <brobecker@adacore.com>
5149
5150 * lynx-low.c (ptrace_request_to_str): Add handling for
5151 PTRACE_GETTRACESIG.
5152
52d4cbd8
JB
51532012-12-17 Joel Brobecker <brobecker@adacore.com>
5154
5155 * lynx-low.c (lynx_attach): Delete variable new_process.
5156
ab8f6ca9
JB
51572012-12-17 Joel Brobecker <brobecker@adacore.com>
5158
5159 * lynx-low.c (lynx_create_inferior): Delete variable
5160 new_process.
5161
78cbc024
JB
51622012-12-17 Joel Brobecker <brobecker@adacore.com>
5163
5164 * lynx-low.c (ptrace_request_to_str): Do not handle
5165 PTRACE_GETTHREADLIST if this macro does not exist.
5166
14a00470
YQ
51672012-12-15 Yao Qi <yao@codesourcery.com>
5168
5169 * Makefile.in (OBS): Add notif.o.
5170 * notif.c, notif.h: New.
5171 * server.c: Include "notif.h".
5172 (struct vstop_notif) <next>: Remove.
5173 <base>: New field.
5174 (queue_stop_reply): Update.
5175 (push_event, send_next_stop_reply): Remove.
5176 (discard_queued_stop_replies): Update.
5177 (notif_stop): New variable.
5178 (handle_v_stopped): Remove.
5179 (handle_v_requests): Don't call handle_v_stopped. Call
5180 handle_ack_notif instead.
5181 (queue_stop_reply_callback): Call notif_event_enque instead
5182 of queue_stop_reply.
5183 (handle_status): Don't call send_next_stop_reply, call
5184 notif_write_event instead.
5185 (kill_inferior_callback): Likewise.
5186 (detach_or_kill_inferior_callback): Likewise.
5187 (main): Call initialize_notif.
5188 (process_serial_event): Call QUEUE_is_empty.
5189 (handle_target_event): Call notif_push instead of push event.
5190 * server.h (push_event): Remove declaration.
5191
61c125b9
TT
51922012-12-10 Tom Tromey <tromey@redhat.com>
5193
5194 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
5195 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
5196 macros.
5197 (.c.o): Rewrite.
5198 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
5199 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
5200 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
5201 (amd64-linux-ipa.o, ax.o): Rewrite.
5202 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
5203 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
5204 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
5205 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
5206 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
5207 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
5208 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
5209 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
5210 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
5211 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
5212 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
5213 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
5214 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
5215 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
5216 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
5217 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
5218 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
5219 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
5220 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
5221 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
5222 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
5223 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
5224 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
5225 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
5226 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
5227 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
5228 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
5229 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
5230 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
5231 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
5232 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
5233 (reg-tilegx.o): Remove.
5234 (all_object_files): New macro.
5235 Include .deps files.
5236 * aclocal.m4, configure: Rebuild.
5237 * acinclude.m4: Include depstand.m4, lead-dot.m4.
5238 * configure.ac: Invoke ZW_CREATE_DEPDIR,
5239 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
5240
e90e9ad9
TT
52412012-12-05 Tom Tromey <tromey@redhat.com>
5242
5243 PR gdb/14917:
5244 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
5245
02d403bf 52462012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
5247
5248 * configure.ac: Check for linux/perf_event.h.
5249 * config.in: Regenerated.
5250 * configure: Regenerated.
5251
0270a750
PA
52522012-11-26 Maxime Villard <rustyBSD@gmx.fr>
5253
5254 * hostio.c (handle_readlink): Decrease buffer size
5255 parameter passed to readlink by one byte.
5256
8c29b58e
YQ
52572012-11-26 Yao Qi <yao@codesourcery.com>
5258
5259 * configure.ac (build_warnings): Append '-Wempty-body'.
5260 * configure: Regenerated.
5261 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
5262 body.
5263
8bdce1ff
PM
52642012-11-15 Pierre Muller <muller@sourceware.org>
5265
5266 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
5267 * config.in: Regenerate.
5268 * configure: Regenerate.
5269 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
5270 Use "gdb_wait.h" header instead of <sys/wait.h> header.
5271 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
5272 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
5273 header.
5274 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
5275 instead of <sys/wait.h> header.
5276 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
5277
02d403bf 52782012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
5279
5280 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
5281 (various make rules): Remove -DGDBSERVER
5282
fbd5db48
YQ
52832012-11-09 Yao Qi <yao@codesourcery.com>
5284
5285 * spu-low.c (current_ptid): Move it to ..
5286 * gdbthread.h: ... here. New.
5287 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
5288 * server.c (myresume, process_serial_event): Likewise.
5289 * thread-db.c (thread_db_find_new_threads): Likewise.
5290 * tracepoint.c (run_inferior_command): Likewise.
5291
b3dc46ff
AB
52922012-10-01 Andrew Burgess <aburgess@broadcom.com>
5293
5294 * server.c (handle_search_memory_1): Include access length in
5295 warning message.
5296
07c04788
HPN
52972012-09-05 Michael Brandt <michael.brandt@axis.com>
5298
5299 * linux-crisv32-low.c: Fix compile errors.
5300
918d227b
YQ
53012012-09-04 Yao Qi <yao@codesourcery.com>
5302
5303 * tracepoint.c (cmd_qtsv): Adjust debug message.
5304 Don't check CUR_TPOINT.
5305
18c1b81a
YQ
53062012-08-28 Yao Qi <yao@codesourcery.com>
5307
5308 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
5309 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
5310 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
5311 Remove declarations of xmalloc, xreallloc, xstrdup and
5312 freeargv.
5313 * Makefile.in (libiberty_h): New.
5314 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
5315 (linux-bfin-low.o): Append dependency 'libiberty.h'.
5316
dc82f37b
YQ
53172012-08-23 Yao Qi <yao@codesourcery.com>
5318
5319 * server.h: Remove declaration of 'xsnprintf'.
5320
406b1477
KS
53212012-08-22 Keith Seitz <keiths@redhat.com>
5322
5323 * server.h: Include build-gnulib-gbserver/config.h.
5324 * gdbreplay.c: Likewise.
5325
e6712ff1
DE
53262012-08-08 Doug Evans <dje@google.com>
5327
5328 * Makefile.in (SFILES): Add gdb_vecs.c.
5329 (OBS): Add gdb_vecs.o.
5330 (gdb_vecs_h, host_defs_h): New variables.
5331 (thread-db.o): Add $(gdb_vecs_h) dependency.
5332 (gdb_vecs.o): New rule.
5333 * thread-db.c: #include "gdb_vecs.h".
5334 (thread_db_load_search): Use a vector to iterate over path elements.
5335 Handle text appearing after "$pdir".
5336
5337 * configure.ac: Add check for strstr.
5338 * config.in: Regenerate.
5339 * configure: Regenerate.
5340
7c3270ae
UW
53412012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
5342
5343 * hostio.c (handle_pread): If pread fails, fall back to attempting
5344 lseek/read.
5345 (handle_pwrite): Likewise for pwrite.
5346
b62e2b27
UW
53472012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
5348
5349 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
5350 between unsupported TYPE and unimplementable ADDR/LEN combination.
5351 (arm_insert_point): Act on new return value.
5352
78a99e91
PA
53532012-07-31 Pedro Alves <palves@redhat.com>
5354
5355 * server.c (process_point_options): Only skip tokens if we find
5356 one that is unrecognized. Don't treat 'X' specially while
5357 skipping unrecognized tokens.
5358
fcf303ab
UW
53592012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
5360
5361 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
5362 to 4-byte-align HW breakpoint addresses for Thumb.
5363
7255706c
YQ
53642012-07-27 Yao Qi <yao@codesourcery.com>
5365
5366 PR remote/14161.
5367
5368 * server.h: Declare gdb_agent_about_to_close.
5369 * target.c (kill_inferior): Include "agent.h".
5370 New. Send command 'kill'.
5371 * target.h (kill_inferior): Removed macro.
5372 * tracepoint.c (gdb_agent_about_to_close): New.
5373 (gdb_agent_helper_thread): Handle command 'close'.
5374 Wait endlessly until the inferior stops.
5375 Install gdb_agent_remove_socket to atexit hook.
5376 (agent_socket_name): New static variable.
5377 (gdb_agent_socket_init): Replace local variable 'name' with
5378 'agent_socket_name'.
5379 (gdb_agent_remove_socket): New.
5380
5a3f286f
YQ
53812012-07-27 Yao Qi <yao@codesourcery.com>
5382
5383 * server.c (process_point_options): Stop at 'X' when parsing.
5384
961bd387
ME
53852012-07-19 Michael Eager <eager@eagercon.com>
5386
a261b8f5 5387 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
5388 to hw_execute.
5389 * linux-x86-low.c (x86_insert_point, x86_remove_point):
5390 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
5391 hardware breakpoint.
5392
aa7c7447
JK
53932012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5394
5395 * gdbserver/linux-low.c (initialize_low): Call
5396 linux_ptrace_init_warnings.
5397
7f216e7c
DE
53982012-07-02 Doug Evans <dje@google.com>
5399
5400 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
5401 pointer to int.
5402
d3ce09f5
SS
54032012-07-02 Stan Shebs <stan@codesourcery.com>
5404
5405 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
5406 (ax.o): Add it to build rule.
5407 (ax-ipa.o): Ditto.
5408 (OBS): Add format.o.
5409 (IPA_OBS): Add format.o.
5410 * server.c (handle_query): Claim support for breakpoint commands.
5411 (process_point_options): Add command case.
5412 (process_serial_event): Leave running if there are printfs in
5413 effect.
5414 * mem-break.h (any_persistent_commands): Declare.
5415 (add_breakpoint_commands): Declare.
5416 (gdb_no_commands_at_breakpoint): Declare.
5417 (run_breakpoint_commands): Declare.
5418 * mem-break.c (struct point_command_list): New struct.
5419 (struct breakpoint): New field command_list.
5420 (any_persistent_commands): New function.
5421 (add_commands_to_breakpoint): New function.
5422 (add_breakpoint_commands): New function.
5423 (gdb_no_commands_at_breakpoint): New function.
5424 (run_breakpoint_commands): New function.
5425 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
5426 locally.
5427 * ax.c: Include format.h.
5428 (ax_printf): New function.
5429 (gdb_eval_agent_expr): Add printf opcode.
5430
2f8f6aed
YQ
54312012-06-13 Yao Qi <yao@codesourcery.com>
5432
5433 * server.c (start_inferior): Remove duplicated writes to fields
5434 'last_resume_kind' and 'last_status' of 'current_inferior'.
5435
0c9070b3
YQ
54362012-06-12 Yao Qi <yao@codesourcery.com>
5437 Pedro Alves <palves@redhat.com>
5438
5439 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
5440 comment.
5441 * server.c (handle_v_cont): Extend comment.
5442
c52daf70
YQ
54432012-06-11 Yao Qi <yao@codesourcery.com>
5444
5445 * linux-low.c (linux_attach): Add 'static'.
5446
d38bbb0a
YQ
54472012-06-06 Yao Qi <yao@codesourcery.com>
5448
5449 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
5450
89dc0afd
JK
54512012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
5452
5453 Fix gcc -flto compilation warning.
5454 * server.c (main): Make variable multi_mode and attach volatile.
5455
75f62ce7
TJB
54562012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5457
5458 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
5459 if the platform doesn't know about it.
5460
65f479b6
PA
54612012-05-30 Jeff Kenton <jkenton@tilera.com>
5462
5463 * Makefile.in (SFILES): Add linux-tile-low.c.
5464 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
5465 * configure.srv: Handle tilegx-*-linux*.
5466 * linux-tile-low.c: New file.
5467
0c5bf5a9
JK
54682012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5469
5470 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
5471
a493e3e2
PA
54722012-05-24 Pedro Alves <palves@redhat.com>
5473
5474 PR gdb/7205
5475
43aaf8b6 5476 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 5477
2ea28649
PA
54782012-05-24 Pedro Alves <palves@redhat.com>
5479
5480 PR gdb/7205
5481
5482 Replace target_signal with gdb_signal throughout.
5483
8d409d16
MR
54842012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
5485
5486 * linux-low.c (linux_store_registers): Avoid the copying sequence
5487 when no data has been retrieved by ptrace.
5488
23512c01
MGD
54892012-05-22 Will Deacon <will.deacon@arm.com>
5490
5491 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
5492 Include asm/ptrace.h.
5493 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
5494 already defined.
5495
4934b29e
MR
54962012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
5497
5498 * linux-low.c (linux_store_registers): Don't re-retrieve data
5499 with ptrace that has already been obtained from /proc. Always
5500 copy any data retrieved with ptrace to the buffer supplied.
5501
bde24c0a
PA
55022012-05-11 Yao Qi <yao@codesourcery.com>
5503 Pedro Alves <palves@redhat.com>
5504
5505 * linux-low.c (enum stopping_threads_kind): New.
5506 (stopping_threads): Change type to `enum stopping_threads_kind'.
5507 (handle_extended_wait): If stopping and suspending threads, leave
5508 the new_lwp suspended too.
5509 (linux_wait_for_event): Adjust.
5510 (stop_all_lwps): Set `stopping_threads' to
5511 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
5512 whether we're suspending threads or just stopping them. Assert no
5513 recursion happens.
5514
623b6bdf
YQ
55152012-04-29 Yao Qi <yao@codesourcery.com>
5516
5517 * server.h: Move some code to ...
5518 * gdbthread.h: ... here. New.
5519 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
5520 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
5521 (nto-low.o, win32-low.o): Likewise.
5522 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
5523 * regcache.c, remote-utils.c, server.c: Likewise.
5524 * target.c, tracepoint.c, win32-low.c: Likewise.
5525
f15f9948
TJB
55262012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5527
5528 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
5529 (PTRACE_ARG4_TYPE): Likewise.
5530 (PTRACE_XFER_TYPE): Likewise.
5531 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
5532 ptrace to PTRACE_ARG3_TYPE.
5533 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
5534 (PTRACE_ARG4_TYPE): Likewise.
5535 (PTRACE_XFER_TYPE): Likewise.
5536 (linux_detach_one_lwp): Cast fourth argument of
5537 ptrace to long then PTRACE_ARG4_TYPE.
5538 (regsets_fetch_inferior_registers): Cast third argument of
5539 ptrace to long then PTRACE_ARG3_TYPE.
5540 (regsets_store_inferior_registers): Likewise.
5541
38ea300a
PA
55422012-04-20 Pedro Alves <palves@redhat.com>
5543
5544 * configure: Regenerate.
5545
c971b7fa
PA
55462012-04-19 Pedro Alves <palves@redhat.com>
5547
43aaf8b6 5548 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 5549 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
5550 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
5551 (all, install-only, uninstall, clean-info, all-lib, clean): No
5552 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
5553 (maintainer-clean realclean distclean): Use subdir_do.
5554 (subdir_do): New.
5555 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 5556 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
5557 * acinclude.m4: Include acx_configure_dir.m4.
5558 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
5559 calls. Call AC_PROG_RANLIB. Configure gnulib using
5560 ACX_CONFIGURE_DIR.
5561 (GNULIB): New.
5562 (GNULIB_STDINT_H): Adjust.
5563 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
5564 * gdbreplay.c: Include build-gnulib/config.h.
5565 * server.h: Likewise.
5566 * aclocal.m4: Regenerate.
5567 * config.in: Regenerate.
5568 * configure: Regenerate.
c971b7fa 5569
809277f8
PA
55702012-04-19 Pedro Alves <palves@redhat.com>
5571
5572 * Makefile.in (LIBGNU, INCGNU): Adjust.
5573 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
5574 (all, install-only, uninstall, clean-info, all-lib, clean)
5575 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
5576 * configure.ac: Adjust AC_OUTPUT output.
5577 * aclocal.m4: Regenerate.
5578 * configure: Regenerate.
5579
fd9bb8b8
PA
55802012-04-19 Pedro Alves <palves@redhat.com>
5581
5582 * Makefile.in (generated_files): New.
5583 (server_h): Remove the explicit dependency on config.h, and depend
5584 on $generated_files.
5585
1c298c66
PA
55862012-04-19 Pedro Alves <palves@redhat.com>
5587
5588 * Makefile.in (INCGNU): Add -Ignulib.
5589
57c4b50b
PA
55902012-04-19 Pedro Alves <palves@redhat.com>
5591
5592 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
5593 (INCGNU): ... this, and spell out -I here.
5594 (GNULIB_LIB): Rename to ...
5595 (LIBGNU): ... this.
5596 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
5597
1030e047
PA
55982012-04-19 Pedro Alves <palves@redhat.com>
5599
5600 * config.in: Regenerate.
5601
447d4319
PA
56022012-04-19 Pedro Alves <palves@redhat.com>
5603
5604 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
5605 * server.h (memmem): Remove declaration.
5606 * config.in: Regenerate.
5607 * configure: Regenerate.
5608
aad9eab9
YQ
56092012-04-19 Yao Qi <yao@codesourcery.com>
5610
5611 * Makefile.in (SFILES): Add common/vec.c.
5612 (OBS): Add vec.o.
5613 (vec.o): New rule.
5614
3e10640f
YQ
56152012-04-19 Yao Qi <yao@codesourcery.com>
5616
5617 * remote-utils.c (prepare_resume_reply): Replace with macro
5618 target_core_of_thread.
5619 * server.c (handle_qxfer_threads_proper): Likewise.
5620 * target.h (traget_core_of_thread): New macro.
5621
71622373
PA
56222012-04-18 Pedro Alves <palves@redhat.com>
5623
5624 * aclocal.m4: Regenerate.
5625 * configure: Regenerate.
5626
80d26939
YQ
56272012-04-16 Yao Qi <yao@codesourcery.com>
5628
5629 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
5630 duplicated on address.
5631
42476b70
YQ
56322012-04-16 Yao Qi <yao@codesourcery.com>
5633
5634 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
5635 (struct tracepoint_action_ops) <send>: New field.
5636 (m_tracepoint_action_send, r_tracepoint_action_send): New.
5637 (agent_expr_send, x_tracepoint_action_send): New.
5638 (l_tracepoint_action_send): New.
5639 (cmd_qtdp): Download and install tracepoint
5640 according to `use_agent'.
5641 (run_inferior_command): Add one more parameter `len'.
5642 Update callers.
5643 (tracepoint_send_agent): New.
5644 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
5645
7bc83639
YQ
56462012-04-16 Yao Qi <yao@codesourcery.com>
5647
5648 * tracepoint.c (download_tracepoints): Moved to ...
5649 (cmd_qtstart): ... here.
5650
5f18041e
YQ
56512012-04-14 Yao Qi <yao@codesourcery.com>
5652
5653 * tracepoint.c: Include inttypes.h.
5654 (struct collect_memory_action): Use sized types.
5655 (struct tracepoint): Likewise.
5656 (cmd_qtdp, stop_tracing): Update print specifiers.
5657 (cmd_qtp, response_tracepoint): Likewise.
5658 (collect_data_at_tracepoint): Likewise.
5659 (collect_data_at_step): Likewise.
5660
55a8c076
YQ
56612012-04-14 Yao Qi <yao@codesourcery.com>
5662
5663 Import gnulib module inttypes.
5664 * aclocal.m4, config.in, configure: Regenerated.
5665
dc750257
YQ
56662012-04-14 Yao Qi <yao@codesourcery.com>
5667
5668 * Makefile.in (maintainer-clean, realclean, distclean): Remove
5669 Makefile and config.status at last.
5670
0ab5faf9
YQ
56712012-04-13 Yao Qi <yao@codesourcery.com>
5672
5673 * tracepoint.c: Include stdint.h unconditionally.
5674
18f5fd81
TJB
56752012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5676
5677 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
5678 on BFD_HAVE_SYS_PROCFS_TYPE.
5679 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
5680 * configure: Regenerate.
5681 * config.in: Likewise.
5682
4d47af5c
L
56832012-04-13 H.J. Lu <hongjiu.lu@intel.com>
5684
5685 * Makefile.in (clean): Also remove x32.c x32-linux.c
5686 x32-avx.c x32-avx-linux.c.
5687 (x32.o): New target.
5688 (x32.c): Likewise.
5689 (x32-linux.o): Likewise.
5690 (x32-linux.c): Likewise.
5691 (x32-avx.o): Likewise.
5692 (x32-avx.c): Likewise.
5693 (x32-avx-linux.o): Likewise.
5694 (x32-avx-linux.c): Likewise.
5695
5696 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
5697 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
5698 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
5699 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
5700 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
5701 i386/x32-avx-linux.xml.
5702
5703 * linux-x86-low.c (init_registers_x32_linux): New prototype.
5704 (init_registers_x32_avx_linux): Likwise.
5705 (x86_linux_update_xmltarget): Call init_registers_x32_linux
5706 or init_registers_x32_avx_linux if linux_is_elf64 is false.
5707
ecedbe58
PA
57082012-04-13 Pedro Alves <palves@redhat.com>
5709
5710 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
5711 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
5712 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
5713 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
5714 the sub-make.
5715
c92b5177
L
57162012-04-12 H.J. Lu <hongjiu.lu@intel.com>
5717
5718 * linux-x86-low.c (compat_x32_clock_t): New.
5719 (compat_x32_siginfo_t): Likewise.
5720 (compat_x32_siginfo_from_siginfo): Likewise.
5721 (siginfo_from_compat_x32_siginfo): Likewise.
5722 (linux_is_elf64): Likewise.
5723 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
5724 and siginfo_from_compat_x32_siginfo for x32.
5725 (x86_arch_setup): Set linux_is_elf64.
5726
214d508e
L
57272012-04-12 H.J. Lu <hongjiu.lu@intel.com>
5728
5729 PR gdb/13969
5730 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
5731 e_machine field.
5732 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
5733 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
5734 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
5735 compatible with process.
5736
c9a1864a
YQ
57372012-04-12 Yao Qi <yao@codesourcery.com>
5738
5739 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
5740 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
5741 (install-only, install-info, clean): Handle sub dir gnulib.
5742 (all-lib, am--refresh): New targets.
5743 (memmem.o): Remove target.
5744 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
5745 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
5746 (AC_REPLACE_FUNCS): Remove memmem.
5747 Invoke gl_INIT and AM_INIT_AUTOMAKE.
5748 (AC_OUTPUT): Generate Makefile in gnulib/.
5749 * aclocal.m4, config.in, configure: Regenerated.
5750
367ba2c2
MR
57512012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
5752
5753 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
5754
9d236627
PA
57552012-04-05 Pedro Alves <palves@redhat.com>
5756
5757 -Werror=strict-aliasing
5758
5759 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
5760 pointer.
5761
111217b3
PA
57622012-04-04 Pedro Alves <palves@redhat.com>
5763
5764 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
5765 (sparc_store_gregset_from_stack, sparc_store_gregset)
5766 (sparc_breakpoint_at): Fix formatting.
5767
8365dcf5
TJB
57682012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5769
5770 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
5771 are available.
5772 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
5773 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
5774 * config.in: Regenerate.
5775 * configure: Likewise.
5776
689cc2ae
PA
57772012-03-29 Pedro Alves <palves@redhat.com>
5778
5779 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
5780 Correct ptrace arguments.
5781
c14dfd32
PA
57822012-03-28 Pedro Alves <palves@redhat.com>
5783
5784 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
5785 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
5786 (IA64_FR1_REGNUM): New defines.
5787 (ia64_fetch_register): New.
5788 (the_low_target): Install it.
5789 * linux-low.h (struct linux_target_ops) <fetch_register>: New
5790 field.
5791 * linux-low.c (linux_fetch_registers): Try the
5792 the_low_target.fetch_register hook first.
5793
5794 * linux-arm-low.c (the_low_target): Adjust.
5795 * linux-bfin-low.c (the_low_target): Adjust.
5796 * linux-cris-low.c (the_low_target): Adjust.
5797 * linux-crisv32-low.c (the_low_target): Adjust.
5798 * linux-m32r-low.c (the_low_target): Adjust.
5799 * linux-m68k-low.c (the_low_target): Adjust.
5800 * linux-mips-low.c (the_low_target): Adjust.
5801 * linux-ppc-low.c (the_low_target): Adjust.
5802 * linux-s390-low.c (the_low_target): Adjust.
5803 * linux-sh-low.c (the_low_target): Adjust.
5804 * linux-sparc-low.c (the_low_target): Adjust.
5805 * linux-tic6x-low.c (the_low_target): Adjust.
5806 * linux-x86-low.c (the_low_target): Adjust.
5807 * linux-xtensa-low.c (the_low_target): Adjust.
5808
63c88e13
PA
58092012-03-26 Pedro Alves <palves@redhat.com>
5810
5811 * server.c (handle_qxfer_libraries): Don't bail early if
5812 the_target->qxfer_libraries_svr4 is not NULL.
5813
fb723180
PA
58142012-03-26 Pedro Alves <palves@redhat.com>
5815
5816 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
5817
0afae3cf
PA
58182012-03-23 Pedro Alves <palves@redhat.com>
5819
5820 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
5821 "library-list-svr4" element's start tag when the the DSO list is
5822 empty.
5823
485f1ee4
PA
58242012-03-23 Pedro Alves <palves@redhat.com>
5825
5826 * linux-low.c (read_one_ptr): Read the inferior's pointer through
5827 a variable whose type size is the same as the inferior's pointer
5828 size.
5829
a5362b9a
TS
58302012-03-21 Thomas Schwinge <thomas@codesourcery.com>
5831
5832 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
5833 struct siginfo.
5834 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
5835 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
5836 * linux-low.h: Include <signal.h>.
5837 (struct siginfo): Remove forward declaration.
5838 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
5839 struct siginfo.
5840
d226c142
MF
58412012-03-21 Mike Frysinger <vapier@gentoo.org>
5842
5843 * .gitignore: Ignore more files.
5844
122f36ef
PA
58452012-03-19 Pedro Alves <palves@redhat.com>
5846 Jan Kratochvil <jan.kratochvil@redhat.com>
5847
5848 * server.c (cont_thread, general_thread): Add describing comments.
5849 (start_inferior): Clear `cont_thread'.
5850 (handle_v_cont): Don't set `cont_thread' if resuming all threads
5851 of a process.
5852
fc3e5175
YQ
58532012-03-15 Yao Qi <yao@codesourcery.com>
5854
5855 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
5856 handling to ...
5857 (cmd_qtdp): ... here.
5858
8d0d92cd
YQ
58592012-03-15 Yao Qi <yao@codesourcery.com>
5860
5861 * tracepoint.c (struct tracepoint_action_ops): New.
5862 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
5863 (m_tracepoint_action_download): New.
5864 (r_tracepoint_action_download): New.
5865 (x_tracepoint_action_download): New.
5866 (l_tracepoint_action_download): New.
5867 (add_tracepoint_action): Install `action->ops' according type.
5868 (download_tracepoint_1): Move code `download' function pointer
5869 of various tracepoint_action_ops.
5870
87b0bb13
JK
58712012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
5872
5873 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
5874 linux_ptrace_attach_warnings.
5875
5f572dec
JK
58762012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
5877
5878 * Makefile.in (linux-ptrace.o): New.
5879 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
5880 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
5881 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
5882 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
5883 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
5884 of these targets.
5885 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
5886
f4647387
YQ
58872012-03-08 Yao Qi <yao@codesourcery.com>
5888 Pedro Alves <palves@redhat.com>
5889
5890 Fix PR server/13392.
5891 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
5892 offset of JMP insn.
5893 * tracepoint.c (remove_tracepoint): New.
5894 (cmd_qtdp): Call remove_tracepoint when failed to install.
5895
9b224c5e
PA
58962012-03-07 Pedro Alves <palves@redhat.com>
5897
5898 * linux-low.c (get_detach_signal): New.
5899 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
5900 Pass on pending signals to PTRACE_DETACH. Check the result of the
5901 ptrace call.
5902 * server.c (program_signals, program_signals_p): New.
5903 (handle_general_set): Handle QProgramSignals.
5904 * server.h (program_signals, program_signals_p): Declare.
5905
e237a7e2
JK
59062012-03-05 Pedro Alves <palves@redhat.com>
5907 Jan Kratochvil <jan.kratochvil@redhat.com>
5908
5909 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
5910 New comment why.
5911
5808517f
YQ
59122012-03-03 Yao Qi <yao@codesourcery.com>
5913
5914 * tracepoint.c (tracepoint_look_up_symbols): Update call to
5915 agent_look_up_symbols.
5916
58b4daa5
YQ
59172012-03-03 Yao Qi <yao@codesourcery.com>
5918
5919 * Makefile.in (linux-low.o): Keep dependence on agent.h.
5920 (linux-x86-low.o): Likewise.
5921 * server.h: Remove in_process_agent_loaded.
5922 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
5923 common/agent.c.
5924 Update callers.
5925
8ffcbaaf
YQ
59262012-03-03 Yao Qi <yao@codesourcery.com>
5927
5928 * tracepoint.c (gdb_agent_capability): New global.
5929 (in_process_agent_loaded_ust): Renamed to
5930 `in_process_agent_supports_ust'.
5931 Update callers.
5932 (in_process_agent_supports_ust): Call agent_capability_check.
5933 (clear_installed_tracepoints): Assert that agent supports
5934 agent.
5935
d1feda86
YQ
59362012-03-03 Yao Qi <yao@codesourcery.com>
5937
5938 * linux-low.c (linux_supports_agent): New.
5939 (linux_target_ops): Initialize field `supports_agent' with
5940 linux_supports_agent.
5941 * target.h (struct target_ops) <supports_agent>: New.
5942 (target_supports_agent): New macro.
5943 * server.c (handle_general_set): Handle packet 'QAgent'.
5944 (handle_query): Send `QAgent+'.
5945 * Makefile.in (server.o): Depends on agent.h.
5946
2fa291ac
YQ
59472012-03-03 Yao Qi <yao@codesourcery.com>
5948
5949 * Makefile.in (OBS): Add agent.o.
5950 Add new rule for agent.o.
5951 Track dependence of tracepoint.c on agent.h.
5952 * tracepoint.c (run_inferior_command_1):
5953 (run_inferior_command): Call agent_run_command.
5954 (gdb_ust_connect_sync_socket): Deleted. Move it to
5955 common/agent.c.
5956 (resume_thread, stop_thread): Likewise.
5957 (gdb_ust_socket_init): Renamed to ...
5958 (gdb_agent_socket_init): ... New.
5959 (gdb_ust_thread): Renamed to ...
5960 (gdb_agent_helper_thread): ... New.
5961 (gdb_ust_init): Move some code to ...
5962 (gdb_agent_init): ... here. New.
5963 [HAVE_UST]: Call gdb_ust_init.
5964 (initialize_tracepoint_ftlib): Call gdb_agent_init.
5965 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
5966 * config.in, configure: Regenerated.
5967
05044653
PA
59682012-03-02 Pedro Alves <palves@redhat.com>
5969
5970 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
5971 * linux-low.c (struct simple_pid_list): New.
5972 (stopped_pids): New a struct simple_pid_list pointer.
5973 (add_to_pid_list, pull_pid_from_list): New.
5974 (handle_extended_wait): Don't assume the first signal new children
5975 report is SIGSTOP. Adjust call to pull_pid_from_list.
5976 (linux_wait_for_lwp): Adjust.
5977
8d00225b
YQ
59782012-03-02 Yao Qi <yao@codesourcery.com>
5979
5980 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
5981 debug log.
5982
19560ba5
YQ
59832012-03-02 Yao Qi <yao@codesourcery.com>
5984
5985 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
5986 `stop_pc' and `tpoint'. Update caller.
5987
1faeff08
MR
59882012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
5989
5990 * linux-low.h (linux_target_ops): Add regset_bitmap member.
5991 * linux-low.c (use_linux_regsets): New macro.
5992 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
5993 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
5994 (linux_register_in_regsets): New function.
5995 (usr_fetch_inferior_registers): Skip registers covered by
5996 regsets.
5997 (usr_store_inferior_registers): Likewise.
5998 (usr_fetch_inferior_registers): New macro.
5999 (usr_store_inferior_registers): Likewise.
6000 (linux_fetch_registers): Handle mixed regset/non-regset targets.
6001 (linux_store_registers): Likewise.
6002 * linux-mips-low.c (init_registers_mips_dsp_linux): New
6003 prototype.
6004 (init_registers_mips64_dsp_linux): Likewise.
6005 (init_registers_mips_linux): New macro.
6006 (init_registers_mips_dsp_linux): Likewise.
6007 (mips_dsp_num_regs): Likewise.
6008 (DSP_BASE, DSP_CONTROL): New fallback macros.
6009 (mips_base_regs): New macro.
6010 (mips_regmap): Use it. Fix the size.
6011 (mips_dsp_regmap): New variable.
6012 (mips_dsp_regset_bitmap): Likewise.
6013 (mips_arch_setup): New function.
6014 (mips_cannot_fetch_register): Use the_low_target.regmap rather
6015 than mips_regmap.
6016 (mips_cannot_store_register): Likewise.
6017 (the_low_target): Update .arch_setup, .num_regs and .regmap
6018 initializers. Add .regset_bitmap initializer.
6019 * linux-arm-low.c (the_low_target): Add .regset_bitmap
6020 initializer.
6021 * linux-bfin-low.c (the_low_target): Likewise.
6022 * linux-cris-low.c (the_low_target): Likewise.
6023 * linux-crisv32-low.c (the_low_target): Likewise.
6024 * linux-ia64-low.c (the_low_target): Likewise.
6025 * linux-m32r-low.c (the_low_target): Likewise.
6026 * linux-m68k-low.c (the_low_target): Likewise.
6027 * linux-ppc-low.c (the_low_target): Likewise.
6028 * linux-s390-low.c (the_low_target): Likewise.
6029 * linux-sh-low.c (the_low_target): Likewise.
6030 * linux-sparc-low.c (the_low_target): Likewise.
6031 * linux-tic6x-low.c (the_low_target): Likewise.
6032 * linux-x86-low.c (the_low_target): Likewise.
6033 * linux-xtensa-low.c (the_low_target): Likewise.
6034 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
6035 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
6036 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
6037 srv_xmlfiles.
6038 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
6039 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
6040
c03e6ccc
YQ
60412012-02-29 Yao Qi <yao@codesourcery.com>
6042 Pedro Alves <palves@redhat.com>
6043
6044 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
6045 `step_over_finished' is true.
6046
644cebc9
PA
60472012-02-27 Pedro Alves <palves@redhat.com>
6048
6049 * linux-low.c (pid_is_stopped): Delete, moved to common/.
6050 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
6051
c14d7ab2
PA
60522012-02-27 Pedro Alves <palves@redhat.com>
6053
6054 PR server/9684
6055 * linux-low.c (pid_is_stopped): New.
6056 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
6057
412c89dd
LM
60582012-02-25 Luis Machado <lgustavo@codesourcery.com>
6059
6060 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
6061 of conditions.
6062
b745defe
MR
60632012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
6064
6065 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
6066
9f3a5c85
LM
60672012-02-24 Luis Machado <lgustavo@codesourcery>
6068
6069 * server.c (handle_query): Advertise support for target-side
6070 breakpoint condition evaluation.
6071 (process_point_options): New function.
6072 (process_serial_event): When inserting a breakpoint, check for
6073 a target-side condition that should be evaluated.
6074
6075 * mem-break.c: Include regcache.h and ax.h.
6076 (point_cond_list_t): New data structure.
6077 (breakpoint) <cond_list>: New field.
6078 (find_gdb_breakpoint_at): Make non-static.
6079 (delete_gdb_breakpoint_at): Clear any target-side
6080 conditions.
6081 (clear_gdb_breakpoint_conditions): New function.
6082 (add_condition_to_breakpoint): Likewise.
6083 (add_breakpoint_condition): Likewise.
6084 (gdb_condition_true_at_breakpoint): Likewise.
6085 (gdb_breakpoint_here): Return result directly instead
6086 of going through a local variable.
6087
6088 * mem-break.h (find_gdb_breakpoint_at): New prototype.
6089 (clear_gdb_breakpoint_conditions): Likewise.
6090 (add_breakpoint_condition): Likewise.
6091 (gdb_condition_true_at_breakpoint): Likewise.
6092
6093 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
6094 (need_step_over_p): Take target-side breakpoint condition into
6095 consideration.
6096
5e1dc496
LM
60972012-02-24 Luis Machado <lgustavo@codesourcery>
6098
6099 * server.h: Include tracepoint.h.
6100 (agent_mem_read, agent_get_trace_state_variable_value,
6101 agent_set_trace_state_variable_value,
6102 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
6103 get_set_tsv_func_addr): New prototypes.
6104
6105 * ax.h: New include file.
6106 * ax.c: New source file.
6107
6108 * tracepoint.c: Include ax.h.
6109 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
6110 agent_expr, eval_result_type): Move to ax.h.
6111 (parse_agent_expr): Rename to ...
6112 (gdb_parse_agent_expr): ... this, make it non-static and move
6113 to ax.h.
6114 (unparse_agent_expr) Rename to ...
6115 (gdb_unparse_agent_expr): ... this, make it non-static and move
6116 to ax.h.
6117 (eval_agent_expr): Rename to ...
6118 (eval_tracepoint_agent_expr): ... this.
6119 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
6120 forward declarations.
6121 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
6122 (agent_get_trace_state_variable_value): New function.
6123 (agent_set_trace_state_variable_value): New function.
6124 (cmd_qtdp): Call gdb_parse_agent_expr (...).
6125 (response_tracepoint): Call gdb_unparse_agent_expr (...).
6126 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
6127 (condition_true_at_tracepoint): Likewise.
6128 (parse_agent_expr): Rename to ...
6129 (gdb_parse_agent_expr): ... this and move to ax.c.
6130 (unparse_agent_expr): Rename to ...
6131 (gdb_unparse_agent_expr): ... this and move to ax.c.
6132 (gdb_agent_op_name): Move to ax.c.
6133 (eval_agent_expr): Rename to ...
6134 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
6135 and move to ax.c.
6136 (eval_tracepoint_agent_expr): New function.
6137 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 6138 non-static.
5e1dc496
LM
6139 (current_insn_ptr, emit_error, struct bytecode_address): Move to
6140 ax.c.
6141 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
6142 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
6143 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
6144 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
6145 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
6146 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
6147 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
6148 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
6149 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
6150 (compile_bytecodes): Remove forward declaration.
6151 (is_goto_target): Move to ax.c.
6152 (compile_bytecodes): Move to ax.c and call
6153 agent_get_trace_state_variable_value (...) and
6154 agent_set_trace_state_variable_value (...).
6155
6156 * Makefile.in: Update ax.c and IPA dependencies.
6157
277e4e52
PA
61582012-02-24 Pedro Alves <palves@redhat.com>
6159
6160 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
6161 (cmd_bigqtbuffer_circular): ... this. Only handle
6162 'QTBuffer:circular:'.
6163 (handle_tracepoint_general_set): Adjust.
6164
bf4c19f7
YQ
61652012-02-16 Yao Qi <yao@codesourcery.com>
6166
6167 * inferiors.c: Move code to ...
6168 * dll.c: .... here. New.
6169 * server.h: Declare clear_dlls.
6170 * Makefile.in (SFILES): Add dll.c.
6171 (OBS): Add dll.o
6172 (dll.o): New rule.
6173
d73f2619
YQ
61742012-02-11 Yao Qi <yao@codesourcery.com>
6175
6176 * server.c: (handle_monitor_command): Add a new parameter
6177 `own_buf'.
6178 (handle_query): Update caller.
6179
f8255c2a
JB
61802012-02-09 Joel Brobecker <brobecker@adacore.com>
6181
6182 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
6183 * configure, config.in: Regenerate.
6184 * hostio.c: Provide an alternate implementation if HAVE_READLINK
6185 is not defined.
6186
da84f473
PA
61872012-02-02 Pedro Alves <palves@redhat.com>
6188
6189 Try SIGKILL first, then PTRACE_KILL.
6190 * linux-low.c (linux_kill_one_lwp): New.
6191 (linux_kill_one_lwp): Rename to ...
6192 (kill_one_lwp_callback): ... this. Use the new
6193 linux_kill_one_lwp.
6194
e886a173
PA
61952012-02-02 Pedro Alves <palves@redhat.com>
6196
6197 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
6198 inferior.
6199
be07f1a2
PA
62002012-01-27 Pedro Alves <palves@redhat.com>
6201
6202 * linux-low.c (linux_child_pid_to_exec_file): Delete.
6203 (elf_64_file_p): Make static.
6204 (linux_pid_exe_is_elf_64_file): New.
6205 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
6206 Delete declarations.
6207 (linux_pid_exe_is_elf_64_file): Declare.
6208 * linux-x86-low.c (x86_arch_setup): Use
6209 linux_pid_exe_is_elf_64_file.
6210
d8301ad1
JK
62112012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
6212
6213 * linux-low.c (linux_wait_for_event_1): Rename to ...
6214 (linux_wait_for_event): ... here and merge it with former
6215 linux_wait_for_event - new variable wait_ptid, use it.
6216 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
6217
01b17894
PA
62182012-01-23 Pedro Alves <palves@redhat.com>
6219
6220 * server.c (main): Avoid yet another case of infinite loop while
6221 detaching/killing after a longjmp.
6222
e825046f
JK
62232012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
6224
6225 Code cleanup.
6226 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
6227
b9e7b9c3
UW
62282012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
6229
6230 * hostio.c (handle_readlink): New function.
6231 (handle_vFile): Call it to handle "vFile:readlink" packets.
6232
901f9912
UW
62332012-01-20 Pedro Alves <palves@redhat.com>
6234 Ulrich Weigand <ulrich.weigand@linaro.org>
6235
6236 * server.c (handle_v_requests): Only support vAttach and vRun to
6237 start multiple processes when in extended protocol mode.
6238
fc1ab1a0
PA
62392012-01-17 Pedro Alves <palves@redhat.com>
6240
6241 * tracepoint.c (initialize_tracepoint): Use mmap instead of
6242 memalign plus mprotect to allocate the scratch buffer.
6243
7d5d4e98
PA
62442012-01-13 Pedro Alves <palves@redhat.com>
6245
6246 * server.c (attach_inferior): Clear `cont_thread'.
6247
f128d5e9
PA
62482012-01-13 Pedro Alves <palves@redhat.com>
6249
6250 * server.c (main): Avoid infinite loop while detaching/killing
6251 after a longjmp.
6252
06db92f0
DE
62532012-01-09 Doug Evans <dje@google.com>
6254
6255 * server.c (start_inferior): Set last_ptid in --wrapper case.
6256
32d92999
YQ
62572012-01-06 Yao Qi <yao@codesourcery.com>
6258
6259 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
6260 defined.
6261 [IN_PROCESS_AGENT] (debug_agent): New global variable.
6262
5e0a92a9
YQ
62632012-01-04 Yao Qi <yao@codesourcery.com>
6264
6265 * tracepoint.c (cmd_qtdp): Print debug message
6266 for static tracepoint.
6267
ae639e8c
YQ
62682012-01-04 Yao Qi <yao@codesourcery.com>
6269
6270 * tracepoint.c (trace_vdebug): Differentiate debug message
6271 between gdbserver and IPA.
6272
f72429c5
YQ
62732012-01-03 Yao Qi <yao@codesourcery.com>
6274
6275 * tracepoint.c (tracepoint_was_hit): Don't collect for
6276 static tracepoint.
6277
12c3e59c
JB
62782012-01-02 Joel Brobecker <brobecker@adacore.com>
6279
6280 * terminal.h: Reformat copyright header.
6281
67827812
JB
62822012-01-02 Joel Brobecker <brobecker@adacore.com>
6283
6284 * server.c (gdbserver_version): Update copyright year.
6285 * gdbreplay.c (gdbreplay_version): Likewise.
6286
3e52c33d
JK
62872011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
6288
6289 * linux-low.c (linux_create_inferior): Put empty if clause for write.
6290
6291 Revert:
6292 2011-12-18 Hui Zhu <teawater@gmail.com>
6293 * linux-low.c (linux_create_inferior): Save return value to ret.
6294
66f1260e
HZ
62952011-12-18 Hui Zhu <teawater@gmail.com>
6296
6297 * linux-low.c (linux_create_inferior): Save return value to ret.
6298
e77616d7
DE
62992011-12-16 Doug Evans <dje@google.com>
6300
e7b06c57
DE
6301 * linux-low.c (linux_create_inferior): If stdio connection,
6302 redirect stdin from /dev/null, stdout to stderr.
6303 * remote-utils.c (remote_is_stdio): New static global.
6304 (remote_connection_is_stdio): New function.
6305 (remote_prepare): Handle stdio connection.
6306 (remote_open): Ditto.
6307 (remote_close): Don't close stdin for stdio connections.
6308 (read_prim,write_prim): New functions. Replace all calls to
6309 read/write to these.
6310 * server.c (main): Watch for "-" argument. Move call to
6311 remote_prepare before start_inferior.
6312 * server.h (STDIO_CONNECTION_NAME): New macro.
6313 (remote_connection_is_stdio): Declare.
6314
e77616d7
DE
6315 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
6316 in debugging output.
6317
82067193
YQ
63182011-12-15 Yao Qi <yao@codesourcery.com>
6319
6320 * tracepoint.c: Include sys/syscall.h.
6321 (gdb_ust_thread): Remove preprocessor conditional.
6322
82bfbe7e
PA
63232011-12-14 Pedro Alves <pedro@codesourcery.com>
6324
6325 * linux-low.c (linux_detach_one_lwp): Call
6326 the_low_target.prepare_to_resume before detaching.
6327
712c6575
YQ
63282011-12-14 Yao Qi <yao@codesourcery.com>
6329
6330 * tracepoint.c (gdb_ust_thread): Don't ignore return value
6331 of write.
6332
d54d1edf
YQ
63332011-12-14 Yao Qi <yao@codesourcery.com>
6334
6335 * i386-low.c (i386_low_stopped_data_address): Initialize local
6336 variable `control'.
6337
6210a125
PA
63382011-12-13 Pedro Alves <pedro@codesourcery.com>
6339
6340 PR remote/13492
6341
6342 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
6343 DR_CONTROL unless necessary. Extend comments.
6344 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
6345 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
6346
2ece8244
YQ
63472011-12-13 Yao Qi <yao@codesourcery.com>
6348
6349 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
6350 macros.
6351 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
6352
784867a5
JK
63532011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
6354
6355 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
6356 Print new debug message for such case.
6357
6bf36717
JK
63582011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
6359
6360 Fix overlapping memcpy.
6361 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
6362 the read_inferior_memory transfer.
6363 (delete_fast_tracepoint_jump): New variable buf. Use it for the
6364 write_inferior_memory transfer.
6365 (set_fast_tracepoint_jump): New variable buf. Use it for the
6366 read_inferior_memory and write_inferior_memory transfers.
6367 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
6368 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
6369 Use it for the write_inferior_memory transfer.
6370 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
6371 buffers.
6372
50275556
MR
63732011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
6374
6375 * linux-low.c (fetch_register, store_register): Make code
6376 consistent, fix formatting.
6377
7325beb4
MR
63782011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
6379
6380 * linux-low.c (usr_store_inferior_registers): Factor out code
6381 to handle individual registers into...
6382 (store_register): ... this new function.
6383
c642a434
UW
63842011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
6385
6386 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
6387 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
6388 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
6389 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
6390 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
6391 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
6392 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
6393 (srv_xmlfiles): Add new XML files.
6394
6395 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
6396 and <sys/uio.h>.
6397 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
6398 (init_registers_s390_linux32v1): Add prototype.
6399 (init_registers_s390_linux32v2): Likewise.
6400 (init_registers_s390_linux64v1): Likewise.
6401 (init_registers_s390_linux64v2): Likewise.
6402 (init_registers_s390x_linux64v1): Likewise.
6403 (init_registers_s390x_linux64v2): Likewise.
6404 (s390_num_regs): Increment to 52.
6405 (s390_regmap): Add orig_r2 register.
6406 (s390_num_regs_3264): Increment to 68.
6407 (s390_regmap_3264): Add orig_r2 register.
6408 (s390_collect_ptrace_register): Handle orig_r2 register.
6409 (s390_supply_ptrace_register): Likewise.
6410 (s390_fill_last_break): New function.
6411 (s390_store_last_break): Likewise.
6412 (s390_fill_system_call): New function.
6413 (s390_store_system_call): Likewise.
6414 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
6415 register sets.
6416 (s390_check_regset): New function.
6417 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
6418 NT_S390_SYSTEM_CALL regsets and use appropriate description.
6419 Update target_regsets for available register sets.
6420
2268b414
JK
64212011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
6422 Jan Kratochvil <jan.kratochvil@redhat.com>
6423
6424 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
6425 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
6426 New.
6427 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
6428 * linux-low.h (struct process_info_private): New member r_debug.
6429 * server.c (handle_qxfer_libraries): Call
6430 the_target->qxfer_libraries_svr4.
6431 (handle_qxfer_libraries_svr4): New function.
6432 (qxfer_packets): New entry "libraries-svr4".
6433 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
6434 * target.h (struct target_ops): New member qxfer_libraries_svr4.
6435 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
6436 PACKET_qXfer_libraries_svr4.
6437
d6db1fab
UW
64382011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
6439
6440 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
6441 PSW address/mask between 8-byte and 16-byte formats.
6442 (s390_supply_ptrace_register): Likewise.
6443 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
6444 basic addressing mode bit.
6445
242f5f1c
SS
64462011-11-24 Stan Shebs <stan@codesourcery.com>
6447
6448 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
6449
f196051f
SS
64502011-11-17 Stan Shebs <stan@codesourcery.com>
6451
6452 * tracepoint.c (struct tracepoint): New field traceframe_usage.
6453 (tracing_start_time): New global.
6454 (tracing_stop_time): New global.
6455 (tracing_user_name): New global.
6456 (tracing_notes): New global.
6457 (tracing_stop_note): New global.
6458 (cmd_qtstart): Set traceframe_usage, start_time.
6459 (stop_tracing): Set stop_time.
6460 (cmd_qtstatus): Report additional status.
6461 (cmd_qtp): New function.
6462 (handle_tracepoint_query): Call it.
6463 (cmd_qtnotes): New function.
6464 (handle_tracepoint_general_set): Call it.
6465 (get_timestamp): Rename from tsv_get_timestamp.
6466
405f8e94
SS
64672011-11-14 Stan Shebs <stan@codesourcery.com>
6468 Kwok Cheung Yeung <kcy@codesourcery.com>
6469
6470 * linux-x86-low.c (small_jump_insn): New.
6471 (i386_install_fast_tracepoint_jump_pad): Add arguments for
6472 trampoline and error message, build a trampoline and issue a small
6473 jump instruction to it.
6474 (x86_install_fast_tracepoint_jump_pad): Add arguments for
6475 trampoline and error message.
6476 (x86_get_min_fast_tracepoint_insn_len): New.
6477 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
6478 * linux-low.h (struct linux_target_ops): Add arguments to
6479 install_fast_tracepoint_jump_pad operation, add new operation.
6480 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
6481 arguments.
6482 (linux_get_min_fast_tracepoint_insn_len): New function.
6483 (linux_target_op): Add new operation.
6484 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
6485 (gdb_trampoline_buffer_end): Ditto.
6486 (gdb_trampoline_buffer_error): Ditto.
6487 (struct ipa_sym_addresses): Add fields for new IPA variables.
6488 (symbol_list): Add entries for new IPA variables.
6489 (struct tracepoint): Add fields to hold the address range of the
6490 trampoline used by the tracepoint.
6491 (trampoline_buffer_head): New static variable.
6492 (trampoline_buffer_tail): Ditto.
6493 (claim_trampoline_space): New function.
6494 (have_fast_tracepoint_trampoline_buffer): New function.
6495 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
6496 structure.
6497 (install_fast_tracepoint): Ditto, also add error buffer argument.
6498 (cmd_qtminftpilen): New function.
6499 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
6500 (fast_tracepoint_from_trampoline_address): New function.
6501 (fast_tracepoint_collecting): Handle trampoline as part of jump
6502 pad space.
6503 (set_trampoline_buffer_space): New function.
6504 (initialize_tracepoint): Initialize new IPA variables.
6505 * target.h (struct target_ops): Add arguments to
6506 install_fast_tracepoint_jump_pad operation, add new
6507 get_min_fast_tracepoint_insn_len operation.
6508 (target_get_min_fast_tracepoint_insn_len): New.
6509 (install_fast_tracepoint_jump_pad): Add arguments.
6510 * server.h (IPA_BUFSIZ): Define.
6511 * linux-i386-ipa.c: Include extra header files.
6512 (initialize_fast_tracepoint_trampoline_buffer): New function.
6513 (initialize_low_tracepoint): Call it.
6514 * server.h (set_trampoline_buffer_space): Declare.
6515 (claim_trampoline_space): Ditto.
6516 (have_fast_tracepoint_trampoline_buffer): Ditto.
6517
1e4d1764
YQ
65182011-11-14 Yao Qi <yao@codesourcery.com>
6519
6520 * server.c (handle_query): Handle InstallInTrace for qSupported.
6521 * tracepoint.c (add_tracepoint): Sort list.
6522 (install_tracepoint, download_tracepoint): New.
6523 (cmd_qtdp): Call them to install and download tracepoints.
6524 (sort_tracepoints): Removed.
6525 (cmd_qtstart): Update.
6526
5c73ff4e
YQ
65272011-11-14 Yao Qi <yao@codesourcery.com>
6528
6529 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
6530 * mem-break.h: Declare.
6531 * tracepoint.c (cmd_qtstart): Move some code to ...
6532 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
6533 New.
6534 (download_tracepoints): Move some code to ...
6535 (download_tracepoint_1): ... here. New.
6536
86a30030
YQ
65372011-11-08 Yao Qi <yao@codesourcery.com>
6538
6539 * remote-utils.c (relocate_instruction): A comment fix.
6540
8d26e50c
JB
65412011-11-07 Joel Brobecker <brobecker@adacore.com>
6542
6543 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
6544 (i386_dr_low_get_control, i386_dr_low_get_status): Use
6545 dr_status_mirror and dr_control_mirror from debug_reg_state.
6546 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
6547 (i386_initial_stuff): Remove use of deleted globals.
6548 (i386_get_thread_context, i386_set_thread_context,
6549 i386_thread_added): Use dr_status_mirror and dr_control_mirror
6550 from debug_reg_state.
6551
a59306a3
YQ
65522011-11-05 Yao Qi <yao@codesourcery.com>
6553
6554 * tracepoint.c (gdb_collect): Loop over tracepoints of same
6555 address as TPOINT's.
6556
3065dfb6
SS
65572011-11-02 Stan Shebs <stan@codesourcery.com>
6558
6559 * tracepoint.c (agent_mem_read_string): New function.
6560 (eval_agent_expr): Call it for tracenz.
6561 * server.c (handle_query): Report support for tracenz.
6562
fd0d8c7c
YQ
65632011-11-02 Yao Qi <yao@codesourcery.com>
6564
6565 * tracepoint.c (cmd_qtstart): Remove unused local variables.
6566
609086b1
YQ
65672011-11-02 Yao Qi <yao@codesourcery.com>
6568
6569 * target.h: Fix a typo in comment.
6570
b9fd1791
PA
65712011-10-31 Pedro Alves <pedro@codesourcery.com>
6572
6573 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
6574 clobber the breakpoints' shadows with fast tracepoint jumps.
6575 * mem-break.h (check_mem_write): Add `myaddr' parameter.
6576 * target.c (write_inferior_memory): Also pass MYADDR down to
6577 check_mem_write.
6578
03583c20
UW
65792011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
6580
6581 * configure.ac: Check support for personality routine.
6582 * configure: Regenerate.
6583 * config.in: Likewise.
6584 * linux-low.c: Include <sys/personality.h>.
6585 Define ADDR_NO_RANDOMIZE if necessary.
6586 (linux_create_inferior): Disable address space randomization when
6587 forking inferior, if requested.
6588 (linux_supports_disable_randomization): New function.
6589 (linux_target_ops): Install it.
6590 * server.h (disable_randomization): Declare.
6591 * server.c (disable_randomization): New global variable.
6592 (handle_general_set): Handle QDisableRandomization.
6593 (handle_query): Likewise for qSupported.
6594 (main): Support --disable-randomization and --no-disable-randomization
6595 command line arguments.
6596 * target.h (struct target_ops): Add supports_disable_randomization.
6597 (target_supports_disable_randomization): New macro.
6598
723b724b
MF
65992011-09-29 Mike Frysinger <vapier@gentoo.org>
6600
6601 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
6602 ifdef check.
6603 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
6604 [!PT_GETDSBT] (target_loadmap): New definition.
6605 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
6606 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
6607 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
6608 and PT_GETDSBT to LINUX_LOADMAP.
6609 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
6610 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
6611
55329a5c 66122011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
6613
6614 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
6615 (arm_linux_hwbp_cap): New static variable.
6616 (arm_linux_get_hwbp_cap): Replace by ...
6617 (arm_linux_init_hwbp_cap): ... this new function.
6618 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
6619 (arm_linux_get_hw_watchpoint_count): Likewise.
6620 (arm_linux_get_hw_watchpoint_max_length): Likewise.
6621 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
6622 (arm_prepare_to_resume): Use perror_with_name instead of error.
6623
55329a5c 66242011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
6625
6626 * linux-arm-low.c: Include <signal.h>.
6627 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
6628 (struct arm_linux_hwbp_cap): New data type.
6629 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
6630 (struct arm_linux_hw_breakpoint): New data type.
6631 (MAX_BPTS, MAX_WPTS): Define.
6632 (struct arch_process_info, struct arch_lwp_info): New data types.
6633 (arm_linux_get_hwbp_cap): New function.
6634 (arm_linux_get_hw_breakpoint_count): Likewise.
6635 (arm_linux_get_hw_watchpoint_count): Likewise.
6636 (arm_linux_get_hw_watchpoint_max_length): Likewise.
6637 (arm_hwbp_control_initialize): Likewise.
6638 (arm_hwbp_control_is_enabled): Likewise.
6639 (arm_hwbp_control_is_initialized): Likewise.
6640 (arm_hwbp_control_disable): Likewise.
6641 (arm_linux_hw_breakpoint_equal): Likewise.
6642 (arm_linux_hw_point_initialize): Likewise.
6643 (struct update_registers_data): New data structure.
6644 (update_registers_callback: New function.
6645 (arm_insert_point): Likewise.
6646 (arm_remove_point): Likewise.
6647 (arm_stopped_by_watchpoint): Likewise.
6648 (arm_stopped_data_address): Likewise.
6649 (arm_new_process): Likewise.
6650 (arm_new_thread): Likewise.
6651 (arm_prepare_to_resume): Likewise.
6652 (the_low_target): Register arm_insert_point, arm_remove_point,
6653 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
6654 arm_new_thread, and arm_prepare_to_resume.
6655
6b9801d4
SS
66562011-09-15 Stan Shebs <stan@codesourcery.com>
6657
6658 * server.h (struct emit_ops): Add compare-goto fields.
6659 * tracepoint.c (gdb_agent_op_sizes): New table.
6660 (emit_eq_goto): New function.
6661 (emit_ne_goto): New function.
6662 (emit_lt_goto): New function.
6663 (emit_le_goto): New function.
6664 (emit_gt_goto): New function.
6665 (emit_ge_goto): New function.
6666 (is_goto_target): New function.
6667 (compile_bytecodes): Recognize special cases of compare-goto
6668 combinations and call specialized emitters for them.
6669 * linux-x86-low.c (amd64_emit_eq_goto): New function.
6670 (amd64_emit_ne_goto): New function.
6671 (amd64_emit_lt_goto): New function.
6672 (amd64_emit_le_goto): New function.
6673 (amd64_emit_gt_goto): New function.
6674 (amd64_emit_ge_goto): New function.
6675 (amd64_emit_ops): Add the new functions.
6676 (i386_emit_eq_goto): New function.
6677 (i386_emit_ne_goto): New function.
6678 (i386_emit_lt_goto): New function.
6679 (i386_emit_le_goto): New function.
6680 (i386_emit_gt_goto): New function.
6681 (i386_emit_ge_goto): New function.
6682 (i386_emit_ops): Add the new functions.
6683
bf15cbda
SS
66842011-09-08 Stan Shebs <stan@codesourcery.com>
6685
6686 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
6687 (i386_emit_epilogue): Restore %ebx.
6688
943ca1dd
JZ
66892011-08-31 Jie Zhang <jzhang918@gmail.com>
6690
6691 * server.c (step_thread): Remove definition.
6692 (process_serial_event): Don't handle Hs.
6693 * server.h (step_thread): Remove declaration.
6694 * target.c (set_desired_inferior): Remove use of step_thread.
6695
e3deef73
LM
66962011-08-24 Luis Machado <lgustavo@codesourcery.com>
6697
6698 * linux-low.c: Include linux-procfs.h.
6699 (linux_attach_lwp_1): Update comments.
6700 (linux_attach): Scan for existing threads when attaching to a
6701 process that is the tgid.
6702 * Makefile.in: Update dependencies.
6703
13da1c97
LM
67042011-08-24 Luis Machado <lgustavo@codesourcery.com>
6705
6706 * configure.srv: Add linux-procfs.o dependencies.
6707
881127c9
YQ
67082011-08-14 Yao Qi <yao@codesourcery.com>
6709
6710 * target.h (struct target_ops): Fix indent.
6711 * win32-low.c (win32_target_ops): Fix comment.
6712
58dbd541
YQ
67132011-08-14 Andrew Jenner <andrew@codesourcery.com>
6714 Yao Qi <yao@codesourcery.com>
6715
6716 * Makefile.in (clean): Remove tic6x-*.c files.
6717 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
6718 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
6719 (tic6x-c64xp-linux.c): Likewise.
6720 * configure.srv: Add support for tic6x-*-uclinux.
6721 * linux-tic6x-low.c: New.
6722 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
6723
78d85199
YQ
67242011-08-14 Andrew Stubbs <ams@codesourcery.com>
6725 Yao Qi <yao@codesourcery.com>
6726
6727 * target.h (struct target_ops): Add read_loadmap.
6728 * linux-low.c (struct target_loadseg): New type.
6729 (struct target_loadmap): New type.
6730 (linux_read_loadmap): New function.
6731 (linux_target_ops): Add linux_read_loadmap.
6732 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
6733 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
6734 to NULL.
78d85199 6735
a959a88d
EZ
67362011-08-05 Eli Zaretskii <eliz@gnu.org>
6737
6738 * win32-low.c: Include <stdint.h>.
6739
1ced966e
PA
67402011-07-22 Pedro Alves <pedro@codesourcery.com>
6741
6742 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
6743 to the inferior here.
6744 (i386_remove_aligned_watchpoint): Ditto.
6745 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
6746 fit part of the watchpoint in the debug registers.
6747 (i386_update_inferior_debug_regs): New.
6748 (i386_low_insert_watchpoint): Work on a local mirror of the debug
6749 registers, and only update the inferior on success.
6750 (i386_low_remove_watchpoint): Ditto.
6751
d26e3629
KY
67522011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
6753
6754 * linux-low.c (compare_ints, unique, list_threads, show_process,
6755 linux_core_of_thread): Delete.
6756 (linux_target_ops): Change linux_core_of_thread to
6757 linux_common_core_of_thread.
6758 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
6759 * utils.c (malloc_failure): Change type of argument.
6760 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
6761 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
6762 common/linux-osdata.c, common/ptid.c and common/buffer.c.
6763 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
6764 (IPA_OBJS): Add common-utils-ipa.o.
6765 (ptid_h, linux_osdata_h): New macros.
6766 (server_h): Add common/common-utils.h, common/xml-utils.h,
6767 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
6768 common/ptid.h.
6769 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
6770 ptid.o, buffer.o): New rules.
6771 (linux-low.o): Add common/linux-osdata.h as a dependency.
6772 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
6773 * configure.ac: Add AC_HEADER_DIRENT check.
6774 * config.in: Regenerate.
6775 * configure: Regenerate.
6776 * remote-utils.c (xml_escape_text): Delete.
6777 (buffer_grow, buffer_free, buffer_init, buffer_finish,
6778 buffer_xml_printf): Move to common/buffer.c.
6779 * server.c (main): Remove call to initialize_inferiors.
6780 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
6781 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
6782 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
6783 internal_error, gdb_assert, gdb_assert_fail): Delete.
6784 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
6785 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
6786 common/buffer.h.
6787 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
6788 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
6789 initialize_inferiors): Delete.
6790
2275a1a7
PA
67912011-07-20 Pedro Alves <pedro@codesourcery.com>
6792
6793 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
6794 symbol error.
6795
0a5b1e09
PA
67962011-05-31 Pedro Alves <pedro@codesourcery.com>
6797
6798 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
6799 assertion.
6800 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
6801
6938fd34
YQ
68022011-05-26 Yao Qi <yao@codesourcery.com>
6803
6804 * Makefile.in (thread-db.o): Track dependence to
6805 common/gdb_thread_db.h.
6806 * thread-db.c: include gdb_thread_db.h from right place.
6807
b481f9e0
TT
68082011-05-16 Adrian Cornish <gnu@bluedreamer.com>
6809
6810 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
6811 __FILE__ and __LINE__ to internal_error.
6812
98a5dd13
DE
68132011-05-13 Doug Evans <dje@google.com>
6814
6815 * thread-db.c (try_thread_db_load_from_sdir): New function.
6816 (try_thread_db_load_from_dir): New function.
6817 (thread_db_load_search): Handle $sdir, ignore $pdir.
6818 Remove trying of system directories if search of
6819 libthread-db-search-path fails, that is now done via $sdir.
6820
d248b706
KY
68212011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
6822
6823 * server.c (handle_query): Add EnableDisableTracepoints to the list
6824 of supported features.
43aaf8b6 6825 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 6826 tracepoints.
43aaf8b6
PA
6827 (cmd_qtenable_disable): New.
6828 (cmd_qtstart): Install tracepoints even if disabled.
6829 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
6830 receiving a QTEnable or QTDisable packet.
6831 (gdb_collect): Skip data collection if fast tracepoint is disabled.
6832 (ust_marker_to_static_tracepoint): Do not ignore disabled static
6833 tracepoints.
6834 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 6835
84e578fb
DE
68362011-05-10 Doug Evans <dje@google.com>
6837
6838 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
6839
71f55dd8
DE
68402011-05-04 Doug Evans <dje@google.com>
6841
6842 * linux-low.c (linux_join): Skip process lookup.
6843 * spu-low.c (spu_join): Ditto.
6844 * server.c (join_inferiors_callback): Delete.
6845 (process_serial_event): For 'D' packet (detach) call join_inferior
6846 directly.
6847
4d393d60
JM
68482011-05-04 Joseph Myers <joseph@codesourcery.com>
6849
6850 * README: Don't mention xscale*-*-linux*.
6851 * configure.srv (xscale*-*-linux*): Don't handle target.
6852
b00ad6ff
NF
68532011-04-27 Nathan Froyd <froydnj@codesourcery.com>
6854
6855 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
6856 casting pointers.
6857 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
6858 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
6859 (i386_emit_void_call_2): Likewise.
6860
af96c192
YQ
68612011-04-26 Yao Qi <yao@codesourcery.com>
6862
43aaf8b6
PA
6863 * linux-low.c: Move common macros to linux-ptrace.h.
6864 Include linux-ptrace.h.
af96c192
YQ
6865 * Makefile.in (linux_ptrace_h): New.
6866 (linux-low.o): Depends on linux-ptrace.h.
6867
03f2bd59
JK
68682011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
6869
6870 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
6871 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
6872 (remote_prepare): New function with most of the TCP code from ...
6873 (remote_open): ... here. Detect PORT here unconditionally. Move also
6874 setting transport_is_reliable.
6875 * server.c (run_once): New variable.
6876 (gdbserver_usage): Document it.
6877 (main): Set run_once for `--once'. Call remote_prepare. Exit after
6878 the first run if RUN_ONCE.
6879 * server.h (run_once, remote_prepare): New declarations.
6880
7a9dd1b2
TT
68812011-04-19 Tom Tromey <tromey@redhat.com>
6882
6883 * win32-low.c (handle_load_dll): Remove duplicate "the".
6884
81239425
PM
68852011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
6886
6887 Remove support for old Cygwin 1.5 versions.
6888 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
6889 function to avoid warning.
6890 (win32_add_one_solib): Use cygwin_conv_path function to avoid
6891 warning.
6892
9e0627f1
PM
68932011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
6894
6895 * gdbserver/server.h (Macro _): Define it if not available.
6896
588eebee
MS
68972011-03-14 Michael Snyder <msnyder@vmware.com>
6898
348af9f7 6899 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 6900
43f70d4c
JB
69012011-03-10 Joel Brobecker <brobecker@adacore.com>
6902
6903 * Makefile.in (maintainer-clean realclean distclean): Remove
6904 "make ... subdir_do" command.
6905
348af9f7
MS
69062011-03-10 Michael Snyder <msnyder@vmware.com>
6907
6908 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
6909
6910 * server.c (handle_v_run): Free alloced buffer on early return.
6911
e637a4f5
YQ
69122011-03-09 Yao Qi <yao@codesourcery.com>
6913
6914 Revert:
6915 2011-03-04 Yao Qi <yao@codesourcery.com>
6916
6917 * Makefile.in: Remove GNU make feature --directory.
6918
6919 2011-03-05 Yao Qi <yao@codesourcery.com>
6920
6921 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
6922 (subdir_do): New make target. Copied from gdb/Makefile.
6923 (maintainer-clean, realclean, distclean, clean): Call corresponding
6924 make targets in common/Makefile.
6925
6926 2011-02-11 Yao Qi <yao@codesourcery.com>
6927
6928 * configure.ac: Call AC_PROG_RANLIB.
6929 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
6930 * configure: Regenerate.
6931
e6edda56
JK
69322011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
6933
6934 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
6935
e5141119
JB
69362011-03-06 Yao Qi <yao@codesourcery.com>
6937
6938 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
6939
64794aa4
JB
69402011-03-05 Yao Qi <yao@codesourcery.com>
6941
6942 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
6943 (subdir_do): New make target. Copied from gdb/Makefile.
6944 (maintainer-clean, realclean, distclean, clean): Call corresponding
6945 make targets in common/Makefile.
6946
7a762829
YQ
69472011-03-04 Yao Qi <yao@codesourcery.com>
6948
6949 * Makefile.in: Remove GNU make feature --directory.
6950
348af9f7
MS
69512011-03-04 Michael Snyder <msnyder@vmware.com>
6952
6953 * server.c (queue_stop_reply): Call xmalloc not malloc.
6954
69552011-03-02 Michael Snyder <msnyder@vmware.com>
6956
6957 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
6958
9f72fee2
MS
69592011-02-28 Michael Snyder <msnyder@vmware.com>
6960
588eebee
MS
6961 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
6962 (cmd_qtframe): Ditto.
6963 (cmd_qtbuffer): Ditto.
6964 (cmd_bigqtbuffer): Ditto.
6965
9f72fee2
MS
6966 * utils.c (decimal2str): Initialize 'width' to nine, then
6967 don't mess with it.
6968
8040bd49
UW
69692011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
6970
6971 * hostio.c (require_data): Free *data, not data.
6972
7e52cbd0
JK
69732011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6974
6975 * hostio.c (require_data): Use free, not xfree.
6976
9130f83e
MS
69772011-02-27 Michael Snyder <msnyder@vmware.com>
6978
4b812f4e
MS
6979 * server.c (handle_query): Discard unused value.
6980
9130f83e
MS
6981 * hostio.c (require_data): Free malloc memory before returning
6982 error.
6983
69d37113
MS
69842011-02-26 Michael Snyder <msnyder@vmware.com>
6985
6986 * linux-low.c (list_threads): Call closedir for dirent.
6987
35f5825a
MS
69882011-02-27 Michael Snyder <msnyder@vmware.com>
6989
2a589cef
MS
6990 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
6991 a case statement falls through.
6992
0adea5f7
MS
6993 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
6994
35f5825a
MS
6995 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
6996 in comparison.
6997
238f1c74
MS
69982011-02-26 Michael Snyder <msnyder@vmware.com>
6999
7000 * utils.c (decimal2str): Eliminate dead code and dead param.
7001 (pulongest): Drop dead param from call to decimal2str.
7002 (plongest): Ditto.
7003
633ff500
JB
70042011-02-24 Joel Brobecker <brobecker@adacore.com>
7005
7006 Revert the following patch (not approved yet):
7007 2011-02-21 Hui Zhu <teawater@gmail.com>
7008 * tracepoint.c (tp_printf): New function.
7009 (eval_agent_expr): Handle gdb_agent_op_printf.
7010
f9c6ff72
HZ
70112011-02-21 Hui Zhu <teawater@gmail.com>
7012
7013 * tracepoint.c (tp_printf): New function.
7014 (eval_agent_expr): Handle gdb_agent_op_printf.
7015
94d5e490
TT
70162011-02-18 Tom Tromey <tromey@redhat.com>
7017
7018 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
7019 (tracepoint.o): Likewise.
7020 * tracepoint.c (enum gdb_agent_op): Use ax.def.
7021 (gdb_agent_op_names): Likewise.
7022
c7f96d2b
TT
70232011-02-18 Tom Tromey <tromey@redhat.com>
7024
7025 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
7026 gdb_agent_op_rot>: New constants.
7027 (gdb_agent_op_names): Add pick and roll.
7028 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
7029 cases.
7030
0feedb2c
JK
70312011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
7032
7033 * aclocal.m4: Regenerated with aclocal-1.11.1.
7034
b3b9301e
PA
70352011-02-14 Pedro Alves <pedro@codesourcery.com>
7036
7037 * server.c (handle_qxfer_traceframe_info): New.
7038 (qxfer_packets): Register "traceframe-info".
7039 (handle_query): Report support for qXfer:traceframe-info:read+.
7040 * tracepoint.c (match_blocktype): New.
7041 (traceframe_find_block_type): Rename to ...
7042 (traceframe_walk_blocks): ... this. Add callback filter argument,
7043 and use it.
7044 (traceframe_find_block_type): New, reimplemented on top of
7045 traceframe_walk_blocks.
7046 (build_traceframe_info_xml): New.
7047 (traceframe_read_info): New.
7048 * server.h (traceframe_read_info): Declare.
7049
4f3e6fb7
YQ
70502011-02-11 Yao Qi <yao@codesourcery.com>
7051
7052 * configure.ac: Call AC_PROG_RANLIB.
7053 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
7054 * configure: Regenerate.
7055
764880b7
PA
70562011-02-07 Pedro Alves <pedro@codesourcery.com>
7057
7058 * server.c (gdb_read_memory): Change return semantics to allow
7059 partial transfers.
7060 (handle_search_memory_1): Adjust.
7061 (process_serial_event) <'m' packet>: Handle partial transfers.
7062 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
7063
1c79eb8a
PA
70642011-01-28 Pedro Alves <pedro@codesourcery.com>
7065
7066 * regcache.c (init_register_cache): Initialize
7067 regcache->register_status.
7068 (free_register_cache): Release regcache->register_status.
7069 (regcache_cpy): Copy register_status.
7070 (registers_to_string): Print 'x's for unavailable registers.
7071 (supply_register): Mark the register's status valid or
7072 unavailable, depending on whether a buffer was passed in or not.
7073 (supply_register_zeroed): New.
7074 (supply_regblock): Mark the registers' status valid or
7075 unavailable, depending on whether a buffer was passed in or not.
7076 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
7077 (struct regcache): New `register_status' field.
7078 (supply_register_zeroed): Declare.
7079 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
7080 supply_register_zeroed, rather than passing a NULL buffer to
7081 supply_register.
7082 * tracepoint.c (fetch_traceframe_registers): Update comment.
7083
85724a0e
PA
70842011-01-28 Pedro Alves <pedro@codesourcery.com>
7085
7086 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
7087 buffer explicit.
7088
d08aafef
PA
70892011-01-25 Pedro Alves <pedro@codesourcery.com>
7090
7091 * server.h (decode_xfer_write): Change prototype.
7092 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
7093 and don't extract the annex here.
7094 * server.c (decode_xfer_read): Remove `annex' parameter,
7095 and don't extract the annex here.
7096 (decode_xfer): New.
7097 (struct qxfer): New.
7098 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
7099 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
7100 (handle_qxfer_statictrace): New functions, abstracted out from
7101 handle_query, and made to use the struct qxfer interface.
7102 (handle_threads_qxfer_proper): Rename to ...
7103 (handle_qxfer_threads_proper): ... this.
7104 (handle_threads_qxfer): Rename to ...
7105 (handle_qxfer_threads): ... this. Adjust.
7106 (qxfer_packets): New array.
7107 (handle_qxfer): New function.
7108 (handle_query): Use handle_qxfer.
7109
493e2a69
MS
71102011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
7111
7112 * gdbreplay.c: Shorten lines of >= 80 columns.
7113 * linux-low.c: Ditto.
7114 * linux-ppc-low.c: Ditto.
7115 * linux-s390-low.c: Ditto.
7116 * linux-sparc-low.c: Ditto.
7117 * linux-x86-low.c: Ditto.
7118 * linux-xtensa-low.c: Ditto.
7119 * mem-break.c: Ditto.
7120 * nto-low.c: Ditto.
7121 * regcache.h: Ditto.
7122 * remote-utils.c: Ditto.
7123 * server.c: Ditto.
7124 * server.h: Ditto.
7125 * thread-db.c: Ditto.
7126 * tracepoint.c: Ditto.
7127 * utils.c: Ditto.
7128 * win32-low.h: Ditto.
7129
44944448
JB
71302011-01-05 Joel Brobecker <brobecker@adacore.com>
7131
7132 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
7133 update.
7134
71ce852c
JB
71352011-01-01 Joel Brobecker <brobecker@adacore.com>
7136
7137 * server.c (gdbserver_version): Update copyright year in version
7138 output.
7139 * gdbreplay.c (gdbreplay_version): Ditto.
7140
eb826dc6
MF
71412010-12-29 Jie Zhang <jie.zhang@analog.com>
7142
7143 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
7144 * linux-bfin-low.c: New file.
7145 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
7146 PT_DATA_ADDR for BFIN targets.
7147 * Makefile.in (SFILES): Add linux-bfin-low.c.
7148 (clean): Remove reg-bfin.c.
7149 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
7150 * README: Mention supported Blackfin targets.
7151
39ab222a
MF
71522010-12-23 Mike Frysinger <vapier@gentoo.org>
7153
7154 * .gitignore: New file.
7155
a1f2ce7d
MF
71562010-11-16 Mike Frysinger <vapier@gentoo.org>
7157
7158 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
7159
f474844c
JZ
71602010-10-22 Jie Zhang <jie@codesourcery.com>
7161
7162 * Makefile.in: Add FLAGS_TO_PASS variable.
7163 (install): Remove dependency of install-only and recursively
7164 invoke make for install-only.
7165
f1048712
DE
71662010-10-04 Doug Evans <dje@google.com>
7167
7168 * Makefile.in (uninstall): Use $(DESTDIR).
7169
b53a1623
PA
71702010-09-24 Pedro Alves <pedro@codesourcery.com>
7171
e6ee044d
PA
7172 PR gdb/11842
7173
b53a1623
PA
7174 * linux-x86-low.c (compat_siginfo_from_siginfo)
7175 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
7176 si_code is < 0. Check for si_code == SI_TIMER before checking for
7177 si_code < 0.
7178
fa1bd1e4
JB
71792010-09-13 Joel Brobecker <brobecker@adacore.com>
7180
7181 * lynx-i386-low.c: New file.
7182 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
7183
47fac8f8
JB
71842010-09-13 Joel Brobecker <brobecker@adacore.com>
7185
7186 * lynx-low.c (ptrace_request_to_str): Remove handling for
7187 request values that have been removed in LynxOS 5.x.
7188
1adfc54d
JB
71892010-09-13 Joel Brobecker <brobecker@adacore.com>
7190
7191 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
7192 <ptrace.h>
7193
c2a66c29
NS
71942010-09-09 Nathan Sidwell <nathan@codesourcery.com>
7195
7196 * configure.ac: Add --enable-inprocess-agent option.
7197 * configure: Rebuilt.
7198
32fcada3
YQ
71992010-09-06 Yao Qi <yao@codesourcery.com>
7200
7201 * linux-low.c (linux_kill): Remove unused variable.
7202 (linux_stabilize_threads): Likewise.
7203 * server.c (start_inferior): Likewise.
7204 (queue_stop_reply_callback): Likewise.
7205 * tracepoint.c (do_action_at_tracepoint): Likewise.
7206
0cccb683
YQ
72072010-09-06 Yao Qi <yao@codesourcery.com>
7208
7209 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
7210 on return.
7211
423ec54c
JK
72122010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
7213
7214 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
7215
12ac6819
PA
72162010-09-06 Pedro Alves <pedro@codesourcery.com>
7217
7218 * Makefile.in (install-only): Replace $IPA_DEPFILES with
7219 "$(IPA_DEPFILES)".
7220
8ed54b31
JB
72212010-09-01 Joel Brobecker <brobecker@adacore.com>
7222
7223 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
7224 gdbserver/lynx-ppc-low.c: New files.
7225 * Makefile.in (lynx_low_h): New variable.
7226 (lynx-low.o, lynx-ppc-low.o): New rules.
7227 * configure.ac: On LynxOS, link with -lnetinet.
7228 * configure.srv: Add handling of powerpc-*-lynxos* targets.
7229 * configure: regenerate.
7230
bb0116a4
JB
72312010-09-01 Joel Brobecker <brobecker@adacore.com>
7232
7233 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
7234 * configure.ac: Add check for vasprintf and vsnprintf.
7235 * configure, config.in: Regenerate.
7236 * server.h (vasprintf, vsnprintf): Add conditional declarations.
7237
a778ab81 72382010-09-01 Joel Brobecker <brobecker@adacore.com>
7239
7240 * gdbreplay.c: Move include of alloca.h up, next to include of
7241 malloc.h.
7242 * server.h: Add include of malloc.h.
7243 * mem-break.c: Remove include of malloc.h.
7244 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
7245
8b034a19 72462010-09-01 Joel Brobecker <brobecker@adacore.com>
7247
7248 * Makefile.in (memmem.o): Build with -Wno-error.
7249
72502010-09-01 Joel Brobecker <brobecker@adacore.com>
7251
7252 * utils.c (xsnprintf): Make non-static.
7253 * server.h: Add xsnprintf declaration.
7254 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
7255 replace calls to snprintf by calls to xsnprintf throughout.
7256
72572010-09-01 Joel Brobecker <brobecker@adacore.com>
7258
7259 * configure.ac: Add configure check for alloca.
7260 * configure, config.in: Regenerate.
7261 * server.h: Include alloca.h if it exists.
7262 * gdbreplay.c: Include alloca.h if it exists.
7263
1a981360
PA
72642010-08-28 Pedro Alves <pedro@codesourcery.com>
7265
7266 * linux-low.c (__SIGRTMIN): Define if not already defined.
7267 (linux_create_inferior): Check for __ANDROID__ rather than
7268 __SIGRTMIN.
7269 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
7270 are already deferred.
7271 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
7272 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
7273 stopped and already has a pending signal to report.
7274 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
7275 a pending signal to report or is moving out of a jump pad.
7276 (linux_init_signals): Check for __ANDROID__ rather than
7277 __SIGRTMIN.
7278
b4d51a55
PA
72792010-08-28 Pedro Alves <pedro@codesourcery.com>
7280
7281 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
7282 debug_threads check. Avoid a linear search when not doing debug
7283 output.
7284
ec48365d
PA
72852010-08-27 Pedro Alves <pedro@codesourcery.com>
7286
7287 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
7288 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
7289 (struct file_handler) <fd>: Change type to gdb_fildes_t.
7290 (process_event): Change local fd's type to gdb_fildes_t.
7291 (create_file_handler): Adjust prototype.
7292 (delete_file_handler): Adjust prototype.
7293 (handle_file_event): Adjust prototype. Use pfildes.
7294 (create_file_event): Adjsut prototype.
7295 * remote-utils.c (remote_desc, listen_desc): Change type to
7296 gdb_fildes_t.
7297 * server.h: New gdb_fildes_t typedef.
7298 [USE_WIN32API]: Include winsock2.h.
7299 (delete_file_handler, add_file_handler): Adjust prototypes.
7300 (pfildes): Declare.
7301 * utils.c (pfildes): New.
7302
854d88f0
PA
73032010-08-27 Pedro Alves <pedro@codesourcery.com>
7304
7305 * configure.ac (build_warnings): Add -Wno-char-subscripts.
7306 * configure: Regenerate.
7307
0146f85b
PA
73082010-08-27 Pedro Alves <pedro@codesourcery.com>
7309
7310 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
7311 (linux_done_accessing_memory): ... this.
7312 (linux_target_ops): Adjust.
7313 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
7314 * nto-low.c (nto_target_ops): Adjust comment.
7315 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
7316 * spu-low.c (spu_target_ops): Adjust comment.
7317 * target.h (target_ops): Rename unprepare_to_access_memory field
7318 to done_accessing_memory.
7319 (unprepare_to_access_memory): Rename to ...
7320 (done_accessing_memory): ... this.
7321
90d74c30
PA
73222010-08-26 Pedro Alves <pedro@codesourcery.com>
7323
7324 * linux-low.c (linux_prepare_to_access_memory): New.
7325 (linux_unprepare_to_access_memory): New.
7326 (linux_target_ops): Install them.
7327 * server.c (read_memory): Rename to ...
7328 (gdb_read_memory): ... this. Use
7329 prepare_to_access_memory/prepare_to_access_memory.
7330 (write_memory): Rename to ...
7331 (gdb_write_memory): ... this. Use
7332 prepare_to_access_memory/prepare_to_access_memory.
7333 (handle_search_memory_1): Adjust.
7334 (process_serial_event): Adjust.
7335 * target.h (struct target_ops): New fields
7336 prepare_to_access_memory and unprepare_to_access_memory.
7337 (prepare_to_access_memory, unprepare_to_access_memory): New.
7338 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
7339 prepare_to_access_memory/prepare_to_access_memory.
7340 * nto-low.c (nto_target_ops): Adjust.
7341 * spu-low.c (spu_target_ops): Adjust.
7342 * win32-low.c (win32_target_ops): Adjust.
7343
fd467969
PA
73442010-08-26 Pedro Alves <pedro@codesourcery.com>
7345
7346 * Makefile.in (WARN_CFLAGS): Get it from configure.
7347 (WERROR_CFLAGS): New.
7348 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
7349 * configure.ac: Introduce --enable-werror, which adds -Werror to
7350 the compiler command line. Enabled by default. Disable with
7351 --disable-werror. Add -Wdeclaration-after-statement
7352 Wpointer-arith and -Wformat-nonliteral to warning flags.
7353 * configure: Regenerate.
7354
331e2f5f
PA
73552010-08-26 Pedro Alves <pedro@codesourcery.com>
7356
7357 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
7358
e581f2b4
PA
73592010-08-26 Pedro Alves <pedro@codesourcery.com>
7360
7361 * gdbreplay.c (remote_error): New.
7362 (gdbchar): New.
7363 (expect): Use gdbchar. Check for error reading from GDB.
7364 Clarify sync error output.
7365 (play): Check for errors writing to GDB.
7366 * linux-low.c (sigchld_handler): Really ignore `write' errors.
7367 * remote-utils.c (getpkt): Check for errors writing to the remote
7368 descriptor.
7369
3c11dd79
PA
73702010-08-25 Pedro Alves <pedro@codesourcery.com>
7371
7372 * linux-low.c (linux_wait_1): Move non-debugging code out of
7373 `debug_threads' control.
7374
d20a8ad9
PA
73752010-08-25 Pedro Alves <pedro@codesourcery.com>
7376
7377 * linux-low.c (linux_wait_1): Don't set last_status here.
7378 * server.c (push_event, queue_stop_reply_callback): Assert we're
7379 not pushing a TARGET_WAITKIND_IGNORE event.
7380 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
7381 (myresume, handle_target_event): Set the thread's last_resume_kind
7382 and last_status from the target returned status.
7383
964e4306
PA
73842010-08-25 Pedro Alves <pedro@codesourcery.com>
7385
7386 PR threads/10729
7387
7388 * linux-x86-low.c (update_debug_registers_callback): New.
7389 (i386_dr_low_set_addr): Use it.
7390 (i386_dr_low_get_addr): New.
7391 (i386_dr_low_set_control): Use update_debug_registers_callback.
7392 (i386_dr_low_get_control): New.
7393 (i386_dr_low_get_status): Adjust.
7394 * linux-low.c (linux_stop_lwp): New.
7395 * linux-low.h (linux_stop_lwp): Declare.
7396
7397 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
7398 argument instead of a i386_debug_reg_state.
7399 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
7400 a i386_debug_reg_state.
7401 (i386_insert_aligned_watchpoint): Adjust.
7402 (i386_remove_aligned_watchpoint): Adjust.
7403 (i386_low_stopped_data_address): Read the debug registers from the
7404 inferior instead of from the mirrors.
7405 * i386-low.h (struct i386_debug_reg_state): Extend comment.
7406 (i386_dr_low_get_addr): Declare.
7407 (i386_dr_low_get_control): Declare.
7408 (i386_dr_low_get_status): Change prototype.
7409
7410 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
7411 (i386_dr_low_get_addr): New.
7412 (i386_dr_low_get_control): New.
7413 (i386_dr_low_get_status): Adjust prototype. Return
7414 dr_status_mirror.
7415 (i386_initial_stuff): Clear dr_status_mirror and
7416 dr_control_mirror.
7417 (i386_get_thread_context): Adjust.
7418 (i386_set_thread_context): Adjust.
7419 (i386_thread_added): Adjust.
7420
5f21a75b
PA
74212010-08-24 Pedro Alves <pedro@codesourcery.com>
7422
7423 * linux-low.h (linux_thread_area): Delete declaration.
7424
3e4c1235
TS
74252010-08-11 Thomas Schwinge <thomas@codesourcery.com>
7426
7427 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
7428 after its termination.
7429
1971b033
PA
74302010-08-09 Pedro Alves <pedro@codesourcery.com>
7431
7432 * linux-low.c (gdb_wants_lwp_stopped): Delete.
7433 (gdb_wants_all_stopped): Delete.
7434 (linux_wait_1): Don't call them.
7435 * server.c (handle_v_cont): Tag all threads as want-stopped.
7436 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
7437 stopped as "client-wants-stopped".
7438
310444ac
PA
74392010-07-31 Pedro Alves <pedro@codesourcery.com>
7440
7441 * Makefile.in (signals_h): New.
7442 (server_h): Depend on it.
7443 (server.o): Don't depend on $(signals_def).
7444 (signals.o): Depend on $(signals_def).
7445
a19cae16
JK
74462010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
7447
7448 * Makefile.in (signals_def): New.
7449 (server_h): Append include/gdb/signals.h and signals_def.
7450 (server.o): Append signals_def.
7451
30d50328
JK
74522010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
7453
7454 * server.c (handle_target_event): Use target_signal_to_host for
7455 resume_info.sig initialization.
7456 * target.h (struct thread_resume) <sig>: New comment.
7457
5c3216e2
OS
74582010-07-20 Ozkan Sezer <sezeroz@gmail.com>
7459
c6f46ca0
OS
7460 * server.c (handle_query): strcpy() the returned string from paddress()
7461 instead of sprintf().
5c3216e2
OS
7462 * utils.c (paddress): Return phex_nz().
7463
6bd31874
JB
74642010-07-07 Joel Brobecker <brobecker@adacore.com>
7465
7466 * server.c (handle_v_cont): Call mourn_inferior if process
7467 just exited.
7468 (myresume): Likewise.
7469
0fb4aa4b
PA
74702010-07-01 Pedro Alves <pedro@codesourcery.com>
7471
7472 Static tracepoints, and integration with UST.
7473
7474 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
7475 * mem-break.c (uninsert_all_breakpoints)
7476 (reinsert_all_breakpoints): New.
7477 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
7478 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
7479 (gdb_agent_ust_loaded, helper_thread_id)
7480 (gdb_agent_helper_thread_id): New macros.
7481 (struct ipa_sym_addresses): Add addr_ust_loaded,
7482 addr_helper_thread_id, addr_cmd_buf.
7483 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
7484 (in_process_agent_loaded_ust): New.
7485 (write_e_ust_not_loaded): New.
7486 (maybe_write_ipa_ust_not_loaded): New.
7487 (struct collect_static_trace_data_action): New.
7488 (enum tracepoint_type) <static_tracepoint>: New.
7489 (struct tracepoint) <handle>: Mention static tracepoints.
7490 (struct static_tracepoint_ctx): New.
7491 (CMD_BUF_SIZE): New.
7492 (add_tracepoint_action): Handle static tracepoint actions.
7493 (unprobe_marker_at): New.
7494 (clear_installed_tracepoints): Handle static tracepoints.
7495 (cmd_qtdp): Handle static tracepoints.
7496 (probe_marker_at): New.
7497 (cmd_qtstart): Handle static tracepoints.
7498 (response_tracepoint): Handle static tracepoints.
7499 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
7500 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
7501 (get_context_regcache): Handle static tracepoints.
7502 (do_action_at_tracepoint): Handle static tracepoint actions.
7503 (traceframe_find_block_type): Handle static trace data blocks.
7504 (traceframe_read_sdata): New.
7505 (download_tracepoints): Download static tracepoint actions.
7506 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
7507 (GDB_PROBE_NAME): New.
7508 (ust_ops): New.
7509 (GET_UST_SYM): New.
7510 (USTF): New.
7511 (dlsym_ust): New.
7512 (ust_marker_to_static_tracepoint): New.
7513 (gdb_probe): New.
7514 (collect_ust_data_at_tracepoint): New.
7515 (gdb_ust_probe): New.
7516 (UNIX_PATH_MAX, SOCK_DIR): New.
7517 (gdb_ust_connect_sync_socket): New.
7518 (resume_thread, stop_thread): New.
7519 (run_inferior_command): New.
7520 (init_named_socket): New.
7521 (gdb_ust_socket_init): New.
7522 (cstr_to_hexstr): New.
7523 (next_st): New.
7524 (first_marker, next_marker): New.
7525 (response_ust_marker): New.
7526 (cmd_qtfstm, cmd_qtsstm): New.
7527 (unprobe_marker_at, probe_marker_at): New.
7528 (cmd_qtstmat, gdb_ust_thread): New.
7529 (gdb_ust_init): New.
7530 (initialize_tracepoint_ftlib): Call gdb_ust_init.
7531 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
7532 (ST_REGENTRY): New.
7533 (x86_64_st_collect_regmap): New.
7534 (X86_64_NUM_ST_COLLECT_GREGS): New.
7535 (AMD64_RIP_REGNUM): New.
7536 (supply_static_tracepoint_registers): New.
7537 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
7538 (ST_REGENTRY): New.
7539 (i386_st_collect_regmap): New.
7540 (i386_NUM_ST_COLLECT_GREGS): New.
7541 (supply_static_tracepoint_registers): New.
7542 * server.c (handle_query): Handle qXfer:statictrace:read.
7543 <qSupported>: Report support for StaticTracepoints, and
7544 qXfer:statictrace:read features.
7545 * server.h (traceframe_read_sdata)
7546 (supply_static_tracepoint_registers): Declare.
7547 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
7548 (unpack_varlen_hex): Include in IPA build.
7549 * Makefile.in (ustlibs, ustinc): New.
7550 (IPA_OBJS): Add remote-utils-ipa.o.
7551 ($(IPA_LIB)): Link -ldl and -lpthread.
7552 (UST_CFLAGS): New.
7553 (IPAGENT_CFLAGS): Add UST_CFLAGS.
7554 * config.in, configure: Regenerate.
7555
9e4344e5
PA
75562010-06-20 Ian Lance Taylor <iant@google.com>
7557 Pedro Alves <pedro@codesourcery.com>
7558
7559 * linux-x86-low.c (always_true): Delete.
7560 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
7561 trying to fool the compiler with always_true.
7562
c6beb2cb
PA
75632010-06-20 Pedro Alves <pedro@codesourcery.com>
7564
7565 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
7566 conditions in gdbserver.
7567
d2ed6730
UW
75682010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
7569
7570 * spu-low.c (spu_read_memory): Wrap around local store limit.
7571 (spu_write_memory): Likewise.
7572
4e29fb54
PA
75732010-06-15 Pedro Alves <pedro@codesourcery.com>
7574
7575 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
7576 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
7577 LONGEST uses.
7578 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
7579 uses.
7580 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
7581 uses with LONGEST uses.
7582
6a271cae
PA
75832010-06-14 Stan Shebs <stan@codesourcery.com>
7584 Pedro Alves <pedro@codesourcery.com>
7585
7586 Bytecode compiler.
7587
7588 * linux-x86-low.c: Include limits.h.
7589 (add_insns): New.
7590 (always_true): New.
7591 (EMIT_ASM): New.
7592 (EMIT_ASM32): New.
7593 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
7594 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
7595 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
7596 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
7597 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
7598 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
7599 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
7600 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
7601 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
7602 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
7603 (amd64_emit_void_call_2): New.
7604 (amd64_emit_ops): New.
7605 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
7606 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
7607 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
7608 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
7609 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
7610 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
7611 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
7612 (i386_emit_call, i386_emit_reg, i386_emit_pop)
7613 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
7614 (i386_emit_stack_adjust, i386_emit_int_call_1)
7615 (i386_emit_void_call_2): New.
7616 (i386_emit_ops): New.
7617 (x86_emit_ops): New.
7618 (the_low_target): Install x86_emit_ops.
7619 * server.h (struct emit_ops): New.
7620 (get_raw_reg_func_addr): Declare.
7621 (current_insn_ptr, emit_error): Declare.
7622 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
7623 (set_trace_state_variable_value): New defines.
7624 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
7625 addr_get_trace_state_variable_value and
7626 addr_set_trace_state_variable_value.
7627 (symbol_list): New fields for get_raw_reg,
7628 get_trace_state_variable_value and set_trace_state_variable_value.
7629 (condfn): New typedef.
7630 (struct tracepoint): New field `compiled_cond'.
7631 (do_action_at_tracepoint): Clear compiled_cond.
7632 (get_trace_state_variable_value, set_trace_state_variable_value):
7633 Export in the IPA.
7634 (condition_true_at_tracepoint): If there's a compiled condition,
7635 run that.
7636 (current_insn_ptr, emit_error): New globals.
7637 (struct bytecode_address): New.
7638 (get_raw_reg_func_addr): New.
7639 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
7640 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
7641 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
7642 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
7643 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
7644 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
7645 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
7646 (compile_tracepoint_condition, compile_bytecodes): New.
7647 * target.h (emit_ops): Forward declare.
7648 (struct target_ops): New field emit_ops.
7649 (target_emit_ops): New.
7650 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
7651 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
7652 * linux-low.c (linux_emit_ops): New.
7653 (linux_target_ops): Install it.
7654 * linux-low.h (struct linux_target_ops): New field emit_ops.
7655
92b72907
UW
76562010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
7657
7658 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
7659 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
7660
fa593d66
PA
76612010-06-01 Pedro Alves <pedro@codesourcery.com>
7662 Stan Shebs <stan@codesourcery.com>
7663
7664 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
7665 (all): Depend on $(extra_libraries).
7666 (install-only): Install the IPA.
7667 (IPA_OBJS, IPA_LIB): New.
7668 (clean): Remove the IPA lib.
7669 (IPAGENT_CFLAGS): New.
7670 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
7671 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
7672 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
7673 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
7674 * configure.ac: Check for atomic builtins support in the compiler.
7675 (IPA_DEPFILES, extra_libraries): Define.
7676 * configure.srv (ipa_obj): Add description.
7677 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
7678 (i[34567]86-*-linux*): Set ipa_obj.
7679 (x86_64-*-linux*): Set ipa_obj.
7680 * linux-low.c (stabilizing_threads): New.
7681 (supports_fast_tracepoints): New.
7682 (linux_detach): Stabilize threads before detaching.
7683 (handle_tracepoints): Handle internal tracing breakpoints. Assert
7684 the lwp is either not stabilizing, or is moving out of a jump pad.
7685 (linux_fast_tracepoint_collecting): New.
7686 (maybe_move_out_of_jump_pad): New.
7687 (enqueue_one_deferred_signal): New.
7688 (dequeue_one_deferred_signal): New.
7689 (linux_wait_for_event_1): If moving out of a jump pad, defer
7690 pending signals to later.
7691 (linux_stabilize_threads): New.
7692 (linux_wait_1): Check if threads need moving out of jump pads, and
7693 do it if so.
7694 (stuck_in_jump_pad_callback): New.
7695 (move_out_of_jump_pad_callback): New.
7696 (lwp_running): New.
7697 (linux_resume_one_lwp): Handle moving out of jump pads.
7698 (linux_set_resume_request): Dequeue deferred signals.
7699 (need_step_over_p): Also step over fast tracepoint jumps.
7700 (start_step_over): Also uninsert fast tracepoint jumps.
7701 (finish_step_over): Also reinsert fast tracepoint jumps.
7702 (linux_install_fast_tracepoint_jump): New.
7703 (linux_target_ops): Install linux_stabilize_threads and
7704 linux_install_fast_tracepoint_jump_pad.
7705 * linux-low.h (linux_target_ops) <get_thread_area,
7706 install_fast_tracepoint_jump_pad>: New fields.
7707 (struct lwp_info) <collecting_fast_tracepoint,
7708 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
7709 (linux_get_thread_area): Declare.
7710 * linux-x86-low.c (jump_insn): New.
7711 (x86_get_thread_area): New.
7712 (append_insns): New.
7713 (push_opcode): New.
7714 (amd64_install_fast_tracepoint_jump_pad): New.
7715 (i386_install_fast_tracepoint_jump_pad): New.
7716 (x86_install_fast_tracepoint_jump_pad): New.
7717 (the_low_target): Install x86_get_thread_area and
7718 x86_install_fast_tracepoint_jump_pad.
7719 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
7720 (struct fast_tracepoint_jump): New.
7721 (fast_tracepoint_jump_insn): New.
7722 (fast_tracepoint_jump_shadow): New.
7723 (find_fast_tracepoint_jump_at): New.
7724 (fast_tracepoint_jump_here): New.
7725 (delete_fast_tracepoint_jump): New.
7726 (set_fast_tracepoint_jump): New.
7727 (uninsert_fast_tracepoint_jumps_at): New.
7728 (reinsert_fast_tracepoint_jumps_at): New.
7729 (set_breakpoint_at): Use write_inferior_memory.
7730 (uninsert_raw_breakpoint): Use write_inferior_memory.
7731 (check_mem_read): Mask out fast tracepoint jumps.
7732 (check_mem_write): Mask out fast tracepoint jumps.
7733 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
7734 (set_fast_tracepoint_jump): Declare.
7735 (delete_fast_tracepoint_jump)
7736 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
7737 (reinsert_fast_tracepoint_jumps_at): Declare.
7738 * regcache.c: Don't compile many functions when building the
7739 in-process agent library.
7740 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
7741 the register buffer in the heap.
7742 (free_register_cache): If the register buffer isn't owned by the
7743 regcache, don't free it.
7744 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
7745 pre-existing register caches.
7746 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
7747 type.
7748 (convert_ascii_to_int): : Constify `from' parameter type.
7749 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
7750 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
7751 the needed buffer in-place.
7752 (relocate_instruction): New.
7753 * server.c (handle_query) <qSymbols>: If the target supports
7754 tracepoints, give it a chance of looking up symbols. Report
7755 support for fast tracepoints.
7756 (handle_status): Stabilize threads.
7757 (process_serial_event): Adjust.
7758 * server.h (struct fast_tracepoint_jump): Forward declare.
7759 (struct process_info) <fast_tracepoint_jumps>: New field.
7760 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
7761 (decode_X_packet, decode_M_packet): Adjust.
7762 (relocate_instruction): Declare.
7763 (in_process_agent_loaded): Declare.
7764 (tracepoint_look_up_symbols): Declare.
7765 (struct fast_tpoint_collect_status): Declare.
7766 (fast_tracepoint_collecting): Declare.
7767 (force_unlock_trace_buffer): Declare.
7768 (handle_tracepoint_bkpts): Declare.
7769 (initialize_low_tracepoint)
7770 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
7771 * target.h (struct target_ops) <stabilize_threads,
7772 install_fast_tracepoint_jump_pad>: New fields.
7773 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
7774 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
7775 [HAVE_STDINT_H]: Include stdint.h.
7776 (trace_debug_1): Rename to ...
7777 (trace_vdebug): ... this.
7778 (trace_debug): Rename to ...
7779 (trace_debug_1): ... this. Add `level' parameter.
7780 (trace_debug): New.
7781 (ATTR_USED, ATTR_NOINLINE): New.
7782 (IP_AGENT_EXPORT): New.
7783 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
7784 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
7785 (about_to_request_buffer_space, trace_buffer_is_full)
7786 (stopping_tracepoint, expr_eval_result, error_tracepoint)
7787 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
7788 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
7789 (traceframe_write_count, traceframes_created)
7790 (trace_state_variables)
7791 New renaming defines.
7792 (struct ipa_sym_addresses): New.
7793 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
7794 (symbol_list): New.
7795 (ipa_sym_addrs): New.
7796 (all_tracepoint_symbols_looked_up): New.
7797 (in_process_agent_loaded): New.
7798 (write_e_ipa_not_loaded): New.
7799 (maybe_write_ipa_not_loaded): New.
7800 (tracepoint_look_up_symbols): New.
7801 (debug_threads) [IN_PROCESS_AGENT]: New.
7802 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
7803 (UNKNOWN_SIDE_EFFECTS): New.
7804 (stop_tracing): New.
7805 (flush_trace_buffer): New.
7806 (stop_tracing_bkpt): New.
7807 (flush_trace_buffer_bkpt): New.
7808 (read_inferior_integer): New.
7809 (read_inferior_uinteger): New.
7810 (read_inferior_data_pointer): New.
7811 (write_inferior_data_pointer): New.
7812 (write_inferior_integer): New.
7813 (write_inferior_uinteger): New.
7814 (struct collect_static_trace_data_action): Delete.
7815 (enum tracepoint_type): New.
7816 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
7817 <actions_str, step_actions, step_actions_str>: Only include in
7818 GDBserver.
fa593d66
PA
7819 <orig_size, obj_addr_on_target, adjusted_insn_addr>
7820 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
7821 (tracepoints): Use IP_AGENT_EXPORT.
7822 (last_tracepoint): Don't include in the IPA.
7823 (stopping_tracepoint): Use IP_AGENT_EXPORT.
7824 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
7825 (alloced_trace_state_variables): New.
7826 (trace_state_variables): Use IP_AGENT_EXPORT.
7827 (traceframe_t): Delete unused variable.
7828 (circular_trace_buffer): Don't include in the IPA.
7829 (trace_buffer_start): Delete.
7830 (struct trace_buffer_control): New.
7831 (trace_buffer_free): Delete.
7832 (struct ipa_trace_buffer_control): New.
7833 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
7834 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
7835 New.
7836 (trace_buffer_ctrl): New.
7837 (TRACE_BUFFER_CTRL_CURR): New.
7838 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
7839 Reimplement as macros.
7840 (trace_buffer_wrap): Delete.
7841 (traceframe_write_count, traceframe_read_count)
7842 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
7843 (struct tracepoint_hit_ctx) <type>: New field.
7844 (struct fast_tracepoint_ctx): New.
7845 (memory_barrier): New.
7846 (cmpxchg): New.
7847 (record_tracepoint_error): Update atomically in the IPA.
7848 (clear_inferior_trace_buffer): New.
7849 (about_to_request_buffer_space): New.
7850 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
7851 updating the same buffer.
7852 (add_tracepoint): Default the tracepoint's type to trap
7853 tracepoint, and orig_size to -1.
7854 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
7855 internal variables.
7856 (create_trace_state_variable): New parameter `gdb'. Handle it.
7857 (clear_installed_tracepoints): Clear fast tracepoint jumps.
7858 (cmd_qtdp): Handle fast tracepoints.
7859 (cmd_qtdv): Adjust.
7860 (max_jump_pad_size): New.
7861 (gdb_jump_pad_head): New.
7862 (get_jump_space_head): New.
7863 (claim_jump_space): New.
7864 (sort_tracepoints): New.
7865 (MAX_JUMP_SIZE): New.
7866 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
7867 IPA.
7868 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
7869 support. Upload fast traceframes, and delete internal IPA
7870 breakpoints.
7871 (stop_tracing_handler): New.
7872 (flush_trace_buffer_handler): New.
7873 (cmd_qtstop): Upload fast tracepoints.
7874 (response_tracepoint): Handle fast tracepoints.
7875 (tracepoint_finished_step): Upload fast traceframes. Set the
7876 tracepoint hit context's tracepoint type.
7877 (handle_tracepoint_bkpts): New.
7878 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
7879 type. Add comment about fast tracepoints.
7880 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
7881 non-existing action_str field.
7882 (get_context_regcache): Handle fast tracepoints.
7883 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
7884 to the regcache.
7885 (fast_tracepoint_from_jump_pad_address): New.
7886 (fast_tracepoint_from_ipa_tpoint_address): New.
7887 (collecting_t): New.
7888 (force_unlock_trace_buffer): New.
7889 (fast_tracepoint_collecting): New.
7890 (collecting): New.
7891 (gdb_collect): New.
7892 (write_inferior_data_ptr): New.
7893 (target_tp_heap): New.
7894 (target_malloc): New.
7895 (download_agent_expr): New.
7896 (UALIGN): New.
7897 (download_tracepoints): New.
7898 (download_trace_state_variables): New.
7899 (upload_fast_traceframes): New.
7900 (IPA_FIRST_TRACEFRAME): New.
7901 (IPA_NEXT_TRACEFRAME_1): New.
7902 (IPA_NEXT_TRACEFRAME): New.
7903 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
7904 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
7905 (gdb_jump_pad_buffer_end): New.
7906 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
7907 (initialize_tracepoint): Adjust.
7908 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
7909 buffer. Initialize the low module.
7910 * utils.c (PREFIX, TOOLNAME): New.
7911 (malloc_failure): Use PREFIX.
7912 (error): In the IPA, an error causes an exit.
7913 (fatal, warning): Use PREFIX.
7914 (internal_error): Use TOOLNAME.
7915 (NUMCELLS): Increase to 10.
7916 * configure, config.in: Regenerate.
7917
d149dd1d
PA
79182010-06-01 Pedro Alves <pedro@codesourcery.com>
7919
7920 * server.c (handle_query) <qSupported>: Do two passes over the
7921 qSupported string to avoid nesting strtok.
7922
f6528abd
JK
79232010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7924
7925 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
7926 (CDEPS): New.
7927 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
7928 -Wl,--dynamic-list.
7929 * configure: Regenerate.
7930 * proc-service.list: New.
7931
ca2a87a0
JK
79322010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7933
7934 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
7935 New comment.
7936
363a6e9f
OS
79372010-05-26 Ozkan Sezer <sezeroz@gmail.com>
7938
7939 * gdbreplay.c (remote_open): Check error return from socket() call by
7940 its equality to -1 not by it being negative.
7941 * remote-utils.c (remote_open): Likewise.
7942
d23b6cb1
PA
79432010-05-23 Pedro Alves <pedro@codesourcery.com>
7944
7945 * config.h: Regenerate.
7946
28d3cf85
MK
79472010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
7948
7949 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
7950 doesn't provide PTRACE_GET_THREAD_AREA.
7951
fea36a59
MK
79522010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
7953
7954 * linux-m68k-low.c: Include <asm/ptrace.h>
7955 (ps_get_thread_area): Implement.
7956
24b066ba
DE
79572010-05-03 Doug Evans <dje@google.com>
7958
7959 * event-loop.c (struct callback_event): New struct.
7960 (callback_list): New global.
7961 (append_callback_event, delete_callback_event): New functions.
7962 (process_callback): New function.
7963 (start_event_loop): Call it.
7964 * remote-utils.c (NOT_SCHEDULED): Define.
7965 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
7966 moved out of readchar.
7967 (readchar): Rewrite. Call reschedule before returning.
7968 (reset_readchar): New function.
7969 (remote_close): Call it.
7970 (process_remaining, reschedule): New functions.
7971 * server.h (callback_handler_func): New typedef.
7972 (append_callback_event, delete_callback_event): Declare.
7973
9836d6ea
PA
79742010-05-03 Pedro Alves <pedro@codesourcery.com>
7975
7976 * proc-service.c (ps_pglobal_lookup): Use
7977 thread_db_look_up_one_symbol.
7978 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
7979 parameter. Use it instead of all_symbols_looked_up.
7980 * server.h (struct process_info) <all_symbols_looked_up>: Delete
7981 field.
7982 (all_symbols_looked_up): Don't declare.
7983 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
7984 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
7985 field.
7986 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
7987 Set all_symbols_looked_up here.
7988 (thread_db_look_up_one_symbol): New.
7989 (thread_db_get_tls_address): Adjust.
7990 (thread_db_load_search, try_thread_db_load_1): Always allocate the
7991 thread_db object on the heap, and tentatively set it in the
7992 process structure.
7993 (thread_db_init): Don't set all_symbols_looked_up here.
7994 * linux-low.h (thread_db_look_up_one_symbol): Declare.
7995
7984d532
PA
79962010-05-03 Pedro Alves <pedro@codesourcery.com>
7997
7998 * linux-low.c (linux_kill, linux_detach): Adjust.
7999 (status_pending_p_callback): Remove redundant statement. Check
8000 for !TARGET_WAITIKIND_IGNORE, instead of
8001 TARGET_WAITKIND_STOPPED.
8002 (handle_tracepoints): Make sure LWP is locked. Adjust.
8003 (linux_wait_for_event_1): Adjust.
8004 (linux_cancel_breakpoints): New.
8005 (unsuspend_one_lwp): New.
8006 (unsuspend_all_lwps): New.
8007 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
8008 (send_sigstop_callback): Change return type to int, add new
8009 `except' parameter and handle it.
8010 (suspend_and_send_sigstop_callback): New.
8011 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
8012 pass them down. If SUSPEND, also increment the lwp's suspend
8013 count.
8014 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
8015 (need_step_over_p): Don't consider suspended LWPs.
8016 (start_step_over): Adjust.
8017 (proceed_one_lwp): Change return type to int, add new `except'
8018 parameter and handle it.
8019 (unsuspend_and_proceed_one_lwp): New.
8020 (proceed_all_lwps): Use find_inferior instead of
8021 for_each_inferior.
8022 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
8023 also decrement the suspend count of LWPs. Pass `except' down,
8024 instead of hacking its suspend count.
8025 (linux_pause_all): Add `freeze' parameter. Adjust.
8026 (linux_unpause_all): New.
8027 (linux_target_ops): Install linux_unpause_all.
8028 * server.c (handle_status): Adjust.
8029 * target.h (struct target_ops): New fields `unpause_all' and
8030 `cancel_breakpoints'. Add new parameter to `pause_all'.
8031 (pause_all): Add new `freeze' parameter.
8032 (unpause_all): New.
8033 (cancel_breakpoints): New.
8034 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
8035 cancel breakpoints.
8036 (cmd_qtstart): Pause threads.
8037 (stop_tracing): Pause threads, and cancel breakpoints.
8038 * win32-low.c (win32_target_ops): Adjust.
8039
e471f25b
PA
80402010-05-03 Pedro Alves <pedro@codesourcery.com>
8041
8042 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
8043 the inferior right away from here...
8044 (linux_wait_1): ... to here, and adjust to check the thread's
8045 last_resume_kind instead of the lwp's step or stop_expected flags.
8046
1915ef4f
PA
80472010-05-02 Pedro Alves <pedro@codesourcery.com>
8048
8049 * README: Use consistent `GDB' and `GDBserver' spellings.
8050
f9e39928
PA
80512010-05-02 Pedro Alves <pedro@codesourcery.com>
8052
8053 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
8054 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
8055 (linux_detach_one_lwp): Assume the lwp is stopped.
8056 (any_thread_of): Delete.
8057 (linux_detach): Stop all lwps here. Don't blindly delete all
8058 breakpoints.
8059 (delete_lwp_callback): New.
8060 (linux_mourn): Delete all lwps of the process that is gone.
8061 (linux_wait_1): Don't delete the last lwp of the process here.
8062 * mem-break.h (mark_breakpoints_out): Declare.
8063 * mem-break.c (mark_breakpoints_out): New.
8064 (free_all_breakpoints): Use it.
8065 * server.c (handle_target_event): If the process is gone, mark
8066 breakpoints out.
8067 * thread-db.c (struct thread_db) <create_bp>: New field.
8068 (thread_db_enable_reporting): Fix prototype. Store a thread event
8069 breakpoint reference in the thread_db struct.
8070 (thread_db_load_search): Clear the thread_db object.
8071 (try_thread_db_load_1): Ditto.
8072 (switch_to_process): New.
8073 (disable_thread_event_reporting): Use it.
8074 (remove_thread_event_breakpoints): New.
8075 (thread_db_detach, thread_db_mourn): Use it.
8076
1e7fc18c
PA
80772010-05-01 Pedro Alves <pedro@codesourcery.com>
8078
8079 * linux-low.c (linux_enable_event_reporting): New.
8080 (linux_wait_for_event_1, handle_extended_wait): Use it.
8081
02fc4de7
PA
80822010-04-30 Pedro Alves <pedro@codesourcery.com>
8083
8084 * linux-low.c (linux_kill_one_lwp, linux_kill)
8085 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
8086 (send_sigstop): Take an lwp_info as parameter instead. Queue a
8087 SIGSTOP even if the LWP is stopped.
8088 (send_sigstop_callback): New.
8089 (stop_all_lwps): Use send_sigstop_callback instead.
8090 (linux_resume_one_thread): Adjust.
8091 (proceed_one_lwp): Still proceed an LWP that the client has
8092 requested to stop, if we haven't reported it as stopped yet. Make
8093 sure that LWPs the client want stopped, have a pending SIGSTOP.
8094
bc3b5632
DE
80952010-04-26 Doug Evans <dje@google.com>
8096
ae1ada35
DE
8097 * server.c (handle_general_set): Make static.
8098
bc3b5632
DE
8099 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
8100 Print received char after testing for error/eof instead of before.
8101 (input_interrupt): Tweak comment.
8102
65730243
DE
81032010-04-23 Doug Evans <dje@google.com>
8104
8105 * server.c (start_inferior): Print inferior argv if --debug.
8106
a8ae7dc0
AR
81072010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
8108
8109 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
8110 * nto-x86-low.c: Include server.h
8111
1c07cc19
PM
81122010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
8113
8114 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
8115 be consistent with other sources of this directory.
8116 (init_registers_amd64): Correct name of source file of this function
8117 in the comment.
8118
e0a61e09
PM
81192010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8120
8121 * configure.srv (x86_64-*-mingw*): New configuration for Windows
8122 64-bit executables.
8123
54709339
PM
81242010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8125
8126 * win32-i386-low.c: Add 64-bit support.
8127 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
8128 (init_registers_amd64): Declare.
8129 (mappings): Add 64-bit version of array.
8130 (init_windows_x86): New function.
8131 (the_low_target): Change init_arch field to init_windows_x86.
8132
e8f0053d
PM
81332010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8134
8135 * win32-low.c: Adapt to support also 64-bit architecture.
8136 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
8137 (get_image_name): Use SIZE_T type for local variable `done'.
8138 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
8139 (toolhelp_get_dll_name): Idem.
8140 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
8141 Use uintptr_t typecast to avoid warning.
8142 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
8143 (handle_exception): Use phex_nz to avoid warning.
8144 (win32_wait): Remove unused local variable `process'.
8145
c481e77e
PM
81462010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8147
8148 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
8149 `amd64-avx.o'.
8150
12ea4b69
PM
81512010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
8152
8153 * configure.ac: Use `ws2_32' library for srv_mingw.
8154 * configure: Regenerate.
8155 * gdbreplay.c: Include winsock2.h instead of winsock.h.
8156 * remote-utils.c: Likewise.
8157
f6d1620c
L
81582010-04-17 H.J. Lu <hongjiu.lu@intel.com>
8159
8160 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
8161 if __x86_64__ is defined.
8162
8e642873
PM
81632010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
8164
8165 * configure: Regenerate.
8166
711e434b
PM
81672010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
8168
8169 * server.c (handle_query): Handle 'qGetTIBAddr' query.
8170 * target.h (target_ops): New get_tib_address field.
8171 * win32-low.h (win32_thread_info): Add thread_local_base field.
8172 * win32-low.c (child_add_thread): Add tlb argument.
8173 Set thread_local_base field to TLB.
8174 (get_child_debug_event): Adapt to child_add_thread change.
8175 (win32_get_tib_address): New function.
8176 (win32_target_ops): Set get_tib_address field to
8177 win32_get_tib_address.
8178 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
8179
505106cd
PA
81802010-04-12 Pedro Alves <pedro@codesourcery.com>
8181
505106cd
PA
8182 * linux-low.c (linux_mourn): Also remove the process.
8183 * server.c (handle_target_event): Don't remove the process here.
8184 * nto-low.c (nto_mourn): New.
8185 (nto_target_ops): Install it.
8186 * spu-low.c (spu_mourn): New.
8187 (spu_target_ops): Install it.
8188 * win32-low.c (win32_mourn): New.
8189 (win32_target_ops): Install it.
8190
e8470a06
PA
81912010-04-12 Pedro Alves <pedro@codesourcery.com>
8192
8193 * server.h (buffer_xml_printf): Remove redundant `;'.
8194
45ba0d02
PA
81952010-04-12 Pedro Alves <pedro@codesourcery.com>
8196
8197 * regcache.c (set_register_cache): Invalidate regcaches before
8198 changing the register cache layout.
8199 (regcache_invalidate_one): Allow a NULL regcache.
8200 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
8201 regcaches before changing the register cache layout or the target
8202 regsets.
8203
59e04013
L
82042010-04-12 H.J. Lu <hongjiu.lu@intel.com>
8205
8206 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
8207 variable warning on Linux/x86-64.
8208
8336d594
PA
82092010-04-11 Pedro Alves <pedro@codesourcery.com>
8210
8211 GDBserver disconnected tracing support.
8212
8213 * linux-low.c (linux_remove_process): Delete.
8214 (add_lwp): Don't set last_resume_kind here.
8215 (linux_kill): Use `mourn'.
8216 (linux_detach): Use `thread_db_detach', and `mourn'.
8217 (linux_mourn): New.
8218 (linux_attach_lwp_1): Adjust comment.
8219 (linux_attach): last_resume_kind moved the thread_info; adjust.
8220 (status_pending_p_callback): Adjust.
8221 (linux_wait_for_event_1): Adjust.
8222 (count_events_callback, select_singlestep_lwp_callback)
8223 (select_event_lwp_callback, cancel_breakpoints_callback)
8224 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
8225 (proceed_one_lwp): Adjust.
8226 (linux_async): Add debug output.
8227 (linux_thread_stopped): New.
8228 (linux_pause_all): New.
8229 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
8230 linux_pause_all.
8231 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
8232 (thread_db_free): Delete declaration.
8233 (thread_db_detach, thread_db_mourn): Declare.
8234 * thread-db.c (thread_db_init): Use thread_db_mourn.
8235 (thread_db_free): Delete, split in two.
8236 (disable_thread_event_reporting): New.
8237 (thread_db_detach): New.
8238 (thread_db_mourn): New.
8239
8240 * server.h (struct thread_info) <last_resume_kind>: New field.
8241 <attached>: Add comment.
8242 <gdb_detached>: New field.
8243 (handler_func): Change return type to int.
8244 (handle_serial_event, handle_target_event): Ditto.
8245 (gdb_connected): Declare.
8246 (tracing): Delete.
8247 (disconnected_tracing): Declare.
8248 (stop_tracing): Declare.
8249
8250 * server.c (handle_query) <qSupported>: Report support for
8251 disconnected tracing.
8252 (queue_stop_reply_callback): Account for running threads.
8253 (gdb_wants_thread_stopped): New.
8254 (gdb_wants_all_threads_stopped): New.
8255 (gdb_reattached_process): New.
8256 (handle_status): Clear the `gdb_detached' flag of all processes.
8257 In all-stop, stop all threads.
8258 (main): Be sure to leave tfind mode. Handle disconnected tracing.
8259 (process_serial_event): If the remote connection breaks, or if an
8260 exit was forced with "monitor exit", force an event loop exit.
8261 Handle disconnected tracing on detach.
8262 (handle_serial_event): Adjust.
8263 (handle_target_event): If GDB isn't connected, forward events back
8264 to the inferior, unless the last process exited, in which case,
8265 exit gdbserver. Adjust interface.
8266
8267 * remote-utils.c (remote_open): Don't block in accept. Instead
8268 register an event loop source on the listen socket file
8269 descriptor. Refactor bits into ...
8270 (listen_desc): ... this new global.
8271 (gdb_connected): ... this new function.
8272 (enable_async_notification): ... this new function.
8273 (handle_accept_event): ... this new function.
8274 (remote_close): Clear remote_desc.
8275
8276 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
8277
8278 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
8279 New fields.
8280 (mourn_inferior): Define.
8281 (target_process_qsupported): Avoid the dangling else problem.
8282 (thread_stopped): Define.
8283 (pause_all): Define.
8284 (target_waitstatus_to_string): Declare.
8285 * target.c (target_waitstatus_to_string): New.
8286
8287 * tracepoint.c (tracing): Make extern.
8288 (disconnected_tracing): New.
8289 (stop_tracing): Make extern. Handle tracing stops due to GDB
8290 disconnecting.
8291 (cmd_qtdisconnected): New.
8292 (cmd_qtstatus): Report disconnected tracing status in trace reply.
8293 (handle_tracepoint_general_set): Handle QTDisconnected.
8294
8295 * event-loop.c (event_handler_func): Change return type to int.
8296 (process_event): Bail out if the event handler wants the event
8297 loop to stop.
8298 (handle_file_event): Ditto.
8299 (start_event_loop): Bail out if the event handler wants the event
8300 loop to stop.
8301
8302 * nto-low.c (nto_target_ops): Adjust.
8303 * spu-low.c (spu_wait): Don't remove the process here.
8304 (spu_target_ops): Adjust.
8305 * win32-low.c (win32_wait): Don't remove the process here.
8306 (win32_target_ops): Adjust.
8307
5d267c4c
PA
83082010-04-11 Pedro Alves <pedro@codesourcery.com>
8309
8310 * regcache.c (realloc_register_cache): Invalidate inferior's
8311 regcache before recreating it.
8312
623ccd72
PA
83132010-04-09 Pedro Alves <pedro@codesourcery.com>
8314
8315 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
8316
219f2f23
PA
83172010-04-09 Stan Shebs <stan@codesourcery.com>
8318 Pedro Alves <pedro@codesourcery.com>
8319
8320 * server.h (LONGEST): New.
8321 (struct thread_info) <while_stepping>: New field.
8322 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
8323 Declare.
8324 (initialize_tracepoint, handle_tracepoint_general_set)
8325 (handle_tracepoint_query, tracepoint_finished_step)
8326 (tracepoint_was_hit, release_while_stepping_state_list):
8327 (current_traceframe): Declare.
8328 * server.c (handle_general_set): Handle tracepoint packets.
8329 (read_memory): New.
8330 (write_memory): New.
8331 (handle_search_memory_1): Use read_memory.
8332 (handle_query): Report support for conditional tracepoints, trace
8333 state variables, and tracepoint sources. Handle tracepoint
8334 queries.
8335 (main): Initialize the tracepoints module.
8336 (process_serial_event): Handle traceframe reads/writes.
8337
8338 * linux-low.c (handle_tracepoints): New.
8339 (linux_wait_1): Call it.
8340 (linux_resume_one_lwp): Handle while-stepping.
8341 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
8342 (linux_target_ops): Install them.
8343 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
8344 New field.
8345 * linux-x86-low.c (x86_supports_tracepoints): New.
8346 (the_low_target). Install it.
8347
8348 * mem-break.h (delete_breakpoint): Declare.
8349 * mem-break.c (delete_breakpoint): Make external.
8350
8351 * target.h (struct target_ops): Add `supports_tracepoints',
8352 `read_pc', and `write_pc' fields.
8353 (target_supports_tracepoints): Define.
8354 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
8355 (phex_nz): New.
8356
8357 * regcache.h (struct regcache) <registers_owned>: New field.
8358 (init_register_cache, regcache_cpy): Declare.
8359 (regcache_read_pc, regcache_write_pc): Declare.
8360 (register_cache_size): Declare.
8361 (supply_regblock): Declare.
8362 * regcache.c (init_register_cache): New.
8363 (new_register_cache): Use it.
8364 (regcache_cpy): New.
8365 (register_cache_size): New.
8366 (supply_regblock): New.
8367 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 8368
219f2f23
PA
8369 * tracepoint.c: New.
8370
8371 * Makefile.in (OBS): Add tracepoint.o.
8372 (tracepoint.o): New rule.
8373
3a13a53b
L
83742010-04-08 H.J. Lu <hongjiu.lu@intel.com>
8375
8376 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
8377 (i386-mmx.o): New.
8378 (i386-mmx.c): Likewise.
8379 (i386-mmx-linux.o): Likewise.
8380 (i386-mmx-linux.c): Likewise.
8381
8382 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
8383 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
8384 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
8385 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
8386
8387 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
8388 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
8389 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
8390
1570b33e
L
83912010-04-07 H.J. Lu <hongjiu.lu@intel.com>
8392
8393 * Makefile.in (clean): Updated.
8394 (i386-avx.o): New.
8395 (i386-avx.c): Likewise.
8396 (i386-avx-linux.o): Likewise.
8397 (i386-avx-linux.c): Likewise.
8398 (amd64-avx.o): Likewise.
8399 (amd64-avx.c): Likewise.
8400 (amd64-avx-linux.o): Likewise.
8401 (amd64-avx-linux.c): Likewise.
8402
8403 * configure.srv (srv_i386_regobj): Add i386-avx.o.
8404 (srv_i386_linux_regobj): Add i386-avx-linux.o.
8405 (srv_amd64_regobj): Add amd64-avx.o.
8406 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
8407 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
8408 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
8409 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
8410 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
8411 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
8412 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
8413
8414 * i387-fp.c: Include "i386-xstate.h".
8415 (i387_xsave): New.
8416 (i387_cache_to_xsave): Likewise.
8417 (i387_xsave_to_cache): Likewise.
8418 (x86_xcr0): Likewise.
8419
8420 * i387-fp.h (i387_cache_to_xsave): Likewise.
8421 (i387_xsave_to_cache): Likewise.
8422 (x86_xcr0): Likewise.
8423
8424 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
8425 * linux-crisv32-low.c (target_regsets): Likewise.
8426 * linux-m68k-low.c (target_regsets): Likewise.
8427 * linux-mips-low.c (target_regsets): Likewise.
8428 * linux-ppc-low.c (target_regsets): Likewise.
8429 * linux-s390-low.c (target_regsets): Likewise.
8430 * linux-sh-low.c (target_regsets): Likewise.
8431 * linux-sparc-low.c (target_regsets): Likewise.
8432 * linux-xtensa-low.c (target_regsets): Likewise.
8433
8434 * linux-low.c: Include <sys/uio.h>.
8435 (regsets_fetch_inferior_registers): Support nt_type.
8436 (regsets_store_inferior_registers): Likewise.
8437 (linux_process_qsupported): New.
8438 (linux_target_ops): Add linux_process_qsupported.
8439
8440 * linux-low.h (regset_info): Add nt_type.
8441 (linux_target_ops): Add process_qsupported.
8442
8443 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
8444 and <sys/uio.h>.
8445 (init_registers_i386_avx_linux): New.
8446 (init_registers_amd64_avx_linux): Likewise.
8447 (xmltarget_i386_linux_no_xml): Likewise.
8448 (xmltarget_amd64_linux_no_xml): Likewise.
8449 (PTRACE_GETREGSET): Likewise.
8450 (PTRACE_SETREGSET): Likewise.
8451 (x86_fill_xstateregset): Likewise.
8452 (x86_store_xstateregset): Likewise.
8453 (use_xml): Likewise.
8454 (x86_linux_update_xmltarget): Likewise.
8455 (x86_linux_process_qsupported): Likewise.
8456 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
8457 (x86_arch_setup): Don't call init_registers_amd64_linux nor
8458 init_registers_i386_linux here. Call
8459 x86_linux_update_xmltarget.
8460 (the_low_target): Add x86_linux_process_qsupported.
8461
8462 * server.c (handle_query): Call target_process_qsupported.
8463
8464 * target.h (target_ops): Add process_qsupported.
8465 (target_process_qsupported): New.
8466
fc7238bb
PA
84672010-04-03 Pedro Alves <pedro@codesourcery.com>
8468
8469 * inferiors.c (add_thread): Set last_status kind to
8470 TARGET_WAITKIND_IGNORE.
8471 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
8472 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
8473 (linux_wait_1): Move `thread' local definition to block that uses
8474 it. Don't NULL initialize `event_child'.
8475 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
8476 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
8477 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
8478
bdabb078
PA
84792010-04-01 Pedro Alves <pedro@codesourcery.com>
8480
8481 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
8482 an extended waitstatus, or by a watchpoint.
8483 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
8484 thread was stepping or has been stopped by a watchpoint.
8485
d3bbe7a0
PA
84862010-04-01 Pedro Alves <pedro@codesourcery.com>
8487
8488 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
8489 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
8490 of another, then delete the previous, and validate all
8491 breakpoints.
8492 (validate_inserted_breakpoint): New.
8493 (delete_disabled_breakpoints): New.
8494 (validate_breakpoints): New.
8495 (check_mem_read): Validate breakpoints before trusting their
8496 shadow. Delete disabled breakpoints.
8497 (check_mem_write): Validate breakpoints before trusting they
8498 should be inserted. Delete disabled breakpoints.
8499 * mem-break.h (validate_breakpoints):
8500 * server.c (handle_query): Validate breakpoints when we see a
8501 qSymbol query.
8502
8b07ae33
PA
85032010-04-01 Pedro Alves <pedro@codesourcery.com>
8504
8505 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
8506 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
8507 if we could tell there's a GDB breakpoint at stop_pc.
8508 (need_step_over_p): Don't do a step over if we find a GDB
8509 breakpoint at the resume PC.
8510
8511 * mem-break.c (struct raw_breakpoint): New.
8512 (enum bkpt_type): New type `gdb_breakpoint'.
8513 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
8514 fields. New field `raw'.
8515 (find_raw_breakpoint_at): New.
8516 (set_raw_breakpoint_at): Handle refcounting. Create a raw
8517 breakpoint instead.
8518 (set_breakpoint_at): Adjust.
8519 (delete_raw_breakpoint): New.
8520 (release_breakpoint): New.
8521 (delete_breakpoint): Rename to...
8522 (delete_breakpoint_1): ... this. Add proc parameter. Use
8523 release_breakpoint. Return ENOENT.
8524 (delete_breakpoint): Reimplement.
8525 (find_breakpoint_at): Delete.
8526 (find_gdb_breakpoint_at): New.
8527 (delete_breakpoint_at): Delete.
8528 (set_gdb_breakpoint_at): New.
8529 (delete_gdb_breakpoint_at): New.
8530 (gdb_breakpoint_here): New.
8531 (set_reinsert_breakpoint): Use release_breakpoint.
8532 (uninsert_breakpoint): Rename to ...
8533 (uninsert_raw_breakpoint): ... this.
8534 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
8535 (reinsert_raw_breakpoint): Change parameter type to
8536 raw_breakpoint.
8537 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
8538 instead.
8539 (check_breakpoints): Adjust. Use release_breakpoint.
8540 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
8541 (breakpoint_inserted_here): Ditto.
8542 (check_mem_read): Adjust to iterate over raw breakpoints instead.
8543 Don't trust the breakpoint's shadow if it is not inserted.
8544 (check_mem_write): Adjust to iterate over raw breakpoints instead.
8545 (delete_all_breakpoints): Adjust.
8546 (free_all_breakpoints): Mark all breakpoints as uninserted, and
8547 use delete_breakpoint_1.
8548
8549 * mem-break.h (breakpoints_supported): Delete declaration.
8550 (set_gdb_breakpoint_at): Declare.
8551 (gdb_breakpoint_here): Declare.
8552 (delete_breakpoint_at): Delete.
8553 (delete_gdb_breakpoint_at): Declare.
8554
8555 * server.h (struct raw_breakpoint): Forward declare.
8556 (struct process_info): New field `raw_breakpoints'.
8557
8558 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
8559 breakpoints.
8560
6bf5e0ba
PA
85612010-03-24 Pedro Alves <pedro@codesourcery.com>
8562
8563 * linux-low.c (status_pending_p_callback): Fix comment.
8564 (linux_wait_for_event_1): Move most of the internal breakpoint
8565 handling from here...
8566 (linux_wait_1): ... to here.
8567 (count_events_callback): New.
8568 (select_singlestep_lwp_callback): New.
8569 (select_event_lwp_callback): New.
8570 (cancel_breakpoints_callback): New.
8571 (select_event_lwp): New.
8572 (linux_wait_1): Simplify internal breakpoint handling. Give equal
8573 priority to all LWPs that have had events that should be reported
8574 to the client. Cancel breakpoints when about to reporting the
8575 event to the client, not while stopping lwps. No longer cancel
8576 finished single-steps here.
8577 (cancel_finished_single_step): Delete.
8578 (cancel_finished_single_steps): Delete.
8579
414a389f
PA
85802010-03-24 Pedro Alves <pedro@codesourcery.com>
8581
8582 * mem-break.c (enum bkpt_type): New.
8583 (struct breakpoint): New field `type'.
8584 (set_breakpoint_at): Change return type to struct breakpoint
8585 pointer. Set type to `other_breakpoint' by default.
8586 (delete_breakpoint): Rewrite, supporting more than one breakpoint
8587 in the breakpoint list.
8588 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
8589 (reinsert_breakpoint): Rename to ...
8590 (reinsert_raw_breakpoint): ... this.
8591 (reinsert_breakpoints_at): Adjust.
8592 * mem-break.h (struct breakpoint): Declare.
8593 (set_breakpoint_at): Change return type to struct breakpoint
8594 pointer.
8595
2280c721
PA
85962010-03-24 Pedro Alves <pedro@codesourcery.com>
8597
8598 * server.c (handle_query): Assign, not compare.
8599
d50171e4
PA
86002010-03-24 Pedro Alves <pedro@codesourcery.com>
8601
8602 Teach linux gdbserver to step-over-breakpoints.
8603
8604 * linux-low.c (can_hardware_single_step): New.
8605 (supports_breakpoints): New.
8606 (handle_extended_wait): If stopping threads, read the stop pc of
8607 the new cloned LWP.
8608 (get_pc): New.
8609 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
8610 low target doesn't support retrieving the PC.
8611 (add_lwp): Set last_resume_kind to resume_continue.
8612 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
8613 (linux_attach): Don't clear stop_expected. Set the lwp's
8614 last_resume_kind to resume_stop.
8615 (linux_detach_one_lwp): Don't check for removed breakpoints.
8616 (check_removed_breakpoint): Delete.
8617 (status_pending_p): Rename to ...
8618 (status_pending_p_callback): ... this. Don't check for removed
8619 breakpoints. Don't consider threads that are stopped from GDB's
8620 perspective.
8621 (linux_wait_for_lwp): Always read the stop_pc here.
8622 (cancel_breakpoint): New.
8623 (step_over_bkpt): New global.
8624 (linux_wait_for_event_1): Implement stepping over breakpoints.
8625 (gdb_wants_lwp_stopped): New.
8626 (gdb_wants_all_stopped): New.
8627 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
8628 single-step traps here. Store the thread's last reported target
8629 wait status.
8630 (send_sigstop): Don't clear stop_expected. Always set it,
8631 instead.
8632 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
8633 (cancel_finished_single_step): New.
8634 (cancel_finished_single_steps): New.
8635 (wait_for_sigstop): Don't cancel finished single-step traps here.
8636 (linux_resume_one_lwp): Don't check for removed breakpoints.
8637 Don't set `step' on non-hardware step archs.
8638 (linux_set_resume_request): Ignore resume_stop requests if already
8639 stopping or stopped. Set the lwp's last_resume_kind.
8640 (resume_status_pending_p): Don't check for removed breakpoints.
8641 (need_step_over_p): New.
8642 (start_step_over): New.
8643 (finish_step_over): New.
8644 (linux_resume_one_thread): Always queue a sigstop for resume_stop
8645 requests. Clear the thread's last reported target waitstatus.
8646 Don't use the `suspended' flag. Don't consider pending breakpoints.
8647 (linux_resume): Start a step-over if necessary.
8648 (proceed_one_lwp): New.
8649 (proceed_all_lwps): New.
8650 (unstop_all_lwps): New.
8651 * linux-low.h (struct lwp_info): Rewrite comment for the
8652 `suspended' flag. Add the `stop_pc' field. Delete the
8653 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
8654 Add `'last_resume_kind' and `need_step_over' fields.
8655 * inferiors.c (struct thread_info): Delete, moved elsewhere.
8656 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
8657 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
8658 (set_raw_breakpoint_at): New.
8659 (set_breakpoint_at): Rewrite to use it.
8660 (reinsert_breakpoint_handler): Delete.
8661 (set_reinsert_breakpoint): New.
8662 (reinsert_breakpoint_by_bp): Delete.
8663 (delete_reinsert_breakpoints): New.
8664 (uninsert_breakpoint): Rewrite.
8665 (uninsert_breakpoints_at): New.
8666 (reinsert_breakpoint): Rewrite.
8667 (reinsert_breakpoints_at): New.
8668 (check_breakpoints): Rewrite.
8669 (breakpoint_here): New.
8670 (breakpoint_inserted_here): New.
8671 (check_mem_read): Adjust.
8672 * mem-break.h (breakpoints_supported, breakpoint_here)
8673 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
8674 (reinsert_breakpoint_by_bp): Delete declaration.
8675 (delete_reinsert_breakpoints): Declare.
8676 (reinsert_breakpoint): Delete declaration.
8677 (reinsert_breakpoints_at): Declare.
8678 (uninsert_breakpoint): Delete declaration.
8679 (uninsert_breakpoints_at): Declare.
8680 (check_breakpoints): Adjust prototype.
8681 * server.h: Adjust include order.
8682 (struct thread_info): Declare here. Add a `last_status' field.
8683
30ba68cb
MS
86842010-03-23 Michael Snyder <msnyder@vmware.com>
8685
8686 * server.c (crc32): New function.
8687 (handle_query): Add handling for 'qCRC:' request.
8688
b9a881c2
PA
86892010-03-23 Pedro Alves <pedro@codesourcery.com>
8690
8691 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
8692 lwp had been stopped by a watchpoint.
8693
e92d13d5
PA
86942010-03-16 Pedro Alves <pedro@codesourcery.com>
8695
8696 * server.h (internal_error): Declare.
8697 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
8698 * utils.c (internal_error): New function.
8699
64daa791
AS
87002010-03-15 Andreas Schwab <schwab@redhat.com>
8701
8702 * configure.srv: Fix typo setting srv_regobj.
8703
f52cd8cd
PA
87042010-03-15 Pedro Alves <pedro@codesourcery.com>
8705
8706 * linux-low.c (fetch_register): Avoid passing a non string literal
8707 format to `error'.
8708 (usr_store_inferior_registers): Ditto.
8709
93ae6fdc
PA
87102010-03-14 Pedro Alves <pedro@codesourcery.com>
8711
8712 * linux-low.c (linux_write_memory): Bail out early if peeking
8713 memory failed.
8714
c3adc08c
PA
87152010-03-14 Pedro Alves <pedro@codesourcery.com>
8716
8717 * linux-low.h (struct lwp_info): New fields
8718 `stopped_by_watchpoint' and `stopped_data_address'.
8719 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
8720 here, and cache them in the lwp object.
8721 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
8722 directly.
8723 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
8724 field.
8725 (linux_stopped_by_watchpoint): Rewrite.
8726 (linux_stopped_data_address): Rewrite.
8727
bce522a2
PA
87282010-03-06 Simo Melenius <simo.melenius@iki.fi>
8729
8730 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
8731 switching the current inferior, not before.
8732
90884b2b
L
87332010-03-01 H.J. Lu <hongjiu.lu@intel.com>
8734
8735 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
8736 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
8737 i386-linux.c and amd64-linux.c.
8738 (reg-i386.o): Removed.
8739 (reg-i386.c): Likewise.
8740 (reg-i386-linux.o): Likewise.
8741 (reg-i386-linux.c): Likewise.
8742 (reg-x86-64.o): Likewise.
8743 (reg-x86-64.c): Likewise.
8744 (reg-x86-64-linux.o): Likewise.
8745 (reg-x86-64-linux.c): Likewise.
8746 (i386.o): New.
8747 (i386.c): Likewise.
8748 (i386-linux.o): Likewise.
8749 (i386-linux.c): Likewise.
8750 (amd64.o): Likewise.
8751 (amd64.c): Likewise.
8752 (amd64-linux.o): Likewise.
8753 (amd64-linux.c): Likewise.
8754
8755 * configure.srv (srv_i386_regobj): New.
8756 (srv_i386_linux_regobj): Likewise.
8757 (srv_amd64_regobj): Likewise.
8758 (srv_amd64_linux_regobj): Likewise.
8759 (srv_i386_32bit_xmlfiles): Likewise.
8760 (srv_i386_64bit_xmlfiles): Likewise.
8761 (srv_i386_xmlfiles): Likewise.
8762 (srv_amd64_xmlfiles): Likewise.
8763 (srv_i386_linux_xmlfiles): Likewise.
8764 (srv_amd64_linux_xmlfiles): Likewise.
8765 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
8766 srv_xmlfiles to $srv_i386_xmlfiles.
8767 (i[34567]86-*-mingw32ce*): Likewise.
8768 (i[34567]86-*-mingw*): Likewise.
8769 (i[34567]86-*-nto*): Likewise.
8770 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
8771 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
8772 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
8773 (x86_64-*-linux*): Likewise.
8774
8775 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
8776 (init_registers_amd64_linux): New.
8777 (x86_arch_setup): Replace init_registers_x86_64_linux with
8778 init_registers_amd64_linux.
8779
193f13e6
MK
87802010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
8781
8782 * configure.ac: Check for libdl. If it is not available link against
8783 static libthread_db.
8784 * configure: Regenerate.
8785
85d721b8
PA
87862010-02-22 Pedro Alves <pedro@codesourcery.com>
8787
8788 PR9605
8789
8790 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
8791 handing a read watchpoint.
8792 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
8793
6076632b
DE
87942010-02-12 Doug Evans <dje@google.com>
8795
8796 * linux-low.c (linux_supports_tracefork_flag): Document.
8797 (linux_look_up_symbols): Add comment.
8798
3327ccf7
L
87992010-02-03 H.J. Lu <hongjiu.lu@intel.com>
8800
8801 * regcache.c (supply_register): Clear regcache if buf is NULL.
8802
0718675c 88032010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 8804 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
8805
8806 * inferiors.c (find_inferior): Add function documentation.
8807 (unloaded_dll): Handle the case where the unloaded dll has not
8808 been previously registered in the dll list.
8809
177321bd
DJ
88102010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
8811
8812 * linux-arm-low.c (thumb_breakpoint_len): Delete.
8813 (thumb2_breakpoint): New.
8814 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
8815
2b009048
DJ
88162010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
8817
8818 * linux-low.c (get_stop_pc): Check for SIGTRAP.
8819 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
8820 breakpoints.
8821
3be029c7
PA
88222010-01-21 Pedro Alves <pedro@codesourcery.com>
8823
8824 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
8825
18f5de3b
JK
88262010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
8827
8828 * linux-s390-low.c (s390_collect_ptrace_register)
8829 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
8830
3743bb4f
DE
88312010-01-21 Doug Evans <dje@google.com>
8832
14ce3065
DE
8833 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
8834 (PTRACE_ARG4_TYPE): New macro.
8835 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
8836 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
8837 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
8838 (usr_store_inferior_registers): Ditto.
8839 (linux_read_memory, linux_write_memory): Ditto.
8840 (linux_test_for_tracefork): Ditto.
8841
3743bb4f
DE
8842 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
8843 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
8844
8b315be5
PA
88452010-01-21 Pedro Alves <pedro@codesourcery.com>
8846
8847 * proc-service.c (ps_lgetregs): Don't refetch registers from the
8848 target.
8849
85492558
PA
88502010-01-21 Pedro Alves <pedro@codesourcery.com>
8851
8852 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
8853 prototype to take a regcache. Adjust.
8854
442ea881
PA
88552010-01-20 Pedro Alves <pedro@codesourcery.com>
8856
8857 * regcache.h (struct thread_info): Forward declare.
8858 (struct regcache): New.
8859 (new_register_cache): Adjust prototype.
8860 (get_thread_regcache): Declare.
8861 (free_register_cache): Adjust prototype.
8862 (registers_to_string, registers_from_string): Ditto.
8863 (supply_register, supply_register_by_name, collect_register)
8864 (collect_register_as_string, collect_register_by_name): Ditto.
8865 * regcache.c (struct inferior_regcache_data): Delete.
8866 (get_regcache): Rename to ...
8867 (get_thread_regcache): ... this. Adjust. Switch inferior before
8868 fetching registers.
8869 (regcache_invalidate_one): Adjust.
8870 (regcache_invalidate): Fix prototype.
8871 (new_register_cache): Return the new register cache.
8872 (free_register_cache): Change prototype.
8873 (realloc_register_cache): Adjust.
8874 (registers_to_string): Change prototype to take a regcache. Adjust.
8875 (registers_from_string): Ditto.
8876 (register_data): Ditto.
8877 (supply_register): Ditto.
8878 (supply_register_by_name): Ditto.
8879 (collect_register): Ditto.
8880 (collect_register_as_string): Ditto.
8881 (collect_register_by_name): Ditto.
8882 * server.c (process_serial_event): Adjust.
8883 * linux-low.h (regset_fill_func, regset_store_func): Change
8884 prototype.
8885 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
8886 Change prototype.
8887 * linux-low.c (get_stop_pc): Adjust.
8888 (check_removed_breakpoint): Adjust.
8889 (linux_wait_for_event): Adjust.
8890 (linux_resume_one_lwp): Adjust.
8891 (fetch_register): Add regcache parameter. Adjust.
8892 (usr_store_inferior_registers): Ditto.
8893 (regsets_fetch_inferior_registers): Ditto.
8894 (regsets_store_inferior_registers): Ditto.
8895 (linux_fetch_registers, linux_store_registers): Ditto.
8896 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
8897 regcache. Adjust.
43aaf8b6
PA
8898 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
8899 Ditto.
442ea881
PA
8900 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
8901 prototype to take a regcache.
8902 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
8903 * remote-utils.c (convert_ascii_to_int, outreg)
8904 (prepare_resume_reply): Change prototype to take a regcache.
8905 Adjust.
8906 * target.h (struct target_ops) <fetch_registers, store_registers>:
8907 Change prototype to take a regcache.
8908 (fetch_inferior_registers, store_inferior_registers): Change
8909 prototype to take a regcache. Adjust.
8910 * proc-service.c (ps_lgetregs): Adjust.
8911 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
8912 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
8913 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
8914 take a regcache. Adjust.
8915 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
8916 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
8917 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
8918 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
8919 * linux-cris-low.c (cris_get_pc, cris_set_pc)
8920 (cris_cannot_fetch_register):
8921 (cris_breakpoint_at): Change prototype to take a regcache.
8922 Adjust.
8923 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
8924 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
8925 to take a regcache. Adjust.
8926 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
8927 Adjust.
8928 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
8929 take a regcache. Adjust.
8930 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
8931 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
8932 (m68k_set_pc): Change prototype to take a regcache. Adjust.
8933 * linux-mips-low.c (mips_get_pc):
8934 (mips_set_pc): Change prototype to take a regcache. Adjust.
8935 (mips_reinsert_addr): Adjust.
8936 (mips_collect_register): Change prototype to take a regcache.
8937 Adjust.
8938 (mips_supply_register):
8939 (mips_collect_register_32bit, mips_supply_register_32bit)
8940 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
8941 (mips_store_fpregset): Ditto.
43aaf8b6
PA
8942 * linux-ppc-low.c (ppc_supply_ptrace_register)
8943 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
8944 (parse_spufs_run): Adjust.
8945 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
8946 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
8947 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
8948 take a regcache. Adjust.
8949 * linux-s390-low.c (s390_collect_ptrace_register)
8950 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
8951 (s390_set_pc): Change prototype to take a regcache. Adjust.
8952 (s390_arch_setup): Adjust.
8953 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
8954 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
8955 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
8956 (sparc_fill_gregset, sparc_store_gregset_from_stack)
8957 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
8958 regcache. Adjust.
8959 (sparc_breakpoint_at): Adjust.
8960 * linux-xtensa-low.c (xtensa_fill_gregset):
8961 (xtensa_store_gregset):
8962 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
8963 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
8964 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
8965 prototype to take a regcache. Adjust.
8966 * win32-arm-low.c (arm_fetch_inferior_register)
8967 (arm_store_inferior_register): Change prototype to take a
8968 regcache. Adjust.
8969 * win32-i386-low.c (i386_fetch_inferior_register)
8970 (i386_store_inferior_register): Change prototype to take a
8971 regcache. Adjust.
8972 * win32-low.c (child_fetch_inferior_registers)
8973 (child_store_inferior_registers): Change prototype to take a
8974 regcache. Adjust.
8975 (win32_wait): Adjust.
8976 (win32_fetch_inferior_registers): Change prototype to take a
8977 regcache. Adjust.
8978 (win32_store_inferior_registers): Adjust.
8979 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
8980 store_inferior_register>: Change prototype to take a regcache.
8981
60c3d7b0
DE
89822010-01-20 Doug Evans <dje@google.com>
8983
8984 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
8985 #ifdef.
8986 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 8987 (W_STOPCODE): Provide definition if missing.
60c3d7b0 8988
dc146f7c
VP
89892010-01-13 Vladimir Prus <vladimir@codesourcery.com>
8990
8991 * linux-low.c (linux_core_of_thread): New.
8992 (compare_ints, show_process, list_threads): New.
8993 (linux_qxfer_osdata): Report threads and cores.
8994 (linux_target_op): Register linux_core_of_thread.
8995 * remote-utils.c (prepare_resume_reply): Report the core.
8996 (buffer_xml_printf): Support %d specifier.
8997 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
8998 New.
8999 (handle_query): Handle qXfer:threads. Announce availability
9000 thereof.
9001 * target.h (struct target_ops): New field core_of_thread.
9002
7803799a
UW
90032010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
9004
9005 * Makefile.in (clean): Remove new generated files.
9006 (reg-s390.o, reg-s390.c): Remove rules.
9007 (reg-s390x.o, reg-s390x.c): Likewise.
9008 (s390-linux32.o, s390-linux32.c): Add rules.
9009 (s390-linux64.o, s390-linux64.c): Likewise.
9010 (s390x-linux64.o, s390x-linux64.c): Likewise.
9011 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
9012 * linux-s390-low.c: Include <elf.h>.
9013 (HWCAP_S390_HIGH_GPRS): Define if undefined.
9014 (init_registers_s390): Remove prototype.
9015 (init_registers_s390x): Likewise.
9016 (init_registers_s390_linux32): Add prototype.
9017 (init_registers_s390_linux64): Likewise.
9018 (init_registers_s390x_linux64): Likewise.
9019 (s390_num_regs_3264): New define.
9020 (s390_regmap_3264): New global variable.
9021 (s390_cannot_fetch_register): Remove obsolete check.
9022 (s390_cannot_store_register): Likewise.
9023 (s390_collect_ptrace_register): Handle upper/lower register halves.
9024 (s390_supply_ptrace_register): Likewise.
9025 (s390_fill_gregset): Update to register number changes.
9026 (s390_get_hwcap): New routine.
9027 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
9028 Install appropriate regmap and register set.
9029
6e7ffa39
JB
90302010-01-01 Joel Brobecker <brobecker@adacore.com>
9031
9032 * server.c (gdbserver_version): Update copyright year to 2010.
9033 * gdbreplay.c (gdbreplay_version): Likewise.
9034
957f3f49
DE
90352009-12-28 Doug Evans <dje@google.com>
9036
9037 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
9038 elf/external.h. Include <elf.h> instead but only if necessary.
9039
ca5c370d
PA
90402009-12-28 Pedro Alves <pedro@codesourcery.com>
9041
9042 * linux-low.c (linux_remove_process): Remove `detaching'
9043 parameter. Don't release/detach from thread_db here.
9044 (linux_kill): Release/detach from thread_db here, ...
9045 (linux_detach): ... and here, before actually detaching.
9046 (linux_wait_1): ... and here, when a process exits.
9047 * thread-db.c (any_thread_of): New.
9048 (thread_db_free): Switch the current inferior to a thread of the
9049 passed in process.
9050
4ee62156
DE
90512009-12-21 Doug Evans <dje@google.com>
9052
d90e6a88
DE
9053 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
9054
c5f62d5f
DE
9055 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
9056 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
9057 warning ifndef __NR_tkill. Move setting of errno there too.
9058 Delete unnecessary resetting of errno after syscall.
9059 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
9060
10e86dd7
DE
9061 * configure.ac: Check for dladdr.
9062 * config.in: Regenerate.
9063 * configure: Regenerate.
9064 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
9065 (try_thread_db_load): Update.
9066
4ee62156
DE
9067 * linux-low.c (my_waitpid): Delete unnecessary prototype.
9068
00f515da
DE
90692009-12-18 Doug Evans <dje@google.com>
9070
e9464885
DE
9071 * event-loop.c: Include unistd.h if it exists.
9072
07d4f67e
DE
9073 * linux-low.c (my_waitpid): Move definition away from being in
9074 between linux_tracefork_child/linux_test_for_tracefork.
9075
00f515da
DE
9076 * gdb_proc_service.h (psaddr_t): Fix type.
9077 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
9078 signature to match glibc.
9079
1de1badb
DE
90802009-12-16 Doug Evans <dje@google.com>
9081
9082 * linux-low.c (linux_read_memory): Fix argument to read.
9083
aeeb81d1
PA
90842009-11-26 Pedro Alves <pedro@codesourcery.com>
9085
9086 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
9087 events, don't leave current_inferior pointing at null.
9088
10357975
PA
90892009-11-26 Pedro Alves <pedro@codesourcery.com>
9090
9091 * win32-low.c (LOG): Delete.
9092 (OUTMSG): Output to stderr.
9093 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
9094 on compile time LOG macro.
9095 (win32_wait): Fix debug output.
9096
cf6e3471
PA
90972009-11-26 Pedro Alves <pedro@codesourcery.com>
9098
9099 * win32-low.c (win32_add_one_solib): If the dll name is
9100 "ntdll.dll", prepend the system directory to the dll path.
9101
0c85e18e
MK
91022009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
9103
9104 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
9105
9ac544ce 91062009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 9107 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
9108
9109 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
9110 * configure.ac: Check for __mcoldfire__ and set
9111 gdb_cv_m68k_is_coldfire.
9112 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
9113 reg-cf.o and reg-m68k.o.
9114 * configure: Regenerated.
9115
fd7dd3e6
PA
91162009-11-16 Pedro Alves <pedro@codesourcery.com>
9117
9118 * linux-low.c (linux_remove_process): Add `detaching' parameter.
9119 Pass it to thread_db_free.
9120 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
9121 proper `detaching' argument to linux_remove_process.
9122 * linux-low.h (thread_db_free): Add `detaching' parameter.
9123 * thread-db.c (thread_db_init): Pass false as `detaching' argument
9124 to thread_db_free.
9125 (thread_db_free): Add `detaching' parameter. Only
9126 call td_ta_clear_event if detaching from process.
9127
75aa492e
MK
91282009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
9129
9130 * thread-db.c (thread_db_free): Fix typo.
9131
21e1bee4
PP
91322009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
9133
9134 PR gdb/10838
9135 * thread-db.c (thread_db_free): Call td_ta_clear_event.
9136
8838b45e
NS
91372009-11-03 Nathan Sidwell <nathan@codesourcery.com>
9138
9139 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
9140 with an i686 compiler.
9141 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
9142 needed.
9143 * configure: Rebuilt.
9144
8a35fb51
SL
91452009-10-29 Sandra Loosemore <sandra@codesourcery.com>
9146
9147 PR gdb/10783
9148
9149 * server.c (handle_search_memory_1): Correct read_addr initialization
9150 in loop for searching subsequent chunks.
9151
96f15937
PP
91522009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
9153
9154 * configure.ac: New --with-libthread-db option.
9155 * thread-db.c: Allow direct dependence on libthread_db.
9156 (thread_db_free): Adjust.
9157 * config.in: Regenerate.
9158 * configure: Likewise.
889bf7c5 9159
5f7d1694
PP
91602009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
9161
9162 PR gdb/10757
9163 * thread-db.c (attach_thread): New function.
9164 (maybe_attach_thread): Return success/failure.
9165 (find_new_threads_callback): Adjust.
889bf7c5
PA
9166 (thread_db_find_new_threads): Loop until no new threads.
9167
88e3b899
PA
91682009-10-13 Pedro Alves <pedro@codesourcery.com>
9169
9170 * proc-service.c (ps_lgetregs): Formatting.
9171
cdbfd419
PP
91722009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
9173
9174 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
9175 * configure.ac: Adjust.
9176 * linux-low.h (struct process_info_private): Move members to struct
9177 thread_db.
9178 (thread_db_free, thread_db_handle_monitor_command): New prototype.
9179 * linux-low.c (linux_remove_process): Adjust.
9180 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
9181 * server.c (handle_query): Move code ...
9182 (handle_monitor_command): ... here. New function.
9183 * target.h (struct target_ops): New member.
9184 * thread-db.c (struct thread_db): New.
9185 (libthread_db_search_path): New variable.
9186 (thread_db_create_event, thread_db_enable_reporting)
9187 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
9188 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
9189 (try_thread_db_load_1, dladdr_to_soname): New functions.
9190 (try_thread_db_load, thread_db_load_search): New functions.
9191 (thread_db_init): Search for libthread_db.
9192 (thread_db_free): New function.
9193 (thread_db_handle_monitor_command): Likewise.
9194 * config.in: Regenerate.
9195 * configure: Regenerate.
889bf7c5 9196
4168d2d6
UW
91972009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
9198
9199 * spu-low.c (spu_kill): Wait for inferior to terminate.
9200 Call clear_inferiors.
9201 (spu_detach): Call clear_inferiors.
9202
81ecdfbb
RW
92032009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9204
9205 * aclocal.m4: Regenerate.
9206 * config.in: Likewise.
9207 * configure: Likewise.
9208
0b9ff2c0
UW
92092009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9210
9211 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
9212 (parse_spufs_run): New function.
9213 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
9214 (ppc_breakpoint_at): Handle SPU breakpoints.
9215
efcbbd14
UW
92162009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9217
9218 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
9219 (SPUFS_MAGIC): Define.
9220 (spu_enumerate_spu_ids): New function.
9221 (linux_qxfer_spu): New function.
9222 (linux_target_ops): Install linux_qxfer_spu.
9223
f4d9bade
UW
92242009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9225
9226 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
9227 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
9228 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
9229 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
9230 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
9231 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
9232 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
9233 (init_registers_powerpc_cell32l): Add prototype.
9234 (init_registers_powerpc_cell64l): Likewise.
9235 (ppc_arch_setup): Detect Cell/B.E. architecture.
9236
96e946ca
RW
92372009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9238
9239 * Makefile.in (datarootdir): New variable.
9240
58d6951d
DJ
92412009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
9242
9243 * linux-low.c (linux_write_memory): Update debugging output.
9244 * Makefile.in (clean): Add new descriptions.
9245 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
9246 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
9247 * configure.srv: Add new files for arm*-*-linux*.
9248 * linux-arm-low.c: Add new declarations.
9249 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
9250 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
9251 (HWCAP_VFPv3D16): New.
9252 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
9253 instead of __IWMMXT__.
9254 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
9255 (arm_arch_setup): New.
9256 (target_regsets): Remove #ifdef. Add VFP regset.
9257 (the_low_target): Use arm_arch_setup.
9258
12b42a12
DJ
92592009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
9260
9261 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
9262 the main thread again.
9263
ac8c974e
AR
92642009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
9265
9266 Adding Neutrino gdbserver.
9267 * configure: Regenerated.
9268 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
9269 * configure.srv (i[34567]86-*-nto*): New target.
9270 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
9271 * remote-utils.c [__QNX__]: Include sys/iomgr.h
9272 (nto_comctrl) [__QNX__]: New function.
9273 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
9274
4424e0c3 92752009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
9276
9277 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
9278 srv_tgtobj.
9279
912cf4ba
PA
92802009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
9281 Pedro Alves <pedro@codesourcery.com>
9282
9283 * win32-i386-low.c (i386_get_thread_context): Handle systems that
9284 don't support CONTEXT_EXTENDED_REGISTERS.
9285 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
9286 (the_low_target): Install them.
9287 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
9288 failing with ERROR_PIPE_NOT_CONNECTED.
9289
aa5ca48f
DE
92902009-06-30 Doug Evans <dje@google.com>
9291 Pierre Muller <muller@ics.u-strasbg.fr>
9292
9293 Add h/w watchpoint support to x86-linux, win32-i386.
9294 * Makefile.in (SFILES): Add i386-low.c
9295 (i386_low_h): Define.
9296 (i386-low.o): Add dependencies.
9297 (linux-x86-low.o): Add i386-low.h dependency.
9298 (win32-i386-low.o): Ditto.
9299 * i386-low.c: New file.
9300 * i386-low.h: New file.
9301 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
9302 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
9303 * linux-low.c (linux_add_process): Initialize arch_private.
9304 (linux_remove_process): Free arch_private.
9305 (add_lwp): Initialize arch_private.
9306 (delete_lwp): Free arch_private.
9307 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
9308 provided.
9309 * linux-low.h (process_info_private): New member arch_private.
9310 (lwp_info): New member arch_private.
9311 (linux_target_ops): New members new_process, new_thread,
9312 prepare_to_resume.
9313 (ptid_of): New macro.
9314 * linux-x86-low.c: Include stddef.h, i386-low.h.
9315 (arch_process_info): New struct.
9316 (arch_lwp_info): New struct.
9317 (x86_linux_dr_get, x86_linux_dr_set): New functions.
9318 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
9319 (i386_dr_low_get_status): New function.
9320 (x86_insert_point, x86_remove_point): New functions.
9321 (x86_stopped_by_watchpoint): New function.
9322 (x86_stopped_data_address): New function.
9323 (x86_linux_new_process, x86_linux_new_thread): New functions.
9324 (x86_linux_prepare_to_resume): New function.
9325 (the_low_target): Add entries for insert_point, remove_point,
9326 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
9327 prepare_to_resume.
9328 * server.c (debug_hw_points): New global.
9329 (monitor_show_help): Document set debug-hw-points.
9330 (handle_query): Process "set debug-hw-points".
9331 * server.h (debug_hw_points): Declare.
9332 (paddress): Declare.
9333 * utils.c (NUMCELLS, CELLSIZE): New macros.
9334 (get_sell, xsnprintf, paddress): New functions.
9335 * win32-arm-low.c (the_low_target): Add entries for insert_point,
9336 remove_point, stopped_by_watchpoint, stopped_data_address.
9337 * win32-i386-low.c: Include i386-low.h.
9338 (debug_reg_state): Replaces dr.
9339 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
9340 (i386_dr_low_get_status): New function.
9341 (i386_insert_point, i386_remove_point): New functions.
9342 (i386_stopped_by_watchpoint): New function.
9343 (i386_stopped_data_address): New function.
9344 (i386_initial_stuff): Update.
9345 (get_thread_context,set_thread_context,i386_thread_added): Update.
9346 (the_low_target): Add entries for insert_point,
9347 remove_point, stopped_by_watchpoint, stopped_data_address.
9348 * win32-low.c (win32_insert_watchpoint): New function.
9349 (win32_remove_watchpoint): New function.
9350 (win32_stopped_by_watchpoint): New function.
9351 (win32_stopped_data_address): New function.
9352 (win32_target_ops): Add entries for insert_watchpoint,
9353 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
9354 * win32-low.h (win32_target_ops): New members insert_point,
9355 remove_point, stopped_by_watchpoint, stopped_data_address.
9356
d993e290
PA
93572009-06-25 Pedro Alves <pedro@codesourcery.com>
9358
9359 * server.c (process_serial_event): Re-return unsupported, not
9360 error, if the type isn't recognized. Re-allow supporting only
9361 insert or remove packets. Also call require_running for
9362 breakpoints. Add missing break statement to default case. Tidy.
9363 * target.h (struct target_ops): Rename insert_watchpoint to
9364 insert_point, and remove_watchpoint to remove_point.
9365
9366 * linux-low.h (struct linux_target_ops): Likewise.
9367 * linux-low.c (linux_insert_watchpoint): Rename to ...
9368 (linux_insert_point): ... this. Adjust.
9369 (linux_remove_watchpoint): Rename to ...
9370 (linux_remove_point): ... this. Adjust.
9371 (linux_target_ops): Adjust.
9372 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
9373 (cris_insert_point): ... this.
9374 (cris_remove_watchpoint): Rename to ...
9375 (cris_remove_point): ... this.
9376 (the_low_target): Adjust.
9377
0f54c268
PM
93782009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
9379
9380 * server.c (handle_v_kill): Pass signal_pid to
9381 kill_inferior if multi_process is zero.
9382
c6314022
AR
93832009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
9384
9385 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
9386 * target.h (target_ops): Comment for *_watchpoint to make it clear
9387 the functions can get types '0' and '1'.
9388
4463ce24
AR
93892009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
9390
9391 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
9392 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
9393 * regcache.c (get_regcache): Likewise.
9394 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
9395 * win32-low.c (child_fetch_inferior_registers): Remove check for
9396 regno 0.
9397
cf8fd78b
PA
93982009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
9399 Pedro Alves <pedro@codesourcery.com>
9400
9401 * target.h (struct target_ops) <supports_multi_process>: New
9402 callback.
9403 (target_supports_multi_process): New.
9404 * server.c (handle_query): Even if GDB reports support, only
9405 enable multi-process if the target also supports it. Report
9406 multi-process support only if the target backend supports it.
9407 * linux-low.c (linux_supports_multi_process): New function.
9408 (linux_target_ops): Install it as target_supports_multi_process
9409 callback.
9410
47c0c975
DE
94112009-05-24 Doug Evans <dje@google.com>
9412
e09875d4
DE
9413 Global renaming of find_thread_pid to find_thread_ptid.
9414 * server.h (find_thread_ptid): Renamed from find_thread_pid.
9415 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
9416 All callers updated.
9417
e27d73f6
DE
9418 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
9419 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
9420 directly.
9421
47c0c975
DE
9422 * linux-low.c (get_stop_pc): Print pc if debug_threads.
9423 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
9424 (linux_resume_one_lwp): Ditto.
9425
2acc282a
DE
94262009-05-23 Doug Evans <dje@google.com>
9427
9428 * linux-low.c (linux_resume_one_lwp): Change type of first arg
9429 from struct inferior_list_entry * to struct lwp_info *.
9430 All callers updated.
9431
9f1036c1
DE
94322009-05-13 Doug Evans <dje@google.com>
9433
9434 * linux-x86-low.c: Don't include assert.h.
9435 (x86_siginfo_fixup): Use fatal, not assert.
9436 (x86_arch_setup): Fix comment.
9437
d0722149
DE
94382009-05-12 Doug Evans <dje@google.com>
9439
9440 Biarch support for i386/amd64 gdbserver.
9441 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
9442 Add linux-x86-low.c.
9443 (linux-i386-low.o, linux-x86-64-low.o): Delete.
9444 (linux-x86-low.o): Add.
9445 * linux-x86-64-low.c: Delete.
9446 * linux-i386-low.c: Delete.
9447 * linux-x86-low.c: New file.
9448 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
9449 linux-x86-low.o.
9450 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
9451 linux-x86-low.o.
9452 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
9453 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
9454 (linux_child_pid_to_exec_file): New function.
9455 (elf_64_header_p, elf_64_file_p): New functions.
9456 (siginfo_fixup): New function.
9457 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
9458 give target a chance to convert layout.
9459 * linux-low.h (linux_target_ops): New member siginfo_fixup.
9460 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
9461
fdeb2a12
DE
94622009-05-07 Doug Evans <dje@google.com>
9463
9464 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
9465 (regsets_store_inferior_registers): Ditto.
9466
a6dbe5df
PA
94672009-05-06 Pedro Alves <pedro@codesourcery.com>
9468
9469 PR server/10048
9470
9471 * linux-low.c (must_set_ptrace_flags): Delete.
9472 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
9473 of the global.
9474 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
9475 `lwp->must_set_ptrace_flags' instead.
ba42693b 9476 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
9477 (linux_wait_1): ... not here.
9478
5091eb23
DE
94792009-04-30 Doug Evans <dje@google.com>
9480
9f767825
DE
9481 * inferiors.c (started_inferior_callback): New function.
9482 (attached_inferior_callback): New function.
9483 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
9484 * server.c (print_started_pid, print_attached_pid): New functions.
9485 (detach_or_kill_for_exit): New function.
9486 (main): Call it instead of for_each_inferior (kill_inferior_callback).
9487 * server.h (have_started_inferiors_p): Declare.
9488 (have_attached_inferiors_p): Declare.
9489
5091eb23
DE
9490 * inferiors.c (remove_process): Fix memory leak, free process.
9491 * linux-low.c (linux_remove_process): New function.
9492 (linux_kill): Call it instead of remove_process.
9493 (linux_detach, linux_wait_1): Ditto.
9494
155c8968
PA
94952009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
9496
9497 * configure.srv: Add x86 Windows CE target.
9498
7fe519cb
UW
94992009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
9500
9501 * inferiors.c (get_thread_process): Make global.
9502 * server.h (get_thread_process): Add prototype.
9503 * thread-db.c (find_one_thread): Use get_thread_process
9504 instead of current_process.
9505 (thread_db_get_tls_address): Do not crash if called when
9506 thread layer is not yet initialized.
9507
5472f405
UW
95082009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
9509
9510 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
9511 * spu-low.c (current_tid): Rename to ...
9512 (current_ptid): ... this.
9513 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
9514 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
9515 ptid_get_lwp (current_ptid) instead of current_tid.
9516 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
9517 instead of current_tid. Use find_process_pid to verify pid
9518 argument is valid. Pass proper argument to remove_process.
9519 (spu_thread_alive): Compare current_ptid instead of current_tid.
9520 (spu_resume): Likewise.
9521
55ac2b99
PA
95222009-04-02 Pedro Alves <pedro@codesourcery.com>
9523
9524 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
9525 variable.
9526
95954743
PA
95272009-04-01 Pedro Alves <pedro@codesourcery.com>
9528
9529 Implement the multiprocess extensions, and add linux multiprocess
9530 support.
9531
9532 * server.h (ULONGEST): Declare.
9533 (struct ptid, ptid_t): New.
9534 (minus_one_ptid, null_ptid): Declare.
9535 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
9536 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
9537 (struct inferior_list_entry): Change `id' type from unsigned from
9538 to ptid_t.
9539 (struct sym_cache, struct breakpoint, struct
9540 process_info_private): Forward declare.
9541 (struct process_info): Declare.
9542 (current_process): Declare.
9543 (all_processes): Declare.
9544 (initialize_inferiors): Declare.
9545 (add_thread): Adjust to use ptid_t.
9546 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
9547 (add_process, remove_process, find_thread_pid): Declare.
9548 (find_inferior_id): Adjust to use ptid_t.
9549 (cont_thread, general_thread, step_thread): Change type to ptid_t.
9550 (multi_process): Declare.
9551 (push_event): Adjust to use ptid_t.
9552 (read_ptid, write_ptid): Declare.
9553 (prepare_resume_reply): Adjust to use ptid_t.
9554 (clear_symbol_cache): Declare.
9555 * inferiors.c (all_processes): New.
9556 (null_ptid, minus_one_ptid): New.
9557 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
9558 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
9559 (add_thread): Change unsigned long to ptid. Remove gdb_id
9560 parameter. Adjust.
9561 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
9562 (gdb_id_to_thread): Rename to ...
9563 (find_thread_pid): ... this. Change unsigned long to ptid.
9564 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
9565 (loaded_dll, pull_pid_from_list): Adjust.
9566 (add_process, remove_process, find_process_pid)
9567 (get_thread_process, current_process, initialize_inferiors): New.
9568 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
9569 (struct target_waitstatus) <related_pid>: Ditto.
9570 (struct target_ops) <kill, detach>: Add `pid' argument. Change
9571 return type to int.
9572 (struct target_ops) <join>: Add `pid' argument.
9573 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
9574 (struct target_ops) <wait>: Add `ptid' field. Change return type
9575 to ptid.
9576 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
9577 (mywait): Add `ptid' argument. Change return type to ptid_t.
9578 (target_pid_to_str): Declare.
9579 * target.c (set_desired_inferior): Adjust to use ptids.
9580 (mywait): Add new `ptid' argument. Adjust.
9581 (target_pid_to_str): New.
9582 * mem-break.h (free_all_breakpoints): Declare.
9583 * mem-break.c (breakpoints): Delelete.
9584 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
9585 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
9586 to use per-process breakpoint list.
9587 (free_all_breakpoints): New.
9588 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
9589 (symbol_cache, all_symbols_looked_up): Delete.
9590 (hexchars): New.
9591 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
9592 read_ptid): New.
9593 (prepare_resume_reply): Change ptid argument's type from unsigned
9594 long to ptid_t. Adjust. Implement W;process and X;process.
9595 (free_sym_cache, clear_symbol_cache): New.
9596 (look_up_one_symbol): Adjust to per-process symbol cache. *
9597 * server.c (cont_thread, general_thread, step_thread): Change type
9598 to ptid_t.
9599 (attached): Delete.
9600 (multi_process): New.
9601 (last_ptid): Change type to ptid_t.
9602 (struct vstop_notif) <ptid>: Change type to ptid_t.
9603 (queue_stop_reply, push_event): Change `ptid' argument's type to
9604 ptid_t.
9605 (discard_queued_stop_replies): Add `pid' argument.
9606 (start_inferior): Adjust to use ptids. Adjust to mywait interface
9607 changes. Don't reference the `attached' global.
9608 (attach_inferior): Adjust to mywait interface changes.
9609 (handle_query): Adjust to use ptids. Parse GDB's qSupported
9610 features. Handle and report "multiprocess+". Handle
9611 "qAttached:PID".
9612 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
9613 changes.
9614 (handle_v_kill): New.
9615 (handle_v_stopped): Adjust to use target_pid_to_str.
9616 (handle_v_requests): Allow multiple attaches and runs when
9617 multiprocess extensions are in effect. Handle "vKill".
9618 (myresume): Adjust to use ptids.
9619 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
9620 (handle_status): Adjust to discard_queued_stop_replies interface
9621 change.
9622 (first_thread_of, kill_inferior_callback)
9623 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
9624 (main): Call initialize_inferiors. Adjust to use ptids, killing
9625 and detaching from all inferiors. Handle multiprocess packet
9626 variants.
9627 * linux-low.h: Include gdb_proc_service.h.
9628 (struct process_info_private): New.
9629 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
9630 <lwpid_of>: Use ptid_get_lwp.
9631 (get_lwp_thread): Adjust.
9632 (struct lwp_info): Add `dead' member.
9633 (find_lwp_pid): Declare.
9634 * linux-low.c (thread_db_active): Delete.
9635 (new_inferior): Adjust comment.
9636 (inferior_pid): Delete.
9637 (linux_add_process): New.
9638 (handle_extended_wait): Adjust.
9639 (add_lwp): Change unsigned long to ptid.
9640 (linux_create_inferior): Add process to processes table. Adjust
9641 to use ptids. Don't set new_inferior here.
9642 (linux_attach_lwp): Rename to ...
9643 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
9644 it. Adjust to use ptids.
9645 (linux_attach_lwp): New.
9646 (linux_attach): Add process to processes table. Don't set
9647 new_inferior here.
9648 (struct counter): New.
9649 (second_thread_of_pid_p, last_thread_of_process_p): New.
9650 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
9651 multiple processes.
9652 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
9653 processes. Remove process from process table.
9654 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
9655 to multiple processes.
9656 (any_thread_of): New.
9657 (linux_detach): Add `pid' argument, and handle it. Remove process
9658 from processes table.
9659 (linux_join): Add `pid' argument. Handle it.
9660 (linux_thread_alive): Change unsighed long argument to ptid_t.
9661 Consider dead lwps as not being alive.
9662 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
9663 threads we're not interested in.
9664 (same_lwp, find_lwp_pid): New.
9665 (linux_wait_for_lwp): Change `pid' argument's type from int to
9666 ptid_t. Adjust.
9667 (linux_wait_for_event): Rename to ...
9668 (linux_wait_for_event_1): ... this. Change `pid' argument's type
9669 from int to ptid_t. Adjust.
9670 (linux_wait_for_event): New.
9671 (linux_wait_1): Add `ptid' argument. Change return type to
9672 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
9673 that exit from the process table.
9674 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
9675 Adjust.
9676 (mark_lwp_dead): New.
9677 (wait_for_sigstop): Adjust to use ptids. If a process exits while
9678 stopping all threads, mark its main lwp as dead.
9679 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
9680 ptids.
9681 (fetch_register, usr_store_inferior_registers)
9682 (regsets_fetch_inferior_registers)
9683 (regsets_store_inferior_registers, linux_read_memory)
9684 (linux_write_memory): Inline `inferior_pid'.
9685 (linux_look_up_symbols): Adjust to use per-process
9686 `thread_db_active'.
9687 (linux_request_interrupt): Adjust to use ptids.
9688 (linux_read_auxv): Inline `inferior_pid'.
9689 (initialize_low): Don't reference thread_db_active.
9690 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
9691 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
9692 (ps_getpid): Return the pid of the current inferior.
9693 * thread-db.c (proc_handle, thread_agent): Delete.
9694 (thread_db_create_event, thread_db_enable_reporting): Adjust to
9695 per-process data.
9696 (find_one_thread): Change argument type to ptid_t. Adjust to
9697 per-process data.
9698 (maybe_attach_thread): Adjust to per-process data and ptids.
9699 (thread_db_find_new_threads): Ditto.
9700 (thread_db_init): Ditto.
9701 * spu-low.c (spu_create_inferior, spu_attach): Add process to
9702 processes table. Adjust to use ptids.
9703 (spu_kill, spu_detach): Adjust interface. Remove process from
9704 processes table.
9705 (spu_join, spu_thread_alive): Adjust interface.
9706 (spu_wait): Adjust interface. Remove process from processes
9707 table. Adjust to use ptids.
9708 * win32-low.c (current_inferior_tid): Delete.
9709 (current_inferior_ptid): New.
9710 (debug_event_ptid): New.
9711 (thread_rec): Take a ptid. Adjust.
9712 (child_add_thread): Add `pid' argument. Adjust to use ptids.
9713 (child_delete_thread): Ditto.
9714 (do_initial_child_stuff): Add `attached' argument. Add process to
9715 processes table.
9716 (child_fetch_inferior_registers, child_store_inferior_registers):
9717 Adjust.
9718 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
9719 (win32_attach): Pass 1 to do_initial_child_stuff.
9720 (win32_kill): Adjust interface. Remove process from processes
9721 table.
9722 (win32_detach): Ditto.
9723 (win32_join): Adjust interface.
9724 (win32_thread_alive): Take a ptid.
9725 (win32_resume): Adjust to use ptids.
9726 (get_child_debug_event): Ditto.
9727 (win32_wait): Adjust interface. Remove exiting process from
9728 processes table.
9729
bd99dc85
PA
97302009-04-01 Pedro Alves <pedro@codesourcery.com>
9731
9732 Non-stop mode support.
9733
9734 * server.h (non_stop): Declare.
9735 (gdb_client_data, handler_func): Declare.
9736 (delete_file_handler, add_file_handler, start_event_loop):
9737 Declare.
9738 (handle_serial_event, handle_target_event, push_event)
9739 (putpkt_notif): Declare.
9740 * target.h (enum resume_kind): New.
9741 (struct thread_resume): Replace `step' field by `kind' field.
9742 (TARGET_WNOHANG): Define.
9743 (struct target_ops) <wait>: Add `options' argument.
9744 <supports_non_stop, async, start_non_stop>: New fields.
9745 (target_supports_non_stop, target_async): New.
9746 (start_non_stop): Declare.
9747 (mywait): Add `options' argument.
9748 * target.c (mywait): Add `options' argument. Print child exit
9749 notifications here.
9750 (start_non_stop): New.
9751 * server.c (non_stop, own_buf, mem_buf): New globals.
9752 (struct vstop_notif): New.
9753 (notif_queue): New global.
9754 (queue_stop_reply, push_event, discard_queued_stop_replies)
9755 (send_next_stop_reply): New.
9756 (start_inferior): Adjust to use resume_kind. Adjust to mywait
9757 interface changes.
9758 (attach_inferior): In non-stop mode, don't wait for the target
9759 here.
9760 (handle_general_set): Handle QNonStop.
9761 (handle_query): When handling qC, return the current general
9762 thread, instead of the first thread of the list.
9763 (handle_query): If the backend supports non-stop mode, include
9764 QNonStop+ in the qSupported query response.
9765 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
9766 and non-stop mode.
9767 (handle_v_attach, handle_v_run): Handle non-stop mode.
9768 (handle_v_stopped): New.
9769 (handle_v_requests): Report support for vCont;t. Handle vStopped.
9770 (myresume): Adjust to use resume_kind. Handle non-stop.
9771 (queue_stop_reply_callback): New.
9772 (handle_status): Handle non-stop mode.
9773 (main): Clear non_stop flag on reconnection. Use the event-loop.
9774 Refactor serial protocol handling from here ...
9775 (process_serial_event): ... to this new function. When GDB
9776 selects any thread, select one here. In non-stop mode, wait until
9777 GDB acks all pending events before exiting.
9778 (handle_serial_event, handle_target_event): New.
9779 * remote-utils.c (remote_open): Install remote_desc in the event
9780 loop.
9781 (remote_close): Remove remote_desc from the event loop.
9782 (putpkt_binary): Rename to...
9783 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
9784 (putpkt_binary): New as wrapper around putpkt_binary_1.
9785 (putpkt_notif): New.
9786 (prepare_resume_reply): In non-stop mode, don't change the
9787 general_thread.
9788 * event-loop.c: New.
9789 * Makefile.in (OBJ): Add event-loop.o.
9790 (event-loop.o): New rule.
9791
9792 * linux-low.h (pid_of): Moved here.
9793 (lwpid_of): New.
9794 (get_lwp_thread): Use lwpid_of.
9795 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
9796 * linux-low.c (pid_of): Delete.
9797 (inferior_pid): Use lwpid_of.
9798 (linux_event_pipe): New.
9799 (target_is_async_p): New.
9800 (delete_lwp): New.
9801 (handle_extended_wait): Use lwpid_of.
9802 (add_lwp): Don't set lwpid field.
9803 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
9804 (linux_kill_one_lwp): If killing a running lwp, stop it first.
9805 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
9806 (linux_detach_one_lwp): If detaching from a running lwp, stop it
9807 first. Adjust to linux_wait_for_event interface changes. Use
9808 lwpid_of.
9809 (linux_detach): Don't delete the main lwp here.
9810 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
9811 (status_pending_p): Don't consider explicitly suspended lwps.
9812 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
9813 pointer. Add OPTIONS argument. Change return type to int. Use
9814 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
9815 (linux_wait_for_event): Take an integer pid instead of a lwp_info
9816 pointer. Add status pointer argument. Return a pid instead of a
9817 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
9818 changes. In non-stop mode, don't switch to a random thread.
9819 (linux_wait): Rename to...
9820 (linux_wait_1): ... this. Add target_options argument, and handle
9821 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
9822 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
9823 clean exit and signal exit code. Don't stop all threads in
9824 non-stop mode. In all-stop mode, only stop all threads when
9825 reporting a stop to GDB. Handle explicit thread stop requests.
9826 (async_file_flush, async_file_mark): New.
9827 (linux_wait): New.
9828 (send_sigstop): Use lwpid_of.
9829 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
9830 interface changes. In non-stop mode, don't switch to a random
9831 thread.
9832 (linux_resume_one_lwp): Use lwpid_of.
9833 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
9834 (linux_resume_one_thread): ... this. Handle resume_stop. In
9835 non-stop mode, don't look for pending flag in all threads.
9836 (resume_status_pending_p): Don't consider explicitly suspended
9837 threads.
9838 (my_waitpid): Reimplement. Emulate __WALL.
9839 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
9840 Use lwpid_of.
9841 (sigchld_handler, linux_supports_non_stop, linux_async)
9842 (linux_start_non_stop): New.
9843 (linux_target_ops): Register linux_supports_non_stop, linux_async
9844 and linux_start_non_stop.
9845 (initialize_low): Install SIGCHLD handler.
9846 * thread-db.c (thread_db_create_event, find_one_thread)
9847 (thread_db_get_tls_address): Use lwpid_of.
9848 * win32-low.c (win32_detach): Adjust to use resume_kind.
9849 (win32_wait): Add `options' argument.
9850 * spu-low.c (spu_resume): Adjust to use resume_kind.
9851 (spu_wait): Add `options' argument.
9852
5b1c542e
PA
98532009-04-01 Pedro Alves <pedro@codesourcery.com>
9854
9855 Decouple target code from remote protocol.
9856
9857 * target.h (enum target_waitkind): New.
9858 (struct target_waitstatus): New.
9859 (struct target_ops) <wait>: Return an unsigned long. Take a
9860 target_waitstatus pointer instead of a char pointer.
9861 (mywait): Likewise.
9862 * target.c (mywait): Change prototype to return an unsigned long.
9863 Take a target_waitstatus pointer instead of a char pointer. Adjust.
9864 * server.h (thread_from_wait, old_thread_from_wait): Delete
9865 declarations.
9866 (prepare_resume_reply): Change prototype to take a
9867 target_waitstatus.
9868 * server.c (thread_from_wait, old_thread_from_wait): Delete.
9869 (last_status, last_ptid): New.
9870 (start_inferior): Remove "statusptr" argument. Adjust. Return a
9871 pid instead of a signal.
9872 (attach_inferior): Remove "status" and "signal" parameters.
9873 Adjust.
9874 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
9875 not as an address.
9876 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
9877 (handle_v_requests, myresume): Remove "status" and "signal"
9878 parameters. Adjust.
9879 (handle_status): New.
9880 (main): Delete local `status'. Adjust.
9881 * remote-utils.c: Include target.h.
9882 (prepare_resume_reply): Change prototype to take a
9883 target_waitstatus. Adjust.
9884
9885 * linux-low.c (linux_wait): Adjust to new target_ops->wait
9886 interface.
9887 * spu-low.c (spu_wait): Adjust.
9888 * win32-low.c (enum target_waitkind, struct target_waitstatus):
9889 Delete.
9890 (win32_wait): Adjust.
9891
2bd7c093
PA
98922009-04-01 Pedro Alves <pedro@codesourcery.com>
9893
9894 * target.h (struct thread_resume): Delete leave_stopped member.
9895 (struct target_ops): Add a `n' argument to the `resume' callback.
9896 * server.c (start_inferior): Adjust.
9897 (handle_v_cont, myresume): Adjust.
9898 * linux-low.c (check_removed_breakpoint): Adjust to resume
9899 interface change, and to removed leave_stopped field.
9900 (resume_ptr): Delete.
9901 (struct thread_resume_array): New.
9902 (linux_set_resume_request): Add new `arg' parameter. Adjust to
9903 resume interface change.
9904 (linux_continue_one_thread, linux_queue_one_thread)
9905 (resume_status_pending_p): Check if the resume field is NULL
9906 instead of checking the leave_stopped member.
9907 (linux_resume): Adjust to the target resume interface change.
9908 * spu-low.c (spu_resume): Adjust to the target resume interface
9909 change.
9910 * win32-low.c (win32_detach, win32_resume): Ditto.
9911
c35fafde
PA
99122009-04-01 Pedro Alves <pedro@codesourcery.com>
9913
9914 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
9915 flag.
9916 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
9917 pending.
9918 (linux_continue_one_thread): Only preserve the stepping flag if
9919 there's a pending breakpoint.
9920
0a59d50b
PA
99212009-03-31 Pedro Alves <pedro@codesourcery.com>
9922
9923 * server.c (main): After the inferior having exited, call
9924 remote_close before exiting gdbserver.
9925
f04c6d38
TJB
99262009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
9927
9928 Fix size of FPSCR in Power 7 processors.
9929 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
9930 (PPC_FEATURE_HAS_DFP): New #define.
9931 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
9932 size of the FPSCR.
9933
78e5cee6
PA
99342009-03-23 Pedro Alves <pedro@codesourcery.com>
9935
9936 * server.c (handle_query) Whitespace and formatting.
9937
1b3f6016
PA
99382009-03-22 Pedro Alves <pedro@codesourcery.com>
9939
9940 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
9941 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
9942 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
9943 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
9944 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
9945 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
9946 Makefile.in, configure.ac: Fix whitespace throughout.
9947 * configure: Regenerate.
9948
a07b2135
PA
99492009-03-22 Pedro Alves <pedro@codesourcery.com>
9950
9951 * inferiors.c (find_inferior): Make it safe for the callback
9952 function to delete the currently iterated inferior.
9953
67cc2626
PA
99542009-03-22 Pedro Alves <pedro@codesourcery.com>
9955
9956 * Makefile.in (linuw_low_h): Move higher.
9957 (thread-db.o): Depend on $(linux_low_h).
9958
54a0b537
PA
99592009-03-17 Pedro Alves <pedro@codesourcery.com>
9960
9961 Rename "process" to "lwp" throughout.
9962
9963 * linux-low.c (all_processes): Rename to...
9964 (all_lwps): ... this.
9965 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
9966 (add_process): Rename to ...
9967 (add_lwp): ... this. Adjust.
9968 (linux_create_inferior): Adjust.
9969 (linux_attach_lwp): Adjust.
9970 (linux_attach): Adjust.
9971 (linux_kill_one_process): Rename to ...
9972 (linux_kill_one_lwp): ... this. Adjust.
9973 (linux_kill): Adjust.
9974 (linux_detach_one_process): Rename to ...
9975 (linux_detach_one_lwp): ... this. Adjust.
9976 (linux_detach): Adjust.
9977 (check_removed_breakpoint): Adjust.
9978 (status_pending_p): Adjust.
9979 (linux_wait_for_process): Rename to ...
9980 (linux_wait_for_lwp): ... this. Adjust.
9981 (linux_wait_for_event): Adjust.
9982 (send_sigstop): Adjust.
9983 (wait_for_sigstop): Adjust.
9984 (stop_all_processes): Rename to ...
9985 (stop_all_lwps): ... this.
9986 (linux_resume_one_process): Rename to ...
9987 (linux_resume_one_lwp): ... this. Adjust.
9988 (linux_set_resume_request, linux_continue_one_thread)
9989 (linux_queue_one_thread, resume_status_pending_p)
9990 (usr_store_inferior_registers, regsets_store_inferior_registers)
9991 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
9992 Adjust.
9993 * linux-low.h (get_process): Rename to ...
9994 (get_lwp): ... this. Adjust.
9995 (get_thread_process): Rename to ...
9996 (get_thread_lwp): ... this. Adjust.
9997 (get_process_thread): Rename to ...
9998 (get_lwp_thread): ... this. Adjust.
9999 (struct process_info): Rename to ...
10000 (struct lwp_info): ... this.
10001 (all_processes): Rename to ...
10002 (all_lwps): ... this.
10003 * proc-service.c (ps_lgetregs): Adjust.
10004 * thread-db.c (thread_db_create_event, find_one_thread)
10005 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
10006
0b16c5cf
PA
100072009-03-14 Pedro Alves <pedro@codesourcery.com>
10008
10009 * server.c (handle_query): Handle "qAttached".
10010
32de4b9d
NS
100112009-03-13 Nathan Sidwell <nathan@codesourcery.com>
10012
10013 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
10014 GPLv3, update license URL.
10015
2aecd87f
DE
100162009-03-01 Doug Evans <dje@google.com>
10017
93efd302 10018 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
10019 (server_h): Add gdb_signals.h.
10020 (signals.o): Update.
10021 * server.h (target_signal_from_host,target_signal_to_host_p)
10022 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
10023
86b1f9c5
PM
100242009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
10025
10026 * remote-utils.c (getpkt): Also generate remote-debug
10027 information if noack_mode is set.
10028
4aa995e1
PA
100292009-02-06 Pedro Alves <pedro@codesourcery.com>
10030
10031 * server.c (handle_query): Report qXfer:siginfo:read and
10032 qXfer:siginfo:write as supported and handle them.
10033 * target.h (struct target_ops) <qxfer_siginfo>: New field.
10034 * linux-low.c (linux_xfer_siginfo): New.
10035 (linux_target_ops): Set it.
10036
62709adf
PA
100372009-01-26 Pedro Alves <pedro@codesourcery.com>
10038
10039 * server.c (gdbserver_usage): Mention --remote-debug.
10040 (main): Accept '--remote-debug' switch.
10041
aef93bd7
DE
100422009-01-18 Doug Evans <dje@google.com>
10043
10044 * regcache.c (new_register_cache): No need to check result of xcalloc.
10045 * server.c (handle_search_memory): Back out calls to xmalloc,
10046 result is checked and error is returned to user upon failure.
10047 (handle_query): Ditto. Add more checks for result of malloc.
10048 (handle_v_cont): Check result of malloc, report error back to
10049 user upon failure.
10050 (handle_v_run): Ditto. Call freeargv.
10051 * server.h (freeargv): Declare.
10052 * utils.c (freeargv): New fn.
10053
54363045
DE
100542009-01-15 Doug Evans <dje@google.com>
10055
f626972c
DE
10056 * gdbreplay.c (perror_with_name): Make arg const char *.
10057 * server.h (target_signal_to_name): Make return type const char *.
0842e787 10058 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 10059 * utils.c (perror_with_name): Make arg const char *.
54363045 10060
18aae699
PA
100612009-01-14 Pedro Alves <pedro@codesourcery.com>
10062
10063 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
10064 when handling a EXIT_PROCESS_DEBUG_EVENT.
10065
ff703abe
JB
100662009-01-06 Joel Brobecker <brobecker@adacore.com>
10067
10068 * gdbreplay.c (gdbreplay_version): Update copyright year.
10069 * server.c (gdbserver_version): Likewise.
10070
f21cc1a2 100712009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
10072
10073 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 10074 (handle_extended_wait): Improve comment.
0e21c1ec 10075
bca929d3
DE
100762008-12-13 Doug Evans <dje@google.com>
10077
10078 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
10079 * server.h (ATTR_MALLOC): New macro.
10080 (xmalloc,xcalloc,xstrdup): Declare.
10081 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
10082 * inferiors.c: Ditto.
10083 * linux-low.c: Ditto.
10084 * mem-break.c: Ditto.
10085 * regcache.c: Ditto.
10086 * remote-utils.c: Ditto.
10087 * server.c: Ditto.
10088 * target.c: Ditto.
10089 * win32-low.c: Ditto.
10090
97438e3f
DE
100912008-12-12 Doug Evans <dje@google.com>
10092
896c7fbb
DE
10093 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
10094 in debugging printf.
10095
97438e3f
DE
10096 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
10097
e3b886f8
DE
100982008-12-09 Doug Evans <dje@google.com>
10099
10100 * linux-low.h (struct process_info): Delete member tid, unused.
10101 * thread-db.c (find_one_thread): Update.
10102 (maybe_attach_thread): Update.
10103
07e059b5
VP
101042008-12-02 Pedro Alves <pedro@codesourcery.com>
10105
889bf7c5
PA
10106 * target.h (struct target_ops): Add qxfer_osdata member.
10107 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
10108 and dirent.h.
10109 (linux_qxfer_osdata): New functions.
10110 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
10111 callback.
10112 * server.c (handle_query): Handle "qXfer:osdata:read:".
10113 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
10114 (buffer_xml_printf): New functions.
10115 * server.h (struct buffer): New.
10116 (buffer_grow_str, buffer_grow_str0): New macros.
10117 (buffer_grow, buffer_free, buffer_init, buffer_finish)
10118 (buffer_xml_printf): Declare.
07e059b5 10119
4cab47ab
DE
101202008-11-24 Doug Evans <dje@google.com>
10121
10122 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
10123
f142445f
DJ
101242008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
10125
10126 * server.c (handle_v_run): Always use the supplied argument list.
10127
d0107bb6 101282008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 10129
d0107bb6
BW
10130 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
10131 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 10132
2c4ad781
TJB
101332008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
10134
10135 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
10136 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
10137 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
10138 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
10139 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
10140 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
10141 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
10142 XML target descriptions.
10143 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
10144 when inferior is running on an ISA 2.05 or later processor. Add
10145 special case to return offset for full 64-bit slot of FPSCR when
10146 in 32-bits.
10147
dfb64f85
DJ
101482008-11-14 Daniel Gutson <dgutson@codesourcery.com>
10149
10150 * Makefile.in (SFILES, clean): Added sparc64 files.
10151 (reg-sparc64.o, reg-sparc64.c): New.
10152 * configure.srv (sparc*-*-linux*): New configuration.
10153 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
10154 syscall arguments for SPARC.
10155 (regsets_store_inferior_registers): Likewise.
10156 * linux-sparc-low.c: New file.
10157
66b6e1dd
DE
101582008-10-21 Doug Evans <dje@google.com>
10159
10160 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
10161 (READLINE_DIR,READLINE_DEP): Delete.
10162 (INTERNAL_CFLAGS): Update.
10163 (LINTFLAGS): Update.
10164
9b710a42
PA
101652008-10-10 Pedro Alves <pedro@codesourcery.com>
10166
10167 * server.c (handle_v_run): If GDB didn't specify an argv, use the
10168 whole argv from the last run, not just argv[0].
10169
5822d809
PA
101702008-09-08 Pedro Alves <pedro@codesourcery.com>
10171
10172 * regcache.c (new_register_cache): Return NULL if the register
10173 cache size isn't known yet.
10174 (free_register_cache): Avoid dereferencing a NULL regcache.
10175
74aac56f
DJ
101762008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
10177
10178 * configure.srv: Merge MIPS and MIPS64.
10179
400b20f5
MR
101802008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
10181
10182 * Makefile.in (uninstall): Apply $(EXEEXT) too.
10183
677c5bb1
LM
101842008-08-18 Luis Machado <luisgpm@br.ibm.com>
10185
10186 * Makefile.in: Add required vsx dependencies.
10187
10188 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
10189 Declare init_registers_powerpc_vsx32l.
10190 Declare init_registers_powerpc_vsx64l.
10191 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
10192 (ppc_arch_setup): Check for VSX in hwcap.
10193 (ppc_fill_vsxregset): New function.
10194 (ppc_store_vsxregset): New function.
10195 Add new VSX entry in regset_info target_regsets.
10196
10197 * configure.srv: Add new VSX dependencies.
10198
a6f3e723
SL
101992008-08-12 Pedro Alves <pedro@codesourcery.com>
10200
10201 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
10202 (remote_open): Set or clear transport_is_reliable.
10203 (putpkt_binary): Don't expect acks in noack mode.
10204 (getpkt): Don't send ack/nac in noack mode.
10205 * server.c (handle_general_set): Handle QStartNoAckMode.
10206 (handle_query): If connected by tcp pass QStartNoAckMode+ in
10207 qSupported.
10208 (main): Reset noack_mode on every connection.
10209 * server.h (noack_mode): Declare.
10210
a417dc56
RW
102112008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
10212
10213 * Makefile.in (GDBREPLAY_OBS): New variable.
10214 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
10215
3221518c
UW
102162008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
10217 Daniel Jacobowitz <dan@codesourcery.com>
10218
10219 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
10220 (usr_store_inferior_registers): Likewise.
10221 (regsets_store_inferior_registers): Likewise.
10222
ec56be1b
PA
102232008-07-31 Rolf Jansen <rj@surtec.com>
10224 Pedro Alves <pedro@codesourcery.com>
10225
10226 * configure.ac: Check for memmem declaration.
10227 * server.c [HAVE_MALLOC_H]: Include malloc.h.
10228 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
10229 (disable_packet_qfThreadInfo): Unconditionally compile.
10230 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
10231 * configure, config.in: Regenerate.
10232
2fe5e3ff
DE
102332008-07-28 Doug Kwan <dougkwan@google.com>
10234
10235 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
10236 (linux_write_memory): Remove declaration of errno.
10237
836acd6d
UW
102382008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
10239
10240 * linux-low.c (handle_extended_wait): Do not use "status"
10241 variable uninitialized.
10242
aeba519e
PA
102432008-07-07 Pedro Alves <pedro@codesourcery.com>
10244
10245 * server.c (handle_v_attach): Inhibit reporting dll changes.
10246
db42f210
PA
102472008-06-27 Pedro Alves <pedro@codesourcery.com>
10248
10249 * remote-utils.c (prepare_resume_reply): If requested, don't
10250 output "thread:TID" in the T stop reply.
10251
10252 * server.c (disable_packet_vCont, disable_packet_Tthread)
10253 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
10254 (handle_query): If requested, disable support for qC, qfThreadInfo
10255 and qsThreadInfo.
10256 (handle_v_requests): If requested, disable support for vCont.
10257 (gdbserver_show_disableable): New.
10258 (main): Handle --disable-packet and --disable-packet=LIST.
10259
10260 * server.h (disable_packet_vCont, disable_packet_Tthread)
10261 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
10262
8e4c5421
CD
102632008-06-20 Carlos O'Donell <carlos@codesourcery.com>
10264
10265 * server.c (gdbserver_usage): Mention --version.
10266
6e23a804
DJ
102672008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
10268
10269 * Makefile.in (gdbreplay.o): New rule.
10270
90aa6a40
JM
102712008-06-06 Joseph Myers <joseph@codesourcery.com>
10272
10273 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
10274 message, not gdbserver.
10275
c16158bc 102762008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
10277 Nathan Sidwell <nathan@codesourcery.com>
10278 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
10279
10280 * acinclude.m4: Include ../../config/acx.m4.
10281 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
10282 * configure, config.in: Regenerate.
10283 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
10284 * server.c (gdbserver_version): Print PKGVERSION.
10285 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
10286 (main): Adjust gdbserver_usage calls.
10287 * gdbreplay.c (version, host_name): Add declarations.
10288 (gdbreplay_version, gdbreplay_usage): New.
10289 (main): Accept --version and --help options.
10290
aeb75bf5
DJ
102912008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
10292
10293 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
10294 (arm_breakpoint_at): Handle Thumb.
10295 (the_low_target): Add comment.
10296
76b233dd
UW
102972008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
10298
10299 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
10300
08388c79
DE
103012008-05-09 Doug Evans <dje@google.com>
10302
a3c83fae
DE
10303 * server.h (decode_search_memory_packet): Declare.
10304 * remote-utils.c (decode_search_memory_packet): New fn.
10305 * server.c (handle_search_memory_1): New fn.
08388c79
DE
10306 (handle_search_memory): New fn.
10307 (handle_query): Process qSearch:memory packets.
10308
bb9c3d36
UW
103092008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
10310
10311 * regcache.c (registers_length): Remove.
10312 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
10313 full register packet.
10314 * regcache.h (registers_length): Remove prototype.
10315 * server.h (PBUFSIZ): Define to 16384.
10316
7284e1be
UW
103172008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
10318
10319 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
10320 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
10321 powerpc-64l.o, and powerpc-altivec64l.o.
10322 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
10323 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
10324 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
10325 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
10326 rs6000/power-linux.xml, and rs6000/power64-linux.xml
10327 to srv_xmlfiles.
10328
10329 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
10330 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
10331 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
10332 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
10333 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
10334 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
10335 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
10336 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
10337 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
10338 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
10339 (clean): Update.
10340
10341 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
10342 (init_registers_powerpc_32l): ... this new prototype.
10343 (init_registers_powerpc_32): Remove, replace by ...
10344 (init_registers_powerpc_altivec32l): ... this new prototype.
10345 (init_registers_powerpc_e500): Remove, replace by ...
10346 (init_registers_powerpc_e500l): ... this new prototype.
10347 (init_registers_ppc64): Remove, replace by ...
10348 (init_registers_powerpc_64l): ... this new prototype.
10349 (init_registers_powerpc_64): Remove, replace by ...
10350 (init_registers_powerpc_altivec64l): ... this new prototype.
10351 (ppc_num_regs): Set to 73.
10352 (PT_ORIG_R3, PT_TRAP): Define if necessary.
10353 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
10354 (ppc_cannot_store_register): Handle orig_r3 and trap.
10355 (ppc_arch_setup): Update init_registers_... calls.
10356 (ppc_fill_gregset): Handle orig_r3 and trap.
10357
10358 * inferiors.c (clear_inferiors): Reset current_inferior.
10359
fdc59709
PB
103602008-04-23 Paolo Bonzini <bonzini@gnu.org>
10361
889bf7c5
PA
10362 * acinclude.m4: Add override.m4.
10363 * configure: Regenerate.
fdc59709 10364
c9b2f845
UW
103652008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
10366
10367 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
10368 initial call to init_register_ppc64.
10369
550512b8
UW
103702008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
10371
43aaf8b6
PA
10372 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
10373 single powerpc*-*-linux* case.
550512b8
UW
10374 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
10375
b6430ec3
UW
103762008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
10377
10378 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 10379 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
10380 from reg_xmlfiles.
10381 * linux-ppc-low.c: Include <elf.h>.
10382 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
10383 (ppc_hwcap): New global variable.
10384 (ppc_regmap): Remove __SPE__ #ifdef sections.
10385 (ppc_regmap_e500): New global variable.
10386 (ppc_cannot_store_register): Update __SPE__ special case.
10387 (ppc_get_hwcap): New function.
10388 (ppc_arch_setup): Use it to determine whether inferior supports
10389 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
10390 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
10391 Do not access registers if target does not support AltiVec.
10392 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
10393 Do not access registers if target does not support SPE.
10394 (target_regsets): Unconditionally include AltiVec and SPE regsets.
10395
52fa2412
UW
103962008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
10397
10398 * linux-low.c (disabled_regsets, num_regsets): New.
10399 (use_regsets_p): Delete.
10400 (linux_wait_for_process): Clear disabled_regsets.
10401 (regsets_fetch_inferior_registers): Check and set it.
10402 (regsets_store_inferior_registers): Likewise.
10403 (linux_fetch_registers, linux_store_registers): Do not use
10404 use_regsets_p.
10405 (initialize_low): Allocate disabled_regsets.
10406
e28b3332
DJ
104072008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
10408
10409 * Makefile.in (LIBOBJS): New.
10410 (OBS): Use LIBOBJS.
10411 (memmem.o): New rule.
10412 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
10413 * configure: Regenerated.
10414
4536995d
UW
104152008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
10416
10417 * server.c (handle_query): Never return "unsupported" for
10418 qXfer:features:read queries.
10419
221c031f
UW
104202008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
10421
10422 * server.c (get_features_xml): Fix inverted condition.
10423 (handle_query): Always support qXfer:feature:read.
10424
ccd213ac
DJ
104252008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
10426
10427 * server.c (wrapper_argv): New.
10428 (start_inferior): Handle wrapper_argv. If set, expect an extra
10429 trap.
10430 (gdbserver_usage): Document --wrapper.
10431 (main): Parse --wrapper.
10432
6fe305f7
UW
104332008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10434
10435 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
10436 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
10437 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
10438 (ppc_set_pc): Likewise.
10439 (ppc_arch_setup): New function.
10440 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
10441 of collect_register.
889bf7c5 10442 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 10443
5b0a002e
UW
104442008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10445
10446 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
10447 instead of linux-ppc64-low.o.
10448 * linux-ppc64-low.c: Remove file.
10449 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
10450 (linux-ppc64-low.o): Remove rule.
10451
10452 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
10453 (init_registers_powerpc_64): Likewise.
10454 (ppc_regmap): Conditionally define depending on __powerpc64__.
10455 (ppc_cannot_store_register): Do not special-case "fpscr" when
10456 compiled on __powerpc64__.
10457 (ppc_collect_ptrace_register): New function.
10458 (ppc_supply_ptrace_register): New function.
10459 (ppc_breakpoint): Change type to "unsigned int".
10460 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
10461 (the_low_target): Conditionally provide initializers for the
889bf7c5 10462 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
10463 collect_ptrace_register and supply_ptrace_register members.
10464
9b4b61c8
UW
104652008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10466
10467 * regcache.h (gdbserver_xmltarget): Add extern declaration.
10468 * server.c (gdbserver_xmltarget): Define.
10469 (get_features_xml): Use it to replace "target.xml" and arch_string.
10470
10471 * configure.srv: Remove srv_xmltarget. Add XML files that were
10472 mentioned there to srv_xmlfiles instead. Remove conditional tests
10473 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
10474 srv_xmlfiles and srv_regobj to include all possible choices.
10475 * configure.ac (srv_xmltarget): Remove.
10476 (srv_xmlfiles): Do not add "target.xml".
10477 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
10478 checks for supplementary target information.
10479 * configure: Regenerate.
10480 * Makefile.in (XML_TARGET): Remove.
10481 (target.xml): Remove rule.
10482 (clean): Do not clean up target.xml.
10483 (.PRECIOUS): Do not mention target.xml.
10484
10485 * target.h (struct target_ops): Remove arch_string member.
10486 * linux-low.c (linux_arch_string): Remove.
10487 (linux_target_ops): Remove arch_string initializer.
10488 * linux-low.h (struct linux_target_ops): Remove arch_string member.
10489 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
10490 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
10491 * spu-low.c (spu_arch_string): Remove.
10492 (spu_target_ops): Remove arch_string initializer.
10493 * win32-low.c (win32_arch_string): Remove.
10494 (win32_target_ops): Remove arch_string initializer.
10495 * win32-low.h (struct win32_target_ops): Remove arch_string member.
10496 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
10497 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
10498
ee1a7ae4
UW
104992008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
10500
10501 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
10502 by collect_ptrace_register and supply_ptrace_register hooks.
10503 * linux-low.c (fetch_register): Use supply_ptrace_register callback
10504 instead of checking for the_low_target.left_pad_xfer.
10505 (usr_store_inferior_registers): Use collect_ptrace_register callback
10506 instead of checking for the_low_target.left_pad_xfer.
10507
10508 * linux-s390-low.c (s390_collect_ptrace_register): New function.
10509 (s390_supply_ptrace_register): Likewise.
10510 (s390_fill_gregset): Call s390_collect_ptrace_register.
10511 (the_low_target): Update.
10512
10513 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
10514 (ppc_supply_ptrace_register): Likewise.
10515 (the_low_target): Update.
10516
10517 * linux-i386-low.c (the_low_target): Update.
10518 * linux-x86-64-low.c (the_low_target): Update.
10519
d61ddec4
UW
105202008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
10521
10522 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
10523 reg-s390.o and reg-s390x.o.
10524
10525 * linux-low.c (new_inferior): New global variable.
10526 (linux_create_inferior, linux_attach): Set it.
10527 (linux_wait_for_process): Call the_low_target.arch_setup after the
10528 target has stopped for the first time.
10529 (initialize_low): Do not call the_low_target.arch_setup.
10530
10531 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
10532 (s390_set_pc): Likewise.
10533 (s390_arch_setup): New function.
10534 (the_low_target): Use s390_arch_setup as arch_setup routine.
10535
10536 * regcache.c (realloc_register_cache): New function.
10537 (set_register_cache): Call it for each existing regcache.
10538
d05b4ac3
UW
105392008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
10540
10541 * server.h (init_registers): Remove prototype.
10542
10543 * linux-low.h (struct linux_target_ops): Add arch_setup field.
10544 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
10545 instead of init_registers ().
10546 * linux-arm-low.c (init_registers_arm): Add prototype.
10547 (init_registers_arm_with_iwmmxt): Likewise.
10548 (the_low_target): Add initializer for arch_setup field.
10549 * linux-cris-low.c (init_registers_cris): Add prototype.
10550 (the_low_target): Add initializer for arch_setup field.
10551 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
10552 (the_low_target): Add initializer for arch_setup field.
10553 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
10554 (the_low_target): Add initializer for arch_setup field.
10555 * linux-ia64-low.c (init_registers_ia64): Add prototype.
10556 (the_low_target): Add initializer for arch_setup field.
10557 * linux-m32r-low.c (init_registers_m32r): Add prototype.
10558 (the_low_target): Add initializer for arch_setup field.
10559 * linux-m68k-low.c (init_registers_m68k): Add prototype.
10560 (the_low_target): Add initializer for arch_setup field.
10561 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
10562 (init_registers_mips64_linux): Likewise.
10563 (the_low_target): Add initializer for arch_setup field.
10564 * linux-ppc-low.c (init_registers_ppc): Add prototype.
10565 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
10566 (the_low_target): Add initializer for arch_setup field.
10567 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
10568 (init_registers_powerpc_64): Likewise.
10569 (the_low_target): Add initializer for arch_setup field.
10570 * linux-s390-low.c (init_registers_s390): Add prototype.
10571 (init_registers_s390x): Likewise.
10572 (the_low_target): Add initializer for arch_setup field.
10573 * linux-sh-low.c (init_registers_sh): Add prototype.
10574 (the_low_target): Add initializer for arch_setup field.
10575 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
10576 (the_low_target): Add initializer for arch_setup field.
10577 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
10578 (the_low_target): Add initializer for arch_setup field.
10579
10580 * win32-low.h (struct win32_target_ops): Add arch_setup field.
10581 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
10582 instead of init_registers ().
10583 * win32-arm-low.c (init_registers_arm): Add prototype.
10584 (the_low_target): Add initializer for arch_setup field.
10585 * win32-i386-low.c (init_registers_i386): Add prototype.
10586 (the_low_target): Add initializer for arch_setup field.
10587
10588 * spu-low.c (init_registers_spu): Add prototype.
10589 (initialize_low): Call initialie_registers_spu () instead of
10590 initialize_registers ().
10591
fd96d250
PA
105922008-02-19 Pedro Alves <pedro@codesourcery.com>
10593
10594 * server.c (handle_v_requests): When handling the vRun and vAttach
10595 packets, if already debugging a process, don't kill it. Return an
10596 error instead.
10597
d41b6bb4
DJ
105982008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
10599
10600 * server.c (handle_query): Correct length check.
10601
5ac588cf
PA
106022008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
10603
10604 * win32-low.c (do_initial_child_stuff): Add process handle
10605 parameter. Set current_process_handle and current_process_id from the
10606 parameters. Clear globals.
10607 (win32_create_inferior): Don't set current_process_handle and
10608 current_process_id here. Instead pass them on the call to
10609 do_initial_child_stuff.
10610 (win32_attach): Likewise.
10611 (win32_clear_inferiors): New.
10612 (win32_kill): Don't close the current process handle or the
10613 current thread handle here. Instead call win32_clear_inferiors.
10614 (win32_detach): Don't open a new handle to the process. Call
10615 win32_clear_inferiors.
10616 (win32_join): Don't rely on current_process_handle; open a new
10617 handle using the process id.
10618 (win32_wait): Call win32_clear_inferiors when the inferior process
10619 has exited.
10620
ecd7ecbc
DJ
106212008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
10622
10623 * server.c (monitor_show_help): Add "exit".
10624
1525d545
MG
106252008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
10626
ecd7ecbc 10627 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
10628 (clean): Add reg-xtensa.c.
10629 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
10630 * configure.srv (xtensa*-*-linux*) New target.
10631 * linux-xtensa-low.c: New.
10632 * xtensa-xtregs.c: New.
1525d545 10633
59a016f0
PA
106342008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
10635
10636 * hostio.c: Don't include errno.h.
10637 (errno_to_fileio_errno): Move to hostio-errno.
10638 * hostio.c: (hostio_error): Remove the error parameter. Defer the
10639 error number outputting to the target->hostio_last_error callback.
10640 (hostio_packet_error): Use FILEIO_EINVAL directly.
10641 (handle_open, handle_pread, hostio_error, handle_unlink): Update
10642 calls to hostio_error.
10643 * hostio-errno.c: New.
10644 * server.h (hostio_last_error_from_errno): Declare.
10645 * target.h (target_ops): Add hostio_last_error member.
10646 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
10647 as hostio_last_error handler.
889bf7c5 10648 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
10649 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
10650 (wince_hostio_last_error): New functions.
10651 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
10652 as hostio_last_error handler.
10653 (win32_target_ops) [!_WIN32_WCE]: Register
10654 hostio_last_error_from_errno as hostio_last_error handler.
10655 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
10656 (hostio-errno.o): New rule.
10657 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
10658 * configure.srv (srv_hostio_err_objs): New variable. Default to
10659 hostio-errno.o.
10660 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
10661 * configure: Regenerate.
10662
2d717e4f
DJ
106632008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
10664
10665 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
10666 (linux_kill, linux_detach): Clean up the process list.
10667 * remote-utils.c (remote_open): Improve port number parsing.
10668 (putpkt_binary, input_interrupt): Only send interrupts if the target
10669 is running.
10670 * server.c (extended_protocol): Make static.
10671 (attached): Define earlier.
10672 (exit_requested, response_needed, program_argv): New variables.
10673 (target_running): New.
10674 (start_inferior): Clear attached here.
10675 (attach_inferior): Set attached here.
10676 (require_running): Define.
10677 (handle_query): Use require_running and target_running. Implement
10678 "monitor exit".
10679 (handle_v_attach, handle_v_run): New.
10680 (handle_v_requests): Use require_running. Handle vAttach and vRun.
10681 (gdbserver_usage): Update.
10682 (main): Redo argument parsing. Handle --debug and --multi. Handle
10683 --attach along with other options or after the port. Save
10684 program_argv. Support no initial program. Resynchronize
10685 communication with GDB after an error. Handle "monitor exit".
10686 Use require_running and target_running. Always allow the extended
10687 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
10688 restart in extended mode.
10689 * README: Refer to the GDB manual. Update --attach usage.
10690
7407e2de
AS
106912007-12-20 Andreas Schwab <schwab@suse.de>
10692
10693 * linux-low.c (STACK_SIZE): Define.
10694 (linux_tracefork_child): Use it. Use __clone2 on ia64.
10695 (linux_test_for_tracefork): Likewise.
10696
b65d95c5
DJ
106972007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
10698
10699 * linux-low.c (linux_wait_for_event): Update messages. Do not
10700 reinsert auto-delete breakpoints.
10701 * mem-break.c (struct breakpoint): Change return type of handler to
10702 int.
10703 (set_breakpoint_at): Update handler type.
10704 (reinsert_breakpoint_handler): Return 1 instead of calling
10705 delete_breakpoint.
10706 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
10707 setting a new one.
10708 (check_breakpoints): Delete auto-delete breakpoints and return 2.
10709 * mem-break.h (set_breakpoint_at): Update handler type.
10710 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
10711 * win32-low.c (auto_delete_breakpoint): New.
10712 (get_child_debug_event): Use it.
10713
4e799345
DJ
107142007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
10715
10716 * configure.ac: Check for pread and pwrite.
10717 * hostio.c (handle_pread): Fall back to lseek and read.
10718 (handle_pwrite): Fall back to lseek and write.
10719 * config.in, configure: Regenerated.
10720
27524b67
DJ
107212007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
10722
10723 * server.c (myresume): Add own_buf argument.
10724 (main): Update calls.
10725
a20d5e98
DJ
107262007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
10727
10728 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
10729 * remote-utils.c (remote_open): Do not call disable_async_io.
10730 (block_async_io): Delete.
10731 (unblock_async_io): Make static.
10732 (initialize_async_io): New.
10733 * server.c (handle_v_cont): Handle async I/O here.
10734 (myresume): Likewise. Move other common resume tasks here...
10735 (main): ... from here. Call initialize_async_io. Disable async
10736 I/O before the main loop.
10737 * server.h (initialize_async_io): Declare.
10738 (block_async_io, unblock_async_io): Delete prototypes.
10739 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
10740
b79d787e
DJ
107412007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
10742
10743 * remote-utils.c (readchar): Allow binary data in received messages.
10744
d97903b2
PA
107452007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10746
10747 * win32-low.c (attaching): New global.
10748 (win32_create_inferior): Clear the `attaching' global.
10749 (win32_attach): Set the `attaching' global.
10750 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
10751 attaching. Only set a breakpoint at the entry point if not
10752 attaching.
10753
311de423
PA
107542007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10755
10756 * server.c (main): Don't report dll events on the initial
10757 connection on attaches.
10758
6c2d16d2
PA
107592007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10760
10761 * server.c (main): Relax numerical bases supported for the pid of
10762 the --attach command line argument.
10763
5ca906e6
PA
107642007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10765
10766 * win32-low.c (win32_attach): Call OpenProcess before
10767 DebugActiveProcess, not after. Add last error output to error
10768 call.
10769
9c6c8194
PA
107702007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10771
10772 * win32-low.c (win32_get_thread_context)
10773 (win32_set_thread_context): New functions.
10774 (thread_rec): Use win32_get_thread_context.
10775 (continue_one_thread, win32_resume): Use win32_set_thread_context.
10776 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
10777 field.
10778
4d5d1aaa
PA
107792007-12-03 Leo Zayas
10780 Pedro Alves <pedro_alves@portugalmail.pt>
10781
10782 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
10783 global variables.
10784 (child_add_thread): Minor cleanup.
10785 (child_continue): Resume artificially suspended threads before
10786 calling ContinueDebugEvent.
10787 (suspend_one_thread): New.
10788 (fake_breakpoint_event): New.
10789 (get_child_debug_event): Change return type to int. Check here if
10790 gdb sent an interrupt request. If a soft interrupt was requested,
10791 fake a breakpoint event. Return 0 if there is no event to handle,
10792 and 1 otherwise.
10793 (win32_wait): Don't check here if gdb sent an interrupt request.
10794 Ensure there is a valid event to handle.
10795 (win32_request_interrupt): Add soft interruption method as last
10796 resort.
10797
c436e841
PA
107982007-12-03 Leo Zayas
10799 Pedro Alves <pedro_alves@portugalmail.pt>
10800
10801 * win32-low.h (win32_thread_info): Add descriptions to the
10802 structure members. Replace `suspend_count' counter by a
10803 `suspended' flag.
10804 * win32-low.c (thread_rec): Update condition of when to get the
10805 context from the inferior. Rely on ContextFlags being set if it
10806 has already been retrieved. Only suspend the inferior thread if
10807 we haven't already. Warn if that fails.
10808 (continue_one_thread): s/suspend_count/suspended/. Only call
10809 ResumeThread once. Warn if that fails.
10810
e7b5fa67
PA
108112007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
10812
10813 * win32-low.c (win32_wait): Don't read from the inferior when it
10814 has already exited.
10815
a385171d
PA
108162007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
10817
10818 * Makefile.in (win32_low_h): New variable.
10819 (win32-low.o): Add dependency on $(win32_low_h).
10820 (win32-arm-low.o, win32-i386-low.o): New rules.
10821
f80c84b3
DJ
108222007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
10823
10824 * hostio.c: Correct copyright year.
10825
a6b151f1
DJ
108262007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
10827
10828 * Makefile.in (OBS): Add hostio.o.
10829 (hostio.o): New rule.
10830 * server.h (handle_vFile): Declare.
10831 * hostio.c: New file.
10832 * server.c (handle_v_requests): Take packet_len and new_packet_len
10833 for binary packets. Call handle_vFile.
10834 (main): Update call to handle_v_requests.
10835
f9387fc3
DJ
108362007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
10837
10838 * linux-low.c: Include <sched.h>.
10839
51c2684e
DJ
108402007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
10841
10842 * linux-low.c (linux_tracefork_grandchild): New.
10843 (linux_tracefork_child): Use clone.
10844 (linux_test_for_tracefork): Use clone; allocate and free a stack.
10845
75f83163
JB
108462007-10-31 Joel Brobecker <brobecker@adacore.com>
10847
10848 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
10849
da5898ce
DJ
108502007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
10851
10852 * linux-low.c (handle_extended_wait): Handle unexpected signals.
10853
24a09b5f
DJ
108542007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
10855
10856 * inferiors.c (change_inferior_id): Delete.
10857 (add_pid_to_list, pull_pid_from_list): New.
10858 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
10859 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
10860 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
10861 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
10862 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
10863 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
10864 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
10865 (using_threads): Always set to 1.
10866 (handle_extended_wait): New.
10867 (add_process): Do not set TID.
10868 (linux_create_inferior): Set must_set_ptrace_flags.
10869 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
10870 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
10871 (linux_thread_alive): Rename TID argument to LWPID.
10872 (linux_wait_for_process): Handle unknown processes. Do not use TID.
10873 (linux_wait_for_event): Do not use TID or check using_threads. Update
10874 call to dead_thread_notify. Call handle_extended_wait.
10875 (linux_create_inferior): Use PTRACE_SETOPTIONS.
10876 (send_sigstop): Delete sigstop_sent.
10877 (wait_for_sigstop): Avoid TID.
10878 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
10879 (linux_test_for_tracefork): New.
10880 (linux_lookup_signals): Use thread_db_active and
10881 linux_supports_tracefork_flag.
10882 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
10883 * linux-low.h (get_process_thread): Avoid TID.
10884 (struct process_ifo): Move thread_known and tid to the end. Remove
10885 sigstop_sent.
10886 (linux_attach_lwp, thread_db_init): Update prototypes.
10887 * server.h (change_inferior_id): Delete prototype.
10888 (add_pid_to_list, pull_pid_from_list): New prototypes.
10889 * thread-db.c (thread_db_use_events): New.
10890 (find_first_thread): Rename to...
10891 (find_one_thread): ...this. Update callers and messages. Do not
10892 call fatal. Check thread_db_use_events. Do not call
10893 change_inferior_id or new_thread_notify.
10894 (maybe_attach_thread): Update. Do not call new_thread_notify.
10895 (thread_db_init): Set thread_db_use_events. Check use_events.
10896 * utils.c (fatal, warning): Correct message prefix.
10897
30ed0a8f
DJ
108982007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
10899
10900 * Makefile.in (clean): Remove new files.
10901 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
10902 (powerpc-64.o, powerpc-64.c): New rules.
10903 * configure.srv: Use alternate register sets for powerpc64-*-linux*
10904 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
10905 with SPE.
10906 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
10907 SPE targets.
10908 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
10909 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
10910 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
10911 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
10912 (target_regsets): Add AltiVec and SPE register sets.
10913 * configure.ac: Check for AltiVec and SPE.
10914 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
10915 (ppc_fill_vrregset, ppc_store_vrregset): New.
10916 (target_regsets): Add AltiVec register set.
10917 * configure: Regenerated.
10918
fd462a61
DJ
109192007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
10920
10921 * linux-low.c (O_LARGEFILE): Define.
10922 (linux_read_memory): Use /proc/PID/mem.
10923 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
10924 * configure, config.in: Regenerated.
10925
69f223ed
DJ
109262007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
10927
10928 * linux-low.c (linux_wait_for_event): Do not pass signals while
10929 single-stepping.
10930
aec18585
PA
109312007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
10932
10933 * win32-low.c (create_process): New.
10934 (win32_create_inferior): Use create_process instead of
10935 CreateProcess. If create_process failed retry appending an ".exe"
10936 suffix. Store the GetLastError result immediatelly after
10937 create_process calls and use it on the call to error.
10938
34d86ddd
PA
109392007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
10940
10941 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
10942
5a0e3bd0
JB
109432007-08-23 Joel Brobecker <brobecker@adacore.com>
10944
10945 * configure.ac: Switch license to GPLv3.
10946
f88c79e6
MS
109472007-08-01 Michael Snyder <msnyder@access-company.com>
10948
10949 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
10950
6b3d9b83
PA
109512007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
10952
10953 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
10954 typedef.
10955 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
10956 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
10957 CloseToolhelp32Snapshot.
10958 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
10959 CloseToolhelp32Snapshot.
10960
c588c53c
MS
109612007-07-27 Michael Snyder <michael.snyder@access-company.com>
10962
10963 * server.c (main): Check for inferior exit before main loop.
10964
aa0403d9
PA
109652007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
10966
10967 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
10968 instead of on tmp_desc.
10969
255e7678
DJ
109702007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
10971 Daniel Jacobowitz <dan@codesourcery.com>
10972
10973 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
10974 (add_thread): Minor cleanups.
10975 (clear_inferiors): Move lower in the file. Clear the DLL
10976 list.
10977 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
10978 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
10979 (xml_escape_text): New.
10980 * server.c (handle_query): Handle qXfer:libraries:read. Report it
10981 for qSupported.
10982 (handle_v_cont): Report errors.
10983 (gdbserver_version): Update.
10984 (main): Correct size of own_buf. Do not report initial DLL events.
10985 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
10986 (unloaded_dll, xml_escape_text): New.
10987 * win32-low.c (enum target_waitkind): Update comments.
10988 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
10989 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
10990 (win32_EnumProcessModules, win32_GetModuleInformation)
10991 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
10992 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
10993 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
10994 (win32_Module32First, win32_Module32Next, load_toolhelp)
10995 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
10996 (get_child_debug_event): Handle DLL events.
10997 (win32_wait): Likewise.
10998
0d37add9
DJ
109992007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
11000
11001 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
11002 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
11003
45e2715e
PA
110042007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
11005
11006 * win32-low.c (handle_output_debug_string): Ignore event if not
11007 waiting.
11008
c5674cf1
PA
110092007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
11010
11011 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
11012
2bbe3cc1
DJ
110132007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
11014
11015 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
11016
ae13219e
DJ
110172007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
11018
11019 * inferiors.c (change_inferior_id): Add comment.
11020 * linux-low.c (check_removed_breakpoint): Add an early
11021 prototype. Improve debug output.
11022 (linux_attach): Doc update.
11023 (linux_detach_one_process, linux_detach): Clean up before releasing
11024 each process.
11025 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
11026 * linux-low.h (struct process_info): Doc improvement.
11027 * mem-break.c (delete_all_breakpoints): New.
11028 * mem-break.h (delete_all_breakpoints): New prototype.
11029 * thread-db.c (find_first_thread): New.
11030 (thread_db_create_event): Call it instead of
11031 thread_db_find_new_threads. Clean up unused variables.
11032 (maybe_attach_thread): Remove first thread handling.
11033 (thread_db_find_new_threads): Use find_first_thread.
11034 (thread_db_get_tls_address): Likewise.
11035
4105de34
DJ
110362007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
11037
11038 * thread-db.c (thread_db_find_new_threads): Add prototype.
11039 (thread_db_create_event): Check for the main thread before adding
11040 a new thread.
11041 (maybe_attach_thread): Only enable event reporting if TID == 0.
11042 (thread_db_get_tls_address): Check for new threads.
11043
2b876972
DJ
110442007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
11045
11046 * linux-low.c (linux_create_inferior): Try execv before execvp.
11047 * spu-low.c (spu_create_inferior): Likewise.
11048
7a245884
DJ
110492007-06-13 Mike Frysinger <vapier@gentoo.org>
11050
11051 * linux-low.c (linux_create_inferior): Change execv to execvp.
11052 * spu-low.c (spu_create_inferior): Likewies.
11053
117ce543
DJ
110542007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
11055
11056 * Makefile.in (clean): Clean new files instead of deleted ones.
11057 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
11058 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
11059 rules.
11060 * configure.srv: Specify XML files and new regformats for MIPS and
11061 MIPS64 GNU/Linux.
11062 * linux-mips-low.c (mips_num_regs): Set to only used registers.
11063 (mips_regmap): Do not fetch $0. Remove unused registers. Add
11064 an entry for the restart register.
11065 (mips_cannot_fetch_register, mips_cannot_store_register)
11066 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
11067 register names to match the XML descriptions.
11068 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
11069 restart register instead of $0.
11070
0e7f50da
UW
110712007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
11072 Markus Deuling <deuling@de.ibm.com>
11073
11074 * remote-utils.c (decode_xfer_write): New function.
11075 * server.h (decode_xfer_write): Add prototype.
11076 * server.c (handle_query): Add PACKET_LEN argument. Support
11077 qXfer:spu:read and qXfer:spu:write packets.
11078 (main): Pass packet_len to handle_query.
11079 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
11080 * target.h (target_ops): Add qxfer_spu.
11081
374c1d38
UW
110822007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
11083
11084 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
11085 accessing non-seekable spufs files.
11086
bb63802a
UW
110872007-05-16 Markus Deuling <deuling@de.ibm.com>
11088
889bf7c5 11089 * server.c (handle_query): Add reply for qC packet.
bb63802a 11090
7390519e
PA
110912007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11092 Leo Zayas <lerele@champenstudios@com>
11093
11094 * server.h (check_remote_input_interrupt_request): New function.
11095 * remote_utils.c (INVALID_DESCRIPTOR): New define.
11096 (remote_desc): Initialize with INVALID_DESCRIPTOR.
11097 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
11098 (check_remote_input_interrupt_request): New function.
11099 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 11100 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
11101 winapi_GenerateConsoleCtrlEvent): New typedefs.
11102 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
11103 to 250 ms.
11104 (win32_wait): Check for remote interrupt request
11105 with check_remote_input_interrupt_request.
11106 (win32_request_interrupt): New function.
11107 (win32_target_op): Set request_interrupt to win32_request_interrupt.
11108
34b34921
PA
111092007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11110
11111 * win32-low.c (debug_registers_changed,
11112 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
11113 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
11114 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
11115 (thread_rec): Get context using the low target.
11116 (child_add_thread): Call thread_added on the low target,
11117 which does the same thing.
11118 (regptr): Delete.
11119 (do_initial_child_stuff): Remove debug registers references.
11120 Set context using the low target. Resume threads after
11121 setting the contexts.
11122 (child_continue): Remove dead variable. Remove debug
11123 registers references.
11124 (child_fetch_inferior_registers): Go through the low target.
11125 (do_child_store_inferior_registers): Remove.
11126 (child_store_inferior_registers): Go through the low target.
11127 (win32_resume): Remove debug registers references.
11128 Set context using the low target.
11129 (handle_exception): Change return type to void. Don't record
11130 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
11131 first chance exception.
889bf7c5 11132 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
11133 goto loop. Always return after waiting for debug event.
11134 (win32_wait): Convert to switch statement. Handle spurious
11135 events.
11136
11137 * win32-i386-low.c (debug_registers_changed,
11138 debug_registers_used): New.
11139 (initial_stuff): Rename to ...
11140 (i386_initial_stuff): ... this. Clear debug registers
11141 state variables.
11142 (store_debug_registers): Delete.
11143 (i386_get_thread_context): New.
11144 (load_debug_registers): Delete.
11145 (i386_set_thread_context): New.
11146 (i386_thread_added): New.
11147 (single_step): Rename to ...
11148 (i386_single_step): ... this.
11149 (do_fetch_inferior_registers): Rename to ...
11150 (i386_fetch_inferior_register): ... this.
11151 (i386_store_inferior_register): New.
11152 (the_low_target): Adapt to new interface.
11153
11154 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
11155 (arm_get_thread_context): New.
11156 (arm_set_thread_context): New.
11157 (regptr): New.
11158 (do_fetch_inferior_registers): Rename to ...
11159 (arm_fetch_inferior_register): ... this.
11160 (arm_store_inferior_register): New.
11161 (arm_wince_breakpoint): Reimplement as unsigned long.
11162 (arm_wince_breakpoint_len): Define.
11163 (the_low_target): Adapt to new interface.
11164
11165 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
11166 load_debug_registers. Add get_thread_context, set_thread_context,
11167 thread_added and store_inferior_register. Rename
11168 fetch_inferior_registers to fetch_inferior_register.
11169 (regptr): Remove declaration.
11170
dd6953e1
PA
111712007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11172
11173 * linux-low.c (linux_detach): Change return type to int. Return 0.
11174 * spu-low.c (spu_detach): Likewise.
11175
444d6139
PA
111762007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11177
11178 * target.h (target_ops): Change return type of detach to int.
11179 Add join.
11180 (join_inferior): New.
11181 * server.c (main): Don't skip detach support on mingw32.
11182 If the inferior doesn't support detaching return error.
11183 Call join_inferior instead of using waitpid.
11184 * linux-low.c (linux_join): New.
11185 (linux_target_op): Add linux_join.
11186 * spu-low.c (spu_join): New.
11187 (spu_target_ops): Add spu_join.
11188 * win32-low.c (win32_detach): Adapt to new interface.
11189 Reopen current_process_handle before detaching. Issue a child
11190 resume before detaching.
11191 (win32_join): New.
11192 (win32_target_op): Add win32_join.
11193
1d5315fe
PA
111942007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11195
11196 * win32-low.c (win32-attach): Fix return value.
11197 * target.h (target_ops): Describe ATTACH return values.
11198
bf914831
PA
111992007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11200
11201 * win32-low.c (GETPROCADDRESS): Define.
11202 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
11203 (winapi_DebugSetProcessKillOnExit): Likewise.
11204 (win32_create_inferior): Force usage of ansi CreateProcessA.
11205 (win32_attach): Use GETPROCADDRESS.
11206 (win32_detach): Likewise.
11207
f72f3e60
PA
112082007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11209
11210 * win32-low.c (win32_wait): Don't use WSTOPSIG.
11211
ed50f18f
PA
112122007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
11213
11214 * win32-low.c: Commit leftover changes from 2007-03-29.
11215
0c2ead7e
DJ
112162007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
11217
11218 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
11219 fields short instead of int. Add explicit padding.
11220 (i387_cache_to_fsave): Remove unnecessary casts.
11221 (i387_fsave_to_cache): Doc fix.
11222 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
11223
73725ff3
DJ
112242007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
11225
11226 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
11227 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
11228
d99f33d8
PA
112292007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
11230
11231 * configure.srv (arm*-*-mingw32ce*): Move near the other
11232 arm targets.
11233
68070c10
PA
112342007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
11235
2482afc6 11236 * configure.ac: Add errno checking.
68070c10
PA
11237 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
11238 sys/file.h and malloc.h.
11239 (AC_CHECK_DECLS): Add perror.
11240 (srv_mingwce): Handle.
2482afc6 11241 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
11242 win32-i386-low.o to srv_tgtobj.
11243 (i[34567]86-*-mingw*): Likewise.
11244 (arm*-*-mingw32ce*): Add case.
11245 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
11246 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
11247 [__MINGW32CE__] (strerror): New function.
11248 [__MINGW32CE__] (errno): Define to GetLastError.
11249 [__MINGW32CE__] (COUNTOF): New macro.
11250 (remote_open): Remove extra close call.
11251 * mem-break.c (delete_breakpoint_at): New function.
11252 * mem-break.h (delete_breakpoint_at): Declare.
11253 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
11254 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
11255 [USE_WIN32API] (read, write): Add char* casts.
11256 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
11257 * server.h: Include wincecompat.h on Windows CE.
11258 [HAVE_ERRNO_H]: Check.
11259 (perror): Declare if not declared.
11260 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
11261 (perror_with_name): Remove errno declaration.
11262 * wincecompat.h: New.
11263 * wincecompat.c: New.
11264 * win32-low.h: New.
11265 * win32-arm-low.c: New.
11266 * win32-i386-low.c: New.
11267 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
11268 (OUTMSG2): Make it safe.
11269 (_T): New macro.
11270 (COUNTOF): New macro.
11271 (NUM_REGS): Get it from the low target.
11272 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
11273 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
11274 (thread_rec): Let low target handle debug registers.
11275 (child_add_thread): Likewise.
11276 (child_init_thread_list): Likewise.
11277 (continue_one_thread): Likewise.
11278 (regptr): New.
11279 (do_child_fetch_inferior_registers): Move to ...
11280 * win32-i386-low.c: ... here, and rename to ...
11281 (do_fetch_inferior_registers): ... this.
889bf7c5 11282 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
11283 Go through the low target.
11284 (do_child_store_inferior_registers): Use regptr.
11285 (strwinerror): New function.
11286 (win32_create_inferior): Handle Windows CE.
11287 Use strwinerror instead of strerror on Windows error
11288 codes. Add program to the error output.
11289 Don't close the main thread handle on Windows CE.
11290 (win32_attach): Use coredll.dll on Windows CE.
11291 (win32_kill): Close current process and current
11292 thread handles.
11293 (win32_detach): Use coredll.dll on Windows CE.
11294 (win32_resume): Let low target handle debug registers, and
11295 step request.
11296 (handle_exception): Add/Remove initial breakpoint. Avoid
11297 non-existant WSTOPSIG on Windows CE.
11298 (win32_read_inferior_memory): Cast to remove warning.
11299 (win32_arch_string): Go through the low target.
11300 (initialize_low): Call set_breakpoint_data with the low
11301 target's breakpoint.
11302 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
11303 FOP_REGNUM, mappings): Move to ...
11304 * win32-i386-low.c: ... here.
11305 * win32-low.c (win32_thread_info): Move to ...
11306 * win32-low.h: ... here.
11307 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
11308 win32-arm-low.c and wincecompat.c.
11309 (all:): Add $EXEEXT.
11310 (install-only:): Likewise.
11311 (gdbserver:): Likewise.
11312 (gdbreplay:): Likewise.
11313 * config.in: Regenerate.
11314 * configure: Regenerate.
11315
41093d81
PA
113162007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
11317
11318 * win32-low.c: Rename typedef thread_info to
11319 win32_thread_info throughout.
11320
544afa54
PA
113212007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
11322
11323 * win32-i386-low.c: Rename to ...
11324 * win32-low.c: ... this.
11325 * configure.srv: Replace win32-i386-low.o with win32-low.o.
11326 * Makefile.in: Likewise.
11327
bce7165d
PA
113282007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
11329
11330 * remote-utils.c (monitor_output): Constify msg parameter.
11331 * server.h (monitor_output): Likewise.
11332 * win32-i386-low.c (handle_output_debug_string): New.
11333 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
11334 handle_output_debug_string.
11335 (get_child_debug_event): Likewise.
11336
506c7aa0
DJ
113372007-03-27 Mat Hostetter <mat@lcs.mit.edu>
11338
11339 * server.c (main): Correct strtoul check.
11340
42c81e2a
DJ
113412007-03-27 Jon Ringle <jon@ringle.org>
11342
11343 * linux-low.c: Check __ARCH_HAS_MMU__ also.
11344
9453113a
DJ
113452007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
11346
11347 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
11348
64a69107
DJ
113492007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
11350
11351 * terminal.h: Check HAVE_SGTTY_H.
11352
113532007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
11354
11355 * remote-utils.c (remote_open): Print out the assigned port number.
11356
c74d0ad8
DJ
113572007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
11358
11359 * remote-utils.c (monitor_output): New function.
11360 * server.c (debug_threads): Define here.
11361 (monitor_show_help): New function.
11362 (handle_query): Handle qRcmd.
11363 (main): Do not handle 'd' packet.
11364 * server.h (debug_threads, remote_debug, monitor_output): Declare.
11365 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
11366 of debug_threads.
11367
de7c3b4a
PA
113682007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11369
11370 * Makefile.in (EXEEXT): New.
11371 (clean): Use $(EXEEXT).
11372
ef57601b
PA
113732007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11374
11375 * target.h (target_ops): Rename send_signal to request_interrupt,
11376 and remove enum target_signal parameter.
11377 * linux-low.c (linux_request_interrupt): Rename from
11378 linux_send_signal, and always send SIGINT.
11379 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
11380 and always send SIGINT.
11381 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
11382 of send_signal.
11383 (input_interrupt): Likewise.
11384
820f2bda
PA
113852007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11386
11387 * server.c (get_features_xml): Check if target implemented
11388 arch_string.
11389 * win32-i386-low.c (win32_arch_string): New.
11390 (win32_target_ops): Add win32_arch_string as arch_string member.
11391
ab39bf24
UW
113922007-02-22 Markus Deuling <deuling@de.ibm.com>
11393
11394 * spu-low.c (spu_arch_string): New.
11395 (spu_target_ops): Add spu_arch_string.
11396
61ff6e04
DJ
113972007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
11398
11399 * remote-utils.c: Remove HAVE_TERMINAL_H check.
11400 * configure.ac: Do not check for terminal.h.
11401 * configure, config.in: Regenerated.
11402
fb1e4ffc
DJ
114032007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
11404
11405 * Makefile.in (OBS): Add $(XML_BUILTIN).
11406 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
11407 (clean): Update.
11408 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
11409 (arm-with-iwmmxt.c): New.
11410 * config.in, configure: Regenerate.
11411 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
11412 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
11413 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
11414 (arm*-*-linux*): Add iWMMXt and regset support.
11415 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
11416 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
11417 (arm_store_wmmxregset, target_regsets): New.
11418 * server.c (get_features_xml): Take annex argument. Check builtin
11419 XML documents.
11420 (handle_query): Handle multiple annexes.
11421
0f48aa01
DJ
114222007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11423
11424 * remote-utils.c [USE_WIN32API] (read, write): Define.
11425 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
11426 write.
11427
23181151
DJ
114282007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
11429
11430 * linux-i386-low.c (the_low_target): Set arch_string.
11431 * linux-x86-64-low.c (the_low_target): Likewise.
11432 * linux-low.c (linux_arch_string): New.
11433 (linux_target_ops): Add it.
11434 * linux-low.h (struct linux_target_ops): Add arch_string.
11435 * server.c (write_qxfer_response): Use const void * for DATA.
11436 (get_features_xml): New.
11437 (handle_query): Handle qXfer:features:read. Report it for qSupported.
11438 * target.h (struct target_ops): Add arch_string method.
11439
9d606399
DJ
114402007-01-03 Denis Pilat <denis.pilat@st.com>
11441 Daniel Jacobowitz <dan@codesourcery.com>
11442
11443 * linux-low.c (linux_kill): Handle being called with no threads.
11444 * win32-i386-low.c (win32_kill): Likewise.
11445 (get_child_debug_event): Clear current_process_handle.
11446
114472006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
11448 Daniel Jacobowitz <dan@codesourcery.com>
11449
11450 * remote-utils.c (remote_open): Check the type of specified
11451 serial port devices before opening them.
11452 * server.c (main): Kill the inferior if an error occurs during
11453 the first remote_open.
11454
a5e13d24
DJ
114552006-12-05 Markus Deuling <deuling@de.ibm.com>
11456
11457 * README: Update supported targets.
11458
186947f7
DJ
114592006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
11460
11461 * Makefile.in (clean): Remove reg-mips64.c.
11462 (reg-mips64.c, reg-mips64.o): New rules.
11463 * configure.srv: Handle mips64. Include regset support for mips.
11464 * linux-mips-low.c (union mips_register): New.
11465 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
11466 (mips_breakpoint, mips_breakpoint_at): Use int.
11467 (mips_collect_register, mips_supply_register)
11468 (mips_collect_register_32bit, mips_supply_register_32bit)
11469 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
11470 (mips_store_fpregset, target_regsets): New.
11471 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
11472
a13e2c95
UW
114732006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
11474
11475 * configure.srv: Add target "spu*-*-*".
11476 * Makefile.in (clean): Remove reg-spu.c.
11477 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
11478 * spu-low.c: New file.
11479
cb7283db
DJ
114802006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
11481
11482 * configure.ac: Correct td_thr_tls_get_addr test.
11483 * configure: Regenerated.
11484
89be2091
DJ
114852006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
11486
11487 * linux-low.c (linux_wait_for_event): Reformat. Use the
11488 pass_signals array.
11489 * remote-utils.c (decode_address_to_semicolon): New.
11490 * server.c (pass_signals, handle_general_set): New.
11491 (handle_query): Mention QPassSignals for qSupported.
11492 (main): Call handle_general_set.
11493 * server.h (pass_signals, decode_address_to_semicolon): New.
11494
000ef4f0
DJ
114952006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
11496
11497 * server.c (handle_query): Correct error handling for read_auxv.
11498
b7149293
UW
114992005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
11500
11501 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
11502 and srv_linux_thread_db to yes.
11503 * linux-s390-low.c (s390_fill_gregset): New function.
11504 (target_regsets): Define data structure.
11505
dae5f5cf
DJ
115062006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
11507
11508 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
11509 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
11510 * config.in, configure: Regenerated.
11511 * inferiors.c (gdb_id_to_thread): New function.
11512 (gdb_id_to_thread_id): Use it.
11513 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
11514 * linux-low.h (struct process_info): Add th member.
11515 (thread_db_get_tls_address): New prototype.
11516 * remote-utils.c (decode_address): Make non-static.
11517 * server.c (handle_query): Handle qGetTLSAddr.
11518 * server.h (gdb_id_to_thread, decode_address): New prototypes.
11519 * target.h (struct target_ops): Add get_tls_address.
11520 * thread-db.c (maybe_attach_thread): Save the thread handle.
11521 (thread_db_get_tls_address): New.
11522
32ca6d61
DJ
115232006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
11524
11525 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
11526 (linux_resume_one_process): Take a siginfo_t *. Update all
11527 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
11528 (struct pending_signals): Add a siginfo_t.
11529 (linux_wait_for_process): Always set last_status.
11530 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
11531 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
11532 * linux-low.h (struct process_info): Add last_status.
11533
5ffff7c1
DJ
115342006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
11535
11536 * remote-utils.c (try_rle): New function.
11537 (putpkt_binary): Use it.
11538
8695c747
DJ
115392006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
11540
11541 * Makefile.in (clean): Clean reg-x86-64-linux.c.
11542 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
11543 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
11544 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
11545 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
11546 point registers.
11547
290fadea
RS
115482006-08-08 Richard Sandiford <richard@codesourcery.com>
11549
11550 * server.c (terminal_fd): New variable.
11551 (old_foreground_pgrp): Likewise.
11552 (restore_old_foreground_pgrp): New function.
11553 (start_inferior): Record the terminal file descriptor in terminal_fd
11554 and its original foreground group in old_foreground_pgrp. Register
11555 restore_old_foreground_pgrp with atexit().
11556
9f2e1e63
DJ
115572006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
11558
11559 * server.c (handle_query): Correct qPart to qXfer.
11560
b80864fb
DJ
115612006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
11562
11563 * configure.ac: Check for more headers which are missing on
11564 Windows. Automatically supply -lwsock32 and USE_WIN32API.
11565 * configure.srv: Add Cygwin and mingw32.
11566 * remote-utils.c: Don't include headers unconditionally which
11567 are missing on mingw32. Include <winsock.h> for mingw32.
11568 (remote_open): Adjust for mingw32 support. Flush
11569 standard error after writing to it.
11570 (remote_close, putpkt_binary, input_interrupt, block_async_io)
11571 (unblock_async_io, enable_async_io, disable_async_io)
11572 (readchar, getpkt): Update for Winsock support.
11573 (prepare_resume_reply): Expect a protocol signal number.
11574 * server.c: Disable <sys/wait.h> on mingw32.
11575 (start_inferior): Adjust for mingw32 support. Flush
11576 standard error after writing to it.
11577 (attach_inferior): Likewise. Use protocol signal
11578 numbers.
11579 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
11580 and names.
11581 * win32-i386-low.c: New file.
11582 * Makefile.in (XM_CLIBS): Set.
11583 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
11584 (win32-i386-low.o): New dependency rule.
11585 * linux-low.c (linux_wait): Use target signal numbers.
11586 * target.h (struct target_ops): Doc fix.
11587 * server.h (target_signal_to_name): New prototype.
11588 * gdbreplay.c: Don't include headers unconditionally which
11589 are missing on mingw32. Include <winsock.h> for mingw32.
11590 (remote_close, remote_open): Adjust for Winsock support.
11591 * configure, config.in: Regenerated.
11592
0876f84a
DJ
115932006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
11594
11595 * server.c (decode_xfer_read, write_qxfer_response): New.
11596 (handle_query): Take a packet length argument. Handle
11597 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
11598 the qSupported response.
11599 (main): Update call to handle_query.
11600
01f9e8fa
DJ
116012006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
11602
11603 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
11604 (putpkt_binary): Renamed from putpkt and adjusted for binary
11605 data.
11606 (putpkt): New wrapper for putpkt_binary.
11607 (readchar): Don't mask off the high bit.
11608 (decode_X_packet): New function.
11609 * server.c (main): Call putpkt_binary if a handler sets the packet
11610 length. Save the length of the incoming packet. Handle 'X'.
11611 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
11612
be2a5f71
DJ
116132006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
11614
11615 * server.c (handle_query): Handle qSupported.
11616
ea025f5f
DJ
116172006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
11618
11619 * remote-utils.c (all_symbols_looked_up): New variable.
11620 (look_up_one_symbol): Check it.
11621 * server.h (look_up_one_symbol): New declaration.
11622 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
11623
9308fc88
DJ
116242006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
11625
11626 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 11627 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
11628 (PTRACE_GET_THREAD_AREA): Define.
11629 (ps_get_thread_area): New function.
11630
52fb6437
NS
116312006-05-09 Nathan Sidwell <nathan@codesourcery.com>
11632
11633 * configure.srv (m68k*-*-uclinux*): New target.
11634 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
11635 (linux_resume_one_process): Remove extraneous cast.
11636 (linux_read_offsets): New.
11637 (linux_target_op): Add linux_read_offsets on mmuless systems.
11638 * server.c (handle_query): Add qOffsets logic.
11639 * target.h (struct target_ops): Add read_offsets.
11640
21b0f40c
DJ
116412006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
11642
11643 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
11644 (PTRACE_GET_THREAD_AREA): Define.
11645 (ps_get_thread_area): New function.
11646 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
11647 (linux-x86-64-low.o): Update.
11648
0050a760
DJ
116492006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
11650
11651 * configure.ac: Remove checks for prfpregset_t.
11652 * gdb_proc_service.h: New file.
11653 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
11654 new "gdb_proc_service.h".
11655 * proc-service.c: Likewise.
11656 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
11657 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
11658 * Makefile.in (gdb_proc_service_h): Updated.
11659 * configure, config.in: Regenerated.
11660
b92a518e
DJ
116612006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
11662
11663 * remote-utils.c (prepare_resume_reply): Move declaration
11664 of gdb_id_from_wait to the top of the block.
11665
545587ee
DJ
116662006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
11667
11668 * linux-low.c (regsets_store_inferior_registers): Read the regset
11669 from the target before filling it.
11670
9db87ebd
DJ
116712006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
11672
11673 * server.c (attach_inferior): Return SIGTRAP for a successful
11674 attach.
11675
dd24457d
DJ
116762006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
11677
11678 * Makefile.in (OBS): Add version.o.
11679 (STAGESTUFF): Delete.
11680 (version.o): Add dependencies.
11681 (version.c): Replace rule.
11682 (clean): Remove version.c.
11683 * server.c (gdbserver_version): New.
11684 (gdbserver_usage): Use printf.
11685 (main): Handle --version and --help.
11686 * server.h (version, host_name): Add declarations.
11687
6f0f660e
EZ
116882005-12-23 Eli Zaretskii <eliz@gnu.org>
11689
889bf7c5
PA
11690 * linux-arm-low.c:
11691 * linux-arm-low.c:
11692 * inferiors.c:
11693 * i387-fp.h:
11694 * i387-fp.c:
11695 * gdbreplay.c:
11696 * regcache.c:
11697 * proc-service.c:
11698 * mem-break.h:
11699 * mem-break.c:
11700 * linux-x86-64-low.c:
11701 * linux-sh-low.c:
11702 * linux-s390-low.c:
11703 * linux-ppc64-low.c:
11704 * linux-ppc-low.c:
11705 * linux-mips-low.c:
11706 * linux-m68k-low.c:
11707 * linux-m32r-low.c:
11708 * linux-low.h:
11709 * linux-low.c:
11710 * linux-ia64-low.c:
11711 * linux-i386-low.c:
11712 * linux-crisv32-low.c:
11713 * thread-db.c:
11714 * terminal.h:
11715 * target.h:
11716 * target.c:
11717 * server.h:
11718 * server.c:
11719 * remote-utils.c:
11720 * regcache.h:
11721 * utils.c:
11722 * Makefile.in:
11723 * configure.ac:
6f0f660e
EZ
11724 * gdbserver.1: Add (C) after Copyright. Update the FSF
11725 address.
11726
9d1fb177
DJ
117272005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
11728
11729 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
11730 (arm_breakpoint_at): Recognize both breakpoints.
11731 (the_low_target): Use the correct breakpoint instruction.
11732
011a70c2
DJ
117332005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
11734
11735 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
11736 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
11737 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
11738 (the_low_target): Update.
11739
7fb85e41
AS
117402005-10-25 Andreas Schwab <schwab@suse.de>
11741
11742 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
11743
11744 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
11745 (ia64_num_regs): Reduce to 462.
11746
3db0444b
DJ
117472005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
11748
11749 * acinclude.m4: Correct quoting.
11750 * aclocal.m4: Regenerated.
11751
11752 Suggested by SZOKOVACS Robert <szo@ies.hu>:
11753 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
11754 (thread_db_init): Call thread_db_err_str.
11755 * configure.ac: Check for TD_VERSION.
11756 * config.in, configure: Regenerated.
11757
bee0189a
DJ
117582005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11759
11760 * server.h (error, fatal, warning): Add ATTR_FORMAT.
11761
e9d25b98
DJ
117622005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
11763
11764 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
11765 is not available. Define HAVE_PTRACE_GETREGS if it is.
11766 * config.in, configure: Regenerated.
11767 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
11768 * linux-i386-low.c, linux-m68k-low.c: Update to use
11769 HAVE_PTRACE_GETREGS.
11770 * linux-low.c (regsets_fetch_inferior_registers)
11771 (regsets_store_inferior_registers): Only return 0 if we processed
11772 GENERAL_REGS.
11773 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
11774 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
11775
a06660f7
DJ
117762005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
11777
11778 * inferiors.c (struct thread_info): Add gdb_id.
11779 (add_thread): Add gdb_id argument.
11780 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
11781 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
11782 calls to add_thread.
11783 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
11784 * server.c (handle_query): Use thread_to_gdb_id.
11785 (handle_v_cont, main): Use gdb_id_to_thread_id.
11786 * server.h (add_thread): Update prototype.
11787 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
11788 prototypes.
11789
5a1f5858
DJ
117902005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
11791
11792 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
11793 left-padded registers.
11794 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
11795 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
11796
e122f1f5
SE
117972005-07-01 Steve Ellcey <sje@cup.hp.com>
11798
11799 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
11800 * configure: Regenerate.
11801 * config.in: Regenerate.
11802 * server.h (NEED_DECLARATION_STRERROR):
11803 Replace with !HAVE_DECL_STRERROR.
11804
d592fa2f
DJ
118052005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
11806
11807 * linux-low.c (linux_wait, linux_send_signal): Don't test
11808 an unsigned long variable for > 0 if it could be MAX_ULONG.
11809 * server.c (myresume): Likewise.
11810 * target.c (set_desired_inferior): Likewise.
11811
ccbd4912
MK
118122005-06-13 Mark Kettenis <kettenis@gnu.org>
11813
11814 * configure.ac: Simplify and improve check for socklen_t.
11815 * configure, config.in: Regenerate.
11816
f450004a
DJ
118172005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
11818
11819 * acconfig.h: Remove.
11820 * configure.ac: Add a test for socklen_t. Use three-argument
11821 AC_DEFINE throughout.
11822 * config.in: Regenerated using autoheader 2.59.
11823 * configure: Regenerated.
11824
11825 * gdbreplay.c (socklen_t): Provide a default.
11826 (remote_open): Use socklen_t.
11827 * remote-utils.c (socklen_t): Provide a default.
11828 (remote_open): Use socklen_t.
11829 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
11830 unsigned char.
11831
11832 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
11833 char for buffers.
11834 * linux-low.c (linux_read_memory, linux_write_memory)
11835 (linux_read_auxv): Likewise.
11836 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
11837 (check_mem_write): Likewise.
11838 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
11839 Likewise.
11840 * regcache.c (struct inferior_rgcache_data, registers_to_string)
11841 (registers_from_string, register_data): Likewise.
11842 * server.c (handle_query, main): Likewise.
11843 * server.h (convert_ascii_to_int, convert_int_to_ascii)
11844 (decode_M_packet): Likewise.
11845 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
11846 * target.h (struct target_ops): Update read_memory, write_memory,
11847 and read_auxv.
11848 (read_inferior_memory, write_inferior_memory): Update.
11849 * linux-low.h (struct linux_target_ops): Change type of breakpoint
11850 to unsigned char *.
11851 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
11852 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
11853 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
11854 linux-s390-low.c, linux-sh-low.c: Update for changes in
11855 read_inferior_memory and the_low_target->breakpoint.
11856
eee84df1
DJ
118572005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
11858
11859 * Makefile.in (SFILES): Add linux-ppc64-low.c.
11860 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
11861 * configure.srv: Add powerpc64-*-linux*.
11862 * linux-ppc64-low.c: New file.
11863
45b134e5
OF
118642005-05-23 Orjan Friberg <orjanf@axis.com>
11865
11866 * linux-cris-low.c: New file with support for CRIS.
11867 * linux-crisv32-low.c: Ditto for CRISv32.
11868 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
11869 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 11870 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
11871 reg-crisv32.o, and reg-crisv32.c to make rules.
11872 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
11873 recognized targets.
11874
48d93c75
UW
118752005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
11876
11877 * linux-low.c (fetch_register): Ensure buffer size is a multiple
11878 of sizeof (PTRACE_XFER_TYPE).
11879 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
11880
e013ee27
OF
118812005-05-12 Orjan Friberg <orjanf@axis.com>
11882
889bf7c5 11883 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
11884 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
11885 pointers for hardware watchpoint support.
11886 * linux-low.h (struct linux_target_ops): Ditto.
11887 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
11888 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
11889 to linux_target_ops.
11890 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
11891 reply packet.
11892 * server.c (main): Recognize 'Z' and 'z' packets.
11893
b0ded00b
UW
118942005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
11895
11896 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
11897 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
11898 (the_low_target): Add new members.
11899
8643e2ad
DJ
119002005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
11901
11902 * proc-service.c (ps_lgetregs): Search all_processes instead of
11903 all_threads.
11904
fc620387
DJ
119052005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
11906
11907 * server.c (start_inferior): Change return type to int.
11908 (attach_inferior): Change sigptr to int *.
11909 (handle_v_cont, handle_v_requests): Change signal to int *.
11910 (main): Change signal to int.
11911
119122005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
11913
11914 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
11915 * configure.srv: Add m32r*-*-linux*.
11916 * linux-m32r-low.c: New file.
11917
e0e76420
DJ
119182005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
11919
11920 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
11921
a1928bad
DJ
119222005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
11923
11924 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
11925 Take unsigned long arguments for PIDs.
11926 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
11927 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
11928 (wait_for_sigstop, linux_resume_one_process)
11929 (regsets_fetch_inferior_registers, linux_send_signal)
11930 (linux_read_auxv): Likewise. Update the types of variables holding
11931 PIDs. Update format string specifiers.
11932 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
11933 * remote-utils.c (prepare_resume_reply): Likewise.
11934 * server.c (cont_thread, general_thread, step_thread)
11935 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
11936 unsigned long.
11937 (handle_query): Update format specifiers.
11938 (handle_v_cont, main): Use strtoul for thread IDs.
11939 * server.h (struct inferior_list_entry): Use unsigned long for ID.
11940 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
11941 (general_thread, step_thread, thread_from_wait)
11942 (old_thread_from_wait): Update.
11943 * target.h (struct thread_resume): Use unsigned long for THREAD.
11944 (struct target_ops): Use unsigned long for arguments to attach and
11945 thread_alive.
11946
dcdb98d2
DJ
119472005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
11948
11949 * acinclude.m4: Include bfd/bfd.m4 directly.
11950 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
11951 <agriffis@toolchain.org>.
11952 * aclocal.m4, configure: Regenerated.
11953
bec39cab
AC
119542005-01-07 Andrew Cagney <cagney@gnu.org>
11955
11956 * configure.ac: Rename configure.in, require autoconf 2.59.
11957 * configure: Re-generate.
11958
434c4c77
DJ
119592004-12-08 Daniel Jacobowitz <dan@debian.org>
11960
11961 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
11962 LIBS when finished.
11963 * aclocal.m4: Regenerated.
11964 * configure: Regenerated.
11965
db1d3e1b
AS
119662004-11-21 Andreas Schwab <schwab@suse.de>
11967
11968 * linux-m68k-low.c (m68k_num_gregs): Define.
11969 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
11970 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
11971 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
11972 (m68k_breakpoint_at): New. Add to the_low_target.
11973
11974 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
11975 srv_linux_thread_db to yes.
11976
43360365
JB
119772004-10-20 Joel Brobecker <brobecker@gnat.com>
11978
11979 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
11980 (ARCH_SET_FS): Likewise.
11981 (ARCH_GET_FS): Likewise.
11982 (ARCH_GET_GS): Likewise.
11983
fd500816
DJ
119842004-10-16 Daniel Jacobowitz <dan@debian.org>
11985
11986 * linux-i386-low.c (ps_get_thread_area): New.
11987 * linux-x86-64-low.c (ps_get_thread_area): New.
11988 * linux-low.c: Include <sys/syscall.h>.
11989 (linux_kill_one_process): Don't kill the first thread here.
11990 (linux_kill): Kill the first thread here.
11991 (kill_lwp): New function.
11992 (send_sigstop, linux_send_signal): Use it.
11993 * proc-service.c: Clean up #ifdefs.
11994 (fpregset_info): Delete.
11995 (ps_lgetregs): Update and enable implementation.
11996 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
11997 implementations.
11998 * remote-utils.c (struct sym_cache, symbol_cache): New.
11999 (input_interrupt): Print a clearer message.
12000 (async_io_enabled): New variable.
12001 (enable_async_io, disable_async_io): Use it. Update comments.
12002 (look_up_one_symbol): Use the symbol cache.
12003 * thread-db.c (thread_db_look_up_symbols): New function.
12004 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
12005
f6de3c42
DJ
120062004-10-16 Daniel Jacobowitz <dan@debian.org>
12007
12008 * configure.in: Test for -rdynamic.
12009 * configure: Regenerated.
12010 * Makefile (INTERNAL_LDFLAGS): New.
12011 (gdbserver, gdbreplay): Use it.
12012
2c0fc042
AC
120132004-09-02 Andrew Cagney <cagney@gnu.org>
12014
12015 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
12016
075b3282
DJ
120172004-03-23 Daniel Jacobowitz <drow@mvista.com>
12018
12019 * linux-low.c (linux_wait): Clear all_processes list also.
12020
fa6a77dc
DJ
120212004-03-12 Daniel Jacobowitz <drow@mvista.com>
12022
12023 * linux-low.c: Include <errno.h>. Remove extern declaration of
12024 errno.
12025
6d782a97
DJ
120262004-03-12 Daniel Jacobowitz <drow@mvista.com>
12027
12028 * gdbreplay.c, server.h, utils.c: Update copyright years.
12029
3a7fb99b
DJ
120302004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
12031
12032 * server.c (main): Print child status or termination signal from
12033 variable 'signal', not 'sig'.
12034
c3e735a6
DJ
120352004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
12036
12037 * linux-low.c (linux_read_memory): Change return type to
12038 int. Check for and return error from ptrace().
12039 * target.c (read_inferior_memory): Change return type to int. Pass
12040 back return status from the_target->read_memory().
12041 * target.h (struct target_ops): Adapt *read_memory() prototype.
12042 Update comment.
12043 (read_inferior_memory): Adapt prototype.
12044 * server.c (main): Return an error packet if
12045 read_inferior_memory() returns an error.
12046
a59d1c82
DJ
120472004-03-04 Daniel Jacobowitz <drow@mvista.com>
12048
12049 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
12050 Unify with other clean targets.
12051
dc3f8883
DJ
120522004-02-29 Daniel Jacobowitz <drow@mvista.com>
12053
12054 * server.c (handle_v_cont): Call set_desired_inferior.
12055
89a208da
DJ
120562004-02-29 Daniel Jacobowitz <drow@mvista.com>
12057
12058 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
12059
62ea82f5
DJ
120602004-02-29 Daniel Jacobowitz <drow@mvista.com>
12061
12062 * linux-low.c (linux_wait): Unblock async I/O.
12063 (linux_resume): Block and enable async I/O.
12064 * remote-utils.c (block_async_io, unblock_async_io): New functions.
12065 * server.h (block_async_io, unblock_async_io): Add prototypes.
12066
6910d122
DJ
120672004-02-29 Daniel Jacobowitz <drow@mvista.com>
12068
12069 * remote-utils.c (remote_open): Print a status notice after
12070 opening a TCP port.
12071 * server.c (attach_inferior): Print a status notice after
12072 attaching.
12073
120742004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
12075
12076 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
12077
c89dc5d4
DJ
120782004-02-26 Daniel Jacobowitz <drow@mvista.com>
12079
12080 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
12081 error packet.
12082 * server.c, target.h: Update copyright years.
12083
4b8dad4a
RM
120842004-02-25 Roland McGrath <roland@redhat.com>
12085
12086 * target.h (struct target_ops): New member `read_auxv'.
12087 * server.c (handle_query): Handle qPart:auxv:read: query using that.
12088 * linux-low.c (linux_read_auxv): New function.
12089 (linux_target_ops): Initialize `read_auxv' member to that.
12090
d7446758
JB
120912004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
12092
12093 Committed by Jim Blandy <jimb@redhat.com>.
12094
12095 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 12096 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
12097 instead of GPR_SIZE to distiguish s390 and s390x targets.
12098
5544ad89
DJ
120992004-01-31 Daniel Jacobowitz <drow@mvista.com>
12100
12101 * linux-low.c: Update copyright year.
12102 (check_removed_breakpoint): Clear pending_is_breakpoint.
12103 (linux_set_resume_request, linux_queue_one_thread)
12104 (resume_status_pending_p): New functions.
12105 (linux_continue_one_thread): Use process->resume.
12106 (linux_resume): Only resume threads if there are no pending events.
12107 * linux-low.h (struct process_info): Add resume request
12108 pointer.
12109
2a68b70e
DJ
121102004-01-30 Daniel Jacobowitz <drow@mvista.com>
12111
12112 * regcache.c (new_register_cache): Clear the allocated register
12113 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
12114
64386c31
DJ
121152003-10-13 Daniel Jacobowitz <drow@mvista.com>
12116
12117 * linux-low.c (linux_resume): Take a struct thread_resume *
12118 argument.
12119 (linux_wait): Update call.
12120 (resume_ptr): New static variable.
12121 (linux_continue_one_thread): Renamed from
12122 linux_continue_one_process. Use resume_ptr.
12123 (linux_resume): Use linux_continue_one_thread.
12124 * server.c (handle_v_cont, handle_v_requests): New functions.
12125 (myresume): New function.
12126 (main): Handle 'v' case.
12127 * target.h (struct thread_resume): New type.
12128 (struct target_ops): Change argument of "resume" to struct
12129 thread_resume *.
12130 (myresume): Delete macro.
12131
c938e9b0
L
121322003-08-08 H.J. Lu <hongjiu.lu@intel.com>
12133
12134 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
12135 (uninstall): Support DESTDIR.
12136
7f313d07
BC
12137Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
12138
12139 * configure.srv: Add xscale*linux copy of arm*linux entry.
12140
3b2fc2ea
DJ
121412003-07-24 Daniel Jacobowitz <drow@mvista.com>
12142
12143 * linux-arm-low.c (arm_reinsert_addr): New function.
12144 (the_low_target): Add arm_reinsert_addr.
12145
1c0a559e
MK
121462003-07-08 Mark Kettenis <kettenis@gnu.org>
12147
12148 * mem-break.c: Remove whitespace at end of file.
12149
43d5792c
DJ
121502003-06-28 Daniel Jacobowitz <drow@mvista.com>
12151
12152 * configure.in: Check whether we need to prototype strerror.
12153 * server.h: Optionally prototype strerror.
12154 * gdbreplay.c (perror_with_name): Use strerror.
12155 * linux-low.c (linux_attach_lwp): Use strerror.
12156 * utils.c (perror_with_name): Use strerror.
12157 * config.in, configure: Regenerated.
12158
c8a86edf
DJ
121592003-06-28 Daniel Jacobowitz <drow@mvista.com>
12160
12161 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
12162 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
12163
73d37363
DJ
121642003-06-20 Daniel Jacobowitz <drow@mvista.com>
12165
12166 * Makefile.in (SFILES): Update.
12167 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
12168 low-sun3.c: Remove files.
12169
6ad8ae5c
DJ
121702003-06-17 Daniel Jacobowitz <drow@mvista.com>
12171
12172 * linux-low.c: Move comment to linux_thread_alive where it belonged.
12173 (linux_detach_one_process, linux_detach): New functions.
12174 (linux_target_ops): Add linux_detach.
12175 * server.c (main): Handle 'D' packet.
12176 * target.h (struct target_ops): Add "detach" member.
12177 (detach_inferior): Define.
12178
1581182a
MK
121792003-06-13 Mark Kettenis <kettenis@gnu.org>
12180
12181 From Kelley Cook <kelleycook@wideopenwest.com>:
12182 * configure.srv: Accept i[34567]86 variants.
12183
e5379b03
DJ
121842003-06-05 Daniel Jacobowitz <drow@mvista.com>
12185
12186 * linux-low.c (linux_wait_for_event): Correct comment typos.
12187 (linux_resume_one_process): Call check_removed_breakpoint.
12188 (linux_send_signal): New function.
12189 (linux_target_ops): Add linux_send_signal.
12190 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
12191 of kill.
12192 * target.h (struct target_ops): Add send_signal.
12193
2ff29de4
JB
121942003-05-29 Jim Blandy <jimb@redhat.com>
12195
12196 * linux-low.c (usr_store_inferior_registers): Transfer buf in
12197 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
12198 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
12199 away part of the register's value.
12200
254787d4
DJ
122012003-03-26 Daniel Jacobowitz <drow@mvista.com>
12202
12203 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
12204 (linux_wait_for_event, linux_init_signals): Likewise.
12205
94e10508
DJ
122062003-03-17 Daniel Jacobowitz <drow@mvista.com>
12207
12208 * configure.in: Check for stdlib.h.
12209 * configure: Regenerated.
12210 * config.in: Regenerated.
12211
4c0711e0
DJ
122122003-01-04 Andreas Schwab <schwab@suse.de>
12213
12214 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
12215
ef66e766
AC
122162003-01-02 Andrew Cagney <ac131313@redhat.com>
12217
12218 * Makefile.in: Remove obsolete code.
12219
a1358604
DJ
122202002-11-20 Daniel Jacobowitz <drow@mvista.com>
12221
12222 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
12223 defined(PT_FPR0_HI).
12224
23ce3b1c
DJ
122252002-11-17 Stuart Hughes <seh@zee2.com>
12226
12227 * linux-arm-low.c (arm_num_regs): Increase.
12228 (arm_regmap): Include status register.
12229
122302002-11-17 Daniel Jacobowitz <drow@mvista.com>
12231
12232 * linux-low.c (register_addr): Remove incorrect -1 check.
12233
a9fa9f7d
DJ
122342002-08-29 Daniel Jacobowitz <drow@mvista.com>
12235
12236 * linux-low.c (linux_create_inferior): Call setpgid. Return
12237 the new PID.
12238 (unstopped_p, linux_signal_pid): Remove.
12239 (linux_target_ops): Remove linux_signal_pid.
12240 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
12241 global instead of target method.
12242 * target.h (struct target_ops): Remove signal_pid. Update comment
12243 for create_inferior.
12244 * server.c (signal_pid): New variable.
12245 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 12246 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
12247 (attach_inferior): Set signal_pid.
12248
17574093
DJ
122492002-08-23 Daniel Jacobowitz <drow@mvista.com>
12250
12251 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
12252
122532002-08-20 Jim Blandy <jimb@redhat.com>
12254
12255 * Makefile.in (LDFLAGS): Allow the configure script to establish a
12256 default for this.
12257
122582002-08-01 Andrew Cagney <cagney@redhat.com>
12259
12260 * Makefile.in: Make chill references obsolete.
12261
122622002-07-24 Kevin Buettner <kevinb@redhat.com>
12263
12264 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
12265 * configure: Regenerate.
12266 * config.in: Regenerate.
12267
122682002-07-09 David O'Brien <obrien@FreeBSD.org>
12269
12270 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
12271 (perror_with_name, remote_close, remote_open, expect, play): Static.
12272
122732002-07-04 Michal Ludvig <mludvig@suse.cz>
12274
4b8dad4a 12275 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
12276 byte offsets instead of an array of indexes.
12277 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
12278
122792002-06-13 Daniel Jacobowitz <drow@mvista.com>
12280
12281 * regcache.c: Add comment.
12282
122832002-06-11 Daniel Jacobowitz <drow@mvista.com>
12284
12285 * thread-db.c: New file.
12286 * proc-service.c: New file.
12287 * acinclude.m4: New file.
12288 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
12289 proc-service.o, and thread-db.o.
12290 (linux-low.o): Add USE_THREAD_DB.
12291 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
12292 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
12293 * aclocal.m4: Regenerated.
12294 * config.in: Regenerated.
12295 * configure: Regenerated.
12296 * configure.in: Check for proc_service.h, sys/procfs.h,
12297 thread_db.h, and linux/elf.h headrs.
12298 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
12299 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
12300 Check for -lthread_db and thread support.
12301 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
12302 PowerPC, and SuperH.
12303 * i387-fp.c: Constify arguments.
12304 * i387-fp.h: Likewise.
12305 * inferiors.c: (struct thread_info): Renamed from
12306 `struct inferior_info'. Remove PID member. Use generic inferior
12307 list header. All uses updated.
12308 (inferiors, signal_pid): Removed.
12309 (all_threads): New variable.
12310 (get_thread): Define.
12311 (add_inferior_to_list): New function.
12312 (for_each_inferior): New function.
12313 (change_inferior_id): New function.
12314 (add_inferior): Removed.
12315 (remove_inferior): New function.
12316 (add_thread): New function.
12317 (free_one_thread): New function.
12318 (remove_thread): New function.
12319 (clear_inferiors): Use for_each_inferior and free_one_thread.
12320 (find_inferior): New function.
12321 (find_inferior_id): New function.
12322 (inferior_target_data): Update argument type.
12323 (set_inferior_target_data): Likewise.
12324 (inferior_regcache_data): Likewise.
12325 (set_inferior_regcache_data): Likewise.
12326 * linux-low.c (linux_bp_reinsert): Remove.
12327 (all_processes, stopping_threads, using_thrads)
12328 (struct pending_signals, debug_threads, pid_of): New.
12329 (inferior_pid): Replace with macro.
12330 (struct inferior_linux_data): Remove.
12331 (get_stop_pc, add_process): New functions.
12332 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
12333 Use add_process and add_thread.
12334 (linux_attach_lwp): New function, based on old linux_attach. Use
12335 add_process and add_thread. Set stop_expected for new threads.
12336 (linux_attach): New function.
12337 (linux_kill_one_process): New function.
12338 (linux_kill): Kill all LWPs.
12339 (linux_thread_alive): Use find_inferior_id.
12340 (check_removed_breakpoints, status_pending_p): New functions.
12341 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
12342 Update. Use WNOHANG. Wait for cloned processes also. Update process
12343 struct for the found process.
12344 (linux_wait_for_event): New function.
12345 (linux_wait): Use it. Support LWPs.
12346 (send_sigstop, wait_for_sigstop, stop_all_processes)
12347 (linux_resume_one_process, linux_continue_one_process): New functions.
12348 (linux_resume): Support LWPs.
12349 (REGISTER_RAW_SIZE): Remove.
12350 (fetch_register): Use register_size instead. Call supply_register.
12351 (usr_store_inferior_registers): Likewise. Call collect_register.
12352 Fix recursive case.
12353 (regsets_fetch_inferior_registers): Improve error message.
12354 (regsets_store_inferior_registers): Add debugging.
12355 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
12356 (unstopped_p, linux_signal_pid): New functions.
12357 (linux_target_ops): Add linux_signal_pid.
12358 (linux_init_signals): New function.
12359 (initialize_low): Call it. Initialize using_threads.
12360 * regcache.c (inferior_regcache_data): Add valid
12361 flag.
12362 (get_regcache): Fetch registers lazily. Add fetch argument
12363 and update all callers.
12364 (regcache_invalidate_one, regcache_invalidate): New
12365 functions.
12366 (new_register_cache): Renamed from create_register_cache.
12367 Return the new regcache.
12368 (free_register_cache): Change argument to a void *.
12369 (registers_to_string, registers_from_string): Call get_regcache
12370 with fetch flag set.
12371 (register_data): Make static. Pass fetch flag to get_regcache.
12372 (supply_register): Call get_regcache with fetch flag clear.
12373 (collect_register): Call get_regcache with fetch flag set.
12374 (collect_register_as_string): New function.
12375 * regcache.h: Update.
12376 * remote-utils.c (putpkt): Flush after debug output and use
12377 stderr.
12378 Handle input interrupts while waiting for an ACK.
12379 (input_interrupt): Use signal_pid method.
12380 (getpkt): Flush after debug output and use stderr.
12381 (outreg): Use collect_register_as_string.
12382 (new_thread_notify, dead_thread_notify): New functions.
12383 (prepare_resume_reply): Check using_threads. Set thread_from_wait
12384 and general_thread.
12385 (look_up_one_symbol): Flush after debug output.
12386 * server.c (step_thread, server_waiting): New variables.
12387 (start_inferior): Don't use signal_pid. Update call to mywait.
12388 (attach_inferior): Update call to mywait.
12389 (handle_query): Handle qfThreadInfo and qsThreadInfo.
12390 (main): Don't fetch/store registers explicitly. Use
12391 set_desired_inferior. Support proposed ``Hs'' packet. Update
12392 calls to mywait.
12393 * server.h: Update.
12394 (struct inferior_list, struct_inferior_list_entry): New.
12395 * target.c (set_desired_inferior): New.
12396 (write_inferior_memory): Constify.
12397 (mywait): New function.
12398 * target.h: Update.
12399 (struct target_ops): New signal_pid method.
12400 (mywait): Removed macro, added prototype.
12401
12402 * linux-low.h (regset_func): Removed.
12403 (regset_fill_func, regset_store_func): New.
12404 (enum regset_type): New.
12405 (struct regset_info): Add type field. Use new operation types.
12406 (struct linux_target_ops): stop_pc renamed to get_pc.
12407 Add decr_pc_after_break and breakpoint_at.
12408 (get_process, get_thread_proess, get_process_thread)
12409 (strut process_info, all_processes, linux_attach_lwp)
12410 (thread_db_init): New.
12411
12412 * linux-arm-low.c (arm_get_pc, arm_set_pc,
12413 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
12414 (the_low_target): Add new members.
12415 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
12416 (i386_store_fpxregset): Constify.
12417 (target_regsets): Add new kind identifier.
12418 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
12419 (i386_set_pc): Add debugging.
12420 (i386_breakpoint_at): New function.
12421 (the_low_target): Add new members.
12422 * linux-mips-low.c (mips_get_pc, mips_set_pc)
12423 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
12424 (mips_breakpoint_at): New.
12425 (the_low_target): Add new members.
12426 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
12427 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
12428 (the_low_target): Add new members.
12429 * linux-sh-low.c (sh_get_pc, sh_set_pc)
12430 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
12431 (the_low_target): Add new members.
12432 * linux-x86-64-low.c (target_regsets): Add new kind
12433 identifier.
12434
124352002-05-15 Daniel Jacobowitz <drow@mvista.com>
12436
12437 From Martin Pool <mbp@samba.org>:
12438 * server.c (gdbserver_usage): New function.
12439 (main): Call it.
12440
124412002-05-14 Daniel Jacobowitz <drow@mvista.com>
12442
12443 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
12444 stop_at -> stop_pc.
12445
124462002-05-04 Andrew Cagney <ac131313@redhat.com>
12447
12448 * Makefile.in: Remove obsolete code.
12449
124502002-04-24 Michal Ludvig <mludvig@suse.cz>
12451
12452 * linux-low.c (regsets_fetch_inferior_registers),
12453 (regsets_store_inferior_registers): Removed cast to int from
12454 ptrace() calls.
12455 * regcache.h: Added declaration of struct inferior_info.
12456
124572002-04-20 Daniel Jacobowitz <drow@mvista.com>
12458
12459 * inferiors.c (struct inferior_info): Add regcache_data.
12460 (add_inferior): Call create_register_cache.
12461 (clear_inferiors): Call free_register_cache.
12462 (inferior_regcache_data, set_inferior_regcache_data): New functions.
12463 * regcache.c (struct inferior_regcache_data): New.
12464 (registers): Remove.
12465 (get_regcache): New function.
12466 (create_register_cache, free_register_cache): New functions.
12467 (set_register_cache): Don't initialize the register cache here.
12468 (registers_to_string, registers_from_string, register_data): Call
12469 get_regcache.
12470 * regcache.h: Add prototypes.
12471 * server.h: Likewise.
12472
124732002-04-20 Daniel Jacobowitz <drow@mvista.com>
12474
12475 * mem-break.c: New file.
12476 * mem-break.h: New file.
12477 * Makefile.in: Add mem-break.o rule; update server.h
12478 dependencies.
12479 * inferiors.c (struct inferior_info): Add target_data
12480 member.
12481 (clear_inferiors): Free target_data member if set.
12482 (inferior_target_data, set_inferior_target_data): New functions.
12483 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
12484 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
12485 * linux-low.c (linux_bp_reinsert): New variable.
12486 (struct inferior_linux_data): New.
12487 (linux_create_inferior): Use set_inferior_target_data.
12488 (linux_attach): Likewise. Call add_inferior.
12489 (linux_wait_for_one_inferior): New function.
12490 (linux_wait): Call it.
12491 (linux_write_memory): Add const.
12492 (initialize_low): Call set_breakpoint_data.
12493 * linux-low.h (struct linux_target_ops): Add breakpoint
12494 handling members.
12495 * server.c (attach_inferior): Remove extra add_inferior
12496 call.
12497 * server.h: Include mem-break.h. Update inferior.c
12498 prototypes.
12499 * target.c (read_inferior_memory)
12500 (write_inferior_memory): New functions.
12501 * target.h (read_inferior_memory)
12502 (write_inferior_memory): Change macros to prototypes.
12503 (struct target_ops): Update comments. Add const to write_memory
12504 definition.
12505
125062002-04-11 Daniel Jacobowitz <drow@mvista.com>
12507
12508 * linux-low.c (usr_store_inferior_registers): Support
12509 registers which are allowed to fail to store.
12510 * linux-low.h (linux_target_ops): Likewise.
12511 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
12512 (ppc_cannot_store_register): FPSCR may not be storable.
12513
125142002-04-09 Daniel Jacobowitz <drow@mvista.com>
12515
12516 * server.h: Include <string.h> if HAVE_STRING_H.
12517 * ChangeLog: Correct paths in last ChangeLog entry.
12518
125192002-04-09 Daniel Jacobowitz <drow@mvista.com>
12520
12521 * linux-low.h: Remove obsolete prototypes.
12522 (struct linux_target_ops): New.
12523 (extern the_low_target): New.
12524 * linux-low.c (num_regs, regmap): Remove declarations.
12525 (register_addr): Use the_low_target explicitly.
12526 (fetch_register): Likewise.
12527 (usr_fetch_inferior_registers): Likewise.
12528 (usr_store_inferior_registers): Likewise.
12529 * linux-arm-low.c (num_regs): Remove.
12530 (arm_num_regs): Define.
12531 (arm_regmap): Renamed from regmap, made static.
12532 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
12533 made static.
12534 (arm_cannot_store_register): Renamed from cannot_store_register,
12535 made static.
12536 (the_low_target): New.
12537 * linux-i386-low.c (num_regs): Remove.
12538 (i386_num_regs): Define.
12539 (i386_regmap): Renamed from regmap, made static.
12540 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
12541 made static.
12542 (i386_cannot_store_register): Renamed from cannot_store_register,
12543 made static.
12544 (the_low_target): New.
12545 * linux-ia64-low.c (num_regs): Remove.
12546 (ia64_num_regs): Define.
12547 (ia64_regmap): Renamed from regmap, made static.
12548 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
12549 made static.
12550 (ia64_cannot_store_register): Renamed from cannot_store_register,
12551 made static.
12552 (the_low_target): New.
12553 * linux-m68k-low.c (num_regs): Remove.
12554 (m68k_num_regs): Define.
12555 (m68k_regmap): Renamed from regmap, made static.
12556 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
12557 made static.
12558 (m68k_cannot_store_register): Renamed from cannot_store_register,
12559 made static.
12560 (the_low_target): New.
12561 * linux-mips-low.c (num_regs): Remove.
12562 (mips_num_regs): Define.
12563 (mips_regmap): Renamed from regmap, made static.
12564 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
12565 made static.
12566 (mips_cannot_store_register): Renamed from cannot_store_register,
12567 made static.
12568 (the_low_target): New.
12569 * linux-ppc-low.c (num_regs): Remove.
12570 (ppc_num_regs): Define.
12571 (ppc_regmap): Renamed from regmap, made static.
12572 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
12573 made static.
12574 (ppc_cannot_store_register): Renamed from cannot_store_register,
12575 made static.
12576 (the_low_target): New.
12577 * linux-s390-low.c (num_regs): Remove.
12578 (s390_num_regs): Define.
12579 (s390_regmap): Renamed from regmap, made static.
12580 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
12581 made static.
12582 (s390_cannot_store_register): Renamed from cannot_store_register,
12583 made static.
12584 (the_low_target): New.
12585 * linux-sh-low.c (num_regs): Remove.
12586 (sh_num_regs): Define.
12587 (sh_regmap): Renamed from regmap, made static.
12588 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
12589 made static.
12590 (sh_cannot_store_register): Renamed from cannot_store_register,
12591 made static.
12592 (the_low_target): New.
12593 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
12594 (the_low_target): New.
12595
125962002-04-09 Daniel Jacobowitz <drow@mvista.com>
12597
12598 * Makefile.in: Add stamp-h target.
12599 * configure.in: Create stamp-h.
12600 * configure: Regenerated.
12601
126022002-04-09 Daniel Jacobowitz <drow@mvista.com>
12603
12604 * inferiors.c: New file.
12605 * target.c: New file.
12606 * target.h: New file.
12607 * Makefile.in: Add target.o and inferiors.o. Update
12608 dependencies.
12609 * linux-low.c (inferior_pid): New static variable,
12610 moved from server.c.
12611 (linux_create_inferior): Renamed from create_inferior.
12612 Call add_inferior. Return 0 on success instead of a PID.
12613 (linux_attach): Renamed from myattach.
12614 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
12615 (linux_thread_alive): Renamed from mythread_alive.
12616 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
12617 child dies.
12618 (linux_resume): Renamed from myresume. Add missing ``return 0''.
12619 (regsets_store_inferior_registers): Correct error message.
12620 Add missing ``return 0''.
12621 (linux_fetch_registers): Renamed from fetch_inferior_registers.
12622 (linux_store_registers): Renamed from store_inferior_registers.
12623 (linux_read_memory): Renamed from read_inferior_memory.
12624 (linux_write_memory): Renamed from write_inferior_memory.
12625 (linux_target_ops): New structure.
12626 (initialize_low): Call set_target_ops ().
12627 * remote-utils.c (unhexify): New function.
12628 (hexify): New function.
12629 (input_interrupt): Send signals to ``signal_pid''.
12630 * server.c (inferior_pid): Remove.
12631 (start_inferior): Update create_inferior call.
12632 (attach_inferior): Call add_inferior.
12633 (handle_query): New function.
12634 (main): Call handle_query for `q' packets.
12635 * server.h: Include "target.h". Remove obsolete prototypes.
12636 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
12637
126382002-04-09 Daniel Jacobowitz <drow@mvista.com>
12639
12640 * Makefile.in: Add WARN_CFLAGS. Update configury
12641 dependencies.
12642 * configure.in: Check for <string.h>
12643 * configure: Regenerate.
12644 * config.in: Regenerate.
12645 * gdbreplay.c: Include needed system headers.
12646 (remote_open): Remove strchr prototype.
12647 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
12648 * regcache.c (supply_register): Change buf argument to const void *.
12649 (supply_register_by_name): Likewise.
12650 (collect_register): Change buf argument to void *.
12651 (collect_register_by_name): Likewise.
12652 * regcache.h: Add missing prototypes.
12653 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
12654 * server.c (handle_query): New function.
12655 (attached): New static variable, moved out of main.
12656 (main): Quiet longjmp clobber warnings.
12657 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
12658 * utils.c (error): Remove NORETURN.
12659 (fatal): Likewise.