]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/gdbserver/ChangeLog
Add cast to exception_none
[thirdparty/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
682b2546
DE
12015-10-26 Doug Evans <dje@google.com>
2
3 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
4
963843d4
DE
52015-10-26 Doug Evans <dje@google.com>
6
7 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
8
d41401ac
DE
92015-10-26 Doug Evans <dje@google.com>
10
11 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
12 for debug_printf.
13 (attach_thread, find_new_threads_callback): Ditto.
14
3db28855
AT
152015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
16
17 * mem-break.h (set_breakpoint_data): Remove.
18
fb78e89c
AT
192015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
20
21 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
22 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
23 (initialize_low): Remove set_breakpoint_data call.
24 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
25 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
26 (initialize_low): Remove set_breakpoint_data call.
27 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
28 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
29 (initialize_low): Remove set_breakpoint_data call.
30
2e6ee069
AT
312015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
32
33 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
34 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
35 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
36 * target.h (target_breakpoint_kind_from_pc): New macro.
37
1652a986
AT
382015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
39
40 * linux-low.c (default_breakpoint_kind_from_pc): New function.
41 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
42 the default breakpoint kind.
43
abeead09
AT
442015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
45
46 * linux-arm-low.c (arm_supports_z_point_type): Add software
47 breakpoint support.
48
b0b4b501
AT
492015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
50
51 * linux-arm-low.c: Refactor breakpoint definitions.
52 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
53 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
54
8689682c
AT
552015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
56
57 * Makefile.in: Add arm.c/o.
58 * configure.srv: Likewise.
59 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
60 (arm_breakpoint_kind_from_pc): New function.
61 (arm_sw_breakpoint_from_kind): Return proper kind.
62 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
63
27165294
AT
642015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
65
66 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
67 removal.
68 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
69 (struct raw_breakpoint) <size>: Remove.
70 (struct raw_breakpoint) <kind>: Add.
71 (bp_size): New function.
72 (bp_opcode): Likewise.
73 (find_raw_breakpoint_at): Adjust for kind.
74 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
75 (remove_memory_breakpoint): Adjust for kind call bp_size.
76 (set_raw_breakpoint_at): Adjust for kind.
77 (set_breakpoint): Likewise.
78 (set_breakpoint_at): Call breakpoint_kind_from_pc.
79 (delete_raw_breakpoint): Adjust for kind.
80 (delete_breakpoint): Likewise.
81 (find_gdb_breakpoint): Likewise.
82 (set_gdb_breakpoint_1): Likewise.
83 (set_gdb_breakpoint): Likewise.
84 (delete_gdb_breakpoint_1): Likewise.
85 (delete_gdb_breakpoint): Likewise.
86 (uninsert_raw_breakpoint): Likewise.
87 (reinsert_raw_breakpoint): Likewise.
88 (set_breakpoint_data): Remove.
89 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
90 (check_mem_read): Adjust for kind call bp_size.
91 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
92 (clone_one_breakpoint): Adjust for kind.
93 * mem-break.h (set_gdb_breakpoint): Likewise.
94 (delete_gdb_breakpoint): Likewise.
95 * server.c (process_serial_event): Likewise.
96
dd373349
AT
972015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
98
99 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
100 (struct linux_target_ops) <breakpoint>: Remove.
101 (struct linux_target_ops) <breakpoint_len>: Remove.
102 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
103 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
104 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
105 (arm_sw_breakpoint_from_kind): New function.
106 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
107 (struct linux_target_ops) <breakpoint>: Remove.
108 (struct linux_target_ops) <breakpoint_len>: Remove.
109 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
110 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
111 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
112 (struct linux_target_ops) <breakpoint>: Remove.
113 (struct linux_target_ops) <breakpoint_len>: Remove.
114 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
115 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
116 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
117 (struct linux_target_ops) <breakpoint>: Remove.
118 (struct linux_target_ops) <breakpoint_len>: Remove.
119 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
120 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
121 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
122 and sw_breakpoint_from_kind to increment the pc.
123 (linux_breakpoint_kind_from_pc): New function.
124 (linux_sw_breakpoint_from_kind): New function.
125 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
126 (initialize_low): Call breakpoint_kind_from_pc and
127 sw_breakpoint_from_kind to replace breakpoint_data/len.
128 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
129 New field.
130 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
131 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
132 (struct linux_target_ops) <breakpoint>: Remove.
133 (struct linux_target_ops) <breakpoint_len>: Remove.
134 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
135 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
136 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
137 (struct linux_target_ops) <breakpoint>: Remove.
138 (struct linux_target_ops) <breakpoint_len>: Remove.
139 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
140 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
141 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
142 (struct linux_target_ops) <breakpoint>: Remove.
143 (struct linux_target_ops) <breakpoint_len>: Remove.
144 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
145 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
146 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
147 (struct linux_target_ops) <breakpoint>: Remove.
148 (struct linux_target_ops) <breakpoint_len>: Remove.
149 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
150 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
151 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
152 (struct linux_target_ops) <breakpoint>: Remove.
153 (struct linux_target_ops) <breakpoint_len>: Remove.
154 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
155 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
156 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
157 (struct linux_target_ops) <breakpoint>: Remove.
158 (struct linux_target_ops) <breakpoint_len>: Remove.
159 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
160 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
161 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
162 (struct linux_target_ops) <breakpoint>: Remove.
163 (struct linux_target_ops) <breakpoint_len>: Remove.
164 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
165 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
166 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
167 (struct linux_target_ops) <breakpoint>: Remove.
168 (struct linux_target_ops) <breakpoint_len>: Remove.
169 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
170 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
171 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
172 (struct linux_target_ops) <breakpoint>: Remove.
173 (struct linux_target_ops) <breakpoint_len>: Remove.
174 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
175 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
176 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
177 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
178 (struct linux_target_ops) <breakpoint>: Remove.
179 (struct linux_target_ops) <breakpoint_len>: Remove.
180 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
181 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
182 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
183 (struct linux_target_ops) <breakpoint>: Remove.
184 (struct linux_target_ops) <breakpoint_len>: Remove.
185 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
186 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
187
4cd98a19
AT
1882015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
189
190 * linux-cris-low.c (cris_get_pc): Remove void arg.
191
774ee6d2
AR
1922015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
193
194 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
195 variable name.
196
833dcd29
AR
1972015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
198
199 * inferiors.c (thread_pid_matches_callback): New function.
200 (find_thread_process): New function.
201 (remove_thread): Reset current_thread.
202 (remove_process): Assert threads have been removed first.
203
8d689ee5
YQ
2042015-10-15 Yao Qi <yao.qi@linaro.org>
205
206 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
207 if it is 3.
208 (aarch64_remove_point): Likewise.
209 * regcache.c (regcache_register_size): New function.
210
1c2e1515
YQ
2112015-10-12 Yao Qi <yao.qi@linaro.org>
212
213 * linux-aarch64-low.c: Update all callers as emit_load_store
214 is renamed to aarch64_emit_load_store.
215
e1c587c3
YQ
2162015-10-12 Yao Qi <yao.qi@linaro.org>
217
218 * linux-aarch64-low.c: Update all callers of function renaming
219 from emit_insn to aarch64_emit_insn.
220
b6542f81
YQ
2212015-10-12 Yao Qi <yao.qi@linaro.org>
222
223 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
224 arch/aarch64-insn.h.
225 (struct aarch64_memory_operand): Likewise.
226 (ENCODE): Likewise.
227 (emit_insn): Move to arch/aarch64-insn.c.
228 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
229 (emit_load_store): Move to arch/aarch64-insn.c.
230 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
231 (can_encode_int32): Remove.
232
246994ce
YQ
2332015-10-12 Yao Qi <yao.qi@linaro.org>
234
235 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
236 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
237 (aarch64_relocate_instruction): Likewise.
238 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
239 (struct aarch64_insn_visitor): Likewise.
240
0badd99f
YQ
2412015-10-12 Yao Qi <yao.qi@linaro.org>
242
243 * linux-aarch64-low.c (struct aarch64_insn_data): New.
244 (struct aarch64_insn_visitor): New.
245 (struct aarch64_insn_relocation_data): New.
246 (aarch64_ftrace_insn_reloc_b): New function.
247 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
248 (aarch64_ftrace_insn_reloc_cb): Likewise.
249 (aarch64_ftrace_insn_reloc_tb): Likewise.
250 (aarch64_ftrace_insn_reloc_adr): Likewise.
251 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
252 (aarch64_ftrace_insn_reloc_others): Likewise.
253 (visitor): New.
254 (aarch64_relocate_instruction): Use visitor.
255
dfaffe9d
YQ
2562015-10-12 Yao Qi <yao.qi@linaro.org>
257
258 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
259 int. Add argument buf.
260 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
261 aarch64_relocate_instruction.
262
70b439f0
YQ
2632015-10-12 Yao Qi <yao.qi@linaro.org>
264
265 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
266 argument insn. Remove local variable insn. Don't call
267 target_read_uint32.
268 (aarch64_install_fast_tracepoint_jump_pad): Call
269 target_read_uint32.
270
7781c06f
YQ
2712015-09-30 Yao Qi <yao.qi@linaro.org>
272
273 * linux-aarch64-low.c (emit_movk): Shorten a long line.
274 (emit_load_store_pair): Likewise.
275
9a3c8263
SM
2762015-09-25 Simon Marchi <simon.marchi@ericsson.com>
277
278 * dll.c (match_dll): Add cast(s).
279 (unloaded_dll): Likewise.
280 * linux-low.c (second_thread_of_pid_p): Likewise.
281 (delete_lwp_callback): Likewise.
282 (count_events_callback): Likewise.
283 (select_event_lwp_callback): Likewise.
284 (linux_set_resume_request): Likewise.
285 * server.c (accumulate_file_name_length): Likewise.
286 (emit_dll_description): Likewise.
287 (handle_qxfer_threads_worker): Likewise.
288 (visit_actioned_threads): Likewise.
289 * thread-db.c (any_thread_of): Likewise.
290 * tracepoint.c (same_process_p): Likewise.
291 (match_blocktype): Likewise.
292 (build_traceframe_info_xml): Likewise.
293
224c3ddb
SM
2942015-09-25 Simon Marchi <simon.marchi@ericsson.com>
295
296 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
297 assignment.
298 (gdb_unparse_agent_expr): Likewise.
299 * hostio.c (require_data): Likewise.
300 (handle_pread): Likewise.
301 * linux-low.c (disable_regset): Likewise.
302 (fetch_register): Likewise.
303 (store_register): Likewise.
304 (get_dynamic): Likewise.
305 (linux_qxfer_libraries_svr4): Likewise.
306 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
307 (set_fast_tracepoint_jump): Likewise.
308 (uninsert_fast_tracepoint_jumps_at): Likewise.
309 (reinsert_fast_tracepoint_jumps_at): Likewise.
310 (validate_inserted_breakpoint): Likewise.
311 (clone_agent_expr): Likewise.
312 * regcache.c (init_register_cache): Likewise.
313 * remote-utils.c (putpkt_binary_1): Likewise.
314 (decode_M_packet): Likewise.
315 (decode_X_packet): Likewise.
316 (look_up_one_symbol): Likewise.
317 (relocate_instruction): Likewise.
318 (monitor_output): Likewise.
319 * server.c (handle_search_memory): Likewise.
320 (handle_qxfer_exec_file): Likewise.
321 (handle_qxfer_libraries): Likewise.
322 (handle_qxfer): Likewise.
323 (handle_query): Likewise.
324 (handle_v_cont): Likewise.
325 (handle_v_run): Likewise.
326 (captured_main): Likewise.
327 * target.c (write_inferior_memory): Likewise.
328 * thread-db.c (try_thread_db_load_from_dir): Likewise.
329 * tracepoint.c (init_trace_buffer): Likewise.
330 (add_tracepoint_action): Likewise.
331 (add_traceframe): Likewise.
332 (add_traceframe_block): Likewise.
333 (cmd_qtdpsrc): Likewise.
334 (cmd_qtdv): Likewise.
335 (cmd_qtstatus): Likewise.
336 (response_source): Likewise.
337 (response_tsv): Likewise.
338 (cmd_qtnotes): Likewise.
339 (gdb_collect): Likewise.
340 (initialize_tracepoint): Likewise.
341
afbe19f8
PL
3422015-09-21 Pierre Langlois <pierre.langlois@arm.com>
343
344 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
345 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
346 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
347 <NOP>: New.
348 (enum aarch64_condition_codes): New enum.
349 (w0): New static global.
350 (fp): Likewise.
351 (lr): Likewise.
352 (struct aarch64_memory_operand) <type>: New
353 MEMORY_OPERAND_POSTINDEX type.
354 (postindex_memory_operand): New helper function.
355 (emit_ret): New function.
356 (emit_load_store_pair): New function, factored out of emit_stp
357 with support for MEMORY_OPERAND_POSTINDEX.
358 (emit_stp): Rewrite using emit_load_store_pair.
359 (emit_ldp): New function.
360 (emit_load_store): Likewise.
361 (emit_ldr): Mention post-index instruction in comment.
362 (emit_ldrh): New function.
363 (emit_ldrb): New function.
364 (emit_ldrsw): Mention post-index instruction in comment.
365 (emit_str): Likewise.
366 (emit_subs): New function.
367 (emit_cmp): Likewise.
368 (emit_and): Likewise.
369 (emit_orr): Likewise.
370 (emit_orn): Likewise.
371 (emit_eor): Likewise.
372 (emit_mvn): Likewise.
373 (emit_lslv): Likewise.
374 (emit_lsrv): Likewise.
375 (emit_asrv): Likewise.
376 (emit_mul): Likewise.
377 (emit_sbfm): Likewise.
378 (emit_sbfx): Likewise.
379 (emit_ubfm): Likewise.
380 (emit_ubfx): Likewise.
381 (emit_csinc): Likewise.
382 (emit_cset): Likewise.
383 (emit_nop): Likewise.
384 (emit_ops_insns): New helper function.
385 (emit_pop): Likewise.
386 (emit_push): Likewise.
387 (aarch64_emit_prologue): New function.
388 (aarch64_emit_epilogue): Likewise.
389 (aarch64_emit_add): Likewise.
390 (aarch64_emit_sub): Likewise.
391 (aarch64_emit_mul): Likewise.
392 (aarch64_emit_lsh): Likewise.
393 (aarch64_emit_rsh_signed): Likewise.
394 (aarch64_emit_rsh_unsigned): Likewise.
395 (aarch64_emit_ext): Likewise.
396 (aarch64_emit_log_not): Likewise.
397 (aarch64_emit_bit_and): Likewise.
398 (aarch64_emit_bit_or): Likewise.
399 (aarch64_emit_bit_xor): Likewise.
400 (aarch64_emit_bit_not): Likewise.
401 (aarch64_emit_equal): Likewise.
402 (aarch64_emit_less_signed): Likewise.
403 (aarch64_emit_less_unsigned): Likewise.
404 (aarch64_emit_ref): Likewise.
405 (aarch64_emit_if_goto): Likewise.
406 (aarch64_emit_goto): Likewise.
407 (aarch64_write_goto_address): Likewise.
408 (aarch64_emit_const): Likewise.
409 (aarch64_emit_call): Likewise.
410 (aarch64_emit_reg): Likewise.
411 (aarch64_emit_pop): Likewise.
412 (aarch64_emit_stack_flush): Likewise.
413 (aarch64_emit_zero_ext): Likewise.
414 (aarch64_emit_swap): Likewise.
415 (aarch64_emit_stack_adjust): Likewise.
416 (aarch64_emit_int_call_1): Likewise.
417 (aarch64_emit_void_call_2): Likewise.
418 (aarch64_emit_eq_goto): Likewise.
419 (aarch64_emit_ne_goto): Likewise.
420 (aarch64_emit_lt_goto): Likewise.
421 (aarch64_emit_le_goto): Likewise.
422 (aarch64_emit_gt_goto): Likewise.
423 (aarch64_emit_ge_got): Likewise.
424 (aarch64_emit_ops_impl): New static global variable.
425 (aarch64_emit_ops): New target function, return
426 &aarch64_emit_ops_impl.
427 (struct linux_target_ops): Install it.
428
bb903df0
PL
4292015-09-21 Pierre Langlois <pierre.langlois@arm.com>
430
431 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
432 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
433 aarch64-ipa.o.
434 * linux-aarch64-ipa.c: New file.
435 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
436 and endian.h.
437 (aarch64_get_thread_area): New target method.
438 (extract_signed_bitfield): New helper function.
439 (aarch64_decode_ldr_literal): New function.
440 (enum aarch64_opcodes): New enum.
441 (struct aarch64_register): New struct.
442 (struct aarch64_operand): New struct.
443 (x0): New static global.
444 (x1): Likewise.
445 (x2): Likewise.
446 (x3): Likewise.
447 (x4): Likewise.
448 (w2): Likewise.
449 (ip0): Likewise.
450 (sp): Likewise.
451 (xzr): Likewise.
452 (aarch64_register): New helper function.
453 (register_operand): Likewise.
454 (immediate_operand): Likewise.
455 (struct aarch64_memory_operand): New struct.
456 (offset_memory_operand): New helper function.
457 (preindex_memory_operand): Likewise.
458 (enum aarch64_system_control_registers): New enum.
459 (ENCODE): New macro.
460 (emit_insn): New helper function.
461 (emit_b): New function.
462 (emit_bcond): Likewise.
463 (emit_cb): Likewise.
464 (emit_tb): Likewise.
465 (emit_blr): Likewise.
466 (emit_stp): Likewise.
467 (emit_ldp_q_offset): Likewise.
468 (emit_stp_q_offset): Likewise.
469 (emit_load_store): Likewise.
470 (emit_ldr): Likewise.
471 (emit_ldrsw): Likewise.
472 (emit_str): Likewise.
473 (emit_ldaxr): Likewise.
474 (emit_stxr): Likewise.
475 (emit_stlr): Likewise.
476 (emit_data_processing_reg): Likewise.
477 (emit_data_processing): Likewise.
478 (emit_add): Likewise.
479 (emit_sub): Likewise.
480 (emit_mov): Likewise.
481 (emit_movk): Likewise.
482 (emit_mov_addr): Likewise.
483 (emit_mrs): Likewise.
484 (emit_msr): Likewise.
485 (emit_sevl): Likewise.
486 (emit_wfe): Likewise.
487 (append_insns): Likewise.
488 (can_encode_int32_in): New helper function.
489 (aarch64_relocate_instruction): New function.
490 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
491 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
492 (struct linux_target_ops): Install aarch64_get_thread_area,
493 aarch64_install_fast_tracepoint_jump_pad and
494 aarch64_get_min_fast_tracepoint_insn_len.
495
787749ea
PL
4962015-09-21 Pierre Langlois <pierre.langlois@arm.com>
497
498 * Makefile.in (aarch64-insn.o): New rule.
499 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
500
9812b2e6
YQ
5012015-09-21 Yao Qi <yao.qi@linaro.org>
502
503 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
504
18fe412b
YQ
5052015-09-21 Yao Qi <yao.qi@linaro.org>
506
507 * tracepoint.c (max_jump_pad_size): Remove.
508
a0cc84cd
YQ
5092015-09-18 Yao Qi <yao.qi@linaro.org>
510
511 * linux-aarch64-low.c: Don't include sys/uio.h.
512 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
513
d78908cf
WW
5142015-09-16 Wei-cheng Wang <cole945@gmail.com>
515
516 * tracepoint.c (eval_result_type): Change prototype.
517 (condition_true_at_tracepoint): Fix argument to compiled_cond.
518
d57e0d50
PA
5192015-09-15 Pedro Alves <palves@redhat.com>
520
521 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
522 Check whether to report exec events instead of checking whether
523 multiprocess is enabled.
524
5a676acc
PA
5252015-09-15 Pedro Alves <palves@redhat.com>
526
527 PR remote/18965
528 * remote-utils.c (prepare_resume_reply): Merge
529 TARGET_WAITKIND_VFORK_DONE switch case with the
530 TARGET_WAITKIND_FORKED case.
531
7c5d0fad
YQ
5322015-09-15 Yao Qi <yao.qi@linaro.org>
533
534 * server.c (handle_query): Check string comparison using
535 "else if" instead of "if".
536
750ce8d1
YQ
5372015-09-15 Yao Qi <yao.qi@linaro.org>
538
539 * server.c (vCont_supported): New global variable.
540 (handle_query): Set vCont_supported to 1 if "vContSupported+"
541 matches. Append ";vContSupported+" to own_buf.
542 (handle_v_requests): Append ";s;S" to own_buf if target supports
543 hardware single step or vCont_supported is false.
544 (capture_main): Set vCont_supported to zero.
545
70b90b91
YQ
5462015-09-15 Yao Qi <yao.qi@linaro.org>
547
548 * linux-low.c (linux_supports_conditional_breakpoints): Rename
549 it to ...
550 (linux_supports_hardware_single_step): ... New function.
551 (linux_target_ops): Update.
552 * lynx-low.c (lynx_target_ops): Set field
553 supports_hardware_single_step to target_can_do_hardware_single_step.
554 * nto-low.c (nto_target_ops): Likewise.
555 * spu-low.c (spu_target_ops): Likewise.
556 * win32-low.c (win32_target_ops): Likewise.
557 * target.c (target_can_do_hardware_single_step): New function.
558 * target.h (struct target_ops) <supports_conditional_breakpoints>:
559 Remove. <supports_hardware_single_step>: New field.
560 (target_supports_conditional_breakpoints): Remove.
561 (target_supports_hardware_single_step): New macro.
562 (target_can_do_hardware_single_step): Declare.
563 * server.c (handle_query): Use target_supports_hardware_single_step
564 instead of target_supports_conditional_breakpoints.
565
ade90bde
YQ
5662015-09-15 Yao Qi <yao.qi@linaro.org>
567
568 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
569 function.
570 (struct linux_target_ops the_low_target): Install
571 aarch64_linux_siginfo_fixup.
572
94585166
DB
5732015-09-11 Don Breazeal <donb@codesourcery.com>
574 Luis Machado <lgustavo@codesourcery.com>
575
576 * linux-low.c (linux_mourn): Static declaration.
577 (linux_arch_setup): Move in front of
578 handle_extended_wait.
579 (linux_arch_setup_thread): New function.
580 (handle_extended_wait): Handle exec events. Call
581 linux_arch_setup_thread. Make event_lwp argument a
582 pointer-to-a-pointer.
583 (check_zombie_leaders): Do not check stopped threads.
584 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
585 (linux_low_filter_event): Add lwp and thread for exec'ing
586 non-leader thread if leader thread has been deleted.
587 Refactor code into linux_arch_setup_thread and call it.
588 Pass child lwp pointer by reference to handle_extended_wait.
589 (linux_wait_for_event_filtered): Update comment.
590 (linux_wait_1): Prevent clobbering exec event status.
591 (linux_supports_exec_events): New function.
592 (linux_target_ops) <supports_exec_events>: Initialize new member.
593 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
594 new member.
595 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
596 * server.c (report_exec_events): New global variable.
597 (handle_query): Handle qSupported query for exec-events feature.
598 (captured_main): Initialize report_exec_events.
599 * server.h (report_exec_events): Declare new global variable.
600 * target.h (struct target_ops) <supports_exec_events>: New
601 member.
602 (target_supports_exec_events): New macro.
603 * win32-low.c (win32_target_ops) <supports_exec_events>:
604 Initialize new member.
605
0568462b
MM
6062015-09-09 Markus Metzger <markus.t.metzger@intel.com>
607
608 * linux-low.c (linux_low_enable_btrace): Remove.
609 (linux_target_ops): Replace linux_low_enable_btrace with
610 linux_enable_btrace.
611
39edd165
YQ
6122015-09-03 Yao Qi <yao.qi@linaro.org>
613
614 * linux-aarch64-low.c (aarch64_insert_point): Call
615 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
616 returns true.
617
1db33b5a
UW
6182015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
619
620 * linux-low.c (check_stopped_by_breakpoint): Use
621 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
622
ab290430
PA
6232015-08-27 Pedro Alves <palves@redhat.com>
624
625 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
626
8d749320
SM
6272015-08-26 Simon Marchi <simon.marchi@ericsson.com>
628
6711b7f8
SM
629 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
630 the XNEW-family equivalent.
8d749320
SM
631 (compile_bytecodes): Likewise.
632 * dll.c (loaded_dll): Likewise.
633 * event-loop.c (append_callback_event): Likewise.
634 (create_file_handler): Likewise.
635 (create_file_event): Likewise.
636 * hostio.c (handle_open): Likewise.
637 * inferiors.c (add_thread): Likewise.
638 (add_process): Likewise.
639 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
640 * linux-arm-low.c (arm_new_process): Likewise.
641 (arm_new_thread): Likewise.
642 * linux-low.c (add_to_pid_list): Likewise.
643 (linux_add_process): Likewise.
644 (handle_extended_wait): Likewise.
645 (add_lwp): Likewise.
646 (enqueue_one_deferred_signal): Likewise.
647 (enqueue_pending_signal): Likewise.
648 (linux_resume_one_lwp_throw): Likewise.
649 (linux_resume_one_thread): Likewise.
650 (linux_read_memory): Likewise.
651 (linux_write_memory): Likewise.
652 * linux-mips-low.c (mips_linux_new_process): Likewise.
653 (mips_linux_new_thread): Likewise.
654 (mips_add_watchpoint): Likewise.
655 * linux-x86-low.c (initialize_low_arch): Likewise.
656 * lynx-low.c (lynx_add_process): Likewise.
657 * mem-break.c (set_raw_breakpoint_at): Likewise.
658 (set_breakpoint): Likewise.
659 (add_condition_to_breakpoint): Likewise.
660 (add_commands_to_breakpoint): Likewise.
661 (clone_agent_expr): Likewise.
662 (clone_one_breakpoint): Likewise.
663 * regcache.c (new_register_cache): Likewise.
664 * remote-utils.c (look_up_one_symbol): Likewise.
665 * server.c (queue_stop_reply): Likewise.
666 (start_inferior): Likewise.
667 (queue_stop_reply_callback): Likewise.
668 (handle_target_event): Likewise.
669 * spu-low.c (fetch_ppc_memory): Likewise.
670 (store_ppc_memory): Likewise.
671 * target.c (set_target_ops): Likewise.
672 * thread-db.c (thread_db_load_search): Likewise.
673 (try_thread_db_load_1): Likewise.
674 * tracepoint.c (add_tracepoint): Likewise.
675 (add_tracepoint_action): Likewise.
676 (create_trace_state_variable): Likewise.
677 (cmd_qtdpsrc): Likewise.
678 (cmd_qtro): Likewise.
679 (add_while_stepping_state): Likewise.
680 * win32-low.c (child_add_thread): Likewise.
681 (get_image_name): Likewise.
682
ed8b7b42
YQ
6832015-08-25 Yao Qi <yao.qi@linaro.org>
684
685 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
686
db3cb7cb
YQ
6872015-08-25 Yao Qi <yao.qi@linaro.org>
688
689 * Makefile.in (aarch64-linux.o): New rule.
690 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
691 srv_tgtobj.
692 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
693 (aarch64_init_debug_reg_state): Make it extern.
694 (aarch64_linux_prepare_to_resume): Remove.
695
f6011a1c
YQ
6962015-08-25 Yao Qi <yao.qi@linaro.org>
697
698 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
699 lwp_arch_private_info and ptid_of_lwp.
700
88e2cf7e
YQ
7012015-08-25 Yao Qi <yao.qi@linaro.org>
702
703 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
704 Find proc_info by find_process_pid. All callers updated.
705
5e35436e
YQ
7062015-08-25 Yao Qi <yao.qi@linaro.org>
707
708 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
709 Remove.
710 (debug_reg_change_callback): Remove.
711 (aarch64_notify_debug_reg_change): Remove.
712
4a8a7965
YQ
7132015-08-25 Yao Qi <yao.qi@linaro.org>
714
715 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
716 Call current_lwp_ptid.
717
32a271ee
YQ
7182015-08-25 Yao Qi <yao.qi@linaro.org>
719
720 * linux-aarch64-low.c (debug_reg_change_callback): Use
721 debug_printf.
722
0d51c8d7
YQ
7232015-08-25 Yao Qi <yao.qi@linaro.org>
724
725 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
726
31a43dd5
YQ
7272015-08-25 Yao Qi <yao.qi@linaro.org>
728
729 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
730
8ee52567
YQ
7312015-08-25 Yao Qi <yao.qi@linaro.org>
732
733 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
734 the code.
735
ff3f0f45
YQ
7362015-08-25 Yao Qi <yao.qi@linaro.org>
737
738 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
739 Remove.
740 (debug_reg_change_callback): Remove argument entry and add argument
741 lwp. Remove local variable thread. Don't print thread id in the
742 debugging output. Don't check whether pid of thread equals to pid.
743 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
744 iterate_over_lwps instead find_inferior.
745
3d40fbb5
PA
7462015-08-24 Pedro Alves <palves@redhat.com>
747
748 * inferiors.c (get_first_process): New function.
749 * inferiors.h (get_first_process): New declaration.
750 * remote-utils.c (read_ptid): Default to the first process in the
751 list, instead of to the current thread's process.
752
438e1e42
PA
7532015-08-24 Pedro Alves <palves@redhat.com>
754
755 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
756 * event-loop.c: Likewise.
757 * remote-utils.c: Likewise.
758 * tracepoint.c: Likewise.
759
a8c6d4fc
PA
7602015-08-24 Pedro Alves <palves@redhat.com>
761
762 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
763 ptid_get_lwp.
764
99b0bb12
PA
7652015-08-21 Pedro Alves <palves@redhat.com>
766
767 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
768 instead of literal 1.
769
f8904751
PA
7702015-08-21 Pedro Alves <palves@redhat.com>
771
772 * tdesc.c (default_description): Explicitly zero-initialize.
773
465a859e
PA
7742015-08-21 Pedro Alves <palves@redhat.com>
775
776 PR gdb/18749
777 * inferiors.c (remove_thread): Discard any pending stop reply for
778 this thread.
779 * server.c (remove_all_on_match_pid): Rename to ...
780 (remove_all_on_match_ptid): ... this. Work with a filter ptid
781 instead of a pid.
782 (discard_queued_stop_replies): Change parameter to a ptid. Now
783 extern.
784 (handle_v_kill, kill_inferior_callback, captured_main)
785 (process_serial_event): Adjust.
786 * server.h (discard_queued_stop_replies): Declare.
787
f0db101d
PA
7882015-08-21 Pedro Alves <palves@redhat.com>
789
790 * linux-low.c (wait_for_sigstop): Always switch to no thread
791 selected if the previously current thread dies.
792 * lynx-low.c (lynx_request_interrupt): Use the first thread's
793 process instead of the current thread's.
794 * remote-utils.c (input_interrupt): Don't check if there's no
795 current thread.
796 * server.c (gdb_read_memory, gdb_write_memory): If setting the
797 current thread to the general thread fails, error out.
798 (handle_qxfer_auxv, handle_qxfer_libraries)
799 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
800 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
801 (handle_query): Check if there's a thread selected instead of
802 checking whether there's any thread in the thread list.
803 (handle_qxfer_threads, handle_qxfer_btrace)
804 (handle_qxfer_btrace_conf): Don't error out early if there's no
805 thread in the thread list.
806 (handle_v_cont, myresume): Don't set the current thread to the
807 continue thread.
808 (process_serial_event) <Hg handling>: Also set thread_id if the
809 previous general thread is still alive.
810 (process_serial_event) <g/G handling>: If setting the current
811 thread to the general thread fails, error out.
812 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
813 thread's lwp instead of the current thread's.
814 * target.c (set_desired_thread): If the desired thread was not
815 found, leave the current thread pointing to NULL. Return an int
816 (boolean) indicating success.
817 * target.h (set_desired_thread): Change return type to int.
818
40045d91
MF
8192015-08-20 Max Filippov <jcmvbkbc@gmail.com>
820
821 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
822 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
823 #includes.
824 (ps_get_thread_area): New function.
825
45face3b
GB
8262015-08-19 Gary Benson <gbenson@redhat.com>
827
828 * hostio.c (handle_pread): Do not attempt to read more data
829 than hostio_reply_with_data can fit in a packet.
830
16d5f642
JB
8312015-08-18 Joel Brobecker <brobecker@adacore.com>
832
833 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
834
a738da3a
MF
8352015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
836
837 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
838
33ebda9d
PA
8392015-08-06 Pedro Alves <palves@redhat.com>
840
841 * tracepoint.c (expr_eval_result): Now an int.
842
a44892be
PA
8432015-08-06 Pedro Alves <palves@redhat.com>
844
845 * gdbthread.h (struct regcache): Forward declare.
846 (struct thread_info) <regcache_data>: Now a struct regcache
847 pointer.
848 * inferiors.c (inferior_regcache_data)
849 (set_inferior_regcache_data): Now work with struct regcache
850 pointers.
851 * inferiors.h (struct regcache): Forward declare.
852 (inferior_regcache_data, set_inferior_regcache_data): Now work
853 with struct regcache pointers.
854 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
855 (free_register_cache_thread): Remove struct regcache pointer
856 casts.
857
608a1e46
PA
8582015-08-06 Pedro Alves <palves@redhat.com>
859
860 * server.c (captured_main): On error, print the exception message
861 to stderr, and if run_once is set, throw a quit.
862
f0ce0d3a
PA
8632015-08-06 Pedro Alves <palves@redhat.com>
864
865 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
866 the current thread.
867
bf47e248
PA
8682015-08-06 Pedro Alves <palves@redhat.com>
869
870 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
871 reading beyond the passed in buffer length.
872
b6b9ffcc
PL
8732015-08-06 Pierre Langlois <pierre.langlois@arm.com>
874
875 * tracepoint.c (symbol_list) <required>: Remove.
876
863d01bd
PA
8772015-08-06 Pedro Alves <palves@redhat.com>
878
879 * linux-low.c (handle_extended_wait): Set the fork child's suspend
880 count if stopping and suspending threads.
881 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
882 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
883 (linux_detach): Complete an ongoing step-over.
884 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
885 throughout.
886 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
887 (linux_wait_1): If passing a signal to the inferior after
888 finishing a step-over, unsuspend and re-resume all lwps. If we
889 see a single-step event but the thread should be continuing, don't
890 pass the trap to gdb.
891 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
892 internal_error instead of gdb_assert.
893 (enqueue_pending_signal): New function.
894 (check_ptrace_stopped_lwp_gone): Add debug output.
895 (start_step_over): Use internal_error instead of gdb_assert.
896 (complete_ongoing_step_over): New function.
897 (linux_resume_one_thread): Don't resume a suspended thread.
898 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
899 it stepping.
900
00db26fa
PA
9012015-08-06 Pedro Alves <palves@redhat.com>
902
903 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
904 (linux_thread_alive): Use lwp_is_marked_dead.
905 (extended_event_reported): Delete.
906 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
907 instead of extended_event_reported.
908 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
909 as well.
910 (lwp_is_marked_dead): New function.
911 (lwp_running): Use lwp_is_marked_dead.
912 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
913 comment.
914
ad071a30
PA
9152015-08-06 Pedro Alves <palves@redhat.com>
916
917 * linux-low.c (linux_wait_1): Move fork event output out of the
918 !report_to_gdb check. Pass event_child->waitstatus to
919 target_waitstatus_to_string instead of ourstatus.
920
524b57e6
YQ
9212015-08-04 Yao Qi <yao.qi@linaro.org>
922
923 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
924 if current_thread is 32 bit.
925
6085d6f6
YQ
9262015-08-04 Yao Qi <yao.qi@linaro.org>
927
928 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
929 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
930 * server.c (extended_protocol): Remove "static".
931 * server.h (extended_protocol): Declare it.
932
8a7e4587
YQ
9332015-08-04 Yao Qi <yao.qi@linaro.org>
934
935 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
936 both aarch64 and aarch32.
937 (aarch64_set_pc): Likewise.
938
3b53ae99
YQ
9392015-08-04 Yao Qi <yao.qi@linaro.org>
940
941 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
942 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
943 arm-with-neon.xml to srv_xmlfiles.
944 * linux-aarch64-low.c: Include linux-aarch32-low.h.
945 (is_64bit_tdesc): New function.
946 (aarch64_linux_read_description): New function.
947 (aarch64_arch_setup): Call aarch64_linux_read_description.
948 (regs_info): Rename to regs_info_aarch64.
949 (aarch64_regs_info): Return right regs_info.
950 (initialize_low_arch): Call initialize_low_arch_aarch32.
951
bd9e6534
YQ
9522015-08-04 Yao Qi <yao.qi@linaro.org>
953
954 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
955 * linux-aarch32-low.c: New file.
956 * linux-aarch32-low.h: New file.
957 * linux-arm-low.c (arm_fill_gregset): Move it to
958 linux-aarch32-low.c.
959 (arm_store_gregset): Likewise.
960 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
961 (arm_store_vfpregset): Call arm_store_vfpregset_num.
962 (arm_arch_setup): Check if PTRACE_GETREGSET works.
963 (regs_info): Rename to regs_info_arm.
964 (arm_regs_info): Return regs_info_aarch32 if
965 have_ptrace_getregset is 1 and target description is
966 arm_with_neon or arm_with_vfpv3.
967 (initialize_low_arch): Don't call init_registers_arm_with_neon.
968 Call initialize_low_arch_aarch32 instead.
969
ded48a5e
YQ
9702015-08-04 Yao Qi <yao.qi@linaro.org>
971
972 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
973 * linux-low.c: ... here.
974 * linux-low.h (have_ptrace_getregset): Declare it.
975
96e9210f
PA
9762015-08-04 Pedro Alves <palves@redhat.com>
977
978 * thread-db.c (struct thread_db): Use new typedefs.
979 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
980 CHK calls.
981 (disable_thread_event_reporting): Cast result of dlsym to
982 destination function pointer type.
983 (thread_db_mourn): Use td_ta_delete_ftype.
984
af60a1ef
SL
9852015-08-03 Sandra Loosemore <sandra@codesourcery.com>
986
987 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
988 arch variant.
989 (CDX_BREAKPOINT): Define for R2.
990 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
991 (the_low_target): Add comments.
992
e8b41681
YQ
9932015-07-30 Yao Qi <yao.qi@linaro.org>
994
995 * linux-arm-low.c (arm_hwcap): Remove it.
996 (arm_read_description): New local variable arm_hwcap. Don't
997 set arm_hwcap to zero.
998
89abb039
YQ
9992015-07-30 Yao Qi <yao.qi@linaro.org>
1000
1001 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
1002 Use regcache->tdesc instead.
1003 (arm_store_wmmxregset): Likewise.
1004 (arm_fill_vfpregset): Likewise.
1005 (arm_store_vfpregset): Likewise.
1006
deca266c
YQ
10072015-07-30 Yao Qi <yao.qi@linaro.org>
1008
1009 * linux-arm-low.c: Include arch/arm.h.
1010 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
1011 (arm_store_gregset): Likewise.
1012
aa58a496
SM
10132015-07-29 Simon Marchi <simon.marchi@ericsson.com>
1014
1015 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
1016 ptrace's 4th parameter.
1017
50904b25
YQ
10182015-07-27 Yao Qi <yao.qi@linaro.org>
1019
1020 * configure.srv (case aarch64*-*-linux*): Don't set
1021 srv_linux_usrregs.
1022
5826e159
PA
10232015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
1024
1025 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
1026 sys/ptrace.h.
1027 * linux-arm-low.c: Likewise.
1028 * linux-cris-low.c: Likewise.
1029 * linux-crisv32-low.c: Likewise.
1030 * linux-low.c: Likewise.
1031 * linux-m68k-low.c: Likewise.
1032 * linux-mips-low.c: Likewise.
1033 * linux-nios2-low.c: Likewise.
1034 * linux-s390-low.c: Likewise.
1035 * linux-sparc-low.c: Likewise.
1036 * linux-tic6x-low.c: Likewise.
1037 * linux-tile-low.c: Likewise.
1038 * linux-x86-low.c: Likewise.
1039
54019719
PA
10402015-07-24 Pedro Alves <palves@redhat.com>
1041
1042 * config.in: Regenerate.
1043 * configure: Regenerate.
1044
eb7aa561
PA
10452015-07-24 Pedro Alves <palves@redhat.com>
1046
1047 * acinclude.m4: Include ../ptrace.m4.
1048 * configure.ac: Call GDB_AC_PTRACE.
1049 * config.in, configure: Regenerate.
1050
55d7b841
YQ
10512015-07-24 Yao Qi <yao.qi@linaro.org>
1052
1053 * linux-low.c (linux_create_inferior): Remove setting to
1054 proc->priv->new_inferior.
1055 (linux_attach): Likewise.
1056 (linux_low_filter_event): Likewise.
1057 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
1058
c06cbd92
YQ
10592015-07-24 Yao Qi <yao.qi@linaro.org>
1060
1061 * linux-low.c (linux_arch_setup): New function.
1062 (linux_low_filter_event): If proc->tdesc is NULL and
1063 proc->attached is true, call the_low_target.arch_setup.
1064 Otherwise, keep status pending, and return.
1065 (linux_resume_one_lwp_throw): Don't call get_pc if
1066 thread->while_stepping isn't NULL. Don't call
1067 get_thread_regcache if proc->tdesc is NULL.
1068 (need_step_over_p): Return 0 if proc->tdesc is NULL.
1069 (linux_target_ops): Install arch_setup.
1070 * server.c (start_inferior): Call the_target->arch_setup.
1071 * target.h (struct target_ops) <arch_setup>: New field.
1072 (target_arch_setup): New marco.
1073 * lynx-low.c (lynx_target_ops): Update.
1074 * nto-low.c (nto_target_ops): Update.
1075 * spu-low.c (spu_target_ops): Update.
1076 * win32-low.c (win32_target_ops): Update.
1077
5ae3ebba
YQ
10782015-07-24 Yao Qi <yao.qi@linaro.org>
1079
1080 * linux-low.c (linux_add_process): Don't set
1081 proc->priv->new_inferior.
1082 (linux_create_inferior): Set proc->priv->new_inferior to 1.
1083 (linux_attach): Likewise.
1084
eb97750b
YQ
10852015-07-24 Yao Qi <yao.qi@linaro.org>
1086
1087 * server.c (start_inferior): Code refactor.
1088
51aee833
YQ
10892015-07-24 Yao Qi <yao.qi@linaro.org>
1090
1091 * server.c (process_serial_event): Set general_thread.
1092
af1b22f3
YQ
10932015-07-21 Yao Qi <yao.qi@linaro.org>
1094
1095 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
1096 aarch64_linux_get_debug_reg_capacity.
1097
554717a3
YQ
10982015-07-17 Yao Qi <yao.qi@linaro.org>
1099
1100 * Makefile.in (aarch64-linux-hw-point.o): New rule.
1101 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
1102 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
1103 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
1104 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
1105 (AARCH64_HWP_ALIGNMENT): Likewise.
1106 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
1107 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
1108 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
1109 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
1110 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
1111 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
1112 (struct aarch64_debug_reg_state): Likewise.
1113 (struct arch_lwp_info): Likewise.
1114 (aarch64_align_watchpoint): Likewise.
1115 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
1116 (aarch64_watchpoint_length): Likewise.
1117 (aarch64_point_encode_ctrl_reg): Likewise
1118 (aarch64_point_is_aligned): Likewise.
1119 (aarch64_align_watchpoint): Likewise.
1120 (aarch64_linux_set_debug_regs):
1121 (aarch64_dr_state_insert_one_point): Likewise.
1122 (aarch64_dr_state_remove_one_point): Likewise.
1123 (aarch64_handle_breakpoint): Likewise.
1124 (aarch64_handle_aligned_watchpoint): Likewise.
1125 (aarch64_handle_unaligned_watchpoint): Likewise.
1126 (aarch64_handle_watchpoint): Likewise.
1127
c67ca4de
YQ
11282015-07-17 Yao Qi <yao.qi@linaro.org>
1129
1130 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
1131 and don't aarch64_get_debug_reg_state. All callers update.
1132 (aarch64_handle_aligned_watchpoint): Likewise.
1133 (aarch64_handle_unaligned_watchpoint): Likewise.
1134 (aarch64_handle_watchpoint): Likewise.
1135 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
1136 (aarch64_remove_point): Likewise.
1137
25abf979
YQ
11382015-07-17 Yao Qi <yao.qi@linaro.org>
1139
1140 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
1141 debug_printf.
1142 (aarch64_handle_unaligned_watchpoint): Likewise.
1143
db1ff28b
JK
11442015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
1145
1146 Revert the previous 3 commits:
1147 Move gdb_regex* to common/
1148 Move linux_find_memory_regions_full & co.
1149 gdbserver build-id attribute generator
1150
700ca40f
JK
11512015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1152 Jan Kratochvil <jan.kratochvil@redhat.com>
1153
1154 gdbserver build-id attribute generator.
1155 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
1156 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
1157 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
1158 (find_phdr): New.
1159 (get_dynamic): Use find_pdhr to traverse program headers.
1160 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
1161 (compare_mapping_entry_range, struct find_memory_region_callback_data)
1162 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
1163 (get_hex_build_id): New.
1164 (linux_qxfer_libraries_svr4): Add optional build-id attribute
1165 to reply XML document.
1166
9904185c
JK
11672015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1168 Jan Kratochvil <jan.kratochvil@redhat.com>
1169
1170 * target.c: Include target/target-utils.h and fcntl.h.
1171 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
1172 (target_fileio_read_stralloc): New functions.
1173
6e5b4429
JK
11742015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
1175
1176 * Makefile.in (OBS): Add gdb_regex.o.
1177 (gdb_regex.o): New.
1178 * config.in: Rebuilt.
1179 * configure: Rebuilt.
1180
ddc98fbf
JK
11812015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1182 Jan Kratochvil <jan.kratochvil@redhat.com>
1183
1184 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
1185 * Makefile.in (OBS): Add target-utils.o.
1186 (linux-maps.o, target-utils.o): New.
1187 * configure.srv (srv_linux_obj): Add linux-maps.o.
1188
e57bb7a0
PL
11892015-07-15 Pierre Langlois <pierre.langlois@arm.com>
1190
1191 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
1192 function, return 1.
1193 (the_low_target): Install it.
1194
586b02a9
PA
11952015-07-14 Pedro Alves <palves@redhat.com>
1196
1197 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
1198 Instead, ignore ECHILD, and throw an error for other errnos.
1199
58c1b36c
PA
12002015-07-10 Pedro Alves <palves@redhat.com>
1201
1202 * event-loop.c (struct callback_event) <data>: Change type to
1203 gdb_client_data instance instead of gdb_client_data pointer.
1204 (append_callback_event): Adjust.
1205
421530db
PL
12062015-07-10 Pierre Langlois <pierre.langlois@arm.com>
1207
1208 * linux-aarch64-low.c: Add comments for each linux_target_ops
1209 method. Remove comments already covered in target_ops and
1210 linux_target_ops definitions.
1211 (the_low_target): Add comments for each unimplemented method.
1212
c2d65f38
YQ
12132015-07-09 Yao Qi <yao.qi@linaro.org>
1214
1215 * linux-aarch64-low.c (aarch64_regmap): Remove.
1216 (aarch64_usrregs_info): Remove.
1217 (regs_info): Set field usrregs to NULL.
1218
b20a6524
MM
12192015-07-02 Markus Metzger <markus.t.metzger@intel.com>
1220
1221 * linux-low.c: Include "rsp-low.h"
1222 (linux_low_encode_pt_config, linux_low_encode_raw): New.
1223 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
1224 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
1225 (handle_btrace_enable_pt): New.
1226 (handle_btrace_general_set): Support "pt".
1227 (handle_btrace_conf_general_set): Support "pt:size".
1228
96c97461
PL
12292015-06-29 Pierre Langlois <pierre.langlois@arm.com>
1230
1231 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
1232 Z_PACKET_SW_BP.
1233
37d66942
PL
12342015-06-29 Pierre Langlois <pierre.langlois@arm.com>
1235
1236 * linux-aarch64-low.c: Remove comment about endianness.
1237 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
1238 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
1239 memcmp.
1240
dc06243f
GB
12412015-06-24 Gary Benson <gbenson@redhat.com>
1242
1243 * linux-i386-ipa.c (stdint.h): Do not include.
1244 * lynx-i386-low.c (stdint.h): Likewise.
1245 * lynx-ppc-low.c (stdint.h): Likewise.
1246 * mem-break.c (stdint.h): Likewise.
1247 * thread-db.c (stdint.h): Likewise.
1248 * tracepoint.c (stdint.h): Likewise.
1249 * win32-low.c (stdint.h): Likewise.
1250
124e13d9
SM
12512015-06-18 Simon Marchi <simon.marchi@ericsson.com>
1252
1253 * server.c (write_qxfer_response): Update call to
1254 remote_escape_output.
1255
909c2cda
JK
12562015-06-15 Aleksandar Ristovski <aristovski@qnx.com
1257 Jan Kratochvil <jan.kratochvil@redhat.com>
1258
1259 Merge multiple hex conversions.
1260 * gdbreplay.c (tohex): Rename to 'fromhex'.
1261 (logchar): Use fromhex.
1262
24c05f46
JK
12632015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
1264
1265 * server.c (handle_qxfer_libraries): Set `version' attribute for
1266 <library-list>.
1267
14d2069a
GB
12682015-06-10 Gary Benson <gbenson@redhat.com>
1269
1270 * target.h (struct target_ops) <multifs_open>: New field.
1271 <multifs_unlink>: Likewise.
1272 <multifs_readlink>: Likewise.
1273 * linux-low.c (nat/linux-namespaces.h): New include.
1274 (linux_target_ops): Initialize the_target->multifs_open,
1275 the_target->multifs_unlink and the_target->multifs_readlink.
1276 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
1277 * hostio.c (hostio_fs_pid): New static variable.
1278 (hostio_handle_new_gdb_connection): New function.
1279 (handle_setfs): Likewise.
1280 (handle_open): Use the_target->multifs_open as appropriate.
1281 (handle_unlink): Use the_target->multifs_unlink as appropriate.
1282 (handle_readlink): Use the_target->multifs_readlink as
1283 appropriate.
1284 (handle_vFile): Handle vFile:setfs packets.
1285 * server.c (handle_query): Call hostio_handle_new_gdb_connection
1286 after target_handle_new_gdb_connection.
1287
4b8b5e72
GB
12882015-06-10 Gary Benson <gbenson@redhat.com>
1289
1290 * configure.ac (AC_CHECK_FUNCS): Add setns.
1291 * config.in: Regenerate.
1292 * configure: Likewise.
1293 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
1294 (linux-namespaces.o): New rule.
1295 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
1296
3ac2e371
GB
12972015-06-09 Gary Benson <gbenson@redhat.com>
1298
1299 * hostio.c (handle_open): Process mode argument with
1300 fileio_to_host_mode.
1301
ca9b78ce
YQ
13022015-06-01 Yao Qi <yao.qi@linaro.org>
1303
1304 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
1305 * linux-x86-low.c: Likewise.
1306
bfacd19d
DB
13072015-05-28 Don Breazeal <donb@codesourcery.com>
1308
1309 * linux-low.c (handle_extended_wait): Initialize
1310 thread_info.last_resume_kind for new fork children.
1311
452003ef
PA
13122015-05-15 Pedro Alves <palves@redhat.com>
1313
1314 * target.h (target_handle_new_gdb_connection): Rewrite using if
1315 wrapped in do/while.
1316
1041a03c
JB
13172015-05-14 Joel Brobecker <brobecker@adacore.com>
1318
1319 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
1320 * configure, config.in: Regenerate.
1321 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
1322 Declare typedef.
1323
c269dbdb
DB
13242015-05-12 Don Breazeal <donb@codesourcery.com>
1325
1326 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
1327 PTRACE_EVENT_VFORK_DONE.
1328 (linux_low_ptrace_options, extended_event_reported): Add vfork
1329 events.
1330 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
1331 and "vforkdone" for RSP 'T' Stop Reply Packet.
1332 * server.h (report_vfork_events): Declare
1333 global variable.
1334
3a8a0396
DB
13352015-05-12 Don Breazeal <donb@codesourcery.com>
1336
1337 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
1338 (the_low_target) <new_fork>: Initialize new member.
1339 * linux-arm-low.c (arm_new_fork): New function.
1340 (the_low_target) <new_fork>: Initialize new member.
1341 * linux-low.c (handle_extended_wait): Call new target function
1342 new_fork.
1343 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
1344 * linux-mips-low.c (mips_add_watchpoint): New function
1345 extracted from mips_insert_point.
1346 (the_low_target) <new_fork>: Initialize new member.
1347 (mips_linux_new_fork): New function.
1348 (mips_insert_point): Call mips_add_watchpoint.
1349 * linux-x86-low.c (x86_linux_new_fork): New function.
1350 (the_low_target) <new_fork>: Initialize new member.
1351
de0d863e
DB
13522015-05-12 Don Breazeal <donb@codesourcery.com>
1353
1354 * linux-low.c (handle_extended_wait): Implement return value,
1355 rename argument 'event_child' to 'event_lwp', handle
1356 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
1357 (linux_low_ptrace_options): New function.
1358 (linux_low_filter_event): Call linux_low_ptrace_options,
1359 use different argument fo linux_enable_event_reporting,
1360 use return value from handle_extended_wait.
1361 (extended_event_reported): New function.
1362 (linux_wait_1): Call extended_event_reported and set
1363 status to report fork events.
1364 (linux_write_memory): Add pid to debug message.
1365 (reset_lwp_ptrace_options_callback): New function.
1366 (linux_handle_new_gdb_connection): New function.
1367 (linux_target_ops): Initialize new structure member.
1368 * linux-low.h (struct lwp_info) <waitstatus>: New member.
1369 * lynx-low.c: Initialize new structure member.
1370 * remote-utils.c (prepare_resume_reply): Implement stop reason
1371 "fork" for "T" stop message.
1372 * server.c (handle_query): Call handle_new_gdb_connection.
1373 * server.h (report_fork_events): Declare global flag.
1374 * target.h (struct target_ops) <handle_new_gdb_connection>:
1375 New member.
1376 (target_handle_new_gdb_connection): New macro.
1377 * win32-low.c: Initialize new structure member.
1378
ddcbc397
DB
13792015-05-12 Don Breazeal <donb@codesourcery.com>
1380
1381 * mem-break.c (APPEND_TO_LIST): Define macro.
1382 (clone_agent_expr): New function.
1383 (clone_one_breakpoint): New function.
1384 (clone_all_breakpoints): New function.
1385 * mem-break.h: Declare new functions.
1386
89245bc0
DB
13872015-05-12 Don Breazeal <donb@codesourcery.com>
1388
1389 * linux-low.c (linux_supports_fork_events): New function.
1390 (linux_supports_vfork_events): New function.
1391 (linux_target_ops): Initialize new structure members.
1392 (initialize_low): Call linux_check_ptrace_features.
1393 * lynx-low.c (lynx_target_ops): Initialize new structure
1394 members.
1395 * server.c (report_fork_events, report_vfork_events):
1396 New global flags.
1397 (handle_query): Add new features to qSupported packet and
1398 response.
1399 (captured_main): Initialize new global variables.
1400 * target.h (struct target_ops) <supports_fork_events>:
1401 New member.
1402 <supports_vfork_events>: New member.
1403 (target_supports_fork_events): New macro.
1404 (target_supports_vfork_events): New macro.
1405 * win32-low.c (win32_target_ops): Initialize new structure
1406 members.
1407
835205d0
GB
14082015-05-12 Gary Benson <gbenson@redhat.com>
1409
1410 * server.c (handle_qxfer_exec_file): Use current process
1411 if annex is empty.
1412
21e94bd9
SL
14132015-05-08 Sandra Loosemore <sandra@codesourcery.com>
1414
1415 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
1416 Remove HAVE_PTRACE_GETREGS conditionals.
1417 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
1418 instead of PTRACE_GETREGS and PTRACE_SETREGS.
1419
45614f15
YQ
14202015-05-08 Yao Qi <yao.qi@linaro.org>
1421
1422 * linux-low.c (linux_supports_conditional_breakpoints): New
1423 function.
1424 (linux_target_ops): Install new target method.
1425 * lynx-low.c (lynx_target_ops): Install NULL hook for
1426 supports_conditional_breakpoints.
1427 * nto-low.c (nto_target_ops): Likewise.
1428 * spu-low.c (spu_target_ops): Likewise.
1429 * win32-low.c (win32_target_ops): Likewise.
1430 * server.c (handle_query): Check
1431 target_supports_conditional_breakpoints.
1432 * target.h (struct target_ops) <supports_conditional_breakpoints>:
1433 New field.
1434 (target_supports_conditional_breakpoints): New macro.
1435
80ad801e
PA
14362015-05-06 Pedro Alves <palves@redhat.com>
1437
1438 PR server/18081
1439 * server.c (start_inferior): If the process exits, mourn it.
1440
819843c7
GB
14412015-04-21 Gary Benson <gbenson@redhat.com>
1442
1443 * hostio.c (fileio_open_flags_to_host): Factored out to
1444 fileio_to_host_openflags in common/fileio.c. Single use
1445 updated.
1446
a2d5a9d7
MF
14472015-04-17 Max Filippov <jcmvbkbc@gmail.com>
1448
1449 * linux-xtensa-low.c (xtensa_fill_gregset)
1450 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
1451 XCHAL_HAVE_LOOP.
1452
deb44829
MF
14532015-04-17 Max Filippov <jcmvbkbc@gmail.com>
1454
1455 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
1456 (regs_info): Replace usrregs pointer with NULL.
1457
e57f1de3
GB
14582015-04-17 Gary Benson <gbenson@redhat.com>
1459
1460 * target.h (struct target_ops) <pid_to_exec_file>: New field.
1461 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
1462 * server.c (handle_qxfer_exec_file): New function.
1463 (qxfer_packets): Add exec-file entry.
1464 (handle_query): Report qXfer:exec-file:read as supported packet.
1465
62828379
RN
14662015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
1467
1468 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
1469
b88bb450
GB
14702015-04-09 Gary Benson <gbenson@redhat.com>
1471
1472 * hostio-errno.c (errno_to_fileio_error): Remove function.
1473 Update caller to use remote_fileio_to_fio_error.
1474
c8f4bfdd
YQ
14752015-04-09 Yao Qi <yao.qi@linaro.org>
1476
1477 * linux-low.c (linux_insert_point): Call
1478 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
1479 (linux_remove_point): Call remove_memory_breakpoint if type is
1480 raw_bkpt_type_sw.
1481 * linux-x86-low.c (x86_insert_point): Don't call
1482 insert_memory_breakpoint.
1483 (x86_remove_point): Don't call remove_memory_breakpoint.
1484
41f98f02
PA
14852015-04-01 Pedro Alves <palves@redhat.com>
1486 Cleber Rosa <crosa@redhat.com>
1487
1488 * server.c (gdbserver_usage): Reorganize and extend the usage
1489 message.
1490
2bf6fb9d
PA
14912015-03-24 Pedro Alves <palves@redhat.com>
1492
1493 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
1494 output. Also dump TRAP_TRACE.
1495 (linux_low_filter_event): In debug output, distinguish a
1496 resume_stop SIGSTOP from a delayed SIGSTOP.
1497
369f6daa
GB
14982015-03-24 Gary Benson <gbenson@redhat.com>
1499
1500 * linux-x86-low.c (x86_linux_new_thread): Moved to
1501 nat/x86-linux.c.
1502 (x86_linux_prepare_to_resume): Likewise.
1503
8e5d4070
GB
15042015-03-24 Gary Benson <gbenson@redhat.com>
1505
1506 * Makefile.in (x86-linux-dregs.o): New rule.
1507 * configure.srv: Add x86-linux-dregs.o to relevant targets.
1508 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
1509 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
1510 (x86_linux_dr_get): Likewise.
1511 (x86_linux_dr_set): Likewise.
1512 (update_debug_registers_callback): Likewise.
1513 (x86_linux_dr_set_addr): Likewise.
1514 (x86_linux_dr_get_addr): Likewise.
1515 (x86_linux_dr_set_control): Likewise.
1516 (x86_linux_dr_get_control): Likewise.
1517 (x86_linux_dr_get_status): Likewise.
1518 (x86_linux_update_debug_registers): Likewise.
1519
2b95d440
GB
15202015-03-24 Gary Benson <gbenson@redhat.com>
1521
1522 * linux-x86-low.c (x86_linux_update_debug_registers):
1523 New function, factored out from...
1524 (x86_linux_prepare_to_resume): ...this.
1525
14b0bc68
GB
15262015-03-24 Gary Benson <gbenson@redhat.com>
1527
1528 * linux-x86-low.c (x86_linux_dr_get): Update comments.
1529 (x86_linux_dr_set): Likewise.
1530 (update_debug_registers_callback): Likewise.
1531 (x86_linux_dr_set_addr): Likewise.
1532 (x86_linux_dr_get_addr): Likewise.
1533 (x86_linux_dr_set_control): Likewise.
1534 (x86_linux_dr_get_control): Likewise.
1535 (x86_linux_dr_get_status): Likewise.
1536 (x86_linux_prepare_to_resume): Likewise.
1537
5dfe6ca8
GB
15382015-03-24 Gary Benson <gbenson@redhat.com>
1539
1540 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
1541 Use perror_with_name. Pass string through gettext.
1542 (x86_linux_dr_set): Likewise.
1543
d33472ad
GB
15442015-03-24 Gary Benson <gbenson@redhat.com>
1545
1546 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
1547 (x86_linux_dr_set_addr): ...this.
1548 (x86_dr_low_get_addr): Rename to...
1549 (x86_linux_dr_get_addr): ...this.
1550 (x86_dr_low_set_control): Rename to...
1551 (x86_linux_dr_set_control): ...this.
1552 (x86_dr_low_get_control): Rename to...
1553 (x86_linux_dr_get_control): ...this.
1554 (x86_dr_low_get_status): Rename to...
1555 (x86_linux_dr_get_status): ...this.
1556 (x86_dr_low): Update with new function names.
1557
4b134ca1
GB
15582015-03-24 Gary Benson <gbenson@redhat.com>
1559
1560 * Makefile.in (x86-linux.o): New rule.
1561 * configure.srv: Add x86-linux.o to relevant targets.
1562 * linux-low.c (lwp_set_arch_private_info): New function.
1563 (lwp_arch_private_info): Likewise.
1564 * linux-x86-low.c: Include nat/x86-linux.h.
1565 (arch_lwp_info): Removed structure.
1566 (update_debug_registers_callback):
1567 Use lwp_set_debug_registers_changed.
1568 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
1569 and lwp_set_debug_registers_changed.
1570 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
1571
34c703da
GB
15722015-03-24 Gary Benson <gbenson@redhat.com>
1573
1574 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
1575 * linux-arm-low.c (arm_new_thread): Likewise.
1576 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
1577 * linux-mips-low.c (mips_linux_new_thread): Likewise.
1578 * linux-x86-low.c (x86_linux_new_thread): Likewise.
1579 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
1580
cff068da
GB
15812015-03-24 Gary Benson <gbenson@redhat.com>
1582
1583 * linux-low.c (ptid_of_lwp): New function.
1584 (lwp_is_stopped): Likewise.
1585 (lwp_stop_reason): Likewise.
1586 * linux-x86-low.c (update_debug_registers_callback):
1587 Use lwp_is_stopped.
1588 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
1589 lwp_stop_reason.
1590
b2f7c7e8
GB
15912015-03-24 Gary Benson <gbenson@redhat.com>
1592
1593 * linux-low.h (linux_stop_lwp): Remove declaration.
1594
6d4ee8c6
GB
15952015-03-24 Gary Benson <gbenson@redhat.com>
1596
1597 * linux-low.h: Include nat/linux-nat.h.
1598 * linux-low.c (iterate_over_lwps_args): New structure.
1599 (iterate_over_lwps_filter): New function.
1600 (iterate_over_lwps): Likewise.
1601 * linux-x86-low.c (update_debug_registers_callback):
1602 Update signature to what iterate_over_lwps expects.
1603 Remove PID check that iterate_over_lwps now performs.
1604 (x86_dr_low_set_addr): Use iterate_over_lwps.
1605 (x86_dr_low_set_control): Likewise.
1606
70a0bb6b
GB
16072015-03-24 Gary Benson <gbenson@redhat.com>
1608
1609 * linux-x86-low.c (x86_debug_reg_state): New function.
1610 (x86_linux_prepare_to_resume): Use the above.
1611
7b669087
GB
16122015-03-24 Gary Benson <gbenson@redhat.com>
1613
1614 * linux-low.c (current_lwp_ptid): New function.
1615 * linux-x86-low.c: Include nat/linux-nat.h.
1616 (x86_dr_low_get_addr): Use current_lwp_ptid.
1617 (x86_dr_low_get_control): Likewise.
1618 (x86_dr_low_get_status): Likewise.
1619
eef49a3d
PA
16202015-03-20 Pedro Alves <palves@redhat.com>
1621
1622 * tracepoint.c (cmd_qtstatus): Make "str" const.
1623
b2333d22
PA
16242015-03-20 Pedro Alves <palves@redhat.com>
1625
1626 * server.c (handle_general_set): Make "req_str" const.
1627
23f238d3
PA
16282015-03-19 Pedro Alves <palves@redhat.com>
1629
1630 * linux-low.c (linux_resume_one_lwp): Rename to ...
1631 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
1632 instead call perror_with_name.
1633 (check_ptrace_stopped_lwp_gone): New function.
1634 (linux_resume_one_lwp): Reimplement as wrapper around
1635 linux_resume_one_lwp_throw that swallows errors if the LWP is
1636 gone.
1637
91baf43f
PA
16382015-03-19 Pedro Alves <palves@redhat.com>
1639
1640 * linux-low.c (count_events_callback, select_event_lwp_callback):
1641 No longer check whether the thread has resume_stop as last resume
1642 kind.
1643
8bf3b159
PA
16442015-03-19 Pedro Alves <palves@redhat.com>
1645
1646 * linux-low.c (count_events_callback, select_event_lwp_callback):
1647 Use the lwp's status_pending_p field, not the thread's.
1648
b90fc188
PA
16492015-03-19 Pedro Alves <palves@redhat.com>
1650
1651 * linux-low.c (select_event_lwp_callback): Update comments to
1652 no longer mention SIGTRAP.
1653
464b0089
GB
16542015-03-18 Gary Benson <gbenson@redhat.com>
1655
1656 * server.c (handle_query): Do not report vFile:fstat as supported.
1657
aa9e327f
GB
16582015-03-11 Gary Benson <gbenson@redhat.com>
1659
1660 * hostio.c (sys/types.h): New include.
1661 (sys/stat.h): Likewise.
1662 (common-remote-fileio.h): Likewise.
1663 (handle_fstat): New function.
1664 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 1665
791c0056
GB
16662015-03-11 Gary Benson <gbenson@redhat.com>
1667
1668 * configure.ac (AC_CHECK_MEMBERS): Add checks for
1669 struct stat.st_blocks and struct stat.st_blksize.
1670 * configure: Regenerate.
1671 * config.in: Likewise.
1672 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
1673 (OBS): Add common-remote-fileio.o.
1674 (common-remote-fileio.o): New rule.
1675
9a9df970
PA
16762015-03-09 Pedro Alves <palves@redhat.com>
1677
1678 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
1679 'struct sockaddr' pointer in 'accept' call.
1680
9eb1356e
PA
16812015-03-09 Pedro Alves <palves@redhat.com>
1682
1683 Revert:
1684 2015-03-07 Pedro Alves <palves@redhat.com>
1685 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
1686 or <winsock2.h> here. Instead include "gdb_socket.h".
1687 (remote_open): Use union gdb_sockaddr_u.
1688 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
1689 or <winsock2.h> here. Instead include "gdb_socket.h".
1690 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
1691 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
1692 or <sys/un.h>.
1693 (init_named_socket, gdb_agent_helper_thread): Use union
1694 gdb_sockaddr_u.
1695
aac331e4
PA
16962015-03-07 Pedro Alves <palves@redhat.com>
1697
1698 * configure.ac (build_warnings): Move
1699 -Wdeclaration-after-statement to the C-specific set.
1700 * configure: Regenerate.
1701
366c75fc
PA
17022015-03-07 Pedro Alves <palves@redhat.com>
1703
1704 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
1705 or <winsock2.h> here. Instead include "gdb_socket.h".
1706 (remote_open): Use union gdb_sockaddr_u.
1707 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
1708 or <winsock2.h> here. Instead include "gdb_socket.h".
1709 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
1710 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
1711 or <sys/un.h>.
1712 (init_named_socket, gdb_agent_helper_thread): Use union
1713 gdb_sockaddr_u.
1714
492d29ea
PA
17152015-03-07 Pedro Alves <palves@redhat.com>
1716
1717 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
1718 instead.
1719
60a191ed
YQ
17202015-03-06 Yao Qi <yao.qi@linaro.org>
1721
1722 * linux-aarch64-low.c (aarch64_insert_point): Use
1723 show_debug_regs as a boolean.
1724 (aarch64_remove_point): Likewise.
1725
f5771b1d
PA
17262015-03-05 Pedro Alves <palves@redhat.com>
1727
1728 * lynx-low.c (lynx_target_ops): Install NULL hooks for
1729 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
1730 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
1731 * nto-low.c (nto_target_ops): Likewise.
1732 * spu-low.c (spu_target_ops): Likewise.
1733 * win32-low.c (win32_target_ops): Likewise.
1734
3e572f71
PA
17352015-03-04 Pedro Alves <palves@redhat.com>
1736
72f4393d 1737 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
1738 Decide whether a breakpoint triggered based on the SIGTRAP's
1739 siginfo.si_code.
72f4393d
L
1740 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
1741 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
1742 (linux_low_filter_event): Check for breakpoints before checking
1743 watchpoints.
1744 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
1745 siginfo.si_code.
72f4393d
L
1746 (linux_stopped_by_sw_breakpoint)
1747 (linux_supports_stopped_by_sw_breakpoint)
1748 (linux_stopped_by_hw_breakpoint)
1749 (linux_supports_stopped_by_hw_breakpoint): New functions.
1750 (linux_target_ops): Install new target methods.
3e572f71 1751
1ec68e26
PA
17522015-03-04 Pedro Alves <palves@redhat.com>
1753
1754 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
1755 * server.c (swbreak_feature, hwbreak_feature): New globals.
1756 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
1757 (captured_main): Clear swbreak_feature and hwbreak_feature.
1758 * server.h (swbreak_feature, hwbreak_feature): Declare.
1759 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
1760 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
1761 supports_stopped_by_hw_breakpoint>: New fields.
1762 (target_supports_stopped_by_sw_breakpoint)
1763 (target_stopped_by_sw_breakpoint)
1764 (target_supports_stopped_by_hw_breakpoint)
1765 (target_stopped_by_hw_breakpoint): Declare.
1766
15c66dd6
PA
17672015-03-04 Pedro Alves <palves@redhat.com>
1768
1769 enum lwp_stop_reason -> enum target_stop_reason
1770 * linux-low.c (check_stopped_by_breakpoint): Adjust.
1771 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
1772 (linux_wait_1, stuck_in_jump_pad_callback)
1773 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
1774 (linux_stopped_by_watchpoint):
1775 * linux-low.h (enum lwp_stop_reason): Delete.
1776 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
1777 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
1778
98fc70d6
YQ
17792015-03-04 Yao Qi <yao.qi@linaro.org>
1780
1781 * Makefile.in (SFILES): Add linux-aarch64-low.c.
1782
dd2ac174
GB
17832015-03-03 Gary Benson <gbenson@redhat.com>
1784
1785 * hostio.c (handle_vFile): Fix prefix lengths.
1786
d68e53f4
MM
17872015-03-03 Markus Metzger <markus.t.metzger@intel.com>
1788
1789 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
1790 ptr_bits.
1791
bf2d68ab
AA
17922015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
1793
1794 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
1795 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
1796 (clean): Add "rm -f" for above C files.
1797 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
1798 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
1799 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
1800 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
1801 * linux-s390-low.c (HWCAP_S390_VX): New macro.
1802 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
1803 (init_registers_s390x_vx_linux64)
1804 (init_registers_s390x_tevx_linux64)
1805 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
1806 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
1807 declarations.
1808 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
1809 (s390_store_vxrs_high): New functions.
1810 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
1811 NT_S390_VXRS_HIGH.
1812 (s390_arch_setup): Add logic for selecting one of the new target
1813 descriptions. Activate the new vector regsets if applicable.
1814 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
1815 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
1816 and init_registers_s390x_tevx_linux64.
1817
c966a859
PA
18182015-03-01 Pedro Alves <palves@redhat.com>
1819
1820 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
1821 parameter.
1822
4180215b
PA
18232015-02-27 Pedro Alves <palves@redhat.com>
1824
1825 * linux-x86-low.c (u_debugreg_offset): New function.
1826 (x86_linux_dr_get, x86_linux_dr_set): Use it.
1827
749bab01
PA
18282015-02-27 Pedro Alves <palves@redhat.com>
1829
1830 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
1831 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
1832 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
1833 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
1834 (ps_lsetfpregs, ps_getpid)
1835 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
1836 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
1837 (ps_lsetxregs, ps_plog): Declare.
1838
3c14e5a3
PA
18392015-02-27 Pedro Alves <palves@redhat.com>
1840
1841 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
1842 IP_AGENT_EXPORT_FUNC.
1843 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
1844 IP_AGENT_EXPORT_FUNC.
1845 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
1846 (IP_AGENT_EXPORT): Delete.
1847 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
1848 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
1849 (gdb_trampoline_buffer_error, collecting, gdb_collect)
1850 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
1851 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
1852 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
1853 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
1854 (traceframe_read_count, traceframe_write_count)
1855 (traceframes_created, trace_state_variables, get_raw_reg)
1856 (get_trace_state_variable_value, set_trace_state_variable_value)
1857 (ust_loaded, helper_thread_id, cmd_buf): Use
1858 IPA_SYM_EXPORTED_NAME.
1859 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
1860 (tracepoints) Use IP_AGENT_EXPORT_VAR.
1861 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
1862 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
1863 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
1864 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
1865 EXTERN_C_PUSH/EXTERN_C_POP.
1866 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
1867 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
1868 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
1869 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
1870 (traceframe_write_count, traceframe_read_count)
1871 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
1872 (about_to_request_buffer_space, get_trace_state_variable_value)
1873 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
1874 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
1875 EXTERN_C_PUSH/EXTERN_C_POP.
1876 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
1877 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
1878 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
1879 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
1880 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
1881 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
1882 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
1883 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
1884 Define.
1885 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
1886 (IP_AGENT_EXPORT_VAR_DECL): Define.
1887 (tracing): Declare.
1888 (gdb_agent_get_raw_reg): Declare.
1889
fe978cb0
PA
18902015-02-27 Tom Tromey <tromey@redhat.com>
1891 Pedro Alves <palves@redhat.com>
1892
1893 Rename symbols whose names are reserved C++ keywords throughout.
1894
3bc3d82a
PA
18952015-02-27 Pedro Alves <palves@redhat.com>
1896
1897 * Makefile.in (COMPILER): New, get it from autoconf.
1898 (CXX): Get from autoconf instead.
1899 (COMPILE.pre): Use COMPILER.
1900 (CC-LD): Rename to ...
1901 (CC_LD): ... this. Use COMPILER.
1902 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
1903 (CXX_FOR_TARGET): Default to g++ instead of gcc.
1904 * acinclude.m4: Include build-with-cxx.m4.
1905 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
1906 Disable -Werror by default if building in C++ mode.
1907 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
1908 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
1909 the C++ compiler. Save/restore CXXFLAGS too.
1910 * configure: Regenerate.
1911
07697489
PA
19122015-02-27 Pedro Alves <palves@redhat.com>
1913
1914 * acinclude.m4: Include libiberty.m4.
1915 * configure.ac: Call libiberty_INIT.
1916 * config.in, configure: Regenerate.
1917
9beb7c4e
PA
19182015-02-26 Pedro Alves <palves@redhat.com>
1919
1920 * linux-low.c (linux_wait_1): When incrementing the PC past a
1921 program breakpoint always use the_low_target.breakpoint_len as
1922 increment, rather than the maximum between that and
1923 the_low_target.decr_pc_after_break.
1924
8090aef2
PA
19252015-02-23 Pedro Alves <palves@redhat.com>
1926
1927 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
1928 thread was doing a step-over; always adjust the PC if
1929 we stepped over a permanent breakpoint.
1930 (linux_wait_1): If we stepped over breakpoint that was on top of a
1931 permanent breakpoint, manually advance the PC past it.
1932
bc9540e8
PA
19332015-02-23 Pedro Alves <palves@redhat.com>
1934
1935 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
1936 modes.
1937 (x86_fill_gregset, x86_store_gregset): Use it when handling
1938 $orig_eax.
1939
2db9a427
PA
19402015-02-20 Pedro Alves <palves@redhat.com>
1941
1942 * thread-db.c: Include "nat/linux-procfs.h".
1943 (thread_db_init): Skip listing new threads if the kernel supports
1944 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
1945
afa8d396
PA
19462015-02-20 Pedro Alves <palves@redhat.com>
1947
1948 * linux-low.c (status_pending_p_callback): Use ptid_match.
1949
c9587f88
AT
19502015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
1951
1952 PR breakpoints/16812
1953 * linux-low.c (wstatus_maybe_breakpoint): Remove.
1954 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
1955 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
1956
b05ec7a5
AT
19572015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
1958
1959 PR breakpoints/15956
1960 * tracepoint.c (cmd_qtinit): Add check for current_thread.
1961
d33501a5
MM
19622015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1963
1964 * linux-low.c (linux_low_btrace_conf): Print size.
1965 * server.c (handle_btrace_conf_general_set): New.
1966 (hanle_general_set): Call handle_btrace_conf_general_set.
1967 (handle_query): Report Qbtrace-conf:bts:size as supported.
1968
f4abbc16
MM
19692015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1970
1971 * linux-low.c (linux_low_enable_btrace): Update parameters.
1972 (linux_low_btrace_conf): New.
1973 (linux_target_ops)<to_btrace_conf>: Initialize.
1974 * server.c (current_btrace_conf): New.
1975 (handle_btrace_enable): Rename to ...
1976 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
1977 to target_enable_btrace. Update comment. Update users.
1978 (handle_qxfer_btrace_conf): New.
1979 (qxfer_packets): Add btrace-conf entry.
1980 (handle_query): Report qXfer:btrace-conf:read as supported packet.
1981 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
1982 (target_ops)<read_btrace_conf>: New.
1983 (target_enable_btrace): Update parameters.
1984 (target_read_btrace_conf): New.
1985
043c3577
MM
19862015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1987
1988 * server.c (handle_btrace_general_set): Remove call to
1989 target_supports_btrace.
1990 (supported_btrace_packets): New.
1991 (handle_query): Call supported_btrace_packets.
1992 * target.h: include btrace-common.h.
1993 (btrace_target_info): Removed.
1994 (supports_btrace, target_supports_btrace): Update parameters.
1995
734b0e4b
MM
19962015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1997
1998 * Makefile.in (SFILES): Add common/btrace-common.c.
1999 (OBS): Add common/btrace-common.o.
2000 (btrace-common.o): Add build rules.
2001 * linux-low: Include btrace-common.h.
2002 (linux_low_read_btrace): Use struct btrace_data. Call
2003 btrace_data_init and btrace_data_fini.
2004
d6c146e9
PA
20052015-02-06 Pedro Alves <palves@redhat.com>
2006
2007 * thread-db.c (find_new_threads_callback): Add debug output.
2008
20ba1ce6
PA
20092015-02-04 Pedro Alves <palves@redhat.com>
2010
2011 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
2012 (resume_stopped_resumed_lwps): New function.
2013 (linux_wait_for_event_filtered): Use it.
2014
8cc73a39
SDJ
20152015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
2016
2017 * Makefile.in (SFILES): Add linux-personality.c.
2018 (linux-personality.o): New rule.
2019 * configure.srv (srv_linux_obj): Add linux-personality.o to the
2020 list of objects to be built.
2021 * linux-low.c: Include nat/linux-personality.h.
2022 (linux_create_inferior): Remove code to disable address space
2023 randomization (moved to ../nat/linux-personality.c). Create
2024 cleanup to disable address space randomization.
2025
fb23d554
SDJ
20262015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
2027
2028 * Makefile.in (posix-strerror.o): New rule.
2029 (mingw-strerror.o): Likewise.
2030 * configure: Regenerated.
2031 * configure.ac: Source file ../common/common.host. Initialize new
2032 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
2033
cdf43629
YQ
20342015-01-14 Yao Qi <yao@codesourcery.com>
2035
2036 * Makefile.in (SFILES): Add nat/ppc-linux.c.
2037 (ppc-linux.o): New rule.
2038 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
2039 * configure.ac: AC_CHECK_FUNCS(getauxval).
2040 * config.in: Re-generated.
2041 * configure: Re-generated.
2042 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
2043 ppc64_64bit_inferior_p
2044
514c5338
YQ
20452015-01-14 Yao Qi <yao@codesourcery.com>
2046
2047 * linux-ppc-low.c: Include "nat/ppc-linux.h".
2048 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
2049 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
2050 (PT_ORIG_R3, PT_TRAP): Likewise.
2051 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
2052 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
2053 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
2054
3368c1e5
JB
20552015-01-10 Joel Brobecker <brobecker@adacore.com>
2056
2057 * i387-fp.c (i387_cache_to_xsave): In look over
2058 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
2059 zmmh_low_space field by use of zmmh_high_space.
2060
582511be
PA
20612015-01-09 Pedro Alves <palves@redhat.com>
2062
2063 * linux-low.c (step_over_bkpt): Move higher up in the file.
2064 (handle_extended_wait): Don't store the stop_pc here.
2065 (get_stop_pc): Adjust comments and rename to ...
2066 (check_stopped_by_breakpoint): ... this. Record whether the LWP
2067 stopped for a software breakpoint or hardware breakpoint.
2068 (thread_still_has_status_pending_p): New function.
2069 (status_pending_p_callback): Use
2070 thread_still_has_status_pending_p. If the event is no longer
2071 interesting, resume the LWP.
2072 (handle_tracepoints): Add assert.
2073 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
2074 (wstatus_maybe_breakpoint): New function.
2075 (cancel_breakpoint): Delete function.
2076 (check_stopped_by_watchpoint): New function, factored out from
2077 linux_low_filter_event.
2078 (lp_status_maybe_breakpoint): Delete function.
2079 (linux_low_filter_event): Remove filter_ptid argument.
2080 Leave thread group exits pending here. Store the LWP's stop PC.
2081 Always leave events pending.
2082 (linux_wait_for_event_filtered): Pull all events out of the
2083 kernel, and leave them all pending.
2084 (count_events_callback, select_event_lwp_callback): Consider all
2085 events.
2086 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
2087 (select_event_lwp): Only give preference to the stepping LWP in
2088 all-stop mode. Adjust comments.
2089 (ignore_event): New function.
2090 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
2091 references to cancel_breakpoints. Adjust to renames. Also give
2092 equal priority to all LWPs that have had events in non-stop mode.
2093 If reporting a software breakpoint event, unadjust the LWP's PC.
2094 (linux_wait): If linux_wait_1 returned an ignored event, retry.
2095 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
2096 Adjust.
2097 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
2098 (resume_status_pending_p): Use thread_still_has_status_pending_p.
2099 (linux_stopped_by_watchpoint): Adjust.
2100 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
2101 * linux-low.h (enum lwp_stop_reason): New.
2102 (struct lwp_info) <stop_pc>: Adjust comment.
2103 <stopped_by_watchpoint>: Delete field.
2104 <stop_reason>: New field.
2105 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
2106 * mem-break.c (software_breakpoint_inserted_here)
2107 (hardware_breakpoint_inserted_here): New function.
2108 * mem-break.h (software_breakpoint_inserted_here)
2109 (hardware_breakpoint_inserted_here): Declare.
2110 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
2111 (cancel_breakpoints): Delete.
2112 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
2113 (upload_fast_traceframes): Remove references to
2114 cancel_breakpoints.
2115
a33e3959
PA
21162015-01-09 Pedro Alves <palves@redhat.com>
2117
2118 * thread-db.c (find_new_threads_callback): Ignore thread if the
2119 kernel thread ID is -1.
2120
8784d563
PA
21212015-01-09 Pedro Alves <palves@redhat.com>
2122
2123 * linux-low.c (linux_attach_fail_reason_string): Move to
2124 nat/linux-ptrace.c, and rename.
2125 (linux_attach_lwp): Update comment.
2126 (attach_proc_task_lwp_callback): New function.
2127 (linux_attach): Adjust to rename and use
2128 linux_proc_attach_tgid_threads.
2129 (linux_attach_fail_reason_string): Delete declaration.
2130
76f2b779
JB
21312015-01-01 Joel Brobecker <brobecker@adacore.com>
2132
2133 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
2134 * server.c (gdbserver_version): Likewise.
2135
fafcc06a
SDJ
21362014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
2137
2138 * remote-utils.c: Include ctype.h.
2139 (input_interrupt): Explicitly handle the case when the char
2140 received is the NUL byte. Improve the printing of non-ASCII
2141 characters.
2142
beed38b8
JB
21432014-12-16 Joel Brobecker <brobecker@adacore.com>
2144
2145 * linux-low.c (linux_low_filter_event): Update call to
2146 linux_enable_event_reporting following the addition of
2147 a new parameter to that function.
2148
bf330350
CU
21492014-12-16 Catalin Udma <catalin.udma@freescale.com>
2150
2151 PR server/17457
2152 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
2153 (AARCH64_FPCR_REGNO): Likewise.
2154 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
2155 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
2156 (aarch64_store_fpregset): Likewise.
2157
5227d625
JB
21582014-12-15 Joel Brobecker <brobecker@adacore.com>
2159
2160 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
2161 Remove FIXME comment about assumption about N.
2162
f93b65a0
JB
21632014-12-13 Joel Brobecker <brobecker@adacore.com>
2164
2165 * configure.ac: If large-file support is disabled in GDBserver,
2166 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
2167 * configure: Regenerate.
2168
e5a9158d
AA
21692014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2170
2171 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
2172 warning upon ENODATA from ptrace.
2173 * linux-s390-low.c (s390_store_tdb): New.
2174 (s390_regsets): Add regset for NT_S390_TDB.
2175
feea5f36
AA
21762014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2177
2178 * linux-low.c (regsets_store_inferior_registers): Skip regsets
2179 without a fill_function.
2180 * linux-s390-low.c (s390_fill_last_break): Remove.
2181 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
2182 (s390_arch_setup): Use regset's size instead of fill_function for
2183 loop end condition.
2184
098dbe61
AA
21852014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2186
2187 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
2188 the regset's store function when ptrace returned an error.
2189 * regcache.c (get_thread_regcache): Invalidate register cache
2190 before fetching inferior's registers.
2191
28eef672
AA
21922014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2193
2194 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
2195 while-loop as for-loop.
2196 (regsets_store_inferior_registers): Likewise.
2197
bdca27a2
YQ
21982014-11-28 Yao Qi <yao@codesourcery.com>
2199
2200 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
2201 * config.in, configure: Re-generate.
2202 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
2203 is defined.
2204
9c232dda
YQ
22052014-11-21 Yao Qi <yao@codesourcery.com>
2206
2207 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
2208 (AC_CHECK_HEADERS): Remove malloc.h.
2209 * configure: Re-generated.
2210 * config.in: Re-generated.
2211 * server.h: Don't include alloca.h and malloc.h.
2212 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
2213 Don't include malloc.h.
2214
43968415
JB
22152014-11-17 Joel Brobecker <brobecker@adacore.com>
2216
2217 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
2218 corresponding ERRNO check in same block.
2219
40e91bc7
PA
22202014-11-12 Pedro Alves <palves@redhat.com>
2221
2222 * server.c (cont_thread): Update comment.
2223 (start_inferior, attach_inferior): No longer clear cont_thread.
2224 (handle_v_cont): No longer set cont_thread.
2225 (captured_main): Clear cont_thread each time a GDB connects.
2226
c2c118cf
PA
22272014-11-12 Pedro Alves <palves@redhat.com>
2228
2229 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
2230 thread, and don't resume all threads if the Hc thread has exited.
2231
78708b7c
PA
22322014-11-12 Pedro Alves <palves@redhat.com>
2233
2234 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
2235 the process group instead of to a specific LWP.
2236
a2abc7de
PA
22372014-10-15 Pedro Alves <palves@redhat.com>
2238
2239 PR server/17487
2240 * win32-arm-low.c (arm_set_thread_context): Remove current_event
2241 parameter.
2242 (arm_set_thread_context): Delete.
2243 (the_low_target): Adjust.
2244 * win32-i386-low.c (debug_registers_changed)
2245 (debug_registers_used): Delete.
2246 (update_debug_registers_callback): New function.
2247 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
2248 needing to update their debug registers.
2249 (win32_get_current_dr): New function.
2250 (x86_dr_low_get_addr, x86_dr_low_get_control)
2251 (x86_dr_low_get_status): Fetch the debug register from the thread
2252 record's context.
2253 (i386_initial_stuff): Adjust.
2254 (i386_get_thread_context): Remove current_event parameter. Don't
2255 clear debug_registers_changed nor copy DR values to
2256 debug_reg_state.
2257 (i386_set_thread_context): Delete.
2258 (i386_prepare_to_resume): New function.
2259 (i386_thread_added): Mark the thread as needing to update irs
2260 debug registers.
2261 (the_low_target): Remove i386_set_thread_context and install
2262 i386_prepare_to_resume.
2263 * win32-low.c (win32_get_thread_context): Adjust.
2264 (win32_set_thread_context): Use SetThreadContext
2265 directly.
2266 (win32_prepare_to_resume): New function.
2267 (win32_require_context): New function, factored out from ...
2268 (thread_rec): ... this.
2269 (continue_one_thread): Call win32_prepare_to_resume on each thread
2270 we're about to continue.
2271 (win32_resume): Call win32_prepare_to_resume on the event thread.
2272 * win32-low.h (struct win32_thread_info)
2273 <debug_registers_changed>: New field.
2274 (struct win32_target_ops): Change prototype of set_thread_context,
2275 delete set_thread_context and add prepare_to_resume.
2276 (win32_require_context): New declaration.
2277
a442d071
GB
22782014-10-08 Gary Benson <gbenson@redhat.com>
2279
2280 * server.h: Do not include common-exceptions.h.
2281
6f1947e8
GB
22822014-10-08 Gary Benson <gbenson@redhat.com>
2283
2284 * server.h: Do not include cleanups.h.
2285
63b434a4
JH
22862014-09-30 James Hogan <james.hogan@imgtec.com>
2287
2288 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
2289 mips64-dsp-linux.c.
2290
c4d9ceb6
YQ
22912014-09-23 Yao Qi <yao@codesourcery.com>
2292
2293 * linux-low.c (lp_status_maybe_breakpoint): New function.
2294 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
2295 (count_events_callback): Likewise.
2296 (select_event_lwp_callback): Likewise.
2297 (cancel_breakpoints_callback): Likewise.
2298
89a5711c
DB
22992014-09-19 Don Breazeal <donb@codesourcery.com>
2300
2301 * linux-low.c (handle_extended_wait): Call
2302 linux_ptrace_get_extended_event.
2303 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
2304 linux_is_extended_waitstatus.
2305
bffc0964
JB
23062014-09-16 Joel Brobecker <brobecker@adacore.com>
2307
2308 * Makefile.in (CPPFLAGS): Define.
2309 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
2310 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
2311
0bfdf32f
GB
23122014-09-16 Gary Benson <gbenson@redhat.com>
2313
2314 * inferiors.h (current_inferior): Renamed as...
2315 (current_thread): New variable. All uses updated.
2316 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
2317 (maybe_move_out_of_jump_pad): Likewise.
2318 (cancel_breakpoint): Likewise.
2319 (linux_low_filter_event): Likewise.
2320 (wait_for_sigstop): Likewise.
2321 (linux_resume_one_lwp): Likewise.
2322 (need_step_over_p): Likewise.
2323 (start_step_over): Likewise.
2324 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
2325 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
2326 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
2327 and save_inferior as saved_thread.
2328 * regcache.c (get_thread_regcache): Renamed saved_inferior as
2329 saved_thread.
2330 (regcache_invalidate_thread): Likewise.
2331 * remote-utils.c (prepare_resume_reply): Likewise.
2332 * thread-db.c (thread_db_get_tls_address): Likewise.
2333 (disable_thread_event_reporting): Likewise.
2334 (remove_thread_event_breakpoints): Likewise.
2335 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
2336 as saved_thread.
2337 * target.h (set_desired_inferior): Renamed as...
2338 (set_desired_thread): New declaration. All uses updated.
2339 * server.c (myresume): Updated comment to reference thread instead
2340 of inferior.
2341 (handle_serial_event): Likewise.
2342 (handle_target_event): Likewise.
2343
361c8ade
GB
23442014-09-12 Tom Tromey <tromey@redhat.com>
2345 Gary Benson <gbenson@redhat.com>
2346
2347 * regcache.h: Include common-regcache.h.
2348 (regcache_read_pc): Don't declare.
2349 * regcache.c (get_thread_regcache_for_ptid): New function.
2350
bd9269f7
GB
23512014-09-11 Tom Tromey <tromey@redhat.com>
2352 Gary Benson <gbenson@redhat.com>
2353
2354 * symbol.c: New file.
2355 * Makefile.in (SFILES): Add symbol.c.
2356 (OBS): Add symbol.o.
2357
f8c1d06b
GB
23582014-09-11 Gary Benson <gbenson@redhat.com>
2359
2360 * target.c (target_stop_ptid, target_continue_ptid): New
2361 functions.
2362
721ec300
GB
23632014-09-11 Tom Tromey <tromey@redhat.com>
2364 Gary Benson <gbenson@redhat.com>
2365
2366 * target.h: Include target/target.h.
2367 * target.c (target_read_memory, target_read_uint32)
2368 (target_write_memory): New functions.
2369
c5e92cca
GB
23702014-09-11 Gary Benson <gbenson@redhat.com>
2371
2372 * server.h (debug_hw_points): Don't declare.
2373 * server.c (debug_hw_points): Don't define. Replace all uses
2374 with show_debug_regs.
2375 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
2376 all uses with show_debug_regs.
2377
2e4bb98a
EBM
23782014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
2379
2380 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
2381 endianness into account.
2382 (ppc_supply_ptrace_register): Likewise.
2383
ac740bc7
JH
23842014-09-03 James Hogan <james.hogan@imgtec.com>
2385
2386 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
2387 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
2388
97ea6506
GB
23892014-09-03 Gary Benson <gbenson@redhat.com>
2390
2391 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
2392 ALL_DEBUG_ADDRESS_REGISTERS.
2393
df7e5265
GB
23942014-09-02 Gary Benson <gbenson@redhat.com>
2395
2396 * i386-low.h: Renamed as...
2397 * x86-low.h: New file. All type, function and variable name
2398 prefixes changed from "i386_" to "x86_". All references updated.
2399 * i386-low.c: Renamed as...
2400 * x86-low.c: New file. All type, function and variable name
2401 prefixes changed from "i386_" to "x86_". All references updated.
2402
ed859da7
GB
24032014-09-02 Gary Benson <gbenson@redhat.com>
2404
2405 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
2406 (x86_linux_new_thread): Likewise.
2407
860789c7
GB
24082014-08-29 Gary Benson <gbenson@redhat.com>
2409
2410 * server.h (setjmp.h): Do not include.
2411 (toplevel): Do not declare.
2412 (common-exceptions.h): Include.
2413 (cleanups.h): Likewise.
2414 * server.c (toplevel): Do not define.
2415 (exit_code): New static global.
2416 (detach_or_kill_for_exit_cleanup): New function.
2417 (main): New function. Original main renamed to...
2418 (captured_main): New function.
2419 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
2420
ff55e1b5
GB
24212014-08-29 Gary Benson <gbenson@redhat.com>
2422
2423 * Makefile.in (SFILES): Add common/common-exceptions.c.
2424 (OBS): Add common-exceptions.o.
2425 (common-exceptions.o): New rule.
2426 * utils.c (prepare_to_throw_exception): New function.
2427
e9bcb658
GB
24282014-08-29 Gary Benson <gbenson@redhat.com>
2429
2430 * config.in: Regenerate.
2431 * configure: Likewise.
2432
e3180625
GB
24332014-08-29 Gary Benson <gbenson@redhat.com>
2434
2435 * Makefile.in (SFILES): Add common/cleanups.c.
2436 (OBS): cleanups.o.
2437 (cleanups.o): New rule.
2438
e3d6ba5d
GB
24392014-08-29 Gary Benson <gbenson@redhat.com>
2440
2441 * utils.c (internal_vwarning): New function.
2442
7096e886
GB
24432014-08-28 Gary Benson <gbenson@redhat.com>
2444
2445 * utils.h (fatal): Remove declaration.
2446 * utils.c (fatal): Remove function.
2447
14ce3192
GB
24482014-08-28 Gary Benson <gbenson@redhat.com>
2449
2450 * tracepoint.c (gdb_agent_init): Replace fatal with
2451 perror_with_name.
2452 (initialize_tracepoint): Likewise.
2453
50278d59
GB
24542014-08-28 Gary Benson <gbenson@redhat.com>
2455
2456 * remote-utils.c (remote_prepare): Replace fatal with error.
2457
aa96c426
GB
24582014-08-28 Gary Benson <gbenson@redhat.com>
2459
2460 * linux-low.c (linux_async): Replace fatal with warning.
2461 Tidy up and return.
2462 (linux_start_non_stop): Return -1 if linux_async failed.
2463
f7160e97
GB
24642014-08-28 Gary Benson <gbenson@redhat.com>
2465
2466 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
2467 gdb_assert.
2468 (i386_dr_low_get_addr): Remove vague comment.
2469 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
2470 gdb_assert.
2471
38e08fca
GB
24722014-08-28 Gary Benson <gbenson@redhat.com>
2473
2474 * inferiors.c (get_thread_process): Replace check with gdb_assert.
2475 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
2476 internal_error.
2477 (linux_resume_one_lwp): Likewise.
2478 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
2479 gdb_assert.
2480 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
2481 with internal_error.
2482 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
2483 (init_register_cache): Replace fatal with gdb_assert_not_reached.
2484 (find_register_by_name): Replace fatal with internal_error.
2485 (find_regno): Likewise.
2486 * tdesc.c (init_target_desc): Replace check with gdb_assert.
2487 * thread-db.c (thread_db_create_event): Likewise.
2488 (thread_db_load_search): Likewise.
2489 (try_thread_db_load_1): Likewise.
2490 * tracepoint.c (get_jump_space_head): Replace fatal with
2491 internal_error.
2492 (claim_trampoline_space): Likewise.
2493 (have_fast_tracepoint_trampoline_buffer): Likewise.
2494 (cmd_qtstart): Likewise.
2495 (stop_tracing): Likewise.
2496 (fast_tracepoint_collecting): Likewise.
2497 (target_malloc): Likewise.
2498 (download_tracepoint): Likewise.
2499 (download_trace_state_variables): Replace check with gdb_assert.
2500 (upload_fast_traceframes): Replace fatal with internal_error.
2501
34abf635
GB
25022014-08-19 Tom Tromey <tromey@redhat.com>
2503 Gary Benson <gbenson@redhat.com>
2504
2505 * Makefile.in (SFILES): Add common/common-debug.c.
2506 (OBS): Add common-debug.o.
2507 (common-debug.o): New rule.
2508 * debug.h (debug_printf): Don't declare.
2509 * debug.c (debug_printf): Renamed and rewritten as...
2510 (debug_vprintf): New function.
2511
f6e94d78
GB
25122014-08-19 Gary Benson <gbenson@redhat.com>
2513
2514 * utils.h: Do not include print-utils.h.
2515
9239eeab
GB
25162014-08-19 Tom Tromey <tromey@redhat.com>
2517 Gary Benson <gbenson@redhat.com>
2518
2519 * server.h: Add static assertion.
2520 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
2521
ef87c8bb
GB
25222014-08-19 Tom Tromey <tromey@redhat.com>
2523 Gary Benson <gbenson@redhat.com>
2524
2525 * Makefile.in (SFILES): Add common/errors.c.
2526 (OBS): Add errors.o.
2527 (IPA_OBS): Add errors-ipa.o.
2528 (errors.o): New rule.
2529 (errors-ipa.o): Likewise.
2530 * utils.h (perror_with_name, error, warning): Don't declare.
2531 * utils.c (warning): Renamed and rewritten as...
2532 (vwarning): New function.
2533 (error): Renamed and rewritten as...
2534 (verror): New function.
2535 (internal_error): Renamed and rewritten as...
2536 (internal_verror): New function.
2537
bb974a24
GB
25382014-08-07 Gary Benson <gbenson@redhat.com>
2539
2540 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
2541 * configure: Regenerate.
2542 * config.in: Likewise.
2543 * server.h: Do not include errno.h.
2544 * event-loop.c: Likewise.
2545 * hostio-errno.c: Likewise.
2546 * linux-low.c: Likewise.
2547 * remote-utils.c: Likewise.
2548 * spu-low.c: Likewise.
2549 * utils.c: Likewise.
2550 * gdbreplay.c: Unconditionally include errno.h.
2551
6d3d12eb
GB
25522014-08-07 Gary Benson <gbenson@redhat.com>
2553
2554 * server.h: Do not include string.h.
2555 * event-loop.c: Likewise.
2556 * linux-low.c: Likewise.
2557 * regcache.c: Likewise.
2558 * remote-utils.c: Likewise.
2559 * spu-low.c: Likewise.
2560 * utils.c: Likewise.
2561
dccbb609
GB
25622014-08-07 Gary Benson <gbenson@redhat.com>
2563
2564 * server.h: Do not include gdb_assert.h.
2565
e76df0d0
GB
25662014-08-07 Gary Benson <gbenson@redhat.com>
2567
2568 * server.h: Do not include common-utils.h.
2569
4cb9c816
GB
25702014-08-07 Gary Benson <gbenson@redhat.com>
2571
2572 * server.h: Do not include ptid.h.
2573 * notif.h: Likewise.
2574
3995eeee
GB
25752014-08-07 Gary Benson <gbenson@redhat.com>
2576
2577 * server.h: Do not include gdb_locale.h.
2578
cb9f1a9b
GB
25792014-08-07 Gary Benson <gbenson@redhat.com>
2580
2581 * server.h: Do not include gdb/signals.h.
2582 * win32-low.c: Likewise.
2583
a5fceff8
GB
25842014-08-07 Gary Benson <gbenson@redhat.com>
2585
2586 * server.h: Do not include pathmax.h.
2587
b9391142
GB
25882014-08-07 Gary Benson <gbenson@redhat.com>
2589
2590 * server.h: Do not include libiberty.h.
2591 * linux-bfin-low.c: Likewise.
2592
0e443c87
GB
25932014-08-07 Gary Benson <gbenson@redhat.com>
2594
2595 * server.h: Do not include ansidecl.h.
2596
8ebb3f56
GB
25972014-08-07 Gary Benson <gbenson@redhat.com>
2598
2599 * linux-x86-low.c: Do not include stddef.h.
2600 * lynx-ppc-low.c: Likewise.
2601 * tracepoint.c: Likewise.
2602
8980bdf6
GB
26032014-08-07 Gary Benson <gbenson@redhat.com>
2604
2605 * server.h: Do not include stdarg.h.
2606 * nto-low.c: Likewise.
2607
d7096f71
GB
26082014-08-07 Gary Benson <gbenson@redhat.com>
2609
2610 * server.h: Do not include stdlib.h.
2611 * inferiors.c: Likewise.
2612 * linux-low.c: Likewise.
2613 * regcache.c: Likewise.
2614 * spu-low.c: Likewise.
2615 * tracepoint.c: Likewise.
2616 * utils.c: Likewise.
2617
d02f550d
GB
26182014-08-07 Gary Benson <gbenson@redhat.com>
2619
2620 * server.h: Do not include stdio.h.
2621 * linux-low.c: Likewise.
2622 * remote-utils.c: Likewise.
2623 * spu-low.c: Likewise.
2624 * utils.c: Likewise.
2625 * wincecompat.c: Likewise.
2626
87f6c4e3
GB
26272014-08-06 Gary Benson <gbenson@redhat.com>
2628
2629 * regcache.c (init_register_cache): Move conditionals inside if.
2630
7089dca4
GB
26312014-08-06 Gary Benson <gbenson@redhat.com>
2632
2633 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
2634
462f517e
GB
26352014-07-31 Gary Benson <gbenson@redhat.com>
2636
2637 * ax.h: Do not include server.h.
2638 * gdbthread.h: Likewise.
2639 * lynx-low.h: Likewise.
2640 * notif.h: Likewise.
2641
976411d6
GB
26422014-07-30 Gary Benson <gbenson@redhat.com>
2643
2644 * server.h: Include common-defs.h.
2645 Do not include config.h or build-gnulib-gdbserver/config.h.
2646
d41f6d8e
GB
26472014-07-30 Gary Benson <gbenson@redhat.com>
2648
2649 * hostio-errno.c: Move server.h to top of includes list.
2650 * inferiors.c: Likewise.
2651 * linux-x86-low.c: Likewise.
2652 * notif.c: Include server.h.
2653
314c6a35
TT
26542014-07-24 Tom Tromey <tromey@redhat.com>
2655 Gary Benson <gbenson@redhat.com>
2656
2657 * server.h (CORE_ADDR): Now unsigned.
2658
69ff6be5
PA
26592014-07-16 Pedro Alves <palves@redhat.com>
2660
2661 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
2662
ce9e3fe7
PA
26632014-07-15 Pedro Alves <palves@redhat.com>
2664
2665 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
2666 copy.
2667
e76126e8
PA
26682014-07-11 Pedro Alves <palves@redhat.com>
2669
2670 * linux-low.c (kill_wait_lwp): New function, based on
2671 kill_one_lwp_callback, but use my_waitpid directly.
2672 (kill_one_lwp_callback, linux_kill): Use it.
2673
8e9db26e
PA
26742014-06-23 Pedro Alves <palves@redhat.com>
2675
2676 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
2677 before setting DR0..DR3.
2678
698b3e08
GB
26792014-06-20 Gary Benson <gbenson@redhat.com>
2680
2681 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
2682 * configure: Regenerated.
2683 * config.in: Likewise.
2684
125f8a3d
GB
26852014-06-20 Gary Benson <gbenson@redhat.com>
2686
2687 * Makefile.in (SFILES): Update locations for files moved
2688 from common to nat.
2689 (object file files): Reordered.
2690
42995dbd
GB
26912014-06-20 Gary Benson <gbenson@redhat.com>
2692
2693 * i386-low.h (i386_dr_low_can_set_addr): Removed.
2694 (i386_dr_low_set_addr): Likewise.
2695 (i386_dr_low_get_addr): Likewise.
2696 (i386_dr_low_can_set_control): Likewise.
2697 (i386_dr_low_set_control): Likewise.
2698 (i386_dr_low_get_control): Likewise.
2699 (i386_dr_low_get_status): Likewise.
2700 (i386_get_debug_register_length): Likewise.
2701 * linux-x86-low.c (i386_dr_low_set_addr):
2702 Changed signature. Made static.
2703 (i386_dr_low_get_addr): Likewise.
2704 (i386_dr_low_set_control): Likewise.
2705 (i386_dr_low_get_control): Likewise.
2706 (i386_dr_low_get_status): Likewise.
2707 (i386_dr_low): New global variable.
2708 * win32-i386-low.c (i386_dr_low_set_addr):
2709 Changed signature. Made static.
2710 (i386_dr_low_get_addr): Likewise.
2711 (i386_dr_low_set_control): Likewise.
2712 (i386_dr_low_get_control): Likewise.
2713 (i386_dr_low_get_status): Likewise.
2714 (i386_dr_low): New global variable.
2715
e1d2394b
MS
27162014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
2717
2718 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
2719 * Makefile.in (AR, AR_FLAGS): Define.
2720 * configure: Regenerate.
2721
3a8ee006
GB
27222014-06-19 Gary Benson <gbenson@redhat.com>
2723
2724 * Makefile.in (i386-dregs.o): New rule.
2725 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
2726 * i386-low.c (target.h): Remove include.
2727 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
2728 (DR_CONTROL_SHIFT): Likewise.
2729 (DR_CONTROL_SIZE): Likewise.
2730 (DR_RW_EXECUTE): Likewise.
2731 (DR_RW_WRITE): Likewise.
2732 (DR_RW_READ): Likewise.
2733 (DR_RW_IORW): Likewise.
2734 (DR_LEN_1): Likewise.
2735 (DR_LEN_2): Likewise.
2736 (DR_LEN_4): Likewise.
2737 (DR_LEN_8): Likewise.
2738 (DR_LOCAL_ENABLE_SHIFT): Likewise.
2739 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
2740 (DR_ENABLE_SIZE): Likewise.
2741 (DR_LOCAL_SLOWDOWN): Likewise.
2742 (DR_GLOBAL_SLOWDOWN): Likewise.
2743 (DR_CONTROL_RESERVED): Likewise.
2744 (I386_DR_CONTROL_MASK): Likewise.
2745 (I386_DR_VACANT): Likewise.
2746 (I386_DR_LOCAL_ENABLE): Likewise.
2747 (I386_DR_GLOBAL_ENABLE): Likewise.
2748 (I386_DR_DISABLE): Likewise.
2749 (I386_DR_SET_RW_LEN): Likewise.
2750 (I386_DR_GET_RW_LEN): Likewise.
2751 (I386_DR_WATCH_HIT): Likewise.
2752 (i386_wp_op_t): Likewise.
2753 (i386_show_dr): Likewise.
2754 (i386_length_and_rw_bits): Likewise.
2755 (i386_insert_aligned_watchpoint): Likewise.
2756 (i386_remove_aligned_watchpoint): Likewise.
2757 (i386_handle_nonaligned_watchpoint): Likewise.
2758 i386_update_inferior_debug_regs(): Likewise.
2759 (i386_dr_insert_watchpoint): Likewise.
2760 (i386_dr_remove_watchpoint): Likewise.
2761 (i386_dr_region_ok_for_watchpoint): Likewise.
2762 (i386_dr_stopped_data_address): Likewise.
2763 (i386_dr_stopped_by_watchpoint): Likewise.
2764
8f26655c
GB
27652014-06-19 Gary Benson <gbenson@redhat.com>
2766
2767 * i386-low.c (i386_dr_show): Renamed to
2768 i386_show_dr and made static. All uses updated.
2769 (i386_dr_length_and_rw_bits): Renamed to
2770 i386_length_and_rw_bits and made static.
2771 All uses updated.
2772 (i386_dr_insert_aligned_watchpoint): Renamed to
2773 i386_insert_aligned_watchpoint and made static.
2774 All uses updated.
2775 (i386_dr_remove_aligned_watchpoint): Renamed to
2776 i386_remove_aligned_watchpoint and made static.
2777 All uses updated.
2778 (i386_dr_update_inferior_debug_regs): Renamed to
2779 i386_update_inferior_debug_regs and made static.
2780 All uses updated.
2781
b9228891
GB
27822014-06-18 Gary Benson <gbenson@redhat.com>
2783
5171def3
GB
2784 * i386-low.h (i386_dr_low_can_set_addr): New macro.
2785 (i386_dr_low_can_set_control): Likewise.
2786 (i386_get_debug_register_length): Likewise.
2787 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
2788 (i386_dr_low_can_set_control): Likewise.
2789 (i386_get_debug_register_length): Likewise.
2790
27912014-06-17 Gary Benson <gbenson@redhat.com>
2792
b9228891
GB
2793 * i386-low.h (i386-dregs.h): New include.
2794 (DR_FIRSTADDR): Now in i386-dregs.h.
2795 (DR_LASTADDR): Likewise.
2796 (DR_NADDR): Likewise.
2797 (DR_STATUS): Likewise.
2798 (DR_CONTROL): Likewise.
2799 (i386_debug_reg_state): Likewise.
2800 (i386_dr_insert_watchpoint): Likewise.
2801 (i386_dr_remove_watchpoint): Likewise.
2802 (i386_dr_region_ok_for_watchpoint): Likewise.
2803 (i386_dr_stopped_data_address): Likewise.
2804 (i386_dr_stopped_by_watchpoint): Likewise.
2805 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
2806
4be83cc2
GB
28072014-06-18 Gary Benson <gbenson@redhat.com>
2808
2809 * i386-low.h (i386_low_insert_watchpoint): Renamed to
2810 i386_dr_insert_watchpoint.
2811 (i386_low_remove_watchpoint): Renamed to
2812 i386_dr_remove_watchpoint.
2813 (i386_low_region_ok_for_watchpoint): Renamed to
2814 i386_dr_region_ok_for_watchpoint.
2815 (i386_low_stopped_data_address): Renamed to
2816 i386_dr_stopped_data_address.
2817 (i386_low_stopped_by_watchpoint): Renamed to
2818 i386_dr_stopped_by_watchpoint.
2819 * i386-low.c (i386_show_dr): Renamed to
2820 i386_dr_show and made nonstatic. All uses updated.
2821 (i386_length_and_rw_bits): Renamed to
2822 i386_dr_length_and_rw_bits and made nonstatic.
2823 All uses updated.
2824 (i386_insert_aligned_watchpoint): Renamed to
2825 i386_dr_insert_aligned_watchpoint and made nonstatic.
2826 All uses updated.
2827 (i386_remove_aligned_watchpoint): Renamed to
2828 i386_dr_remove_aligned_watchpoint and made nonstatic.
2829 All uses updated.
2830 (i386_update_inferior_debug_regs): Renamed to
2831 i386_dr_update_inferior_debug_regs and made nonstatic.
2832 All uses updated.
2833 (i386_low_insert_watchpoint): Renamed to
2834 i386_dr_insert_watchpoint. All uses updated.
2835 (i386_low_remove_watchpoint): Renamed to
2836 i386_dr_remove_watchpoint. All uses updated.
2837 (i386_low_region_ok_for_watchpoint): Renamed to
2838 i386_dr_region_ok_for_watchpoint. All uses updated.
2839 (i386_low_stopped_data_address): Renamed to
2840 i386_dr_stopped_data_address. All uses updated.
2841 (i386_low_stopped_by_watchpoint): Renamed to
2842 i386_dr_stopped_by_watchpoint. All uses updated.
2843
131aa0d4
GB
28442014-06-18 Gary Benson <gbenson@redhat.com>
2845
2846 * i386-low.c (i386_dr_low_can_set_addr): New macro.
2847 (i386_dr_low_can_set_control): Likewise.
2848 (i386_insert_aligned_watchpoint): New check.
2849
d9305f7f
GB
28502014-06-18 Gary Benson <gbenson@redhat.com>
2851
2852 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
2853 Renamed to state.
2854
e927c9fc
GB
28552014-06-18 Gary Benson <gbenson@redhat.com>
2856
2857 * i386-low.c (i386_length_and_rw_bits): Use internal_error
2858 instead of fatal and error.
2859 (i386_handle_nonaligned_watchpoint): Likewise.
2860
1b6d4134
GB
28612014-06-18 Gary Benson <gbenson@redhat.com>
2862
2863 * i386-low.c (i386_get_debug_register_length): New macro.
2864 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
2865 (i386_show_dr): Use debug_printf instead of fprintf. Use
2866 phex to format values.
2867
6e62758f
GB
28682014-06-18 Gary Benson <gbenson@redhat.com>
2869
2870 * i386-low.h: Comment changes.
2871 * i386-low.c: Likewise.
2872
fc6e2f03
GB
28732014-06-18 Gary Benson <gbenson@redhat.com>
2874
2875 * i386-low.c: Whitespace changes.
2876
f9d1eeed
TT
28772014-06-12 Tom Tromey <tromey@redhat.com>
2878
2879 * utils.c (freeargv): Remove.
2880
0b04e523
TT
28812014-06-12 Tom Tromey <tromey@redhat.com>
2882
2883 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
2884 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
2885 (parse_debug_format_options): Likewise.
2886 (gdbserver_usage): Likewise.
2887 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
2888 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
2889 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
2890 against libiberty.
2891 ($(LIBGNU)): Depend on libiberty.
2892 (all-lib): Recurse into all subdirs.
2893 (install-only): Invoke "install" target in subdirs.
2894 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
2895 targets.
2896 * configure: Rebuild.
2897 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
2898 for vasprintf, vsnprintf, or gettimeofday.
2899 * configure.srv: Don't add safe-ctype.o or lbasename.o to
2900 srv_tgtobj.
2901
270c9937
JB
29022014-06-05 Joel Brobecker <brobecker@adacore.com>
2903
2904 * development.sh: Delete.
2905 * Makefile.in (config.status): Adjust dependency on development.sh.
2906 * configure.ac: Adjust development.sh source call.
2907 * configure: Regenerate.
2908
0a261ed8
PA
29092014-06-02 Pedro Alves <palves@redhat.com>
2910
2911 * ax.c (gdb_free_agent_expr): New function.
2912 * ax.h (gdb_free_agent_expr): New declaration.
2913 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
2914 list.
2915 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
2916 static.
2917 (clear_breakpoint_conditions_and_commands): New function.
2918 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
2919 (clear_breakpoint_conditions_and_commands): New declaration.
2920
e9dae05e
RR
29212014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
2922
2923 * linux-aarch64-low.c (asm/ptrace.h): Include.
2924
5876f503
JK
29252014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
2926
2927 Fix TLS access for -static -pthread.
2928 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
2929 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
2930 (thread_db_load_search, try_thread_db_load_1): Initialize it.
2931
802e8e6d
PA
29322014-05-20 Pedro Alves <palves@redhat.com>
2933
2934 * linux-aarch64-low.c (aarch64_insert_point)
2935 (aarch64_remove_point): No longer check whether the type is
2936 supported here. Adjust to new interface.
2937 (the_low_target): Install aarch64_supports_z_point_type as
2938 supports_z_point_type method.
2939 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
2940 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
2941 instead of a Z packet char. Adjust.
2942 (arm_supports_z_point_type): New function.
2943 (arm_insert_point, arm_remove_point): Adjust to new interface.
2944 (the_low_target): Install arm_supports_z_point_type.
2945 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
2946 (cris_insert_point, cris_remove_point): Adjust to new interface.
2947 Don't check whether the type is supported here.
2948 (the_low_target): Install cris_supports_z_point_type.
2949 * linux-low.c (linux_supports_z_point_type): New function.
2950 (linux_insert_point, linux_remove_point): Adjust to new interface.
2951 * linux-low.h (struct linux_target_ops) <insert_point,
2952 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
2953 raw_breakpoint pointer parameter.
2954 <supports_z_point_type>: New method.
2955 * linux-mips-low.c (mips_supports_z_point_type): New function.
2956 (mips_insert_point, mips_remove_point): Adjust to new interface.
2957 Use mips_supports_z_point_type.
2958 (the_low_target): Install mips_supports_z_point_type.
2959 * linux-ppc-low.c (the_low_target): Install NULL as
2960 supports_z_point_type method.
2961 * linux-s390-low.c (the_low_target): Install NULL as
2962 supports_z_point_type method.
2963 * linux-sparc-low.c (the_low_target): Install NULL as
2964 supports_z_point_type method.
2965 * linux-x86-low.c (x86_supports_z_point_type): New function.
2966 (x86_insert_point): Adjust to new insert_point interface. Use
2967 insert_memory_breakpoint. Adjust to new
2968 i386_low_insert_watchpoint interface.
2969 (x86_remove_point): Adjust to remove_point interface. Use
2970 remove_memory_breakpoint. Adjust to new
2971 i386_low_remove_watchpoint interface.
2972 (the_low_target): Install x86_supports_z_point_type.
2973 * lynx-low.c (lynx_target_ops): Install NULL as
2974 supports_z_point_type callback.
2975 * nto-low.c (nto_supports_z_point_type): New.
2976 (nto_insert_point, nto_remove_point): Adjust to new interface.
2977 (nto_target_ops): Install nto_supports_z_point_type.
2978 * mem-break.c: Adjust intro comment.
2979 (struct raw_breakpoint) <raw_type, size>: New fields.
2980 <inserted>: Update comment.
2981 <shlib_disabled>: Delete field.
2982 (enum bkpt_type) <gdb_breakpoint>: Delete value.
2983 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
2984 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
2985 (raw_bkpt_type_to_target_hw_bp_type): New function.
2986 (find_enabled_raw_code_breakpoint_at): New function.
2987 (find_raw_breakpoint_at): New type and size parameters. Use them.
2988 (insert_memory_breakpoint): New function, based off
2989 set_raw_breakpoint_at.
2990 (remove_memory_breakpoint): New function.
2991 (set_raw_breakpoint_at): Reimplement.
2992 (set_breakpoint): New, based on set_breakpoint_at.
2993 (set_breakpoint_at): Reimplement.
2994 (delete_raw_breakpoint): Go through the_target->remove_point
2995 instead of assuming memory breakpoints.
2996 (find_gdb_breakpoint_at): Delete.
2997 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
2998 (find_gdb_breakpoint): New function.
2999 (set_gdb_breakpoint_at): Delete.
3000 (z_type_supported): New function.
3001 (set_gdb_breakpoint_1): New function, loosely based off
3002 set_gdb_breakpoint_at.
3003 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
3004 (delete_gdb_breakpoint_at): Delete.
3005 (delete_gdb_breakpoint_1): New function, loosely based off
3006 delete_gdb_breakpoint_at.
3007 (delete_gdb_breakpoint): New function.
3008 (clear_gdb_breakpoint_conditions): Rename to ...
3009 (clear_breakpoint_conditions): ... this. Don't handle a NULL
3010 breakpoint.
3011 (add_condition_to_breakpoint): Make static.
3012 (add_breakpoint_condition): Take a struct breakpoint pointer
3013 instead of an address. Adjust.
3014 (gdb_condition_true_at_breakpoint): Rename to ...
3015 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
3016 z_type parameter.
3017 (gdb_condition_true_at_breakpoint): Reimplement.
3018 (add_breakpoint_commands): Take a struct breakpoint pointer
3019 instead of an address. Adjust.
3020 (gdb_no_commands_at_breakpoint): Rename to ...
3021 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
3022 parameter. Return true if no breakpoint was found. Change debug
3023 output.
3024 (gdb_no_commands_at_breakpoint): Reimplement.
3025 (run_breakpoint_commands): Rename to ...
3026 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
3027 and change return type to boolean.
3028 (run_breakpoint_commands): New function.
3029 (gdb_breakpoint_here): Also check for Z1 breakpoints.
3030 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
3031 breakpoint. Go through the_target->remove_point instead of
3032 assuming memory breakpoint.
3033 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
3034 software and hardware breakpoints.
3035 (reinsert_raw_breakpoint): Go through the_target->insert_point
3036 instead of assuming memory breakpoint.
3037 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
3038 software and hardware breakpoints.
3039 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
3040 Check both software and hardware breakpoints.
3041 (validate_inserted_breakpoint): Assert the breakpoint is a
3042 software breakpoint. Set the inserted flag to -1 instead of
3043 setting shlib_disabled.
3044 (delete_disabled_breakpoints): Adjust.
3045 (validate_breakpoints): Only validate software breakpoints.
3046 Adjust to inserted flag change.
3047 (check_mem_read, check_mem_write): Skip breakpoint types other
3048 than software breakpoints. Adjust to inserted flag change.
3049 * mem-break.h (enum raw_bkpt_type): New enum.
3050 (raw_breakpoint, struct process_info): Forward declare.
3051 (Z_packet_to_target_hw_bp_type): Delete declaration.
3052 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
3053 (set_gdb_breakpoint, delete_gdb_breakpoint)
3054 (clear_breakpoint_conditions): New declarations.
3055 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
3056 (breakpoint_inserted_here): Update comment.
3057 (add_breakpoint_condition, add_breakpoint_commands): Replace
3058 address parameter with a breakpoint pointer parameter.
3059 (gdb_breakpoint_here): Update comment.
3060 (delete_gdb_breakpoint_at): Delete.
3061 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
3062 * server.c (process_point_options): Take a struct breakpoint
3063 pointer instead of an address. Adjust.
3064 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
3065 delete_gdb_breakpoint.
3066 * spu-low.c (spu_target_ops): Install NULL as
3067 supports_z_point_type method.
3068 * target.h: Include mem-break.h.
3069 (struct target_ops) <prepare_to_access_memory>: Update comment.
3070 <supports_z_point_type>: New field.
3071 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
3072 instead of a char. Also take a raw breakpoint pointer.
3073 * win32-arm-low.c (the_low_target): Install NULL as
3074 supports_z_point_type.
3075 * win32-i386-low.c (i386_supports_z_point_type): New function.
3076 (i386_insert_point, i386_remove_point): Adjust to new interface.
3077 (the_low_target): Install i386_supports_z_point_type.
3078 * win32-low.c (win32_supports_z_point_type): New function.
3079 (win32_insert_point, win32_remove_point): Adjust to new interface.
3080 (win32_target_ops): Install win32_supports_z_point_type.
3081 * win32-low.h (struct win32_target_ops):
3082 <supports_z_point_type>: New method.
3083 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
3084 instead of a char. Also take a raw breakpoint pointer.
3085
932539e3
PA
30862014-05-20 Pedro Alves <palves@redhat.com>
3087
3088 * mem-break.h: Include break-common.h.
3089 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
3090 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
3091 (Z_packet_to_target_hw_bp_type): New declaration.
3092 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
3093 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
3094 (Z_PACKET_ACCESS_WP): Delete macros.
3095 (Z_packet_to_hw_type): Delete function.
3096 * i386-low.h: Don't include break-common.h here.
3097 (Z_packet_to_hw_type): Delete declaration.
3098 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
3099 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
3100 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
3101 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
3102 * linux-aarch64-low.c: Don't include break-common.h here.
3103 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
3104 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
3105 (Z_packet_to_target_hw_bp_type): Delete function.
3106 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
3107 function.
3108 (mips_insert_point, mips_remove_point): Use
3109 Z_packet_to_target_hw_bp_type.
3110
4ff0d3d8
PA
31112014-05-20 Pedro Alves <palves@redhat.com>
3112
3113 * linux-aarch64-low.c: Include break-common.h.
3114 (enum target_point_type): Delete.
3115 (Z_packet_to_point_type): Rename to ...
3116 (Z_packet_to_target_hw_bp_type): ... this, and return a
3117 target_hw_bp_type instead.
3118 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
3119 instead of an enum target_point_type.
3120 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
3121 breakpoint type.
3122 (aarch64_dr_state_insert_one_point)
3123 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
3124 (aarch64_handle_aligned_watchpoint)
3125 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
3126 Take an enum target_hw_bp_type instead of an enum
3127 target_point_type.
3128 (aarch64_supports_z_point_type): New function.
3129 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
3130 use Z_packet_to_target_hw_bp_type.
3131
786dc519
JB
31322014-05-20 Joel Brobecker <brobecker@adacore.com>
3133
3134 * configure.ac: Only use -Werror by default when DEVELOPMENT
3135 is true.
3136 * configure: Regenerate.
3137
9e0aa64f
JK
31382014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
3139
3140 Fix gdbserver qGetTLSAddr for x86_64 -m32.
3141 * linux-x86-low.c (X86_64_USER_REGS): New.
3142 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
3143
2b577b92
YQ
31442014-04-28 Yao Qi <yao@codesourcery.com>
3145
3146 * Makefile.in (i386-avx512.c): Fix the typo of generated file
3147 name.
3148
94611da2
PA
31492014-04-25 Pedro Alves <palves@redhat.com>
3150
3151 PR server/16255
3152 * linux-low.c (linux_attach_fail_reason_string): New function.
3153 (linux_attach_lwp): Delete.
3154 (linux_attach_lwp_1): Rename to ...
3155 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
3156 argument. Remove "initial" parameter. Return int instead of
3157 void. Don't error or warn here.
3158 (linux_attach): Adjust to call linux_attach_lwp. Call error on
3159 failure to attach to the tgid. Call warning when failing to
3160 attach to an lwp.
3161 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
3162 argument. Remove "initial" parameter. Return int instead of
3163 void. Don't error or warn here.
3164 (linux_attach_fail_reason_string): New declaration.
3165 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
3166 interface change. Use linux_attach_fail_reason_string.
3167
01f9f808
MS
31682014-04-24 Michael Sturm <michael.sturm@mintel.com>
3169 Walfred Tedeschi <walfred.tedeschi@intel.com>
3170
3171 * Makefile.in: Added rules to handle new files
3172 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
3173 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
3174 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
3175 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
3176 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
3177 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
3178 x32-avx512-linux.o.
3179 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
3180 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
3181 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
3182 i386/x32-avx512.xml.
3183 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
3184 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
3185 i386/x32-avx512-linux.xml.
3186 * i387-fp.c (num_avx512_k_registers): New constant for number
3187 of K registers.
3188 (num_avx512_zmmh_low_registers): New constant for number of
3189 lower ZMM registers (0-15).
3190 (num_avx512_zmmh_high_registers): New constant for number of
3191 higher ZMM registers (16-31).
3192 (num_avx512_ymmh_registers): New contant for number of higher
3193 YMM registers (ymm16-31 added by avx521 on x86_64).
3194 (num_avx512_xmm_registers): New constant for number of higher
3195 XMM registers (xmm16-31 added by AVX512 on x86_64).
3196 (struct i387_xsave): Add space for AVX512 registers.
3197 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
3198 Add code to handle AVX512 registers.
3199 (i387_xsave_to_cache): Add code to handle AVX512 registers.
3200 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
3201 prototypei from generated file.
3202 (tdesc_amd64_avx512_linux): Likewise.
3203 (init_registers_x32_avx512_linux): Likewise.
3204 (tdesc_x32_avx512_linux): Likewise.
3205 (init_registers_i386_avx512_linux): Likewise.
3206 (tdesc_i386_avx512_linux): Likewise.
3207 (x86_64_regmap): Add AVX512 registers.
3208 (x86_linux_read_description): Add code to handle AVX512 XSTATE
3209 mask.
3210 (initialize_low_arch): Add code to initialize AVX512 registers.
3211
51aa91f9
PA
32122014-04-23 Pedro Alves <palves@redhat.com>
3213
3214 * mem-break.c (find_gdb_breakpoint_at): Make static.
3215 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
3216
a4165e94
PA
32172014-04-23 Pedro Alves <palves@redhat.com>
3218
3219 * i386-low.c: Don't include break-common.h here.
3220 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
3221 prototype to take target_hw_bp_type as argument instead of a Z
3222 packet char.
3223 * i386-low.h: Include break-common.h here.
3224 (Z_packet_to_hw_type): Declare.
3225 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
3226 prototypes.
3227 * linux-x86-low.c (x86_insert_point): Convert the packet number to
3228 a target_hw_bp_type before calling i386_low_insert_watchpoint.
3229 (x86_remove_point): Convert the packet number to a
3230 target_hw_bp_type before calling i386_low_remove_watchpoint.
3231 * win32-i386-low.c (i386_insert_point): Convert the packet number
3232 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
3233 (i386_remove_point): Convert the packet number to a
3234 target_hw_bp_type before calling i386_low_remove_watchpoint.
3235
b8acf843
PA
32362014-04-23 Pedro Alves <palves@redhat.com>
3237
3238 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
3239
d708bcd1
PA
32402014-04-10 Pedro Alves <palves@redhat.com>
3241
3242 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
3243 Check if the condition or command is NULL before checking if the
3244 breakpoint is known. On success, return true.
3245 * mem-break.h (add_breakpoint_condition): Document return.
3246 (add_breakpoint_commands): Add describing comment.
3247 * server.c (skip_to_semicolon): New function.
3248 (process_point_options): Use it.
3249
2eec7d5b
PA
32502014-04-09 Pedro Alves <palves@redhat.com>
3251
3252 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
3253 to lwpid_of.
3254
fa96cb38
PA
32552014-02-27 Pedro Alves <palves@redhat.com>
3256
3257 PR 12702
3258 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
3259 macros.
3260 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
3261 output.
3262 (last_thread_of_process_p): Take a PID argument instead of a
3263 thread pointer.
3264 (linux_wait_for_lwp): Delete.
3265 (num_lwps, check_zombie_leaders, not_stopped_callback): New
3266 functions.
3267 (linux_low_filter_event): New function, party factored out from
3268 linux_wait_for_event.
3269 (linux_wait_for_event): Rename to ...
3270 (linux_wait_for_event_filtered): ... this. Add new filter ptid
3271 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
3272 sigsuspend. Check for zombie leaders.
3273 (linux_wait_for_event): Reimplement as wrapper around
3274 linux_wait_for_event_filtered.
3275 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
3276 a normal or signal exit is seen, it's the whole process exiting.
3277 (wait_for_sigstop): No longer a for_each_inferior callback.
3278 Rewrite on top of linux_wait_for_event_filtered.
3279 (stop_all_lwps): Call wait_for_sigstop directly.
3280 * server.c (resume, handle_target_event): Handle
3281 TARGET_WAITKIND_NO_RESUMED.
3282
d763de10
JB
32832014-02-26 Joel Brobecker <brobecker@adacore.com>
3284
3285 * win32-low.c (psapi_get_dll_name,
3286 * win32_CreateToolhelp32Snapshot): Delete.
3287 (win32_CreateToolhelp32Snapshot, win32_Module32First)
3288 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
3289 Delete.
3290 (handle_load_dll): Add function description.
3291 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
3292
850a0f76
JB
32932014-02-26 Joel Brobecker <brobecker@adacore.com>
3294
3295 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
3296 Add comment.
3297 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
3298 base address when calling win32_add_one_solib.
3299 (handle_load_dll): Delete local variable load_addr.
3300 Remove 0x1000 offset applied to DLL base address when calling
3301 win32_add_one_solib.
3302 (handle_unload_dll): Add comment.
3303
f25b3fc3
JB
33042014-02-26 Joel Brobecker <brobecker@adacore.com>
3305
3306 * win32-low.c (win32_add_all_dlls): Renames
3307 win32_ensure_ntdll_loaded. Rewrite function documentation.
3308 Adjust implementation to always load all DLLs.
3309 Add 0x1000 offset to DLL base address when calling
3310 win32_add_one_solib.
3311 (child_initialization_done): New static global.
3312 (do_initial_child_stuff): Set child_initialization_done to
3313 zero during child initialization, and 1 after. Replace call
3314 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
3315 Add comment.
3316 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
3317 (handle_unload_dll): Add function documentation.
3318 (get_child_debug_event): Ignore load and unload DLL events
3319 during child initialization.
3320
d86d4aaf
DE
33212014-02-20 Doug Evans <dje@google.com>
3322
3bc32da3 3323 Remove global all_lwps.
d86d4aaf
DE
3324 * inferiors.h (ptid_of): Move here from linux-low.h.
3325 (pid_of, lwpid_of): Ditto.
3326 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
3327 parameter is a struct thread_info * now.
3328 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
3329 directly. Pass &all_threads to find_inferior instead of &all_lwps.
3330 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
3331 directly.
3332 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
3333 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
3334 * linux-arm-low.c (update_registers_callback): Update, "entry"
3335 parameter is a struct thread_info * now.
3336 Fetch lwpid from current_inferior directly.
3337 (arm_insert_point): Pass &all_threads to find_inferior instead of
3338 &all_lwps.
3339 (arm_remove_point): Ditto.
3340 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
3341 (arm_prepare_to_resume): Fetch pid from thread.
3342 (arm_read_description): Fetch lwpid from current_inferior directly.
3343 * linux-low.c (all_lwps): Delete.
3344 (delete_lwp): Delete call to remove_inferior.
3345 (handle_extended_wait): Fetch lwpid from thread.
3346 (add_lwp): Don't set lwp->entry.id. Remove call to
3347 add_inferior_to_list.
3348 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
3349 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
3350 (kill_one_lwp_callback): Ditto.
3351 (linux_kill): Don't dereference NULL pointer.
3352 Fetch ptid,lwpid from thread.
3353 (get_detach_signal): Fetch ptid from thread.
3354 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
3355 Simplify call to regcache_invalidate_thread.
3356 (delete_lwp_callback): Update, "entry" parameter is a
3357 struct thread_info * now. Fetch pid from thread.
3358 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
3359 (status_pending_p_callback): Update, "entry" parameter is a
3360 struct thread_info * now. Fetch ptid from thread.
3361 (find_lwp_pid): Update, "entry" parameter is a
3362 struct thread_info * now.
3363 (linux_wait_for_lwp): Fetch pid from thread.
3364 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
3365 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
3366 (enqueue_one_deferred_signal): Fetch lwpid from thread.
3367 (dequeue_one_deferred_signal): Ditto.
3368 (cancel_breakpoint): Fetch ptid from current_inferior.
3369 (linux_wait_for_event): Pass &all_threads to find_inferior,
3370 not &all_lwps. Fetch ptid, lwpid from thread.
3371 (count_events_callback): Update, "entry" parameter is a
3372 struct thread_info * now.
3373 (select_singlestep_lwp_callback): Ditto.
3374 (select_event_lwp_callback): Ditto.
3375 (cancel_breakpoints_callback): Ditto.
3376 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
3377 not &all_lwps.
3378 (select_event_lwp): Ditto. Fetch ptid from event_thread.
3379 (unsuspend_one_lwp): Update, "entry" parameter is a
3380 struct thread_info * now.
3381 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
3382 not &all_lwps.
3383 (linux_stabilize_threads): Ditto. And for for_each_inferior.
3384 Fetch lwpid from thread, not lwp.
3385 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
3386 Pass &all_threads to find_inferior, not &all_lwps.
3387 (send_sigstop): Fetch lwpid from thread, not lwp.
3388 (send_sigstop_callback): Update, "entry" parameter is a
3389 struct thread_info * now.
3390 (suspend_and_send_sigstop_callback): Ditto.
3391 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
3392 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
3393 struct thread_info * now.
3394 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
3395 from thread, lwp.
3396 (lwp_running): Update, "entry" parameter is a
3397 struct thread_info * now.
3398 (stop_all_lwps): Fetch ptid from thread.
3399 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
3400 (linux_resume_one_lwp): Fetch lwpid from thread.
3401 (linux_set_resume_request): Update, "entry" parameter is a
3402 struct thread_info * now. Fetch pid, lwpid from thread.
3403 (resume_status_pending_p): Update, "entry" parameter is a
3404 struct thread_info * now.
3405 (need_step_over_p): Ditto. Fetch lwpid from thread.
3406 (start_step_over): Fetch lwpid from thread.
3407 (linux_resume_one_thread): Update, "entry" parameter is a
3408 struct thread_info * now. Fetch lwpid from thread.
3409 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
3410 (proceed_one_lwp): Update, "entry" parameter is a
3411 struct thread_info * now. Fetch lwpid from thread.
3412 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
3413 struct thread_info * now.
3414 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
3415 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
3416 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
3417 directly.
3418 (regsets_store_inferior_registers): Ditto.
3419 (fetch_register, store_register): Ditto.
3420 (linux_read_memory, linux_write_memory): Ditto.
3421 (linux_request_interrupt): Ditto.
3422 (linux_read_auxv): Ditto.
3423 (linux_xfer_siginfo): Ditto.
3424 (linux_qxfer_spu): Ditto.
3425 (linux_qxfer_libraries_svr4): Ditto.
3426 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
3427 moved to inferiors.h.
3428 (get_lwp): Delete.
3429 (get_thread_lwp): Update.
3430 (struct lwp_info): Delete member "entry". Simplify comment for
3431 member "thread".
3432 (all_lwps): Delete.
3433 * linux-mips-low.c (mips_read_description): Fetch lwpid from
3434 current_inferior directly.
3435 (update_watch_registers_callback): Update, "entry" parameter is a
3436 struct thread_info * now. Fetch pid from thread.
3437 (mips_linux_prepare_to_resume): Fetch ptid from thread.
3438 (mips_insert_point): Fetch lwpid from current_inferior.
3439 Pass &all_threads to find_inferior, not &all_lwps.
3440 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
3441 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
3442 directly.
3443 (mips_stopped_data_address): Ditto.
3444 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
3445 directly.
3446 * linux-tile-low.c (tile_arch_setup): Ditto.
3447 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
3448 (update_debug_registers_callback): Update, "entry" parameter is a
3449 struct thread_info * now. Fetch pid from thread.
3450 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
3451 Pass &all_threads to find_inferior, not &all_lwps.
3452 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
3453 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
3454 Pass &all_threads to find_inferior, not &all_lwps.
3455 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
3456 (i386_dr_low_get_status): Ditto.
3457 (x86_linux_prepare_to_resume): Fetch ptid from thread.
3458 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
3459 (x86_linux_read_description): Ditto.
3460 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
3461
3b8361aa
DE
34622014-02-20 Doug Evans <dje@google.com>
3463
3464 * inferiors.c (get_first_inferior): Fix buglet.
3465
f7667f0d
DE
34662014-02-19 Doug Evans <dje@google.com>
3467
3468 * gdbthread.h (add_thread): Change result type to struct thread_info *.
3469 * inferiors.c (add_thread): Change result type to struct thread_info *.
3470 All callers updated.
3471 (add_lwp): Call add_thread here instead of in callers.
3472 All callers updated.
3473 * linux-low.h (get_lwp_thread): Rewrite.
3474 (struct lwp_info): New member "thread".
3475
b3312d80
DE
34762014-02-19 Doug Evans <dje@google.com>
3477
3478 * linux-low.c (add_lwp): Change result to struct lwp_info *.
3479 All callers updated.
3480
ecc6f45c
DE
34812014-02-19 Doug Evans <dje@google.com>
3482
3483 * inferiors.c (add_thread): Fix whitespace.
3484
649ebbca
DE
34852014-02-19 Doug Evans <dje@google.com>
3486
3487 * dll.c (clear_dlls): Replace accessing list implemention details
3488 with API function.
3489 * gdbthread.h (get_first_thread): Declare.
3490 * inferiors.c (for_each_inferior_with_data): New function.
3491 (get_first_thread): New function.
3492 (find_thread_ptid): Simplify.
3493 (get_first_inferior): New function.
3494 (clear_list): Delete.
3495 (one_inferior_p): New function.
3496 (clear_inferior_list): New function.
3497 (clear_inferiors): Update.
3498 * inferiors.h (for_each_inferior_with_data): Declare.
3499 (clear_inferior_list): Declare.
3500 (one_inferior_p): Declare.
3501 (get_first_inferior): Declare.
3502 * linux-low.c (linux_wait_for_event): Replace accessing list
3503 implemention details with API function.
3504 * server.c (target_running): Ditto.
3505 (accumulate_file_name_length): New function.
3506 (emit_dll_description): New function.
3507 (handle_qxfer_libraries): Replace accessing list implemention
3508 details with API function.
3509 (handle_qxfer_threads_worker): New function.
3510 (handle_qxfer_threads_proper): Replace accessing list implemention
3511 details with API function.
3512 (handle_query): Ditto.
3513 (visit_actioned_threads_callback_ftype): New typedef.
3514 (visit_actioned_threads_data): New struct.
3515 (visit_actioned_threads): Rewrite to be find_inferior callback.
3516 (resume): Call find_inferior.
3517 (handle_status): Replace accessing list implemention
3518 details with API function.
3519 (process_serial_event): Replace accessing list implemention details
3520 with API function.
3521 * target.c (set_desired_inferior): Replace accessing list implemention
3522 details with API function.
3523 * tracepoint.c (same_process_p): New function.
3524 (gdb_agent_about_to_close): Replace accessing list implemention
3525 details with API function.
3526 * win32-low.c (child_delete_thread): Replace accessing list
3527 implemention details with API function.
3528 (match_dll_by_basename): New function.
3529 (dll_is_loaded_by_basename): New function.
3530 (win32_ensure_ntdll_loaded): Replace accessing list implemention
3531 details call to dll_is_loaded_by_basename.
3532
80894984
DE
35332014-02-19 Doug Evans <dje@google.com>
3534
3535 * dll.h (struct dll_info): Add comment.
3536 * gdbthread.h (struct thread_info): Add comment.
3537 (current_ptid): Simplify.
3538 * inferiors.c (add_process): Update.
3539 (remove_process): Update.
3540 * inferiors.h (struct process_info): Rename member "head" to "entry".
3541 * linux-low.c (delete_lwp): Update.
3542 (add_lwp): Update.
3543 (last_thread_of_process_p): Update.
3544 (kill_one_lwp_callback, linux_kill): Update.
3545 (status_pending_p_callback): Update.
3546 (wait_for_sigstop): Update. Simplify read of ptid.
3547 (start_step_over): Update.
3548 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
3549 (get_lwp_thread): Update.
3550 (struct lwp_info): Rename member "head" to "entry".
3551 * regcache.h (inferior_list_entry): Delete.
3552 * server.c (kill_inferior_callback): Update.
3553 (detach_or_kill_inferior_callback): Update.
3554 (print_started_pid): Update.
3555 (print_attached_pid): Update.
3556 (process_serial_event): Simplify read of ptid.
3557 * thread-db.c (thread_db_create_event): Update.
3558 (thread_db_get_tls_address): Update.
3559 * win32-low.c (current_inferior_ptid): Simplify.
3560
46917d26
TT
35612014-02-19 Tom Tromey <tromey@redhat.com>
3562
3563 * target.h (struct target_ops) <supports_btrace>: Add target_ops
3564 argument.
3565 (target_supports_btrace): Update.
3566
0759a81e
YQ
35672014-02-14 Yao Qi <yao@codesourcery.com>
3568
3569 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
3570 (rsp-low-ipa.o): New target.
3571
a7191e8b
TT
35722014-02-12 Tom Tromey <tromey@redhat.com>
3573
3574 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
3575 convert_ascii_to_int.
3576 * regcache.c (registers_to_string): Likewise.
3577 * remote-utils.c (decode_M_packet): Likewise.
3578 * server.c (process_serial_event): Likewise.
3579
ff0e980e
TT
35802014-02-12 Tom Tromey <tromey@redhat.com>
3581
3582 * server.c (handle_query, handle_v_run): Use hex2bin, not
3583 unhexify.
3584 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
3585
e9371aff
TT
35862014-02-12 Tom Tromey <tromey@redhat.com>
3587
3588 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
3589 convert_int_to_ascii.
3590 * regcache.c (registers_to_string, collect_register_as_string):
3591 Likewise.
3592 * remote-utils.c (look_up_one_symbol, relocate_instruction):
3593 Likewise.
3594 * server.c (process_serial_event): Likewise.
3595 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
3596 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
3597
971dc0b8
TT
35982014-02-12 Tom Tromey <tromey@redhat.com>
3599
3600 * remote-utils.c (look_up_one_symbol, monitor_output): Use
3601 bin2hex, not hexify.
3602 * tracepoint.c (cmd_qtstatus): Likewise.
3603
0a822afb
TT
36042014-02-12 Tom Tromey <tromey@redhat.com>
3605
3606 * remote-utils.c (monitor_output): Pass explicit length to
3607 hexify.
3608
9c3d6531
TT
36092014-02-12 Tom Tromey <tromey@redhat.com>
3610
3611 * tracepoint.c: Include rsp-low.h.
3612 * server.c: Include rsp-low.h.
3613 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
3614 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
3615 declare.
3616 * remote-utils.c: Include rsp-low.h.
3617 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
3618 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
3619 (convert_int_to_ascii, convert_ascii_to_int): Move to
3620 common/rsp-low.c.
3621 * regcache.c: Include rsp-low.h.
3622 * ax.c: Include rsp-low.h.
3623 * Makefile.in (SFILES): Add common/rsp-low.c.
3624 (OBS): Add rsp-low.o.
3625 (rsp-low.o): New target.
3626
01fd3ea5
TT
36272014-02-12 Tom Tromey <tromey@redhat.com>
3628
3629 * utils.h (pulongest, plongest, phex_nz): Don't declare.
3630 Include print-utils.h.
3631 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
3632 (plongest, thirty_two, phex_nz): Remove.
3633 * Makefile.in (SFILES): Add common/print-utils.c.
3634 (OBS): Add print-utils.o.
3635 (print-utils-ipa.o): New target.
3636 (print-utils.o): New target.
3637 (IPA_OBJS): Add print-utils-ipa.o.
3638
e99dc820
TT
36392014-02-06 Tom Tromey <tromey@redhat.com>
3640
3641 * Makefile.in (SFILES): Fix indentation.
3642
ee1e2d4f
DE
36432014-02-05 Doug Evans <dje@google.com>
3644
3645 * linux-low.c (linux_wait_for_event): Improve comment.
3646 (linux_wait_1): Keep current_inferior in sync with event_child.
3647
f5a02773
DE
36482014-01-22 Doug Evans <dje@google.com>
3649
3650 * gdbthread.h (gdb_id_to_thread): Delete, unused.
3651
87ce2a04
DE
36522014-01-22 Doug Evans <dje@google.com>
3653
3654 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
3655 * configure: Regenerate.
3656 * config.in: Regenerate.
3657 * Makefile.in (SFILES): Add debug.c.
3658 (OBS): Add debug.o.
3659 * debug.c: New file.
3660 * debug.h: New file.
3661 * linux-aarch64-low.c (*): Update all debugging printfs to use
3662 debug_printf instead of fprintf.
3663 * linux-arm-low.c (*): Ditto.
3664 * linux-cris-low.c (*): Ditto.
3665 * linux-crisv32-low.c (*): Ditto.
3666 * linux-m32r-low.c (*): Ditto.
3667 * linux-sparc-low.c (*): Ditto.
3668 * linux-x86.c (*): Ditto.
3669 * linux-low.c (*): Ditto.
3670 (linux_wait_1): Add calls to debug_enter, debug_exit.
3671 (linux_wait): Remove redundant debugging printf.
3672 (stop_all_lwps): Add calls to debug_enter, debug_exit.
3673 (linux_resume, unstop_all_lwps): Ditto.
3674 * mem-break.c (*): Update all debugging printfs to use
3675 debug_printf instead of fprintf.
3676 * remote-utils.c (*): Ditto.
3677 * thread-db.c (*): Ditto.
3678 * server.c #include <ctype.h>, "gdb_vecs.h".
3679 (debug_threads): Moved to debug.c.
3680 (*): Update all debugging printfs to use debug_printf instead of
3681 fprintf.
3682 (start_inferior): Replace call to fflush with call to debug_flush.
3683 (monitor_show_help): Mention set debug-format.
3684 (parse_debug_format_options): New function.
3685 (handle_monitor_command): Handle "monitor set debug-format".
3686 (gdbserver_usage): Mention --debug-format.
3687 (main): Parse --debug-format.
3688 * server.h (debug_threads): Declaration moved to debug.h.
3689 #include "debug.h".
3690 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
3691 trace_debug_1 that uses debug_printf.
3692 (tracepoint_look_up_symbols): Update all debugging printfs to use
3693 debug_printf instead of fprintf.
3694
e671835b
BS
36952014-01-20 Baruch Siach <baruch@tkos.co.il>
3696
3697 * linux-xtensa-low.c: Include asm/ptrace.h instead of
3698 sys/ptrace.h.
3699
b5737fa9
PA
37002014-01-17 Pedro Alves <palves@redhat.com>
3701
ea38d2a9 3702 PR build/16445
c7faa97a
PA
3703 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
3704 defined after including gdb_proc_service.h.
b5737fa9 3705
40ed484e
DE
37062014-01-16 Doug Evans <dje@google.com>
3707
3708 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
3709 (match_dll): Use it.
3710
969c39fb
MM
37112014-01-16 Markus Metzger <markus.t.metzger@intel.com>
3712
3713 * target.h (target_ops) <read_btrace>: Change parameters and
3714 return type to allow error reporting.
3715 * server.c (handle_qxfer_btrace): Support delta reads. Pass
3716 trace reading errors on.
3717 * linux-low.c (linux_low_read_btrace): Pass trace reading
3718 errors on.
3719 (linux_low_disable_btrace): New.
3720
ab7f45ba
DE
37212014-01-15 Doug Evans <dje@google.com>
3722
3723 * inferiors.c (thread_id_to_gdb_id): Delete.
3724 * inferiors.h (thread_id_to_gdb_id): Delete.
3725
66af0f44
EZ
37262014-01-13 Eli Zaretskii <eliz@gnu.org>
3727
3728 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
3729 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
3730 versions.
3731
9939e131
PA
37322014-01-08 Pedro Alves <palves@redhat.com>
3733
3734 * server.c (handle_status): Don't discard previous queued stop
3735 replies or thread's pending status here.
3736 (main) <disconnection>: Do it here instead.
3737
b7ea362b
PA
37382014-01-08 Pedro Alves <palves@redhat.com>
3739
3740 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
3741 * server.c (visit_actioned_threads, handle_pending_status): New
3742 function.
3743 (handle_v_cont): Factor out parts to ...
3744 (resume): ... this new function. If in all-stop, and a thread
3745 being resumed has a pending status, report it without actually
3746 resuming.
3747 (myresume): Adjust to use the new 'resume' function.
3748 (clear_pending_status_callback, set_pending_status_callback)
3749 (find_status_pending_thread_callback): New functions.
3750 (handle_status): Handle the case of multiple threads having
3751 interesting statuses to report. Report threads' real last signal
3752 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
3753 with an interesting thread to report the status for, instead of
3754 always reporting the status of the first thread.
3755
28498c42
JB
37562014-01-01 Joel Brobecker <brobecker@adacore.com>
3757
3758 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
3759 * gdbreplay.c (gdbreplay_version): Likewise.
3760
f45c82da
YZ
37612013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
3762
3763 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
3764 iov.iov_len with the real length in use.
3765
379a5e2d
JB
37662013-12-13 Joel Brobecker <brobecker@adacore.com>
3767
3768 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
3769 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
3770 for all targets that use win32-low.c.
3771 * win32-low.c (win32_ensure_ntdll_loaded): New function.
3772 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
3773
4210d83e
PA
37742013-12-13 Pedro Alves <palves@redhat.com>
3775
3776 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
3777 if equal to TARGET_WAITKIND_LOADED.
3778 * win32-low.c (cached_status): New static global.
3779 (win32_wait): Add declaration.
3780 (do_initial_child_stuff): Flush all initial pending debug events
3781 up to the initial breakpoint.
3782 (win32_wait): If CACHED_STATUS was set, return that instead
3783 of doing a real wait. Remove the code resuming the execution
3784 of the inferior after receiving a TARGET_WAITKIND_LOADED event
3785 during the initial phase. Also remove the code changing
3786 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
3787 TARGET_WAITKIND_STOPPED.
3788
e7f0d979
YQ
37892013-12-11 Yao Qi <yao@codesourcery.com>
3790
3791 * notif.c (handle_notif_ack): Return 0 if no notification
3792 matches.
3793
ebcf782c
DE
37942013-11-20 Doug Evans <dje@google.com>
3795
3796 * linux-low.c (linux_set_resume_request): Fix comment.
3797
20ad9378
DE
37982013-11-20 Doug Evans <dje@google.com>
3799
3800 * linux-low.c (resume_status_pending_p): Tweak comment.
3801
a196ebeb
WT
38022013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
3803
3804 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
3805 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
3806 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
3807 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
3808 (srv_amd64_regobj): Add amd64-mpx.o.
3809 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
3810 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
3811 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
3812 * i387-fp.c (num_pl_bnd_register) Added constant.
3813 (num_pl_bnd_cfg_registers) Added constant.
3814 (struct i387_xsave) Added reserved area and MPX fields.
3815 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
3816 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
3817 function.
3818 (tdesc_i386_mpx_linux): Add MPX amd64 target.
3819 (init_registers_amd64_mpx_linux): Declare new function.
3820 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
3821 (x86_64_regmap): Add MPX registers.
3822 (x86_linux_read_description): Add MPX case.
3823 (initialize_low_arch): Initialize MPX targets.
3824
0080a2f6
TT
38252013-11-18 Tom Tromey <tromey@redhat.com>
3826
3827 * configure: Rebuild.
3828 * configure.ac: Don't check for stdlib.h.
3829 * gdbreplay.c: Unconditionally include stdlib.h.
3830
2978b111
TT
38312013-11-18 Tom Tromey <tromey@redhat.com>
3832
3833 * config.in: Rebuild.
3834 * configure: Rebuild.
3835 * configure.ac: Don't use AC_HEADER_DIRENT.
3836
a3d08894
TT
38372013-11-18 Tom Tromey <tromey@redhat.com>
3838
3839 * server.h: Don't check HAVE_STRING_H.
3840 * gdbreplay.c: Don't check HAVE_STRING_H.
3841 * configure: Rebuild.
3842
0a5dd17d
TT
38432013-11-18 Tom Tromey <tromey@redhat.com>
3844
3845 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
3846 LIBGNU.
3847
1bd2f0ba
TT
38482013-11-08 Tom Tromey <tromey@redhat.com>
3849
3850 * configure, config.in: Rebuild.
3851 * configure.ac: Remove unused configury.
3852
3266f10b
TT
38532013-11-08 Tom Tromey <tromey@redhat.com>
3854
3855 * acinclude.m4: Include common.m4, codeset.m4.
3856 * configure, config.in: Rebuild.
3857 * configure.ac: Use GDB_AC_COMMON.
3858
6682d959
AA
38592013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
3860
3861 * linux-s390-low.c (HWCAP_S390_TE): New define.
3862 (s390_arch_setup): Consider the TE field in the HWCAP for
3863 determining 'have_regset_tdb'.
3864
fd0a4d76
SDJ
38652013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
3866
3867 PR gdb/16014
3868 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
3869 call to sizeof.
3870
1a3d890b
PA
38712013-10-02 Pedro Alves <palves@redhat.com>
3872
3873 * server.c (process_serial_event): Don't output "GDBserver
3874 exiting" if GDB is connected through stdio.
3875 * target.c (mywait): Likewise, be silent if GDB is connected
3876 through stdio.
3877
97ad4581
JB
38782013-10-01 Joel Brobecker <brobecker@adacore.com>
3879
3880 * lynx-low.c (lynx_add_threads_after_attach): New function.
3881 (lynx_attach): Remove call to add_thread. Add call to
3882 lynx_add_threads_after_attach instead.
3883
5b4e221c
MF
38842013-09-28 Mike Frysinger <vapier@gentoo.org>
3885
3886 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
3887 * config.in, configure: Regenerated.
3888
ee47b2f8
YQ
38892013-09-18 Yao Qi <yao@codesourcery.com>
3890
3891 PR server/15959
3892 * server.c (start_inferior): Clear 'resume_info'.
3893
d6707650 38942013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 3895
d6707650
JW
3896 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
3897 for each register.
3898
9243dd0e 38992013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 3900
9243dd0e
JW
3901 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
3902 linux-tile-low.o to srv_tgtobj.
3903
c623a6ef
WN
39042013-09-16 Will Newton <will.newton@linaro.org>
3905
3906 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
3907 out regs.
3908
fb71d39e
PA
39092013-09-06 Pedro Alves <palves@redhat.com>
3910
3911 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
3912 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
3913 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
3914 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
3915 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
3916 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
3917
8e7e9910
PA
39182013-09-06 Pedro Alves <palves@redhat.com>
3919
3920 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
3921 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
3922
7c3a12ca
PA
39232013-09-06 Pedro Alves <palves@redhat.com>
3924
3925 * linux-amd64-ipa.c: Include tracepoint.h.
3926 * linux-i386-ipa.c: Include tracepoint.h.
3927
8eb3d7b6
RW
39282013-09-06 Ricard Wanderlof <ricardw@axis.com>
3929
3930 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
3931 (ps_get_thread_area): New function.
3932
eddddb9d
RW
39332013-09-06 Ricard Wanderlof <ricardw@axis.com>
3934
3935 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
3936 (initialize_low_arch): Call init_registers_crisv32 rather than
3937 init_register_crisv32.
3938
533b0600
PA
39392013-09-05 Pedro Alves <palves@redhat.com>
3940
3941 * server.h (handle_vFile, hostio_last_error_from_errno): Move
3942 to ...
3943 * hostio.h: ... this new file.
3944 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
3945 win32-low.c: Include hostio.h.
3946
0ce3d3b5
PA
39472013-09-05 Pedro Alves <palves@redhat.com>
3948
3949 * server.h (gdb_client_data, handler_func, callback_handler_func)
3950 (delete_file_handler, add_file_handler, append_callback_event)
3951 (delete_callback_event, start_event_loop, initialize_event_loop):
3952 Move to event-loop.h and include it.
3953 * event-loop.h: New file.
3954
799cdc37
PA
39552013-09-05 Pedro Alves <palves@redhat.com>
3956
3957 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
3958 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
3959 (loaded_dll, unloaded_dll): Move to ...
3960 * dll.h: ... this new file.
3961 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
3962
6a6bbd9d
PA
39632013-09-05 Pedro Alves <palves@redhat.com>
3964
3965 * server.h (current_process, get_thread_process, all_processes)
3966 (add_inferior_to_list, for_each_inferior, current_inferior)
3967 (remove_inferior, add_process, remove_process, find_process_pid)
3968 (have_started_inferiors_p, have_attached_inferiors_p)
3969 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
3970 (clear_inferiors, find_inferior, find_inferior_id)
3971 (inferior_target_data, set_inferior_target_data)
3972 (inferior_regcache_data, set_inferior_regcache_data): Move to
3973 inferiors.h, and include it.
3974 * inferiors.h: New file.
3975
f699aaba
PA
39762013-09-05 Pedro Alves <palves@redhat.com>
3977
3978 * server.h (struct emit_ops, current_insn_ptr, emit_error):
3979 Move ...
72f4393d 3980 * ax.h: ... here.
f699aaba 3981
c144c7a0
PA
39822013-09-05 Pedro Alves <palves@redhat.com>
3983
3984 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
3985 tracepoint.h.
3986 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
3987 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
3988 (handle_tracepoint_general_set, handle_tracepoint_query)
3989 (tracepoint_finished_step, tracepoint_was_hit)
3990 (release_while_stepping_state_list, current_traceframe)
3991 (in_readonly_region, traceframe_read_mem)
3992 (fetch_traceframe_registers, traceframe_read_sdata)
3993 (traceframe_read_info, struct fast_tpoint_collect_status)
3994 (fast_tracepoint_collecting, force_unlock_trace_buffer)
3995 (handle_tracepoit_bkpts, initialize_low_tracepoint)
3996 (supply_fast_tracepoint_registers)
3997 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
3998 (ipa_tdesc, claim_trampoline_space)
3999 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
4000 (agent_mem_read, agent_get_trace_state_variable_value)
4001 (agent_set_trace_state_variable_value, agent_tsv_read)
4002 (agent_mem_read_string, get_raw_reg_func_addr)
4003 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
4004 * tracepoint.h: ... this new file.
4005
ff42e6ab
PA
40062013-09-05 Pedro Alves <palves@redhat.com>
4007
4008 * server.h (perror_with_name, error, fatal, warning, paddress)
4009 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
4010 include it.
4011 * utils.h: New file.
4012
541af0f4
PA
40132013-09-05 Pedro Alves <palves@redhat.com>
4014
4015 * server.h (remote_debug, noack_mode, transport_is_reliable)
4016 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
4017 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
4018 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
4019 (write_enn, initialize_async_io, enable_async_io)
4020 (disable_async_io, check_remote_input_interrupt_request)
4021 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
4022 (dead_thread_notify, prepare_resume_reply)
4023 (decode_address_to_semicolon, decode_address, decode_m_packet)
4024 (decode_M_packet, decode_X_packet, decode_xfer_write)
4025 (decode_search_memory_packet, unhexify, hexify)
4026 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
4027 (look_up_one_symbol, relocate_instruction)
4028 (monitor_output): Move to remote-utils.h, and include it.
4029 * remote-utils.h: New file.
4030
eebdf26b
PA
40312013-09-05 Pedro Alves <palves@redhat.com>
4032
4033 * server.h (_): Delete.
4034
3aafd2ff
PA
40352013-09-02 Pedro Alves <palves@redhat.com>
4036
4037 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
4038 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
4039 allocated.
4040 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
4041
cee83bcb
PM
40422013-09-02 Pierre Muller <muller@sourceware.org>
4043
4044 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
4045 or WriteProcessMemory complete successfully and handle
4046 ERROR_PARTIAL_COPY error.
4047
9a13b2fa
PA
40482013-09-02 Pedro Alves <palves@redhat.com>
4049
4050 * server.c (gdb_read_memory): Return -1 on traceframe memory read
4051 error instead of EIO.
4052
602e3198
JK
40532013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4054
4055 PR server/15604
4056 * linux-low.c: Include filestuff.h.
4057 (linux_create_inferior) <pid == 0>: Call close_most_fds.
4058 * lynx-low.c: Include filestuff.h.
4059 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
4060 * server.c: Include filestuff.h.
4061 (main): Call notice_open_fds.
4062 * spu-low.c: Include filestuff.h.
4063 (spu_create_inferior) <pid == 0>: Call close_most_fds.
4064
96d7229d
LM
40652013-08-22 Luis Machado <lgustavo@codesourcery.com>
4066
4067 * Makefile.in: Explain why ../target and ../nat are not
4068 listed as include file search paths.
4069 (linux-waitpid.o): New object file rule.
4070 * configure.srv (srv_native_linux_obj): New variable.
4071 Replace all occurrences of linux native object files with
4072 $srv_native_linux_obj.
4073 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
4074 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
4075 (linux_enable_event_reporting): Remove declaration.
4076 (my_waitpid): Moved to common/linux-waitpid.c.
4077 (linux_wait_for_event): Pass ptid when calling
4078 linux_enable_event_reporting.
4079 (linux_supports_tracefork_flag): Remove.
4080 (linux_enable_event_reporting): Likewise.
4081 (linux_tracefork_grandchild): Remove.
4082 (STACK_SIZE): Moved to common/linux-ptrace.c.
4083 (linux_tracefork_child): Remove.
4084 (linux_test_for_tracefork): Remove.
4085 (linux_look_up_symbols): Call linux_supports_traceclone.
4086 (initialize_low): Remove call to linux_test_for_tracefork.
4087 * linux-low.h (PTRACE_TYPE_ARG3): Move to
4088 common/linux-ptrace.h.
4089 (PTRACE_TYPE_ARG4): Likewise.
4090 Include linux-ptrace.h.
4091
32940073
PA
40922013-08-21 Pedro Alves <palves@redhat.com>
4093
4094 * config.in: Renegerate.
4095
33b60d58 40962013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 4097
33b60d58
LM
4098 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
4099 (SFILES): Remove $(srcdir)/common/target-common.c and
4100 add $(srcdir)/target/waitstatus.c.
4101 (OBS): Remove target-common.o and add waitstatus.o.
4102 (server_h): Remove $(srcdir)/../common/target-common.h and
4103 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
4104 and $(srcdir)/../target/waitstatus.h.
4105 (target-common.o): Remove.
4106 (waitstatus.o): New target object file.
4107 * target.h: Do not include target-common.h and
4108 include target/resume.h, target/wait.h and
4109 target/waitstatus.h.
4110
b8e1b30e
LM
41112013-08-13 Luis Machado <lgustavo@codesourcery.com>
4112
4113 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
4114 to PTRACE_TYPE_ARG3.
4115 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
4116 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
4117 PTRACE_TYPE_ARG4.
4118 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
4119 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
4120
7a60ad40
YQ
41212013-07-27 Jie Zhang <jie@codesourcery.com>
4122 Daniel Jacobowitz <dan@codesourcery.com>
4123 Yao Qi <yao@codesourcery.com>
4124
4125 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
4126 (mips-linux-watch.o): New rule.
4127 (mips_linux_watch_h): New variable.
4128 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
4129 srv_tgtobj.
4130 * linux-mips-low.c: Include mips-linux-watch.h.
4131 (struct arch_process_info, struct arch_lwp_info): New.
4132 (update_watch_registers_callback): New function.
4133 (mips_linux_new_process, mips_linux_new_thread) New functions.
4134 (mips_linux_prepare_to_resume, mips_insert_point): New
4135 functions.
4136 (mips_remove_point, mips_stopped_by_watchpoint): New
4137 functions.
4138 (rsp_bp_type_to_target_hw_bp_type): New function.
4139 (mips_stopped_data_address): New function.
4140 (the_low_target): Add watchpoint support functions.
4141
de6f69ad
YQ
41422013-07-27 Yao Qi <yao@codesourcery.com>
4143
4144 * i386-low.c: Include break-common.h.
4145 (enum target_hw_bp_type): Remove.
4146
3360c0bf
LM
41472013-07-24 Luis Machado <lgustavo@codesourcery.com>
4148
4149 * Makefile.in (SFILES): /common/target-common.c.
4150 (OBS): Add target-common.o.
4151 (server_h): Add $(srcdir)/../common/target-common.h.
4152 (target-common.o): New target.
4153 * server.c (queue_stop_reply_callback): Free
4154 status string after use.
4155 * target.c (target_waitstatus_to_string): Remove.
4156 * target.h: Include target-common.h.
4157 (resume_kind): Likewise.
4158 (target_waitkind): Likewise.
4159 (target_waitstatus): Likewise.
4160 (TARGET_WNOHANG): Likewise.
4161
bd885420
YQ
41622013-07-04 Yao Qi <yao@codesourcery.com>
4163
4164 * Makefile.in (host_alias): Use @host_noncanonical@.
4165 (target_alias): Use @target_noncanonical@.
4166 * configure.ac: Use ACX_NONCANONICAL_TARGET and
4167 ACX_NONCANONICAL_HOST.
4168 * configure: Regenerated.
4169
4170 Revert:
4171 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
4172
4173 * configure.ac (version_host, version_target): Set and AC_SUBST them.
4174 * configure: Rebuild.
4175 * Makefile.in (version_host, version_target): Get from configure.
4176 (version.c): Use $(version_host) and $(version_target).
4177
17ef446e
PA
41782013-07-03 Pedro Alves <palves@redhat.com>
4179
4180 * Makefile.in (config.status): Depend on development.sh.
4181 * acinclude.m4: Include libmcheck.m4.
4182 * configure: Regenerate.
4183
7a9a7487
MG
41842013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
4185
4186 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
4187 attribute inside the parentheses.
4188 (winapi_DebugSetProcessKillOnExit): Ditto.
4189 (winapi_DebugBreakProcess): Ditto.
4190 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 4191
49b64de6
MG
41922013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
4193
4194 * notif.h (notif_event): Add a dummy member to avoid compiler
4195 errors.
4196
d5749ee7
PA
41972013-07-01 Pedro Alves <palves@redhat.com>
4198
4199 * hostio.c (HOSTIO_PATH_MAX): Define.
4200 (require_filename, handle_open, handle_unlink, handle_readlink):
4201 Use it.
4202
d8d2a3ee
PA
42032013-07-01 Pedro Alves <palves@redhat.com>
4204
4205 * server.h: Include "pathmax.h".
4206 * linux-low.c: Don't include sys/param.h.
4207 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
4208 MAXPATHLEN.
4209 * win32-low.c: Don't include sys/param.h.
4210 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
4211
bc7dea8d
PA
42122013-07-01 Pedro Alves <palves@redhat.com>
4213
4214 * event-loop.c: Don't check HAVE_UNISTD_H before including
4215 <unistd.h>.
4216 * gdbreplay.c: Likewise.
4217 * remote-utils.c: Likewise.
4218 * server.c: Likewise.
4219 * configure.ac: Don't check for unistd.h.
4220 * configure: Regenerate.
4221
d6c2da54
TT
42222013-06-28 Tom Tromey <tromey@redhat.com>
4223
4224 * Makefile.in (version.c): Use version.in, not
4225 common/version.in.
4226
257b6bec
MG
42272013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
4228
4229 * configure.ac (version_host, version_target): Set and AC_SUBST them.
4230 * configure: Rebuild.
4231 * Makefile.in (version_host, version_target): Get from configure.
4232 (version.c): Use $(version_host) and $(version_target).
4233
86ebe149
DK
42342013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
4235
4236 Fix trace-status to output user name without trailing colon.
4237 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
4238
f30aa5af
DK
42392013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
4240
4241 Fix trace-status to output proper start-time and stop-time.
4242 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
4243 output start time and stop time in hex as gdb expects.
4244
28a93511
YQ
42452013-06-26 Pedro Alves <pedro@codesourcery.com>
4246
4247 * tracepoint.c (build_traceframe_info_xml): Output trace state
4248 variables present in the trace buffer.
4249
01208463
TT
42502013-06-24 Tom Tromey <tromey@redhat.com>
4251
4252 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
4253 create-version.sh.
4254 (version.o): Remove.
4255 * gdbreplay.c: Include version.h.
4256 (version, host_name): Don't declare.
4257 * server.h: Include version.h.
4258 (version, host_name): Don't declare.
4259
760256f9
PA
42602013-06-12 Pedro Alves <palves@redhat.com>
4261
4262 * linux-x86-low.c (linux_is_elf64): Delete global.
4263 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
4264 with local linux_pid_exe_is_elf_64_file use.
4265
030031ee
PA
42662013-06-11 Pedro Alves <palves@redhat.com>
4267
4268 * linux-low.c (regset_disabled, disable_regset): New functions.
4269 (regsets_fetch_inferior_registers)
4270 (regsets_store_inferior_registers): Use them.
4271 (initialize_regsets_info); Don't allocate the disabled_regsets
4272 array here.
4273 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
4274 comment.
4275
5da6eb0a
PA
42762013-06-11 Pedro Alves <palves@redhat.com>
4277
4278 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
4279 xmalloc.
4280
7e5aaa09
PA
42812013-06-11 Pedro Alves <palves@redhat.com>
4282
4283 * linux-x86-low.c (initialize_low_arch): Call
4284 init_registers_x32_avx_linux.
4285
d878444c
JK
42862013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
4287
4288 Fix compatibility with Android Bionic.
4289 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
4290 it is not empty.
4291
3aee8918
PA
42922013-06-07 Pedro Alves <palves@redhat.com>
4293
5f2b57b5 4294 PR server/14823
3aee8918
PA
4295 * Makefile.in (OBS): Add tdesc.o.
4296 (IPA_OBJS): Add tdesc-ipa.o.
4297 (tdesc-ipa.o): New rule.
4298 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
4299 interface.
4300 * linux-low.c (new_inferior): Delete.
4301 (disabled_regsets, num_regsets): Delete.
4302 (linux_add_process): Adjust to set the new per-process
4303 new_inferior flag.
4304 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
4305 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
4306 was a stop. When calling arch_setup, switch the current inferior
4307 to the thread that got an event.
4308 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
4309 (regsets_fetch_inferior_registers)
4310 (regsets_store_inferior_registers): New regsets_info parameter.
4311 Adjust to use it.
4312 (linux_register_in_regsets): New regs_info parameter. Adjust to
4313 use it.
4314 (register_addr, fetch_register, store_register): New usrregs_info
4315 parameter. Adjust to use it.
4316 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
4317 parameter regs_info. Adjust to use it.
4318 (linux_fetch_registers): Get the current inferior's regs_info, and
4319 adjust to use it.
4320 (linux_store_registers): Ditto.
4321 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
4322 (initialize_low): Don't initialize the target_regsets here. Call
4323 initialize_low_arch.
4324 * linux-low.h (target_regsets): Delete declaration.
4325 (struct regsets_info): New.
4326 (struct usrregs_info): New.
4327 (struct regs_info): New.
4328 (struct process_info_private) <new_inferior>: New field.
4329 (struct linux_target_ops): Delete the num_regs, regmap, and
4330 regset_bitmap fields. New field regs_info.
4331 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
4332 * i387-fp.c (num_xmm_registers): Delete.
4333 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
4334 calls to new interface.
4335 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
4336 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
4337 Infer the number of xmm registers from the regcache's target
4338 description.
4339 * i387-fp.h (num_xmm_registers): Delete.
4340 * inferiors.c (add_thread): Don't install the thread's regcache
4341 here.
4342 * proc-service.c (gregset_info): Fetch the current inferior's
4343 regs_info. Adjust to use it.
4344 * regcache.c: Include tdesc.h.
4345 (register_bytes, reg_defs, num_registers)
4346 (gdbserver_expedite_regs): Delete.
4347 (get_thread_regcache): If the thread doesn't have a regcache yet,
4348 create one, instead of aborting gdbserver.
4349 (regcache_invalidate_one): Rename to ...
4350 (regcache_invalidate_thread): ... this.
4351 (regcache_invalidate_one): New.
4352 (regcache_invalidate): Only invalidate registers of the current
4353 process.
4354 (init_register_cache): Add target_desc parameter, and use it.
4355 (new_register_cache): Ditto. Assert the target description has a
4356 non zero registers_size.
4357 (regcache_cpy): Add assertions. Adjust.
4358 (realloc_register_cache, set_register_cache): Delete.
4359 (registers_to_string, registers_from_string): Adjust.
4360 (find_register_by_name, find_regno, find_register_by_number)
4361 (register_cache_size): Add target_desc parameter, and use it.
4362 (free_register_cache_thread, free_register_cache_thread_one)
4363 (regcache_release, register_cache_size): New.
4364 (register_size): Add target_desc parameter, and use it.
4365 (register_data, supply_register, supply_register_zeroed)
4366 (supply_regblock, supply_register_by_name, collect_register)
4367 (collect_register_as_string, collect_register_by_name): Adjust.
4368 * regcache.h (struct target_desc): Forward declare.
4369 (struct regcache) <tdesc>: New field.
4370 (init_register_cache, new_register_cache): Add target_desc
4371 parameter.
4372 (regcache_invalidate_thread): Declare.
4373 (regcache_invalidate_one): Delete declaration.
4374 (regcache_release): Declare.
4375 (find_register_by_number, register_cache_size, register_size)
4376 (find_regno): Add target_desc parameter.
4377 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
4378 declarations.
4379 * remote-utils.c: Include tdesc.h.
4380 (outreg, prepare_resume_reply): Adjust.
4381 * server.c: Include tdesc.h.
4382 (gdbserver_xmltarget): Delete declaration.
4383 (get_features_xml, process_serial_event): Adjust.
4384 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
4385 declare.
4386 (struct process_info) <tdesc>: New field.
4387 (ipa_tdesc): Declare.
4388 * tdesc.c: New file.
4389 * tdesc.h: New file.
4390 * tracepoint.c: Include tdesc.h.
4391 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
4392 (get_context_regcache): Adjust to pass ipa_tdesc down.
4393 (do_action_at_tracepoint): Adjust to get the register cache size
4394 from the context regcache's description.
4395 (traceframe_walk_blocks): Adjust to get the register cache size
4396 from the current trace frame's description.
4397 (traceframe_get_pc): Adjust to get current trace frame's
4398 description and pass it down.
4399 (gdb_collect): Adjust to get the register cache size from the
4400 IPA's description.
4401 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
4402 (gdbserver_xmltarget): Delete.
4403 (initialize_low_tracepoint): Set the ipa's target description.
4404 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
4405 (initialize_low_tracepoint): Set the ipa's target description.
4406 * linux-x86-low.c: Include tdesc.h.
4407 [__x86_64__] (is_64bit_tdesc): New.
4408 (ps_get_thread_area, x86_get_thread_area): Use it.
4409 (i386_cannot_store_register): Rename to ...
4410 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
4411 (i386_cannot_fetch_register): Rename to ...
4412 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
4413 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
4414 to new interface.
4415 (target_regsets): Rename to ...
4416 (x86_regsets): ... this.
4417 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
4418 interface.
4419 (x86_siginfo_fixup): Use is_64bit_tdesc.
4420 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
4421 (tdesc_x32_avx_linux, tdesc_x32_linux)
4422 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
4423 Declare.
4424 (x86_linux_update_xmltarget): Delete.
4425 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
4426 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
4427 (AMD64_LINUX_USER64_CS): New.
4428 (x86_linux_read_description): New, based on
4429 x86_linux_update_xmltarget.
4430 (same_process_callback): New.
4431 (x86_arch_setup_process_callback): New.
4432 (x86_linux_update_xmltarget): New.
4433 (x86_regsets_info): New.
4434 (amd64_linux_regs_info): New.
4435 (i386_linux_usrregs_info): New.
4436 (i386_linux_regs_info): New.
4437 (x86_linux_regs_info): New.
4438 (x86_arch_setup): Reimplement.
4439 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
4440 (x86_emit_ops): Ditto.
4441 (the_low_target): Adjust. Install x86_linux_regs_info,
4442 x86_cannot_fetch_register, and x86_cannot_store_register.
4443 (initialize_low_arch): New.
4444 * linux-ia64-low.c (tdesc_ia64): Declare.
4445 (ia64_fetch_register): Adjust.
4446 (ia64_usrregs_info, regs_info): New globals.
4447 (ia64_regs_info): New function.
4448 (the_low_target): Adjust.
4449 (initialize_low_arch): New function.
4450 * linux-sparc-low.c (tdesc_sparc64): Declare.
4451 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
4452 Adjust.
4453 (sparc_arch_setup): New function.
4454 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
4455 (the_low_target): Adjust.
4456 (initialize_low_arch): New function.
4457 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
4458 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
4459 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
4460 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
4461 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
4462 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
4463 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
4464 (tdesc_powerpc_isa205_vsx64l): Declare.
4465 (ppc_cannot_store_register, ppc_collect_ptrace_register)
4466 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
4467 (ppc_set_pc, ppc_get_hwcap): Adjust.
4468 (ppc_usrregs_info): Forward declare.
4469 (!__powerpc64__) ppc_regmap_adjusted: New global.
4470 (ppc_arch_setup): Adjust to the current process'es target
4471 description.
4472 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
4473 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
4474 (ppc_store_evrregset): Adjust.
4475 (target_regsets): Rename to ...
4476 (ppc_regsets): ... this, and make static.
4477 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
4478 (ppc_regs_info): New function.
4479 (the_low_target): Adjust.
4480 (initialize_low_arch): New function.
4481 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
4482 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
4483 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
4484 (tdesc_s390x_linux64v2): Declare.
4485 (s390_collect_ptrace_register, s390_supply_ptrace_register)
4486 (s390_fill_gregset, s390_store_last_break): Adjust.
4487 (target_regsets): Rename to ...
4488 (s390_regsets): ... this, and make static.
4489 (s390_get_pc, s390_set_pc): Adjust.
4490 (s390_get_hwcap): New target_desc parameter, and use it.
4491 [__s390x__] (have_hwcap_s390_high_gprs): New global.
4492 (s390_arch_setup): Adjust to set the current process'es target
4493 description. Don't adjust the regmap.
4494 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
4495 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
4496 (regs_info_3264): New globals.
4497 (s390_regs_info): New function.
4498 (the_low_target): Adjust.
4499 (initialize_low_arch): New function.
4500 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
4501 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
4502 [__mips64] (init_registers_mips_linux)
4503 (init_registers_mips_dsp_linux): Delete defines.
4504 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
4505 (have_dsp): New global.
4506 (mips_read_description): New, based on mips_arch_setup.
4507 (mips_arch_setup): Reimplement.
4508 (get_usrregs_info): New function.
4509 (mips_cannot_fetch_register, mips_cannot_store_register)
4510 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
4511 (mips_fill_fpregset, mips_store_fpregset): Adjust.
4512 (target_regsets): Rename to ...
4513 (mips_regsets): ... this, and make static.
4514 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
4515 (dsp_regs_info, regs_info): New globals.
4516 (mips_regs_info): New function.
4517 (the_low_target): Adjust.
4518 (initialize_low_arch): New function.
4519 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
4520 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
4521 Declare.
4522 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
4523 (arm_read_description): New, with bits factored from
4524 arm_arch_setup.
4525 (arm_arch_setup): Reimplement.
4526 (target_regsets): Rename to ...
4527 (arm_regsets): ... this, and make static.
4528 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
4529 (arm_regs_info): New function.
4530 (the_low_target): Adjust.
4531 (initialize_low_arch): New function.
4532 * linux-m68k-low.c (tdesc_m68k): Declare.
4533 (target_regsets): Rename to ...
4534 (m68k_regsets): ... this, and make static.
4535 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
4536 (m68k_regs_info): New function.
4537 (m68k_arch_setup): New function.
4538 (the_low_target): Adjust.
4539 (initialize_low_arch): New function.
4540 * linux-sh-low.c (tdesc_sharch): Declare.
4541 (target_regsets): Rename to ...
4542 (sh_regsets): ... this, and make static.
4543 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
4544 (sh_regs_info, sh_arch_setup): New functions.
4545 (the_low_target): Adjust.
4546 (initialize_low_arch): New function.
4547 * linux-bfin-low.c (tdesc_bfin): Declare.
4548 (bfin_arch_setup): New function.
4549 (bfin_usrregs_info, regs_info): New globals.
4550 (bfin_regs_info): New function.
4551 (the_low_target): Adjust.
4552 (initialize_low_arch): New function.
4553 * linux-cris-low.c (tdesc_cris): Declare.
4554 (cris_arch_setup): New function.
4555 (cris_usrregs_info, regs_info): New globals.
4556 (cris_regs_info): New function.
4557 (the_low_target): Adjust.
4558 (initialize_low_arch): New function.
4559 * linux-cris-low.c (tdesc_crisv32): Declare.
4560 (cris_arch_setup): New function.
4561 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
4562 (cris_regs_info): New function.
4563 (the_low_target): Adjust.
4564 (initialize_low_arch): New function.
4565 * linux-m32r-low.c (tdesc_m32r): Declare.
4566 (m32r_arch_setup): New function.
4567 (m32r_usrregs_info, regs_info): New globals.
4568 (m32r_regs_info): Adjust.
4569 (initialize_low_arch): New function.
4570 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
4571 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
4572 (tic6x_usrregs_info): Forward declare.
4573 (tic6x_read_description): New function, based on ...
4574 (tic6x_arch_setup): ... this. Reimplement.
4575 (target_regsets): Rename to ...
4576 (tic6x_regsets): ... this, and make static.
4577 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
4578 (tic6x_regs_info): New function.
4579 (the_low_target): Adjust.
4580 (initialize_low_arch): New function.
4581 * linux-xtensa-low.c (tdesc_xtensa): Declare.
4582 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
4583 (target_regsets): Rename to ...
4584 (xtensa_regsets): ... this, and make static.
4585 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
4586 globals.
4587 (xtensa_arch_setup, xtensa_regs_info): New functions.
4588 (the_low_target): Adjust.
4589 (initialize_low_arch): New function.
4590 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
4591 (nios2_arch_setup): Set the current process'es tdesc.
4592 (target_regsets): Rename to ...
4593 (nios2_regsets): ... this.
4594 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
4595 (nios2_regs_info): New function.
4596 (the_low_target): Adjust.
4597 (initialize_low_arch): New function.
a261b8f5
PA
4598 * linux-aarch64-low.c (tdesc_aarch64): Declare.
4599 (aarch64_arch_setup): Set the current process'es tdesc.
4600 (target_regsets): Rename to ...
4601 (aarch64_regsets): ... this.
4602 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
4603 (aarch64_regs_info): New function.
4604 (the_low_target): Adjust.
4605 (initialize_low_arch): New function.
3aee8918
PA
4606 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
4607 globals.
4608 (target_regsets): Rename to ...
4609 (tile_regsets): ... this.
4610 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
4611 (tile_regs_info): New function.
4612 (tile_arch_setup): Set the current process'es tdesc.
4613 (the_low_target): Adjust.
4614 (initialize_low_arch): New function.
4615 * spu-low.c (tdesc_spu): Declare.
4616 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
4617 * win32-arm-low.c (tdesc_arm): Declare.
4618 (arm_arch_setup): New function.
4619 (the_low_target): Install arm_arch_setup instead of
4620 init_registers_arm.
4621 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
4622 (init_windows_x86): Rename to ...
4623 (i386_arch_setup): ... this. Set `win32_tdesc'.
4624 (the_low_target): Adjust.
4625 * win32-low.c (win32_tdesc): New global.
4626 (child_add_thread): Don't create the thread cache here.
4627 (do_initial_child_stuff): Set the new process'es tdesc.
4628 * win32-low.h (struct target_desc): Forward declare.
4629 (win32_tdesc): Declare.
4630 * lynx-i386-low.c (tdesc_i386): Declare global.
4631 (lynx_i386_arch_setup): Set `lynx_tdesc'.
4632 * lynx-low.c (lynx_tdesc): New global.
4633 (lynx_add_process): Set the new process'es tdesc.
4634 * lynx-low.h (struct target_desc): Forward declare.
4635 (lynx_tdesc): Declare global.
4636 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
4637 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
4638 * nto-low.c (nto_tdesc): New global.
4639 (do_attach): Set the new process'es tdesc.
4640 * nto-low.h (struct target_desc): Forward declare.
4641 (nto_tdesc): Declare.
4642 * nto-x86-low.c (tdesc_i386): Declare.
4643 (nto_x86_arch_setup): Set `nto_tdesc'.
4644
b1fbec62
GB
46452013-06-04 Gary Benson <gbenson@redhat.com>
4646
4647 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
4648 to qSupported response when appropriate.
4649 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
4650 with nonzero-length annex.
4651 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
4652 arguments supplied in annex.
4653
d1ec4ce7
DE
46542013-05-31 Doug Evans <dje@google.com>
4655
ac44adcb 4656 PR server/15594
d1ec4ce7
DE
4657 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
4658 64 bits in 64-cross-32 environment.
4659
9b25f2d3
PA
46602013-05-28 Pedro Alves <palves@redhat.com>
4661
4662 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
4663 (aarch64-without-fpu.c): Delete rule.
4664 * configure.srv (aarch64*-*-linux*): Remove references to
4665 aarch64-without-fpu.o and aarch64-without-fpu.xml.
4666 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
4667 declaration.
4668
6740dc9c
PA
46692013-05-24 Pedro Alves <palves@redhat.com>
4670
4671 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
4672 instead of strchr/decode_address. Error if the range isn't split
4673 with a ','. Don't assume there's be a ':' in the action.
4674
c2d6af84
PA
46752013-05-23 Yao Qi <yao@codesourcery.com>
4676 Pedro Alves <palves@redhat.com>
4677
4678 * linux-low.c (lwp_in_step_range): New function.
4679 (linux_wait_1): If the thread was range stepping and stopped
4680 outside the stepping range, report the stop to GDB. Otherwise,
4681 continue stepping. Add range stepping debug output.
4682 (linux_set_resume_request): Copy the step range from the resume
4683 request to the lwp.
4684 (linux_supports_range_stepping): New.
4685 (linux_target_ops) <supports_range_stepping>: Set to
4686 linux_supports_range_stepping.
4687 * linux-low.h (struct linux_target_ops)
4688 <supports_range_stepping>: New field.
4689 (struct lwp_info) <step_range_start, step_range_end>: New fields.
4690 * linux-x86-low.c (x86_supports_range_stepping): New.
4691 (the_low_target) <supports_range_stepping>: Set to
4692 x86_supports_range_stepping.
4693 * server.c (handle_v_cont): Handle 'r' action.
4694 (handle_v_requests): Append ";r" if the target supports range
4695 stepping.
4696 * target.h (struct thread_resume) <step_range_start,
4697 step_range_end>: New fields.
4698 (struct target_ops) <supports_range_stepping>:
4699 New field.
4700 (target_supports_range_stepping): New macro.
4701
58794e1a
JB
47022013-05-17 Joel Brobecker <brobecker@adacore.com>
4703
4704 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
4705 confusion in comment.
4706
d631c5a7
JB
47072013-05-17 Joel Brobecker <brobecker@adacore.com>
4708
4709 * lynx-low.c (struct process_info_private): New type.
4710 (lynx_add_process): New function.
4711 (lynx_create_inferior, lynx_attach): Replace calls to
4712 add_process by calls to lynx_add_process.
4713 (lynx_resume): If PTID is null, then try using
4714 current_process()->private->last_wait_event_ptid.
4715 Add comments.
4716 (lynx_clear_inferiors): Delete. The contents of that function
4717 has been inlined in lynx_mourn;
4718 (lynx_wait_1): Save the ptid in the process's private data.
4719 (lynx_mourn): Free the process' private data. Replace call
4720 to lynx_clear_inferiors by call to clear_inferiors.
4721
96f7a20f
YQ
47222013-05-17 Yao Qi <yao@codesourcery.com>
4723
4724 * i386-low.c (i386_length_and_rw_bits): Move the comment to
4725 the right place.
4726
db0dfaa0
LM
47272013-05-16 Luis Machado <lgustavo@codesourcery.com>
4728
4729 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
4730 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
4731 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
4732 PT_TEXT_END_ADDR guards. Update comments.
4733 (linux_target_op) <read_offsets>: Conditionally define to
4734 linux_read_offsets if the target is UCLIBC and if it defines
4735 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
4736
68f5f838
SL
47372013-05-06 Sandra Loosemore <sandra@codesourcery.com>
4738 Andrew Jenner <andrew@codesourcery.com>
4739
4740 * Makefile.in (SFILES): Add linux-nios2-low.c.
4741 (clean): Add action to delete nios2-linux.c.
4742 (nios2-linux.c): New rule.
4743 * configure.srv: Add nios2*-*-linux*.
4744 * linux-nios2-low.c: New.
4745
1ebff1fd
HAQ
47462013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
4747
4748 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
4749
f6150862
HZ
47502013-04-25 Hui Zhu <hui@codesourcery.com>
4751
4752 PR gdb/15186
f6150862
HZ
4753 * ax.c (ax_printf): Add fflush.
4754
614c279d
TT
47552013-04-22 Tom Tromey <tromey@redhat.com>
4756
4757 * Makefile.in (SFILES): Add filestuff.c.
4758 (OBS): Add filestuff.o.
4759 (filestuff.o): New target.
4760 * config.in, configure: Rebuild.
4761 * configure.ac: Check for fdwalk, pipe2.
4762
7d4e5717
PA
47632013-04-17 Pedro Alves <palves@redhat.com>
4764
4765 * configure.ac (USE_THREAD_DB): Delete variable.
4766 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
4767 Don't AC_SUBST USE_THREAD_DB.
4768 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
4769 * config.in, configure: Regenerate.
4770
d5c93e41
PA
47712013-04-16 Pedro Alves <palves@redhat.com>
4772
4773 * linux-low.h (struct lwp_info) <thread_known>: Move under
4774 the USE_THREAD_DB #ifdef.
4775
04f5fe89
PA
47762013-04-16 Pedro Alves <palves@redhat.com>
4777
4778 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
4779 (linux-low.o): Delete rule.
4780 * linux-low.h: Always include "gdb_thread_db.h" instead of
4781 conditionally including thread_db.h.
4782 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
4783 HAVE_THREAD_DB_H.
4784
480b27bf
JK
47852013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
4786
4787 * Makefile.in (install-only): Fix make install regression.
4788
43662968
JK
47892013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
4790
4791 Convert man pages to texinfo, new gdbinit.5 texinfo page.
4792 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
4793 installation.
4794 * gdbserver.1: Remove.
4795
3e74e146
PA
47962013-03-22 Pedro Alves <palves@redhat.com>
4797
4798 * linux-low.c (handle_extended_wait): Don't call
4799 linux_enable_event_reporting.
4800
a8347a2a
TT
48012013-03-15 Tony Theodore <tonyt@logyst.com>
4802
4803 PR build/9098:
4804 * Makefile.in (SHELL): Use @SHELL@.
4805
eeb56fa7
SDJ
48062013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
4807
4808 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
4809 compiler warning.
4810
4fa7e2ff
JB
48112013-03-13 Joel Brobecker <brobecker@adacore.com>
4812
4813 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
4814 Remove extraneous NULL element.
4815
8ddb1965
YQ
48162013-03-13 Yao Qi <yao@codesourcery.com>
4817
4818 * tracepoint.c (traceframe_read_tsv): Look for the last matched
4819 'V' block in trace frame.
4820
9accd112
MM
48212013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4822
4823 * target.h (struct target_ops): Add btrace ops.
4824 (target_supports_btrace): New macro.
4825 (target_enable_btrace): New macro.
4826 (target_disable_btrace): New macro.
4827 (target_read_btrace): New macro.
4828 * gdbthread.h (struct thread_info): Add btrace field.
4829 * server.c: Include btrace-common.h.
4830 (handle_btrace_general_set): New function.
4831 (handle_btrace_enable): New function.
4832 (handle_btrace_disable): New function.
4833 (handle_general_set): Call handle_btrace_general_set.
4834 (handle_qxfer_btrace): New function.
4835 (struct qxfer qxfer_packets[]): Add btrace entry.
4836 * inferiors.c (remove_thread): Disable btrace.
4837 * linux-low: Include linux-btrace.h.
4838 (linux_low_enable_btrace): New function.
4839 (linux_low_read_btrace): New function.
4840 (linux_target_ops): Add btrace ops.
4841 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
4842 Add srv_linux_btrace=yes.
4843 (x86_64-*-linux*): Add linux-btrace.o.
4844 Add srv_linux_btrace=yes.
4845 * configure.ac: Define HAVE_LINUX_BTRACE.
4846 * config.in: Regenerated.
4847 * configure: Regenerated.
4848
5cc22e4c
MM
48492013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4850
4851 * server.c (handle_qxfer): Preserve error message if -3 is
4852 returned.
4853 (qxfer): Document the -3 return value.
4854
7c97f91e
MM
48552013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4856
4857 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
4858 (linux_btrace_h): New variable.
4859 (linux-btrace.o): New rule.
4860
be9a119c 48612013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
4862 Hafiz Abid Qadeer <abidh@codesourcery.com>
4863
4864 * tracepoint.c (trace_buffer_size): New global.
4865 (DEFAULT_TRACE_BUFFER_SIZE): New define.
4866 (init_trace_buffer): Change to one-argument function. Allocate
4867 trace buffer memory.
4868 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
4869 handle QTBuffer:size packet.
4870 (cmd_bigqtbuffer_size): New function.
4871 (initialize_tracepoint): Call init_trace_buffer with
4872 DEFAULT_TRACE_BUFFER_SIZE.
4873 * server.c (handle_query): Add QTBuffer:size in the
4874 supported packets.
4875
e64f7499
YQ
48762013-03-07 Yao Qi <yao@codesourcery.com>
4877
4878 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
4879 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
4880 of -1.
4881 (cmd_qtsp): Adjust condition. Do post increment.
4882 Set cur_action and cur_step_action back to 0.
4883
f0ae6fc3
PA
48842013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
4885
4886 PR server/15236
4887 * linux-low.c (linux_write_memory): Return early success if LEN is
4888 zero.
4889
b5b0b0af
CV
48902013-03-05 Corinna Vinschen <vinschen@redhat.de>
4891
334ad4a8 4892 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 4893
589bc927
TT
48942013-02-28 Tom Tromey <tromey@redhat.com>
4895
4896 * configure.ac: Invoke AC_SYS_LARGEFILE.
4897 * configure, config.in: Rebuild.
4898
dfe07582
CV
48992013-02-28 Corinna Vinschen <vinschen@redhat.com>
4900
4901 * win32-low.c: Throughout, fix format strings and casts of
4902 printf-like functions to avoid type related warnings on all
4903 platforms.
4904 (get_child_debug_event): Print dwDebugEventCode as hex since
4905 that's how it's usually documented.
4906
736cd585
YQ
49072013-02-28 Yao Qi <yao@codesourcery.com>
4908
4909 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
4910 pulongest.
4911
e1f58301
JW
49122013-02-27 Jiong Wang <jiwang@tilera.com>
4913
4914 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
4915 (reg-tilegx32.c): New rule.
4916 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
4917 * linux-tile-low.c (tile_arch_setup): New function. Invoke
4918 different register info initializer according to elf class.
4919 (init_registers_tilgx32): New function. The tilegx32 register info
4920 initializer.
4921 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
4922 (tile_store_gregset): Likewise.
4923
d171ca78
YQ
49242013-02-27 Yao Qi <yao@codesourcery.com>
4925
4926 * server.c (process_point_options): Print debug message when
4927 debug_threads is true.
4928
282bbdf3
YQ
49292013-02-26 Yao Qi <yao@codesourcery.com>
4930
4931 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
4932
aca22551
PA
49332013-02-19 Pedro Alves <palves@redhat.com>
4934 Kai Tietz <ktietz@redhat.com>
4935
4936 PR gdb/15161
4937
4938 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
4939 instead of strtoul to extract address from packet.
4940 (process_serial_event) <'z'>: Likewise.
4941
4f3cee1c
YQ
49422013-02-18 Yao Qi <yao@codesourcery.com>
4943
4944 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
4945
8e1d55a3
PA
49462013-02-14 Pedro Alves <palves@redhat.com>
4947
4948 Plug memory leak.
4949
4950 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
4951 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
4952
458820da
PA
49532013-02-14 Pedro Alves <palves@redhat.com>
4954
4955 * tracepoint.c (cmd_qtdpsrc): Use savestring.
4956
baea0dae
PA
49572013-02-14 Pedro Alves <palves@redhat.com>
4958
4959 * tracepoint.c (save_string): Delete.
4960 (add_tracepoint_action): Use savestring instead of save_string.
4961
0b1afbb3
PA
49622013-02-12 Pedro Alves <palves@redhat.com>
4963
4964 * linux-xtensa-low.c: Ditto.
4965 * xtensa-xtregs.c: Ditto.
4966
8a4ac37e
PA
49672013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
4968
4969 * thread-db.c (thread_db_get_tls_address): NULL pointer check
4970 thread_db.
4971
148de6bb
MS
49722013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
4973
4974 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
4975 aarch64_num_wp_regs and aarch64_num_bp_regs to
4976 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
4977
55fac6e0
MS
49782013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
4979
4980 * linux-aarch64-low.c (ps_get_thread_area): Replace
4981 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
4982
176eb98c
MS
49832013-02-04 Jim MacArthur <jim.macarthur@arm.com>
4984 Marcus Shawcroft <marcus.shawcroft@arm.com>
4985 Nigel Stephens <nigel.stephens@arm.com>
4986 Yufeng Zhang <yufeng.zhang@arm.com>
4987
4988 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
4989 (aarch64.c, aarch64-without-fpu.c): New targets.
4990 * configure.srv (aarch64*-*-linux*): New.
4991 * linux-aarch64-low.c: New file.
4992
56f7af9c
MS
49932013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
4994
43aaf8b6 4995 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
4996 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
4997 (dequeue_one_deferred_signal, linux_resume_one_thread)
4998 (fetch_register, linux_write_memory, linux_enable_event_reporting)
4999 (linux_tracefork_grandchild, linux_test_for_tracefork)
5000 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
5001 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
5002 where the argument is 0.
5003
60f662b0
YQ
50042013-01-25 Yao Qi <yao@codesourcery.com>
5005
5006 * event-loop.c: Include "queue.h".
5007 (gdb_event_p): New typedef.
5008 (struct gdb_event) <next_event>: Remove.
5009 (event_queue): Change to QUEUE(gdb_event_p).
5010 (async_queue_event): Remove.
5011 (gdb_event_xfree): New.
5012 (initialize_event_loop): New.
5013 (process_event): Use API from QUEUE.
5014 (wait_for_event): Likewise.
5015 * server.c (main): Call initialize_event_loop.
5016 * server.h (initialize_event_loop): Declare.
5017
5ae4861a
YQ
50182013-01-18 Yao Qi <yao@codesourcery.com>
5019
5020 * ax.h (struct eval_agent_expr_context): New.
5021 (gdb_eval_agent_expr): Update declaration.
5022 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
5023 TFRAME. Add new argument CTX.
5024 * server.h (struct eval_agent_expr_context): Declare.
5025 (agent_mem_read, agent_tsv_read): Update declaration.
5026 (agent_mem_read_string): Likewise.
5027 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
5028 (add_traceframe_block): Add new argument TPOINT.
5029 Increase TPOINT->traceframe_usage.
5030 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
5031 eval_tracepoint_agent_expr.
5032 (condition_true_at_tracepoint): Likewise.
5033 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
5034 (agent_mem_read_string, agent_tsv_read): Likewise.
5035
85e00e85
YQ
50362013-01-16 Yao Qi <yao@codesourcery.com>
5037
5038 * linux-low.c (linux_resume_one_lwp): Don't check
5039 'lwp->bp_reinsert != 0'.
5040
4039cf45
JB
50412013-01-07 Joel Brobecker <brobecker@adacore.com>
5042 Pedro Alves <palves@redhat.com>
5043
5044 * lynx-low.c (ptrace_request_to_str): Define a temporary
5045 macro and use it to simplify this function's implementation.
5046
9044dee2
JB
50472013-01-07 Joel Brobecker <brobecker@adacore.com>
5048
5049 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
5050 sets errno.
5051
e6352c8f
JB
50522013-01-07 Joel Brobecker <brobecker@adacore.com>
5053
5054 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
5055
50681a27
JB
50562013-01-07 Joel Brobecker <brobecker@adacore.com>
5057
5058 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
5059
3f6e77ef
JB
50602013-01-07 Joel Brobecker <brobecker@adacore.com>
5061
5062 * lynx-low.c (lynx_resume): Use the resume_info parameter
5063 to determine the ptid for the lynx_ptrace call, unless
5064 it is equal to minus_one_ptid, in which case we use the
5065 ptid of the current_inferior.
5066 (lynx_wait_1): After having received a thread create/exit
5067 event, resume the inferior's execution using the signaling
5068 thread's ptid, rather than the old ptid.
5069
7fda33ae
JB
50702013-01-07 Joel Brobecker <brobecker@adacore.com>
5071
5072 * lynx-low.c (lynx_resume): Delete variable ret.
5073
b9786c74
JB
50742013-01-01 Joel Brobecker <brobecker@adacore.com>
5075
5076 * gdbreplay.c (gdbreplay_version): Update copyright year.
5077 * server.c (gdbserver_version): Likewise.
5078
8b93d60f
JB
50792012-12-17 Joel Brobecker <brobecker@adacore.com>
5080
5081 * lynx-low.c (lynx_wait_1): Add debug trace before adding
5082 new thread.
5083
037335a7
JB
50842012-12-17 Joel Brobecker <brobecker@adacore.com>
5085
5086 * lynx-low.c (ptrace_request_to_str): Add handling for
5087 PTRACE_GETTRACESIG.
5088
52d4cbd8
JB
50892012-12-17 Joel Brobecker <brobecker@adacore.com>
5090
5091 * lynx-low.c (lynx_attach): Delete variable new_process.
5092
ab8f6ca9
JB
50932012-12-17 Joel Brobecker <brobecker@adacore.com>
5094
5095 * lynx-low.c (lynx_create_inferior): Delete variable
5096 new_process.
5097
78cbc024
JB
50982012-12-17 Joel Brobecker <brobecker@adacore.com>
5099
5100 * lynx-low.c (ptrace_request_to_str): Do not handle
5101 PTRACE_GETTHREADLIST if this macro does not exist.
5102
14a00470
YQ
51032012-12-15 Yao Qi <yao@codesourcery.com>
5104
5105 * Makefile.in (OBS): Add notif.o.
5106 * notif.c, notif.h: New.
5107 * server.c: Include "notif.h".
5108 (struct vstop_notif) <next>: Remove.
5109 <base>: New field.
5110 (queue_stop_reply): Update.
5111 (push_event, send_next_stop_reply): Remove.
5112 (discard_queued_stop_replies): Update.
5113 (notif_stop): New variable.
5114 (handle_v_stopped): Remove.
5115 (handle_v_requests): Don't call handle_v_stopped. Call
5116 handle_ack_notif instead.
5117 (queue_stop_reply_callback): Call notif_event_enque instead
5118 of queue_stop_reply.
5119 (handle_status): Don't call send_next_stop_reply, call
5120 notif_write_event instead.
5121 (kill_inferior_callback): Likewise.
5122 (detach_or_kill_inferior_callback): Likewise.
5123 (main): Call initialize_notif.
5124 (process_serial_event): Call QUEUE_is_empty.
5125 (handle_target_event): Call notif_push instead of push event.
5126 * server.h (push_event): Remove declaration.
5127
61c125b9
TT
51282012-12-10 Tom Tromey <tromey@redhat.com>
5129
5130 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
5131 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
5132 macros.
5133 (.c.o): Rewrite.
5134 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
5135 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
5136 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
5137 (amd64-linux-ipa.o, ax.o): Rewrite.
5138 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
5139 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
5140 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
5141 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
5142 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
5143 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
5144 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
5145 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
5146 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
5147 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
5148 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
5149 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
5150 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
5151 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
5152 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
5153 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
5154 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
5155 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
5156 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
5157 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
5158 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
5159 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
5160 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
5161 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
5162 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
5163 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
5164 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
5165 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
5166 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
5167 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
5168 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
5169 (reg-tilegx.o): Remove.
5170 (all_object_files): New macro.
5171 Include .deps files.
5172 * aclocal.m4, configure: Rebuild.
5173 * acinclude.m4: Include depstand.m4, lead-dot.m4.
5174 * configure.ac: Invoke ZW_CREATE_DEPDIR,
5175 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
5176
e90e9ad9
TT
51772012-12-05 Tom Tromey <tromey@redhat.com>
5178
5179 PR gdb/14917:
5180 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
5181
02d403bf 51822012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
5183
5184 * configure.ac: Check for linux/perf_event.h.
5185 * config.in: Regenerated.
5186 * configure: Regenerated.
5187
0270a750
PA
51882012-11-26 Maxime Villard <rustyBSD@gmx.fr>
5189
5190 * hostio.c (handle_readlink): Decrease buffer size
5191 parameter passed to readlink by one byte.
5192
8c29b58e
YQ
51932012-11-26 Yao Qi <yao@codesourcery.com>
5194
5195 * configure.ac (build_warnings): Append '-Wempty-body'.
5196 * configure: Regenerated.
5197 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
5198 body.
5199
8bdce1ff
PM
52002012-11-15 Pierre Muller <muller@sourceware.org>
5201
5202 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
5203 * config.in: Regenerate.
5204 * configure: Regenerate.
5205 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
5206 Use "gdb_wait.h" header instead of <sys/wait.h> header.
5207 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
5208 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
5209 header.
5210 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
5211 instead of <sys/wait.h> header.
5212 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
5213
02d403bf 52142012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
5215
5216 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
5217 (various make rules): Remove -DGDBSERVER
5218
fbd5db48
YQ
52192012-11-09 Yao Qi <yao@codesourcery.com>
5220
5221 * spu-low.c (current_ptid): Move it to ..
5222 * gdbthread.h: ... here. New.
5223 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
5224 * server.c (myresume, process_serial_event): Likewise.
5225 * thread-db.c (thread_db_find_new_threads): Likewise.
5226 * tracepoint.c (run_inferior_command): Likewise.
5227
b3dc46ff
AB
52282012-10-01 Andrew Burgess <aburgess@broadcom.com>
5229
5230 * server.c (handle_search_memory_1): Include access length in
5231 warning message.
5232
07c04788
HPN
52332012-09-05 Michael Brandt <michael.brandt@axis.com>
5234
5235 * linux-crisv32-low.c: Fix compile errors.
5236
918d227b
YQ
52372012-09-04 Yao Qi <yao@codesourcery.com>
5238
5239 * tracepoint.c (cmd_qtsv): Adjust debug message.
5240 Don't check CUR_TPOINT.
5241
18c1b81a
YQ
52422012-08-28 Yao Qi <yao@codesourcery.com>
5243
5244 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
5245 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
5246 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
5247 Remove declarations of xmalloc, xreallloc, xstrdup and
5248 freeargv.
5249 * Makefile.in (libiberty_h): New.
5250 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
5251 (linux-bfin-low.o): Append dependency 'libiberty.h'.
5252
dc82f37b
YQ
52532012-08-23 Yao Qi <yao@codesourcery.com>
5254
5255 * server.h: Remove declaration of 'xsnprintf'.
5256
406b1477
KS
52572012-08-22 Keith Seitz <keiths@redhat.com>
5258
5259 * server.h: Include build-gnulib-gbserver/config.h.
5260 * gdbreplay.c: Likewise.
5261
e6712ff1
DE
52622012-08-08 Doug Evans <dje@google.com>
5263
5264 * Makefile.in (SFILES): Add gdb_vecs.c.
5265 (OBS): Add gdb_vecs.o.
5266 (gdb_vecs_h, host_defs_h): New variables.
5267 (thread-db.o): Add $(gdb_vecs_h) dependency.
5268 (gdb_vecs.o): New rule.
5269 * thread-db.c: #include "gdb_vecs.h".
5270 (thread_db_load_search): Use a vector to iterate over path elements.
5271 Handle text appearing after "$pdir".
5272
5273 * configure.ac: Add check for strstr.
5274 * config.in: Regenerate.
5275 * configure: Regenerate.
5276
7c3270ae
UW
52772012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
5278
5279 * hostio.c (handle_pread): If pread fails, fall back to attempting
5280 lseek/read.
5281 (handle_pwrite): Likewise for pwrite.
5282
b62e2b27
UW
52832012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
5284
5285 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
5286 between unsupported TYPE and unimplementable ADDR/LEN combination.
5287 (arm_insert_point): Act on new return value.
5288
78a99e91
PA
52892012-07-31 Pedro Alves <palves@redhat.com>
5290
5291 * server.c (process_point_options): Only skip tokens if we find
5292 one that is unrecognized. Don't treat 'X' specially while
5293 skipping unrecognized tokens.
5294
fcf303ab
UW
52952012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
5296
5297 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
5298 to 4-byte-align HW breakpoint addresses for Thumb.
5299
7255706c
YQ
53002012-07-27 Yao Qi <yao@codesourcery.com>
5301
5302 PR remote/14161.
5303
5304 * server.h: Declare gdb_agent_about_to_close.
5305 * target.c (kill_inferior): Include "agent.h".
5306 New. Send command 'kill'.
5307 * target.h (kill_inferior): Removed macro.
5308 * tracepoint.c (gdb_agent_about_to_close): New.
5309 (gdb_agent_helper_thread): Handle command 'close'.
5310 Wait endlessly until the inferior stops.
5311 Install gdb_agent_remove_socket to atexit hook.
5312 (agent_socket_name): New static variable.
5313 (gdb_agent_socket_init): Replace local variable 'name' with
5314 'agent_socket_name'.
5315 (gdb_agent_remove_socket): New.
5316
5a3f286f
YQ
53172012-07-27 Yao Qi <yao@codesourcery.com>
5318
5319 * server.c (process_point_options): Stop at 'X' when parsing.
5320
961bd387
ME
53212012-07-19 Michael Eager <eager@eagercon.com>
5322
a261b8f5 5323 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
5324 to hw_execute.
5325 * linux-x86-low.c (x86_insert_point, x86_remove_point):
5326 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
5327 hardware breakpoint.
5328
aa7c7447
JK
53292012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5330
5331 * gdbserver/linux-low.c (initialize_low): Call
5332 linux_ptrace_init_warnings.
5333
7f216e7c
DE
53342012-07-02 Doug Evans <dje@google.com>
5335
5336 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
5337 pointer to int.
5338
d3ce09f5
SS
53392012-07-02 Stan Shebs <stan@codesourcery.com>
5340
5341 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
5342 (ax.o): Add it to build rule.
5343 (ax-ipa.o): Ditto.
5344 (OBS): Add format.o.
5345 (IPA_OBS): Add format.o.
5346 * server.c (handle_query): Claim support for breakpoint commands.
5347 (process_point_options): Add command case.
5348 (process_serial_event): Leave running if there are printfs in
5349 effect.
5350 * mem-break.h (any_persistent_commands): Declare.
5351 (add_breakpoint_commands): Declare.
5352 (gdb_no_commands_at_breakpoint): Declare.
5353 (run_breakpoint_commands): Declare.
5354 * mem-break.c (struct point_command_list): New struct.
5355 (struct breakpoint): New field command_list.
5356 (any_persistent_commands): New function.
5357 (add_commands_to_breakpoint): New function.
5358 (add_breakpoint_commands): New function.
5359 (gdb_no_commands_at_breakpoint): New function.
5360 (run_breakpoint_commands): New function.
5361 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
5362 locally.
5363 * ax.c: Include format.h.
5364 (ax_printf): New function.
5365 (gdb_eval_agent_expr): Add printf opcode.
5366
2f8f6aed
YQ
53672012-06-13 Yao Qi <yao@codesourcery.com>
5368
5369 * server.c (start_inferior): Remove duplicated writes to fields
5370 'last_resume_kind' and 'last_status' of 'current_inferior'.
5371
0c9070b3
YQ
53722012-06-12 Yao Qi <yao@codesourcery.com>
5373 Pedro Alves <palves@redhat.com>
5374
5375 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
5376 comment.
5377 * server.c (handle_v_cont): Extend comment.
5378
c52daf70
YQ
53792012-06-11 Yao Qi <yao@codesourcery.com>
5380
5381 * linux-low.c (linux_attach): Add 'static'.
5382
d38bbb0a
YQ
53832012-06-06 Yao Qi <yao@codesourcery.com>
5384
5385 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
5386
89dc0afd
JK
53872012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
5388
5389 Fix gcc -flto compilation warning.
5390 * server.c (main): Make variable multi_mode and attach volatile.
5391
75f62ce7
TJB
53922012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5393
5394 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
5395 if the platform doesn't know about it.
5396
65f479b6
PA
53972012-05-30 Jeff Kenton <jkenton@tilera.com>
5398
5399 * Makefile.in (SFILES): Add linux-tile-low.c.
5400 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
5401 * configure.srv: Handle tilegx-*-linux*.
5402 * linux-tile-low.c: New file.
5403
0c5bf5a9
JK
54042012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5405
5406 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
5407
a493e3e2
PA
54082012-05-24 Pedro Alves <palves@redhat.com>
5409
5410 PR gdb/7205
5411
43aaf8b6 5412 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 5413
2ea28649
PA
54142012-05-24 Pedro Alves <palves@redhat.com>
5415
5416 PR gdb/7205
5417
5418 Replace target_signal with gdb_signal throughout.
5419
8d409d16
MR
54202012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
5421
5422 * linux-low.c (linux_store_registers): Avoid the copying sequence
5423 when no data has been retrieved by ptrace.
5424
23512c01
MGD
54252012-05-22 Will Deacon <will.deacon@arm.com>
5426
5427 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
5428 Include asm/ptrace.h.
5429 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
5430 already defined.
5431
4934b29e
MR
54322012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
5433
5434 * linux-low.c (linux_store_registers): Don't re-retrieve data
5435 with ptrace that has already been obtained from /proc. Always
5436 copy any data retrieved with ptrace to the buffer supplied.
5437
bde24c0a
PA
54382012-05-11 Yao Qi <yao@codesourcery.com>
5439 Pedro Alves <palves@redhat.com>
5440
5441 * linux-low.c (enum stopping_threads_kind): New.
5442 (stopping_threads): Change type to `enum stopping_threads_kind'.
5443 (handle_extended_wait): If stopping and suspending threads, leave
5444 the new_lwp suspended too.
5445 (linux_wait_for_event): Adjust.
5446 (stop_all_lwps): Set `stopping_threads' to
5447 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
5448 whether we're suspending threads or just stopping them. Assert no
5449 recursion happens.
5450
623b6bdf
YQ
54512012-04-29 Yao Qi <yao@codesourcery.com>
5452
5453 * server.h: Move some code to ...
5454 * gdbthread.h: ... here. New.
5455 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
5456 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
5457 (nto-low.o, win32-low.o): Likewise.
5458 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
5459 * regcache.c, remote-utils.c, server.c: Likewise.
5460 * target.c, tracepoint.c, win32-low.c: Likewise.
5461
f15f9948
TJB
54622012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5463
5464 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
5465 (PTRACE_ARG4_TYPE): Likewise.
5466 (PTRACE_XFER_TYPE): Likewise.
5467 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
5468 ptrace to PTRACE_ARG3_TYPE.
5469 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
5470 (PTRACE_ARG4_TYPE): Likewise.
5471 (PTRACE_XFER_TYPE): Likewise.
5472 (linux_detach_one_lwp): Cast fourth argument of
5473 ptrace to long then PTRACE_ARG4_TYPE.
5474 (regsets_fetch_inferior_registers): Cast third argument of
5475 ptrace to long then PTRACE_ARG3_TYPE.
5476 (regsets_store_inferior_registers): Likewise.
5477
38ea300a
PA
54782012-04-20 Pedro Alves <palves@redhat.com>
5479
5480 * configure: Regenerate.
5481
c971b7fa
PA
54822012-04-19 Pedro Alves <palves@redhat.com>
5483
43aaf8b6 5484 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 5485 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
5486 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
5487 (all, install-only, uninstall, clean-info, all-lib, clean): No
5488 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
5489 (maintainer-clean realclean distclean): Use subdir_do.
5490 (subdir_do): New.
5491 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 5492 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
5493 * acinclude.m4: Include acx_configure_dir.m4.
5494 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
5495 calls. Call AC_PROG_RANLIB. Configure gnulib using
5496 ACX_CONFIGURE_DIR.
5497 (GNULIB): New.
5498 (GNULIB_STDINT_H): Adjust.
5499 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
5500 * gdbreplay.c: Include build-gnulib/config.h.
5501 * server.h: Likewise.
5502 * aclocal.m4: Regenerate.
5503 * config.in: Regenerate.
5504 * configure: Regenerate.
c971b7fa 5505
809277f8
PA
55062012-04-19 Pedro Alves <palves@redhat.com>
5507
5508 * Makefile.in (LIBGNU, INCGNU): Adjust.
5509 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
5510 (all, install-only, uninstall, clean-info, all-lib, clean)
5511 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
5512 * configure.ac: Adjust AC_OUTPUT output.
5513 * aclocal.m4: Regenerate.
5514 * configure: Regenerate.
5515
fd9bb8b8
PA
55162012-04-19 Pedro Alves <palves@redhat.com>
5517
5518 * Makefile.in (generated_files): New.
5519 (server_h): Remove the explicit dependency on config.h, and depend
5520 on $generated_files.
5521
1c298c66
PA
55222012-04-19 Pedro Alves <palves@redhat.com>
5523
5524 * Makefile.in (INCGNU): Add -Ignulib.
5525
57c4b50b
PA
55262012-04-19 Pedro Alves <palves@redhat.com>
5527
5528 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
5529 (INCGNU): ... this, and spell out -I here.
5530 (GNULIB_LIB): Rename to ...
5531 (LIBGNU): ... this.
5532 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
5533
1030e047
PA
55342012-04-19 Pedro Alves <palves@redhat.com>
5535
5536 * config.in: Regenerate.
5537
447d4319
PA
55382012-04-19 Pedro Alves <palves@redhat.com>
5539
5540 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
5541 * server.h (memmem): Remove declaration.
5542 * config.in: Regenerate.
5543 * configure: Regenerate.
5544
aad9eab9
YQ
55452012-04-19 Yao Qi <yao@codesourcery.com>
5546
5547 * Makefile.in (SFILES): Add common/vec.c.
5548 (OBS): Add vec.o.
5549 (vec.o): New rule.
5550
3e10640f
YQ
55512012-04-19 Yao Qi <yao@codesourcery.com>
5552
5553 * remote-utils.c (prepare_resume_reply): Replace with macro
5554 target_core_of_thread.
5555 * server.c (handle_qxfer_threads_proper): Likewise.
5556 * target.h (traget_core_of_thread): New macro.
5557
71622373
PA
55582012-04-18 Pedro Alves <palves@redhat.com>
5559
5560 * aclocal.m4: Regenerate.
5561 * configure: Regenerate.
5562
80d26939
YQ
55632012-04-16 Yao Qi <yao@codesourcery.com>
5564
5565 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
5566 duplicated on address.
5567
42476b70
YQ
55682012-04-16 Yao Qi <yao@codesourcery.com>
5569
5570 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
5571 (struct tracepoint_action_ops) <send>: New field.
5572 (m_tracepoint_action_send, r_tracepoint_action_send): New.
5573 (agent_expr_send, x_tracepoint_action_send): New.
5574 (l_tracepoint_action_send): New.
5575 (cmd_qtdp): Download and install tracepoint
5576 according to `use_agent'.
5577 (run_inferior_command): Add one more parameter `len'.
5578 Update callers.
5579 (tracepoint_send_agent): New.
5580 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
5581
7bc83639
YQ
55822012-04-16 Yao Qi <yao@codesourcery.com>
5583
5584 * tracepoint.c (download_tracepoints): Moved to ...
5585 (cmd_qtstart): ... here.
5586
5f18041e
YQ
55872012-04-14 Yao Qi <yao@codesourcery.com>
5588
5589 * tracepoint.c: Include inttypes.h.
5590 (struct collect_memory_action): Use sized types.
5591 (struct tracepoint): Likewise.
5592 (cmd_qtdp, stop_tracing): Update print specifiers.
5593 (cmd_qtp, response_tracepoint): Likewise.
5594 (collect_data_at_tracepoint): Likewise.
5595 (collect_data_at_step): Likewise.
5596
55a8c076
YQ
55972012-04-14 Yao Qi <yao@codesourcery.com>
5598
5599 Import gnulib module inttypes.
5600 * aclocal.m4, config.in, configure: Regenerated.
5601
dc750257
YQ
56022012-04-14 Yao Qi <yao@codesourcery.com>
5603
5604 * Makefile.in (maintainer-clean, realclean, distclean): Remove
5605 Makefile and config.status at last.
5606
0ab5faf9
YQ
56072012-04-13 Yao Qi <yao@codesourcery.com>
5608
5609 * tracepoint.c: Include stdint.h unconditionally.
5610
18f5fd81
TJB
56112012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5612
5613 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
5614 on BFD_HAVE_SYS_PROCFS_TYPE.
5615 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
5616 * configure: Regenerate.
5617 * config.in: Likewise.
5618
4d47af5c
L
56192012-04-13 H.J. Lu <hongjiu.lu@intel.com>
5620
5621 * Makefile.in (clean): Also remove x32.c x32-linux.c
5622 x32-avx.c x32-avx-linux.c.
5623 (x32.o): New target.
5624 (x32.c): Likewise.
5625 (x32-linux.o): Likewise.
5626 (x32-linux.c): Likewise.
5627 (x32-avx.o): Likewise.
5628 (x32-avx.c): Likewise.
5629 (x32-avx-linux.o): Likewise.
5630 (x32-avx-linux.c): Likewise.
5631
5632 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
5633 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
5634 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
5635 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
5636 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
5637 i386/x32-avx-linux.xml.
5638
5639 * linux-x86-low.c (init_registers_x32_linux): New prototype.
5640 (init_registers_x32_avx_linux): Likwise.
5641 (x86_linux_update_xmltarget): Call init_registers_x32_linux
5642 or init_registers_x32_avx_linux if linux_is_elf64 is false.
5643
ecedbe58
PA
56442012-04-13 Pedro Alves <palves@redhat.com>
5645
5646 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
5647 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
5648 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
5649 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
5650 the sub-make.
5651
c92b5177
L
56522012-04-12 H.J. Lu <hongjiu.lu@intel.com>
5653
5654 * linux-x86-low.c (compat_x32_clock_t): New.
5655 (compat_x32_siginfo_t): Likewise.
5656 (compat_x32_siginfo_from_siginfo): Likewise.
5657 (siginfo_from_compat_x32_siginfo): Likewise.
5658 (linux_is_elf64): Likewise.
5659 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
5660 and siginfo_from_compat_x32_siginfo for x32.
5661 (x86_arch_setup): Set linux_is_elf64.
5662
214d508e
L
56632012-04-12 H.J. Lu <hongjiu.lu@intel.com>
5664
5665 PR gdb/13969
5666 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
5667 e_machine field.
5668 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
5669 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
5670 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
5671 compatible with process.
5672
c9a1864a
YQ
56732012-04-12 Yao Qi <yao@codesourcery.com>
5674
5675 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
5676 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
5677 (install-only, install-info, clean): Handle sub dir gnulib.
5678 (all-lib, am--refresh): New targets.
5679 (memmem.o): Remove target.
5680 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
5681 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
5682 (AC_REPLACE_FUNCS): Remove memmem.
5683 Invoke gl_INIT and AM_INIT_AUTOMAKE.
5684 (AC_OUTPUT): Generate Makefile in gnulib/.
5685 * aclocal.m4, config.in, configure: Regenerated.
5686
367ba2c2
MR
56872012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
5688
5689 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
5690
9d236627
PA
56912012-04-05 Pedro Alves <palves@redhat.com>
5692
5693 -Werror=strict-aliasing
5694
5695 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
5696 pointer.
5697
111217b3
PA
56982012-04-04 Pedro Alves <palves@redhat.com>
5699
5700 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
5701 (sparc_store_gregset_from_stack, sparc_store_gregset)
5702 (sparc_breakpoint_at): Fix formatting.
5703
8365dcf5
TJB
57042012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5705
5706 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
5707 are available.
5708 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
5709 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
5710 * config.in: Regenerate.
5711 * configure: Likewise.
5712
689cc2ae
PA
57132012-03-29 Pedro Alves <palves@redhat.com>
5714
5715 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
5716 Correct ptrace arguments.
5717
c14dfd32
PA
57182012-03-28 Pedro Alves <palves@redhat.com>
5719
5720 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
5721 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
5722 (IA64_FR1_REGNUM): New defines.
5723 (ia64_fetch_register): New.
5724 (the_low_target): Install it.
5725 * linux-low.h (struct linux_target_ops) <fetch_register>: New
5726 field.
5727 * linux-low.c (linux_fetch_registers): Try the
5728 the_low_target.fetch_register hook first.
5729
5730 * linux-arm-low.c (the_low_target): Adjust.
5731 * linux-bfin-low.c (the_low_target): Adjust.
5732 * linux-cris-low.c (the_low_target): Adjust.
5733 * linux-crisv32-low.c (the_low_target): Adjust.
5734 * linux-m32r-low.c (the_low_target): Adjust.
5735 * linux-m68k-low.c (the_low_target): Adjust.
5736 * linux-mips-low.c (the_low_target): Adjust.
5737 * linux-ppc-low.c (the_low_target): Adjust.
5738 * linux-s390-low.c (the_low_target): Adjust.
5739 * linux-sh-low.c (the_low_target): Adjust.
5740 * linux-sparc-low.c (the_low_target): Adjust.
5741 * linux-tic6x-low.c (the_low_target): Adjust.
5742 * linux-x86-low.c (the_low_target): Adjust.
5743 * linux-xtensa-low.c (the_low_target): Adjust.
5744
63c88e13
PA
57452012-03-26 Pedro Alves <palves@redhat.com>
5746
5747 * server.c (handle_qxfer_libraries): Don't bail early if
5748 the_target->qxfer_libraries_svr4 is not NULL.
5749
fb723180
PA
57502012-03-26 Pedro Alves <palves@redhat.com>
5751
5752 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
5753
0afae3cf
PA
57542012-03-23 Pedro Alves <palves@redhat.com>
5755
5756 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
5757 "library-list-svr4" element's start tag when the the DSO list is
5758 empty.
5759
485f1ee4
PA
57602012-03-23 Pedro Alves <palves@redhat.com>
5761
5762 * linux-low.c (read_one_ptr): Read the inferior's pointer through
5763 a variable whose type size is the same as the inferior's pointer
5764 size.
5765
a5362b9a
TS
57662012-03-21 Thomas Schwinge <thomas@codesourcery.com>
5767
5768 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
5769 struct siginfo.
5770 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
5771 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
5772 * linux-low.h: Include <signal.h>.
5773 (struct siginfo): Remove forward declaration.
5774 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
5775 struct siginfo.
5776
d226c142
MF
57772012-03-21 Mike Frysinger <vapier@gentoo.org>
5778
5779 * .gitignore: Ignore more files.
5780
122f36ef
PA
57812012-03-19 Pedro Alves <palves@redhat.com>
5782 Jan Kratochvil <jan.kratochvil@redhat.com>
5783
5784 * server.c (cont_thread, general_thread): Add describing comments.
5785 (start_inferior): Clear `cont_thread'.
5786 (handle_v_cont): Don't set `cont_thread' if resuming all threads
5787 of a process.
5788
fc3e5175
YQ
57892012-03-15 Yao Qi <yao@codesourcery.com>
5790
5791 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
5792 handling to ...
5793 (cmd_qtdp): ... here.
5794
8d0d92cd
YQ
57952012-03-15 Yao Qi <yao@codesourcery.com>
5796
5797 * tracepoint.c (struct tracepoint_action_ops): New.
5798 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
5799 (m_tracepoint_action_download): New.
5800 (r_tracepoint_action_download): New.
5801 (x_tracepoint_action_download): New.
5802 (l_tracepoint_action_download): New.
5803 (add_tracepoint_action): Install `action->ops' according type.
5804 (download_tracepoint_1): Move code `download' function pointer
5805 of various tracepoint_action_ops.
5806
87b0bb13
JK
58072012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
5808
5809 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
5810 linux_ptrace_attach_warnings.
5811
5f572dec
JK
58122012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
5813
5814 * Makefile.in (linux-ptrace.o): New.
5815 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
5816 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
5817 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
5818 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
5819 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
5820 of these targets.
5821 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
5822
f4647387
YQ
58232012-03-08 Yao Qi <yao@codesourcery.com>
5824 Pedro Alves <palves@redhat.com>
5825
5826 Fix PR server/13392.
5827 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
5828 offset of JMP insn.
5829 * tracepoint.c (remove_tracepoint): New.
5830 (cmd_qtdp): Call remove_tracepoint when failed to install.
5831
9b224c5e
PA
58322012-03-07 Pedro Alves <palves@redhat.com>
5833
5834 * linux-low.c (get_detach_signal): New.
5835 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
5836 Pass on pending signals to PTRACE_DETACH. Check the result of the
5837 ptrace call.
5838 * server.c (program_signals, program_signals_p): New.
5839 (handle_general_set): Handle QProgramSignals.
5840 * server.h (program_signals, program_signals_p): Declare.
5841
e237a7e2
JK
58422012-03-05 Pedro Alves <palves@redhat.com>
5843 Jan Kratochvil <jan.kratochvil@redhat.com>
5844
5845 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
5846 New comment why.
5847
5808517f
YQ
58482012-03-03 Yao Qi <yao@codesourcery.com>
5849
5850 * tracepoint.c (tracepoint_look_up_symbols): Update call to
5851 agent_look_up_symbols.
5852
58b4daa5
YQ
58532012-03-03 Yao Qi <yao@codesourcery.com>
5854
5855 * Makefile.in (linux-low.o): Keep dependence on agent.h.
5856 (linux-x86-low.o): Likewise.
5857 * server.h: Remove in_process_agent_loaded.
5858 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
5859 common/agent.c.
5860 Update callers.
5861
8ffcbaaf
YQ
58622012-03-03 Yao Qi <yao@codesourcery.com>
5863
5864 * tracepoint.c (gdb_agent_capability): New global.
5865 (in_process_agent_loaded_ust): Renamed to
5866 `in_process_agent_supports_ust'.
5867 Update callers.
5868 (in_process_agent_supports_ust): Call agent_capability_check.
5869 (clear_installed_tracepoints): Assert that agent supports
5870 agent.
5871
d1feda86
YQ
58722012-03-03 Yao Qi <yao@codesourcery.com>
5873
5874 * linux-low.c (linux_supports_agent): New.
5875 (linux_target_ops): Initialize field `supports_agent' with
5876 linux_supports_agent.
5877 * target.h (struct target_ops) <supports_agent>: New.
5878 (target_supports_agent): New macro.
5879 * server.c (handle_general_set): Handle packet 'QAgent'.
5880 (handle_query): Send `QAgent+'.
5881 * Makefile.in (server.o): Depends on agent.h.
5882
2fa291ac
YQ
58832012-03-03 Yao Qi <yao@codesourcery.com>
5884
5885 * Makefile.in (OBS): Add agent.o.
5886 Add new rule for agent.o.
5887 Track dependence of tracepoint.c on agent.h.
5888 * tracepoint.c (run_inferior_command_1):
5889 (run_inferior_command): Call agent_run_command.
5890 (gdb_ust_connect_sync_socket): Deleted. Move it to
5891 common/agent.c.
5892 (resume_thread, stop_thread): Likewise.
5893 (gdb_ust_socket_init): Renamed to ...
5894 (gdb_agent_socket_init): ... New.
5895 (gdb_ust_thread): Renamed to ...
5896 (gdb_agent_helper_thread): ... New.
5897 (gdb_ust_init): Move some code to ...
5898 (gdb_agent_init): ... here. New.
5899 [HAVE_UST]: Call gdb_ust_init.
5900 (initialize_tracepoint_ftlib): Call gdb_agent_init.
5901 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
5902 * config.in, configure: Regenerated.
5903
05044653
PA
59042012-03-02 Pedro Alves <palves@redhat.com>
5905
5906 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
5907 * linux-low.c (struct simple_pid_list): New.
5908 (stopped_pids): New a struct simple_pid_list pointer.
5909 (add_to_pid_list, pull_pid_from_list): New.
5910 (handle_extended_wait): Don't assume the first signal new children
5911 report is SIGSTOP. Adjust call to pull_pid_from_list.
5912 (linux_wait_for_lwp): Adjust.
5913
8d00225b
YQ
59142012-03-02 Yao Qi <yao@codesourcery.com>
5915
5916 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
5917 debug log.
5918
19560ba5
YQ
59192012-03-02 Yao Qi <yao@codesourcery.com>
5920
5921 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
5922 `stop_pc' and `tpoint'. Update caller.
5923
1faeff08
MR
59242012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
5925
5926 * linux-low.h (linux_target_ops): Add regset_bitmap member.
5927 * linux-low.c (use_linux_regsets): New macro.
5928 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
5929 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
5930 (linux_register_in_regsets): New function.
5931 (usr_fetch_inferior_registers): Skip registers covered by
5932 regsets.
5933 (usr_store_inferior_registers): Likewise.
5934 (usr_fetch_inferior_registers): New macro.
5935 (usr_store_inferior_registers): Likewise.
5936 (linux_fetch_registers): Handle mixed regset/non-regset targets.
5937 (linux_store_registers): Likewise.
5938 * linux-mips-low.c (init_registers_mips_dsp_linux): New
5939 prototype.
5940 (init_registers_mips64_dsp_linux): Likewise.
5941 (init_registers_mips_linux): New macro.
5942 (init_registers_mips_dsp_linux): Likewise.
5943 (mips_dsp_num_regs): Likewise.
5944 (DSP_BASE, DSP_CONTROL): New fallback macros.
5945 (mips_base_regs): New macro.
5946 (mips_regmap): Use it. Fix the size.
5947 (mips_dsp_regmap): New variable.
5948 (mips_dsp_regset_bitmap): Likewise.
5949 (mips_arch_setup): New function.
5950 (mips_cannot_fetch_register): Use the_low_target.regmap rather
5951 than mips_regmap.
5952 (mips_cannot_store_register): Likewise.
5953 (the_low_target): Update .arch_setup, .num_regs and .regmap
5954 initializers. Add .regset_bitmap initializer.
5955 * linux-arm-low.c (the_low_target): Add .regset_bitmap
5956 initializer.
5957 * linux-bfin-low.c (the_low_target): Likewise.
5958 * linux-cris-low.c (the_low_target): Likewise.
5959 * linux-crisv32-low.c (the_low_target): Likewise.
5960 * linux-ia64-low.c (the_low_target): Likewise.
5961 * linux-m32r-low.c (the_low_target): Likewise.
5962 * linux-m68k-low.c (the_low_target): Likewise.
5963 * linux-ppc-low.c (the_low_target): Likewise.
5964 * linux-s390-low.c (the_low_target): Likewise.
5965 * linux-sh-low.c (the_low_target): Likewise.
5966 * linux-sparc-low.c (the_low_target): Likewise.
5967 * linux-tic6x-low.c (the_low_target): Likewise.
5968 * linux-x86-low.c (the_low_target): Likewise.
5969 * linux-xtensa-low.c (the_low_target): Likewise.
5970 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
5971 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
5972 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
5973 srv_xmlfiles.
5974 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
5975 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
5976
c03e6ccc
YQ
59772012-02-29 Yao Qi <yao@codesourcery.com>
5978 Pedro Alves <palves@redhat.com>
5979
5980 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
5981 `step_over_finished' is true.
5982
644cebc9
PA
59832012-02-27 Pedro Alves <palves@redhat.com>
5984
5985 * linux-low.c (pid_is_stopped): Delete, moved to common/.
5986 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
5987
c14d7ab2
PA
59882012-02-27 Pedro Alves <palves@redhat.com>
5989
5990 PR server/9684
5991 * linux-low.c (pid_is_stopped): New.
5992 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
5993
412c89dd
LM
59942012-02-25 Luis Machado <lgustavo@codesourcery.com>
5995
5996 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
5997 of conditions.
5998
b745defe
MR
59992012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
6000
6001 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
6002
9f3a5c85
LM
60032012-02-24 Luis Machado <lgustavo@codesourcery>
6004
6005 * server.c (handle_query): Advertise support for target-side
6006 breakpoint condition evaluation.
6007 (process_point_options): New function.
6008 (process_serial_event): When inserting a breakpoint, check for
6009 a target-side condition that should be evaluated.
6010
6011 * mem-break.c: Include regcache.h and ax.h.
6012 (point_cond_list_t): New data structure.
6013 (breakpoint) <cond_list>: New field.
6014 (find_gdb_breakpoint_at): Make non-static.
6015 (delete_gdb_breakpoint_at): Clear any target-side
6016 conditions.
6017 (clear_gdb_breakpoint_conditions): New function.
6018 (add_condition_to_breakpoint): Likewise.
6019 (add_breakpoint_condition): Likewise.
6020 (gdb_condition_true_at_breakpoint): Likewise.
6021 (gdb_breakpoint_here): Return result directly instead
6022 of going through a local variable.
6023
6024 * mem-break.h (find_gdb_breakpoint_at): New prototype.
6025 (clear_gdb_breakpoint_conditions): Likewise.
6026 (add_breakpoint_condition): Likewise.
6027 (gdb_condition_true_at_breakpoint): Likewise.
6028
6029 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
6030 (need_step_over_p): Take target-side breakpoint condition into
6031 consideration.
6032
5e1dc496
LM
60332012-02-24 Luis Machado <lgustavo@codesourcery>
6034
6035 * server.h: Include tracepoint.h.
6036 (agent_mem_read, agent_get_trace_state_variable_value,
6037 agent_set_trace_state_variable_value,
6038 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
6039 get_set_tsv_func_addr): New prototypes.
6040
6041 * ax.h: New include file.
6042 * ax.c: New source file.
6043
6044 * tracepoint.c: Include ax.h.
6045 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
6046 agent_expr, eval_result_type): Move to ax.h.
6047 (parse_agent_expr): Rename to ...
6048 (gdb_parse_agent_expr): ... this, make it non-static and move
6049 to ax.h.
6050 (unparse_agent_expr) Rename to ...
6051 (gdb_unparse_agent_expr): ... this, make it non-static and move
6052 to ax.h.
6053 (eval_agent_expr): Rename to ...
6054 (eval_tracepoint_agent_expr): ... this.
6055 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
6056 forward declarations.
6057 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
6058 (agent_get_trace_state_variable_value): New function.
6059 (agent_set_trace_state_variable_value): New function.
6060 (cmd_qtdp): Call gdb_parse_agent_expr (...).
6061 (response_tracepoint): Call gdb_unparse_agent_expr (...).
6062 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
6063 (condition_true_at_tracepoint): Likewise.
6064 (parse_agent_expr): Rename to ...
6065 (gdb_parse_agent_expr): ... this and move to ax.c.
6066 (unparse_agent_expr): Rename to ...
6067 (gdb_unparse_agent_expr): ... this and move to ax.c.
6068 (gdb_agent_op_name): Move to ax.c.
6069 (eval_agent_expr): Rename to ...
6070 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
6071 and move to ax.c.
6072 (eval_tracepoint_agent_expr): New function.
6073 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 6074 non-static.
5e1dc496
LM
6075 (current_insn_ptr, emit_error, struct bytecode_address): Move to
6076 ax.c.
6077 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
6078 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
6079 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
6080 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
6081 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
6082 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
6083 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
6084 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
6085 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
6086 (compile_bytecodes): Remove forward declaration.
6087 (is_goto_target): Move to ax.c.
6088 (compile_bytecodes): Move to ax.c and call
6089 agent_get_trace_state_variable_value (...) and
6090 agent_set_trace_state_variable_value (...).
6091
6092 * Makefile.in: Update ax.c and IPA dependencies.
6093
277e4e52
PA
60942012-02-24 Pedro Alves <palves@redhat.com>
6095
6096 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
6097 (cmd_bigqtbuffer_circular): ... this. Only handle
6098 'QTBuffer:circular:'.
6099 (handle_tracepoint_general_set): Adjust.
6100
bf4c19f7
YQ
61012012-02-16 Yao Qi <yao@codesourcery.com>
6102
6103 * inferiors.c: Move code to ...
6104 * dll.c: .... here. New.
6105 * server.h: Declare clear_dlls.
6106 * Makefile.in (SFILES): Add dll.c.
6107 (OBS): Add dll.o
6108 (dll.o): New rule.
6109
d73f2619
YQ
61102012-02-11 Yao Qi <yao@codesourcery.com>
6111
6112 * server.c: (handle_monitor_command): Add a new parameter
6113 `own_buf'.
6114 (handle_query): Update caller.
6115
f8255c2a
JB
61162012-02-09 Joel Brobecker <brobecker@adacore.com>
6117
6118 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
6119 * configure, config.in: Regenerate.
6120 * hostio.c: Provide an alternate implementation if HAVE_READLINK
6121 is not defined.
6122
da84f473
PA
61232012-02-02 Pedro Alves <palves@redhat.com>
6124
6125 Try SIGKILL first, then PTRACE_KILL.
6126 * linux-low.c (linux_kill_one_lwp): New.
6127 (linux_kill_one_lwp): Rename to ...
6128 (kill_one_lwp_callback): ... this. Use the new
6129 linux_kill_one_lwp.
6130
e886a173
PA
61312012-02-02 Pedro Alves <palves@redhat.com>
6132
6133 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
6134 inferior.
6135
be07f1a2
PA
61362012-01-27 Pedro Alves <palves@redhat.com>
6137
6138 * linux-low.c (linux_child_pid_to_exec_file): Delete.
6139 (elf_64_file_p): Make static.
6140 (linux_pid_exe_is_elf_64_file): New.
6141 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
6142 Delete declarations.
6143 (linux_pid_exe_is_elf_64_file): Declare.
6144 * linux-x86-low.c (x86_arch_setup): Use
6145 linux_pid_exe_is_elf_64_file.
6146
d8301ad1
JK
61472012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
6148
6149 * linux-low.c (linux_wait_for_event_1): Rename to ...
6150 (linux_wait_for_event): ... here and merge it with former
6151 linux_wait_for_event - new variable wait_ptid, use it.
6152 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
6153
01b17894
PA
61542012-01-23 Pedro Alves <palves@redhat.com>
6155
6156 * server.c (main): Avoid yet another case of infinite loop while
6157 detaching/killing after a longjmp.
6158
e825046f
JK
61592012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
6160
6161 Code cleanup.
6162 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
6163
b9e7b9c3
UW
61642012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
6165
6166 * hostio.c (handle_readlink): New function.
6167 (handle_vFile): Call it to handle "vFile:readlink" packets.
6168
901f9912
UW
61692012-01-20 Pedro Alves <palves@redhat.com>
6170 Ulrich Weigand <ulrich.weigand@linaro.org>
6171
6172 * server.c (handle_v_requests): Only support vAttach and vRun to
6173 start multiple processes when in extended protocol mode.
6174
fc1ab1a0
PA
61752012-01-17 Pedro Alves <palves@redhat.com>
6176
6177 * tracepoint.c (initialize_tracepoint): Use mmap instead of
6178 memalign plus mprotect to allocate the scratch buffer.
6179
7d5d4e98
PA
61802012-01-13 Pedro Alves <palves@redhat.com>
6181
6182 * server.c (attach_inferior): Clear `cont_thread'.
6183
f128d5e9
PA
61842012-01-13 Pedro Alves <palves@redhat.com>
6185
6186 * server.c (main): Avoid infinite loop while detaching/killing
6187 after a longjmp.
6188
06db92f0
DE
61892012-01-09 Doug Evans <dje@google.com>
6190
6191 * server.c (start_inferior): Set last_ptid in --wrapper case.
6192
32d92999
YQ
61932012-01-06 Yao Qi <yao@codesourcery.com>
6194
6195 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
6196 defined.
6197 [IN_PROCESS_AGENT] (debug_agent): New global variable.
6198
5e0a92a9
YQ
61992012-01-04 Yao Qi <yao@codesourcery.com>
6200
6201 * tracepoint.c (cmd_qtdp): Print debug message
6202 for static tracepoint.
6203
ae639e8c
YQ
62042012-01-04 Yao Qi <yao@codesourcery.com>
6205
6206 * tracepoint.c (trace_vdebug): Differentiate debug message
6207 between gdbserver and IPA.
6208
f72429c5
YQ
62092012-01-03 Yao Qi <yao@codesourcery.com>
6210
6211 * tracepoint.c (tracepoint_was_hit): Don't collect for
6212 static tracepoint.
6213
12c3e59c
JB
62142012-01-02 Joel Brobecker <brobecker@adacore.com>
6215
6216 * terminal.h: Reformat copyright header.
6217
67827812
JB
62182012-01-02 Joel Brobecker <brobecker@adacore.com>
6219
6220 * server.c (gdbserver_version): Update copyright year.
6221 * gdbreplay.c (gdbreplay_version): Likewise.
6222
3e52c33d
JK
62232011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
6224
6225 * linux-low.c (linux_create_inferior): Put empty if clause for write.
6226
6227 Revert:
6228 2011-12-18 Hui Zhu <teawater@gmail.com>
6229 * linux-low.c (linux_create_inferior): Save return value to ret.
6230
66f1260e
HZ
62312011-12-18 Hui Zhu <teawater@gmail.com>
6232
6233 * linux-low.c (linux_create_inferior): Save return value to ret.
6234
e77616d7
DE
62352011-12-16 Doug Evans <dje@google.com>
6236
e7b06c57
DE
6237 * linux-low.c (linux_create_inferior): If stdio connection,
6238 redirect stdin from /dev/null, stdout to stderr.
6239 * remote-utils.c (remote_is_stdio): New static global.
6240 (remote_connection_is_stdio): New function.
6241 (remote_prepare): Handle stdio connection.
6242 (remote_open): Ditto.
6243 (remote_close): Don't close stdin for stdio connections.
6244 (read_prim,write_prim): New functions. Replace all calls to
6245 read/write to these.
6246 * server.c (main): Watch for "-" argument. Move call to
6247 remote_prepare before start_inferior.
6248 * server.h (STDIO_CONNECTION_NAME): New macro.
6249 (remote_connection_is_stdio): Declare.
6250
e77616d7
DE
6251 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
6252 in debugging output.
6253
82067193
YQ
62542011-12-15 Yao Qi <yao@codesourcery.com>
6255
6256 * tracepoint.c: Include sys/syscall.h.
6257 (gdb_ust_thread): Remove preprocessor conditional.
6258
82bfbe7e
PA
62592011-12-14 Pedro Alves <pedro@codesourcery.com>
6260
6261 * linux-low.c (linux_detach_one_lwp): Call
6262 the_low_target.prepare_to_resume before detaching.
6263
712c6575
YQ
62642011-12-14 Yao Qi <yao@codesourcery.com>
6265
6266 * tracepoint.c (gdb_ust_thread): Don't ignore return value
6267 of write.
6268
d54d1edf
YQ
62692011-12-14 Yao Qi <yao@codesourcery.com>
6270
6271 * i386-low.c (i386_low_stopped_data_address): Initialize local
6272 variable `control'.
6273
6210a125
PA
62742011-12-13 Pedro Alves <pedro@codesourcery.com>
6275
6276 PR remote/13492
6277
6278 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
6279 DR_CONTROL unless necessary. Extend comments.
6280 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
6281 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
6282
2ece8244
YQ
62832011-12-13 Yao Qi <yao@codesourcery.com>
6284
6285 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
6286 macros.
6287 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
6288
784867a5
JK
62892011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
6290
6291 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
6292 Print new debug message for such case.
6293
6bf36717
JK
62942011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
6295
6296 Fix overlapping memcpy.
6297 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
6298 the read_inferior_memory transfer.
6299 (delete_fast_tracepoint_jump): New variable buf. Use it for the
6300 write_inferior_memory transfer.
6301 (set_fast_tracepoint_jump): New variable buf. Use it for the
6302 read_inferior_memory and write_inferior_memory transfers.
6303 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
6304 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
6305 Use it for the write_inferior_memory transfer.
6306 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
6307 buffers.
6308
50275556
MR
63092011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
6310
6311 * linux-low.c (fetch_register, store_register): Make code
6312 consistent, fix formatting.
6313
7325beb4
MR
63142011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
6315
6316 * linux-low.c (usr_store_inferior_registers): Factor out code
6317 to handle individual registers into...
6318 (store_register): ... this new function.
6319
c642a434
UW
63202011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
6321
6322 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
6323 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
6324 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
6325 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
6326 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
6327 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
6328 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
6329 (srv_xmlfiles): Add new XML files.
6330
6331 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
6332 and <sys/uio.h>.
6333 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
6334 (init_registers_s390_linux32v1): Add prototype.
6335 (init_registers_s390_linux32v2): Likewise.
6336 (init_registers_s390_linux64v1): Likewise.
6337 (init_registers_s390_linux64v2): Likewise.
6338 (init_registers_s390x_linux64v1): Likewise.
6339 (init_registers_s390x_linux64v2): Likewise.
6340 (s390_num_regs): Increment to 52.
6341 (s390_regmap): Add orig_r2 register.
6342 (s390_num_regs_3264): Increment to 68.
6343 (s390_regmap_3264): Add orig_r2 register.
6344 (s390_collect_ptrace_register): Handle orig_r2 register.
6345 (s390_supply_ptrace_register): Likewise.
6346 (s390_fill_last_break): New function.
6347 (s390_store_last_break): Likewise.
6348 (s390_fill_system_call): New function.
6349 (s390_store_system_call): Likewise.
6350 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
6351 register sets.
6352 (s390_check_regset): New function.
6353 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
6354 NT_S390_SYSTEM_CALL regsets and use appropriate description.
6355 Update target_regsets for available register sets.
6356
2268b414
JK
63572011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
6358 Jan Kratochvil <jan.kratochvil@redhat.com>
6359
6360 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
6361 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
6362 New.
6363 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
6364 * linux-low.h (struct process_info_private): New member r_debug.
6365 * server.c (handle_qxfer_libraries): Call
6366 the_target->qxfer_libraries_svr4.
6367 (handle_qxfer_libraries_svr4): New function.
6368 (qxfer_packets): New entry "libraries-svr4".
6369 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
6370 * target.h (struct target_ops): New member qxfer_libraries_svr4.
6371 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
6372 PACKET_qXfer_libraries_svr4.
6373
d6db1fab
UW
63742011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
6375
6376 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
6377 PSW address/mask between 8-byte and 16-byte formats.
6378 (s390_supply_ptrace_register): Likewise.
6379 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
6380 basic addressing mode bit.
6381
242f5f1c
SS
63822011-11-24 Stan Shebs <stan@codesourcery.com>
6383
6384 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
6385
f196051f
SS
63862011-11-17 Stan Shebs <stan@codesourcery.com>
6387
6388 * tracepoint.c (struct tracepoint): New field traceframe_usage.
6389 (tracing_start_time): New global.
6390 (tracing_stop_time): New global.
6391 (tracing_user_name): New global.
6392 (tracing_notes): New global.
6393 (tracing_stop_note): New global.
6394 (cmd_qtstart): Set traceframe_usage, start_time.
6395 (stop_tracing): Set stop_time.
6396 (cmd_qtstatus): Report additional status.
6397 (cmd_qtp): New function.
6398 (handle_tracepoint_query): Call it.
6399 (cmd_qtnotes): New function.
6400 (handle_tracepoint_general_set): Call it.
6401 (get_timestamp): Rename from tsv_get_timestamp.
6402
405f8e94
SS
64032011-11-14 Stan Shebs <stan@codesourcery.com>
6404 Kwok Cheung Yeung <kcy@codesourcery.com>
6405
6406 * linux-x86-low.c (small_jump_insn): New.
6407 (i386_install_fast_tracepoint_jump_pad): Add arguments for
6408 trampoline and error message, build a trampoline and issue a small
6409 jump instruction to it.
6410 (x86_install_fast_tracepoint_jump_pad): Add arguments for
6411 trampoline and error message.
6412 (x86_get_min_fast_tracepoint_insn_len): New.
6413 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
6414 * linux-low.h (struct linux_target_ops): Add arguments to
6415 install_fast_tracepoint_jump_pad operation, add new operation.
6416 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
6417 arguments.
6418 (linux_get_min_fast_tracepoint_insn_len): New function.
6419 (linux_target_op): Add new operation.
6420 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
6421 (gdb_trampoline_buffer_end): Ditto.
6422 (gdb_trampoline_buffer_error): Ditto.
6423 (struct ipa_sym_addresses): Add fields for new IPA variables.
6424 (symbol_list): Add entries for new IPA variables.
6425 (struct tracepoint): Add fields to hold the address range of the
6426 trampoline used by the tracepoint.
6427 (trampoline_buffer_head): New static variable.
6428 (trampoline_buffer_tail): Ditto.
6429 (claim_trampoline_space): New function.
6430 (have_fast_tracepoint_trampoline_buffer): New function.
6431 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
6432 structure.
6433 (install_fast_tracepoint): Ditto, also add error buffer argument.
6434 (cmd_qtminftpilen): New function.
6435 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
6436 (fast_tracepoint_from_trampoline_address): New function.
6437 (fast_tracepoint_collecting): Handle trampoline as part of jump
6438 pad space.
6439 (set_trampoline_buffer_space): New function.
6440 (initialize_tracepoint): Initialize new IPA variables.
6441 * target.h (struct target_ops): Add arguments to
6442 install_fast_tracepoint_jump_pad operation, add new
6443 get_min_fast_tracepoint_insn_len operation.
6444 (target_get_min_fast_tracepoint_insn_len): New.
6445 (install_fast_tracepoint_jump_pad): Add arguments.
6446 * server.h (IPA_BUFSIZ): Define.
6447 * linux-i386-ipa.c: Include extra header files.
6448 (initialize_fast_tracepoint_trampoline_buffer): New function.
6449 (initialize_low_tracepoint): Call it.
6450 * server.h (set_trampoline_buffer_space): Declare.
6451 (claim_trampoline_space): Ditto.
6452 (have_fast_tracepoint_trampoline_buffer): Ditto.
6453
1e4d1764
YQ
64542011-11-14 Yao Qi <yao@codesourcery.com>
6455
6456 * server.c (handle_query): Handle InstallInTrace for qSupported.
6457 * tracepoint.c (add_tracepoint): Sort list.
6458 (install_tracepoint, download_tracepoint): New.
6459 (cmd_qtdp): Call them to install and download tracepoints.
6460 (sort_tracepoints): Removed.
6461 (cmd_qtstart): Update.
6462
5c73ff4e
YQ
64632011-11-14 Yao Qi <yao@codesourcery.com>
6464
6465 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
6466 * mem-break.h: Declare.
6467 * tracepoint.c (cmd_qtstart): Move some code to ...
6468 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
6469 New.
6470 (download_tracepoints): Move some code to ...
6471 (download_tracepoint_1): ... here. New.
6472
86a30030
YQ
64732011-11-08 Yao Qi <yao@codesourcery.com>
6474
6475 * remote-utils.c (relocate_instruction): A comment fix.
6476
8d26e50c
JB
64772011-11-07 Joel Brobecker <brobecker@adacore.com>
6478
6479 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
6480 (i386_dr_low_get_control, i386_dr_low_get_status): Use
6481 dr_status_mirror and dr_control_mirror from debug_reg_state.
6482 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
6483 (i386_initial_stuff): Remove use of deleted globals.
6484 (i386_get_thread_context, i386_set_thread_context,
6485 i386_thread_added): Use dr_status_mirror and dr_control_mirror
6486 from debug_reg_state.
6487
a59306a3
YQ
64882011-11-05 Yao Qi <yao@codesourcery.com>
6489
6490 * tracepoint.c (gdb_collect): Loop over tracepoints of same
6491 address as TPOINT's.
6492
3065dfb6
SS
64932011-11-02 Stan Shebs <stan@codesourcery.com>
6494
6495 * tracepoint.c (agent_mem_read_string): New function.
6496 (eval_agent_expr): Call it for tracenz.
6497 * server.c (handle_query): Report support for tracenz.
6498
fd0d8c7c
YQ
64992011-11-02 Yao Qi <yao@codesourcery.com>
6500
6501 * tracepoint.c (cmd_qtstart): Remove unused local variables.
6502
609086b1
YQ
65032011-11-02 Yao Qi <yao@codesourcery.com>
6504
6505 * target.h: Fix a typo in comment.
6506
b9fd1791
PA
65072011-10-31 Pedro Alves <pedro@codesourcery.com>
6508
6509 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
6510 clobber the breakpoints' shadows with fast tracepoint jumps.
6511 * mem-break.h (check_mem_write): Add `myaddr' parameter.
6512 * target.c (write_inferior_memory): Also pass MYADDR down to
6513 check_mem_write.
6514
03583c20
UW
65152011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
6516
6517 * configure.ac: Check support for personality routine.
6518 * configure: Regenerate.
6519 * config.in: Likewise.
6520 * linux-low.c: Include <sys/personality.h>.
6521 Define ADDR_NO_RANDOMIZE if necessary.
6522 (linux_create_inferior): Disable address space randomization when
6523 forking inferior, if requested.
6524 (linux_supports_disable_randomization): New function.
6525 (linux_target_ops): Install it.
6526 * server.h (disable_randomization): Declare.
6527 * server.c (disable_randomization): New global variable.
6528 (handle_general_set): Handle QDisableRandomization.
6529 (handle_query): Likewise for qSupported.
6530 (main): Support --disable-randomization and --no-disable-randomization
6531 command line arguments.
6532 * target.h (struct target_ops): Add supports_disable_randomization.
6533 (target_supports_disable_randomization): New macro.
6534
723b724b
MF
65352011-09-29 Mike Frysinger <vapier@gentoo.org>
6536
6537 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
6538 ifdef check.
6539 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
6540 [!PT_GETDSBT] (target_loadmap): New definition.
6541 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
6542 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
6543 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
6544 and PT_GETDSBT to LINUX_LOADMAP.
6545 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
6546 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
6547
55329a5c 65482011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
6549
6550 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
6551 (arm_linux_hwbp_cap): New static variable.
6552 (arm_linux_get_hwbp_cap): Replace by ...
6553 (arm_linux_init_hwbp_cap): ... this new function.
6554 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
6555 (arm_linux_get_hw_watchpoint_count): Likewise.
6556 (arm_linux_get_hw_watchpoint_max_length): Likewise.
6557 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
6558 (arm_prepare_to_resume): Use perror_with_name instead of error.
6559
55329a5c 65602011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
6561
6562 * linux-arm-low.c: Include <signal.h>.
6563 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
6564 (struct arm_linux_hwbp_cap): New data type.
6565 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
6566 (struct arm_linux_hw_breakpoint): New data type.
6567 (MAX_BPTS, MAX_WPTS): Define.
6568 (struct arch_process_info, struct arch_lwp_info): New data types.
6569 (arm_linux_get_hwbp_cap): New function.
6570 (arm_linux_get_hw_breakpoint_count): Likewise.
6571 (arm_linux_get_hw_watchpoint_count): Likewise.
6572 (arm_linux_get_hw_watchpoint_max_length): Likewise.
6573 (arm_hwbp_control_initialize): Likewise.
6574 (arm_hwbp_control_is_enabled): Likewise.
6575 (arm_hwbp_control_is_initialized): Likewise.
6576 (arm_hwbp_control_disable): Likewise.
6577 (arm_linux_hw_breakpoint_equal): Likewise.
6578 (arm_linux_hw_point_initialize): Likewise.
6579 (struct update_registers_data): New data structure.
6580 (update_registers_callback: New function.
6581 (arm_insert_point): Likewise.
6582 (arm_remove_point): Likewise.
6583 (arm_stopped_by_watchpoint): Likewise.
6584 (arm_stopped_data_address): Likewise.
6585 (arm_new_process): Likewise.
6586 (arm_new_thread): Likewise.
6587 (arm_prepare_to_resume): Likewise.
6588 (the_low_target): Register arm_insert_point, arm_remove_point,
6589 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
6590 arm_new_thread, and arm_prepare_to_resume.
6591
6b9801d4
SS
65922011-09-15 Stan Shebs <stan@codesourcery.com>
6593
6594 * server.h (struct emit_ops): Add compare-goto fields.
6595 * tracepoint.c (gdb_agent_op_sizes): New table.
6596 (emit_eq_goto): New function.
6597 (emit_ne_goto): New function.
6598 (emit_lt_goto): New function.
6599 (emit_le_goto): New function.
6600 (emit_gt_goto): New function.
6601 (emit_ge_goto): New function.
6602 (is_goto_target): New function.
6603 (compile_bytecodes): Recognize special cases of compare-goto
6604 combinations and call specialized emitters for them.
6605 * linux-x86-low.c (amd64_emit_eq_goto): New function.
6606 (amd64_emit_ne_goto): New function.
6607 (amd64_emit_lt_goto): New function.
6608 (amd64_emit_le_goto): New function.
6609 (amd64_emit_gt_goto): New function.
6610 (amd64_emit_ge_goto): New function.
6611 (amd64_emit_ops): Add the new functions.
6612 (i386_emit_eq_goto): New function.
6613 (i386_emit_ne_goto): New function.
6614 (i386_emit_lt_goto): New function.
6615 (i386_emit_le_goto): New function.
6616 (i386_emit_gt_goto): New function.
6617 (i386_emit_ge_goto): New function.
6618 (i386_emit_ops): Add the new functions.
6619
bf15cbda
SS
66202011-09-08 Stan Shebs <stan@codesourcery.com>
6621
6622 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
6623 (i386_emit_epilogue): Restore %ebx.
6624
943ca1dd
JZ
66252011-08-31 Jie Zhang <jzhang918@gmail.com>
6626
6627 * server.c (step_thread): Remove definition.
6628 (process_serial_event): Don't handle Hs.
6629 * server.h (step_thread): Remove declaration.
6630 * target.c (set_desired_inferior): Remove use of step_thread.
6631
e3deef73
LM
66322011-08-24 Luis Machado <lgustavo@codesourcery.com>
6633
6634 * linux-low.c: Include linux-procfs.h.
6635 (linux_attach_lwp_1): Update comments.
6636 (linux_attach): Scan for existing threads when attaching to a
6637 process that is the tgid.
6638 * Makefile.in: Update dependencies.
6639
13da1c97
LM
66402011-08-24 Luis Machado <lgustavo@codesourcery.com>
6641
6642 * configure.srv: Add linux-procfs.o dependencies.
6643
881127c9
YQ
66442011-08-14 Yao Qi <yao@codesourcery.com>
6645
6646 * target.h (struct target_ops): Fix indent.
6647 * win32-low.c (win32_target_ops): Fix comment.
6648
58dbd541
YQ
66492011-08-14 Andrew Jenner <andrew@codesourcery.com>
6650 Yao Qi <yao@codesourcery.com>
6651
6652 * Makefile.in (clean): Remove tic6x-*.c files.
6653 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
6654 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
6655 (tic6x-c64xp-linux.c): Likewise.
6656 * configure.srv: Add support for tic6x-*-uclinux.
6657 * linux-tic6x-low.c: New.
6658 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
6659
78d85199
YQ
66602011-08-14 Andrew Stubbs <ams@codesourcery.com>
6661 Yao Qi <yao@codesourcery.com>
6662
6663 * target.h (struct target_ops): Add read_loadmap.
6664 * linux-low.c (struct target_loadseg): New type.
6665 (struct target_loadmap): New type.
6666 (linux_read_loadmap): New function.
6667 (linux_target_ops): Add linux_read_loadmap.
6668 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
6669 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
6670 to NULL.
78d85199 6671
a959a88d
EZ
66722011-08-05 Eli Zaretskii <eliz@gnu.org>
6673
6674 * win32-low.c: Include <stdint.h>.
6675
1ced966e
PA
66762011-07-22 Pedro Alves <pedro@codesourcery.com>
6677
6678 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
6679 to the inferior here.
6680 (i386_remove_aligned_watchpoint): Ditto.
6681 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
6682 fit part of the watchpoint in the debug registers.
6683 (i386_update_inferior_debug_regs): New.
6684 (i386_low_insert_watchpoint): Work on a local mirror of the debug
6685 registers, and only update the inferior on success.
6686 (i386_low_remove_watchpoint): Ditto.
6687
d26e3629
KY
66882011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
6689
6690 * linux-low.c (compare_ints, unique, list_threads, show_process,
6691 linux_core_of_thread): Delete.
6692 (linux_target_ops): Change linux_core_of_thread to
6693 linux_common_core_of_thread.
6694 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
6695 * utils.c (malloc_failure): Change type of argument.
6696 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
6697 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
6698 common/linux-osdata.c, common/ptid.c and common/buffer.c.
6699 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
6700 (IPA_OBJS): Add common-utils-ipa.o.
6701 (ptid_h, linux_osdata_h): New macros.
6702 (server_h): Add common/common-utils.h, common/xml-utils.h,
6703 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
6704 common/ptid.h.
6705 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
6706 ptid.o, buffer.o): New rules.
6707 (linux-low.o): Add common/linux-osdata.h as a dependency.
6708 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
6709 * configure.ac: Add AC_HEADER_DIRENT check.
6710 * config.in: Regenerate.
6711 * configure: Regenerate.
6712 * remote-utils.c (xml_escape_text): Delete.
6713 (buffer_grow, buffer_free, buffer_init, buffer_finish,
6714 buffer_xml_printf): Move to common/buffer.c.
6715 * server.c (main): Remove call to initialize_inferiors.
6716 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
6717 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
6718 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
6719 internal_error, gdb_assert, gdb_assert_fail): Delete.
6720 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
6721 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
6722 common/buffer.h.
6723 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
6724 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
6725 initialize_inferiors): Delete.
6726
2275a1a7
PA
67272011-07-20 Pedro Alves <pedro@codesourcery.com>
6728
6729 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
6730 symbol error.
6731
0a5b1e09
PA
67322011-05-31 Pedro Alves <pedro@codesourcery.com>
6733
6734 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
6735 assertion.
6736 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
6737
6938fd34
YQ
67382011-05-26 Yao Qi <yao@codesourcery.com>
6739
6740 * Makefile.in (thread-db.o): Track dependence to
6741 common/gdb_thread_db.h.
6742 * thread-db.c: include gdb_thread_db.h from right place.
6743
b481f9e0
TT
67442011-05-16 Adrian Cornish <gnu@bluedreamer.com>
6745
6746 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
6747 __FILE__ and __LINE__ to internal_error.
6748
98a5dd13
DE
67492011-05-13 Doug Evans <dje@google.com>
6750
6751 * thread-db.c (try_thread_db_load_from_sdir): New function.
6752 (try_thread_db_load_from_dir): New function.
6753 (thread_db_load_search): Handle $sdir, ignore $pdir.
6754 Remove trying of system directories if search of
6755 libthread-db-search-path fails, that is now done via $sdir.
6756
d248b706
KY
67572011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
6758
6759 * server.c (handle_query): Add EnableDisableTracepoints to the list
6760 of supported features.
43aaf8b6 6761 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 6762 tracepoints.
43aaf8b6
PA
6763 (cmd_qtenable_disable): New.
6764 (cmd_qtstart): Install tracepoints even if disabled.
6765 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
6766 receiving a QTEnable or QTDisable packet.
6767 (gdb_collect): Skip data collection if fast tracepoint is disabled.
6768 (ust_marker_to_static_tracepoint): Do not ignore disabled static
6769 tracepoints.
6770 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 6771
84e578fb
DE
67722011-05-10 Doug Evans <dje@google.com>
6773
6774 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
6775
71f55dd8
DE
67762011-05-04 Doug Evans <dje@google.com>
6777
6778 * linux-low.c (linux_join): Skip process lookup.
6779 * spu-low.c (spu_join): Ditto.
6780 * server.c (join_inferiors_callback): Delete.
6781 (process_serial_event): For 'D' packet (detach) call join_inferior
6782 directly.
6783
4d393d60
JM
67842011-05-04 Joseph Myers <joseph@codesourcery.com>
6785
6786 * README: Don't mention xscale*-*-linux*.
6787 * configure.srv (xscale*-*-linux*): Don't handle target.
6788
b00ad6ff
NF
67892011-04-27 Nathan Froyd <froydnj@codesourcery.com>
6790
6791 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
6792 casting pointers.
6793 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
6794 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
6795 (i386_emit_void_call_2): Likewise.
6796
af96c192
YQ
67972011-04-26 Yao Qi <yao@codesourcery.com>
6798
43aaf8b6
PA
6799 * linux-low.c: Move common macros to linux-ptrace.h.
6800 Include linux-ptrace.h.
af96c192
YQ
6801 * Makefile.in (linux_ptrace_h): New.
6802 (linux-low.o): Depends on linux-ptrace.h.
6803
03f2bd59
JK
68042011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
6805
6806 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
6807 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
6808 (remote_prepare): New function with most of the TCP code from ...
6809 (remote_open): ... here. Detect PORT here unconditionally. Move also
6810 setting transport_is_reliable.
6811 * server.c (run_once): New variable.
6812 (gdbserver_usage): Document it.
6813 (main): Set run_once for `--once'. Call remote_prepare. Exit after
6814 the first run if RUN_ONCE.
6815 * server.h (run_once, remote_prepare): New declarations.
6816
7a9dd1b2
TT
68172011-04-19 Tom Tromey <tromey@redhat.com>
6818
6819 * win32-low.c (handle_load_dll): Remove duplicate "the".
6820
81239425
PM
68212011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
6822
6823 Remove support for old Cygwin 1.5 versions.
6824 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
6825 function to avoid warning.
6826 (win32_add_one_solib): Use cygwin_conv_path function to avoid
6827 warning.
6828
9e0627f1
PM
68292011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
6830
6831 * gdbserver/server.h (Macro _): Define it if not available.
6832
588eebee
MS
68332011-03-14 Michael Snyder <msnyder@vmware.com>
6834
348af9f7 6835 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 6836
43f70d4c
JB
68372011-03-10 Joel Brobecker <brobecker@adacore.com>
6838
6839 * Makefile.in (maintainer-clean realclean distclean): Remove
6840 "make ... subdir_do" command.
6841
348af9f7
MS
68422011-03-10 Michael Snyder <msnyder@vmware.com>
6843
6844 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
6845
6846 * server.c (handle_v_run): Free alloced buffer on early return.
6847
e637a4f5
YQ
68482011-03-09 Yao Qi <yao@codesourcery.com>
6849
6850 Revert:
6851 2011-03-04 Yao Qi <yao@codesourcery.com>
6852
6853 * Makefile.in: Remove GNU make feature --directory.
6854
6855 2011-03-05 Yao Qi <yao@codesourcery.com>
6856
6857 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
6858 (subdir_do): New make target. Copied from gdb/Makefile.
6859 (maintainer-clean, realclean, distclean, clean): Call corresponding
6860 make targets in common/Makefile.
6861
6862 2011-02-11 Yao Qi <yao@codesourcery.com>
6863
6864 * configure.ac: Call AC_PROG_RANLIB.
6865 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
6866 * configure: Regenerate.
6867
e6edda56
JK
68682011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
6869
6870 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
6871
e5141119
JB
68722011-03-06 Yao Qi <yao@codesourcery.com>
6873
6874 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
6875
64794aa4
JB
68762011-03-05 Yao Qi <yao@codesourcery.com>
6877
6878 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
6879 (subdir_do): New make target. Copied from gdb/Makefile.
6880 (maintainer-clean, realclean, distclean, clean): Call corresponding
6881 make targets in common/Makefile.
6882
7a762829
YQ
68832011-03-04 Yao Qi <yao@codesourcery.com>
6884
6885 * Makefile.in: Remove GNU make feature --directory.
6886
348af9f7
MS
68872011-03-04 Michael Snyder <msnyder@vmware.com>
6888
6889 * server.c (queue_stop_reply): Call xmalloc not malloc.
6890
68912011-03-02 Michael Snyder <msnyder@vmware.com>
6892
6893 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
6894
9f72fee2
MS
68952011-02-28 Michael Snyder <msnyder@vmware.com>
6896
588eebee
MS
6897 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
6898 (cmd_qtframe): Ditto.
6899 (cmd_qtbuffer): Ditto.
6900 (cmd_bigqtbuffer): Ditto.
6901
9f72fee2
MS
6902 * utils.c (decimal2str): Initialize 'width' to nine, then
6903 don't mess with it.
6904
8040bd49
UW
69052011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
6906
6907 * hostio.c (require_data): Free *data, not data.
6908
7e52cbd0
JK
69092011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6910
6911 * hostio.c (require_data): Use free, not xfree.
6912
9130f83e
MS
69132011-02-27 Michael Snyder <msnyder@vmware.com>
6914
4b812f4e
MS
6915 * server.c (handle_query): Discard unused value.
6916
9130f83e
MS
6917 * hostio.c (require_data): Free malloc memory before returning
6918 error.
6919
69d37113
MS
69202011-02-26 Michael Snyder <msnyder@vmware.com>
6921
6922 * linux-low.c (list_threads): Call closedir for dirent.
6923
35f5825a
MS
69242011-02-27 Michael Snyder <msnyder@vmware.com>
6925
2a589cef
MS
6926 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
6927 a case statement falls through.
6928
0adea5f7
MS
6929 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
6930
35f5825a
MS
6931 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
6932 in comparison.
6933
238f1c74
MS
69342011-02-26 Michael Snyder <msnyder@vmware.com>
6935
6936 * utils.c (decimal2str): Eliminate dead code and dead param.
6937 (pulongest): Drop dead param from call to decimal2str.
6938 (plongest): Ditto.
6939
633ff500
JB
69402011-02-24 Joel Brobecker <brobecker@adacore.com>
6941
6942 Revert the following patch (not approved yet):
6943 2011-02-21 Hui Zhu <teawater@gmail.com>
6944 * tracepoint.c (tp_printf): New function.
6945 (eval_agent_expr): Handle gdb_agent_op_printf.
6946
f9c6ff72
HZ
69472011-02-21 Hui Zhu <teawater@gmail.com>
6948
6949 * tracepoint.c (tp_printf): New function.
6950 (eval_agent_expr): Handle gdb_agent_op_printf.
6951
94d5e490
TT
69522011-02-18 Tom Tromey <tromey@redhat.com>
6953
6954 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
6955 (tracepoint.o): Likewise.
6956 * tracepoint.c (enum gdb_agent_op): Use ax.def.
6957 (gdb_agent_op_names): Likewise.
6958
c7f96d2b
TT
69592011-02-18 Tom Tromey <tromey@redhat.com>
6960
6961 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
6962 gdb_agent_op_rot>: New constants.
6963 (gdb_agent_op_names): Add pick and roll.
6964 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
6965 cases.
6966
0feedb2c
JK
69672011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6968
6969 * aclocal.m4: Regenerated with aclocal-1.11.1.
6970
b3b9301e
PA
69712011-02-14 Pedro Alves <pedro@codesourcery.com>
6972
6973 * server.c (handle_qxfer_traceframe_info): New.
6974 (qxfer_packets): Register "traceframe-info".
6975 (handle_query): Report support for qXfer:traceframe-info:read+.
6976 * tracepoint.c (match_blocktype): New.
6977 (traceframe_find_block_type): Rename to ...
6978 (traceframe_walk_blocks): ... this. Add callback filter argument,
6979 and use it.
6980 (traceframe_find_block_type): New, reimplemented on top of
6981 traceframe_walk_blocks.
6982 (build_traceframe_info_xml): New.
6983 (traceframe_read_info): New.
6984 * server.h (traceframe_read_info): Declare.
6985
4f3e6fb7
YQ
69862011-02-11 Yao Qi <yao@codesourcery.com>
6987
6988 * configure.ac: Call AC_PROG_RANLIB.
6989 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
6990 * configure: Regenerate.
6991
764880b7
PA
69922011-02-07 Pedro Alves <pedro@codesourcery.com>
6993
6994 * server.c (gdb_read_memory): Change return semantics to allow
6995 partial transfers.
6996 (handle_search_memory_1): Adjust.
6997 (process_serial_event) <'m' packet>: Handle partial transfers.
6998 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
6999
1c79eb8a
PA
70002011-01-28 Pedro Alves <pedro@codesourcery.com>
7001
7002 * regcache.c (init_register_cache): Initialize
7003 regcache->register_status.
7004 (free_register_cache): Release regcache->register_status.
7005 (regcache_cpy): Copy register_status.
7006 (registers_to_string): Print 'x's for unavailable registers.
7007 (supply_register): Mark the register's status valid or
7008 unavailable, depending on whether a buffer was passed in or not.
7009 (supply_register_zeroed): New.
7010 (supply_regblock): Mark the registers' status valid or
7011 unavailable, depending on whether a buffer was passed in or not.
7012 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
7013 (struct regcache): New `register_status' field.
7014 (supply_register_zeroed): Declare.
7015 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
7016 supply_register_zeroed, rather than passing a NULL buffer to
7017 supply_register.
7018 * tracepoint.c (fetch_traceframe_registers): Update comment.
7019
85724a0e
PA
70202011-01-28 Pedro Alves <pedro@codesourcery.com>
7021
7022 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
7023 buffer explicit.
7024
d08aafef
PA
70252011-01-25 Pedro Alves <pedro@codesourcery.com>
7026
7027 * server.h (decode_xfer_write): Change prototype.
7028 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
7029 and don't extract the annex here.
7030 * server.c (decode_xfer_read): Remove `annex' parameter,
7031 and don't extract the annex here.
7032 (decode_xfer): New.
7033 (struct qxfer): New.
7034 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
7035 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
7036 (handle_qxfer_statictrace): New functions, abstracted out from
7037 handle_query, and made to use the struct qxfer interface.
7038 (handle_threads_qxfer_proper): Rename to ...
7039 (handle_qxfer_threads_proper): ... this.
7040 (handle_threads_qxfer): Rename to ...
7041 (handle_qxfer_threads): ... this. Adjust.
7042 (qxfer_packets): New array.
7043 (handle_qxfer): New function.
7044 (handle_query): Use handle_qxfer.
7045
493e2a69
MS
70462011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
7047
7048 * gdbreplay.c: Shorten lines of >= 80 columns.
7049 * linux-low.c: Ditto.
7050 * linux-ppc-low.c: Ditto.
7051 * linux-s390-low.c: Ditto.
7052 * linux-sparc-low.c: Ditto.
7053 * linux-x86-low.c: Ditto.
7054 * linux-xtensa-low.c: Ditto.
7055 * mem-break.c: Ditto.
7056 * nto-low.c: Ditto.
7057 * regcache.h: Ditto.
7058 * remote-utils.c: Ditto.
7059 * server.c: Ditto.
7060 * server.h: Ditto.
7061 * thread-db.c: Ditto.
7062 * tracepoint.c: Ditto.
7063 * utils.c: Ditto.
7064 * win32-low.h: Ditto.
7065
44944448
JB
70662011-01-05 Joel Brobecker <brobecker@adacore.com>
7067
7068 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
7069 update.
7070
71ce852c
JB
70712011-01-01 Joel Brobecker <brobecker@adacore.com>
7072
7073 * server.c (gdbserver_version): Update copyright year in version
7074 output.
7075 * gdbreplay.c (gdbreplay_version): Ditto.
7076
eb826dc6
MF
70772010-12-29 Jie Zhang <jie.zhang@analog.com>
7078
7079 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
7080 * linux-bfin-low.c: New file.
7081 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
7082 PT_DATA_ADDR for BFIN targets.
7083 * Makefile.in (SFILES): Add linux-bfin-low.c.
7084 (clean): Remove reg-bfin.c.
7085 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
7086 * README: Mention supported Blackfin targets.
7087
39ab222a
MF
70882010-12-23 Mike Frysinger <vapier@gentoo.org>
7089
7090 * .gitignore: New file.
7091
a1f2ce7d
MF
70922010-11-16 Mike Frysinger <vapier@gentoo.org>
7093
7094 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
7095
f474844c
JZ
70962010-10-22 Jie Zhang <jie@codesourcery.com>
7097
7098 * Makefile.in: Add FLAGS_TO_PASS variable.
7099 (install): Remove dependency of install-only and recursively
7100 invoke make for install-only.
7101
f1048712
DE
71022010-10-04 Doug Evans <dje@google.com>
7103
7104 * Makefile.in (uninstall): Use $(DESTDIR).
7105
b53a1623
PA
71062010-09-24 Pedro Alves <pedro@codesourcery.com>
7107
e6ee044d
PA
7108 PR gdb/11842
7109
b53a1623
PA
7110 * linux-x86-low.c (compat_siginfo_from_siginfo)
7111 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
7112 si_code is < 0. Check for si_code == SI_TIMER before checking for
7113 si_code < 0.
7114
fa1bd1e4
JB
71152010-09-13 Joel Brobecker <brobecker@adacore.com>
7116
7117 * lynx-i386-low.c: New file.
7118 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
7119
47fac8f8
JB
71202010-09-13 Joel Brobecker <brobecker@adacore.com>
7121
7122 * lynx-low.c (ptrace_request_to_str): Remove handling for
7123 request values that have been removed in LynxOS 5.x.
7124
1adfc54d
JB
71252010-09-13 Joel Brobecker <brobecker@adacore.com>
7126
7127 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
7128 <ptrace.h>
7129
c2a66c29
NS
71302010-09-09 Nathan Sidwell <nathan@codesourcery.com>
7131
7132 * configure.ac: Add --enable-inprocess-agent option.
7133 * configure: Rebuilt.
7134
32fcada3
YQ
71352010-09-06 Yao Qi <yao@codesourcery.com>
7136
7137 * linux-low.c (linux_kill): Remove unused variable.
7138 (linux_stabilize_threads): Likewise.
7139 * server.c (start_inferior): Likewise.
7140 (queue_stop_reply_callback): Likewise.
7141 * tracepoint.c (do_action_at_tracepoint): Likewise.
7142
0cccb683
YQ
71432010-09-06 Yao Qi <yao@codesourcery.com>
7144
7145 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
7146 on return.
7147
423ec54c
JK
71482010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
7149
7150 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
7151
12ac6819
PA
71522010-09-06 Pedro Alves <pedro@codesourcery.com>
7153
7154 * Makefile.in (install-only): Replace $IPA_DEPFILES with
7155 "$(IPA_DEPFILES)".
7156
8ed54b31
JB
71572010-09-01 Joel Brobecker <brobecker@adacore.com>
7158
7159 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
7160 gdbserver/lynx-ppc-low.c: New files.
7161 * Makefile.in (lynx_low_h): New variable.
7162 (lynx-low.o, lynx-ppc-low.o): New rules.
7163 * configure.ac: On LynxOS, link with -lnetinet.
7164 * configure.srv: Add handling of powerpc-*-lynxos* targets.
7165 * configure: regenerate.
7166
bb0116a4
JB
71672010-09-01 Joel Brobecker <brobecker@adacore.com>
7168
7169 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
7170 * configure.ac: Add check for vasprintf and vsnprintf.
7171 * configure, config.in: Regenerate.
7172 * server.h (vasprintf, vsnprintf): Add conditional declarations.
7173
a778ab81 71742010-09-01 Joel Brobecker <brobecker@adacore.com>
7175
7176 * gdbreplay.c: Move include of alloca.h up, next to include of
7177 malloc.h.
7178 * server.h: Add include of malloc.h.
7179 * mem-break.c: Remove include of malloc.h.
7180 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
7181
8b034a19 71822010-09-01 Joel Brobecker <brobecker@adacore.com>
7183
7184 * Makefile.in (memmem.o): Build with -Wno-error.
7185
71862010-09-01 Joel Brobecker <brobecker@adacore.com>
7187
7188 * utils.c (xsnprintf): Make non-static.
7189 * server.h: Add xsnprintf declaration.
7190 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
7191 replace calls to snprintf by calls to xsnprintf throughout.
7192
71932010-09-01 Joel Brobecker <brobecker@adacore.com>
7194
7195 * configure.ac: Add configure check for alloca.
7196 * configure, config.in: Regenerate.
7197 * server.h: Include alloca.h if it exists.
7198 * gdbreplay.c: Include alloca.h if it exists.
7199
1a981360
PA
72002010-08-28 Pedro Alves <pedro@codesourcery.com>
7201
7202 * linux-low.c (__SIGRTMIN): Define if not already defined.
7203 (linux_create_inferior): Check for __ANDROID__ rather than
7204 __SIGRTMIN.
7205 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
7206 are already deferred.
7207 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
7208 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
7209 stopped and already has a pending signal to report.
7210 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
7211 a pending signal to report or is moving out of a jump pad.
7212 (linux_init_signals): Check for __ANDROID__ rather than
7213 __SIGRTMIN.
7214
b4d51a55
PA
72152010-08-28 Pedro Alves <pedro@codesourcery.com>
7216
7217 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
7218 debug_threads check. Avoid a linear search when not doing debug
7219 output.
7220
ec48365d
PA
72212010-08-27 Pedro Alves <pedro@codesourcery.com>
7222
7223 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
7224 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
7225 (struct file_handler) <fd>: Change type to gdb_fildes_t.
7226 (process_event): Change local fd's type to gdb_fildes_t.
7227 (create_file_handler): Adjust prototype.
7228 (delete_file_handler): Adjust prototype.
7229 (handle_file_event): Adjust prototype. Use pfildes.
7230 (create_file_event): Adjsut prototype.
7231 * remote-utils.c (remote_desc, listen_desc): Change type to
7232 gdb_fildes_t.
7233 * server.h: New gdb_fildes_t typedef.
7234 [USE_WIN32API]: Include winsock2.h.
7235 (delete_file_handler, add_file_handler): Adjust prototypes.
7236 (pfildes): Declare.
7237 * utils.c (pfildes): New.
7238
854d88f0
PA
72392010-08-27 Pedro Alves <pedro@codesourcery.com>
7240
7241 * configure.ac (build_warnings): Add -Wno-char-subscripts.
7242 * configure: Regenerate.
7243
0146f85b
PA
72442010-08-27 Pedro Alves <pedro@codesourcery.com>
7245
7246 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
7247 (linux_done_accessing_memory): ... this.
7248 (linux_target_ops): Adjust.
7249 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
7250 * nto-low.c (nto_target_ops): Adjust comment.
7251 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
7252 * spu-low.c (spu_target_ops): Adjust comment.
7253 * target.h (target_ops): Rename unprepare_to_access_memory field
7254 to done_accessing_memory.
7255 (unprepare_to_access_memory): Rename to ...
7256 (done_accessing_memory): ... this.
7257
90d74c30
PA
72582010-08-26 Pedro Alves <pedro@codesourcery.com>
7259
7260 * linux-low.c (linux_prepare_to_access_memory): New.
7261 (linux_unprepare_to_access_memory): New.
7262 (linux_target_ops): Install them.
7263 * server.c (read_memory): Rename to ...
7264 (gdb_read_memory): ... this. Use
7265 prepare_to_access_memory/prepare_to_access_memory.
7266 (write_memory): Rename to ...
7267 (gdb_write_memory): ... this. Use
7268 prepare_to_access_memory/prepare_to_access_memory.
7269 (handle_search_memory_1): Adjust.
7270 (process_serial_event): Adjust.
7271 * target.h (struct target_ops): New fields
7272 prepare_to_access_memory and unprepare_to_access_memory.
7273 (prepare_to_access_memory, unprepare_to_access_memory): New.
7274 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
7275 prepare_to_access_memory/prepare_to_access_memory.
7276 * nto-low.c (nto_target_ops): Adjust.
7277 * spu-low.c (spu_target_ops): Adjust.
7278 * win32-low.c (win32_target_ops): Adjust.
7279
fd467969
PA
72802010-08-26 Pedro Alves <pedro@codesourcery.com>
7281
7282 * Makefile.in (WARN_CFLAGS): Get it from configure.
7283 (WERROR_CFLAGS): New.
7284 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
7285 * configure.ac: Introduce --enable-werror, which adds -Werror to
7286 the compiler command line. Enabled by default. Disable with
7287 --disable-werror. Add -Wdeclaration-after-statement
7288 Wpointer-arith and -Wformat-nonliteral to warning flags.
7289 * configure: Regenerate.
7290
331e2f5f
PA
72912010-08-26 Pedro Alves <pedro@codesourcery.com>
7292
7293 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
7294
e581f2b4
PA
72952010-08-26 Pedro Alves <pedro@codesourcery.com>
7296
7297 * gdbreplay.c (remote_error): New.
7298 (gdbchar): New.
7299 (expect): Use gdbchar. Check for error reading from GDB.
7300 Clarify sync error output.
7301 (play): Check for errors writing to GDB.
7302 * linux-low.c (sigchld_handler): Really ignore `write' errors.
7303 * remote-utils.c (getpkt): Check for errors writing to the remote
7304 descriptor.
7305
3c11dd79
PA
73062010-08-25 Pedro Alves <pedro@codesourcery.com>
7307
7308 * linux-low.c (linux_wait_1): Move non-debugging code out of
7309 `debug_threads' control.
7310
d20a8ad9
PA
73112010-08-25 Pedro Alves <pedro@codesourcery.com>
7312
7313 * linux-low.c (linux_wait_1): Don't set last_status here.
7314 * server.c (push_event, queue_stop_reply_callback): Assert we're
7315 not pushing a TARGET_WAITKIND_IGNORE event.
7316 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
7317 (myresume, handle_target_event): Set the thread's last_resume_kind
7318 and last_status from the target returned status.
7319
964e4306
PA
73202010-08-25 Pedro Alves <pedro@codesourcery.com>
7321
7322 PR threads/10729
7323
7324 * linux-x86-low.c (update_debug_registers_callback): New.
7325 (i386_dr_low_set_addr): Use it.
7326 (i386_dr_low_get_addr): New.
7327 (i386_dr_low_set_control): Use update_debug_registers_callback.
7328 (i386_dr_low_get_control): New.
7329 (i386_dr_low_get_status): Adjust.
7330 * linux-low.c (linux_stop_lwp): New.
7331 * linux-low.h (linux_stop_lwp): Declare.
7332
7333 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
7334 argument instead of a i386_debug_reg_state.
7335 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
7336 a i386_debug_reg_state.
7337 (i386_insert_aligned_watchpoint): Adjust.
7338 (i386_remove_aligned_watchpoint): Adjust.
7339 (i386_low_stopped_data_address): Read the debug registers from the
7340 inferior instead of from the mirrors.
7341 * i386-low.h (struct i386_debug_reg_state): Extend comment.
7342 (i386_dr_low_get_addr): Declare.
7343 (i386_dr_low_get_control): Declare.
7344 (i386_dr_low_get_status): Change prototype.
7345
7346 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
7347 (i386_dr_low_get_addr): New.
7348 (i386_dr_low_get_control): New.
7349 (i386_dr_low_get_status): Adjust prototype. Return
7350 dr_status_mirror.
7351 (i386_initial_stuff): Clear dr_status_mirror and
7352 dr_control_mirror.
7353 (i386_get_thread_context): Adjust.
7354 (i386_set_thread_context): Adjust.
7355 (i386_thread_added): Adjust.
7356
5f21a75b
PA
73572010-08-24 Pedro Alves <pedro@codesourcery.com>
7358
7359 * linux-low.h (linux_thread_area): Delete declaration.
7360
3e4c1235
TS
73612010-08-11 Thomas Schwinge <thomas@codesourcery.com>
7362
7363 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
7364 after its termination.
7365
1971b033
PA
73662010-08-09 Pedro Alves <pedro@codesourcery.com>
7367
7368 * linux-low.c (gdb_wants_lwp_stopped): Delete.
7369 (gdb_wants_all_stopped): Delete.
7370 (linux_wait_1): Don't call them.
7371 * server.c (handle_v_cont): Tag all threads as want-stopped.
7372 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
7373 stopped as "client-wants-stopped".
7374
310444ac
PA
73752010-07-31 Pedro Alves <pedro@codesourcery.com>
7376
7377 * Makefile.in (signals_h): New.
7378 (server_h): Depend on it.
7379 (server.o): Don't depend on $(signals_def).
7380 (signals.o): Depend on $(signals_def).
7381
a19cae16
JK
73822010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
7383
7384 * Makefile.in (signals_def): New.
7385 (server_h): Append include/gdb/signals.h and signals_def.
7386 (server.o): Append signals_def.
7387
30d50328
JK
73882010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
7389
7390 * server.c (handle_target_event): Use target_signal_to_host for
7391 resume_info.sig initialization.
7392 * target.h (struct thread_resume) <sig>: New comment.
7393
5c3216e2
OS
73942010-07-20 Ozkan Sezer <sezeroz@gmail.com>
7395
c6f46ca0
OS
7396 * server.c (handle_query): strcpy() the returned string from paddress()
7397 instead of sprintf().
5c3216e2
OS
7398 * utils.c (paddress): Return phex_nz().
7399
6bd31874
JB
74002010-07-07 Joel Brobecker <brobecker@adacore.com>
7401
7402 * server.c (handle_v_cont): Call mourn_inferior if process
7403 just exited.
7404 (myresume): Likewise.
7405
0fb4aa4b
PA
74062010-07-01 Pedro Alves <pedro@codesourcery.com>
7407
7408 Static tracepoints, and integration with UST.
7409
7410 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
7411 * mem-break.c (uninsert_all_breakpoints)
7412 (reinsert_all_breakpoints): New.
7413 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
7414 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
7415 (gdb_agent_ust_loaded, helper_thread_id)
7416 (gdb_agent_helper_thread_id): New macros.
7417 (struct ipa_sym_addresses): Add addr_ust_loaded,
7418 addr_helper_thread_id, addr_cmd_buf.
7419 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
7420 (in_process_agent_loaded_ust): New.
7421 (write_e_ust_not_loaded): New.
7422 (maybe_write_ipa_ust_not_loaded): New.
7423 (struct collect_static_trace_data_action): New.
7424 (enum tracepoint_type) <static_tracepoint>: New.
7425 (struct tracepoint) <handle>: Mention static tracepoints.
7426 (struct static_tracepoint_ctx): New.
7427 (CMD_BUF_SIZE): New.
7428 (add_tracepoint_action): Handle static tracepoint actions.
7429 (unprobe_marker_at): New.
7430 (clear_installed_tracepoints): Handle static tracepoints.
7431 (cmd_qtdp): Handle static tracepoints.
7432 (probe_marker_at): New.
7433 (cmd_qtstart): Handle static tracepoints.
7434 (response_tracepoint): Handle static tracepoints.
7435 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
7436 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
7437 (get_context_regcache): Handle static tracepoints.
7438 (do_action_at_tracepoint): Handle static tracepoint actions.
7439 (traceframe_find_block_type): Handle static trace data blocks.
7440 (traceframe_read_sdata): New.
7441 (download_tracepoints): Download static tracepoint actions.
7442 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
7443 (GDB_PROBE_NAME): New.
7444 (ust_ops): New.
7445 (GET_UST_SYM): New.
7446 (USTF): New.
7447 (dlsym_ust): New.
7448 (ust_marker_to_static_tracepoint): New.
7449 (gdb_probe): New.
7450 (collect_ust_data_at_tracepoint): New.
7451 (gdb_ust_probe): New.
7452 (UNIX_PATH_MAX, SOCK_DIR): New.
7453 (gdb_ust_connect_sync_socket): New.
7454 (resume_thread, stop_thread): New.
7455 (run_inferior_command): New.
7456 (init_named_socket): New.
7457 (gdb_ust_socket_init): New.
7458 (cstr_to_hexstr): New.
7459 (next_st): New.
7460 (first_marker, next_marker): New.
7461 (response_ust_marker): New.
7462 (cmd_qtfstm, cmd_qtsstm): New.
7463 (unprobe_marker_at, probe_marker_at): New.
7464 (cmd_qtstmat, gdb_ust_thread): New.
7465 (gdb_ust_init): New.
7466 (initialize_tracepoint_ftlib): Call gdb_ust_init.
7467 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
7468 (ST_REGENTRY): New.
7469 (x86_64_st_collect_regmap): New.
7470 (X86_64_NUM_ST_COLLECT_GREGS): New.
7471 (AMD64_RIP_REGNUM): New.
7472 (supply_static_tracepoint_registers): New.
7473 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
7474 (ST_REGENTRY): New.
7475 (i386_st_collect_regmap): New.
7476 (i386_NUM_ST_COLLECT_GREGS): New.
7477 (supply_static_tracepoint_registers): New.
7478 * server.c (handle_query): Handle qXfer:statictrace:read.
7479 <qSupported>: Report support for StaticTracepoints, and
7480 qXfer:statictrace:read features.
7481 * server.h (traceframe_read_sdata)
7482 (supply_static_tracepoint_registers): Declare.
7483 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
7484 (unpack_varlen_hex): Include in IPA build.
7485 * Makefile.in (ustlibs, ustinc): New.
7486 (IPA_OBJS): Add remote-utils-ipa.o.
7487 ($(IPA_LIB)): Link -ldl and -lpthread.
7488 (UST_CFLAGS): New.
7489 (IPAGENT_CFLAGS): Add UST_CFLAGS.
7490 * config.in, configure: Regenerate.
7491
9e4344e5
PA
74922010-06-20 Ian Lance Taylor <iant@google.com>
7493 Pedro Alves <pedro@codesourcery.com>
7494
7495 * linux-x86-low.c (always_true): Delete.
7496 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
7497 trying to fool the compiler with always_true.
7498
c6beb2cb
PA
74992010-06-20 Pedro Alves <pedro@codesourcery.com>
7500
7501 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
7502 conditions in gdbserver.
7503
d2ed6730
UW
75042010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
7505
7506 * spu-low.c (spu_read_memory): Wrap around local store limit.
7507 (spu_write_memory): Likewise.
7508
4e29fb54
PA
75092010-06-15 Pedro Alves <pedro@codesourcery.com>
7510
7511 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
7512 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
7513 LONGEST uses.
7514 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
7515 uses.
7516 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
7517 uses with LONGEST uses.
7518
6a271cae
PA
75192010-06-14 Stan Shebs <stan@codesourcery.com>
7520 Pedro Alves <pedro@codesourcery.com>
7521
7522 Bytecode compiler.
7523
7524 * linux-x86-low.c: Include limits.h.
7525 (add_insns): New.
7526 (always_true): New.
7527 (EMIT_ASM): New.
7528 (EMIT_ASM32): New.
7529 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
7530 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
7531 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
7532 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
7533 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
7534 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
7535 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
7536 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
7537 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
7538 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
7539 (amd64_emit_void_call_2): New.
7540 (amd64_emit_ops): New.
7541 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
7542 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
7543 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
7544 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
7545 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
7546 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
7547 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
7548 (i386_emit_call, i386_emit_reg, i386_emit_pop)
7549 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
7550 (i386_emit_stack_adjust, i386_emit_int_call_1)
7551 (i386_emit_void_call_2): New.
7552 (i386_emit_ops): New.
7553 (x86_emit_ops): New.
7554 (the_low_target): Install x86_emit_ops.
7555 * server.h (struct emit_ops): New.
7556 (get_raw_reg_func_addr): Declare.
7557 (current_insn_ptr, emit_error): Declare.
7558 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
7559 (set_trace_state_variable_value): New defines.
7560 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
7561 addr_get_trace_state_variable_value and
7562 addr_set_trace_state_variable_value.
7563 (symbol_list): New fields for get_raw_reg,
7564 get_trace_state_variable_value and set_trace_state_variable_value.
7565 (condfn): New typedef.
7566 (struct tracepoint): New field `compiled_cond'.
7567 (do_action_at_tracepoint): Clear compiled_cond.
7568 (get_trace_state_variable_value, set_trace_state_variable_value):
7569 Export in the IPA.
7570 (condition_true_at_tracepoint): If there's a compiled condition,
7571 run that.
7572 (current_insn_ptr, emit_error): New globals.
7573 (struct bytecode_address): New.
7574 (get_raw_reg_func_addr): New.
7575 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
7576 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
7577 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
7578 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
7579 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
7580 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
7581 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
7582 (compile_tracepoint_condition, compile_bytecodes): New.
7583 * target.h (emit_ops): Forward declare.
7584 (struct target_ops): New field emit_ops.
7585 (target_emit_ops): New.
7586 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
7587 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
7588 * linux-low.c (linux_emit_ops): New.
7589 (linux_target_ops): Install it.
7590 * linux-low.h (struct linux_target_ops): New field emit_ops.
7591
92b72907
UW
75922010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
7593
7594 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
7595 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
7596
fa593d66
PA
75972010-06-01 Pedro Alves <pedro@codesourcery.com>
7598 Stan Shebs <stan@codesourcery.com>
7599
7600 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
7601 (all): Depend on $(extra_libraries).
7602 (install-only): Install the IPA.
7603 (IPA_OBJS, IPA_LIB): New.
7604 (clean): Remove the IPA lib.
7605 (IPAGENT_CFLAGS): New.
7606 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
7607 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
7608 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
7609 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
7610 * configure.ac: Check for atomic builtins support in the compiler.
7611 (IPA_DEPFILES, extra_libraries): Define.
7612 * configure.srv (ipa_obj): Add description.
7613 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
7614 (i[34567]86-*-linux*): Set ipa_obj.
7615 (x86_64-*-linux*): Set ipa_obj.
7616 * linux-low.c (stabilizing_threads): New.
7617 (supports_fast_tracepoints): New.
7618 (linux_detach): Stabilize threads before detaching.
7619 (handle_tracepoints): Handle internal tracing breakpoints. Assert
7620 the lwp is either not stabilizing, or is moving out of a jump pad.
7621 (linux_fast_tracepoint_collecting): New.
7622 (maybe_move_out_of_jump_pad): New.
7623 (enqueue_one_deferred_signal): New.
7624 (dequeue_one_deferred_signal): New.
7625 (linux_wait_for_event_1): If moving out of a jump pad, defer
7626 pending signals to later.
7627 (linux_stabilize_threads): New.
7628 (linux_wait_1): Check if threads need moving out of jump pads, and
7629 do it if so.
7630 (stuck_in_jump_pad_callback): New.
7631 (move_out_of_jump_pad_callback): New.
7632 (lwp_running): New.
7633 (linux_resume_one_lwp): Handle moving out of jump pads.
7634 (linux_set_resume_request): Dequeue deferred signals.
7635 (need_step_over_p): Also step over fast tracepoint jumps.
7636 (start_step_over): Also uninsert fast tracepoint jumps.
7637 (finish_step_over): Also reinsert fast tracepoint jumps.
7638 (linux_install_fast_tracepoint_jump): New.
7639 (linux_target_ops): Install linux_stabilize_threads and
7640 linux_install_fast_tracepoint_jump_pad.
7641 * linux-low.h (linux_target_ops) <get_thread_area,
7642 install_fast_tracepoint_jump_pad>: New fields.
7643 (struct lwp_info) <collecting_fast_tracepoint,
7644 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
7645 (linux_get_thread_area): Declare.
7646 * linux-x86-low.c (jump_insn): New.
7647 (x86_get_thread_area): New.
7648 (append_insns): New.
7649 (push_opcode): New.
7650 (amd64_install_fast_tracepoint_jump_pad): New.
7651 (i386_install_fast_tracepoint_jump_pad): New.
7652 (x86_install_fast_tracepoint_jump_pad): New.
7653 (the_low_target): Install x86_get_thread_area and
7654 x86_install_fast_tracepoint_jump_pad.
7655 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
7656 (struct fast_tracepoint_jump): New.
7657 (fast_tracepoint_jump_insn): New.
7658 (fast_tracepoint_jump_shadow): New.
7659 (find_fast_tracepoint_jump_at): New.
7660 (fast_tracepoint_jump_here): New.
7661 (delete_fast_tracepoint_jump): New.
7662 (set_fast_tracepoint_jump): New.
7663 (uninsert_fast_tracepoint_jumps_at): New.
7664 (reinsert_fast_tracepoint_jumps_at): New.
7665 (set_breakpoint_at): Use write_inferior_memory.
7666 (uninsert_raw_breakpoint): Use write_inferior_memory.
7667 (check_mem_read): Mask out fast tracepoint jumps.
7668 (check_mem_write): Mask out fast tracepoint jumps.
7669 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
7670 (set_fast_tracepoint_jump): Declare.
7671 (delete_fast_tracepoint_jump)
7672 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
7673 (reinsert_fast_tracepoint_jumps_at): Declare.
7674 * regcache.c: Don't compile many functions when building the
7675 in-process agent library.
7676 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
7677 the register buffer in the heap.
7678 (free_register_cache): If the register buffer isn't owned by the
7679 regcache, don't free it.
7680 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
7681 pre-existing register caches.
7682 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
7683 type.
7684 (convert_ascii_to_int): : Constify `from' parameter type.
7685 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
7686 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
7687 the needed buffer in-place.
7688 (relocate_instruction): New.
7689 * server.c (handle_query) <qSymbols>: If the target supports
7690 tracepoints, give it a chance of looking up symbols. Report
7691 support for fast tracepoints.
7692 (handle_status): Stabilize threads.
7693 (process_serial_event): Adjust.
7694 * server.h (struct fast_tracepoint_jump): Forward declare.
7695 (struct process_info) <fast_tracepoint_jumps>: New field.
7696 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
7697 (decode_X_packet, decode_M_packet): Adjust.
7698 (relocate_instruction): Declare.
7699 (in_process_agent_loaded): Declare.
7700 (tracepoint_look_up_symbols): Declare.
7701 (struct fast_tpoint_collect_status): Declare.
7702 (fast_tracepoint_collecting): Declare.
7703 (force_unlock_trace_buffer): Declare.
7704 (handle_tracepoint_bkpts): Declare.
7705 (initialize_low_tracepoint)
7706 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
7707 * target.h (struct target_ops) <stabilize_threads,
7708 install_fast_tracepoint_jump_pad>: New fields.
7709 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
7710 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
7711 [HAVE_STDINT_H]: Include stdint.h.
7712 (trace_debug_1): Rename to ...
7713 (trace_vdebug): ... this.
7714 (trace_debug): Rename to ...
7715 (trace_debug_1): ... this. Add `level' parameter.
7716 (trace_debug): New.
7717 (ATTR_USED, ATTR_NOINLINE): New.
7718 (IP_AGENT_EXPORT): New.
7719 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
7720 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
7721 (about_to_request_buffer_space, trace_buffer_is_full)
7722 (stopping_tracepoint, expr_eval_result, error_tracepoint)
7723 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
7724 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
7725 (traceframe_write_count, traceframes_created)
7726 (trace_state_variables)
7727 New renaming defines.
7728 (struct ipa_sym_addresses): New.
7729 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
7730 (symbol_list): New.
7731 (ipa_sym_addrs): New.
7732 (all_tracepoint_symbols_looked_up): New.
7733 (in_process_agent_loaded): New.
7734 (write_e_ipa_not_loaded): New.
7735 (maybe_write_ipa_not_loaded): New.
7736 (tracepoint_look_up_symbols): New.
7737 (debug_threads) [IN_PROCESS_AGENT]: New.
7738 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
7739 (UNKNOWN_SIDE_EFFECTS): New.
7740 (stop_tracing): New.
7741 (flush_trace_buffer): New.
7742 (stop_tracing_bkpt): New.
7743 (flush_trace_buffer_bkpt): New.
7744 (read_inferior_integer): New.
7745 (read_inferior_uinteger): New.
7746 (read_inferior_data_pointer): New.
7747 (write_inferior_data_pointer): New.
7748 (write_inferior_integer): New.
7749 (write_inferior_uinteger): New.
7750 (struct collect_static_trace_data_action): Delete.
7751 (enum tracepoint_type): New.
7752 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
7753 <actions_str, step_actions, step_actions_str>: Only include in
7754 GDBserver.
fa593d66
PA
7755 <orig_size, obj_addr_on_target, adjusted_insn_addr>
7756 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
7757 (tracepoints): Use IP_AGENT_EXPORT.
7758 (last_tracepoint): Don't include in the IPA.
7759 (stopping_tracepoint): Use IP_AGENT_EXPORT.
7760 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
7761 (alloced_trace_state_variables): New.
7762 (trace_state_variables): Use IP_AGENT_EXPORT.
7763 (traceframe_t): Delete unused variable.
7764 (circular_trace_buffer): Don't include in the IPA.
7765 (trace_buffer_start): Delete.
7766 (struct trace_buffer_control): New.
7767 (trace_buffer_free): Delete.
7768 (struct ipa_trace_buffer_control): New.
7769 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
7770 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
7771 New.
7772 (trace_buffer_ctrl): New.
7773 (TRACE_BUFFER_CTRL_CURR): New.
7774 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
7775 Reimplement as macros.
7776 (trace_buffer_wrap): Delete.
7777 (traceframe_write_count, traceframe_read_count)
7778 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
7779 (struct tracepoint_hit_ctx) <type>: New field.
7780 (struct fast_tracepoint_ctx): New.
7781 (memory_barrier): New.
7782 (cmpxchg): New.
7783 (record_tracepoint_error): Update atomically in the IPA.
7784 (clear_inferior_trace_buffer): New.
7785 (about_to_request_buffer_space): New.
7786 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
7787 updating the same buffer.
7788 (add_tracepoint): Default the tracepoint's type to trap
7789 tracepoint, and orig_size to -1.
7790 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
7791 internal variables.
7792 (create_trace_state_variable): New parameter `gdb'. Handle it.
7793 (clear_installed_tracepoints): Clear fast tracepoint jumps.
7794 (cmd_qtdp): Handle fast tracepoints.
7795 (cmd_qtdv): Adjust.
7796 (max_jump_pad_size): New.
7797 (gdb_jump_pad_head): New.
7798 (get_jump_space_head): New.
7799 (claim_jump_space): New.
7800 (sort_tracepoints): New.
7801 (MAX_JUMP_SIZE): New.
7802 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
7803 IPA.
7804 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
7805 support. Upload fast traceframes, and delete internal IPA
7806 breakpoints.
7807 (stop_tracing_handler): New.
7808 (flush_trace_buffer_handler): New.
7809 (cmd_qtstop): Upload fast tracepoints.
7810 (response_tracepoint): Handle fast tracepoints.
7811 (tracepoint_finished_step): Upload fast traceframes. Set the
7812 tracepoint hit context's tracepoint type.
7813 (handle_tracepoint_bkpts): New.
7814 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
7815 type. Add comment about fast tracepoints.
7816 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
7817 non-existing action_str field.
7818 (get_context_regcache): Handle fast tracepoints.
7819 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
7820 to the regcache.
7821 (fast_tracepoint_from_jump_pad_address): New.
7822 (fast_tracepoint_from_ipa_tpoint_address): New.
7823 (collecting_t): New.
7824 (force_unlock_trace_buffer): New.
7825 (fast_tracepoint_collecting): New.
7826 (collecting): New.
7827 (gdb_collect): New.
7828 (write_inferior_data_ptr): New.
7829 (target_tp_heap): New.
7830 (target_malloc): New.
7831 (download_agent_expr): New.
7832 (UALIGN): New.
7833 (download_tracepoints): New.
7834 (download_trace_state_variables): New.
7835 (upload_fast_traceframes): New.
7836 (IPA_FIRST_TRACEFRAME): New.
7837 (IPA_NEXT_TRACEFRAME_1): New.
7838 (IPA_NEXT_TRACEFRAME): New.
7839 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
7840 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
7841 (gdb_jump_pad_buffer_end): New.
7842 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
7843 (initialize_tracepoint): Adjust.
7844 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
7845 buffer. Initialize the low module.
7846 * utils.c (PREFIX, TOOLNAME): New.
7847 (malloc_failure): Use PREFIX.
7848 (error): In the IPA, an error causes an exit.
7849 (fatal, warning): Use PREFIX.
7850 (internal_error): Use TOOLNAME.
7851 (NUMCELLS): Increase to 10.
7852 * configure, config.in: Regenerate.
7853
d149dd1d
PA
78542010-06-01 Pedro Alves <pedro@codesourcery.com>
7855
7856 * server.c (handle_query) <qSupported>: Do two passes over the
7857 qSupported string to avoid nesting strtok.
7858
f6528abd
JK
78592010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7860
7861 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
7862 (CDEPS): New.
7863 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
7864 -Wl,--dynamic-list.
7865 * configure: Regenerate.
7866 * proc-service.list: New.
7867
ca2a87a0
JK
78682010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7869
7870 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
7871 New comment.
7872
363a6e9f
OS
78732010-05-26 Ozkan Sezer <sezeroz@gmail.com>
7874
7875 * gdbreplay.c (remote_open): Check error return from socket() call by
7876 its equality to -1 not by it being negative.
7877 * remote-utils.c (remote_open): Likewise.
7878
d23b6cb1
PA
78792010-05-23 Pedro Alves <pedro@codesourcery.com>
7880
7881 * config.h: Regenerate.
7882
28d3cf85
MK
78832010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
7884
7885 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
7886 doesn't provide PTRACE_GET_THREAD_AREA.
7887
fea36a59
MK
78882010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
7889
7890 * linux-m68k-low.c: Include <asm/ptrace.h>
7891 (ps_get_thread_area): Implement.
7892
24b066ba
DE
78932010-05-03 Doug Evans <dje@google.com>
7894
7895 * event-loop.c (struct callback_event): New struct.
7896 (callback_list): New global.
7897 (append_callback_event, delete_callback_event): New functions.
7898 (process_callback): New function.
7899 (start_event_loop): Call it.
7900 * remote-utils.c (NOT_SCHEDULED): Define.
7901 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
7902 moved out of readchar.
7903 (readchar): Rewrite. Call reschedule before returning.
7904 (reset_readchar): New function.
7905 (remote_close): Call it.
7906 (process_remaining, reschedule): New functions.
7907 * server.h (callback_handler_func): New typedef.
7908 (append_callback_event, delete_callback_event): Declare.
7909
9836d6ea
PA
79102010-05-03 Pedro Alves <pedro@codesourcery.com>
7911
7912 * proc-service.c (ps_pglobal_lookup): Use
7913 thread_db_look_up_one_symbol.
7914 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
7915 parameter. Use it instead of all_symbols_looked_up.
7916 * server.h (struct process_info) <all_symbols_looked_up>: Delete
7917 field.
7918 (all_symbols_looked_up): Don't declare.
7919 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
7920 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
7921 field.
7922 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
7923 Set all_symbols_looked_up here.
7924 (thread_db_look_up_one_symbol): New.
7925 (thread_db_get_tls_address): Adjust.
7926 (thread_db_load_search, try_thread_db_load_1): Always allocate the
7927 thread_db object on the heap, and tentatively set it in the
7928 process structure.
7929 (thread_db_init): Don't set all_symbols_looked_up here.
7930 * linux-low.h (thread_db_look_up_one_symbol): Declare.
7931
7984d532
PA
79322010-05-03 Pedro Alves <pedro@codesourcery.com>
7933
7934 * linux-low.c (linux_kill, linux_detach): Adjust.
7935 (status_pending_p_callback): Remove redundant statement. Check
7936 for !TARGET_WAITIKIND_IGNORE, instead of
7937 TARGET_WAITKIND_STOPPED.
7938 (handle_tracepoints): Make sure LWP is locked. Adjust.
7939 (linux_wait_for_event_1): Adjust.
7940 (linux_cancel_breakpoints): New.
7941 (unsuspend_one_lwp): New.
7942 (unsuspend_all_lwps): New.
7943 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
7944 (send_sigstop_callback): Change return type to int, add new
7945 `except' parameter and handle it.
7946 (suspend_and_send_sigstop_callback): New.
7947 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
7948 pass them down. If SUSPEND, also increment the lwp's suspend
7949 count.
7950 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
7951 (need_step_over_p): Don't consider suspended LWPs.
7952 (start_step_over): Adjust.
7953 (proceed_one_lwp): Change return type to int, add new `except'
7954 parameter and handle it.
7955 (unsuspend_and_proceed_one_lwp): New.
7956 (proceed_all_lwps): Use find_inferior instead of
7957 for_each_inferior.
7958 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
7959 also decrement the suspend count of LWPs. Pass `except' down,
7960 instead of hacking its suspend count.
7961 (linux_pause_all): Add `freeze' parameter. Adjust.
7962 (linux_unpause_all): New.
7963 (linux_target_ops): Install linux_unpause_all.
7964 * server.c (handle_status): Adjust.
7965 * target.h (struct target_ops): New fields `unpause_all' and
7966 `cancel_breakpoints'. Add new parameter to `pause_all'.
7967 (pause_all): Add new `freeze' parameter.
7968 (unpause_all): New.
7969 (cancel_breakpoints): New.
7970 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
7971 cancel breakpoints.
7972 (cmd_qtstart): Pause threads.
7973 (stop_tracing): Pause threads, and cancel breakpoints.
7974 * win32-low.c (win32_target_ops): Adjust.
7975
e471f25b
PA
79762010-05-03 Pedro Alves <pedro@codesourcery.com>
7977
7978 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
7979 the inferior right away from here...
7980 (linux_wait_1): ... to here, and adjust to check the thread's
7981 last_resume_kind instead of the lwp's step or stop_expected flags.
7982
1915ef4f
PA
79832010-05-02 Pedro Alves <pedro@codesourcery.com>
7984
7985 * README: Use consistent `GDB' and `GDBserver' spellings.
7986
f9e39928
PA
79872010-05-02 Pedro Alves <pedro@codesourcery.com>
7988
7989 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
7990 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
7991 (linux_detach_one_lwp): Assume the lwp is stopped.
7992 (any_thread_of): Delete.
7993 (linux_detach): Stop all lwps here. Don't blindly delete all
7994 breakpoints.
7995 (delete_lwp_callback): New.
7996 (linux_mourn): Delete all lwps of the process that is gone.
7997 (linux_wait_1): Don't delete the last lwp of the process here.
7998 * mem-break.h (mark_breakpoints_out): Declare.
7999 * mem-break.c (mark_breakpoints_out): New.
8000 (free_all_breakpoints): Use it.
8001 * server.c (handle_target_event): If the process is gone, mark
8002 breakpoints out.
8003 * thread-db.c (struct thread_db) <create_bp>: New field.
8004 (thread_db_enable_reporting): Fix prototype. Store a thread event
8005 breakpoint reference in the thread_db struct.
8006 (thread_db_load_search): Clear the thread_db object.
8007 (try_thread_db_load_1): Ditto.
8008 (switch_to_process): New.
8009 (disable_thread_event_reporting): Use it.
8010 (remove_thread_event_breakpoints): New.
8011 (thread_db_detach, thread_db_mourn): Use it.
8012
1e7fc18c
PA
80132010-05-01 Pedro Alves <pedro@codesourcery.com>
8014
8015 * linux-low.c (linux_enable_event_reporting): New.
8016 (linux_wait_for_event_1, handle_extended_wait): Use it.
8017
02fc4de7
PA
80182010-04-30 Pedro Alves <pedro@codesourcery.com>
8019
8020 * linux-low.c (linux_kill_one_lwp, linux_kill)
8021 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
8022 (send_sigstop): Take an lwp_info as parameter instead. Queue a
8023 SIGSTOP even if the LWP is stopped.
8024 (send_sigstop_callback): New.
8025 (stop_all_lwps): Use send_sigstop_callback instead.
8026 (linux_resume_one_thread): Adjust.
8027 (proceed_one_lwp): Still proceed an LWP that the client has
8028 requested to stop, if we haven't reported it as stopped yet. Make
8029 sure that LWPs the client want stopped, have a pending SIGSTOP.
8030
bc3b5632
DE
80312010-04-26 Doug Evans <dje@google.com>
8032
ae1ada35
DE
8033 * server.c (handle_general_set): Make static.
8034
bc3b5632
DE
8035 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
8036 Print received char after testing for error/eof instead of before.
8037 (input_interrupt): Tweak comment.
8038
65730243
DE
80392010-04-23 Doug Evans <dje@google.com>
8040
8041 * server.c (start_inferior): Print inferior argv if --debug.
8042
a8ae7dc0
AR
80432010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
8044
8045 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
8046 * nto-x86-low.c: Include server.h
8047
1c07cc19
PM
80482010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
8049
8050 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
8051 be consistent with other sources of this directory.
8052 (init_registers_amd64): Correct name of source file of this function
8053 in the comment.
8054
e0a61e09
PM
80552010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8056
8057 * configure.srv (x86_64-*-mingw*): New configuration for Windows
8058 64-bit executables.
8059
54709339
PM
80602010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8061
8062 * win32-i386-low.c: Add 64-bit support.
8063 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
8064 (init_registers_amd64): Declare.
8065 (mappings): Add 64-bit version of array.
8066 (init_windows_x86): New function.
8067 (the_low_target): Change init_arch field to init_windows_x86.
8068
e8f0053d
PM
80692010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8070
8071 * win32-low.c: Adapt to support also 64-bit architecture.
8072 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
8073 (get_image_name): Use SIZE_T type for local variable `done'.
8074 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
8075 (toolhelp_get_dll_name): Idem.
8076 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
8077 Use uintptr_t typecast to avoid warning.
8078 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
8079 (handle_exception): Use phex_nz to avoid warning.
8080 (win32_wait): Remove unused local variable `process'.
8081
c481e77e
PM
80822010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8083
8084 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
8085 `amd64-avx.o'.
8086
12ea4b69
PM
80872010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
8088
8089 * configure.ac: Use `ws2_32' library for srv_mingw.
8090 * configure: Regenerate.
8091 * gdbreplay.c: Include winsock2.h instead of winsock.h.
8092 * remote-utils.c: Likewise.
8093
f6d1620c
L
80942010-04-17 H.J. Lu <hongjiu.lu@intel.com>
8095
8096 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
8097 if __x86_64__ is defined.
8098
8e642873
PM
80992010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
8100
8101 * configure: Regenerate.
8102
711e434b
PM
81032010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
8104
8105 * server.c (handle_query): Handle 'qGetTIBAddr' query.
8106 * target.h (target_ops): New get_tib_address field.
8107 * win32-low.h (win32_thread_info): Add thread_local_base field.
8108 * win32-low.c (child_add_thread): Add tlb argument.
8109 Set thread_local_base field to TLB.
8110 (get_child_debug_event): Adapt to child_add_thread change.
8111 (win32_get_tib_address): New function.
8112 (win32_target_ops): Set get_tib_address field to
8113 win32_get_tib_address.
8114 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
8115
505106cd
PA
81162010-04-12 Pedro Alves <pedro@codesourcery.com>
8117
505106cd
PA
8118 * linux-low.c (linux_mourn): Also remove the process.
8119 * server.c (handle_target_event): Don't remove the process here.
8120 * nto-low.c (nto_mourn): New.
8121 (nto_target_ops): Install it.
8122 * spu-low.c (spu_mourn): New.
8123 (spu_target_ops): Install it.
8124 * win32-low.c (win32_mourn): New.
8125 (win32_target_ops): Install it.
8126
e8470a06
PA
81272010-04-12 Pedro Alves <pedro@codesourcery.com>
8128
8129 * server.h (buffer_xml_printf): Remove redundant `;'.
8130
45ba0d02
PA
81312010-04-12 Pedro Alves <pedro@codesourcery.com>
8132
8133 * regcache.c (set_register_cache): Invalidate regcaches before
8134 changing the register cache layout.
8135 (regcache_invalidate_one): Allow a NULL regcache.
8136 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
8137 regcaches before changing the register cache layout or the target
8138 regsets.
8139
59e04013
L
81402010-04-12 H.J. Lu <hongjiu.lu@intel.com>
8141
8142 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
8143 variable warning on Linux/x86-64.
8144
8336d594
PA
81452010-04-11 Pedro Alves <pedro@codesourcery.com>
8146
8147 GDBserver disconnected tracing support.
8148
8149 * linux-low.c (linux_remove_process): Delete.
8150 (add_lwp): Don't set last_resume_kind here.
8151 (linux_kill): Use `mourn'.
8152 (linux_detach): Use `thread_db_detach', and `mourn'.
8153 (linux_mourn): New.
8154 (linux_attach_lwp_1): Adjust comment.
8155 (linux_attach): last_resume_kind moved the thread_info; adjust.
8156 (status_pending_p_callback): Adjust.
8157 (linux_wait_for_event_1): Adjust.
8158 (count_events_callback, select_singlestep_lwp_callback)
8159 (select_event_lwp_callback, cancel_breakpoints_callback)
8160 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
8161 (proceed_one_lwp): Adjust.
8162 (linux_async): Add debug output.
8163 (linux_thread_stopped): New.
8164 (linux_pause_all): New.
8165 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
8166 linux_pause_all.
8167 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
8168 (thread_db_free): Delete declaration.
8169 (thread_db_detach, thread_db_mourn): Declare.
8170 * thread-db.c (thread_db_init): Use thread_db_mourn.
8171 (thread_db_free): Delete, split in two.
8172 (disable_thread_event_reporting): New.
8173 (thread_db_detach): New.
8174 (thread_db_mourn): New.
8175
8176 * server.h (struct thread_info) <last_resume_kind>: New field.
8177 <attached>: Add comment.
8178 <gdb_detached>: New field.
8179 (handler_func): Change return type to int.
8180 (handle_serial_event, handle_target_event): Ditto.
8181 (gdb_connected): Declare.
8182 (tracing): Delete.
8183 (disconnected_tracing): Declare.
8184 (stop_tracing): Declare.
8185
8186 * server.c (handle_query) <qSupported>: Report support for
8187 disconnected tracing.
8188 (queue_stop_reply_callback): Account for running threads.
8189 (gdb_wants_thread_stopped): New.
8190 (gdb_wants_all_threads_stopped): New.
8191 (gdb_reattached_process): New.
8192 (handle_status): Clear the `gdb_detached' flag of all processes.
8193 In all-stop, stop all threads.
8194 (main): Be sure to leave tfind mode. Handle disconnected tracing.
8195 (process_serial_event): If the remote connection breaks, or if an
8196 exit was forced with "monitor exit", force an event loop exit.
8197 Handle disconnected tracing on detach.
8198 (handle_serial_event): Adjust.
8199 (handle_target_event): If GDB isn't connected, forward events back
8200 to the inferior, unless the last process exited, in which case,
8201 exit gdbserver. Adjust interface.
8202
8203 * remote-utils.c (remote_open): Don't block in accept. Instead
8204 register an event loop source on the listen socket file
8205 descriptor. Refactor bits into ...
8206 (listen_desc): ... this new global.
8207 (gdb_connected): ... this new function.
8208 (enable_async_notification): ... this new function.
8209 (handle_accept_event): ... this new function.
8210 (remote_close): Clear remote_desc.
8211
8212 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
8213
8214 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
8215 New fields.
8216 (mourn_inferior): Define.
8217 (target_process_qsupported): Avoid the dangling else problem.
8218 (thread_stopped): Define.
8219 (pause_all): Define.
8220 (target_waitstatus_to_string): Declare.
8221 * target.c (target_waitstatus_to_string): New.
8222
8223 * tracepoint.c (tracing): Make extern.
8224 (disconnected_tracing): New.
8225 (stop_tracing): Make extern. Handle tracing stops due to GDB
8226 disconnecting.
8227 (cmd_qtdisconnected): New.
8228 (cmd_qtstatus): Report disconnected tracing status in trace reply.
8229 (handle_tracepoint_general_set): Handle QTDisconnected.
8230
8231 * event-loop.c (event_handler_func): Change return type to int.
8232 (process_event): Bail out if the event handler wants the event
8233 loop to stop.
8234 (handle_file_event): Ditto.
8235 (start_event_loop): Bail out if the event handler wants the event
8236 loop to stop.
8237
8238 * nto-low.c (nto_target_ops): Adjust.
8239 * spu-low.c (spu_wait): Don't remove the process here.
8240 (spu_target_ops): Adjust.
8241 * win32-low.c (win32_wait): Don't remove the process here.
8242 (win32_target_ops): Adjust.
8243
5d267c4c
PA
82442010-04-11 Pedro Alves <pedro@codesourcery.com>
8245
8246 * regcache.c (realloc_register_cache): Invalidate inferior's
8247 regcache before recreating it.
8248
623ccd72
PA
82492010-04-09 Pedro Alves <pedro@codesourcery.com>
8250
8251 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
8252
219f2f23
PA
82532010-04-09 Stan Shebs <stan@codesourcery.com>
8254 Pedro Alves <pedro@codesourcery.com>
8255
8256 * server.h (LONGEST): New.
8257 (struct thread_info) <while_stepping>: New field.
8258 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
8259 Declare.
8260 (initialize_tracepoint, handle_tracepoint_general_set)
8261 (handle_tracepoint_query, tracepoint_finished_step)
8262 (tracepoint_was_hit, release_while_stepping_state_list):
8263 (current_traceframe): Declare.
8264 * server.c (handle_general_set): Handle tracepoint packets.
8265 (read_memory): New.
8266 (write_memory): New.
8267 (handle_search_memory_1): Use read_memory.
8268 (handle_query): Report support for conditional tracepoints, trace
8269 state variables, and tracepoint sources. Handle tracepoint
8270 queries.
8271 (main): Initialize the tracepoints module.
8272 (process_serial_event): Handle traceframe reads/writes.
8273
8274 * linux-low.c (handle_tracepoints): New.
8275 (linux_wait_1): Call it.
8276 (linux_resume_one_lwp): Handle while-stepping.
8277 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
8278 (linux_target_ops): Install them.
8279 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
8280 New field.
8281 * linux-x86-low.c (x86_supports_tracepoints): New.
8282 (the_low_target). Install it.
8283
8284 * mem-break.h (delete_breakpoint): Declare.
8285 * mem-break.c (delete_breakpoint): Make external.
8286
8287 * target.h (struct target_ops): Add `supports_tracepoints',
8288 `read_pc', and `write_pc' fields.
8289 (target_supports_tracepoints): Define.
8290 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
8291 (phex_nz): New.
8292
8293 * regcache.h (struct regcache) <registers_owned>: New field.
8294 (init_register_cache, regcache_cpy): Declare.
8295 (regcache_read_pc, regcache_write_pc): Declare.
8296 (register_cache_size): Declare.
8297 (supply_regblock): Declare.
8298 * regcache.c (init_register_cache): New.
8299 (new_register_cache): Use it.
8300 (regcache_cpy): New.
8301 (register_cache_size): New.
8302 (supply_regblock): New.
8303 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 8304
219f2f23
PA
8305 * tracepoint.c: New.
8306
8307 * Makefile.in (OBS): Add tracepoint.o.
8308 (tracepoint.o): New rule.
8309
3a13a53b
L
83102010-04-08 H.J. Lu <hongjiu.lu@intel.com>
8311
8312 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
8313 (i386-mmx.o): New.
8314 (i386-mmx.c): Likewise.
8315 (i386-mmx-linux.o): Likewise.
8316 (i386-mmx-linux.c): Likewise.
8317
8318 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
8319 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
8320 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
8321 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
8322
8323 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
8324 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
8325 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
8326
1570b33e
L
83272010-04-07 H.J. Lu <hongjiu.lu@intel.com>
8328
8329 * Makefile.in (clean): Updated.
8330 (i386-avx.o): New.
8331 (i386-avx.c): Likewise.
8332 (i386-avx-linux.o): Likewise.
8333 (i386-avx-linux.c): Likewise.
8334 (amd64-avx.o): Likewise.
8335 (amd64-avx.c): Likewise.
8336 (amd64-avx-linux.o): Likewise.
8337 (amd64-avx-linux.c): Likewise.
8338
8339 * configure.srv (srv_i386_regobj): Add i386-avx.o.
8340 (srv_i386_linux_regobj): Add i386-avx-linux.o.
8341 (srv_amd64_regobj): Add amd64-avx.o.
8342 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
8343 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
8344 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
8345 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
8346 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
8347 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
8348 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
8349
8350 * i387-fp.c: Include "i386-xstate.h".
8351 (i387_xsave): New.
8352 (i387_cache_to_xsave): Likewise.
8353 (i387_xsave_to_cache): Likewise.
8354 (x86_xcr0): Likewise.
8355
8356 * i387-fp.h (i387_cache_to_xsave): Likewise.
8357 (i387_xsave_to_cache): Likewise.
8358 (x86_xcr0): Likewise.
8359
8360 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
8361 * linux-crisv32-low.c (target_regsets): Likewise.
8362 * linux-m68k-low.c (target_regsets): Likewise.
8363 * linux-mips-low.c (target_regsets): Likewise.
8364 * linux-ppc-low.c (target_regsets): Likewise.
8365 * linux-s390-low.c (target_regsets): Likewise.
8366 * linux-sh-low.c (target_regsets): Likewise.
8367 * linux-sparc-low.c (target_regsets): Likewise.
8368 * linux-xtensa-low.c (target_regsets): Likewise.
8369
8370 * linux-low.c: Include <sys/uio.h>.
8371 (regsets_fetch_inferior_registers): Support nt_type.
8372 (regsets_store_inferior_registers): Likewise.
8373 (linux_process_qsupported): New.
8374 (linux_target_ops): Add linux_process_qsupported.
8375
8376 * linux-low.h (regset_info): Add nt_type.
8377 (linux_target_ops): Add process_qsupported.
8378
8379 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
8380 and <sys/uio.h>.
8381 (init_registers_i386_avx_linux): New.
8382 (init_registers_amd64_avx_linux): Likewise.
8383 (xmltarget_i386_linux_no_xml): Likewise.
8384 (xmltarget_amd64_linux_no_xml): Likewise.
8385 (PTRACE_GETREGSET): Likewise.
8386 (PTRACE_SETREGSET): Likewise.
8387 (x86_fill_xstateregset): Likewise.
8388 (x86_store_xstateregset): Likewise.
8389 (use_xml): Likewise.
8390 (x86_linux_update_xmltarget): Likewise.
8391 (x86_linux_process_qsupported): Likewise.
8392 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
8393 (x86_arch_setup): Don't call init_registers_amd64_linux nor
8394 init_registers_i386_linux here. Call
8395 x86_linux_update_xmltarget.
8396 (the_low_target): Add x86_linux_process_qsupported.
8397
8398 * server.c (handle_query): Call target_process_qsupported.
8399
8400 * target.h (target_ops): Add process_qsupported.
8401 (target_process_qsupported): New.
8402
fc7238bb
PA
84032010-04-03 Pedro Alves <pedro@codesourcery.com>
8404
8405 * inferiors.c (add_thread): Set last_status kind to
8406 TARGET_WAITKIND_IGNORE.
8407 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
8408 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
8409 (linux_wait_1): Move `thread' local definition to block that uses
8410 it. Don't NULL initialize `event_child'.
8411 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
8412 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
8413 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
8414
bdabb078
PA
84152010-04-01 Pedro Alves <pedro@codesourcery.com>
8416
8417 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
8418 an extended waitstatus, or by a watchpoint.
8419 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
8420 thread was stepping or has been stopped by a watchpoint.
8421
d3bbe7a0
PA
84222010-04-01 Pedro Alves <pedro@codesourcery.com>
8423
8424 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
8425 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
8426 of another, then delete the previous, and validate all
8427 breakpoints.
8428 (validate_inserted_breakpoint): New.
8429 (delete_disabled_breakpoints): New.
8430 (validate_breakpoints): New.
8431 (check_mem_read): Validate breakpoints before trusting their
8432 shadow. Delete disabled breakpoints.
8433 (check_mem_write): Validate breakpoints before trusting they
8434 should be inserted. Delete disabled breakpoints.
8435 * mem-break.h (validate_breakpoints):
8436 * server.c (handle_query): Validate breakpoints when we see a
8437 qSymbol query.
8438
8b07ae33
PA
84392010-04-01 Pedro Alves <pedro@codesourcery.com>
8440
8441 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
8442 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
8443 if we could tell there's a GDB breakpoint at stop_pc.
8444 (need_step_over_p): Don't do a step over if we find a GDB
8445 breakpoint at the resume PC.
8446
8447 * mem-break.c (struct raw_breakpoint): New.
8448 (enum bkpt_type): New type `gdb_breakpoint'.
8449 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
8450 fields. New field `raw'.
8451 (find_raw_breakpoint_at): New.
8452 (set_raw_breakpoint_at): Handle refcounting. Create a raw
8453 breakpoint instead.
8454 (set_breakpoint_at): Adjust.
8455 (delete_raw_breakpoint): New.
8456 (release_breakpoint): New.
8457 (delete_breakpoint): Rename to...
8458 (delete_breakpoint_1): ... this. Add proc parameter. Use
8459 release_breakpoint. Return ENOENT.
8460 (delete_breakpoint): Reimplement.
8461 (find_breakpoint_at): Delete.
8462 (find_gdb_breakpoint_at): New.
8463 (delete_breakpoint_at): Delete.
8464 (set_gdb_breakpoint_at): New.
8465 (delete_gdb_breakpoint_at): New.
8466 (gdb_breakpoint_here): New.
8467 (set_reinsert_breakpoint): Use release_breakpoint.
8468 (uninsert_breakpoint): Rename to ...
8469 (uninsert_raw_breakpoint): ... this.
8470 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
8471 (reinsert_raw_breakpoint): Change parameter type to
8472 raw_breakpoint.
8473 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
8474 instead.
8475 (check_breakpoints): Adjust. Use release_breakpoint.
8476 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
8477 (breakpoint_inserted_here): Ditto.
8478 (check_mem_read): Adjust to iterate over raw breakpoints instead.
8479 Don't trust the breakpoint's shadow if it is not inserted.
8480 (check_mem_write): Adjust to iterate over raw breakpoints instead.
8481 (delete_all_breakpoints): Adjust.
8482 (free_all_breakpoints): Mark all breakpoints as uninserted, and
8483 use delete_breakpoint_1.
8484
8485 * mem-break.h (breakpoints_supported): Delete declaration.
8486 (set_gdb_breakpoint_at): Declare.
8487 (gdb_breakpoint_here): Declare.
8488 (delete_breakpoint_at): Delete.
8489 (delete_gdb_breakpoint_at): Declare.
8490
8491 * server.h (struct raw_breakpoint): Forward declare.
8492 (struct process_info): New field `raw_breakpoints'.
8493
8494 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
8495 breakpoints.
8496
6bf5e0ba
PA
84972010-03-24 Pedro Alves <pedro@codesourcery.com>
8498
8499 * linux-low.c (status_pending_p_callback): Fix comment.
8500 (linux_wait_for_event_1): Move most of the internal breakpoint
8501 handling from here...
8502 (linux_wait_1): ... to here.
8503 (count_events_callback): New.
8504 (select_singlestep_lwp_callback): New.
8505 (select_event_lwp_callback): New.
8506 (cancel_breakpoints_callback): New.
8507 (select_event_lwp): New.
8508 (linux_wait_1): Simplify internal breakpoint handling. Give equal
8509 priority to all LWPs that have had events that should be reported
8510 to the client. Cancel breakpoints when about to reporting the
8511 event to the client, not while stopping lwps. No longer cancel
8512 finished single-steps here.
8513 (cancel_finished_single_step): Delete.
8514 (cancel_finished_single_steps): Delete.
8515
414a389f
PA
85162010-03-24 Pedro Alves <pedro@codesourcery.com>
8517
8518 * mem-break.c (enum bkpt_type): New.
8519 (struct breakpoint): New field `type'.
8520 (set_breakpoint_at): Change return type to struct breakpoint
8521 pointer. Set type to `other_breakpoint' by default.
8522 (delete_breakpoint): Rewrite, supporting more than one breakpoint
8523 in the breakpoint list.
8524 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
8525 (reinsert_breakpoint): Rename to ...
8526 (reinsert_raw_breakpoint): ... this.
8527 (reinsert_breakpoints_at): Adjust.
8528 * mem-break.h (struct breakpoint): Declare.
8529 (set_breakpoint_at): Change return type to struct breakpoint
8530 pointer.
8531
2280c721
PA
85322010-03-24 Pedro Alves <pedro@codesourcery.com>
8533
8534 * server.c (handle_query): Assign, not compare.
8535
d50171e4
PA
85362010-03-24 Pedro Alves <pedro@codesourcery.com>
8537
8538 Teach linux gdbserver to step-over-breakpoints.
8539
8540 * linux-low.c (can_hardware_single_step): New.
8541 (supports_breakpoints): New.
8542 (handle_extended_wait): If stopping threads, read the stop pc of
8543 the new cloned LWP.
8544 (get_pc): New.
8545 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
8546 low target doesn't support retrieving the PC.
8547 (add_lwp): Set last_resume_kind to resume_continue.
8548 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
8549 (linux_attach): Don't clear stop_expected. Set the lwp's
8550 last_resume_kind to resume_stop.
8551 (linux_detach_one_lwp): Don't check for removed breakpoints.
8552 (check_removed_breakpoint): Delete.
8553 (status_pending_p): Rename to ...
8554 (status_pending_p_callback): ... this. Don't check for removed
8555 breakpoints. Don't consider threads that are stopped from GDB's
8556 perspective.
8557 (linux_wait_for_lwp): Always read the stop_pc here.
8558 (cancel_breakpoint): New.
8559 (step_over_bkpt): New global.
8560 (linux_wait_for_event_1): Implement stepping over breakpoints.
8561 (gdb_wants_lwp_stopped): New.
8562 (gdb_wants_all_stopped): New.
8563 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
8564 single-step traps here. Store the thread's last reported target
8565 wait status.
8566 (send_sigstop): Don't clear stop_expected. Always set it,
8567 instead.
8568 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
8569 (cancel_finished_single_step): New.
8570 (cancel_finished_single_steps): New.
8571 (wait_for_sigstop): Don't cancel finished single-step traps here.
8572 (linux_resume_one_lwp): Don't check for removed breakpoints.
8573 Don't set `step' on non-hardware step archs.
8574 (linux_set_resume_request): Ignore resume_stop requests if already
8575 stopping or stopped. Set the lwp's last_resume_kind.
8576 (resume_status_pending_p): Don't check for removed breakpoints.
8577 (need_step_over_p): New.
8578 (start_step_over): New.
8579 (finish_step_over): New.
8580 (linux_resume_one_thread): Always queue a sigstop for resume_stop
8581 requests. Clear the thread's last reported target waitstatus.
8582 Don't use the `suspended' flag. Don't consider pending breakpoints.
8583 (linux_resume): Start a step-over if necessary.
8584 (proceed_one_lwp): New.
8585 (proceed_all_lwps): New.
8586 (unstop_all_lwps): New.
8587 * linux-low.h (struct lwp_info): Rewrite comment for the
8588 `suspended' flag. Add the `stop_pc' field. Delete the
8589 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
8590 Add `'last_resume_kind' and `need_step_over' fields.
8591 * inferiors.c (struct thread_info): Delete, moved elsewhere.
8592 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
8593 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
8594 (set_raw_breakpoint_at): New.
8595 (set_breakpoint_at): Rewrite to use it.
8596 (reinsert_breakpoint_handler): Delete.
8597 (set_reinsert_breakpoint): New.
8598 (reinsert_breakpoint_by_bp): Delete.
8599 (delete_reinsert_breakpoints): New.
8600 (uninsert_breakpoint): Rewrite.
8601 (uninsert_breakpoints_at): New.
8602 (reinsert_breakpoint): Rewrite.
8603 (reinsert_breakpoints_at): New.
8604 (check_breakpoints): Rewrite.
8605 (breakpoint_here): New.
8606 (breakpoint_inserted_here): New.
8607 (check_mem_read): Adjust.
8608 * mem-break.h (breakpoints_supported, breakpoint_here)
8609 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
8610 (reinsert_breakpoint_by_bp): Delete declaration.
8611 (delete_reinsert_breakpoints): Declare.
8612 (reinsert_breakpoint): Delete declaration.
8613 (reinsert_breakpoints_at): Declare.
8614 (uninsert_breakpoint): Delete declaration.
8615 (uninsert_breakpoints_at): Declare.
8616 (check_breakpoints): Adjust prototype.
8617 * server.h: Adjust include order.
8618 (struct thread_info): Declare here. Add a `last_status' field.
8619
30ba68cb
MS
86202010-03-23 Michael Snyder <msnyder@vmware.com>
8621
8622 * server.c (crc32): New function.
8623 (handle_query): Add handling for 'qCRC:' request.
8624
b9a881c2
PA
86252010-03-23 Pedro Alves <pedro@codesourcery.com>
8626
8627 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
8628 lwp had been stopped by a watchpoint.
8629
e92d13d5
PA
86302010-03-16 Pedro Alves <pedro@codesourcery.com>
8631
8632 * server.h (internal_error): Declare.
8633 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
8634 * utils.c (internal_error): New function.
8635
64daa791
AS
86362010-03-15 Andreas Schwab <schwab@redhat.com>
8637
8638 * configure.srv: Fix typo setting srv_regobj.
8639
f52cd8cd
PA
86402010-03-15 Pedro Alves <pedro@codesourcery.com>
8641
8642 * linux-low.c (fetch_register): Avoid passing a non string literal
8643 format to `error'.
8644 (usr_store_inferior_registers): Ditto.
8645
93ae6fdc
PA
86462010-03-14 Pedro Alves <pedro@codesourcery.com>
8647
8648 * linux-low.c (linux_write_memory): Bail out early if peeking
8649 memory failed.
8650
c3adc08c
PA
86512010-03-14 Pedro Alves <pedro@codesourcery.com>
8652
8653 * linux-low.h (struct lwp_info): New fields
8654 `stopped_by_watchpoint' and `stopped_data_address'.
8655 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
8656 here, and cache them in the lwp object.
8657 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
8658 directly.
8659 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
8660 field.
8661 (linux_stopped_by_watchpoint): Rewrite.
8662 (linux_stopped_data_address): Rewrite.
8663
bce522a2
PA
86642010-03-06 Simo Melenius <simo.melenius@iki.fi>
8665
8666 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
8667 switching the current inferior, not before.
8668
90884b2b
L
86692010-03-01 H.J. Lu <hongjiu.lu@intel.com>
8670
8671 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
8672 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
8673 i386-linux.c and amd64-linux.c.
8674 (reg-i386.o): Removed.
8675 (reg-i386.c): Likewise.
8676 (reg-i386-linux.o): Likewise.
8677 (reg-i386-linux.c): Likewise.
8678 (reg-x86-64.o): Likewise.
8679 (reg-x86-64.c): Likewise.
8680 (reg-x86-64-linux.o): Likewise.
8681 (reg-x86-64-linux.c): Likewise.
8682 (i386.o): New.
8683 (i386.c): Likewise.
8684 (i386-linux.o): Likewise.
8685 (i386-linux.c): Likewise.
8686 (amd64.o): Likewise.
8687 (amd64.c): Likewise.
8688 (amd64-linux.o): Likewise.
8689 (amd64-linux.c): Likewise.
8690
8691 * configure.srv (srv_i386_regobj): New.
8692 (srv_i386_linux_regobj): Likewise.
8693 (srv_amd64_regobj): Likewise.
8694 (srv_amd64_linux_regobj): Likewise.
8695 (srv_i386_32bit_xmlfiles): Likewise.
8696 (srv_i386_64bit_xmlfiles): Likewise.
8697 (srv_i386_xmlfiles): Likewise.
8698 (srv_amd64_xmlfiles): Likewise.
8699 (srv_i386_linux_xmlfiles): Likewise.
8700 (srv_amd64_linux_xmlfiles): Likewise.
8701 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
8702 srv_xmlfiles to $srv_i386_xmlfiles.
8703 (i[34567]86-*-mingw32ce*): Likewise.
8704 (i[34567]86-*-mingw*): Likewise.
8705 (i[34567]86-*-nto*): Likewise.
8706 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
8707 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
8708 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
8709 (x86_64-*-linux*): Likewise.
8710
8711 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
8712 (init_registers_amd64_linux): New.
8713 (x86_arch_setup): Replace init_registers_x86_64_linux with
8714 init_registers_amd64_linux.
8715
193f13e6
MK
87162010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
8717
8718 * configure.ac: Check for libdl. If it is not available link against
8719 static libthread_db.
8720 * configure: Regenerate.
8721
85d721b8
PA
87222010-02-22 Pedro Alves <pedro@codesourcery.com>
8723
8724 PR9605
8725
8726 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
8727 handing a read watchpoint.
8728 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
8729
6076632b
DE
87302010-02-12 Doug Evans <dje@google.com>
8731
8732 * linux-low.c (linux_supports_tracefork_flag): Document.
8733 (linux_look_up_symbols): Add comment.
8734
3327ccf7
L
87352010-02-03 H.J. Lu <hongjiu.lu@intel.com>
8736
8737 * regcache.c (supply_register): Clear regcache if buf is NULL.
8738
0718675c 87392010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 8740 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
8741
8742 * inferiors.c (find_inferior): Add function documentation.
8743 (unloaded_dll): Handle the case where the unloaded dll has not
8744 been previously registered in the dll list.
8745
177321bd
DJ
87462010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
8747
8748 * linux-arm-low.c (thumb_breakpoint_len): Delete.
8749 (thumb2_breakpoint): New.
8750 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
8751
2b009048
DJ
87522010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
8753
8754 * linux-low.c (get_stop_pc): Check for SIGTRAP.
8755 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
8756 breakpoints.
8757
3be029c7
PA
87582010-01-21 Pedro Alves <pedro@codesourcery.com>
8759
8760 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
8761
18f5de3b
JK
87622010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
8763
8764 * linux-s390-low.c (s390_collect_ptrace_register)
8765 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
8766
3743bb4f
DE
87672010-01-21 Doug Evans <dje@google.com>
8768
14ce3065
DE
8769 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
8770 (PTRACE_ARG4_TYPE): New macro.
8771 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
8772 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
8773 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
8774 (usr_store_inferior_registers): Ditto.
8775 (linux_read_memory, linux_write_memory): Ditto.
8776 (linux_test_for_tracefork): Ditto.
8777
3743bb4f
DE
8778 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
8779 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
8780
8b315be5
PA
87812010-01-21 Pedro Alves <pedro@codesourcery.com>
8782
8783 * proc-service.c (ps_lgetregs): Don't refetch registers from the
8784 target.
8785
85492558
PA
87862010-01-21 Pedro Alves <pedro@codesourcery.com>
8787
8788 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
8789 prototype to take a regcache. Adjust.
8790
442ea881
PA
87912010-01-20 Pedro Alves <pedro@codesourcery.com>
8792
8793 * regcache.h (struct thread_info): Forward declare.
8794 (struct regcache): New.
8795 (new_register_cache): Adjust prototype.
8796 (get_thread_regcache): Declare.
8797 (free_register_cache): Adjust prototype.
8798 (registers_to_string, registers_from_string): Ditto.
8799 (supply_register, supply_register_by_name, collect_register)
8800 (collect_register_as_string, collect_register_by_name): Ditto.
8801 * regcache.c (struct inferior_regcache_data): Delete.
8802 (get_regcache): Rename to ...
8803 (get_thread_regcache): ... this. Adjust. Switch inferior before
8804 fetching registers.
8805 (regcache_invalidate_one): Adjust.
8806 (regcache_invalidate): Fix prototype.
8807 (new_register_cache): Return the new register cache.
8808 (free_register_cache): Change prototype.
8809 (realloc_register_cache): Adjust.
8810 (registers_to_string): Change prototype to take a regcache. Adjust.
8811 (registers_from_string): Ditto.
8812 (register_data): Ditto.
8813 (supply_register): Ditto.
8814 (supply_register_by_name): Ditto.
8815 (collect_register): Ditto.
8816 (collect_register_as_string): Ditto.
8817 (collect_register_by_name): Ditto.
8818 * server.c (process_serial_event): Adjust.
8819 * linux-low.h (regset_fill_func, regset_store_func): Change
8820 prototype.
8821 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
8822 Change prototype.
8823 * linux-low.c (get_stop_pc): Adjust.
8824 (check_removed_breakpoint): Adjust.
8825 (linux_wait_for_event): Adjust.
8826 (linux_resume_one_lwp): Adjust.
8827 (fetch_register): Add regcache parameter. Adjust.
8828 (usr_store_inferior_registers): Ditto.
8829 (regsets_fetch_inferior_registers): Ditto.
8830 (regsets_store_inferior_registers): Ditto.
8831 (linux_fetch_registers, linux_store_registers): Ditto.
8832 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
8833 regcache. Adjust.
43aaf8b6
PA
8834 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
8835 Ditto.
442ea881
PA
8836 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
8837 prototype to take a regcache.
8838 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
8839 * remote-utils.c (convert_ascii_to_int, outreg)
8840 (prepare_resume_reply): Change prototype to take a regcache.
8841 Adjust.
8842 * target.h (struct target_ops) <fetch_registers, store_registers>:
8843 Change prototype to take a regcache.
8844 (fetch_inferior_registers, store_inferior_registers): Change
8845 prototype to take a regcache. Adjust.
8846 * proc-service.c (ps_lgetregs): Adjust.
8847 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
8848 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
8849 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
8850 take a regcache. Adjust.
8851 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
8852 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
8853 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
8854 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
8855 * linux-cris-low.c (cris_get_pc, cris_set_pc)
8856 (cris_cannot_fetch_register):
8857 (cris_breakpoint_at): Change prototype to take a regcache.
8858 Adjust.
8859 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
8860 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
8861 to take a regcache. Adjust.
8862 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
8863 Adjust.
8864 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
8865 take a regcache. Adjust.
8866 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
8867 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
8868 (m68k_set_pc): Change prototype to take a regcache. Adjust.
8869 * linux-mips-low.c (mips_get_pc):
8870 (mips_set_pc): Change prototype to take a regcache. Adjust.
8871 (mips_reinsert_addr): Adjust.
8872 (mips_collect_register): Change prototype to take a regcache.
8873 Adjust.
8874 (mips_supply_register):
8875 (mips_collect_register_32bit, mips_supply_register_32bit)
8876 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
8877 (mips_store_fpregset): Ditto.
43aaf8b6
PA
8878 * linux-ppc-low.c (ppc_supply_ptrace_register)
8879 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
8880 (parse_spufs_run): Adjust.
8881 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
8882 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
8883 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
8884 take a regcache. Adjust.
8885 * linux-s390-low.c (s390_collect_ptrace_register)
8886 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
8887 (s390_set_pc): Change prototype to take a regcache. Adjust.
8888 (s390_arch_setup): Adjust.
8889 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
8890 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
8891 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
8892 (sparc_fill_gregset, sparc_store_gregset_from_stack)
8893 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
8894 regcache. Adjust.
8895 (sparc_breakpoint_at): Adjust.
8896 * linux-xtensa-low.c (xtensa_fill_gregset):
8897 (xtensa_store_gregset):
8898 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
8899 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
8900 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
8901 prototype to take a regcache. Adjust.
8902 * win32-arm-low.c (arm_fetch_inferior_register)
8903 (arm_store_inferior_register): Change prototype to take a
8904 regcache. Adjust.
8905 * win32-i386-low.c (i386_fetch_inferior_register)
8906 (i386_store_inferior_register): Change prototype to take a
8907 regcache. Adjust.
8908 * win32-low.c (child_fetch_inferior_registers)
8909 (child_store_inferior_registers): Change prototype to take a
8910 regcache. Adjust.
8911 (win32_wait): Adjust.
8912 (win32_fetch_inferior_registers): Change prototype to take a
8913 regcache. Adjust.
8914 (win32_store_inferior_registers): Adjust.
8915 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
8916 store_inferior_register>: Change prototype to take a regcache.
8917
60c3d7b0
DE
89182010-01-20 Doug Evans <dje@google.com>
8919
8920 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
8921 #ifdef.
8922 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 8923 (W_STOPCODE): Provide definition if missing.
60c3d7b0 8924
dc146f7c
VP
89252010-01-13 Vladimir Prus <vladimir@codesourcery.com>
8926
8927 * linux-low.c (linux_core_of_thread): New.
8928 (compare_ints, show_process, list_threads): New.
8929 (linux_qxfer_osdata): Report threads and cores.
8930 (linux_target_op): Register linux_core_of_thread.
8931 * remote-utils.c (prepare_resume_reply): Report the core.
8932 (buffer_xml_printf): Support %d specifier.
8933 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
8934 New.
8935 (handle_query): Handle qXfer:threads. Announce availability
8936 thereof.
8937 * target.h (struct target_ops): New field core_of_thread.
8938
7803799a
UW
89392010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
8940
8941 * Makefile.in (clean): Remove new generated files.
8942 (reg-s390.o, reg-s390.c): Remove rules.
8943 (reg-s390x.o, reg-s390x.c): Likewise.
8944 (s390-linux32.o, s390-linux32.c): Add rules.
8945 (s390-linux64.o, s390-linux64.c): Likewise.
8946 (s390x-linux64.o, s390x-linux64.c): Likewise.
8947 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
8948 * linux-s390-low.c: Include <elf.h>.
8949 (HWCAP_S390_HIGH_GPRS): Define if undefined.
8950 (init_registers_s390): Remove prototype.
8951 (init_registers_s390x): Likewise.
8952 (init_registers_s390_linux32): Add prototype.
8953 (init_registers_s390_linux64): Likewise.
8954 (init_registers_s390x_linux64): Likewise.
8955 (s390_num_regs_3264): New define.
8956 (s390_regmap_3264): New global variable.
8957 (s390_cannot_fetch_register): Remove obsolete check.
8958 (s390_cannot_store_register): Likewise.
8959 (s390_collect_ptrace_register): Handle upper/lower register halves.
8960 (s390_supply_ptrace_register): Likewise.
8961 (s390_fill_gregset): Update to register number changes.
8962 (s390_get_hwcap): New routine.
8963 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
8964 Install appropriate regmap and register set.
8965
6e7ffa39
JB
89662010-01-01 Joel Brobecker <brobecker@adacore.com>
8967
8968 * server.c (gdbserver_version): Update copyright year to 2010.
8969 * gdbreplay.c (gdbreplay_version): Likewise.
8970
957f3f49
DE
89712009-12-28 Doug Evans <dje@google.com>
8972
8973 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
8974 elf/external.h. Include <elf.h> instead but only if necessary.
8975
ca5c370d
PA
89762009-12-28 Pedro Alves <pedro@codesourcery.com>
8977
8978 * linux-low.c (linux_remove_process): Remove `detaching'
8979 parameter. Don't release/detach from thread_db here.
8980 (linux_kill): Release/detach from thread_db here, ...
8981 (linux_detach): ... and here, before actually detaching.
8982 (linux_wait_1): ... and here, when a process exits.
8983 * thread-db.c (any_thread_of): New.
8984 (thread_db_free): Switch the current inferior to a thread of the
8985 passed in process.
8986
4ee62156
DE
89872009-12-21 Doug Evans <dje@google.com>
8988
d90e6a88
DE
8989 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
8990
c5f62d5f
DE
8991 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
8992 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
8993 warning ifndef __NR_tkill. Move setting of errno there too.
8994 Delete unnecessary resetting of errno after syscall.
8995 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
8996
10e86dd7
DE
8997 * configure.ac: Check for dladdr.
8998 * config.in: Regenerate.
8999 * configure: Regenerate.
9000 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
9001 (try_thread_db_load): Update.
9002
4ee62156
DE
9003 * linux-low.c (my_waitpid): Delete unnecessary prototype.
9004
00f515da
DE
90052009-12-18 Doug Evans <dje@google.com>
9006
e9464885
DE
9007 * event-loop.c: Include unistd.h if it exists.
9008
07d4f67e
DE
9009 * linux-low.c (my_waitpid): Move definition away from being in
9010 between linux_tracefork_child/linux_test_for_tracefork.
9011
00f515da
DE
9012 * gdb_proc_service.h (psaddr_t): Fix type.
9013 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
9014 signature to match glibc.
9015
1de1badb
DE
90162009-12-16 Doug Evans <dje@google.com>
9017
9018 * linux-low.c (linux_read_memory): Fix argument to read.
9019
aeeb81d1
PA
90202009-11-26 Pedro Alves <pedro@codesourcery.com>
9021
9022 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
9023 events, don't leave current_inferior pointing at null.
9024
10357975
PA
90252009-11-26 Pedro Alves <pedro@codesourcery.com>
9026
9027 * win32-low.c (LOG): Delete.
9028 (OUTMSG): Output to stderr.
9029 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
9030 on compile time LOG macro.
9031 (win32_wait): Fix debug output.
9032
cf6e3471
PA
90332009-11-26 Pedro Alves <pedro@codesourcery.com>
9034
9035 * win32-low.c (win32_add_one_solib): If the dll name is
9036 "ntdll.dll", prepend the system directory to the dll path.
9037
0c85e18e
MK
90382009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
9039
9040 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
9041
9ac544ce 90422009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 9043 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
9044
9045 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
9046 * configure.ac: Check for __mcoldfire__ and set
9047 gdb_cv_m68k_is_coldfire.
9048 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
9049 reg-cf.o and reg-m68k.o.
9050 * configure: Regenerated.
9051
fd7dd3e6
PA
90522009-11-16 Pedro Alves <pedro@codesourcery.com>
9053
9054 * linux-low.c (linux_remove_process): Add `detaching' parameter.
9055 Pass it to thread_db_free.
9056 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
9057 proper `detaching' argument to linux_remove_process.
9058 * linux-low.h (thread_db_free): Add `detaching' parameter.
9059 * thread-db.c (thread_db_init): Pass false as `detaching' argument
9060 to thread_db_free.
9061 (thread_db_free): Add `detaching' parameter. Only
9062 call td_ta_clear_event if detaching from process.
9063
75aa492e
MK
90642009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
9065
9066 * thread-db.c (thread_db_free): Fix typo.
9067
21e1bee4
PP
90682009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
9069
9070 PR gdb/10838
9071 * thread-db.c (thread_db_free): Call td_ta_clear_event.
9072
8838b45e
NS
90732009-11-03 Nathan Sidwell <nathan@codesourcery.com>
9074
9075 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
9076 with an i686 compiler.
9077 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
9078 needed.
9079 * configure: Rebuilt.
9080
8a35fb51
SL
90812009-10-29 Sandra Loosemore <sandra@codesourcery.com>
9082
9083 PR gdb/10783
9084
9085 * server.c (handle_search_memory_1): Correct read_addr initialization
9086 in loop for searching subsequent chunks.
9087
96f15937
PP
90882009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
9089
9090 * configure.ac: New --with-libthread-db option.
9091 * thread-db.c: Allow direct dependence on libthread_db.
9092 (thread_db_free): Adjust.
9093 * config.in: Regenerate.
9094 * configure: Likewise.
889bf7c5 9095
5f7d1694
PP
90962009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
9097
9098 PR gdb/10757
9099 * thread-db.c (attach_thread): New function.
9100 (maybe_attach_thread): Return success/failure.
9101 (find_new_threads_callback): Adjust.
889bf7c5
PA
9102 (thread_db_find_new_threads): Loop until no new threads.
9103
88e3b899
PA
91042009-10-13 Pedro Alves <pedro@codesourcery.com>
9105
9106 * proc-service.c (ps_lgetregs): Formatting.
9107
cdbfd419
PP
91082009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
9109
9110 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
9111 * configure.ac: Adjust.
9112 * linux-low.h (struct process_info_private): Move members to struct
9113 thread_db.
9114 (thread_db_free, thread_db_handle_monitor_command): New prototype.
9115 * linux-low.c (linux_remove_process): Adjust.
9116 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
9117 * server.c (handle_query): Move code ...
9118 (handle_monitor_command): ... here. New function.
9119 * target.h (struct target_ops): New member.
9120 * thread-db.c (struct thread_db): New.
9121 (libthread_db_search_path): New variable.
9122 (thread_db_create_event, thread_db_enable_reporting)
9123 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
9124 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
9125 (try_thread_db_load_1, dladdr_to_soname): New functions.
9126 (try_thread_db_load, thread_db_load_search): New functions.
9127 (thread_db_init): Search for libthread_db.
9128 (thread_db_free): New function.
9129 (thread_db_handle_monitor_command): Likewise.
9130 * config.in: Regenerate.
9131 * configure: Regenerate.
889bf7c5 9132
4168d2d6
UW
91332009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
9134
9135 * spu-low.c (spu_kill): Wait for inferior to terminate.
9136 Call clear_inferiors.
9137 (spu_detach): Call clear_inferiors.
9138
81ecdfbb
RW
91392009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9140
9141 * aclocal.m4: Regenerate.
9142 * config.in: Likewise.
9143 * configure: Likewise.
9144
0b9ff2c0
UW
91452009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9146
9147 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
9148 (parse_spufs_run): New function.
9149 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
9150 (ppc_breakpoint_at): Handle SPU breakpoints.
9151
efcbbd14
UW
91522009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9153
9154 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
9155 (SPUFS_MAGIC): Define.
9156 (spu_enumerate_spu_ids): New function.
9157 (linux_qxfer_spu): New function.
9158 (linux_target_ops): Install linux_qxfer_spu.
9159
f4d9bade
UW
91602009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9161
9162 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
9163 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
9164 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
9165 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
9166 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
9167 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
9168 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
9169 (init_registers_powerpc_cell32l): Add prototype.
9170 (init_registers_powerpc_cell64l): Likewise.
9171 (ppc_arch_setup): Detect Cell/B.E. architecture.
9172
96e946ca
RW
91732009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9174
9175 * Makefile.in (datarootdir): New variable.
9176
58d6951d
DJ
91772009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
9178
9179 * linux-low.c (linux_write_memory): Update debugging output.
9180 * Makefile.in (clean): Add new descriptions.
9181 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
9182 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
9183 * configure.srv: Add new files for arm*-*-linux*.
9184 * linux-arm-low.c: Add new declarations.
9185 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
9186 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
9187 (HWCAP_VFPv3D16): New.
9188 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
9189 instead of __IWMMXT__.
9190 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
9191 (arm_arch_setup): New.
9192 (target_regsets): Remove #ifdef. Add VFP regset.
9193 (the_low_target): Use arm_arch_setup.
9194
12b42a12
DJ
91952009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
9196
9197 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
9198 the main thread again.
9199
ac8c974e
AR
92002009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
9201
9202 Adding Neutrino gdbserver.
9203 * configure: Regenerated.
9204 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
9205 * configure.srv (i[34567]86-*-nto*): New target.
9206 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
9207 * remote-utils.c [__QNX__]: Include sys/iomgr.h
9208 (nto_comctrl) [__QNX__]: New function.
9209 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
9210
4424e0c3 92112009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
9212
9213 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
9214 srv_tgtobj.
9215
912cf4ba
PA
92162009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
9217 Pedro Alves <pedro@codesourcery.com>
9218
9219 * win32-i386-low.c (i386_get_thread_context): Handle systems that
9220 don't support CONTEXT_EXTENDED_REGISTERS.
9221 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
9222 (the_low_target): Install them.
9223 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
9224 failing with ERROR_PIPE_NOT_CONNECTED.
9225
aa5ca48f
DE
92262009-06-30 Doug Evans <dje@google.com>
9227 Pierre Muller <muller@ics.u-strasbg.fr>
9228
9229 Add h/w watchpoint support to x86-linux, win32-i386.
9230 * Makefile.in (SFILES): Add i386-low.c
9231 (i386_low_h): Define.
9232 (i386-low.o): Add dependencies.
9233 (linux-x86-low.o): Add i386-low.h dependency.
9234 (win32-i386-low.o): Ditto.
9235 * i386-low.c: New file.
9236 * i386-low.h: New file.
9237 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
9238 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
9239 * linux-low.c (linux_add_process): Initialize arch_private.
9240 (linux_remove_process): Free arch_private.
9241 (add_lwp): Initialize arch_private.
9242 (delete_lwp): Free arch_private.
9243 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
9244 provided.
9245 * linux-low.h (process_info_private): New member arch_private.
9246 (lwp_info): New member arch_private.
9247 (linux_target_ops): New members new_process, new_thread,
9248 prepare_to_resume.
9249 (ptid_of): New macro.
9250 * linux-x86-low.c: Include stddef.h, i386-low.h.
9251 (arch_process_info): New struct.
9252 (arch_lwp_info): New struct.
9253 (x86_linux_dr_get, x86_linux_dr_set): New functions.
9254 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
9255 (i386_dr_low_get_status): New function.
9256 (x86_insert_point, x86_remove_point): New functions.
9257 (x86_stopped_by_watchpoint): New function.
9258 (x86_stopped_data_address): New function.
9259 (x86_linux_new_process, x86_linux_new_thread): New functions.
9260 (x86_linux_prepare_to_resume): New function.
9261 (the_low_target): Add entries for insert_point, remove_point,
9262 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
9263 prepare_to_resume.
9264 * server.c (debug_hw_points): New global.
9265 (monitor_show_help): Document set debug-hw-points.
9266 (handle_query): Process "set debug-hw-points".
9267 * server.h (debug_hw_points): Declare.
9268 (paddress): Declare.
9269 * utils.c (NUMCELLS, CELLSIZE): New macros.
9270 (get_sell, xsnprintf, paddress): New functions.
9271 * win32-arm-low.c (the_low_target): Add entries for insert_point,
9272 remove_point, stopped_by_watchpoint, stopped_data_address.
9273 * win32-i386-low.c: Include i386-low.h.
9274 (debug_reg_state): Replaces dr.
9275 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
9276 (i386_dr_low_get_status): New function.
9277 (i386_insert_point, i386_remove_point): New functions.
9278 (i386_stopped_by_watchpoint): New function.
9279 (i386_stopped_data_address): New function.
9280 (i386_initial_stuff): Update.
9281 (get_thread_context,set_thread_context,i386_thread_added): Update.
9282 (the_low_target): Add entries for insert_point,
9283 remove_point, stopped_by_watchpoint, stopped_data_address.
9284 * win32-low.c (win32_insert_watchpoint): New function.
9285 (win32_remove_watchpoint): New function.
9286 (win32_stopped_by_watchpoint): New function.
9287 (win32_stopped_data_address): New function.
9288 (win32_target_ops): Add entries for insert_watchpoint,
9289 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
9290 * win32-low.h (win32_target_ops): New members insert_point,
9291 remove_point, stopped_by_watchpoint, stopped_data_address.
9292
d993e290
PA
92932009-06-25 Pedro Alves <pedro@codesourcery.com>
9294
9295 * server.c (process_serial_event): Re-return unsupported, not
9296 error, if the type isn't recognized. Re-allow supporting only
9297 insert or remove packets. Also call require_running for
9298 breakpoints. Add missing break statement to default case. Tidy.
9299 * target.h (struct target_ops): Rename insert_watchpoint to
9300 insert_point, and remove_watchpoint to remove_point.
9301
9302 * linux-low.h (struct linux_target_ops): Likewise.
9303 * linux-low.c (linux_insert_watchpoint): Rename to ...
9304 (linux_insert_point): ... this. Adjust.
9305 (linux_remove_watchpoint): Rename to ...
9306 (linux_remove_point): ... this. Adjust.
9307 (linux_target_ops): Adjust.
9308 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
9309 (cris_insert_point): ... this.
9310 (cris_remove_watchpoint): Rename to ...
9311 (cris_remove_point): ... this.
9312 (the_low_target): Adjust.
9313
0f54c268
PM
93142009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
9315
9316 * server.c (handle_v_kill): Pass signal_pid to
9317 kill_inferior if multi_process is zero.
9318
c6314022
AR
93192009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
9320
9321 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
9322 * target.h (target_ops): Comment for *_watchpoint to make it clear
9323 the functions can get types '0' and '1'.
9324
4463ce24
AR
93252009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
9326
9327 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
9328 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
9329 * regcache.c (get_regcache): Likewise.
9330 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
9331 * win32-low.c (child_fetch_inferior_registers): Remove check for
9332 regno 0.
9333
cf8fd78b
PA
93342009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
9335 Pedro Alves <pedro@codesourcery.com>
9336
9337 * target.h (struct target_ops) <supports_multi_process>: New
9338 callback.
9339 (target_supports_multi_process): New.
9340 * server.c (handle_query): Even if GDB reports support, only
9341 enable multi-process if the target also supports it. Report
9342 multi-process support only if the target backend supports it.
9343 * linux-low.c (linux_supports_multi_process): New function.
9344 (linux_target_ops): Install it as target_supports_multi_process
9345 callback.
9346
47c0c975
DE
93472009-05-24 Doug Evans <dje@google.com>
9348
e09875d4
DE
9349 Global renaming of find_thread_pid to find_thread_ptid.
9350 * server.h (find_thread_ptid): Renamed from find_thread_pid.
9351 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
9352 All callers updated.
9353
e27d73f6
DE
9354 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
9355 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
9356 directly.
9357
47c0c975
DE
9358 * linux-low.c (get_stop_pc): Print pc if debug_threads.
9359 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
9360 (linux_resume_one_lwp): Ditto.
9361
2acc282a
DE
93622009-05-23 Doug Evans <dje@google.com>
9363
9364 * linux-low.c (linux_resume_one_lwp): Change type of first arg
9365 from struct inferior_list_entry * to struct lwp_info *.
9366 All callers updated.
9367
9f1036c1
DE
93682009-05-13 Doug Evans <dje@google.com>
9369
9370 * linux-x86-low.c: Don't include assert.h.
9371 (x86_siginfo_fixup): Use fatal, not assert.
9372 (x86_arch_setup): Fix comment.
9373
d0722149
DE
93742009-05-12 Doug Evans <dje@google.com>
9375
9376 Biarch support for i386/amd64 gdbserver.
9377 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
9378 Add linux-x86-low.c.
9379 (linux-i386-low.o, linux-x86-64-low.o): Delete.
9380 (linux-x86-low.o): Add.
9381 * linux-x86-64-low.c: Delete.
9382 * linux-i386-low.c: Delete.
9383 * linux-x86-low.c: New file.
9384 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
9385 linux-x86-low.o.
9386 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
9387 linux-x86-low.o.
9388 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
9389 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
9390 (linux_child_pid_to_exec_file): New function.
9391 (elf_64_header_p, elf_64_file_p): New functions.
9392 (siginfo_fixup): New function.
9393 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
9394 give target a chance to convert layout.
9395 * linux-low.h (linux_target_ops): New member siginfo_fixup.
9396 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
9397
fdeb2a12
DE
93982009-05-07 Doug Evans <dje@google.com>
9399
9400 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
9401 (regsets_store_inferior_registers): Ditto.
9402
a6dbe5df
PA
94032009-05-06 Pedro Alves <pedro@codesourcery.com>
9404
9405 PR server/10048
9406
9407 * linux-low.c (must_set_ptrace_flags): Delete.
9408 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
9409 of the global.
9410 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
9411 `lwp->must_set_ptrace_flags' instead.
ba42693b 9412 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
9413 (linux_wait_1): ... not here.
9414
5091eb23
DE
94152009-04-30 Doug Evans <dje@google.com>
9416
9f767825
DE
9417 * inferiors.c (started_inferior_callback): New function.
9418 (attached_inferior_callback): New function.
9419 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
9420 * server.c (print_started_pid, print_attached_pid): New functions.
9421 (detach_or_kill_for_exit): New function.
9422 (main): Call it instead of for_each_inferior (kill_inferior_callback).
9423 * server.h (have_started_inferiors_p): Declare.
9424 (have_attached_inferiors_p): Declare.
9425
5091eb23
DE
9426 * inferiors.c (remove_process): Fix memory leak, free process.
9427 * linux-low.c (linux_remove_process): New function.
9428 (linux_kill): Call it instead of remove_process.
9429 (linux_detach, linux_wait_1): Ditto.
9430
155c8968
PA
94312009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
9432
9433 * configure.srv: Add x86 Windows CE target.
9434
7fe519cb
UW
94352009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
9436
9437 * inferiors.c (get_thread_process): Make global.
9438 * server.h (get_thread_process): Add prototype.
9439 * thread-db.c (find_one_thread): Use get_thread_process
9440 instead of current_process.
9441 (thread_db_get_tls_address): Do not crash if called when
9442 thread layer is not yet initialized.
9443
5472f405
UW
94442009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
9445
9446 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
9447 * spu-low.c (current_tid): Rename to ...
9448 (current_ptid): ... this.
9449 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
9450 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
9451 ptid_get_lwp (current_ptid) instead of current_tid.
9452 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
9453 instead of current_tid. Use find_process_pid to verify pid
9454 argument is valid. Pass proper argument to remove_process.
9455 (spu_thread_alive): Compare current_ptid instead of current_tid.
9456 (spu_resume): Likewise.
9457
55ac2b99
PA
94582009-04-02 Pedro Alves <pedro@codesourcery.com>
9459
9460 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
9461 variable.
9462
95954743
PA
94632009-04-01 Pedro Alves <pedro@codesourcery.com>
9464
9465 Implement the multiprocess extensions, and add linux multiprocess
9466 support.
9467
9468 * server.h (ULONGEST): Declare.
9469 (struct ptid, ptid_t): New.
9470 (minus_one_ptid, null_ptid): Declare.
9471 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
9472 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
9473 (struct inferior_list_entry): Change `id' type from unsigned from
9474 to ptid_t.
9475 (struct sym_cache, struct breakpoint, struct
9476 process_info_private): Forward declare.
9477 (struct process_info): Declare.
9478 (current_process): Declare.
9479 (all_processes): Declare.
9480 (initialize_inferiors): Declare.
9481 (add_thread): Adjust to use ptid_t.
9482 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
9483 (add_process, remove_process, find_thread_pid): Declare.
9484 (find_inferior_id): Adjust to use ptid_t.
9485 (cont_thread, general_thread, step_thread): Change type to ptid_t.
9486 (multi_process): Declare.
9487 (push_event): Adjust to use ptid_t.
9488 (read_ptid, write_ptid): Declare.
9489 (prepare_resume_reply): Adjust to use ptid_t.
9490 (clear_symbol_cache): Declare.
9491 * inferiors.c (all_processes): New.
9492 (null_ptid, minus_one_ptid): New.
9493 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
9494 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
9495 (add_thread): Change unsigned long to ptid. Remove gdb_id
9496 parameter. Adjust.
9497 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
9498 (gdb_id_to_thread): Rename to ...
9499 (find_thread_pid): ... this. Change unsigned long to ptid.
9500 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
9501 (loaded_dll, pull_pid_from_list): Adjust.
9502 (add_process, remove_process, find_process_pid)
9503 (get_thread_process, current_process, initialize_inferiors): New.
9504 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
9505 (struct target_waitstatus) <related_pid>: Ditto.
9506 (struct target_ops) <kill, detach>: Add `pid' argument. Change
9507 return type to int.
9508 (struct target_ops) <join>: Add `pid' argument.
9509 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
9510 (struct target_ops) <wait>: Add `ptid' field. Change return type
9511 to ptid.
9512 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
9513 (mywait): Add `ptid' argument. Change return type to ptid_t.
9514 (target_pid_to_str): Declare.
9515 * target.c (set_desired_inferior): Adjust to use ptids.
9516 (mywait): Add new `ptid' argument. Adjust.
9517 (target_pid_to_str): New.
9518 * mem-break.h (free_all_breakpoints): Declare.
9519 * mem-break.c (breakpoints): Delelete.
9520 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
9521 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
9522 to use per-process breakpoint list.
9523 (free_all_breakpoints): New.
9524 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
9525 (symbol_cache, all_symbols_looked_up): Delete.
9526 (hexchars): New.
9527 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
9528 read_ptid): New.
9529 (prepare_resume_reply): Change ptid argument's type from unsigned
9530 long to ptid_t. Adjust. Implement W;process and X;process.
9531 (free_sym_cache, clear_symbol_cache): New.
9532 (look_up_one_symbol): Adjust to per-process symbol cache. *
9533 * server.c (cont_thread, general_thread, step_thread): Change type
9534 to ptid_t.
9535 (attached): Delete.
9536 (multi_process): New.
9537 (last_ptid): Change type to ptid_t.
9538 (struct vstop_notif) <ptid>: Change type to ptid_t.
9539 (queue_stop_reply, push_event): Change `ptid' argument's type to
9540 ptid_t.
9541 (discard_queued_stop_replies): Add `pid' argument.
9542 (start_inferior): Adjust to use ptids. Adjust to mywait interface
9543 changes. Don't reference the `attached' global.
9544 (attach_inferior): Adjust to mywait interface changes.
9545 (handle_query): Adjust to use ptids. Parse GDB's qSupported
9546 features. Handle and report "multiprocess+". Handle
9547 "qAttached:PID".
9548 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
9549 changes.
9550 (handle_v_kill): New.
9551 (handle_v_stopped): Adjust to use target_pid_to_str.
9552 (handle_v_requests): Allow multiple attaches and runs when
9553 multiprocess extensions are in effect. Handle "vKill".
9554 (myresume): Adjust to use ptids.
9555 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
9556 (handle_status): Adjust to discard_queued_stop_replies interface
9557 change.
9558 (first_thread_of, kill_inferior_callback)
9559 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
9560 (main): Call initialize_inferiors. Adjust to use ptids, killing
9561 and detaching from all inferiors. Handle multiprocess packet
9562 variants.
9563 * linux-low.h: Include gdb_proc_service.h.
9564 (struct process_info_private): New.
9565 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
9566 <lwpid_of>: Use ptid_get_lwp.
9567 (get_lwp_thread): Adjust.
9568 (struct lwp_info): Add `dead' member.
9569 (find_lwp_pid): Declare.
9570 * linux-low.c (thread_db_active): Delete.
9571 (new_inferior): Adjust comment.
9572 (inferior_pid): Delete.
9573 (linux_add_process): New.
9574 (handle_extended_wait): Adjust.
9575 (add_lwp): Change unsigned long to ptid.
9576 (linux_create_inferior): Add process to processes table. Adjust
9577 to use ptids. Don't set new_inferior here.
9578 (linux_attach_lwp): Rename to ...
9579 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
9580 it. Adjust to use ptids.
9581 (linux_attach_lwp): New.
9582 (linux_attach): Add process to processes table. Don't set
9583 new_inferior here.
9584 (struct counter): New.
9585 (second_thread_of_pid_p, last_thread_of_process_p): New.
9586 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
9587 multiple processes.
9588 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
9589 processes. Remove process from process table.
9590 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
9591 to multiple processes.
9592 (any_thread_of): New.
9593 (linux_detach): Add `pid' argument, and handle it. Remove process
9594 from processes table.
9595 (linux_join): Add `pid' argument. Handle it.
9596 (linux_thread_alive): Change unsighed long argument to ptid_t.
9597 Consider dead lwps as not being alive.
9598 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
9599 threads we're not interested in.
9600 (same_lwp, find_lwp_pid): New.
9601 (linux_wait_for_lwp): Change `pid' argument's type from int to
9602 ptid_t. Adjust.
9603 (linux_wait_for_event): Rename to ...
9604 (linux_wait_for_event_1): ... this. Change `pid' argument's type
9605 from int to ptid_t. Adjust.
9606 (linux_wait_for_event): New.
9607 (linux_wait_1): Add `ptid' argument. Change return type to
9608 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
9609 that exit from the process table.
9610 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
9611 Adjust.
9612 (mark_lwp_dead): New.
9613 (wait_for_sigstop): Adjust to use ptids. If a process exits while
9614 stopping all threads, mark its main lwp as dead.
9615 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
9616 ptids.
9617 (fetch_register, usr_store_inferior_registers)
9618 (regsets_fetch_inferior_registers)
9619 (regsets_store_inferior_registers, linux_read_memory)
9620 (linux_write_memory): Inline `inferior_pid'.
9621 (linux_look_up_symbols): Adjust to use per-process
9622 `thread_db_active'.
9623 (linux_request_interrupt): Adjust to use ptids.
9624 (linux_read_auxv): Inline `inferior_pid'.
9625 (initialize_low): Don't reference thread_db_active.
9626 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
9627 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
9628 (ps_getpid): Return the pid of the current inferior.
9629 * thread-db.c (proc_handle, thread_agent): Delete.
9630 (thread_db_create_event, thread_db_enable_reporting): Adjust to
9631 per-process data.
9632 (find_one_thread): Change argument type to ptid_t. Adjust to
9633 per-process data.
9634 (maybe_attach_thread): Adjust to per-process data and ptids.
9635 (thread_db_find_new_threads): Ditto.
9636 (thread_db_init): Ditto.
9637 * spu-low.c (spu_create_inferior, spu_attach): Add process to
9638 processes table. Adjust to use ptids.
9639 (spu_kill, spu_detach): Adjust interface. Remove process from
9640 processes table.
9641 (spu_join, spu_thread_alive): Adjust interface.
9642 (spu_wait): Adjust interface. Remove process from processes
9643 table. Adjust to use ptids.
9644 * win32-low.c (current_inferior_tid): Delete.
9645 (current_inferior_ptid): New.
9646 (debug_event_ptid): New.
9647 (thread_rec): Take a ptid. Adjust.
9648 (child_add_thread): Add `pid' argument. Adjust to use ptids.
9649 (child_delete_thread): Ditto.
9650 (do_initial_child_stuff): Add `attached' argument. Add process to
9651 processes table.
9652 (child_fetch_inferior_registers, child_store_inferior_registers):
9653 Adjust.
9654 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
9655 (win32_attach): Pass 1 to do_initial_child_stuff.
9656 (win32_kill): Adjust interface. Remove process from processes
9657 table.
9658 (win32_detach): Ditto.
9659 (win32_join): Adjust interface.
9660 (win32_thread_alive): Take a ptid.
9661 (win32_resume): Adjust to use ptids.
9662 (get_child_debug_event): Ditto.
9663 (win32_wait): Adjust interface. Remove exiting process from
9664 processes table.
9665
bd99dc85
PA
96662009-04-01 Pedro Alves <pedro@codesourcery.com>
9667
9668 Non-stop mode support.
9669
9670 * server.h (non_stop): Declare.
9671 (gdb_client_data, handler_func): Declare.
9672 (delete_file_handler, add_file_handler, start_event_loop):
9673 Declare.
9674 (handle_serial_event, handle_target_event, push_event)
9675 (putpkt_notif): Declare.
9676 * target.h (enum resume_kind): New.
9677 (struct thread_resume): Replace `step' field by `kind' field.
9678 (TARGET_WNOHANG): Define.
9679 (struct target_ops) <wait>: Add `options' argument.
9680 <supports_non_stop, async, start_non_stop>: New fields.
9681 (target_supports_non_stop, target_async): New.
9682 (start_non_stop): Declare.
9683 (mywait): Add `options' argument.
9684 * target.c (mywait): Add `options' argument. Print child exit
9685 notifications here.
9686 (start_non_stop): New.
9687 * server.c (non_stop, own_buf, mem_buf): New globals.
9688 (struct vstop_notif): New.
9689 (notif_queue): New global.
9690 (queue_stop_reply, push_event, discard_queued_stop_replies)
9691 (send_next_stop_reply): New.
9692 (start_inferior): Adjust to use resume_kind. Adjust to mywait
9693 interface changes.
9694 (attach_inferior): In non-stop mode, don't wait for the target
9695 here.
9696 (handle_general_set): Handle QNonStop.
9697 (handle_query): When handling qC, return the current general
9698 thread, instead of the first thread of the list.
9699 (handle_query): If the backend supports non-stop mode, include
9700 QNonStop+ in the qSupported query response.
9701 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
9702 and non-stop mode.
9703 (handle_v_attach, handle_v_run): Handle non-stop mode.
9704 (handle_v_stopped): New.
9705 (handle_v_requests): Report support for vCont;t. Handle vStopped.
9706 (myresume): Adjust to use resume_kind. Handle non-stop.
9707 (queue_stop_reply_callback): New.
9708 (handle_status): Handle non-stop mode.
9709 (main): Clear non_stop flag on reconnection. Use the event-loop.
9710 Refactor serial protocol handling from here ...
9711 (process_serial_event): ... to this new function. When GDB
9712 selects any thread, select one here. In non-stop mode, wait until
9713 GDB acks all pending events before exiting.
9714 (handle_serial_event, handle_target_event): New.
9715 * remote-utils.c (remote_open): Install remote_desc in the event
9716 loop.
9717 (remote_close): Remove remote_desc from the event loop.
9718 (putpkt_binary): Rename to...
9719 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
9720 (putpkt_binary): New as wrapper around putpkt_binary_1.
9721 (putpkt_notif): New.
9722 (prepare_resume_reply): In non-stop mode, don't change the
9723 general_thread.
9724 * event-loop.c: New.
9725 * Makefile.in (OBJ): Add event-loop.o.
9726 (event-loop.o): New rule.
9727
9728 * linux-low.h (pid_of): Moved here.
9729 (lwpid_of): New.
9730 (get_lwp_thread): Use lwpid_of.
9731 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
9732 * linux-low.c (pid_of): Delete.
9733 (inferior_pid): Use lwpid_of.
9734 (linux_event_pipe): New.
9735 (target_is_async_p): New.
9736 (delete_lwp): New.
9737 (handle_extended_wait): Use lwpid_of.
9738 (add_lwp): Don't set lwpid field.
9739 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
9740 (linux_kill_one_lwp): If killing a running lwp, stop it first.
9741 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
9742 (linux_detach_one_lwp): If detaching from a running lwp, stop it
9743 first. Adjust to linux_wait_for_event interface changes. Use
9744 lwpid_of.
9745 (linux_detach): Don't delete the main lwp here.
9746 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
9747 (status_pending_p): Don't consider explicitly suspended lwps.
9748 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
9749 pointer. Add OPTIONS argument. Change return type to int. Use
9750 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
9751 (linux_wait_for_event): Take an integer pid instead of a lwp_info
9752 pointer. Add status pointer argument. Return a pid instead of a
9753 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
9754 changes. In non-stop mode, don't switch to a random thread.
9755 (linux_wait): Rename to...
9756 (linux_wait_1): ... this. Add target_options argument, and handle
9757 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
9758 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
9759 clean exit and signal exit code. Don't stop all threads in
9760 non-stop mode. In all-stop mode, only stop all threads when
9761 reporting a stop to GDB. Handle explicit thread stop requests.
9762 (async_file_flush, async_file_mark): New.
9763 (linux_wait): New.
9764 (send_sigstop): Use lwpid_of.
9765 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
9766 interface changes. In non-stop mode, don't switch to a random
9767 thread.
9768 (linux_resume_one_lwp): Use lwpid_of.
9769 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
9770 (linux_resume_one_thread): ... this. Handle resume_stop. In
9771 non-stop mode, don't look for pending flag in all threads.
9772 (resume_status_pending_p): Don't consider explicitly suspended
9773 threads.
9774 (my_waitpid): Reimplement. Emulate __WALL.
9775 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
9776 Use lwpid_of.
9777 (sigchld_handler, linux_supports_non_stop, linux_async)
9778 (linux_start_non_stop): New.
9779 (linux_target_ops): Register linux_supports_non_stop, linux_async
9780 and linux_start_non_stop.
9781 (initialize_low): Install SIGCHLD handler.
9782 * thread-db.c (thread_db_create_event, find_one_thread)
9783 (thread_db_get_tls_address): Use lwpid_of.
9784 * win32-low.c (win32_detach): Adjust to use resume_kind.
9785 (win32_wait): Add `options' argument.
9786 * spu-low.c (spu_resume): Adjust to use resume_kind.
9787 (spu_wait): Add `options' argument.
9788
5b1c542e
PA
97892009-04-01 Pedro Alves <pedro@codesourcery.com>
9790
9791 Decouple target code from remote protocol.
9792
9793 * target.h (enum target_waitkind): New.
9794 (struct target_waitstatus): New.
9795 (struct target_ops) <wait>: Return an unsigned long. Take a
9796 target_waitstatus pointer instead of a char pointer.
9797 (mywait): Likewise.
9798 * target.c (mywait): Change prototype to return an unsigned long.
9799 Take a target_waitstatus pointer instead of a char pointer. Adjust.
9800 * server.h (thread_from_wait, old_thread_from_wait): Delete
9801 declarations.
9802 (prepare_resume_reply): Change prototype to take a
9803 target_waitstatus.
9804 * server.c (thread_from_wait, old_thread_from_wait): Delete.
9805 (last_status, last_ptid): New.
9806 (start_inferior): Remove "statusptr" argument. Adjust. Return a
9807 pid instead of a signal.
9808 (attach_inferior): Remove "status" and "signal" parameters.
9809 Adjust.
9810 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
9811 not as an address.
9812 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
9813 (handle_v_requests, myresume): Remove "status" and "signal"
9814 parameters. Adjust.
9815 (handle_status): New.
9816 (main): Delete local `status'. Adjust.
9817 * remote-utils.c: Include target.h.
9818 (prepare_resume_reply): Change prototype to take a
9819 target_waitstatus. Adjust.
9820
9821 * linux-low.c (linux_wait): Adjust to new target_ops->wait
9822 interface.
9823 * spu-low.c (spu_wait): Adjust.
9824 * win32-low.c (enum target_waitkind, struct target_waitstatus):
9825 Delete.
9826 (win32_wait): Adjust.
9827
2bd7c093
PA
98282009-04-01 Pedro Alves <pedro@codesourcery.com>
9829
9830 * target.h (struct thread_resume): Delete leave_stopped member.
9831 (struct target_ops): Add a `n' argument to the `resume' callback.
9832 * server.c (start_inferior): Adjust.
9833 (handle_v_cont, myresume): Adjust.
9834 * linux-low.c (check_removed_breakpoint): Adjust to resume
9835 interface change, and to removed leave_stopped field.
9836 (resume_ptr): Delete.
9837 (struct thread_resume_array): New.
9838 (linux_set_resume_request): Add new `arg' parameter. Adjust to
9839 resume interface change.
9840 (linux_continue_one_thread, linux_queue_one_thread)
9841 (resume_status_pending_p): Check if the resume field is NULL
9842 instead of checking the leave_stopped member.
9843 (linux_resume): Adjust to the target resume interface change.
9844 * spu-low.c (spu_resume): Adjust to the target resume interface
9845 change.
9846 * win32-low.c (win32_detach, win32_resume): Ditto.
9847
c35fafde
PA
98482009-04-01 Pedro Alves <pedro@codesourcery.com>
9849
9850 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
9851 flag.
9852 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
9853 pending.
9854 (linux_continue_one_thread): Only preserve the stepping flag if
9855 there's a pending breakpoint.
9856
0a59d50b
PA
98572009-03-31 Pedro Alves <pedro@codesourcery.com>
9858
9859 * server.c (main): After the inferior having exited, call
9860 remote_close before exiting gdbserver.
9861
f04c6d38
TJB
98622009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
9863
9864 Fix size of FPSCR in Power 7 processors.
9865 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
9866 (PPC_FEATURE_HAS_DFP): New #define.
9867 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
9868 size of the FPSCR.
9869
78e5cee6
PA
98702009-03-23 Pedro Alves <pedro@codesourcery.com>
9871
9872 * server.c (handle_query) Whitespace and formatting.
9873
1b3f6016
PA
98742009-03-22 Pedro Alves <pedro@codesourcery.com>
9875
9876 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
9877 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
9878 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
9879 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
9880 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
9881 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
9882 Makefile.in, configure.ac: Fix whitespace throughout.
9883 * configure: Regenerate.
9884
a07b2135
PA
98852009-03-22 Pedro Alves <pedro@codesourcery.com>
9886
9887 * inferiors.c (find_inferior): Make it safe for the callback
9888 function to delete the currently iterated inferior.
9889
67cc2626
PA
98902009-03-22 Pedro Alves <pedro@codesourcery.com>
9891
9892 * Makefile.in (linuw_low_h): Move higher.
9893 (thread-db.o): Depend on $(linux_low_h).
9894
54a0b537
PA
98952009-03-17 Pedro Alves <pedro@codesourcery.com>
9896
9897 Rename "process" to "lwp" throughout.
9898
9899 * linux-low.c (all_processes): Rename to...
9900 (all_lwps): ... this.
9901 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
9902 (add_process): Rename to ...
9903 (add_lwp): ... this. Adjust.
9904 (linux_create_inferior): Adjust.
9905 (linux_attach_lwp): Adjust.
9906 (linux_attach): Adjust.
9907 (linux_kill_one_process): Rename to ...
9908 (linux_kill_one_lwp): ... this. Adjust.
9909 (linux_kill): Adjust.
9910 (linux_detach_one_process): Rename to ...
9911 (linux_detach_one_lwp): ... this. Adjust.
9912 (linux_detach): Adjust.
9913 (check_removed_breakpoint): Adjust.
9914 (status_pending_p): Adjust.
9915 (linux_wait_for_process): Rename to ...
9916 (linux_wait_for_lwp): ... this. Adjust.
9917 (linux_wait_for_event): Adjust.
9918 (send_sigstop): Adjust.
9919 (wait_for_sigstop): Adjust.
9920 (stop_all_processes): Rename to ...
9921 (stop_all_lwps): ... this.
9922 (linux_resume_one_process): Rename to ...
9923 (linux_resume_one_lwp): ... this. Adjust.
9924 (linux_set_resume_request, linux_continue_one_thread)
9925 (linux_queue_one_thread, resume_status_pending_p)
9926 (usr_store_inferior_registers, regsets_store_inferior_registers)
9927 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
9928 Adjust.
9929 * linux-low.h (get_process): Rename to ...
9930 (get_lwp): ... this. Adjust.
9931 (get_thread_process): Rename to ...
9932 (get_thread_lwp): ... this. Adjust.
9933 (get_process_thread): Rename to ...
9934 (get_lwp_thread): ... this. Adjust.
9935 (struct process_info): Rename to ...
9936 (struct lwp_info): ... this.
9937 (all_processes): Rename to ...
9938 (all_lwps): ... this.
9939 * proc-service.c (ps_lgetregs): Adjust.
9940 * thread-db.c (thread_db_create_event, find_one_thread)
9941 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
9942
0b16c5cf
PA
99432009-03-14 Pedro Alves <pedro@codesourcery.com>
9944
9945 * server.c (handle_query): Handle "qAttached".
9946
32de4b9d
NS
99472009-03-13 Nathan Sidwell <nathan@codesourcery.com>
9948
9949 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
9950 GPLv3, update license URL.
9951
2aecd87f
DE
99522009-03-01 Doug Evans <dje@google.com>
9953
93efd302 9954 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
9955 (server_h): Add gdb_signals.h.
9956 (signals.o): Update.
9957 * server.h (target_signal_from_host,target_signal_to_host_p)
9958 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
9959
86b1f9c5
PM
99602009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
9961
9962 * remote-utils.c (getpkt): Also generate remote-debug
9963 information if noack_mode is set.
9964
4aa995e1
PA
99652009-02-06 Pedro Alves <pedro@codesourcery.com>
9966
9967 * server.c (handle_query): Report qXfer:siginfo:read and
9968 qXfer:siginfo:write as supported and handle them.
9969 * target.h (struct target_ops) <qxfer_siginfo>: New field.
9970 * linux-low.c (linux_xfer_siginfo): New.
9971 (linux_target_ops): Set it.
9972
62709adf
PA
99732009-01-26 Pedro Alves <pedro@codesourcery.com>
9974
9975 * server.c (gdbserver_usage): Mention --remote-debug.
9976 (main): Accept '--remote-debug' switch.
9977
aef93bd7
DE
99782009-01-18 Doug Evans <dje@google.com>
9979
9980 * regcache.c (new_register_cache): No need to check result of xcalloc.
9981 * server.c (handle_search_memory): Back out calls to xmalloc,
9982 result is checked and error is returned to user upon failure.
9983 (handle_query): Ditto. Add more checks for result of malloc.
9984 (handle_v_cont): Check result of malloc, report error back to
9985 user upon failure.
9986 (handle_v_run): Ditto. Call freeargv.
9987 * server.h (freeargv): Declare.
9988 * utils.c (freeargv): New fn.
9989
54363045
DE
99902009-01-15 Doug Evans <dje@google.com>
9991
f626972c
DE
9992 * gdbreplay.c (perror_with_name): Make arg const char *.
9993 * server.h (target_signal_to_name): Make return type const char *.
0842e787 9994 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 9995 * utils.c (perror_with_name): Make arg const char *.
54363045 9996
18aae699
PA
99972009-01-14 Pedro Alves <pedro@codesourcery.com>
9998
9999 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
10000 when handling a EXIT_PROCESS_DEBUG_EVENT.
10001
ff703abe
JB
100022009-01-06 Joel Brobecker <brobecker@adacore.com>
10003
10004 * gdbreplay.c (gdbreplay_version): Update copyright year.
10005 * server.c (gdbserver_version): Likewise.
10006
f21cc1a2 100072009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
10008
10009 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 10010 (handle_extended_wait): Improve comment.
0e21c1ec 10011
bca929d3
DE
100122008-12-13 Doug Evans <dje@google.com>
10013
10014 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
10015 * server.h (ATTR_MALLOC): New macro.
10016 (xmalloc,xcalloc,xstrdup): Declare.
10017 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
10018 * inferiors.c: Ditto.
10019 * linux-low.c: Ditto.
10020 * mem-break.c: Ditto.
10021 * regcache.c: Ditto.
10022 * remote-utils.c: Ditto.
10023 * server.c: Ditto.
10024 * target.c: Ditto.
10025 * win32-low.c: Ditto.
10026
97438e3f
DE
100272008-12-12 Doug Evans <dje@google.com>
10028
896c7fbb
DE
10029 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
10030 in debugging printf.
10031
97438e3f
DE
10032 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
10033
e3b886f8
DE
100342008-12-09 Doug Evans <dje@google.com>
10035
10036 * linux-low.h (struct process_info): Delete member tid, unused.
10037 * thread-db.c (find_one_thread): Update.
10038 (maybe_attach_thread): Update.
10039
07e059b5
VP
100402008-12-02 Pedro Alves <pedro@codesourcery.com>
10041
889bf7c5
PA
10042 * target.h (struct target_ops): Add qxfer_osdata member.
10043 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
10044 and dirent.h.
10045 (linux_qxfer_osdata): New functions.
10046 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
10047 callback.
10048 * server.c (handle_query): Handle "qXfer:osdata:read:".
10049 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
10050 (buffer_xml_printf): New functions.
10051 * server.h (struct buffer): New.
10052 (buffer_grow_str, buffer_grow_str0): New macros.
10053 (buffer_grow, buffer_free, buffer_init, buffer_finish)
10054 (buffer_xml_printf): Declare.
07e059b5 10055
4cab47ab
DE
100562008-11-24 Doug Evans <dje@google.com>
10057
10058 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
10059
f142445f
DJ
100602008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
10061
10062 * server.c (handle_v_run): Always use the supplied argument list.
10063
d0107bb6 100642008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 10065
d0107bb6
BW
10066 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
10067 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 10068
2c4ad781
TJB
100692008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
10070
10071 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
10072 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
10073 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
10074 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
10075 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
10076 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
10077 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
10078 XML target descriptions.
10079 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
10080 when inferior is running on an ISA 2.05 or later processor. Add
10081 special case to return offset for full 64-bit slot of FPSCR when
10082 in 32-bits.
10083
dfb64f85
DJ
100842008-11-14 Daniel Gutson <dgutson@codesourcery.com>
10085
10086 * Makefile.in (SFILES, clean): Added sparc64 files.
10087 (reg-sparc64.o, reg-sparc64.c): New.
10088 * configure.srv (sparc*-*-linux*): New configuration.
10089 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
10090 syscall arguments for SPARC.
10091 (regsets_store_inferior_registers): Likewise.
10092 * linux-sparc-low.c: New file.
10093
66b6e1dd
DE
100942008-10-21 Doug Evans <dje@google.com>
10095
10096 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
10097 (READLINE_DIR,READLINE_DEP): Delete.
10098 (INTERNAL_CFLAGS): Update.
10099 (LINTFLAGS): Update.
10100
9b710a42
PA
101012008-10-10 Pedro Alves <pedro@codesourcery.com>
10102
10103 * server.c (handle_v_run): If GDB didn't specify an argv, use the
10104 whole argv from the last run, not just argv[0].
10105
5822d809
PA
101062008-09-08 Pedro Alves <pedro@codesourcery.com>
10107
10108 * regcache.c (new_register_cache): Return NULL if the register
10109 cache size isn't known yet.
10110 (free_register_cache): Avoid dereferencing a NULL regcache.
10111
74aac56f
DJ
101122008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
10113
10114 * configure.srv: Merge MIPS and MIPS64.
10115
400b20f5
MR
101162008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
10117
10118 * Makefile.in (uninstall): Apply $(EXEEXT) too.
10119
677c5bb1
LM
101202008-08-18 Luis Machado <luisgpm@br.ibm.com>
10121
10122 * Makefile.in: Add required vsx dependencies.
10123
10124 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
10125 Declare init_registers_powerpc_vsx32l.
10126 Declare init_registers_powerpc_vsx64l.
10127 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
10128 (ppc_arch_setup): Check for VSX in hwcap.
10129 (ppc_fill_vsxregset): New function.
10130 (ppc_store_vsxregset): New function.
10131 Add new VSX entry in regset_info target_regsets.
10132
10133 * configure.srv: Add new VSX dependencies.
10134
a6f3e723
SL
101352008-08-12 Pedro Alves <pedro@codesourcery.com>
10136
10137 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
10138 (remote_open): Set or clear transport_is_reliable.
10139 (putpkt_binary): Don't expect acks in noack mode.
10140 (getpkt): Don't send ack/nac in noack mode.
10141 * server.c (handle_general_set): Handle QStartNoAckMode.
10142 (handle_query): If connected by tcp pass QStartNoAckMode+ in
10143 qSupported.
10144 (main): Reset noack_mode on every connection.
10145 * server.h (noack_mode): Declare.
10146
a417dc56
RW
101472008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
10148
10149 * Makefile.in (GDBREPLAY_OBS): New variable.
10150 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
10151
3221518c
UW
101522008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
10153 Daniel Jacobowitz <dan@codesourcery.com>
10154
10155 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
10156 (usr_store_inferior_registers): Likewise.
10157 (regsets_store_inferior_registers): Likewise.
10158
ec56be1b
PA
101592008-07-31 Rolf Jansen <rj@surtec.com>
10160 Pedro Alves <pedro@codesourcery.com>
10161
10162 * configure.ac: Check for memmem declaration.
10163 * server.c [HAVE_MALLOC_H]: Include malloc.h.
10164 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
10165 (disable_packet_qfThreadInfo): Unconditionally compile.
10166 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
10167 * configure, config.in: Regenerate.
10168
2fe5e3ff
DE
101692008-07-28 Doug Kwan <dougkwan@google.com>
10170
10171 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
10172 (linux_write_memory): Remove declaration of errno.
10173
836acd6d
UW
101742008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
10175
10176 * linux-low.c (handle_extended_wait): Do not use "status"
10177 variable uninitialized.
10178
aeba519e
PA
101792008-07-07 Pedro Alves <pedro@codesourcery.com>
10180
10181 * server.c (handle_v_attach): Inhibit reporting dll changes.
10182
db42f210
PA
101832008-06-27 Pedro Alves <pedro@codesourcery.com>
10184
10185 * remote-utils.c (prepare_resume_reply): If requested, don't
10186 output "thread:TID" in the T stop reply.
10187
10188 * server.c (disable_packet_vCont, disable_packet_Tthread)
10189 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
10190 (handle_query): If requested, disable support for qC, qfThreadInfo
10191 and qsThreadInfo.
10192 (handle_v_requests): If requested, disable support for vCont.
10193 (gdbserver_show_disableable): New.
10194 (main): Handle --disable-packet and --disable-packet=LIST.
10195
10196 * server.h (disable_packet_vCont, disable_packet_Tthread)
10197 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
10198
8e4c5421
CD
101992008-06-20 Carlos O'Donell <carlos@codesourcery.com>
10200
10201 * server.c (gdbserver_usage): Mention --version.
10202
6e23a804
DJ
102032008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
10204
10205 * Makefile.in (gdbreplay.o): New rule.
10206
90aa6a40
JM
102072008-06-06 Joseph Myers <joseph@codesourcery.com>
10208
10209 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
10210 message, not gdbserver.
10211
c16158bc 102122008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
10213 Nathan Sidwell <nathan@codesourcery.com>
10214 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
10215
10216 * acinclude.m4: Include ../../config/acx.m4.
10217 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
10218 * configure, config.in: Regenerate.
10219 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
10220 * server.c (gdbserver_version): Print PKGVERSION.
10221 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
10222 (main): Adjust gdbserver_usage calls.
10223 * gdbreplay.c (version, host_name): Add declarations.
10224 (gdbreplay_version, gdbreplay_usage): New.
10225 (main): Accept --version and --help options.
10226
aeb75bf5
DJ
102272008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
10228
10229 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
10230 (arm_breakpoint_at): Handle Thumb.
10231 (the_low_target): Add comment.
10232
76b233dd
UW
102332008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
10234
10235 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
10236
08388c79
DE
102372008-05-09 Doug Evans <dje@google.com>
10238
a3c83fae
DE
10239 * server.h (decode_search_memory_packet): Declare.
10240 * remote-utils.c (decode_search_memory_packet): New fn.
10241 * server.c (handle_search_memory_1): New fn.
08388c79
DE
10242 (handle_search_memory): New fn.
10243 (handle_query): Process qSearch:memory packets.
10244
bb9c3d36
UW
102452008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
10246
10247 * regcache.c (registers_length): Remove.
10248 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
10249 full register packet.
10250 * regcache.h (registers_length): Remove prototype.
10251 * server.h (PBUFSIZ): Define to 16384.
10252
7284e1be
UW
102532008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
10254
10255 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
10256 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
10257 powerpc-64l.o, and powerpc-altivec64l.o.
10258 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
10259 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
10260 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
10261 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
10262 rs6000/power-linux.xml, and rs6000/power64-linux.xml
10263 to srv_xmlfiles.
10264
10265 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
10266 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
10267 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
10268 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
10269 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
10270 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
10271 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
10272 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
10273 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
10274 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
10275 (clean): Update.
10276
10277 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
10278 (init_registers_powerpc_32l): ... this new prototype.
10279 (init_registers_powerpc_32): Remove, replace by ...
10280 (init_registers_powerpc_altivec32l): ... this new prototype.
10281 (init_registers_powerpc_e500): Remove, replace by ...
10282 (init_registers_powerpc_e500l): ... this new prototype.
10283 (init_registers_ppc64): Remove, replace by ...
10284 (init_registers_powerpc_64l): ... this new prototype.
10285 (init_registers_powerpc_64): Remove, replace by ...
10286 (init_registers_powerpc_altivec64l): ... this new prototype.
10287 (ppc_num_regs): Set to 73.
10288 (PT_ORIG_R3, PT_TRAP): Define if necessary.
10289 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
10290 (ppc_cannot_store_register): Handle orig_r3 and trap.
10291 (ppc_arch_setup): Update init_registers_... calls.
10292 (ppc_fill_gregset): Handle orig_r3 and trap.
10293
10294 * inferiors.c (clear_inferiors): Reset current_inferior.
10295
fdc59709
PB
102962008-04-23 Paolo Bonzini <bonzini@gnu.org>
10297
889bf7c5
PA
10298 * acinclude.m4: Add override.m4.
10299 * configure: Regenerate.
fdc59709 10300
c9b2f845
UW
103012008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
10302
10303 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
10304 initial call to init_register_ppc64.
10305
550512b8
UW
103062008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
10307
43aaf8b6
PA
10308 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
10309 single powerpc*-*-linux* case.
550512b8
UW
10310 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
10311
b6430ec3
UW
103122008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
10313
10314 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 10315 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
10316 from reg_xmlfiles.
10317 * linux-ppc-low.c: Include <elf.h>.
10318 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
10319 (ppc_hwcap): New global variable.
10320 (ppc_regmap): Remove __SPE__ #ifdef sections.
10321 (ppc_regmap_e500): New global variable.
10322 (ppc_cannot_store_register): Update __SPE__ special case.
10323 (ppc_get_hwcap): New function.
10324 (ppc_arch_setup): Use it to determine whether inferior supports
10325 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
10326 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
10327 Do not access registers if target does not support AltiVec.
10328 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
10329 Do not access registers if target does not support SPE.
10330 (target_regsets): Unconditionally include AltiVec and SPE regsets.
10331
52fa2412
UW
103322008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
10333
10334 * linux-low.c (disabled_regsets, num_regsets): New.
10335 (use_regsets_p): Delete.
10336 (linux_wait_for_process): Clear disabled_regsets.
10337 (regsets_fetch_inferior_registers): Check and set it.
10338 (regsets_store_inferior_registers): Likewise.
10339 (linux_fetch_registers, linux_store_registers): Do not use
10340 use_regsets_p.
10341 (initialize_low): Allocate disabled_regsets.
10342
e28b3332
DJ
103432008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
10344
10345 * Makefile.in (LIBOBJS): New.
10346 (OBS): Use LIBOBJS.
10347 (memmem.o): New rule.
10348 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
10349 * configure: Regenerated.
10350
4536995d
UW
103512008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
10352
10353 * server.c (handle_query): Never return "unsupported" for
10354 qXfer:features:read queries.
10355
221c031f
UW
103562008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
10357
10358 * server.c (get_features_xml): Fix inverted condition.
10359 (handle_query): Always support qXfer:feature:read.
10360
ccd213ac
DJ
103612008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
10362
10363 * server.c (wrapper_argv): New.
10364 (start_inferior): Handle wrapper_argv. If set, expect an extra
10365 trap.
10366 (gdbserver_usage): Document --wrapper.
10367 (main): Parse --wrapper.
10368
6fe305f7
UW
103692008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10370
10371 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
10372 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
10373 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
10374 (ppc_set_pc): Likewise.
10375 (ppc_arch_setup): New function.
10376 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
10377 of collect_register.
889bf7c5 10378 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 10379
5b0a002e
UW
103802008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10381
10382 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
10383 instead of linux-ppc64-low.o.
10384 * linux-ppc64-low.c: Remove file.
10385 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
10386 (linux-ppc64-low.o): Remove rule.
10387
10388 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
10389 (init_registers_powerpc_64): Likewise.
10390 (ppc_regmap): Conditionally define depending on __powerpc64__.
10391 (ppc_cannot_store_register): Do not special-case "fpscr" when
10392 compiled on __powerpc64__.
10393 (ppc_collect_ptrace_register): New function.
10394 (ppc_supply_ptrace_register): New function.
10395 (ppc_breakpoint): Change type to "unsigned int".
10396 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
10397 (the_low_target): Conditionally provide initializers for the
889bf7c5 10398 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
10399 collect_ptrace_register and supply_ptrace_register members.
10400
9b4b61c8
UW
104012008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10402
10403 * regcache.h (gdbserver_xmltarget): Add extern declaration.
10404 * server.c (gdbserver_xmltarget): Define.
10405 (get_features_xml): Use it to replace "target.xml" and arch_string.
10406
10407 * configure.srv: Remove srv_xmltarget. Add XML files that were
10408 mentioned there to srv_xmlfiles instead. Remove conditional tests
10409 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
10410 srv_xmlfiles and srv_regobj to include all possible choices.
10411 * configure.ac (srv_xmltarget): Remove.
10412 (srv_xmlfiles): Do not add "target.xml".
10413 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
10414 checks for supplementary target information.
10415 * configure: Regenerate.
10416 * Makefile.in (XML_TARGET): Remove.
10417 (target.xml): Remove rule.
10418 (clean): Do not clean up target.xml.
10419 (.PRECIOUS): Do not mention target.xml.
10420
10421 * target.h (struct target_ops): Remove arch_string member.
10422 * linux-low.c (linux_arch_string): Remove.
10423 (linux_target_ops): Remove arch_string initializer.
10424 * linux-low.h (struct linux_target_ops): Remove arch_string member.
10425 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
10426 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
10427 * spu-low.c (spu_arch_string): Remove.
10428 (spu_target_ops): Remove arch_string initializer.
10429 * win32-low.c (win32_arch_string): Remove.
10430 (win32_target_ops): Remove arch_string initializer.
10431 * win32-low.h (struct win32_target_ops): Remove arch_string member.
10432 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
10433 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
10434
ee1a7ae4
UW
104352008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
10436
10437 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
10438 by collect_ptrace_register and supply_ptrace_register hooks.
10439 * linux-low.c (fetch_register): Use supply_ptrace_register callback
10440 instead of checking for the_low_target.left_pad_xfer.
10441 (usr_store_inferior_registers): Use collect_ptrace_register callback
10442 instead of checking for the_low_target.left_pad_xfer.
10443
10444 * linux-s390-low.c (s390_collect_ptrace_register): New function.
10445 (s390_supply_ptrace_register): Likewise.
10446 (s390_fill_gregset): Call s390_collect_ptrace_register.
10447 (the_low_target): Update.
10448
10449 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
10450 (ppc_supply_ptrace_register): Likewise.
10451 (the_low_target): Update.
10452
10453 * linux-i386-low.c (the_low_target): Update.
10454 * linux-x86-64-low.c (the_low_target): Update.
10455
d61ddec4
UW
104562008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
10457
10458 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
10459 reg-s390.o and reg-s390x.o.
10460
10461 * linux-low.c (new_inferior): New global variable.
10462 (linux_create_inferior, linux_attach): Set it.
10463 (linux_wait_for_process): Call the_low_target.arch_setup after the
10464 target has stopped for the first time.
10465 (initialize_low): Do not call the_low_target.arch_setup.
10466
10467 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
10468 (s390_set_pc): Likewise.
10469 (s390_arch_setup): New function.
10470 (the_low_target): Use s390_arch_setup as arch_setup routine.
10471
10472 * regcache.c (realloc_register_cache): New function.
10473 (set_register_cache): Call it for each existing regcache.
10474
d05b4ac3
UW
104752008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
10476
10477 * server.h (init_registers): Remove prototype.
10478
10479 * linux-low.h (struct linux_target_ops): Add arch_setup field.
10480 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
10481 instead of init_registers ().
10482 * linux-arm-low.c (init_registers_arm): Add prototype.
10483 (init_registers_arm_with_iwmmxt): Likewise.
10484 (the_low_target): Add initializer for arch_setup field.
10485 * linux-cris-low.c (init_registers_cris): Add prototype.
10486 (the_low_target): Add initializer for arch_setup field.
10487 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
10488 (the_low_target): Add initializer for arch_setup field.
10489 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
10490 (the_low_target): Add initializer for arch_setup field.
10491 * linux-ia64-low.c (init_registers_ia64): Add prototype.
10492 (the_low_target): Add initializer for arch_setup field.
10493 * linux-m32r-low.c (init_registers_m32r): Add prototype.
10494 (the_low_target): Add initializer for arch_setup field.
10495 * linux-m68k-low.c (init_registers_m68k): Add prototype.
10496 (the_low_target): Add initializer for arch_setup field.
10497 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
10498 (init_registers_mips64_linux): Likewise.
10499 (the_low_target): Add initializer for arch_setup field.
10500 * linux-ppc-low.c (init_registers_ppc): Add prototype.
10501 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
10502 (the_low_target): Add initializer for arch_setup field.
10503 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
10504 (init_registers_powerpc_64): Likewise.
10505 (the_low_target): Add initializer for arch_setup field.
10506 * linux-s390-low.c (init_registers_s390): Add prototype.
10507 (init_registers_s390x): Likewise.
10508 (the_low_target): Add initializer for arch_setup field.
10509 * linux-sh-low.c (init_registers_sh): Add prototype.
10510 (the_low_target): Add initializer for arch_setup field.
10511 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
10512 (the_low_target): Add initializer for arch_setup field.
10513 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
10514 (the_low_target): Add initializer for arch_setup field.
10515
10516 * win32-low.h (struct win32_target_ops): Add arch_setup field.
10517 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
10518 instead of init_registers ().
10519 * win32-arm-low.c (init_registers_arm): Add prototype.
10520 (the_low_target): Add initializer for arch_setup field.
10521 * win32-i386-low.c (init_registers_i386): Add prototype.
10522 (the_low_target): Add initializer for arch_setup field.
10523
10524 * spu-low.c (init_registers_spu): Add prototype.
10525 (initialize_low): Call initialie_registers_spu () instead of
10526 initialize_registers ().
10527
fd96d250
PA
105282008-02-19 Pedro Alves <pedro@codesourcery.com>
10529
10530 * server.c (handle_v_requests): When handling the vRun and vAttach
10531 packets, if already debugging a process, don't kill it. Return an
10532 error instead.
10533
d41b6bb4
DJ
105342008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
10535
10536 * server.c (handle_query): Correct length check.
10537
5ac588cf
PA
105382008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
10539
10540 * win32-low.c (do_initial_child_stuff): Add process handle
10541 parameter. Set current_process_handle and current_process_id from the
10542 parameters. Clear globals.
10543 (win32_create_inferior): Don't set current_process_handle and
10544 current_process_id here. Instead pass them on the call to
10545 do_initial_child_stuff.
10546 (win32_attach): Likewise.
10547 (win32_clear_inferiors): New.
10548 (win32_kill): Don't close the current process handle or the
10549 current thread handle here. Instead call win32_clear_inferiors.
10550 (win32_detach): Don't open a new handle to the process. Call
10551 win32_clear_inferiors.
10552 (win32_join): Don't rely on current_process_handle; open a new
10553 handle using the process id.
10554 (win32_wait): Call win32_clear_inferiors when the inferior process
10555 has exited.
10556
ecd7ecbc
DJ
105572008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
10558
10559 * server.c (monitor_show_help): Add "exit".
10560
1525d545
MG
105612008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
10562
ecd7ecbc 10563 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
10564 (clean): Add reg-xtensa.c.
10565 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
10566 * configure.srv (xtensa*-*-linux*) New target.
10567 * linux-xtensa-low.c: New.
10568 * xtensa-xtregs.c: New.
1525d545 10569
59a016f0
PA
105702008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
10571
10572 * hostio.c: Don't include errno.h.
10573 (errno_to_fileio_errno): Move to hostio-errno.
10574 * hostio.c: (hostio_error): Remove the error parameter. Defer the
10575 error number outputting to the target->hostio_last_error callback.
10576 (hostio_packet_error): Use FILEIO_EINVAL directly.
10577 (handle_open, handle_pread, hostio_error, handle_unlink): Update
10578 calls to hostio_error.
10579 * hostio-errno.c: New.
10580 * server.h (hostio_last_error_from_errno): Declare.
10581 * target.h (target_ops): Add hostio_last_error member.
10582 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
10583 as hostio_last_error handler.
889bf7c5 10584 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
10585 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
10586 (wince_hostio_last_error): New functions.
10587 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
10588 as hostio_last_error handler.
10589 (win32_target_ops) [!_WIN32_WCE]: Register
10590 hostio_last_error_from_errno as hostio_last_error handler.
10591 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
10592 (hostio-errno.o): New rule.
10593 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
10594 * configure.srv (srv_hostio_err_objs): New variable. Default to
10595 hostio-errno.o.
10596 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
10597 * configure: Regenerate.
10598
2d717e4f
DJ
105992008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
10600
10601 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
10602 (linux_kill, linux_detach): Clean up the process list.
10603 * remote-utils.c (remote_open): Improve port number parsing.
10604 (putpkt_binary, input_interrupt): Only send interrupts if the target
10605 is running.
10606 * server.c (extended_protocol): Make static.
10607 (attached): Define earlier.
10608 (exit_requested, response_needed, program_argv): New variables.
10609 (target_running): New.
10610 (start_inferior): Clear attached here.
10611 (attach_inferior): Set attached here.
10612 (require_running): Define.
10613 (handle_query): Use require_running and target_running. Implement
10614 "monitor exit".
10615 (handle_v_attach, handle_v_run): New.
10616 (handle_v_requests): Use require_running. Handle vAttach and vRun.
10617 (gdbserver_usage): Update.
10618 (main): Redo argument parsing. Handle --debug and --multi. Handle
10619 --attach along with other options or after the port. Save
10620 program_argv. Support no initial program. Resynchronize
10621 communication with GDB after an error. Handle "monitor exit".
10622 Use require_running and target_running. Always allow the extended
10623 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
10624 restart in extended mode.
10625 * README: Refer to the GDB manual. Update --attach usage.
10626
7407e2de
AS
106272007-12-20 Andreas Schwab <schwab@suse.de>
10628
10629 * linux-low.c (STACK_SIZE): Define.
10630 (linux_tracefork_child): Use it. Use __clone2 on ia64.
10631 (linux_test_for_tracefork): Likewise.
10632
b65d95c5
DJ
106332007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
10634
10635 * linux-low.c (linux_wait_for_event): Update messages. Do not
10636 reinsert auto-delete breakpoints.
10637 * mem-break.c (struct breakpoint): Change return type of handler to
10638 int.
10639 (set_breakpoint_at): Update handler type.
10640 (reinsert_breakpoint_handler): Return 1 instead of calling
10641 delete_breakpoint.
10642 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
10643 setting a new one.
10644 (check_breakpoints): Delete auto-delete breakpoints and return 2.
10645 * mem-break.h (set_breakpoint_at): Update handler type.
10646 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
10647 * win32-low.c (auto_delete_breakpoint): New.
10648 (get_child_debug_event): Use it.
10649
4e799345
DJ
106502007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
10651
10652 * configure.ac: Check for pread and pwrite.
10653 * hostio.c (handle_pread): Fall back to lseek and read.
10654 (handle_pwrite): Fall back to lseek and write.
10655 * config.in, configure: Regenerated.
10656
27524b67
DJ
106572007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
10658
10659 * server.c (myresume): Add own_buf argument.
10660 (main): Update calls.
10661
a20d5e98
DJ
106622007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
10663
10664 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
10665 * remote-utils.c (remote_open): Do not call disable_async_io.
10666 (block_async_io): Delete.
10667 (unblock_async_io): Make static.
10668 (initialize_async_io): New.
10669 * server.c (handle_v_cont): Handle async I/O here.
10670 (myresume): Likewise. Move other common resume tasks here...
10671 (main): ... from here. Call initialize_async_io. Disable async
10672 I/O before the main loop.
10673 * server.h (initialize_async_io): Declare.
10674 (block_async_io, unblock_async_io): Delete prototypes.
10675 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
10676
b79d787e
DJ
106772007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
10678
10679 * remote-utils.c (readchar): Allow binary data in received messages.
10680
d97903b2
PA
106812007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10682
10683 * win32-low.c (attaching): New global.
10684 (win32_create_inferior): Clear the `attaching' global.
10685 (win32_attach): Set the `attaching' global.
10686 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
10687 attaching. Only set a breakpoint at the entry point if not
10688 attaching.
10689
311de423
PA
106902007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10691
10692 * server.c (main): Don't report dll events on the initial
10693 connection on attaches.
10694
6c2d16d2
PA
106952007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10696
10697 * server.c (main): Relax numerical bases supported for the pid of
10698 the --attach command line argument.
10699
5ca906e6
PA
107002007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10701
10702 * win32-low.c (win32_attach): Call OpenProcess before
10703 DebugActiveProcess, not after. Add last error output to error
10704 call.
10705
9c6c8194
PA
107062007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10707
10708 * win32-low.c (win32_get_thread_context)
10709 (win32_set_thread_context): New functions.
10710 (thread_rec): Use win32_get_thread_context.
10711 (continue_one_thread, win32_resume): Use win32_set_thread_context.
10712 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
10713 field.
10714
4d5d1aaa
PA
107152007-12-03 Leo Zayas
10716 Pedro Alves <pedro_alves@portugalmail.pt>
10717
10718 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
10719 global variables.
10720 (child_add_thread): Minor cleanup.
10721 (child_continue): Resume artificially suspended threads before
10722 calling ContinueDebugEvent.
10723 (suspend_one_thread): New.
10724 (fake_breakpoint_event): New.
10725 (get_child_debug_event): Change return type to int. Check here if
10726 gdb sent an interrupt request. If a soft interrupt was requested,
10727 fake a breakpoint event. Return 0 if there is no event to handle,
10728 and 1 otherwise.
10729 (win32_wait): Don't check here if gdb sent an interrupt request.
10730 Ensure there is a valid event to handle.
10731 (win32_request_interrupt): Add soft interruption method as last
10732 resort.
10733
c436e841
PA
107342007-12-03 Leo Zayas
10735 Pedro Alves <pedro_alves@portugalmail.pt>
10736
10737 * win32-low.h (win32_thread_info): Add descriptions to the
10738 structure members. Replace `suspend_count' counter by a
10739 `suspended' flag.
10740 * win32-low.c (thread_rec): Update condition of when to get the
10741 context from the inferior. Rely on ContextFlags being set if it
10742 has already been retrieved. Only suspend the inferior thread if
10743 we haven't already. Warn if that fails.
10744 (continue_one_thread): s/suspend_count/suspended/. Only call
10745 ResumeThread once. Warn if that fails.
10746
e7b5fa67
PA
107472007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
10748
10749 * win32-low.c (win32_wait): Don't read from the inferior when it
10750 has already exited.
10751
a385171d
PA
107522007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
10753
10754 * Makefile.in (win32_low_h): New variable.
10755 (win32-low.o): Add dependency on $(win32_low_h).
10756 (win32-arm-low.o, win32-i386-low.o): New rules.
10757
f80c84b3
DJ
107582007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
10759
10760 * hostio.c: Correct copyright year.
10761
a6b151f1
DJ
107622007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
10763
10764 * Makefile.in (OBS): Add hostio.o.
10765 (hostio.o): New rule.
10766 * server.h (handle_vFile): Declare.
10767 * hostio.c: New file.
10768 * server.c (handle_v_requests): Take packet_len and new_packet_len
10769 for binary packets. Call handle_vFile.
10770 (main): Update call to handle_v_requests.
10771
f9387fc3
DJ
107722007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
10773
10774 * linux-low.c: Include <sched.h>.
10775
51c2684e
DJ
107762007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
10777
10778 * linux-low.c (linux_tracefork_grandchild): New.
10779 (linux_tracefork_child): Use clone.
10780 (linux_test_for_tracefork): Use clone; allocate and free a stack.
10781
75f83163
JB
107822007-10-31 Joel Brobecker <brobecker@adacore.com>
10783
10784 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
10785
da5898ce
DJ
107862007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
10787
10788 * linux-low.c (handle_extended_wait): Handle unexpected signals.
10789
24a09b5f
DJ
107902007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
10791
10792 * inferiors.c (change_inferior_id): Delete.
10793 (add_pid_to_list, pull_pid_from_list): New.
10794 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
10795 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
10796 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
10797 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
10798 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
10799 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
10800 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
10801 (using_threads): Always set to 1.
10802 (handle_extended_wait): New.
10803 (add_process): Do not set TID.
10804 (linux_create_inferior): Set must_set_ptrace_flags.
10805 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
10806 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
10807 (linux_thread_alive): Rename TID argument to LWPID.
10808 (linux_wait_for_process): Handle unknown processes. Do not use TID.
10809 (linux_wait_for_event): Do not use TID or check using_threads. Update
10810 call to dead_thread_notify. Call handle_extended_wait.
10811 (linux_create_inferior): Use PTRACE_SETOPTIONS.
10812 (send_sigstop): Delete sigstop_sent.
10813 (wait_for_sigstop): Avoid TID.
10814 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
10815 (linux_test_for_tracefork): New.
10816 (linux_lookup_signals): Use thread_db_active and
10817 linux_supports_tracefork_flag.
10818 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
10819 * linux-low.h (get_process_thread): Avoid TID.
10820 (struct process_ifo): Move thread_known and tid to the end. Remove
10821 sigstop_sent.
10822 (linux_attach_lwp, thread_db_init): Update prototypes.
10823 * server.h (change_inferior_id): Delete prototype.
10824 (add_pid_to_list, pull_pid_from_list): New prototypes.
10825 * thread-db.c (thread_db_use_events): New.
10826 (find_first_thread): Rename to...
10827 (find_one_thread): ...this. Update callers and messages. Do not
10828 call fatal. Check thread_db_use_events. Do not call
10829 change_inferior_id or new_thread_notify.
10830 (maybe_attach_thread): Update. Do not call new_thread_notify.
10831 (thread_db_init): Set thread_db_use_events. Check use_events.
10832 * utils.c (fatal, warning): Correct message prefix.
10833
30ed0a8f
DJ
108342007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
10835
10836 * Makefile.in (clean): Remove new files.
10837 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
10838 (powerpc-64.o, powerpc-64.c): New rules.
10839 * configure.srv: Use alternate register sets for powerpc64-*-linux*
10840 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
10841 with SPE.
10842 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
10843 SPE targets.
10844 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
10845 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
10846 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
10847 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
10848 (target_regsets): Add AltiVec and SPE register sets.
10849 * configure.ac: Check for AltiVec and SPE.
10850 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
10851 (ppc_fill_vrregset, ppc_store_vrregset): New.
10852 (target_regsets): Add AltiVec register set.
10853 * configure: Regenerated.
10854
fd462a61
DJ
108552007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
10856
10857 * linux-low.c (O_LARGEFILE): Define.
10858 (linux_read_memory): Use /proc/PID/mem.
10859 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
10860 * configure, config.in: Regenerated.
10861
69f223ed
DJ
108622007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
10863
10864 * linux-low.c (linux_wait_for_event): Do not pass signals while
10865 single-stepping.
10866
aec18585
PA
108672007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
10868
10869 * win32-low.c (create_process): New.
10870 (win32_create_inferior): Use create_process instead of
10871 CreateProcess. If create_process failed retry appending an ".exe"
10872 suffix. Store the GetLastError result immediatelly after
10873 create_process calls and use it on the call to error.
10874
34d86ddd
PA
108752007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
10876
10877 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
10878
5a0e3bd0
JB
108792007-08-23 Joel Brobecker <brobecker@adacore.com>
10880
10881 * configure.ac: Switch license to GPLv3.
10882
f88c79e6
MS
108832007-08-01 Michael Snyder <msnyder@access-company.com>
10884
10885 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
10886
6b3d9b83
PA
108872007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
10888
10889 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
10890 typedef.
10891 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
10892 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
10893 CloseToolhelp32Snapshot.
10894 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
10895 CloseToolhelp32Snapshot.
10896
c588c53c
MS
108972007-07-27 Michael Snyder <michael.snyder@access-company.com>
10898
10899 * server.c (main): Check for inferior exit before main loop.
10900
aa0403d9
PA
109012007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
10902
10903 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
10904 instead of on tmp_desc.
10905
255e7678
DJ
109062007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
10907 Daniel Jacobowitz <dan@codesourcery.com>
10908
10909 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
10910 (add_thread): Minor cleanups.
10911 (clear_inferiors): Move lower in the file. Clear the DLL
10912 list.
10913 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
10914 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
10915 (xml_escape_text): New.
10916 * server.c (handle_query): Handle qXfer:libraries:read. Report it
10917 for qSupported.
10918 (handle_v_cont): Report errors.
10919 (gdbserver_version): Update.
10920 (main): Correct size of own_buf. Do not report initial DLL events.
10921 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
10922 (unloaded_dll, xml_escape_text): New.
10923 * win32-low.c (enum target_waitkind): Update comments.
10924 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
10925 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
10926 (win32_EnumProcessModules, win32_GetModuleInformation)
10927 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
10928 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
10929 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
10930 (win32_Module32First, win32_Module32Next, load_toolhelp)
10931 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
10932 (get_child_debug_event): Handle DLL events.
10933 (win32_wait): Likewise.
10934
0d37add9
DJ
109352007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
10936
10937 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
10938 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
10939
45e2715e
PA
109402007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
10941
10942 * win32-low.c (handle_output_debug_string): Ignore event if not
10943 waiting.
10944
c5674cf1
PA
109452007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
10946
10947 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
10948
2bbe3cc1
DJ
109492007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
10950
10951 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
10952
ae13219e
DJ
109532007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
10954
10955 * inferiors.c (change_inferior_id): Add comment.
10956 * linux-low.c (check_removed_breakpoint): Add an early
10957 prototype. Improve debug output.
10958 (linux_attach): Doc update.
10959 (linux_detach_one_process, linux_detach): Clean up before releasing
10960 each process.
10961 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
10962 * linux-low.h (struct process_info): Doc improvement.
10963 * mem-break.c (delete_all_breakpoints): New.
10964 * mem-break.h (delete_all_breakpoints): New prototype.
10965 * thread-db.c (find_first_thread): New.
10966 (thread_db_create_event): Call it instead of
10967 thread_db_find_new_threads. Clean up unused variables.
10968 (maybe_attach_thread): Remove first thread handling.
10969 (thread_db_find_new_threads): Use find_first_thread.
10970 (thread_db_get_tls_address): Likewise.
10971
4105de34
DJ
109722007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
10973
10974 * thread-db.c (thread_db_find_new_threads): Add prototype.
10975 (thread_db_create_event): Check for the main thread before adding
10976 a new thread.
10977 (maybe_attach_thread): Only enable event reporting if TID == 0.
10978 (thread_db_get_tls_address): Check for new threads.
10979
2b876972
DJ
109802007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
10981
10982 * linux-low.c (linux_create_inferior): Try execv before execvp.
10983 * spu-low.c (spu_create_inferior): Likewise.
10984
7a245884
DJ
109852007-06-13 Mike Frysinger <vapier@gentoo.org>
10986
10987 * linux-low.c (linux_create_inferior): Change execv to execvp.
10988 * spu-low.c (spu_create_inferior): Likewies.
10989
117ce543
DJ
109902007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
10991
10992 * Makefile.in (clean): Clean new files instead of deleted ones.
10993 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
10994 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
10995 rules.
10996 * configure.srv: Specify XML files and new regformats for MIPS and
10997 MIPS64 GNU/Linux.
10998 * linux-mips-low.c (mips_num_regs): Set to only used registers.
10999 (mips_regmap): Do not fetch $0. Remove unused registers. Add
11000 an entry for the restart register.
11001 (mips_cannot_fetch_register, mips_cannot_store_register)
11002 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
11003 register names to match the XML descriptions.
11004 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
11005 restart register instead of $0.
11006
0e7f50da
UW
110072007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
11008 Markus Deuling <deuling@de.ibm.com>
11009
11010 * remote-utils.c (decode_xfer_write): New function.
11011 * server.h (decode_xfer_write): Add prototype.
11012 * server.c (handle_query): Add PACKET_LEN argument. Support
11013 qXfer:spu:read and qXfer:spu:write packets.
11014 (main): Pass packet_len to handle_query.
11015 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
11016 * target.h (target_ops): Add qxfer_spu.
11017
374c1d38
UW
110182007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
11019
11020 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
11021 accessing non-seekable spufs files.
11022
bb63802a
UW
110232007-05-16 Markus Deuling <deuling@de.ibm.com>
11024
889bf7c5 11025 * server.c (handle_query): Add reply for qC packet.
bb63802a 11026
7390519e
PA
110272007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11028 Leo Zayas <lerele@champenstudios@com>
11029
11030 * server.h (check_remote_input_interrupt_request): New function.
11031 * remote_utils.c (INVALID_DESCRIPTOR): New define.
11032 (remote_desc): Initialize with INVALID_DESCRIPTOR.
11033 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
11034 (check_remote_input_interrupt_request): New function.
11035 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 11036 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
11037 winapi_GenerateConsoleCtrlEvent): New typedefs.
11038 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
11039 to 250 ms.
11040 (win32_wait): Check for remote interrupt request
11041 with check_remote_input_interrupt_request.
11042 (win32_request_interrupt): New function.
11043 (win32_target_op): Set request_interrupt to win32_request_interrupt.
11044
34b34921
PA
110452007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11046
11047 * win32-low.c (debug_registers_changed,
11048 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
11049 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
11050 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
11051 (thread_rec): Get context using the low target.
11052 (child_add_thread): Call thread_added on the low target,
11053 which does the same thing.
11054 (regptr): Delete.
11055 (do_initial_child_stuff): Remove debug registers references.
11056 Set context using the low target. Resume threads after
11057 setting the contexts.
11058 (child_continue): Remove dead variable. Remove debug
11059 registers references.
11060 (child_fetch_inferior_registers): Go through the low target.
11061 (do_child_store_inferior_registers): Remove.
11062 (child_store_inferior_registers): Go through the low target.
11063 (win32_resume): Remove debug registers references.
11064 Set context using the low target.
11065 (handle_exception): Change return type to void. Don't record
11066 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
11067 first chance exception.
889bf7c5 11068 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
11069 goto loop. Always return after waiting for debug event.
11070 (win32_wait): Convert to switch statement. Handle spurious
11071 events.
11072
11073 * win32-i386-low.c (debug_registers_changed,
11074 debug_registers_used): New.
11075 (initial_stuff): Rename to ...
11076 (i386_initial_stuff): ... this. Clear debug registers
11077 state variables.
11078 (store_debug_registers): Delete.
11079 (i386_get_thread_context): New.
11080 (load_debug_registers): Delete.
11081 (i386_set_thread_context): New.
11082 (i386_thread_added): New.
11083 (single_step): Rename to ...
11084 (i386_single_step): ... this.
11085 (do_fetch_inferior_registers): Rename to ...
11086 (i386_fetch_inferior_register): ... this.
11087 (i386_store_inferior_register): New.
11088 (the_low_target): Adapt to new interface.
11089
11090 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
11091 (arm_get_thread_context): New.
11092 (arm_set_thread_context): New.
11093 (regptr): New.
11094 (do_fetch_inferior_registers): Rename to ...
11095 (arm_fetch_inferior_register): ... this.
11096 (arm_store_inferior_register): New.
11097 (arm_wince_breakpoint): Reimplement as unsigned long.
11098 (arm_wince_breakpoint_len): Define.
11099 (the_low_target): Adapt to new interface.
11100
11101 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
11102 load_debug_registers. Add get_thread_context, set_thread_context,
11103 thread_added and store_inferior_register. Rename
11104 fetch_inferior_registers to fetch_inferior_register.
11105 (regptr): Remove declaration.
11106
dd6953e1
PA
111072007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11108
11109 * linux-low.c (linux_detach): Change return type to int. Return 0.
11110 * spu-low.c (spu_detach): Likewise.
11111
444d6139
PA
111122007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11113
11114 * target.h (target_ops): Change return type of detach to int.
11115 Add join.
11116 (join_inferior): New.
11117 * server.c (main): Don't skip detach support on mingw32.
11118 If the inferior doesn't support detaching return error.
11119 Call join_inferior instead of using waitpid.
11120 * linux-low.c (linux_join): New.
11121 (linux_target_op): Add linux_join.
11122 * spu-low.c (spu_join): New.
11123 (spu_target_ops): Add spu_join.
11124 * win32-low.c (win32_detach): Adapt to new interface.
11125 Reopen current_process_handle before detaching. Issue a child
11126 resume before detaching.
11127 (win32_join): New.
11128 (win32_target_op): Add win32_join.
11129
1d5315fe
PA
111302007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11131
11132 * win32-low.c (win32-attach): Fix return value.
11133 * target.h (target_ops): Describe ATTACH return values.
11134
bf914831
PA
111352007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11136
11137 * win32-low.c (GETPROCADDRESS): Define.
11138 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
11139 (winapi_DebugSetProcessKillOnExit): Likewise.
11140 (win32_create_inferior): Force usage of ansi CreateProcessA.
11141 (win32_attach): Use GETPROCADDRESS.
11142 (win32_detach): Likewise.
11143
f72f3e60
PA
111442007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11145
11146 * win32-low.c (win32_wait): Don't use WSTOPSIG.
11147
ed50f18f
PA
111482007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
11149
11150 * win32-low.c: Commit leftover changes from 2007-03-29.
11151
0c2ead7e
DJ
111522007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
11153
11154 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
11155 fields short instead of int. Add explicit padding.
11156 (i387_cache_to_fsave): Remove unnecessary casts.
11157 (i387_fsave_to_cache): Doc fix.
11158 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
11159
73725ff3
DJ
111602007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
11161
11162 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
11163 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
11164
d99f33d8
PA
111652007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
11166
11167 * configure.srv (arm*-*-mingw32ce*): Move near the other
11168 arm targets.
11169
68070c10
PA
111702007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
11171
2482afc6 11172 * configure.ac: Add errno checking.
68070c10
PA
11173 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
11174 sys/file.h and malloc.h.
11175 (AC_CHECK_DECLS): Add perror.
11176 (srv_mingwce): Handle.
2482afc6 11177 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
11178 win32-i386-low.o to srv_tgtobj.
11179 (i[34567]86-*-mingw*): Likewise.
11180 (arm*-*-mingw32ce*): Add case.
11181 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
11182 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
11183 [__MINGW32CE__] (strerror): New function.
11184 [__MINGW32CE__] (errno): Define to GetLastError.
11185 [__MINGW32CE__] (COUNTOF): New macro.
11186 (remote_open): Remove extra close call.
11187 * mem-break.c (delete_breakpoint_at): New function.
11188 * mem-break.h (delete_breakpoint_at): Declare.
11189 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
11190 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
11191 [USE_WIN32API] (read, write): Add char* casts.
11192 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
11193 * server.h: Include wincecompat.h on Windows CE.
11194 [HAVE_ERRNO_H]: Check.
11195 (perror): Declare if not declared.
11196 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
11197 (perror_with_name): Remove errno declaration.
11198 * wincecompat.h: New.
11199 * wincecompat.c: New.
11200 * win32-low.h: New.
11201 * win32-arm-low.c: New.
11202 * win32-i386-low.c: New.
11203 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
11204 (OUTMSG2): Make it safe.
11205 (_T): New macro.
11206 (COUNTOF): New macro.
11207 (NUM_REGS): Get it from the low target.
11208 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
11209 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
11210 (thread_rec): Let low target handle debug registers.
11211 (child_add_thread): Likewise.
11212 (child_init_thread_list): Likewise.
11213 (continue_one_thread): Likewise.
11214 (regptr): New.
11215 (do_child_fetch_inferior_registers): Move to ...
11216 * win32-i386-low.c: ... here, and rename to ...
11217 (do_fetch_inferior_registers): ... this.
889bf7c5 11218 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
11219 Go through the low target.
11220 (do_child_store_inferior_registers): Use regptr.
11221 (strwinerror): New function.
11222 (win32_create_inferior): Handle Windows CE.
11223 Use strwinerror instead of strerror on Windows error
11224 codes. Add program to the error output.
11225 Don't close the main thread handle on Windows CE.
11226 (win32_attach): Use coredll.dll on Windows CE.
11227 (win32_kill): Close current process and current
11228 thread handles.
11229 (win32_detach): Use coredll.dll on Windows CE.
11230 (win32_resume): Let low target handle debug registers, and
11231 step request.
11232 (handle_exception): Add/Remove initial breakpoint. Avoid
11233 non-existant WSTOPSIG on Windows CE.
11234 (win32_read_inferior_memory): Cast to remove warning.
11235 (win32_arch_string): Go through the low target.
11236 (initialize_low): Call set_breakpoint_data with the low
11237 target's breakpoint.
11238 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
11239 FOP_REGNUM, mappings): Move to ...
11240 * win32-i386-low.c: ... here.
11241 * win32-low.c (win32_thread_info): Move to ...
11242 * win32-low.h: ... here.
11243 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
11244 win32-arm-low.c and wincecompat.c.
11245 (all:): Add $EXEEXT.
11246 (install-only:): Likewise.
11247 (gdbserver:): Likewise.
11248 (gdbreplay:): Likewise.
11249 * config.in: Regenerate.
11250 * configure: Regenerate.
11251
41093d81
PA
112522007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
11253
11254 * win32-low.c: Rename typedef thread_info to
11255 win32_thread_info throughout.
11256
544afa54
PA
112572007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
11258
11259 * win32-i386-low.c: Rename to ...
11260 * win32-low.c: ... this.
11261 * configure.srv: Replace win32-i386-low.o with win32-low.o.
11262 * Makefile.in: Likewise.
11263
bce7165d
PA
112642007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
11265
11266 * remote-utils.c (monitor_output): Constify msg parameter.
11267 * server.h (monitor_output): Likewise.
11268 * win32-i386-low.c (handle_output_debug_string): New.
11269 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
11270 handle_output_debug_string.
11271 (get_child_debug_event): Likewise.
11272
506c7aa0
DJ
112732007-03-27 Mat Hostetter <mat@lcs.mit.edu>
11274
11275 * server.c (main): Correct strtoul check.
11276
42c81e2a
DJ
112772007-03-27 Jon Ringle <jon@ringle.org>
11278
11279 * linux-low.c: Check __ARCH_HAS_MMU__ also.
11280
9453113a
DJ
112812007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
11282
11283 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
11284
64a69107
DJ
112852007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
11286
11287 * terminal.h: Check HAVE_SGTTY_H.
11288
112892007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
11290
11291 * remote-utils.c (remote_open): Print out the assigned port number.
11292
c74d0ad8
DJ
112932007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
11294
11295 * remote-utils.c (monitor_output): New function.
11296 * server.c (debug_threads): Define here.
11297 (monitor_show_help): New function.
11298 (handle_query): Handle qRcmd.
11299 (main): Do not handle 'd' packet.
11300 * server.h (debug_threads, remote_debug, monitor_output): Declare.
11301 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
11302 of debug_threads.
11303
de7c3b4a
PA
113042007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11305
11306 * Makefile.in (EXEEXT): New.
11307 (clean): Use $(EXEEXT).
11308
ef57601b
PA
113092007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11310
11311 * target.h (target_ops): Rename send_signal to request_interrupt,
11312 and remove enum target_signal parameter.
11313 * linux-low.c (linux_request_interrupt): Rename from
11314 linux_send_signal, and always send SIGINT.
11315 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
11316 and always send SIGINT.
11317 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
11318 of send_signal.
11319 (input_interrupt): Likewise.
11320
820f2bda
PA
113212007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11322
11323 * server.c (get_features_xml): Check if target implemented
11324 arch_string.
11325 * win32-i386-low.c (win32_arch_string): New.
11326 (win32_target_ops): Add win32_arch_string as arch_string member.
11327
ab39bf24
UW
113282007-02-22 Markus Deuling <deuling@de.ibm.com>
11329
11330 * spu-low.c (spu_arch_string): New.
11331 (spu_target_ops): Add spu_arch_string.
11332
61ff6e04
DJ
113332007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
11334
11335 * remote-utils.c: Remove HAVE_TERMINAL_H check.
11336 * configure.ac: Do not check for terminal.h.
11337 * configure, config.in: Regenerated.
11338
fb1e4ffc
DJ
113392007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
11340
11341 * Makefile.in (OBS): Add $(XML_BUILTIN).
11342 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
11343 (clean): Update.
11344 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
11345 (arm-with-iwmmxt.c): New.
11346 * config.in, configure: Regenerate.
11347 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
11348 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
11349 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
11350 (arm*-*-linux*): Add iWMMXt and regset support.
11351 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
11352 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
11353 (arm_store_wmmxregset, target_regsets): New.
11354 * server.c (get_features_xml): Take annex argument. Check builtin
11355 XML documents.
11356 (handle_query): Handle multiple annexes.
11357
0f48aa01
DJ
113582007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11359
11360 * remote-utils.c [USE_WIN32API] (read, write): Define.
11361 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
11362 write.
11363
23181151
DJ
113642007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
11365
11366 * linux-i386-low.c (the_low_target): Set arch_string.
11367 * linux-x86-64-low.c (the_low_target): Likewise.
11368 * linux-low.c (linux_arch_string): New.
11369 (linux_target_ops): Add it.
11370 * linux-low.h (struct linux_target_ops): Add arch_string.
11371 * server.c (write_qxfer_response): Use const void * for DATA.
11372 (get_features_xml): New.
11373 (handle_query): Handle qXfer:features:read. Report it for qSupported.
11374 * target.h (struct target_ops): Add arch_string method.
11375
9d606399
DJ
113762007-01-03 Denis Pilat <denis.pilat@st.com>
11377 Daniel Jacobowitz <dan@codesourcery.com>
11378
11379 * linux-low.c (linux_kill): Handle being called with no threads.
11380 * win32-i386-low.c (win32_kill): Likewise.
11381 (get_child_debug_event): Clear current_process_handle.
11382
113832006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
11384 Daniel Jacobowitz <dan@codesourcery.com>
11385
11386 * remote-utils.c (remote_open): Check the type of specified
11387 serial port devices before opening them.
11388 * server.c (main): Kill the inferior if an error occurs during
11389 the first remote_open.
11390
a5e13d24
DJ
113912006-12-05 Markus Deuling <deuling@de.ibm.com>
11392
11393 * README: Update supported targets.
11394
186947f7
DJ
113952006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
11396
11397 * Makefile.in (clean): Remove reg-mips64.c.
11398 (reg-mips64.c, reg-mips64.o): New rules.
11399 * configure.srv: Handle mips64. Include regset support for mips.
11400 * linux-mips-low.c (union mips_register): New.
11401 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
11402 (mips_breakpoint, mips_breakpoint_at): Use int.
11403 (mips_collect_register, mips_supply_register)
11404 (mips_collect_register_32bit, mips_supply_register_32bit)
11405 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
11406 (mips_store_fpregset, target_regsets): New.
11407 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
11408
a13e2c95
UW
114092006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
11410
11411 * configure.srv: Add target "spu*-*-*".
11412 * Makefile.in (clean): Remove reg-spu.c.
11413 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
11414 * spu-low.c: New file.
11415
cb7283db
DJ
114162006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
11417
11418 * configure.ac: Correct td_thr_tls_get_addr test.
11419 * configure: Regenerated.
11420
89be2091
DJ
114212006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
11422
11423 * linux-low.c (linux_wait_for_event): Reformat. Use the
11424 pass_signals array.
11425 * remote-utils.c (decode_address_to_semicolon): New.
11426 * server.c (pass_signals, handle_general_set): New.
11427 (handle_query): Mention QPassSignals for qSupported.
11428 (main): Call handle_general_set.
11429 * server.h (pass_signals, decode_address_to_semicolon): New.
11430
000ef4f0
DJ
114312006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
11432
11433 * server.c (handle_query): Correct error handling for read_auxv.
11434
b7149293
UW
114352005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
11436
11437 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
11438 and srv_linux_thread_db to yes.
11439 * linux-s390-low.c (s390_fill_gregset): New function.
11440 (target_regsets): Define data structure.
11441
dae5f5cf
DJ
114422006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
11443
11444 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
11445 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
11446 * config.in, configure: Regenerated.
11447 * inferiors.c (gdb_id_to_thread): New function.
11448 (gdb_id_to_thread_id): Use it.
11449 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
11450 * linux-low.h (struct process_info): Add th member.
11451 (thread_db_get_tls_address): New prototype.
11452 * remote-utils.c (decode_address): Make non-static.
11453 * server.c (handle_query): Handle qGetTLSAddr.
11454 * server.h (gdb_id_to_thread, decode_address): New prototypes.
11455 * target.h (struct target_ops): Add get_tls_address.
11456 * thread-db.c (maybe_attach_thread): Save the thread handle.
11457 (thread_db_get_tls_address): New.
11458
32ca6d61
DJ
114592006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
11460
11461 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
11462 (linux_resume_one_process): Take a siginfo_t *. Update all
11463 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
11464 (struct pending_signals): Add a siginfo_t.
11465 (linux_wait_for_process): Always set last_status.
11466 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
11467 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
11468 * linux-low.h (struct process_info): Add last_status.
11469
5ffff7c1
DJ
114702006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
11471
11472 * remote-utils.c (try_rle): New function.
11473 (putpkt_binary): Use it.
11474
8695c747
DJ
114752006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
11476
11477 * Makefile.in (clean): Clean reg-x86-64-linux.c.
11478 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
11479 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
11480 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
11481 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
11482 point registers.
11483
290fadea
RS
114842006-08-08 Richard Sandiford <richard@codesourcery.com>
11485
11486 * server.c (terminal_fd): New variable.
11487 (old_foreground_pgrp): Likewise.
11488 (restore_old_foreground_pgrp): New function.
11489 (start_inferior): Record the terminal file descriptor in terminal_fd
11490 and its original foreground group in old_foreground_pgrp. Register
11491 restore_old_foreground_pgrp with atexit().
11492
9f2e1e63
DJ
114932006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
11494
11495 * server.c (handle_query): Correct qPart to qXfer.
11496
b80864fb
DJ
114972006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
11498
11499 * configure.ac: Check for more headers which are missing on
11500 Windows. Automatically supply -lwsock32 and USE_WIN32API.
11501 * configure.srv: Add Cygwin and mingw32.
11502 * remote-utils.c: Don't include headers unconditionally which
11503 are missing on mingw32. Include <winsock.h> for mingw32.
11504 (remote_open): Adjust for mingw32 support. Flush
11505 standard error after writing to it.
11506 (remote_close, putpkt_binary, input_interrupt, block_async_io)
11507 (unblock_async_io, enable_async_io, disable_async_io)
11508 (readchar, getpkt): Update for Winsock support.
11509 (prepare_resume_reply): Expect a protocol signal number.
11510 * server.c: Disable <sys/wait.h> on mingw32.
11511 (start_inferior): Adjust for mingw32 support. Flush
11512 standard error after writing to it.
11513 (attach_inferior): Likewise. Use protocol signal
11514 numbers.
11515 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
11516 and names.
11517 * win32-i386-low.c: New file.
11518 * Makefile.in (XM_CLIBS): Set.
11519 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
11520 (win32-i386-low.o): New dependency rule.
11521 * linux-low.c (linux_wait): Use target signal numbers.
11522 * target.h (struct target_ops): Doc fix.
11523 * server.h (target_signal_to_name): New prototype.
11524 * gdbreplay.c: Don't include headers unconditionally which
11525 are missing on mingw32. Include <winsock.h> for mingw32.
11526 (remote_close, remote_open): Adjust for Winsock support.
11527 * configure, config.in: Regenerated.
11528
0876f84a
DJ
115292006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
11530
11531 * server.c (decode_xfer_read, write_qxfer_response): New.
11532 (handle_query): Take a packet length argument. Handle
11533 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
11534 the qSupported response.
11535 (main): Update call to handle_query.
11536
01f9e8fa
DJ
115372006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
11538
11539 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
11540 (putpkt_binary): Renamed from putpkt and adjusted for binary
11541 data.
11542 (putpkt): New wrapper for putpkt_binary.
11543 (readchar): Don't mask off the high bit.
11544 (decode_X_packet): New function.
11545 * server.c (main): Call putpkt_binary if a handler sets the packet
11546 length. Save the length of the incoming packet. Handle 'X'.
11547 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
11548
be2a5f71
DJ
115492006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
11550
11551 * server.c (handle_query): Handle qSupported.
11552
ea025f5f
DJ
115532006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
11554
11555 * remote-utils.c (all_symbols_looked_up): New variable.
11556 (look_up_one_symbol): Check it.
11557 * server.h (look_up_one_symbol): New declaration.
11558 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
11559
9308fc88
DJ
115602006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
11561
11562 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 11563 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
11564 (PTRACE_GET_THREAD_AREA): Define.
11565 (ps_get_thread_area): New function.
11566
52fb6437
NS
115672006-05-09 Nathan Sidwell <nathan@codesourcery.com>
11568
11569 * configure.srv (m68k*-*-uclinux*): New target.
11570 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
11571 (linux_resume_one_process): Remove extraneous cast.
11572 (linux_read_offsets): New.
11573 (linux_target_op): Add linux_read_offsets on mmuless systems.
11574 * server.c (handle_query): Add qOffsets logic.
11575 * target.h (struct target_ops): Add read_offsets.
11576
21b0f40c
DJ
115772006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
11578
11579 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
11580 (PTRACE_GET_THREAD_AREA): Define.
11581 (ps_get_thread_area): New function.
11582 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
11583 (linux-x86-64-low.o): Update.
11584
0050a760
DJ
115852006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
11586
11587 * configure.ac: Remove checks for prfpregset_t.
11588 * gdb_proc_service.h: New file.
11589 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
11590 new "gdb_proc_service.h".
11591 * proc-service.c: Likewise.
11592 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
11593 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
11594 * Makefile.in (gdb_proc_service_h): Updated.
11595 * configure, config.in: Regenerated.
11596
b92a518e
DJ
115972006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
11598
11599 * remote-utils.c (prepare_resume_reply): Move declaration
11600 of gdb_id_from_wait to the top of the block.
11601
545587ee
DJ
116022006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
11603
11604 * linux-low.c (regsets_store_inferior_registers): Read the regset
11605 from the target before filling it.
11606
9db87ebd
DJ
116072006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
11608
11609 * server.c (attach_inferior): Return SIGTRAP for a successful
11610 attach.
11611
dd24457d
DJ
116122006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
11613
11614 * Makefile.in (OBS): Add version.o.
11615 (STAGESTUFF): Delete.
11616 (version.o): Add dependencies.
11617 (version.c): Replace rule.
11618 (clean): Remove version.c.
11619 * server.c (gdbserver_version): New.
11620 (gdbserver_usage): Use printf.
11621 (main): Handle --version and --help.
11622 * server.h (version, host_name): Add declarations.
11623
6f0f660e
EZ
116242005-12-23 Eli Zaretskii <eliz@gnu.org>
11625
889bf7c5
PA
11626 * linux-arm-low.c:
11627 * linux-arm-low.c:
11628 * inferiors.c:
11629 * i387-fp.h:
11630 * i387-fp.c:
11631 * gdbreplay.c:
11632 * regcache.c:
11633 * proc-service.c:
11634 * mem-break.h:
11635 * mem-break.c:
11636 * linux-x86-64-low.c:
11637 * linux-sh-low.c:
11638 * linux-s390-low.c:
11639 * linux-ppc64-low.c:
11640 * linux-ppc-low.c:
11641 * linux-mips-low.c:
11642 * linux-m68k-low.c:
11643 * linux-m32r-low.c:
11644 * linux-low.h:
11645 * linux-low.c:
11646 * linux-ia64-low.c:
11647 * linux-i386-low.c:
11648 * linux-crisv32-low.c:
11649 * thread-db.c:
11650 * terminal.h:
11651 * target.h:
11652 * target.c:
11653 * server.h:
11654 * server.c:
11655 * remote-utils.c:
11656 * regcache.h:
11657 * utils.c:
11658 * Makefile.in:
11659 * configure.ac:
6f0f660e
EZ
11660 * gdbserver.1: Add (C) after Copyright. Update the FSF
11661 address.
11662
9d1fb177
DJ
116632005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
11664
11665 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
11666 (arm_breakpoint_at): Recognize both breakpoints.
11667 (the_low_target): Use the correct breakpoint instruction.
11668
011a70c2
DJ
116692005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
11670
11671 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
11672 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
11673 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
11674 (the_low_target): Update.
11675
7fb85e41
AS
116762005-10-25 Andreas Schwab <schwab@suse.de>
11677
11678 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
11679
11680 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
11681 (ia64_num_regs): Reduce to 462.
11682
3db0444b
DJ
116832005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
11684
11685 * acinclude.m4: Correct quoting.
11686 * aclocal.m4: Regenerated.
11687
11688 Suggested by SZOKOVACS Robert <szo@ies.hu>:
11689 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
11690 (thread_db_init): Call thread_db_err_str.
11691 * configure.ac: Check for TD_VERSION.
11692 * config.in, configure: Regenerated.
11693
bee0189a
DJ
116942005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11695
11696 * server.h (error, fatal, warning): Add ATTR_FORMAT.
11697
e9d25b98
DJ
116982005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
11699
11700 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
11701 is not available. Define HAVE_PTRACE_GETREGS if it is.
11702 * config.in, configure: Regenerated.
11703 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
11704 * linux-i386-low.c, linux-m68k-low.c: Update to use
11705 HAVE_PTRACE_GETREGS.
11706 * linux-low.c (regsets_fetch_inferior_registers)
11707 (regsets_store_inferior_registers): Only return 0 if we processed
11708 GENERAL_REGS.
11709 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
11710 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
11711
a06660f7
DJ
117122005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
11713
11714 * inferiors.c (struct thread_info): Add gdb_id.
11715 (add_thread): Add gdb_id argument.
11716 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
11717 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
11718 calls to add_thread.
11719 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
11720 * server.c (handle_query): Use thread_to_gdb_id.
11721 (handle_v_cont, main): Use gdb_id_to_thread_id.
11722 * server.h (add_thread): Update prototype.
11723 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
11724 prototypes.
11725
5a1f5858
DJ
117262005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
11727
11728 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
11729 left-padded registers.
11730 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
11731 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
11732
e122f1f5
SE
117332005-07-01 Steve Ellcey <sje@cup.hp.com>
11734
11735 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
11736 * configure: Regenerate.
11737 * config.in: Regenerate.
11738 * server.h (NEED_DECLARATION_STRERROR):
11739 Replace with !HAVE_DECL_STRERROR.
11740
d592fa2f
DJ
117412005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
11742
11743 * linux-low.c (linux_wait, linux_send_signal): Don't test
11744 an unsigned long variable for > 0 if it could be MAX_ULONG.
11745 * server.c (myresume): Likewise.
11746 * target.c (set_desired_inferior): Likewise.
11747
ccbd4912
MK
117482005-06-13 Mark Kettenis <kettenis@gnu.org>
11749
11750 * configure.ac: Simplify and improve check for socklen_t.
11751 * configure, config.in: Regenerate.
11752
f450004a
DJ
117532005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
11754
11755 * acconfig.h: Remove.
11756 * configure.ac: Add a test for socklen_t. Use three-argument
11757 AC_DEFINE throughout.
11758 * config.in: Regenerated using autoheader 2.59.
11759 * configure: Regenerated.
11760
11761 * gdbreplay.c (socklen_t): Provide a default.
11762 (remote_open): Use socklen_t.
11763 * remote-utils.c (socklen_t): Provide a default.
11764 (remote_open): Use socklen_t.
11765 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
11766 unsigned char.
11767
11768 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
11769 char for buffers.
11770 * linux-low.c (linux_read_memory, linux_write_memory)
11771 (linux_read_auxv): Likewise.
11772 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
11773 (check_mem_write): Likewise.
11774 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
11775 Likewise.
11776 * regcache.c (struct inferior_rgcache_data, registers_to_string)
11777 (registers_from_string, register_data): Likewise.
11778 * server.c (handle_query, main): Likewise.
11779 * server.h (convert_ascii_to_int, convert_int_to_ascii)
11780 (decode_M_packet): Likewise.
11781 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
11782 * target.h (struct target_ops): Update read_memory, write_memory,
11783 and read_auxv.
11784 (read_inferior_memory, write_inferior_memory): Update.
11785 * linux-low.h (struct linux_target_ops): Change type of breakpoint
11786 to unsigned char *.
11787 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
11788 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
11789 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
11790 linux-s390-low.c, linux-sh-low.c: Update for changes in
11791 read_inferior_memory and the_low_target->breakpoint.
11792
eee84df1
DJ
117932005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
11794
11795 * Makefile.in (SFILES): Add linux-ppc64-low.c.
11796 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
11797 * configure.srv: Add powerpc64-*-linux*.
11798 * linux-ppc64-low.c: New file.
11799
45b134e5
OF
118002005-05-23 Orjan Friberg <orjanf@axis.com>
11801
11802 * linux-cris-low.c: New file with support for CRIS.
11803 * linux-crisv32-low.c: Ditto for CRISv32.
11804 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
11805 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 11806 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
11807 reg-crisv32.o, and reg-crisv32.c to make rules.
11808 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
11809 recognized targets.
11810
48d93c75
UW
118112005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
11812
11813 * linux-low.c (fetch_register): Ensure buffer size is a multiple
11814 of sizeof (PTRACE_XFER_TYPE).
11815 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
11816
e013ee27
OF
118172005-05-12 Orjan Friberg <orjanf@axis.com>
11818
889bf7c5 11819 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
11820 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
11821 pointers for hardware watchpoint support.
11822 * linux-low.h (struct linux_target_ops): Ditto.
11823 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
11824 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
11825 to linux_target_ops.
11826 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
11827 reply packet.
11828 * server.c (main): Recognize 'Z' and 'z' packets.
11829
b0ded00b
UW
118302005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
11831
11832 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
11833 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
11834 (the_low_target): Add new members.
11835
8643e2ad
DJ
118362005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
11837
11838 * proc-service.c (ps_lgetregs): Search all_processes instead of
11839 all_threads.
11840
fc620387
DJ
118412005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
11842
11843 * server.c (start_inferior): Change return type to int.
11844 (attach_inferior): Change sigptr to int *.
11845 (handle_v_cont, handle_v_requests): Change signal to int *.
11846 (main): Change signal to int.
11847
118482005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
11849
11850 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
11851 * configure.srv: Add m32r*-*-linux*.
11852 * linux-m32r-low.c: New file.
11853
e0e76420
DJ
118542005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
11855
11856 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
11857
a1928bad
DJ
118582005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
11859
11860 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
11861 Take unsigned long arguments for PIDs.
11862 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
11863 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
11864 (wait_for_sigstop, linux_resume_one_process)
11865 (regsets_fetch_inferior_registers, linux_send_signal)
11866 (linux_read_auxv): Likewise. Update the types of variables holding
11867 PIDs. Update format string specifiers.
11868 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
11869 * remote-utils.c (prepare_resume_reply): Likewise.
11870 * server.c (cont_thread, general_thread, step_thread)
11871 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
11872 unsigned long.
11873 (handle_query): Update format specifiers.
11874 (handle_v_cont, main): Use strtoul for thread IDs.
11875 * server.h (struct inferior_list_entry): Use unsigned long for ID.
11876 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
11877 (general_thread, step_thread, thread_from_wait)
11878 (old_thread_from_wait): Update.
11879 * target.h (struct thread_resume): Use unsigned long for THREAD.
11880 (struct target_ops): Use unsigned long for arguments to attach and
11881 thread_alive.
11882
dcdb98d2
DJ
118832005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
11884
11885 * acinclude.m4: Include bfd/bfd.m4 directly.
11886 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
11887 <agriffis@toolchain.org>.
11888 * aclocal.m4, configure: Regenerated.
11889
bec39cab
AC
118902005-01-07 Andrew Cagney <cagney@gnu.org>
11891
11892 * configure.ac: Rename configure.in, require autoconf 2.59.
11893 * configure: Re-generate.
11894
434c4c77
DJ
118952004-12-08 Daniel Jacobowitz <dan@debian.org>
11896
11897 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
11898 LIBS when finished.
11899 * aclocal.m4: Regenerated.
11900 * configure: Regenerated.
11901
db1d3e1b
AS
119022004-11-21 Andreas Schwab <schwab@suse.de>
11903
11904 * linux-m68k-low.c (m68k_num_gregs): Define.
11905 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
11906 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
11907 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
11908 (m68k_breakpoint_at): New. Add to the_low_target.
11909
11910 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
11911 srv_linux_thread_db to yes.
11912
43360365
JB
119132004-10-20 Joel Brobecker <brobecker@gnat.com>
11914
11915 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
11916 (ARCH_SET_FS): Likewise.
11917 (ARCH_GET_FS): Likewise.
11918 (ARCH_GET_GS): Likewise.
11919
fd500816
DJ
119202004-10-16 Daniel Jacobowitz <dan@debian.org>
11921
11922 * linux-i386-low.c (ps_get_thread_area): New.
11923 * linux-x86-64-low.c (ps_get_thread_area): New.
11924 * linux-low.c: Include <sys/syscall.h>.
11925 (linux_kill_one_process): Don't kill the first thread here.
11926 (linux_kill): Kill the first thread here.
11927 (kill_lwp): New function.
11928 (send_sigstop, linux_send_signal): Use it.
11929 * proc-service.c: Clean up #ifdefs.
11930 (fpregset_info): Delete.
11931 (ps_lgetregs): Update and enable implementation.
11932 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
11933 implementations.
11934 * remote-utils.c (struct sym_cache, symbol_cache): New.
11935 (input_interrupt): Print a clearer message.
11936 (async_io_enabled): New variable.
11937 (enable_async_io, disable_async_io): Use it. Update comments.
11938 (look_up_one_symbol): Use the symbol cache.
11939 * thread-db.c (thread_db_look_up_symbols): New function.
11940 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
11941
f6de3c42
DJ
119422004-10-16 Daniel Jacobowitz <dan@debian.org>
11943
11944 * configure.in: Test for -rdynamic.
11945 * configure: Regenerated.
11946 * Makefile (INTERNAL_LDFLAGS): New.
11947 (gdbserver, gdbreplay): Use it.
11948
2c0fc042
AC
119492004-09-02 Andrew Cagney <cagney@gnu.org>
11950
11951 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
11952
075b3282
DJ
119532004-03-23 Daniel Jacobowitz <drow@mvista.com>
11954
11955 * linux-low.c (linux_wait): Clear all_processes list also.
11956
fa6a77dc
DJ
119572004-03-12 Daniel Jacobowitz <drow@mvista.com>
11958
11959 * linux-low.c: Include <errno.h>. Remove extern declaration of
11960 errno.
11961
6d782a97
DJ
119622004-03-12 Daniel Jacobowitz <drow@mvista.com>
11963
11964 * gdbreplay.c, server.h, utils.c: Update copyright years.
11965
3a7fb99b
DJ
119662004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
11967
11968 * server.c (main): Print child status or termination signal from
11969 variable 'signal', not 'sig'.
11970
c3e735a6
DJ
119712004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
11972
11973 * linux-low.c (linux_read_memory): Change return type to
11974 int. Check for and return error from ptrace().
11975 * target.c (read_inferior_memory): Change return type to int. Pass
11976 back return status from the_target->read_memory().
11977 * target.h (struct target_ops): Adapt *read_memory() prototype.
11978 Update comment.
11979 (read_inferior_memory): Adapt prototype.
11980 * server.c (main): Return an error packet if
11981 read_inferior_memory() returns an error.
11982
a59d1c82
DJ
119832004-03-04 Daniel Jacobowitz <drow@mvista.com>
11984
11985 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
11986 Unify with other clean targets.
11987
dc3f8883
DJ
119882004-02-29 Daniel Jacobowitz <drow@mvista.com>
11989
11990 * server.c (handle_v_cont): Call set_desired_inferior.
11991
89a208da
DJ
119922004-02-29 Daniel Jacobowitz <drow@mvista.com>
11993
11994 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
11995
62ea82f5
DJ
119962004-02-29 Daniel Jacobowitz <drow@mvista.com>
11997
11998 * linux-low.c (linux_wait): Unblock async I/O.
11999 (linux_resume): Block and enable async I/O.
12000 * remote-utils.c (block_async_io, unblock_async_io): New functions.
12001 * server.h (block_async_io, unblock_async_io): Add prototypes.
12002
6910d122
DJ
120032004-02-29 Daniel Jacobowitz <drow@mvista.com>
12004
12005 * remote-utils.c (remote_open): Print a status notice after
12006 opening a TCP port.
12007 * server.c (attach_inferior): Print a status notice after
12008 attaching.
12009
120102004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
12011
12012 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
12013
c89dc5d4
DJ
120142004-02-26 Daniel Jacobowitz <drow@mvista.com>
12015
12016 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
12017 error packet.
12018 * server.c, target.h: Update copyright years.
12019
4b8dad4a
RM
120202004-02-25 Roland McGrath <roland@redhat.com>
12021
12022 * target.h (struct target_ops): New member `read_auxv'.
12023 * server.c (handle_query): Handle qPart:auxv:read: query using that.
12024 * linux-low.c (linux_read_auxv): New function.
12025 (linux_target_ops): Initialize `read_auxv' member to that.
12026
d7446758
JB
120272004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
12028
12029 Committed by Jim Blandy <jimb@redhat.com>.
12030
12031 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 12032 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
12033 instead of GPR_SIZE to distiguish s390 and s390x targets.
12034
5544ad89
DJ
120352004-01-31 Daniel Jacobowitz <drow@mvista.com>
12036
12037 * linux-low.c: Update copyright year.
12038 (check_removed_breakpoint): Clear pending_is_breakpoint.
12039 (linux_set_resume_request, linux_queue_one_thread)
12040 (resume_status_pending_p): New functions.
12041 (linux_continue_one_thread): Use process->resume.
12042 (linux_resume): Only resume threads if there are no pending events.
12043 * linux-low.h (struct process_info): Add resume request
12044 pointer.
12045
2a68b70e
DJ
120462004-01-30 Daniel Jacobowitz <drow@mvista.com>
12047
12048 * regcache.c (new_register_cache): Clear the allocated register
12049 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
12050
64386c31
DJ
120512003-10-13 Daniel Jacobowitz <drow@mvista.com>
12052
12053 * linux-low.c (linux_resume): Take a struct thread_resume *
12054 argument.
12055 (linux_wait): Update call.
12056 (resume_ptr): New static variable.
12057 (linux_continue_one_thread): Renamed from
12058 linux_continue_one_process. Use resume_ptr.
12059 (linux_resume): Use linux_continue_one_thread.
12060 * server.c (handle_v_cont, handle_v_requests): New functions.
12061 (myresume): New function.
12062 (main): Handle 'v' case.
12063 * target.h (struct thread_resume): New type.
12064 (struct target_ops): Change argument of "resume" to struct
12065 thread_resume *.
12066 (myresume): Delete macro.
12067
c938e9b0
L
120682003-08-08 H.J. Lu <hongjiu.lu@intel.com>
12069
12070 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
12071 (uninstall): Support DESTDIR.
12072
7f313d07
BC
12073Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
12074
12075 * configure.srv: Add xscale*linux copy of arm*linux entry.
12076
3b2fc2ea
DJ
120772003-07-24 Daniel Jacobowitz <drow@mvista.com>
12078
12079 * linux-arm-low.c (arm_reinsert_addr): New function.
12080 (the_low_target): Add arm_reinsert_addr.
12081
1c0a559e
MK
120822003-07-08 Mark Kettenis <kettenis@gnu.org>
12083
12084 * mem-break.c: Remove whitespace at end of file.
12085
43d5792c
DJ
120862003-06-28 Daniel Jacobowitz <drow@mvista.com>
12087
12088 * configure.in: Check whether we need to prototype strerror.
12089 * server.h: Optionally prototype strerror.
12090 * gdbreplay.c (perror_with_name): Use strerror.
12091 * linux-low.c (linux_attach_lwp): Use strerror.
12092 * utils.c (perror_with_name): Use strerror.
12093 * config.in, configure: Regenerated.
12094
c8a86edf
DJ
120952003-06-28 Daniel Jacobowitz <drow@mvista.com>
12096
12097 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
12098 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
12099
73d37363
DJ
121002003-06-20 Daniel Jacobowitz <drow@mvista.com>
12101
12102 * Makefile.in (SFILES): Update.
12103 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
12104 low-sun3.c: Remove files.
12105
6ad8ae5c
DJ
121062003-06-17 Daniel Jacobowitz <drow@mvista.com>
12107
12108 * linux-low.c: Move comment to linux_thread_alive where it belonged.
12109 (linux_detach_one_process, linux_detach): New functions.
12110 (linux_target_ops): Add linux_detach.
12111 * server.c (main): Handle 'D' packet.
12112 * target.h (struct target_ops): Add "detach" member.
12113 (detach_inferior): Define.
12114
1581182a
MK
121152003-06-13 Mark Kettenis <kettenis@gnu.org>
12116
12117 From Kelley Cook <kelleycook@wideopenwest.com>:
12118 * configure.srv: Accept i[34567]86 variants.
12119
e5379b03
DJ
121202003-06-05 Daniel Jacobowitz <drow@mvista.com>
12121
12122 * linux-low.c (linux_wait_for_event): Correct comment typos.
12123 (linux_resume_one_process): Call check_removed_breakpoint.
12124 (linux_send_signal): New function.
12125 (linux_target_ops): Add linux_send_signal.
12126 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
12127 of kill.
12128 * target.h (struct target_ops): Add send_signal.
12129
2ff29de4
JB
121302003-05-29 Jim Blandy <jimb@redhat.com>
12131
12132 * linux-low.c (usr_store_inferior_registers): Transfer buf in
12133 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
12134 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
12135 away part of the register's value.
12136
254787d4
DJ
121372003-03-26 Daniel Jacobowitz <drow@mvista.com>
12138
12139 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
12140 (linux_wait_for_event, linux_init_signals): Likewise.
12141
94e10508
DJ
121422003-03-17 Daniel Jacobowitz <drow@mvista.com>
12143
12144 * configure.in: Check for stdlib.h.
12145 * configure: Regenerated.
12146 * config.in: Regenerated.
12147
4c0711e0
DJ
121482003-01-04 Andreas Schwab <schwab@suse.de>
12149
12150 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
12151
ef66e766
AC
121522003-01-02 Andrew Cagney <ac131313@redhat.com>
12153
12154 * Makefile.in: Remove obsolete code.
12155
a1358604
DJ
121562002-11-20 Daniel Jacobowitz <drow@mvista.com>
12157
12158 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
12159 defined(PT_FPR0_HI).
12160
23ce3b1c
DJ
121612002-11-17 Stuart Hughes <seh@zee2.com>
12162
12163 * linux-arm-low.c (arm_num_regs): Increase.
12164 (arm_regmap): Include status register.
12165
121662002-11-17 Daniel Jacobowitz <drow@mvista.com>
12167
12168 * linux-low.c (register_addr): Remove incorrect -1 check.
12169
a9fa9f7d
DJ
121702002-08-29 Daniel Jacobowitz <drow@mvista.com>
12171
12172 * linux-low.c (linux_create_inferior): Call setpgid. Return
12173 the new PID.
12174 (unstopped_p, linux_signal_pid): Remove.
12175 (linux_target_ops): Remove linux_signal_pid.
12176 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
12177 global instead of target method.
12178 * target.h (struct target_ops): Remove signal_pid. Update comment
12179 for create_inferior.
12180 * server.c (signal_pid): New variable.
12181 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 12182 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
12183 (attach_inferior): Set signal_pid.
12184
17574093
DJ
121852002-08-23 Daniel Jacobowitz <drow@mvista.com>
12186
12187 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
12188
121892002-08-20 Jim Blandy <jimb@redhat.com>
12190
12191 * Makefile.in (LDFLAGS): Allow the configure script to establish a
12192 default for this.
12193
121942002-08-01 Andrew Cagney <cagney@redhat.com>
12195
12196 * Makefile.in: Make chill references obsolete.
12197
121982002-07-24 Kevin Buettner <kevinb@redhat.com>
12199
12200 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
12201 * configure: Regenerate.
12202 * config.in: Regenerate.
12203
122042002-07-09 David O'Brien <obrien@FreeBSD.org>
12205
12206 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
12207 (perror_with_name, remote_close, remote_open, expect, play): Static.
12208
122092002-07-04 Michal Ludvig <mludvig@suse.cz>
12210
4b8dad4a 12211 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
12212 byte offsets instead of an array of indexes.
12213 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
12214
122152002-06-13 Daniel Jacobowitz <drow@mvista.com>
12216
12217 * regcache.c: Add comment.
12218
122192002-06-11 Daniel Jacobowitz <drow@mvista.com>
12220
12221 * thread-db.c: New file.
12222 * proc-service.c: New file.
12223 * acinclude.m4: New file.
12224 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
12225 proc-service.o, and thread-db.o.
12226 (linux-low.o): Add USE_THREAD_DB.
12227 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
12228 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
12229 * aclocal.m4: Regenerated.
12230 * config.in: Regenerated.
12231 * configure: Regenerated.
12232 * configure.in: Check for proc_service.h, sys/procfs.h,
12233 thread_db.h, and linux/elf.h headrs.
12234 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
12235 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
12236 Check for -lthread_db and thread support.
12237 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
12238 PowerPC, and SuperH.
12239 * i387-fp.c: Constify arguments.
12240 * i387-fp.h: Likewise.
12241 * inferiors.c: (struct thread_info): Renamed from
12242 `struct inferior_info'. Remove PID member. Use generic inferior
12243 list header. All uses updated.
12244 (inferiors, signal_pid): Removed.
12245 (all_threads): New variable.
12246 (get_thread): Define.
12247 (add_inferior_to_list): New function.
12248 (for_each_inferior): New function.
12249 (change_inferior_id): New function.
12250 (add_inferior): Removed.
12251 (remove_inferior): New function.
12252 (add_thread): New function.
12253 (free_one_thread): New function.
12254 (remove_thread): New function.
12255 (clear_inferiors): Use for_each_inferior and free_one_thread.
12256 (find_inferior): New function.
12257 (find_inferior_id): New function.
12258 (inferior_target_data): Update argument type.
12259 (set_inferior_target_data): Likewise.
12260 (inferior_regcache_data): Likewise.
12261 (set_inferior_regcache_data): Likewise.
12262 * linux-low.c (linux_bp_reinsert): Remove.
12263 (all_processes, stopping_threads, using_thrads)
12264 (struct pending_signals, debug_threads, pid_of): New.
12265 (inferior_pid): Replace with macro.
12266 (struct inferior_linux_data): Remove.
12267 (get_stop_pc, add_process): New functions.
12268 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
12269 Use add_process and add_thread.
12270 (linux_attach_lwp): New function, based on old linux_attach. Use
12271 add_process and add_thread. Set stop_expected for new threads.
12272 (linux_attach): New function.
12273 (linux_kill_one_process): New function.
12274 (linux_kill): Kill all LWPs.
12275 (linux_thread_alive): Use find_inferior_id.
12276 (check_removed_breakpoints, status_pending_p): New functions.
12277 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
12278 Update. Use WNOHANG. Wait for cloned processes also. Update process
12279 struct for the found process.
12280 (linux_wait_for_event): New function.
12281 (linux_wait): Use it. Support LWPs.
12282 (send_sigstop, wait_for_sigstop, stop_all_processes)
12283 (linux_resume_one_process, linux_continue_one_process): New functions.
12284 (linux_resume): Support LWPs.
12285 (REGISTER_RAW_SIZE): Remove.
12286 (fetch_register): Use register_size instead. Call supply_register.
12287 (usr_store_inferior_registers): Likewise. Call collect_register.
12288 Fix recursive case.
12289 (regsets_fetch_inferior_registers): Improve error message.
12290 (regsets_store_inferior_registers): Add debugging.
12291 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
12292 (unstopped_p, linux_signal_pid): New functions.
12293 (linux_target_ops): Add linux_signal_pid.
12294 (linux_init_signals): New function.
12295 (initialize_low): Call it. Initialize using_threads.
12296 * regcache.c (inferior_regcache_data): Add valid
12297 flag.
12298 (get_regcache): Fetch registers lazily. Add fetch argument
12299 and update all callers.
12300 (regcache_invalidate_one, regcache_invalidate): New
12301 functions.
12302 (new_register_cache): Renamed from create_register_cache.
12303 Return the new regcache.
12304 (free_register_cache): Change argument to a void *.
12305 (registers_to_string, registers_from_string): Call get_regcache
12306 with fetch flag set.
12307 (register_data): Make static. Pass fetch flag to get_regcache.
12308 (supply_register): Call get_regcache with fetch flag clear.
12309 (collect_register): Call get_regcache with fetch flag set.
12310 (collect_register_as_string): New function.
12311 * regcache.h: Update.
12312 * remote-utils.c (putpkt): Flush after debug output and use
12313 stderr.
12314 Handle input interrupts while waiting for an ACK.
12315 (input_interrupt): Use signal_pid method.
12316 (getpkt): Flush after debug output and use stderr.
12317 (outreg): Use collect_register_as_string.
12318 (new_thread_notify, dead_thread_notify): New functions.
12319 (prepare_resume_reply): Check using_threads. Set thread_from_wait
12320 and general_thread.
12321 (look_up_one_symbol): Flush after debug output.
12322 * server.c (step_thread, server_waiting): New variables.
12323 (start_inferior): Don't use signal_pid. Update call to mywait.
12324 (attach_inferior): Update call to mywait.
12325 (handle_query): Handle qfThreadInfo and qsThreadInfo.
12326 (main): Don't fetch/store registers explicitly. Use
12327 set_desired_inferior. Support proposed ``Hs'' packet. Update
12328 calls to mywait.
12329 * server.h: Update.
12330 (struct inferior_list, struct_inferior_list_entry): New.
12331 * target.c (set_desired_inferior): New.
12332 (write_inferior_memory): Constify.
12333 (mywait): New function.
12334 * target.h: Update.
12335 (struct target_ops): New signal_pid method.
12336 (mywait): Removed macro, added prototype.
12337
12338 * linux-low.h (regset_func): Removed.
12339 (regset_fill_func, regset_store_func): New.
12340 (enum regset_type): New.
12341 (struct regset_info): Add type field. Use new operation types.
12342 (struct linux_target_ops): stop_pc renamed to get_pc.
12343 Add decr_pc_after_break and breakpoint_at.
12344 (get_process, get_thread_proess, get_process_thread)
12345 (strut process_info, all_processes, linux_attach_lwp)
12346 (thread_db_init): New.
12347
12348 * linux-arm-low.c (arm_get_pc, arm_set_pc,
12349 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
12350 (the_low_target): Add new members.
12351 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
12352 (i386_store_fpxregset): Constify.
12353 (target_regsets): Add new kind identifier.
12354 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
12355 (i386_set_pc): Add debugging.
12356 (i386_breakpoint_at): New function.
12357 (the_low_target): Add new members.
12358 * linux-mips-low.c (mips_get_pc, mips_set_pc)
12359 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
12360 (mips_breakpoint_at): New.
12361 (the_low_target): Add new members.
12362 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
12363 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
12364 (the_low_target): Add new members.
12365 * linux-sh-low.c (sh_get_pc, sh_set_pc)
12366 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
12367 (the_low_target): Add new members.
12368 * linux-x86-64-low.c (target_regsets): Add new kind
12369 identifier.
12370
123712002-05-15 Daniel Jacobowitz <drow@mvista.com>
12372
12373 From Martin Pool <mbp@samba.org>:
12374 * server.c (gdbserver_usage): New function.
12375 (main): Call it.
12376
123772002-05-14 Daniel Jacobowitz <drow@mvista.com>
12378
12379 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
12380 stop_at -> stop_pc.
12381
123822002-05-04 Andrew Cagney <ac131313@redhat.com>
12383
12384 * Makefile.in: Remove obsolete code.
12385
123862002-04-24 Michal Ludvig <mludvig@suse.cz>
12387
12388 * linux-low.c (regsets_fetch_inferior_registers),
12389 (regsets_store_inferior_registers): Removed cast to int from
12390 ptrace() calls.
12391 * regcache.h: Added declaration of struct inferior_info.
12392
123932002-04-20 Daniel Jacobowitz <drow@mvista.com>
12394
12395 * inferiors.c (struct inferior_info): Add regcache_data.
12396 (add_inferior): Call create_register_cache.
12397 (clear_inferiors): Call free_register_cache.
12398 (inferior_regcache_data, set_inferior_regcache_data): New functions.
12399 * regcache.c (struct inferior_regcache_data): New.
12400 (registers): Remove.
12401 (get_regcache): New function.
12402 (create_register_cache, free_register_cache): New functions.
12403 (set_register_cache): Don't initialize the register cache here.
12404 (registers_to_string, registers_from_string, register_data): Call
12405 get_regcache.
12406 * regcache.h: Add prototypes.
12407 * server.h: Likewise.
12408
124092002-04-20 Daniel Jacobowitz <drow@mvista.com>
12410
12411 * mem-break.c: New file.
12412 * mem-break.h: New file.
12413 * Makefile.in: Add mem-break.o rule; update server.h
12414 dependencies.
12415 * inferiors.c (struct inferior_info): Add target_data
12416 member.
12417 (clear_inferiors): Free target_data member if set.
12418 (inferior_target_data, set_inferior_target_data): New functions.
12419 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
12420 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
12421 * linux-low.c (linux_bp_reinsert): New variable.
12422 (struct inferior_linux_data): New.
12423 (linux_create_inferior): Use set_inferior_target_data.
12424 (linux_attach): Likewise. Call add_inferior.
12425 (linux_wait_for_one_inferior): New function.
12426 (linux_wait): Call it.
12427 (linux_write_memory): Add const.
12428 (initialize_low): Call set_breakpoint_data.
12429 * linux-low.h (struct linux_target_ops): Add breakpoint
12430 handling members.
12431 * server.c (attach_inferior): Remove extra add_inferior
12432 call.
12433 * server.h: Include mem-break.h. Update inferior.c
12434 prototypes.
12435 * target.c (read_inferior_memory)
12436 (write_inferior_memory): New functions.
12437 * target.h (read_inferior_memory)
12438 (write_inferior_memory): Change macros to prototypes.
12439 (struct target_ops): Update comments. Add const to write_memory
12440 definition.
12441
124422002-04-11 Daniel Jacobowitz <drow@mvista.com>
12443
12444 * linux-low.c (usr_store_inferior_registers): Support
12445 registers which are allowed to fail to store.
12446 * linux-low.h (linux_target_ops): Likewise.
12447 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
12448 (ppc_cannot_store_register): FPSCR may not be storable.
12449
124502002-04-09 Daniel Jacobowitz <drow@mvista.com>
12451
12452 * server.h: Include <string.h> if HAVE_STRING_H.
12453 * ChangeLog: Correct paths in last ChangeLog entry.
12454
124552002-04-09 Daniel Jacobowitz <drow@mvista.com>
12456
12457 * linux-low.h: Remove obsolete prototypes.
12458 (struct linux_target_ops): New.
12459 (extern the_low_target): New.
12460 * linux-low.c (num_regs, regmap): Remove declarations.
12461 (register_addr): Use the_low_target explicitly.
12462 (fetch_register): Likewise.
12463 (usr_fetch_inferior_registers): Likewise.
12464 (usr_store_inferior_registers): Likewise.
12465 * linux-arm-low.c (num_regs): Remove.
12466 (arm_num_regs): Define.
12467 (arm_regmap): Renamed from regmap, made static.
12468 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
12469 made static.
12470 (arm_cannot_store_register): Renamed from cannot_store_register,
12471 made static.
12472 (the_low_target): New.
12473 * linux-i386-low.c (num_regs): Remove.
12474 (i386_num_regs): Define.
12475 (i386_regmap): Renamed from regmap, made static.
12476 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
12477 made static.
12478 (i386_cannot_store_register): Renamed from cannot_store_register,
12479 made static.
12480 (the_low_target): New.
12481 * linux-ia64-low.c (num_regs): Remove.
12482 (ia64_num_regs): Define.
12483 (ia64_regmap): Renamed from regmap, made static.
12484 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
12485 made static.
12486 (ia64_cannot_store_register): Renamed from cannot_store_register,
12487 made static.
12488 (the_low_target): New.
12489 * linux-m68k-low.c (num_regs): Remove.
12490 (m68k_num_regs): Define.
12491 (m68k_regmap): Renamed from regmap, made static.
12492 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
12493 made static.
12494 (m68k_cannot_store_register): Renamed from cannot_store_register,
12495 made static.
12496 (the_low_target): New.
12497 * linux-mips-low.c (num_regs): Remove.
12498 (mips_num_regs): Define.
12499 (mips_regmap): Renamed from regmap, made static.
12500 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
12501 made static.
12502 (mips_cannot_store_register): Renamed from cannot_store_register,
12503 made static.
12504 (the_low_target): New.
12505 * linux-ppc-low.c (num_regs): Remove.
12506 (ppc_num_regs): Define.
12507 (ppc_regmap): Renamed from regmap, made static.
12508 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
12509 made static.
12510 (ppc_cannot_store_register): Renamed from cannot_store_register,
12511 made static.
12512 (the_low_target): New.
12513 * linux-s390-low.c (num_regs): Remove.
12514 (s390_num_regs): Define.
12515 (s390_regmap): Renamed from regmap, made static.
12516 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
12517 made static.
12518 (s390_cannot_store_register): Renamed from cannot_store_register,
12519 made static.
12520 (the_low_target): New.
12521 * linux-sh-low.c (num_regs): Remove.
12522 (sh_num_regs): Define.
12523 (sh_regmap): Renamed from regmap, made static.
12524 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
12525 made static.
12526 (sh_cannot_store_register): Renamed from cannot_store_register,
12527 made static.
12528 (the_low_target): New.
12529 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
12530 (the_low_target): New.
12531
125322002-04-09 Daniel Jacobowitz <drow@mvista.com>
12533
12534 * Makefile.in: Add stamp-h target.
12535 * configure.in: Create stamp-h.
12536 * configure: Regenerated.
12537
125382002-04-09 Daniel Jacobowitz <drow@mvista.com>
12539
12540 * inferiors.c: New file.
12541 * target.c: New file.
12542 * target.h: New file.
12543 * Makefile.in: Add target.o and inferiors.o. Update
12544 dependencies.
12545 * linux-low.c (inferior_pid): New static variable,
12546 moved from server.c.
12547 (linux_create_inferior): Renamed from create_inferior.
12548 Call add_inferior. Return 0 on success instead of a PID.
12549 (linux_attach): Renamed from myattach.
12550 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
12551 (linux_thread_alive): Renamed from mythread_alive.
12552 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
12553 child dies.
12554 (linux_resume): Renamed from myresume. Add missing ``return 0''.
12555 (regsets_store_inferior_registers): Correct error message.
12556 Add missing ``return 0''.
12557 (linux_fetch_registers): Renamed from fetch_inferior_registers.
12558 (linux_store_registers): Renamed from store_inferior_registers.
12559 (linux_read_memory): Renamed from read_inferior_memory.
12560 (linux_write_memory): Renamed from write_inferior_memory.
12561 (linux_target_ops): New structure.
12562 (initialize_low): Call set_target_ops ().
12563 * remote-utils.c (unhexify): New function.
12564 (hexify): New function.
12565 (input_interrupt): Send signals to ``signal_pid''.
12566 * server.c (inferior_pid): Remove.
12567 (start_inferior): Update create_inferior call.
12568 (attach_inferior): Call add_inferior.
12569 (handle_query): New function.
12570 (main): Call handle_query for `q' packets.
12571 * server.h: Include "target.h". Remove obsolete prototypes.
12572 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
12573
125742002-04-09 Daniel Jacobowitz <drow@mvista.com>
12575
12576 * Makefile.in: Add WARN_CFLAGS. Update configury
12577 dependencies.
12578 * configure.in: Check for <string.h>
12579 * configure: Regenerate.
12580 * config.in: Regenerate.
12581 * gdbreplay.c: Include needed system headers.
12582 (remote_open): Remove strchr prototype.
12583 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
12584 * regcache.c (supply_register): Change buf argument to const void *.
12585 (supply_register_by_name): Likewise.
12586 (collect_register): Change buf argument to void *.
12587 (collect_register_by_name): Likewise.
12588 * regcache.h: Add missing prototypes.
12589 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
12590 * server.c (handle_query): New function.
12591 (attached): New static variable, moved out of main.
12592 (main): Quiet longjmp clobber warnings.
12593 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
12594 * utils.c (error): Remove NORETURN.
12595 (fatal): Likewise.