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