]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/gdbserver/ChangeLog
Add the target_ops needed for software breakpoints in GDBServer.
[thirdparty/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
dd373349
AT
12015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2
3 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
4 (struct linux_target_ops) <breakpoint>: Remove.
5 (struct linux_target_ops) <breakpoint_len>: Remove.
6 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
7 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
8 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
9 (arm_sw_breakpoint_from_kind): New function.
10 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
11 (struct linux_target_ops) <breakpoint>: Remove.
12 (struct linux_target_ops) <breakpoint_len>: Remove.
13 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
14 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
15 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
16 (struct linux_target_ops) <breakpoint>: Remove.
17 (struct linux_target_ops) <breakpoint_len>: Remove.
18 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
19 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
20 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
21 (struct linux_target_ops) <breakpoint>: Remove.
22 (struct linux_target_ops) <breakpoint_len>: Remove.
23 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
24 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
25 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
26 and sw_breakpoint_from_kind to increment the pc.
27 (linux_breakpoint_kind_from_pc): New function.
28 (linux_sw_breakpoint_from_kind): New function.
29 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
30 (initialize_low): Call breakpoint_kind_from_pc and
31 sw_breakpoint_from_kind to replace breakpoint_data/len.
32 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
33 New field.
34 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
35 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
36 (struct linux_target_ops) <breakpoint>: Remove.
37 (struct linux_target_ops) <breakpoint_len>: Remove.
38 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
39 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
40 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
41 (struct linux_target_ops) <breakpoint>: Remove.
42 (struct linux_target_ops) <breakpoint_len>: Remove.
43 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
44 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
45 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
46 (struct linux_target_ops) <breakpoint>: Remove.
47 (struct linux_target_ops) <breakpoint_len>: Remove.
48 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
49 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
50 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
51 (struct linux_target_ops) <breakpoint>: Remove.
52 (struct linux_target_ops) <breakpoint_len>: Remove.
53 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
54 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
55 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
56 (struct linux_target_ops) <breakpoint>: Remove.
57 (struct linux_target_ops) <breakpoint_len>: Remove.
58 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
59 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
60 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
61 (struct linux_target_ops) <breakpoint>: Remove.
62 (struct linux_target_ops) <breakpoint_len>: Remove.
63 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
64 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
65 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
66 (struct linux_target_ops) <breakpoint>: Remove.
67 (struct linux_target_ops) <breakpoint_len>: Remove.
68 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
69 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
70 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
71 (struct linux_target_ops) <breakpoint>: Remove.
72 (struct linux_target_ops) <breakpoint_len>: Remove.
73 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
74 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
75 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
76 (struct linux_target_ops) <breakpoint>: Remove.
77 (struct linux_target_ops) <breakpoint_len>: Remove.
78 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
79 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
80 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
81 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
82 (struct linux_target_ops) <breakpoint>: Remove.
83 (struct linux_target_ops) <breakpoint_len>: Remove.
84 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
85 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
86 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
87 (struct linux_target_ops) <breakpoint>: Remove.
88 (struct linux_target_ops) <breakpoint_len>: Remove.
89 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
90 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
91
4cd98a19
AT
922015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
93
94 * linux-cris-low.c (cris_get_pc): Remove void arg.
95
774ee6d2
AR
962015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
97
98 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
99 variable name.
100
833dcd29
AR
1012015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
102
103 * inferiors.c (thread_pid_matches_callback): New function.
104 (find_thread_process): New function.
105 (remove_thread): Reset current_thread.
106 (remove_process): Assert threads have been removed first.
107
8d689ee5
YQ
1082015-10-15 Yao Qi <yao.qi@linaro.org>
109
110 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
111 if it is 3.
112 (aarch64_remove_point): Likewise.
113 * regcache.c (regcache_register_size): New function.
114
1c2e1515
YQ
1152015-10-12 Yao Qi <yao.qi@linaro.org>
116
117 * linux-aarch64-low.c: Update all callers as emit_load_store
118 is renamed to aarch64_emit_load_store.
119
e1c587c3
YQ
1202015-10-12 Yao Qi <yao.qi@linaro.org>
121
122 * linux-aarch64-low.c: Update all callers of function renaming
123 from emit_insn to aarch64_emit_insn.
124
b6542f81
YQ
1252015-10-12 Yao Qi <yao.qi@linaro.org>
126
127 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
128 arch/aarch64-insn.h.
129 (struct aarch64_memory_operand): Likewise.
130 (ENCODE): Likewise.
131 (emit_insn): Move to arch/aarch64-insn.c.
132 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
133 (emit_load_store): Move to arch/aarch64-insn.c.
134 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
135 (can_encode_int32): Remove.
136
246994ce
YQ
1372015-10-12 Yao Qi <yao.qi@linaro.org>
138
139 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
140 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
141 (aarch64_relocate_instruction): Likewise.
142 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
143 (struct aarch64_insn_visitor): Likewise.
144
0badd99f
YQ
1452015-10-12 Yao Qi <yao.qi@linaro.org>
146
147 * linux-aarch64-low.c (struct aarch64_insn_data): New.
148 (struct aarch64_insn_visitor): New.
149 (struct aarch64_insn_relocation_data): New.
150 (aarch64_ftrace_insn_reloc_b): New function.
151 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
152 (aarch64_ftrace_insn_reloc_cb): Likewise.
153 (aarch64_ftrace_insn_reloc_tb): Likewise.
154 (aarch64_ftrace_insn_reloc_adr): Likewise.
155 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
156 (aarch64_ftrace_insn_reloc_others): Likewise.
157 (visitor): New.
158 (aarch64_relocate_instruction): Use visitor.
159
dfaffe9d
YQ
1602015-10-12 Yao Qi <yao.qi@linaro.org>
161
162 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
163 int. Add argument buf.
164 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
165 aarch64_relocate_instruction.
166
70b439f0
YQ
1672015-10-12 Yao Qi <yao.qi@linaro.org>
168
169 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
170 argument insn. Remove local variable insn. Don't call
171 target_read_uint32.
172 (aarch64_install_fast_tracepoint_jump_pad): Call
173 target_read_uint32.
174
7781c06f
YQ
1752015-09-30 Yao Qi <yao.qi@linaro.org>
176
177 * linux-aarch64-low.c (emit_movk): Shorten a long line.
178 (emit_load_store_pair): Likewise.
179
9a3c8263
SM
1802015-09-25 Simon Marchi <simon.marchi@ericsson.com>
181
182 * dll.c (match_dll): Add cast(s).
183 (unloaded_dll): Likewise.
184 * linux-low.c (second_thread_of_pid_p): Likewise.
185 (delete_lwp_callback): Likewise.
186 (count_events_callback): Likewise.
187 (select_event_lwp_callback): Likewise.
188 (linux_set_resume_request): Likewise.
189 * server.c (accumulate_file_name_length): Likewise.
190 (emit_dll_description): Likewise.
191 (handle_qxfer_threads_worker): Likewise.
192 (visit_actioned_threads): Likewise.
193 * thread-db.c (any_thread_of): Likewise.
194 * tracepoint.c (same_process_p): Likewise.
195 (match_blocktype): Likewise.
196 (build_traceframe_info_xml): Likewise.
197
224c3ddb
SM
1982015-09-25 Simon Marchi <simon.marchi@ericsson.com>
199
200 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
201 assignment.
202 (gdb_unparse_agent_expr): Likewise.
203 * hostio.c (require_data): Likewise.
204 (handle_pread): Likewise.
205 * linux-low.c (disable_regset): Likewise.
206 (fetch_register): Likewise.
207 (store_register): Likewise.
208 (get_dynamic): Likewise.
209 (linux_qxfer_libraries_svr4): Likewise.
210 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
211 (set_fast_tracepoint_jump): Likewise.
212 (uninsert_fast_tracepoint_jumps_at): Likewise.
213 (reinsert_fast_tracepoint_jumps_at): Likewise.
214 (validate_inserted_breakpoint): Likewise.
215 (clone_agent_expr): Likewise.
216 * regcache.c (init_register_cache): Likewise.
217 * remote-utils.c (putpkt_binary_1): Likewise.
218 (decode_M_packet): Likewise.
219 (decode_X_packet): Likewise.
220 (look_up_one_symbol): Likewise.
221 (relocate_instruction): Likewise.
222 (monitor_output): Likewise.
223 * server.c (handle_search_memory): Likewise.
224 (handle_qxfer_exec_file): Likewise.
225 (handle_qxfer_libraries): Likewise.
226 (handle_qxfer): Likewise.
227 (handle_query): Likewise.
228 (handle_v_cont): Likewise.
229 (handle_v_run): Likewise.
230 (captured_main): Likewise.
231 * target.c (write_inferior_memory): Likewise.
232 * thread-db.c (try_thread_db_load_from_dir): Likewise.
233 * tracepoint.c (init_trace_buffer): Likewise.
234 (add_tracepoint_action): Likewise.
235 (add_traceframe): Likewise.
236 (add_traceframe_block): Likewise.
237 (cmd_qtdpsrc): Likewise.
238 (cmd_qtdv): Likewise.
239 (cmd_qtstatus): Likewise.
240 (response_source): Likewise.
241 (response_tsv): Likewise.
242 (cmd_qtnotes): Likewise.
243 (gdb_collect): Likewise.
244 (initialize_tracepoint): Likewise.
245
afbe19f8
PL
2462015-09-21 Pierre Langlois <pierre.langlois@arm.com>
247
248 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
249 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
250 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
251 <NOP>: New.
252 (enum aarch64_condition_codes): New enum.
253 (w0): New static global.
254 (fp): Likewise.
255 (lr): Likewise.
256 (struct aarch64_memory_operand) <type>: New
257 MEMORY_OPERAND_POSTINDEX type.
258 (postindex_memory_operand): New helper function.
259 (emit_ret): New function.
260 (emit_load_store_pair): New function, factored out of emit_stp
261 with support for MEMORY_OPERAND_POSTINDEX.
262 (emit_stp): Rewrite using emit_load_store_pair.
263 (emit_ldp): New function.
264 (emit_load_store): Likewise.
265 (emit_ldr): Mention post-index instruction in comment.
266 (emit_ldrh): New function.
267 (emit_ldrb): New function.
268 (emit_ldrsw): Mention post-index instruction in comment.
269 (emit_str): Likewise.
270 (emit_subs): New function.
271 (emit_cmp): Likewise.
272 (emit_and): Likewise.
273 (emit_orr): Likewise.
274 (emit_orn): Likewise.
275 (emit_eor): Likewise.
276 (emit_mvn): Likewise.
277 (emit_lslv): Likewise.
278 (emit_lsrv): Likewise.
279 (emit_asrv): Likewise.
280 (emit_mul): Likewise.
281 (emit_sbfm): Likewise.
282 (emit_sbfx): Likewise.
283 (emit_ubfm): Likewise.
284 (emit_ubfx): Likewise.
285 (emit_csinc): Likewise.
286 (emit_cset): Likewise.
287 (emit_nop): Likewise.
288 (emit_ops_insns): New helper function.
289 (emit_pop): Likewise.
290 (emit_push): Likewise.
291 (aarch64_emit_prologue): New function.
292 (aarch64_emit_epilogue): Likewise.
293 (aarch64_emit_add): Likewise.
294 (aarch64_emit_sub): Likewise.
295 (aarch64_emit_mul): Likewise.
296 (aarch64_emit_lsh): Likewise.
297 (aarch64_emit_rsh_signed): Likewise.
298 (aarch64_emit_rsh_unsigned): Likewise.
299 (aarch64_emit_ext): Likewise.
300 (aarch64_emit_log_not): Likewise.
301 (aarch64_emit_bit_and): Likewise.
302 (aarch64_emit_bit_or): Likewise.
303 (aarch64_emit_bit_xor): Likewise.
304 (aarch64_emit_bit_not): Likewise.
305 (aarch64_emit_equal): Likewise.
306 (aarch64_emit_less_signed): Likewise.
307 (aarch64_emit_less_unsigned): Likewise.
308 (aarch64_emit_ref): Likewise.
309 (aarch64_emit_if_goto): Likewise.
310 (aarch64_emit_goto): Likewise.
311 (aarch64_write_goto_address): Likewise.
312 (aarch64_emit_const): Likewise.
313 (aarch64_emit_call): Likewise.
314 (aarch64_emit_reg): Likewise.
315 (aarch64_emit_pop): Likewise.
316 (aarch64_emit_stack_flush): Likewise.
317 (aarch64_emit_zero_ext): Likewise.
318 (aarch64_emit_swap): Likewise.
319 (aarch64_emit_stack_adjust): Likewise.
320 (aarch64_emit_int_call_1): Likewise.
321 (aarch64_emit_void_call_2): Likewise.
322 (aarch64_emit_eq_goto): Likewise.
323 (aarch64_emit_ne_goto): Likewise.
324 (aarch64_emit_lt_goto): Likewise.
325 (aarch64_emit_le_goto): Likewise.
326 (aarch64_emit_gt_goto): Likewise.
327 (aarch64_emit_ge_got): Likewise.
328 (aarch64_emit_ops_impl): New static global variable.
329 (aarch64_emit_ops): New target function, return
330 &aarch64_emit_ops_impl.
331 (struct linux_target_ops): Install it.
332
bb903df0
PL
3332015-09-21 Pierre Langlois <pierre.langlois@arm.com>
334
335 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
336 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
337 aarch64-ipa.o.
338 * linux-aarch64-ipa.c: New file.
339 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
340 and endian.h.
341 (aarch64_get_thread_area): New target method.
342 (extract_signed_bitfield): New helper function.
343 (aarch64_decode_ldr_literal): New function.
344 (enum aarch64_opcodes): New enum.
345 (struct aarch64_register): New struct.
346 (struct aarch64_operand): New struct.
347 (x0): New static global.
348 (x1): Likewise.
349 (x2): Likewise.
350 (x3): Likewise.
351 (x4): Likewise.
352 (w2): Likewise.
353 (ip0): Likewise.
354 (sp): Likewise.
355 (xzr): Likewise.
356 (aarch64_register): New helper function.
357 (register_operand): Likewise.
358 (immediate_operand): Likewise.
359 (struct aarch64_memory_operand): New struct.
360 (offset_memory_operand): New helper function.
361 (preindex_memory_operand): Likewise.
362 (enum aarch64_system_control_registers): New enum.
363 (ENCODE): New macro.
364 (emit_insn): New helper function.
365 (emit_b): New function.
366 (emit_bcond): Likewise.
367 (emit_cb): Likewise.
368 (emit_tb): Likewise.
369 (emit_blr): Likewise.
370 (emit_stp): Likewise.
371 (emit_ldp_q_offset): Likewise.
372 (emit_stp_q_offset): Likewise.
373 (emit_load_store): Likewise.
374 (emit_ldr): Likewise.
375 (emit_ldrsw): Likewise.
376 (emit_str): Likewise.
377 (emit_ldaxr): Likewise.
378 (emit_stxr): Likewise.
379 (emit_stlr): Likewise.
380 (emit_data_processing_reg): Likewise.
381 (emit_data_processing): Likewise.
382 (emit_add): Likewise.
383 (emit_sub): Likewise.
384 (emit_mov): Likewise.
385 (emit_movk): Likewise.
386 (emit_mov_addr): Likewise.
387 (emit_mrs): Likewise.
388 (emit_msr): Likewise.
389 (emit_sevl): Likewise.
390 (emit_wfe): Likewise.
391 (append_insns): Likewise.
392 (can_encode_int32_in): New helper function.
393 (aarch64_relocate_instruction): New function.
394 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
395 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
396 (struct linux_target_ops): Install aarch64_get_thread_area,
397 aarch64_install_fast_tracepoint_jump_pad and
398 aarch64_get_min_fast_tracepoint_insn_len.
399
787749ea
PL
4002015-09-21 Pierre Langlois <pierre.langlois@arm.com>
401
402 * Makefile.in (aarch64-insn.o): New rule.
403 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
404
9812b2e6
YQ
4052015-09-21 Yao Qi <yao.qi@linaro.org>
406
407 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
408
18fe412b
YQ
4092015-09-21 Yao Qi <yao.qi@linaro.org>
410
411 * tracepoint.c (max_jump_pad_size): Remove.
412
a0cc84cd
YQ
4132015-09-18 Yao Qi <yao.qi@linaro.org>
414
415 * linux-aarch64-low.c: Don't include sys/uio.h.
416 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
417
d78908cf
WW
4182015-09-16 Wei-cheng Wang <cole945@gmail.com>
419
420 * tracepoint.c (eval_result_type): Change prototype.
421 (condition_true_at_tracepoint): Fix argument to compiled_cond.
422
d57e0d50
PA
4232015-09-15 Pedro Alves <palves@redhat.com>
424
425 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
426 Check whether to report exec events instead of checking whether
427 multiprocess is enabled.
428
5a676acc
PA
4292015-09-15 Pedro Alves <palves@redhat.com>
430
431 PR remote/18965
432 * remote-utils.c (prepare_resume_reply): Merge
433 TARGET_WAITKIND_VFORK_DONE switch case with the
434 TARGET_WAITKIND_FORKED case.
435
7c5d0fad
YQ
4362015-09-15 Yao Qi <yao.qi@linaro.org>
437
438 * server.c (handle_query): Check string comparison using
439 "else if" instead of "if".
440
750ce8d1
YQ
4412015-09-15 Yao Qi <yao.qi@linaro.org>
442
443 * server.c (vCont_supported): New global variable.
444 (handle_query): Set vCont_supported to 1 if "vContSupported+"
445 matches. Append ";vContSupported+" to own_buf.
446 (handle_v_requests): Append ";s;S" to own_buf if target supports
447 hardware single step or vCont_supported is false.
448 (capture_main): Set vCont_supported to zero.
449
70b90b91
YQ
4502015-09-15 Yao Qi <yao.qi@linaro.org>
451
452 * linux-low.c (linux_supports_conditional_breakpoints): Rename
453 it to ...
454 (linux_supports_hardware_single_step): ... New function.
455 (linux_target_ops): Update.
456 * lynx-low.c (lynx_target_ops): Set field
457 supports_hardware_single_step to target_can_do_hardware_single_step.
458 * nto-low.c (nto_target_ops): Likewise.
459 * spu-low.c (spu_target_ops): Likewise.
460 * win32-low.c (win32_target_ops): Likewise.
461 * target.c (target_can_do_hardware_single_step): New function.
462 * target.h (struct target_ops) <supports_conditional_breakpoints>:
463 Remove. <supports_hardware_single_step>: New field.
464 (target_supports_conditional_breakpoints): Remove.
465 (target_supports_hardware_single_step): New macro.
466 (target_can_do_hardware_single_step): Declare.
467 * server.c (handle_query): Use target_supports_hardware_single_step
468 instead of target_supports_conditional_breakpoints.
469
ade90bde
YQ
4702015-09-15 Yao Qi <yao.qi@linaro.org>
471
472 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
473 function.
474 (struct linux_target_ops the_low_target): Install
475 aarch64_linux_siginfo_fixup.
476
94585166
DB
4772015-09-11 Don Breazeal <donb@codesourcery.com>
478 Luis Machado <lgustavo@codesourcery.com>
479
480 * linux-low.c (linux_mourn): Static declaration.
481 (linux_arch_setup): Move in front of
482 handle_extended_wait.
483 (linux_arch_setup_thread): New function.
484 (handle_extended_wait): Handle exec events. Call
485 linux_arch_setup_thread. Make event_lwp argument a
486 pointer-to-a-pointer.
487 (check_zombie_leaders): Do not check stopped threads.
488 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
489 (linux_low_filter_event): Add lwp and thread for exec'ing
490 non-leader thread if leader thread has been deleted.
491 Refactor code into linux_arch_setup_thread and call it.
492 Pass child lwp pointer by reference to handle_extended_wait.
493 (linux_wait_for_event_filtered): Update comment.
494 (linux_wait_1): Prevent clobbering exec event status.
495 (linux_supports_exec_events): New function.
496 (linux_target_ops) <supports_exec_events>: Initialize new member.
497 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
498 new member.
499 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
500 * server.c (report_exec_events): New global variable.
501 (handle_query): Handle qSupported query for exec-events feature.
502 (captured_main): Initialize report_exec_events.
503 * server.h (report_exec_events): Declare new global variable.
504 * target.h (struct target_ops) <supports_exec_events>: New
505 member.
506 (target_supports_exec_events): New macro.
507 * win32-low.c (win32_target_ops) <supports_exec_events>:
508 Initialize new member.
509
0568462b
MM
5102015-09-09 Markus Metzger <markus.t.metzger@intel.com>
511
512 * linux-low.c (linux_low_enable_btrace): Remove.
513 (linux_target_ops): Replace linux_low_enable_btrace with
514 linux_enable_btrace.
515
39edd165
YQ
5162015-09-03 Yao Qi <yao.qi@linaro.org>
517
518 * linux-aarch64-low.c (aarch64_insert_point): Call
519 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
520 returns true.
521
1db33b5a
UW
5222015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
523
524 * linux-low.c (check_stopped_by_breakpoint): Use
525 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
526
ab290430
PA
5272015-08-27 Pedro Alves <palves@redhat.com>
528
529 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
530
8d749320
SM
5312015-08-26 Simon Marchi <simon.marchi@ericsson.com>
532
6711b7f8
SM
533 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
534 the XNEW-family equivalent.
8d749320
SM
535 (compile_bytecodes): Likewise.
536 * dll.c (loaded_dll): Likewise.
537 * event-loop.c (append_callback_event): Likewise.
538 (create_file_handler): Likewise.
539 (create_file_event): Likewise.
540 * hostio.c (handle_open): Likewise.
541 * inferiors.c (add_thread): Likewise.
542 (add_process): Likewise.
543 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
544 * linux-arm-low.c (arm_new_process): Likewise.
545 (arm_new_thread): Likewise.
546 * linux-low.c (add_to_pid_list): Likewise.
547 (linux_add_process): Likewise.
548 (handle_extended_wait): Likewise.
549 (add_lwp): Likewise.
550 (enqueue_one_deferred_signal): Likewise.
551 (enqueue_pending_signal): Likewise.
552 (linux_resume_one_lwp_throw): Likewise.
553 (linux_resume_one_thread): Likewise.
554 (linux_read_memory): Likewise.
555 (linux_write_memory): Likewise.
556 * linux-mips-low.c (mips_linux_new_process): Likewise.
557 (mips_linux_new_thread): Likewise.
558 (mips_add_watchpoint): Likewise.
559 * linux-x86-low.c (initialize_low_arch): Likewise.
560 * lynx-low.c (lynx_add_process): Likewise.
561 * mem-break.c (set_raw_breakpoint_at): Likewise.
562 (set_breakpoint): Likewise.
563 (add_condition_to_breakpoint): Likewise.
564 (add_commands_to_breakpoint): Likewise.
565 (clone_agent_expr): Likewise.
566 (clone_one_breakpoint): Likewise.
567 * regcache.c (new_register_cache): Likewise.
568 * remote-utils.c (look_up_one_symbol): Likewise.
569 * server.c (queue_stop_reply): Likewise.
570 (start_inferior): Likewise.
571 (queue_stop_reply_callback): Likewise.
572 (handle_target_event): Likewise.
573 * spu-low.c (fetch_ppc_memory): Likewise.
574 (store_ppc_memory): Likewise.
575 * target.c (set_target_ops): Likewise.
576 * thread-db.c (thread_db_load_search): Likewise.
577 (try_thread_db_load_1): Likewise.
578 * tracepoint.c (add_tracepoint): Likewise.
579 (add_tracepoint_action): Likewise.
580 (create_trace_state_variable): Likewise.
581 (cmd_qtdpsrc): Likewise.
582 (cmd_qtro): Likewise.
583 (add_while_stepping_state): Likewise.
584 * win32-low.c (child_add_thread): Likewise.
585 (get_image_name): Likewise.
586
ed8b7b42
YQ
5872015-08-25 Yao Qi <yao.qi@linaro.org>
588
589 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
590
db3cb7cb
YQ
5912015-08-25 Yao Qi <yao.qi@linaro.org>
592
593 * Makefile.in (aarch64-linux.o): New rule.
594 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
595 srv_tgtobj.
596 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
597 (aarch64_init_debug_reg_state): Make it extern.
598 (aarch64_linux_prepare_to_resume): Remove.
599
f6011a1c
YQ
6002015-08-25 Yao Qi <yao.qi@linaro.org>
601
602 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
603 lwp_arch_private_info and ptid_of_lwp.
604
88e2cf7e
YQ
6052015-08-25 Yao Qi <yao.qi@linaro.org>
606
607 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
608 Find proc_info by find_process_pid. All callers updated.
609
5e35436e
YQ
6102015-08-25 Yao Qi <yao.qi@linaro.org>
611
612 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
613 Remove.
614 (debug_reg_change_callback): Remove.
615 (aarch64_notify_debug_reg_change): Remove.
616
4a8a7965
YQ
6172015-08-25 Yao Qi <yao.qi@linaro.org>
618
619 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
620 Call current_lwp_ptid.
621
32a271ee
YQ
6222015-08-25 Yao Qi <yao.qi@linaro.org>
623
624 * linux-aarch64-low.c (debug_reg_change_callback): Use
625 debug_printf.
626
0d51c8d7
YQ
6272015-08-25 Yao Qi <yao.qi@linaro.org>
628
629 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
630
31a43dd5
YQ
6312015-08-25 Yao Qi <yao.qi@linaro.org>
632
633 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
634
8ee52567
YQ
6352015-08-25 Yao Qi <yao.qi@linaro.org>
636
637 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
638 the code.
639
ff3f0f45
YQ
6402015-08-25 Yao Qi <yao.qi@linaro.org>
641
642 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
643 Remove.
644 (debug_reg_change_callback): Remove argument entry and add argument
645 lwp. Remove local variable thread. Don't print thread id in the
646 debugging output. Don't check whether pid of thread equals to pid.
647 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
648 iterate_over_lwps instead find_inferior.
649
3d40fbb5
PA
6502015-08-24 Pedro Alves <palves@redhat.com>
651
652 * inferiors.c (get_first_process): New function.
653 * inferiors.h (get_first_process): New declaration.
654 * remote-utils.c (read_ptid): Default to the first process in the
655 list, instead of to the current thread's process.
656
438e1e42
PA
6572015-08-24 Pedro Alves <palves@redhat.com>
658
659 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
660 * event-loop.c: Likewise.
661 * remote-utils.c: Likewise.
662 * tracepoint.c: Likewise.
663
a8c6d4fc
PA
6642015-08-24 Pedro Alves <palves@redhat.com>
665
666 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
667 ptid_get_lwp.
668
99b0bb12
PA
6692015-08-21 Pedro Alves <palves@redhat.com>
670
671 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
672 instead of literal 1.
673
f8904751
PA
6742015-08-21 Pedro Alves <palves@redhat.com>
675
676 * tdesc.c (default_description): Explicitly zero-initialize.
677
465a859e
PA
6782015-08-21 Pedro Alves <palves@redhat.com>
679
680 PR gdb/18749
681 * inferiors.c (remove_thread): Discard any pending stop reply for
682 this thread.
683 * server.c (remove_all_on_match_pid): Rename to ...
684 (remove_all_on_match_ptid): ... this. Work with a filter ptid
685 instead of a pid.
686 (discard_queued_stop_replies): Change parameter to a ptid. Now
687 extern.
688 (handle_v_kill, kill_inferior_callback, captured_main)
689 (process_serial_event): Adjust.
690 * server.h (discard_queued_stop_replies): Declare.
691
f0db101d
PA
6922015-08-21 Pedro Alves <palves@redhat.com>
693
694 * linux-low.c (wait_for_sigstop): Always switch to no thread
695 selected if the previously current thread dies.
696 * lynx-low.c (lynx_request_interrupt): Use the first thread's
697 process instead of the current thread's.
698 * remote-utils.c (input_interrupt): Don't check if there's no
699 current thread.
700 * server.c (gdb_read_memory, gdb_write_memory): If setting the
701 current thread to the general thread fails, error out.
702 (handle_qxfer_auxv, handle_qxfer_libraries)
703 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
704 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
705 (handle_query): Check if there's a thread selected instead of
706 checking whether there's any thread in the thread list.
707 (handle_qxfer_threads, handle_qxfer_btrace)
708 (handle_qxfer_btrace_conf): Don't error out early if there's no
709 thread in the thread list.
710 (handle_v_cont, myresume): Don't set the current thread to the
711 continue thread.
712 (process_serial_event) <Hg handling>: Also set thread_id if the
713 previous general thread is still alive.
714 (process_serial_event) <g/G handling>: If setting the current
715 thread to the general thread fails, error out.
716 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
717 thread's lwp instead of the current thread's.
718 * target.c (set_desired_thread): If the desired thread was not
719 found, leave the current thread pointing to NULL. Return an int
720 (boolean) indicating success.
721 * target.h (set_desired_thread): Change return type to int.
722
40045d91
MF
7232015-08-20 Max Filippov <jcmvbkbc@gmail.com>
724
725 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
726 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
727 #includes.
728 (ps_get_thread_area): New function.
729
45face3b
GB
7302015-08-19 Gary Benson <gbenson@redhat.com>
731
732 * hostio.c (handle_pread): Do not attempt to read more data
733 than hostio_reply_with_data can fit in a packet.
734
16d5f642
JB
7352015-08-18 Joel Brobecker <brobecker@adacore.com>
736
737 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
738
a738da3a
MF
7392015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
740
741 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
742
33ebda9d
PA
7432015-08-06 Pedro Alves <palves@redhat.com>
744
745 * tracepoint.c (expr_eval_result): Now an int.
746
a44892be
PA
7472015-08-06 Pedro Alves <palves@redhat.com>
748
749 * gdbthread.h (struct regcache): Forward declare.
750 (struct thread_info) <regcache_data>: Now a struct regcache
751 pointer.
752 * inferiors.c (inferior_regcache_data)
753 (set_inferior_regcache_data): Now work with struct regcache
754 pointers.
755 * inferiors.h (struct regcache): Forward declare.
756 (inferior_regcache_data, set_inferior_regcache_data): Now work
757 with struct regcache pointers.
758 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
759 (free_register_cache_thread): Remove struct regcache pointer
760 casts.
761
608a1e46
PA
7622015-08-06 Pedro Alves <palves@redhat.com>
763
764 * server.c (captured_main): On error, print the exception message
765 to stderr, and if run_once is set, throw a quit.
766
f0ce0d3a
PA
7672015-08-06 Pedro Alves <palves@redhat.com>
768
769 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
770 the current thread.
771
bf47e248
PA
7722015-08-06 Pedro Alves <palves@redhat.com>
773
774 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
775 reading beyond the passed in buffer length.
776
b6b9ffcc
PL
7772015-08-06 Pierre Langlois <pierre.langlois@arm.com>
778
779 * tracepoint.c (symbol_list) <required>: Remove.
780
863d01bd
PA
7812015-08-06 Pedro Alves <palves@redhat.com>
782
783 * linux-low.c (handle_extended_wait): Set the fork child's suspend
784 count if stopping and suspending threads.
785 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
786 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
787 (linux_detach): Complete an ongoing step-over.
788 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
789 throughout.
790 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
791 (linux_wait_1): If passing a signal to the inferior after
792 finishing a step-over, unsuspend and re-resume all lwps. If we
793 see a single-step event but the thread should be continuing, don't
794 pass the trap to gdb.
795 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
796 internal_error instead of gdb_assert.
797 (enqueue_pending_signal): New function.
798 (check_ptrace_stopped_lwp_gone): Add debug output.
799 (start_step_over): Use internal_error instead of gdb_assert.
800 (complete_ongoing_step_over): New function.
801 (linux_resume_one_thread): Don't resume a suspended thread.
802 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
803 it stepping.
804
00db26fa
PA
8052015-08-06 Pedro Alves <palves@redhat.com>
806
807 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
808 (linux_thread_alive): Use lwp_is_marked_dead.
809 (extended_event_reported): Delete.
810 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
811 instead of extended_event_reported.
812 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
813 as well.
814 (lwp_is_marked_dead): New function.
815 (lwp_running): Use lwp_is_marked_dead.
816 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
817 comment.
818
ad071a30
PA
8192015-08-06 Pedro Alves <palves@redhat.com>
820
821 * linux-low.c (linux_wait_1): Move fork event output out of the
822 !report_to_gdb check. Pass event_child->waitstatus to
823 target_waitstatus_to_string instead of ourstatus.
824
524b57e6
YQ
8252015-08-04 Yao Qi <yao.qi@linaro.org>
826
827 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
828 if current_thread is 32 bit.
829
6085d6f6
YQ
8302015-08-04 Yao Qi <yao.qi@linaro.org>
831
832 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
833 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
834 * server.c (extended_protocol): Remove "static".
835 * server.h (extended_protocol): Declare it.
836
8a7e4587
YQ
8372015-08-04 Yao Qi <yao.qi@linaro.org>
838
839 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
840 both aarch64 and aarch32.
841 (aarch64_set_pc): Likewise.
842
3b53ae99
YQ
8432015-08-04 Yao Qi <yao.qi@linaro.org>
844
845 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
846 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
847 arm-with-neon.xml to srv_xmlfiles.
848 * linux-aarch64-low.c: Include linux-aarch32-low.h.
849 (is_64bit_tdesc): New function.
850 (aarch64_linux_read_description): New function.
851 (aarch64_arch_setup): Call aarch64_linux_read_description.
852 (regs_info): Rename to regs_info_aarch64.
853 (aarch64_regs_info): Return right regs_info.
854 (initialize_low_arch): Call initialize_low_arch_aarch32.
855
bd9e6534
YQ
8562015-08-04 Yao Qi <yao.qi@linaro.org>
857
858 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
859 * linux-aarch32-low.c: New file.
860 * linux-aarch32-low.h: New file.
861 * linux-arm-low.c (arm_fill_gregset): Move it to
862 linux-aarch32-low.c.
863 (arm_store_gregset): Likewise.
864 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
865 (arm_store_vfpregset): Call arm_store_vfpregset_num.
866 (arm_arch_setup): Check if PTRACE_GETREGSET works.
867 (regs_info): Rename to regs_info_arm.
868 (arm_regs_info): Return regs_info_aarch32 if
869 have_ptrace_getregset is 1 and target description is
870 arm_with_neon or arm_with_vfpv3.
871 (initialize_low_arch): Don't call init_registers_arm_with_neon.
872 Call initialize_low_arch_aarch32 instead.
873
ded48a5e
YQ
8742015-08-04 Yao Qi <yao.qi@linaro.org>
875
876 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
877 * linux-low.c: ... here.
878 * linux-low.h (have_ptrace_getregset): Declare it.
879
96e9210f
PA
8802015-08-04 Pedro Alves <palves@redhat.com>
881
882 * thread-db.c (struct thread_db): Use new typedefs.
883 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
884 CHK calls.
885 (disable_thread_event_reporting): Cast result of dlsym to
886 destination function pointer type.
887 (thread_db_mourn): Use td_ta_delete_ftype.
888
af60a1ef
SL
8892015-08-03 Sandra Loosemore <sandra@codesourcery.com>
890
891 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
892 arch variant.
893 (CDX_BREAKPOINT): Define for R2.
894 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
895 (the_low_target): Add comments.
896
e8b41681
YQ
8972015-07-30 Yao Qi <yao.qi@linaro.org>
898
899 * linux-arm-low.c (arm_hwcap): Remove it.
900 (arm_read_description): New local variable arm_hwcap. Don't
901 set arm_hwcap to zero.
902
89abb039
YQ
9032015-07-30 Yao Qi <yao.qi@linaro.org>
904
905 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
906 Use regcache->tdesc instead.
907 (arm_store_wmmxregset): Likewise.
908 (arm_fill_vfpregset): Likewise.
909 (arm_store_vfpregset): Likewise.
910
deca266c
YQ
9112015-07-30 Yao Qi <yao.qi@linaro.org>
912
913 * linux-arm-low.c: Include arch/arm.h.
914 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
915 (arm_store_gregset): Likewise.
916
aa58a496
SM
9172015-07-29 Simon Marchi <simon.marchi@ericsson.com>
918
919 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
920 ptrace's 4th parameter.
921
50904b25
YQ
9222015-07-27 Yao Qi <yao.qi@linaro.org>
923
924 * configure.srv (case aarch64*-*-linux*): Don't set
925 srv_linux_usrregs.
926
5826e159
PA
9272015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
928
929 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
930 sys/ptrace.h.
931 * linux-arm-low.c: Likewise.
932 * linux-cris-low.c: Likewise.
933 * linux-crisv32-low.c: Likewise.
934 * linux-low.c: Likewise.
935 * linux-m68k-low.c: Likewise.
936 * linux-mips-low.c: Likewise.
937 * linux-nios2-low.c: Likewise.
938 * linux-s390-low.c: Likewise.
939 * linux-sparc-low.c: Likewise.
940 * linux-tic6x-low.c: Likewise.
941 * linux-tile-low.c: Likewise.
942 * linux-x86-low.c: Likewise.
943
54019719
PA
9442015-07-24 Pedro Alves <palves@redhat.com>
945
946 * config.in: Regenerate.
947 * configure: Regenerate.
948
eb7aa561
PA
9492015-07-24 Pedro Alves <palves@redhat.com>
950
951 * acinclude.m4: Include ../ptrace.m4.
952 * configure.ac: Call GDB_AC_PTRACE.
953 * config.in, configure: Regenerate.
954
55d7b841
YQ
9552015-07-24 Yao Qi <yao.qi@linaro.org>
956
957 * linux-low.c (linux_create_inferior): Remove setting to
958 proc->priv->new_inferior.
959 (linux_attach): Likewise.
960 (linux_low_filter_event): Likewise.
961 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
962
c06cbd92
YQ
9632015-07-24 Yao Qi <yao.qi@linaro.org>
964
965 * linux-low.c (linux_arch_setup): New function.
966 (linux_low_filter_event): If proc->tdesc is NULL and
967 proc->attached is true, call the_low_target.arch_setup.
968 Otherwise, keep status pending, and return.
969 (linux_resume_one_lwp_throw): Don't call get_pc if
970 thread->while_stepping isn't NULL. Don't call
971 get_thread_regcache if proc->tdesc is NULL.
972 (need_step_over_p): Return 0 if proc->tdesc is NULL.
973 (linux_target_ops): Install arch_setup.
974 * server.c (start_inferior): Call the_target->arch_setup.
975 * target.h (struct target_ops) <arch_setup>: New field.
976 (target_arch_setup): New marco.
977 * lynx-low.c (lynx_target_ops): Update.
978 * nto-low.c (nto_target_ops): Update.
979 * spu-low.c (spu_target_ops): Update.
980 * win32-low.c (win32_target_ops): Update.
981
5ae3ebba
YQ
9822015-07-24 Yao Qi <yao.qi@linaro.org>
983
984 * linux-low.c (linux_add_process): Don't set
985 proc->priv->new_inferior.
986 (linux_create_inferior): Set proc->priv->new_inferior to 1.
987 (linux_attach): Likewise.
988
eb97750b
YQ
9892015-07-24 Yao Qi <yao.qi@linaro.org>
990
991 * server.c (start_inferior): Code refactor.
992
51aee833
YQ
9932015-07-24 Yao Qi <yao.qi@linaro.org>
994
995 * server.c (process_serial_event): Set general_thread.
996
af1b22f3
YQ
9972015-07-21 Yao Qi <yao.qi@linaro.org>
998
999 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
1000 aarch64_linux_get_debug_reg_capacity.
1001
554717a3
YQ
10022015-07-17 Yao Qi <yao.qi@linaro.org>
1003
1004 * Makefile.in (aarch64-linux-hw-point.o): New rule.
1005 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
1006 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
1007 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
1008 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
1009 (AARCH64_HWP_ALIGNMENT): Likewise.
1010 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
1011 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
1012 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
1013 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
1014 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
1015 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
1016 (struct aarch64_debug_reg_state): Likewise.
1017 (struct arch_lwp_info): Likewise.
1018 (aarch64_align_watchpoint): Likewise.
1019 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
1020 (aarch64_watchpoint_length): Likewise.
1021 (aarch64_point_encode_ctrl_reg): Likewise
1022 (aarch64_point_is_aligned): Likewise.
1023 (aarch64_align_watchpoint): Likewise.
1024 (aarch64_linux_set_debug_regs):
1025 (aarch64_dr_state_insert_one_point): Likewise.
1026 (aarch64_dr_state_remove_one_point): Likewise.
1027 (aarch64_handle_breakpoint): Likewise.
1028 (aarch64_handle_aligned_watchpoint): Likewise.
1029 (aarch64_handle_unaligned_watchpoint): Likewise.
1030 (aarch64_handle_watchpoint): Likewise.
1031
c67ca4de
YQ
10322015-07-17 Yao Qi <yao.qi@linaro.org>
1033
1034 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
1035 and don't aarch64_get_debug_reg_state. All callers update.
1036 (aarch64_handle_aligned_watchpoint): Likewise.
1037 (aarch64_handle_unaligned_watchpoint): Likewise.
1038 (aarch64_handle_watchpoint): Likewise.
1039 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
1040 (aarch64_remove_point): Likewise.
1041
25abf979
YQ
10422015-07-17 Yao Qi <yao.qi@linaro.org>
1043
1044 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
1045 debug_printf.
1046 (aarch64_handle_unaligned_watchpoint): Likewise.
1047
db1ff28b
JK
10482015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
1049
1050 Revert the previous 3 commits:
1051 Move gdb_regex* to common/
1052 Move linux_find_memory_regions_full & co.
1053 gdbserver build-id attribute generator
1054
700ca40f
JK
10552015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1056 Jan Kratochvil <jan.kratochvil@redhat.com>
1057
1058 gdbserver build-id attribute generator.
1059 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
1060 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
1061 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
1062 (find_phdr): New.
1063 (get_dynamic): Use find_pdhr to traverse program headers.
1064 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
1065 (compare_mapping_entry_range, struct find_memory_region_callback_data)
1066 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
1067 (get_hex_build_id): New.
1068 (linux_qxfer_libraries_svr4): Add optional build-id attribute
1069 to reply XML document.
1070
9904185c
JK
10712015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1072 Jan Kratochvil <jan.kratochvil@redhat.com>
1073
1074 * target.c: Include target/target-utils.h and fcntl.h.
1075 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
1076 (target_fileio_read_stralloc): New functions.
1077
6e5b4429
JK
10782015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
1079
1080 * Makefile.in (OBS): Add gdb_regex.o.
1081 (gdb_regex.o): New.
1082 * config.in: Rebuilt.
1083 * configure: Rebuilt.
1084
ddc98fbf
JK
10852015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1086 Jan Kratochvil <jan.kratochvil@redhat.com>
1087
1088 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
1089 * Makefile.in (OBS): Add target-utils.o.
1090 (linux-maps.o, target-utils.o): New.
1091 * configure.srv (srv_linux_obj): Add linux-maps.o.
1092
e57bb7a0
PL
10932015-07-15 Pierre Langlois <pierre.langlois@arm.com>
1094
1095 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
1096 function, return 1.
1097 (the_low_target): Install it.
1098
586b02a9
PA
10992015-07-14 Pedro Alves <palves@redhat.com>
1100
1101 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
1102 Instead, ignore ECHILD, and throw an error for other errnos.
1103
58c1b36c
PA
11042015-07-10 Pedro Alves <palves@redhat.com>
1105
1106 * event-loop.c (struct callback_event) <data>: Change type to
1107 gdb_client_data instance instead of gdb_client_data pointer.
1108 (append_callback_event): Adjust.
1109
421530db
PL
11102015-07-10 Pierre Langlois <pierre.langlois@arm.com>
1111
1112 * linux-aarch64-low.c: Add comments for each linux_target_ops
1113 method. Remove comments already covered in target_ops and
1114 linux_target_ops definitions.
1115 (the_low_target): Add comments for each unimplemented method.
1116
c2d65f38
YQ
11172015-07-09 Yao Qi <yao.qi@linaro.org>
1118
1119 * linux-aarch64-low.c (aarch64_regmap): Remove.
1120 (aarch64_usrregs_info): Remove.
1121 (regs_info): Set field usrregs to NULL.
1122
b20a6524
MM
11232015-07-02 Markus Metzger <markus.t.metzger@intel.com>
1124
1125 * linux-low.c: Include "rsp-low.h"
1126 (linux_low_encode_pt_config, linux_low_encode_raw): New.
1127 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
1128 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
1129 (handle_btrace_enable_pt): New.
1130 (handle_btrace_general_set): Support "pt".
1131 (handle_btrace_conf_general_set): Support "pt:size".
1132
96c97461
PL
11332015-06-29 Pierre Langlois <pierre.langlois@arm.com>
1134
1135 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
1136 Z_PACKET_SW_BP.
1137
37d66942
PL
11382015-06-29 Pierre Langlois <pierre.langlois@arm.com>
1139
1140 * linux-aarch64-low.c: Remove comment about endianness.
1141 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
1142 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
1143 memcmp.
1144
dc06243f
GB
11452015-06-24 Gary Benson <gbenson@redhat.com>
1146
1147 * linux-i386-ipa.c (stdint.h): Do not include.
1148 * lynx-i386-low.c (stdint.h): Likewise.
1149 * lynx-ppc-low.c (stdint.h): Likewise.
1150 * mem-break.c (stdint.h): Likewise.
1151 * thread-db.c (stdint.h): Likewise.
1152 * tracepoint.c (stdint.h): Likewise.
1153 * win32-low.c (stdint.h): Likewise.
1154
124e13d9
SM
11552015-06-18 Simon Marchi <simon.marchi@ericsson.com>
1156
1157 * server.c (write_qxfer_response): Update call to
1158 remote_escape_output.
1159
909c2cda
JK
11602015-06-15 Aleksandar Ristovski <aristovski@qnx.com
1161 Jan Kratochvil <jan.kratochvil@redhat.com>
1162
1163 Merge multiple hex conversions.
1164 * gdbreplay.c (tohex): Rename to 'fromhex'.
1165 (logchar): Use fromhex.
1166
24c05f46
JK
11672015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
1168
1169 * server.c (handle_qxfer_libraries): Set `version' attribute for
1170 <library-list>.
1171
14d2069a
GB
11722015-06-10 Gary Benson <gbenson@redhat.com>
1173
1174 * target.h (struct target_ops) <multifs_open>: New field.
1175 <multifs_unlink>: Likewise.
1176 <multifs_readlink>: Likewise.
1177 * linux-low.c (nat/linux-namespaces.h): New include.
1178 (linux_target_ops): Initialize the_target->multifs_open,
1179 the_target->multifs_unlink and the_target->multifs_readlink.
1180 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
1181 * hostio.c (hostio_fs_pid): New static variable.
1182 (hostio_handle_new_gdb_connection): New function.
1183 (handle_setfs): Likewise.
1184 (handle_open): Use the_target->multifs_open as appropriate.
1185 (handle_unlink): Use the_target->multifs_unlink as appropriate.
1186 (handle_readlink): Use the_target->multifs_readlink as
1187 appropriate.
1188 (handle_vFile): Handle vFile:setfs packets.
1189 * server.c (handle_query): Call hostio_handle_new_gdb_connection
1190 after target_handle_new_gdb_connection.
1191
4b8b5e72
GB
11922015-06-10 Gary Benson <gbenson@redhat.com>
1193
1194 * configure.ac (AC_CHECK_FUNCS): Add setns.
1195 * config.in: Regenerate.
1196 * configure: Likewise.
1197 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
1198 (linux-namespaces.o): New rule.
1199 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
1200
3ac2e371
GB
12012015-06-09 Gary Benson <gbenson@redhat.com>
1202
1203 * hostio.c (handle_open): Process mode argument with
1204 fileio_to_host_mode.
1205
ca9b78ce
YQ
12062015-06-01 Yao Qi <yao.qi@linaro.org>
1207
1208 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
1209 * linux-x86-low.c: Likewise.
1210
bfacd19d
DB
12112015-05-28 Don Breazeal <donb@codesourcery.com>
1212
1213 * linux-low.c (handle_extended_wait): Initialize
1214 thread_info.last_resume_kind for new fork children.
1215
452003ef
PA
12162015-05-15 Pedro Alves <palves@redhat.com>
1217
1218 * target.h (target_handle_new_gdb_connection): Rewrite using if
1219 wrapped in do/while.
1220
1041a03c
JB
12212015-05-14 Joel Brobecker <brobecker@adacore.com>
1222
1223 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
1224 * configure, config.in: Regenerate.
1225 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
1226 Declare typedef.
1227
c269dbdb
DB
12282015-05-12 Don Breazeal <donb@codesourcery.com>
1229
1230 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
1231 PTRACE_EVENT_VFORK_DONE.
1232 (linux_low_ptrace_options, extended_event_reported): Add vfork
1233 events.
1234 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
1235 and "vforkdone" for RSP 'T' Stop Reply Packet.
1236 * server.h (report_vfork_events): Declare
1237 global variable.
1238
3a8a0396
DB
12392015-05-12 Don Breazeal <donb@codesourcery.com>
1240
1241 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
1242 (the_low_target) <new_fork>: Initialize new member.
1243 * linux-arm-low.c (arm_new_fork): New function.
1244 (the_low_target) <new_fork>: Initialize new member.
1245 * linux-low.c (handle_extended_wait): Call new target function
1246 new_fork.
1247 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
1248 * linux-mips-low.c (mips_add_watchpoint): New function
1249 extracted from mips_insert_point.
1250 (the_low_target) <new_fork>: Initialize new member.
1251 (mips_linux_new_fork): New function.
1252 (mips_insert_point): Call mips_add_watchpoint.
1253 * linux-x86-low.c (x86_linux_new_fork): New function.
1254 (the_low_target) <new_fork>: Initialize new member.
1255
de0d863e
DB
12562015-05-12 Don Breazeal <donb@codesourcery.com>
1257
1258 * linux-low.c (handle_extended_wait): Implement return value,
1259 rename argument 'event_child' to 'event_lwp', handle
1260 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
1261 (linux_low_ptrace_options): New function.
1262 (linux_low_filter_event): Call linux_low_ptrace_options,
1263 use different argument fo linux_enable_event_reporting,
1264 use return value from handle_extended_wait.
1265 (extended_event_reported): New function.
1266 (linux_wait_1): Call extended_event_reported and set
1267 status to report fork events.
1268 (linux_write_memory): Add pid to debug message.
1269 (reset_lwp_ptrace_options_callback): New function.
1270 (linux_handle_new_gdb_connection): New function.
1271 (linux_target_ops): Initialize new structure member.
1272 * linux-low.h (struct lwp_info) <waitstatus>: New member.
1273 * lynx-low.c: Initialize new structure member.
1274 * remote-utils.c (prepare_resume_reply): Implement stop reason
1275 "fork" for "T" stop message.
1276 * server.c (handle_query): Call handle_new_gdb_connection.
1277 * server.h (report_fork_events): Declare global flag.
1278 * target.h (struct target_ops) <handle_new_gdb_connection>:
1279 New member.
1280 (target_handle_new_gdb_connection): New macro.
1281 * win32-low.c: Initialize new structure member.
1282
ddcbc397
DB
12832015-05-12 Don Breazeal <donb@codesourcery.com>
1284
1285 * mem-break.c (APPEND_TO_LIST): Define macro.
1286 (clone_agent_expr): New function.
1287 (clone_one_breakpoint): New function.
1288 (clone_all_breakpoints): New function.
1289 * mem-break.h: Declare new functions.
1290
89245bc0
DB
12912015-05-12 Don Breazeal <donb@codesourcery.com>
1292
1293 * linux-low.c (linux_supports_fork_events): New function.
1294 (linux_supports_vfork_events): New function.
1295 (linux_target_ops): Initialize new structure members.
1296 (initialize_low): Call linux_check_ptrace_features.
1297 * lynx-low.c (lynx_target_ops): Initialize new structure
1298 members.
1299 * server.c (report_fork_events, report_vfork_events):
1300 New global flags.
1301 (handle_query): Add new features to qSupported packet and
1302 response.
1303 (captured_main): Initialize new global variables.
1304 * target.h (struct target_ops) <supports_fork_events>:
1305 New member.
1306 <supports_vfork_events>: New member.
1307 (target_supports_fork_events): New macro.
1308 (target_supports_vfork_events): New macro.
1309 * win32-low.c (win32_target_ops): Initialize new structure
1310 members.
1311
835205d0
GB
13122015-05-12 Gary Benson <gbenson@redhat.com>
1313
1314 * server.c (handle_qxfer_exec_file): Use current process
1315 if annex is empty.
1316
21e94bd9
SL
13172015-05-08 Sandra Loosemore <sandra@codesourcery.com>
1318
1319 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
1320 Remove HAVE_PTRACE_GETREGS conditionals.
1321 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
1322 instead of PTRACE_GETREGS and PTRACE_SETREGS.
1323
45614f15
YQ
13242015-05-08 Yao Qi <yao.qi@linaro.org>
1325
1326 * linux-low.c (linux_supports_conditional_breakpoints): New
1327 function.
1328 (linux_target_ops): Install new target method.
1329 * lynx-low.c (lynx_target_ops): Install NULL hook for
1330 supports_conditional_breakpoints.
1331 * nto-low.c (nto_target_ops): Likewise.
1332 * spu-low.c (spu_target_ops): Likewise.
1333 * win32-low.c (win32_target_ops): Likewise.
1334 * server.c (handle_query): Check
1335 target_supports_conditional_breakpoints.
1336 * target.h (struct target_ops) <supports_conditional_breakpoints>:
1337 New field.
1338 (target_supports_conditional_breakpoints): New macro.
1339
80ad801e
PA
13402015-05-06 Pedro Alves <palves@redhat.com>
1341
1342 PR server/18081
1343 * server.c (start_inferior): If the process exits, mourn it.
1344
819843c7
GB
13452015-04-21 Gary Benson <gbenson@redhat.com>
1346
1347 * hostio.c (fileio_open_flags_to_host): Factored out to
1348 fileio_to_host_openflags in common/fileio.c. Single use
1349 updated.
1350
a2d5a9d7
MF
13512015-04-17 Max Filippov <jcmvbkbc@gmail.com>
1352
1353 * linux-xtensa-low.c (xtensa_fill_gregset)
1354 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
1355 XCHAL_HAVE_LOOP.
1356
deb44829
MF
13572015-04-17 Max Filippov <jcmvbkbc@gmail.com>
1358
1359 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
1360 (regs_info): Replace usrregs pointer with NULL.
1361
e57f1de3
GB
13622015-04-17 Gary Benson <gbenson@redhat.com>
1363
1364 * target.h (struct target_ops) <pid_to_exec_file>: New field.
1365 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
1366 * server.c (handle_qxfer_exec_file): New function.
1367 (qxfer_packets): Add exec-file entry.
1368 (handle_query): Report qXfer:exec-file:read as supported packet.
1369
62828379
RN
13702015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
1371
1372 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
1373
b88bb450
GB
13742015-04-09 Gary Benson <gbenson@redhat.com>
1375
1376 * hostio-errno.c (errno_to_fileio_error): Remove function.
1377 Update caller to use remote_fileio_to_fio_error.
1378
c8f4bfdd
YQ
13792015-04-09 Yao Qi <yao.qi@linaro.org>
1380
1381 * linux-low.c (linux_insert_point): Call
1382 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
1383 (linux_remove_point): Call remove_memory_breakpoint if type is
1384 raw_bkpt_type_sw.
1385 * linux-x86-low.c (x86_insert_point): Don't call
1386 insert_memory_breakpoint.
1387 (x86_remove_point): Don't call remove_memory_breakpoint.
1388
41f98f02
PA
13892015-04-01 Pedro Alves <palves@redhat.com>
1390 Cleber Rosa <crosa@redhat.com>
1391
1392 * server.c (gdbserver_usage): Reorganize and extend the usage
1393 message.
1394
2bf6fb9d
PA
13952015-03-24 Pedro Alves <palves@redhat.com>
1396
1397 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
1398 output. Also dump TRAP_TRACE.
1399 (linux_low_filter_event): In debug output, distinguish a
1400 resume_stop SIGSTOP from a delayed SIGSTOP.
1401
369f6daa
GB
14022015-03-24 Gary Benson <gbenson@redhat.com>
1403
1404 * linux-x86-low.c (x86_linux_new_thread): Moved to
1405 nat/x86-linux.c.
1406 (x86_linux_prepare_to_resume): Likewise.
1407
8e5d4070
GB
14082015-03-24 Gary Benson <gbenson@redhat.com>
1409
1410 * Makefile.in (x86-linux-dregs.o): New rule.
1411 * configure.srv: Add x86-linux-dregs.o to relevant targets.
1412 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
1413 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
1414 (x86_linux_dr_get): Likewise.
1415 (x86_linux_dr_set): Likewise.
1416 (update_debug_registers_callback): Likewise.
1417 (x86_linux_dr_set_addr): Likewise.
1418 (x86_linux_dr_get_addr): Likewise.
1419 (x86_linux_dr_set_control): Likewise.
1420 (x86_linux_dr_get_control): Likewise.
1421 (x86_linux_dr_get_status): Likewise.
1422 (x86_linux_update_debug_registers): Likewise.
1423
2b95d440
GB
14242015-03-24 Gary Benson <gbenson@redhat.com>
1425
1426 * linux-x86-low.c (x86_linux_update_debug_registers):
1427 New function, factored out from...
1428 (x86_linux_prepare_to_resume): ...this.
1429
14b0bc68
GB
14302015-03-24 Gary Benson <gbenson@redhat.com>
1431
1432 * linux-x86-low.c (x86_linux_dr_get): Update comments.
1433 (x86_linux_dr_set): Likewise.
1434 (update_debug_registers_callback): Likewise.
1435 (x86_linux_dr_set_addr): Likewise.
1436 (x86_linux_dr_get_addr): Likewise.
1437 (x86_linux_dr_set_control): Likewise.
1438 (x86_linux_dr_get_control): Likewise.
1439 (x86_linux_dr_get_status): Likewise.
1440 (x86_linux_prepare_to_resume): Likewise.
1441
5dfe6ca8
GB
14422015-03-24 Gary Benson <gbenson@redhat.com>
1443
1444 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
1445 Use perror_with_name. Pass string through gettext.
1446 (x86_linux_dr_set): Likewise.
1447
d33472ad
GB
14482015-03-24 Gary Benson <gbenson@redhat.com>
1449
1450 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
1451 (x86_linux_dr_set_addr): ...this.
1452 (x86_dr_low_get_addr): Rename to...
1453 (x86_linux_dr_get_addr): ...this.
1454 (x86_dr_low_set_control): Rename to...
1455 (x86_linux_dr_set_control): ...this.
1456 (x86_dr_low_get_control): Rename to...
1457 (x86_linux_dr_get_control): ...this.
1458 (x86_dr_low_get_status): Rename to...
1459 (x86_linux_dr_get_status): ...this.
1460 (x86_dr_low): Update with new function names.
1461
4b134ca1
GB
14622015-03-24 Gary Benson <gbenson@redhat.com>
1463
1464 * Makefile.in (x86-linux.o): New rule.
1465 * configure.srv: Add x86-linux.o to relevant targets.
1466 * linux-low.c (lwp_set_arch_private_info): New function.
1467 (lwp_arch_private_info): Likewise.
1468 * linux-x86-low.c: Include nat/x86-linux.h.
1469 (arch_lwp_info): Removed structure.
1470 (update_debug_registers_callback):
1471 Use lwp_set_debug_registers_changed.
1472 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
1473 and lwp_set_debug_registers_changed.
1474 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
1475
34c703da
GB
14762015-03-24 Gary Benson <gbenson@redhat.com>
1477
1478 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
1479 * linux-arm-low.c (arm_new_thread): Likewise.
1480 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
1481 * linux-mips-low.c (mips_linux_new_thread): Likewise.
1482 * linux-x86-low.c (x86_linux_new_thread): Likewise.
1483 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
1484
cff068da
GB
14852015-03-24 Gary Benson <gbenson@redhat.com>
1486
1487 * linux-low.c (ptid_of_lwp): New function.
1488 (lwp_is_stopped): Likewise.
1489 (lwp_stop_reason): Likewise.
1490 * linux-x86-low.c (update_debug_registers_callback):
1491 Use lwp_is_stopped.
1492 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
1493 lwp_stop_reason.
1494
b2f7c7e8
GB
14952015-03-24 Gary Benson <gbenson@redhat.com>
1496
1497 * linux-low.h (linux_stop_lwp): Remove declaration.
1498
6d4ee8c6
GB
14992015-03-24 Gary Benson <gbenson@redhat.com>
1500
1501 * linux-low.h: Include nat/linux-nat.h.
1502 * linux-low.c (iterate_over_lwps_args): New structure.
1503 (iterate_over_lwps_filter): New function.
1504 (iterate_over_lwps): Likewise.
1505 * linux-x86-low.c (update_debug_registers_callback):
1506 Update signature to what iterate_over_lwps expects.
1507 Remove PID check that iterate_over_lwps now performs.
1508 (x86_dr_low_set_addr): Use iterate_over_lwps.
1509 (x86_dr_low_set_control): Likewise.
1510
70a0bb6b
GB
15112015-03-24 Gary Benson <gbenson@redhat.com>
1512
1513 * linux-x86-low.c (x86_debug_reg_state): New function.
1514 (x86_linux_prepare_to_resume): Use the above.
1515
7b669087
GB
15162015-03-24 Gary Benson <gbenson@redhat.com>
1517
1518 * linux-low.c (current_lwp_ptid): New function.
1519 * linux-x86-low.c: Include nat/linux-nat.h.
1520 (x86_dr_low_get_addr): Use current_lwp_ptid.
1521 (x86_dr_low_get_control): Likewise.
1522 (x86_dr_low_get_status): Likewise.
1523
eef49a3d
PA
15242015-03-20 Pedro Alves <palves@redhat.com>
1525
1526 * tracepoint.c (cmd_qtstatus): Make "str" const.
1527
b2333d22
PA
15282015-03-20 Pedro Alves <palves@redhat.com>
1529
1530 * server.c (handle_general_set): Make "req_str" const.
1531
23f238d3
PA
15322015-03-19 Pedro Alves <palves@redhat.com>
1533
1534 * linux-low.c (linux_resume_one_lwp): Rename to ...
1535 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
1536 instead call perror_with_name.
1537 (check_ptrace_stopped_lwp_gone): New function.
1538 (linux_resume_one_lwp): Reimplement as wrapper around
1539 linux_resume_one_lwp_throw that swallows errors if the LWP is
1540 gone.
1541
91baf43f
PA
15422015-03-19 Pedro Alves <palves@redhat.com>
1543
1544 * linux-low.c (count_events_callback, select_event_lwp_callback):
1545 No longer check whether the thread has resume_stop as last resume
1546 kind.
1547
8bf3b159
PA
15482015-03-19 Pedro Alves <palves@redhat.com>
1549
1550 * linux-low.c (count_events_callback, select_event_lwp_callback):
1551 Use the lwp's status_pending_p field, not the thread's.
1552
b90fc188
PA
15532015-03-19 Pedro Alves <palves@redhat.com>
1554
1555 * linux-low.c (select_event_lwp_callback): Update comments to
1556 no longer mention SIGTRAP.
1557
464b0089
GB
15582015-03-18 Gary Benson <gbenson@redhat.com>
1559
1560 * server.c (handle_query): Do not report vFile:fstat as supported.
1561
aa9e327f
GB
15622015-03-11 Gary Benson <gbenson@redhat.com>
1563
1564 * hostio.c (sys/types.h): New include.
1565 (sys/stat.h): Likewise.
1566 (common-remote-fileio.h): Likewise.
1567 (handle_fstat): New function.
1568 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 1569
791c0056
GB
15702015-03-11 Gary Benson <gbenson@redhat.com>
1571
1572 * configure.ac (AC_CHECK_MEMBERS): Add checks for
1573 struct stat.st_blocks and struct stat.st_blksize.
1574 * configure: Regenerate.
1575 * config.in: Likewise.
1576 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
1577 (OBS): Add common-remote-fileio.o.
1578 (common-remote-fileio.o): New rule.
1579
9a9df970
PA
15802015-03-09 Pedro Alves <palves@redhat.com>
1581
1582 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
1583 'struct sockaddr' pointer in 'accept' call.
1584
9eb1356e
PA
15852015-03-09 Pedro Alves <palves@redhat.com>
1586
1587 Revert:
1588 2015-03-07 Pedro Alves <palves@redhat.com>
1589 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
1590 or <winsock2.h> here. Instead include "gdb_socket.h".
1591 (remote_open): Use union gdb_sockaddr_u.
1592 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
1593 or <winsock2.h> here. Instead include "gdb_socket.h".
1594 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
1595 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
1596 or <sys/un.h>.
1597 (init_named_socket, gdb_agent_helper_thread): Use union
1598 gdb_sockaddr_u.
1599
aac331e4
PA
16002015-03-07 Pedro Alves <palves@redhat.com>
1601
1602 * configure.ac (build_warnings): Move
1603 -Wdeclaration-after-statement to the C-specific set.
1604 * configure: Regenerate.
1605
366c75fc
PA
16062015-03-07 Pedro Alves <palves@redhat.com>
1607
1608 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
1609 or <winsock2.h> here. Instead include "gdb_socket.h".
1610 (remote_open): Use union gdb_sockaddr_u.
1611 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
1612 or <winsock2.h> here. Instead include "gdb_socket.h".
1613 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
1614 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
1615 or <sys/un.h>.
1616 (init_named_socket, gdb_agent_helper_thread): Use union
1617 gdb_sockaddr_u.
1618
492d29ea
PA
16192015-03-07 Pedro Alves <palves@redhat.com>
1620
1621 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
1622 instead.
1623
60a191ed
YQ
16242015-03-06 Yao Qi <yao.qi@linaro.org>
1625
1626 * linux-aarch64-low.c (aarch64_insert_point): Use
1627 show_debug_regs as a boolean.
1628 (aarch64_remove_point): Likewise.
1629
f5771b1d
PA
16302015-03-05 Pedro Alves <palves@redhat.com>
1631
1632 * lynx-low.c (lynx_target_ops): Install NULL hooks for
1633 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
1634 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
1635 * nto-low.c (nto_target_ops): Likewise.
1636 * spu-low.c (spu_target_ops): Likewise.
1637 * win32-low.c (win32_target_ops): Likewise.
1638
3e572f71
PA
16392015-03-04 Pedro Alves <palves@redhat.com>
1640
72f4393d 1641 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
1642 Decide whether a breakpoint triggered based on the SIGTRAP's
1643 siginfo.si_code.
72f4393d
L
1644 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
1645 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
1646 (linux_low_filter_event): Check for breakpoints before checking
1647 watchpoints.
1648 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
1649 siginfo.si_code.
72f4393d
L
1650 (linux_stopped_by_sw_breakpoint)
1651 (linux_supports_stopped_by_sw_breakpoint)
1652 (linux_stopped_by_hw_breakpoint)
1653 (linux_supports_stopped_by_hw_breakpoint): New functions.
1654 (linux_target_ops): Install new target methods.
3e572f71 1655
1ec68e26
PA
16562015-03-04 Pedro Alves <palves@redhat.com>
1657
1658 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
1659 * server.c (swbreak_feature, hwbreak_feature): New globals.
1660 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
1661 (captured_main): Clear swbreak_feature and hwbreak_feature.
1662 * server.h (swbreak_feature, hwbreak_feature): Declare.
1663 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
1664 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
1665 supports_stopped_by_hw_breakpoint>: New fields.
1666 (target_supports_stopped_by_sw_breakpoint)
1667 (target_stopped_by_sw_breakpoint)
1668 (target_supports_stopped_by_hw_breakpoint)
1669 (target_stopped_by_hw_breakpoint): Declare.
1670
15c66dd6
PA
16712015-03-04 Pedro Alves <palves@redhat.com>
1672
1673 enum lwp_stop_reason -> enum target_stop_reason
1674 * linux-low.c (check_stopped_by_breakpoint): Adjust.
1675 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
1676 (linux_wait_1, stuck_in_jump_pad_callback)
1677 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
1678 (linux_stopped_by_watchpoint):
1679 * linux-low.h (enum lwp_stop_reason): Delete.
1680 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
1681 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
1682
98fc70d6
YQ
16832015-03-04 Yao Qi <yao.qi@linaro.org>
1684
1685 * Makefile.in (SFILES): Add linux-aarch64-low.c.
1686
dd2ac174
GB
16872015-03-03 Gary Benson <gbenson@redhat.com>
1688
1689 * hostio.c (handle_vFile): Fix prefix lengths.
1690
d68e53f4
MM
16912015-03-03 Markus Metzger <markus.t.metzger@intel.com>
1692
1693 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
1694 ptr_bits.
1695
bf2d68ab
AA
16962015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
1697
1698 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
1699 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
1700 (clean): Add "rm -f" for above C files.
1701 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
1702 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
1703 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
1704 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
1705 * linux-s390-low.c (HWCAP_S390_VX): New macro.
1706 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
1707 (init_registers_s390x_vx_linux64)
1708 (init_registers_s390x_tevx_linux64)
1709 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
1710 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
1711 declarations.
1712 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
1713 (s390_store_vxrs_high): New functions.
1714 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
1715 NT_S390_VXRS_HIGH.
1716 (s390_arch_setup): Add logic for selecting one of the new target
1717 descriptions. Activate the new vector regsets if applicable.
1718 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
1719 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
1720 and init_registers_s390x_tevx_linux64.
1721
c966a859
PA
17222015-03-01 Pedro Alves <palves@redhat.com>
1723
1724 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
1725 parameter.
1726
4180215b
PA
17272015-02-27 Pedro Alves <palves@redhat.com>
1728
1729 * linux-x86-low.c (u_debugreg_offset): New function.
1730 (x86_linux_dr_get, x86_linux_dr_set): Use it.
1731
749bab01
PA
17322015-02-27 Pedro Alves <palves@redhat.com>
1733
1734 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
1735 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
1736 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
1737 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
1738 (ps_lsetfpregs, ps_getpid)
1739 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
1740 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
1741 (ps_lsetxregs, ps_plog): Declare.
1742
3c14e5a3
PA
17432015-02-27 Pedro Alves <palves@redhat.com>
1744
1745 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
1746 IP_AGENT_EXPORT_FUNC.
1747 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
1748 IP_AGENT_EXPORT_FUNC.
1749 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
1750 (IP_AGENT_EXPORT): Delete.
1751 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
1752 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
1753 (gdb_trampoline_buffer_error, collecting, gdb_collect)
1754 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
1755 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
1756 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
1757 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
1758 (traceframe_read_count, traceframe_write_count)
1759 (traceframes_created, trace_state_variables, get_raw_reg)
1760 (get_trace_state_variable_value, set_trace_state_variable_value)
1761 (ust_loaded, helper_thread_id, cmd_buf): Use
1762 IPA_SYM_EXPORTED_NAME.
1763 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
1764 (tracepoints) Use IP_AGENT_EXPORT_VAR.
1765 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
1766 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
1767 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
1768 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
1769 EXTERN_C_PUSH/EXTERN_C_POP.
1770 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
1771 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
1772 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
1773 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
1774 (traceframe_write_count, traceframe_read_count)
1775 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
1776 (about_to_request_buffer_space, get_trace_state_variable_value)
1777 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
1778 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
1779 EXTERN_C_PUSH/EXTERN_C_POP.
1780 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
1781 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
1782 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
1783 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
1784 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
1785 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
1786 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
1787 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
1788 Define.
1789 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
1790 (IP_AGENT_EXPORT_VAR_DECL): Define.
1791 (tracing): Declare.
1792 (gdb_agent_get_raw_reg): Declare.
1793
fe978cb0
PA
17942015-02-27 Tom Tromey <tromey@redhat.com>
1795 Pedro Alves <palves@redhat.com>
1796
1797 Rename symbols whose names are reserved C++ keywords throughout.
1798
3bc3d82a
PA
17992015-02-27 Pedro Alves <palves@redhat.com>
1800
1801 * Makefile.in (COMPILER): New, get it from autoconf.
1802 (CXX): Get from autoconf instead.
1803 (COMPILE.pre): Use COMPILER.
1804 (CC-LD): Rename to ...
1805 (CC_LD): ... this. Use COMPILER.
1806 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
1807 (CXX_FOR_TARGET): Default to g++ instead of gcc.
1808 * acinclude.m4: Include build-with-cxx.m4.
1809 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
1810 Disable -Werror by default if building in C++ mode.
1811 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
1812 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
1813 the C++ compiler. Save/restore CXXFLAGS too.
1814 * configure: Regenerate.
1815
07697489
PA
18162015-02-27 Pedro Alves <palves@redhat.com>
1817
1818 * acinclude.m4: Include libiberty.m4.
1819 * configure.ac: Call libiberty_INIT.
1820 * config.in, configure: Regenerate.
1821
9beb7c4e
PA
18222015-02-26 Pedro Alves <palves@redhat.com>
1823
1824 * linux-low.c (linux_wait_1): When incrementing the PC past a
1825 program breakpoint always use the_low_target.breakpoint_len as
1826 increment, rather than the maximum between that and
1827 the_low_target.decr_pc_after_break.
1828
8090aef2
PA
18292015-02-23 Pedro Alves <palves@redhat.com>
1830
1831 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
1832 thread was doing a step-over; always adjust the PC if
1833 we stepped over a permanent breakpoint.
1834 (linux_wait_1): If we stepped over breakpoint that was on top of a
1835 permanent breakpoint, manually advance the PC past it.
1836
bc9540e8
PA
18372015-02-23 Pedro Alves <palves@redhat.com>
1838
1839 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
1840 modes.
1841 (x86_fill_gregset, x86_store_gregset): Use it when handling
1842 $orig_eax.
1843
2db9a427
PA
18442015-02-20 Pedro Alves <palves@redhat.com>
1845
1846 * thread-db.c: Include "nat/linux-procfs.h".
1847 (thread_db_init): Skip listing new threads if the kernel supports
1848 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
1849
afa8d396
PA
18502015-02-20 Pedro Alves <palves@redhat.com>
1851
1852 * linux-low.c (status_pending_p_callback): Use ptid_match.
1853
c9587f88
AT
18542015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
1855
1856 PR breakpoints/16812
1857 * linux-low.c (wstatus_maybe_breakpoint): Remove.
1858 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
1859 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
1860
b05ec7a5
AT
18612015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
1862
1863 PR breakpoints/15956
1864 * tracepoint.c (cmd_qtinit): Add check for current_thread.
1865
d33501a5
MM
18662015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1867
1868 * linux-low.c (linux_low_btrace_conf): Print size.
1869 * server.c (handle_btrace_conf_general_set): New.
1870 (hanle_general_set): Call handle_btrace_conf_general_set.
1871 (handle_query): Report Qbtrace-conf:bts:size as supported.
1872
f4abbc16
MM
18732015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1874
1875 * linux-low.c (linux_low_enable_btrace): Update parameters.
1876 (linux_low_btrace_conf): New.
1877 (linux_target_ops)<to_btrace_conf>: Initialize.
1878 * server.c (current_btrace_conf): New.
1879 (handle_btrace_enable): Rename to ...
1880 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
1881 to target_enable_btrace. Update comment. Update users.
1882 (handle_qxfer_btrace_conf): New.
1883 (qxfer_packets): Add btrace-conf entry.
1884 (handle_query): Report qXfer:btrace-conf:read as supported packet.
1885 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
1886 (target_ops)<read_btrace_conf>: New.
1887 (target_enable_btrace): Update parameters.
1888 (target_read_btrace_conf): New.
1889
043c3577
MM
18902015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1891
1892 * server.c (handle_btrace_general_set): Remove call to
1893 target_supports_btrace.
1894 (supported_btrace_packets): New.
1895 (handle_query): Call supported_btrace_packets.
1896 * target.h: include btrace-common.h.
1897 (btrace_target_info): Removed.
1898 (supports_btrace, target_supports_btrace): Update parameters.
1899
734b0e4b
MM
19002015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1901
1902 * Makefile.in (SFILES): Add common/btrace-common.c.
1903 (OBS): Add common/btrace-common.o.
1904 (btrace-common.o): Add build rules.
1905 * linux-low: Include btrace-common.h.
1906 (linux_low_read_btrace): Use struct btrace_data. Call
1907 btrace_data_init and btrace_data_fini.
1908
d6c146e9
PA
19092015-02-06 Pedro Alves <palves@redhat.com>
1910
1911 * thread-db.c (find_new_threads_callback): Add debug output.
1912
20ba1ce6
PA
19132015-02-04 Pedro Alves <palves@redhat.com>
1914
1915 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
1916 (resume_stopped_resumed_lwps): New function.
1917 (linux_wait_for_event_filtered): Use it.
1918
8cc73a39
SDJ
19192015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
1920
1921 * Makefile.in (SFILES): Add linux-personality.c.
1922 (linux-personality.o): New rule.
1923 * configure.srv (srv_linux_obj): Add linux-personality.o to the
1924 list of objects to be built.
1925 * linux-low.c: Include nat/linux-personality.h.
1926 (linux_create_inferior): Remove code to disable address space
1927 randomization (moved to ../nat/linux-personality.c). Create
1928 cleanup to disable address space randomization.
1929
fb23d554
SDJ
19302015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
1931
1932 * Makefile.in (posix-strerror.o): New rule.
1933 (mingw-strerror.o): Likewise.
1934 * configure: Regenerated.
1935 * configure.ac: Source file ../common/common.host. Initialize new
1936 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
1937
cdf43629
YQ
19382015-01-14 Yao Qi <yao@codesourcery.com>
1939
1940 * Makefile.in (SFILES): Add nat/ppc-linux.c.
1941 (ppc-linux.o): New rule.
1942 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
1943 * configure.ac: AC_CHECK_FUNCS(getauxval).
1944 * config.in: Re-generated.
1945 * configure: Re-generated.
1946 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
1947 ppc64_64bit_inferior_p
1948
514c5338
YQ
19492015-01-14 Yao Qi <yao@codesourcery.com>
1950
1951 * linux-ppc-low.c: Include "nat/ppc-linux.h".
1952 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
1953 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
1954 (PT_ORIG_R3, PT_TRAP): Likewise.
1955 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
1956 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
1957 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
1958
3368c1e5
JB
19592015-01-10 Joel Brobecker <brobecker@adacore.com>
1960
1961 * i387-fp.c (i387_cache_to_xsave): In look over
1962 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
1963 zmmh_low_space field by use of zmmh_high_space.
1964
582511be
PA
19652015-01-09 Pedro Alves <palves@redhat.com>
1966
1967 * linux-low.c (step_over_bkpt): Move higher up in the file.
1968 (handle_extended_wait): Don't store the stop_pc here.
1969 (get_stop_pc): Adjust comments and rename to ...
1970 (check_stopped_by_breakpoint): ... this. Record whether the LWP
1971 stopped for a software breakpoint or hardware breakpoint.
1972 (thread_still_has_status_pending_p): New function.
1973 (status_pending_p_callback): Use
1974 thread_still_has_status_pending_p. If the event is no longer
1975 interesting, resume the LWP.
1976 (handle_tracepoints): Add assert.
1977 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
1978 (wstatus_maybe_breakpoint): New function.
1979 (cancel_breakpoint): Delete function.
1980 (check_stopped_by_watchpoint): New function, factored out from
1981 linux_low_filter_event.
1982 (lp_status_maybe_breakpoint): Delete function.
1983 (linux_low_filter_event): Remove filter_ptid argument.
1984 Leave thread group exits pending here. Store the LWP's stop PC.
1985 Always leave events pending.
1986 (linux_wait_for_event_filtered): Pull all events out of the
1987 kernel, and leave them all pending.
1988 (count_events_callback, select_event_lwp_callback): Consider all
1989 events.
1990 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
1991 (select_event_lwp): Only give preference to the stepping LWP in
1992 all-stop mode. Adjust comments.
1993 (ignore_event): New function.
1994 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
1995 references to cancel_breakpoints. Adjust to renames. Also give
1996 equal priority to all LWPs that have had events in non-stop mode.
1997 If reporting a software breakpoint event, unadjust the LWP's PC.
1998 (linux_wait): If linux_wait_1 returned an ignored event, retry.
1999 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
2000 Adjust.
2001 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
2002 (resume_status_pending_p): Use thread_still_has_status_pending_p.
2003 (linux_stopped_by_watchpoint): Adjust.
2004 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
2005 * linux-low.h (enum lwp_stop_reason): New.
2006 (struct lwp_info) <stop_pc>: Adjust comment.
2007 <stopped_by_watchpoint>: Delete field.
2008 <stop_reason>: New field.
2009 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
2010 * mem-break.c (software_breakpoint_inserted_here)
2011 (hardware_breakpoint_inserted_here): New function.
2012 * mem-break.h (software_breakpoint_inserted_here)
2013 (hardware_breakpoint_inserted_here): Declare.
2014 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
2015 (cancel_breakpoints): Delete.
2016 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
2017 (upload_fast_traceframes): Remove references to
2018 cancel_breakpoints.
2019
a33e3959
PA
20202015-01-09 Pedro Alves <palves@redhat.com>
2021
2022 * thread-db.c (find_new_threads_callback): Ignore thread if the
2023 kernel thread ID is -1.
2024
8784d563
PA
20252015-01-09 Pedro Alves <palves@redhat.com>
2026
2027 * linux-low.c (linux_attach_fail_reason_string): Move to
2028 nat/linux-ptrace.c, and rename.
2029 (linux_attach_lwp): Update comment.
2030 (attach_proc_task_lwp_callback): New function.
2031 (linux_attach): Adjust to rename and use
2032 linux_proc_attach_tgid_threads.
2033 (linux_attach_fail_reason_string): Delete declaration.
2034
76f2b779
JB
20352015-01-01 Joel Brobecker <brobecker@adacore.com>
2036
2037 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
2038 * server.c (gdbserver_version): Likewise.
2039
fafcc06a
SDJ
20402014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
2041
2042 * remote-utils.c: Include ctype.h.
2043 (input_interrupt): Explicitly handle the case when the char
2044 received is the NUL byte. Improve the printing of non-ASCII
2045 characters.
2046
beed38b8
JB
20472014-12-16 Joel Brobecker <brobecker@adacore.com>
2048
2049 * linux-low.c (linux_low_filter_event): Update call to
2050 linux_enable_event_reporting following the addition of
2051 a new parameter to that function.
2052
bf330350
CU
20532014-12-16 Catalin Udma <catalin.udma@freescale.com>
2054
2055 PR server/17457
2056 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
2057 (AARCH64_FPCR_REGNO): Likewise.
2058 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
2059 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
2060 (aarch64_store_fpregset): Likewise.
2061
5227d625
JB
20622014-12-15 Joel Brobecker <brobecker@adacore.com>
2063
2064 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
2065 Remove FIXME comment about assumption about N.
2066
f93b65a0
JB
20672014-12-13 Joel Brobecker <brobecker@adacore.com>
2068
2069 * configure.ac: If large-file support is disabled in GDBserver,
2070 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
2071 * configure: Regenerate.
2072
e5a9158d
AA
20732014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2074
2075 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
2076 warning upon ENODATA from ptrace.
2077 * linux-s390-low.c (s390_store_tdb): New.
2078 (s390_regsets): Add regset for NT_S390_TDB.
2079
feea5f36
AA
20802014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2081
2082 * linux-low.c (regsets_store_inferior_registers): Skip regsets
2083 without a fill_function.
2084 * linux-s390-low.c (s390_fill_last_break): Remove.
2085 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
2086 (s390_arch_setup): Use regset's size instead of fill_function for
2087 loop end condition.
2088
098dbe61
AA
20892014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2090
2091 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
2092 the regset's store function when ptrace returned an error.
2093 * regcache.c (get_thread_regcache): Invalidate register cache
2094 before fetching inferior's registers.
2095
28eef672
AA
20962014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2097
2098 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
2099 while-loop as for-loop.
2100 (regsets_store_inferior_registers): Likewise.
2101
bdca27a2
YQ
21022014-11-28 Yao Qi <yao@codesourcery.com>
2103
2104 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
2105 * config.in, configure: Re-generate.
2106 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
2107 is defined.
2108
9c232dda
YQ
21092014-11-21 Yao Qi <yao@codesourcery.com>
2110
2111 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
2112 (AC_CHECK_HEADERS): Remove malloc.h.
2113 * configure: Re-generated.
2114 * config.in: Re-generated.
2115 * server.h: Don't include alloca.h and malloc.h.
2116 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
2117 Don't include malloc.h.
2118
43968415
JB
21192014-11-17 Joel Brobecker <brobecker@adacore.com>
2120
2121 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
2122 corresponding ERRNO check in same block.
2123
40e91bc7
PA
21242014-11-12 Pedro Alves <palves@redhat.com>
2125
2126 * server.c (cont_thread): Update comment.
2127 (start_inferior, attach_inferior): No longer clear cont_thread.
2128 (handle_v_cont): No longer set cont_thread.
2129 (captured_main): Clear cont_thread each time a GDB connects.
2130
c2c118cf
PA
21312014-11-12 Pedro Alves <palves@redhat.com>
2132
2133 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
2134 thread, and don't resume all threads if the Hc thread has exited.
2135
78708b7c
PA
21362014-11-12 Pedro Alves <palves@redhat.com>
2137
2138 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
2139 the process group instead of to a specific LWP.
2140
a2abc7de
PA
21412014-10-15 Pedro Alves <palves@redhat.com>
2142
2143 PR server/17487
2144 * win32-arm-low.c (arm_set_thread_context): Remove current_event
2145 parameter.
2146 (arm_set_thread_context): Delete.
2147 (the_low_target): Adjust.
2148 * win32-i386-low.c (debug_registers_changed)
2149 (debug_registers_used): Delete.
2150 (update_debug_registers_callback): New function.
2151 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
2152 needing to update their debug registers.
2153 (win32_get_current_dr): New function.
2154 (x86_dr_low_get_addr, x86_dr_low_get_control)
2155 (x86_dr_low_get_status): Fetch the debug register from the thread
2156 record's context.
2157 (i386_initial_stuff): Adjust.
2158 (i386_get_thread_context): Remove current_event parameter. Don't
2159 clear debug_registers_changed nor copy DR values to
2160 debug_reg_state.
2161 (i386_set_thread_context): Delete.
2162 (i386_prepare_to_resume): New function.
2163 (i386_thread_added): Mark the thread as needing to update irs
2164 debug registers.
2165 (the_low_target): Remove i386_set_thread_context and install
2166 i386_prepare_to_resume.
2167 * win32-low.c (win32_get_thread_context): Adjust.
2168 (win32_set_thread_context): Use SetThreadContext
2169 directly.
2170 (win32_prepare_to_resume): New function.
2171 (win32_require_context): New function, factored out from ...
2172 (thread_rec): ... this.
2173 (continue_one_thread): Call win32_prepare_to_resume on each thread
2174 we're about to continue.
2175 (win32_resume): Call win32_prepare_to_resume on the event thread.
2176 * win32-low.h (struct win32_thread_info)
2177 <debug_registers_changed>: New field.
2178 (struct win32_target_ops): Change prototype of set_thread_context,
2179 delete set_thread_context and add prepare_to_resume.
2180 (win32_require_context): New declaration.
2181
a442d071
GB
21822014-10-08 Gary Benson <gbenson@redhat.com>
2183
2184 * server.h: Do not include common-exceptions.h.
2185
6f1947e8
GB
21862014-10-08 Gary Benson <gbenson@redhat.com>
2187
2188 * server.h: Do not include cleanups.h.
2189
63b434a4
JH
21902014-09-30 James Hogan <james.hogan@imgtec.com>
2191
2192 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
2193 mips64-dsp-linux.c.
2194
c4d9ceb6
YQ
21952014-09-23 Yao Qi <yao@codesourcery.com>
2196
2197 * linux-low.c (lp_status_maybe_breakpoint): New function.
2198 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
2199 (count_events_callback): Likewise.
2200 (select_event_lwp_callback): Likewise.
2201 (cancel_breakpoints_callback): Likewise.
2202
89a5711c
DB
22032014-09-19 Don Breazeal <donb@codesourcery.com>
2204
2205 * linux-low.c (handle_extended_wait): Call
2206 linux_ptrace_get_extended_event.
2207 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
2208 linux_is_extended_waitstatus.
2209
bffc0964
JB
22102014-09-16 Joel Brobecker <brobecker@adacore.com>
2211
2212 * Makefile.in (CPPFLAGS): Define.
2213 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
2214 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
2215
0bfdf32f
GB
22162014-09-16 Gary Benson <gbenson@redhat.com>
2217
2218 * inferiors.h (current_inferior): Renamed as...
2219 (current_thread): New variable. All uses updated.
2220 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
2221 (maybe_move_out_of_jump_pad): Likewise.
2222 (cancel_breakpoint): Likewise.
2223 (linux_low_filter_event): Likewise.
2224 (wait_for_sigstop): Likewise.
2225 (linux_resume_one_lwp): Likewise.
2226 (need_step_over_p): Likewise.
2227 (start_step_over): Likewise.
2228 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
2229 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
2230 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
2231 and save_inferior as saved_thread.
2232 * regcache.c (get_thread_regcache): Renamed saved_inferior as
2233 saved_thread.
2234 (regcache_invalidate_thread): Likewise.
2235 * remote-utils.c (prepare_resume_reply): Likewise.
2236 * thread-db.c (thread_db_get_tls_address): Likewise.
2237 (disable_thread_event_reporting): Likewise.
2238 (remove_thread_event_breakpoints): Likewise.
2239 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
2240 as saved_thread.
2241 * target.h (set_desired_inferior): Renamed as...
2242 (set_desired_thread): New declaration. All uses updated.
2243 * server.c (myresume): Updated comment to reference thread instead
2244 of inferior.
2245 (handle_serial_event): Likewise.
2246 (handle_target_event): Likewise.
2247
361c8ade
GB
22482014-09-12 Tom Tromey <tromey@redhat.com>
2249 Gary Benson <gbenson@redhat.com>
2250
2251 * regcache.h: Include common-regcache.h.
2252 (regcache_read_pc): Don't declare.
2253 * regcache.c (get_thread_regcache_for_ptid): New function.
2254
bd9269f7
GB
22552014-09-11 Tom Tromey <tromey@redhat.com>
2256 Gary Benson <gbenson@redhat.com>
2257
2258 * symbol.c: New file.
2259 * Makefile.in (SFILES): Add symbol.c.
2260 (OBS): Add symbol.o.
2261
f8c1d06b
GB
22622014-09-11 Gary Benson <gbenson@redhat.com>
2263
2264 * target.c (target_stop_ptid, target_continue_ptid): New
2265 functions.
2266
721ec300
GB
22672014-09-11 Tom Tromey <tromey@redhat.com>
2268 Gary Benson <gbenson@redhat.com>
2269
2270 * target.h: Include target/target.h.
2271 * target.c (target_read_memory, target_read_uint32)
2272 (target_write_memory): New functions.
2273
c5e92cca
GB
22742014-09-11 Gary Benson <gbenson@redhat.com>
2275
2276 * server.h (debug_hw_points): Don't declare.
2277 * server.c (debug_hw_points): Don't define. Replace all uses
2278 with show_debug_regs.
2279 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
2280 all uses with show_debug_regs.
2281
2e4bb98a
EBM
22822014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
2283
2284 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
2285 endianness into account.
2286 (ppc_supply_ptrace_register): Likewise.
2287
ac740bc7
JH
22882014-09-03 James Hogan <james.hogan@imgtec.com>
2289
2290 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
2291 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
2292
97ea6506
GB
22932014-09-03 Gary Benson <gbenson@redhat.com>
2294
2295 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
2296 ALL_DEBUG_ADDRESS_REGISTERS.
2297
df7e5265
GB
22982014-09-02 Gary Benson <gbenson@redhat.com>
2299
2300 * i386-low.h: Renamed as...
2301 * x86-low.h: New file. All type, function and variable name
2302 prefixes changed from "i386_" to "x86_". All references updated.
2303 * i386-low.c: Renamed as...
2304 * x86-low.c: New file. All type, function and variable name
2305 prefixes changed from "i386_" to "x86_". All references updated.
2306
ed859da7
GB
23072014-09-02 Gary Benson <gbenson@redhat.com>
2308
2309 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
2310 (x86_linux_new_thread): Likewise.
2311
860789c7
GB
23122014-08-29 Gary Benson <gbenson@redhat.com>
2313
2314 * server.h (setjmp.h): Do not include.
2315 (toplevel): Do not declare.
2316 (common-exceptions.h): Include.
2317 (cleanups.h): Likewise.
2318 * server.c (toplevel): Do not define.
2319 (exit_code): New static global.
2320 (detach_or_kill_for_exit_cleanup): New function.
2321 (main): New function. Original main renamed to...
2322 (captured_main): New function.
2323 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
2324
ff55e1b5
GB
23252014-08-29 Gary Benson <gbenson@redhat.com>
2326
2327 * Makefile.in (SFILES): Add common/common-exceptions.c.
2328 (OBS): Add common-exceptions.o.
2329 (common-exceptions.o): New rule.
2330 * utils.c (prepare_to_throw_exception): New function.
2331
e9bcb658
GB
23322014-08-29 Gary Benson <gbenson@redhat.com>
2333
2334 * config.in: Regenerate.
2335 * configure: Likewise.
2336
e3180625
GB
23372014-08-29 Gary Benson <gbenson@redhat.com>
2338
2339 * Makefile.in (SFILES): Add common/cleanups.c.
2340 (OBS): cleanups.o.
2341 (cleanups.o): New rule.
2342
e3d6ba5d
GB
23432014-08-29 Gary Benson <gbenson@redhat.com>
2344
2345 * utils.c (internal_vwarning): New function.
2346
7096e886
GB
23472014-08-28 Gary Benson <gbenson@redhat.com>
2348
2349 * utils.h (fatal): Remove declaration.
2350 * utils.c (fatal): Remove function.
2351
14ce3192
GB
23522014-08-28 Gary Benson <gbenson@redhat.com>
2353
2354 * tracepoint.c (gdb_agent_init): Replace fatal with
2355 perror_with_name.
2356 (initialize_tracepoint): Likewise.
2357
50278d59
GB
23582014-08-28 Gary Benson <gbenson@redhat.com>
2359
2360 * remote-utils.c (remote_prepare): Replace fatal with error.
2361
aa96c426
GB
23622014-08-28 Gary Benson <gbenson@redhat.com>
2363
2364 * linux-low.c (linux_async): Replace fatal with warning.
2365 Tidy up and return.
2366 (linux_start_non_stop): Return -1 if linux_async failed.
2367
f7160e97
GB
23682014-08-28 Gary Benson <gbenson@redhat.com>
2369
2370 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
2371 gdb_assert.
2372 (i386_dr_low_get_addr): Remove vague comment.
2373 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
2374 gdb_assert.
2375
38e08fca
GB
23762014-08-28 Gary Benson <gbenson@redhat.com>
2377
2378 * inferiors.c (get_thread_process): Replace check with gdb_assert.
2379 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
2380 internal_error.
2381 (linux_resume_one_lwp): Likewise.
2382 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
2383 gdb_assert.
2384 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
2385 with internal_error.
2386 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
2387 (init_register_cache): Replace fatal with gdb_assert_not_reached.
2388 (find_register_by_name): Replace fatal with internal_error.
2389 (find_regno): Likewise.
2390 * tdesc.c (init_target_desc): Replace check with gdb_assert.
2391 * thread-db.c (thread_db_create_event): Likewise.
2392 (thread_db_load_search): Likewise.
2393 (try_thread_db_load_1): Likewise.
2394 * tracepoint.c (get_jump_space_head): Replace fatal with
2395 internal_error.
2396 (claim_trampoline_space): Likewise.
2397 (have_fast_tracepoint_trampoline_buffer): Likewise.
2398 (cmd_qtstart): Likewise.
2399 (stop_tracing): Likewise.
2400 (fast_tracepoint_collecting): Likewise.
2401 (target_malloc): Likewise.
2402 (download_tracepoint): Likewise.
2403 (download_trace_state_variables): Replace check with gdb_assert.
2404 (upload_fast_traceframes): Replace fatal with internal_error.
2405
34abf635
GB
24062014-08-19 Tom Tromey <tromey@redhat.com>
2407 Gary Benson <gbenson@redhat.com>
2408
2409 * Makefile.in (SFILES): Add common/common-debug.c.
2410 (OBS): Add common-debug.o.
2411 (common-debug.o): New rule.
2412 * debug.h (debug_printf): Don't declare.
2413 * debug.c (debug_printf): Renamed and rewritten as...
2414 (debug_vprintf): New function.
2415
f6e94d78
GB
24162014-08-19 Gary Benson <gbenson@redhat.com>
2417
2418 * utils.h: Do not include print-utils.h.
2419
9239eeab
GB
24202014-08-19 Tom Tromey <tromey@redhat.com>
2421 Gary Benson <gbenson@redhat.com>
2422
2423 * server.h: Add static assertion.
2424 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
2425
ef87c8bb
GB
24262014-08-19 Tom Tromey <tromey@redhat.com>
2427 Gary Benson <gbenson@redhat.com>
2428
2429 * Makefile.in (SFILES): Add common/errors.c.
2430 (OBS): Add errors.o.
2431 (IPA_OBS): Add errors-ipa.o.
2432 (errors.o): New rule.
2433 (errors-ipa.o): Likewise.
2434 * utils.h (perror_with_name, error, warning): Don't declare.
2435 * utils.c (warning): Renamed and rewritten as...
2436 (vwarning): New function.
2437 (error): Renamed and rewritten as...
2438 (verror): New function.
2439 (internal_error): Renamed and rewritten as...
2440 (internal_verror): New function.
2441
bb974a24
GB
24422014-08-07 Gary Benson <gbenson@redhat.com>
2443
2444 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
2445 * configure: Regenerate.
2446 * config.in: Likewise.
2447 * server.h: Do not include errno.h.
2448 * event-loop.c: Likewise.
2449 * hostio-errno.c: Likewise.
2450 * linux-low.c: Likewise.
2451 * remote-utils.c: Likewise.
2452 * spu-low.c: Likewise.
2453 * utils.c: Likewise.
2454 * gdbreplay.c: Unconditionally include errno.h.
2455
6d3d12eb
GB
24562014-08-07 Gary Benson <gbenson@redhat.com>
2457
2458 * server.h: Do not include string.h.
2459 * event-loop.c: Likewise.
2460 * linux-low.c: Likewise.
2461 * regcache.c: Likewise.
2462 * remote-utils.c: Likewise.
2463 * spu-low.c: Likewise.
2464 * utils.c: Likewise.
2465
dccbb609
GB
24662014-08-07 Gary Benson <gbenson@redhat.com>
2467
2468 * server.h: Do not include gdb_assert.h.
2469
e76df0d0
GB
24702014-08-07 Gary Benson <gbenson@redhat.com>
2471
2472 * server.h: Do not include common-utils.h.
2473
4cb9c816
GB
24742014-08-07 Gary Benson <gbenson@redhat.com>
2475
2476 * server.h: Do not include ptid.h.
2477 * notif.h: Likewise.
2478
3995eeee
GB
24792014-08-07 Gary Benson <gbenson@redhat.com>
2480
2481 * server.h: Do not include gdb_locale.h.
2482
cb9f1a9b
GB
24832014-08-07 Gary Benson <gbenson@redhat.com>
2484
2485 * server.h: Do not include gdb/signals.h.
2486 * win32-low.c: Likewise.
2487
a5fceff8
GB
24882014-08-07 Gary Benson <gbenson@redhat.com>
2489
2490 * server.h: Do not include pathmax.h.
2491
b9391142
GB
24922014-08-07 Gary Benson <gbenson@redhat.com>
2493
2494 * server.h: Do not include libiberty.h.
2495 * linux-bfin-low.c: Likewise.
2496
0e443c87
GB
24972014-08-07 Gary Benson <gbenson@redhat.com>
2498
2499 * server.h: Do not include ansidecl.h.
2500
8ebb3f56
GB
25012014-08-07 Gary Benson <gbenson@redhat.com>
2502
2503 * linux-x86-low.c: Do not include stddef.h.
2504 * lynx-ppc-low.c: Likewise.
2505 * tracepoint.c: Likewise.
2506
8980bdf6
GB
25072014-08-07 Gary Benson <gbenson@redhat.com>
2508
2509 * server.h: Do not include stdarg.h.
2510 * nto-low.c: Likewise.
2511
d7096f71
GB
25122014-08-07 Gary Benson <gbenson@redhat.com>
2513
2514 * server.h: Do not include stdlib.h.
2515 * inferiors.c: Likewise.
2516 * linux-low.c: Likewise.
2517 * regcache.c: Likewise.
2518 * spu-low.c: Likewise.
2519 * tracepoint.c: Likewise.
2520 * utils.c: Likewise.
2521
d02f550d
GB
25222014-08-07 Gary Benson <gbenson@redhat.com>
2523
2524 * server.h: Do not include stdio.h.
2525 * linux-low.c: Likewise.
2526 * remote-utils.c: Likewise.
2527 * spu-low.c: Likewise.
2528 * utils.c: Likewise.
2529 * wincecompat.c: Likewise.
2530
87f6c4e3
GB
25312014-08-06 Gary Benson <gbenson@redhat.com>
2532
2533 * regcache.c (init_register_cache): Move conditionals inside if.
2534
7089dca4
GB
25352014-08-06 Gary Benson <gbenson@redhat.com>
2536
2537 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
2538
462f517e
GB
25392014-07-31 Gary Benson <gbenson@redhat.com>
2540
2541 * ax.h: Do not include server.h.
2542 * gdbthread.h: Likewise.
2543 * lynx-low.h: Likewise.
2544 * notif.h: Likewise.
2545
976411d6
GB
25462014-07-30 Gary Benson <gbenson@redhat.com>
2547
2548 * server.h: Include common-defs.h.
2549 Do not include config.h or build-gnulib-gdbserver/config.h.
2550
d41f6d8e
GB
25512014-07-30 Gary Benson <gbenson@redhat.com>
2552
2553 * hostio-errno.c: Move server.h to top of includes list.
2554 * inferiors.c: Likewise.
2555 * linux-x86-low.c: Likewise.
2556 * notif.c: Include server.h.
2557
314c6a35
TT
25582014-07-24 Tom Tromey <tromey@redhat.com>
2559 Gary Benson <gbenson@redhat.com>
2560
2561 * server.h (CORE_ADDR): Now unsigned.
2562
69ff6be5
PA
25632014-07-16 Pedro Alves <palves@redhat.com>
2564
2565 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
2566
ce9e3fe7
PA
25672014-07-15 Pedro Alves <palves@redhat.com>
2568
2569 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
2570 copy.
2571
e76126e8
PA
25722014-07-11 Pedro Alves <palves@redhat.com>
2573
2574 * linux-low.c (kill_wait_lwp): New function, based on
2575 kill_one_lwp_callback, but use my_waitpid directly.
2576 (kill_one_lwp_callback, linux_kill): Use it.
2577
8e9db26e
PA
25782014-06-23 Pedro Alves <palves@redhat.com>
2579
2580 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
2581 before setting DR0..DR3.
2582
698b3e08
GB
25832014-06-20 Gary Benson <gbenson@redhat.com>
2584
2585 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
2586 * configure: Regenerated.
2587 * config.in: Likewise.
2588
125f8a3d
GB
25892014-06-20 Gary Benson <gbenson@redhat.com>
2590
2591 * Makefile.in (SFILES): Update locations for files moved
2592 from common to nat.
2593 (object file files): Reordered.
2594
42995dbd
GB
25952014-06-20 Gary Benson <gbenson@redhat.com>
2596
2597 * i386-low.h (i386_dr_low_can_set_addr): Removed.
2598 (i386_dr_low_set_addr): Likewise.
2599 (i386_dr_low_get_addr): Likewise.
2600 (i386_dr_low_can_set_control): Likewise.
2601 (i386_dr_low_set_control): Likewise.
2602 (i386_dr_low_get_control): Likewise.
2603 (i386_dr_low_get_status): Likewise.
2604 (i386_get_debug_register_length): Likewise.
2605 * linux-x86-low.c (i386_dr_low_set_addr):
2606 Changed signature. Made static.
2607 (i386_dr_low_get_addr): Likewise.
2608 (i386_dr_low_set_control): Likewise.
2609 (i386_dr_low_get_control): Likewise.
2610 (i386_dr_low_get_status): Likewise.
2611 (i386_dr_low): New global variable.
2612 * win32-i386-low.c (i386_dr_low_set_addr):
2613 Changed signature. Made static.
2614 (i386_dr_low_get_addr): Likewise.
2615 (i386_dr_low_set_control): Likewise.
2616 (i386_dr_low_get_control): Likewise.
2617 (i386_dr_low_get_status): Likewise.
2618 (i386_dr_low): New global variable.
2619
e1d2394b
MS
26202014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
2621
2622 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
2623 * Makefile.in (AR, AR_FLAGS): Define.
2624 * configure: Regenerate.
2625
3a8ee006
GB
26262014-06-19 Gary Benson <gbenson@redhat.com>
2627
2628 * Makefile.in (i386-dregs.o): New rule.
2629 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
2630 * i386-low.c (target.h): Remove include.
2631 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
2632 (DR_CONTROL_SHIFT): Likewise.
2633 (DR_CONTROL_SIZE): Likewise.
2634 (DR_RW_EXECUTE): Likewise.
2635 (DR_RW_WRITE): Likewise.
2636 (DR_RW_READ): Likewise.
2637 (DR_RW_IORW): Likewise.
2638 (DR_LEN_1): Likewise.
2639 (DR_LEN_2): Likewise.
2640 (DR_LEN_4): Likewise.
2641 (DR_LEN_8): Likewise.
2642 (DR_LOCAL_ENABLE_SHIFT): Likewise.
2643 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
2644 (DR_ENABLE_SIZE): Likewise.
2645 (DR_LOCAL_SLOWDOWN): Likewise.
2646 (DR_GLOBAL_SLOWDOWN): Likewise.
2647 (DR_CONTROL_RESERVED): Likewise.
2648 (I386_DR_CONTROL_MASK): Likewise.
2649 (I386_DR_VACANT): Likewise.
2650 (I386_DR_LOCAL_ENABLE): Likewise.
2651 (I386_DR_GLOBAL_ENABLE): Likewise.
2652 (I386_DR_DISABLE): Likewise.
2653 (I386_DR_SET_RW_LEN): Likewise.
2654 (I386_DR_GET_RW_LEN): Likewise.
2655 (I386_DR_WATCH_HIT): Likewise.
2656 (i386_wp_op_t): Likewise.
2657 (i386_show_dr): Likewise.
2658 (i386_length_and_rw_bits): Likewise.
2659 (i386_insert_aligned_watchpoint): Likewise.
2660 (i386_remove_aligned_watchpoint): Likewise.
2661 (i386_handle_nonaligned_watchpoint): Likewise.
2662 i386_update_inferior_debug_regs(): Likewise.
2663 (i386_dr_insert_watchpoint): Likewise.
2664 (i386_dr_remove_watchpoint): Likewise.
2665 (i386_dr_region_ok_for_watchpoint): Likewise.
2666 (i386_dr_stopped_data_address): Likewise.
2667 (i386_dr_stopped_by_watchpoint): Likewise.
2668
8f26655c
GB
26692014-06-19 Gary Benson <gbenson@redhat.com>
2670
2671 * i386-low.c (i386_dr_show): Renamed to
2672 i386_show_dr and made static. All uses updated.
2673 (i386_dr_length_and_rw_bits): Renamed to
2674 i386_length_and_rw_bits and made static.
2675 All uses updated.
2676 (i386_dr_insert_aligned_watchpoint): Renamed to
2677 i386_insert_aligned_watchpoint and made static.
2678 All uses updated.
2679 (i386_dr_remove_aligned_watchpoint): Renamed to
2680 i386_remove_aligned_watchpoint and made static.
2681 All uses updated.
2682 (i386_dr_update_inferior_debug_regs): Renamed to
2683 i386_update_inferior_debug_regs and made static.
2684 All uses updated.
2685
b9228891
GB
26862014-06-18 Gary Benson <gbenson@redhat.com>
2687
5171def3
GB
2688 * i386-low.h (i386_dr_low_can_set_addr): New macro.
2689 (i386_dr_low_can_set_control): Likewise.
2690 (i386_get_debug_register_length): Likewise.
2691 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
2692 (i386_dr_low_can_set_control): Likewise.
2693 (i386_get_debug_register_length): Likewise.
2694
26952014-06-17 Gary Benson <gbenson@redhat.com>
2696
b9228891
GB
2697 * i386-low.h (i386-dregs.h): New include.
2698 (DR_FIRSTADDR): Now in i386-dregs.h.
2699 (DR_LASTADDR): Likewise.
2700 (DR_NADDR): Likewise.
2701 (DR_STATUS): Likewise.
2702 (DR_CONTROL): Likewise.
2703 (i386_debug_reg_state): Likewise.
2704 (i386_dr_insert_watchpoint): Likewise.
2705 (i386_dr_remove_watchpoint): Likewise.
2706 (i386_dr_region_ok_for_watchpoint): Likewise.
2707 (i386_dr_stopped_data_address): Likewise.
2708 (i386_dr_stopped_by_watchpoint): Likewise.
2709 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
2710
4be83cc2
GB
27112014-06-18 Gary Benson <gbenson@redhat.com>
2712
2713 * i386-low.h (i386_low_insert_watchpoint): Renamed to
2714 i386_dr_insert_watchpoint.
2715 (i386_low_remove_watchpoint): Renamed to
2716 i386_dr_remove_watchpoint.
2717 (i386_low_region_ok_for_watchpoint): Renamed to
2718 i386_dr_region_ok_for_watchpoint.
2719 (i386_low_stopped_data_address): Renamed to
2720 i386_dr_stopped_data_address.
2721 (i386_low_stopped_by_watchpoint): Renamed to
2722 i386_dr_stopped_by_watchpoint.
2723 * i386-low.c (i386_show_dr): Renamed to
2724 i386_dr_show and made nonstatic. All uses updated.
2725 (i386_length_and_rw_bits): Renamed to
2726 i386_dr_length_and_rw_bits and made nonstatic.
2727 All uses updated.
2728 (i386_insert_aligned_watchpoint): Renamed to
2729 i386_dr_insert_aligned_watchpoint and made nonstatic.
2730 All uses updated.
2731 (i386_remove_aligned_watchpoint): Renamed to
2732 i386_dr_remove_aligned_watchpoint and made nonstatic.
2733 All uses updated.
2734 (i386_update_inferior_debug_regs): Renamed to
2735 i386_dr_update_inferior_debug_regs and made nonstatic.
2736 All uses updated.
2737 (i386_low_insert_watchpoint): Renamed to
2738 i386_dr_insert_watchpoint. All uses updated.
2739 (i386_low_remove_watchpoint): Renamed to
2740 i386_dr_remove_watchpoint. All uses updated.
2741 (i386_low_region_ok_for_watchpoint): Renamed to
2742 i386_dr_region_ok_for_watchpoint. All uses updated.
2743 (i386_low_stopped_data_address): Renamed to
2744 i386_dr_stopped_data_address. All uses updated.
2745 (i386_low_stopped_by_watchpoint): Renamed to
2746 i386_dr_stopped_by_watchpoint. All uses updated.
2747
131aa0d4
GB
27482014-06-18 Gary Benson <gbenson@redhat.com>
2749
2750 * i386-low.c (i386_dr_low_can_set_addr): New macro.
2751 (i386_dr_low_can_set_control): Likewise.
2752 (i386_insert_aligned_watchpoint): New check.
2753
d9305f7f
GB
27542014-06-18 Gary Benson <gbenson@redhat.com>
2755
2756 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
2757 Renamed to state.
2758
e927c9fc
GB
27592014-06-18 Gary Benson <gbenson@redhat.com>
2760
2761 * i386-low.c (i386_length_and_rw_bits): Use internal_error
2762 instead of fatal and error.
2763 (i386_handle_nonaligned_watchpoint): Likewise.
2764
1b6d4134
GB
27652014-06-18 Gary Benson <gbenson@redhat.com>
2766
2767 * i386-low.c (i386_get_debug_register_length): New macro.
2768 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
2769 (i386_show_dr): Use debug_printf instead of fprintf. Use
2770 phex to format values.
2771
6e62758f
GB
27722014-06-18 Gary Benson <gbenson@redhat.com>
2773
2774 * i386-low.h: Comment changes.
2775 * i386-low.c: Likewise.
2776
fc6e2f03
GB
27772014-06-18 Gary Benson <gbenson@redhat.com>
2778
2779 * i386-low.c: Whitespace changes.
2780
f9d1eeed
TT
27812014-06-12 Tom Tromey <tromey@redhat.com>
2782
2783 * utils.c (freeargv): Remove.
2784
0b04e523
TT
27852014-06-12 Tom Tromey <tromey@redhat.com>
2786
2787 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
2788 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
2789 (parse_debug_format_options): Likewise.
2790 (gdbserver_usage): Likewise.
2791 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
2792 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
2793 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
2794 against libiberty.
2795 ($(LIBGNU)): Depend on libiberty.
2796 (all-lib): Recurse into all subdirs.
2797 (install-only): Invoke "install" target in subdirs.
2798 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
2799 targets.
2800 * configure: Rebuild.
2801 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
2802 for vasprintf, vsnprintf, or gettimeofday.
2803 * configure.srv: Don't add safe-ctype.o or lbasename.o to
2804 srv_tgtobj.
2805
270c9937
JB
28062014-06-05 Joel Brobecker <brobecker@adacore.com>
2807
2808 * development.sh: Delete.
2809 * Makefile.in (config.status): Adjust dependency on development.sh.
2810 * configure.ac: Adjust development.sh source call.
2811 * configure: Regenerate.
2812
0a261ed8
PA
28132014-06-02 Pedro Alves <palves@redhat.com>
2814
2815 * ax.c (gdb_free_agent_expr): New function.
2816 * ax.h (gdb_free_agent_expr): New declaration.
2817 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
2818 list.
2819 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
2820 static.
2821 (clear_breakpoint_conditions_and_commands): New function.
2822 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
2823 (clear_breakpoint_conditions_and_commands): New declaration.
2824
e9dae05e
RR
28252014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
2826
2827 * linux-aarch64-low.c (asm/ptrace.h): Include.
2828
5876f503
JK
28292014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
2830
2831 Fix TLS access for -static -pthread.
2832 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
2833 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
2834 (thread_db_load_search, try_thread_db_load_1): Initialize it.
2835
802e8e6d
PA
28362014-05-20 Pedro Alves <palves@redhat.com>
2837
2838 * linux-aarch64-low.c (aarch64_insert_point)
2839 (aarch64_remove_point): No longer check whether the type is
2840 supported here. Adjust to new interface.
2841 (the_low_target): Install aarch64_supports_z_point_type as
2842 supports_z_point_type method.
2843 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
2844 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
2845 instead of a Z packet char. Adjust.
2846 (arm_supports_z_point_type): New function.
2847 (arm_insert_point, arm_remove_point): Adjust to new interface.
2848 (the_low_target): Install arm_supports_z_point_type.
2849 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
2850 (cris_insert_point, cris_remove_point): Adjust to new interface.
2851 Don't check whether the type is supported here.
2852 (the_low_target): Install cris_supports_z_point_type.
2853 * linux-low.c (linux_supports_z_point_type): New function.
2854 (linux_insert_point, linux_remove_point): Adjust to new interface.
2855 * linux-low.h (struct linux_target_ops) <insert_point,
2856 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
2857 raw_breakpoint pointer parameter.
2858 <supports_z_point_type>: New method.
2859 * linux-mips-low.c (mips_supports_z_point_type): New function.
2860 (mips_insert_point, mips_remove_point): Adjust to new interface.
2861 Use mips_supports_z_point_type.
2862 (the_low_target): Install mips_supports_z_point_type.
2863 * linux-ppc-low.c (the_low_target): Install NULL as
2864 supports_z_point_type method.
2865 * linux-s390-low.c (the_low_target): Install NULL as
2866 supports_z_point_type method.
2867 * linux-sparc-low.c (the_low_target): Install NULL as
2868 supports_z_point_type method.
2869 * linux-x86-low.c (x86_supports_z_point_type): New function.
2870 (x86_insert_point): Adjust to new insert_point interface. Use
2871 insert_memory_breakpoint. Adjust to new
2872 i386_low_insert_watchpoint interface.
2873 (x86_remove_point): Adjust to remove_point interface. Use
2874 remove_memory_breakpoint. Adjust to new
2875 i386_low_remove_watchpoint interface.
2876 (the_low_target): Install x86_supports_z_point_type.
2877 * lynx-low.c (lynx_target_ops): Install NULL as
2878 supports_z_point_type callback.
2879 * nto-low.c (nto_supports_z_point_type): New.
2880 (nto_insert_point, nto_remove_point): Adjust to new interface.
2881 (nto_target_ops): Install nto_supports_z_point_type.
2882 * mem-break.c: Adjust intro comment.
2883 (struct raw_breakpoint) <raw_type, size>: New fields.
2884 <inserted>: Update comment.
2885 <shlib_disabled>: Delete field.
2886 (enum bkpt_type) <gdb_breakpoint>: Delete value.
2887 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
2888 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
2889 (raw_bkpt_type_to_target_hw_bp_type): New function.
2890 (find_enabled_raw_code_breakpoint_at): New function.
2891 (find_raw_breakpoint_at): New type and size parameters. Use them.
2892 (insert_memory_breakpoint): New function, based off
2893 set_raw_breakpoint_at.
2894 (remove_memory_breakpoint): New function.
2895 (set_raw_breakpoint_at): Reimplement.
2896 (set_breakpoint): New, based on set_breakpoint_at.
2897 (set_breakpoint_at): Reimplement.
2898 (delete_raw_breakpoint): Go through the_target->remove_point
2899 instead of assuming memory breakpoints.
2900 (find_gdb_breakpoint_at): Delete.
2901 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
2902 (find_gdb_breakpoint): New function.
2903 (set_gdb_breakpoint_at): Delete.
2904 (z_type_supported): New function.
2905 (set_gdb_breakpoint_1): New function, loosely based off
2906 set_gdb_breakpoint_at.
2907 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
2908 (delete_gdb_breakpoint_at): Delete.
2909 (delete_gdb_breakpoint_1): New function, loosely based off
2910 delete_gdb_breakpoint_at.
2911 (delete_gdb_breakpoint): New function.
2912 (clear_gdb_breakpoint_conditions): Rename to ...
2913 (clear_breakpoint_conditions): ... this. Don't handle a NULL
2914 breakpoint.
2915 (add_condition_to_breakpoint): Make static.
2916 (add_breakpoint_condition): Take a struct breakpoint pointer
2917 instead of an address. Adjust.
2918 (gdb_condition_true_at_breakpoint): Rename to ...
2919 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
2920 z_type parameter.
2921 (gdb_condition_true_at_breakpoint): Reimplement.
2922 (add_breakpoint_commands): Take a struct breakpoint pointer
2923 instead of an address. Adjust.
2924 (gdb_no_commands_at_breakpoint): Rename to ...
2925 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
2926 parameter. Return true if no breakpoint was found. Change debug
2927 output.
2928 (gdb_no_commands_at_breakpoint): Reimplement.
2929 (run_breakpoint_commands): Rename to ...
2930 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
2931 and change return type to boolean.
2932 (run_breakpoint_commands): New function.
2933 (gdb_breakpoint_here): Also check for Z1 breakpoints.
2934 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
2935 breakpoint. Go through the_target->remove_point instead of
2936 assuming memory breakpoint.
2937 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
2938 software and hardware breakpoints.
2939 (reinsert_raw_breakpoint): Go through the_target->insert_point
2940 instead of assuming memory breakpoint.
2941 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
2942 software and hardware breakpoints.
2943 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
2944 Check both software and hardware breakpoints.
2945 (validate_inserted_breakpoint): Assert the breakpoint is a
2946 software breakpoint. Set the inserted flag to -1 instead of
2947 setting shlib_disabled.
2948 (delete_disabled_breakpoints): Adjust.
2949 (validate_breakpoints): Only validate software breakpoints.
2950 Adjust to inserted flag change.
2951 (check_mem_read, check_mem_write): Skip breakpoint types other
2952 than software breakpoints. Adjust to inserted flag change.
2953 * mem-break.h (enum raw_bkpt_type): New enum.
2954 (raw_breakpoint, struct process_info): Forward declare.
2955 (Z_packet_to_target_hw_bp_type): Delete declaration.
2956 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
2957 (set_gdb_breakpoint, delete_gdb_breakpoint)
2958 (clear_breakpoint_conditions): New declarations.
2959 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
2960 (breakpoint_inserted_here): Update comment.
2961 (add_breakpoint_condition, add_breakpoint_commands): Replace
2962 address parameter with a breakpoint pointer parameter.
2963 (gdb_breakpoint_here): Update comment.
2964 (delete_gdb_breakpoint_at): Delete.
2965 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
2966 * server.c (process_point_options): Take a struct breakpoint
2967 pointer instead of an address. Adjust.
2968 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
2969 delete_gdb_breakpoint.
2970 * spu-low.c (spu_target_ops): Install NULL as
2971 supports_z_point_type method.
2972 * target.h: Include mem-break.h.
2973 (struct target_ops) <prepare_to_access_memory>: Update comment.
2974 <supports_z_point_type>: New field.
2975 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
2976 instead of a char. Also take a raw breakpoint pointer.
2977 * win32-arm-low.c (the_low_target): Install NULL as
2978 supports_z_point_type.
2979 * win32-i386-low.c (i386_supports_z_point_type): New function.
2980 (i386_insert_point, i386_remove_point): Adjust to new interface.
2981 (the_low_target): Install i386_supports_z_point_type.
2982 * win32-low.c (win32_supports_z_point_type): New function.
2983 (win32_insert_point, win32_remove_point): Adjust to new interface.
2984 (win32_target_ops): Install win32_supports_z_point_type.
2985 * win32-low.h (struct win32_target_ops):
2986 <supports_z_point_type>: New method.
2987 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
2988 instead of a char. Also take a raw breakpoint pointer.
2989
932539e3
PA
29902014-05-20 Pedro Alves <palves@redhat.com>
2991
2992 * mem-break.h: Include break-common.h.
2993 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
2994 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
2995 (Z_packet_to_target_hw_bp_type): New declaration.
2996 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
2997 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
2998 (Z_PACKET_ACCESS_WP): Delete macros.
2999 (Z_packet_to_hw_type): Delete function.
3000 * i386-low.h: Don't include break-common.h here.
3001 (Z_packet_to_hw_type): Delete declaration.
3002 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
3003 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
3004 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
3005 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
3006 * linux-aarch64-low.c: Don't include break-common.h here.
3007 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
3008 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
3009 (Z_packet_to_target_hw_bp_type): Delete function.
3010 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
3011 function.
3012 (mips_insert_point, mips_remove_point): Use
3013 Z_packet_to_target_hw_bp_type.
3014
4ff0d3d8
PA
30152014-05-20 Pedro Alves <palves@redhat.com>
3016
3017 * linux-aarch64-low.c: Include break-common.h.
3018 (enum target_point_type): Delete.
3019 (Z_packet_to_point_type): Rename to ...
3020 (Z_packet_to_target_hw_bp_type): ... this, and return a
3021 target_hw_bp_type instead.
3022 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
3023 instead of an enum target_point_type.
3024 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
3025 breakpoint type.
3026 (aarch64_dr_state_insert_one_point)
3027 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
3028 (aarch64_handle_aligned_watchpoint)
3029 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
3030 Take an enum target_hw_bp_type instead of an enum
3031 target_point_type.
3032 (aarch64_supports_z_point_type): New function.
3033 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
3034 use Z_packet_to_target_hw_bp_type.
3035
786dc519
JB
30362014-05-20 Joel Brobecker <brobecker@adacore.com>
3037
3038 * configure.ac: Only use -Werror by default when DEVELOPMENT
3039 is true.
3040 * configure: Regenerate.
3041
9e0aa64f
JK
30422014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
3043
3044 Fix gdbserver qGetTLSAddr for x86_64 -m32.
3045 * linux-x86-low.c (X86_64_USER_REGS): New.
3046 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
3047
2b577b92
YQ
30482014-04-28 Yao Qi <yao@codesourcery.com>
3049
3050 * Makefile.in (i386-avx512.c): Fix the typo of generated file
3051 name.
3052
94611da2
PA
30532014-04-25 Pedro Alves <palves@redhat.com>
3054
3055 PR server/16255
3056 * linux-low.c (linux_attach_fail_reason_string): New function.
3057 (linux_attach_lwp): Delete.
3058 (linux_attach_lwp_1): Rename to ...
3059 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
3060 argument. Remove "initial" parameter. Return int instead of
3061 void. Don't error or warn here.
3062 (linux_attach): Adjust to call linux_attach_lwp. Call error on
3063 failure to attach to the tgid. Call warning when failing to
3064 attach to an lwp.
3065 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
3066 argument. Remove "initial" parameter. Return int instead of
3067 void. Don't error or warn here.
3068 (linux_attach_fail_reason_string): New declaration.
3069 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
3070 interface change. Use linux_attach_fail_reason_string.
3071
01f9f808
MS
30722014-04-24 Michael Sturm <michael.sturm@mintel.com>
3073 Walfred Tedeschi <walfred.tedeschi@intel.com>
3074
3075 * Makefile.in: Added rules to handle new files
3076 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
3077 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
3078 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
3079 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
3080 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
3081 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
3082 x32-avx512-linux.o.
3083 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
3084 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
3085 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
3086 i386/x32-avx512.xml.
3087 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
3088 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
3089 i386/x32-avx512-linux.xml.
3090 * i387-fp.c (num_avx512_k_registers): New constant for number
3091 of K registers.
3092 (num_avx512_zmmh_low_registers): New constant for number of
3093 lower ZMM registers (0-15).
3094 (num_avx512_zmmh_high_registers): New constant for number of
3095 higher ZMM registers (16-31).
3096 (num_avx512_ymmh_registers): New contant for number of higher
3097 YMM registers (ymm16-31 added by avx521 on x86_64).
3098 (num_avx512_xmm_registers): New constant for number of higher
3099 XMM registers (xmm16-31 added by AVX512 on x86_64).
3100 (struct i387_xsave): Add space for AVX512 registers.
3101 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
3102 Add code to handle AVX512 registers.
3103 (i387_xsave_to_cache): Add code to handle AVX512 registers.
3104 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
3105 prototypei from generated file.
3106 (tdesc_amd64_avx512_linux): Likewise.
3107 (init_registers_x32_avx512_linux): Likewise.
3108 (tdesc_x32_avx512_linux): Likewise.
3109 (init_registers_i386_avx512_linux): Likewise.
3110 (tdesc_i386_avx512_linux): Likewise.
3111 (x86_64_regmap): Add AVX512 registers.
3112 (x86_linux_read_description): Add code to handle AVX512 XSTATE
3113 mask.
3114 (initialize_low_arch): Add code to initialize AVX512 registers.
3115
51aa91f9
PA
31162014-04-23 Pedro Alves <palves@redhat.com>
3117
3118 * mem-break.c (find_gdb_breakpoint_at): Make static.
3119 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
3120
a4165e94
PA
31212014-04-23 Pedro Alves <palves@redhat.com>
3122
3123 * i386-low.c: Don't include break-common.h here.
3124 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
3125 prototype to take target_hw_bp_type as argument instead of a Z
3126 packet char.
3127 * i386-low.h: Include break-common.h here.
3128 (Z_packet_to_hw_type): Declare.
3129 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
3130 prototypes.
3131 * linux-x86-low.c (x86_insert_point): Convert the packet number to
3132 a target_hw_bp_type before calling i386_low_insert_watchpoint.
3133 (x86_remove_point): Convert the packet number to a
3134 target_hw_bp_type before calling i386_low_remove_watchpoint.
3135 * win32-i386-low.c (i386_insert_point): Convert the packet number
3136 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
3137 (i386_remove_point): Convert the packet number to a
3138 target_hw_bp_type before calling i386_low_remove_watchpoint.
3139
b8acf843
PA
31402014-04-23 Pedro Alves <palves@redhat.com>
3141
3142 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
3143
d708bcd1
PA
31442014-04-10 Pedro Alves <palves@redhat.com>
3145
3146 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
3147 Check if the condition or command is NULL before checking if the
3148 breakpoint is known. On success, return true.
3149 * mem-break.h (add_breakpoint_condition): Document return.
3150 (add_breakpoint_commands): Add describing comment.
3151 * server.c (skip_to_semicolon): New function.
3152 (process_point_options): Use it.
3153
2eec7d5b
PA
31542014-04-09 Pedro Alves <palves@redhat.com>
3155
3156 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
3157 to lwpid_of.
3158
fa96cb38
PA
31592014-02-27 Pedro Alves <palves@redhat.com>
3160
3161 PR 12702
3162 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
3163 macros.
3164 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
3165 output.
3166 (last_thread_of_process_p): Take a PID argument instead of a
3167 thread pointer.
3168 (linux_wait_for_lwp): Delete.
3169 (num_lwps, check_zombie_leaders, not_stopped_callback): New
3170 functions.
3171 (linux_low_filter_event): New function, party factored out from
3172 linux_wait_for_event.
3173 (linux_wait_for_event): Rename to ...
3174 (linux_wait_for_event_filtered): ... this. Add new filter ptid
3175 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
3176 sigsuspend. Check for zombie leaders.
3177 (linux_wait_for_event): Reimplement as wrapper around
3178 linux_wait_for_event_filtered.
3179 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
3180 a normal or signal exit is seen, it's the whole process exiting.
3181 (wait_for_sigstop): No longer a for_each_inferior callback.
3182 Rewrite on top of linux_wait_for_event_filtered.
3183 (stop_all_lwps): Call wait_for_sigstop directly.
3184 * server.c (resume, handle_target_event): Handle
3185 TARGET_WAITKIND_NO_RESUMED.
3186
d763de10
JB
31872014-02-26 Joel Brobecker <brobecker@adacore.com>
3188
3189 * win32-low.c (psapi_get_dll_name,
3190 * win32_CreateToolhelp32Snapshot): Delete.
3191 (win32_CreateToolhelp32Snapshot, win32_Module32First)
3192 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
3193 Delete.
3194 (handle_load_dll): Add function description.
3195 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
3196
850a0f76
JB
31972014-02-26 Joel Brobecker <brobecker@adacore.com>
3198
3199 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
3200 Add comment.
3201 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
3202 base address when calling win32_add_one_solib.
3203 (handle_load_dll): Delete local variable load_addr.
3204 Remove 0x1000 offset applied to DLL base address when calling
3205 win32_add_one_solib.
3206 (handle_unload_dll): Add comment.
3207
f25b3fc3
JB
32082014-02-26 Joel Brobecker <brobecker@adacore.com>
3209
3210 * win32-low.c (win32_add_all_dlls): Renames
3211 win32_ensure_ntdll_loaded. Rewrite function documentation.
3212 Adjust implementation to always load all DLLs.
3213 Add 0x1000 offset to DLL base address when calling
3214 win32_add_one_solib.
3215 (child_initialization_done): New static global.
3216 (do_initial_child_stuff): Set child_initialization_done to
3217 zero during child initialization, and 1 after. Replace call
3218 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
3219 Add comment.
3220 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
3221 (handle_unload_dll): Add function documentation.
3222 (get_child_debug_event): Ignore load and unload DLL events
3223 during child initialization.
3224
d86d4aaf
DE
32252014-02-20 Doug Evans <dje@google.com>
3226
3bc32da3 3227 Remove global all_lwps.
d86d4aaf
DE
3228 * inferiors.h (ptid_of): Move here from linux-low.h.
3229 (pid_of, lwpid_of): Ditto.
3230 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
3231 parameter is a struct thread_info * now.
3232 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
3233 directly. Pass &all_threads to find_inferior instead of &all_lwps.
3234 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
3235 directly.
3236 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
3237 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
3238 * linux-arm-low.c (update_registers_callback): Update, "entry"
3239 parameter is a struct thread_info * now.
3240 Fetch lwpid from current_inferior directly.
3241 (arm_insert_point): Pass &all_threads to find_inferior instead of
3242 &all_lwps.
3243 (arm_remove_point): Ditto.
3244 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
3245 (arm_prepare_to_resume): Fetch pid from thread.
3246 (arm_read_description): Fetch lwpid from current_inferior directly.
3247 * linux-low.c (all_lwps): Delete.
3248 (delete_lwp): Delete call to remove_inferior.
3249 (handle_extended_wait): Fetch lwpid from thread.
3250 (add_lwp): Don't set lwp->entry.id. Remove call to
3251 add_inferior_to_list.
3252 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
3253 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
3254 (kill_one_lwp_callback): Ditto.
3255 (linux_kill): Don't dereference NULL pointer.
3256 Fetch ptid,lwpid from thread.
3257 (get_detach_signal): Fetch ptid from thread.
3258 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
3259 Simplify call to regcache_invalidate_thread.
3260 (delete_lwp_callback): Update, "entry" parameter is a
3261 struct thread_info * now. Fetch pid from thread.
3262 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
3263 (status_pending_p_callback): Update, "entry" parameter is a
3264 struct thread_info * now. Fetch ptid from thread.
3265 (find_lwp_pid): Update, "entry" parameter is a
3266 struct thread_info * now.
3267 (linux_wait_for_lwp): Fetch pid from thread.
3268 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
3269 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
3270 (enqueue_one_deferred_signal): Fetch lwpid from thread.
3271 (dequeue_one_deferred_signal): Ditto.
3272 (cancel_breakpoint): Fetch ptid from current_inferior.
3273 (linux_wait_for_event): Pass &all_threads to find_inferior,
3274 not &all_lwps. Fetch ptid, lwpid from thread.
3275 (count_events_callback): Update, "entry" parameter is a
3276 struct thread_info * now.
3277 (select_singlestep_lwp_callback): Ditto.
3278 (select_event_lwp_callback): Ditto.
3279 (cancel_breakpoints_callback): Ditto.
3280 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
3281 not &all_lwps.
3282 (select_event_lwp): Ditto. Fetch ptid from event_thread.
3283 (unsuspend_one_lwp): Update, "entry" parameter is a
3284 struct thread_info * now.
3285 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
3286 not &all_lwps.
3287 (linux_stabilize_threads): Ditto. And for for_each_inferior.
3288 Fetch lwpid from thread, not lwp.
3289 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
3290 Pass &all_threads to find_inferior, not &all_lwps.
3291 (send_sigstop): Fetch lwpid from thread, not lwp.
3292 (send_sigstop_callback): Update, "entry" parameter is a
3293 struct thread_info * now.
3294 (suspend_and_send_sigstop_callback): Ditto.
3295 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
3296 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
3297 struct thread_info * now.
3298 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
3299 from thread, lwp.
3300 (lwp_running): Update, "entry" parameter is a
3301 struct thread_info * now.
3302 (stop_all_lwps): Fetch ptid from thread.
3303 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
3304 (linux_resume_one_lwp): Fetch lwpid from thread.
3305 (linux_set_resume_request): Update, "entry" parameter is a
3306 struct thread_info * now. Fetch pid, lwpid from thread.
3307 (resume_status_pending_p): Update, "entry" parameter is a
3308 struct thread_info * now.
3309 (need_step_over_p): Ditto. Fetch lwpid from thread.
3310 (start_step_over): Fetch lwpid from thread.
3311 (linux_resume_one_thread): Update, "entry" parameter is a
3312 struct thread_info * now. Fetch lwpid from thread.
3313 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
3314 (proceed_one_lwp): Update, "entry" parameter is a
3315 struct thread_info * now. Fetch lwpid from thread.
3316 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
3317 struct thread_info * now.
3318 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
3319 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
3320 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
3321 directly.
3322 (regsets_store_inferior_registers): Ditto.
3323 (fetch_register, store_register): Ditto.
3324 (linux_read_memory, linux_write_memory): Ditto.
3325 (linux_request_interrupt): Ditto.
3326 (linux_read_auxv): Ditto.
3327 (linux_xfer_siginfo): Ditto.
3328 (linux_qxfer_spu): Ditto.
3329 (linux_qxfer_libraries_svr4): Ditto.
3330 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
3331 moved to inferiors.h.
3332 (get_lwp): Delete.
3333 (get_thread_lwp): Update.
3334 (struct lwp_info): Delete member "entry". Simplify comment for
3335 member "thread".
3336 (all_lwps): Delete.
3337 * linux-mips-low.c (mips_read_description): Fetch lwpid from
3338 current_inferior directly.
3339 (update_watch_registers_callback): Update, "entry" parameter is a
3340 struct thread_info * now. Fetch pid from thread.
3341 (mips_linux_prepare_to_resume): Fetch ptid from thread.
3342 (mips_insert_point): Fetch lwpid from current_inferior.
3343 Pass &all_threads to find_inferior, not &all_lwps.
3344 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
3345 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
3346 directly.
3347 (mips_stopped_data_address): Ditto.
3348 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
3349 directly.
3350 * linux-tile-low.c (tile_arch_setup): Ditto.
3351 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
3352 (update_debug_registers_callback): Update, "entry" parameter is a
3353 struct thread_info * now. Fetch pid from thread.
3354 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
3355 Pass &all_threads to find_inferior, not &all_lwps.
3356 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
3357 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
3358 Pass &all_threads to find_inferior, not &all_lwps.
3359 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
3360 (i386_dr_low_get_status): Ditto.
3361 (x86_linux_prepare_to_resume): Fetch ptid from thread.
3362 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
3363 (x86_linux_read_description): Ditto.
3364 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
3365
3b8361aa
DE
33662014-02-20 Doug Evans <dje@google.com>
3367
3368 * inferiors.c (get_first_inferior): Fix buglet.
3369
f7667f0d
DE
33702014-02-19 Doug Evans <dje@google.com>
3371
3372 * gdbthread.h (add_thread): Change result type to struct thread_info *.
3373 * inferiors.c (add_thread): Change result type to struct thread_info *.
3374 All callers updated.
3375 (add_lwp): Call add_thread here instead of in callers.
3376 All callers updated.
3377 * linux-low.h (get_lwp_thread): Rewrite.
3378 (struct lwp_info): New member "thread".
3379
b3312d80
DE
33802014-02-19 Doug Evans <dje@google.com>
3381
3382 * linux-low.c (add_lwp): Change result to struct lwp_info *.
3383 All callers updated.
3384
ecc6f45c
DE
33852014-02-19 Doug Evans <dje@google.com>
3386
3387 * inferiors.c (add_thread): Fix whitespace.
3388
649ebbca
DE
33892014-02-19 Doug Evans <dje@google.com>
3390
3391 * dll.c (clear_dlls): Replace accessing list implemention details
3392 with API function.
3393 * gdbthread.h (get_first_thread): Declare.
3394 * inferiors.c (for_each_inferior_with_data): New function.
3395 (get_first_thread): New function.
3396 (find_thread_ptid): Simplify.
3397 (get_first_inferior): New function.
3398 (clear_list): Delete.
3399 (one_inferior_p): New function.
3400 (clear_inferior_list): New function.
3401 (clear_inferiors): Update.
3402 * inferiors.h (for_each_inferior_with_data): Declare.
3403 (clear_inferior_list): Declare.
3404 (one_inferior_p): Declare.
3405 (get_first_inferior): Declare.
3406 * linux-low.c (linux_wait_for_event): Replace accessing list
3407 implemention details with API function.
3408 * server.c (target_running): Ditto.
3409 (accumulate_file_name_length): New function.
3410 (emit_dll_description): New function.
3411 (handle_qxfer_libraries): Replace accessing list implemention
3412 details with API function.
3413 (handle_qxfer_threads_worker): New function.
3414 (handle_qxfer_threads_proper): Replace accessing list implemention
3415 details with API function.
3416 (handle_query): Ditto.
3417 (visit_actioned_threads_callback_ftype): New typedef.
3418 (visit_actioned_threads_data): New struct.
3419 (visit_actioned_threads): Rewrite to be find_inferior callback.
3420 (resume): Call find_inferior.
3421 (handle_status): Replace accessing list implemention
3422 details with API function.
3423 (process_serial_event): Replace accessing list implemention details
3424 with API function.
3425 * target.c (set_desired_inferior): Replace accessing list implemention
3426 details with API function.
3427 * tracepoint.c (same_process_p): New function.
3428 (gdb_agent_about_to_close): Replace accessing list implemention
3429 details with API function.
3430 * win32-low.c (child_delete_thread): Replace accessing list
3431 implemention details with API function.
3432 (match_dll_by_basename): New function.
3433 (dll_is_loaded_by_basename): New function.
3434 (win32_ensure_ntdll_loaded): Replace accessing list implemention
3435 details call to dll_is_loaded_by_basename.
3436
80894984
DE
34372014-02-19 Doug Evans <dje@google.com>
3438
3439 * dll.h (struct dll_info): Add comment.
3440 * gdbthread.h (struct thread_info): Add comment.
3441 (current_ptid): Simplify.
3442 * inferiors.c (add_process): Update.
3443 (remove_process): Update.
3444 * inferiors.h (struct process_info): Rename member "head" to "entry".
3445 * linux-low.c (delete_lwp): Update.
3446 (add_lwp): Update.
3447 (last_thread_of_process_p): Update.
3448 (kill_one_lwp_callback, linux_kill): Update.
3449 (status_pending_p_callback): Update.
3450 (wait_for_sigstop): Update. Simplify read of ptid.
3451 (start_step_over): Update.
3452 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
3453 (get_lwp_thread): Update.
3454 (struct lwp_info): Rename member "head" to "entry".
3455 * regcache.h (inferior_list_entry): Delete.
3456 * server.c (kill_inferior_callback): Update.
3457 (detach_or_kill_inferior_callback): Update.
3458 (print_started_pid): Update.
3459 (print_attached_pid): Update.
3460 (process_serial_event): Simplify read of ptid.
3461 * thread-db.c (thread_db_create_event): Update.
3462 (thread_db_get_tls_address): Update.
3463 * win32-low.c (current_inferior_ptid): Simplify.
3464
46917d26
TT
34652014-02-19 Tom Tromey <tromey@redhat.com>
3466
3467 * target.h (struct target_ops) <supports_btrace>: Add target_ops
3468 argument.
3469 (target_supports_btrace): Update.
3470
0759a81e
YQ
34712014-02-14 Yao Qi <yao@codesourcery.com>
3472
3473 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
3474 (rsp-low-ipa.o): New target.
3475
a7191e8b
TT
34762014-02-12 Tom Tromey <tromey@redhat.com>
3477
3478 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
3479 convert_ascii_to_int.
3480 * regcache.c (registers_to_string): Likewise.
3481 * remote-utils.c (decode_M_packet): Likewise.
3482 * server.c (process_serial_event): Likewise.
3483
ff0e980e
TT
34842014-02-12 Tom Tromey <tromey@redhat.com>
3485
3486 * server.c (handle_query, handle_v_run): Use hex2bin, not
3487 unhexify.
3488 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
3489
e9371aff
TT
34902014-02-12 Tom Tromey <tromey@redhat.com>
3491
3492 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
3493 convert_int_to_ascii.
3494 * regcache.c (registers_to_string, collect_register_as_string):
3495 Likewise.
3496 * remote-utils.c (look_up_one_symbol, relocate_instruction):
3497 Likewise.
3498 * server.c (process_serial_event): Likewise.
3499 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
3500 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
3501
971dc0b8
TT
35022014-02-12 Tom Tromey <tromey@redhat.com>
3503
3504 * remote-utils.c (look_up_one_symbol, monitor_output): Use
3505 bin2hex, not hexify.
3506 * tracepoint.c (cmd_qtstatus): Likewise.
3507
0a822afb
TT
35082014-02-12 Tom Tromey <tromey@redhat.com>
3509
3510 * remote-utils.c (monitor_output): Pass explicit length to
3511 hexify.
3512
9c3d6531
TT
35132014-02-12 Tom Tromey <tromey@redhat.com>
3514
3515 * tracepoint.c: Include rsp-low.h.
3516 * server.c: Include rsp-low.h.
3517 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
3518 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
3519 declare.
3520 * remote-utils.c: Include rsp-low.h.
3521 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
3522 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
3523 (convert_int_to_ascii, convert_ascii_to_int): Move to
3524 common/rsp-low.c.
3525 * regcache.c: Include rsp-low.h.
3526 * ax.c: Include rsp-low.h.
3527 * Makefile.in (SFILES): Add common/rsp-low.c.
3528 (OBS): Add rsp-low.o.
3529 (rsp-low.o): New target.
3530
01fd3ea5
TT
35312014-02-12 Tom Tromey <tromey@redhat.com>
3532
3533 * utils.h (pulongest, plongest, phex_nz): Don't declare.
3534 Include print-utils.h.
3535 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
3536 (plongest, thirty_two, phex_nz): Remove.
3537 * Makefile.in (SFILES): Add common/print-utils.c.
3538 (OBS): Add print-utils.o.
3539 (print-utils-ipa.o): New target.
3540 (print-utils.o): New target.
3541 (IPA_OBJS): Add print-utils-ipa.o.
3542
e99dc820
TT
35432014-02-06 Tom Tromey <tromey@redhat.com>
3544
3545 * Makefile.in (SFILES): Fix indentation.
3546
ee1e2d4f
DE
35472014-02-05 Doug Evans <dje@google.com>
3548
3549 * linux-low.c (linux_wait_for_event): Improve comment.
3550 (linux_wait_1): Keep current_inferior in sync with event_child.
3551
f5a02773
DE
35522014-01-22 Doug Evans <dje@google.com>
3553
3554 * gdbthread.h (gdb_id_to_thread): Delete, unused.
3555
87ce2a04
DE
35562014-01-22 Doug Evans <dje@google.com>
3557
3558 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
3559 * configure: Regenerate.
3560 * config.in: Regenerate.
3561 * Makefile.in (SFILES): Add debug.c.
3562 (OBS): Add debug.o.
3563 * debug.c: New file.
3564 * debug.h: New file.
3565 * linux-aarch64-low.c (*): Update all debugging printfs to use
3566 debug_printf instead of fprintf.
3567 * linux-arm-low.c (*): Ditto.
3568 * linux-cris-low.c (*): Ditto.
3569 * linux-crisv32-low.c (*): Ditto.
3570 * linux-m32r-low.c (*): Ditto.
3571 * linux-sparc-low.c (*): Ditto.
3572 * linux-x86.c (*): Ditto.
3573 * linux-low.c (*): Ditto.
3574 (linux_wait_1): Add calls to debug_enter, debug_exit.
3575 (linux_wait): Remove redundant debugging printf.
3576 (stop_all_lwps): Add calls to debug_enter, debug_exit.
3577 (linux_resume, unstop_all_lwps): Ditto.
3578 * mem-break.c (*): Update all debugging printfs to use
3579 debug_printf instead of fprintf.
3580 * remote-utils.c (*): Ditto.
3581 * thread-db.c (*): Ditto.
3582 * server.c #include <ctype.h>, "gdb_vecs.h".
3583 (debug_threads): Moved to debug.c.
3584 (*): Update all debugging printfs to use debug_printf instead of
3585 fprintf.
3586 (start_inferior): Replace call to fflush with call to debug_flush.
3587 (monitor_show_help): Mention set debug-format.
3588 (parse_debug_format_options): New function.
3589 (handle_monitor_command): Handle "monitor set debug-format".
3590 (gdbserver_usage): Mention --debug-format.
3591 (main): Parse --debug-format.
3592 * server.h (debug_threads): Declaration moved to debug.h.
3593 #include "debug.h".
3594 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
3595 trace_debug_1 that uses debug_printf.
3596 (tracepoint_look_up_symbols): Update all debugging printfs to use
3597 debug_printf instead of fprintf.
3598
e671835b
BS
35992014-01-20 Baruch Siach <baruch@tkos.co.il>
3600
3601 * linux-xtensa-low.c: Include asm/ptrace.h instead of
3602 sys/ptrace.h.
3603
b5737fa9
PA
36042014-01-17 Pedro Alves <palves@redhat.com>
3605
ea38d2a9 3606 PR build/16445
c7faa97a
PA
3607 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
3608 defined after including gdb_proc_service.h.
b5737fa9 3609
40ed484e
DE
36102014-01-16 Doug Evans <dje@google.com>
3611
3612 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
3613 (match_dll): Use it.
3614
969c39fb
MM
36152014-01-16 Markus Metzger <markus.t.metzger@intel.com>
3616
3617 * target.h (target_ops) <read_btrace>: Change parameters and
3618 return type to allow error reporting.
3619 * server.c (handle_qxfer_btrace): Support delta reads. Pass
3620 trace reading errors on.
3621 * linux-low.c (linux_low_read_btrace): Pass trace reading
3622 errors on.
3623 (linux_low_disable_btrace): New.
3624
ab7f45ba
DE
36252014-01-15 Doug Evans <dje@google.com>
3626
3627 * inferiors.c (thread_id_to_gdb_id): Delete.
3628 * inferiors.h (thread_id_to_gdb_id): Delete.
3629
66af0f44
EZ
36302014-01-13 Eli Zaretskii <eliz@gnu.org>
3631
3632 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
3633 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
3634 versions.
3635
9939e131
PA
36362014-01-08 Pedro Alves <palves@redhat.com>
3637
3638 * server.c (handle_status): Don't discard previous queued stop
3639 replies or thread's pending status here.
3640 (main) <disconnection>: Do it here instead.
3641
b7ea362b
PA
36422014-01-08 Pedro Alves <palves@redhat.com>
3643
3644 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
3645 * server.c (visit_actioned_threads, handle_pending_status): New
3646 function.
3647 (handle_v_cont): Factor out parts to ...
3648 (resume): ... this new function. If in all-stop, and a thread
3649 being resumed has a pending status, report it without actually
3650 resuming.
3651 (myresume): Adjust to use the new 'resume' function.
3652 (clear_pending_status_callback, set_pending_status_callback)
3653 (find_status_pending_thread_callback): New functions.
3654 (handle_status): Handle the case of multiple threads having
3655 interesting statuses to report. Report threads' real last signal
3656 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
3657 with an interesting thread to report the status for, instead of
3658 always reporting the status of the first thread.
3659
28498c42
JB
36602014-01-01 Joel Brobecker <brobecker@adacore.com>
3661
3662 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
3663 * gdbreplay.c (gdbreplay_version): Likewise.
3664
f45c82da
YZ
36652013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
3666
3667 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
3668 iov.iov_len with the real length in use.
3669
379a5e2d
JB
36702013-12-13 Joel Brobecker <brobecker@adacore.com>
3671
3672 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
3673 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
3674 for all targets that use win32-low.c.
3675 * win32-low.c (win32_ensure_ntdll_loaded): New function.
3676 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
3677
4210d83e
PA
36782013-12-13 Pedro Alves <palves@redhat.com>
3679
3680 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
3681 if equal to TARGET_WAITKIND_LOADED.
3682 * win32-low.c (cached_status): New static global.
3683 (win32_wait): Add declaration.
3684 (do_initial_child_stuff): Flush all initial pending debug events
3685 up to the initial breakpoint.
3686 (win32_wait): If CACHED_STATUS was set, return that instead
3687 of doing a real wait. Remove the code resuming the execution
3688 of the inferior after receiving a TARGET_WAITKIND_LOADED event
3689 during the initial phase. Also remove the code changing
3690 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
3691 TARGET_WAITKIND_STOPPED.
3692
e7f0d979
YQ
36932013-12-11 Yao Qi <yao@codesourcery.com>
3694
3695 * notif.c (handle_notif_ack): Return 0 if no notification
3696 matches.
3697
ebcf782c
DE
36982013-11-20 Doug Evans <dje@google.com>
3699
3700 * linux-low.c (linux_set_resume_request): Fix comment.
3701
20ad9378
DE
37022013-11-20 Doug Evans <dje@google.com>
3703
3704 * linux-low.c (resume_status_pending_p): Tweak comment.
3705
a196ebeb
WT
37062013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
3707
3708 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
3709 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
3710 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
3711 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
3712 (srv_amd64_regobj): Add amd64-mpx.o.
3713 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
3714 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
3715 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
3716 * i387-fp.c (num_pl_bnd_register) Added constant.
3717 (num_pl_bnd_cfg_registers) Added constant.
3718 (struct i387_xsave) Added reserved area and MPX fields.
3719 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
3720 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
3721 function.
3722 (tdesc_i386_mpx_linux): Add MPX amd64 target.
3723 (init_registers_amd64_mpx_linux): Declare new function.
3724 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
3725 (x86_64_regmap): Add MPX registers.
3726 (x86_linux_read_description): Add MPX case.
3727 (initialize_low_arch): Initialize MPX targets.
3728
0080a2f6
TT
37292013-11-18 Tom Tromey <tromey@redhat.com>
3730
3731 * configure: Rebuild.
3732 * configure.ac: Don't check for stdlib.h.
3733 * gdbreplay.c: Unconditionally include stdlib.h.
3734
2978b111
TT
37352013-11-18 Tom Tromey <tromey@redhat.com>
3736
3737 * config.in: Rebuild.
3738 * configure: Rebuild.
3739 * configure.ac: Don't use AC_HEADER_DIRENT.
3740
a3d08894
TT
37412013-11-18 Tom Tromey <tromey@redhat.com>
3742
3743 * server.h: Don't check HAVE_STRING_H.
3744 * gdbreplay.c: Don't check HAVE_STRING_H.
3745 * configure: Rebuild.
3746
0a5dd17d
TT
37472013-11-18 Tom Tromey <tromey@redhat.com>
3748
3749 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
3750 LIBGNU.
3751
1bd2f0ba
TT
37522013-11-08 Tom Tromey <tromey@redhat.com>
3753
3754 * configure, config.in: Rebuild.
3755 * configure.ac: Remove unused configury.
3756
3266f10b
TT
37572013-11-08 Tom Tromey <tromey@redhat.com>
3758
3759 * acinclude.m4: Include common.m4, codeset.m4.
3760 * configure, config.in: Rebuild.
3761 * configure.ac: Use GDB_AC_COMMON.
3762
6682d959
AA
37632013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
3764
3765 * linux-s390-low.c (HWCAP_S390_TE): New define.
3766 (s390_arch_setup): Consider the TE field in the HWCAP for
3767 determining 'have_regset_tdb'.
3768
fd0a4d76
SDJ
37692013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
3770
3771 PR gdb/16014
3772 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
3773 call to sizeof.
3774
1a3d890b
PA
37752013-10-02 Pedro Alves <palves@redhat.com>
3776
3777 * server.c (process_serial_event): Don't output "GDBserver
3778 exiting" if GDB is connected through stdio.
3779 * target.c (mywait): Likewise, be silent if GDB is connected
3780 through stdio.
3781
97ad4581
JB
37822013-10-01 Joel Brobecker <brobecker@adacore.com>
3783
3784 * lynx-low.c (lynx_add_threads_after_attach): New function.
3785 (lynx_attach): Remove call to add_thread. Add call to
3786 lynx_add_threads_after_attach instead.
3787
5b4e221c
MF
37882013-09-28 Mike Frysinger <vapier@gentoo.org>
3789
3790 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
3791 * config.in, configure: Regenerated.
3792
ee47b2f8
YQ
37932013-09-18 Yao Qi <yao@codesourcery.com>
3794
3795 PR server/15959
3796 * server.c (start_inferior): Clear 'resume_info'.
3797
d6707650 37982013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 3799
d6707650
JW
3800 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
3801 for each register.
3802
9243dd0e 38032013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 3804
9243dd0e
JW
3805 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
3806 linux-tile-low.o to srv_tgtobj.
3807
c623a6ef
WN
38082013-09-16 Will Newton <will.newton@linaro.org>
3809
3810 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
3811 out regs.
3812
fb71d39e
PA
38132013-09-06 Pedro Alves <palves@redhat.com>
3814
3815 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
3816 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
3817 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
3818 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
3819 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
3820 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
3821
8e7e9910
PA
38222013-09-06 Pedro Alves <palves@redhat.com>
3823
3824 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
3825 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
3826
7c3a12ca
PA
38272013-09-06 Pedro Alves <palves@redhat.com>
3828
3829 * linux-amd64-ipa.c: Include tracepoint.h.
3830 * linux-i386-ipa.c: Include tracepoint.h.
3831
8eb3d7b6
RW
38322013-09-06 Ricard Wanderlof <ricardw@axis.com>
3833
3834 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
3835 (ps_get_thread_area): New function.
3836
eddddb9d
RW
38372013-09-06 Ricard Wanderlof <ricardw@axis.com>
3838
3839 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
3840 (initialize_low_arch): Call init_registers_crisv32 rather than
3841 init_register_crisv32.
3842
533b0600
PA
38432013-09-05 Pedro Alves <palves@redhat.com>
3844
3845 * server.h (handle_vFile, hostio_last_error_from_errno): Move
3846 to ...
3847 * hostio.h: ... this new file.
3848 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
3849 win32-low.c: Include hostio.h.
3850
0ce3d3b5
PA
38512013-09-05 Pedro Alves <palves@redhat.com>
3852
3853 * server.h (gdb_client_data, handler_func, callback_handler_func)
3854 (delete_file_handler, add_file_handler, append_callback_event)
3855 (delete_callback_event, start_event_loop, initialize_event_loop):
3856 Move to event-loop.h and include it.
3857 * event-loop.h: New file.
3858
799cdc37
PA
38592013-09-05 Pedro Alves <palves@redhat.com>
3860
3861 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
3862 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
3863 (loaded_dll, unloaded_dll): Move to ...
3864 * dll.h: ... this new file.
3865 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
3866
6a6bbd9d
PA
38672013-09-05 Pedro Alves <palves@redhat.com>
3868
3869 * server.h (current_process, get_thread_process, all_processes)
3870 (add_inferior_to_list, for_each_inferior, current_inferior)
3871 (remove_inferior, add_process, remove_process, find_process_pid)
3872 (have_started_inferiors_p, have_attached_inferiors_p)
3873 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
3874 (clear_inferiors, find_inferior, find_inferior_id)
3875 (inferior_target_data, set_inferior_target_data)
3876 (inferior_regcache_data, set_inferior_regcache_data): Move to
3877 inferiors.h, and include it.
3878 * inferiors.h: New file.
3879
f699aaba
PA
38802013-09-05 Pedro Alves <palves@redhat.com>
3881
3882 * server.h (struct emit_ops, current_insn_ptr, emit_error):
3883 Move ...
72f4393d 3884 * ax.h: ... here.
f699aaba 3885
c144c7a0
PA
38862013-09-05 Pedro Alves <palves@redhat.com>
3887
3888 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
3889 tracepoint.h.
3890 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
3891 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
3892 (handle_tracepoint_general_set, handle_tracepoint_query)
3893 (tracepoint_finished_step, tracepoint_was_hit)
3894 (release_while_stepping_state_list, current_traceframe)
3895 (in_readonly_region, traceframe_read_mem)
3896 (fetch_traceframe_registers, traceframe_read_sdata)
3897 (traceframe_read_info, struct fast_tpoint_collect_status)
3898 (fast_tracepoint_collecting, force_unlock_trace_buffer)
3899 (handle_tracepoit_bkpts, initialize_low_tracepoint)
3900 (supply_fast_tracepoint_registers)
3901 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
3902 (ipa_tdesc, claim_trampoline_space)
3903 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
3904 (agent_mem_read, agent_get_trace_state_variable_value)
3905 (agent_set_trace_state_variable_value, agent_tsv_read)
3906 (agent_mem_read_string, get_raw_reg_func_addr)
3907 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
3908 * tracepoint.h: ... this new file.
3909
ff42e6ab
PA
39102013-09-05 Pedro Alves <palves@redhat.com>
3911
3912 * server.h (perror_with_name, error, fatal, warning, paddress)
3913 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
3914 include it.
3915 * utils.h: New file.
3916
541af0f4
PA
39172013-09-05 Pedro Alves <palves@redhat.com>
3918
3919 * server.h (remote_debug, noack_mode, transport_is_reliable)
3920 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
3921 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
3922 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
3923 (write_enn, initialize_async_io, enable_async_io)
3924 (disable_async_io, check_remote_input_interrupt_request)
3925 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
3926 (dead_thread_notify, prepare_resume_reply)
3927 (decode_address_to_semicolon, decode_address, decode_m_packet)
3928 (decode_M_packet, decode_X_packet, decode_xfer_write)
3929 (decode_search_memory_packet, unhexify, hexify)
3930 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
3931 (look_up_one_symbol, relocate_instruction)
3932 (monitor_output): Move to remote-utils.h, and include it.
3933 * remote-utils.h: New file.
3934
eebdf26b
PA
39352013-09-05 Pedro Alves <palves@redhat.com>
3936
3937 * server.h (_): Delete.
3938
3aafd2ff
PA
39392013-09-02 Pedro Alves <palves@redhat.com>
3940
3941 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
3942 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
3943 allocated.
3944 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
3945
cee83bcb
PM
39462013-09-02 Pierre Muller <muller@sourceware.org>
3947
3948 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
3949 or WriteProcessMemory complete successfully and handle
3950 ERROR_PARTIAL_COPY error.
3951
9a13b2fa
PA
39522013-09-02 Pedro Alves <palves@redhat.com>
3953
3954 * server.c (gdb_read_memory): Return -1 on traceframe memory read
3955 error instead of EIO.
3956
602e3198
JK
39572013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
3958
3959 PR server/15604
3960 * linux-low.c: Include filestuff.h.
3961 (linux_create_inferior) <pid == 0>: Call close_most_fds.
3962 * lynx-low.c: Include filestuff.h.
3963 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
3964 * server.c: Include filestuff.h.
3965 (main): Call notice_open_fds.
3966 * spu-low.c: Include filestuff.h.
3967 (spu_create_inferior) <pid == 0>: Call close_most_fds.
3968
96d7229d
LM
39692013-08-22 Luis Machado <lgustavo@codesourcery.com>
3970
3971 * Makefile.in: Explain why ../target and ../nat are not
3972 listed as include file search paths.
3973 (linux-waitpid.o): New object file rule.
3974 * configure.srv (srv_native_linux_obj): New variable.
3975 Replace all occurrences of linux native object files with
3976 $srv_native_linux_obj.
3977 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
3978 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
3979 (linux_enable_event_reporting): Remove declaration.
3980 (my_waitpid): Moved to common/linux-waitpid.c.
3981 (linux_wait_for_event): Pass ptid when calling
3982 linux_enable_event_reporting.
3983 (linux_supports_tracefork_flag): Remove.
3984 (linux_enable_event_reporting): Likewise.
3985 (linux_tracefork_grandchild): Remove.
3986 (STACK_SIZE): Moved to common/linux-ptrace.c.
3987 (linux_tracefork_child): Remove.
3988 (linux_test_for_tracefork): Remove.
3989 (linux_look_up_symbols): Call linux_supports_traceclone.
3990 (initialize_low): Remove call to linux_test_for_tracefork.
3991 * linux-low.h (PTRACE_TYPE_ARG3): Move to
3992 common/linux-ptrace.h.
3993 (PTRACE_TYPE_ARG4): Likewise.
3994 Include linux-ptrace.h.
3995
32940073
PA
39962013-08-21 Pedro Alves <palves@redhat.com>
3997
3998 * config.in: Renegerate.
3999
33b60d58 40002013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 4001
33b60d58
LM
4002 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
4003 (SFILES): Remove $(srcdir)/common/target-common.c and
4004 add $(srcdir)/target/waitstatus.c.
4005 (OBS): Remove target-common.o and add waitstatus.o.
4006 (server_h): Remove $(srcdir)/../common/target-common.h and
4007 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
4008 and $(srcdir)/../target/waitstatus.h.
4009 (target-common.o): Remove.
4010 (waitstatus.o): New target object file.
4011 * target.h: Do not include target-common.h and
4012 include target/resume.h, target/wait.h and
4013 target/waitstatus.h.
4014
b8e1b30e
LM
40152013-08-13 Luis Machado <lgustavo@codesourcery.com>
4016
4017 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
4018 to PTRACE_TYPE_ARG3.
4019 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
4020 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
4021 PTRACE_TYPE_ARG4.
4022 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
4023 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
4024
7a60ad40
YQ
40252013-07-27 Jie Zhang <jie@codesourcery.com>
4026 Daniel Jacobowitz <dan@codesourcery.com>
4027 Yao Qi <yao@codesourcery.com>
4028
4029 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
4030 (mips-linux-watch.o): New rule.
4031 (mips_linux_watch_h): New variable.
4032 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
4033 srv_tgtobj.
4034 * linux-mips-low.c: Include mips-linux-watch.h.
4035 (struct arch_process_info, struct arch_lwp_info): New.
4036 (update_watch_registers_callback): New function.
4037 (mips_linux_new_process, mips_linux_new_thread) New functions.
4038 (mips_linux_prepare_to_resume, mips_insert_point): New
4039 functions.
4040 (mips_remove_point, mips_stopped_by_watchpoint): New
4041 functions.
4042 (rsp_bp_type_to_target_hw_bp_type): New function.
4043 (mips_stopped_data_address): New function.
4044 (the_low_target): Add watchpoint support functions.
4045
de6f69ad
YQ
40462013-07-27 Yao Qi <yao@codesourcery.com>
4047
4048 * i386-low.c: Include break-common.h.
4049 (enum target_hw_bp_type): Remove.
4050
3360c0bf
LM
40512013-07-24 Luis Machado <lgustavo@codesourcery.com>
4052
4053 * Makefile.in (SFILES): /common/target-common.c.
4054 (OBS): Add target-common.o.
4055 (server_h): Add $(srcdir)/../common/target-common.h.
4056 (target-common.o): New target.
4057 * server.c (queue_stop_reply_callback): Free
4058 status string after use.
4059 * target.c (target_waitstatus_to_string): Remove.
4060 * target.h: Include target-common.h.
4061 (resume_kind): Likewise.
4062 (target_waitkind): Likewise.
4063 (target_waitstatus): Likewise.
4064 (TARGET_WNOHANG): Likewise.
4065
bd885420
YQ
40662013-07-04 Yao Qi <yao@codesourcery.com>
4067
4068 * Makefile.in (host_alias): Use @host_noncanonical@.
4069 (target_alias): Use @target_noncanonical@.
4070 * configure.ac: Use ACX_NONCANONICAL_TARGET and
4071 ACX_NONCANONICAL_HOST.
4072 * configure: Regenerated.
4073
4074 Revert:
4075 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
4076
4077 * configure.ac (version_host, version_target): Set and AC_SUBST them.
4078 * configure: Rebuild.
4079 * Makefile.in (version_host, version_target): Get from configure.
4080 (version.c): Use $(version_host) and $(version_target).
4081
17ef446e
PA
40822013-07-03 Pedro Alves <palves@redhat.com>
4083
4084 * Makefile.in (config.status): Depend on development.sh.
4085 * acinclude.m4: Include libmcheck.m4.
4086 * configure: Regenerate.
4087
7a9a7487
MG
40882013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
4089
4090 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
4091 attribute inside the parentheses.
4092 (winapi_DebugSetProcessKillOnExit): Ditto.
4093 (winapi_DebugBreakProcess): Ditto.
4094 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 4095
49b64de6
MG
40962013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
4097
4098 * notif.h (notif_event): Add a dummy member to avoid compiler
4099 errors.
4100
d5749ee7
PA
41012013-07-01 Pedro Alves <palves@redhat.com>
4102
4103 * hostio.c (HOSTIO_PATH_MAX): Define.
4104 (require_filename, handle_open, handle_unlink, handle_readlink):
4105 Use it.
4106
d8d2a3ee
PA
41072013-07-01 Pedro Alves <palves@redhat.com>
4108
4109 * server.h: Include "pathmax.h".
4110 * linux-low.c: Don't include sys/param.h.
4111 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
4112 MAXPATHLEN.
4113 * win32-low.c: Don't include sys/param.h.
4114 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
4115
bc7dea8d
PA
41162013-07-01 Pedro Alves <palves@redhat.com>
4117
4118 * event-loop.c: Don't check HAVE_UNISTD_H before including
4119 <unistd.h>.
4120 * gdbreplay.c: Likewise.
4121 * remote-utils.c: Likewise.
4122 * server.c: Likewise.
4123 * configure.ac: Don't check for unistd.h.
4124 * configure: Regenerate.
4125
d6c2da54
TT
41262013-06-28 Tom Tromey <tromey@redhat.com>
4127
4128 * Makefile.in (version.c): Use version.in, not
4129 common/version.in.
4130
257b6bec
MG
41312013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
4132
4133 * configure.ac (version_host, version_target): Set and AC_SUBST them.
4134 * configure: Rebuild.
4135 * Makefile.in (version_host, version_target): Get from configure.
4136 (version.c): Use $(version_host) and $(version_target).
4137
86ebe149
DK
41382013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
4139
4140 Fix trace-status to output user name without trailing colon.
4141 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
4142
f30aa5af
DK
41432013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
4144
4145 Fix trace-status to output proper start-time and stop-time.
4146 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
4147 output start time and stop time in hex as gdb expects.
4148
28a93511
YQ
41492013-06-26 Pedro Alves <pedro@codesourcery.com>
4150
4151 * tracepoint.c (build_traceframe_info_xml): Output trace state
4152 variables present in the trace buffer.
4153
01208463
TT
41542013-06-24 Tom Tromey <tromey@redhat.com>
4155
4156 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
4157 create-version.sh.
4158 (version.o): Remove.
4159 * gdbreplay.c: Include version.h.
4160 (version, host_name): Don't declare.
4161 * server.h: Include version.h.
4162 (version, host_name): Don't declare.
4163
760256f9
PA
41642013-06-12 Pedro Alves <palves@redhat.com>
4165
4166 * linux-x86-low.c (linux_is_elf64): Delete global.
4167 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
4168 with local linux_pid_exe_is_elf_64_file use.
4169
030031ee
PA
41702013-06-11 Pedro Alves <palves@redhat.com>
4171
4172 * linux-low.c (regset_disabled, disable_regset): New functions.
4173 (regsets_fetch_inferior_registers)
4174 (regsets_store_inferior_registers): Use them.
4175 (initialize_regsets_info); Don't allocate the disabled_regsets
4176 array here.
4177 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
4178 comment.
4179
5da6eb0a
PA
41802013-06-11 Pedro Alves <palves@redhat.com>
4181
4182 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
4183 xmalloc.
4184
7e5aaa09
PA
41852013-06-11 Pedro Alves <palves@redhat.com>
4186
4187 * linux-x86-low.c (initialize_low_arch): Call
4188 init_registers_x32_avx_linux.
4189
d878444c
JK
41902013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
4191
4192 Fix compatibility with Android Bionic.
4193 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
4194 it is not empty.
4195
3aee8918
PA
41962013-06-07 Pedro Alves <palves@redhat.com>
4197
5f2b57b5 4198 PR server/14823
3aee8918
PA
4199 * Makefile.in (OBS): Add tdesc.o.
4200 (IPA_OBJS): Add tdesc-ipa.o.
4201 (tdesc-ipa.o): New rule.
4202 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
4203 interface.
4204 * linux-low.c (new_inferior): Delete.
4205 (disabled_regsets, num_regsets): Delete.
4206 (linux_add_process): Adjust to set the new per-process
4207 new_inferior flag.
4208 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
4209 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
4210 was a stop. When calling arch_setup, switch the current inferior
4211 to the thread that got an event.
4212 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
4213 (regsets_fetch_inferior_registers)
4214 (regsets_store_inferior_registers): New regsets_info parameter.
4215 Adjust to use it.
4216 (linux_register_in_regsets): New regs_info parameter. Adjust to
4217 use it.
4218 (register_addr, fetch_register, store_register): New usrregs_info
4219 parameter. Adjust to use it.
4220 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
4221 parameter regs_info. Adjust to use it.
4222 (linux_fetch_registers): Get the current inferior's regs_info, and
4223 adjust to use it.
4224 (linux_store_registers): Ditto.
4225 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
4226 (initialize_low): Don't initialize the target_regsets here. Call
4227 initialize_low_arch.
4228 * linux-low.h (target_regsets): Delete declaration.
4229 (struct regsets_info): New.
4230 (struct usrregs_info): New.
4231 (struct regs_info): New.
4232 (struct process_info_private) <new_inferior>: New field.
4233 (struct linux_target_ops): Delete the num_regs, regmap, and
4234 regset_bitmap fields. New field regs_info.
4235 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
4236 * i387-fp.c (num_xmm_registers): Delete.
4237 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
4238 calls to new interface.
4239 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
4240 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
4241 Infer the number of xmm registers from the regcache's target
4242 description.
4243 * i387-fp.h (num_xmm_registers): Delete.
4244 * inferiors.c (add_thread): Don't install the thread's regcache
4245 here.
4246 * proc-service.c (gregset_info): Fetch the current inferior's
4247 regs_info. Adjust to use it.
4248 * regcache.c: Include tdesc.h.
4249 (register_bytes, reg_defs, num_registers)
4250 (gdbserver_expedite_regs): Delete.
4251 (get_thread_regcache): If the thread doesn't have a regcache yet,
4252 create one, instead of aborting gdbserver.
4253 (regcache_invalidate_one): Rename to ...
4254 (regcache_invalidate_thread): ... this.
4255 (regcache_invalidate_one): New.
4256 (regcache_invalidate): Only invalidate registers of the current
4257 process.
4258 (init_register_cache): Add target_desc parameter, and use it.
4259 (new_register_cache): Ditto. Assert the target description has a
4260 non zero registers_size.
4261 (regcache_cpy): Add assertions. Adjust.
4262 (realloc_register_cache, set_register_cache): Delete.
4263 (registers_to_string, registers_from_string): Adjust.
4264 (find_register_by_name, find_regno, find_register_by_number)
4265 (register_cache_size): Add target_desc parameter, and use it.
4266 (free_register_cache_thread, free_register_cache_thread_one)
4267 (regcache_release, register_cache_size): New.
4268 (register_size): Add target_desc parameter, and use it.
4269 (register_data, supply_register, supply_register_zeroed)
4270 (supply_regblock, supply_register_by_name, collect_register)
4271 (collect_register_as_string, collect_register_by_name): Adjust.
4272 * regcache.h (struct target_desc): Forward declare.
4273 (struct regcache) <tdesc>: New field.
4274 (init_register_cache, new_register_cache): Add target_desc
4275 parameter.
4276 (regcache_invalidate_thread): Declare.
4277 (regcache_invalidate_one): Delete declaration.
4278 (regcache_release): Declare.
4279 (find_register_by_number, register_cache_size, register_size)
4280 (find_regno): Add target_desc parameter.
4281 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
4282 declarations.
4283 * remote-utils.c: Include tdesc.h.
4284 (outreg, prepare_resume_reply): Adjust.
4285 * server.c: Include tdesc.h.
4286 (gdbserver_xmltarget): Delete declaration.
4287 (get_features_xml, process_serial_event): Adjust.
4288 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
4289 declare.
4290 (struct process_info) <tdesc>: New field.
4291 (ipa_tdesc): Declare.
4292 * tdesc.c: New file.
4293 * tdesc.h: New file.
4294 * tracepoint.c: Include tdesc.h.
4295 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
4296 (get_context_regcache): Adjust to pass ipa_tdesc down.
4297 (do_action_at_tracepoint): Adjust to get the register cache size
4298 from the context regcache's description.
4299 (traceframe_walk_blocks): Adjust to get the register cache size
4300 from the current trace frame's description.
4301 (traceframe_get_pc): Adjust to get current trace frame's
4302 description and pass it down.
4303 (gdb_collect): Adjust to get the register cache size from the
4304 IPA's description.
4305 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
4306 (gdbserver_xmltarget): Delete.
4307 (initialize_low_tracepoint): Set the ipa's target description.
4308 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
4309 (initialize_low_tracepoint): Set the ipa's target description.
4310 * linux-x86-low.c: Include tdesc.h.
4311 [__x86_64__] (is_64bit_tdesc): New.
4312 (ps_get_thread_area, x86_get_thread_area): Use it.
4313 (i386_cannot_store_register): Rename to ...
4314 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
4315 (i386_cannot_fetch_register): Rename to ...
4316 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
4317 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
4318 to new interface.
4319 (target_regsets): Rename to ...
4320 (x86_regsets): ... this.
4321 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
4322 interface.
4323 (x86_siginfo_fixup): Use is_64bit_tdesc.
4324 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
4325 (tdesc_x32_avx_linux, tdesc_x32_linux)
4326 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
4327 Declare.
4328 (x86_linux_update_xmltarget): Delete.
4329 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
4330 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
4331 (AMD64_LINUX_USER64_CS): New.
4332 (x86_linux_read_description): New, based on
4333 x86_linux_update_xmltarget.
4334 (same_process_callback): New.
4335 (x86_arch_setup_process_callback): New.
4336 (x86_linux_update_xmltarget): New.
4337 (x86_regsets_info): New.
4338 (amd64_linux_regs_info): New.
4339 (i386_linux_usrregs_info): New.
4340 (i386_linux_regs_info): New.
4341 (x86_linux_regs_info): New.
4342 (x86_arch_setup): Reimplement.
4343 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
4344 (x86_emit_ops): Ditto.
4345 (the_low_target): Adjust. Install x86_linux_regs_info,
4346 x86_cannot_fetch_register, and x86_cannot_store_register.
4347 (initialize_low_arch): New.
4348 * linux-ia64-low.c (tdesc_ia64): Declare.
4349 (ia64_fetch_register): Adjust.
4350 (ia64_usrregs_info, regs_info): New globals.
4351 (ia64_regs_info): New function.
4352 (the_low_target): Adjust.
4353 (initialize_low_arch): New function.
4354 * linux-sparc-low.c (tdesc_sparc64): Declare.
4355 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
4356 Adjust.
4357 (sparc_arch_setup): New function.
4358 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
4359 (the_low_target): Adjust.
4360 (initialize_low_arch): New function.
4361 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
4362 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
4363 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
4364 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
4365 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
4366 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
4367 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
4368 (tdesc_powerpc_isa205_vsx64l): Declare.
4369 (ppc_cannot_store_register, ppc_collect_ptrace_register)
4370 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
4371 (ppc_set_pc, ppc_get_hwcap): Adjust.
4372 (ppc_usrregs_info): Forward declare.
4373 (!__powerpc64__) ppc_regmap_adjusted: New global.
4374 (ppc_arch_setup): Adjust to the current process'es target
4375 description.
4376 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
4377 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
4378 (ppc_store_evrregset): Adjust.
4379 (target_regsets): Rename to ...
4380 (ppc_regsets): ... this, and make static.
4381 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
4382 (ppc_regs_info): New function.
4383 (the_low_target): Adjust.
4384 (initialize_low_arch): New function.
4385 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
4386 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
4387 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
4388 (tdesc_s390x_linux64v2): Declare.
4389 (s390_collect_ptrace_register, s390_supply_ptrace_register)
4390 (s390_fill_gregset, s390_store_last_break): Adjust.
4391 (target_regsets): Rename to ...
4392 (s390_regsets): ... this, and make static.
4393 (s390_get_pc, s390_set_pc): Adjust.
4394 (s390_get_hwcap): New target_desc parameter, and use it.
4395 [__s390x__] (have_hwcap_s390_high_gprs): New global.
4396 (s390_arch_setup): Adjust to set the current process'es target
4397 description. Don't adjust the regmap.
4398 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
4399 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
4400 (regs_info_3264): New globals.
4401 (s390_regs_info): New function.
4402 (the_low_target): Adjust.
4403 (initialize_low_arch): New function.
4404 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
4405 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
4406 [__mips64] (init_registers_mips_linux)
4407 (init_registers_mips_dsp_linux): Delete defines.
4408 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
4409 (have_dsp): New global.
4410 (mips_read_description): New, based on mips_arch_setup.
4411 (mips_arch_setup): Reimplement.
4412 (get_usrregs_info): New function.
4413 (mips_cannot_fetch_register, mips_cannot_store_register)
4414 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
4415 (mips_fill_fpregset, mips_store_fpregset): Adjust.
4416 (target_regsets): Rename to ...
4417 (mips_regsets): ... this, and make static.
4418 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
4419 (dsp_regs_info, regs_info): New globals.
4420 (mips_regs_info): New function.
4421 (the_low_target): Adjust.
4422 (initialize_low_arch): New function.
4423 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
4424 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
4425 Declare.
4426 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
4427 (arm_read_description): New, with bits factored from
4428 arm_arch_setup.
4429 (arm_arch_setup): Reimplement.
4430 (target_regsets): Rename to ...
4431 (arm_regsets): ... this, and make static.
4432 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
4433 (arm_regs_info): New function.
4434 (the_low_target): Adjust.
4435 (initialize_low_arch): New function.
4436 * linux-m68k-low.c (tdesc_m68k): Declare.
4437 (target_regsets): Rename to ...
4438 (m68k_regsets): ... this, and make static.
4439 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
4440 (m68k_regs_info): New function.
4441 (m68k_arch_setup): New function.
4442 (the_low_target): Adjust.
4443 (initialize_low_arch): New function.
4444 * linux-sh-low.c (tdesc_sharch): Declare.
4445 (target_regsets): Rename to ...
4446 (sh_regsets): ... this, and make static.
4447 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
4448 (sh_regs_info, sh_arch_setup): New functions.
4449 (the_low_target): Adjust.
4450 (initialize_low_arch): New function.
4451 * linux-bfin-low.c (tdesc_bfin): Declare.
4452 (bfin_arch_setup): New function.
4453 (bfin_usrregs_info, regs_info): New globals.
4454 (bfin_regs_info): New function.
4455 (the_low_target): Adjust.
4456 (initialize_low_arch): New function.
4457 * linux-cris-low.c (tdesc_cris): Declare.
4458 (cris_arch_setup): New function.
4459 (cris_usrregs_info, regs_info): New globals.
4460 (cris_regs_info): New function.
4461 (the_low_target): Adjust.
4462 (initialize_low_arch): New function.
4463 * linux-cris-low.c (tdesc_crisv32): Declare.
4464 (cris_arch_setup): New function.
4465 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
4466 (cris_regs_info): New function.
4467 (the_low_target): Adjust.
4468 (initialize_low_arch): New function.
4469 * linux-m32r-low.c (tdesc_m32r): Declare.
4470 (m32r_arch_setup): New function.
4471 (m32r_usrregs_info, regs_info): New globals.
4472 (m32r_regs_info): Adjust.
4473 (initialize_low_arch): New function.
4474 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
4475 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
4476 (tic6x_usrregs_info): Forward declare.
4477 (tic6x_read_description): New function, based on ...
4478 (tic6x_arch_setup): ... this. Reimplement.
4479 (target_regsets): Rename to ...
4480 (tic6x_regsets): ... this, and make static.
4481 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
4482 (tic6x_regs_info): New function.
4483 (the_low_target): Adjust.
4484 (initialize_low_arch): New function.
4485 * linux-xtensa-low.c (tdesc_xtensa): Declare.
4486 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
4487 (target_regsets): Rename to ...
4488 (xtensa_regsets): ... this, and make static.
4489 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
4490 globals.
4491 (xtensa_arch_setup, xtensa_regs_info): New functions.
4492 (the_low_target): Adjust.
4493 (initialize_low_arch): New function.
4494 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
4495 (nios2_arch_setup): Set the current process'es tdesc.
4496 (target_regsets): Rename to ...
4497 (nios2_regsets): ... this.
4498 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
4499 (nios2_regs_info): New function.
4500 (the_low_target): Adjust.
4501 (initialize_low_arch): New function.
a261b8f5
PA
4502 * linux-aarch64-low.c (tdesc_aarch64): Declare.
4503 (aarch64_arch_setup): Set the current process'es tdesc.
4504 (target_regsets): Rename to ...
4505 (aarch64_regsets): ... this.
4506 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
4507 (aarch64_regs_info): New function.
4508 (the_low_target): Adjust.
4509 (initialize_low_arch): New function.
3aee8918
PA
4510 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
4511 globals.
4512 (target_regsets): Rename to ...
4513 (tile_regsets): ... this.
4514 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
4515 (tile_regs_info): New function.
4516 (tile_arch_setup): Set the current process'es tdesc.
4517 (the_low_target): Adjust.
4518 (initialize_low_arch): New function.
4519 * spu-low.c (tdesc_spu): Declare.
4520 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
4521 * win32-arm-low.c (tdesc_arm): Declare.
4522 (arm_arch_setup): New function.
4523 (the_low_target): Install arm_arch_setup instead of
4524 init_registers_arm.
4525 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
4526 (init_windows_x86): Rename to ...
4527 (i386_arch_setup): ... this. Set `win32_tdesc'.
4528 (the_low_target): Adjust.
4529 * win32-low.c (win32_tdesc): New global.
4530 (child_add_thread): Don't create the thread cache here.
4531 (do_initial_child_stuff): Set the new process'es tdesc.
4532 * win32-low.h (struct target_desc): Forward declare.
4533 (win32_tdesc): Declare.
4534 * lynx-i386-low.c (tdesc_i386): Declare global.
4535 (lynx_i386_arch_setup): Set `lynx_tdesc'.
4536 * lynx-low.c (lynx_tdesc): New global.
4537 (lynx_add_process): Set the new process'es tdesc.
4538 * lynx-low.h (struct target_desc): Forward declare.
4539 (lynx_tdesc): Declare global.
4540 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
4541 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
4542 * nto-low.c (nto_tdesc): New global.
4543 (do_attach): Set the new process'es tdesc.
4544 * nto-low.h (struct target_desc): Forward declare.
4545 (nto_tdesc): Declare.
4546 * nto-x86-low.c (tdesc_i386): Declare.
4547 (nto_x86_arch_setup): Set `nto_tdesc'.
4548
b1fbec62
GB
45492013-06-04 Gary Benson <gbenson@redhat.com>
4550
4551 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
4552 to qSupported response when appropriate.
4553 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
4554 with nonzero-length annex.
4555 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
4556 arguments supplied in annex.
4557
d1ec4ce7
DE
45582013-05-31 Doug Evans <dje@google.com>
4559
ac44adcb 4560 PR server/15594
d1ec4ce7
DE
4561 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
4562 64 bits in 64-cross-32 environment.
4563
9b25f2d3
PA
45642013-05-28 Pedro Alves <palves@redhat.com>
4565
4566 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
4567 (aarch64-without-fpu.c): Delete rule.
4568 * configure.srv (aarch64*-*-linux*): Remove references to
4569 aarch64-without-fpu.o and aarch64-without-fpu.xml.
4570 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
4571 declaration.
4572
6740dc9c
PA
45732013-05-24 Pedro Alves <palves@redhat.com>
4574
4575 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
4576 instead of strchr/decode_address. Error if the range isn't split
4577 with a ','. Don't assume there's be a ':' in the action.
4578
c2d6af84
PA
45792013-05-23 Yao Qi <yao@codesourcery.com>
4580 Pedro Alves <palves@redhat.com>
4581
4582 * linux-low.c (lwp_in_step_range): New function.
4583 (linux_wait_1): If the thread was range stepping and stopped
4584 outside the stepping range, report the stop to GDB. Otherwise,
4585 continue stepping. Add range stepping debug output.
4586 (linux_set_resume_request): Copy the step range from the resume
4587 request to the lwp.
4588 (linux_supports_range_stepping): New.
4589 (linux_target_ops) <supports_range_stepping>: Set to
4590 linux_supports_range_stepping.
4591 * linux-low.h (struct linux_target_ops)
4592 <supports_range_stepping>: New field.
4593 (struct lwp_info) <step_range_start, step_range_end>: New fields.
4594 * linux-x86-low.c (x86_supports_range_stepping): New.
4595 (the_low_target) <supports_range_stepping>: Set to
4596 x86_supports_range_stepping.
4597 * server.c (handle_v_cont): Handle 'r' action.
4598 (handle_v_requests): Append ";r" if the target supports range
4599 stepping.
4600 * target.h (struct thread_resume) <step_range_start,
4601 step_range_end>: New fields.
4602 (struct target_ops) <supports_range_stepping>:
4603 New field.
4604 (target_supports_range_stepping): New macro.
4605
58794e1a
JB
46062013-05-17 Joel Brobecker <brobecker@adacore.com>
4607
4608 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
4609 confusion in comment.
4610
d631c5a7
JB
46112013-05-17 Joel Brobecker <brobecker@adacore.com>
4612
4613 * lynx-low.c (struct process_info_private): New type.
4614 (lynx_add_process): New function.
4615 (lynx_create_inferior, lynx_attach): Replace calls to
4616 add_process by calls to lynx_add_process.
4617 (lynx_resume): If PTID is null, then try using
4618 current_process()->private->last_wait_event_ptid.
4619 Add comments.
4620 (lynx_clear_inferiors): Delete. The contents of that function
4621 has been inlined in lynx_mourn;
4622 (lynx_wait_1): Save the ptid in the process's private data.
4623 (lynx_mourn): Free the process' private data. Replace call
4624 to lynx_clear_inferiors by call to clear_inferiors.
4625
96f7a20f
YQ
46262013-05-17 Yao Qi <yao@codesourcery.com>
4627
4628 * i386-low.c (i386_length_and_rw_bits): Move the comment to
4629 the right place.
4630
db0dfaa0
LM
46312013-05-16 Luis Machado <lgustavo@codesourcery.com>
4632
4633 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
4634 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
4635 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
4636 PT_TEXT_END_ADDR guards. Update comments.
4637 (linux_target_op) <read_offsets>: Conditionally define to
4638 linux_read_offsets if the target is UCLIBC and if it defines
4639 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
4640
68f5f838
SL
46412013-05-06 Sandra Loosemore <sandra@codesourcery.com>
4642 Andrew Jenner <andrew@codesourcery.com>
4643
4644 * Makefile.in (SFILES): Add linux-nios2-low.c.
4645 (clean): Add action to delete nios2-linux.c.
4646 (nios2-linux.c): New rule.
4647 * configure.srv: Add nios2*-*-linux*.
4648 * linux-nios2-low.c: New.
4649
1ebff1fd
HAQ
46502013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
4651
4652 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
4653
f6150862
HZ
46542013-04-25 Hui Zhu <hui@codesourcery.com>
4655
4656 PR gdb/15186
f6150862
HZ
4657 * ax.c (ax_printf): Add fflush.
4658
614c279d
TT
46592013-04-22 Tom Tromey <tromey@redhat.com>
4660
4661 * Makefile.in (SFILES): Add filestuff.c.
4662 (OBS): Add filestuff.o.
4663 (filestuff.o): New target.
4664 * config.in, configure: Rebuild.
4665 * configure.ac: Check for fdwalk, pipe2.
4666
7d4e5717
PA
46672013-04-17 Pedro Alves <palves@redhat.com>
4668
4669 * configure.ac (USE_THREAD_DB): Delete variable.
4670 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
4671 Don't AC_SUBST USE_THREAD_DB.
4672 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
4673 * config.in, configure: Regenerate.
4674
d5c93e41
PA
46752013-04-16 Pedro Alves <palves@redhat.com>
4676
4677 * linux-low.h (struct lwp_info) <thread_known>: Move under
4678 the USE_THREAD_DB #ifdef.
4679
04f5fe89
PA
46802013-04-16 Pedro Alves <palves@redhat.com>
4681
4682 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
4683 (linux-low.o): Delete rule.
4684 * linux-low.h: Always include "gdb_thread_db.h" instead of
4685 conditionally including thread_db.h.
4686 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
4687 HAVE_THREAD_DB_H.
4688
480b27bf
JK
46892013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
4690
4691 * Makefile.in (install-only): Fix make install regression.
4692
43662968
JK
46932013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
4694
4695 Convert man pages to texinfo, new gdbinit.5 texinfo page.
4696 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
4697 installation.
4698 * gdbserver.1: Remove.
4699
3e74e146
PA
47002013-03-22 Pedro Alves <palves@redhat.com>
4701
4702 * linux-low.c (handle_extended_wait): Don't call
4703 linux_enable_event_reporting.
4704
a8347a2a
TT
47052013-03-15 Tony Theodore <tonyt@logyst.com>
4706
4707 PR build/9098:
4708 * Makefile.in (SHELL): Use @SHELL@.
4709
eeb56fa7
SDJ
47102013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
4711
4712 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
4713 compiler warning.
4714
4fa7e2ff
JB
47152013-03-13 Joel Brobecker <brobecker@adacore.com>
4716
4717 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
4718 Remove extraneous NULL element.
4719
8ddb1965
YQ
47202013-03-13 Yao Qi <yao@codesourcery.com>
4721
4722 * tracepoint.c (traceframe_read_tsv): Look for the last matched
4723 'V' block in trace frame.
4724
9accd112
MM
47252013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4726
4727 * target.h (struct target_ops): Add btrace ops.
4728 (target_supports_btrace): New macro.
4729 (target_enable_btrace): New macro.
4730 (target_disable_btrace): New macro.
4731 (target_read_btrace): New macro.
4732 * gdbthread.h (struct thread_info): Add btrace field.
4733 * server.c: Include btrace-common.h.
4734 (handle_btrace_general_set): New function.
4735 (handle_btrace_enable): New function.
4736 (handle_btrace_disable): New function.
4737 (handle_general_set): Call handle_btrace_general_set.
4738 (handle_qxfer_btrace): New function.
4739 (struct qxfer qxfer_packets[]): Add btrace entry.
4740 * inferiors.c (remove_thread): Disable btrace.
4741 * linux-low: Include linux-btrace.h.
4742 (linux_low_enable_btrace): New function.
4743 (linux_low_read_btrace): New function.
4744 (linux_target_ops): Add btrace ops.
4745 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
4746 Add srv_linux_btrace=yes.
4747 (x86_64-*-linux*): Add linux-btrace.o.
4748 Add srv_linux_btrace=yes.
4749 * configure.ac: Define HAVE_LINUX_BTRACE.
4750 * config.in: Regenerated.
4751 * configure: Regenerated.
4752
5cc22e4c
MM
47532013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4754
4755 * server.c (handle_qxfer): Preserve error message if -3 is
4756 returned.
4757 (qxfer): Document the -3 return value.
4758
7c97f91e
MM
47592013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4760
4761 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
4762 (linux_btrace_h): New variable.
4763 (linux-btrace.o): New rule.
4764
be9a119c 47652013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
4766 Hafiz Abid Qadeer <abidh@codesourcery.com>
4767
4768 * tracepoint.c (trace_buffer_size): New global.
4769 (DEFAULT_TRACE_BUFFER_SIZE): New define.
4770 (init_trace_buffer): Change to one-argument function. Allocate
4771 trace buffer memory.
4772 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
4773 handle QTBuffer:size packet.
4774 (cmd_bigqtbuffer_size): New function.
4775 (initialize_tracepoint): Call init_trace_buffer with
4776 DEFAULT_TRACE_BUFFER_SIZE.
4777 * server.c (handle_query): Add QTBuffer:size in the
4778 supported packets.
4779
e64f7499
YQ
47802013-03-07 Yao Qi <yao@codesourcery.com>
4781
4782 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
4783 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
4784 of -1.
4785 (cmd_qtsp): Adjust condition. Do post increment.
4786 Set cur_action and cur_step_action back to 0.
4787
f0ae6fc3
PA
47882013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
4789
4790 PR server/15236
4791 * linux-low.c (linux_write_memory): Return early success if LEN is
4792 zero.
4793
b5b0b0af
CV
47942013-03-05 Corinna Vinschen <vinschen@redhat.de>
4795
334ad4a8 4796 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 4797
589bc927
TT
47982013-02-28 Tom Tromey <tromey@redhat.com>
4799
4800 * configure.ac: Invoke AC_SYS_LARGEFILE.
4801 * configure, config.in: Rebuild.
4802
dfe07582
CV
48032013-02-28 Corinna Vinschen <vinschen@redhat.com>
4804
4805 * win32-low.c: Throughout, fix format strings and casts of
4806 printf-like functions to avoid type related warnings on all
4807 platforms.
4808 (get_child_debug_event): Print dwDebugEventCode as hex since
4809 that's how it's usually documented.
4810
736cd585
YQ
48112013-02-28 Yao Qi <yao@codesourcery.com>
4812
4813 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
4814 pulongest.
4815
e1f58301
JW
48162013-02-27 Jiong Wang <jiwang@tilera.com>
4817
4818 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
4819 (reg-tilegx32.c): New rule.
4820 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
4821 * linux-tile-low.c (tile_arch_setup): New function. Invoke
4822 different register info initializer according to elf class.
4823 (init_registers_tilgx32): New function. The tilegx32 register info
4824 initializer.
4825 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
4826 (tile_store_gregset): Likewise.
4827
d171ca78
YQ
48282013-02-27 Yao Qi <yao@codesourcery.com>
4829
4830 * server.c (process_point_options): Print debug message when
4831 debug_threads is true.
4832
282bbdf3
YQ
48332013-02-26 Yao Qi <yao@codesourcery.com>
4834
4835 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
4836
aca22551
PA
48372013-02-19 Pedro Alves <palves@redhat.com>
4838 Kai Tietz <ktietz@redhat.com>
4839
4840 PR gdb/15161
4841
4842 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
4843 instead of strtoul to extract address from packet.
4844 (process_serial_event) <'z'>: Likewise.
4845
4f3cee1c
YQ
48462013-02-18 Yao Qi <yao@codesourcery.com>
4847
4848 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
4849
8e1d55a3
PA
48502013-02-14 Pedro Alves <palves@redhat.com>
4851
4852 Plug memory leak.
4853
4854 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
4855 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
4856
458820da
PA
48572013-02-14 Pedro Alves <palves@redhat.com>
4858
4859 * tracepoint.c (cmd_qtdpsrc): Use savestring.
4860
baea0dae
PA
48612013-02-14 Pedro Alves <palves@redhat.com>
4862
4863 * tracepoint.c (save_string): Delete.
4864 (add_tracepoint_action): Use savestring instead of save_string.
4865
0b1afbb3
PA
48662013-02-12 Pedro Alves <palves@redhat.com>
4867
4868 * linux-xtensa-low.c: Ditto.
4869 * xtensa-xtregs.c: Ditto.
4870
8a4ac37e
PA
48712013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
4872
4873 * thread-db.c (thread_db_get_tls_address): NULL pointer check
4874 thread_db.
4875
148de6bb
MS
48762013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
4877
4878 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
4879 aarch64_num_wp_regs and aarch64_num_bp_regs to
4880 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
4881
55fac6e0
MS
48822013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
4883
4884 * linux-aarch64-low.c (ps_get_thread_area): Replace
4885 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
4886
176eb98c
MS
48872013-02-04 Jim MacArthur <jim.macarthur@arm.com>
4888 Marcus Shawcroft <marcus.shawcroft@arm.com>
4889 Nigel Stephens <nigel.stephens@arm.com>
4890 Yufeng Zhang <yufeng.zhang@arm.com>
4891
4892 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
4893 (aarch64.c, aarch64-without-fpu.c): New targets.
4894 * configure.srv (aarch64*-*-linux*): New.
4895 * linux-aarch64-low.c: New file.
4896
56f7af9c
MS
48972013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
4898
43aaf8b6 4899 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
4900 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
4901 (dequeue_one_deferred_signal, linux_resume_one_thread)
4902 (fetch_register, linux_write_memory, linux_enable_event_reporting)
4903 (linux_tracefork_grandchild, linux_test_for_tracefork)
4904 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
4905 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
4906 where the argument is 0.
4907
60f662b0
YQ
49082013-01-25 Yao Qi <yao@codesourcery.com>
4909
4910 * event-loop.c: Include "queue.h".
4911 (gdb_event_p): New typedef.
4912 (struct gdb_event) <next_event>: Remove.
4913 (event_queue): Change to QUEUE(gdb_event_p).
4914 (async_queue_event): Remove.
4915 (gdb_event_xfree): New.
4916 (initialize_event_loop): New.
4917 (process_event): Use API from QUEUE.
4918 (wait_for_event): Likewise.
4919 * server.c (main): Call initialize_event_loop.
4920 * server.h (initialize_event_loop): Declare.
4921
5ae4861a
YQ
49222013-01-18 Yao Qi <yao@codesourcery.com>
4923
4924 * ax.h (struct eval_agent_expr_context): New.
4925 (gdb_eval_agent_expr): Update declaration.
4926 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
4927 TFRAME. Add new argument CTX.
4928 * server.h (struct eval_agent_expr_context): Declare.
4929 (agent_mem_read, agent_tsv_read): Update declaration.
4930 (agent_mem_read_string): Likewise.
4931 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
4932 (add_traceframe_block): Add new argument TPOINT.
4933 Increase TPOINT->traceframe_usage.
4934 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
4935 eval_tracepoint_agent_expr.
4936 (condition_true_at_tracepoint): Likewise.
4937 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
4938 (agent_mem_read_string, agent_tsv_read): Likewise.
4939
85e00e85
YQ
49402013-01-16 Yao Qi <yao@codesourcery.com>
4941
4942 * linux-low.c (linux_resume_one_lwp): Don't check
4943 'lwp->bp_reinsert != 0'.
4944
4039cf45
JB
49452013-01-07 Joel Brobecker <brobecker@adacore.com>
4946 Pedro Alves <palves@redhat.com>
4947
4948 * lynx-low.c (ptrace_request_to_str): Define a temporary
4949 macro and use it to simplify this function's implementation.
4950
9044dee2
JB
49512013-01-07 Joel Brobecker <brobecker@adacore.com>
4952
4953 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
4954 sets errno.
4955
e6352c8f
JB
49562013-01-07 Joel Brobecker <brobecker@adacore.com>
4957
4958 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
4959
50681a27
JB
49602013-01-07 Joel Brobecker <brobecker@adacore.com>
4961
4962 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
4963
3f6e77ef
JB
49642013-01-07 Joel Brobecker <brobecker@adacore.com>
4965
4966 * lynx-low.c (lynx_resume): Use the resume_info parameter
4967 to determine the ptid for the lynx_ptrace call, unless
4968 it is equal to minus_one_ptid, in which case we use the
4969 ptid of the current_inferior.
4970 (lynx_wait_1): After having received a thread create/exit
4971 event, resume the inferior's execution using the signaling
4972 thread's ptid, rather than the old ptid.
4973
7fda33ae
JB
49742013-01-07 Joel Brobecker <brobecker@adacore.com>
4975
4976 * lynx-low.c (lynx_resume): Delete variable ret.
4977
b9786c74
JB
49782013-01-01 Joel Brobecker <brobecker@adacore.com>
4979
4980 * gdbreplay.c (gdbreplay_version): Update copyright year.
4981 * server.c (gdbserver_version): Likewise.
4982
8b93d60f
JB
49832012-12-17 Joel Brobecker <brobecker@adacore.com>
4984
4985 * lynx-low.c (lynx_wait_1): Add debug trace before adding
4986 new thread.
4987
037335a7
JB
49882012-12-17 Joel Brobecker <brobecker@adacore.com>
4989
4990 * lynx-low.c (ptrace_request_to_str): Add handling for
4991 PTRACE_GETTRACESIG.
4992
52d4cbd8
JB
49932012-12-17 Joel Brobecker <brobecker@adacore.com>
4994
4995 * lynx-low.c (lynx_attach): Delete variable new_process.
4996
ab8f6ca9
JB
49972012-12-17 Joel Brobecker <brobecker@adacore.com>
4998
4999 * lynx-low.c (lynx_create_inferior): Delete variable
5000 new_process.
5001
78cbc024
JB
50022012-12-17 Joel Brobecker <brobecker@adacore.com>
5003
5004 * lynx-low.c (ptrace_request_to_str): Do not handle
5005 PTRACE_GETTHREADLIST if this macro does not exist.
5006
14a00470
YQ
50072012-12-15 Yao Qi <yao@codesourcery.com>
5008
5009 * Makefile.in (OBS): Add notif.o.
5010 * notif.c, notif.h: New.
5011 * server.c: Include "notif.h".
5012 (struct vstop_notif) <next>: Remove.
5013 <base>: New field.
5014 (queue_stop_reply): Update.
5015 (push_event, send_next_stop_reply): Remove.
5016 (discard_queued_stop_replies): Update.
5017 (notif_stop): New variable.
5018 (handle_v_stopped): Remove.
5019 (handle_v_requests): Don't call handle_v_stopped. Call
5020 handle_ack_notif instead.
5021 (queue_stop_reply_callback): Call notif_event_enque instead
5022 of queue_stop_reply.
5023 (handle_status): Don't call send_next_stop_reply, call
5024 notif_write_event instead.
5025 (kill_inferior_callback): Likewise.
5026 (detach_or_kill_inferior_callback): Likewise.
5027 (main): Call initialize_notif.
5028 (process_serial_event): Call QUEUE_is_empty.
5029 (handle_target_event): Call notif_push instead of push event.
5030 * server.h (push_event): Remove declaration.
5031
61c125b9
TT
50322012-12-10 Tom Tromey <tromey@redhat.com>
5033
5034 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
5035 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
5036 macros.
5037 (.c.o): Rewrite.
5038 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
5039 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
5040 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
5041 (amd64-linux-ipa.o, ax.o): Rewrite.
5042 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
5043 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
5044 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
5045 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
5046 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
5047 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
5048 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
5049 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
5050 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
5051 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
5052 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
5053 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
5054 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
5055 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
5056 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
5057 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
5058 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
5059 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
5060 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
5061 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
5062 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
5063 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
5064 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
5065 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
5066 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
5067 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
5068 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
5069 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
5070 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
5071 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
5072 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
5073 (reg-tilegx.o): Remove.
5074 (all_object_files): New macro.
5075 Include .deps files.
5076 * aclocal.m4, configure: Rebuild.
5077 * acinclude.m4: Include depstand.m4, lead-dot.m4.
5078 * configure.ac: Invoke ZW_CREATE_DEPDIR,
5079 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
5080
e90e9ad9
TT
50812012-12-05 Tom Tromey <tromey@redhat.com>
5082
5083 PR gdb/14917:
5084 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
5085
02d403bf 50862012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
5087
5088 * configure.ac: Check for linux/perf_event.h.
5089 * config.in: Regenerated.
5090 * configure: Regenerated.
5091
0270a750
PA
50922012-11-26 Maxime Villard <rustyBSD@gmx.fr>
5093
5094 * hostio.c (handle_readlink): Decrease buffer size
5095 parameter passed to readlink by one byte.
5096
8c29b58e
YQ
50972012-11-26 Yao Qi <yao@codesourcery.com>
5098
5099 * configure.ac (build_warnings): Append '-Wempty-body'.
5100 * configure: Regenerated.
5101 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
5102 body.
5103
8bdce1ff
PM
51042012-11-15 Pierre Muller <muller@sourceware.org>
5105
5106 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
5107 * config.in: Regenerate.
5108 * configure: Regenerate.
5109 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
5110 Use "gdb_wait.h" header instead of <sys/wait.h> header.
5111 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
5112 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
5113 header.
5114 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
5115 instead of <sys/wait.h> header.
5116 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
5117
02d403bf 51182012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
5119
5120 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
5121 (various make rules): Remove -DGDBSERVER
5122
fbd5db48
YQ
51232012-11-09 Yao Qi <yao@codesourcery.com>
5124
5125 * spu-low.c (current_ptid): Move it to ..
5126 * gdbthread.h: ... here. New.
5127 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
5128 * server.c (myresume, process_serial_event): Likewise.
5129 * thread-db.c (thread_db_find_new_threads): Likewise.
5130 * tracepoint.c (run_inferior_command): Likewise.
5131
b3dc46ff
AB
51322012-10-01 Andrew Burgess <aburgess@broadcom.com>
5133
5134 * server.c (handle_search_memory_1): Include access length in
5135 warning message.
5136
07c04788
HPN
51372012-09-05 Michael Brandt <michael.brandt@axis.com>
5138
5139 * linux-crisv32-low.c: Fix compile errors.
5140
918d227b
YQ
51412012-09-04 Yao Qi <yao@codesourcery.com>
5142
5143 * tracepoint.c (cmd_qtsv): Adjust debug message.
5144 Don't check CUR_TPOINT.
5145
18c1b81a
YQ
51462012-08-28 Yao Qi <yao@codesourcery.com>
5147
5148 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
5149 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
5150 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
5151 Remove declarations of xmalloc, xreallloc, xstrdup and
5152 freeargv.
5153 * Makefile.in (libiberty_h): New.
5154 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
5155 (linux-bfin-low.o): Append dependency 'libiberty.h'.
5156
dc82f37b
YQ
51572012-08-23 Yao Qi <yao@codesourcery.com>
5158
5159 * server.h: Remove declaration of 'xsnprintf'.
5160
406b1477
KS
51612012-08-22 Keith Seitz <keiths@redhat.com>
5162
5163 * server.h: Include build-gnulib-gbserver/config.h.
5164 * gdbreplay.c: Likewise.
5165
e6712ff1
DE
51662012-08-08 Doug Evans <dje@google.com>
5167
5168 * Makefile.in (SFILES): Add gdb_vecs.c.
5169 (OBS): Add gdb_vecs.o.
5170 (gdb_vecs_h, host_defs_h): New variables.
5171 (thread-db.o): Add $(gdb_vecs_h) dependency.
5172 (gdb_vecs.o): New rule.
5173 * thread-db.c: #include "gdb_vecs.h".
5174 (thread_db_load_search): Use a vector to iterate over path elements.
5175 Handle text appearing after "$pdir".
5176
5177 * configure.ac: Add check for strstr.
5178 * config.in: Regenerate.
5179 * configure: Regenerate.
5180
7c3270ae
UW
51812012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
5182
5183 * hostio.c (handle_pread): If pread fails, fall back to attempting
5184 lseek/read.
5185 (handle_pwrite): Likewise for pwrite.
5186
b62e2b27
UW
51872012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
5188
5189 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
5190 between unsupported TYPE and unimplementable ADDR/LEN combination.
5191 (arm_insert_point): Act on new return value.
5192
78a99e91
PA
51932012-07-31 Pedro Alves <palves@redhat.com>
5194
5195 * server.c (process_point_options): Only skip tokens if we find
5196 one that is unrecognized. Don't treat 'X' specially while
5197 skipping unrecognized tokens.
5198
fcf303ab
UW
51992012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
5200
5201 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
5202 to 4-byte-align HW breakpoint addresses for Thumb.
5203
7255706c
YQ
52042012-07-27 Yao Qi <yao@codesourcery.com>
5205
5206 PR remote/14161.
5207
5208 * server.h: Declare gdb_agent_about_to_close.
5209 * target.c (kill_inferior): Include "agent.h".
5210 New. Send command 'kill'.
5211 * target.h (kill_inferior): Removed macro.
5212 * tracepoint.c (gdb_agent_about_to_close): New.
5213 (gdb_agent_helper_thread): Handle command 'close'.
5214 Wait endlessly until the inferior stops.
5215 Install gdb_agent_remove_socket to atexit hook.
5216 (agent_socket_name): New static variable.
5217 (gdb_agent_socket_init): Replace local variable 'name' with
5218 'agent_socket_name'.
5219 (gdb_agent_remove_socket): New.
5220
5a3f286f
YQ
52212012-07-27 Yao Qi <yao@codesourcery.com>
5222
5223 * server.c (process_point_options): Stop at 'X' when parsing.
5224
961bd387
ME
52252012-07-19 Michael Eager <eager@eagercon.com>
5226
a261b8f5 5227 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
5228 to hw_execute.
5229 * linux-x86-low.c (x86_insert_point, x86_remove_point):
5230 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
5231 hardware breakpoint.
5232
aa7c7447
JK
52332012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5234
5235 * gdbserver/linux-low.c (initialize_low): Call
5236 linux_ptrace_init_warnings.
5237
7f216e7c
DE
52382012-07-02 Doug Evans <dje@google.com>
5239
5240 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
5241 pointer to int.
5242
d3ce09f5
SS
52432012-07-02 Stan Shebs <stan@codesourcery.com>
5244
5245 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
5246 (ax.o): Add it to build rule.
5247 (ax-ipa.o): Ditto.
5248 (OBS): Add format.o.
5249 (IPA_OBS): Add format.o.
5250 * server.c (handle_query): Claim support for breakpoint commands.
5251 (process_point_options): Add command case.
5252 (process_serial_event): Leave running if there are printfs in
5253 effect.
5254 * mem-break.h (any_persistent_commands): Declare.
5255 (add_breakpoint_commands): Declare.
5256 (gdb_no_commands_at_breakpoint): Declare.
5257 (run_breakpoint_commands): Declare.
5258 * mem-break.c (struct point_command_list): New struct.
5259 (struct breakpoint): New field command_list.
5260 (any_persistent_commands): New function.
5261 (add_commands_to_breakpoint): New function.
5262 (add_breakpoint_commands): New function.
5263 (gdb_no_commands_at_breakpoint): New function.
5264 (run_breakpoint_commands): New function.
5265 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
5266 locally.
5267 * ax.c: Include format.h.
5268 (ax_printf): New function.
5269 (gdb_eval_agent_expr): Add printf opcode.
5270
2f8f6aed
YQ
52712012-06-13 Yao Qi <yao@codesourcery.com>
5272
5273 * server.c (start_inferior): Remove duplicated writes to fields
5274 'last_resume_kind' and 'last_status' of 'current_inferior'.
5275
0c9070b3
YQ
52762012-06-12 Yao Qi <yao@codesourcery.com>
5277 Pedro Alves <palves@redhat.com>
5278
5279 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
5280 comment.
5281 * server.c (handle_v_cont): Extend comment.
5282
c52daf70
YQ
52832012-06-11 Yao Qi <yao@codesourcery.com>
5284
5285 * linux-low.c (linux_attach): Add 'static'.
5286
d38bbb0a
YQ
52872012-06-06 Yao Qi <yao@codesourcery.com>
5288
5289 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
5290
89dc0afd
JK
52912012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
5292
5293 Fix gcc -flto compilation warning.
5294 * server.c (main): Make variable multi_mode and attach volatile.
5295
75f62ce7
TJB
52962012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5297
5298 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
5299 if the platform doesn't know about it.
5300
65f479b6
PA
53012012-05-30 Jeff Kenton <jkenton@tilera.com>
5302
5303 * Makefile.in (SFILES): Add linux-tile-low.c.
5304 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
5305 * configure.srv: Handle tilegx-*-linux*.
5306 * linux-tile-low.c: New file.
5307
0c5bf5a9
JK
53082012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5309
5310 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
5311
a493e3e2
PA
53122012-05-24 Pedro Alves <palves@redhat.com>
5313
5314 PR gdb/7205
5315
43aaf8b6 5316 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 5317
2ea28649
PA
53182012-05-24 Pedro Alves <palves@redhat.com>
5319
5320 PR gdb/7205
5321
5322 Replace target_signal with gdb_signal throughout.
5323
8d409d16
MR
53242012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
5325
5326 * linux-low.c (linux_store_registers): Avoid the copying sequence
5327 when no data has been retrieved by ptrace.
5328
23512c01
MGD
53292012-05-22 Will Deacon <will.deacon@arm.com>
5330
5331 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
5332 Include asm/ptrace.h.
5333 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
5334 already defined.
5335
4934b29e
MR
53362012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
5337
5338 * linux-low.c (linux_store_registers): Don't re-retrieve data
5339 with ptrace that has already been obtained from /proc. Always
5340 copy any data retrieved with ptrace to the buffer supplied.
5341
bde24c0a
PA
53422012-05-11 Yao Qi <yao@codesourcery.com>
5343 Pedro Alves <palves@redhat.com>
5344
5345 * linux-low.c (enum stopping_threads_kind): New.
5346 (stopping_threads): Change type to `enum stopping_threads_kind'.
5347 (handle_extended_wait): If stopping and suspending threads, leave
5348 the new_lwp suspended too.
5349 (linux_wait_for_event): Adjust.
5350 (stop_all_lwps): Set `stopping_threads' to
5351 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
5352 whether we're suspending threads or just stopping them. Assert no
5353 recursion happens.
5354
623b6bdf
YQ
53552012-04-29 Yao Qi <yao@codesourcery.com>
5356
5357 * server.h: Move some code to ...
5358 * gdbthread.h: ... here. New.
5359 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
5360 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
5361 (nto-low.o, win32-low.o): Likewise.
5362 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
5363 * regcache.c, remote-utils.c, server.c: Likewise.
5364 * target.c, tracepoint.c, win32-low.c: Likewise.
5365
f15f9948
TJB
53662012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5367
5368 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
5369 (PTRACE_ARG4_TYPE): Likewise.
5370 (PTRACE_XFER_TYPE): Likewise.
5371 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
5372 ptrace to PTRACE_ARG3_TYPE.
5373 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
5374 (PTRACE_ARG4_TYPE): Likewise.
5375 (PTRACE_XFER_TYPE): Likewise.
5376 (linux_detach_one_lwp): Cast fourth argument of
5377 ptrace to long then PTRACE_ARG4_TYPE.
5378 (regsets_fetch_inferior_registers): Cast third argument of
5379 ptrace to long then PTRACE_ARG3_TYPE.
5380 (regsets_store_inferior_registers): Likewise.
5381
38ea300a
PA
53822012-04-20 Pedro Alves <palves@redhat.com>
5383
5384 * configure: Regenerate.
5385
c971b7fa
PA
53862012-04-19 Pedro Alves <palves@redhat.com>
5387
43aaf8b6 5388 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 5389 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
5390 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
5391 (all, install-only, uninstall, clean-info, all-lib, clean): No
5392 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
5393 (maintainer-clean realclean distclean): Use subdir_do.
5394 (subdir_do): New.
5395 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 5396 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
5397 * acinclude.m4: Include acx_configure_dir.m4.
5398 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
5399 calls. Call AC_PROG_RANLIB. Configure gnulib using
5400 ACX_CONFIGURE_DIR.
5401 (GNULIB): New.
5402 (GNULIB_STDINT_H): Adjust.
5403 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
5404 * gdbreplay.c: Include build-gnulib/config.h.
5405 * server.h: Likewise.
5406 * aclocal.m4: Regenerate.
5407 * config.in: Regenerate.
5408 * configure: Regenerate.
c971b7fa 5409
809277f8
PA
54102012-04-19 Pedro Alves <palves@redhat.com>
5411
5412 * Makefile.in (LIBGNU, INCGNU): Adjust.
5413 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
5414 (all, install-only, uninstall, clean-info, all-lib, clean)
5415 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
5416 * configure.ac: Adjust AC_OUTPUT output.
5417 * aclocal.m4: Regenerate.
5418 * configure: Regenerate.
5419
fd9bb8b8
PA
54202012-04-19 Pedro Alves <palves@redhat.com>
5421
5422 * Makefile.in (generated_files): New.
5423 (server_h): Remove the explicit dependency on config.h, and depend
5424 on $generated_files.
5425
1c298c66
PA
54262012-04-19 Pedro Alves <palves@redhat.com>
5427
5428 * Makefile.in (INCGNU): Add -Ignulib.
5429
57c4b50b
PA
54302012-04-19 Pedro Alves <palves@redhat.com>
5431
5432 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
5433 (INCGNU): ... this, and spell out -I here.
5434 (GNULIB_LIB): Rename to ...
5435 (LIBGNU): ... this.
5436 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
5437
1030e047
PA
54382012-04-19 Pedro Alves <palves@redhat.com>
5439
5440 * config.in: Regenerate.
5441
447d4319
PA
54422012-04-19 Pedro Alves <palves@redhat.com>
5443
5444 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
5445 * server.h (memmem): Remove declaration.
5446 * config.in: Regenerate.
5447 * configure: Regenerate.
5448
aad9eab9
YQ
54492012-04-19 Yao Qi <yao@codesourcery.com>
5450
5451 * Makefile.in (SFILES): Add common/vec.c.
5452 (OBS): Add vec.o.
5453 (vec.o): New rule.
5454
3e10640f
YQ
54552012-04-19 Yao Qi <yao@codesourcery.com>
5456
5457 * remote-utils.c (prepare_resume_reply): Replace with macro
5458 target_core_of_thread.
5459 * server.c (handle_qxfer_threads_proper): Likewise.
5460 * target.h (traget_core_of_thread): New macro.
5461
71622373
PA
54622012-04-18 Pedro Alves <palves@redhat.com>
5463
5464 * aclocal.m4: Regenerate.
5465 * configure: Regenerate.
5466
80d26939
YQ
54672012-04-16 Yao Qi <yao@codesourcery.com>
5468
5469 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
5470 duplicated on address.
5471
42476b70
YQ
54722012-04-16 Yao Qi <yao@codesourcery.com>
5473
5474 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
5475 (struct tracepoint_action_ops) <send>: New field.
5476 (m_tracepoint_action_send, r_tracepoint_action_send): New.
5477 (agent_expr_send, x_tracepoint_action_send): New.
5478 (l_tracepoint_action_send): New.
5479 (cmd_qtdp): Download and install tracepoint
5480 according to `use_agent'.
5481 (run_inferior_command): Add one more parameter `len'.
5482 Update callers.
5483 (tracepoint_send_agent): New.
5484 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
5485
7bc83639
YQ
54862012-04-16 Yao Qi <yao@codesourcery.com>
5487
5488 * tracepoint.c (download_tracepoints): Moved to ...
5489 (cmd_qtstart): ... here.
5490
5f18041e
YQ
54912012-04-14 Yao Qi <yao@codesourcery.com>
5492
5493 * tracepoint.c: Include inttypes.h.
5494 (struct collect_memory_action): Use sized types.
5495 (struct tracepoint): Likewise.
5496 (cmd_qtdp, stop_tracing): Update print specifiers.
5497 (cmd_qtp, response_tracepoint): Likewise.
5498 (collect_data_at_tracepoint): Likewise.
5499 (collect_data_at_step): Likewise.
5500
55a8c076
YQ
55012012-04-14 Yao Qi <yao@codesourcery.com>
5502
5503 Import gnulib module inttypes.
5504 * aclocal.m4, config.in, configure: Regenerated.
5505
dc750257
YQ
55062012-04-14 Yao Qi <yao@codesourcery.com>
5507
5508 * Makefile.in (maintainer-clean, realclean, distclean): Remove
5509 Makefile and config.status at last.
5510
0ab5faf9
YQ
55112012-04-13 Yao Qi <yao@codesourcery.com>
5512
5513 * tracepoint.c: Include stdint.h unconditionally.
5514
18f5fd81
TJB
55152012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5516
5517 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
5518 on BFD_HAVE_SYS_PROCFS_TYPE.
5519 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
5520 * configure: Regenerate.
5521 * config.in: Likewise.
5522
4d47af5c
L
55232012-04-13 H.J. Lu <hongjiu.lu@intel.com>
5524
5525 * Makefile.in (clean): Also remove x32.c x32-linux.c
5526 x32-avx.c x32-avx-linux.c.
5527 (x32.o): New target.
5528 (x32.c): Likewise.
5529 (x32-linux.o): Likewise.
5530 (x32-linux.c): Likewise.
5531 (x32-avx.o): Likewise.
5532 (x32-avx.c): Likewise.
5533 (x32-avx-linux.o): Likewise.
5534 (x32-avx-linux.c): Likewise.
5535
5536 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
5537 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
5538 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
5539 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
5540 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
5541 i386/x32-avx-linux.xml.
5542
5543 * linux-x86-low.c (init_registers_x32_linux): New prototype.
5544 (init_registers_x32_avx_linux): Likwise.
5545 (x86_linux_update_xmltarget): Call init_registers_x32_linux
5546 or init_registers_x32_avx_linux if linux_is_elf64 is false.
5547
ecedbe58
PA
55482012-04-13 Pedro Alves <palves@redhat.com>
5549
5550 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
5551 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
5552 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
5553 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
5554 the sub-make.
5555
c92b5177
L
55562012-04-12 H.J. Lu <hongjiu.lu@intel.com>
5557
5558 * linux-x86-low.c (compat_x32_clock_t): New.
5559 (compat_x32_siginfo_t): Likewise.
5560 (compat_x32_siginfo_from_siginfo): Likewise.
5561 (siginfo_from_compat_x32_siginfo): Likewise.
5562 (linux_is_elf64): Likewise.
5563 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
5564 and siginfo_from_compat_x32_siginfo for x32.
5565 (x86_arch_setup): Set linux_is_elf64.
5566
214d508e
L
55672012-04-12 H.J. Lu <hongjiu.lu@intel.com>
5568
5569 PR gdb/13969
5570 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
5571 e_machine field.
5572 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
5573 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
5574 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
5575 compatible with process.
5576
c9a1864a
YQ
55772012-04-12 Yao Qi <yao@codesourcery.com>
5578
5579 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
5580 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
5581 (install-only, install-info, clean): Handle sub dir gnulib.
5582 (all-lib, am--refresh): New targets.
5583 (memmem.o): Remove target.
5584 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
5585 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
5586 (AC_REPLACE_FUNCS): Remove memmem.
5587 Invoke gl_INIT and AM_INIT_AUTOMAKE.
5588 (AC_OUTPUT): Generate Makefile in gnulib/.
5589 * aclocal.m4, config.in, configure: Regenerated.
5590
367ba2c2
MR
55912012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
5592
5593 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
5594
9d236627
PA
55952012-04-05 Pedro Alves <palves@redhat.com>
5596
5597 -Werror=strict-aliasing
5598
5599 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
5600 pointer.
5601
111217b3
PA
56022012-04-04 Pedro Alves <palves@redhat.com>
5603
5604 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
5605 (sparc_store_gregset_from_stack, sparc_store_gregset)
5606 (sparc_breakpoint_at): Fix formatting.
5607
8365dcf5
TJB
56082012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5609
5610 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
5611 are available.
5612 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
5613 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
5614 * config.in: Regenerate.
5615 * configure: Likewise.
5616
689cc2ae
PA
56172012-03-29 Pedro Alves <palves@redhat.com>
5618
5619 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
5620 Correct ptrace arguments.
5621
c14dfd32
PA
56222012-03-28 Pedro Alves <palves@redhat.com>
5623
5624 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
5625 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
5626 (IA64_FR1_REGNUM): New defines.
5627 (ia64_fetch_register): New.
5628 (the_low_target): Install it.
5629 * linux-low.h (struct linux_target_ops) <fetch_register>: New
5630 field.
5631 * linux-low.c (linux_fetch_registers): Try the
5632 the_low_target.fetch_register hook first.
5633
5634 * linux-arm-low.c (the_low_target): Adjust.
5635 * linux-bfin-low.c (the_low_target): Adjust.
5636 * linux-cris-low.c (the_low_target): Adjust.
5637 * linux-crisv32-low.c (the_low_target): Adjust.
5638 * linux-m32r-low.c (the_low_target): Adjust.
5639 * linux-m68k-low.c (the_low_target): Adjust.
5640 * linux-mips-low.c (the_low_target): Adjust.
5641 * linux-ppc-low.c (the_low_target): Adjust.
5642 * linux-s390-low.c (the_low_target): Adjust.
5643 * linux-sh-low.c (the_low_target): Adjust.
5644 * linux-sparc-low.c (the_low_target): Adjust.
5645 * linux-tic6x-low.c (the_low_target): Adjust.
5646 * linux-x86-low.c (the_low_target): Adjust.
5647 * linux-xtensa-low.c (the_low_target): Adjust.
5648
63c88e13
PA
56492012-03-26 Pedro Alves <palves@redhat.com>
5650
5651 * server.c (handle_qxfer_libraries): Don't bail early if
5652 the_target->qxfer_libraries_svr4 is not NULL.
5653
fb723180
PA
56542012-03-26 Pedro Alves <palves@redhat.com>
5655
5656 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
5657
0afae3cf
PA
56582012-03-23 Pedro Alves <palves@redhat.com>
5659
5660 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
5661 "library-list-svr4" element's start tag when the the DSO list is
5662 empty.
5663
485f1ee4
PA
56642012-03-23 Pedro Alves <palves@redhat.com>
5665
5666 * linux-low.c (read_one_ptr): Read the inferior's pointer through
5667 a variable whose type size is the same as the inferior's pointer
5668 size.
5669
a5362b9a
TS
56702012-03-21 Thomas Schwinge <thomas@codesourcery.com>
5671
5672 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
5673 struct siginfo.
5674 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
5675 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
5676 * linux-low.h: Include <signal.h>.
5677 (struct siginfo): Remove forward declaration.
5678 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
5679 struct siginfo.
5680
d226c142
MF
56812012-03-21 Mike Frysinger <vapier@gentoo.org>
5682
5683 * .gitignore: Ignore more files.
5684
122f36ef
PA
56852012-03-19 Pedro Alves <palves@redhat.com>
5686 Jan Kratochvil <jan.kratochvil@redhat.com>
5687
5688 * server.c (cont_thread, general_thread): Add describing comments.
5689 (start_inferior): Clear `cont_thread'.
5690 (handle_v_cont): Don't set `cont_thread' if resuming all threads
5691 of a process.
5692
fc3e5175
YQ
56932012-03-15 Yao Qi <yao@codesourcery.com>
5694
5695 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
5696 handling to ...
5697 (cmd_qtdp): ... here.
5698
8d0d92cd
YQ
56992012-03-15 Yao Qi <yao@codesourcery.com>
5700
5701 * tracepoint.c (struct tracepoint_action_ops): New.
5702 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
5703 (m_tracepoint_action_download): New.
5704 (r_tracepoint_action_download): New.
5705 (x_tracepoint_action_download): New.
5706 (l_tracepoint_action_download): New.
5707 (add_tracepoint_action): Install `action->ops' according type.
5708 (download_tracepoint_1): Move code `download' function pointer
5709 of various tracepoint_action_ops.
5710
87b0bb13
JK
57112012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
5712
5713 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
5714 linux_ptrace_attach_warnings.
5715
5f572dec
JK
57162012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
5717
5718 * Makefile.in (linux-ptrace.o): New.
5719 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
5720 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
5721 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
5722 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
5723 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
5724 of these targets.
5725 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
5726
f4647387
YQ
57272012-03-08 Yao Qi <yao@codesourcery.com>
5728 Pedro Alves <palves@redhat.com>
5729
5730 Fix PR server/13392.
5731 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
5732 offset of JMP insn.
5733 * tracepoint.c (remove_tracepoint): New.
5734 (cmd_qtdp): Call remove_tracepoint when failed to install.
5735
9b224c5e
PA
57362012-03-07 Pedro Alves <palves@redhat.com>
5737
5738 * linux-low.c (get_detach_signal): New.
5739 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
5740 Pass on pending signals to PTRACE_DETACH. Check the result of the
5741 ptrace call.
5742 * server.c (program_signals, program_signals_p): New.
5743 (handle_general_set): Handle QProgramSignals.
5744 * server.h (program_signals, program_signals_p): Declare.
5745
e237a7e2
JK
57462012-03-05 Pedro Alves <palves@redhat.com>
5747 Jan Kratochvil <jan.kratochvil@redhat.com>
5748
5749 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
5750 New comment why.
5751
5808517f
YQ
57522012-03-03 Yao Qi <yao@codesourcery.com>
5753
5754 * tracepoint.c (tracepoint_look_up_symbols): Update call to
5755 agent_look_up_symbols.
5756
58b4daa5
YQ
57572012-03-03 Yao Qi <yao@codesourcery.com>
5758
5759 * Makefile.in (linux-low.o): Keep dependence on agent.h.
5760 (linux-x86-low.o): Likewise.
5761 * server.h: Remove in_process_agent_loaded.
5762 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
5763 common/agent.c.
5764 Update callers.
5765
8ffcbaaf
YQ
57662012-03-03 Yao Qi <yao@codesourcery.com>
5767
5768 * tracepoint.c (gdb_agent_capability): New global.
5769 (in_process_agent_loaded_ust): Renamed to
5770 `in_process_agent_supports_ust'.
5771 Update callers.
5772 (in_process_agent_supports_ust): Call agent_capability_check.
5773 (clear_installed_tracepoints): Assert that agent supports
5774 agent.
5775
d1feda86
YQ
57762012-03-03 Yao Qi <yao@codesourcery.com>
5777
5778 * linux-low.c (linux_supports_agent): New.
5779 (linux_target_ops): Initialize field `supports_agent' with
5780 linux_supports_agent.
5781 * target.h (struct target_ops) <supports_agent>: New.
5782 (target_supports_agent): New macro.
5783 * server.c (handle_general_set): Handle packet 'QAgent'.
5784 (handle_query): Send `QAgent+'.
5785 * Makefile.in (server.o): Depends on agent.h.
5786
2fa291ac
YQ
57872012-03-03 Yao Qi <yao@codesourcery.com>
5788
5789 * Makefile.in (OBS): Add agent.o.
5790 Add new rule for agent.o.
5791 Track dependence of tracepoint.c on agent.h.
5792 * tracepoint.c (run_inferior_command_1):
5793 (run_inferior_command): Call agent_run_command.
5794 (gdb_ust_connect_sync_socket): Deleted. Move it to
5795 common/agent.c.
5796 (resume_thread, stop_thread): Likewise.
5797 (gdb_ust_socket_init): Renamed to ...
5798 (gdb_agent_socket_init): ... New.
5799 (gdb_ust_thread): Renamed to ...
5800 (gdb_agent_helper_thread): ... New.
5801 (gdb_ust_init): Move some code to ...
5802 (gdb_agent_init): ... here. New.
5803 [HAVE_UST]: Call gdb_ust_init.
5804 (initialize_tracepoint_ftlib): Call gdb_agent_init.
5805 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
5806 * config.in, configure: Regenerated.
5807
05044653
PA
58082012-03-02 Pedro Alves <palves@redhat.com>
5809
5810 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
5811 * linux-low.c (struct simple_pid_list): New.
5812 (stopped_pids): New a struct simple_pid_list pointer.
5813 (add_to_pid_list, pull_pid_from_list): New.
5814 (handle_extended_wait): Don't assume the first signal new children
5815 report is SIGSTOP. Adjust call to pull_pid_from_list.
5816 (linux_wait_for_lwp): Adjust.
5817
8d00225b
YQ
58182012-03-02 Yao Qi <yao@codesourcery.com>
5819
5820 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
5821 debug log.
5822
19560ba5
YQ
58232012-03-02 Yao Qi <yao@codesourcery.com>
5824
5825 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
5826 `stop_pc' and `tpoint'. Update caller.
5827
1faeff08
MR
58282012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
5829
5830 * linux-low.h (linux_target_ops): Add regset_bitmap member.
5831 * linux-low.c (use_linux_regsets): New macro.
5832 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
5833 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
5834 (linux_register_in_regsets): New function.
5835 (usr_fetch_inferior_registers): Skip registers covered by
5836 regsets.
5837 (usr_store_inferior_registers): Likewise.
5838 (usr_fetch_inferior_registers): New macro.
5839 (usr_store_inferior_registers): Likewise.
5840 (linux_fetch_registers): Handle mixed regset/non-regset targets.
5841 (linux_store_registers): Likewise.
5842 * linux-mips-low.c (init_registers_mips_dsp_linux): New
5843 prototype.
5844 (init_registers_mips64_dsp_linux): Likewise.
5845 (init_registers_mips_linux): New macro.
5846 (init_registers_mips_dsp_linux): Likewise.
5847 (mips_dsp_num_regs): Likewise.
5848 (DSP_BASE, DSP_CONTROL): New fallback macros.
5849 (mips_base_regs): New macro.
5850 (mips_regmap): Use it. Fix the size.
5851 (mips_dsp_regmap): New variable.
5852 (mips_dsp_regset_bitmap): Likewise.
5853 (mips_arch_setup): New function.
5854 (mips_cannot_fetch_register): Use the_low_target.regmap rather
5855 than mips_regmap.
5856 (mips_cannot_store_register): Likewise.
5857 (the_low_target): Update .arch_setup, .num_regs and .regmap
5858 initializers. Add .regset_bitmap initializer.
5859 * linux-arm-low.c (the_low_target): Add .regset_bitmap
5860 initializer.
5861 * linux-bfin-low.c (the_low_target): Likewise.
5862 * linux-cris-low.c (the_low_target): Likewise.
5863 * linux-crisv32-low.c (the_low_target): Likewise.
5864 * linux-ia64-low.c (the_low_target): Likewise.
5865 * linux-m32r-low.c (the_low_target): Likewise.
5866 * linux-m68k-low.c (the_low_target): Likewise.
5867 * linux-ppc-low.c (the_low_target): Likewise.
5868 * linux-s390-low.c (the_low_target): Likewise.
5869 * linux-sh-low.c (the_low_target): Likewise.
5870 * linux-sparc-low.c (the_low_target): Likewise.
5871 * linux-tic6x-low.c (the_low_target): Likewise.
5872 * linux-x86-low.c (the_low_target): Likewise.
5873 * linux-xtensa-low.c (the_low_target): Likewise.
5874 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
5875 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
5876 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
5877 srv_xmlfiles.
5878 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
5879 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
5880
c03e6ccc
YQ
58812012-02-29 Yao Qi <yao@codesourcery.com>
5882 Pedro Alves <palves@redhat.com>
5883
5884 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
5885 `step_over_finished' is true.
5886
644cebc9
PA
58872012-02-27 Pedro Alves <palves@redhat.com>
5888
5889 * linux-low.c (pid_is_stopped): Delete, moved to common/.
5890 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
5891
c14d7ab2
PA
58922012-02-27 Pedro Alves <palves@redhat.com>
5893
5894 PR server/9684
5895 * linux-low.c (pid_is_stopped): New.
5896 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
5897
412c89dd
LM
58982012-02-25 Luis Machado <lgustavo@codesourcery.com>
5899
5900 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
5901 of conditions.
5902
b745defe
MR
59032012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
5904
5905 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
5906
9f3a5c85
LM
59072012-02-24 Luis Machado <lgustavo@codesourcery>
5908
5909 * server.c (handle_query): Advertise support for target-side
5910 breakpoint condition evaluation.
5911 (process_point_options): New function.
5912 (process_serial_event): When inserting a breakpoint, check for
5913 a target-side condition that should be evaluated.
5914
5915 * mem-break.c: Include regcache.h and ax.h.
5916 (point_cond_list_t): New data structure.
5917 (breakpoint) <cond_list>: New field.
5918 (find_gdb_breakpoint_at): Make non-static.
5919 (delete_gdb_breakpoint_at): Clear any target-side
5920 conditions.
5921 (clear_gdb_breakpoint_conditions): New function.
5922 (add_condition_to_breakpoint): Likewise.
5923 (add_breakpoint_condition): Likewise.
5924 (gdb_condition_true_at_breakpoint): Likewise.
5925 (gdb_breakpoint_here): Return result directly instead
5926 of going through a local variable.
5927
5928 * mem-break.h (find_gdb_breakpoint_at): New prototype.
5929 (clear_gdb_breakpoint_conditions): Likewise.
5930 (add_breakpoint_condition): Likewise.
5931 (gdb_condition_true_at_breakpoint): Likewise.
5932
5933 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
5934 (need_step_over_p): Take target-side breakpoint condition into
5935 consideration.
5936
5e1dc496
LM
59372012-02-24 Luis Machado <lgustavo@codesourcery>
5938
5939 * server.h: Include tracepoint.h.
5940 (agent_mem_read, agent_get_trace_state_variable_value,
5941 agent_set_trace_state_variable_value,
5942 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
5943 get_set_tsv_func_addr): New prototypes.
5944
5945 * ax.h: New include file.
5946 * ax.c: New source file.
5947
5948 * tracepoint.c: Include ax.h.
5949 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
5950 agent_expr, eval_result_type): Move to ax.h.
5951 (parse_agent_expr): Rename to ...
5952 (gdb_parse_agent_expr): ... this, make it non-static and move
5953 to ax.h.
5954 (unparse_agent_expr) Rename to ...
5955 (gdb_unparse_agent_expr): ... this, make it non-static and move
5956 to ax.h.
5957 (eval_agent_expr): Rename to ...
5958 (eval_tracepoint_agent_expr): ... this.
5959 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
5960 forward declarations.
5961 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
5962 (agent_get_trace_state_variable_value): New function.
5963 (agent_set_trace_state_variable_value): New function.
5964 (cmd_qtdp): Call gdb_parse_agent_expr (...).
5965 (response_tracepoint): Call gdb_unparse_agent_expr (...).
5966 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
5967 (condition_true_at_tracepoint): Likewise.
5968 (parse_agent_expr): Rename to ...
5969 (gdb_parse_agent_expr): ... this and move to ax.c.
5970 (unparse_agent_expr): Rename to ...
5971 (gdb_unparse_agent_expr): ... this and move to ax.c.
5972 (gdb_agent_op_name): Move to ax.c.
5973 (eval_agent_expr): Rename to ...
5974 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
5975 and move to ax.c.
5976 (eval_tracepoint_agent_expr): New function.
5977 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 5978 non-static.
5e1dc496
LM
5979 (current_insn_ptr, emit_error, struct bytecode_address): Move to
5980 ax.c.
5981 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
5982 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
5983 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
5984 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
5985 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
5986 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
5987 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
5988 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
5989 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
5990 (compile_bytecodes): Remove forward declaration.
5991 (is_goto_target): Move to ax.c.
5992 (compile_bytecodes): Move to ax.c and call
5993 agent_get_trace_state_variable_value (...) and
5994 agent_set_trace_state_variable_value (...).
5995
5996 * Makefile.in: Update ax.c and IPA dependencies.
5997
277e4e52
PA
59982012-02-24 Pedro Alves <palves@redhat.com>
5999
6000 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
6001 (cmd_bigqtbuffer_circular): ... this. Only handle
6002 'QTBuffer:circular:'.
6003 (handle_tracepoint_general_set): Adjust.
6004
bf4c19f7
YQ
60052012-02-16 Yao Qi <yao@codesourcery.com>
6006
6007 * inferiors.c: Move code to ...
6008 * dll.c: .... here. New.
6009 * server.h: Declare clear_dlls.
6010 * Makefile.in (SFILES): Add dll.c.
6011 (OBS): Add dll.o
6012 (dll.o): New rule.
6013
d73f2619
YQ
60142012-02-11 Yao Qi <yao@codesourcery.com>
6015
6016 * server.c: (handle_monitor_command): Add a new parameter
6017 `own_buf'.
6018 (handle_query): Update caller.
6019
f8255c2a
JB
60202012-02-09 Joel Brobecker <brobecker@adacore.com>
6021
6022 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
6023 * configure, config.in: Regenerate.
6024 * hostio.c: Provide an alternate implementation if HAVE_READLINK
6025 is not defined.
6026
da84f473
PA
60272012-02-02 Pedro Alves <palves@redhat.com>
6028
6029 Try SIGKILL first, then PTRACE_KILL.
6030 * linux-low.c (linux_kill_one_lwp): New.
6031 (linux_kill_one_lwp): Rename to ...
6032 (kill_one_lwp_callback): ... this. Use the new
6033 linux_kill_one_lwp.
6034
e886a173
PA
60352012-02-02 Pedro Alves <palves@redhat.com>
6036
6037 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
6038 inferior.
6039
be07f1a2
PA
60402012-01-27 Pedro Alves <palves@redhat.com>
6041
6042 * linux-low.c (linux_child_pid_to_exec_file): Delete.
6043 (elf_64_file_p): Make static.
6044 (linux_pid_exe_is_elf_64_file): New.
6045 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
6046 Delete declarations.
6047 (linux_pid_exe_is_elf_64_file): Declare.
6048 * linux-x86-low.c (x86_arch_setup): Use
6049 linux_pid_exe_is_elf_64_file.
6050
d8301ad1
JK
60512012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
6052
6053 * linux-low.c (linux_wait_for_event_1): Rename to ...
6054 (linux_wait_for_event): ... here and merge it with former
6055 linux_wait_for_event - new variable wait_ptid, use it.
6056 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
6057
01b17894
PA
60582012-01-23 Pedro Alves <palves@redhat.com>
6059
6060 * server.c (main): Avoid yet another case of infinite loop while
6061 detaching/killing after a longjmp.
6062
e825046f
JK
60632012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
6064
6065 Code cleanup.
6066 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
6067
b9e7b9c3
UW
60682012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
6069
6070 * hostio.c (handle_readlink): New function.
6071 (handle_vFile): Call it to handle "vFile:readlink" packets.
6072
901f9912
UW
60732012-01-20 Pedro Alves <palves@redhat.com>
6074 Ulrich Weigand <ulrich.weigand@linaro.org>
6075
6076 * server.c (handle_v_requests): Only support vAttach and vRun to
6077 start multiple processes when in extended protocol mode.
6078
fc1ab1a0
PA
60792012-01-17 Pedro Alves <palves@redhat.com>
6080
6081 * tracepoint.c (initialize_tracepoint): Use mmap instead of
6082 memalign plus mprotect to allocate the scratch buffer.
6083
7d5d4e98
PA
60842012-01-13 Pedro Alves <palves@redhat.com>
6085
6086 * server.c (attach_inferior): Clear `cont_thread'.
6087
f128d5e9
PA
60882012-01-13 Pedro Alves <palves@redhat.com>
6089
6090 * server.c (main): Avoid infinite loop while detaching/killing
6091 after a longjmp.
6092
06db92f0
DE
60932012-01-09 Doug Evans <dje@google.com>
6094
6095 * server.c (start_inferior): Set last_ptid in --wrapper case.
6096
32d92999
YQ
60972012-01-06 Yao Qi <yao@codesourcery.com>
6098
6099 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
6100 defined.
6101 [IN_PROCESS_AGENT] (debug_agent): New global variable.
6102
5e0a92a9
YQ
61032012-01-04 Yao Qi <yao@codesourcery.com>
6104
6105 * tracepoint.c (cmd_qtdp): Print debug message
6106 for static tracepoint.
6107
ae639e8c
YQ
61082012-01-04 Yao Qi <yao@codesourcery.com>
6109
6110 * tracepoint.c (trace_vdebug): Differentiate debug message
6111 between gdbserver and IPA.
6112
f72429c5
YQ
61132012-01-03 Yao Qi <yao@codesourcery.com>
6114
6115 * tracepoint.c (tracepoint_was_hit): Don't collect for
6116 static tracepoint.
6117
12c3e59c
JB
61182012-01-02 Joel Brobecker <brobecker@adacore.com>
6119
6120 * terminal.h: Reformat copyright header.
6121
67827812
JB
61222012-01-02 Joel Brobecker <brobecker@adacore.com>
6123
6124 * server.c (gdbserver_version): Update copyright year.
6125 * gdbreplay.c (gdbreplay_version): Likewise.
6126
3e52c33d
JK
61272011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
6128
6129 * linux-low.c (linux_create_inferior): Put empty if clause for write.
6130
6131 Revert:
6132 2011-12-18 Hui Zhu <teawater@gmail.com>
6133 * linux-low.c (linux_create_inferior): Save return value to ret.
6134
66f1260e
HZ
61352011-12-18 Hui Zhu <teawater@gmail.com>
6136
6137 * linux-low.c (linux_create_inferior): Save return value to ret.
6138
e77616d7
DE
61392011-12-16 Doug Evans <dje@google.com>
6140
e7b06c57
DE
6141 * linux-low.c (linux_create_inferior): If stdio connection,
6142 redirect stdin from /dev/null, stdout to stderr.
6143 * remote-utils.c (remote_is_stdio): New static global.
6144 (remote_connection_is_stdio): New function.
6145 (remote_prepare): Handle stdio connection.
6146 (remote_open): Ditto.
6147 (remote_close): Don't close stdin for stdio connections.
6148 (read_prim,write_prim): New functions. Replace all calls to
6149 read/write to these.
6150 * server.c (main): Watch for "-" argument. Move call to
6151 remote_prepare before start_inferior.
6152 * server.h (STDIO_CONNECTION_NAME): New macro.
6153 (remote_connection_is_stdio): Declare.
6154
e77616d7
DE
6155 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
6156 in debugging output.
6157
82067193
YQ
61582011-12-15 Yao Qi <yao@codesourcery.com>
6159
6160 * tracepoint.c: Include sys/syscall.h.
6161 (gdb_ust_thread): Remove preprocessor conditional.
6162
82bfbe7e
PA
61632011-12-14 Pedro Alves <pedro@codesourcery.com>
6164
6165 * linux-low.c (linux_detach_one_lwp): Call
6166 the_low_target.prepare_to_resume before detaching.
6167
712c6575
YQ
61682011-12-14 Yao Qi <yao@codesourcery.com>
6169
6170 * tracepoint.c (gdb_ust_thread): Don't ignore return value
6171 of write.
6172
d54d1edf
YQ
61732011-12-14 Yao Qi <yao@codesourcery.com>
6174
6175 * i386-low.c (i386_low_stopped_data_address): Initialize local
6176 variable `control'.
6177
6210a125
PA
61782011-12-13 Pedro Alves <pedro@codesourcery.com>
6179
6180 PR remote/13492
6181
6182 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
6183 DR_CONTROL unless necessary. Extend comments.
6184 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
6185 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
6186
2ece8244
YQ
61872011-12-13 Yao Qi <yao@codesourcery.com>
6188
6189 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
6190 macros.
6191 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
6192
784867a5
JK
61932011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
6194
6195 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
6196 Print new debug message for such case.
6197
6bf36717
JK
61982011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
6199
6200 Fix overlapping memcpy.
6201 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
6202 the read_inferior_memory transfer.
6203 (delete_fast_tracepoint_jump): New variable buf. Use it for the
6204 write_inferior_memory transfer.
6205 (set_fast_tracepoint_jump): New variable buf. Use it for the
6206 read_inferior_memory and write_inferior_memory transfers.
6207 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
6208 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
6209 Use it for the write_inferior_memory transfer.
6210 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
6211 buffers.
6212
50275556
MR
62132011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
6214
6215 * linux-low.c (fetch_register, store_register): Make code
6216 consistent, fix formatting.
6217
7325beb4
MR
62182011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
6219
6220 * linux-low.c (usr_store_inferior_registers): Factor out code
6221 to handle individual registers into...
6222 (store_register): ... this new function.
6223
c642a434
UW
62242011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
6225
6226 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
6227 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
6228 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
6229 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
6230 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
6231 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
6232 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
6233 (srv_xmlfiles): Add new XML files.
6234
6235 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
6236 and <sys/uio.h>.
6237 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
6238 (init_registers_s390_linux32v1): Add prototype.
6239 (init_registers_s390_linux32v2): Likewise.
6240 (init_registers_s390_linux64v1): Likewise.
6241 (init_registers_s390_linux64v2): Likewise.
6242 (init_registers_s390x_linux64v1): Likewise.
6243 (init_registers_s390x_linux64v2): Likewise.
6244 (s390_num_regs): Increment to 52.
6245 (s390_regmap): Add orig_r2 register.
6246 (s390_num_regs_3264): Increment to 68.
6247 (s390_regmap_3264): Add orig_r2 register.
6248 (s390_collect_ptrace_register): Handle orig_r2 register.
6249 (s390_supply_ptrace_register): Likewise.
6250 (s390_fill_last_break): New function.
6251 (s390_store_last_break): Likewise.
6252 (s390_fill_system_call): New function.
6253 (s390_store_system_call): Likewise.
6254 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
6255 register sets.
6256 (s390_check_regset): New function.
6257 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
6258 NT_S390_SYSTEM_CALL regsets and use appropriate description.
6259 Update target_regsets for available register sets.
6260
2268b414
JK
62612011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
6262 Jan Kratochvil <jan.kratochvil@redhat.com>
6263
6264 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
6265 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
6266 New.
6267 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
6268 * linux-low.h (struct process_info_private): New member r_debug.
6269 * server.c (handle_qxfer_libraries): Call
6270 the_target->qxfer_libraries_svr4.
6271 (handle_qxfer_libraries_svr4): New function.
6272 (qxfer_packets): New entry "libraries-svr4".
6273 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
6274 * target.h (struct target_ops): New member qxfer_libraries_svr4.
6275 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
6276 PACKET_qXfer_libraries_svr4.
6277
d6db1fab
UW
62782011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
6279
6280 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
6281 PSW address/mask between 8-byte and 16-byte formats.
6282 (s390_supply_ptrace_register): Likewise.
6283 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
6284 basic addressing mode bit.
6285
242f5f1c
SS
62862011-11-24 Stan Shebs <stan@codesourcery.com>
6287
6288 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
6289
f196051f
SS
62902011-11-17 Stan Shebs <stan@codesourcery.com>
6291
6292 * tracepoint.c (struct tracepoint): New field traceframe_usage.
6293 (tracing_start_time): New global.
6294 (tracing_stop_time): New global.
6295 (tracing_user_name): New global.
6296 (tracing_notes): New global.
6297 (tracing_stop_note): New global.
6298 (cmd_qtstart): Set traceframe_usage, start_time.
6299 (stop_tracing): Set stop_time.
6300 (cmd_qtstatus): Report additional status.
6301 (cmd_qtp): New function.
6302 (handle_tracepoint_query): Call it.
6303 (cmd_qtnotes): New function.
6304 (handle_tracepoint_general_set): Call it.
6305 (get_timestamp): Rename from tsv_get_timestamp.
6306
405f8e94
SS
63072011-11-14 Stan Shebs <stan@codesourcery.com>
6308 Kwok Cheung Yeung <kcy@codesourcery.com>
6309
6310 * linux-x86-low.c (small_jump_insn): New.
6311 (i386_install_fast_tracepoint_jump_pad): Add arguments for
6312 trampoline and error message, build a trampoline and issue a small
6313 jump instruction to it.
6314 (x86_install_fast_tracepoint_jump_pad): Add arguments for
6315 trampoline and error message.
6316 (x86_get_min_fast_tracepoint_insn_len): New.
6317 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
6318 * linux-low.h (struct linux_target_ops): Add arguments to
6319 install_fast_tracepoint_jump_pad operation, add new operation.
6320 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
6321 arguments.
6322 (linux_get_min_fast_tracepoint_insn_len): New function.
6323 (linux_target_op): Add new operation.
6324 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
6325 (gdb_trampoline_buffer_end): Ditto.
6326 (gdb_trampoline_buffer_error): Ditto.
6327 (struct ipa_sym_addresses): Add fields for new IPA variables.
6328 (symbol_list): Add entries for new IPA variables.
6329 (struct tracepoint): Add fields to hold the address range of the
6330 trampoline used by the tracepoint.
6331 (trampoline_buffer_head): New static variable.
6332 (trampoline_buffer_tail): Ditto.
6333 (claim_trampoline_space): New function.
6334 (have_fast_tracepoint_trampoline_buffer): New function.
6335 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
6336 structure.
6337 (install_fast_tracepoint): Ditto, also add error buffer argument.
6338 (cmd_qtminftpilen): New function.
6339 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
6340 (fast_tracepoint_from_trampoline_address): New function.
6341 (fast_tracepoint_collecting): Handle trampoline as part of jump
6342 pad space.
6343 (set_trampoline_buffer_space): New function.
6344 (initialize_tracepoint): Initialize new IPA variables.
6345 * target.h (struct target_ops): Add arguments to
6346 install_fast_tracepoint_jump_pad operation, add new
6347 get_min_fast_tracepoint_insn_len operation.
6348 (target_get_min_fast_tracepoint_insn_len): New.
6349 (install_fast_tracepoint_jump_pad): Add arguments.
6350 * server.h (IPA_BUFSIZ): Define.
6351 * linux-i386-ipa.c: Include extra header files.
6352 (initialize_fast_tracepoint_trampoline_buffer): New function.
6353 (initialize_low_tracepoint): Call it.
6354 * server.h (set_trampoline_buffer_space): Declare.
6355 (claim_trampoline_space): Ditto.
6356 (have_fast_tracepoint_trampoline_buffer): Ditto.
6357
1e4d1764
YQ
63582011-11-14 Yao Qi <yao@codesourcery.com>
6359
6360 * server.c (handle_query): Handle InstallInTrace for qSupported.
6361 * tracepoint.c (add_tracepoint): Sort list.
6362 (install_tracepoint, download_tracepoint): New.
6363 (cmd_qtdp): Call them to install and download tracepoints.
6364 (sort_tracepoints): Removed.
6365 (cmd_qtstart): Update.
6366
5c73ff4e
YQ
63672011-11-14 Yao Qi <yao@codesourcery.com>
6368
6369 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
6370 * mem-break.h: Declare.
6371 * tracepoint.c (cmd_qtstart): Move some code to ...
6372 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
6373 New.
6374 (download_tracepoints): Move some code to ...
6375 (download_tracepoint_1): ... here. New.
6376
86a30030
YQ
63772011-11-08 Yao Qi <yao@codesourcery.com>
6378
6379 * remote-utils.c (relocate_instruction): A comment fix.
6380
8d26e50c
JB
63812011-11-07 Joel Brobecker <brobecker@adacore.com>
6382
6383 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
6384 (i386_dr_low_get_control, i386_dr_low_get_status): Use
6385 dr_status_mirror and dr_control_mirror from debug_reg_state.
6386 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
6387 (i386_initial_stuff): Remove use of deleted globals.
6388 (i386_get_thread_context, i386_set_thread_context,
6389 i386_thread_added): Use dr_status_mirror and dr_control_mirror
6390 from debug_reg_state.
6391
a59306a3
YQ
63922011-11-05 Yao Qi <yao@codesourcery.com>
6393
6394 * tracepoint.c (gdb_collect): Loop over tracepoints of same
6395 address as TPOINT's.
6396
3065dfb6
SS
63972011-11-02 Stan Shebs <stan@codesourcery.com>
6398
6399 * tracepoint.c (agent_mem_read_string): New function.
6400 (eval_agent_expr): Call it for tracenz.
6401 * server.c (handle_query): Report support for tracenz.
6402
fd0d8c7c
YQ
64032011-11-02 Yao Qi <yao@codesourcery.com>
6404
6405 * tracepoint.c (cmd_qtstart): Remove unused local variables.
6406
609086b1
YQ
64072011-11-02 Yao Qi <yao@codesourcery.com>
6408
6409 * target.h: Fix a typo in comment.
6410
b9fd1791
PA
64112011-10-31 Pedro Alves <pedro@codesourcery.com>
6412
6413 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
6414 clobber the breakpoints' shadows with fast tracepoint jumps.
6415 * mem-break.h (check_mem_write): Add `myaddr' parameter.
6416 * target.c (write_inferior_memory): Also pass MYADDR down to
6417 check_mem_write.
6418
03583c20
UW
64192011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
6420
6421 * configure.ac: Check support for personality routine.
6422 * configure: Regenerate.
6423 * config.in: Likewise.
6424 * linux-low.c: Include <sys/personality.h>.
6425 Define ADDR_NO_RANDOMIZE if necessary.
6426 (linux_create_inferior): Disable address space randomization when
6427 forking inferior, if requested.
6428 (linux_supports_disable_randomization): New function.
6429 (linux_target_ops): Install it.
6430 * server.h (disable_randomization): Declare.
6431 * server.c (disable_randomization): New global variable.
6432 (handle_general_set): Handle QDisableRandomization.
6433 (handle_query): Likewise for qSupported.
6434 (main): Support --disable-randomization and --no-disable-randomization
6435 command line arguments.
6436 * target.h (struct target_ops): Add supports_disable_randomization.
6437 (target_supports_disable_randomization): New macro.
6438
723b724b
MF
64392011-09-29 Mike Frysinger <vapier@gentoo.org>
6440
6441 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
6442 ifdef check.
6443 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
6444 [!PT_GETDSBT] (target_loadmap): New definition.
6445 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
6446 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
6447 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
6448 and PT_GETDSBT to LINUX_LOADMAP.
6449 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
6450 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
6451
55329a5c 64522011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
6453
6454 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
6455 (arm_linux_hwbp_cap): New static variable.
6456 (arm_linux_get_hwbp_cap): Replace by ...
6457 (arm_linux_init_hwbp_cap): ... this new function.
6458 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
6459 (arm_linux_get_hw_watchpoint_count): Likewise.
6460 (arm_linux_get_hw_watchpoint_max_length): Likewise.
6461 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
6462 (arm_prepare_to_resume): Use perror_with_name instead of error.
6463
55329a5c 64642011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
6465
6466 * linux-arm-low.c: Include <signal.h>.
6467 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
6468 (struct arm_linux_hwbp_cap): New data type.
6469 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
6470 (struct arm_linux_hw_breakpoint): New data type.
6471 (MAX_BPTS, MAX_WPTS): Define.
6472 (struct arch_process_info, struct arch_lwp_info): New data types.
6473 (arm_linux_get_hwbp_cap): New function.
6474 (arm_linux_get_hw_breakpoint_count): Likewise.
6475 (arm_linux_get_hw_watchpoint_count): Likewise.
6476 (arm_linux_get_hw_watchpoint_max_length): Likewise.
6477 (arm_hwbp_control_initialize): Likewise.
6478 (arm_hwbp_control_is_enabled): Likewise.
6479 (arm_hwbp_control_is_initialized): Likewise.
6480 (arm_hwbp_control_disable): Likewise.
6481 (arm_linux_hw_breakpoint_equal): Likewise.
6482 (arm_linux_hw_point_initialize): Likewise.
6483 (struct update_registers_data): New data structure.
6484 (update_registers_callback: New function.
6485 (arm_insert_point): Likewise.
6486 (arm_remove_point): Likewise.
6487 (arm_stopped_by_watchpoint): Likewise.
6488 (arm_stopped_data_address): Likewise.
6489 (arm_new_process): Likewise.
6490 (arm_new_thread): Likewise.
6491 (arm_prepare_to_resume): Likewise.
6492 (the_low_target): Register arm_insert_point, arm_remove_point,
6493 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
6494 arm_new_thread, and arm_prepare_to_resume.
6495
6b9801d4
SS
64962011-09-15 Stan Shebs <stan@codesourcery.com>
6497
6498 * server.h (struct emit_ops): Add compare-goto fields.
6499 * tracepoint.c (gdb_agent_op_sizes): New table.
6500 (emit_eq_goto): New function.
6501 (emit_ne_goto): New function.
6502 (emit_lt_goto): New function.
6503 (emit_le_goto): New function.
6504 (emit_gt_goto): New function.
6505 (emit_ge_goto): New function.
6506 (is_goto_target): New function.
6507 (compile_bytecodes): Recognize special cases of compare-goto
6508 combinations and call specialized emitters for them.
6509 * linux-x86-low.c (amd64_emit_eq_goto): New function.
6510 (amd64_emit_ne_goto): New function.
6511 (amd64_emit_lt_goto): New function.
6512 (amd64_emit_le_goto): New function.
6513 (amd64_emit_gt_goto): New function.
6514 (amd64_emit_ge_goto): New function.
6515 (amd64_emit_ops): Add the new functions.
6516 (i386_emit_eq_goto): New function.
6517 (i386_emit_ne_goto): New function.
6518 (i386_emit_lt_goto): New function.
6519 (i386_emit_le_goto): New function.
6520 (i386_emit_gt_goto): New function.
6521 (i386_emit_ge_goto): New function.
6522 (i386_emit_ops): Add the new functions.
6523
bf15cbda
SS
65242011-09-08 Stan Shebs <stan@codesourcery.com>
6525
6526 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
6527 (i386_emit_epilogue): Restore %ebx.
6528
943ca1dd
JZ
65292011-08-31 Jie Zhang <jzhang918@gmail.com>
6530
6531 * server.c (step_thread): Remove definition.
6532 (process_serial_event): Don't handle Hs.
6533 * server.h (step_thread): Remove declaration.
6534 * target.c (set_desired_inferior): Remove use of step_thread.
6535
e3deef73
LM
65362011-08-24 Luis Machado <lgustavo@codesourcery.com>
6537
6538 * linux-low.c: Include linux-procfs.h.
6539 (linux_attach_lwp_1): Update comments.
6540 (linux_attach): Scan for existing threads when attaching to a
6541 process that is the tgid.
6542 * Makefile.in: Update dependencies.
6543
13da1c97
LM
65442011-08-24 Luis Machado <lgustavo@codesourcery.com>
6545
6546 * configure.srv: Add linux-procfs.o dependencies.
6547
881127c9
YQ
65482011-08-14 Yao Qi <yao@codesourcery.com>
6549
6550 * target.h (struct target_ops): Fix indent.
6551 * win32-low.c (win32_target_ops): Fix comment.
6552
58dbd541
YQ
65532011-08-14 Andrew Jenner <andrew@codesourcery.com>
6554 Yao Qi <yao@codesourcery.com>
6555
6556 * Makefile.in (clean): Remove tic6x-*.c files.
6557 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
6558 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
6559 (tic6x-c64xp-linux.c): Likewise.
6560 * configure.srv: Add support for tic6x-*-uclinux.
6561 * linux-tic6x-low.c: New.
6562 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
6563
78d85199
YQ
65642011-08-14 Andrew Stubbs <ams@codesourcery.com>
6565 Yao Qi <yao@codesourcery.com>
6566
6567 * target.h (struct target_ops): Add read_loadmap.
6568 * linux-low.c (struct target_loadseg): New type.
6569 (struct target_loadmap): New type.
6570 (linux_read_loadmap): New function.
6571 (linux_target_ops): Add linux_read_loadmap.
6572 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
6573 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
6574 to NULL.
78d85199 6575
a959a88d
EZ
65762011-08-05 Eli Zaretskii <eliz@gnu.org>
6577
6578 * win32-low.c: Include <stdint.h>.
6579
1ced966e
PA
65802011-07-22 Pedro Alves <pedro@codesourcery.com>
6581
6582 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
6583 to the inferior here.
6584 (i386_remove_aligned_watchpoint): Ditto.
6585 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
6586 fit part of the watchpoint in the debug registers.
6587 (i386_update_inferior_debug_regs): New.
6588 (i386_low_insert_watchpoint): Work on a local mirror of the debug
6589 registers, and only update the inferior on success.
6590 (i386_low_remove_watchpoint): Ditto.
6591
d26e3629
KY
65922011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
6593
6594 * linux-low.c (compare_ints, unique, list_threads, show_process,
6595 linux_core_of_thread): Delete.
6596 (linux_target_ops): Change linux_core_of_thread to
6597 linux_common_core_of_thread.
6598 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
6599 * utils.c (malloc_failure): Change type of argument.
6600 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
6601 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
6602 common/linux-osdata.c, common/ptid.c and common/buffer.c.
6603 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
6604 (IPA_OBJS): Add common-utils-ipa.o.
6605 (ptid_h, linux_osdata_h): New macros.
6606 (server_h): Add common/common-utils.h, common/xml-utils.h,
6607 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
6608 common/ptid.h.
6609 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
6610 ptid.o, buffer.o): New rules.
6611 (linux-low.o): Add common/linux-osdata.h as a dependency.
6612 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
6613 * configure.ac: Add AC_HEADER_DIRENT check.
6614 * config.in: Regenerate.
6615 * configure: Regenerate.
6616 * remote-utils.c (xml_escape_text): Delete.
6617 (buffer_grow, buffer_free, buffer_init, buffer_finish,
6618 buffer_xml_printf): Move to common/buffer.c.
6619 * server.c (main): Remove call to initialize_inferiors.
6620 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
6621 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
6622 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
6623 internal_error, gdb_assert, gdb_assert_fail): Delete.
6624 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
6625 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
6626 common/buffer.h.
6627 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
6628 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
6629 initialize_inferiors): Delete.
6630
2275a1a7
PA
66312011-07-20 Pedro Alves <pedro@codesourcery.com>
6632
6633 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
6634 symbol error.
6635
0a5b1e09
PA
66362011-05-31 Pedro Alves <pedro@codesourcery.com>
6637
6638 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
6639 assertion.
6640 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
6641
6938fd34
YQ
66422011-05-26 Yao Qi <yao@codesourcery.com>
6643
6644 * Makefile.in (thread-db.o): Track dependence to
6645 common/gdb_thread_db.h.
6646 * thread-db.c: include gdb_thread_db.h from right place.
6647
b481f9e0
TT
66482011-05-16 Adrian Cornish <gnu@bluedreamer.com>
6649
6650 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
6651 __FILE__ and __LINE__ to internal_error.
6652
98a5dd13
DE
66532011-05-13 Doug Evans <dje@google.com>
6654
6655 * thread-db.c (try_thread_db_load_from_sdir): New function.
6656 (try_thread_db_load_from_dir): New function.
6657 (thread_db_load_search): Handle $sdir, ignore $pdir.
6658 Remove trying of system directories if search of
6659 libthread-db-search-path fails, that is now done via $sdir.
6660
d248b706
KY
66612011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
6662
6663 * server.c (handle_query): Add EnableDisableTracepoints to the list
6664 of supported features.
43aaf8b6 6665 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 6666 tracepoints.
43aaf8b6
PA
6667 (cmd_qtenable_disable): New.
6668 (cmd_qtstart): Install tracepoints even if disabled.
6669 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
6670 receiving a QTEnable or QTDisable packet.
6671 (gdb_collect): Skip data collection if fast tracepoint is disabled.
6672 (ust_marker_to_static_tracepoint): Do not ignore disabled static
6673 tracepoints.
6674 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 6675
84e578fb
DE
66762011-05-10 Doug Evans <dje@google.com>
6677
6678 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
6679
71f55dd8
DE
66802011-05-04 Doug Evans <dje@google.com>
6681
6682 * linux-low.c (linux_join): Skip process lookup.
6683 * spu-low.c (spu_join): Ditto.
6684 * server.c (join_inferiors_callback): Delete.
6685 (process_serial_event): For 'D' packet (detach) call join_inferior
6686 directly.
6687
4d393d60
JM
66882011-05-04 Joseph Myers <joseph@codesourcery.com>
6689
6690 * README: Don't mention xscale*-*-linux*.
6691 * configure.srv (xscale*-*-linux*): Don't handle target.
6692
b00ad6ff
NF
66932011-04-27 Nathan Froyd <froydnj@codesourcery.com>
6694
6695 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
6696 casting pointers.
6697 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
6698 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
6699 (i386_emit_void_call_2): Likewise.
6700
af96c192
YQ
67012011-04-26 Yao Qi <yao@codesourcery.com>
6702
43aaf8b6
PA
6703 * linux-low.c: Move common macros to linux-ptrace.h.
6704 Include linux-ptrace.h.
af96c192
YQ
6705 * Makefile.in (linux_ptrace_h): New.
6706 (linux-low.o): Depends on linux-ptrace.h.
6707
03f2bd59
JK
67082011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
6709
6710 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
6711 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
6712 (remote_prepare): New function with most of the TCP code from ...
6713 (remote_open): ... here. Detect PORT here unconditionally. Move also
6714 setting transport_is_reliable.
6715 * server.c (run_once): New variable.
6716 (gdbserver_usage): Document it.
6717 (main): Set run_once for `--once'. Call remote_prepare. Exit after
6718 the first run if RUN_ONCE.
6719 * server.h (run_once, remote_prepare): New declarations.
6720
7a9dd1b2
TT
67212011-04-19 Tom Tromey <tromey@redhat.com>
6722
6723 * win32-low.c (handle_load_dll): Remove duplicate "the".
6724
81239425
PM
67252011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
6726
6727 Remove support for old Cygwin 1.5 versions.
6728 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
6729 function to avoid warning.
6730 (win32_add_one_solib): Use cygwin_conv_path function to avoid
6731 warning.
6732
9e0627f1
PM
67332011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
6734
6735 * gdbserver/server.h (Macro _): Define it if not available.
6736
588eebee
MS
67372011-03-14 Michael Snyder <msnyder@vmware.com>
6738
348af9f7 6739 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 6740
43f70d4c
JB
67412011-03-10 Joel Brobecker <brobecker@adacore.com>
6742
6743 * Makefile.in (maintainer-clean realclean distclean): Remove
6744 "make ... subdir_do" command.
6745
348af9f7
MS
67462011-03-10 Michael Snyder <msnyder@vmware.com>
6747
6748 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
6749
6750 * server.c (handle_v_run): Free alloced buffer on early return.
6751
e637a4f5
YQ
67522011-03-09 Yao Qi <yao@codesourcery.com>
6753
6754 Revert:
6755 2011-03-04 Yao Qi <yao@codesourcery.com>
6756
6757 * Makefile.in: Remove GNU make feature --directory.
6758
6759 2011-03-05 Yao Qi <yao@codesourcery.com>
6760
6761 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
6762 (subdir_do): New make target. Copied from gdb/Makefile.
6763 (maintainer-clean, realclean, distclean, clean): Call corresponding
6764 make targets in common/Makefile.
6765
6766 2011-02-11 Yao Qi <yao@codesourcery.com>
6767
6768 * configure.ac: Call AC_PROG_RANLIB.
6769 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
6770 * configure: Regenerate.
6771
e6edda56
JK
67722011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
6773
6774 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
6775
e5141119
JB
67762011-03-06 Yao Qi <yao@codesourcery.com>
6777
6778 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
6779
64794aa4
JB
67802011-03-05 Yao Qi <yao@codesourcery.com>
6781
6782 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
6783 (subdir_do): New make target. Copied from gdb/Makefile.
6784 (maintainer-clean, realclean, distclean, clean): Call corresponding
6785 make targets in common/Makefile.
6786
7a762829
YQ
67872011-03-04 Yao Qi <yao@codesourcery.com>
6788
6789 * Makefile.in: Remove GNU make feature --directory.
6790
348af9f7
MS
67912011-03-04 Michael Snyder <msnyder@vmware.com>
6792
6793 * server.c (queue_stop_reply): Call xmalloc not malloc.
6794
67952011-03-02 Michael Snyder <msnyder@vmware.com>
6796
6797 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
6798
9f72fee2
MS
67992011-02-28 Michael Snyder <msnyder@vmware.com>
6800
588eebee
MS
6801 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
6802 (cmd_qtframe): Ditto.
6803 (cmd_qtbuffer): Ditto.
6804 (cmd_bigqtbuffer): Ditto.
6805
9f72fee2
MS
6806 * utils.c (decimal2str): Initialize 'width' to nine, then
6807 don't mess with it.
6808
8040bd49
UW
68092011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
6810
6811 * hostio.c (require_data): Free *data, not data.
6812
7e52cbd0
JK
68132011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6814
6815 * hostio.c (require_data): Use free, not xfree.
6816
9130f83e
MS
68172011-02-27 Michael Snyder <msnyder@vmware.com>
6818
4b812f4e
MS
6819 * server.c (handle_query): Discard unused value.
6820
9130f83e
MS
6821 * hostio.c (require_data): Free malloc memory before returning
6822 error.
6823
69d37113
MS
68242011-02-26 Michael Snyder <msnyder@vmware.com>
6825
6826 * linux-low.c (list_threads): Call closedir for dirent.
6827
35f5825a
MS
68282011-02-27 Michael Snyder <msnyder@vmware.com>
6829
2a589cef
MS
6830 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
6831 a case statement falls through.
6832
0adea5f7
MS
6833 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
6834
35f5825a
MS
6835 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
6836 in comparison.
6837
238f1c74
MS
68382011-02-26 Michael Snyder <msnyder@vmware.com>
6839
6840 * utils.c (decimal2str): Eliminate dead code and dead param.
6841 (pulongest): Drop dead param from call to decimal2str.
6842 (plongest): Ditto.
6843
633ff500
JB
68442011-02-24 Joel Brobecker <brobecker@adacore.com>
6845
6846 Revert the following patch (not approved yet):
6847 2011-02-21 Hui Zhu <teawater@gmail.com>
6848 * tracepoint.c (tp_printf): New function.
6849 (eval_agent_expr): Handle gdb_agent_op_printf.
6850
f9c6ff72
HZ
68512011-02-21 Hui Zhu <teawater@gmail.com>
6852
6853 * tracepoint.c (tp_printf): New function.
6854 (eval_agent_expr): Handle gdb_agent_op_printf.
6855
94d5e490
TT
68562011-02-18 Tom Tromey <tromey@redhat.com>
6857
6858 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
6859 (tracepoint.o): Likewise.
6860 * tracepoint.c (enum gdb_agent_op): Use ax.def.
6861 (gdb_agent_op_names): Likewise.
6862
c7f96d2b
TT
68632011-02-18 Tom Tromey <tromey@redhat.com>
6864
6865 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
6866 gdb_agent_op_rot>: New constants.
6867 (gdb_agent_op_names): Add pick and roll.
6868 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
6869 cases.
6870
0feedb2c
JK
68712011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6872
6873 * aclocal.m4: Regenerated with aclocal-1.11.1.
6874
b3b9301e
PA
68752011-02-14 Pedro Alves <pedro@codesourcery.com>
6876
6877 * server.c (handle_qxfer_traceframe_info): New.
6878 (qxfer_packets): Register "traceframe-info".
6879 (handle_query): Report support for qXfer:traceframe-info:read+.
6880 * tracepoint.c (match_blocktype): New.
6881 (traceframe_find_block_type): Rename to ...
6882 (traceframe_walk_blocks): ... this. Add callback filter argument,
6883 and use it.
6884 (traceframe_find_block_type): New, reimplemented on top of
6885 traceframe_walk_blocks.
6886 (build_traceframe_info_xml): New.
6887 (traceframe_read_info): New.
6888 * server.h (traceframe_read_info): Declare.
6889
4f3e6fb7
YQ
68902011-02-11 Yao Qi <yao@codesourcery.com>
6891
6892 * configure.ac: Call AC_PROG_RANLIB.
6893 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
6894 * configure: Regenerate.
6895
764880b7
PA
68962011-02-07 Pedro Alves <pedro@codesourcery.com>
6897
6898 * server.c (gdb_read_memory): Change return semantics to allow
6899 partial transfers.
6900 (handle_search_memory_1): Adjust.
6901 (process_serial_event) <'m' packet>: Handle partial transfers.
6902 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
6903
1c79eb8a
PA
69042011-01-28 Pedro Alves <pedro@codesourcery.com>
6905
6906 * regcache.c (init_register_cache): Initialize
6907 regcache->register_status.
6908 (free_register_cache): Release regcache->register_status.
6909 (regcache_cpy): Copy register_status.
6910 (registers_to_string): Print 'x's for unavailable registers.
6911 (supply_register): Mark the register's status valid or
6912 unavailable, depending on whether a buffer was passed in or not.
6913 (supply_register_zeroed): New.
6914 (supply_regblock): Mark the registers' status valid or
6915 unavailable, depending on whether a buffer was passed in or not.
6916 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
6917 (struct regcache): New `register_status' field.
6918 (supply_register_zeroed): Declare.
6919 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
6920 supply_register_zeroed, rather than passing a NULL buffer to
6921 supply_register.
6922 * tracepoint.c (fetch_traceframe_registers): Update comment.
6923
85724a0e
PA
69242011-01-28 Pedro Alves <pedro@codesourcery.com>
6925
6926 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
6927 buffer explicit.
6928
d08aafef
PA
69292011-01-25 Pedro Alves <pedro@codesourcery.com>
6930
6931 * server.h (decode_xfer_write): Change prototype.
6932 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
6933 and don't extract the annex here.
6934 * server.c (decode_xfer_read): Remove `annex' parameter,
6935 and don't extract the annex here.
6936 (decode_xfer): New.
6937 (struct qxfer): New.
6938 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
6939 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
6940 (handle_qxfer_statictrace): New functions, abstracted out from
6941 handle_query, and made to use the struct qxfer interface.
6942 (handle_threads_qxfer_proper): Rename to ...
6943 (handle_qxfer_threads_proper): ... this.
6944 (handle_threads_qxfer): Rename to ...
6945 (handle_qxfer_threads): ... this. Adjust.
6946 (qxfer_packets): New array.
6947 (handle_qxfer): New function.
6948 (handle_query): Use handle_qxfer.
6949
493e2a69
MS
69502011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
6951
6952 * gdbreplay.c: Shorten lines of >= 80 columns.
6953 * linux-low.c: Ditto.
6954 * linux-ppc-low.c: Ditto.
6955 * linux-s390-low.c: Ditto.
6956 * linux-sparc-low.c: Ditto.
6957 * linux-x86-low.c: Ditto.
6958 * linux-xtensa-low.c: Ditto.
6959 * mem-break.c: Ditto.
6960 * nto-low.c: Ditto.
6961 * regcache.h: Ditto.
6962 * remote-utils.c: Ditto.
6963 * server.c: Ditto.
6964 * server.h: Ditto.
6965 * thread-db.c: Ditto.
6966 * tracepoint.c: Ditto.
6967 * utils.c: Ditto.
6968 * win32-low.h: Ditto.
6969
44944448
JB
69702011-01-05 Joel Brobecker <brobecker@adacore.com>
6971
6972 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
6973 update.
6974
71ce852c
JB
69752011-01-01 Joel Brobecker <brobecker@adacore.com>
6976
6977 * server.c (gdbserver_version): Update copyright year in version
6978 output.
6979 * gdbreplay.c (gdbreplay_version): Ditto.
6980
eb826dc6
MF
69812010-12-29 Jie Zhang <jie.zhang@analog.com>
6982
6983 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
6984 * linux-bfin-low.c: New file.
6985 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
6986 PT_DATA_ADDR for BFIN targets.
6987 * Makefile.in (SFILES): Add linux-bfin-low.c.
6988 (clean): Remove reg-bfin.c.
6989 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
6990 * README: Mention supported Blackfin targets.
6991
39ab222a
MF
69922010-12-23 Mike Frysinger <vapier@gentoo.org>
6993
6994 * .gitignore: New file.
6995
a1f2ce7d
MF
69962010-11-16 Mike Frysinger <vapier@gentoo.org>
6997
6998 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
6999
f474844c
JZ
70002010-10-22 Jie Zhang <jie@codesourcery.com>
7001
7002 * Makefile.in: Add FLAGS_TO_PASS variable.
7003 (install): Remove dependency of install-only and recursively
7004 invoke make for install-only.
7005
f1048712
DE
70062010-10-04 Doug Evans <dje@google.com>
7007
7008 * Makefile.in (uninstall): Use $(DESTDIR).
7009
b53a1623
PA
70102010-09-24 Pedro Alves <pedro@codesourcery.com>
7011
e6ee044d
PA
7012 PR gdb/11842
7013
b53a1623
PA
7014 * linux-x86-low.c (compat_siginfo_from_siginfo)
7015 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
7016 si_code is < 0. Check for si_code == SI_TIMER before checking for
7017 si_code < 0.
7018
fa1bd1e4
JB
70192010-09-13 Joel Brobecker <brobecker@adacore.com>
7020
7021 * lynx-i386-low.c: New file.
7022 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
7023
47fac8f8
JB
70242010-09-13 Joel Brobecker <brobecker@adacore.com>
7025
7026 * lynx-low.c (ptrace_request_to_str): Remove handling for
7027 request values that have been removed in LynxOS 5.x.
7028
1adfc54d
JB
70292010-09-13 Joel Brobecker <brobecker@adacore.com>
7030
7031 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
7032 <ptrace.h>
7033
c2a66c29
NS
70342010-09-09 Nathan Sidwell <nathan@codesourcery.com>
7035
7036 * configure.ac: Add --enable-inprocess-agent option.
7037 * configure: Rebuilt.
7038
32fcada3
YQ
70392010-09-06 Yao Qi <yao@codesourcery.com>
7040
7041 * linux-low.c (linux_kill): Remove unused variable.
7042 (linux_stabilize_threads): Likewise.
7043 * server.c (start_inferior): Likewise.
7044 (queue_stop_reply_callback): Likewise.
7045 * tracepoint.c (do_action_at_tracepoint): Likewise.
7046
0cccb683
YQ
70472010-09-06 Yao Qi <yao@codesourcery.com>
7048
7049 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
7050 on return.
7051
423ec54c
JK
70522010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
7053
7054 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
7055
12ac6819
PA
70562010-09-06 Pedro Alves <pedro@codesourcery.com>
7057
7058 * Makefile.in (install-only): Replace $IPA_DEPFILES with
7059 "$(IPA_DEPFILES)".
7060
8ed54b31
JB
70612010-09-01 Joel Brobecker <brobecker@adacore.com>
7062
7063 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
7064 gdbserver/lynx-ppc-low.c: New files.
7065 * Makefile.in (lynx_low_h): New variable.
7066 (lynx-low.o, lynx-ppc-low.o): New rules.
7067 * configure.ac: On LynxOS, link with -lnetinet.
7068 * configure.srv: Add handling of powerpc-*-lynxos* targets.
7069 * configure: regenerate.
7070
bb0116a4
JB
70712010-09-01 Joel Brobecker <brobecker@adacore.com>
7072
7073 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
7074 * configure.ac: Add check for vasprintf and vsnprintf.
7075 * configure, config.in: Regenerate.
7076 * server.h (vasprintf, vsnprintf): Add conditional declarations.
7077
a778ab81 70782010-09-01 Joel Brobecker <brobecker@adacore.com>
7079
7080 * gdbreplay.c: Move include of alloca.h up, next to include of
7081 malloc.h.
7082 * server.h: Add include of malloc.h.
7083 * mem-break.c: Remove include of malloc.h.
7084 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
7085
8b034a19 70862010-09-01 Joel Brobecker <brobecker@adacore.com>
7087
7088 * Makefile.in (memmem.o): Build with -Wno-error.
7089
70902010-09-01 Joel Brobecker <brobecker@adacore.com>
7091
7092 * utils.c (xsnprintf): Make non-static.
7093 * server.h: Add xsnprintf declaration.
7094 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
7095 replace calls to snprintf by calls to xsnprintf throughout.
7096
70972010-09-01 Joel Brobecker <brobecker@adacore.com>
7098
7099 * configure.ac: Add configure check for alloca.
7100 * configure, config.in: Regenerate.
7101 * server.h: Include alloca.h if it exists.
7102 * gdbreplay.c: Include alloca.h if it exists.
7103
1a981360
PA
71042010-08-28 Pedro Alves <pedro@codesourcery.com>
7105
7106 * linux-low.c (__SIGRTMIN): Define if not already defined.
7107 (linux_create_inferior): Check for __ANDROID__ rather than
7108 __SIGRTMIN.
7109 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
7110 are already deferred.
7111 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
7112 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
7113 stopped and already has a pending signal to report.
7114 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
7115 a pending signal to report or is moving out of a jump pad.
7116 (linux_init_signals): Check for __ANDROID__ rather than
7117 __SIGRTMIN.
7118
b4d51a55
PA
71192010-08-28 Pedro Alves <pedro@codesourcery.com>
7120
7121 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
7122 debug_threads check. Avoid a linear search when not doing debug
7123 output.
7124
ec48365d
PA
71252010-08-27 Pedro Alves <pedro@codesourcery.com>
7126
7127 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
7128 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
7129 (struct file_handler) <fd>: Change type to gdb_fildes_t.
7130 (process_event): Change local fd's type to gdb_fildes_t.
7131 (create_file_handler): Adjust prototype.
7132 (delete_file_handler): Adjust prototype.
7133 (handle_file_event): Adjust prototype. Use pfildes.
7134 (create_file_event): Adjsut prototype.
7135 * remote-utils.c (remote_desc, listen_desc): Change type to
7136 gdb_fildes_t.
7137 * server.h: New gdb_fildes_t typedef.
7138 [USE_WIN32API]: Include winsock2.h.
7139 (delete_file_handler, add_file_handler): Adjust prototypes.
7140 (pfildes): Declare.
7141 * utils.c (pfildes): New.
7142
854d88f0
PA
71432010-08-27 Pedro Alves <pedro@codesourcery.com>
7144
7145 * configure.ac (build_warnings): Add -Wno-char-subscripts.
7146 * configure: Regenerate.
7147
0146f85b
PA
71482010-08-27 Pedro Alves <pedro@codesourcery.com>
7149
7150 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
7151 (linux_done_accessing_memory): ... this.
7152 (linux_target_ops): Adjust.
7153 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
7154 * nto-low.c (nto_target_ops): Adjust comment.
7155 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
7156 * spu-low.c (spu_target_ops): Adjust comment.
7157 * target.h (target_ops): Rename unprepare_to_access_memory field
7158 to done_accessing_memory.
7159 (unprepare_to_access_memory): Rename to ...
7160 (done_accessing_memory): ... this.
7161
90d74c30
PA
71622010-08-26 Pedro Alves <pedro@codesourcery.com>
7163
7164 * linux-low.c (linux_prepare_to_access_memory): New.
7165 (linux_unprepare_to_access_memory): New.
7166 (linux_target_ops): Install them.
7167 * server.c (read_memory): Rename to ...
7168 (gdb_read_memory): ... this. Use
7169 prepare_to_access_memory/prepare_to_access_memory.
7170 (write_memory): Rename to ...
7171 (gdb_write_memory): ... this. Use
7172 prepare_to_access_memory/prepare_to_access_memory.
7173 (handle_search_memory_1): Adjust.
7174 (process_serial_event): Adjust.
7175 * target.h (struct target_ops): New fields
7176 prepare_to_access_memory and unprepare_to_access_memory.
7177 (prepare_to_access_memory, unprepare_to_access_memory): New.
7178 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
7179 prepare_to_access_memory/prepare_to_access_memory.
7180 * nto-low.c (nto_target_ops): Adjust.
7181 * spu-low.c (spu_target_ops): Adjust.
7182 * win32-low.c (win32_target_ops): Adjust.
7183
fd467969
PA
71842010-08-26 Pedro Alves <pedro@codesourcery.com>
7185
7186 * Makefile.in (WARN_CFLAGS): Get it from configure.
7187 (WERROR_CFLAGS): New.
7188 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
7189 * configure.ac: Introduce --enable-werror, which adds -Werror to
7190 the compiler command line. Enabled by default. Disable with
7191 --disable-werror. Add -Wdeclaration-after-statement
7192 Wpointer-arith and -Wformat-nonliteral to warning flags.
7193 * configure: Regenerate.
7194
331e2f5f
PA
71952010-08-26 Pedro Alves <pedro@codesourcery.com>
7196
7197 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
7198
e581f2b4
PA
71992010-08-26 Pedro Alves <pedro@codesourcery.com>
7200
7201 * gdbreplay.c (remote_error): New.
7202 (gdbchar): New.
7203 (expect): Use gdbchar. Check for error reading from GDB.
7204 Clarify sync error output.
7205 (play): Check for errors writing to GDB.
7206 * linux-low.c (sigchld_handler): Really ignore `write' errors.
7207 * remote-utils.c (getpkt): Check for errors writing to the remote
7208 descriptor.
7209
3c11dd79
PA
72102010-08-25 Pedro Alves <pedro@codesourcery.com>
7211
7212 * linux-low.c (linux_wait_1): Move non-debugging code out of
7213 `debug_threads' control.
7214
d20a8ad9
PA
72152010-08-25 Pedro Alves <pedro@codesourcery.com>
7216
7217 * linux-low.c (linux_wait_1): Don't set last_status here.
7218 * server.c (push_event, queue_stop_reply_callback): Assert we're
7219 not pushing a TARGET_WAITKIND_IGNORE event.
7220 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
7221 (myresume, handle_target_event): Set the thread's last_resume_kind
7222 and last_status from the target returned status.
7223
964e4306
PA
72242010-08-25 Pedro Alves <pedro@codesourcery.com>
7225
7226 PR threads/10729
7227
7228 * linux-x86-low.c (update_debug_registers_callback): New.
7229 (i386_dr_low_set_addr): Use it.
7230 (i386_dr_low_get_addr): New.
7231 (i386_dr_low_set_control): Use update_debug_registers_callback.
7232 (i386_dr_low_get_control): New.
7233 (i386_dr_low_get_status): Adjust.
7234 * linux-low.c (linux_stop_lwp): New.
7235 * linux-low.h (linux_stop_lwp): Declare.
7236
7237 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
7238 argument instead of a i386_debug_reg_state.
7239 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
7240 a i386_debug_reg_state.
7241 (i386_insert_aligned_watchpoint): Adjust.
7242 (i386_remove_aligned_watchpoint): Adjust.
7243 (i386_low_stopped_data_address): Read the debug registers from the
7244 inferior instead of from the mirrors.
7245 * i386-low.h (struct i386_debug_reg_state): Extend comment.
7246 (i386_dr_low_get_addr): Declare.
7247 (i386_dr_low_get_control): Declare.
7248 (i386_dr_low_get_status): Change prototype.
7249
7250 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
7251 (i386_dr_low_get_addr): New.
7252 (i386_dr_low_get_control): New.
7253 (i386_dr_low_get_status): Adjust prototype. Return
7254 dr_status_mirror.
7255 (i386_initial_stuff): Clear dr_status_mirror and
7256 dr_control_mirror.
7257 (i386_get_thread_context): Adjust.
7258 (i386_set_thread_context): Adjust.
7259 (i386_thread_added): Adjust.
7260
5f21a75b
PA
72612010-08-24 Pedro Alves <pedro@codesourcery.com>
7262
7263 * linux-low.h (linux_thread_area): Delete declaration.
7264
3e4c1235
TS
72652010-08-11 Thomas Schwinge <thomas@codesourcery.com>
7266
7267 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
7268 after its termination.
7269
1971b033
PA
72702010-08-09 Pedro Alves <pedro@codesourcery.com>
7271
7272 * linux-low.c (gdb_wants_lwp_stopped): Delete.
7273 (gdb_wants_all_stopped): Delete.
7274 (linux_wait_1): Don't call them.
7275 * server.c (handle_v_cont): Tag all threads as want-stopped.
7276 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
7277 stopped as "client-wants-stopped".
7278
310444ac
PA
72792010-07-31 Pedro Alves <pedro@codesourcery.com>
7280
7281 * Makefile.in (signals_h): New.
7282 (server_h): Depend on it.
7283 (server.o): Don't depend on $(signals_def).
7284 (signals.o): Depend on $(signals_def).
7285
a19cae16
JK
72862010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
7287
7288 * Makefile.in (signals_def): New.
7289 (server_h): Append include/gdb/signals.h and signals_def.
7290 (server.o): Append signals_def.
7291
30d50328
JK
72922010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
7293
7294 * server.c (handle_target_event): Use target_signal_to_host for
7295 resume_info.sig initialization.
7296 * target.h (struct thread_resume) <sig>: New comment.
7297
5c3216e2
OS
72982010-07-20 Ozkan Sezer <sezeroz@gmail.com>
7299
c6f46ca0
OS
7300 * server.c (handle_query): strcpy() the returned string from paddress()
7301 instead of sprintf().
5c3216e2
OS
7302 * utils.c (paddress): Return phex_nz().
7303
6bd31874
JB
73042010-07-07 Joel Brobecker <brobecker@adacore.com>
7305
7306 * server.c (handle_v_cont): Call mourn_inferior if process
7307 just exited.
7308 (myresume): Likewise.
7309
0fb4aa4b
PA
73102010-07-01 Pedro Alves <pedro@codesourcery.com>
7311
7312 Static tracepoints, and integration with UST.
7313
7314 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
7315 * mem-break.c (uninsert_all_breakpoints)
7316 (reinsert_all_breakpoints): New.
7317 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
7318 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
7319 (gdb_agent_ust_loaded, helper_thread_id)
7320 (gdb_agent_helper_thread_id): New macros.
7321 (struct ipa_sym_addresses): Add addr_ust_loaded,
7322 addr_helper_thread_id, addr_cmd_buf.
7323 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
7324 (in_process_agent_loaded_ust): New.
7325 (write_e_ust_not_loaded): New.
7326 (maybe_write_ipa_ust_not_loaded): New.
7327 (struct collect_static_trace_data_action): New.
7328 (enum tracepoint_type) <static_tracepoint>: New.
7329 (struct tracepoint) <handle>: Mention static tracepoints.
7330 (struct static_tracepoint_ctx): New.
7331 (CMD_BUF_SIZE): New.
7332 (add_tracepoint_action): Handle static tracepoint actions.
7333 (unprobe_marker_at): New.
7334 (clear_installed_tracepoints): Handle static tracepoints.
7335 (cmd_qtdp): Handle static tracepoints.
7336 (probe_marker_at): New.
7337 (cmd_qtstart): Handle static tracepoints.
7338 (response_tracepoint): Handle static tracepoints.
7339 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
7340 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
7341 (get_context_regcache): Handle static tracepoints.
7342 (do_action_at_tracepoint): Handle static tracepoint actions.
7343 (traceframe_find_block_type): Handle static trace data blocks.
7344 (traceframe_read_sdata): New.
7345 (download_tracepoints): Download static tracepoint actions.
7346 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
7347 (GDB_PROBE_NAME): New.
7348 (ust_ops): New.
7349 (GET_UST_SYM): New.
7350 (USTF): New.
7351 (dlsym_ust): New.
7352 (ust_marker_to_static_tracepoint): New.
7353 (gdb_probe): New.
7354 (collect_ust_data_at_tracepoint): New.
7355 (gdb_ust_probe): New.
7356 (UNIX_PATH_MAX, SOCK_DIR): New.
7357 (gdb_ust_connect_sync_socket): New.
7358 (resume_thread, stop_thread): New.
7359 (run_inferior_command): New.
7360 (init_named_socket): New.
7361 (gdb_ust_socket_init): New.
7362 (cstr_to_hexstr): New.
7363 (next_st): New.
7364 (first_marker, next_marker): New.
7365 (response_ust_marker): New.
7366 (cmd_qtfstm, cmd_qtsstm): New.
7367 (unprobe_marker_at, probe_marker_at): New.
7368 (cmd_qtstmat, gdb_ust_thread): New.
7369 (gdb_ust_init): New.
7370 (initialize_tracepoint_ftlib): Call gdb_ust_init.
7371 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
7372 (ST_REGENTRY): New.
7373 (x86_64_st_collect_regmap): New.
7374 (X86_64_NUM_ST_COLLECT_GREGS): New.
7375 (AMD64_RIP_REGNUM): New.
7376 (supply_static_tracepoint_registers): New.
7377 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
7378 (ST_REGENTRY): New.
7379 (i386_st_collect_regmap): New.
7380 (i386_NUM_ST_COLLECT_GREGS): New.
7381 (supply_static_tracepoint_registers): New.
7382 * server.c (handle_query): Handle qXfer:statictrace:read.
7383 <qSupported>: Report support for StaticTracepoints, and
7384 qXfer:statictrace:read features.
7385 * server.h (traceframe_read_sdata)
7386 (supply_static_tracepoint_registers): Declare.
7387 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
7388 (unpack_varlen_hex): Include in IPA build.
7389 * Makefile.in (ustlibs, ustinc): New.
7390 (IPA_OBJS): Add remote-utils-ipa.o.
7391 ($(IPA_LIB)): Link -ldl and -lpthread.
7392 (UST_CFLAGS): New.
7393 (IPAGENT_CFLAGS): Add UST_CFLAGS.
7394 * config.in, configure: Regenerate.
7395
9e4344e5
PA
73962010-06-20 Ian Lance Taylor <iant@google.com>
7397 Pedro Alves <pedro@codesourcery.com>
7398
7399 * linux-x86-low.c (always_true): Delete.
7400 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
7401 trying to fool the compiler with always_true.
7402
c6beb2cb
PA
74032010-06-20 Pedro Alves <pedro@codesourcery.com>
7404
7405 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
7406 conditions in gdbserver.
7407
d2ed6730
UW
74082010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
7409
7410 * spu-low.c (spu_read_memory): Wrap around local store limit.
7411 (spu_write_memory): Likewise.
7412
4e29fb54
PA
74132010-06-15 Pedro Alves <pedro@codesourcery.com>
7414
7415 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
7416 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
7417 LONGEST uses.
7418 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
7419 uses.
7420 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
7421 uses with LONGEST uses.
7422
6a271cae
PA
74232010-06-14 Stan Shebs <stan@codesourcery.com>
7424 Pedro Alves <pedro@codesourcery.com>
7425
7426 Bytecode compiler.
7427
7428 * linux-x86-low.c: Include limits.h.
7429 (add_insns): New.
7430 (always_true): New.
7431 (EMIT_ASM): New.
7432 (EMIT_ASM32): New.
7433 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
7434 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
7435 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
7436 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
7437 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
7438 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
7439 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
7440 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
7441 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
7442 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
7443 (amd64_emit_void_call_2): New.
7444 (amd64_emit_ops): New.
7445 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
7446 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
7447 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
7448 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
7449 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
7450 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
7451 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
7452 (i386_emit_call, i386_emit_reg, i386_emit_pop)
7453 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
7454 (i386_emit_stack_adjust, i386_emit_int_call_1)
7455 (i386_emit_void_call_2): New.
7456 (i386_emit_ops): New.
7457 (x86_emit_ops): New.
7458 (the_low_target): Install x86_emit_ops.
7459 * server.h (struct emit_ops): New.
7460 (get_raw_reg_func_addr): Declare.
7461 (current_insn_ptr, emit_error): Declare.
7462 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
7463 (set_trace_state_variable_value): New defines.
7464 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
7465 addr_get_trace_state_variable_value and
7466 addr_set_trace_state_variable_value.
7467 (symbol_list): New fields for get_raw_reg,
7468 get_trace_state_variable_value and set_trace_state_variable_value.
7469 (condfn): New typedef.
7470 (struct tracepoint): New field `compiled_cond'.
7471 (do_action_at_tracepoint): Clear compiled_cond.
7472 (get_trace_state_variable_value, set_trace_state_variable_value):
7473 Export in the IPA.
7474 (condition_true_at_tracepoint): If there's a compiled condition,
7475 run that.
7476 (current_insn_ptr, emit_error): New globals.
7477 (struct bytecode_address): New.
7478 (get_raw_reg_func_addr): New.
7479 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
7480 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
7481 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
7482 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
7483 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
7484 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
7485 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
7486 (compile_tracepoint_condition, compile_bytecodes): New.
7487 * target.h (emit_ops): Forward declare.
7488 (struct target_ops): New field emit_ops.
7489 (target_emit_ops): New.
7490 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
7491 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
7492 * linux-low.c (linux_emit_ops): New.
7493 (linux_target_ops): Install it.
7494 * linux-low.h (struct linux_target_ops): New field emit_ops.
7495
92b72907
UW
74962010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
7497
7498 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
7499 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
7500
fa593d66
PA
75012010-06-01 Pedro Alves <pedro@codesourcery.com>
7502 Stan Shebs <stan@codesourcery.com>
7503
7504 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
7505 (all): Depend on $(extra_libraries).
7506 (install-only): Install the IPA.
7507 (IPA_OBJS, IPA_LIB): New.
7508 (clean): Remove the IPA lib.
7509 (IPAGENT_CFLAGS): New.
7510 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
7511 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
7512 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
7513 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
7514 * configure.ac: Check for atomic builtins support in the compiler.
7515 (IPA_DEPFILES, extra_libraries): Define.
7516 * configure.srv (ipa_obj): Add description.
7517 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
7518 (i[34567]86-*-linux*): Set ipa_obj.
7519 (x86_64-*-linux*): Set ipa_obj.
7520 * linux-low.c (stabilizing_threads): New.
7521 (supports_fast_tracepoints): New.
7522 (linux_detach): Stabilize threads before detaching.
7523 (handle_tracepoints): Handle internal tracing breakpoints. Assert
7524 the lwp is either not stabilizing, or is moving out of a jump pad.
7525 (linux_fast_tracepoint_collecting): New.
7526 (maybe_move_out_of_jump_pad): New.
7527 (enqueue_one_deferred_signal): New.
7528 (dequeue_one_deferred_signal): New.
7529 (linux_wait_for_event_1): If moving out of a jump pad, defer
7530 pending signals to later.
7531 (linux_stabilize_threads): New.
7532 (linux_wait_1): Check if threads need moving out of jump pads, and
7533 do it if so.
7534 (stuck_in_jump_pad_callback): New.
7535 (move_out_of_jump_pad_callback): New.
7536 (lwp_running): New.
7537 (linux_resume_one_lwp): Handle moving out of jump pads.
7538 (linux_set_resume_request): Dequeue deferred signals.
7539 (need_step_over_p): Also step over fast tracepoint jumps.
7540 (start_step_over): Also uninsert fast tracepoint jumps.
7541 (finish_step_over): Also reinsert fast tracepoint jumps.
7542 (linux_install_fast_tracepoint_jump): New.
7543 (linux_target_ops): Install linux_stabilize_threads and
7544 linux_install_fast_tracepoint_jump_pad.
7545 * linux-low.h (linux_target_ops) <get_thread_area,
7546 install_fast_tracepoint_jump_pad>: New fields.
7547 (struct lwp_info) <collecting_fast_tracepoint,
7548 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
7549 (linux_get_thread_area): Declare.
7550 * linux-x86-low.c (jump_insn): New.
7551 (x86_get_thread_area): New.
7552 (append_insns): New.
7553 (push_opcode): New.
7554 (amd64_install_fast_tracepoint_jump_pad): New.
7555 (i386_install_fast_tracepoint_jump_pad): New.
7556 (x86_install_fast_tracepoint_jump_pad): New.
7557 (the_low_target): Install x86_get_thread_area and
7558 x86_install_fast_tracepoint_jump_pad.
7559 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
7560 (struct fast_tracepoint_jump): New.
7561 (fast_tracepoint_jump_insn): New.
7562 (fast_tracepoint_jump_shadow): New.
7563 (find_fast_tracepoint_jump_at): New.
7564 (fast_tracepoint_jump_here): New.
7565 (delete_fast_tracepoint_jump): New.
7566 (set_fast_tracepoint_jump): New.
7567 (uninsert_fast_tracepoint_jumps_at): New.
7568 (reinsert_fast_tracepoint_jumps_at): New.
7569 (set_breakpoint_at): Use write_inferior_memory.
7570 (uninsert_raw_breakpoint): Use write_inferior_memory.
7571 (check_mem_read): Mask out fast tracepoint jumps.
7572 (check_mem_write): Mask out fast tracepoint jumps.
7573 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
7574 (set_fast_tracepoint_jump): Declare.
7575 (delete_fast_tracepoint_jump)
7576 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
7577 (reinsert_fast_tracepoint_jumps_at): Declare.
7578 * regcache.c: Don't compile many functions when building the
7579 in-process agent library.
7580 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
7581 the register buffer in the heap.
7582 (free_register_cache): If the register buffer isn't owned by the
7583 regcache, don't free it.
7584 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
7585 pre-existing register caches.
7586 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
7587 type.
7588 (convert_ascii_to_int): : Constify `from' parameter type.
7589 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
7590 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
7591 the needed buffer in-place.
7592 (relocate_instruction): New.
7593 * server.c (handle_query) <qSymbols>: If the target supports
7594 tracepoints, give it a chance of looking up symbols. Report
7595 support for fast tracepoints.
7596 (handle_status): Stabilize threads.
7597 (process_serial_event): Adjust.
7598 * server.h (struct fast_tracepoint_jump): Forward declare.
7599 (struct process_info) <fast_tracepoint_jumps>: New field.
7600 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
7601 (decode_X_packet, decode_M_packet): Adjust.
7602 (relocate_instruction): Declare.
7603 (in_process_agent_loaded): Declare.
7604 (tracepoint_look_up_symbols): Declare.
7605 (struct fast_tpoint_collect_status): Declare.
7606 (fast_tracepoint_collecting): Declare.
7607 (force_unlock_trace_buffer): Declare.
7608 (handle_tracepoint_bkpts): Declare.
7609 (initialize_low_tracepoint)
7610 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
7611 * target.h (struct target_ops) <stabilize_threads,
7612 install_fast_tracepoint_jump_pad>: New fields.
7613 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
7614 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
7615 [HAVE_STDINT_H]: Include stdint.h.
7616 (trace_debug_1): Rename to ...
7617 (trace_vdebug): ... this.
7618 (trace_debug): Rename to ...
7619 (trace_debug_1): ... this. Add `level' parameter.
7620 (trace_debug): New.
7621 (ATTR_USED, ATTR_NOINLINE): New.
7622 (IP_AGENT_EXPORT): New.
7623 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
7624 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
7625 (about_to_request_buffer_space, trace_buffer_is_full)
7626 (stopping_tracepoint, expr_eval_result, error_tracepoint)
7627 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
7628 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
7629 (traceframe_write_count, traceframes_created)
7630 (trace_state_variables)
7631 New renaming defines.
7632 (struct ipa_sym_addresses): New.
7633 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
7634 (symbol_list): New.
7635 (ipa_sym_addrs): New.
7636 (all_tracepoint_symbols_looked_up): New.
7637 (in_process_agent_loaded): New.
7638 (write_e_ipa_not_loaded): New.
7639 (maybe_write_ipa_not_loaded): New.
7640 (tracepoint_look_up_symbols): New.
7641 (debug_threads) [IN_PROCESS_AGENT]: New.
7642 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
7643 (UNKNOWN_SIDE_EFFECTS): New.
7644 (stop_tracing): New.
7645 (flush_trace_buffer): New.
7646 (stop_tracing_bkpt): New.
7647 (flush_trace_buffer_bkpt): New.
7648 (read_inferior_integer): New.
7649 (read_inferior_uinteger): New.
7650 (read_inferior_data_pointer): New.
7651 (write_inferior_data_pointer): New.
7652 (write_inferior_integer): New.
7653 (write_inferior_uinteger): New.
7654 (struct collect_static_trace_data_action): Delete.
7655 (enum tracepoint_type): New.
7656 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
7657 <actions_str, step_actions, step_actions_str>: Only include in
7658 GDBserver.
fa593d66
PA
7659 <orig_size, obj_addr_on_target, adjusted_insn_addr>
7660 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
7661 (tracepoints): Use IP_AGENT_EXPORT.
7662 (last_tracepoint): Don't include in the IPA.
7663 (stopping_tracepoint): Use IP_AGENT_EXPORT.
7664 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
7665 (alloced_trace_state_variables): New.
7666 (trace_state_variables): Use IP_AGENT_EXPORT.
7667 (traceframe_t): Delete unused variable.
7668 (circular_trace_buffer): Don't include in the IPA.
7669 (trace_buffer_start): Delete.
7670 (struct trace_buffer_control): New.
7671 (trace_buffer_free): Delete.
7672 (struct ipa_trace_buffer_control): New.
7673 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
7674 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
7675 New.
7676 (trace_buffer_ctrl): New.
7677 (TRACE_BUFFER_CTRL_CURR): New.
7678 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
7679 Reimplement as macros.
7680 (trace_buffer_wrap): Delete.
7681 (traceframe_write_count, traceframe_read_count)
7682 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
7683 (struct tracepoint_hit_ctx) <type>: New field.
7684 (struct fast_tracepoint_ctx): New.
7685 (memory_barrier): New.
7686 (cmpxchg): New.
7687 (record_tracepoint_error): Update atomically in the IPA.
7688 (clear_inferior_trace_buffer): New.
7689 (about_to_request_buffer_space): New.
7690 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
7691 updating the same buffer.
7692 (add_tracepoint): Default the tracepoint's type to trap
7693 tracepoint, and orig_size to -1.
7694 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
7695 internal variables.
7696 (create_trace_state_variable): New parameter `gdb'. Handle it.
7697 (clear_installed_tracepoints): Clear fast tracepoint jumps.
7698 (cmd_qtdp): Handle fast tracepoints.
7699 (cmd_qtdv): Adjust.
7700 (max_jump_pad_size): New.
7701 (gdb_jump_pad_head): New.
7702 (get_jump_space_head): New.
7703 (claim_jump_space): New.
7704 (sort_tracepoints): New.
7705 (MAX_JUMP_SIZE): New.
7706 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
7707 IPA.
7708 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
7709 support. Upload fast traceframes, and delete internal IPA
7710 breakpoints.
7711 (stop_tracing_handler): New.
7712 (flush_trace_buffer_handler): New.
7713 (cmd_qtstop): Upload fast tracepoints.
7714 (response_tracepoint): Handle fast tracepoints.
7715 (tracepoint_finished_step): Upload fast traceframes. Set the
7716 tracepoint hit context's tracepoint type.
7717 (handle_tracepoint_bkpts): New.
7718 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
7719 type. Add comment about fast tracepoints.
7720 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
7721 non-existing action_str field.
7722 (get_context_regcache): Handle fast tracepoints.
7723 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
7724 to the regcache.
7725 (fast_tracepoint_from_jump_pad_address): New.
7726 (fast_tracepoint_from_ipa_tpoint_address): New.
7727 (collecting_t): New.
7728 (force_unlock_trace_buffer): New.
7729 (fast_tracepoint_collecting): New.
7730 (collecting): New.
7731 (gdb_collect): New.
7732 (write_inferior_data_ptr): New.
7733 (target_tp_heap): New.
7734 (target_malloc): New.
7735 (download_agent_expr): New.
7736 (UALIGN): New.
7737 (download_tracepoints): New.
7738 (download_trace_state_variables): New.
7739 (upload_fast_traceframes): New.
7740 (IPA_FIRST_TRACEFRAME): New.
7741 (IPA_NEXT_TRACEFRAME_1): New.
7742 (IPA_NEXT_TRACEFRAME): New.
7743 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
7744 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
7745 (gdb_jump_pad_buffer_end): New.
7746 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
7747 (initialize_tracepoint): Adjust.
7748 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
7749 buffer. Initialize the low module.
7750 * utils.c (PREFIX, TOOLNAME): New.
7751 (malloc_failure): Use PREFIX.
7752 (error): In the IPA, an error causes an exit.
7753 (fatal, warning): Use PREFIX.
7754 (internal_error): Use TOOLNAME.
7755 (NUMCELLS): Increase to 10.
7756 * configure, config.in: Regenerate.
7757
d149dd1d
PA
77582010-06-01 Pedro Alves <pedro@codesourcery.com>
7759
7760 * server.c (handle_query) <qSupported>: Do two passes over the
7761 qSupported string to avoid nesting strtok.
7762
f6528abd
JK
77632010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7764
7765 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
7766 (CDEPS): New.
7767 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
7768 -Wl,--dynamic-list.
7769 * configure: Regenerate.
7770 * proc-service.list: New.
7771
ca2a87a0
JK
77722010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7773
7774 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
7775 New comment.
7776
363a6e9f
OS
77772010-05-26 Ozkan Sezer <sezeroz@gmail.com>
7778
7779 * gdbreplay.c (remote_open): Check error return from socket() call by
7780 its equality to -1 not by it being negative.
7781 * remote-utils.c (remote_open): Likewise.
7782
d23b6cb1
PA
77832010-05-23 Pedro Alves <pedro@codesourcery.com>
7784
7785 * config.h: Regenerate.
7786
28d3cf85
MK
77872010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
7788
7789 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
7790 doesn't provide PTRACE_GET_THREAD_AREA.
7791
fea36a59
MK
77922010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
7793
7794 * linux-m68k-low.c: Include <asm/ptrace.h>
7795 (ps_get_thread_area): Implement.
7796
24b066ba
DE
77972010-05-03 Doug Evans <dje@google.com>
7798
7799 * event-loop.c (struct callback_event): New struct.
7800 (callback_list): New global.
7801 (append_callback_event, delete_callback_event): New functions.
7802 (process_callback): New function.
7803 (start_event_loop): Call it.
7804 * remote-utils.c (NOT_SCHEDULED): Define.
7805 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
7806 moved out of readchar.
7807 (readchar): Rewrite. Call reschedule before returning.
7808 (reset_readchar): New function.
7809 (remote_close): Call it.
7810 (process_remaining, reschedule): New functions.
7811 * server.h (callback_handler_func): New typedef.
7812 (append_callback_event, delete_callback_event): Declare.
7813
9836d6ea
PA
78142010-05-03 Pedro Alves <pedro@codesourcery.com>
7815
7816 * proc-service.c (ps_pglobal_lookup): Use
7817 thread_db_look_up_one_symbol.
7818 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
7819 parameter. Use it instead of all_symbols_looked_up.
7820 * server.h (struct process_info) <all_symbols_looked_up>: Delete
7821 field.
7822 (all_symbols_looked_up): Don't declare.
7823 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
7824 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
7825 field.
7826 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
7827 Set all_symbols_looked_up here.
7828 (thread_db_look_up_one_symbol): New.
7829 (thread_db_get_tls_address): Adjust.
7830 (thread_db_load_search, try_thread_db_load_1): Always allocate the
7831 thread_db object on the heap, and tentatively set it in the
7832 process structure.
7833 (thread_db_init): Don't set all_symbols_looked_up here.
7834 * linux-low.h (thread_db_look_up_one_symbol): Declare.
7835
7984d532
PA
78362010-05-03 Pedro Alves <pedro@codesourcery.com>
7837
7838 * linux-low.c (linux_kill, linux_detach): Adjust.
7839 (status_pending_p_callback): Remove redundant statement. Check
7840 for !TARGET_WAITIKIND_IGNORE, instead of
7841 TARGET_WAITKIND_STOPPED.
7842 (handle_tracepoints): Make sure LWP is locked. Adjust.
7843 (linux_wait_for_event_1): Adjust.
7844 (linux_cancel_breakpoints): New.
7845 (unsuspend_one_lwp): New.
7846 (unsuspend_all_lwps): New.
7847 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
7848 (send_sigstop_callback): Change return type to int, add new
7849 `except' parameter and handle it.
7850 (suspend_and_send_sigstop_callback): New.
7851 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
7852 pass them down. If SUSPEND, also increment the lwp's suspend
7853 count.
7854 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
7855 (need_step_over_p): Don't consider suspended LWPs.
7856 (start_step_over): Adjust.
7857 (proceed_one_lwp): Change return type to int, add new `except'
7858 parameter and handle it.
7859 (unsuspend_and_proceed_one_lwp): New.
7860 (proceed_all_lwps): Use find_inferior instead of
7861 for_each_inferior.
7862 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
7863 also decrement the suspend count of LWPs. Pass `except' down,
7864 instead of hacking its suspend count.
7865 (linux_pause_all): Add `freeze' parameter. Adjust.
7866 (linux_unpause_all): New.
7867 (linux_target_ops): Install linux_unpause_all.
7868 * server.c (handle_status): Adjust.
7869 * target.h (struct target_ops): New fields `unpause_all' and
7870 `cancel_breakpoints'. Add new parameter to `pause_all'.
7871 (pause_all): Add new `freeze' parameter.
7872 (unpause_all): New.
7873 (cancel_breakpoints): New.
7874 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
7875 cancel breakpoints.
7876 (cmd_qtstart): Pause threads.
7877 (stop_tracing): Pause threads, and cancel breakpoints.
7878 * win32-low.c (win32_target_ops): Adjust.
7879
e471f25b
PA
78802010-05-03 Pedro Alves <pedro@codesourcery.com>
7881
7882 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
7883 the inferior right away from here...
7884 (linux_wait_1): ... to here, and adjust to check the thread's
7885 last_resume_kind instead of the lwp's step or stop_expected flags.
7886
1915ef4f
PA
78872010-05-02 Pedro Alves <pedro@codesourcery.com>
7888
7889 * README: Use consistent `GDB' and `GDBserver' spellings.
7890
f9e39928
PA
78912010-05-02 Pedro Alves <pedro@codesourcery.com>
7892
7893 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
7894 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
7895 (linux_detach_one_lwp): Assume the lwp is stopped.
7896 (any_thread_of): Delete.
7897 (linux_detach): Stop all lwps here. Don't blindly delete all
7898 breakpoints.
7899 (delete_lwp_callback): New.
7900 (linux_mourn): Delete all lwps of the process that is gone.
7901 (linux_wait_1): Don't delete the last lwp of the process here.
7902 * mem-break.h (mark_breakpoints_out): Declare.
7903 * mem-break.c (mark_breakpoints_out): New.
7904 (free_all_breakpoints): Use it.
7905 * server.c (handle_target_event): If the process is gone, mark
7906 breakpoints out.
7907 * thread-db.c (struct thread_db) <create_bp>: New field.
7908 (thread_db_enable_reporting): Fix prototype. Store a thread event
7909 breakpoint reference in the thread_db struct.
7910 (thread_db_load_search): Clear the thread_db object.
7911 (try_thread_db_load_1): Ditto.
7912 (switch_to_process): New.
7913 (disable_thread_event_reporting): Use it.
7914 (remove_thread_event_breakpoints): New.
7915 (thread_db_detach, thread_db_mourn): Use it.
7916
1e7fc18c
PA
79172010-05-01 Pedro Alves <pedro@codesourcery.com>
7918
7919 * linux-low.c (linux_enable_event_reporting): New.
7920 (linux_wait_for_event_1, handle_extended_wait): Use it.
7921
02fc4de7
PA
79222010-04-30 Pedro Alves <pedro@codesourcery.com>
7923
7924 * linux-low.c (linux_kill_one_lwp, linux_kill)
7925 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
7926 (send_sigstop): Take an lwp_info as parameter instead. Queue a
7927 SIGSTOP even if the LWP is stopped.
7928 (send_sigstop_callback): New.
7929 (stop_all_lwps): Use send_sigstop_callback instead.
7930 (linux_resume_one_thread): Adjust.
7931 (proceed_one_lwp): Still proceed an LWP that the client has
7932 requested to stop, if we haven't reported it as stopped yet. Make
7933 sure that LWPs the client want stopped, have a pending SIGSTOP.
7934
bc3b5632
DE
79352010-04-26 Doug Evans <dje@google.com>
7936
ae1ada35
DE
7937 * server.c (handle_general_set): Make static.
7938
bc3b5632
DE
7939 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
7940 Print received char after testing for error/eof instead of before.
7941 (input_interrupt): Tweak comment.
7942
65730243
DE
79432010-04-23 Doug Evans <dje@google.com>
7944
7945 * server.c (start_inferior): Print inferior argv if --debug.
7946
a8ae7dc0
AR
79472010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
7948
7949 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
7950 * nto-x86-low.c: Include server.h
7951
1c07cc19
PM
79522010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
7953
7954 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
7955 be consistent with other sources of this directory.
7956 (init_registers_amd64): Correct name of source file of this function
7957 in the comment.
7958
e0a61e09
PM
79592010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7960
7961 * configure.srv (x86_64-*-mingw*): New configuration for Windows
7962 64-bit executables.
7963
54709339
PM
79642010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7965
7966 * win32-i386-low.c: Add 64-bit support.
7967 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
7968 (init_registers_amd64): Declare.
7969 (mappings): Add 64-bit version of array.
7970 (init_windows_x86): New function.
7971 (the_low_target): Change init_arch field to init_windows_x86.
7972
e8f0053d
PM
79732010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7974
7975 * win32-low.c: Adapt to support also 64-bit architecture.
7976 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
7977 (get_image_name): Use SIZE_T type for local variable `done'.
7978 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
7979 (toolhelp_get_dll_name): Idem.
7980 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
7981 Use uintptr_t typecast to avoid warning.
7982 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
7983 (handle_exception): Use phex_nz to avoid warning.
7984 (win32_wait): Remove unused local variable `process'.
7985
c481e77e
PM
79862010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7987
7988 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
7989 `amd64-avx.o'.
7990
12ea4b69
PM
79912010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
7992
7993 * configure.ac: Use `ws2_32' library for srv_mingw.
7994 * configure: Regenerate.
7995 * gdbreplay.c: Include winsock2.h instead of winsock.h.
7996 * remote-utils.c: Likewise.
7997
f6d1620c
L
79982010-04-17 H.J. Lu <hongjiu.lu@intel.com>
7999
8000 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
8001 if __x86_64__ is defined.
8002
8e642873
PM
80032010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
8004
8005 * configure: Regenerate.
8006
711e434b
PM
80072010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
8008
8009 * server.c (handle_query): Handle 'qGetTIBAddr' query.
8010 * target.h (target_ops): New get_tib_address field.
8011 * win32-low.h (win32_thread_info): Add thread_local_base field.
8012 * win32-low.c (child_add_thread): Add tlb argument.
8013 Set thread_local_base field to TLB.
8014 (get_child_debug_event): Adapt to child_add_thread change.
8015 (win32_get_tib_address): New function.
8016 (win32_target_ops): Set get_tib_address field to
8017 win32_get_tib_address.
8018 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
8019
505106cd
PA
80202010-04-12 Pedro Alves <pedro@codesourcery.com>
8021
505106cd
PA
8022 * linux-low.c (linux_mourn): Also remove the process.
8023 * server.c (handle_target_event): Don't remove the process here.
8024 * nto-low.c (nto_mourn): New.
8025 (nto_target_ops): Install it.
8026 * spu-low.c (spu_mourn): New.
8027 (spu_target_ops): Install it.
8028 * win32-low.c (win32_mourn): New.
8029 (win32_target_ops): Install it.
8030
e8470a06
PA
80312010-04-12 Pedro Alves <pedro@codesourcery.com>
8032
8033 * server.h (buffer_xml_printf): Remove redundant `;'.
8034
45ba0d02
PA
80352010-04-12 Pedro Alves <pedro@codesourcery.com>
8036
8037 * regcache.c (set_register_cache): Invalidate regcaches before
8038 changing the register cache layout.
8039 (regcache_invalidate_one): Allow a NULL regcache.
8040 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
8041 regcaches before changing the register cache layout or the target
8042 regsets.
8043
59e04013
L
80442010-04-12 H.J. Lu <hongjiu.lu@intel.com>
8045
8046 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
8047 variable warning on Linux/x86-64.
8048
8336d594
PA
80492010-04-11 Pedro Alves <pedro@codesourcery.com>
8050
8051 GDBserver disconnected tracing support.
8052
8053 * linux-low.c (linux_remove_process): Delete.
8054 (add_lwp): Don't set last_resume_kind here.
8055 (linux_kill): Use `mourn'.
8056 (linux_detach): Use `thread_db_detach', and `mourn'.
8057 (linux_mourn): New.
8058 (linux_attach_lwp_1): Adjust comment.
8059 (linux_attach): last_resume_kind moved the thread_info; adjust.
8060 (status_pending_p_callback): Adjust.
8061 (linux_wait_for_event_1): Adjust.
8062 (count_events_callback, select_singlestep_lwp_callback)
8063 (select_event_lwp_callback, cancel_breakpoints_callback)
8064 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
8065 (proceed_one_lwp): Adjust.
8066 (linux_async): Add debug output.
8067 (linux_thread_stopped): New.
8068 (linux_pause_all): New.
8069 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
8070 linux_pause_all.
8071 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
8072 (thread_db_free): Delete declaration.
8073 (thread_db_detach, thread_db_mourn): Declare.
8074 * thread-db.c (thread_db_init): Use thread_db_mourn.
8075 (thread_db_free): Delete, split in two.
8076 (disable_thread_event_reporting): New.
8077 (thread_db_detach): New.
8078 (thread_db_mourn): New.
8079
8080 * server.h (struct thread_info) <last_resume_kind>: New field.
8081 <attached>: Add comment.
8082 <gdb_detached>: New field.
8083 (handler_func): Change return type to int.
8084 (handle_serial_event, handle_target_event): Ditto.
8085 (gdb_connected): Declare.
8086 (tracing): Delete.
8087 (disconnected_tracing): Declare.
8088 (stop_tracing): Declare.
8089
8090 * server.c (handle_query) <qSupported>: Report support for
8091 disconnected tracing.
8092 (queue_stop_reply_callback): Account for running threads.
8093 (gdb_wants_thread_stopped): New.
8094 (gdb_wants_all_threads_stopped): New.
8095 (gdb_reattached_process): New.
8096 (handle_status): Clear the `gdb_detached' flag of all processes.
8097 In all-stop, stop all threads.
8098 (main): Be sure to leave tfind mode. Handle disconnected tracing.
8099 (process_serial_event): If the remote connection breaks, or if an
8100 exit was forced with "monitor exit", force an event loop exit.
8101 Handle disconnected tracing on detach.
8102 (handle_serial_event): Adjust.
8103 (handle_target_event): If GDB isn't connected, forward events back
8104 to the inferior, unless the last process exited, in which case,
8105 exit gdbserver. Adjust interface.
8106
8107 * remote-utils.c (remote_open): Don't block in accept. Instead
8108 register an event loop source on the listen socket file
8109 descriptor. Refactor bits into ...
8110 (listen_desc): ... this new global.
8111 (gdb_connected): ... this new function.
8112 (enable_async_notification): ... this new function.
8113 (handle_accept_event): ... this new function.
8114 (remote_close): Clear remote_desc.
8115
8116 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
8117
8118 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
8119 New fields.
8120 (mourn_inferior): Define.
8121 (target_process_qsupported): Avoid the dangling else problem.
8122 (thread_stopped): Define.
8123 (pause_all): Define.
8124 (target_waitstatus_to_string): Declare.
8125 * target.c (target_waitstatus_to_string): New.
8126
8127 * tracepoint.c (tracing): Make extern.
8128 (disconnected_tracing): New.
8129 (stop_tracing): Make extern. Handle tracing stops due to GDB
8130 disconnecting.
8131 (cmd_qtdisconnected): New.
8132 (cmd_qtstatus): Report disconnected tracing status in trace reply.
8133 (handle_tracepoint_general_set): Handle QTDisconnected.
8134
8135 * event-loop.c (event_handler_func): Change return type to int.
8136 (process_event): Bail out if the event handler wants the event
8137 loop to stop.
8138 (handle_file_event): Ditto.
8139 (start_event_loop): Bail out if the event handler wants the event
8140 loop to stop.
8141
8142 * nto-low.c (nto_target_ops): Adjust.
8143 * spu-low.c (spu_wait): Don't remove the process here.
8144 (spu_target_ops): Adjust.
8145 * win32-low.c (win32_wait): Don't remove the process here.
8146 (win32_target_ops): Adjust.
8147
5d267c4c
PA
81482010-04-11 Pedro Alves <pedro@codesourcery.com>
8149
8150 * regcache.c (realloc_register_cache): Invalidate inferior's
8151 regcache before recreating it.
8152
623ccd72
PA
81532010-04-09 Pedro Alves <pedro@codesourcery.com>
8154
8155 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
8156
219f2f23
PA
81572010-04-09 Stan Shebs <stan@codesourcery.com>
8158 Pedro Alves <pedro@codesourcery.com>
8159
8160 * server.h (LONGEST): New.
8161 (struct thread_info) <while_stepping>: New field.
8162 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
8163 Declare.
8164 (initialize_tracepoint, handle_tracepoint_general_set)
8165 (handle_tracepoint_query, tracepoint_finished_step)
8166 (tracepoint_was_hit, release_while_stepping_state_list):
8167 (current_traceframe): Declare.
8168 * server.c (handle_general_set): Handle tracepoint packets.
8169 (read_memory): New.
8170 (write_memory): New.
8171 (handle_search_memory_1): Use read_memory.
8172 (handle_query): Report support for conditional tracepoints, trace
8173 state variables, and tracepoint sources. Handle tracepoint
8174 queries.
8175 (main): Initialize the tracepoints module.
8176 (process_serial_event): Handle traceframe reads/writes.
8177
8178 * linux-low.c (handle_tracepoints): New.
8179 (linux_wait_1): Call it.
8180 (linux_resume_one_lwp): Handle while-stepping.
8181 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
8182 (linux_target_ops): Install them.
8183 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
8184 New field.
8185 * linux-x86-low.c (x86_supports_tracepoints): New.
8186 (the_low_target). Install it.
8187
8188 * mem-break.h (delete_breakpoint): Declare.
8189 * mem-break.c (delete_breakpoint): Make external.
8190
8191 * target.h (struct target_ops): Add `supports_tracepoints',
8192 `read_pc', and `write_pc' fields.
8193 (target_supports_tracepoints): Define.
8194 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
8195 (phex_nz): New.
8196
8197 * regcache.h (struct regcache) <registers_owned>: New field.
8198 (init_register_cache, regcache_cpy): Declare.
8199 (regcache_read_pc, regcache_write_pc): Declare.
8200 (register_cache_size): Declare.
8201 (supply_regblock): Declare.
8202 * regcache.c (init_register_cache): New.
8203 (new_register_cache): Use it.
8204 (regcache_cpy): New.
8205 (register_cache_size): New.
8206 (supply_regblock): New.
8207 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 8208
219f2f23
PA
8209 * tracepoint.c: New.
8210
8211 * Makefile.in (OBS): Add tracepoint.o.
8212 (tracepoint.o): New rule.
8213
3a13a53b
L
82142010-04-08 H.J. Lu <hongjiu.lu@intel.com>
8215
8216 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
8217 (i386-mmx.o): New.
8218 (i386-mmx.c): Likewise.
8219 (i386-mmx-linux.o): Likewise.
8220 (i386-mmx-linux.c): Likewise.
8221
8222 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
8223 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
8224 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
8225 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
8226
8227 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
8228 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
8229 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
8230
1570b33e
L
82312010-04-07 H.J. Lu <hongjiu.lu@intel.com>
8232
8233 * Makefile.in (clean): Updated.
8234 (i386-avx.o): New.
8235 (i386-avx.c): Likewise.
8236 (i386-avx-linux.o): Likewise.
8237 (i386-avx-linux.c): Likewise.
8238 (amd64-avx.o): Likewise.
8239 (amd64-avx.c): Likewise.
8240 (amd64-avx-linux.o): Likewise.
8241 (amd64-avx-linux.c): Likewise.
8242
8243 * configure.srv (srv_i386_regobj): Add i386-avx.o.
8244 (srv_i386_linux_regobj): Add i386-avx-linux.o.
8245 (srv_amd64_regobj): Add amd64-avx.o.
8246 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
8247 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
8248 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
8249 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
8250 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
8251 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
8252 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
8253
8254 * i387-fp.c: Include "i386-xstate.h".
8255 (i387_xsave): New.
8256 (i387_cache_to_xsave): Likewise.
8257 (i387_xsave_to_cache): Likewise.
8258 (x86_xcr0): Likewise.
8259
8260 * i387-fp.h (i387_cache_to_xsave): Likewise.
8261 (i387_xsave_to_cache): Likewise.
8262 (x86_xcr0): Likewise.
8263
8264 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
8265 * linux-crisv32-low.c (target_regsets): Likewise.
8266 * linux-m68k-low.c (target_regsets): Likewise.
8267 * linux-mips-low.c (target_regsets): Likewise.
8268 * linux-ppc-low.c (target_regsets): Likewise.
8269 * linux-s390-low.c (target_regsets): Likewise.
8270 * linux-sh-low.c (target_regsets): Likewise.
8271 * linux-sparc-low.c (target_regsets): Likewise.
8272 * linux-xtensa-low.c (target_regsets): Likewise.
8273
8274 * linux-low.c: Include <sys/uio.h>.
8275 (regsets_fetch_inferior_registers): Support nt_type.
8276 (regsets_store_inferior_registers): Likewise.
8277 (linux_process_qsupported): New.
8278 (linux_target_ops): Add linux_process_qsupported.
8279
8280 * linux-low.h (regset_info): Add nt_type.
8281 (linux_target_ops): Add process_qsupported.
8282
8283 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
8284 and <sys/uio.h>.
8285 (init_registers_i386_avx_linux): New.
8286 (init_registers_amd64_avx_linux): Likewise.
8287 (xmltarget_i386_linux_no_xml): Likewise.
8288 (xmltarget_amd64_linux_no_xml): Likewise.
8289 (PTRACE_GETREGSET): Likewise.
8290 (PTRACE_SETREGSET): Likewise.
8291 (x86_fill_xstateregset): Likewise.
8292 (x86_store_xstateregset): Likewise.
8293 (use_xml): Likewise.
8294 (x86_linux_update_xmltarget): Likewise.
8295 (x86_linux_process_qsupported): Likewise.
8296 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
8297 (x86_arch_setup): Don't call init_registers_amd64_linux nor
8298 init_registers_i386_linux here. Call
8299 x86_linux_update_xmltarget.
8300 (the_low_target): Add x86_linux_process_qsupported.
8301
8302 * server.c (handle_query): Call target_process_qsupported.
8303
8304 * target.h (target_ops): Add process_qsupported.
8305 (target_process_qsupported): New.
8306
fc7238bb
PA
83072010-04-03 Pedro Alves <pedro@codesourcery.com>
8308
8309 * inferiors.c (add_thread): Set last_status kind to
8310 TARGET_WAITKIND_IGNORE.
8311 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
8312 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
8313 (linux_wait_1): Move `thread' local definition to block that uses
8314 it. Don't NULL initialize `event_child'.
8315 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
8316 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
8317 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
8318
bdabb078
PA
83192010-04-01 Pedro Alves <pedro@codesourcery.com>
8320
8321 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
8322 an extended waitstatus, or by a watchpoint.
8323 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
8324 thread was stepping or has been stopped by a watchpoint.
8325
d3bbe7a0
PA
83262010-04-01 Pedro Alves <pedro@codesourcery.com>
8327
8328 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
8329 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
8330 of another, then delete the previous, and validate all
8331 breakpoints.
8332 (validate_inserted_breakpoint): New.
8333 (delete_disabled_breakpoints): New.
8334 (validate_breakpoints): New.
8335 (check_mem_read): Validate breakpoints before trusting their
8336 shadow. Delete disabled breakpoints.
8337 (check_mem_write): Validate breakpoints before trusting they
8338 should be inserted. Delete disabled breakpoints.
8339 * mem-break.h (validate_breakpoints):
8340 * server.c (handle_query): Validate breakpoints when we see a
8341 qSymbol query.
8342
8b07ae33
PA
83432010-04-01 Pedro Alves <pedro@codesourcery.com>
8344
8345 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
8346 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
8347 if we could tell there's a GDB breakpoint at stop_pc.
8348 (need_step_over_p): Don't do a step over if we find a GDB
8349 breakpoint at the resume PC.
8350
8351 * mem-break.c (struct raw_breakpoint): New.
8352 (enum bkpt_type): New type `gdb_breakpoint'.
8353 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
8354 fields. New field `raw'.
8355 (find_raw_breakpoint_at): New.
8356 (set_raw_breakpoint_at): Handle refcounting. Create a raw
8357 breakpoint instead.
8358 (set_breakpoint_at): Adjust.
8359 (delete_raw_breakpoint): New.
8360 (release_breakpoint): New.
8361 (delete_breakpoint): Rename to...
8362 (delete_breakpoint_1): ... this. Add proc parameter. Use
8363 release_breakpoint. Return ENOENT.
8364 (delete_breakpoint): Reimplement.
8365 (find_breakpoint_at): Delete.
8366 (find_gdb_breakpoint_at): New.
8367 (delete_breakpoint_at): Delete.
8368 (set_gdb_breakpoint_at): New.
8369 (delete_gdb_breakpoint_at): New.
8370 (gdb_breakpoint_here): New.
8371 (set_reinsert_breakpoint): Use release_breakpoint.
8372 (uninsert_breakpoint): Rename to ...
8373 (uninsert_raw_breakpoint): ... this.
8374 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
8375 (reinsert_raw_breakpoint): Change parameter type to
8376 raw_breakpoint.
8377 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
8378 instead.
8379 (check_breakpoints): Adjust. Use release_breakpoint.
8380 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
8381 (breakpoint_inserted_here): Ditto.
8382 (check_mem_read): Adjust to iterate over raw breakpoints instead.
8383 Don't trust the breakpoint's shadow if it is not inserted.
8384 (check_mem_write): Adjust to iterate over raw breakpoints instead.
8385 (delete_all_breakpoints): Adjust.
8386 (free_all_breakpoints): Mark all breakpoints as uninserted, and
8387 use delete_breakpoint_1.
8388
8389 * mem-break.h (breakpoints_supported): Delete declaration.
8390 (set_gdb_breakpoint_at): Declare.
8391 (gdb_breakpoint_here): Declare.
8392 (delete_breakpoint_at): Delete.
8393 (delete_gdb_breakpoint_at): Declare.
8394
8395 * server.h (struct raw_breakpoint): Forward declare.
8396 (struct process_info): New field `raw_breakpoints'.
8397
8398 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
8399 breakpoints.
8400
6bf5e0ba
PA
84012010-03-24 Pedro Alves <pedro@codesourcery.com>
8402
8403 * linux-low.c (status_pending_p_callback): Fix comment.
8404 (linux_wait_for_event_1): Move most of the internal breakpoint
8405 handling from here...
8406 (linux_wait_1): ... to here.
8407 (count_events_callback): New.
8408 (select_singlestep_lwp_callback): New.
8409 (select_event_lwp_callback): New.
8410 (cancel_breakpoints_callback): New.
8411 (select_event_lwp): New.
8412 (linux_wait_1): Simplify internal breakpoint handling. Give equal
8413 priority to all LWPs that have had events that should be reported
8414 to the client. Cancel breakpoints when about to reporting the
8415 event to the client, not while stopping lwps. No longer cancel
8416 finished single-steps here.
8417 (cancel_finished_single_step): Delete.
8418 (cancel_finished_single_steps): Delete.
8419
414a389f
PA
84202010-03-24 Pedro Alves <pedro@codesourcery.com>
8421
8422 * mem-break.c (enum bkpt_type): New.
8423 (struct breakpoint): New field `type'.
8424 (set_breakpoint_at): Change return type to struct breakpoint
8425 pointer. Set type to `other_breakpoint' by default.
8426 (delete_breakpoint): Rewrite, supporting more than one breakpoint
8427 in the breakpoint list.
8428 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
8429 (reinsert_breakpoint): Rename to ...
8430 (reinsert_raw_breakpoint): ... this.
8431 (reinsert_breakpoints_at): Adjust.
8432 * mem-break.h (struct breakpoint): Declare.
8433 (set_breakpoint_at): Change return type to struct breakpoint
8434 pointer.
8435
2280c721
PA
84362010-03-24 Pedro Alves <pedro@codesourcery.com>
8437
8438 * server.c (handle_query): Assign, not compare.
8439
d50171e4
PA
84402010-03-24 Pedro Alves <pedro@codesourcery.com>
8441
8442 Teach linux gdbserver to step-over-breakpoints.
8443
8444 * linux-low.c (can_hardware_single_step): New.
8445 (supports_breakpoints): New.
8446 (handle_extended_wait): If stopping threads, read the stop pc of
8447 the new cloned LWP.
8448 (get_pc): New.
8449 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
8450 low target doesn't support retrieving the PC.
8451 (add_lwp): Set last_resume_kind to resume_continue.
8452 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
8453 (linux_attach): Don't clear stop_expected. Set the lwp's
8454 last_resume_kind to resume_stop.
8455 (linux_detach_one_lwp): Don't check for removed breakpoints.
8456 (check_removed_breakpoint): Delete.
8457 (status_pending_p): Rename to ...
8458 (status_pending_p_callback): ... this. Don't check for removed
8459 breakpoints. Don't consider threads that are stopped from GDB's
8460 perspective.
8461 (linux_wait_for_lwp): Always read the stop_pc here.
8462 (cancel_breakpoint): New.
8463 (step_over_bkpt): New global.
8464 (linux_wait_for_event_1): Implement stepping over breakpoints.
8465 (gdb_wants_lwp_stopped): New.
8466 (gdb_wants_all_stopped): New.
8467 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
8468 single-step traps here. Store the thread's last reported target
8469 wait status.
8470 (send_sigstop): Don't clear stop_expected. Always set it,
8471 instead.
8472 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
8473 (cancel_finished_single_step): New.
8474 (cancel_finished_single_steps): New.
8475 (wait_for_sigstop): Don't cancel finished single-step traps here.
8476 (linux_resume_one_lwp): Don't check for removed breakpoints.
8477 Don't set `step' on non-hardware step archs.
8478 (linux_set_resume_request): Ignore resume_stop requests if already
8479 stopping or stopped. Set the lwp's last_resume_kind.
8480 (resume_status_pending_p): Don't check for removed breakpoints.
8481 (need_step_over_p): New.
8482 (start_step_over): New.
8483 (finish_step_over): New.
8484 (linux_resume_one_thread): Always queue a sigstop for resume_stop
8485 requests. Clear the thread's last reported target waitstatus.
8486 Don't use the `suspended' flag. Don't consider pending breakpoints.
8487 (linux_resume): Start a step-over if necessary.
8488 (proceed_one_lwp): New.
8489 (proceed_all_lwps): New.
8490 (unstop_all_lwps): New.
8491 * linux-low.h (struct lwp_info): Rewrite comment for the
8492 `suspended' flag. Add the `stop_pc' field. Delete the
8493 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
8494 Add `'last_resume_kind' and `need_step_over' fields.
8495 * inferiors.c (struct thread_info): Delete, moved elsewhere.
8496 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
8497 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
8498 (set_raw_breakpoint_at): New.
8499 (set_breakpoint_at): Rewrite to use it.
8500 (reinsert_breakpoint_handler): Delete.
8501 (set_reinsert_breakpoint): New.
8502 (reinsert_breakpoint_by_bp): Delete.
8503 (delete_reinsert_breakpoints): New.
8504 (uninsert_breakpoint): Rewrite.
8505 (uninsert_breakpoints_at): New.
8506 (reinsert_breakpoint): Rewrite.
8507 (reinsert_breakpoints_at): New.
8508 (check_breakpoints): Rewrite.
8509 (breakpoint_here): New.
8510 (breakpoint_inserted_here): New.
8511 (check_mem_read): Adjust.
8512 * mem-break.h (breakpoints_supported, breakpoint_here)
8513 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
8514 (reinsert_breakpoint_by_bp): Delete declaration.
8515 (delete_reinsert_breakpoints): Declare.
8516 (reinsert_breakpoint): Delete declaration.
8517 (reinsert_breakpoints_at): Declare.
8518 (uninsert_breakpoint): Delete declaration.
8519 (uninsert_breakpoints_at): Declare.
8520 (check_breakpoints): Adjust prototype.
8521 * server.h: Adjust include order.
8522 (struct thread_info): Declare here. Add a `last_status' field.
8523
30ba68cb
MS
85242010-03-23 Michael Snyder <msnyder@vmware.com>
8525
8526 * server.c (crc32): New function.
8527 (handle_query): Add handling for 'qCRC:' request.
8528
b9a881c2
PA
85292010-03-23 Pedro Alves <pedro@codesourcery.com>
8530
8531 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
8532 lwp had been stopped by a watchpoint.
8533
e92d13d5
PA
85342010-03-16 Pedro Alves <pedro@codesourcery.com>
8535
8536 * server.h (internal_error): Declare.
8537 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
8538 * utils.c (internal_error): New function.
8539
64daa791
AS
85402010-03-15 Andreas Schwab <schwab@redhat.com>
8541
8542 * configure.srv: Fix typo setting srv_regobj.
8543
f52cd8cd
PA
85442010-03-15 Pedro Alves <pedro@codesourcery.com>
8545
8546 * linux-low.c (fetch_register): Avoid passing a non string literal
8547 format to `error'.
8548 (usr_store_inferior_registers): Ditto.
8549
93ae6fdc
PA
85502010-03-14 Pedro Alves <pedro@codesourcery.com>
8551
8552 * linux-low.c (linux_write_memory): Bail out early if peeking
8553 memory failed.
8554
c3adc08c
PA
85552010-03-14 Pedro Alves <pedro@codesourcery.com>
8556
8557 * linux-low.h (struct lwp_info): New fields
8558 `stopped_by_watchpoint' and `stopped_data_address'.
8559 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
8560 here, and cache them in the lwp object.
8561 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
8562 directly.
8563 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
8564 field.
8565 (linux_stopped_by_watchpoint): Rewrite.
8566 (linux_stopped_data_address): Rewrite.
8567
bce522a2
PA
85682010-03-06 Simo Melenius <simo.melenius@iki.fi>
8569
8570 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
8571 switching the current inferior, not before.
8572
90884b2b
L
85732010-03-01 H.J. Lu <hongjiu.lu@intel.com>
8574
8575 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
8576 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
8577 i386-linux.c and amd64-linux.c.
8578 (reg-i386.o): Removed.
8579 (reg-i386.c): Likewise.
8580 (reg-i386-linux.o): Likewise.
8581 (reg-i386-linux.c): Likewise.
8582 (reg-x86-64.o): Likewise.
8583 (reg-x86-64.c): Likewise.
8584 (reg-x86-64-linux.o): Likewise.
8585 (reg-x86-64-linux.c): Likewise.
8586 (i386.o): New.
8587 (i386.c): Likewise.
8588 (i386-linux.o): Likewise.
8589 (i386-linux.c): Likewise.
8590 (amd64.o): Likewise.
8591 (amd64.c): Likewise.
8592 (amd64-linux.o): Likewise.
8593 (amd64-linux.c): Likewise.
8594
8595 * configure.srv (srv_i386_regobj): New.
8596 (srv_i386_linux_regobj): Likewise.
8597 (srv_amd64_regobj): Likewise.
8598 (srv_amd64_linux_regobj): Likewise.
8599 (srv_i386_32bit_xmlfiles): Likewise.
8600 (srv_i386_64bit_xmlfiles): Likewise.
8601 (srv_i386_xmlfiles): Likewise.
8602 (srv_amd64_xmlfiles): Likewise.
8603 (srv_i386_linux_xmlfiles): Likewise.
8604 (srv_amd64_linux_xmlfiles): Likewise.
8605 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
8606 srv_xmlfiles to $srv_i386_xmlfiles.
8607 (i[34567]86-*-mingw32ce*): Likewise.
8608 (i[34567]86-*-mingw*): Likewise.
8609 (i[34567]86-*-nto*): Likewise.
8610 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
8611 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
8612 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
8613 (x86_64-*-linux*): Likewise.
8614
8615 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
8616 (init_registers_amd64_linux): New.
8617 (x86_arch_setup): Replace init_registers_x86_64_linux with
8618 init_registers_amd64_linux.
8619
193f13e6
MK
86202010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
8621
8622 * configure.ac: Check for libdl. If it is not available link against
8623 static libthread_db.
8624 * configure: Regenerate.
8625
85d721b8
PA
86262010-02-22 Pedro Alves <pedro@codesourcery.com>
8627
8628 PR9605
8629
8630 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
8631 handing a read watchpoint.
8632 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
8633
6076632b
DE
86342010-02-12 Doug Evans <dje@google.com>
8635
8636 * linux-low.c (linux_supports_tracefork_flag): Document.
8637 (linux_look_up_symbols): Add comment.
8638
3327ccf7
L
86392010-02-03 H.J. Lu <hongjiu.lu@intel.com>
8640
8641 * regcache.c (supply_register): Clear regcache if buf is NULL.
8642
0718675c 86432010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 8644 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
8645
8646 * inferiors.c (find_inferior): Add function documentation.
8647 (unloaded_dll): Handle the case where the unloaded dll has not
8648 been previously registered in the dll list.
8649
177321bd
DJ
86502010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
8651
8652 * linux-arm-low.c (thumb_breakpoint_len): Delete.
8653 (thumb2_breakpoint): New.
8654 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
8655
2b009048
DJ
86562010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
8657
8658 * linux-low.c (get_stop_pc): Check for SIGTRAP.
8659 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
8660 breakpoints.
8661
3be029c7
PA
86622010-01-21 Pedro Alves <pedro@codesourcery.com>
8663
8664 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
8665
18f5de3b
JK
86662010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
8667
8668 * linux-s390-low.c (s390_collect_ptrace_register)
8669 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
8670
3743bb4f
DE
86712010-01-21 Doug Evans <dje@google.com>
8672
14ce3065
DE
8673 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
8674 (PTRACE_ARG4_TYPE): New macro.
8675 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
8676 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
8677 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
8678 (usr_store_inferior_registers): Ditto.
8679 (linux_read_memory, linux_write_memory): Ditto.
8680 (linux_test_for_tracefork): Ditto.
8681
3743bb4f
DE
8682 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
8683 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
8684
8b315be5
PA
86852010-01-21 Pedro Alves <pedro@codesourcery.com>
8686
8687 * proc-service.c (ps_lgetregs): Don't refetch registers from the
8688 target.
8689
85492558
PA
86902010-01-21 Pedro Alves <pedro@codesourcery.com>
8691
8692 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
8693 prototype to take a regcache. Adjust.
8694
442ea881
PA
86952010-01-20 Pedro Alves <pedro@codesourcery.com>
8696
8697 * regcache.h (struct thread_info): Forward declare.
8698 (struct regcache): New.
8699 (new_register_cache): Adjust prototype.
8700 (get_thread_regcache): Declare.
8701 (free_register_cache): Adjust prototype.
8702 (registers_to_string, registers_from_string): Ditto.
8703 (supply_register, supply_register_by_name, collect_register)
8704 (collect_register_as_string, collect_register_by_name): Ditto.
8705 * regcache.c (struct inferior_regcache_data): Delete.
8706 (get_regcache): Rename to ...
8707 (get_thread_regcache): ... this. Adjust. Switch inferior before
8708 fetching registers.
8709 (regcache_invalidate_one): Adjust.
8710 (regcache_invalidate): Fix prototype.
8711 (new_register_cache): Return the new register cache.
8712 (free_register_cache): Change prototype.
8713 (realloc_register_cache): Adjust.
8714 (registers_to_string): Change prototype to take a regcache. Adjust.
8715 (registers_from_string): Ditto.
8716 (register_data): Ditto.
8717 (supply_register): Ditto.
8718 (supply_register_by_name): Ditto.
8719 (collect_register): Ditto.
8720 (collect_register_as_string): Ditto.
8721 (collect_register_by_name): Ditto.
8722 * server.c (process_serial_event): Adjust.
8723 * linux-low.h (regset_fill_func, regset_store_func): Change
8724 prototype.
8725 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
8726 Change prototype.
8727 * linux-low.c (get_stop_pc): Adjust.
8728 (check_removed_breakpoint): Adjust.
8729 (linux_wait_for_event): Adjust.
8730 (linux_resume_one_lwp): Adjust.
8731 (fetch_register): Add regcache parameter. Adjust.
8732 (usr_store_inferior_registers): Ditto.
8733 (regsets_fetch_inferior_registers): Ditto.
8734 (regsets_store_inferior_registers): Ditto.
8735 (linux_fetch_registers, linux_store_registers): Ditto.
8736 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
8737 regcache. Adjust.
43aaf8b6
PA
8738 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
8739 Ditto.
442ea881
PA
8740 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
8741 prototype to take a regcache.
8742 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
8743 * remote-utils.c (convert_ascii_to_int, outreg)
8744 (prepare_resume_reply): Change prototype to take a regcache.
8745 Adjust.
8746 * target.h (struct target_ops) <fetch_registers, store_registers>:
8747 Change prototype to take a regcache.
8748 (fetch_inferior_registers, store_inferior_registers): Change
8749 prototype to take a regcache. Adjust.
8750 * proc-service.c (ps_lgetregs): Adjust.
8751 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
8752 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
8753 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
8754 take a regcache. Adjust.
8755 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
8756 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
8757 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
8758 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
8759 * linux-cris-low.c (cris_get_pc, cris_set_pc)
8760 (cris_cannot_fetch_register):
8761 (cris_breakpoint_at): Change prototype to take a regcache.
8762 Adjust.
8763 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
8764 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
8765 to take a regcache. Adjust.
8766 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
8767 Adjust.
8768 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
8769 take a regcache. Adjust.
8770 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
8771 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
8772 (m68k_set_pc): Change prototype to take a regcache. Adjust.
8773 * linux-mips-low.c (mips_get_pc):
8774 (mips_set_pc): Change prototype to take a regcache. Adjust.
8775 (mips_reinsert_addr): Adjust.
8776 (mips_collect_register): Change prototype to take a regcache.
8777 Adjust.
8778 (mips_supply_register):
8779 (mips_collect_register_32bit, mips_supply_register_32bit)
8780 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
8781 (mips_store_fpregset): Ditto.
43aaf8b6
PA
8782 * linux-ppc-low.c (ppc_supply_ptrace_register)
8783 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
8784 (parse_spufs_run): Adjust.
8785 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
8786 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
8787 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
8788 take a regcache. Adjust.
8789 * linux-s390-low.c (s390_collect_ptrace_register)
8790 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
8791 (s390_set_pc): Change prototype to take a regcache. Adjust.
8792 (s390_arch_setup): Adjust.
8793 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
8794 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
8795 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
8796 (sparc_fill_gregset, sparc_store_gregset_from_stack)
8797 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
8798 regcache. Adjust.
8799 (sparc_breakpoint_at): Adjust.
8800 * linux-xtensa-low.c (xtensa_fill_gregset):
8801 (xtensa_store_gregset):
8802 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
8803 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
8804 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
8805 prototype to take a regcache. Adjust.
8806 * win32-arm-low.c (arm_fetch_inferior_register)
8807 (arm_store_inferior_register): Change prototype to take a
8808 regcache. Adjust.
8809 * win32-i386-low.c (i386_fetch_inferior_register)
8810 (i386_store_inferior_register): Change prototype to take a
8811 regcache. Adjust.
8812 * win32-low.c (child_fetch_inferior_registers)
8813 (child_store_inferior_registers): Change prototype to take a
8814 regcache. Adjust.
8815 (win32_wait): Adjust.
8816 (win32_fetch_inferior_registers): Change prototype to take a
8817 regcache. Adjust.
8818 (win32_store_inferior_registers): Adjust.
8819 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
8820 store_inferior_register>: Change prototype to take a regcache.
8821
60c3d7b0
DE
88222010-01-20 Doug Evans <dje@google.com>
8823
8824 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
8825 #ifdef.
8826 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 8827 (W_STOPCODE): Provide definition if missing.
60c3d7b0 8828
dc146f7c
VP
88292010-01-13 Vladimir Prus <vladimir@codesourcery.com>
8830
8831 * linux-low.c (linux_core_of_thread): New.
8832 (compare_ints, show_process, list_threads): New.
8833 (linux_qxfer_osdata): Report threads and cores.
8834 (linux_target_op): Register linux_core_of_thread.
8835 * remote-utils.c (prepare_resume_reply): Report the core.
8836 (buffer_xml_printf): Support %d specifier.
8837 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
8838 New.
8839 (handle_query): Handle qXfer:threads. Announce availability
8840 thereof.
8841 * target.h (struct target_ops): New field core_of_thread.
8842
7803799a
UW
88432010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
8844
8845 * Makefile.in (clean): Remove new generated files.
8846 (reg-s390.o, reg-s390.c): Remove rules.
8847 (reg-s390x.o, reg-s390x.c): Likewise.
8848 (s390-linux32.o, s390-linux32.c): Add rules.
8849 (s390-linux64.o, s390-linux64.c): Likewise.
8850 (s390x-linux64.o, s390x-linux64.c): Likewise.
8851 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
8852 * linux-s390-low.c: Include <elf.h>.
8853 (HWCAP_S390_HIGH_GPRS): Define if undefined.
8854 (init_registers_s390): Remove prototype.
8855 (init_registers_s390x): Likewise.
8856 (init_registers_s390_linux32): Add prototype.
8857 (init_registers_s390_linux64): Likewise.
8858 (init_registers_s390x_linux64): Likewise.
8859 (s390_num_regs_3264): New define.
8860 (s390_regmap_3264): New global variable.
8861 (s390_cannot_fetch_register): Remove obsolete check.
8862 (s390_cannot_store_register): Likewise.
8863 (s390_collect_ptrace_register): Handle upper/lower register halves.
8864 (s390_supply_ptrace_register): Likewise.
8865 (s390_fill_gregset): Update to register number changes.
8866 (s390_get_hwcap): New routine.
8867 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
8868 Install appropriate regmap and register set.
8869
6e7ffa39
JB
88702010-01-01 Joel Brobecker <brobecker@adacore.com>
8871
8872 * server.c (gdbserver_version): Update copyright year to 2010.
8873 * gdbreplay.c (gdbreplay_version): Likewise.
8874
957f3f49
DE
88752009-12-28 Doug Evans <dje@google.com>
8876
8877 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
8878 elf/external.h. Include <elf.h> instead but only if necessary.
8879
ca5c370d
PA
88802009-12-28 Pedro Alves <pedro@codesourcery.com>
8881
8882 * linux-low.c (linux_remove_process): Remove `detaching'
8883 parameter. Don't release/detach from thread_db here.
8884 (linux_kill): Release/detach from thread_db here, ...
8885 (linux_detach): ... and here, before actually detaching.
8886 (linux_wait_1): ... and here, when a process exits.
8887 * thread-db.c (any_thread_of): New.
8888 (thread_db_free): Switch the current inferior to a thread of the
8889 passed in process.
8890
4ee62156
DE
88912009-12-21 Doug Evans <dje@google.com>
8892
d90e6a88
DE
8893 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
8894
c5f62d5f
DE
8895 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
8896 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
8897 warning ifndef __NR_tkill. Move setting of errno there too.
8898 Delete unnecessary resetting of errno after syscall.
8899 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
8900
10e86dd7
DE
8901 * configure.ac: Check for dladdr.
8902 * config.in: Regenerate.
8903 * configure: Regenerate.
8904 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
8905 (try_thread_db_load): Update.
8906
4ee62156
DE
8907 * linux-low.c (my_waitpid): Delete unnecessary prototype.
8908
00f515da
DE
89092009-12-18 Doug Evans <dje@google.com>
8910
e9464885
DE
8911 * event-loop.c: Include unistd.h if it exists.
8912
07d4f67e
DE
8913 * linux-low.c (my_waitpid): Move definition away from being in
8914 between linux_tracefork_child/linux_test_for_tracefork.
8915
00f515da
DE
8916 * gdb_proc_service.h (psaddr_t): Fix type.
8917 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
8918 signature to match glibc.
8919
1de1badb
DE
89202009-12-16 Doug Evans <dje@google.com>
8921
8922 * linux-low.c (linux_read_memory): Fix argument to read.
8923
aeeb81d1
PA
89242009-11-26 Pedro Alves <pedro@codesourcery.com>
8925
8926 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
8927 events, don't leave current_inferior pointing at null.
8928
10357975
PA
89292009-11-26 Pedro Alves <pedro@codesourcery.com>
8930
8931 * win32-low.c (LOG): Delete.
8932 (OUTMSG): Output to stderr.
8933 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
8934 on compile time LOG macro.
8935 (win32_wait): Fix debug output.
8936
cf6e3471
PA
89372009-11-26 Pedro Alves <pedro@codesourcery.com>
8938
8939 * win32-low.c (win32_add_one_solib): If the dll name is
8940 "ntdll.dll", prepend the system directory to the dll path.
8941
0c85e18e
MK
89422009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
8943
8944 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
8945
9ac544ce 89462009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 8947 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
8948
8949 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
8950 * configure.ac: Check for __mcoldfire__ and set
8951 gdb_cv_m68k_is_coldfire.
8952 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
8953 reg-cf.o and reg-m68k.o.
8954 * configure: Regenerated.
8955
fd7dd3e6
PA
89562009-11-16 Pedro Alves <pedro@codesourcery.com>
8957
8958 * linux-low.c (linux_remove_process): Add `detaching' parameter.
8959 Pass it to thread_db_free.
8960 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
8961 proper `detaching' argument to linux_remove_process.
8962 * linux-low.h (thread_db_free): Add `detaching' parameter.
8963 * thread-db.c (thread_db_init): Pass false as `detaching' argument
8964 to thread_db_free.
8965 (thread_db_free): Add `detaching' parameter. Only
8966 call td_ta_clear_event if detaching from process.
8967
75aa492e
MK
89682009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
8969
8970 * thread-db.c (thread_db_free): Fix typo.
8971
21e1bee4
PP
89722009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
8973
8974 PR gdb/10838
8975 * thread-db.c (thread_db_free): Call td_ta_clear_event.
8976
8838b45e
NS
89772009-11-03 Nathan Sidwell <nathan@codesourcery.com>
8978
8979 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
8980 with an i686 compiler.
8981 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
8982 needed.
8983 * configure: Rebuilt.
8984
8a35fb51
SL
89852009-10-29 Sandra Loosemore <sandra@codesourcery.com>
8986
8987 PR gdb/10783
8988
8989 * server.c (handle_search_memory_1): Correct read_addr initialization
8990 in loop for searching subsequent chunks.
8991
96f15937
PP
89922009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
8993
8994 * configure.ac: New --with-libthread-db option.
8995 * thread-db.c: Allow direct dependence on libthread_db.
8996 (thread_db_free): Adjust.
8997 * config.in: Regenerate.
8998 * configure: Likewise.
889bf7c5 8999
5f7d1694
PP
90002009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
9001
9002 PR gdb/10757
9003 * thread-db.c (attach_thread): New function.
9004 (maybe_attach_thread): Return success/failure.
9005 (find_new_threads_callback): Adjust.
889bf7c5
PA
9006 (thread_db_find_new_threads): Loop until no new threads.
9007
88e3b899
PA
90082009-10-13 Pedro Alves <pedro@codesourcery.com>
9009
9010 * proc-service.c (ps_lgetregs): Formatting.
9011
cdbfd419
PP
90122009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
9013
9014 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
9015 * configure.ac: Adjust.
9016 * linux-low.h (struct process_info_private): Move members to struct
9017 thread_db.
9018 (thread_db_free, thread_db_handle_monitor_command): New prototype.
9019 * linux-low.c (linux_remove_process): Adjust.
9020 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
9021 * server.c (handle_query): Move code ...
9022 (handle_monitor_command): ... here. New function.
9023 * target.h (struct target_ops): New member.
9024 * thread-db.c (struct thread_db): New.
9025 (libthread_db_search_path): New variable.
9026 (thread_db_create_event, thread_db_enable_reporting)
9027 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
9028 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
9029 (try_thread_db_load_1, dladdr_to_soname): New functions.
9030 (try_thread_db_load, thread_db_load_search): New functions.
9031 (thread_db_init): Search for libthread_db.
9032 (thread_db_free): New function.
9033 (thread_db_handle_monitor_command): Likewise.
9034 * config.in: Regenerate.
9035 * configure: Regenerate.
889bf7c5 9036
4168d2d6
UW
90372009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
9038
9039 * spu-low.c (spu_kill): Wait for inferior to terminate.
9040 Call clear_inferiors.
9041 (spu_detach): Call clear_inferiors.
9042
81ecdfbb
RW
90432009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9044
9045 * aclocal.m4: Regenerate.
9046 * config.in: Likewise.
9047 * configure: Likewise.
9048
0b9ff2c0
UW
90492009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9050
9051 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
9052 (parse_spufs_run): New function.
9053 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
9054 (ppc_breakpoint_at): Handle SPU breakpoints.
9055
efcbbd14
UW
90562009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9057
9058 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
9059 (SPUFS_MAGIC): Define.
9060 (spu_enumerate_spu_ids): New function.
9061 (linux_qxfer_spu): New function.
9062 (linux_target_ops): Install linux_qxfer_spu.
9063
f4d9bade
UW
90642009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9065
9066 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
9067 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
9068 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
9069 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
9070 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
9071 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
9072 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
9073 (init_registers_powerpc_cell32l): Add prototype.
9074 (init_registers_powerpc_cell64l): Likewise.
9075 (ppc_arch_setup): Detect Cell/B.E. architecture.
9076
96e946ca
RW
90772009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9078
9079 * Makefile.in (datarootdir): New variable.
9080
58d6951d
DJ
90812009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
9082
9083 * linux-low.c (linux_write_memory): Update debugging output.
9084 * Makefile.in (clean): Add new descriptions.
9085 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
9086 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
9087 * configure.srv: Add new files for arm*-*-linux*.
9088 * linux-arm-low.c: Add new declarations.
9089 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
9090 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
9091 (HWCAP_VFPv3D16): New.
9092 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
9093 instead of __IWMMXT__.
9094 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
9095 (arm_arch_setup): New.
9096 (target_regsets): Remove #ifdef. Add VFP regset.
9097 (the_low_target): Use arm_arch_setup.
9098
12b42a12
DJ
90992009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
9100
9101 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
9102 the main thread again.
9103
ac8c974e
AR
91042009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
9105
9106 Adding Neutrino gdbserver.
9107 * configure: Regenerated.
9108 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
9109 * configure.srv (i[34567]86-*-nto*): New target.
9110 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
9111 * remote-utils.c [__QNX__]: Include sys/iomgr.h
9112 (nto_comctrl) [__QNX__]: New function.
9113 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
9114
4424e0c3 91152009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
9116
9117 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
9118 srv_tgtobj.
9119
912cf4ba
PA
91202009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
9121 Pedro Alves <pedro@codesourcery.com>
9122
9123 * win32-i386-low.c (i386_get_thread_context): Handle systems that
9124 don't support CONTEXT_EXTENDED_REGISTERS.
9125 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
9126 (the_low_target): Install them.
9127 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
9128 failing with ERROR_PIPE_NOT_CONNECTED.
9129
aa5ca48f
DE
91302009-06-30 Doug Evans <dje@google.com>
9131 Pierre Muller <muller@ics.u-strasbg.fr>
9132
9133 Add h/w watchpoint support to x86-linux, win32-i386.
9134 * Makefile.in (SFILES): Add i386-low.c
9135 (i386_low_h): Define.
9136 (i386-low.o): Add dependencies.
9137 (linux-x86-low.o): Add i386-low.h dependency.
9138 (win32-i386-low.o): Ditto.
9139 * i386-low.c: New file.
9140 * i386-low.h: New file.
9141 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
9142 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
9143 * linux-low.c (linux_add_process): Initialize arch_private.
9144 (linux_remove_process): Free arch_private.
9145 (add_lwp): Initialize arch_private.
9146 (delete_lwp): Free arch_private.
9147 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
9148 provided.
9149 * linux-low.h (process_info_private): New member arch_private.
9150 (lwp_info): New member arch_private.
9151 (linux_target_ops): New members new_process, new_thread,
9152 prepare_to_resume.
9153 (ptid_of): New macro.
9154 * linux-x86-low.c: Include stddef.h, i386-low.h.
9155 (arch_process_info): New struct.
9156 (arch_lwp_info): New struct.
9157 (x86_linux_dr_get, x86_linux_dr_set): New functions.
9158 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
9159 (i386_dr_low_get_status): New function.
9160 (x86_insert_point, x86_remove_point): New functions.
9161 (x86_stopped_by_watchpoint): New function.
9162 (x86_stopped_data_address): New function.
9163 (x86_linux_new_process, x86_linux_new_thread): New functions.
9164 (x86_linux_prepare_to_resume): New function.
9165 (the_low_target): Add entries for insert_point, remove_point,
9166 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
9167 prepare_to_resume.
9168 * server.c (debug_hw_points): New global.
9169 (monitor_show_help): Document set debug-hw-points.
9170 (handle_query): Process "set debug-hw-points".
9171 * server.h (debug_hw_points): Declare.
9172 (paddress): Declare.
9173 * utils.c (NUMCELLS, CELLSIZE): New macros.
9174 (get_sell, xsnprintf, paddress): New functions.
9175 * win32-arm-low.c (the_low_target): Add entries for insert_point,
9176 remove_point, stopped_by_watchpoint, stopped_data_address.
9177 * win32-i386-low.c: Include i386-low.h.
9178 (debug_reg_state): Replaces dr.
9179 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
9180 (i386_dr_low_get_status): New function.
9181 (i386_insert_point, i386_remove_point): New functions.
9182 (i386_stopped_by_watchpoint): New function.
9183 (i386_stopped_data_address): New function.
9184 (i386_initial_stuff): Update.
9185 (get_thread_context,set_thread_context,i386_thread_added): Update.
9186 (the_low_target): Add entries for insert_point,
9187 remove_point, stopped_by_watchpoint, stopped_data_address.
9188 * win32-low.c (win32_insert_watchpoint): New function.
9189 (win32_remove_watchpoint): New function.
9190 (win32_stopped_by_watchpoint): New function.
9191 (win32_stopped_data_address): New function.
9192 (win32_target_ops): Add entries for insert_watchpoint,
9193 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
9194 * win32-low.h (win32_target_ops): New members insert_point,
9195 remove_point, stopped_by_watchpoint, stopped_data_address.
9196
d993e290
PA
91972009-06-25 Pedro Alves <pedro@codesourcery.com>
9198
9199 * server.c (process_serial_event): Re-return unsupported, not
9200 error, if the type isn't recognized. Re-allow supporting only
9201 insert or remove packets. Also call require_running for
9202 breakpoints. Add missing break statement to default case. Tidy.
9203 * target.h (struct target_ops): Rename insert_watchpoint to
9204 insert_point, and remove_watchpoint to remove_point.
9205
9206 * linux-low.h (struct linux_target_ops): Likewise.
9207 * linux-low.c (linux_insert_watchpoint): Rename to ...
9208 (linux_insert_point): ... this. Adjust.
9209 (linux_remove_watchpoint): Rename to ...
9210 (linux_remove_point): ... this. Adjust.
9211 (linux_target_ops): Adjust.
9212 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
9213 (cris_insert_point): ... this.
9214 (cris_remove_watchpoint): Rename to ...
9215 (cris_remove_point): ... this.
9216 (the_low_target): Adjust.
9217
0f54c268
PM
92182009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
9219
9220 * server.c (handle_v_kill): Pass signal_pid to
9221 kill_inferior if multi_process is zero.
9222
c6314022
AR
92232009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
9224
9225 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
9226 * target.h (target_ops): Comment for *_watchpoint to make it clear
9227 the functions can get types '0' and '1'.
9228
4463ce24
AR
92292009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
9230
9231 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
9232 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
9233 * regcache.c (get_regcache): Likewise.
9234 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
9235 * win32-low.c (child_fetch_inferior_registers): Remove check for
9236 regno 0.
9237
cf8fd78b
PA
92382009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
9239 Pedro Alves <pedro@codesourcery.com>
9240
9241 * target.h (struct target_ops) <supports_multi_process>: New
9242 callback.
9243 (target_supports_multi_process): New.
9244 * server.c (handle_query): Even if GDB reports support, only
9245 enable multi-process if the target also supports it. Report
9246 multi-process support only if the target backend supports it.
9247 * linux-low.c (linux_supports_multi_process): New function.
9248 (linux_target_ops): Install it as target_supports_multi_process
9249 callback.
9250
47c0c975
DE
92512009-05-24 Doug Evans <dje@google.com>
9252
e09875d4
DE
9253 Global renaming of find_thread_pid to find_thread_ptid.
9254 * server.h (find_thread_ptid): Renamed from find_thread_pid.
9255 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
9256 All callers updated.
9257
e27d73f6
DE
9258 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
9259 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
9260 directly.
9261
47c0c975
DE
9262 * linux-low.c (get_stop_pc): Print pc if debug_threads.
9263 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
9264 (linux_resume_one_lwp): Ditto.
9265
2acc282a
DE
92662009-05-23 Doug Evans <dje@google.com>
9267
9268 * linux-low.c (linux_resume_one_lwp): Change type of first arg
9269 from struct inferior_list_entry * to struct lwp_info *.
9270 All callers updated.
9271
9f1036c1
DE
92722009-05-13 Doug Evans <dje@google.com>
9273
9274 * linux-x86-low.c: Don't include assert.h.
9275 (x86_siginfo_fixup): Use fatal, not assert.
9276 (x86_arch_setup): Fix comment.
9277
d0722149
DE
92782009-05-12 Doug Evans <dje@google.com>
9279
9280 Biarch support for i386/amd64 gdbserver.
9281 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
9282 Add linux-x86-low.c.
9283 (linux-i386-low.o, linux-x86-64-low.o): Delete.
9284 (linux-x86-low.o): Add.
9285 * linux-x86-64-low.c: Delete.
9286 * linux-i386-low.c: Delete.
9287 * linux-x86-low.c: New file.
9288 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
9289 linux-x86-low.o.
9290 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
9291 linux-x86-low.o.
9292 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
9293 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
9294 (linux_child_pid_to_exec_file): New function.
9295 (elf_64_header_p, elf_64_file_p): New functions.
9296 (siginfo_fixup): New function.
9297 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
9298 give target a chance to convert layout.
9299 * linux-low.h (linux_target_ops): New member siginfo_fixup.
9300 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
9301
fdeb2a12
DE
93022009-05-07 Doug Evans <dje@google.com>
9303
9304 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
9305 (regsets_store_inferior_registers): Ditto.
9306
a6dbe5df
PA
93072009-05-06 Pedro Alves <pedro@codesourcery.com>
9308
9309 PR server/10048
9310
9311 * linux-low.c (must_set_ptrace_flags): Delete.
9312 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
9313 of the global.
9314 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
9315 `lwp->must_set_ptrace_flags' instead.
ba42693b 9316 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
9317 (linux_wait_1): ... not here.
9318
5091eb23
DE
93192009-04-30 Doug Evans <dje@google.com>
9320
9f767825
DE
9321 * inferiors.c (started_inferior_callback): New function.
9322 (attached_inferior_callback): New function.
9323 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
9324 * server.c (print_started_pid, print_attached_pid): New functions.
9325 (detach_or_kill_for_exit): New function.
9326 (main): Call it instead of for_each_inferior (kill_inferior_callback).
9327 * server.h (have_started_inferiors_p): Declare.
9328 (have_attached_inferiors_p): Declare.
9329
5091eb23
DE
9330 * inferiors.c (remove_process): Fix memory leak, free process.
9331 * linux-low.c (linux_remove_process): New function.
9332 (linux_kill): Call it instead of remove_process.
9333 (linux_detach, linux_wait_1): Ditto.
9334
155c8968
PA
93352009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
9336
9337 * configure.srv: Add x86 Windows CE target.
9338
7fe519cb
UW
93392009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
9340
9341 * inferiors.c (get_thread_process): Make global.
9342 * server.h (get_thread_process): Add prototype.
9343 * thread-db.c (find_one_thread): Use get_thread_process
9344 instead of current_process.
9345 (thread_db_get_tls_address): Do not crash if called when
9346 thread layer is not yet initialized.
9347
5472f405
UW
93482009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
9349
9350 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
9351 * spu-low.c (current_tid): Rename to ...
9352 (current_ptid): ... this.
9353 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
9354 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
9355 ptid_get_lwp (current_ptid) instead of current_tid.
9356 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
9357 instead of current_tid. Use find_process_pid to verify pid
9358 argument is valid. Pass proper argument to remove_process.
9359 (spu_thread_alive): Compare current_ptid instead of current_tid.
9360 (spu_resume): Likewise.
9361
55ac2b99
PA
93622009-04-02 Pedro Alves <pedro@codesourcery.com>
9363
9364 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
9365 variable.
9366
95954743
PA
93672009-04-01 Pedro Alves <pedro@codesourcery.com>
9368
9369 Implement the multiprocess extensions, and add linux multiprocess
9370 support.
9371
9372 * server.h (ULONGEST): Declare.
9373 (struct ptid, ptid_t): New.
9374 (minus_one_ptid, null_ptid): Declare.
9375 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
9376 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
9377 (struct inferior_list_entry): Change `id' type from unsigned from
9378 to ptid_t.
9379 (struct sym_cache, struct breakpoint, struct
9380 process_info_private): Forward declare.
9381 (struct process_info): Declare.
9382 (current_process): Declare.
9383 (all_processes): Declare.
9384 (initialize_inferiors): Declare.
9385 (add_thread): Adjust to use ptid_t.
9386 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
9387 (add_process, remove_process, find_thread_pid): Declare.
9388 (find_inferior_id): Adjust to use ptid_t.
9389 (cont_thread, general_thread, step_thread): Change type to ptid_t.
9390 (multi_process): Declare.
9391 (push_event): Adjust to use ptid_t.
9392 (read_ptid, write_ptid): Declare.
9393 (prepare_resume_reply): Adjust to use ptid_t.
9394 (clear_symbol_cache): Declare.
9395 * inferiors.c (all_processes): New.
9396 (null_ptid, minus_one_ptid): New.
9397 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
9398 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
9399 (add_thread): Change unsigned long to ptid. Remove gdb_id
9400 parameter. Adjust.
9401 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
9402 (gdb_id_to_thread): Rename to ...
9403 (find_thread_pid): ... this. Change unsigned long to ptid.
9404 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
9405 (loaded_dll, pull_pid_from_list): Adjust.
9406 (add_process, remove_process, find_process_pid)
9407 (get_thread_process, current_process, initialize_inferiors): New.
9408 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
9409 (struct target_waitstatus) <related_pid>: Ditto.
9410 (struct target_ops) <kill, detach>: Add `pid' argument. Change
9411 return type to int.
9412 (struct target_ops) <join>: Add `pid' argument.
9413 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
9414 (struct target_ops) <wait>: Add `ptid' field. Change return type
9415 to ptid.
9416 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
9417 (mywait): Add `ptid' argument. Change return type to ptid_t.
9418 (target_pid_to_str): Declare.
9419 * target.c (set_desired_inferior): Adjust to use ptids.
9420 (mywait): Add new `ptid' argument. Adjust.
9421 (target_pid_to_str): New.
9422 * mem-break.h (free_all_breakpoints): Declare.
9423 * mem-break.c (breakpoints): Delelete.
9424 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
9425 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
9426 to use per-process breakpoint list.
9427 (free_all_breakpoints): New.
9428 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
9429 (symbol_cache, all_symbols_looked_up): Delete.
9430 (hexchars): New.
9431 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
9432 read_ptid): New.
9433 (prepare_resume_reply): Change ptid argument's type from unsigned
9434 long to ptid_t. Adjust. Implement W;process and X;process.
9435 (free_sym_cache, clear_symbol_cache): New.
9436 (look_up_one_symbol): Adjust to per-process symbol cache. *
9437 * server.c (cont_thread, general_thread, step_thread): Change type
9438 to ptid_t.
9439 (attached): Delete.
9440 (multi_process): New.
9441 (last_ptid): Change type to ptid_t.
9442 (struct vstop_notif) <ptid>: Change type to ptid_t.
9443 (queue_stop_reply, push_event): Change `ptid' argument's type to
9444 ptid_t.
9445 (discard_queued_stop_replies): Add `pid' argument.
9446 (start_inferior): Adjust to use ptids. Adjust to mywait interface
9447 changes. Don't reference the `attached' global.
9448 (attach_inferior): Adjust to mywait interface changes.
9449 (handle_query): Adjust to use ptids. Parse GDB's qSupported
9450 features. Handle and report "multiprocess+". Handle
9451 "qAttached:PID".
9452 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
9453 changes.
9454 (handle_v_kill): New.
9455 (handle_v_stopped): Adjust to use target_pid_to_str.
9456 (handle_v_requests): Allow multiple attaches and runs when
9457 multiprocess extensions are in effect. Handle "vKill".
9458 (myresume): Adjust to use ptids.
9459 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
9460 (handle_status): Adjust to discard_queued_stop_replies interface
9461 change.
9462 (first_thread_of, kill_inferior_callback)
9463 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
9464 (main): Call initialize_inferiors. Adjust to use ptids, killing
9465 and detaching from all inferiors. Handle multiprocess packet
9466 variants.
9467 * linux-low.h: Include gdb_proc_service.h.
9468 (struct process_info_private): New.
9469 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
9470 <lwpid_of>: Use ptid_get_lwp.
9471 (get_lwp_thread): Adjust.
9472 (struct lwp_info): Add `dead' member.
9473 (find_lwp_pid): Declare.
9474 * linux-low.c (thread_db_active): Delete.
9475 (new_inferior): Adjust comment.
9476 (inferior_pid): Delete.
9477 (linux_add_process): New.
9478 (handle_extended_wait): Adjust.
9479 (add_lwp): Change unsigned long to ptid.
9480 (linux_create_inferior): Add process to processes table. Adjust
9481 to use ptids. Don't set new_inferior here.
9482 (linux_attach_lwp): Rename to ...
9483 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
9484 it. Adjust to use ptids.
9485 (linux_attach_lwp): New.
9486 (linux_attach): Add process to processes table. Don't set
9487 new_inferior here.
9488 (struct counter): New.
9489 (second_thread_of_pid_p, last_thread_of_process_p): New.
9490 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
9491 multiple processes.
9492 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
9493 processes. Remove process from process table.
9494 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
9495 to multiple processes.
9496 (any_thread_of): New.
9497 (linux_detach): Add `pid' argument, and handle it. Remove process
9498 from processes table.
9499 (linux_join): Add `pid' argument. Handle it.
9500 (linux_thread_alive): Change unsighed long argument to ptid_t.
9501 Consider dead lwps as not being alive.
9502 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
9503 threads we're not interested in.
9504 (same_lwp, find_lwp_pid): New.
9505 (linux_wait_for_lwp): Change `pid' argument's type from int to
9506 ptid_t. Adjust.
9507 (linux_wait_for_event): Rename to ...
9508 (linux_wait_for_event_1): ... this. Change `pid' argument's type
9509 from int to ptid_t. Adjust.
9510 (linux_wait_for_event): New.
9511 (linux_wait_1): Add `ptid' argument. Change return type to
9512 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
9513 that exit from the process table.
9514 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
9515 Adjust.
9516 (mark_lwp_dead): New.
9517 (wait_for_sigstop): Adjust to use ptids. If a process exits while
9518 stopping all threads, mark its main lwp as dead.
9519 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
9520 ptids.
9521 (fetch_register, usr_store_inferior_registers)
9522 (regsets_fetch_inferior_registers)
9523 (regsets_store_inferior_registers, linux_read_memory)
9524 (linux_write_memory): Inline `inferior_pid'.
9525 (linux_look_up_symbols): Adjust to use per-process
9526 `thread_db_active'.
9527 (linux_request_interrupt): Adjust to use ptids.
9528 (linux_read_auxv): Inline `inferior_pid'.
9529 (initialize_low): Don't reference thread_db_active.
9530 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
9531 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
9532 (ps_getpid): Return the pid of the current inferior.
9533 * thread-db.c (proc_handle, thread_agent): Delete.
9534 (thread_db_create_event, thread_db_enable_reporting): Adjust to
9535 per-process data.
9536 (find_one_thread): Change argument type to ptid_t. Adjust to
9537 per-process data.
9538 (maybe_attach_thread): Adjust to per-process data and ptids.
9539 (thread_db_find_new_threads): Ditto.
9540 (thread_db_init): Ditto.
9541 * spu-low.c (spu_create_inferior, spu_attach): Add process to
9542 processes table. Adjust to use ptids.
9543 (spu_kill, spu_detach): Adjust interface. Remove process from
9544 processes table.
9545 (spu_join, spu_thread_alive): Adjust interface.
9546 (spu_wait): Adjust interface. Remove process from processes
9547 table. Adjust to use ptids.
9548 * win32-low.c (current_inferior_tid): Delete.
9549 (current_inferior_ptid): New.
9550 (debug_event_ptid): New.
9551 (thread_rec): Take a ptid. Adjust.
9552 (child_add_thread): Add `pid' argument. Adjust to use ptids.
9553 (child_delete_thread): Ditto.
9554 (do_initial_child_stuff): Add `attached' argument. Add process to
9555 processes table.
9556 (child_fetch_inferior_registers, child_store_inferior_registers):
9557 Adjust.
9558 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
9559 (win32_attach): Pass 1 to do_initial_child_stuff.
9560 (win32_kill): Adjust interface. Remove process from processes
9561 table.
9562 (win32_detach): Ditto.
9563 (win32_join): Adjust interface.
9564 (win32_thread_alive): Take a ptid.
9565 (win32_resume): Adjust to use ptids.
9566 (get_child_debug_event): Ditto.
9567 (win32_wait): Adjust interface. Remove exiting process from
9568 processes table.
9569
bd99dc85
PA
95702009-04-01 Pedro Alves <pedro@codesourcery.com>
9571
9572 Non-stop mode support.
9573
9574 * server.h (non_stop): Declare.
9575 (gdb_client_data, handler_func): Declare.
9576 (delete_file_handler, add_file_handler, start_event_loop):
9577 Declare.
9578 (handle_serial_event, handle_target_event, push_event)
9579 (putpkt_notif): Declare.
9580 * target.h (enum resume_kind): New.
9581 (struct thread_resume): Replace `step' field by `kind' field.
9582 (TARGET_WNOHANG): Define.
9583 (struct target_ops) <wait>: Add `options' argument.
9584 <supports_non_stop, async, start_non_stop>: New fields.
9585 (target_supports_non_stop, target_async): New.
9586 (start_non_stop): Declare.
9587 (mywait): Add `options' argument.
9588 * target.c (mywait): Add `options' argument. Print child exit
9589 notifications here.
9590 (start_non_stop): New.
9591 * server.c (non_stop, own_buf, mem_buf): New globals.
9592 (struct vstop_notif): New.
9593 (notif_queue): New global.
9594 (queue_stop_reply, push_event, discard_queued_stop_replies)
9595 (send_next_stop_reply): New.
9596 (start_inferior): Adjust to use resume_kind. Adjust to mywait
9597 interface changes.
9598 (attach_inferior): In non-stop mode, don't wait for the target
9599 here.
9600 (handle_general_set): Handle QNonStop.
9601 (handle_query): When handling qC, return the current general
9602 thread, instead of the first thread of the list.
9603 (handle_query): If the backend supports non-stop mode, include
9604 QNonStop+ in the qSupported query response.
9605 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
9606 and non-stop mode.
9607 (handle_v_attach, handle_v_run): Handle non-stop mode.
9608 (handle_v_stopped): New.
9609 (handle_v_requests): Report support for vCont;t. Handle vStopped.
9610 (myresume): Adjust to use resume_kind. Handle non-stop.
9611 (queue_stop_reply_callback): New.
9612 (handle_status): Handle non-stop mode.
9613 (main): Clear non_stop flag on reconnection. Use the event-loop.
9614 Refactor serial protocol handling from here ...
9615 (process_serial_event): ... to this new function. When GDB
9616 selects any thread, select one here. In non-stop mode, wait until
9617 GDB acks all pending events before exiting.
9618 (handle_serial_event, handle_target_event): New.
9619 * remote-utils.c (remote_open): Install remote_desc in the event
9620 loop.
9621 (remote_close): Remove remote_desc from the event loop.
9622 (putpkt_binary): Rename to...
9623 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
9624 (putpkt_binary): New as wrapper around putpkt_binary_1.
9625 (putpkt_notif): New.
9626 (prepare_resume_reply): In non-stop mode, don't change the
9627 general_thread.
9628 * event-loop.c: New.
9629 * Makefile.in (OBJ): Add event-loop.o.
9630 (event-loop.o): New rule.
9631
9632 * linux-low.h (pid_of): Moved here.
9633 (lwpid_of): New.
9634 (get_lwp_thread): Use lwpid_of.
9635 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
9636 * linux-low.c (pid_of): Delete.
9637 (inferior_pid): Use lwpid_of.
9638 (linux_event_pipe): New.
9639 (target_is_async_p): New.
9640 (delete_lwp): New.
9641 (handle_extended_wait): Use lwpid_of.
9642 (add_lwp): Don't set lwpid field.
9643 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
9644 (linux_kill_one_lwp): If killing a running lwp, stop it first.
9645 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
9646 (linux_detach_one_lwp): If detaching from a running lwp, stop it
9647 first. Adjust to linux_wait_for_event interface changes. Use
9648 lwpid_of.
9649 (linux_detach): Don't delete the main lwp here.
9650 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
9651 (status_pending_p): Don't consider explicitly suspended lwps.
9652 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
9653 pointer. Add OPTIONS argument. Change return type to int. Use
9654 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
9655 (linux_wait_for_event): Take an integer pid instead of a lwp_info
9656 pointer. Add status pointer argument. Return a pid instead of a
9657 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
9658 changes. In non-stop mode, don't switch to a random thread.
9659 (linux_wait): Rename to...
9660 (linux_wait_1): ... this. Add target_options argument, and handle
9661 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
9662 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
9663 clean exit and signal exit code. Don't stop all threads in
9664 non-stop mode. In all-stop mode, only stop all threads when
9665 reporting a stop to GDB. Handle explicit thread stop requests.
9666 (async_file_flush, async_file_mark): New.
9667 (linux_wait): New.
9668 (send_sigstop): Use lwpid_of.
9669 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
9670 interface changes. In non-stop mode, don't switch to a random
9671 thread.
9672 (linux_resume_one_lwp): Use lwpid_of.
9673 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
9674 (linux_resume_one_thread): ... this. Handle resume_stop. In
9675 non-stop mode, don't look for pending flag in all threads.
9676 (resume_status_pending_p): Don't consider explicitly suspended
9677 threads.
9678 (my_waitpid): Reimplement. Emulate __WALL.
9679 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
9680 Use lwpid_of.
9681 (sigchld_handler, linux_supports_non_stop, linux_async)
9682 (linux_start_non_stop): New.
9683 (linux_target_ops): Register linux_supports_non_stop, linux_async
9684 and linux_start_non_stop.
9685 (initialize_low): Install SIGCHLD handler.
9686 * thread-db.c (thread_db_create_event, find_one_thread)
9687 (thread_db_get_tls_address): Use lwpid_of.
9688 * win32-low.c (win32_detach): Adjust to use resume_kind.
9689 (win32_wait): Add `options' argument.
9690 * spu-low.c (spu_resume): Adjust to use resume_kind.
9691 (spu_wait): Add `options' argument.
9692
5b1c542e
PA
96932009-04-01 Pedro Alves <pedro@codesourcery.com>
9694
9695 Decouple target code from remote protocol.
9696
9697 * target.h (enum target_waitkind): New.
9698 (struct target_waitstatus): New.
9699 (struct target_ops) <wait>: Return an unsigned long. Take a
9700 target_waitstatus pointer instead of a char pointer.
9701 (mywait): Likewise.
9702 * target.c (mywait): Change prototype to return an unsigned long.
9703 Take a target_waitstatus pointer instead of a char pointer. Adjust.
9704 * server.h (thread_from_wait, old_thread_from_wait): Delete
9705 declarations.
9706 (prepare_resume_reply): Change prototype to take a
9707 target_waitstatus.
9708 * server.c (thread_from_wait, old_thread_from_wait): Delete.
9709 (last_status, last_ptid): New.
9710 (start_inferior): Remove "statusptr" argument. Adjust. Return a
9711 pid instead of a signal.
9712 (attach_inferior): Remove "status" and "signal" parameters.
9713 Adjust.
9714 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
9715 not as an address.
9716 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
9717 (handle_v_requests, myresume): Remove "status" and "signal"
9718 parameters. Adjust.
9719 (handle_status): New.
9720 (main): Delete local `status'. Adjust.
9721 * remote-utils.c: Include target.h.
9722 (prepare_resume_reply): Change prototype to take a
9723 target_waitstatus. Adjust.
9724
9725 * linux-low.c (linux_wait): Adjust to new target_ops->wait
9726 interface.
9727 * spu-low.c (spu_wait): Adjust.
9728 * win32-low.c (enum target_waitkind, struct target_waitstatus):
9729 Delete.
9730 (win32_wait): Adjust.
9731
2bd7c093
PA
97322009-04-01 Pedro Alves <pedro@codesourcery.com>
9733
9734 * target.h (struct thread_resume): Delete leave_stopped member.
9735 (struct target_ops): Add a `n' argument to the `resume' callback.
9736 * server.c (start_inferior): Adjust.
9737 (handle_v_cont, myresume): Adjust.
9738 * linux-low.c (check_removed_breakpoint): Adjust to resume
9739 interface change, and to removed leave_stopped field.
9740 (resume_ptr): Delete.
9741 (struct thread_resume_array): New.
9742 (linux_set_resume_request): Add new `arg' parameter. Adjust to
9743 resume interface change.
9744 (linux_continue_one_thread, linux_queue_one_thread)
9745 (resume_status_pending_p): Check if the resume field is NULL
9746 instead of checking the leave_stopped member.
9747 (linux_resume): Adjust to the target resume interface change.
9748 * spu-low.c (spu_resume): Adjust to the target resume interface
9749 change.
9750 * win32-low.c (win32_detach, win32_resume): Ditto.
9751
c35fafde
PA
97522009-04-01 Pedro Alves <pedro@codesourcery.com>
9753
9754 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
9755 flag.
9756 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
9757 pending.
9758 (linux_continue_one_thread): Only preserve the stepping flag if
9759 there's a pending breakpoint.
9760
0a59d50b
PA
97612009-03-31 Pedro Alves <pedro@codesourcery.com>
9762
9763 * server.c (main): After the inferior having exited, call
9764 remote_close before exiting gdbserver.
9765
f04c6d38
TJB
97662009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
9767
9768 Fix size of FPSCR in Power 7 processors.
9769 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
9770 (PPC_FEATURE_HAS_DFP): New #define.
9771 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
9772 size of the FPSCR.
9773
78e5cee6
PA
97742009-03-23 Pedro Alves <pedro@codesourcery.com>
9775
9776 * server.c (handle_query) Whitespace and formatting.
9777
1b3f6016
PA
97782009-03-22 Pedro Alves <pedro@codesourcery.com>
9779
9780 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
9781 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
9782 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
9783 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
9784 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
9785 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
9786 Makefile.in, configure.ac: Fix whitespace throughout.
9787 * configure: Regenerate.
9788
a07b2135
PA
97892009-03-22 Pedro Alves <pedro@codesourcery.com>
9790
9791 * inferiors.c (find_inferior): Make it safe for the callback
9792 function to delete the currently iterated inferior.
9793
67cc2626
PA
97942009-03-22 Pedro Alves <pedro@codesourcery.com>
9795
9796 * Makefile.in (linuw_low_h): Move higher.
9797 (thread-db.o): Depend on $(linux_low_h).
9798
54a0b537
PA
97992009-03-17 Pedro Alves <pedro@codesourcery.com>
9800
9801 Rename "process" to "lwp" throughout.
9802
9803 * linux-low.c (all_processes): Rename to...
9804 (all_lwps): ... this.
9805 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
9806 (add_process): Rename to ...
9807 (add_lwp): ... this. Adjust.
9808 (linux_create_inferior): Adjust.
9809 (linux_attach_lwp): Adjust.
9810 (linux_attach): Adjust.
9811 (linux_kill_one_process): Rename to ...
9812 (linux_kill_one_lwp): ... this. Adjust.
9813 (linux_kill): Adjust.
9814 (linux_detach_one_process): Rename to ...
9815 (linux_detach_one_lwp): ... this. Adjust.
9816 (linux_detach): Adjust.
9817 (check_removed_breakpoint): Adjust.
9818 (status_pending_p): Adjust.
9819 (linux_wait_for_process): Rename to ...
9820 (linux_wait_for_lwp): ... this. Adjust.
9821 (linux_wait_for_event): Adjust.
9822 (send_sigstop): Adjust.
9823 (wait_for_sigstop): Adjust.
9824 (stop_all_processes): Rename to ...
9825 (stop_all_lwps): ... this.
9826 (linux_resume_one_process): Rename to ...
9827 (linux_resume_one_lwp): ... this. Adjust.
9828 (linux_set_resume_request, linux_continue_one_thread)
9829 (linux_queue_one_thread, resume_status_pending_p)
9830 (usr_store_inferior_registers, regsets_store_inferior_registers)
9831 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
9832 Adjust.
9833 * linux-low.h (get_process): Rename to ...
9834 (get_lwp): ... this. Adjust.
9835 (get_thread_process): Rename to ...
9836 (get_thread_lwp): ... this. Adjust.
9837 (get_process_thread): Rename to ...
9838 (get_lwp_thread): ... this. Adjust.
9839 (struct process_info): Rename to ...
9840 (struct lwp_info): ... this.
9841 (all_processes): Rename to ...
9842 (all_lwps): ... this.
9843 * proc-service.c (ps_lgetregs): Adjust.
9844 * thread-db.c (thread_db_create_event, find_one_thread)
9845 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
9846
0b16c5cf
PA
98472009-03-14 Pedro Alves <pedro@codesourcery.com>
9848
9849 * server.c (handle_query): Handle "qAttached".
9850
32de4b9d
NS
98512009-03-13 Nathan Sidwell <nathan@codesourcery.com>
9852
9853 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
9854 GPLv3, update license URL.
9855
2aecd87f
DE
98562009-03-01 Doug Evans <dje@google.com>
9857
93efd302 9858 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
9859 (server_h): Add gdb_signals.h.
9860 (signals.o): Update.
9861 * server.h (target_signal_from_host,target_signal_to_host_p)
9862 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
9863
86b1f9c5
PM
98642009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
9865
9866 * remote-utils.c (getpkt): Also generate remote-debug
9867 information if noack_mode is set.
9868
4aa995e1
PA
98692009-02-06 Pedro Alves <pedro@codesourcery.com>
9870
9871 * server.c (handle_query): Report qXfer:siginfo:read and
9872 qXfer:siginfo:write as supported and handle them.
9873 * target.h (struct target_ops) <qxfer_siginfo>: New field.
9874 * linux-low.c (linux_xfer_siginfo): New.
9875 (linux_target_ops): Set it.
9876
62709adf
PA
98772009-01-26 Pedro Alves <pedro@codesourcery.com>
9878
9879 * server.c (gdbserver_usage): Mention --remote-debug.
9880 (main): Accept '--remote-debug' switch.
9881
aef93bd7
DE
98822009-01-18 Doug Evans <dje@google.com>
9883
9884 * regcache.c (new_register_cache): No need to check result of xcalloc.
9885 * server.c (handle_search_memory): Back out calls to xmalloc,
9886 result is checked and error is returned to user upon failure.
9887 (handle_query): Ditto. Add more checks for result of malloc.
9888 (handle_v_cont): Check result of malloc, report error back to
9889 user upon failure.
9890 (handle_v_run): Ditto. Call freeargv.
9891 * server.h (freeargv): Declare.
9892 * utils.c (freeargv): New fn.
9893
54363045
DE
98942009-01-15 Doug Evans <dje@google.com>
9895
f626972c
DE
9896 * gdbreplay.c (perror_with_name): Make arg const char *.
9897 * server.h (target_signal_to_name): Make return type const char *.
0842e787 9898 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 9899 * utils.c (perror_with_name): Make arg const char *.
54363045 9900
18aae699
PA
99012009-01-14 Pedro Alves <pedro@codesourcery.com>
9902
9903 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
9904 when handling a EXIT_PROCESS_DEBUG_EVENT.
9905
ff703abe
JB
99062009-01-06 Joel Brobecker <brobecker@adacore.com>
9907
9908 * gdbreplay.c (gdbreplay_version): Update copyright year.
9909 * server.c (gdbserver_version): Likewise.
9910
f21cc1a2 99112009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
9912
9913 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 9914 (handle_extended_wait): Improve comment.
0e21c1ec 9915
bca929d3
DE
99162008-12-13 Doug Evans <dje@google.com>
9917
9918 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
9919 * server.h (ATTR_MALLOC): New macro.
9920 (xmalloc,xcalloc,xstrdup): Declare.
9921 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
9922 * inferiors.c: Ditto.
9923 * linux-low.c: Ditto.
9924 * mem-break.c: Ditto.
9925 * regcache.c: Ditto.
9926 * remote-utils.c: Ditto.
9927 * server.c: Ditto.
9928 * target.c: Ditto.
9929 * win32-low.c: Ditto.
9930
97438e3f
DE
99312008-12-12 Doug Evans <dje@google.com>
9932
896c7fbb
DE
9933 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
9934 in debugging printf.
9935
97438e3f
DE
9936 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
9937
e3b886f8
DE
99382008-12-09 Doug Evans <dje@google.com>
9939
9940 * linux-low.h (struct process_info): Delete member tid, unused.
9941 * thread-db.c (find_one_thread): Update.
9942 (maybe_attach_thread): Update.
9943
07e059b5
VP
99442008-12-02 Pedro Alves <pedro@codesourcery.com>
9945
889bf7c5
PA
9946 * target.h (struct target_ops): Add qxfer_osdata member.
9947 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
9948 and dirent.h.
9949 (linux_qxfer_osdata): New functions.
9950 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
9951 callback.
9952 * server.c (handle_query): Handle "qXfer:osdata:read:".
9953 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
9954 (buffer_xml_printf): New functions.
9955 * server.h (struct buffer): New.
9956 (buffer_grow_str, buffer_grow_str0): New macros.
9957 (buffer_grow, buffer_free, buffer_init, buffer_finish)
9958 (buffer_xml_printf): Declare.
07e059b5 9959
4cab47ab
DE
99602008-11-24 Doug Evans <dje@google.com>
9961
9962 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
9963
f142445f
DJ
99642008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
9965
9966 * server.c (handle_v_run): Always use the supplied argument list.
9967
d0107bb6 99682008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 9969
d0107bb6
BW
9970 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
9971 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 9972
2c4ad781
TJB
99732008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
9974
9975 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
9976 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
9977 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
9978 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
9979 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
9980 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
9981 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
9982 XML target descriptions.
9983 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
9984 when inferior is running on an ISA 2.05 or later processor. Add
9985 special case to return offset for full 64-bit slot of FPSCR when
9986 in 32-bits.
9987
dfb64f85
DJ
99882008-11-14 Daniel Gutson <dgutson@codesourcery.com>
9989
9990 * Makefile.in (SFILES, clean): Added sparc64 files.
9991 (reg-sparc64.o, reg-sparc64.c): New.
9992 * configure.srv (sparc*-*-linux*): New configuration.
9993 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
9994 syscall arguments for SPARC.
9995 (regsets_store_inferior_registers): Likewise.
9996 * linux-sparc-low.c: New file.
9997
66b6e1dd
DE
99982008-10-21 Doug Evans <dje@google.com>
9999
10000 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
10001 (READLINE_DIR,READLINE_DEP): Delete.
10002 (INTERNAL_CFLAGS): Update.
10003 (LINTFLAGS): Update.
10004
9b710a42
PA
100052008-10-10 Pedro Alves <pedro@codesourcery.com>
10006
10007 * server.c (handle_v_run): If GDB didn't specify an argv, use the
10008 whole argv from the last run, not just argv[0].
10009
5822d809
PA
100102008-09-08 Pedro Alves <pedro@codesourcery.com>
10011
10012 * regcache.c (new_register_cache): Return NULL if the register
10013 cache size isn't known yet.
10014 (free_register_cache): Avoid dereferencing a NULL regcache.
10015
74aac56f
DJ
100162008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
10017
10018 * configure.srv: Merge MIPS and MIPS64.
10019
400b20f5
MR
100202008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
10021
10022 * Makefile.in (uninstall): Apply $(EXEEXT) too.
10023
677c5bb1
LM
100242008-08-18 Luis Machado <luisgpm@br.ibm.com>
10025
10026 * Makefile.in: Add required vsx dependencies.
10027
10028 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
10029 Declare init_registers_powerpc_vsx32l.
10030 Declare init_registers_powerpc_vsx64l.
10031 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
10032 (ppc_arch_setup): Check for VSX in hwcap.
10033 (ppc_fill_vsxregset): New function.
10034 (ppc_store_vsxregset): New function.
10035 Add new VSX entry in regset_info target_regsets.
10036
10037 * configure.srv: Add new VSX dependencies.
10038
a6f3e723
SL
100392008-08-12 Pedro Alves <pedro@codesourcery.com>
10040
10041 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
10042 (remote_open): Set or clear transport_is_reliable.
10043 (putpkt_binary): Don't expect acks in noack mode.
10044 (getpkt): Don't send ack/nac in noack mode.
10045 * server.c (handle_general_set): Handle QStartNoAckMode.
10046 (handle_query): If connected by tcp pass QStartNoAckMode+ in
10047 qSupported.
10048 (main): Reset noack_mode on every connection.
10049 * server.h (noack_mode): Declare.
10050
a417dc56
RW
100512008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
10052
10053 * Makefile.in (GDBREPLAY_OBS): New variable.
10054 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
10055
3221518c
UW
100562008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
10057 Daniel Jacobowitz <dan@codesourcery.com>
10058
10059 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
10060 (usr_store_inferior_registers): Likewise.
10061 (regsets_store_inferior_registers): Likewise.
10062
ec56be1b
PA
100632008-07-31 Rolf Jansen <rj@surtec.com>
10064 Pedro Alves <pedro@codesourcery.com>
10065
10066 * configure.ac: Check for memmem declaration.
10067 * server.c [HAVE_MALLOC_H]: Include malloc.h.
10068 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
10069 (disable_packet_qfThreadInfo): Unconditionally compile.
10070 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
10071 * configure, config.in: Regenerate.
10072
2fe5e3ff
DE
100732008-07-28 Doug Kwan <dougkwan@google.com>
10074
10075 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
10076 (linux_write_memory): Remove declaration of errno.
10077
836acd6d
UW
100782008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
10079
10080 * linux-low.c (handle_extended_wait): Do not use "status"
10081 variable uninitialized.
10082
aeba519e
PA
100832008-07-07 Pedro Alves <pedro@codesourcery.com>
10084
10085 * server.c (handle_v_attach): Inhibit reporting dll changes.
10086
db42f210
PA
100872008-06-27 Pedro Alves <pedro@codesourcery.com>
10088
10089 * remote-utils.c (prepare_resume_reply): If requested, don't
10090 output "thread:TID" in the T stop reply.
10091
10092 * server.c (disable_packet_vCont, disable_packet_Tthread)
10093 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
10094 (handle_query): If requested, disable support for qC, qfThreadInfo
10095 and qsThreadInfo.
10096 (handle_v_requests): If requested, disable support for vCont.
10097 (gdbserver_show_disableable): New.
10098 (main): Handle --disable-packet and --disable-packet=LIST.
10099
10100 * server.h (disable_packet_vCont, disable_packet_Tthread)
10101 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
10102
8e4c5421
CD
101032008-06-20 Carlos O'Donell <carlos@codesourcery.com>
10104
10105 * server.c (gdbserver_usage): Mention --version.
10106
6e23a804
DJ
101072008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
10108
10109 * Makefile.in (gdbreplay.o): New rule.
10110
90aa6a40
JM
101112008-06-06 Joseph Myers <joseph@codesourcery.com>
10112
10113 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
10114 message, not gdbserver.
10115
c16158bc 101162008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
10117 Nathan Sidwell <nathan@codesourcery.com>
10118 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
10119
10120 * acinclude.m4: Include ../../config/acx.m4.
10121 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
10122 * configure, config.in: Regenerate.
10123 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
10124 * server.c (gdbserver_version): Print PKGVERSION.
10125 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
10126 (main): Adjust gdbserver_usage calls.
10127 * gdbreplay.c (version, host_name): Add declarations.
10128 (gdbreplay_version, gdbreplay_usage): New.
10129 (main): Accept --version and --help options.
10130
aeb75bf5
DJ
101312008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
10132
10133 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
10134 (arm_breakpoint_at): Handle Thumb.
10135 (the_low_target): Add comment.
10136
76b233dd
UW
101372008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
10138
10139 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
10140
08388c79
DE
101412008-05-09 Doug Evans <dje@google.com>
10142
a3c83fae
DE
10143 * server.h (decode_search_memory_packet): Declare.
10144 * remote-utils.c (decode_search_memory_packet): New fn.
10145 * server.c (handle_search_memory_1): New fn.
08388c79
DE
10146 (handle_search_memory): New fn.
10147 (handle_query): Process qSearch:memory packets.
10148
bb9c3d36
UW
101492008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
10150
10151 * regcache.c (registers_length): Remove.
10152 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
10153 full register packet.
10154 * regcache.h (registers_length): Remove prototype.
10155 * server.h (PBUFSIZ): Define to 16384.
10156
7284e1be
UW
101572008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
10158
10159 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
10160 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
10161 powerpc-64l.o, and powerpc-altivec64l.o.
10162 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
10163 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
10164 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
10165 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
10166 rs6000/power-linux.xml, and rs6000/power64-linux.xml
10167 to srv_xmlfiles.
10168
10169 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
10170 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
10171 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
10172 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
10173 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
10174 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
10175 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
10176 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
10177 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
10178 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
10179 (clean): Update.
10180
10181 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
10182 (init_registers_powerpc_32l): ... this new prototype.
10183 (init_registers_powerpc_32): Remove, replace by ...
10184 (init_registers_powerpc_altivec32l): ... this new prototype.
10185 (init_registers_powerpc_e500): Remove, replace by ...
10186 (init_registers_powerpc_e500l): ... this new prototype.
10187 (init_registers_ppc64): Remove, replace by ...
10188 (init_registers_powerpc_64l): ... this new prototype.
10189 (init_registers_powerpc_64): Remove, replace by ...
10190 (init_registers_powerpc_altivec64l): ... this new prototype.
10191 (ppc_num_regs): Set to 73.
10192 (PT_ORIG_R3, PT_TRAP): Define if necessary.
10193 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
10194 (ppc_cannot_store_register): Handle orig_r3 and trap.
10195 (ppc_arch_setup): Update init_registers_... calls.
10196 (ppc_fill_gregset): Handle orig_r3 and trap.
10197
10198 * inferiors.c (clear_inferiors): Reset current_inferior.
10199
fdc59709
PB
102002008-04-23 Paolo Bonzini <bonzini@gnu.org>
10201
889bf7c5
PA
10202 * acinclude.m4: Add override.m4.
10203 * configure: Regenerate.
fdc59709 10204
c9b2f845
UW
102052008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
10206
10207 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
10208 initial call to init_register_ppc64.
10209
550512b8
UW
102102008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
10211
43aaf8b6
PA
10212 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
10213 single powerpc*-*-linux* case.
550512b8
UW
10214 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
10215
b6430ec3
UW
102162008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
10217
10218 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 10219 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
10220 from reg_xmlfiles.
10221 * linux-ppc-low.c: Include <elf.h>.
10222 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
10223 (ppc_hwcap): New global variable.
10224 (ppc_regmap): Remove __SPE__ #ifdef sections.
10225 (ppc_regmap_e500): New global variable.
10226 (ppc_cannot_store_register): Update __SPE__ special case.
10227 (ppc_get_hwcap): New function.
10228 (ppc_arch_setup): Use it to determine whether inferior supports
10229 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
10230 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
10231 Do not access registers if target does not support AltiVec.
10232 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
10233 Do not access registers if target does not support SPE.
10234 (target_regsets): Unconditionally include AltiVec and SPE regsets.
10235
52fa2412
UW
102362008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
10237
10238 * linux-low.c (disabled_regsets, num_regsets): New.
10239 (use_regsets_p): Delete.
10240 (linux_wait_for_process): Clear disabled_regsets.
10241 (regsets_fetch_inferior_registers): Check and set it.
10242 (regsets_store_inferior_registers): Likewise.
10243 (linux_fetch_registers, linux_store_registers): Do not use
10244 use_regsets_p.
10245 (initialize_low): Allocate disabled_regsets.
10246
e28b3332
DJ
102472008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
10248
10249 * Makefile.in (LIBOBJS): New.
10250 (OBS): Use LIBOBJS.
10251 (memmem.o): New rule.
10252 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
10253 * configure: Regenerated.
10254
4536995d
UW
102552008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
10256
10257 * server.c (handle_query): Never return "unsupported" for
10258 qXfer:features:read queries.
10259
221c031f
UW
102602008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
10261
10262 * server.c (get_features_xml): Fix inverted condition.
10263 (handle_query): Always support qXfer:feature:read.
10264
ccd213ac
DJ
102652008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
10266
10267 * server.c (wrapper_argv): New.
10268 (start_inferior): Handle wrapper_argv. If set, expect an extra
10269 trap.
10270 (gdbserver_usage): Document --wrapper.
10271 (main): Parse --wrapper.
10272
6fe305f7
UW
102732008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10274
10275 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
10276 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
10277 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
10278 (ppc_set_pc): Likewise.
10279 (ppc_arch_setup): New function.
10280 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
10281 of collect_register.
889bf7c5 10282 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 10283
5b0a002e
UW
102842008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10285
10286 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
10287 instead of linux-ppc64-low.o.
10288 * linux-ppc64-low.c: Remove file.
10289 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
10290 (linux-ppc64-low.o): Remove rule.
10291
10292 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
10293 (init_registers_powerpc_64): Likewise.
10294 (ppc_regmap): Conditionally define depending on __powerpc64__.
10295 (ppc_cannot_store_register): Do not special-case "fpscr" when
10296 compiled on __powerpc64__.
10297 (ppc_collect_ptrace_register): New function.
10298 (ppc_supply_ptrace_register): New function.
10299 (ppc_breakpoint): Change type to "unsigned int".
10300 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
10301 (the_low_target): Conditionally provide initializers for the
889bf7c5 10302 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
10303 collect_ptrace_register and supply_ptrace_register members.
10304
9b4b61c8
UW
103052008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10306
10307 * regcache.h (gdbserver_xmltarget): Add extern declaration.
10308 * server.c (gdbserver_xmltarget): Define.
10309 (get_features_xml): Use it to replace "target.xml" and arch_string.
10310
10311 * configure.srv: Remove srv_xmltarget. Add XML files that were
10312 mentioned there to srv_xmlfiles instead. Remove conditional tests
10313 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
10314 srv_xmlfiles and srv_regobj to include all possible choices.
10315 * configure.ac (srv_xmltarget): Remove.
10316 (srv_xmlfiles): Do not add "target.xml".
10317 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
10318 checks for supplementary target information.
10319 * configure: Regenerate.
10320 * Makefile.in (XML_TARGET): Remove.
10321 (target.xml): Remove rule.
10322 (clean): Do not clean up target.xml.
10323 (.PRECIOUS): Do not mention target.xml.
10324
10325 * target.h (struct target_ops): Remove arch_string member.
10326 * linux-low.c (linux_arch_string): Remove.
10327 (linux_target_ops): Remove arch_string initializer.
10328 * linux-low.h (struct linux_target_ops): Remove arch_string member.
10329 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
10330 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
10331 * spu-low.c (spu_arch_string): Remove.
10332 (spu_target_ops): Remove arch_string initializer.
10333 * win32-low.c (win32_arch_string): Remove.
10334 (win32_target_ops): Remove arch_string initializer.
10335 * win32-low.h (struct win32_target_ops): Remove arch_string member.
10336 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
10337 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
10338
ee1a7ae4
UW
103392008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
10340
10341 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
10342 by collect_ptrace_register and supply_ptrace_register hooks.
10343 * linux-low.c (fetch_register): Use supply_ptrace_register callback
10344 instead of checking for the_low_target.left_pad_xfer.
10345 (usr_store_inferior_registers): Use collect_ptrace_register callback
10346 instead of checking for the_low_target.left_pad_xfer.
10347
10348 * linux-s390-low.c (s390_collect_ptrace_register): New function.
10349 (s390_supply_ptrace_register): Likewise.
10350 (s390_fill_gregset): Call s390_collect_ptrace_register.
10351 (the_low_target): Update.
10352
10353 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
10354 (ppc_supply_ptrace_register): Likewise.
10355 (the_low_target): Update.
10356
10357 * linux-i386-low.c (the_low_target): Update.
10358 * linux-x86-64-low.c (the_low_target): Update.
10359
d61ddec4
UW
103602008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
10361
10362 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
10363 reg-s390.o and reg-s390x.o.
10364
10365 * linux-low.c (new_inferior): New global variable.
10366 (linux_create_inferior, linux_attach): Set it.
10367 (linux_wait_for_process): Call the_low_target.arch_setup after the
10368 target has stopped for the first time.
10369 (initialize_low): Do not call the_low_target.arch_setup.
10370
10371 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
10372 (s390_set_pc): Likewise.
10373 (s390_arch_setup): New function.
10374 (the_low_target): Use s390_arch_setup as arch_setup routine.
10375
10376 * regcache.c (realloc_register_cache): New function.
10377 (set_register_cache): Call it for each existing regcache.
10378
d05b4ac3
UW
103792008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
10380
10381 * server.h (init_registers): Remove prototype.
10382
10383 * linux-low.h (struct linux_target_ops): Add arch_setup field.
10384 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
10385 instead of init_registers ().
10386 * linux-arm-low.c (init_registers_arm): Add prototype.
10387 (init_registers_arm_with_iwmmxt): Likewise.
10388 (the_low_target): Add initializer for arch_setup field.
10389 * linux-cris-low.c (init_registers_cris): Add prototype.
10390 (the_low_target): Add initializer for arch_setup field.
10391 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
10392 (the_low_target): Add initializer for arch_setup field.
10393 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
10394 (the_low_target): Add initializer for arch_setup field.
10395 * linux-ia64-low.c (init_registers_ia64): Add prototype.
10396 (the_low_target): Add initializer for arch_setup field.
10397 * linux-m32r-low.c (init_registers_m32r): Add prototype.
10398 (the_low_target): Add initializer for arch_setup field.
10399 * linux-m68k-low.c (init_registers_m68k): Add prototype.
10400 (the_low_target): Add initializer for arch_setup field.
10401 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
10402 (init_registers_mips64_linux): Likewise.
10403 (the_low_target): Add initializer for arch_setup field.
10404 * linux-ppc-low.c (init_registers_ppc): Add prototype.
10405 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
10406 (the_low_target): Add initializer for arch_setup field.
10407 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
10408 (init_registers_powerpc_64): Likewise.
10409 (the_low_target): Add initializer for arch_setup field.
10410 * linux-s390-low.c (init_registers_s390): Add prototype.
10411 (init_registers_s390x): Likewise.
10412 (the_low_target): Add initializer for arch_setup field.
10413 * linux-sh-low.c (init_registers_sh): Add prototype.
10414 (the_low_target): Add initializer for arch_setup field.
10415 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
10416 (the_low_target): Add initializer for arch_setup field.
10417 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
10418 (the_low_target): Add initializer for arch_setup field.
10419
10420 * win32-low.h (struct win32_target_ops): Add arch_setup field.
10421 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
10422 instead of init_registers ().
10423 * win32-arm-low.c (init_registers_arm): Add prototype.
10424 (the_low_target): Add initializer for arch_setup field.
10425 * win32-i386-low.c (init_registers_i386): Add prototype.
10426 (the_low_target): Add initializer for arch_setup field.
10427
10428 * spu-low.c (init_registers_spu): Add prototype.
10429 (initialize_low): Call initialie_registers_spu () instead of
10430 initialize_registers ().
10431
fd96d250
PA
104322008-02-19 Pedro Alves <pedro@codesourcery.com>
10433
10434 * server.c (handle_v_requests): When handling the vRun and vAttach
10435 packets, if already debugging a process, don't kill it. Return an
10436 error instead.
10437
d41b6bb4
DJ
104382008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
10439
10440 * server.c (handle_query): Correct length check.
10441
5ac588cf
PA
104422008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
10443
10444 * win32-low.c (do_initial_child_stuff): Add process handle
10445 parameter. Set current_process_handle and current_process_id from the
10446 parameters. Clear globals.
10447 (win32_create_inferior): Don't set current_process_handle and
10448 current_process_id here. Instead pass them on the call to
10449 do_initial_child_stuff.
10450 (win32_attach): Likewise.
10451 (win32_clear_inferiors): New.
10452 (win32_kill): Don't close the current process handle or the
10453 current thread handle here. Instead call win32_clear_inferiors.
10454 (win32_detach): Don't open a new handle to the process. Call
10455 win32_clear_inferiors.
10456 (win32_join): Don't rely on current_process_handle; open a new
10457 handle using the process id.
10458 (win32_wait): Call win32_clear_inferiors when the inferior process
10459 has exited.
10460
ecd7ecbc
DJ
104612008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
10462
10463 * server.c (monitor_show_help): Add "exit".
10464
1525d545
MG
104652008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
10466
ecd7ecbc 10467 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
10468 (clean): Add reg-xtensa.c.
10469 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
10470 * configure.srv (xtensa*-*-linux*) New target.
10471 * linux-xtensa-low.c: New.
10472 * xtensa-xtregs.c: New.
1525d545 10473
59a016f0
PA
104742008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
10475
10476 * hostio.c: Don't include errno.h.
10477 (errno_to_fileio_errno): Move to hostio-errno.
10478 * hostio.c: (hostio_error): Remove the error parameter. Defer the
10479 error number outputting to the target->hostio_last_error callback.
10480 (hostio_packet_error): Use FILEIO_EINVAL directly.
10481 (handle_open, handle_pread, hostio_error, handle_unlink): Update
10482 calls to hostio_error.
10483 * hostio-errno.c: New.
10484 * server.h (hostio_last_error_from_errno): Declare.
10485 * target.h (target_ops): Add hostio_last_error member.
10486 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
10487 as hostio_last_error handler.
889bf7c5 10488 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
10489 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
10490 (wince_hostio_last_error): New functions.
10491 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
10492 as hostio_last_error handler.
10493 (win32_target_ops) [!_WIN32_WCE]: Register
10494 hostio_last_error_from_errno as hostio_last_error handler.
10495 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
10496 (hostio-errno.o): New rule.
10497 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
10498 * configure.srv (srv_hostio_err_objs): New variable. Default to
10499 hostio-errno.o.
10500 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
10501 * configure: Regenerate.
10502
2d717e4f
DJ
105032008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
10504
10505 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
10506 (linux_kill, linux_detach): Clean up the process list.
10507 * remote-utils.c (remote_open): Improve port number parsing.
10508 (putpkt_binary, input_interrupt): Only send interrupts if the target
10509 is running.
10510 * server.c (extended_protocol): Make static.
10511 (attached): Define earlier.
10512 (exit_requested, response_needed, program_argv): New variables.
10513 (target_running): New.
10514 (start_inferior): Clear attached here.
10515 (attach_inferior): Set attached here.
10516 (require_running): Define.
10517 (handle_query): Use require_running and target_running. Implement
10518 "monitor exit".
10519 (handle_v_attach, handle_v_run): New.
10520 (handle_v_requests): Use require_running. Handle vAttach and vRun.
10521 (gdbserver_usage): Update.
10522 (main): Redo argument parsing. Handle --debug and --multi. Handle
10523 --attach along with other options or after the port. Save
10524 program_argv. Support no initial program. Resynchronize
10525 communication with GDB after an error. Handle "monitor exit".
10526 Use require_running and target_running. Always allow the extended
10527 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
10528 restart in extended mode.
10529 * README: Refer to the GDB manual. Update --attach usage.
10530
7407e2de
AS
105312007-12-20 Andreas Schwab <schwab@suse.de>
10532
10533 * linux-low.c (STACK_SIZE): Define.
10534 (linux_tracefork_child): Use it. Use __clone2 on ia64.
10535 (linux_test_for_tracefork): Likewise.
10536
b65d95c5
DJ
105372007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
10538
10539 * linux-low.c (linux_wait_for_event): Update messages. Do not
10540 reinsert auto-delete breakpoints.
10541 * mem-break.c (struct breakpoint): Change return type of handler to
10542 int.
10543 (set_breakpoint_at): Update handler type.
10544 (reinsert_breakpoint_handler): Return 1 instead of calling
10545 delete_breakpoint.
10546 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
10547 setting a new one.
10548 (check_breakpoints): Delete auto-delete breakpoints and return 2.
10549 * mem-break.h (set_breakpoint_at): Update handler type.
10550 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
10551 * win32-low.c (auto_delete_breakpoint): New.
10552 (get_child_debug_event): Use it.
10553
4e799345
DJ
105542007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
10555
10556 * configure.ac: Check for pread and pwrite.
10557 * hostio.c (handle_pread): Fall back to lseek and read.
10558 (handle_pwrite): Fall back to lseek and write.
10559 * config.in, configure: Regenerated.
10560
27524b67
DJ
105612007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
10562
10563 * server.c (myresume): Add own_buf argument.
10564 (main): Update calls.
10565
a20d5e98
DJ
105662007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
10567
10568 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
10569 * remote-utils.c (remote_open): Do not call disable_async_io.
10570 (block_async_io): Delete.
10571 (unblock_async_io): Make static.
10572 (initialize_async_io): New.
10573 * server.c (handle_v_cont): Handle async I/O here.
10574 (myresume): Likewise. Move other common resume tasks here...
10575 (main): ... from here. Call initialize_async_io. Disable async
10576 I/O before the main loop.
10577 * server.h (initialize_async_io): Declare.
10578 (block_async_io, unblock_async_io): Delete prototypes.
10579 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
10580
b79d787e
DJ
105812007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
10582
10583 * remote-utils.c (readchar): Allow binary data in received messages.
10584
d97903b2
PA
105852007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10586
10587 * win32-low.c (attaching): New global.
10588 (win32_create_inferior): Clear the `attaching' global.
10589 (win32_attach): Set the `attaching' global.
10590 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
10591 attaching. Only set a breakpoint at the entry point if not
10592 attaching.
10593
311de423
PA
105942007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10595
10596 * server.c (main): Don't report dll events on the initial
10597 connection on attaches.
10598
6c2d16d2
PA
105992007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10600
10601 * server.c (main): Relax numerical bases supported for the pid of
10602 the --attach command line argument.
10603
5ca906e6
PA
106042007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10605
10606 * win32-low.c (win32_attach): Call OpenProcess before
10607 DebugActiveProcess, not after. Add last error output to error
10608 call.
10609
9c6c8194
PA
106102007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10611
10612 * win32-low.c (win32_get_thread_context)
10613 (win32_set_thread_context): New functions.
10614 (thread_rec): Use win32_get_thread_context.
10615 (continue_one_thread, win32_resume): Use win32_set_thread_context.
10616 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
10617 field.
10618
4d5d1aaa
PA
106192007-12-03 Leo Zayas
10620 Pedro Alves <pedro_alves@portugalmail.pt>
10621
10622 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
10623 global variables.
10624 (child_add_thread): Minor cleanup.
10625 (child_continue): Resume artificially suspended threads before
10626 calling ContinueDebugEvent.
10627 (suspend_one_thread): New.
10628 (fake_breakpoint_event): New.
10629 (get_child_debug_event): Change return type to int. Check here if
10630 gdb sent an interrupt request. If a soft interrupt was requested,
10631 fake a breakpoint event. Return 0 if there is no event to handle,
10632 and 1 otherwise.
10633 (win32_wait): Don't check here if gdb sent an interrupt request.
10634 Ensure there is a valid event to handle.
10635 (win32_request_interrupt): Add soft interruption method as last
10636 resort.
10637
c436e841
PA
106382007-12-03 Leo Zayas
10639 Pedro Alves <pedro_alves@portugalmail.pt>
10640
10641 * win32-low.h (win32_thread_info): Add descriptions to the
10642 structure members. Replace `suspend_count' counter by a
10643 `suspended' flag.
10644 * win32-low.c (thread_rec): Update condition of when to get the
10645 context from the inferior. Rely on ContextFlags being set if it
10646 has already been retrieved. Only suspend the inferior thread if
10647 we haven't already. Warn if that fails.
10648 (continue_one_thread): s/suspend_count/suspended/. Only call
10649 ResumeThread once. Warn if that fails.
10650
e7b5fa67
PA
106512007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
10652
10653 * win32-low.c (win32_wait): Don't read from the inferior when it
10654 has already exited.
10655
a385171d
PA
106562007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
10657
10658 * Makefile.in (win32_low_h): New variable.
10659 (win32-low.o): Add dependency on $(win32_low_h).
10660 (win32-arm-low.o, win32-i386-low.o): New rules.
10661
f80c84b3
DJ
106622007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
10663
10664 * hostio.c: Correct copyright year.
10665
a6b151f1
DJ
106662007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
10667
10668 * Makefile.in (OBS): Add hostio.o.
10669 (hostio.o): New rule.
10670 * server.h (handle_vFile): Declare.
10671 * hostio.c: New file.
10672 * server.c (handle_v_requests): Take packet_len and new_packet_len
10673 for binary packets. Call handle_vFile.
10674 (main): Update call to handle_v_requests.
10675
f9387fc3
DJ
106762007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
10677
10678 * linux-low.c: Include <sched.h>.
10679
51c2684e
DJ
106802007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
10681
10682 * linux-low.c (linux_tracefork_grandchild): New.
10683 (linux_tracefork_child): Use clone.
10684 (linux_test_for_tracefork): Use clone; allocate and free a stack.
10685
75f83163
JB
106862007-10-31 Joel Brobecker <brobecker@adacore.com>
10687
10688 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
10689
da5898ce
DJ
106902007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
10691
10692 * linux-low.c (handle_extended_wait): Handle unexpected signals.
10693
24a09b5f
DJ
106942007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
10695
10696 * inferiors.c (change_inferior_id): Delete.
10697 (add_pid_to_list, pull_pid_from_list): New.
10698 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
10699 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
10700 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
10701 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
10702 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
10703 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
10704 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
10705 (using_threads): Always set to 1.
10706 (handle_extended_wait): New.
10707 (add_process): Do not set TID.
10708 (linux_create_inferior): Set must_set_ptrace_flags.
10709 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
10710 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
10711 (linux_thread_alive): Rename TID argument to LWPID.
10712 (linux_wait_for_process): Handle unknown processes. Do not use TID.
10713 (linux_wait_for_event): Do not use TID or check using_threads. Update
10714 call to dead_thread_notify. Call handle_extended_wait.
10715 (linux_create_inferior): Use PTRACE_SETOPTIONS.
10716 (send_sigstop): Delete sigstop_sent.
10717 (wait_for_sigstop): Avoid TID.
10718 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
10719 (linux_test_for_tracefork): New.
10720 (linux_lookup_signals): Use thread_db_active and
10721 linux_supports_tracefork_flag.
10722 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
10723 * linux-low.h (get_process_thread): Avoid TID.
10724 (struct process_ifo): Move thread_known and tid to the end. Remove
10725 sigstop_sent.
10726 (linux_attach_lwp, thread_db_init): Update prototypes.
10727 * server.h (change_inferior_id): Delete prototype.
10728 (add_pid_to_list, pull_pid_from_list): New prototypes.
10729 * thread-db.c (thread_db_use_events): New.
10730 (find_first_thread): Rename to...
10731 (find_one_thread): ...this. Update callers and messages. Do not
10732 call fatal. Check thread_db_use_events. Do not call
10733 change_inferior_id or new_thread_notify.
10734 (maybe_attach_thread): Update. Do not call new_thread_notify.
10735 (thread_db_init): Set thread_db_use_events. Check use_events.
10736 * utils.c (fatal, warning): Correct message prefix.
10737
30ed0a8f
DJ
107382007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
10739
10740 * Makefile.in (clean): Remove new files.
10741 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
10742 (powerpc-64.o, powerpc-64.c): New rules.
10743 * configure.srv: Use alternate register sets for powerpc64-*-linux*
10744 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
10745 with SPE.
10746 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
10747 SPE targets.
10748 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
10749 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
10750 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
10751 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
10752 (target_regsets): Add AltiVec and SPE register sets.
10753 * configure.ac: Check for AltiVec and SPE.
10754 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
10755 (ppc_fill_vrregset, ppc_store_vrregset): New.
10756 (target_regsets): Add AltiVec register set.
10757 * configure: Regenerated.
10758
fd462a61
DJ
107592007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
10760
10761 * linux-low.c (O_LARGEFILE): Define.
10762 (linux_read_memory): Use /proc/PID/mem.
10763 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
10764 * configure, config.in: Regenerated.
10765
69f223ed
DJ
107662007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
10767
10768 * linux-low.c (linux_wait_for_event): Do not pass signals while
10769 single-stepping.
10770
aec18585
PA
107712007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
10772
10773 * win32-low.c (create_process): New.
10774 (win32_create_inferior): Use create_process instead of
10775 CreateProcess. If create_process failed retry appending an ".exe"
10776 suffix. Store the GetLastError result immediatelly after
10777 create_process calls and use it on the call to error.
10778
34d86ddd
PA
107792007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
10780
10781 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
10782
5a0e3bd0
JB
107832007-08-23 Joel Brobecker <brobecker@adacore.com>
10784
10785 * configure.ac: Switch license to GPLv3.
10786
f88c79e6
MS
107872007-08-01 Michael Snyder <msnyder@access-company.com>
10788
10789 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
10790
6b3d9b83
PA
107912007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
10792
10793 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
10794 typedef.
10795 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
10796 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
10797 CloseToolhelp32Snapshot.
10798 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
10799 CloseToolhelp32Snapshot.
10800
c588c53c
MS
108012007-07-27 Michael Snyder <michael.snyder@access-company.com>
10802
10803 * server.c (main): Check for inferior exit before main loop.
10804
aa0403d9
PA
108052007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
10806
10807 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
10808 instead of on tmp_desc.
10809
255e7678
DJ
108102007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
10811 Daniel Jacobowitz <dan@codesourcery.com>
10812
10813 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
10814 (add_thread): Minor cleanups.
10815 (clear_inferiors): Move lower in the file. Clear the DLL
10816 list.
10817 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
10818 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
10819 (xml_escape_text): New.
10820 * server.c (handle_query): Handle qXfer:libraries:read. Report it
10821 for qSupported.
10822 (handle_v_cont): Report errors.
10823 (gdbserver_version): Update.
10824 (main): Correct size of own_buf. Do not report initial DLL events.
10825 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
10826 (unloaded_dll, xml_escape_text): New.
10827 * win32-low.c (enum target_waitkind): Update comments.
10828 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
10829 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
10830 (win32_EnumProcessModules, win32_GetModuleInformation)
10831 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
10832 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
10833 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
10834 (win32_Module32First, win32_Module32Next, load_toolhelp)
10835 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
10836 (get_child_debug_event): Handle DLL events.
10837 (win32_wait): Likewise.
10838
0d37add9
DJ
108392007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
10840
10841 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
10842 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
10843
45e2715e
PA
108442007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
10845
10846 * win32-low.c (handle_output_debug_string): Ignore event if not
10847 waiting.
10848
c5674cf1
PA
108492007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
10850
10851 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
10852
2bbe3cc1
DJ
108532007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
10854
10855 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
10856
ae13219e
DJ
108572007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
10858
10859 * inferiors.c (change_inferior_id): Add comment.
10860 * linux-low.c (check_removed_breakpoint): Add an early
10861 prototype. Improve debug output.
10862 (linux_attach): Doc update.
10863 (linux_detach_one_process, linux_detach): Clean up before releasing
10864 each process.
10865 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
10866 * linux-low.h (struct process_info): Doc improvement.
10867 * mem-break.c (delete_all_breakpoints): New.
10868 * mem-break.h (delete_all_breakpoints): New prototype.
10869 * thread-db.c (find_first_thread): New.
10870 (thread_db_create_event): Call it instead of
10871 thread_db_find_new_threads. Clean up unused variables.
10872 (maybe_attach_thread): Remove first thread handling.
10873 (thread_db_find_new_threads): Use find_first_thread.
10874 (thread_db_get_tls_address): Likewise.
10875
4105de34
DJ
108762007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
10877
10878 * thread-db.c (thread_db_find_new_threads): Add prototype.
10879 (thread_db_create_event): Check for the main thread before adding
10880 a new thread.
10881 (maybe_attach_thread): Only enable event reporting if TID == 0.
10882 (thread_db_get_tls_address): Check for new threads.
10883
2b876972
DJ
108842007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
10885
10886 * linux-low.c (linux_create_inferior): Try execv before execvp.
10887 * spu-low.c (spu_create_inferior): Likewise.
10888
7a245884
DJ
108892007-06-13 Mike Frysinger <vapier@gentoo.org>
10890
10891 * linux-low.c (linux_create_inferior): Change execv to execvp.
10892 * spu-low.c (spu_create_inferior): Likewies.
10893
117ce543
DJ
108942007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
10895
10896 * Makefile.in (clean): Clean new files instead of deleted ones.
10897 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
10898 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
10899 rules.
10900 * configure.srv: Specify XML files and new regformats for MIPS and
10901 MIPS64 GNU/Linux.
10902 * linux-mips-low.c (mips_num_regs): Set to only used registers.
10903 (mips_regmap): Do not fetch $0. Remove unused registers. Add
10904 an entry for the restart register.
10905 (mips_cannot_fetch_register, mips_cannot_store_register)
10906 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
10907 register names to match the XML descriptions.
10908 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
10909 restart register instead of $0.
10910
0e7f50da
UW
109112007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
10912 Markus Deuling <deuling@de.ibm.com>
10913
10914 * remote-utils.c (decode_xfer_write): New function.
10915 * server.h (decode_xfer_write): Add prototype.
10916 * server.c (handle_query): Add PACKET_LEN argument. Support
10917 qXfer:spu:read and qXfer:spu:write packets.
10918 (main): Pass packet_len to handle_query.
10919 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
10920 * target.h (target_ops): Add qxfer_spu.
10921
374c1d38
UW
109222007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
10923
10924 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
10925 accessing non-seekable spufs files.
10926
bb63802a
UW
109272007-05-16 Markus Deuling <deuling@de.ibm.com>
10928
889bf7c5 10929 * server.c (handle_query): Add reply for qC packet.
bb63802a 10930
7390519e
PA
109312007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10932 Leo Zayas <lerele@champenstudios@com>
10933
10934 * server.h (check_remote_input_interrupt_request): New function.
10935 * remote_utils.c (INVALID_DESCRIPTOR): New define.
10936 (remote_desc): Initialize with INVALID_DESCRIPTOR.
10937 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
10938 (check_remote_input_interrupt_request): New function.
10939 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 10940 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
10941 winapi_GenerateConsoleCtrlEvent): New typedefs.
10942 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
10943 to 250 ms.
10944 (win32_wait): Check for remote interrupt request
10945 with check_remote_input_interrupt_request.
10946 (win32_request_interrupt): New function.
10947 (win32_target_op): Set request_interrupt to win32_request_interrupt.
10948
34b34921
PA
109492007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10950
10951 * win32-low.c (debug_registers_changed,
10952 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
10953 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
10954 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
10955 (thread_rec): Get context using the low target.
10956 (child_add_thread): Call thread_added on the low target,
10957 which does the same thing.
10958 (regptr): Delete.
10959 (do_initial_child_stuff): Remove debug registers references.
10960 Set context using the low target. Resume threads after
10961 setting the contexts.
10962 (child_continue): Remove dead variable. Remove debug
10963 registers references.
10964 (child_fetch_inferior_registers): Go through the low target.
10965 (do_child_store_inferior_registers): Remove.
10966 (child_store_inferior_registers): Go through the low target.
10967 (win32_resume): Remove debug registers references.
10968 Set context using the low target.
10969 (handle_exception): Change return type to void. Don't record
10970 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
10971 first chance exception.
889bf7c5 10972 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
10973 goto loop. Always return after waiting for debug event.
10974 (win32_wait): Convert to switch statement. Handle spurious
10975 events.
10976
10977 * win32-i386-low.c (debug_registers_changed,
10978 debug_registers_used): New.
10979 (initial_stuff): Rename to ...
10980 (i386_initial_stuff): ... this. Clear debug registers
10981 state variables.
10982 (store_debug_registers): Delete.
10983 (i386_get_thread_context): New.
10984 (load_debug_registers): Delete.
10985 (i386_set_thread_context): New.
10986 (i386_thread_added): New.
10987 (single_step): Rename to ...
10988 (i386_single_step): ... this.
10989 (do_fetch_inferior_registers): Rename to ...
10990 (i386_fetch_inferior_register): ... this.
10991 (i386_store_inferior_register): New.
10992 (the_low_target): Adapt to new interface.
10993
10994 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
10995 (arm_get_thread_context): New.
10996 (arm_set_thread_context): New.
10997 (regptr): New.
10998 (do_fetch_inferior_registers): Rename to ...
10999 (arm_fetch_inferior_register): ... this.
11000 (arm_store_inferior_register): New.
11001 (arm_wince_breakpoint): Reimplement as unsigned long.
11002 (arm_wince_breakpoint_len): Define.
11003 (the_low_target): Adapt to new interface.
11004
11005 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
11006 load_debug_registers. Add get_thread_context, set_thread_context,
11007 thread_added and store_inferior_register. Rename
11008 fetch_inferior_registers to fetch_inferior_register.
11009 (regptr): Remove declaration.
11010
dd6953e1
PA
110112007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11012
11013 * linux-low.c (linux_detach): Change return type to int. Return 0.
11014 * spu-low.c (spu_detach): Likewise.
11015
444d6139
PA
110162007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11017
11018 * target.h (target_ops): Change return type of detach to int.
11019 Add join.
11020 (join_inferior): New.
11021 * server.c (main): Don't skip detach support on mingw32.
11022 If the inferior doesn't support detaching return error.
11023 Call join_inferior instead of using waitpid.
11024 * linux-low.c (linux_join): New.
11025 (linux_target_op): Add linux_join.
11026 * spu-low.c (spu_join): New.
11027 (spu_target_ops): Add spu_join.
11028 * win32-low.c (win32_detach): Adapt to new interface.
11029 Reopen current_process_handle before detaching. Issue a child
11030 resume before detaching.
11031 (win32_join): New.
11032 (win32_target_op): Add win32_join.
11033
1d5315fe
PA
110342007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11035
11036 * win32-low.c (win32-attach): Fix return value.
11037 * target.h (target_ops): Describe ATTACH return values.
11038
bf914831
PA
110392007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11040
11041 * win32-low.c (GETPROCADDRESS): Define.
11042 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
11043 (winapi_DebugSetProcessKillOnExit): Likewise.
11044 (win32_create_inferior): Force usage of ansi CreateProcessA.
11045 (win32_attach): Use GETPROCADDRESS.
11046 (win32_detach): Likewise.
11047
f72f3e60
PA
110482007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11049
11050 * win32-low.c (win32_wait): Don't use WSTOPSIG.
11051
ed50f18f
PA
110522007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
11053
11054 * win32-low.c: Commit leftover changes from 2007-03-29.
11055
0c2ead7e
DJ
110562007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
11057
11058 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
11059 fields short instead of int. Add explicit padding.
11060 (i387_cache_to_fsave): Remove unnecessary casts.
11061 (i387_fsave_to_cache): Doc fix.
11062 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
11063
73725ff3
DJ
110642007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
11065
11066 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
11067 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
11068
d99f33d8
PA
110692007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
11070
11071 * configure.srv (arm*-*-mingw32ce*): Move near the other
11072 arm targets.
11073
68070c10
PA
110742007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
11075
2482afc6 11076 * configure.ac: Add errno checking.
68070c10
PA
11077 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
11078 sys/file.h and malloc.h.
11079 (AC_CHECK_DECLS): Add perror.
11080 (srv_mingwce): Handle.
2482afc6 11081 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
11082 win32-i386-low.o to srv_tgtobj.
11083 (i[34567]86-*-mingw*): Likewise.
11084 (arm*-*-mingw32ce*): Add case.
11085 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
11086 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
11087 [__MINGW32CE__] (strerror): New function.
11088 [__MINGW32CE__] (errno): Define to GetLastError.
11089 [__MINGW32CE__] (COUNTOF): New macro.
11090 (remote_open): Remove extra close call.
11091 * mem-break.c (delete_breakpoint_at): New function.
11092 * mem-break.h (delete_breakpoint_at): Declare.
11093 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
11094 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
11095 [USE_WIN32API] (read, write): Add char* casts.
11096 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
11097 * server.h: Include wincecompat.h on Windows CE.
11098 [HAVE_ERRNO_H]: Check.
11099 (perror): Declare if not declared.
11100 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
11101 (perror_with_name): Remove errno declaration.
11102 * wincecompat.h: New.
11103 * wincecompat.c: New.
11104 * win32-low.h: New.
11105 * win32-arm-low.c: New.
11106 * win32-i386-low.c: New.
11107 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
11108 (OUTMSG2): Make it safe.
11109 (_T): New macro.
11110 (COUNTOF): New macro.
11111 (NUM_REGS): Get it from the low target.
11112 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
11113 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
11114 (thread_rec): Let low target handle debug registers.
11115 (child_add_thread): Likewise.
11116 (child_init_thread_list): Likewise.
11117 (continue_one_thread): Likewise.
11118 (regptr): New.
11119 (do_child_fetch_inferior_registers): Move to ...
11120 * win32-i386-low.c: ... here, and rename to ...
11121 (do_fetch_inferior_registers): ... this.
889bf7c5 11122 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
11123 Go through the low target.
11124 (do_child_store_inferior_registers): Use regptr.
11125 (strwinerror): New function.
11126 (win32_create_inferior): Handle Windows CE.
11127 Use strwinerror instead of strerror on Windows error
11128 codes. Add program to the error output.
11129 Don't close the main thread handle on Windows CE.
11130 (win32_attach): Use coredll.dll on Windows CE.
11131 (win32_kill): Close current process and current
11132 thread handles.
11133 (win32_detach): Use coredll.dll on Windows CE.
11134 (win32_resume): Let low target handle debug registers, and
11135 step request.
11136 (handle_exception): Add/Remove initial breakpoint. Avoid
11137 non-existant WSTOPSIG on Windows CE.
11138 (win32_read_inferior_memory): Cast to remove warning.
11139 (win32_arch_string): Go through the low target.
11140 (initialize_low): Call set_breakpoint_data with the low
11141 target's breakpoint.
11142 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
11143 FOP_REGNUM, mappings): Move to ...
11144 * win32-i386-low.c: ... here.
11145 * win32-low.c (win32_thread_info): Move to ...
11146 * win32-low.h: ... here.
11147 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
11148 win32-arm-low.c and wincecompat.c.
11149 (all:): Add $EXEEXT.
11150 (install-only:): Likewise.
11151 (gdbserver:): Likewise.
11152 (gdbreplay:): Likewise.
11153 * config.in: Regenerate.
11154 * configure: Regenerate.
11155
41093d81
PA
111562007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
11157
11158 * win32-low.c: Rename typedef thread_info to
11159 win32_thread_info throughout.
11160
544afa54
PA
111612007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
11162
11163 * win32-i386-low.c: Rename to ...
11164 * win32-low.c: ... this.
11165 * configure.srv: Replace win32-i386-low.o with win32-low.o.
11166 * Makefile.in: Likewise.
11167
bce7165d
PA
111682007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
11169
11170 * remote-utils.c (monitor_output): Constify msg parameter.
11171 * server.h (monitor_output): Likewise.
11172 * win32-i386-low.c (handle_output_debug_string): New.
11173 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
11174 handle_output_debug_string.
11175 (get_child_debug_event): Likewise.
11176
506c7aa0
DJ
111772007-03-27 Mat Hostetter <mat@lcs.mit.edu>
11178
11179 * server.c (main): Correct strtoul check.
11180
42c81e2a
DJ
111812007-03-27 Jon Ringle <jon@ringle.org>
11182
11183 * linux-low.c: Check __ARCH_HAS_MMU__ also.
11184
9453113a
DJ
111852007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
11186
11187 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
11188
64a69107
DJ
111892007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
11190
11191 * terminal.h: Check HAVE_SGTTY_H.
11192
111932007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
11194
11195 * remote-utils.c (remote_open): Print out the assigned port number.
11196
c74d0ad8
DJ
111972007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
11198
11199 * remote-utils.c (monitor_output): New function.
11200 * server.c (debug_threads): Define here.
11201 (monitor_show_help): New function.
11202 (handle_query): Handle qRcmd.
11203 (main): Do not handle 'd' packet.
11204 * server.h (debug_threads, remote_debug, monitor_output): Declare.
11205 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
11206 of debug_threads.
11207
de7c3b4a
PA
112082007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11209
11210 * Makefile.in (EXEEXT): New.
11211 (clean): Use $(EXEEXT).
11212
ef57601b
PA
112132007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11214
11215 * target.h (target_ops): Rename send_signal to request_interrupt,
11216 and remove enum target_signal parameter.
11217 * linux-low.c (linux_request_interrupt): Rename from
11218 linux_send_signal, and always send SIGINT.
11219 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
11220 and always send SIGINT.
11221 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
11222 of send_signal.
11223 (input_interrupt): Likewise.
11224
820f2bda
PA
112252007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11226
11227 * server.c (get_features_xml): Check if target implemented
11228 arch_string.
11229 * win32-i386-low.c (win32_arch_string): New.
11230 (win32_target_ops): Add win32_arch_string as arch_string member.
11231
ab39bf24
UW
112322007-02-22 Markus Deuling <deuling@de.ibm.com>
11233
11234 * spu-low.c (spu_arch_string): New.
11235 (spu_target_ops): Add spu_arch_string.
11236
61ff6e04
DJ
112372007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
11238
11239 * remote-utils.c: Remove HAVE_TERMINAL_H check.
11240 * configure.ac: Do not check for terminal.h.
11241 * configure, config.in: Regenerated.
11242
fb1e4ffc
DJ
112432007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
11244
11245 * Makefile.in (OBS): Add $(XML_BUILTIN).
11246 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
11247 (clean): Update.
11248 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
11249 (arm-with-iwmmxt.c): New.
11250 * config.in, configure: Regenerate.
11251 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
11252 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
11253 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
11254 (arm*-*-linux*): Add iWMMXt and regset support.
11255 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
11256 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
11257 (arm_store_wmmxregset, target_regsets): New.
11258 * server.c (get_features_xml): Take annex argument. Check builtin
11259 XML documents.
11260 (handle_query): Handle multiple annexes.
11261
0f48aa01
DJ
112622007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11263
11264 * remote-utils.c [USE_WIN32API] (read, write): Define.
11265 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
11266 write.
11267
23181151
DJ
112682007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
11269
11270 * linux-i386-low.c (the_low_target): Set arch_string.
11271 * linux-x86-64-low.c (the_low_target): Likewise.
11272 * linux-low.c (linux_arch_string): New.
11273 (linux_target_ops): Add it.
11274 * linux-low.h (struct linux_target_ops): Add arch_string.
11275 * server.c (write_qxfer_response): Use const void * for DATA.
11276 (get_features_xml): New.
11277 (handle_query): Handle qXfer:features:read. Report it for qSupported.
11278 * target.h (struct target_ops): Add arch_string method.
11279
9d606399
DJ
112802007-01-03 Denis Pilat <denis.pilat@st.com>
11281 Daniel Jacobowitz <dan@codesourcery.com>
11282
11283 * linux-low.c (linux_kill): Handle being called with no threads.
11284 * win32-i386-low.c (win32_kill): Likewise.
11285 (get_child_debug_event): Clear current_process_handle.
11286
112872006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
11288 Daniel Jacobowitz <dan@codesourcery.com>
11289
11290 * remote-utils.c (remote_open): Check the type of specified
11291 serial port devices before opening them.
11292 * server.c (main): Kill the inferior if an error occurs during
11293 the first remote_open.
11294
a5e13d24
DJ
112952006-12-05 Markus Deuling <deuling@de.ibm.com>
11296
11297 * README: Update supported targets.
11298
186947f7
DJ
112992006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
11300
11301 * Makefile.in (clean): Remove reg-mips64.c.
11302 (reg-mips64.c, reg-mips64.o): New rules.
11303 * configure.srv: Handle mips64. Include regset support for mips.
11304 * linux-mips-low.c (union mips_register): New.
11305 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
11306 (mips_breakpoint, mips_breakpoint_at): Use int.
11307 (mips_collect_register, mips_supply_register)
11308 (mips_collect_register_32bit, mips_supply_register_32bit)
11309 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
11310 (mips_store_fpregset, target_regsets): New.
11311 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
11312
a13e2c95
UW
113132006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
11314
11315 * configure.srv: Add target "spu*-*-*".
11316 * Makefile.in (clean): Remove reg-spu.c.
11317 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
11318 * spu-low.c: New file.
11319
cb7283db
DJ
113202006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
11321
11322 * configure.ac: Correct td_thr_tls_get_addr test.
11323 * configure: Regenerated.
11324
89be2091
DJ
113252006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
11326
11327 * linux-low.c (linux_wait_for_event): Reformat. Use the
11328 pass_signals array.
11329 * remote-utils.c (decode_address_to_semicolon): New.
11330 * server.c (pass_signals, handle_general_set): New.
11331 (handle_query): Mention QPassSignals for qSupported.
11332 (main): Call handle_general_set.
11333 * server.h (pass_signals, decode_address_to_semicolon): New.
11334
000ef4f0
DJ
113352006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
11336
11337 * server.c (handle_query): Correct error handling for read_auxv.
11338
b7149293
UW
113392005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
11340
11341 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
11342 and srv_linux_thread_db to yes.
11343 * linux-s390-low.c (s390_fill_gregset): New function.
11344 (target_regsets): Define data structure.
11345
dae5f5cf
DJ
113462006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
11347
11348 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
11349 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
11350 * config.in, configure: Regenerated.
11351 * inferiors.c (gdb_id_to_thread): New function.
11352 (gdb_id_to_thread_id): Use it.
11353 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
11354 * linux-low.h (struct process_info): Add th member.
11355 (thread_db_get_tls_address): New prototype.
11356 * remote-utils.c (decode_address): Make non-static.
11357 * server.c (handle_query): Handle qGetTLSAddr.
11358 * server.h (gdb_id_to_thread, decode_address): New prototypes.
11359 * target.h (struct target_ops): Add get_tls_address.
11360 * thread-db.c (maybe_attach_thread): Save the thread handle.
11361 (thread_db_get_tls_address): New.
11362
32ca6d61
DJ
113632006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
11364
11365 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
11366 (linux_resume_one_process): Take a siginfo_t *. Update all
11367 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
11368 (struct pending_signals): Add a siginfo_t.
11369 (linux_wait_for_process): Always set last_status.
11370 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
11371 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
11372 * linux-low.h (struct process_info): Add last_status.
11373
5ffff7c1
DJ
113742006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
11375
11376 * remote-utils.c (try_rle): New function.
11377 (putpkt_binary): Use it.
11378
8695c747
DJ
113792006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
11380
11381 * Makefile.in (clean): Clean reg-x86-64-linux.c.
11382 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
11383 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
11384 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
11385 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
11386 point registers.
11387
290fadea
RS
113882006-08-08 Richard Sandiford <richard@codesourcery.com>
11389
11390 * server.c (terminal_fd): New variable.
11391 (old_foreground_pgrp): Likewise.
11392 (restore_old_foreground_pgrp): New function.
11393 (start_inferior): Record the terminal file descriptor in terminal_fd
11394 and its original foreground group in old_foreground_pgrp. Register
11395 restore_old_foreground_pgrp with atexit().
11396
9f2e1e63
DJ
113972006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
11398
11399 * server.c (handle_query): Correct qPart to qXfer.
11400
b80864fb
DJ
114012006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
11402
11403 * configure.ac: Check for more headers which are missing on
11404 Windows. Automatically supply -lwsock32 and USE_WIN32API.
11405 * configure.srv: Add Cygwin and mingw32.
11406 * remote-utils.c: Don't include headers unconditionally which
11407 are missing on mingw32. Include <winsock.h> for mingw32.
11408 (remote_open): Adjust for mingw32 support. Flush
11409 standard error after writing to it.
11410 (remote_close, putpkt_binary, input_interrupt, block_async_io)
11411 (unblock_async_io, enable_async_io, disable_async_io)
11412 (readchar, getpkt): Update for Winsock support.
11413 (prepare_resume_reply): Expect a protocol signal number.
11414 * server.c: Disable <sys/wait.h> on mingw32.
11415 (start_inferior): Adjust for mingw32 support. Flush
11416 standard error after writing to it.
11417 (attach_inferior): Likewise. Use protocol signal
11418 numbers.
11419 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
11420 and names.
11421 * win32-i386-low.c: New file.
11422 * Makefile.in (XM_CLIBS): Set.
11423 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
11424 (win32-i386-low.o): New dependency rule.
11425 * linux-low.c (linux_wait): Use target signal numbers.
11426 * target.h (struct target_ops): Doc fix.
11427 * server.h (target_signal_to_name): New prototype.
11428 * gdbreplay.c: Don't include headers unconditionally which
11429 are missing on mingw32. Include <winsock.h> for mingw32.
11430 (remote_close, remote_open): Adjust for Winsock support.
11431 * configure, config.in: Regenerated.
11432
0876f84a
DJ
114332006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
11434
11435 * server.c (decode_xfer_read, write_qxfer_response): New.
11436 (handle_query): Take a packet length argument. Handle
11437 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
11438 the qSupported response.
11439 (main): Update call to handle_query.
11440
01f9e8fa
DJ
114412006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
11442
11443 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
11444 (putpkt_binary): Renamed from putpkt and adjusted for binary
11445 data.
11446 (putpkt): New wrapper for putpkt_binary.
11447 (readchar): Don't mask off the high bit.
11448 (decode_X_packet): New function.
11449 * server.c (main): Call putpkt_binary if a handler sets the packet
11450 length. Save the length of the incoming packet. Handle 'X'.
11451 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
11452
be2a5f71
DJ
114532006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
11454
11455 * server.c (handle_query): Handle qSupported.
11456
ea025f5f
DJ
114572006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
11458
11459 * remote-utils.c (all_symbols_looked_up): New variable.
11460 (look_up_one_symbol): Check it.
11461 * server.h (look_up_one_symbol): New declaration.
11462 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
11463
9308fc88
DJ
114642006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
11465
11466 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 11467 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
11468 (PTRACE_GET_THREAD_AREA): Define.
11469 (ps_get_thread_area): New function.
11470
52fb6437
NS
114712006-05-09 Nathan Sidwell <nathan@codesourcery.com>
11472
11473 * configure.srv (m68k*-*-uclinux*): New target.
11474 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
11475 (linux_resume_one_process): Remove extraneous cast.
11476 (linux_read_offsets): New.
11477 (linux_target_op): Add linux_read_offsets on mmuless systems.
11478 * server.c (handle_query): Add qOffsets logic.
11479 * target.h (struct target_ops): Add read_offsets.
11480
21b0f40c
DJ
114812006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
11482
11483 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
11484 (PTRACE_GET_THREAD_AREA): Define.
11485 (ps_get_thread_area): New function.
11486 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
11487 (linux-x86-64-low.o): Update.
11488
0050a760
DJ
114892006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
11490
11491 * configure.ac: Remove checks for prfpregset_t.
11492 * gdb_proc_service.h: New file.
11493 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
11494 new "gdb_proc_service.h".
11495 * proc-service.c: Likewise.
11496 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
11497 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
11498 * Makefile.in (gdb_proc_service_h): Updated.
11499 * configure, config.in: Regenerated.
11500
b92a518e
DJ
115012006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
11502
11503 * remote-utils.c (prepare_resume_reply): Move declaration
11504 of gdb_id_from_wait to the top of the block.
11505
545587ee
DJ
115062006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
11507
11508 * linux-low.c (regsets_store_inferior_registers): Read the regset
11509 from the target before filling it.
11510
9db87ebd
DJ
115112006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
11512
11513 * server.c (attach_inferior): Return SIGTRAP for a successful
11514 attach.
11515
dd24457d
DJ
115162006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
11517
11518 * Makefile.in (OBS): Add version.o.
11519 (STAGESTUFF): Delete.
11520 (version.o): Add dependencies.
11521 (version.c): Replace rule.
11522 (clean): Remove version.c.
11523 * server.c (gdbserver_version): New.
11524 (gdbserver_usage): Use printf.
11525 (main): Handle --version and --help.
11526 * server.h (version, host_name): Add declarations.
11527
6f0f660e
EZ
115282005-12-23 Eli Zaretskii <eliz@gnu.org>
11529
889bf7c5
PA
11530 * linux-arm-low.c:
11531 * linux-arm-low.c:
11532 * inferiors.c:
11533 * i387-fp.h:
11534 * i387-fp.c:
11535 * gdbreplay.c:
11536 * regcache.c:
11537 * proc-service.c:
11538 * mem-break.h:
11539 * mem-break.c:
11540 * linux-x86-64-low.c:
11541 * linux-sh-low.c:
11542 * linux-s390-low.c:
11543 * linux-ppc64-low.c:
11544 * linux-ppc-low.c:
11545 * linux-mips-low.c:
11546 * linux-m68k-low.c:
11547 * linux-m32r-low.c:
11548 * linux-low.h:
11549 * linux-low.c:
11550 * linux-ia64-low.c:
11551 * linux-i386-low.c:
11552 * linux-crisv32-low.c:
11553 * thread-db.c:
11554 * terminal.h:
11555 * target.h:
11556 * target.c:
11557 * server.h:
11558 * server.c:
11559 * remote-utils.c:
11560 * regcache.h:
11561 * utils.c:
11562 * Makefile.in:
11563 * configure.ac:
6f0f660e
EZ
11564 * gdbserver.1: Add (C) after Copyright. Update the FSF
11565 address.
11566
9d1fb177
DJ
115672005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
11568
11569 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
11570 (arm_breakpoint_at): Recognize both breakpoints.
11571 (the_low_target): Use the correct breakpoint instruction.
11572
011a70c2
DJ
115732005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
11574
11575 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
11576 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
11577 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
11578 (the_low_target): Update.
11579
7fb85e41
AS
115802005-10-25 Andreas Schwab <schwab@suse.de>
11581
11582 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
11583
11584 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
11585 (ia64_num_regs): Reduce to 462.
11586
3db0444b
DJ
115872005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
11588
11589 * acinclude.m4: Correct quoting.
11590 * aclocal.m4: Regenerated.
11591
11592 Suggested by SZOKOVACS Robert <szo@ies.hu>:
11593 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
11594 (thread_db_init): Call thread_db_err_str.
11595 * configure.ac: Check for TD_VERSION.
11596 * config.in, configure: Regenerated.
11597
bee0189a
DJ
115982005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11599
11600 * server.h (error, fatal, warning): Add ATTR_FORMAT.
11601
e9d25b98
DJ
116022005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
11603
11604 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
11605 is not available. Define HAVE_PTRACE_GETREGS if it is.
11606 * config.in, configure: Regenerated.
11607 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
11608 * linux-i386-low.c, linux-m68k-low.c: Update to use
11609 HAVE_PTRACE_GETREGS.
11610 * linux-low.c (regsets_fetch_inferior_registers)
11611 (regsets_store_inferior_registers): Only return 0 if we processed
11612 GENERAL_REGS.
11613 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
11614 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
11615
a06660f7
DJ
116162005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
11617
11618 * inferiors.c (struct thread_info): Add gdb_id.
11619 (add_thread): Add gdb_id argument.
11620 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
11621 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
11622 calls to add_thread.
11623 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
11624 * server.c (handle_query): Use thread_to_gdb_id.
11625 (handle_v_cont, main): Use gdb_id_to_thread_id.
11626 * server.h (add_thread): Update prototype.
11627 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
11628 prototypes.
11629
5a1f5858
DJ
116302005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
11631
11632 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
11633 left-padded registers.
11634 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
11635 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
11636
e122f1f5
SE
116372005-07-01 Steve Ellcey <sje@cup.hp.com>
11638
11639 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
11640 * configure: Regenerate.
11641 * config.in: Regenerate.
11642 * server.h (NEED_DECLARATION_STRERROR):
11643 Replace with !HAVE_DECL_STRERROR.
11644
d592fa2f
DJ
116452005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
11646
11647 * linux-low.c (linux_wait, linux_send_signal): Don't test
11648 an unsigned long variable for > 0 if it could be MAX_ULONG.
11649 * server.c (myresume): Likewise.
11650 * target.c (set_desired_inferior): Likewise.
11651
ccbd4912
MK
116522005-06-13 Mark Kettenis <kettenis@gnu.org>
11653
11654 * configure.ac: Simplify and improve check for socklen_t.
11655 * configure, config.in: Regenerate.
11656
f450004a
DJ
116572005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
11658
11659 * acconfig.h: Remove.
11660 * configure.ac: Add a test for socklen_t. Use three-argument
11661 AC_DEFINE throughout.
11662 * config.in: Regenerated using autoheader 2.59.
11663 * configure: Regenerated.
11664
11665 * gdbreplay.c (socklen_t): Provide a default.
11666 (remote_open): Use socklen_t.
11667 * remote-utils.c (socklen_t): Provide a default.
11668 (remote_open): Use socklen_t.
11669 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
11670 unsigned char.
11671
11672 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
11673 char for buffers.
11674 * linux-low.c (linux_read_memory, linux_write_memory)
11675 (linux_read_auxv): Likewise.
11676 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
11677 (check_mem_write): Likewise.
11678 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
11679 Likewise.
11680 * regcache.c (struct inferior_rgcache_data, registers_to_string)
11681 (registers_from_string, register_data): Likewise.
11682 * server.c (handle_query, main): Likewise.
11683 * server.h (convert_ascii_to_int, convert_int_to_ascii)
11684 (decode_M_packet): Likewise.
11685 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
11686 * target.h (struct target_ops): Update read_memory, write_memory,
11687 and read_auxv.
11688 (read_inferior_memory, write_inferior_memory): Update.
11689 * linux-low.h (struct linux_target_ops): Change type of breakpoint
11690 to unsigned char *.
11691 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
11692 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
11693 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
11694 linux-s390-low.c, linux-sh-low.c: Update for changes in
11695 read_inferior_memory and the_low_target->breakpoint.
11696
eee84df1
DJ
116972005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
11698
11699 * Makefile.in (SFILES): Add linux-ppc64-low.c.
11700 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
11701 * configure.srv: Add powerpc64-*-linux*.
11702 * linux-ppc64-low.c: New file.
11703
45b134e5
OF
117042005-05-23 Orjan Friberg <orjanf@axis.com>
11705
11706 * linux-cris-low.c: New file with support for CRIS.
11707 * linux-crisv32-low.c: Ditto for CRISv32.
11708 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
11709 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 11710 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
11711 reg-crisv32.o, and reg-crisv32.c to make rules.
11712 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
11713 recognized targets.
11714
48d93c75
UW
117152005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
11716
11717 * linux-low.c (fetch_register): Ensure buffer size is a multiple
11718 of sizeof (PTRACE_XFER_TYPE).
11719 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
11720
e013ee27
OF
117212005-05-12 Orjan Friberg <orjanf@axis.com>
11722
889bf7c5 11723 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
11724 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
11725 pointers for hardware watchpoint support.
11726 * linux-low.h (struct linux_target_ops): Ditto.
11727 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
11728 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
11729 to linux_target_ops.
11730 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
11731 reply packet.
11732 * server.c (main): Recognize 'Z' and 'z' packets.
11733
b0ded00b
UW
117342005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
11735
11736 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
11737 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
11738 (the_low_target): Add new members.
11739
8643e2ad
DJ
117402005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
11741
11742 * proc-service.c (ps_lgetregs): Search all_processes instead of
11743 all_threads.
11744
fc620387
DJ
117452005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
11746
11747 * server.c (start_inferior): Change return type to int.
11748 (attach_inferior): Change sigptr to int *.
11749 (handle_v_cont, handle_v_requests): Change signal to int *.
11750 (main): Change signal to int.
11751
117522005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
11753
11754 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
11755 * configure.srv: Add m32r*-*-linux*.
11756 * linux-m32r-low.c: New file.
11757
e0e76420
DJ
117582005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
11759
11760 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
11761
a1928bad
DJ
117622005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
11763
11764 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
11765 Take unsigned long arguments for PIDs.
11766 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
11767 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
11768 (wait_for_sigstop, linux_resume_one_process)
11769 (regsets_fetch_inferior_registers, linux_send_signal)
11770 (linux_read_auxv): Likewise. Update the types of variables holding
11771 PIDs. Update format string specifiers.
11772 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
11773 * remote-utils.c (prepare_resume_reply): Likewise.
11774 * server.c (cont_thread, general_thread, step_thread)
11775 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
11776 unsigned long.
11777 (handle_query): Update format specifiers.
11778 (handle_v_cont, main): Use strtoul for thread IDs.
11779 * server.h (struct inferior_list_entry): Use unsigned long for ID.
11780 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
11781 (general_thread, step_thread, thread_from_wait)
11782 (old_thread_from_wait): Update.
11783 * target.h (struct thread_resume): Use unsigned long for THREAD.
11784 (struct target_ops): Use unsigned long for arguments to attach and
11785 thread_alive.
11786
dcdb98d2
DJ
117872005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
11788
11789 * acinclude.m4: Include bfd/bfd.m4 directly.
11790 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
11791 <agriffis@toolchain.org>.
11792 * aclocal.m4, configure: Regenerated.
11793
bec39cab
AC
117942005-01-07 Andrew Cagney <cagney@gnu.org>
11795
11796 * configure.ac: Rename configure.in, require autoconf 2.59.
11797 * configure: Re-generate.
11798
434c4c77
DJ
117992004-12-08 Daniel Jacobowitz <dan@debian.org>
11800
11801 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
11802 LIBS when finished.
11803 * aclocal.m4: Regenerated.
11804 * configure: Regenerated.
11805
db1d3e1b
AS
118062004-11-21 Andreas Schwab <schwab@suse.de>
11807
11808 * linux-m68k-low.c (m68k_num_gregs): Define.
11809 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
11810 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
11811 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
11812 (m68k_breakpoint_at): New. Add to the_low_target.
11813
11814 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
11815 srv_linux_thread_db to yes.
11816
43360365
JB
118172004-10-20 Joel Brobecker <brobecker@gnat.com>
11818
11819 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
11820 (ARCH_SET_FS): Likewise.
11821 (ARCH_GET_FS): Likewise.
11822 (ARCH_GET_GS): Likewise.
11823
fd500816
DJ
118242004-10-16 Daniel Jacobowitz <dan@debian.org>
11825
11826 * linux-i386-low.c (ps_get_thread_area): New.
11827 * linux-x86-64-low.c (ps_get_thread_area): New.
11828 * linux-low.c: Include <sys/syscall.h>.
11829 (linux_kill_one_process): Don't kill the first thread here.
11830 (linux_kill): Kill the first thread here.
11831 (kill_lwp): New function.
11832 (send_sigstop, linux_send_signal): Use it.
11833 * proc-service.c: Clean up #ifdefs.
11834 (fpregset_info): Delete.
11835 (ps_lgetregs): Update and enable implementation.
11836 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
11837 implementations.
11838 * remote-utils.c (struct sym_cache, symbol_cache): New.
11839 (input_interrupt): Print a clearer message.
11840 (async_io_enabled): New variable.
11841 (enable_async_io, disable_async_io): Use it. Update comments.
11842 (look_up_one_symbol): Use the symbol cache.
11843 * thread-db.c (thread_db_look_up_symbols): New function.
11844 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
11845
f6de3c42
DJ
118462004-10-16 Daniel Jacobowitz <dan@debian.org>
11847
11848 * configure.in: Test for -rdynamic.
11849 * configure: Regenerated.
11850 * Makefile (INTERNAL_LDFLAGS): New.
11851 (gdbserver, gdbreplay): Use it.
11852
2c0fc042
AC
118532004-09-02 Andrew Cagney <cagney@gnu.org>
11854
11855 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
11856
075b3282
DJ
118572004-03-23 Daniel Jacobowitz <drow@mvista.com>
11858
11859 * linux-low.c (linux_wait): Clear all_processes list also.
11860
fa6a77dc
DJ
118612004-03-12 Daniel Jacobowitz <drow@mvista.com>
11862
11863 * linux-low.c: Include <errno.h>. Remove extern declaration of
11864 errno.
11865
6d782a97
DJ
118662004-03-12 Daniel Jacobowitz <drow@mvista.com>
11867
11868 * gdbreplay.c, server.h, utils.c: Update copyright years.
11869
3a7fb99b
DJ
118702004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
11871
11872 * server.c (main): Print child status or termination signal from
11873 variable 'signal', not 'sig'.
11874
c3e735a6
DJ
118752004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
11876
11877 * linux-low.c (linux_read_memory): Change return type to
11878 int. Check for and return error from ptrace().
11879 * target.c (read_inferior_memory): Change return type to int. Pass
11880 back return status from the_target->read_memory().
11881 * target.h (struct target_ops): Adapt *read_memory() prototype.
11882 Update comment.
11883 (read_inferior_memory): Adapt prototype.
11884 * server.c (main): Return an error packet if
11885 read_inferior_memory() returns an error.
11886
a59d1c82
DJ
118872004-03-04 Daniel Jacobowitz <drow@mvista.com>
11888
11889 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
11890 Unify with other clean targets.
11891
dc3f8883
DJ
118922004-02-29 Daniel Jacobowitz <drow@mvista.com>
11893
11894 * server.c (handle_v_cont): Call set_desired_inferior.
11895
89a208da
DJ
118962004-02-29 Daniel Jacobowitz <drow@mvista.com>
11897
11898 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
11899
62ea82f5
DJ
119002004-02-29 Daniel Jacobowitz <drow@mvista.com>
11901
11902 * linux-low.c (linux_wait): Unblock async I/O.
11903 (linux_resume): Block and enable async I/O.
11904 * remote-utils.c (block_async_io, unblock_async_io): New functions.
11905 * server.h (block_async_io, unblock_async_io): Add prototypes.
11906
6910d122
DJ
119072004-02-29 Daniel Jacobowitz <drow@mvista.com>
11908
11909 * remote-utils.c (remote_open): Print a status notice after
11910 opening a TCP port.
11911 * server.c (attach_inferior): Print a status notice after
11912 attaching.
11913
119142004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
11915
11916 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
11917
c89dc5d4
DJ
119182004-02-26 Daniel Jacobowitz <drow@mvista.com>
11919
11920 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
11921 error packet.
11922 * server.c, target.h: Update copyright years.
11923
4b8dad4a
RM
119242004-02-25 Roland McGrath <roland@redhat.com>
11925
11926 * target.h (struct target_ops): New member `read_auxv'.
11927 * server.c (handle_query): Handle qPart:auxv:read: query using that.
11928 * linux-low.c (linux_read_auxv): New function.
11929 (linux_target_ops): Initialize `read_auxv' member to that.
11930
d7446758
JB
119312004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
11932
11933 Committed by Jim Blandy <jimb@redhat.com>.
11934
11935 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 11936 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
11937 instead of GPR_SIZE to distiguish s390 and s390x targets.
11938
5544ad89
DJ
119392004-01-31 Daniel Jacobowitz <drow@mvista.com>
11940
11941 * linux-low.c: Update copyright year.
11942 (check_removed_breakpoint): Clear pending_is_breakpoint.
11943 (linux_set_resume_request, linux_queue_one_thread)
11944 (resume_status_pending_p): New functions.
11945 (linux_continue_one_thread): Use process->resume.
11946 (linux_resume): Only resume threads if there are no pending events.
11947 * linux-low.h (struct process_info): Add resume request
11948 pointer.
11949
2a68b70e
DJ
119502004-01-30 Daniel Jacobowitz <drow@mvista.com>
11951
11952 * regcache.c (new_register_cache): Clear the allocated register
11953 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
11954
64386c31
DJ
119552003-10-13 Daniel Jacobowitz <drow@mvista.com>
11956
11957 * linux-low.c (linux_resume): Take a struct thread_resume *
11958 argument.
11959 (linux_wait): Update call.
11960 (resume_ptr): New static variable.
11961 (linux_continue_one_thread): Renamed from
11962 linux_continue_one_process. Use resume_ptr.
11963 (linux_resume): Use linux_continue_one_thread.
11964 * server.c (handle_v_cont, handle_v_requests): New functions.
11965 (myresume): New function.
11966 (main): Handle 'v' case.
11967 * target.h (struct thread_resume): New type.
11968 (struct target_ops): Change argument of "resume" to struct
11969 thread_resume *.
11970 (myresume): Delete macro.
11971
c938e9b0
L
119722003-08-08 H.J. Lu <hongjiu.lu@intel.com>
11973
11974 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
11975 (uninstall): Support DESTDIR.
11976
7f313d07
BC
11977Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
11978
11979 * configure.srv: Add xscale*linux copy of arm*linux entry.
11980
3b2fc2ea
DJ
119812003-07-24 Daniel Jacobowitz <drow@mvista.com>
11982
11983 * linux-arm-low.c (arm_reinsert_addr): New function.
11984 (the_low_target): Add arm_reinsert_addr.
11985
1c0a559e
MK
119862003-07-08 Mark Kettenis <kettenis@gnu.org>
11987
11988 * mem-break.c: Remove whitespace at end of file.
11989
43d5792c
DJ
119902003-06-28 Daniel Jacobowitz <drow@mvista.com>
11991
11992 * configure.in: Check whether we need to prototype strerror.
11993 * server.h: Optionally prototype strerror.
11994 * gdbreplay.c (perror_with_name): Use strerror.
11995 * linux-low.c (linux_attach_lwp): Use strerror.
11996 * utils.c (perror_with_name): Use strerror.
11997 * config.in, configure: Regenerated.
11998
c8a86edf
DJ
119992003-06-28 Daniel Jacobowitz <drow@mvista.com>
12000
12001 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
12002 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
12003
73d37363
DJ
120042003-06-20 Daniel Jacobowitz <drow@mvista.com>
12005
12006 * Makefile.in (SFILES): Update.
12007 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
12008 low-sun3.c: Remove files.
12009
6ad8ae5c
DJ
120102003-06-17 Daniel Jacobowitz <drow@mvista.com>
12011
12012 * linux-low.c: Move comment to linux_thread_alive where it belonged.
12013 (linux_detach_one_process, linux_detach): New functions.
12014 (linux_target_ops): Add linux_detach.
12015 * server.c (main): Handle 'D' packet.
12016 * target.h (struct target_ops): Add "detach" member.
12017 (detach_inferior): Define.
12018
1581182a
MK
120192003-06-13 Mark Kettenis <kettenis@gnu.org>
12020
12021 From Kelley Cook <kelleycook@wideopenwest.com>:
12022 * configure.srv: Accept i[34567]86 variants.
12023
e5379b03
DJ
120242003-06-05 Daniel Jacobowitz <drow@mvista.com>
12025
12026 * linux-low.c (linux_wait_for_event): Correct comment typos.
12027 (linux_resume_one_process): Call check_removed_breakpoint.
12028 (linux_send_signal): New function.
12029 (linux_target_ops): Add linux_send_signal.
12030 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
12031 of kill.
12032 * target.h (struct target_ops): Add send_signal.
12033
2ff29de4
JB
120342003-05-29 Jim Blandy <jimb@redhat.com>
12035
12036 * linux-low.c (usr_store_inferior_registers): Transfer buf in
12037 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
12038 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
12039 away part of the register's value.
12040
254787d4
DJ
120412003-03-26 Daniel Jacobowitz <drow@mvista.com>
12042
12043 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
12044 (linux_wait_for_event, linux_init_signals): Likewise.
12045
94e10508
DJ
120462003-03-17 Daniel Jacobowitz <drow@mvista.com>
12047
12048 * configure.in: Check for stdlib.h.
12049 * configure: Regenerated.
12050 * config.in: Regenerated.
12051
4c0711e0
DJ
120522003-01-04 Andreas Schwab <schwab@suse.de>
12053
12054 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
12055
ef66e766
AC
120562003-01-02 Andrew Cagney <ac131313@redhat.com>
12057
12058 * Makefile.in: Remove obsolete code.
12059
a1358604
DJ
120602002-11-20 Daniel Jacobowitz <drow@mvista.com>
12061
12062 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
12063 defined(PT_FPR0_HI).
12064
23ce3b1c
DJ
120652002-11-17 Stuart Hughes <seh@zee2.com>
12066
12067 * linux-arm-low.c (arm_num_regs): Increase.
12068 (arm_regmap): Include status register.
12069
120702002-11-17 Daniel Jacobowitz <drow@mvista.com>
12071
12072 * linux-low.c (register_addr): Remove incorrect -1 check.
12073
a9fa9f7d
DJ
120742002-08-29 Daniel Jacobowitz <drow@mvista.com>
12075
12076 * linux-low.c (linux_create_inferior): Call setpgid. Return
12077 the new PID.
12078 (unstopped_p, linux_signal_pid): Remove.
12079 (linux_target_ops): Remove linux_signal_pid.
12080 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
12081 global instead of target method.
12082 * target.h (struct target_ops): Remove signal_pid. Update comment
12083 for create_inferior.
12084 * server.c (signal_pid): New variable.
12085 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 12086 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
12087 (attach_inferior): Set signal_pid.
12088
17574093
DJ
120892002-08-23 Daniel Jacobowitz <drow@mvista.com>
12090
12091 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
12092
120932002-08-20 Jim Blandy <jimb@redhat.com>
12094
12095 * Makefile.in (LDFLAGS): Allow the configure script to establish a
12096 default for this.
12097
120982002-08-01 Andrew Cagney <cagney@redhat.com>
12099
12100 * Makefile.in: Make chill references obsolete.
12101
121022002-07-24 Kevin Buettner <kevinb@redhat.com>
12103
12104 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
12105 * configure: Regenerate.
12106 * config.in: Regenerate.
12107
121082002-07-09 David O'Brien <obrien@FreeBSD.org>
12109
12110 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
12111 (perror_with_name, remote_close, remote_open, expect, play): Static.
12112
121132002-07-04 Michal Ludvig <mludvig@suse.cz>
12114
4b8dad4a 12115 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
12116 byte offsets instead of an array of indexes.
12117 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
12118
121192002-06-13 Daniel Jacobowitz <drow@mvista.com>
12120
12121 * regcache.c: Add comment.
12122
121232002-06-11 Daniel Jacobowitz <drow@mvista.com>
12124
12125 * thread-db.c: New file.
12126 * proc-service.c: New file.
12127 * acinclude.m4: New file.
12128 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
12129 proc-service.o, and thread-db.o.
12130 (linux-low.o): Add USE_THREAD_DB.
12131 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
12132 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
12133 * aclocal.m4: Regenerated.
12134 * config.in: Regenerated.
12135 * configure: Regenerated.
12136 * configure.in: Check for proc_service.h, sys/procfs.h,
12137 thread_db.h, and linux/elf.h headrs.
12138 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
12139 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
12140 Check for -lthread_db and thread support.
12141 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
12142 PowerPC, and SuperH.
12143 * i387-fp.c: Constify arguments.
12144 * i387-fp.h: Likewise.
12145 * inferiors.c: (struct thread_info): Renamed from
12146 `struct inferior_info'. Remove PID member. Use generic inferior
12147 list header. All uses updated.
12148 (inferiors, signal_pid): Removed.
12149 (all_threads): New variable.
12150 (get_thread): Define.
12151 (add_inferior_to_list): New function.
12152 (for_each_inferior): New function.
12153 (change_inferior_id): New function.
12154 (add_inferior): Removed.
12155 (remove_inferior): New function.
12156 (add_thread): New function.
12157 (free_one_thread): New function.
12158 (remove_thread): New function.
12159 (clear_inferiors): Use for_each_inferior and free_one_thread.
12160 (find_inferior): New function.
12161 (find_inferior_id): New function.
12162 (inferior_target_data): Update argument type.
12163 (set_inferior_target_data): Likewise.
12164 (inferior_regcache_data): Likewise.
12165 (set_inferior_regcache_data): Likewise.
12166 * linux-low.c (linux_bp_reinsert): Remove.
12167 (all_processes, stopping_threads, using_thrads)
12168 (struct pending_signals, debug_threads, pid_of): New.
12169 (inferior_pid): Replace with macro.
12170 (struct inferior_linux_data): Remove.
12171 (get_stop_pc, add_process): New functions.
12172 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
12173 Use add_process and add_thread.
12174 (linux_attach_lwp): New function, based on old linux_attach. Use
12175 add_process and add_thread. Set stop_expected for new threads.
12176 (linux_attach): New function.
12177 (linux_kill_one_process): New function.
12178 (linux_kill): Kill all LWPs.
12179 (linux_thread_alive): Use find_inferior_id.
12180 (check_removed_breakpoints, status_pending_p): New functions.
12181 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
12182 Update. Use WNOHANG. Wait for cloned processes also. Update process
12183 struct for the found process.
12184 (linux_wait_for_event): New function.
12185 (linux_wait): Use it. Support LWPs.
12186 (send_sigstop, wait_for_sigstop, stop_all_processes)
12187 (linux_resume_one_process, linux_continue_one_process): New functions.
12188 (linux_resume): Support LWPs.
12189 (REGISTER_RAW_SIZE): Remove.
12190 (fetch_register): Use register_size instead. Call supply_register.
12191 (usr_store_inferior_registers): Likewise. Call collect_register.
12192 Fix recursive case.
12193 (regsets_fetch_inferior_registers): Improve error message.
12194 (regsets_store_inferior_registers): Add debugging.
12195 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
12196 (unstopped_p, linux_signal_pid): New functions.
12197 (linux_target_ops): Add linux_signal_pid.
12198 (linux_init_signals): New function.
12199 (initialize_low): Call it. Initialize using_threads.
12200 * regcache.c (inferior_regcache_data): Add valid
12201 flag.
12202 (get_regcache): Fetch registers lazily. Add fetch argument
12203 and update all callers.
12204 (regcache_invalidate_one, regcache_invalidate): New
12205 functions.
12206 (new_register_cache): Renamed from create_register_cache.
12207 Return the new regcache.
12208 (free_register_cache): Change argument to a void *.
12209 (registers_to_string, registers_from_string): Call get_regcache
12210 with fetch flag set.
12211 (register_data): Make static. Pass fetch flag to get_regcache.
12212 (supply_register): Call get_regcache with fetch flag clear.
12213 (collect_register): Call get_regcache with fetch flag set.
12214 (collect_register_as_string): New function.
12215 * regcache.h: Update.
12216 * remote-utils.c (putpkt): Flush after debug output and use
12217 stderr.
12218 Handle input interrupts while waiting for an ACK.
12219 (input_interrupt): Use signal_pid method.
12220 (getpkt): Flush after debug output and use stderr.
12221 (outreg): Use collect_register_as_string.
12222 (new_thread_notify, dead_thread_notify): New functions.
12223 (prepare_resume_reply): Check using_threads. Set thread_from_wait
12224 and general_thread.
12225 (look_up_one_symbol): Flush after debug output.
12226 * server.c (step_thread, server_waiting): New variables.
12227 (start_inferior): Don't use signal_pid. Update call to mywait.
12228 (attach_inferior): Update call to mywait.
12229 (handle_query): Handle qfThreadInfo and qsThreadInfo.
12230 (main): Don't fetch/store registers explicitly. Use
12231 set_desired_inferior. Support proposed ``Hs'' packet. Update
12232 calls to mywait.
12233 * server.h: Update.
12234 (struct inferior_list, struct_inferior_list_entry): New.
12235 * target.c (set_desired_inferior): New.
12236 (write_inferior_memory): Constify.
12237 (mywait): New function.
12238 * target.h: Update.
12239 (struct target_ops): New signal_pid method.
12240 (mywait): Removed macro, added prototype.
12241
12242 * linux-low.h (regset_func): Removed.
12243 (regset_fill_func, regset_store_func): New.
12244 (enum regset_type): New.
12245 (struct regset_info): Add type field. Use new operation types.
12246 (struct linux_target_ops): stop_pc renamed to get_pc.
12247 Add decr_pc_after_break and breakpoint_at.
12248 (get_process, get_thread_proess, get_process_thread)
12249 (strut process_info, all_processes, linux_attach_lwp)
12250 (thread_db_init): New.
12251
12252 * linux-arm-low.c (arm_get_pc, arm_set_pc,
12253 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
12254 (the_low_target): Add new members.
12255 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
12256 (i386_store_fpxregset): Constify.
12257 (target_regsets): Add new kind identifier.
12258 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
12259 (i386_set_pc): Add debugging.
12260 (i386_breakpoint_at): New function.
12261 (the_low_target): Add new members.
12262 * linux-mips-low.c (mips_get_pc, mips_set_pc)
12263 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
12264 (mips_breakpoint_at): New.
12265 (the_low_target): Add new members.
12266 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
12267 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
12268 (the_low_target): Add new members.
12269 * linux-sh-low.c (sh_get_pc, sh_set_pc)
12270 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
12271 (the_low_target): Add new members.
12272 * linux-x86-64-low.c (target_regsets): Add new kind
12273 identifier.
12274
122752002-05-15 Daniel Jacobowitz <drow@mvista.com>
12276
12277 From Martin Pool <mbp@samba.org>:
12278 * server.c (gdbserver_usage): New function.
12279 (main): Call it.
12280
122812002-05-14 Daniel Jacobowitz <drow@mvista.com>
12282
12283 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
12284 stop_at -> stop_pc.
12285
122862002-05-04 Andrew Cagney <ac131313@redhat.com>
12287
12288 * Makefile.in: Remove obsolete code.
12289
122902002-04-24 Michal Ludvig <mludvig@suse.cz>
12291
12292 * linux-low.c (regsets_fetch_inferior_registers),
12293 (regsets_store_inferior_registers): Removed cast to int from
12294 ptrace() calls.
12295 * regcache.h: Added declaration of struct inferior_info.
12296
122972002-04-20 Daniel Jacobowitz <drow@mvista.com>
12298
12299 * inferiors.c (struct inferior_info): Add regcache_data.
12300 (add_inferior): Call create_register_cache.
12301 (clear_inferiors): Call free_register_cache.
12302 (inferior_regcache_data, set_inferior_regcache_data): New functions.
12303 * regcache.c (struct inferior_regcache_data): New.
12304 (registers): Remove.
12305 (get_regcache): New function.
12306 (create_register_cache, free_register_cache): New functions.
12307 (set_register_cache): Don't initialize the register cache here.
12308 (registers_to_string, registers_from_string, register_data): Call
12309 get_regcache.
12310 * regcache.h: Add prototypes.
12311 * server.h: Likewise.
12312
123132002-04-20 Daniel Jacobowitz <drow@mvista.com>
12314
12315 * mem-break.c: New file.
12316 * mem-break.h: New file.
12317 * Makefile.in: Add mem-break.o rule; update server.h
12318 dependencies.
12319 * inferiors.c (struct inferior_info): Add target_data
12320 member.
12321 (clear_inferiors): Free target_data member if set.
12322 (inferior_target_data, set_inferior_target_data): New functions.
12323 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
12324 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
12325 * linux-low.c (linux_bp_reinsert): New variable.
12326 (struct inferior_linux_data): New.
12327 (linux_create_inferior): Use set_inferior_target_data.
12328 (linux_attach): Likewise. Call add_inferior.
12329 (linux_wait_for_one_inferior): New function.
12330 (linux_wait): Call it.
12331 (linux_write_memory): Add const.
12332 (initialize_low): Call set_breakpoint_data.
12333 * linux-low.h (struct linux_target_ops): Add breakpoint
12334 handling members.
12335 * server.c (attach_inferior): Remove extra add_inferior
12336 call.
12337 * server.h: Include mem-break.h. Update inferior.c
12338 prototypes.
12339 * target.c (read_inferior_memory)
12340 (write_inferior_memory): New functions.
12341 * target.h (read_inferior_memory)
12342 (write_inferior_memory): Change macros to prototypes.
12343 (struct target_ops): Update comments. Add const to write_memory
12344 definition.
12345
123462002-04-11 Daniel Jacobowitz <drow@mvista.com>
12347
12348 * linux-low.c (usr_store_inferior_registers): Support
12349 registers which are allowed to fail to store.
12350 * linux-low.h (linux_target_ops): Likewise.
12351 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
12352 (ppc_cannot_store_register): FPSCR may not be storable.
12353
123542002-04-09 Daniel Jacobowitz <drow@mvista.com>
12355
12356 * server.h: Include <string.h> if HAVE_STRING_H.
12357 * ChangeLog: Correct paths in last ChangeLog entry.
12358
123592002-04-09 Daniel Jacobowitz <drow@mvista.com>
12360
12361 * linux-low.h: Remove obsolete prototypes.
12362 (struct linux_target_ops): New.
12363 (extern the_low_target): New.
12364 * linux-low.c (num_regs, regmap): Remove declarations.
12365 (register_addr): Use the_low_target explicitly.
12366 (fetch_register): Likewise.
12367 (usr_fetch_inferior_registers): Likewise.
12368 (usr_store_inferior_registers): Likewise.
12369 * linux-arm-low.c (num_regs): Remove.
12370 (arm_num_regs): Define.
12371 (arm_regmap): Renamed from regmap, made static.
12372 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
12373 made static.
12374 (arm_cannot_store_register): Renamed from cannot_store_register,
12375 made static.
12376 (the_low_target): New.
12377 * linux-i386-low.c (num_regs): Remove.
12378 (i386_num_regs): Define.
12379 (i386_regmap): Renamed from regmap, made static.
12380 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
12381 made static.
12382 (i386_cannot_store_register): Renamed from cannot_store_register,
12383 made static.
12384 (the_low_target): New.
12385 * linux-ia64-low.c (num_regs): Remove.
12386 (ia64_num_regs): Define.
12387 (ia64_regmap): Renamed from regmap, made static.
12388 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
12389 made static.
12390 (ia64_cannot_store_register): Renamed from cannot_store_register,
12391 made static.
12392 (the_low_target): New.
12393 * linux-m68k-low.c (num_regs): Remove.
12394 (m68k_num_regs): Define.
12395 (m68k_regmap): Renamed from regmap, made static.
12396 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
12397 made static.
12398 (m68k_cannot_store_register): Renamed from cannot_store_register,
12399 made static.
12400 (the_low_target): New.
12401 * linux-mips-low.c (num_regs): Remove.
12402 (mips_num_regs): Define.
12403 (mips_regmap): Renamed from regmap, made static.
12404 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
12405 made static.
12406 (mips_cannot_store_register): Renamed from cannot_store_register,
12407 made static.
12408 (the_low_target): New.
12409 * linux-ppc-low.c (num_regs): Remove.
12410 (ppc_num_regs): Define.
12411 (ppc_regmap): Renamed from regmap, made static.
12412 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
12413 made static.
12414 (ppc_cannot_store_register): Renamed from cannot_store_register,
12415 made static.
12416 (the_low_target): New.
12417 * linux-s390-low.c (num_regs): Remove.
12418 (s390_num_regs): Define.
12419 (s390_regmap): Renamed from regmap, made static.
12420 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
12421 made static.
12422 (s390_cannot_store_register): Renamed from cannot_store_register,
12423 made static.
12424 (the_low_target): New.
12425 * linux-sh-low.c (num_regs): Remove.
12426 (sh_num_regs): Define.
12427 (sh_regmap): Renamed from regmap, made static.
12428 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
12429 made static.
12430 (sh_cannot_store_register): Renamed from cannot_store_register,
12431 made static.
12432 (the_low_target): New.
12433 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
12434 (the_low_target): New.
12435
124362002-04-09 Daniel Jacobowitz <drow@mvista.com>
12437
12438 * Makefile.in: Add stamp-h target.
12439 * configure.in: Create stamp-h.
12440 * configure: Regenerated.
12441
124422002-04-09 Daniel Jacobowitz <drow@mvista.com>
12443
12444 * inferiors.c: New file.
12445 * target.c: New file.
12446 * target.h: New file.
12447 * Makefile.in: Add target.o and inferiors.o. Update
12448 dependencies.
12449 * linux-low.c (inferior_pid): New static variable,
12450 moved from server.c.
12451 (linux_create_inferior): Renamed from create_inferior.
12452 Call add_inferior. Return 0 on success instead of a PID.
12453 (linux_attach): Renamed from myattach.
12454 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
12455 (linux_thread_alive): Renamed from mythread_alive.
12456 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
12457 child dies.
12458 (linux_resume): Renamed from myresume. Add missing ``return 0''.
12459 (regsets_store_inferior_registers): Correct error message.
12460 Add missing ``return 0''.
12461 (linux_fetch_registers): Renamed from fetch_inferior_registers.
12462 (linux_store_registers): Renamed from store_inferior_registers.
12463 (linux_read_memory): Renamed from read_inferior_memory.
12464 (linux_write_memory): Renamed from write_inferior_memory.
12465 (linux_target_ops): New structure.
12466 (initialize_low): Call set_target_ops ().
12467 * remote-utils.c (unhexify): New function.
12468 (hexify): New function.
12469 (input_interrupt): Send signals to ``signal_pid''.
12470 * server.c (inferior_pid): Remove.
12471 (start_inferior): Update create_inferior call.
12472 (attach_inferior): Call add_inferior.
12473 (handle_query): New function.
12474 (main): Call handle_query for `q' packets.
12475 * server.h: Include "target.h". Remove obsolete prototypes.
12476 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
12477
124782002-04-09 Daniel Jacobowitz <drow@mvista.com>
12479
12480 * Makefile.in: Add WARN_CFLAGS. Update configury
12481 dependencies.
12482 * configure.in: Check for <string.h>
12483 * configure: Regenerate.
12484 * config.in: Regenerate.
12485 * gdbreplay.c: Include needed system headers.
12486 (remote_open): Remove strchr prototype.
12487 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
12488 * regcache.c (supply_register): Change buf argument to const void *.
12489 (supply_register_by_name): Likewise.
12490 (collect_register): Change buf argument to void *.
12491 (collect_register_by_name): Likewise.
12492 * regcache.h: Add missing prototypes.
12493 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
12494 * server.c (handle_query): New function.
12495 (attached): New static variable, moved out of main.
12496 (main): Quiet longjmp clobber warnings.
12497 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
12498 * utils.c (error): Remove NORETURN.
12499 (fatal): Likewise.