include/elf/
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
6bd31874
JB
12010-07-07 Joel Brobecker <brobecker@adacore.com>
2
3 * server.c (handle_v_cont): Call mourn_inferior if process
4 just exited.
5 (myresume): Likewise.
6
0fb4aa4b
PA
72010-07-01 Pedro Alves <pedro@codesourcery.com>
8
9 Static tracepoints, and integration with UST.
10
11 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
12 * mem-break.c (uninsert_all_breakpoints)
13 (reinsert_all_breakpoints): New.
14 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
15 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
16 (gdb_agent_ust_loaded, helper_thread_id)
17 (gdb_agent_helper_thread_id): New macros.
18 (struct ipa_sym_addresses): Add addr_ust_loaded,
19 addr_helper_thread_id, addr_cmd_buf.
20 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
21 (in_process_agent_loaded_ust): New.
22 (write_e_ust_not_loaded): New.
23 (maybe_write_ipa_ust_not_loaded): New.
24 (struct collect_static_trace_data_action): New.
25 (enum tracepoint_type) <static_tracepoint>: New.
26 (struct tracepoint) <handle>: Mention static tracepoints.
27 (struct static_tracepoint_ctx): New.
28 (CMD_BUF_SIZE): New.
29 (add_tracepoint_action): Handle static tracepoint actions.
30 (unprobe_marker_at): New.
31 (clear_installed_tracepoints): Handle static tracepoints.
32 (cmd_qtdp): Handle static tracepoints.
33 (probe_marker_at): New.
34 (cmd_qtstart): Handle static tracepoints.
35 (response_tracepoint): Handle static tracepoints.
36 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
37 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
38 (get_context_regcache): Handle static tracepoints.
39 (do_action_at_tracepoint): Handle static tracepoint actions.
40 (traceframe_find_block_type): Handle static trace data blocks.
41 (traceframe_read_sdata): New.
42 (download_tracepoints): Download static tracepoint actions.
43 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
44 (GDB_PROBE_NAME): New.
45 (ust_ops): New.
46 (GET_UST_SYM): New.
47 (USTF): New.
48 (dlsym_ust): New.
49 (ust_marker_to_static_tracepoint): New.
50 (gdb_probe): New.
51 (collect_ust_data_at_tracepoint): New.
52 (gdb_ust_probe): New.
53 (UNIX_PATH_MAX, SOCK_DIR): New.
54 (gdb_ust_connect_sync_socket): New.
55 (resume_thread, stop_thread): New.
56 (run_inferior_command): New.
57 (init_named_socket): New.
58 (gdb_ust_socket_init): New.
59 (cstr_to_hexstr): New.
60 (next_st): New.
61 (first_marker, next_marker): New.
62 (response_ust_marker): New.
63 (cmd_qtfstm, cmd_qtsstm): New.
64 (unprobe_marker_at, probe_marker_at): New.
65 (cmd_qtstmat, gdb_ust_thread): New.
66 (gdb_ust_init): New.
67 (initialize_tracepoint_ftlib): Call gdb_ust_init.
68 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
69 (ST_REGENTRY): New.
70 (x86_64_st_collect_regmap): New.
71 (X86_64_NUM_ST_COLLECT_GREGS): New.
72 (AMD64_RIP_REGNUM): New.
73 (supply_static_tracepoint_registers): New.
74 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
75 (ST_REGENTRY): New.
76 (i386_st_collect_regmap): New.
77 (i386_NUM_ST_COLLECT_GREGS): New.
78 (supply_static_tracepoint_registers): New.
79 * server.c (handle_query): Handle qXfer:statictrace:read.
80 <qSupported>: Report support for StaticTracepoints, and
81 qXfer:statictrace:read features.
82 * server.h (traceframe_read_sdata)
83 (supply_static_tracepoint_registers): Declare.
84 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
85 (unpack_varlen_hex): Include in IPA build.
86 * Makefile.in (ustlibs, ustinc): New.
87 (IPA_OBJS): Add remote-utils-ipa.o.
88 ($(IPA_LIB)): Link -ldl and -lpthread.
89 (UST_CFLAGS): New.
90 (IPAGENT_CFLAGS): Add UST_CFLAGS.
91 * config.in, configure: Regenerate.
92
9e4344e5
PA
932010-06-20 Ian Lance Taylor <iant@google.com>
94 Pedro Alves <pedro@codesourcery.com>
95
96 * linux-x86-low.c (always_true): Delete.
97 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
98 trying to fool the compiler with always_true.
99
c6beb2cb
PA
1002010-06-20 Pedro Alves <pedro@codesourcery.com>
101
102 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
103 conditions in gdbserver.
104
d2ed6730
UW
1052010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
106
107 * spu-low.c (spu_read_memory): Wrap around local store limit.
108 (spu_write_memory): Likewise.
109
4e29fb54
PA
1102010-06-15 Pedro Alves <pedro@codesourcery.com>
111
112 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
113 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
114 LONGEST uses.
115 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
116 uses.
117 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
118 uses with LONGEST uses.
119
6a271cae
PA
1202010-06-14 Stan Shebs <stan@codesourcery.com>
121 Pedro Alves <pedro@codesourcery.com>
122
123 Bytecode compiler.
124
125 * linux-x86-low.c: Include limits.h.
126 (add_insns): New.
127 (always_true): New.
128 (EMIT_ASM): New.
129 (EMIT_ASM32): New.
130 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
131 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
132 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
133 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
134 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
135 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
136 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
137 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
138 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
139 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
140 (amd64_emit_void_call_2): New.
141 (amd64_emit_ops): New.
142 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
143 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
144 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
145 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
146 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
147 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
148 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
149 (i386_emit_call, i386_emit_reg, i386_emit_pop)
150 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
151 (i386_emit_stack_adjust, i386_emit_int_call_1)
152 (i386_emit_void_call_2): New.
153 (i386_emit_ops): New.
154 (x86_emit_ops): New.
155 (the_low_target): Install x86_emit_ops.
156 * server.h (struct emit_ops): New.
157 (get_raw_reg_func_addr): Declare.
158 (current_insn_ptr, emit_error): Declare.
159 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
160 (set_trace_state_variable_value): New defines.
161 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
162 addr_get_trace_state_variable_value and
163 addr_set_trace_state_variable_value.
164 (symbol_list): New fields for get_raw_reg,
165 get_trace_state_variable_value and set_trace_state_variable_value.
166 (condfn): New typedef.
167 (struct tracepoint): New field `compiled_cond'.
168 (do_action_at_tracepoint): Clear compiled_cond.
169 (get_trace_state_variable_value, set_trace_state_variable_value):
170 Export in the IPA.
171 (condition_true_at_tracepoint): If there's a compiled condition,
172 run that.
173 (current_insn_ptr, emit_error): New globals.
174 (struct bytecode_address): New.
175 (get_raw_reg_func_addr): New.
176 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
177 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
178 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
179 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
180 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
181 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
182 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
183 (compile_tracepoint_condition, compile_bytecodes): New.
184 * target.h (emit_ops): Forward declare.
185 (struct target_ops): New field emit_ops.
186 (target_emit_ops): New.
187 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
188 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
189 * linux-low.c (linux_emit_ops): New.
190 (linux_target_ops): Install it.
191 * linux-low.h (struct linux_target_ops): New field emit_ops.
192
92b72907
UW
1932010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
194
195 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
196 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
197
fa593d66
PA
1982010-06-01 Pedro Alves <pedro@codesourcery.com>
199 Stan Shebs <stan@codesourcery.com>
200
201 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
202 (all): Depend on $(extra_libraries).
203 (install-only): Install the IPA.
204 (IPA_OBJS, IPA_LIB): New.
205 (clean): Remove the IPA lib.
206 (IPAGENT_CFLAGS): New.
207 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
208 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
209 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
210 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
211 * configure.ac: Check for atomic builtins support in the compiler.
212 (IPA_DEPFILES, extra_libraries): Define.
213 * configure.srv (ipa_obj): Add description.
214 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
215 (i[34567]86-*-linux*): Set ipa_obj.
216 (x86_64-*-linux*): Set ipa_obj.
217 * linux-low.c (stabilizing_threads): New.
218 (supports_fast_tracepoints): New.
219 (linux_detach): Stabilize threads before detaching.
220 (handle_tracepoints): Handle internal tracing breakpoints. Assert
221 the lwp is either not stabilizing, or is moving out of a jump pad.
222 (linux_fast_tracepoint_collecting): New.
223 (maybe_move_out_of_jump_pad): New.
224 (enqueue_one_deferred_signal): New.
225 (dequeue_one_deferred_signal): New.
226 (linux_wait_for_event_1): If moving out of a jump pad, defer
227 pending signals to later.
228 (linux_stabilize_threads): New.
229 (linux_wait_1): Check if threads need moving out of jump pads, and
230 do it if so.
231 (stuck_in_jump_pad_callback): New.
232 (move_out_of_jump_pad_callback): New.
233 (lwp_running): New.
234 (linux_resume_one_lwp): Handle moving out of jump pads.
235 (linux_set_resume_request): Dequeue deferred signals.
236 (need_step_over_p): Also step over fast tracepoint jumps.
237 (start_step_over): Also uninsert fast tracepoint jumps.
238 (finish_step_over): Also reinsert fast tracepoint jumps.
239 (linux_install_fast_tracepoint_jump): New.
240 (linux_target_ops): Install linux_stabilize_threads and
241 linux_install_fast_tracepoint_jump_pad.
242 * linux-low.h (linux_target_ops) <get_thread_area,
243 install_fast_tracepoint_jump_pad>: New fields.
244 (struct lwp_info) <collecting_fast_tracepoint,
245 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
246 (linux_get_thread_area): Declare.
247 * linux-x86-low.c (jump_insn): New.
248 (x86_get_thread_area): New.
249 (append_insns): New.
250 (push_opcode): New.
251 (amd64_install_fast_tracepoint_jump_pad): New.
252 (i386_install_fast_tracepoint_jump_pad): New.
253 (x86_install_fast_tracepoint_jump_pad): New.
254 (the_low_target): Install x86_get_thread_area and
255 x86_install_fast_tracepoint_jump_pad.
256 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
257 (struct fast_tracepoint_jump): New.
258 (fast_tracepoint_jump_insn): New.
259 (fast_tracepoint_jump_shadow): New.
260 (find_fast_tracepoint_jump_at): New.
261 (fast_tracepoint_jump_here): New.
262 (delete_fast_tracepoint_jump): New.
263 (set_fast_tracepoint_jump): New.
264 (uninsert_fast_tracepoint_jumps_at): New.
265 (reinsert_fast_tracepoint_jumps_at): New.
266 (set_breakpoint_at): Use write_inferior_memory.
267 (uninsert_raw_breakpoint): Use write_inferior_memory.
268 (check_mem_read): Mask out fast tracepoint jumps.
269 (check_mem_write): Mask out fast tracepoint jumps.
270 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
271 (set_fast_tracepoint_jump): Declare.
272 (delete_fast_tracepoint_jump)
273 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
274 (reinsert_fast_tracepoint_jumps_at): Declare.
275 * regcache.c: Don't compile many functions when building the
276 in-process agent library.
277 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
278 the register buffer in the heap.
279 (free_register_cache): If the register buffer isn't owned by the
280 regcache, don't free it.
281 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
282 pre-existing register caches.
283 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
284 type.
285 (convert_ascii_to_int): : Constify `from' parameter type.
286 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
287 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
288 the needed buffer in-place.
289 (relocate_instruction): New.
290 * server.c (handle_query) <qSymbols>: If the target supports
291 tracepoints, give it a chance of looking up symbols. Report
292 support for fast tracepoints.
293 (handle_status): Stabilize threads.
294 (process_serial_event): Adjust.
295 * server.h (struct fast_tracepoint_jump): Forward declare.
296 (struct process_info) <fast_tracepoint_jumps>: New field.
297 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
298 (decode_X_packet, decode_M_packet): Adjust.
299 (relocate_instruction): Declare.
300 (in_process_agent_loaded): Declare.
301 (tracepoint_look_up_symbols): Declare.
302 (struct fast_tpoint_collect_status): Declare.
303 (fast_tracepoint_collecting): Declare.
304 (force_unlock_trace_buffer): Declare.
305 (handle_tracepoint_bkpts): Declare.
306 (initialize_low_tracepoint)
307 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
308 * target.h (struct target_ops) <stabilize_threads,
309 install_fast_tracepoint_jump_pad>: New fields.
310 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
311 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
312 [HAVE_STDINT_H]: Include stdint.h.
313 (trace_debug_1): Rename to ...
314 (trace_vdebug): ... this.
315 (trace_debug): Rename to ...
316 (trace_debug_1): ... this. Add `level' parameter.
317 (trace_debug): New.
318 (ATTR_USED, ATTR_NOINLINE): New.
319 (IP_AGENT_EXPORT): New.
320 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
321 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
322 (about_to_request_buffer_space, trace_buffer_is_full)
323 (stopping_tracepoint, expr_eval_result, error_tracepoint)
324 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
325 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
326 (traceframe_write_count, traceframes_created)
327 (trace_state_variables)
328 New renaming defines.
329 (struct ipa_sym_addresses): New.
330 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
331 (symbol_list): New.
332 (ipa_sym_addrs): New.
333 (all_tracepoint_symbols_looked_up): New.
334 (in_process_agent_loaded): New.
335 (write_e_ipa_not_loaded): New.
336 (maybe_write_ipa_not_loaded): New.
337 (tracepoint_look_up_symbols): New.
338 (debug_threads) [IN_PROCESS_AGENT]: New.
339 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
340 (UNKNOWN_SIDE_EFFECTS): New.
341 (stop_tracing): New.
342 (flush_trace_buffer): New.
343 (stop_tracing_bkpt): New.
344 (flush_trace_buffer_bkpt): New.
345 (read_inferior_integer): New.
346 (read_inferior_uinteger): New.
347 (read_inferior_data_pointer): New.
348 (write_inferior_data_pointer): New.
349 (write_inferior_integer): New.
350 (write_inferior_uinteger): New.
351 (struct collect_static_trace_data_action): Delete.
352 (enum tracepoint_type): New.
353 (struct tracepoint) <type>: New field `type'.
354 <actions_str, step_actions, step_actions_str>: Only include in GDBserver.
355 <orig_size, obj_addr_on_target, adjusted_insn_addr>
356 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
357 (tracepoints): Use IP_AGENT_EXPORT.
358 (last_tracepoint): Don't include in the IPA.
359 (stopping_tracepoint): Use IP_AGENT_EXPORT.
360 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
361 (alloced_trace_state_variables): New.
362 (trace_state_variables): Use IP_AGENT_EXPORT.
363 (traceframe_t): Delete unused variable.
364 (circular_trace_buffer): Don't include in the IPA.
365 (trace_buffer_start): Delete.
366 (struct trace_buffer_control): New.
367 (trace_buffer_free): Delete.
368 (struct ipa_trace_buffer_control): New.
369 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
370 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
371 New.
372 (trace_buffer_ctrl): New.
373 (TRACE_BUFFER_CTRL_CURR): New.
374 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
375 Reimplement as macros.
376 (trace_buffer_wrap): Delete.
377 (traceframe_write_count, traceframe_read_count)
378 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
379 (struct tracepoint_hit_ctx) <type>: New field.
380 (struct fast_tracepoint_ctx): New.
381 (memory_barrier): New.
382 (cmpxchg): New.
383 (record_tracepoint_error): Update atomically in the IPA.
384 (clear_inferior_trace_buffer): New.
385 (about_to_request_buffer_space): New.
386 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
387 updating the same buffer.
388 (add_tracepoint): Default the tracepoint's type to trap
389 tracepoint, and orig_size to -1.
390 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
391 internal variables.
392 (create_trace_state_variable): New parameter `gdb'. Handle it.
393 (clear_installed_tracepoints): Clear fast tracepoint jumps.
394 (cmd_qtdp): Handle fast tracepoints.
395 (cmd_qtdv): Adjust.
396 (max_jump_pad_size): New.
397 (gdb_jump_pad_head): New.
398 (get_jump_space_head): New.
399 (claim_jump_space): New.
400 (sort_tracepoints): New.
401 (MAX_JUMP_SIZE): New.
402 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
403 IPA.
404 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
405 support. Upload fast traceframes, and delete internal IPA
406 breakpoints.
407 (stop_tracing_handler): New.
408 (flush_trace_buffer_handler): New.
409 (cmd_qtstop): Upload fast tracepoints.
410 (response_tracepoint): Handle fast tracepoints.
411 (tracepoint_finished_step): Upload fast traceframes. Set the
412 tracepoint hit context's tracepoint type.
413 (handle_tracepoint_bkpts): New.
414 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
415 type. Add comment about fast tracepoints.
416 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
417 non-existing action_str field.
418 (get_context_regcache): Handle fast tracepoints.
419 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
420 to the regcache.
421 (fast_tracepoint_from_jump_pad_address): New.
422 (fast_tracepoint_from_ipa_tpoint_address): New.
423 (collecting_t): New.
424 (force_unlock_trace_buffer): New.
425 (fast_tracepoint_collecting): New.
426 (collecting): New.
427 (gdb_collect): New.
428 (write_inferior_data_ptr): New.
429 (target_tp_heap): New.
430 (target_malloc): New.
431 (download_agent_expr): New.
432 (UALIGN): New.
433 (download_tracepoints): New.
434 (download_trace_state_variables): New.
435 (upload_fast_traceframes): New.
436 (IPA_FIRST_TRACEFRAME): New.
437 (IPA_NEXT_TRACEFRAME_1): New.
438 (IPA_NEXT_TRACEFRAME): New.
439 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
440 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
441 (gdb_jump_pad_buffer_end): New.
442 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
443 (initialize_tracepoint): Adjust.
444 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
445 buffer. Initialize the low module.
446 * utils.c (PREFIX, TOOLNAME): New.
447 (malloc_failure): Use PREFIX.
448 (error): In the IPA, an error causes an exit.
449 (fatal, warning): Use PREFIX.
450 (internal_error): Use TOOLNAME.
451 (NUMCELLS): Increase to 10.
452 * configure, config.in: Regenerate.
453
d149dd1d
PA
4542010-06-01 Pedro Alves <pedro@codesourcery.com>
455
456 * server.c (handle_query) <qSupported>: Do two passes over the
457 qSupported string to avoid nesting strtok.
458
f6528abd
JK
4592010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
460
461 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
462 (CDEPS): New.
463 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
464 -Wl,--dynamic-list.
465 * configure: Regenerate.
466 * proc-service.list: New.
467
ca2a87a0
JK
4682010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
469
470 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
471 New comment.
472
363a6e9f
OS
4732010-05-26 Ozkan Sezer <sezeroz@gmail.com>
474
475 * gdbreplay.c (remote_open): Check error return from socket() call by
476 its equality to -1 not by it being negative.
477 * remote-utils.c (remote_open): Likewise.
478
d23b6cb1
PA
4792010-05-23 Pedro Alves <pedro@codesourcery.com>
480
481 * config.h: Regenerate.
482
28d3cf85
MK
4832010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
484
485 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
486 doesn't provide PTRACE_GET_THREAD_AREA.
487
fea36a59
MK
4882010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
489
490 * linux-m68k-low.c: Include <asm/ptrace.h>
491 (ps_get_thread_area): Implement.
492
24b066ba
DE
4932010-05-03 Doug Evans <dje@google.com>
494
495 * event-loop.c (struct callback_event): New struct.
496 (callback_list): New global.
497 (append_callback_event, delete_callback_event): New functions.
498 (process_callback): New function.
499 (start_event_loop): Call it.
500 * remote-utils.c (NOT_SCHEDULED): Define.
501 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
502 moved out of readchar.
503 (readchar): Rewrite. Call reschedule before returning.
504 (reset_readchar): New function.
505 (remote_close): Call it.
506 (process_remaining, reschedule): New functions.
507 * server.h (callback_handler_func): New typedef.
508 (append_callback_event, delete_callback_event): Declare.
509
9836d6ea
PA
5102010-05-03 Pedro Alves <pedro@codesourcery.com>
511
512 * proc-service.c (ps_pglobal_lookup): Use
513 thread_db_look_up_one_symbol.
514 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
515 parameter. Use it instead of all_symbols_looked_up.
516 * server.h (struct process_info) <all_symbols_looked_up>: Delete
517 field.
518 (all_symbols_looked_up): Don't declare.
519 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
520 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
521 field.
522 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
523 Set all_symbols_looked_up here.
524 (thread_db_look_up_one_symbol): New.
525 (thread_db_get_tls_address): Adjust.
526 (thread_db_load_search, try_thread_db_load_1): Always allocate the
527 thread_db object on the heap, and tentatively set it in the
528 process structure.
529 (thread_db_init): Don't set all_symbols_looked_up here.
530 * linux-low.h (thread_db_look_up_one_symbol): Declare.
531
7984d532
PA
5322010-05-03 Pedro Alves <pedro@codesourcery.com>
533
534 * linux-low.c (linux_kill, linux_detach): Adjust.
535 (status_pending_p_callback): Remove redundant statement. Check
536 for !TARGET_WAITIKIND_IGNORE, instead of
537 TARGET_WAITKIND_STOPPED.
538 (handle_tracepoints): Make sure LWP is locked. Adjust.
539 (linux_wait_for_event_1): Adjust.
540 (linux_cancel_breakpoints): New.
541 (unsuspend_one_lwp): New.
542 (unsuspend_all_lwps): New.
543 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
544 (send_sigstop_callback): Change return type to int, add new
545 `except' parameter and handle it.
546 (suspend_and_send_sigstop_callback): New.
547 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
548 pass them down. If SUSPEND, also increment the lwp's suspend
549 count.
550 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
551 (need_step_over_p): Don't consider suspended LWPs.
552 (start_step_over): Adjust.
553 (proceed_one_lwp): Change return type to int, add new `except'
554 parameter and handle it.
555 (unsuspend_and_proceed_one_lwp): New.
556 (proceed_all_lwps): Use find_inferior instead of
557 for_each_inferior.
558 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
559 also decrement the suspend count of LWPs. Pass `except' down,
560 instead of hacking its suspend count.
561 (linux_pause_all): Add `freeze' parameter. Adjust.
562 (linux_unpause_all): New.
563 (linux_target_ops): Install linux_unpause_all.
564 * server.c (handle_status): Adjust.
565 * target.h (struct target_ops): New fields `unpause_all' and
566 `cancel_breakpoints'. Add new parameter to `pause_all'.
567 (pause_all): Add new `freeze' parameter.
568 (unpause_all): New.
569 (cancel_breakpoints): New.
570 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
571 cancel breakpoints.
572 (cmd_qtstart): Pause threads.
573 (stop_tracing): Pause threads, and cancel breakpoints.
574 * win32-low.c (win32_target_ops): Adjust.
575
e471f25b
PA
5762010-05-03 Pedro Alves <pedro@codesourcery.com>
577
578 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
579 the inferior right away from here...
580 (linux_wait_1): ... to here, and adjust to check the thread's
581 last_resume_kind instead of the lwp's step or stop_expected flags.
582
1915ef4f
PA
5832010-05-02 Pedro Alves <pedro@codesourcery.com>
584
585 * README: Use consistent `GDB' and `GDBserver' spellings.
586
f9e39928
PA
5872010-05-02 Pedro Alves <pedro@codesourcery.com>
588
589 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
590 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
591 (linux_detach_one_lwp): Assume the lwp is stopped.
592 (any_thread_of): Delete.
593 (linux_detach): Stop all lwps here. Don't blindly delete all
594 breakpoints.
595 (delete_lwp_callback): New.
596 (linux_mourn): Delete all lwps of the process that is gone.
597 (linux_wait_1): Don't delete the last lwp of the process here.
598 * mem-break.h (mark_breakpoints_out): Declare.
599 * mem-break.c (mark_breakpoints_out): New.
600 (free_all_breakpoints): Use it.
601 * server.c (handle_target_event): If the process is gone, mark
602 breakpoints out.
603 * thread-db.c (struct thread_db) <create_bp>: New field.
604 (thread_db_enable_reporting): Fix prototype. Store a thread event
605 breakpoint reference in the thread_db struct.
606 (thread_db_load_search): Clear the thread_db object.
607 (try_thread_db_load_1): Ditto.
608 (switch_to_process): New.
609 (disable_thread_event_reporting): Use it.
610 (remove_thread_event_breakpoints): New.
611 (thread_db_detach, thread_db_mourn): Use it.
612
1e7fc18c
PA
6132010-05-01 Pedro Alves <pedro@codesourcery.com>
614
615 * linux-low.c (linux_enable_event_reporting): New.
616 (linux_wait_for_event_1, handle_extended_wait): Use it.
617
02fc4de7
PA
6182010-04-30 Pedro Alves <pedro@codesourcery.com>
619
620 * linux-low.c (linux_kill_one_lwp, linux_kill)
621 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
622 (send_sigstop): Take an lwp_info as parameter instead. Queue a
623 SIGSTOP even if the LWP is stopped.
624 (send_sigstop_callback): New.
625 (stop_all_lwps): Use send_sigstop_callback instead.
626 (linux_resume_one_thread): Adjust.
627 (proceed_one_lwp): Still proceed an LWP that the client has
628 requested to stop, if we haven't reported it as stopped yet. Make
629 sure that LWPs the client want stopped, have a pending SIGSTOP.
630
bc3b5632
DE
6312010-04-26 Doug Evans <dje@google.com>
632
ae1ada35
DE
633 * server.c (handle_general_set): Make static.
634
bc3b5632
DE
635 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
636 Print received char after testing for error/eof instead of before.
637 (input_interrupt): Tweak comment.
638
65730243
DE
6392010-04-23 Doug Evans <dje@google.com>
640
641 * server.c (start_inferior): Print inferior argv if --debug.
642
a8ae7dc0
AR
6432010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
644
645 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
646 * nto-x86-low.c: Include server.h
647
1c07cc19
PM
6482010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
649
650 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
651 be consistent with other sources of this directory.
652 (init_registers_amd64): Correct name of source file of this function
653 in the comment.
654
e0a61e09
PM
6552010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
656
657 * configure.srv (x86_64-*-mingw*): New configuration for Windows
658 64-bit executables.
659
54709339
PM
6602010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
661
662 * win32-i386-low.c: Add 64-bit support.
663 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
664 (init_registers_amd64): Declare.
665 (mappings): Add 64-bit version of array.
666 (init_windows_x86): New function.
667 (the_low_target): Change init_arch field to init_windows_x86.
668
e8f0053d
PM
6692010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
670
671 * win32-low.c: Adapt to support also 64-bit architecture.
672 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
673 (get_image_name): Use SIZE_T type for local variable `done'.
674 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
675 (toolhelp_get_dll_name): Idem.
676 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
677 Use uintptr_t typecast to avoid warning.
678 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
679 (handle_exception): Use phex_nz to avoid warning.
680 (win32_wait): Remove unused local variable `process'.
681
c481e77e
PM
6822010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
683
684 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
685 `amd64-avx.o'.
686
12ea4b69
PM
6872010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
688
689 * configure.ac: Use `ws2_32' library for srv_mingw.
690 * configure: Regenerate.
691 * gdbreplay.c: Include winsock2.h instead of winsock.h.
692 * remote-utils.c: Likewise.
693
f6d1620c
L
6942010-04-17 H.J. Lu <hongjiu.lu@intel.com>
695
696 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
697 if __x86_64__ is defined.
698
8e642873
PM
6992010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
700
701 * configure: Regenerate.
702
711e434b
PM
7032010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
704
705 * server.c (handle_query): Handle 'qGetTIBAddr' query.
706 * target.h (target_ops): New get_tib_address field.
707 * win32-low.h (win32_thread_info): Add thread_local_base field.
708 * win32-low.c (child_add_thread): Add tlb argument.
709 Set thread_local_base field to TLB.
710 (get_child_debug_event): Adapt to child_add_thread change.
711 (win32_get_tib_address): New function.
712 (win32_target_ops): Set get_tib_address field to
713 win32_get_tib_address.
714 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
715
505106cd
PA
7162010-04-12 Pedro Alves <pedro@codesourcery.com>
717
505106cd
PA
718 * linux-low.c (linux_mourn): Also remove the process.
719 * server.c (handle_target_event): Don't remove the process here.
720 * nto-low.c (nto_mourn): New.
721 (nto_target_ops): Install it.
722 * spu-low.c (spu_mourn): New.
723 (spu_target_ops): Install it.
724 * win32-low.c (win32_mourn): New.
725 (win32_target_ops): Install it.
726
e8470a06
PA
7272010-04-12 Pedro Alves <pedro@codesourcery.com>
728
729 * server.h (buffer_xml_printf): Remove redundant `;'.
730
45ba0d02
PA
7312010-04-12 Pedro Alves <pedro@codesourcery.com>
732
733 * regcache.c (set_register_cache): Invalidate regcaches before
734 changing the register cache layout.
735 (regcache_invalidate_one): Allow a NULL regcache.
736 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
737 regcaches before changing the register cache layout or the target
738 regsets.
739
59e04013
L
7402010-04-12 H.J. Lu <hongjiu.lu@intel.com>
741
742 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
743 variable warning on Linux/x86-64.
744
8336d594
PA
7452010-04-11 Pedro Alves <pedro@codesourcery.com>
746
747 GDBserver disconnected tracing support.
748
749 * linux-low.c (linux_remove_process): Delete.
750 (add_lwp): Don't set last_resume_kind here.
751 (linux_kill): Use `mourn'.
752 (linux_detach): Use `thread_db_detach', and `mourn'.
753 (linux_mourn): New.
754 (linux_attach_lwp_1): Adjust comment.
755 (linux_attach): last_resume_kind moved the thread_info; adjust.
756 (status_pending_p_callback): Adjust.
757 (linux_wait_for_event_1): Adjust.
758 (count_events_callback, select_singlestep_lwp_callback)
759 (select_event_lwp_callback, cancel_breakpoints_callback)
760 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
761 (proceed_one_lwp): Adjust.
762 (linux_async): Add debug output.
763 (linux_thread_stopped): New.
764 (linux_pause_all): New.
765 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
766 linux_pause_all.
767 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
768 (thread_db_free): Delete declaration.
769 (thread_db_detach, thread_db_mourn): Declare.
770 * thread-db.c (thread_db_init): Use thread_db_mourn.
771 (thread_db_free): Delete, split in two.
772 (disable_thread_event_reporting): New.
773 (thread_db_detach): New.
774 (thread_db_mourn): New.
775
776 * server.h (struct thread_info) <last_resume_kind>: New field.
777 <attached>: Add comment.
778 <gdb_detached>: New field.
779 (handler_func): Change return type to int.
780 (handle_serial_event, handle_target_event): Ditto.
781 (gdb_connected): Declare.
782 (tracing): Delete.
783 (disconnected_tracing): Declare.
784 (stop_tracing): Declare.
785
786 * server.c (handle_query) <qSupported>: Report support for
787 disconnected tracing.
788 (queue_stop_reply_callback): Account for running threads.
789 (gdb_wants_thread_stopped): New.
790 (gdb_wants_all_threads_stopped): New.
791 (gdb_reattached_process): New.
792 (handle_status): Clear the `gdb_detached' flag of all processes.
793 In all-stop, stop all threads.
794 (main): Be sure to leave tfind mode. Handle disconnected tracing.
795 (process_serial_event): If the remote connection breaks, or if an
796 exit was forced with "monitor exit", force an event loop exit.
797 Handle disconnected tracing on detach.
798 (handle_serial_event): Adjust.
799 (handle_target_event): If GDB isn't connected, forward events back
800 to the inferior, unless the last process exited, in which case,
801 exit gdbserver. Adjust interface.
802
803 * remote-utils.c (remote_open): Don't block in accept. Instead
804 register an event loop source on the listen socket file
805 descriptor. Refactor bits into ...
806 (listen_desc): ... this new global.
807 (gdb_connected): ... this new function.
808 (enable_async_notification): ... this new function.
809 (handle_accept_event): ... this new function.
810 (remote_close): Clear remote_desc.
811
812 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
813
814 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
815 New fields.
816 (mourn_inferior): Define.
817 (target_process_qsupported): Avoid the dangling else problem.
818 (thread_stopped): Define.
819 (pause_all): Define.
820 (target_waitstatus_to_string): Declare.
821 * target.c (target_waitstatus_to_string): New.
822
823 * tracepoint.c (tracing): Make extern.
824 (disconnected_tracing): New.
825 (stop_tracing): Make extern. Handle tracing stops due to GDB
826 disconnecting.
827 (cmd_qtdisconnected): New.
828 (cmd_qtstatus): Report disconnected tracing status in trace reply.
829 (handle_tracepoint_general_set): Handle QTDisconnected.
830
831 * event-loop.c (event_handler_func): Change return type to int.
832 (process_event): Bail out if the event handler wants the event
833 loop to stop.
834 (handle_file_event): Ditto.
835 (start_event_loop): Bail out if the event handler wants the event
836 loop to stop.
837
838 * nto-low.c (nto_target_ops): Adjust.
839 * spu-low.c (spu_wait): Don't remove the process here.
840 (spu_target_ops): Adjust.
841 * win32-low.c (win32_wait): Don't remove the process here.
842 (win32_target_ops): Adjust.
843
5d267c4c
PA
8442010-04-11 Pedro Alves <pedro@codesourcery.com>
845
846 * regcache.c (realloc_register_cache): Invalidate inferior's
847 regcache before recreating it.
848
623ccd72
PA
8492010-04-09 Pedro Alves <pedro@codesourcery.com>
850
851 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
852
219f2f23
PA
8532010-04-09 Stan Shebs <stan@codesourcery.com>
854 Pedro Alves <pedro@codesourcery.com>
855
856 * server.h (LONGEST): New.
857 (struct thread_info) <while_stepping>: New field.
858 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
859 Declare.
860 (initialize_tracepoint, handle_tracepoint_general_set)
861 (handle_tracepoint_query, tracepoint_finished_step)
862 (tracepoint_was_hit, release_while_stepping_state_list):
863 (current_traceframe): Declare.
864 * server.c (handle_general_set): Handle tracepoint packets.
865 (read_memory): New.
866 (write_memory): New.
867 (handle_search_memory_1): Use read_memory.
868 (handle_query): Report support for conditional tracepoints, trace
869 state variables, and tracepoint sources. Handle tracepoint
870 queries.
871 (main): Initialize the tracepoints module.
872 (process_serial_event): Handle traceframe reads/writes.
873
874 * linux-low.c (handle_tracepoints): New.
875 (linux_wait_1): Call it.
876 (linux_resume_one_lwp): Handle while-stepping.
877 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
878 (linux_target_ops): Install them.
879 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
880 New field.
881 * linux-x86-low.c (x86_supports_tracepoints): New.
882 (the_low_target). Install it.
883
884 * mem-break.h (delete_breakpoint): Declare.
885 * mem-break.c (delete_breakpoint): Make external.
886
887 * target.h (struct target_ops): Add `supports_tracepoints',
888 `read_pc', and `write_pc' fields.
889 (target_supports_tracepoints): Define.
890 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
891 (phex_nz): New.
892
893 * regcache.h (struct regcache) <registers_owned>: New field.
894 (init_register_cache, regcache_cpy): Declare.
895 (regcache_read_pc, regcache_write_pc): Declare.
896 (register_cache_size): Declare.
897 (supply_regblock): Declare.
898 * regcache.c (init_register_cache): New.
899 (new_register_cache): Use it.
900 (regcache_cpy): New.
901 (register_cache_size): New.
902 (supply_regblock): New.
903 (regcache_read_pc, regcache_write_pc): New.
904
905 * tracepoint.c: New.
906
907 * Makefile.in (OBS): Add tracepoint.o.
908 (tracepoint.o): New rule.
909
3a13a53b
L
9102010-04-08 H.J. Lu <hongjiu.lu@intel.com>
911
912 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
913 (i386-mmx.o): New.
914 (i386-mmx.c): Likewise.
915 (i386-mmx-linux.o): Likewise.
916 (i386-mmx-linux.c): Likewise.
917
918 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
919 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
920 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
921 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
922
923 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
924 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
925 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
926
1570b33e
L
9272010-04-07 H.J. Lu <hongjiu.lu@intel.com>
928
929 * Makefile.in (clean): Updated.
930 (i386-avx.o): New.
931 (i386-avx.c): Likewise.
932 (i386-avx-linux.o): Likewise.
933 (i386-avx-linux.c): Likewise.
934 (amd64-avx.o): Likewise.
935 (amd64-avx.c): Likewise.
936 (amd64-avx-linux.o): Likewise.
937 (amd64-avx-linux.c): Likewise.
938
939 * configure.srv (srv_i386_regobj): Add i386-avx.o.
940 (srv_i386_linux_regobj): Add i386-avx-linux.o.
941 (srv_amd64_regobj): Add amd64-avx.o.
942 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
943 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
944 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
945 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
946 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
947 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
948 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
949
950 * i387-fp.c: Include "i386-xstate.h".
951 (i387_xsave): New.
952 (i387_cache_to_xsave): Likewise.
953 (i387_xsave_to_cache): Likewise.
954 (x86_xcr0): Likewise.
955
956 * i387-fp.h (i387_cache_to_xsave): Likewise.
957 (i387_xsave_to_cache): Likewise.
958 (x86_xcr0): Likewise.
959
960 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
961 * linux-crisv32-low.c (target_regsets): Likewise.
962 * linux-m68k-low.c (target_regsets): Likewise.
963 * linux-mips-low.c (target_regsets): Likewise.
964 * linux-ppc-low.c (target_regsets): Likewise.
965 * linux-s390-low.c (target_regsets): Likewise.
966 * linux-sh-low.c (target_regsets): Likewise.
967 * linux-sparc-low.c (target_regsets): Likewise.
968 * linux-xtensa-low.c (target_regsets): Likewise.
969
970 * linux-low.c: Include <sys/uio.h>.
971 (regsets_fetch_inferior_registers): Support nt_type.
972 (regsets_store_inferior_registers): Likewise.
973 (linux_process_qsupported): New.
974 (linux_target_ops): Add linux_process_qsupported.
975
976 * linux-low.h (regset_info): Add nt_type.
977 (linux_target_ops): Add process_qsupported.
978
979 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
980 and <sys/uio.h>.
981 (init_registers_i386_avx_linux): New.
982 (init_registers_amd64_avx_linux): Likewise.
983 (xmltarget_i386_linux_no_xml): Likewise.
984 (xmltarget_amd64_linux_no_xml): Likewise.
985 (PTRACE_GETREGSET): Likewise.
986 (PTRACE_SETREGSET): Likewise.
987 (x86_fill_xstateregset): Likewise.
988 (x86_store_xstateregset): Likewise.
989 (use_xml): Likewise.
990 (x86_linux_update_xmltarget): Likewise.
991 (x86_linux_process_qsupported): Likewise.
992 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
993 (x86_arch_setup): Don't call init_registers_amd64_linux nor
994 init_registers_i386_linux here. Call
995 x86_linux_update_xmltarget.
996 (the_low_target): Add x86_linux_process_qsupported.
997
998 * server.c (handle_query): Call target_process_qsupported.
999
1000 * target.h (target_ops): Add process_qsupported.
1001 (target_process_qsupported): New.
1002
fc7238bb
PA
10032010-04-03 Pedro Alves <pedro@codesourcery.com>
1004
1005 * inferiors.c (add_thread): Set last_status kind to
1006 TARGET_WAITKIND_IGNORE.
1007 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
1008 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
1009 (linux_wait_1): Move `thread' local definition to block that uses
1010 it. Don't NULL initialize `event_child'.
1011 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
1012 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
1013 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
1014
bdabb078
PA
10152010-04-01 Pedro Alves <pedro@codesourcery.com>
1016
1017 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
1018 an extended waitstatus, or by a watchpoint.
1019 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
1020 thread was stepping or has been stopped by a watchpoint.
1021
d3bbe7a0
PA
10222010-04-01 Pedro Alves <pedro@codesourcery.com>
1023
1024 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
1025 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
1026 of another, then delete the previous, and validate all
1027 breakpoints.
1028 (validate_inserted_breakpoint): New.
1029 (delete_disabled_breakpoints): New.
1030 (validate_breakpoints): New.
1031 (check_mem_read): Validate breakpoints before trusting their
1032 shadow. Delete disabled breakpoints.
1033 (check_mem_write): Validate breakpoints before trusting they
1034 should be inserted. Delete disabled breakpoints.
1035 * mem-break.h (validate_breakpoints):
1036 * server.c (handle_query): Validate breakpoints when we see a
1037 qSymbol query.
1038
8b07ae33
PA
10392010-04-01 Pedro Alves <pedro@codesourcery.com>
1040
1041 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
1042 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
1043 if we could tell there's a GDB breakpoint at stop_pc.
1044 (need_step_over_p): Don't do a step over if we find a GDB
1045 breakpoint at the resume PC.
1046
1047 * mem-break.c (struct raw_breakpoint): New.
1048 (enum bkpt_type): New type `gdb_breakpoint'.
1049 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
1050 fields. New field `raw'.
1051 (find_raw_breakpoint_at): New.
1052 (set_raw_breakpoint_at): Handle refcounting. Create a raw
1053 breakpoint instead.
1054 (set_breakpoint_at): Adjust.
1055 (delete_raw_breakpoint): New.
1056 (release_breakpoint): New.
1057 (delete_breakpoint): Rename to...
1058 (delete_breakpoint_1): ... this. Add proc parameter. Use
1059 release_breakpoint. Return ENOENT.
1060 (delete_breakpoint): Reimplement.
1061 (find_breakpoint_at): Delete.
1062 (find_gdb_breakpoint_at): New.
1063 (delete_breakpoint_at): Delete.
1064 (set_gdb_breakpoint_at): New.
1065 (delete_gdb_breakpoint_at): New.
1066 (gdb_breakpoint_here): New.
1067 (set_reinsert_breakpoint): Use release_breakpoint.
1068 (uninsert_breakpoint): Rename to ...
1069 (uninsert_raw_breakpoint): ... this.
1070 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
1071 (reinsert_raw_breakpoint): Change parameter type to
1072 raw_breakpoint.
1073 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
1074 instead.
1075 (check_breakpoints): Adjust. Use release_breakpoint.
1076 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
1077 (breakpoint_inserted_here): Ditto.
1078 (check_mem_read): Adjust to iterate over raw breakpoints instead.
1079 Don't trust the breakpoint's shadow if it is not inserted.
1080 (check_mem_write): Adjust to iterate over raw breakpoints instead.
1081 (delete_all_breakpoints): Adjust.
1082 (free_all_breakpoints): Mark all breakpoints as uninserted, and
1083 use delete_breakpoint_1.
1084
1085 * mem-break.h (breakpoints_supported): Delete declaration.
1086 (set_gdb_breakpoint_at): Declare.
1087 (gdb_breakpoint_here): Declare.
1088 (delete_breakpoint_at): Delete.
1089 (delete_gdb_breakpoint_at): Declare.
1090
1091 * server.h (struct raw_breakpoint): Forward declare.
1092 (struct process_info): New field `raw_breakpoints'.
1093
1094 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
1095 breakpoints.
1096
6bf5e0ba
PA
10972010-03-24 Pedro Alves <pedro@codesourcery.com>
1098
1099 * linux-low.c (status_pending_p_callback): Fix comment.
1100 (linux_wait_for_event_1): Move most of the internal breakpoint
1101 handling from here...
1102 (linux_wait_1): ... to here.
1103 (count_events_callback): New.
1104 (select_singlestep_lwp_callback): New.
1105 (select_event_lwp_callback): New.
1106 (cancel_breakpoints_callback): New.
1107 (select_event_lwp): New.
1108 (linux_wait_1): Simplify internal breakpoint handling. Give equal
1109 priority to all LWPs that have had events that should be reported
1110 to the client. Cancel breakpoints when about to reporting the
1111 event to the client, not while stopping lwps. No longer cancel
1112 finished single-steps here.
1113 (cancel_finished_single_step): Delete.
1114 (cancel_finished_single_steps): Delete.
1115
414a389f
PA
11162010-03-24 Pedro Alves <pedro@codesourcery.com>
1117
1118 * mem-break.c (enum bkpt_type): New.
1119 (struct breakpoint): New field `type'.
1120 (set_breakpoint_at): Change return type to struct breakpoint
1121 pointer. Set type to `other_breakpoint' by default.
1122 (delete_breakpoint): Rewrite, supporting more than one breakpoint
1123 in the breakpoint list.
1124 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
1125 (reinsert_breakpoint): Rename to ...
1126 (reinsert_raw_breakpoint): ... this.
1127 (reinsert_breakpoints_at): Adjust.
1128 * mem-break.h (struct breakpoint): Declare.
1129 (set_breakpoint_at): Change return type to struct breakpoint
1130 pointer.
1131
2280c721
PA
11322010-03-24 Pedro Alves <pedro@codesourcery.com>
1133
1134 * server.c (handle_query): Assign, not compare.
1135
d50171e4
PA
11362010-03-24 Pedro Alves <pedro@codesourcery.com>
1137
1138 Teach linux gdbserver to step-over-breakpoints.
1139
1140 * linux-low.c (can_hardware_single_step): New.
1141 (supports_breakpoints): New.
1142 (handle_extended_wait): If stopping threads, read the stop pc of
1143 the new cloned LWP.
1144 (get_pc): New.
1145 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
1146 low target doesn't support retrieving the PC.
1147 (add_lwp): Set last_resume_kind to resume_continue.
1148 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
1149 (linux_attach): Don't clear stop_expected. Set the lwp's
1150 last_resume_kind to resume_stop.
1151 (linux_detach_one_lwp): Don't check for removed breakpoints.
1152 (check_removed_breakpoint): Delete.
1153 (status_pending_p): Rename to ...
1154 (status_pending_p_callback): ... this. Don't check for removed
1155 breakpoints. Don't consider threads that are stopped from GDB's
1156 perspective.
1157 (linux_wait_for_lwp): Always read the stop_pc here.
1158 (cancel_breakpoint): New.
1159 (step_over_bkpt): New global.
1160 (linux_wait_for_event_1): Implement stepping over breakpoints.
1161 (gdb_wants_lwp_stopped): New.
1162 (gdb_wants_all_stopped): New.
1163 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
1164 single-step traps here. Store the thread's last reported target
1165 wait status.
1166 (send_sigstop): Don't clear stop_expected. Always set it,
1167 instead.
1168 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
1169 (cancel_finished_single_step): New.
1170 (cancel_finished_single_steps): New.
1171 (wait_for_sigstop): Don't cancel finished single-step traps here.
1172 (linux_resume_one_lwp): Don't check for removed breakpoints.
1173 Don't set `step' on non-hardware step archs.
1174 (linux_set_resume_request): Ignore resume_stop requests if already
1175 stopping or stopped. Set the lwp's last_resume_kind.
1176 (resume_status_pending_p): Don't check for removed breakpoints.
1177 (need_step_over_p): New.
1178 (start_step_over): New.
1179 (finish_step_over): New.
1180 (linux_resume_one_thread): Always queue a sigstop for resume_stop
1181 requests. Clear the thread's last reported target waitstatus.
1182 Don't use the `suspended' flag. Don't consider pending breakpoints.
1183 (linux_resume): Start a step-over if necessary.
1184 (proceed_one_lwp): New.
1185 (proceed_all_lwps): New.
1186 (unstop_all_lwps): New.
1187 * linux-low.h (struct lwp_info): Rewrite comment for the
1188 `suspended' flag. Add the `stop_pc' field. Delete the
1189 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
1190 Add `'last_resume_kind' and `need_step_over' fields.
1191 * inferiors.c (struct thread_info): Delete, moved elsewhere.
1192 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
1193 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
1194 (set_raw_breakpoint_at): New.
1195 (set_breakpoint_at): Rewrite to use it.
1196 (reinsert_breakpoint_handler): Delete.
1197 (set_reinsert_breakpoint): New.
1198 (reinsert_breakpoint_by_bp): Delete.
1199 (delete_reinsert_breakpoints): New.
1200 (uninsert_breakpoint): Rewrite.
1201 (uninsert_breakpoints_at): New.
1202 (reinsert_breakpoint): Rewrite.
1203 (reinsert_breakpoints_at): New.
1204 (check_breakpoints): Rewrite.
1205 (breakpoint_here): New.
1206 (breakpoint_inserted_here): New.
1207 (check_mem_read): Adjust.
1208 * mem-break.h (breakpoints_supported, breakpoint_here)
1209 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
1210 (reinsert_breakpoint_by_bp): Delete declaration.
1211 (delete_reinsert_breakpoints): Declare.
1212 (reinsert_breakpoint): Delete declaration.
1213 (reinsert_breakpoints_at): Declare.
1214 (uninsert_breakpoint): Delete declaration.
1215 (uninsert_breakpoints_at): Declare.
1216 (check_breakpoints): Adjust prototype.
1217 * server.h: Adjust include order.
1218 (struct thread_info): Declare here. Add a `last_status' field.
1219
30ba68cb
MS
12202010-03-23 Michael Snyder <msnyder@vmware.com>
1221
1222 * server.c (crc32): New function.
1223 (handle_query): Add handling for 'qCRC:' request.
1224
b9a881c2
PA
12252010-03-23 Pedro Alves <pedro@codesourcery.com>
1226
1227 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
1228 lwp had been stopped by a watchpoint.
1229
e92d13d5
PA
12302010-03-16 Pedro Alves <pedro@codesourcery.com>
1231
1232 * server.h (internal_error): Declare.
1233 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
1234 * utils.c (internal_error): New function.
1235
64daa791
AS
12362010-03-15 Andreas Schwab <schwab@redhat.com>
1237
1238 * configure.srv: Fix typo setting srv_regobj.
1239
f52cd8cd
PA
12402010-03-15 Pedro Alves <pedro@codesourcery.com>
1241
1242 * linux-low.c (fetch_register): Avoid passing a non string literal
1243 format to `error'.
1244 (usr_store_inferior_registers): Ditto.
1245
93ae6fdc
PA
12462010-03-14 Pedro Alves <pedro@codesourcery.com>
1247
1248 * linux-low.c (linux_write_memory): Bail out early if peeking
1249 memory failed.
1250
c3adc08c
PA
12512010-03-14 Pedro Alves <pedro@codesourcery.com>
1252
1253 * linux-low.h (struct lwp_info): New fields
1254 `stopped_by_watchpoint' and `stopped_data_address'.
1255 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
1256 here, and cache them in the lwp object.
1257 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
1258 directly.
1259 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
1260 field.
1261 (linux_stopped_by_watchpoint): Rewrite.
1262 (linux_stopped_data_address): Rewrite.
1263
bce522a2
PA
12642010-03-06 Simo Melenius <simo.melenius@iki.fi>
1265
1266 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
1267 switching the current inferior, not before.
1268
90884b2b
L
12692010-03-01 H.J. Lu <hongjiu.lu@intel.com>
1270
1271 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
1272 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
1273 i386-linux.c and amd64-linux.c.
1274 (reg-i386.o): Removed.
1275 (reg-i386.c): Likewise.
1276 (reg-i386-linux.o): Likewise.
1277 (reg-i386-linux.c): Likewise.
1278 (reg-x86-64.o): Likewise.
1279 (reg-x86-64.c): Likewise.
1280 (reg-x86-64-linux.o): Likewise.
1281 (reg-x86-64-linux.c): Likewise.
1282 (i386.o): New.
1283 (i386.c): Likewise.
1284 (i386-linux.o): Likewise.
1285 (i386-linux.c): Likewise.
1286 (amd64.o): Likewise.
1287 (amd64.c): Likewise.
1288 (amd64-linux.o): Likewise.
1289 (amd64-linux.c): Likewise.
1290
1291 * configure.srv (srv_i386_regobj): New.
1292 (srv_i386_linux_regobj): Likewise.
1293 (srv_amd64_regobj): Likewise.
1294 (srv_amd64_linux_regobj): Likewise.
1295 (srv_i386_32bit_xmlfiles): Likewise.
1296 (srv_i386_64bit_xmlfiles): Likewise.
1297 (srv_i386_xmlfiles): Likewise.
1298 (srv_amd64_xmlfiles): Likewise.
1299 (srv_i386_linux_xmlfiles): Likewise.
1300 (srv_amd64_linux_xmlfiles): Likewise.
1301 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
1302 srv_xmlfiles to $srv_i386_xmlfiles.
1303 (i[34567]86-*-mingw32ce*): Likewise.
1304 (i[34567]86-*-mingw*): Likewise.
1305 (i[34567]86-*-nto*): Likewise.
1306 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
1307 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
1308 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
1309 (x86_64-*-linux*): Likewise.
1310
1311 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
1312 (init_registers_amd64_linux): New.
1313 (x86_arch_setup): Replace init_registers_x86_64_linux with
1314 init_registers_amd64_linux.
1315
193f13e6
MK
13162010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
1317
1318 * configure.ac: Check for libdl. If it is not available link against
1319 static libthread_db.
1320 * configure: Regenerate.
1321
85d721b8
PA
13222010-02-22 Pedro Alves <pedro@codesourcery.com>
1323
1324 PR9605
1325
1326 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
1327 handing a read watchpoint.
1328 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
1329
6076632b
DE
13302010-02-12 Doug Evans <dje@google.com>
1331
1332 * linux-low.c (linux_supports_tracefork_flag): Document.
1333 (linux_look_up_symbols): Add comment.
1334
3327ccf7
L
13352010-02-03 H.J. Lu <hongjiu.lu@intel.com>
1336
1337 * regcache.c (supply_register): Clear regcache if buf is NULL.
1338
0718675c 13392010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 1340 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
1341
1342 * inferiors.c (find_inferior): Add function documentation.
1343 (unloaded_dll): Handle the case where the unloaded dll has not
1344 been previously registered in the dll list.
1345
177321bd
DJ
13462010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
1347
1348 * linux-arm-low.c (thumb_breakpoint_len): Delete.
1349 (thumb2_breakpoint): New.
1350 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
1351
2b009048
DJ
13522010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
1353
1354 * linux-low.c (get_stop_pc): Check for SIGTRAP.
1355 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
1356 breakpoints.
1357
3be029c7
PA
13582010-01-21 Pedro Alves <pedro@codesourcery.com>
1359
1360 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
1361
18f5de3b
JK
13622010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
1363
1364 * linux-s390-low.c (s390_collect_ptrace_register)
1365 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
1366
3743bb4f
DE
13672010-01-21 Doug Evans <dje@google.com>
1368
14ce3065
DE
1369 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
1370 (PTRACE_ARG4_TYPE): New macro.
1371 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
1372 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
1373 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
1374 (usr_store_inferior_registers): Ditto.
1375 (linux_read_memory, linux_write_memory): Ditto.
1376 (linux_test_for_tracefork): Ditto.
1377
3743bb4f
DE
1378 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
1379 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
1380
8b315be5
PA
13812010-01-21 Pedro Alves <pedro@codesourcery.com>
1382
1383 * proc-service.c (ps_lgetregs): Don't refetch registers from the
1384 target.
1385
85492558
PA
13862010-01-21 Pedro Alves <pedro@codesourcery.com>
1387
1388 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
1389 prototype to take a regcache. Adjust.
1390
442ea881
PA
13912010-01-20 Pedro Alves <pedro@codesourcery.com>
1392
1393 * regcache.h (struct thread_info): Forward declare.
1394 (struct regcache): New.
1395 (new_register_cache): Adjust prototype.
1396 (get_thread_regcache): Declare.
1397 (free_register_cache): Adjust prototype.
1398 (registers_to_string, registers_from_string): Ditto.
1399 (supply_register, supply_register_by_name, collect_register)
1400 (collect_register_as_string, collect_register_by_name): Ditto.
1401 * regcache.c (struct inferior_regcache_data): Delete.
1402 (get_regcache): Rename to ...
1403 (get_thread_regcache): ... this. Adjust. Switch inferior before
1404 fetching registers.
1405 (regcache_invalidate_one): Adjust.
1406 (regcache_invalidate): Fix prototype.
1407 (new_register_cache): Return the new register cache.
1408 (free_register_cache): Change prototype.
1409 (realloc_register_cache): Adjust.
1410 (registers_to_string): Change prototype to take a regcache. Adjust.
1411 (registers_from_string): Ditto.
1412 (register_data): Ditto.
1413 (supply_register): Ditto.
1414 (supply_register_by_name): Ditto.
1415 (collect_register): Ditto.
1416 (collect_register_as_string): Ditto.
1417 (collect_register_by_name): Ditto.
1418 * server.c (process_serial_event): Adjust.
1419 * linux-low.h (regset_fill_func, regset_store_func): Change
1420 prototype.
1421 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
1422 Change prototype.
1423 * linux-low.c (get_stop_pc): Adjust.
1424 (check_removed_breakpoint): Adjust.
1425 (linux_wait_for_event): Adjust.
1426 (linux_resume_one_lwp): Adjust.
1427 (fetch_register): Add regcache parameter. Adjust.
1428 (usr_store_inferior_registers): Ditto.
1429 (regsets_fetch_inferior_registers): Ditto.
1430 (regsets_store_inferior_registers): Ditto.
1431 (linux_fetch_registers, linux_store_registers): Ditto.
1432 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
1433 regcache. Adjust.
1434 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
1435 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
1436 prototype to take a regcache.
1437 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
1438 * remote-utils.c (convert_ascii_to_int, outreg)
1439 (prepare_resume_reply): Change prototype to take a regcache.
1440 Adjust.
1441 * target.h (struct target_ops) <fetch_registers, store_registers>:
1442 Change prototype to take a regcache.
1443 (fetch_inferior_registers, store_inferior_registers): Change
1444 prototype to take a regcache. Adjust.
1445 * proc-service.c (ps_lgetregs): Adjust.
1446 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
1447 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
1448 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
1449 take a regcache. Adjust.
1450 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
1451 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
1452 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
1453 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
1454 * linux-cris-low.c (cris_get_pc, cris_set_pc)
1455 (cris_cannot_fetch_register):
1456 (cris_breakpoint_at): Change prototype to take a regcache.
1457 Adjust.
1458 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
1459 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
1460 to take a regcache. Adjust.
1461 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
1462 Adjust.
1463 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
1464 take a regcache. Adjust.
1465 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
1466 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
1467 (m68k_set_pc): Change prototype to take a regcache. Adjust.
1468 * linux-mips-low.c (mips_get_pc):
1469 (mips_set_pc): Change prototype to take a regcache. Adjust.
1470 (mips_reinsert_addr): Adjust.
1471 (mips_collect_register): Change prototype to take a regcache.
1472 Adjust.
1473 (mips_supply_register):
1474 (mips_collect_register_32bit, mips_supply_register_32bit)
1475 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
1476 (mips_store_fpregset): Ditto.
1477 * linux-ppc-low.c (ppc_supply_ptrace_register, ppc_supply_ptrace_register):
1478 Ditto.
1479 (parse_spufs_run): Adjust.
1480 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
1481 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
1482 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
1483 take a regcache. Adjust.
1484 * linux-s390-low.c (s390_collect_ptrace_register)
1485 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
1486 (s390_set_pc): Change prototype to take a regcache. Adjust.
1487 (s390_arch_setup): Adjust.
1488 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
1489 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
1490 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
1491 (sparc_fill_gregset, sparc_store_gregset_from_stack)
1492 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
1493 regcache. Adjust.
1494 (sparc_breakpoint_at): Adjust.
1495 * linux-xtensa-low.c (xtensa_fill_gregset):
1496 (xtensa_store_gregset):
1497 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
1498 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
1499 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
1500 prototype to take a regcache. Adjust.
1501 * win32-arm-low.c (arm_fetch_inferior_register)
1502 (arm_store_inferior_register): Change prototype to take a
1503 regcache. Adjust.
1504 * win32-i386-low.c (i386_fetch_inferior_register)
1505 (i386_store_inferior_register): Change prototype to take a
1506 regcache. Adjust.
1507 * win32-low.c (child_fetch_inferior_registers)
1508 (child_store_inferior_registers): Change prototype to take a
1509 regcache. Adjust.
1510 (win32_wait): Adjust.
1511 (win32_fetch_inferior_registers): Change prototype to take a
1512 regcache. Adjust.
1513 (win32_store_inferior_registers): Adjust.
1514 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
1515 store_inferior_register>: Change prototype to take a regcache.
1516
60c3d7b0
DE
15172010-01-20 Doug Evans <dje@google.com>
1518
1519 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
1520 #ifdef.
1521 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 1522 (W_STOPCODE): Provide definition if missing.
60c3d7b0 1523
dc146f7c
VP
15242010-01-13 Vladimir Prus <vladimir@codesourcery.com>
1525
1526 * linux-low.c (linux_core_of_thread): New.
1527 (compare_ints, show_process, list_threads): New.
1528 (linux_qxfer_osdata): Report threads and cores.
1529 (linux_target_op): Register linux_core_of_thread.
1530 * remote-utils.c (prepare_resume_reply): Report the core.
1531 (buffer_xml_printf): Support %d specifier.
1532 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
1533 New.
1534 (handle_query): Handle qXfer:threads. Announce availability
1535 thereof.
1536 * target.h (struct target_ops): New field core_of_thread.
1537
7803799a
UW
15382010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
1539
1540 * Makefile.in (clean): Remove new generated files.
1541 (reg-s390.o, reg-s390.c): Remove rules.
1542 (reg-s390x.o, reg-s390x.c): Likewise.
1543 (s390-linux32.o, s390-linux32.c): Add rules.
1544 (s390-linux64.o, s390-linux64.c): Likewise.
1545 (s390x-linux64.o, s390x-linux64.c): Likewise.
1546 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
1547 * linux-s390-low.c: Include <elf.h>.
1548 (HWCAP_S390_HIGH_GPRS): Define if undefined.
1549 (init_registers_s390): Remove prototype.
1550 (init_registers_s390x): Likewise.
1551 (init_registers_s390_linux32): Add prototype.
1552 (init_registers_s390_linux64): Likewise.
1553 (init_registers_s390x_linux64): Likewise.
1554 (s390_num_regs_3264): New define.
1555 (s390_regmap_3264): New global variable.
1556 (s390_cannot_fetch_register): Remove obsolete check.
1557 (s390_cannot_store_register): Likewise.
1558 (s390_collect_ptrace_register): Handle upper/lower register halves.
1559 (s390_supply_ptrace_register): Likewise.
1560 (s390_fill_gregset): Update to register number changes.
1561 (s390_get_hwcap): New routine.
1562 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
1563 Install appropriate regmap and register set.
1564
6e7ffa39
JB
15652010-01-01 Joel Brobecker <brobecker@adacore.com>
1566
1567 * server.c (gdbserver_version): Update copyright year to 2010.
1568 * gdbreplay.c (gdbreplay_version): Likewise.
1569
957f3f49
DE
15702009-12-28 Doug Evans <dje@google.com>
1571
1572 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
1573 elf/external.h. Include <elf.h> instead but only if necessary.
1574
ca5c370d
PA
15752009-12-28 Pedro Alves <pedro@codesourcery.com>
1576
1577 * linux-low.c (linux_remove_process): Remove `detaching'
1578 parameter. Don't release/detach from thread_db here.
1579 (linux_kill): Release/detach from thread_db here, ...
1580 (linux_detach): ... and here, before actually detaching.
1581 (linux_wait_1): ... and here, when a process exits.
1582 * thread-db.c (any_thread_of): New.
1583 (thread_db_free): Switch the current inferior to a thread of the
1584 passed in process.
1585
4ee62156
DE
15862009-12-21 Doug Evans <dje@google.com>
1587
d90e6a88
DE
1588 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
1589
c5f62d5f
DE
1590 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
1591 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
1592 warning ifndef __NR_tkill. Move setting of errno there too.
1593 Delete unnecessary resetting of errno after syscall.
1594 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
1595
10e86dd7
DE
1596 * configure.ac: Check for dladdr.
1597 * config.in: Regenerate.
1598 * configure: Regenerate.
1599 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
1600 (try_thread_db_load): Update.
1601
4ee62156
DE
1602 * linux-low.c (my_waitpid): Delete unnecessary prototype.
1603
00f515da
DE
16042009-12-18 Doug Evans <dje@google.com>
1605
e9464885
DE
1606 * event-loop.c: Include unistd.h if it exists.
1607
07d4f67e
DE
1608 * linux-low.c (my_waitpid): Move definition away from being in
1609 between linux_tracefork_child/linux_test_for_tracefork.
1610
00f515da
DE
1611 * gdb_proc_service.h (psaddr_t): Fix type.
1612 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
1613 signature to match glibc.
1614
1de1badb
DE
16152009-12-16 Doug Evans <dje@google.com>
1616
1617 * linux-low.c (linux_read_memory): Fix argument to read.
1618
aeeb81d1
PA
16192009-11-26 Pedro Alves <pedro@codesourcery.com>
1620
1621 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
1622 events, don't leave current_inferior pointing at null.
1623
10357975
PA
16242009-11-26 Pedro Alves <pedro@codesourcery.com>
1625
1626 * win32-low.c (LOG): Delete.
1627 (OUTMSG): Output to stderr.
1628 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
1629 on compile time LOG macro.
1630 (win32_wait): Fix debug output.
1631
cf6e3471
PA
16322009-11-26 Pedro Alves <pedro@codesourcery.com>
1633
1634 * win32-low.c (win32_add_one_solib): If the dll name is
1635 "ntdll.dll", prepend the system directory to the dll path.
1636
0c85e18e
MK
16372009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
1638
1639 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
1640
9ac544ce 16412009-11-17 Nathan Sidwell <nathan@codesourcery.com>
0c85e18e 1642 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
1643
1644 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
1645 * configure.ac: Check for __mcoldfire__ and set
1646 gdb_cv_m68k_is_coldfire.
1647 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
1648 reg-cf.o and reg-m68k.o.
1649 * configure: Regenerated.
1650
fd7dd3e6
PA
16512009-11-16 Pedro Alves <pedro@codesourcery.com>
1652
1653 * linux-low.c (linux_remove_process): Add `detaching' parameter.
1654 Pass it to thread_db_free.
1655 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
1656 proper `detaching' argument to linux_remove_process.
1657 * linux-low.h (thread_db_free): Add `detaching' parameter.
1658 * thread-db.c (thread_db_init): Pass false as `detaching' argument
1659 to thread_db_free.
1660 (thread_db_free): Add `detaching' parameter. Only
1661 call td_ta_clear_event if detaching from process.
1662
75aa492e
MK
16632009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
1664
1665 * thread-db.c (thread_db_free): Fix typo.
1666
21e1bee4
PP
16672009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
1668
1669 PR gdb/10838
1670 * thread-db.c (thread_db_free): Call td_ta_clear_event.
1671
8838b45e
NS
16722009-11-03 Nathan Sidwell <nathan@codesourcery.com>
1673
1674 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
1675 with an i686 compiler.
1676 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
1677 needed.
1678 * configure: Rebuilt.
1679
8a35fb51
SL
16802009-10-29 Sandra Loosemore <sandra@codesourcery.com>
1681
1682 PR gdb/10783
1683
1684 * server.c (handle_search_memory_1): Correct read_addr initialization
1685 in loop for searching subsequent chunks.
1686
96f15937
PP
16872009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
1688
1689 * configure.ac: New --with-libthread-db option.
1690 * thread-db.c: Allow direct dependence on libthread_db.
1691 (thread_db_free): Adjust.
1692 * config.in: Regenerate.
1693 * configure: Likewise.
1694
5f7d1694
PP
16952009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
1696
1697 PR gdb/10757
1698 * thread-db.c (attach_thread): New function.
1699 (maybe_attach_thread): Return success/failure.
1700 (find_new_threads_callback): Adjust.
1701 (thread_db_find_new_threads): Loop until no new threads.
1702
88e3b899
PA
17032009-10-13 Pedro Alves <pedro@codesourcery.com>
1704
1705 * proc-service.c (ps_lgetregs): Formatting.
1706
cdbfd419
PP
17072009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
1708
1709 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
1710 * configure.ac: Adjust.
1711 * linux-low.h (struct process_info_private): Move members to struct
1712 thread_db.
1713 (thread_db_free, thread_db_handle_monitor_command): New prototype.
1714 * linux-low.c (linux_remove_process): Adjust.
1715 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
1716 * server.c (handle_query): Move code ...
1717 (handle_monitor_command): ... here. New function.
1718 * target.h (struct target_ops): New member.
1719 * thread-db.c (struct thread_db): New.
1720 (libthread_db_search_path): New variable.
1721 (thread_db_create_event, thread_db_enable_reporting)
1722 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
1723 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
1724 (try_thread_db_load_1, dladdr_to_soname): New functions.
1725 (try_thread_db_load, thread_db_load_search): New functions.
1726 (thread_db_init): Search for libthread_db.
1727 (thread_db_free): New function.
1728 (thread_db_handle_monitor_command): Likewise.
1729 * config.in: Regenerate.
1730 * configure: Regenerate.
1731
4168d2d6
UW
17322009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
1733
1734 * spu-low.c (spu_kill): Wait for inferior to terminate.
1735 Call clear_inferiors.
1736 (spu_detach): Call clear_inferiors.
1737
81ecdfbb
RW
17382009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1739
1740 * aclocal.m4: Regenerate.
1741 * config.in: Likewise.
1742 * configure: Likewise.
1743
0b9ff2c0
UW
17442009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
1745
1746 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
1747 (parse_spufs_run): New function.
1748 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
1749 (ppc_breakpoint_at): Handle SPU breakpoints.
1750
efcbbd14
UW
17512009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
1752
1753 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
1754 (SPUFS_MAGIC): Define.
1755 (spu_enumerate_spu_ids): New function.
1756 (linux_qxfer_spu): New function.
1757 (linux_target_ops): Install linux_qxfer_spu.
1758
f4d9bade
UW
17592009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
1760
1761 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
1762 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
1763 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
1764 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
1765 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
1766 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
1767 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
1768 (init_registers_powerpc_cell32l): Add prototype.
1769 (init_registers_powerpc_cell64l): Likewise.
1770 (ppc_arch_setup): Detect Cell/B.E. architecture.
1771
96e946ca
RW
17722009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1773
1774 * Makefile.in (datarootdir): New variable.
1775
58d6951d
DJ
17762009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
1777
1778 * linux-low.c (linux_write_memory): Update debugging output.
1779 * Makefile.in (clean): Add new descriptions.
1780 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
1781 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
1782 * configure.srv: Add new files for arm*-*-linux*.
1783 * linux-arm-low.c: Add new declarations.
1784 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
1785 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
1786 (HWCAP_VFPv3D16): New.
1787 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
1788 instead of __IWMMXT__.
1789 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
1790 (arm_arch_setup): New.
1791 (target_regsets): Remove #ifdef. Add VFP regset.
1792 (the_low_target): Use arm_arch_setup.
1793
12b42a12
DJ
17942009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
1795
1796 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
1797 the main thread again.
1798
ac8c974e
AR
17992009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
1800
1801 Adding Neutrino gdbserver.
1802 * configure: Regenerated.
1803 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
1804 * configure.srv (i[34567]86-*-nto*): New target.
1805 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
1806 * remote-utils.c [__QNX__]: Include sys/iomgr.h
1807 (nto_comctrl) [__QNX__]: New function.
1808 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
1809
4424e0c3 18102009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
1811
1812 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
1813 srv_tgtobj.
1814
912cf4ba
PA
18152009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
1816 Pedro Alves <pedro@codesourcery.com>
1817
1818 * win32-i386-low.c (i386_get_thread_context): Handle systems that
1819 don't support CONTEXT_EXTENDED_REGISTERS.
1820 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
1821 (the_low_target): Install them.
1822 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
1823 failing with ERROR_PIPE_NOT_CONNECTED.
1824
aa5ca48f
DE
18252009-06-30 Doug Evans <dje@google.com>
1826 Pierre Muller <muller@ics.u-strasbg.fr>
1827
1828 Add h/w watchpoint support to x86-linux, win32-i386.
1829 * Makefile.in (SFILES): Add i386-low.c
1830 (i386_low_h): Define.
1831 (i386-low.o): Add dependencies.
1832 (linux-x86-low.o): Add i386-low.h dependency.
1833 (win32-i386-low.o): Ditto.
1834 * i386-low.c: New file.
1835 * i386-low.h: New file.
1836 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
1837 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
1838 * linux-low.c (linux_add_process): Initialize arch_private.
1839 (linux_remove_process): Free arch_private.
1840 (add_lwp): Initialize arch_private.
1841 (delete_lwp): Free arch_private.
1842 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
1843 provided.
1844 * linux-low.h (process_info_private): New member arch_private.
1845 (lwp_info): New member arch_private.
1846 (linux_target_ops): New members new_process, new_thread,
1847 prepare_to_resume.
1848 (ptid_of): New macro.
1849 * linux-x86-low.c: Include stddef.h, i386-low.h.
1850 (arch_process_info): New struct.
1851 (arch_lwp_info): New struct.
1852 (x86_linux_dr_get, x86_linux_dr_set): New functions.
1853 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
1854 (i386_dr_low_get_status): New function.
1855 (x86_insert_point, x86_remove_point): New functions.
1856 (x86_stopped_by_watchpoint): New function.
1857 (x86_stopped_data_address): New function.
1858 (x86_linux_new_process, x86_linux_new_thread): New functions.
1859 (x86_linux_prepare_to_resume): New function.
1860 (the_low_target): Add entries for insert_point, remove_point,
1861 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
1862 prepare_to_resume.
1863 * server.c (debug_hw_points): New global.
1864 (monitor_show_help): Document set debug-hw-points.
1865 (handle_query): Process "set debug-hw-points".
1866 * server.h (debug_hw_points): Declare.
1867 (paddress): Declare.
1868 * utils.c (NUMCELLS, CELLSIZE): New macros.
1869 (get_sell, xsnprintf, paddress): New functions.
1870 * win32-arm-low.c (the_low_target): Add entries for insert_point,
1871 remove_point, stopped_by_watchpoint, stopped_data_address.
1872 * win32-i386-low.c: Include i386-low.h.
1873 (debug_reg_state): Replaces dr.
1874 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
1875 (i386_dr_low_get_status): New function.
1876 (i386_insert_point, i386_remove_point): New functions.
1877 (i386_stopped_by_watchpoint): New function.
1878 (i386_stopped_data_address): New function.
1879 (i386_initial_stuff): Update.
1880 (get_thread_context,set_thread_context,i386_thread_added): Update.
1881 (the_low_target): Add entries for insert_point,
1882 remove_point, stopped_by_watchpoint, stopped_data_address.
1883 * win32-low.c (win32_insert_watchpoint): New function.
1884 (win32_remove_watchpoint): New function.
1885 (win32_stopped_by_watchpoint): New function.
1886 (win32_stopped_data_address): New function.
1887 (win32_target_ops): Add entries for insert_watchpoint,
1888 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
1889 * win32-low.h (win32_target_ops): New members insert_point,
1890 remove_point, stopped_by_watchpoint, stopped_data_address.
1891
d993e290
PA
18922009-06-25 Pedro Alves <pedro@codesourcery.com>
1893
1894 * server.c (process_serial_event): Re-return unsupported, not
1895 error, if the type isn't recognized. Re-allow supporting only
1896 insert or remove packets. Also call require_running for
1897 breakpoints. Add missing break statement to default case. Tidy.
1898 * target.h (struct target_ops): Rename insert_watchpoint to
1899 insert_point, and remove_watchpoint to remove_point.
1900
1901 * linux-low.h (struct linux_target_ops): Likewise.
1902 * linux-low.c (linux_insert_watchpoint): Rename to ...
1903 (linux_insert_point): ... this. Adjust.
1904 (linux_remove_watchpoint): Rename to ...
1905 (linux_remove_point): ... this. Adjust.
1906 (linux_target_ops): Adjust.
1907 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
1908 (cris_insert_point): ... this.
1909 (cris_remove_watchpoint): Rename to ...
1910 (cris_remove_point): ... this.
1911 (the_low_target): Adjust.
1912
0f54c268
PM
19132009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
1914
1915 * server.c (handle_v_kill): Pass signal_pid to
1916 kill_inferior if multi_process is zero.
1917
c6314022
AR
19182009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
1919
1920 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
1921 * target.h (target_ops): Comment for *_watchpoint to make it clear
1922 the functions can get types '0' and '1'.
1923
4463ce24
AR
19242009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
1925
1926 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
1927 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
1928 * regcache.c (get_regcache): Likewise.
1929 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
1930 * win32-low.c (child_fetch_inferior_registers): Remove check for
1931 regno 0.
1932
cf8fd78b
PA
19332009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
1934 Pedro Alves <pedro@codesourcery.com>
1935
1936 * target.h (struct target_ops) <supports_multi_process>: New
1937 callback.
1938 (target_supports_multi_process): New.
1939 * server.c (handle_query): Even if GDB reports support, only
1940 enable multi-process if the target also supports it. Report
1941 multi-process support only if the target backend supports it.
1942 * linux-low.c (linux_supports_multi_process): New function.
1943 (linux_target_ops): Install it as target_supports_multi_process
1944 callback.
1945
47c0c975
DE
19462009-05-24 Doug Evans <dje@google.com>
1947
e09875d4
DE
1948 Global renaming of find_thread_pid to find_thread_ptid.
1949 * server.h (find_thread_ptid): Renamed from find_thread_pid.
1950 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
1951 All callers updated.
1952
e27d73f6
DE
1953 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
1954 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
1955 directly.
1956
47c0c975
DE
1957 * linux-low.c (get_stop_pc): Print pc if debug_threads.
1958 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
1959 (linux_resume_one_lwp): Ditto.
1960
2acc282a
DE
19612009-05-23 Doug Evans <dje@google.com>
1962
1963 * linux-low.c (linux_resume_one_lwp): Change type of first arg
1964 from struct inferior_list_entry * to struct lwp_info *.
1965 All callers updated.
1966
9f1036c1
DE
19672009-05-13 Doug Evans <dje@google.com>
1968
1969 * linux-x86-low.c: Don't include assert.h.
1970 (x86_siginfo_fixup): Use fatal, not assert.
1971 (x86_arch_setup): Fix comment.
1972
d0722149
DE
19732009-05-12 Doug Evans <dje@google.com>
1974
1975 Biarch support for i386/amd64 gdbserver.
1976 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
1977 Add linux-x86-low.c.
1978 (linux-i386-low.o, linux-x86-64-low.o): Delete.
1979 (linux-x86-low.o): Add.
1980 * linux-x86-64-low.c: Delete.
1981 * linux-i386-low.c: Delete.
1982 * linux-x86-low.c: New file.
1983 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
1984 linux-x86-low.o.
1985 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
1986 linux-x86-low.o.
1987 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
1988 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
1989 (linux_child_pid_to_exec_file): New function.
1990 (elf_64_header_p, elf_64_file_p): New functions.
1991 (siginfo_fixup): New function.
1992 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
1993 give target a chance to convert layout.
1994 * linux-low.h (linux_target_ops): New member siginfo_fixup.
1995 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
1996
fdeb2a12
DE
19972009-05-07 Doug Evans <dje@google.com>
1998
1999 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
2000 (regsets_store_inferior_registers): Ditto.
2001
a6dbe5df
PA
20022009-05-06 Pedro Alves <pedro@codesourcery.com>
2003
2004 PR server/10048
2005
2006 * linux-low.c (must_set_ptrace_flags): Delete.
2007 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
2008 of the global.
2009 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
2010 `lwp->must_set_ptrace_flags' instead.
ba42693b 2011 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
2012 (linux_wait_1): ... not here.
2013
5091eb23
DE
20142009-04-30 Doug Evans <dje@google.com>
2015
9f767825
DE
2016 * inferiors.c (started_inferior_callback): New function.
2017 (attached_inferior_callback): New function.
2018 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
2019 * server.c (print_started_pid, print_attached_pid): New functions.
2020 (detach_or_kill_for_exit): New function.
2021 (main): Call it instead of for_each_inferior (kill_inferior_callback).
2022 * server.h (have_started_inferiors_p): Declare.
2023 (have_attached_inferiors_p): Declare.
2024
5091eb23
DE
2025 * inferiors.c (remove_process): Fix memory leak, free process.
2026 * linux-low.c (linux_remove_process): New function.
2027 (linux_kill): Call it instead of remove_process.
2028 (linux_detach, linux_wait_1): Ditto.
2029
155c8968
PA
20302009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
2031
2032 * configure.srv: Add x86 Windows CE target.
2033
7fe519cb
UW
20342009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
2035
2036 * inferiors.c (get_thread_process): Make global.
2037 * server.h (get_thread_process): Add prototype.
2038 * thread-db.c (find_one_thread): Use get_thread_process
2039 instead of current_process.
2040 (thread_db_get_tls_address): Do not crash if called when
2041 thread layer is not yet initialized.
2042
5472f405
UW
20432009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
2044
2045 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
2046 * spu-low.c (current_tid): Rename to ...
2047 (current_ptid): ... this.
2048 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
2049 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
2050 ptid_get_lwp (current_ptid) instead of current_tid.
2051 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
2052 instead of current_tid. Use find_process_pid to verify pid
2053 argument is valid. Pass proper argument to remove_process.
2054 (spu_thread_alive): Compare current_ptid instead of current_tid.
2055 (spu_resume): Likewise.
2056
55ac2b99
PA
20572009-04-02 Pedro Alves <pedro@codesourcery.com>
2058
2059 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
2060 variable.
2061
95954743
PA
20622009-04-01 Pedro Alves <pedro@codesourcery.com>
2063
2064 Implement the multiprocess extensions, and add linux multiprocess
2065 support.
2066
2067 * server.h (ULONGEST): Declare.
2068 (struct ptid, ptid_t): New.
2069 (minus_one_ptid, null_ptid): Declare.
2070 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
2071 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
2072 (struct inferior_list_entry): Change `id' type from unsigned from
2073 to ptid_t.
2074 (struct sym_cache, struct breakpoint, struct
2075 process_info_private): Forward declare.
2076 (struct process_info): Declare.
2077 (current_process): Declare.
2078 (all_processes): Declare.
2079 (initialize_inferiors): Declare.
2080 (add_thread): Adjust to use ptid_t.
2081 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
2082 (add_process, remove_process, find_thread_pid): Declare.
2083 (find_inferior_id): Adjust to use ptid_t.
2084 (cont_thread, general_thread, step_thread): Change type to ptid_t.
2085 (multi_process): Declare.
2086 (push_event): Adjust to use ptid_t.
2087 (read_ptid, write_ptid): Declare.
2088 (prepare_resume_reply): Adjust to use ptid_t.
2089 (clear_symbol_cache): Declare.
2090 * inferiors.c (all_processes): New.
2091 (null_ptid, minus_one_ptid): New.
2092 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
2093 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
2094 (add_thread): Change unsigned long to ptid. Remove gdb_id
2095 parameter. Adjust.
2096 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
2097 (gdb_id_to_thread): Rename to ...
2098 (find_thread_pid): ... this. Change unsigned long to ptid.
2099 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
2100 (loaded_dll, pull_pid_from_list): Adjust.
2101 (add_process, remove_process, find_process_pid)
2102 (get_thread_process, current_process, initialize_inferiors): New.
2103 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
2104 (struct target_waitstatus) <related_pid>: Ditto.
2105 (struct target_ops) <kill, detach>: Add `pid' argument. Change
2106 return type to int.
2107 (struct target_ops) <join>: Add `pid' argument.
2108 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
2109 (struct target_ops) <wait>: Add `ptid' field. Change return type
2110 to ptid.
2111 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
2112 (mywait): Add `ptid' argument. Change return type to ptid_t.
2113 (target_pid_to_str): Declare.
2114 * target.c (set_desired_inferior): Adjust to use ptids.
2115 (mywait): Add new `ptid' argument. Adjust.
2116 (target_pid_to_str): New.
2117 * mem-break.h (free_all_breakpoints): Declare.
2118 * mem-break.c (breakpoints): Delelete.
2119 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
2120 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
2121 to use per-process breakpoint list.
2122 (free_all_breakpoints): New.
2123 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
2124 (symbol_cache, all_symbols_looked_up): Delete.
2125 (hexchars): New.
2126 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
2127 read_ptid): New.
2128 (prepare_resume_reply): Change ptid argument's type from unsigned
2129 long to ptid_t. Adjust. Implement W;process and X;process.
2130 (free_sym_cache, clear_symbol_cache): New.
2131 (look_up_one_symbol): Adjust to per-process symbol cache. *
2132 * server.c (cont_thread, general_thread, step_thread): Change type
2133 to ptid_t.
2134 (attached): Delete.
2135 (multi_process): New.
2136 (last_ptid): Change type to ptid_t.
2137 (struct vstop_notif) <ptid>: Change type to ptid_t.
2138 (queue_stop_reply, push_event): Change `ptid' argument's type to
2139 ptid_t.
2140 (discard_queued_stop_replies): Add `pid' argument.
2141 (start_inferior): Adjust to use ptids. Adjust to mywait interface
2142 changes. Don't reference the `attached' global.
2143 (attach_inferior): Adjust to mywait interface changes.
2144 (handle_query): Adjust to use ptids. Parse GDB's qSupported
2145 features. Handle and report "multiprocess+". Handle
2146 "qAttached:PID".
2147 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
2148 changes.
2149 (handle_v_kill): New.
2150 (handle_v_stopped): Adjust to use target_pid_to_str.
2151 (handle_v_requests): Allow multiple attaches and runs when
2152 multiprocess extensions are in effect. Handle "vKill".
2153 (myresume): Adjust to use ptids.
2154 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
2155 (handle_status): Adjust to discard_queued_stop_replies interface
2156 change.
2157 (first_thread_of, kill_inferior_callback)
2158 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
2159 (main): Call initialize_inferiors. Adjust to use ptids, killing
2160 and detaching from all inferiors. Handle multiprocess packet
2161 variants.
2162 * linux-low.h: Include gdb_proc_service.h.
2163 (struct process_info_private): New.
2164 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
2165 <lwpid_of>: Use ptid_get_lwp.
2166 (get_lwp_thread): Adjust.
2167 (struct lwp_info): Add `dead' member.
2168 (find_lwp_pid): Declare.
2169 * linux-low.c (thread_db_active): Delete.
2170 (new_inferior): Adjust comment.
2171 (inferior_pid): Delete.
2172 (linux_add_process): New.
2173 (handle_extended_wait): Adjust.
2174 (add_lwp): Change unsigned long to ptid.
2175 (linux_create_inferior): Add process to processes table. Adjust
2176 to use ptids. Don't set new_inferior here.
2177 (linux_attach_lwp): Rename to ...
2178 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
2179 it. Adjust to use ptids.
2180 (linux_attach_lwp): New.
2181 (linux_attach): Add process to processes table. Don't set
2182 new_inferior here.
2183 (struct counter): New.
2184 (second_thread_of_pid_p, last_thread_of_process_p): New.
2185 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
2186 multiple processes.
2187 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
2188 processes. Remove process from process table.
2189 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
2190 to multiple processes.
2191 (any_thread_of): New.
2192 (linux_detach): Add `pid' argument, and handle it. Remove process
2193 from processes table.
2194 (linux_join): Add `pid' argument. Handle it.
2195 (linux_thread_alive): Change unsighed long argument to ptid_t.
2196 Consider dead lwps as not being alive.
2197 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
2198 threads we're not interested in.
2199 (same_lwp, find_lwp_pid): New.
2200 (linux_wait_for_lwp): Change `pid' argument's type from int to
2201 ptid_t. Adjust.
2202 (linux_wait_for_event): Rename to ...
2203 (linux_wait_for_event_1): ... this. Change `pid' argument's type
2204 from int to ptid_t. Adjust.
2205 (linux_wait_for_event): New.
2206 (linux_wait_1): Add `ptid' argument. Change return type to
2207 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
2208 that exit from the process table.
2209 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
2210 Adjust.
2211 (mark_lwp_dead): New.
2212 (wait_for_sigstop): Adjust to use ptids. If a process exits while
2213 stopping all threads, mark its main lwp as dead.
2214 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
2215 ptids.
2216 (fetch_register, usr_store_inferior_registers)
2217 (regsets_fetch_inferior_registers)
2218 (regsets_store_inferior_registers, linux_read_memory)
2219 (linux_write_memory): Inline `inferior_pid'.
2220 (linux_look_up_symbols): Adjust to use per-process
2221 `thread_db_active'.
2222 (linux_request_interrupt): Adjust to use ptids.
2223 (linux_read_auxv): Inline `inferior_pid'.
2224 (initialize_low): Don't reference thread_db_active.
2225 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
2226 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
2227 (ps_getpid): Return the pid of the current inferior.
2228 * thread-db.c (proc_handle, thread_agent): Delete.
2229 (thread_db_create_event, thread_db_enable_reporting): Adjust to
2230 per-process data.
2231 (find_one_thread): Change argument type to ptid_t. Adjust to
2232 per-process data.
2233 (maybe_attach_thread): Adjust to per-process data and ptids.
2234 (thread_db_find_new_threads): Ditto.
2235 (thread_db_init): Ditto.
2236 * spu-low.c (spu_create_inferior, spu_attach): Add process to
2237 processes table. Adjust to use ptids.
2238 (spu_kill, spu_detach): Adjust interface. Remove process from
2239 processes table.
2240 (spu_join, spu_thread_alive): Adjust interface.
2241 (spu_wait): Adjust interface. Remove process from processes
2242 table. Adjust to use ptids.
2243 * win32-low.c (current_inferior_tid): Delete.
2244 (current_inferior_ptid): New.
2245 (debug_event_ptid): New.
2246 (thread_rec): Take a ptid. Adjust.
2247 (child_add_thread): Add `pid' argument. Adjust to use ptids.
2248 (child_delete_thread): Ditto.
2249 (do_initial_child_stuff): Add `attached' argument. Add process to
2250 processes table.
2251 (child_fetch_inferior_registers, child_store_inferior_registers):
2252 Adjust.
2253 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
2254 (win32_attach): Pass 1 to do_initial_child_stuff.
2255 (win32_kill): Adjust interface. Remove process from processes
2256 table.
2257 (win32_detach): Ditto.
2258 (win32_join): Adjust interface.
2259 (win32_thread_alive): Take a ptid.
2260 (win32_resume): Adjust to use ptids.
2261 (get_child_debug_event): Ditto.
2262 (win32_wait): Adjust interface. Remove exiting process from
2263 processes table.
2264
bd99dc85
PA
22652009-04-01 Pedro Alves <pedro@codesourcery.com>
2266
2267 Non-stop mode support.
2268
2269 * server.h (non_stop): Declare.
2270 (gdb_client_data, handler_func): Declare.
2271 (delete_file_handler, add_file_handler, start_event_loop):
2272 Declare.
2273 (handle_serial_event, handle_target_event, push_event)
2274 (putpkt_notif): Declare.
2275 * target.h (enum resume_kind): New.
2276 (struct thread_resume): Replace `step' field by `kind' field.
2277 (TARGET_WNOHANG): Define.
2278 (struct target_ops) <wait>: Add `options' argument.
2279 <supports_non_stop, async, start_non_stop>: New fields.
2280 (target_supports_non_stop, target_async): New.
2281 (start_non_stop): Declare.
2282 (mywait): Add `options' argument.
2283 * target.c (mywait): Add `options' argument. Print child exit
2284 notifications here.
2285 (start_non_stop): New.
2286 * server.c (non_stop, own_buf, mem_buf): New globals.
2287 (struct vstop_notif): New.
2288 (notif_queue): New global.
2289 (queue_stop_reply, push_event, discard_queued_stop_replies)
2290 (send_next_stop_reply): New.
2291 (start_inferior): Adjust to use resume_kind. Adjust to mywait
2292 interface changes.
2293 (attach_inferior): In non-stop mode, don't wait for the target
2294 here.
2295 (handle_general_set): Handle QNonStop.
2296 (handle_query): When handling qC, return the current general
2297 thread, instead of the first thread of the list.
2298 (handle_query): If the backend supports non-stop mode, include
2299 QNonStop+ in the qSupported query response.
2300 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
2301 and non-stop mode.
2302 (handle_v_attach, handle_v_run): Handle non-stop mode.
2303 (handle_v_stopped): New.
2304 (handle_v_requests): Report support for vCont;t. Handle vStopped.
2305 (myresume): Adjust to use resume_kind. Handle non-stop.
2306 (queue_stop_reply_callback): New.
2307 (handle_status): Handle non-stop mode.
2308 (main): Clear non_stop flag on reconnection. Use the event-loop.
2309 Refactor serial protocol handling from here ...
2310 (process_serial_event): ... to this new function. When GDB
2311 selects any thread, select one here. In non-stop mode, wait until
2312 GDB acks all pending events before exiting.
2313 (handle_serial_event, handle_target_event): New.
2314 * remote-utils.c (remote_open): Install remote_desc in the event
2315 loop.
2316 (remote_close): Remove remote_desc from the event loop.
2317 (putpkt_binary): Rename to...
2318 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
2319 (putpkt_binary): New as wrapper around putpkt_binary_1.
2320 (putpkt_notif): New.
2321 (prepare_resume_reply): In non-stop mode, don't change the
2322 general_thread.
2323 * event-loop.c: New.
2324 * Makefile.in (OBJ): Add event-loop.o.
2325 (event-loop.o): New rule.
2326
2327 * linux-low.h (pid_of): Moved here.
2328 (lwpid_of): New.
2329 (get_lwp_thread): Use lwpid_of.
2330 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
2331 * linux-low.c (pid_of): Delete.
2332 (inferior_pid): Use lwpid_of.
2333 (linux_event_pipe): New.
2334 (target_is_async_p): New.
2335 (delete_lwp): New.
2336 (handle_extended_wait): Use lwpid_of.
2337 (add_lwp): Don't set lwpid field.
2338 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
2339 (linux_kill_one_lwp): If killing a running lwp, stop it first.
2340 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
2341 (linux_detach_one_lwp): If detaching from a running lwp, stop it
2342 first. Adjust to linux_wait_for_event interface changes. Use
2343 lwpid_of.
2344 (linux_detach): Don't delete the main lwp here.
2345 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
2346 (status_pending_p): Don't consider explicitly suspended lwps.
2347 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
2348 pointer. Add OPTIONS argument. Change return type to int. Use
2349 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
2350 (linux_wait_for_event): Take an integer pid instead of a lwp_info
2351 pointer. Add status pointer argument. Return a pid instead of a
2352 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
2353 changes. In non-stop mode, don't switch to a random thread.
2354 (linux_wait): Rename to...
2355 (linux_wait_1): ... this. Add target_options argument, and handle
2356 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
2357 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
2358 clean exit and signal exit code. Don't stop all threads in
2359 non-stop mode. In all-stop mode, only stop all threads when
2360 reporting a stop to GDB. Handle explicit thread stop requests.
2361 (async_file_flush, async_file_mark): New.
2362 (linux_wait): New.
2363 (send_sigstop): Use lwpid_of.
2364 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
2365 interface changes. In non-stop mode, don't switch to a random
2366 thread.
2367 (linux_resume_one_lwp): Use lwpid_of.
2368 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
2369 (linux_resume_one_thread): ... this. Handle resume_stop. In
2370 non-stop mode, don't look for pending flag in all threads.
2371 (resume_status_pending_p): Don't consider explicitly suspended
2372 threads.
2373 (my_waitpid): Reimplement. Emulate __WALL.
2374 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
2375 Use lwpid_of.
2376 (sigchld_handler, linux_supports_non_stop, linux_async)
2377 (linux_start_non_stop): New.
2378 (linux_target_ops): Register linux_supports_non_stop, linux_async
2379 and linux_start_non_stop.
2380 (initialize_low): Install SIGCHLD handler.
2381 * thread-db.c (thread_db_create_event, find_one_thread)
2382 (thread_db_get_tls_address): Use lwpid_of.
2383 * win32-low.c (win32_detach): Adjust to use resume_kind.
2384 (win32_wait): Add `options' argument.
2385 * spu-low.c (spu_resume): Adjust to use resume_kind.
2386 (spu_wait): Add `options' argument.
2387
5b1c542e
PA
23882009-04-01 Pedro Alves <pedro@codesourcery.com>
2389
2390 Decouple target code from remote protocol.
2391
2392 * target.h (enum target_waitkind): New.
2393 (struct target_waitstatus): New.
2394 (struct target_ops) <wait>: Return an unsigned long. Take a
2395 target_waitstatus pointer instead of a char pointer.
2396 (mywait): Likewise.
2397 * target.c (mywait): Change prototype to return an unsigned long.
2398 Take a target_waitstatus pointer instead of a char pointer. Adjust.
2399 * server.h (thread_from_wait, old_thread_from_wait): Delete
2400 declarations.
2401 (prepare_resume_reply): Change prototype to take a
2402 target_waitstatus.
2403 * server.c (thread_from_wait, old_thread_from_wait): Delete.
2404 (last_status, last_ptid): New.
2405 (start_inferior): Remove "statusptr" argument. Adjust. Return a
2406 pid instead of a signal.
2407 (attach_inferior): Remove "status" and "signal" parameters.
2408 Adjust.
2409 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
2410 not as an address.
2411 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
2412 (handle_v_requests, myresume): Remove "status" and "signal"
2413 parameters. Adjust.
2414 (handle_status): New.
2415 (main): Delete local `status'. Adjust.
2416 * remote-utils.c: Include target.h.
2417 (prepare_resume_reply): Change prototype to take a
2418 target_waitstatus. Adjust.
2419
2420 * linux-low.c (linux_wait): Adjust to new target_ops->wait
2421 interface.
2422 * spu-low.c (spu_wait): Adjust.
2423 * win32-low.c (enum target_waitkind, struct target_waitstatus):
2424 Delete.
2425 (win32_wait): Adjust.
2426
2bd7c093
PA
24272009-04-01 Pedro Alves <pedro@codesourcery.com>
2428
2429 * target.h (struct thread_resume): Delete leave_stopped member.
2430 (struct target_ops): Add a `n' argument to the `resume' callback.
2431 * server.c (start_inferior): Adjust.
2432 (handle_v_cont, myresume): Adjust.
2433 * linux-low.c (check_removed_breakpoint): Adjust to resume
2434 interface change, and to removed leave_stopped field.
2435 (resume_ptr): Delete.
2436 (struct thread_resume_array): New.
2437 (linux_set_resume_request): Add new `arg' parameter. Adjust to
2438 resume interface change.
2439 (linux_continue_one_thread, linux_queue_one_thread)
2440 (resume_status_pending_p): Check if the resume field is NULL
2441 instead of checking the leave_stopped member.
2442 (linux_resume): Adjust to the target resume interface change.
2443 * spu-low.c (spu_resume): Adjust to the target resume interface
2444 change.
2445 * win32-low.c (win32_detach, win32_resume): Ditto.
2446
c35fafde
PA
24472009-04-01 Pedro Alves <pedro@codesourcery.com>
2448
2449 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
2450 flag.
2451 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
2452 pending.
2453 (linux_continue_one_thread): Only preserve the stepping flag if
2454 there's a pending breakpoint.
2455
0a59d50b
PA
24562009-03-31 Pedro Alves <pedro@codesourcery.com>
2457
2458 * server.c (main): After the inferior having exited, call
2459 remote_close before exiting gdbserver.
2460
f04c6d38
TJB
24612009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
2462
2463 Fix size of FPSCR in Power 7 processors.
2464 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
2465 (PPC_FEATURE_HAS_DFP): New #define.
2466 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
2467 size of the FPSCR.
2468
78e5cee6
PA
24692009-03-23 Pedro Alves <pedro@codesourcery.com>
2470
2471 * server.c (handle_query) Whitespace and formatting.
2472
1b3f6016
PA
24732009-03-22 Pedro Alves <pedro@codesourcery.com>
2474
2475 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
2476 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
2477 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
2478 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
2479 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
2480 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
2481 Makefile.in, configure.ac: Fix whitespace throughout.
2482 * configure: Regenerate.
2483
a07b2135
PA
24842009-03-22 Pedro Alves <pedro@codesourcery.com>
2485
2486 * inferiors.c (find_inferior): Make it safe for the callback
2487 function to delete the currently iterated inferior.
2488
67cc2626
PA
24892009-03-22 Pedro Alves <pedro@codesourcery.com>
2490
2491 * Makefile.in (linuw_low_h): Move higher.
2492 (thread-db.o): Depend on $(linux_low_h).
2493
54a0b537
PA
24942009-03-17 Pedro Alves <pedro@codesourcery.com>
2495
2496 Rename "process" to "lwp" throughout.
2497
2498 * linux-low.c (all_processes): Rename to...
2499 (all_lwps): ... this.
2500 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
2501 (add_process): Rename to ...
2502 (add_lwp): ... this. Adjust.
2503 (linux_create_inferior): Adjust.
2504 (linux_attach_lwp): Adjust.
2505 (linux_attach): Adjust.
2506 (linux_kill_one_process): Rename to ...
2507 (linux_kill_one_lwp): ... this. Adjust.
2508 (linux_kill): Adjust.
2509 (linux_detach_one_process): Rename to ...
2510 (linux_detach_one_lwp): ... this. Adjust.
2511 (linux_detach): Adjust.
2512 (check_removed_breakpoint): Adjust.
2513 (status_pending_p): Adjust.
2514 (linux_wait_for_process): Rename to ...
2515 (linux_wait_for_lwp): ... this. Adjust.
2516 (linux_wait_for_event): Adjust.
2517 (send_sigstop): Adjust.
2518 (wait_for_sigstop): Adjust.
2519 (stop_all_processes): Rename to ...
2520 (stop_all_lwps): ... this.
2521 (linux_resume_one_process): Rename to ...
2522 (linux_resume_one_lwp): ... this. Adjust.
2523 (linux_set_resume_request, linux_continue_one_thread)
2524 (linux_queue_one_thread, resume_status_pending_p)
2525 (usr_store_inferior_registers, regsets_store_inferior_registers)
2526 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
2527 Adjust.
2528 * linux-low.h (get_process): Rename to ...
2529 (get_lwp): ... this. Adjust.
2530 (get_thread_process): Rename to ...
2531 (get_thread_lwp): ... this. Adjust.
2532 (get_process_thread): Rename to ...
2533 (get_lwp_thread): ... this. Adjust.
2534 (struct process_info): Rename to ...
2535 (struct lwp_info): ... this.
2536 (all_processes): Rename to ...
2537 (all_lwps): ... this.
2538 * proc-service.c (ps_lgetregs): Adjust.
2539 * thread-db.c (thread_db_create_event, find_one_thread)
2540 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
2541
0b16c5cf
PA
25422009-03-14 Pedro Alves <pedro@codesourcery.com>
2543
2544 * server.c (handle_query): Handle "qAttached".
2545
32de4b9d
NS
25462009-03-13 Nathan Sidwell <nathan@codesourcery.com>
2547
2548 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
2549 GPLv3, update license URL.
2550
2aecd87f
DE
25512009-03-01 Doug Evans <dje@google.com>
2552
93efd302 2553 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
2554 (server_h): Add gdb_signals.h.
2555 (signals.o): Update.
2556 * server.h (target_signal_from_host,target_signal_to_host_p)
2557 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
2558
86b1f9c5
PM
25592009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
2560
2561 * remote-utils.c (getpkt): Also generate remote-debug
2562 information if noack_mode is set.
2563
4aa995e1
PA
25642009-02-06 Pedro Alves <pedro@codesourcery.com>
2565
2566 * server.c (handle_query): Report qXfer:siginfo:read and
2567 qXfer:siginfo:write as supported and handle them.
2568 * target.h (struct target_ops) <qxfer_siginfo>: New field.
2569 * linux-low.c (linux_xfer_siginfo): New.
2570 (linux_target_ops): Set it.
2571
62709adf
PA
25722009-01-26 Pedro Alves <pedro@codesourcery.com>
2573
2574 * server.c (gdbserver_usage): Mention --remote-debug.
2575 (main): Accept '--remote-debug' switch.
2576
aef93bd7
DE
25772009-01-18 Doug Evans <dje@google.com>
2578
2579 * regcache.c (new_register_cache): No need to check result of xcalloc.
2580 * server.c (handle_search_memory): Back out calls to xmalloc,
2581 result is checked and error is returned to user upon failure.
2582 (handle_query): Ditto. Add more checks for result of malloc.
2583 (handle_v_cont): Check result of malloc, report error back to
2584 user upon failure.
2585 (handle_v_run): Ditto. Call freeargv.
2586 * server.h (freeargv): Declare.
2587 * utils.c (freeargv): New fn.
2588
54363045
DE
25892009-01-15 Doug Evans <dje@google.com>
2590
f626972c
DE
2591 * gdbreplay.c (perror_with_name): Make arg const char *.
2592 * server.h (target_signal_to_name): Make return type const char *.
0842e787 2593 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 2594 * utils.c (perror_with_name): Make arg const char *.
54363045 2595
18aae699
PA
25962009-01-14 Pedro Alves <pedro@codesourcery.com>
2597
2598 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
2599 when handling a EXIT_PROCESS_DEBUG_EVENT.
2600
ff703abe
JB
26012009-01-06 Joel Brobecker <brobecker@adacore.com>
2602
2603 * gdbreplay.c (gdbreplay_version): Update copyright year.
2604 * server.c (gdbserver_version): Likewise.
2605
f21cc1a2 26062009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
2607
2608 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 2609 (handle_extended_wait): Improve comment.
0e21c1ec 2610
bca929d3
DE
26112008-12-13 Doug Evans <dje@google.com>
2612
2613 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
2614 * server.h (ATTR_MALLOC): New macro.
2615 (xmalloc,xcalloc,xstrdup): Declare.
2616 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
2617 * inferiors.c: Ditto.
2618 * linux-low.c: Ditto.
2619 * mem-break.c: Ditto.
2620 * regcache.c: Ditto.
2621 * remote-utils.c: Ditto.
2622 * server.c: Ditto.
2623 * target.c: Ditto.
2624 * win32-low.c: Ditto.
2625
97438e3f
DE
26262008-12-12 Doug Evans <dje@google.com>
2627
896c7fbb
DE
2628 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
2629 in debugging printf.
2630
97438e3f
DE
2631 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
2632
e3b886f8
DE
26332008-12-09 Doug Evans <dje@google.com>
2634
2635 * linux-low.h (struct process_info): Delete member tid, unused.
2636 * thread-db.c (find_one_thread): Update.
2637 (maybe_attach_thread): Update.
2638
07e059b5
VP
26392008-12-02 Pedro Alves <pedro@codesourcery.com>
2640
2641 * target.h (struct target_ops): Add qxfer_osdata member.
2642 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
2643 and dirent.h.
2644 (linux_qxfer_osdata): New functions.
2645 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
2646 callback.
2647 * server.c (handle_query): Handle "qXfer:osdata:read:".
2648 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
2649 (buffer_xml_printf): New functions.
2650 * server.h (struct buffer): New.
2651 (buffer_grow_str, buffer_grow_str0): New macros.
2652 (buffer_grow, buffer_free, buffer_init, buffer_finish)
2653 (buffer_xml_printf): Declare.
2654
4cab47ab
DE
26552008-11-24 Doug Evans <dje@google.com>
2656
2657 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
2658
f142445f
DJ
26592008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
2660
2661 * server.c (handle_v_run): Always use the supplied argument list.
2662
d0107bb6
BW
26632008-11-19 Bob Wilson <bob.wilson@acm.org>
2664
2665 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
2666 (xtensa_regmap_table): Add entry for scompare1.
2667
2c4ad781
TJB
26682008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
2669
2670 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
2671 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
2672 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
2673 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
2674 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
2675 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
2676 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
2677 XML target descriptions.
2678 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
2679 when inferior is running on an ISA 2.05 or later processor. Add
2680 special case to return offset for full 64-bit slot of FPSCR when
2681 in 32-bits.
2682
dfb64f85
DJ
26832008-11-14 Daniel Gutson <dgutson@codesourcery.com>
2684
2685 * Makefile.in (SFILES, clean): Added sparc64 files.
2686 (reg-sparc64.o, reg-sparc64.c): New.
2687 * configure.srv (sparc*-*-linux*): New configuration.
2688 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
2689 syscall arguments for SPARC.
2690 (regsets_store_inferior_registers): Likewise.
2691 * linux-sparc-low.c: New file.
2692
66b6e1dd
DE
26932008-10-21 Doug Evans <dje@google.com>
2694
2695 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
2696 (READLINE_DIR,READLINE_DEP): Delete.
2697 (INTERNAL_CFLAGS): Update.
2698 (LINTFLAGS): Update.
2699
9b710a42
PA
27002008-10-10 Pedro Alves <pedro@codesourcery.com>
2701
2702 * server.c (handle_v_run): If GDB didn't specify an argv, use the
2703 whole argv from the last run, not just argv[0].
2704
5822d809
PA
27052008-09-08 Pedro Alves <pedro@codesourcery.com>
2706
2707 * regcache.c (new_register_cache): Return NULL if the register
2708 cache size isn't known yet.
2709 (free_register_cache): Avoid dereferencing a NULL regcache.
2710
74aac56f
DJ
27112008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
2712
2713 * configure.srv: Merge MIPS and MIPS64.
2714
400b20f5
MR
27152008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
2716
2717 * Makefile.in (uninstall): Apply $(EXEEXT) too.
2718
677c5bb1
LM
27192008-08-18 Luis Machado <luisgpm@br.ibm.com>
2720
2721 * Makefile.in: Add required vsx dependencies.
2722
2723 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
2724 Declare init_registers_powerpc_vsx32l.
2725 Declare init_registers_powerpc_vsx64l.
2726 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
2727 (ppc_arch_setup): Check for VSX in hwcap.
2728 (ppc_fill_vsxregset): New function.
2729 (ppc_store_vsxregset): New function.
2730 Add new VSX entry in regset_info target_regsets.
2731
2732 * configure.srv: Add new VSX dependencies.
2733
a6f3e723
SL
27342008-08-12 Pedro Alves <pedro@codesourcery.com>
2735
2736 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
2737 (remote_open): Set or clear transport_is_reliable.
2738 (putpkt_binary): Don't expect acks in noack mode.
2739 (getpkt): Don't send ack/nac in noack mode.
2740 * server.c (handle_general_set): Handle QStartNoAckMode.
2741 (handle_query): If connected by tcp pass QStartNoAckMode+ in
2742 qSupported.
2743 (main): Reset noack_mode on every connection.
2744 * server.h (noack_mode): Declare.
2745
a417dc56
RW
27462008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2747
2748 * Makefile.in (GDBREPLAY_OBS): New variable.
2749 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
2750
3221518c
UW
27512008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
2752 Daniel Jacobowitz <dan@codesourcery.com>
2753
2754 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
2755 (usr_store_inferior_registers): Likewise.
2756 (regsets_store_inferior_registers): Likewise.
2757
ec56be1b
PA
27582008-07-31 Rolf Jansen <rj@surtec.com>
2759 Pedro Alves <pedro@codesourcery.com>
2760
2761 * configure.ac: Check for memmem declaration.
2762 * server.c [HAVE_MALLOC_H]: Include malloc.h.
2763 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
2764 (disable_packet_qfThreadInfo): Unconditionally compile.
2765 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
2766 * configure, config.in: Regenerate.
2767
2fe5e3ff
DE
27682008-07-28 Doug Kwan <dougkwan@google.com>
2769
2770 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
2771 (linux_write_memory): Remove declaration of errno.
2772
836acd6d
UW
27732008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
2774
2775 * linux-low.c (handle_extended_wait): Do not use "status"
2776 variable uninitialized.
2777
aeba519e
PA
27782008-07-07 Pedro Alves <pedro@codesourcery.com>
2779
2780 * server.c (handle_v_attach): Inhibit reporting dll changes.
2781
db42f210
PA
27822008-06-27 Pedro Alves <pedro@codesourcery.com>
2783
2784 * remote-utils.c (prepare_resume_reply): If requested, don't
2785 output "thread:TID" in the T stop reply.
2786
2787 * server.c (disable_packet_vCont, disable_packet_Tthread)
2788 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
2789 (handle_query): If requested, disable support for qC, qfThreadInfo
2790 and qsThreadInfo.
2791 (handle_v_requests): If requested, disable support for vCont.
2792 (gdbserver_show_disableable): New.
2793 (main): Handle --disable-packet and --disable-packet=LIST.
2794
2795 * server.h (disable_packet_vCont, disable_packet_Tthread)
2796 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
2797
8e4c5421
CD
27982008-06-20 Carlos O'Donell <carlos@codesourcery.com>
2799
2800 * server.c (gdbserver_usage): Mention --version.
2801
6e23a804
DJ
28022008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
2803
2804 * Makefile.in (gdbreplay.o): New rule.
2805
90aa6a40
JM
28062008-06-06 Joseph Myers <joseph@codesourcery.com>
2807
2808 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
2809 message, not gdbserver.
2810
c16158bc
JM
28112008-06-05 Vladimir Prus <vladimir@codesourcery.com>
2812 Nathan Sidwell <nathan@codesourcery.com>
2813 Joseph Myers <joseph@codesourcery.com>
2814
2815 * acinclude.m4: Include ../../config/acx.m4.
2816 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
2817 * configure, config.in: Regenerate.
2818 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
2819 * server.c (gdbserver_version): Print PKGVERSION.
2820 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
2821 (main): Adjust gdbserver_usage calls.
2822 * gdbreplay.c (version, host_name): Add declarations.
2823 (gdbreplay_version, gdbreplay_usage): New.
2824 (main): Accept --version and --help options.
2825
aeb75bf5
DJ
28262008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
2827
2828 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
2829 (arm_breakpoint_at): Handle Thumb.
2830 (the_low_target): Add comment.
2831
76b233dd
UW
28322008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
2833
2834 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
2835
08388c79
DE
28362008-05-09 Doug Evans <dje@google.com>
2837
a3c83fae
DE
2838 * server.h (decode_search_memory_packet): Declare.
2839 * remote-utils.c (decode_search_memory_packet): New fn.
2840 * server.c (handle_search_memory_1): New fn.
08388c79
DE
2841 (handle_search_memory): New fn.
2842 (handle_query): Process qSearch:memory packets.
2843
bb9c3d36
UW
28442008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
2845
2846 * regcache.c (registers_length): Remove.
2847 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
2848 full register packet.
2849 * regcache.h (registers_length): Remove prototype.
2850 * server.h (PBUFSIZ): Define to 16384.
2851
7284e1be
UW
28522008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
2853
2854 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
2855 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
2856 powerpc-64l.o, and powerpc-altivec64l.o.
2857 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
2858 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
2859 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
2860 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
2861 rs6000/power-linux.xml, and rs6000/power64-linux.xml
2862 to srv_xmlfiles.
2863
2864 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
2865 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
2866 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
2867 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
2868 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
2869 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
2870 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
2871 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
2872 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
2873 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
2874 (clean): Update.
2875
2876 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
2877 (init_registers_powerpc_32l): ... this new prototype.
2878 (init_registers_powerpc_32): Remove, replace by ...
2879 (init_registers_powerpc_altivec32l): ... this new prototype.
2880 (init_registers_powerpc_e500): Remove, replace by ...
2881 (init_registers_powerpc_e500l): ... this new prototype.
2882 (init_registers_ppc64): Remove, replace by ...
2883 (init_registers_powerpc_64l): ... this new prototype.
2884 (init_registers_powerpc_64): Remove, replace by ...
2885 (init_registers_powerpc_altivec64l): ... this new prototype.
2886 (ppc_num_regs): Set to 73.
2887 (PT_ORIG_R3, PT_TRAP): Define if necessary.
2888 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
2889 (ppc_cannot_store_register): Handle orig_r3 and trap.
2890 (ppc_arch_setup): Update init_registers_... calls.
2891 (ppc_fill_gregset): Handle orig_r3 and trap.
2892
2893 * inferiors.c (clear_inferiors): Reset current_inferior.
2894
fdc59709
PB
28952008-04-23 Paolo Bonzini <bonzini@gnu.org>
2896
2897 * acinclude.m4: Add override.m4.
2898 * configure: Regenerate.
2899
c9b2f845
UW
29002008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
2901
2902 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
2903 initial call to init_register_ppc64.
2904
550512b8
UW
29052008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
2906
2907 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into single
2908 powerpc*-*-linux* case.
2909 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
2910
b6430ec3
UW
29112008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
2912
2913 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
2914 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
2915 from reg_xmlfiles.
2916 * linux-ppc-low.c: Include <elf.h>.
2917 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
2918 (ppc_hwcap): New global variable.
2919 (ppc_regmap): Remove __SPE__ #ifdef sections.
2920 (ppc_regmap_e500): New global variable.
2921 (ppc_cannot_store_register): Update __SPE__ special case.
2922 (ppc_get_hwcap): New function.
2923 (ppc_arch_setup): Use it to determine whether inferior supports
2924 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
2925 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
2926 Do not access registers if target does not support AltiVec.
2927 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
2928 Do not access registers if target does not support SPE.
2929 (target_regsets): Unconditionally include AltiVec and SPE regsets.
2930
52fa2412
UW
29312008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
2932
2933 * linux-low.c (disabled_regsets, num_regsets): New.
2934 (use_regsets_p): Delete.
2935 (linux_wait_for_process): Clear disabled_regsets.
2936 (regsets_fetch_inferior_registers): Check and set it.
2937 (regsets_store_inferior_registers): Likewise.
2938 (linux_fetch_registers, linux_store_registers): Do not use
2939 use_regsets_p.
2940 (initialize_low): Allocate disabled_regsets.
2941
e28b3332
DJ
29422008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
2943
2944 * Makefile.in (LIBOBJS): New.
2945 (OBS): Use LIBOBJS.
2946 (memmem.o): New rule.
2947 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
2948 * configure: Regenerated.
2949
4536995d
UW
29502008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
2951
2952 * server.c (handle_query): Never return "unsupported" for
2953 qXfer:features:read queries.
2954
221c031f
UW
29552008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
2956
2957 * server.c (get_features_xml): Fix inverted condition.
2958 (handle_query): Always support qXfer:feature:read.
2959
ccd213ac
DJ
29602008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
2961
2962 * server.c (wrapper_argv): New.
2963 (start_inferior): Handle wrapper_argv. If set, expect an extra
2964 trap.
2965 (gdbserver_usage): Document --wrapper.
2966 (main): Parse --wrapper.
2967
6fe305f7
UW
29682008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
2969
2970 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
2971 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
2972 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
2973 (ppc_set_pc): Likewise.
2974 (ppc_arch_setup): New function.
2975 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
2976 of collect_register.
2977 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
2978
5b0a002e
UW
29792008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
2980
2981 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
2982 instead of linux-ppc64-low.o.
2983 * linux-ppc64-low.c: Remove file.
2984 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
2985 (linux-ppc64-low.o): Remove rule.
2986
2987 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
2988 (init_registers_powerpc_64): Likewise.
2989 (ppc_regmap): Conditionally define depending on __powerpc64__.
2990 (ppc_cannot_store_register): Do not special-case "fpscr" when
2991 compiled on __powerpc64__.
2992 (ppc_collect_ptrace_register): New function.
2993 (ppc_supply_ptrace_register): New function.
2994 (ppc_breakpoint): Change type to "unsigned int".
2995 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
2996 (the_low_target): Conditionally provide initializers for the
2997 arch_setup member depending on __powerpc64__. Install
2998 collect_ptrace_register and supply_ptrace_register members.
2999
9b4b61c8
UW
30002008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
3001
3002 * regcache.h (gdbserver_xmltarget): Add extern declaration.
3003 * server.c (gdbserver_xmltarget): Define.
3004 (get_features_xml): Use it to replace "target.xml" and arch_string.
3005
3006 * configure.srv: Remove srv_xmltarget. Add XML files that were
3007 mentioned there to srv_xmlfiles instead. Remove conditional tests
3008 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
3009 srv_xmlfiles and srv_regobj to include all possible choices.
3010 * configure.ac (srv_xmltarget): Remove.
3011 (srv_xmlfiles): Do not add "target.xml".
3012 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
3013 checks for supplementary target information.
3014 * configure: Regenerate.
3015 * Makefile.in (XML_TARGET): Remove.
3016 (target.xml): Remove rule.
3017 (clean): Do not clean up target.xml.
3018 (.PRECIOUS): Do not mention target.xml.
3019
3020 * target.h (struct target_ops): Remove arch_string member.
3021 * linux-low.c (linux_arch_string): Remove.
3022 (linux_target_ops): Remove arch_string initializer.
3023 * linux-low.h (struct linux_target_ops): Remove arch_string member.
3024 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
3025 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
3026 * spu-low.c (spu_arch_string): Remove.
3027 (spu_target_ops): Remove arch_string initializer.
3028 * win32-low.c (win32_arch_string): Remove.
3029 (win32_target_ops): Remove arch_string initializer.
3030 * win32-low.h (struct win32_target_ops): Remove arch_string member.
3031 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
3032 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
3033
ee1a7ae4
UW
30342008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
3035
3036 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
3037 by collect_ptrace_register and supply_ptrace_register hooks.
3038 * linux-low.c (fetch_register): Use supply_ptrace_register callback
3039 instead of checking for the_low_target.left_pad_xfer.
3040 (usr_store_inferior_registers): Use collect_ptrace_register callback
3041 instead of checking for the_low_target.left_pad_xfer.
3042
3043 * linux-s390-low.c (s390_collect_ptrace_register): New function.
3044 (s390_supply_ptrace_register): Likewise.
3045 (s390_fill_gregset): Call s390_collect_ptrace_register.
3046 (the_low_target): Update.
3047
3048 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
3049 (ppc_supply_ptrace_register): Likewise.
3050 (the_low_target): Update.
3051
3052 * linux-i386-low.c (the_low_target): Update.
3053 * linux-x86-64-low.c (the_low_target): Update.
3054
d61ddec4
UW
30552008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
3056
3057 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
3058 reg-s390.o and reg-s390x.o.
3059
3060 * linux-low.c (new_inferior): New global variable.
3061 (linux_create_inferior, linux_attach): Set it.
3062 (linux_wait_for_process): Call the_low_target.arch_setup after the
3063 target has stopped for the first time.
3064 (initialize_low): Do not call the_low_target.arch_setup.
3065
3066 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
3067 (s390_set_pc): Likewise.
3068 (s390_arch_setup): New function.
3069 (the_low_target): Use s390_arch_setup as arch_setup routine.
3070
3071 * regcache.c (realloc_register_cache): New function.
3072 (set_register_cache): Call it for each existing regcache.
3073
d05b4ac3
UW
30742008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
3075
3076 * server.h (init_registers): Remove prototype.
3077
3078 * linux-low.h (struct linux_target_ops): Add arch_setup field.
3079 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
3080 instead of init_registers ().
3081 * linux-arm-low.c (init_registers_arm): Add prototype.
3082 (init_registers_arm_with_iwmmxt): Likewise.
3083 (the_low_target): Add initializer for arch_setup field.
3084 * linux-cris-low.c (init_registers_cris): Add prototype.
3085 (the_low_target): Add initializer for arch_setup field.
3086 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
3087 (the_low_target): Add initializer for arch_setup field.
3088 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
3089 (the_low_target): Add initializer for arch_setup field.
3090 * linux-ia64-low.c (init_registers_ia64): Add prototype.
3091 (the_low_target): Add initializer for arch_setup field.
3092 * linux-m32r-low.c (init_registers_m32r): Add prototype.
3093 (the_low_target): Add initializer for arch_setup field.
3094 * linux-m68k-low.c (init_registers_m68k): Add prototype.
3095 (the_low_target): Add initializer for arch_setup field.
3096 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
3097 (init_registers_mips64_linux): Likewise.
3098 (the_low_target): Add initializer for arch_setup field.
3099 * linux-ppc-low.c (init_registers_ppc): Add prototype.
3100 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
3101 (the_low_target): Add initializer for arch_setup field.
3102 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
3103 (init_registers_powerpc_64): Likewise.
3104 (the_low_target): Add initializer for arch_setup field.
3105 * linux-s390-low.c (init_registers_s390): Add prototype.
3106 (init_registers_s390x): Likewise.
3107 (the_low_target): Add initializer for arch_setup field.
3108 * linux-sh-low.c (init_registers_sh): Add prototype.
3109 (the_low_target): Add initializer for arch_setup field.
3110 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
3111 (the_low_target): Add initializer for arch_setup field.
3112 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
3113 (the_low_target): Add initializer for arch_setup field.
3114
3115 * win32-low.h (struct win32_target_ops): Add arch_setup field.
3116 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
3117 instead of init_registers ().
3118 * win32-arm-low.c (init_registers_arm): Add prototype.
3119 (the_low_target): Add initializer for arch_setup field.
3120 * win32-i386-low.c (init_registers_i386): Add prototype.
3121 (the_low_target): Add initializer for arch_setup field.
3122
3123 * spu-low.c (init_registers_spu): Add prototype.
3124 (initialize_low): Call initialie_registers_spu () instead of
3125 initialize_registers ().
3126
fd96d250
PA
31272008-02-19 Pedro Alves <pedro@codesourcery.com>
3128
3129 * server.c (handle_v_requests): When handling the vRun and vAttach
3130 packets, if already debugging a process, don't kill it. Return an
3131 error instead.
3132
d41b6bb4
DJ
31332008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
3134
3135 * server.c (handle_query): Correct length check.
3136
5ac588cf
PA
31372008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
3138
3139 * win32-low.c (do_initial_child_stuff): Add process handle
3140 parameter. Set current_process_handle and current_process_id from the
3141 parameters. Clear globals.
3142 (win32_create_inferior): Don't set current_process_handle and
3143 current_process_id here. Instead pass them on the call to
3144 do_initial_child_stuff.
3145 (win32_attach): Likewise.
3146 (win32_clear_inferiors): New.
3147 (win32_kill): Don't close the current process handle or the
3148 current thread handle here. Instead call win32_clear_inferiors.
3149 (win32_detach): Don't open a new handle to the process. Call
3150 win32_clear_inferiors.
3151 (win32_join): Don't rely on current_process_handle; open a new
3152 handle using the process id.
3153 (win32_wait): Call win32_clear_inferiors when the inferior process
3154 has exited.
3155
ecd7ecbc
DJ
31562008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
3157
3158 * server.c (monitor_show_help): Add "exit".
3159
1525d545
MG
31602008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
3161
ecd7ecbc 3162 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
3163 (clean): Add reg-xtensa.c.
3164 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
3165 * configure.srv (xtensa*-*-linux*) New target.
3166 * linux-xtensa-low.c: New.
3167 * xtensa-xtregs.c: New.
1525d545 3168
59a016f0
PA
31692008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
3170
3171 * hostio.c: Don't include errno.h.
3172 (errno_to_fileio_errno): Move to hostio-errno.
3173 * hostio.c: (hostio_error): Remove the error parameter. Defer the
3174 error number outputting to the target->hostio_last_error callback.
3175 (hostio_packet_error): Use FILEIO_EINVAL directly.
3176 (handle_open, handle_pread, hostio_error, handle_unlink): Update
3177 calls to hostio_error.
3178 * hostio-errno.c: New.
3179 * server.h (hostio_last_error_from_errno): Declare.
3180 * target.h (target_ops): Add hostio_last_error member.
3181 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
3182 as hostio_last_error handler.
3183 * spu-low.c (spu_target_ops): Likewise.
3184 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
3185 (wince_hostio_last_error): New functions.
3186 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
3187 as hostio_last_error handler.
3188 (win32_target_ops) [!_WIN32_WCE]: Register
3189 hostio_last_error_from_errno as hostio_last_error handler.
3190 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
3191 (hostio-errno.o): New rule.
3192 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
3193 * configure.srv (srv_hostio_err_objs): New variable. Default to
3194 hostio-errno.o.
3195 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
3196 * configure: Regenerate.
3197
2d717e4f
DJ
31982008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
3199
3200 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
3201 (linux_kill, linux_detach): Clean up the process list.
3202 * remote-utils.c (remote_open): Improve port number parsing.
3203 (putpkt_binary, input_interrupt): Only send interrupts if the target
3204 is running.
3205 * server.c (extended_protocol): Make static.
3206 (attached): Define earlier.
3207 (exit_requested, response_needed, program_argv): New variables.
3208 (target_running): New.
3209 (start_inferior): Clear attached here.
3210 (attach_inferior): Set attached here.
3211 (require_running): Define.
3212 (handle_query): Use require_running and target_running. Implement
3213 "monitor exit".
3214 (handle_v_attach, handle_v_run): New.
3215 (handle_v_requests): Use require_running. Handle vAttach and vRun.
3216 (gdbserver_usage): Update.
3217 (main): Redo argument parsing. Handle --debug and --multi. Handle
3218 --attach along with other options or after the port. Save
3219 program_argv. Support no initial program. Resynchronize
3220 communication with GDB after an error. Handle "monitor exit".
3221 Use require_running and target_running. Always allow the extended
3222 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
3223 restart in extended mode.
3224 * README: Refer to the GDB manual. Update --attach usage.
3225
7407e2de
AS
32262007-12-20 Andreas Schwab <schwab@suse.de>
3227
3228 * linux-low.c (STACK_SIZE): Define.
3229 (linux_tracefork_child): Use it. Use __clone2 on ia64.
3230 (linux_test_for_tracefork): Likewise.
3231
b65d95c5
DJ
32322007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
3233
3234 * linux-low.c (linux_wait_for_event): Update messages. Do not
3235 reinsert auto-delete breakpoints.
3236 * mem-break.c (struct breakpoint): Change return type of handler to
3237 int.
3238 (set_breakpoint_at): Update handler type.
3239 (reinsert_breakpoint_handler): Return 1 instead of calling
3240 delete_breakpoint.
3241 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
3242 setting a new one.
3243 (check_breakpoints): Delete auto-delete breakpoints and return 2.
3244 * mem-break.h (set_breakpoint_at): Update handler type.
3245 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
3246 * win32-low.c (auto_delete_breakpoint): New.
3247 (get_child_debug_event): Use it.
3248
4e799345
DJ
32492007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
3250
3251 * configure.ac: Check for pread and pwrite.
3252 * hostio.c (handle_pread): Fall back to lseek and read.
3253 (handle_pwrite): Fall back to lseek and write.
3254 * config.in, configure: Regenerated.
3255
27524b67
DJ
32562007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
3257
3258 * server.c (myresume): Add own_buf argument.
3259 (main): Update calls.
3260
a20d5e98
DJ
32612007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
3262
3263 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
3264 * remote-utils.c (remote_open): Do not call disable_async_io.
3265 (block_async_io): Delete.
3266 (unblock_async_io): Make static.
3267 (initialize_async_io): New.
3268 * server.c (handle_v_cont): Handle async I/O here.
3269 (myresume): Likewise. Move other common resume tasks here...
3270 (main): ... from here. Call initialize_async_io. Disable async
3271 I/O before the main loop.
3272 * server.h (initialize_async_io): Declare.
3273 (block_async_io, unblock_async_io): Delete prototypes.
3274 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
3275
b79d787e
DJ
32762007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
3277
3278 * remote-utils.c (readchar): Allow binary data in received messages.
3279
d97903b2
PA
32802007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
3281
3282 * win32-low.c (attaching): New global.
3283 (win32_create_inferior): Clear the `attaching' global.
3284 (win32_attach): Set the `attaching' global.
3285 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
3286 attaching. Only set a breakpoint at the entry point if not
3287 attaching.
3288
311de423
PA
32892007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
3290
3291 * server.c (main): Don't report dll events on the initial
3292 connection on attaches.
3293
6c2d16d2
PA
32942007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
3295
3296 * server.c (main): Relax numerical bases supported for the pid of
3297 the --attach command line argument.
3298
5ca906e6
PA
32992007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
3300
3301 * win32-low.c (win32_attach): Call OpenProcess before
3302 DebugActiveProcess, not after. Add last error output to error
3303 call.
3304
9c6c8194
PA
33052007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
3306
3307 * win32-low.c (win32_get_thread_context)
3308 (win32_set_thread_context): New functions.
3309 (thread_rec): Use win32_get_thread_context.
3310 (continue_one_thread, win32_resume): Use win32_set_thread_context.
3311 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
3312 field.
3313
4d5d1aaa
PA
33142007-12-03 Leo Zayas
3315 Pedro Alves <pedro_alves@portugalmail.pt>
3316
3317 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
3318 global variables.
3319 (child_add_thread): Minor cleanup.
3320 (child_continue): Resume artificially suspended threads before
3321 calling ContinueDebugEvent.
3322 (suspend_one_thread): New.
3323 (fake_breakpoint_event): New.
3324 (get_child_debug_event): Change return type to int. Check here if
3325 gdb sent an interrupt request. If a soft interrupt was requested,
3326 fake a breakpoint event. Return 0 if there is no event to handle,
3327 and 1 otherwise.
3328 (win32_wait): Don't check here if gdb sent an interrupt request.
3329 Ensure there is a valid event to handle.
3330 (win32_request_interrupt): Add soft interruption method as last
3331 resort.
3332
c436e841
PA
33332007-12-03 Leo Zayas
3334 Pedro Alves <pedro_alves@portugalmail.pt>
3335
3336 * win32-low.h (win32_thread_info): Add descriptions to the
3337 structure members. Replace `suspend_count' counter by a
3338 `suspended' flag.
3339 * win32-low.c (thread_rec): Update condition of when to get the
3340 context from the inferior. Rely on ContextFlags being set if it
3341 has already been retrieved. Only suspend the inferior thread if
3342 we haven't already. Warn if that fails.
3343 (continue_one_thread): s/suspend_count/suspended/. Only call
3344 ResumeThread once. Warn if that fails.
3345
e7b5fa67
PA
33462007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
3347
3348 * win32-low.c (win32_wait): Don't read from the inferior when it
3349 has already exited.
3350
a385171d
PA
33512007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
3352
3353 * Makefile.in (win32_low_h): New variable.
3354 (win32-low.o): Add dependency on $(win32_low_h).
3355 (win32-arm-low.o, win32-i386-low.o): New rules.
3356
f80c84b3
DJ
33572007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
3358
3359 * hostio.c: Correct copyright year.
3360
a6b151f1
DJ
33612007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
3362
3363 * Makefile.in (OBS): Add hostio.o.
3364 (hostio.o): New rule.
3365 * server.h (handle_vFile): Declare.
3366 * hostio.c: New file.
3367 * server.c (handle_v_requests): Take packet_len and new_packet_len
3368 for binary packets. Call handle_vFile.
3369 (main): Update call to handle_v_requests.
3370
f9387fc3
DJ
33712007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
3372
3373 * linux-low.c: Include <sched.h>.
3374
51c2684e
DJ
33752007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
3376
3377 * linux-low.c (linux_tracefork_grandchild): New.
3378 (linux_tracefork_child): Use clone.
3379 (linux_test_for_tracefork): Use clone; allocate and free a stack.
3380
75f83163
JB
33812007-10-31 Joel Brobecker <brobecker@adacore.com>
3382
3383 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
3384
da5898ce
DJ
33852007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
3386
3387 * linux-low.c (handle_extended_wait): Handle unexpected signals.
3388
24a09b5f
DJ
33892007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
3390
3391 * inferiors.c (change_inferior_id): Delete.
3392 (add_pid_to_list, pull_pid_from_list): New.
3393 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
3394 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
3395 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
3396 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
3397 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
3398 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
3399 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
3400 (using_threads): Always set to 1.
3401 (handle_extended_wait): New.
3402 (add_process): Do not set TID.
3403 (linux_create_inferior): Set must_set_ptrace_flags.
3404 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
3405 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
3406 (linux_thread_alive): Rename TID argument to LWPID.
3407 (linux_wait_for_process): Handle unknown processes. Do not use TID.
3408 (linux_wait_for_event): Do not use TID or check using_threads. Update
3409 call to dead_thread_notify. Call handle_extended_wait.
3410 (linux_create_inferior): Use PTRACE_SETOPTIONS.
3411 (send_sigstop): Delete sigstop_sent.
3412 (wait_for_sigstop): Avoid TID.
3413 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
3414 (linux_test_for_tracefork): New.
3415 (linux_lookup_signals): Use thread_db_active and
3416 linux_supports_tracefork_flag.
3417 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
3418 * linux-low.h (get_process_thread): Avoid TID.
3419 (struct process_ifo): Move thread_known and tid to the end. Remove
3420 sigstop_sent.
3421 (linux_attach_lwp, thread_db_init): Update prototypes.
3422 * server.h (change_inferior_id): Delete prototype.
3423 (add_pid_to_list, pull_pid_from_list): New prototypes.
3424 * thread-db.c (thread_db_use_events): New.
3425 (find_first_thread): Rename to...
3426 (find_one_thread): ...this. Update callers and messages. Do not
3427 call fatal. Check thread_db_use_events. Do not call
3428 change_inferior_id or new_thread_notify.
3429 (maybe_attach_thread): Update. Do not call new_thread_notify.
3430 (thread_db_init): Set thread_db_use_events. Check use_events.
3431 * utils.c (fatal, warning): Correct message prefix.
3432
30ed0a8f
DJ
34332007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
3434
3435 * Makefile.in (clean): Remove new files.
3436 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
3437 (powerpc-64.o, powerpc-64.c): New rules.
3438 * configure.srv: Use alternate register sets for powerpc64-*-linux*
3439 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
3440 with SPE.
3441 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
3442 SPE targets.
3443 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
3444 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
3445 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
3446 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
3447 (target_regsets): Add AltiVec and SPE register sets.
3448 * configure.ac: Check for AltiVec and SPE.
3449 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
3450 (ppc_fill_vrregset, ppc_store_vrregset): New.
3451 (target_regsets): Add AltiVec register set.
3452 * configure: Regenerated.
3453
fd462a61
DJ
34542007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
3455
3456 * linux-low.c (O_LARGEFILE): Define.
3457 (linux_read_memory): Use /proc/PID/mem.
3458 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
3459 * configure, config.in: Regenerated.
3460
69f223ed
DJ
34612007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
3462
3463 * linux-low.c (linux_wait_for_event): Do not pass signals while
3464 single-stepping.
3465
aec18585
PA
34662007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
3467
3468 * win32-low.c (create_process): New.
3469 (win32_create_inferior): Use create_process instead of
3470 CreateProcess. If create_process failed retry appending an ".exe"
3471 suffix. Store the GetLastError result immediatelly after
3472 create_process calls and use it on the call to error.
3473
34d86ddd
PA
34742007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
3475
3476 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
3477
5a0e3bd0
JB
34782007-08-23 Joel Brobecker <brobecker@adacore.com>
3479
3480 * configure.ac: Switch license to GPLv3.
3481
f88c79e6
MS
34822007-08-01 Michael Snyder <msnyder@access-company.com>
3483
3484 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
3485
6b3d9b83
PA
34862007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
3487
3488 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
3489 typedef.
3490 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
3491 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
3492 CloseToolhelp32Snapshot.
3493 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
3494 CloseToolhelp32Snapshot.
3495
c588c53c
MS
34962007-07-27 Michael Snyder <michael.snyder@access-company.com>
3497
3498 * server.c (main): Check for inferior exit before main loop.
3499
aa0403d9
PA
35002007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
3501
3502 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
3503 instead of on tmp_desc.
3504
255e7678
DJ
35052007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
3506 Daniel Jacobowitz <dan@codesourcery.com>
3507
3508 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
3509 (add_thread): Minor cleanups.
3510 (clear_inferiors): Move lower in the file. Clear the DLL
3511 list.
3512 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
3513 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
3514 (xml_escape_text): New.
3515 * server.c (handle_query): Handle qXfer:libraries:read. Report it
3516 for qSupported.
3517 (handle_v_cont): Report errors.
3518 (gdbserver_version): Update.
3519 (main): Correct size of own_buf. Do not report initial DLL events.
3520 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
3521 (unloaded_dll, xml_escape_text): New.
3522 * win32-low.c (enum target_waitkind): Update comments.
3523 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
3524 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
3525 (win32_EnumProcessModules, win32_GetModuleInformation)
3526 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
3527 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
3528 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
3529 (win32_Module32First, win32_Module32Next, load_toolhelp)
3530 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
3531 (get_child_debug_event): Handle DLL events.
3532 (win32_wait): Likewise.
3533
0d37add9
DJ
35342007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
3535
3536 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
3537 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
3538
45e2715e
PA
35392007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
3540
3541 * win32-low.c (handle_output_debug_string): Ignore event if not
3542 waiting.
3543
c5674cf1
PA
35442007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
3545
3546 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
3547
2bbe3cc1
DJ
35482007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
3549
3550 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
3551
ae13219e
DJ
35522007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
3553
3554 * inferiors.c (change_inferior_id): Add comment.
3555 * linux-low.c (check_removed_breakpoint): Add an early
3556 prototype. Improve debug output.
3557 (linux_attach): Doc update.
3558 (linux_detach_one_process, linux_detach): Clean up before releasing
3559 each process.
3560 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
3561 * linux-low.h (struct process_info): Doc improvement.
3562 * mem-break.c (delete_all_breakpoints): New.
3563 * mem-break.h (delete_all_breakpoints): New prototype.
3564 * thread-db.c (find_first_thread): New.
3565 (thread_db_create_event): Call it instead of
3566 thread_db_find_new_threads. Clean up unused variables.
3567 (maybe_attach_thread): Remove first thread handling.
3568 (thread_db_find_new_threads): Use find_first_thread.
3569 (thread_db_get_tls_address): Likewise.
3570
4105de34
DJ
35712007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
3572
3573 * thread-db.c (thread_db_find_new_threads): Add prototype.
3574 (thread_db_create_event): Check for the main thread before adding
3575 a new thread.
3576 (maybe_attach_thread): Only enable event reporting if TID == 0.
3577 (thread_db_get_tls_address): Check for new threads.
3578
2b876972
DJ
35792007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
3580
3581 * linux-low.c (linux_create_inferior): Try execv before execvp.
3582 * spu-low.c (spu_create_inferior): Likewise.
3583
7a245884
DJ
35842007-06-13 Mike Frysinger <vapier@gentoo.org>
3585
3586 * linux-low.c (linux_create_inferior): Change execv to execvp.
3587 * spu-low.c (spu_create_inferior): Likewies.
3588
117ce543
DJ
35892007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
3590
3591 * Makefile.in (clean): Clean new files instead of deleted ones.
3592 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
3593 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
3594 rules.
3595 * configure.srv: Specify XML files and new regformats for MIPS and
3596 MIPS64 GNU/Linux.
3597 * linux-mips-low.c (mips_num_regs): Set to only used registers.
3598 (mips_regmap): Do not fetch $0. Remove unused registers. Add
3599 an entry for the restart register.
3600 (mips_cannot_fetch_register, mips_cannot_store_register)
3601 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
3602 register names to match the XML descriptions.
3603 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
3604 restart register instead of $0.
3605
0e7f50da
UW
36062007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
3607 Markus Deuling <deuling@de.ibm.com>
3608
3609 * remote-utils.c (decode_xfer_write): New function.
3610 * server.h (decode_xfer_write): Add prototype.
3611 * server.c (handle_query): Add PACKET_LEN argument. Support
3612 qXfer:spu:read and qXfer:spu:write packets.
3613 (main): Pass packet_len to handle_query.
3614 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
3615 * target.h (target_ops): Add qxfer_spu.
3616
374c1d38
UW
36172007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
3618
3619 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
3620 accessing non-seekable spufs files.
3621
bb63802a
UW
36222007-05-16 Markus Deuling <deuling@de.ibm.com>
3623
3624 * server.c (handle_query): Add reply for qC packet.
3625
7390519e
PA
36262007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
3627 Leo Zayas <lerele@champenstudios@com>
3628
3629 * server.h (check_remote_input_interrupt_request): New function.
3630 * remote_utils.c (INVALID_DESCRIPTOR): New define.
3631 (remote_desc): Initialize with INVALID_DESCRIPTOR.
3632 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
3633 (check_remote_input_interrupt_request): New function.
3634 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 3635 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
3636 winapi_GenerateConsoleCtrlEvent): New typedefs.
3637 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
3638 to 250 ms.
3639 (win32_wait): Check for remote interrupt request
3640 with check_remote_input_interrupt_request.
3641 (win32_request_interrupt): New function.
3642 (win32_target_op): Set request_interrupt to win32_request_interrupt.
3643
34b34921
PA
36442007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
3645
3646 * win32-low.c (debug_registers_changed,
3647 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
3648 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
3649 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
3650 (thread_rec): Get context using the low target.
3651 (child_add_thread): Call thread_added on the low target,
3652 which does the same thing.
3653 (regptr): Delete.
3654 (do_initial_child_stuff): Remove debug registers references.
3655 Set context using the low target. Resume threads after
3656 setting the contexts.
3657 (child_continue): Remove dead variable. Remove debug
3658 registers references.
3659 (child_fetch_inferior_registers): Go through the low target.
3660 (do_child_store_inferior_registers): Remove.
3661 (child_store_inferior_registers): Go through the low target.
3662 (win32_resume): Remove debug registers references.
3663 Set context using the low target.
3664 (handle_exception): Change return type to void. Don't record
3665 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
3666 first chance exception.
3667 (get_child_debug_event): Change return type to void. Remove
3668 goto loop. Always return after waiting for debug event.
3669 (win32_wait): Convert to switch statement. Handle spurious
3670 events.
3671
3672 * win32-i386-low.c (debug_registers_changed,
3673 debug_registers_used): New.
3674 (initial_stuff): Rename to ...
3675 (i386_initial_stuff): ... this. Clear debug registers
3676 state variables.
3677 (store_debug_registers): Delete.
3678 (i386_get_thread_context): New.
3679 (load_debug_registers): Delete.
3680 (i386_set_thread_context): New.
3681 (i386_thread_added): New.
3682 (single_step): Rename to ...
3683 (i386_single_step): ... this.
3684 (do_fetch_inferior_registers): Rename to ...
3685 (i386_fetch_inferior_register): ... this.
3686 (i386_store_inferior_register): New.
3687 (the_low_target): Adapt to new interface.
3688
3689 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
3690 (arm_get_thread_context): New.
3691 (arm_set_thread_context): New.
3692 (regptr): New.
3693 (do_fetch_inferior_registers): Rename to ...
3694 (arm_fetch_inferior_register): ... this.
3695 (arm_store_inferior_register): New.
3696 (arm_wince_breakpoint): Reimplement as unsigned long.
3697 (arm_wince_breakpoint_len): Define.
3698 (the_low_target): Adapt to new interface.
3699
3700 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
3701 load_debug_registers. Add get_thread_context, set_thread_context,
3702 thread_added and store_inferior_register. Rename
3703 fetch_inferior_registers to fetch_inferior_register.
3704 (regptr): Remove declaration.
3705
dd6953e1
PA
37062007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
3707
3708 * linux-low.c (linux_detach): Change return type to int. Return 0.
3709 * spu-low.c (spu_detach): Likewise.
3710
444d6139
PA
37112007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
3712
3713 * target.h (target_ops): Change return type of detach to int.
3714 Add join.
3715 (join_inferior): New.
3716 * server.c (main): Don't skip detach support on mingw32.
3717 If the inferior doesn't support detaching return error.
3718 Call join_inferior instead of using waitpid.
3719 * linux-low.c (linux_join): New.
3720 (linux_target_op): Add linux_join.
3721 * spu-low.c (spu_join): New.
3722 (spu_target_ops): Add spu_join.
3723 * win32-low.c (win32_detach): Adapt to new interface.
3724 Reopen current_process_handle before detaching. Issue a child
3725 resume before detaching.
3726 (win32_join): New.
3727 (win32_target_op): Add win32_join.
3728
1d5315fe
PA
37292007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
3730
3731 * win32-low.c (win32-attach): Fix return value.
3732 * target.h (target_ops): Describe ATTACH return values.
3733
bf914831
PA
37342007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
3735
3736 * win32-low.c (GETPROCADDRESS): Define.
3737 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
3738 (winapi_DebugSetProcessKillOnExit): Likewise.
3739 (win32_create_inferior): Force usage of ansi CreateProcessA.
3740 (win32_attach): Use GETPROCADDRESS.
3741 (win32_detach): Likewise.
3742
f72f3e60
PA
37432007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
3744
3745 * win32-low.c (win32_wait): Don't use WSTOPSIG.
3746
ed50f18f
PA
37472007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
3748
3749 * win32-low.c: Commit leftover changes from 2007-03-29.
3750
0c2ead7e
DJ
37512007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
3752
3753 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
3754 fields short instead of int. Add explicit padding.
3755 (i387_cache_to_fsave): Remove unnecessary casts.
3756 (i387_fsave_to_cache): Doc fix.
3757 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
3758
73725ff3
DJ
37592007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
3760
3761 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
3762 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
3763
d99f33d8
PA
37642007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
3765
3766 * configure.srv (arm*-*-mingw32ce*): Move near the other
3767 arm targets.
3768
68070c10
PA
37692007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
3770
2482afc6 3771 * configure.ac: Add errno checking.
68070c10
PA
3772 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
3773 sys/file.h and malloc.h.
3774 (AC_CHECK_DECLS): Add perror.
3775 (srv_mingwce): Handle.
2482afc6 3776 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
3777 win32-i386-low.o to srv_tgtobj.
3778 (i[34567]86-*-mingw*): Likewise.
3779 (arm*-*-mingw32ce*): Add case.
3780 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
3781 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
3782 [__MINGW32CE__] (strerror): New function.
3783 [__MINGW32CE__] (errno): Define to GetLastError.
3784 [__MINGW32CE__] (COUNTOF): New macro.
3785 (remote_open): Remove extra close call.
3786 * mem-break.c (delete_breakpoint_at): New function.
3787 * mem-break.h (delete_breakpoint_at): Declare.
3788 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
3789 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
3790 [USE_WIN32API] (read, write): Add char* casts.
3791 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
3792 * server.h: Include wincecompat.h on Windows CE.
3793 [HAVE_ERRNO_H]: Check.
3794 (perror): Declare if not declared.
3795 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
3796 (perror_with_name): Remove errno declaration.
3797 * wincecompat.h: New.
3798 * wincecompat.c: New.
3799 * win32-low.h: New.
3800 * win32-arm-low.c: New.
3801 * win32-i386-low.c: New.
3802 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
3803 (OUTMSG2): Make it safe.
3804 (_T): New macro.
3805 (COUNTOF): New macro.
3806 (NUM_REGS): Get it from the low target.
3807 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
3808 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
3809 (thread_rec): Let low target handle debug registers.
3810 (child_add_thread): Likewise.
3811 (child_init_thread_list): Likewise.
3812 (continue_one_thread): Likewise.
3813 (regptr): New.
3814 (do_child_fetch_inferior_registers): Move to ...
3815 * win32-i386-low.c: ... here, and rename to ...
3816 (do_fetch_inferior_registers): ... this.
3817 * win32-low.c (child_fetch_inferior_registers):
3818 Go through the low target.
3819 (do_child_store_inferior_registers): Use regptr.
3820 (strwinerror): New function.
3821 (win32_create_inferior): Handle Windows CE.
3822 Use strwinerror instead of strerror on Windows error
3823 codes. Add program to the error output.
3824 Don't close the main thread handle on Windows CE.
3825 (win32_attach): Use coredll.dll on Windows CE.
3826 (win32_kill): Close current process and current
3827 thread handles.
3828 (win32_detach): Use coredll.dll on Windows CE.
3829 (win32_resume): Let low target handle debug registers, and
3830 step request.
3831 (handle_exception): Add/Remove initial breakpoint. Avoid
3832 non-existant WSTOPSIG on Windows CE.
3833 (win32_read_inferior_memory): Cast to remove warning.
3834 (win32_arch_string): Go through the low target.
3835 (initialize_low): Call set_breakpoint_data with the low
3836 target's breakpoint.
3837 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
3838 FOP_REGNUM, mappings): Move to ...
3839 * win32-i386-low.c: ... here.
3840 * win32-low.c (win32_thread_info): Move to ...
3841 * win32-low.h: ... here.
3842 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
3843 win32-arm-low.c and wincecompat.c.
3844 (all:): Add $EXEEXT.
3845 (install-only:): Likewise.
3846 (gdbserver:): Likewise.
3847 (gdbreplay:): Likewise.
3848 * config.in: Regenerate.
3849 * configure: Regenerate.
3850
41093d81
PA
38512007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
3852
3853 * win32-low.c: Rename typedef thread_info to
3854 win32_thread_info throughout.
3855
544afa54
PA
38562007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
3857
3858 * win32-i386-low.c: Rename to ...
3859 * win32-low.c: ... this.
3860 * configure.srv: Replace win32-i386-low.o with win32-low.o.
3861 * Makefile.in: Likewise.
3862
bce7165d
PA
38632007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
3864
3865 * remote-utils.c (monitor_output): Constify msg parameter.
3866 * server.h (monitor_output): Likewise.
3867 * win32-i386-low.c (handle_output_debug_string): New.
3868 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
3869 handle_output_debug_string.
3870 (get_child_debug_event): Likewise.
3871
506c7aa0
DJ
38722007-03-27 Mat Hostetter <mat@lcs.mit.edu>
3873
3874 * server.c (main): Correct strtoul check.
3875
42c81e2a
DJ
38762007-03-27 Jon Ringle <jon@ringle.org>
3877
3878 * linux-low.c: Check __ARCH_HAS_MMU__ also.
3879
9453113a
DJ
38802007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
3881
3882 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
3883
64a69107
DJ
38842007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
3885
3886 * terminal.h: Check HAVE_SGTTY_H.
3887
38882007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
3889
3890 * remote-utils.c (remote_open): Print out the assigned port number.
3891
c74d0ad8
DJ
38922007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
3893
3894 * remote-utils.c (monitor_output): New function.
3895 * server.c (debug_threads): Define here.
3896 (monitor_show_help): New function.
3897 (handle_query): Handle qRcmd.
3898 (main): Do not handle 'd' packet.
3899 * server.h (debug_threads, remote_debug, monitor_output): Declare.
3900 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
3901 of debug_threads.
3902
de7c3b4a
PA
39032007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
3904
3905 * Makefile.in (EXEEXT): New.
3906 (clean): Use $(EXEEXT).
3907
ef57601b
PA
39082007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
3909
3910 * target.h (target_ops): Rename send_signal to request_interrupt,
3911 and remove enum target_signal parameter.
3912 * linux-low.c (linux_request_interrupt): Rename from
3913 linux_send_signal, and always send SIGINT.
3914 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
3915 and always send SIGINT.
3916 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
3917 of send_signal.
3918 (input_interrupt): Likewise.
3919
820f2bda
PA
39202007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
3921
3922 * server.c (get_features_xml): Check if target implemented
3923 arch_string.
3924 * win32-i386-low.c (win32_arch_string): New.
3925 (win32_target_ops): Add win32_arch_string as arch_string member.
3926
ab39bf24
UW
39272007-02-22 Markus Deuling <deuling@de.ibm.com>
3928
3929 * spu-low.c (spu_arch_string): New.
3930 (spu_target_ops): Add spu_arch_string.
3931
61ff6e04
DJ
39322007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
3933
3934 * remote-utils.c: Remove HAVE_TERMINAL_H check.
3935 * configure.ac: Do not check for terminal.h.
3936 * configure, config.in: Regenerated.
3937
fb1e4ffc
DJ
39382007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
3939
3940 * Makefile.in (OBS): Add $(XML_BUILTIN).
3941 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
3942 (clean): Update.
3943 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
3944 (arm-with-iwmmxt.c): New.
3945 * config.in, configure: Regenerate.
3946 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
3947 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
3948 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
3949 (arm*-*-linux*): Add iWMMXt and regset support.
3950 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
3951 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
3952 (arm_store_wmmxregset, target_regsets): New.
3953 * server.c (get_features_xml): Take annex argument. Check builtin
3954 XML documents.
3955 (handle_query): Handle multiple annexes.
3956
0f48aa01
DJ
39572007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
3958
3959 * remote-utils.c [USE_WIN32API] (read, write): Define.
3960 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
3961 write.
3962
23181151
DJ
39632007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
3964
3965 * linux-i386-low.c (the_low_target): Set arch_string.
3966 * linux-x86-64-low.c (the_low_target): Likewise.
3967 * linux-low.c (linux_arch_string): New.
3968 (linux_target_ops): Add it.
3969 * linux-low.h (struct linux_target_ops): Add arch_string.
3970 * server.c (write_qxfer_response): Use const void * for DATA.
3971 (get_features_xml): New.
3972 (handle_query): Handle qXfer:features:read. Report it for qSupported.
3973 * target.h (struct target_ops): Add arch_string method.
3974
9d606399
DJ
39752007-01-03 Denis Pilat <denis.pilat@st.com>
3976 Daniel Jacobowitz <dan@codesourcery.com>
3977
3978 * linux-low.c (linux_kill): Handle being called with no threads.
3979 * win32-i386-low.c (win32_kill): Likewise.
3980 (get_child_debug_event): Clear current_process_handle.
3981
39822006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
3983 Daniel Jacobowitz <dan@codesourcery.com>
3984
3985 * remote-utils.c (remote_open): Check the type of specified
3986 serial port devices before opening them.
3987 * server.c (main): Kill the inferior if an error occurs during
3988 the first remote_open.
3989
a5e13d24
DJ
39902006-12-05 Markus Deuling <deuling@de.ibm.com>
3991
3992 * README: Update supported targets.
3993
186947f7
DJ
39942006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
3995
3996 * Makefile.in (clean): Remove reg-mips64.c.
3997 (reg-mips64.c, reg-mips64.o): New rules.
3998 * configure.srv: Handle mips64. Include regset support for mips.
3999 * linux-mips-low.c (union mips_register): New.
4000 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
4001 (mips_breakpoint, mips_breakpoint_at): Use int.
4002 (mips_collect_register, mips_supply_register)
4003 (mips_collect_register_32bit, mips_supply_register_32bit)
4004 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
4005 (mips_store_fpregset, target_regsets): New.
4006 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
4007
a13e2c95
UW
40082006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
4009
4010 * configure.srv: Add target "spu*-*-*".
4011 * Makefile.in (clean): Remove reg-spu.c.
4012 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
4013 * spu-low.c: New file.
4014
cb7283db
DJ
40152006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
4016
4017 * configure.ac: Correct td_thr_tls_get_addr test.
4018 * configure: Regenerated.
4019
89be2091
DJ
40202006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
4021
4022 * linux-low.c (linux_wait_for_event): Reformat. Use the
4023 pass_signals array.
4024 * remote-utils.c (decode_address_to_semicolon): New.
4025 * server.c (pass_signals, handle_general_set): New.
4026 (handle_query): Mention QPassSignals for qSupported.
4027 (main): Call handle_general_set.
4028 * server.h (pass_signals, decode_address_to_semicolon): New.
4029
000ef4f0
DJ
40302006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
4031
4032 * server.c (handle_query): Correct error handling for read_auxv.
4033
b7149293
UW
40342005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
4035
4036 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
4037 and srv_linux_thread_db to yes.
4038 * linux-s390-low.c (s390_fill_gregset): New function.
4039 (target_regsets): Define data structure.
4040
dae5f5cf
DJ
40412006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
4042
4043 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
4044 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
4045 * config.in, configure: Regenerated.
4046 * inferiors.c (gdb_id_to_thread): New function.
4047 (gdb_id_to_thread_id): Use it.
4048 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
4049 * linux-low.h (struct process_info): Add th member.
4050 (thread_db_get_tls_address): New prototype.
4051 * remote-utils.c (decode_address): Make non-static.
4052 * server.c (handle_query): Handle qGetTLSAddr.
4053 * server.h (gdb_id_to_thread, decode_address): New prototypes.
4054 * target.h (struct target_ops): Add get_tls_address.
4055 * thread-db.c (maybe_attach_thread): Save the thread handle.
4056 (thread_db_get_tls_address): New.
4057
32ca6d61
DJ
40582006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
4059
4060 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
4061 (linux_resume_one_process): Take a siginfo_t *. Update all
4062 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
4063 (struct pending_signals): Add a siginfo_t.
4064 (linux_wait_for_process): Always set last_status.
4065 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
4066 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
4067 * linux-low.h (struct process_info): Add last_status.
4068
5ffff7c1
DJ
40692006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
4070
4071 * remote-utils.c (try_rle): New function.
4072 (putpkt_binary): Use it.
4073
8695c747
DJ
40742006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
4075
4076 * Makefile.in (clean): Clean reg-x86-64-linux.c.
4077 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
4078 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
4079 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
4080 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
4081 point registers.
4082
290fadea
RS
40832006-08-08 Richard Sandiford <richard@codesourcery.com>
4084
4085 * server.c (terminal_fd): New variable.
4086 (old_foreground_pgrp): Likewise.
4087 (restore_old_foreground_pgrp): New function.
4088 (start_inferior): Record the terminal file descriptor in terminal_fd
4089 and its original foreground group in old_foreground_pgrp. Register
4090 restore_old_foreground_pgrp with atexit().
4091
9f2e1e63
DJ
40922006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
4093
4094 * server.c (handle_query): Correct qPart to qXfer.
4095
b80864fb
DJ
40962006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
4097
4098 * configure.ac: Check for more headers which are missing on
4099 Windows. Automatically supply -lwsock32 and USE_WIN32API.
4100 * configure.srv: Add Cygwin and mingw32.
4101 * remote-utils.c: Don't include headers unconditionally which
4102 are missing on mingw32. Include <winsock.h> for mingw32.
4103 (remote_open): Adjust for mingw32 support. Flush
4104 standard error after writing to it.
4105 (remote_close, putpkt_binary, input_interrupt, block_async_io)
4106 (unblock_async_io, enable_async_io, disable_async_io)
4107 (readchar, getpkt): Update for Winsock support.
4108 (prepare_resume_reply): Expect a protocol signal number.
4109 * server.c: Disable <sys/wait.h> on mingw32.
4110 (start_inferior): Adjust for mingw32 support. Flush
4111 standard error after writing to it.
4112 (attach_inferior): Likewise. Use protocol signal
4113 numbers.
4114 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
4115 and names.
4116 * win32-i386-low.c: New file.
4117 * Makefile.in (XM_CLIBS): Set.
4118 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
4119 (win32-i386-low.o): New dependency rule.
4120 * linux-low.c (linux_wait): Use target signal numbers.
4121 * target.h (struct target_ops): Doc fix.
4122 * server.h (target_signal_to_name): New prototype.
4123 * gdbreplay.c: Don't include headers unconditionally which
4124 are missing on mingw32. Include <winsock.h> for mingw32.
4125 (remote_close, remote_open): Adjust for Winsock support.
4126 * configure, config.in: Regenerated.
4127
0876f84a
DJ
41282006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
4129
4130 * server.c (decode_xfer_read, write_qxfer_response): New.
4131 (handle_query): Take a packet length argument. Handle
4132 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
4133 the qSupported response.
4134 (main): Update call to handle_query.
4135
01f9e8fa
DJ
41362006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
4137
4138 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
4139 (putpkt_binary): Renamed from putpkt and adjusted for binary
4140 data.
4141 (putpkt): New wrapper for putpkt_binary.
4142 (readchar): Don't mask off the high bit.
4143 (decode_X_packet): New function.
4144 * server.c (main): Call putpkt_binary if a handler sets the packet
4145 length. Save the length of the incoming packet. Handle 'X'.
4146 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
4147
be2a5f71
DJ
41482006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
4149
4150 * server.c (handle_query): Handle qSupported.
4151
ea025f5f
DJ
41522006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
4153
4154 * remote-utils.c (all_symbols_looked_up): New variable.
4155 (look_up_one_symbol): Check it.
4156 * server.h (look_up_one_symbol): New declaration.
4157 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
4158
9308fc88
DJ
41592006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
4160
4161 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 4162 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
4163 (PTRACE_GET_THREAD_AREA): Define.
4164 (ps_get_thread_area): New function.
4165
52fb6437
NS
41662006-05-09 Nathan Sidwell <nathan@codesourcery.com>
4167
4168 * configure.srv (m68k*-*-uclinux*): New target.
4169 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
4170 (linux_resume_one_process): Remove extraneous cast.
4171 (linux_read_offsets): New.
4172 (linux_target_op): Add linux_read_offsets on mmuless systems.
4173 * server.c (handle_query): Add qOffsets logic.
4174 * target.h (struct target_ops): Add read_offsets.
4175
21b0f40c
DJ
41762006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
4177
4178 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
4179 (PTRACE_GET_THREAD_AREA): Define.
4180 (ps_get_thread_area): New function.
4181 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
4182 (linux-x86-64-low.o): Update.
4183
0050a760
DJ
41842006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
4185
4186 * configure.ac: Remove checks for prfpregset_t.
4187 * gdb_proc_service.h: New file.
4188 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
4189 new "gdb_proc_service.h".
4190 * proc-service.c: Likewise.
4191 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
4192 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
4193 * Makefile.in (gdb_proc_service_h): Updated.
4194 * configure, config.in: Regenerated.
4195
b92a518e
DJ
41962006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
4197
4198 * remote-utils.c (prepare_resume_reply): Move declaration
4199 of gdb_id_from_wait to the top of the block.
4200
545587ee
DJ
42012006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
4202
4203 * linux-low.c (regsets_store_inferior_registers): Read the regset
4204 from the target before filling it.
4205
9db87ebd
DJ
42062006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
4207
4208 * server.c (attach_inferior): Return SIGTRAP for a successful
4209 attach.
4210
dd24457d
DJ
42112006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
4212
4213 * Makefile.in (OBS): Add version.o.
4214 (STAGESTUFF): Delete.
4215 (version.o): Add dependencies.
4216 (version.c): Replace rule.
4217 (clean): Remove version.c.
4218 * server.c (gdbserver_version): New.
4219 (gdbserver_usage): Use printf.
4220 (main): Handle --version and --help.
4221 * server.h (version, host_name): Add declarations.
4222
6f0f660e
EZ
42232005-12-23 Eli Zaretskii <eliz@gnu.org>
4224
4225 * linux-arm-low.c:
4226 * linux-arm-low.c:
4227 * inferiors.c:
4228 * i387-fp.h:
4229 * i387-fp.c:
4230 * gdbreplay.c:
4231 * regcache.c:
4232 * proc-service.c:
4233 * mem-break.h:
4234 * mem-break.c:
4235 * linux-x86-64-low.c:
4236 * linux-sh-low.c:
4237 * linux-s390-low.c:
4238 * linux-ppc64-low.c:
4239 * linux-ppc-low.c:
4240 * linux-mips-low.c:
4241 * linux-m68k-low.c:
4242 * linux-m32r-low.c:
4243 * linux-low.h:
4244 * linux-low.c:
4245 * linux-ia64-low.c:
4246 * linux-i386-low.c:
4247 * linux-crisv32-low.c:
4248 * thread-db.c:
4249 * terminal.h:
4250 * target.h:
4251 * target.c:
4252 * server.h:
4253 * server.c:
4254 * remote-utils.c:
4255 * regcache.h:
4256 * utils.c:
4257 * Makefile.in:
4258 * configure.ac:
4259 * gdbserver.1: Add (C) after Copyright. Update the FSF
4260 address.
4261
9d1fb177
DJ
42622005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
4263
4264 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
4265 (arm_breakpoint_at): Recognize both breakpoints.
4266 (the_low_target): Use the correct breakpoint instruction.
4267
011a70c2
DJ
42682005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
4269
4270 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
4271 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
4272 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
4273 (the_low_target): Update.
4274
7fb85e41
AS
42752005-10-25 Andreas Schwab <schwab@suse.de>
4276
4277 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
4278
4279 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
4280 (ia64_num_regs): Reduce to 462.
4281
3db0444b
DJ
42822005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
4283
4284 * acinclude.m4: Correct quoting.
4285 * aclocal.m4: Regenerated.
4286
4287 Suggested by SZOKOVACS Robert <szo@ies.hu>:
4288 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
4289 (thread_db_init): Call thread_db_err_str.
4290 * configure.ac: Check for TD_VERSION.
4291 * config.in, configure: Regenerated.
4292
bee0189a
DJ
42932005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4294
4295 * server.h (error, fatal, warning): Add ATTR_FORMAT.
4296
e9d25b98
DJ
42972005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
4298
4299 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
4300 is not available. Define HAVE_PTRACE_GETREGS if it is.
4301 * config.in, configure: Regenerated.
4302 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
4303 * linux-i386-low.c, linux-m68k-low.c: Update to use
4304 HAVE_PTRACE_GETREGS.
4305 * linux-low.c (regsets_fetch_inferior_registers)
4306 (regsets_store_inferior_registers): Only return 0 if we processed
4307 GENERAL_REGS.
4308 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
4309 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
4310
a06660f7
DJ
43112005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
4312
4313 * inferiors.c (struct thread_info): Add gdb_id.
4314 (add_thread): Add gdb_id argument.
4315 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
4316 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
4317 calls to add_thread.
4318 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
4319 * server.c (handle_query): Use thread_to_gdb_id.
4320 (handle_v_cont, main): Use gdb_id_to_thread_id.
4321 * server.h (add_thread): Update prototype.
4322 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
4323 prototypes.
4324
5a1f5858
DJ
43252005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
4326
4327 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
4328 left-padded registers.
4329 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
4330 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
4331
e122f1f5
SE
43322005-07-01 Steve Ellcey <sje@cup.hp.com>
4333
4334 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
4335 * configure: Regenerate.
4336 * config.in: Regenerate.
4337 * server.h (NEED_DECLARATION_STRERROR):
4338 Replace with !HAVE_DECL_STRERROR.
4339
d592fa2f
DJ
43402005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
4341
4342 * linux-low.c (linux_wait, linux_send_signal): Don't test
4343 an unsigned long variable for > 0 if it could be MAX_ULONG.
4344 * server.c (myresume): Likewise.
4345 * target.c (set_desired_inferior): Likewise.
4346
ccbd4912
MK
43472005-06-13 Mark Kettenis <kettenis@gnu.org>
4348
4349 * configure.ac: Simplify and improve check for socklen_t.
4350 * configure, config.in: Regenerate.
4351
f450004a
DJ
43522005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
4353
4354 * acconfig.h: Remove.
4355 * configure.ac: Add a test for socklen_t. Use three-argument
4356 AC_DEFINE throughout.
4357 * config.in: Regenerated using autoheader 2.59.
4358 * configure: Regenerated.
4359
4360 * gdbreplay.c (socklen_t): Provide a default.
4361 (remote_open): Use socklen_t.
4362 * remote-utils.c (socklen_t): Provide a default.
4363 (remote_open): Use socklen_t.
4364 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
4365 unsigned char.
4366
4367 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
4368 char for buffers.
4369 * linux-low.c (linux_read_memory, linux_write_memory)
4370 (linux_read_auxv): Likewise.
4371 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
4372 (check_mem_write): Likewise.
4373 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
4374 Likewise.
4375 * regcache.c (struct inferior_rgcache_data, registers_to_string)
4376 (registers_from_string, register_data): Likewise.
4377 * server.c (handle_query, main): Likewise.
4378 * server.h (convert_ascii_to_int, convert_int_to_ascii)
4379 (decode_M_packet): Likewise.
4380 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
4381 * target.h (struct target_ops): Update read_memory, write_memory,
4382 and read_auxv.
4383 (read_inferior_memory, write_inferior_memory): Update.
4384 * linux-low.h (struct linux_target_ops): Change type of breakpoint
4385 to unsigned char *.
4386 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
4387 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
4388 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
4389 linux-s390-low.c, linux-sh-low.c: Update for changes in
4390 read_inferior_memory and the_low_target->breakpoint.
4391
eee84df1
DJ
43922005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
4393
4394 * Makefile.in (SFILES): Add linux-ppc64-low.c.
4395 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
4396 * configure.srv: Add powerpc64-*-linux*.
4397 * linux-ppc64-low.c: New file.
4398
45b134e5
OF
43992005-05-23 Orjan Friberg <orjanf@axis.com>
4400
4401 * linux-cris-low.c: New file with support for CRIS.
4402 * linux-crisv32-low.c: Ditto for CRISv32.
4403 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
4404 (clean): Add reg-cris.c and reg-crisv32.c.
4405 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
4406 reg-crisv32.o, and reg-crisv32.c to make rules.
4407 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
4408 recognized targets.
4409
48d93c75
UW
44102005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
4411
4412 * linux-low.c (fetch_register): Ensure buffer size is a multiple
4413 of sizeof (PTRACE_XFER_TYPE).
4414 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
4415
e013ee27
OF
44162005-05-12 Orjan Friberg <orjanf@axis.com>
4417
4418 * target.h (struct target_ops): Add insert_watchpoint,
4419 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
4420 pointers for hardware watchpoint support.
4421 * linux-low.h (struct linux_target_ops): Ditto.
4422 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
4423 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
4424 to linux_target_ops.
4425 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
4426 reply packet.
4427 * server.c (main): Recognize 'Z' and 'z' packets.
4428
b0ded00b
UW
44292005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
4430
4431 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
4432 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
4433 (the_low_target): Add new members.
4434
8643e2ad
DJ
44352005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
4436
4437 * proc-service.c (ps_lgetregs): Search all_processes instead of
4438 all_threads.
4439
fc620387
DJ
44402005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
4441
4442 * server.c (start_inferior): Change return type to int.
4443 (attach_inferior): Change sigptr to int *.
4444 (handle_v_cont, handle_v_requests): Change signal to int *.
4445 (main): Change signal to int.
4446
44472005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
4448
4449 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
4450 * configure.srv: Add m32r*-*-linux*.
4451 * linux-m32r-low.c: New file.
4452
e0e76420
DJ
44532005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
4454
4455 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
4456
a1928bad
DJ
44572005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
4458
4459 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
4460 Take unsigned long arguments for PIDs.
4461 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
4462 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
4463 (wait_for_sigstop, linux_resume_one_process)
4464 (regsets_fetch_inferior_registers, linux_send_signal)
4465 (linux_read_auxv): Likewise. Update the types of variables holding
4466 PIDs. Update format string specifiers.
4467 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
4468 * remote-utils.c (prepare_resume_reply): Likewise.
4469 * server.c (cont_thread, general_thread, step_thread)
4470 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
4471 unsigned long.
4472 (handle_query): Update format specifiers.
4473 (handle_v_cont, main): Use strtoul for thread IDs.
4474 * server.h (struct inferior_list_entry): Use unsigned long for ID.
4475 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
4476 (general_thread, step_thread, thread_from_wait)
4477 (old_thread_from_wait): Update.
4478 * target.h (struct thread_resume): Use unsigned long for THREAD.
4479 (struct target_ops): Use unsigned long for arguments to attach and
4480 thread_alive.
4481
dcdb98d2
DJ
44822005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
4483
4484 * acinclude.m4: Include bfd/bfd.m4 directly.
4485 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
4486 <agriffis@toolchain.org>.
4487 * aclocal.m4, configure: Regenerated.
4488
bec39cab
AC
44892005-01-07 Andrew Cagney <cagney@gnu.org>
4490
4491 * configure.ac: Rename configure.in, require autoconf 2.59.
4492 * configure: Re-generate.
4493
434c4c77
DJ
44942004-12-08 Daniel Jacobowitz <dan@debian.org>
4495
4496 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
4497 LIBS when finished.
4498 * aclocal.m4: Regenerated.
4499 * configure: Regenerated.
4500
db1d3e1b
AS
45012004-11-21 Andreas Schwab <schwab@suse.de>
4502
4503 * linux-m68k-low.c (m68k_num_gregs): Define.
4504 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
4505 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
4506 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
4507 (m68k_breakpoint_at): New. Add to the_low_target.
4508
4509 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
4510 srv_linux_thread_db to yes.
4511
43360365
JB
45122004-10-20 Joel Brobecker <brobecker@gnat.com>
4513
4514 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
4515 (ARCH_SET_FS): Likewise.
4516 (ARCH_GET_FS): Likewise.
4517 (ARCH_GET_GS): Likewise.
4518
fd500816
DJ
45192004-10-16 Daniel Jacobowitz <dan@debian.org>
4520
4521 * linux-i386-low.c (ps_get_thread_area): New.
4522 * linux-x86-64-low.c (ps_get_thread_area): New.
4523 * linux-low.c: Include <sys/syscall.h>.
4524 (linux_kill_one_process): Don't kill the first thread here.
4525 (linux_kill): Kill the first thread here.
4526 (kill_lwp): New function.
4527 (send_sigstop, linux_send_signal): Use it.
4528 * proc-service.c: Clean up #ifdefs.
4529 (fpregset_info): Delete.
4530 (ps_lgetregs): Update and enable implementation.
4531 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
4532 implementations.
4533 * remote-utils.c (struct sym_cache, symbol_cache): New.
4534 (input_interrupt): Print a clearer message.
4535 (async_io_enabled): New variable.
4536 (enable_async_io, disable_async_io): Use it. Update comments.
4537 (look_up_one_symbol): Use the symbol cache.
4538 * thread-db.c (thread_db_look_up_symbols): New function.
4539 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
4540
f6de3c42
DJ
45412004-10-16 Daniel Jacobowitz <dan@debian.org>
4542
4543 * configure.in: Test for -rdynamic.
4544 * configure: Regenerated.
4545 * Makefile (INTERNAL_LDFLAGS): New.
4546 (gdbserver, gdbreplay): Use it.
4547
2c0fc042
AC
45482004-09-02 Andrew Cagney <cagney@gnu.org>
4549
4550 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
4551
075b3282
DJ
45522004-03-23 Daniel Jacobowitz <drow@mvista.com>
4553
4554 * linux-low.c (linux_wait): Clear all_processes list also.
4555
fa6a77dc
DJ
45562004-03-12 Daniel Jacobowitz <drow@mvista.com>
4557
4558 * linux-low.c: Include <errno.h>. Remove extern declaration of
4559 errno.
4560
6d782a97
DJ
45612004-03-12 Daniel Jacobowitz <drow@mvista.com>
4562
4563 * gdbreplay.c, server.h, utils.c: Update copyright years.
4564
3a7fb99b
DJ
45652004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
4566
4567 * server.c (main): Print child status or termination signal from
4568 variable 'signal', not 'sig'.
4569
c3e735a6
DJ
45702004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
4571
4572 * linux-low.c (linux_read_memory): Change return type to
4573 int. Check for and return error from ptrace().
4574 * target.c (read_inferior_memory): Change return type to int. Pass
4575 back return status from the_target->read_memory().
4576 * target.h (struct target_ops): Adapt *read_memory() prototype.
4577 Update comment.
4578 (read_inferior_memory): Adapt prototype.
4579 * server.c (main): Return an error packet if
4580 read_inferior_memory() returns an error.
4581
a59d1c82
DJ
45822004-03-04 Daniel Jacobowitz <drow@mvista.com>
4583
4584 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
4585 Unify with other clean targets.
4586
dc3f8883
DJ
45872004-02-29 Daniel Jacobowitz <drow@mvista.com>
4588
4589 * server.c (handle_v_cont): Call set_desired_inferior.
4590
89a208da
DJ
45912004-02-29 Daniel Jacobowitz <drow@mvista.com>
4592
4593 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
4594
62ea82f5
DJ
45952004-02-29 Daniel Jacobowitz <drow@mvista.com>
4596
4597 * linux-low.c (linux_wait): Unblock async I/O.
4598 (linux_resume): Block and enable async I/O.
4599 * remote-utils.c (block_async_io, unblock_async_io): New functions.
4600 * server.h (block_async_io, unblock_async_io): Add prototypes.
4601
6910d122
DJ
46022004-02-29 Daniel Jacobowitz <drow@mvista.com>
4603
4604 * remote-utils.c (remote_open): Print a status notice after
4605 opening a TCP port.
4606 * server.c (attach_inferior): Print a status notice after
4607 attaching.
4608
46092004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
4610
4611 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
4612
c89dc5d4
DJ
46132004-02-26 Daniel Jacobowitz <drow@mvista.com>
4614
4615 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
4616 error packet.
4617 * server.c, target.h: Update copyright years.
4618
4b8dad4a
RM
46192004-02-25 Roland McGrath <roland@redhat.com>
4620
4621 * target.h (struct target_ops): New member `read_auxv'.
4622 * server.c (handle_query): Handle qPart:auxv:read: query using that.
4623 * linux-low.c (linux_read_auxv): New function.
4624 (linux_target_ops): Initialize `read_auxv' member to that.
4625
d7446758
JB
46262004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
4627
4628 Committed by Jim Blandy <jimb@redhat.com>.
4629
4630 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 4631 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
4632 instead of GPR_SIZE to distiguish s390 and s390x targets.
4633
5544ad89
DJ
46342004-01-31 Daniel Jacobowitz <drow@mvista.com>
4635
4636 * linux-low.c: Update copyright year.
4637 (check_removed_breakpoint): Clear pending_is_breakpoint.
4638 (linux_set_resume_request, linux_queue_one_thread)
4639 (resume_status_pending_p): New functions.
4640 (linux_continue_one_thread): Use process->resume.
4641 (linux_resume): Only resume threads if there are no pending events.
4642 * linux-low.h (struct process_info): Add resume request
4643 pointer.
4644
2a68b70e
DJ
46452004-01-30 Daniel Jacobowitz <drow@mvista.com>
4646
4647 * regcache.c (new_register_cache): Clear the allocated register
4648 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
4649
64386c31
DJ
46502003-10-13 Daniel Jacobowitz <drow@mvista.com>
4651
4652 * linux-low.c (linux_resume): Take a struct thread_resume *
4653 argument.
4654 (linux_wait): Update call.
4655 (resume_ptr): New static variable.
4656 (linux_continue_one_thread): Renamed from
4657 linux_continue_one_process. Use resume_ptr.
4658 (linux_resume): Use linux_continue_one_thread.
4659 * server.c (handle_v_cont, handle_v_requests): New functions.
4660 (myresume): New function.
4661 (main): Handle 'v' case.
4662 * target.h (struct thread_resume): New type.
4663 (struct target_ops): Change argument of "resume" to struct
4664 thread_resume *.
4665 (myresume): Delete macro.
4666
c938e9b0
L
46672003-08-08 H.J. Lu <hongjiu.lu@intel.com>
4668
4669 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
4670 (uninstall): Support DESTDIR.
4671
7f313d07
BC
4672Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
4673
4674 * configure.srv: Add xscale*linux copy of arm*linux entry.
4675
3b2fc2ea
DJ
46762003-07-24 Daniel Jacobowitz <drow@mvista.com>
4677
4678 * linux-arm-low.c (arm_reinsert_addr): New function.
4679 (the_low_target): Add arm_reinsert_addr.
4680
1c0a559e
MK
46812003-07-08 Mark Kettenis <kettenis@gnu.org>
4682
4683 * mem-break.c: Remove whitespace at end of file.
4684
43d5792c
DJ
46852003-06-28 Daniel Jacobowitz <drow@mvista.com>
4686
4687 * configure.in: Check whether we need to prototype strerror.
4688 * server.h: Optionally prototype strerror.
4689 * gdbreplay.c (perror_with_name): Use strerror.
4690 * linux-low.c (linux_attach_lwp): Use strerror.
4691 * utils.c (perror_with_name): Use strerror.
4692 * config.in, configure: Regenerated.
4693
c8a86edf
DJ
46942003-06-28 Daniel Jacobowitz <drow@mvista.com>
4695
4696 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
4697 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
4698
73d37363
DJ
46992003-06-20 Daniel Jacobowitz <drow@mvista.com>
4700
4701 * Makefile.in (SFILES): Update.
4702 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
4703 low-sun3.c: Remove files.
4704
6ad8ae5c
DJ
47052003-06-17 Daniel Jacobowitz <drow@mvista.com>
4706
4707 * linux-low.c: Move comment to linux_thread_alive where it belonged.
4708 (linux_detach_one_process, linux_detach): New functions.
4709 (linux_target_ops): Add linux_detach.
4710 * server.c (main): Handle 'D' packet.
4711 * target.h (struct target_ops): Add "detach" member.
4712 (detach_inferior): Define.
4713
1581182a
MK
47142003-06-13 Mark Kettenis <kettenis@gnu.org>
4715
4716 From Kelley Cook <kelleycook@wideopenwest.com>:
4717 * configure.srv: Accept i[34567]86 variants.
4718
e5379b03
DJ
47192003-06-05 Daniel Jacobowitz <drow@mvista.com>
4720
4721 * linux-low.c (linux_wait_for_event): Correct comment typos.
4722 (linux_resume_one_process): Call check_removed_breakpoint.
4723 (linux_send_signal): New function.
4724 (linux_target_ops): Add linux_send_signal.
4725 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
4726 of kill.
4727 * target.h (struct target_ops): Add send_signal.
4728
2ff29de4
JB
47292003-05-29 Jim Blandy <jimb@redhat.com>
4730
4731 * linux-low.c (usr_store_inferior_registers): Transfer buf in
4732 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
4733 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
4734 away part of the register's value.
4735
254787d4
DJ
47362003-03-26 Daniel Jacobowitz <drow@mvista.com>
4737
4738 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
4739 (linux_wait_for_event, linux_init_signals): Likewise.
4740
94e10508
DJ
47412003-03-17 Daniel Jacobowitz <drow@mvista.com>
4742
4743 * configure.in: Check for stdlib.h.
4744 * configure: Regenerated.
4745 * config.in: Regenerated.
4746
4c0711e0
DJ
47472003-01-04 Andreas Schwab <schwab@suse.de>
4748
4749 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
4750
ef66e766
AC
47512003-01-02 Andrew Cagney <ac131313@redhat.com>
4752
4753 * Makefile.in: Remove obsolete code.
4754
a1358604
DJ
47552002-11-20 Daniel Jacobowitz <drow@mvista.com>
4756
4757 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
4758 defined(PT_FPR0_HI).
4759
23ce3b1c
DJ
47602002-11-17 Stuart Hughes <seh@zee2.com>
4761
4762 * linux-arm-low.c (arm_num_regs): Increase.
4763 (arm_regmap): Include status register.
4764
47652002-11-17 Daniel Jacobowitz <drow@mvista.com>
4766
4767 * linux-low.c (register_addr): Remove incorrect -1 check.
4768
a9fa9f7d
DJ
47692002-08-29 Daniel Jacobowitz <drow@mvista.com>
4770
4771 * linux-low.c (linux_create_inferior): Call setpgid. Return
4772 the new PID.
4773 (unstopped_p, linux_signal_pid): Remove.
4774 (linux_target_ops): Remove linux_signal_pid.
4775 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
4776 global instead of target method.
4777 * target.h (struct target_ops): Remove signal_pid. Update comment
4778 for create_inferior.
4779 * server.c (signal_pid): New variable.
4780 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 4781 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
4782 (attach_inferior): Set signal_pid.
4783
17574093
DJ
47842002-08-23 Daniel Jacobowitz <drow@mvista.com>
4785
4786 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
4787
47882002-08-20 Jim Blandy <jimb@redhat.com>
4789
4790 * Makefile.in (LDFLAGS): Allow the configure script to establish a
4791 default for this.
4792
47932002-08-01 Andrew Cagney <cagney@redhat.com>
4794
4795 * Makefile.in: Make chill references obsolete.
4796
47972002-07-24 Kevin Buettner <kevinb@redhat.com>
4798
4799 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
4800 * configure: Regenerate.
4801 * config.in: Regenerate.
4802
48032002-07-09 David O'Brien <obrien@FreeBSD.org>
4804
4805 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
4806 (perror_with_name, remote_close, remote_open, expect, play): Static.
4807
48082002-07-04 Michal Ludvig <mludvig@suse.cz>
4809
4b8dad4a 4810 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
4811 byte offsets instead of an array of indexes.
4812 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
4813
48142002-06-13 Daniel Jacobowitz <drow@mvista.com>
4815
4816 * regcache.c: Add comment.
4817
48182002-06-11 Daniel Jacobowitz <drow@mvista.com>
4819
4820 * thread-db.c: New file.
4821 * proc-service.c: New file.
4822 * acinclude.m4: New file.
4823 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
4824 proc-service.o, and thread-db.o.
4825 (linux-low.o): Add USE_THREAD_DB.
4826 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
4827 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
4828 * aclocal.m4: Regenerated.
4829 * config.in: Regenerated.
4830 * configure: Regenerated.
4831 * configure.in: Check for proc_service.h, sys/procfs.h,
4832 thread_db.h, and linux/elf.h headrs.
4833 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
4834 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
4835 Check for -lthread_db and thread support.
4836 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
4837 PowerPC, and SuperH.
4838 * i387-fp.c: Constify arguments.
4839 * i387-fp.h: Likewise.
4840 * inferiors.c: (struct thread_info): Renamed from
4841 `struct inferior_info'. Remove PID member. Use generic inferior
4842 list header. All uses updated.
4843 (inferiors, signal_pid): Removed.
4844 (all_threads): New variable.
4845 (get_thread): Define.
4846 (add_inferior_to_list): New function.
4847 (for_each_inferior): New function.
4848 (change_inferior_id): New function.
4849 (add_inferior): Removed.
4850 (remove_inferior): New function.
4851 (add_thread): New function.
4852 (free_one_thread): New function.
4853 (remove_thread): New function.
4854 (clear_inferiors): Use for_each_inferior and free_one_thread.
4855 (find_inferior): New function.
4856 (find_inferior_id): New function.
4857 (inferior_target_data): Update argument type.
4858 (set_inferior_target_data): Likewise.
4859 (inferior_regcache_data): Likewise.
4860 (set_inferior_regcache_data): Likewise.
4861 * linux-low.c (linux_bp_reinsert): Remove.
4862 (all_processes, stopping_threads, using_thrads)
4863 (struct pending_signals, debug_threads, pid_of): New.
4864 (inferior_pid): Replace with macro.
4865 (struct inferior_linux_data): Remove.
4866 (get_stop_pc, add_process): New functions.
4867 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
4868 Use add_process and add_thread.
4869 (linux_attach_lwp): New function, based on old linux_attach. Use
4870 add_process and add_thread. Set stop_expected for new threads.
4871 (linux_attach): New function.
4872 (linux_kill_one_process): New function.
4873 (linux_kill): Kill all LWPs.
4874 (linux_thread_alive): Use find_inferior_id.
4875 (check_removed_breakpoints, status_pending_p): New functions.
4876 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
4877 Update. Use WNOHANG. Wait for cloned processes also. Update process
4878 struct for the found process.
4879 (linux_wait_for_event): New function.
4880 (linux_wait): Use it. Support LWPs.
4881 (send_sigstop, wait_for_sigstop, stop_all_processes)
4882 (linux_resume_one_process, linux_continue_one_process): New functions.
4883 (linux_resume): Support LWPs.
4884 (REGISTER_RAW_SIZE): Remove.
4885 (fetch_register): Use register_size instead. Call supply_register.
4886 (usr_store_inferior_registers): Likewise. Call collect_register.
4887 Fix recursive case.
4888 (regsets_fetch_inferior_registers): Improve error message.
4889 (regsets_store_inferior_registers): Add debugging.
4890 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
4891 (unstopped_p, linux_signal_pid): New functions.
4892 (linux_target_ops): Add linux_signal_pid.
4893 (linux_init_signals): New function.
4894 (initialize_low): Call it. Initialize using_threads.
4895 * regcache.c (inferior_regcache_data): Add valid
4896 flag.
4897 (get_regcache): Fetch registers lazily. Add fetch argument
4898 and update all callers.
4899 (regcache_invalidate_one, regcache_invalidate): New
4900 functions.
4901 (new_register_cache): Renamed from create_register_cache.
4902 Return the new regcache.
4903 (free_register_cache): Change argument to a void *.
4904 (registers_to_string, registers_from_string): Call get_regcache
4905 with fetch flag set.
4906 (register_data): Make static. Pass fetch flag to get_regcache.
4907 (supply_register): Call get_regcache with fetch flag clear.
4908 (collect_register): Call get_regcache with fetch flag set.
4909 (collect_register_as_string): New function.
4910 * regcache.h: Update.
4911 * remote-utils.c (putpkt): Flush after debug output and use
4912 stderr.
4913 Handle input interrupts while waiting for an ACK.
4914 (input_interrupt): Use signal_pid method.
4915 (getpkt): Flush after debug output and use stderr.
4916 (outreg): Use collect_register_as_string.
4917 (new_thread_notify, dead_thread_notify): New functions.
4918 (prepare_resume_reply): Check using_threads. Set thread_from_wait
4919 and general_thread.
4920 (look_up_one_symbol): Flush after debug output.
4921 * server.c (step_thread, server_waiting): New variables.
4922 (start_inferior): Don't use signal_pid. Update call to mywait.
4923 (attach_inferior): Update call to mywait.
4924 (handle_query): Handle qfThreadInfo and qsThreadInfo.
4925 (main): Don't fetch/store registers explicitly. Use
4926 set_desired_inferior. Support proposed ``Hs'' packet. Update
4927 calls to mywait.
4928 * server.h: Update.
4929 (struct inferior_list, struct_inferior_list_entry): New.
4930 * target.c (set_desired_inferior): New.
4931 (write_inferior_memory): Constify.
4932 (mywait): New function.
4933 * target.h: Update.
4934 (struct target_ops): New signal_pid method.
4935 (mywait): Removed macro, added prototype.
4936
4937 * linux-low.h (regset_func): Removed.
4938 (regset_fill_func, regset_store_func): New.
4939 (enum regset_type): New.
4940 (struct regset_info): Add type field. Use new operation types.
4941 (struct linux_target_ops): stop_pc renamed to get_pc.
4942 Add decr_pc_after_break and breakpoint_at.
4943 (get_process, get_thread_proess, get_process_thread)
4944 (strut process_info, all_processes, linux_attach_lwp)
4945 (thread_db_init): New.
4946
4947 * linux-arm-low.c (arm_get_pc, arm_set_pc,
4948 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
4949 (the_low_target): Add new members.
4950 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
4951 (i386_store_fpxregset): Constify.
4952 (target_regsets): Add new kind identifier.
4953 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
4954 (i386_set_pc): Add debugging.
4955 (i386_breakpoint_at): New function.
4956 (the_low_target): Add new members.
4957 * linux-mips-low.c (mips_get_pc, mips_set_pc)
4958 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
4959 (mips_breakpoint_at): New.
4960 (the_low_target): Add new members.
4961 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
4962 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
4963 (the_low_target): Add new members.
4964 * linux-sh-low.c (sh_get_pc, sh_set_pc)
4965 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
4966 (the_low_target): Add new members.
4967 * linux-x86-64-low.c (target_regsets): Add new kind
4968 identifier.
4969
49702002-05-15 Daniel Jacobowitz <drow@mvista.com>
4971
4972 From Martin Pool <mbp@samba.org>:
4973 * server.c (gdbserver_usage): New function.
4974 (main): Call it.
4975
49762002-05-14 Daniel Jacobowitz <drow@mvista.com>
4977
4978 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
4979 stop_at -> stop_pc.
4980
49812002-05-04 Andrew Cagney <ac131313@redhat.com>
4982
4983 * Makefile.in: Remove obsolete code.
4984
49852002-04-24 Michal Ludvig <mludvig@suse.cz>
4986
4987 * linux-low.c (regsets_fetch_inferior_registers),
4988 (regsets_store_inferior_registers): Removed cast to int from
4989 ptrace() calls.
4990 * regcache.h: Added declaration of struct inferior_info.
4991
49922002-04-20 Daniel Jacobowitz <drow@mvista.com>
4993
4994 * inferiors.c (struct inferior_info): Add regcache_data.
4995 (add_inferior): Call create_register_cache.
4996 (clear_inferiors): Call free_register_cache.
4997 (inferior_regcache_data, set_inferior_regcache_data): New functions.
4998 * regcache.c (struct inferior_regcache_data): New.
4999 (registers): Remove.
5000 (get_regcache): New function.
5001 (create_register_cache, free_register_cache): New functions.
5002 (set_register_cache): Don't initialize the register cache here.
5003 (registers_to_string, registers_from_string, register_data): Call
5004 get_regcache.
5005 * regcache.h: Add prototypes.
5006 * server.h: Likewise.
5007
50082002-04-20 Daniel Jacobowitz <drow@mvista.com>
5009
5010 * mem-break.c: New file.
5011 * mem-break.h: New file.
5012 * Makefile.in: Add mem-break.o rule; update server.h
5013 dependencies.
5014 * inferiors.c (struct inferior_info): Add target_data
5015 member.
5016 (clear_inferiors): Free target_data member if set.
5017 (inferior_target_data, set_inferior_target_data): New functions.
5018 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
5019 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
5020 * linux-low.c (linux_bp_reinsert): New variable.
5021 (struct inferior_linux_data): New.
5022 (linux_create_inferior): Use set_inferior_target_data.
5023 (linux_attach): Likewise. Call add_inferior.
5024 (linux_wait_for_one_inferior): New function.
5025 (linux_wait): Call it.
5026 (linux_write_memory): Add const.
5027 (initialize_low): Call set_breakpoint_data.
5028 * linux-low.h (struct linux_target_ops): Add breakpoint
5029 handling members.
5030 * server.c (attach_inferior): Remove extra add_inferior
5031 call.
5032 * server.h: Include mem-break.h. Update inferior.c
5033 prototypes.
5034 * target.c (read_inferior_memory)
5035 (write_inferior_memory): New functions.
5036 * target.h (read_inferior_memory)
5037 (write_inferior_memory): Change macros to prototypes.
5038 (struct target_ops): Update comments. Add const to write_memory
5039 definition.
5040
50412002-04-11 Daniel Jacobowitz <drow@mvista.com>
5042
5043 * linux-low.c (usr_store_inferior_registers): Support
5044 registers which are allowed to fail to store.
5045 * linux-low.h (linux_target_ops): Likewise.
5046 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
5047 (ppc_cannot_store_register): FPSCR may not be storable.
5048
50492002-04-09 Daniel Jacobowitz <drow@mvista.com>
5050
5051 * server.h: Include <string.h> if HAVE_STRING_H.
5052 * ChangeLog: Correct paths in last ChangeLog entry.
5053
50542002-04-09 Daniel Jacobowitz <drow@mvista.com>
5055
5056 * linux-low.h: Remove obsolete prototypes.
5057 (struct linux_target_ops): New.
5058 (extern the_low_target): New.
5059 * linux-low.c (num_regs, regmap): Remove declarations.
5060 (register_addr): Use the_low_target explicitly.
5061 (fetch_register): Likewise.
5062 (usr_fetch_inferior_registers): Likewise.
5063 (usr_store_inferior_registers): Likewise.
5064 * linux-arm-low.c (num_regs): Remove.
5065 (arm_num_regs): Define.
5066 (arm_regmap): Renamed from regmap, made static.
5067 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
5068 made static.
5069 (arm_cannot_store_register): Renamed from cannot_store_register,
5070 made static.
5071 (the_low_target): New.
5072 * linux-i386-low.c (num_regs): Remove.
5073 (i386_num_regs): Define.
5074 (i386_regmap): Renamed from regmap, made static.
5075 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
5076 made static.
5077 (i386_cannot_store_register): Renamed from cannot_store_register,
5078 made static.
5079 (the_low_target): New.
5080 * linux-ia64-low.c (num_regs): Remove.
5081 (ia64_num_regs): Define.
5082 (ia64_regmap): Renamed from regmap, made static.
5083 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
5084 made static.
5085 (ia64_cannot_store_register): Renamed from cannot_store_register,
5086 made static.
5087 (the_low_target): New.
5088 * linux-m68k-low.c (num_regs): Remove.
5089 (m68k_num_regs): Define.
5090 (m68k_regmap): Renamed from regmap, made static.
5091 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
5092 made static.
5093 (m68k_cannot_store_register): Renamed from cannot_store_register,
5094 made static.
5095 (the_low_target): New.
5096 * linux-mips-low.c (num_regs): Remove.
5097 (mips_num_regs): Define.
5098 (mips_regmap): Renamed from regmap, made static.
5099 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
5100 made static.
5101 (mips_cannot_store_register): Renamed from cannot_store_register,
5102 made static.
5103 (the_low_target): New.
5104 * linux-ppc-low.c (num_regs): Remove.
5105 (ppc_num_regs): Define.
5106 (ppc_regmap): Renamed from regmap, made static.
5107 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
5108 made static.
5109 (ppc_cannot_store_register): Renamed from cannot_store_register,
5110 made static.
5111 (the_low_target): New.
5112 * linux-s390-low.c (num_regs): Remove.
5113 (s390_num_regs): Define.
5114 (s390_regmap): Renamed from regmap, made static.
5115 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
5116 made static.
5117 (s390_cannot_store_register): Renamed from cannot_store_register,
5118 made static.
5119 (the_low_target): New.
5120 * linux-sh-low.c (num_regs): Remove.
5121 (sh_num_regs): Define.
5122 (sh_regmap): Renamed from regmap, made static.
5123 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
5124 made static.
5125 (sh_cannot_store_register): Renamed from cannot_store_register,
5126 made static.
5127 (the_low_target): New.
5128 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
5129 (the_low_target): New.
5130
51312002-04-09 Daniel Jacobowitz <drow@mvista.com>
5132
5133 * Makefile.in: Add stamp-h target.
5134 * configure.in: Create stamp-h.
5135 * configure: Regenerated.
5136
51372002-04-09 Daniel Jacobowitz <drow@mvista.com>
5138
5139 * inferiors.c: New file.
5140 * target.c: New file.
5141 * target.h: New file.
5142 * Makefile.in: Add target.o and inferiors.o. Update
5143 dependencies.
5144 * linux-low.c (inferior_pid): New static variable,
5145 moved from server.c.
5146 (linux_create_inferior): Renamed from create_inferior.
5147 Call add_inferior. Return 0 on success instead of a PID.
5148 (linux_attach): Renamed from myattach.
5149 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
5150 (linux_thread_alive): Renamed from mythread_alive.
5151 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
5152 child dies.
5153 (linux_resume): Renamed from myresume. Add missing ``return 0''.
5154 (regsets_store_inferior_registers): Correct error message.
5155 Add missing ``return 0''.
5156 (linux_fetch_registers): Renamed from fetch_inferior_registers.
5157 (linux_store_registers): Renamed from store_inferior_registers.
5158 (linux_read_memory): Renamed from read_inferior_memory.
5159 (linux_write_memory): Renamed from write_inferior_memory.
5160 (linux_target_ops): New structure.
5161 (initialize_low): Call set_target_ops ().
5162 * remote-utils.c (unhexify): New function.
5163 (hexify): New function.
5164 (input_interrupt): Send signals to ``signal_pid''.
5165 * server.c (inferior_pid): Remove.
5166 (start_inferior): Update create_inferior call.
5167 (attach_inferior): Call add_inferior.
5168 (handle_query): New function.
5169 (main): Call handle_query for `q' packets.
5170 * server.h: Include "target.h". Remove obsolete prototypes.
5171 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
5172
51732002-04-09 Daniel Jacobowitz <drow@mvista.com>
5174
5175 * Makefile.in: Add WARN_CFLAGS. Update configury
5176 dependencies.
5177 * configure.in: Check for <string.h>
5178 * configure: Regenerate.
5179 * config.in: Regenerate.
5180 * gdbreplay.c: Include needed system headers.
5181 (remote_open): Remove strchr prototype.
5182 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
5183 * regcache.c (supply_register): Change buf argument to const void *.
5184 (supply_register_by_name): Likewise.
5185 (collect_register): Change buf argument to void *.
5186 (collect_register_by_name): Likewise.
5187 * regcache.h: Add missing prototypes.
5188 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
5189 * server.c (handle_query): New function.
5190 (attached): New static variable, moved out of main.
5191 (main): Quiet longjmp clobber warnings.
5192 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
5193 * utils.c (error): Remove NORETURN.
5194 (fatal): Likewise.
This page took 0.773656 seconds and 4 git commands to generate.