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