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