]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/gdbserver/ChangeLog
2010-04-12 Phil Muldoon <pmuldoon@redhat.com>
[thirdparty/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
8336d594
PA
12010-04-11 Pedro Alves <pedro@codesourcery.com>
2
3 GDBserver disconnected tracing support.
4
5 * linux-low.c (linux_remove_process): Delete.
6 (add_lwp): Don't set last_resume_kind here.
7 (linux_kill): Use `mourn'.
8 (linux_detach): Use `thread_db_detach', and `mourn'.
9 (linux_mourn): New.
10 (linux_attach_lwp_1): Adjust comment.
11 (linux_attach): last_resume_kind moved the thread_info; adjust.
12 (status_pending_p_callback): Adjust.
13 (linux_wait_for_event_1): Adjust.
14 (count_events_callback, select_singlestep_lwp_callback)
15 (select_event_lwp_callback, cancel_breakpoints_callback)
16 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
17 (proceed_one_lwp): Adjust.
18 (linux_async): Add debug output.
19 (linux_thread_stopped): New.
20 (linux_pause_all): New.
21 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
22 linux_pause_all.
23 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
24 (thread_db_free): Delete declaration.
25 (thread_db_detach, thread_db_mourn): Declare.
26 * thread-db.c (thread_db_init): Use thread_db_mourn.
27 (thread_db_free): Delete, split in two.
28 (disable_thread_event_reporting): New.
29 (thread_db_detach): New.
30 (thread_db_mourn): New.
31
32 * server.h (struct thread_info) <last_resume_kind>: New field.
33 <attached>: Add comment.
34 <gdb_detached>: New field.
35 (handler_func): Change return type to int.
36 (handle_serial_event, handle_target_event): Ditto.
37 (gdb_connected): Declare.
38 (tracing): Delete.
39 (disconnected_tracing): Declare.
40 (stop_tracing): Declare.
41
42 * server.c (handle_query) <qSupported>: Report support for
43 disconnected tracing.
44 (queue_stop_reply_callback): Account for running threads.
45 (gdb_wants_thread_stopped): New.
46 (gdb_wants_all_threads_stopped): New.
47 (gdb_reattached_process): New.
48 (handle_status): Clear the `gdb_detached' flag of all processes.
49 In all-stop, stop all threads.
50 (main): Be sure to leave tfind mode. Handle disconnected tracing.
51 (process_serial_event): If the remote connection breaks, or if an
52 exit was forced with "monitor exit", force an event loop exit.
53 Handle disconnected tracing on detach.
54 (handle_serial_event): Adjust.
55 (handle_target_event): If GDB isn't connected, forward events back
56 to the inferior, unless the last process exited, in which case,
57 exit gdbserver. Adjust interface.
58
59 * remote-utils.c (remote_open): Don't block in accept. Instead
60 register an event loop source on the listen socket file
61 descriptor. Refactor bits into ...
62 (listen_desc): ... this new global.
63 (gdb_connected): ... this new function.
64 (enable_async_notification): ... this new function.
65 (handle_accept_event): ... this new function.
66 (remote_close): Clear remote_desc.
67
68 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
69
70 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
71 New fields.
72 (mourn_inferior): Define.
73 (target_process_qsupported): Avoid the dangling else problem.
74 (thread_stopped): Define.
75 (pause_all): Define.
76 (target_waitstatus_to_string): Declare.
77 * target.c (target_waitstatus_to_string): New.
78
79 * tracepoint.c (tracing): Make extern.
80 (disconnected_tracing): New.
81 (stop_tracing): Make extern. Handle tracing stops due to GDB
82 disconnecting.
83 (cmd_qtdisconnected): New.
84 (cmd_qtstatus): Report disconnected tracing status in trace reply.
85 (handle_tracepoint_general_set): Handle QTDisconnected.
86
87 * event-loop.c (event_handler_func): Change return type to int.
88 (process_event): Bail out if the event handler wants the event
89 loop to stop.
90 (handle_file_event): Ditto.
91 (start_event_loop): Bail out if the event handler wants the event
92 loop to stop.
93
94 * nto-low.c (nto_target_ops): Adjust.
95 * spu-low.c (spu_wait): Don't remove the process here.
96 (spu_target_ops): Adjust.
97 * win32-low.c (win32_wait): Don't remove the process here.
98 (win32_target_ops): Adjust.
99
5d267c4c
PA
1002010-04-11 Pedro Alves <pedro@codesourcery.com>
101
102 * regcache.c (realloc_register_cache): Invalidate inferior's
103 regcache before recreating it.
104
623ccd72
PA
1052010-04-09 Pedro Alves <pedro@codesourcery.com>
106
107 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
108
219f2f23
PA
1092010-04-09 Stan Shebs <stan@codesourcery.com>
110 Pedro Alves <pedro@codesourcery.com>
111
112 * server.h (LONGEST): New.
113 (struct thread_info) <while_stepping>: New field.
114 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
115 Declare.
116 (initialize_tracepoint, handle_tracepoint_general_set)
117 (handle_tracepoint_query, tracepoint_finished_step)
118 (tracepoint_was_hit, release_while_stepping_state_list):
119 (current_traceframe): Declare.
120 * server.c (handle_general_set): Handle tracepoint packets.
121 (read_memory): New.
122 (write_memory): New.
123 (handle_search_memory_1): Use read_memory.
124 (handle_query): Report support for conditional tracepoints, trace
125 state variables, and tracepoint sources. Handle tracepoint
126 queries.
127 (main): Initialize the tracepoints module.
128 (process_serial_event): Handle traceframe reads/writes.
129
130 * linux-low.c (handle_tracepoints): New.
131 (linux_wait_1): Call it.
132 (linux_resume_one_lwp): Handle while-stepping.
133 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
134 (linux_target_ops): Install them.
135 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
136 New field.
137 * linux-x86-low.c (x86_supports_tracepoints): New.
138 (the_low_target). Install it.
139
140 * mem-break.h (delete_breakpoint): Declare.
141 * mem-break.c (delete_breakpoint): Make external.
142
143 * target.h (struct target_ops): Add `supports_tracepoints',
144 `read_pc', and `write_pc' fields.
145 (target_supports_tracepoints): Define.
146 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
147 (phex_nz): New.
148
149 * regcache.h (struct regcache) <registers_owned>: New field.
150 (init_register_cache, regcache_cpy): Declare.
151 (regcache_read_pc, regcache_write_pc): Declare.
152 (register_cache_size): Declare.
153 (supply_regblock): Declare.
154 * regcache.c (init_register_cache): New.
155 (new_register_cache): Use it.
156 (regcache_cpy): New.
157 (register_cache_size): New.
158 (supply_regblock): New.
159 (regcache_read_pc, regcache_write_pc): New.
160
161 * tracepoint.c: New.
162
163 * Makefile.in (OBS): Add tracepoint.o.
164 (tracepoint.o): New rule.
165
3a13a53b
L
1662010-04-08 H.J. Lu <hongjiu.lu@intel.com>
167
168 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
169 (i386-mmx.o): New.
170 (i386-mmx.c): Likewise.
171 (i386-mmx-linux.o): Likewise.
172 (i386-mmx-linux.c): Likewise.
173
174 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
175 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
176 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
177 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
178
179 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
180 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
181 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
182
1570b33e
L
1832010-04-07 H.J. Lu <hongjiu.lu@intel.com>
184
185 * Makefile.in (clean): Updated.
186 (i386-avx.o): New.
187 (i386-avx.c): Likewise.
188 (i386-avx-linux.o): Likewise.
189 (i386-avx-linux.c): Likewise.
190 (amd64-avx.o): Likewise.
191 (amd64-avx.c): Likewise.
192 (amd64-avx-linux.o): Likewise.
193 (amd64-avx-linux.c): Likewise.
194
195 * configure.srv (srv_i386_regobj): Add i386-avx.o.
196 (srv_i386_linux_regobj): Add i386-avx-linux.o.
197 (srv_amd64_regobj): Add amd64-avx.o.
198 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
199 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
200 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
201 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
202 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
203 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
204 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
205
206 * i387-fp.c: Include "i386-xstate.h".
207 (i387_xsave): New.
208 (i387_cache_to_xsave): Likewise.
209 (i387_xsave_to_cache): Likewise.
210 (x86_xcr0): Likewise.
211
212 * i387-fp.h (i387_cache_to_xsave): Likewise.
213 (i387_xsave_to_cache): Likewise.
214 (x86_xcr0): Likewise.
215
216 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
217 * linux-crisv32-low.c (target_regsets): Likewise.
218 * linux-m68k-low.c (target_regsets): Likewise.
219 * linux-mips-low.c (target_regsets): Likewise.
220 * linux-ppc-low.c (target_regsets): Likewise.
221 * linux-s390-low.c (target_regsets): Likewise.
222 * linux-sh-low.c (target_regsets): Likewise.
223 * linux-sparc-low.c (target_regsets): Likewise.
224 * linux-xtensa-low.c (target_regsets): Likewise.
225
226 * linux-low.c: Include <sys/uio.h>.
227 (regsets_fetch_inferior_registers): Support nt_type.
228 (regsets_store_inferior_registers): Likewise.
229 (linux_process_qsupported): New.
230 (linux_target_ops): Add linux_process_qsupported.
231
232 * linux-low.h (regset_info): Add nt_type.
233 (linux_target_ops): Add process_qsupported.
234
235 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
236 and <sys/uio.h>.
237 (init_registers_i386_avx_linux): New.
238 (init_registers_amd64_avx_linux): Likewise.
239 (xmltarget_i386_linux_no_xml): Likewise.
240 (xmltarget_amd64_linux_no_xml): Likewise.
241 (PTRACE_GETREGSET): Likewise.
242 (PTRACE_SETREGSET): Likewise.
243 (x86_fill_xstateregset): Likewise.
244 (x86_store_xstateregset): Likewise.
245 (use_xml): Likewise.
246 (x86_linux_update_xmltarget): Likewise.
247 (x86_linux_process_qsupported): Likewise.
248 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
249 (x86_arch_setup): Don't call init_registers_amd64_linux nor
250 init_registers_i386_linux here. Call
251 x86_linux_update_xmltarget.
252 (the_low_target): Add x86_linux_process_qsupported.
253
254 * server.c (handle_query): Call target_process_qsupported.
255
256 * target.h (target_ops): Add process_qsupported.
257 (target_process_qsupported): New.
258
fc7238bb
PA
2592010-04-03 Pedro Alves <pedro@codesourcery.com>
260
261 * inferiors.c (add_thread): Set last_status kind to
262 TARGET_WAITKIND_IGNORE.
263 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
264 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
265 (linux_wait_1): Move `thread' local definition to block that uses
266 it. Don't NULL initialize `event_child'.
267 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
268 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
269 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
270
bdabb078
PA
2712010-04-01 Pedro Alves <pedro@codesourcery.com>
272
273 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
274 an extended waitstatus, or by a watchpoint.
275 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
276 thread was stepping or has been stopped by a watchpoint.
277
d3bbe7a0
PA
2782010-04-01 Pedro Alves <pedro@codesourcery.com>
279
280 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
281 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
282 of another, then delete the previous, and validate all
283 breakpoints.
284 (validate_inserted_breakpoint): New.
285 (delete_disabled_breakpoints): New.
286 (validate_breakpoints): New.
287 (check_mem_read): Validate breakpoints before trusting their
288 shadow. Delete disabled breakpoints.
289 (check_mem_write): Validate breakpoints before trusting they
290 should be inserted. Delete disabled breakpoints.
291 * mem-break.h (validate_breakpoints):
292 * server.c (handle_query): Validate breakpoints when we see a
293 qSymbol query.
294
8b07ae33
PA
2952010-04-01 Pedro Alves <pedro@codesourcery.com>
296
297 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
298 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
299 if we could tell there's a GDB breakpoint at stop_pc.
300 (need_step_over_p): Don't do a step over if we find a GDB
301 breakpoint at the resume PC.
302
303 * mem-break.c (struct raw_breakpoint): New.
304 (enum bkpt_type): New type `gdb_breakpoint'.
305 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
306 fields. New field `raw'.
307 (find_raw_breakpoint_at): New.
308 (set_raw_breakpoint_at): Handle refcounting. Create a raw
309 breakpoint instead.
310 (set_breakpoint_at): Adjust.
311 (delete_raw_breakpoint): New.
312 (release_breakpoint): New.
313 (delete_breakpoint): Rename to...
314 (delete_breakpoint_1): ... this. Add proc parameter. Use
315 release_breakpoint. Return ENOENT.
316 (delete_breakpoint): Reimplement.
317 (find_breakpoint_at): Delete.
318 (find_gdb_breakpoint_at): New.
319 (delete_breakpoint_at): Delete.
320 (set_gdb_breakpoint_at): New.
321 (delete_gdb_breakpoint_at): New.
322 (gdb_breakpoint_here): New.
323 (set_reinsert_breakpoint): Use release_breakpoint.
324 (uninsert_breakpoint): Rename to ...
325 (uninsert_raw_breakpoint): ... this.
326 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
327 (reinsert_raw_breakpoint): Change parameter type to
328 raw_breakpoint.
329 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
330 instead.
331 (check_breakpoints): Adjust. Use release_breakpoint.
332 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
333 (breakpoint_inserted_here): Ditto.
334 (check_mem_read): Adjust to iterate over raw breakpoints instead.
335 Don't trust the breakpoint's shadow if it is not inserted.
336 (check_mem_write): Adjust to iterate over raw breakpoints instead.
337 (delete_all_breakpoints): Adjust.
338 (free_all_breakpoints): Mark all breakpoints as uninserted, and
339 use delete_breakpoint_1.
340
341 * mem-break.h (breakpoints_supported): Delete declaration.
342 (set_gdb_breakpoint_at): Declare.
343 (gdb_breakpoint_here): Declare.
344 (delete_breakpoint_at): Delete.
345 (delete_gdb_breakpoint_at): Declare.
346
347 * server.h (struct raw_breakpoint): Forward declare.
348 (struct process_info): New field `raw_breakpoints'.
349
350 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
351 breakpoints.
352
6bf5e0ba
PA
3532010-03-24 Pedro Alves <pedro@codesourcery.com>
354
355 * linux-low.c (status_pending_p_callback): Fix comment.
356 (linux_wait_for_event_1): Move most of the internal breakpoint
357 handling from here...
358 (linux_wait_1): ... to here.
359 (count_events_callback): New.
360 (select_singlestep_lwp_callback): New.
361 (select_event_lwp_callback): New.
362 (cancel_breakpoints_callback): New.
363 (select_event_lwp): New.
364 (linux_wait_1): Simplify internal breakpoint handling. Give equal
365 priority to all LWPs that have had events that should be reported
366 to the client. Cancel breakpoints when about to reporting the
367 event to the client, not while stopping lwps. No longer cancel
368 finished single-steps here.
369 (cancel_finished_single_step): Delete.
370 (cancel_finished_single_steps): Delete.
371
414a389f
PA
3722010-03-24 Pedro Alves <pedro@codesourcery.com>
373
374 * mem-break.c (enum bkpt_type): New.
375 (struct breakpoint): New field `type'.
376 (set_breakpoint_at): Change return type to struct breakpoint
377 pointer. Set type to `other_breakpoint' by default.
378 (delete_breakpoint): Rewrite, supporting more than one breakpoint
379 in the breakpoint list.
380 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
381 (reinsert_breakpoint): Rename to ...
382 (reinsert_raw_breakpoint): ... this.
383 (reinsert_breakpoints_at): Adjust.
384 * mem-break.h (struct breakpoint): Declare.
385 (set_breakpoint_at): Change return type to struct breakpoint
386 pointer.
387
2280c721
PA
3882010-03-24 Pedro Alves <pedro@codesourcery.com>
389
390 * server.c (handle_query): Assign, not compare.
391
d50171e4
PA
3922010-03-24 Pedro Alves <pedro@codesourcery.com>
393
394 Teach linux gdbserver to step-over-breakpoints.
395
396 * linux-low.c (can_hardware_single_step): New.
397 (supports_breakpoints): New.
398 (handle_extended_wait): If stopping threads, read the stop pc of
399 the new cloned LWP.
400 (get_pc): New.
401 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
402 low target doesn't support retrieving the PC.
403 (add_lwp): Set last_resume_kind to resume_continue.
404 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
405 (linux_attach): Don't clear stop_expected. Set the lwp's
406 last_resume_kind to resume_stop.
407 (linux_detach_one_lwp): Don't check for removed breakpoints.
408 (check_removed_breakpoint): Delete.
409 (status_pending_p): Rename to ...
410 (status_pending_p_callback): ... this. Don't check for removed
411 breakpoints. Don't consider threads that are stopped from GDB's
412 perspective.
413 (linux_wait_for_lwp): Always read the stop_pc here.
414 (cancel_breakpoint): New.
415 (step_over_bkpt): New global.
416 (linux_wait_for_event_1): Implement stepping over breakpoints.
417 (gdb_wants_lwp_stopped): New.
418 (gdb_wants_all_stopped): New.
419 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
420 single-step traps here. Store the thread's last reported target
421 wait status.
422 (send_sigstop): Don't clear stop_expected. Always set it,
423 instead.
424 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
425 (cancel_finished_single_step): New.
426 (cancel_finished_single_steps): New.
427 (wait_for_sigstop): Don't cancel finished single-step traps here.
428 (linux_resume_one_lwp): Don't check for removed breakpoints.
429 Don't set `step' on non-hardware step archs.
430 (linux_set_resume_request): Ignore resume_stop requests if already
431 stopping or stopped. Set the lwp's last_resume_kind.
432 (resume_status_pending_p): Don't check for removed breakpoints.
433 (need_step_over_p): New.
434 (start_step_over): New.
435 (finish_step_over): New.
436 (linux_resume_one_thread): Always queue a sigstop for resume_stop
437 requests. Clear the thread's last reported target waitstatus.
438 Don't use the `suspended' flag. Don't consider pending breakpoints.
439 (linux_resume): Start a step-over if necessary.
440 (proceed_one_lwp): New.
441 (proceed_all_lwps): New.
442 (unstop_all_lwps): New.
443 * linux-low.h (struct lwp_info): Rewrite comment for the
444 `suspended' flag. Add the `stop_pc' field. Delete the
445 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
446 Add `'last_resume_kind' and `need_step_over' fields.
447 * inferiors.c (struct thread_info): Delete, moved elsewhere.
448 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
449 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
450 (set_raw_breakpoint_at): New.
451 (set_breakpoint_at): Rewrite to use it.
452 (reinsert_breakpoint_handler): Delete.
453 (set_reinsert_breakpoint): New.
454 (reinsert_breakpoint_by_bp): Delete.
455 (delete_reinsert_breakpoints): New.
456 (uninsert_breakpoint): Rewrite.
457 (uninsert_breakpoints_at): New.
458 (reinsert_breakpoint): Rewrite.
459 (reinsert_breakpoints_at): New.
460 (check_breakpoints): Rewrite.
461 (breakpoint_here): New.
462 (breakpoint_inserted_here): New.
463 (check_mem_read): Adjust.
464 * mem-break.h (breakpoints_supported, breakpoint_here)
465 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
466 (reinsert_breakpoint_by_bp): Delete declaration.
467 (delete_reinsert_breakpoints): Declare.
468 (reinsert_breakpoint): Delete declaration.
469 (reinsert_breakpoints_at): Declare.
470 (uninsert_breakpoint): Delete declaration.
471 (uninsert_breakpoints_at): Declare.
472 (check_breakpoints): Adjust prototype.
473 * server.h: Adjust include order.
474 (struct thread_info): Declare here. Add a `last_status' field.
475
30ba68cb
MS
4762010-03-23 Michael Snyder <msnyder@vmware.com>
477
478 * server.c (crc32): New function.
479 (handle_query): Add handling for 'qCRC:' request.
480
b9a881c2
PA
4812010-03-23 Pedro Alves <pedro@codesourcery.com>
482
483 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
484 lwp had been stopped by a watchpoint.
485
e92d13d5
PA
4862010-03-16 Pedro Alves <pedro@codesourcery.com>
487
488 * server.h (internal_error): Declare.
489 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
490 * utils.c (internal_error): New function.
491
64daa791
AS
4922010-03-15 Andreas Schwab <schwab@redhat.com>
493
494 * configure.srv: Fix typo setting srv_regobj.
495
f52cd8cd
PA
4962010-03-15 Pedro Alves <pedro@codesourcery.com>
497
498 * linux-low.c (fetch_register): Avoid passing a non string literal
499 format to `error'.
500 (usr_store_inferior_registers): Ditto.
501
93ae6fdc
PA
5022010-03-14 Pedro Alves <pedro@codesourcery.com>
503
504 * linux-low.c (linux_write_memory): Bail out early if peeking
505 memory failed.
506
c3adc08c
PA
5072010-03-14 Pedro Alves <pedro@codesourcery.com>
508
509 * linux-low.h (struct lwp_info): New fields
510 `stopped_by_watchpoint' and `stopped_data_address'.
511 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
512 here, and cache them in the lwp object.
513 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
514 directly.
515 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
516 field.
517 (linux_stopped_by_watchpoint): Rewrite.
518 (linux_stopped_data_address): Rewrite.
519
bce522a2
PA
5202010-03-06 Simo Melenius <simo.melenius@iki.fi>
521
522 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
523 switching the current inferior, not before.
524
90884b2b
L
5252010-03-01 H.J. Lu <hongjiu.lu@intel.com>
526
527 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
528 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
529 i386-linux.c and amd64-linux.c.
530 (reg-i386.o): Removed.
531 (reg-i386.c): Likewise.
532 (reg-i386-linux.o): Likewise.
533 (reg-i386-linux.c): Likewise.
534 (reg-x86-64.o): Likewise.
535 (reg-x86-64.c): Likewise.
536 (reg-x86-64-linux.o): Likewise.
537 (reg-x86-64-linux.c): Likewise.
538 (i386.o): New.
539 (i386.c): Likewise.
540 (i386-linux.o): Likewise.
541 (i386-linux.c): Likewise.
542 (amd64.o): Likewise.
543 (amd64.c): Likewise.
544 (amd64-linux.o): Likewise.
545 (amd64-linux.c): Likewise.
546
547 * configure.srv (srv_i386_regobj): New.
548 (srv_i386_linux_regobj): Likewise.
549 (srv_amd64_regobj): Likewise.
550 (srv_amd64_linux_regobj): Likewise.
551 (srv_i386_32bit_xmlfiles): Likewise.
552 (srv_i386_64bit_xmlfiles): Likewise.
553 (srv_i386_xmlfiles): Likewise.
554 (srv_amd64_xmlfiles): Likewise.
555 (srv_i386_linux_xmlfiles): Likewise.
556 (srv_amd64_linux_xmlfiles): Likewise.
557 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
558 srv_xmlfiles to $srv_i386_xmlfiles.
559 (i[34567]86-*-mingw32ce*): Likewise.
560 (i[34567]86-*-mingw*): Likewise.
561 (i[34567]86-*-nto*): Likewise.
562 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
563 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
564 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
565 (x86_64-*-linux*): Likewise.
566
567 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
568 (init_registers_amd64_linux): New.
569 (x86_arch_setup): Replace init_registers_x86_64_linux with
570 init_registers_amd64_linux.
571
193f13e6
MK
5722010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
573
574 * configure.ac: Check for libdl. If it is not available link against
575 static libthread_db.
576 * configure: Regenerate.
577
85d721b8
PA
5782010-02-22 Pedro Alves <pedro@codesourcery.com>
579
580 PR9605
581
582 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
583 handing a read watchpoint.
584 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
585
6076632b
DE
5862010-02-12 Doug Evans <dje@google.com>
587
588 * linux-low.c (linux_supports_tracefork_flag): Document.
589 (linux_look_up_symbols): Add comment.
590
3327ccf7
L
5912010-02-03 H.J. Lu <hongjiu.lu@intel.com>
592
593 * regcache.c (supply_register): Clear regcache if buf is NULL.
594
0718675c 5952010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 596 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
597
598 * inferiors.c (find_inferior): Add function documentation.
599 (unloaded_dll): Handle the case where the unloaded dll has not
600 been previously registered in the dll list.
601
177321bd
DJ
6022010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
603
604 * linux-arm-low.c (thumb_breakpoint_len): Delete.
605 (thumb2_breakpoint): New.
606 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
607
2b009048
DJ
6082010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
609
610 * linux-low.c (get_stop_pc): Check for SIGTRAP.
611 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
612 breakpoints.
613
3be029c7
PA
6142010-01-21 Pedro Alves <pedro@codesourcery.com>
615
616 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
617
18f5de3b
JK
6182010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
619
620 * linux-s390-low.c (s390_collect_ptrace_register)
621 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
622
3743bb4f
DE
6232010-01-21 Doug Evans <dje@google.com>
624
14ce3065
DE
625 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
626 (PTRACE_ARG4_TYPE): New macro.
627 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
628 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
629 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
630 (usr_store_inferior_registers): Ditto.
631 (linux_read_memory, linux_write_memory): Ditto.
632 (linux_test_for_tracefork): Ditto.
633
3743bb4f
DE
634 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
635 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
636
8b315be5
PA
6372010-01-21 Pedro Alves <pedro@codesourcery.com>
638
639 * proc-service.c (ps_lgetregs): Don't refetch registers from the
640 target.
641
85492558
PA
6422010-01-21 Pedro Alves <pedro@codesourcery.com>
643
644 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
645 prototype to take a regcache. Adjust.
646
442ea881
PA
6472010-01-20 Pedro Alves <pedro@codesourcery.com>
648
649 * regcache.h (struct thread_info): Forward declare.
650 (struct regcache): New.
651 (new_register_cache): Adjust prototype.
652 (get_thread_regcache): Declare.
653 (free_register_cache): Adjust prototype.
654 (registers_to_string, registers_from_string): Ditto.
655 (supply_register, supply_register_by_name, collect_register)
656 (collect_register_as_string, collect_register_by_name): Ditto.
657 * regcache.c (struct inferior_regcache_data): Delete.
658 (get_regcache): Rename to ...
659 (get_thread_regcache): ... this. Adjust. Switch inferior before
660 fetching registers.
661 (regcache_invalidate_one): Adjust.
662 (regcache_invalidate): Fix prototype.
663 (new_register_cache): Return the new register cache.
664 (free_register_cache): Change prototype.
665 (realloc_register_cache): Adjust.
666 (registers_to_string): Change prototype to take a regcache. Adjust.
667 (registers_from_string): Ditto.
668 (register_data): Ditto.
669 (supply_register): Ditto.
670 (supply_register_by_name): Ditto.
671 (collect_register): Ditto.
672 (collect_register_as_string): Ditto.
673 (collect_register_by_name): Ditto.
674 * server.c (process_serial_event): Adjust.
675 * linux-low.h (regset_fill_func, regset_store_func): Change
676 prototype.
677 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
678 Change prototype.
679 * linux-low.c (get_stop_pc): Adjust.
680 (check_removed_breakpoint): Adjust.
681 (linux_wait_for_event): Adjust.
682 (linux_resume_one_lwp): Adjust.
683 (fetch_register): Add regcache parameter. Adjust.
684 (usr_store_inferior_registers): Ditto.
685 (regsets_fetch_inferior_registers): Ditto.
686 (regsets_store_inferior_registers): Ditto.
687 (linux_fetch_registers, linux_store_registers): Ditto.
688 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
689 regcache. Adjust.
690 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
691 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
692 prototype to take a regcache.
693 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
694 * remote-utils.c (convert_ascii_to_int, outreg)
695 (prepare_resume_reply): Change prototype to take a regcache.
696 Adjust.
697 * target.h (struct target_ops) <fetch_registers, store_registers>:
698 Change prototype to take a regcache.
699 (fetch_inferior_registers, store_inferior_registers): Change
700 prototype to take a regcache. Adjust.
701 * proc-service.c (ps_lgetregs): Adjust.
702 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
703 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
704 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
705 take a regcache. Adjust.
706 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
707 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
708 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
709 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
710 * linux-cris-low.c (cris_get_pc, cris_set_pc)
711 (cris_cannot_fetch_register):
712 (cris_breakpoint_at): Change prototype to take a regcache.
713 Adjust.
714 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
715 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
716 to take a regcache. Adjust.
717 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
718 Adjust.
719 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
720 take a regcache. Adjust.
721 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
722 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
723 (m68k_set_pc): Change prototype to take a regcache. Adjust.
724 * linux-mips-low.c (mips_get_pc):
725 (mips_set_pc): Change prototype to take a regcache. Adjust.
726 (mips_reinsert_addr): Adjust.
727 (mips_collect_register): Change prototype to take a regcache.
728 Adjust.
729 (mips_supply_register):
730 (mips_collect_register_32bit, mips_supply_register_32bit)
731 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
732 (mips_store_fpregset): Ditto.
733 * linux-ppc-low.c (ppc_supply_ptrace_register, ppc_supply_ptrace_register):
734 Ditto.
735 (parse_spufs_run): Adjust.
736 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
737 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
738 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
739 take a regcache. Adjust.
740 * linux-s390-low.c (s390_collect_ptrace_register)
741 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
742 (s390_set_pc): Change prototype to take a regcache. Adjust.
743 (s390_arch_setup): Adjust.
744 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
745 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
746 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
747 (sparc_fill_gregset, sparc_store_gregset_from_stack)
748 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
749 regcache. Adjust.
750 (sparc_breakpoint_at): Adjust.
751 * linux-xtensa-low.c (xtensa_fill_gregset):
752 (xtensa_store_gregset):
753 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
754 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
755 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
756 prototype to take a regcache. Adjust.
757 * win32-arm-low.c (arm_fetch_inferior_register)
758 (arm_store_inferior_register): Change prototype to take a
759 regcache. Adjust.
760 * win32-i386-low.c (i386_fetch_inferior_register)
761 (i386_store_inferior_register): Change prototype to take a
762 regcache. Adjust.
763 * win32-low.c (child_fetch_inferior_registers)
764 (child_store_inferior_registers): Change prototype to take a
765 regcache. Adjust.
766 (win32_wait): Adjust.
767 (win32_fetch_inferior_registers): Change prototype to take a
768 regcache. Adjust.
769 (win32_store_inferior_registers): Adjust.
770 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
771 store_inferior_register>: Change prototype to take a regcache.
772
60c3d7b0
DE
7732010-01-20 Doug Evans <dje@google.com>
774
775 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
776 #ifdef.
777 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 778 (W_STOPCODE): Provide definition if missing.
60c3d7b0 779
dc146f7c
VP
7802010-01-13 Vladimir Prus <vladimir@codesourcery.com>
781
782 * linux-low.c (linux_core_of_thread): New.
783 (compare_ints, show_process, list_threads): New.
784 (linux_qxfer_osdata): Report threads and cores.
785 (linux_target_op): Register linux_core_of_thread.
786 * remote-utils.c (prepare_resume_reply): Report the core.
787 (buffer_xml_printf): Support %d specifier.
788 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
789 New.
790 (handle_query): Handle qXfer:threads. Announce availability
791 thereof.
792 * target.h (struct target_ops): New field core_of_thread.
793
7803799a
UW
7942010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
795
796 * Makefile.in (clean): Remove new generated files.
797 (reg-s390.o, reg-s390.c): Remove rules.
798 (reg-s390x.o, reg-s390x.c): Likewise.
799 (s390-linux32.o, s390-linux32.c): Add rules.
800 (s390-linux64.o, s390-linux64.c): Likewise.
801 (s390x-linux64.o, s390x-linux64.c): Likewise.
802 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
803 * linux-s390-low.c: Include <elf.h>.
804 (HWCAP_S390_HIGH_GPRS): Define if undefined.
805 (init_registers_s390): Remove prototype.
806 (init_registers_s390x): Likewise.
807 (init_registers_s390_linux32): Add prototype.
808 (init_registers_s390_linux64): Likewise.
809 (init_registers_s390x_linux64): Likewise.
810 (s390_num_regs_3264): New define.
811 (s390_regmap_3264): New global variable.
812 (s390_cannot_fetch_register): Remove obsolete check.
813 (s390_cannot_store_register): Likewise.
814 (s390_collect_ptrace_register): Handle upper/lower register halves.
815 (s390_supply_ptrace_register): Likewise.
816 (s390_fill_gregset): Update to register number changes.
817 (s390_get_hwcap): New routine.
818 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
819 Install appropriate regmap and register set.
820
6e7ffa39
JB
8212010-01-01 Joel Brobecker <brobecker@adacore.com>
822
823 * server.c (gdbserver_version): Update copyright year to 2010.
824 * gdbreplay.c (gdbreplay_version): Likewise.
825
957f3f49
DE
8262009-12-28 Doug Evans <dje@google.com>
827
828 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
829 elf/external.h. Include <elf.h> instead but only if necessary.
830
ca5c370d
PA
8312009-12-28 Pedro Alves <pedro@codesourcery.com>
832
833 * linux-low.c (linux_remove_process): Remove `detaching'
834 parameter. Don't release/detach from thread_db here.
835 (linux_kill): Release/detach from thread_db here, ...
836 (linux_detach): ... and here, before actually detaching.
837 (linux_wait_1): ... and here, when a process exits.
838 * thread-db.c (any_thread_of): New.
839 (thread_db_free): Switch the current inferior to a thread of the
840 passed in process.
841
4ee62156
DE
8422009-12-21 Doug Evans <dje@google.com>
843
d90e6a88
DE
844 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
845
c5f62d5f
DE
846 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
847 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
848 warning ifndef __NR_tkill. Move setting of errno there too.
849 Delete unnecessary resetting of errno after syscall.
850 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
851
10e86dd7
DE
852 * configure.ac: Check for dladdr.
853 * config.in: Regenerate.
854 * configure: Regenerate.
855 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
856 (try_thread_db_load): Update.
857
4ee62156
DE
858 * linux-low.c (my_waitpid): Delete unnecessary prototype.
859
00f515da
DE
8602009-12-18 Doug Evans <dje@google.com>
861
e9464885
DE
862 * event-loop.c: Include unistd.h if it exists.
863
07d4f67e
DE
864 * linux-low.c (my_waitpid): Move definition away from being in
865 between linux_tracefork_child/linux_test_for_tracefork.
866
00f515da
DE
867 * gdb_proc_service.h (psaddr_t): Fix type.
868 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
869 signature to match glibc.
870
1de1badb
DE
8712009-12-16 Doug Evans <dje@google.com>
872
873 * linux-low.c (linux_read_memory): Fix argument to read.
874
aeeb81d1
PA
8752009-11-26 Pedro Alves <pedro@codesourcery.com>
876
877 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
878 events, don't leave current_inferior pointing at null.
879
10357975
PA
8802009-11-26 Pedro Alves <pedro@codesourcery.com>
881
882 * win32-low.c (LOG): Delete.
883 (OUTMSG): Output to stderr.
884 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
885 on compile time LOG macro.
886 (win32_wait): Fix debug output.
887
cf6e3471
PA
8882009-11-26 Pedro Alves <pedro@codesourcery.com>
889
890 * win32-low.c (win32_add_one_solib): If the dll name is
891 "ntdll.dll", prepend the system directory to the dll path.
892
0c85e18e
MK
8932009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
894
895 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
896
9ac544ce 8972009-11-17 Nathan Sidwell <nathan@codesourcery.com>
0c85e18e 898 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
899
900 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
901 * configure.ac: Check for __mcoldfire__ and set
902 gdb_cv_m68k_is_coldfire.
903 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
904 reg-cf.o and reg-m68k.o.
905 * configure: Regenerated.
906
fd7dd3e6
PA
9072009-11-16 Pedro Alves <pedro@codesourcery.com>
908
909 * linux-low.c (linux_remove_process): Add `detaching' parameter.
910 Pass it to thread_db_free.
911 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
912 proper `detaching' argument to linux_remove_process.
913 * linux-low.h (thread_db_free): Add `detaching' parameter.
914 * thread-db.c (thread_db_init): Pass false as `detaching' argument
915 to thread_db_free.
916 (thread_db_free): Add `detaching' parameter. Only
917 call td_ta_clear_event if detaching from process.
918
75aa492e
MK
9192009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
920
921 * thread-db.c (thread_db_free): Fix typo.
922
21e1bee4
PP
9232009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
924
925 PR gdb/10838
926 * thread-db.c (thread_db_free): Call td_ta_clear_event.
927
8838b45e
NS
9282009-11-03 Nathan Sidwell <nathan@codesourcery.com>
929
930 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
931 with an i686 compiler.
932 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
933 needed.
934 * configure: Rebuilt.
935
8a35fb51
SL
9362009-10-29 Sandra Loosemore <sandra@codesourcery.com>
937
938 PR gdb/10783
939
940 * server.c (handle_search_memory_1): Correct read_addr initialization
941 in loop for searching subsequent chunks.
942
96f15937
PP
9432009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
944
945 * configure.ac: New --with-libthread-db option.
946 * thread-db.c: Allow direct dependence on libthread_db.
947 (thread_db_free): Adjust.
948 * config.in: Regenerate.
949 * configure: Likewise.
950
5f7d1694
PP
9512009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
952
953 PR gdb/10757
954 * thread-db.c (attach_thread): New function.
955 (maybe_attach_thread): Return success/failure.
956 (find_new_threads_callback): Adjust.
957 (thread_db_find_new_threads): Loop until no new threads.
958
88e3b899
PA
9592009-10-13 Pedro Alves <pedro@codesourcery.com>
960
961 * proc-service.c (ps_lgetregs): Formatting.
962
cdbfd419
PP
9632009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
964
965 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
966 * configure.ac: Adjust.
967 * linux-low.h (struct process_info_private): Move members to struct
968 thread_db.
969 (thread_db_free, thread_db_handle_monitor_command): New prototype.
970 * linux-low.c (linux_remove_process): Adjust.
971 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
972 * server.c (handle_query): Move code ...
973 (handle_monitor_command): ... here. New function.
974 * target.h (struct target_ops): New member.
975 * thread-db.c (struct thread_db): New.
976 (libthread_db_search_path): New variable.
977 (thread_db_create_event, thread_db_enable_reporting)
978 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
979 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
980 (try_thread_db_load_1, dladdr_to_soname): New functions.
981 (try_thread_db_load, thread_db_load_search): New functions.
982 (thread_db_init): Search for libthread_db.
983 (thread_db_free): New function.
984 (thread_db_handle_monitor_command): Likewise.
985 * config.in: Regenerate.
986 * configure: Regenerate.
987
4168d2d6
UW
9882009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
989
990 * spu-low.c (spu_kill): Wait for inferior to terminate.
991 Call clear_inferiors.
992 (spu_detach): Call clear_inferiors.
993
81ecdfbb
RW
9942009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
995
996 * aclocal.m4: Regenerate.
997 * config.in: Likewise.
998 * configure: Likewise.
999
0b9ff2c0
UW
10002009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
1001
1002 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
1003 (parse_spufs_run): New function.
1004 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
1005 (ppc_breakpoint_at): Handle SPU breakpoints.
1006
efcbbd14
UW
10072009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
1008
1009 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
1010 (SPUFS_MAGIC): Define.
1011 (spu_enumerate_spu_ids): New function.
1012 (linux_qxfer_spu): New function.
1013 (linux_target_ops): Install linux_qxfer_spu.
1014
f4d9bade
UW
10152009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
1016
1017 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
1018 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
1019 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
1020 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
1021 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
1022 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
1023 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
1024 (init_registers_powerpc_cell32l): Add prototype.
1025 (init_registers_powerpc_cell64l): Likewise.
1026 (ppc_arch_setup): Detect Cell/B.E. architecture.
1027
96e946ca
RW
10282009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1029
1030 * Makefile.in (datarootdir): New variable.
1031
58d6951d
DJ
10322009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
1033
1034 * linux-low.c (linux_write_memory): Update debugging output.
1035 * Makefile.in (clean): Add new descriptions.
1036 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
1037 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
1038 * configure.srv: Add new files for arm*-*-linux*.
1039 * linux-arm-low.c: Add new declarations.
1040 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
1041 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
1042 (HWCAP_VFPv3D16): New.
1043 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
1044 instead of __IWMMXT__.
1045 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
1046 (arm_arch_setup): New.
1047 (target_regsets): Remove #ifdef. Add VFP regset.
1048 (the_low_target): Use arm_arch_setup.
1049
12b42a12
DJ
10502009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
1051
1052 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
1053 the main thread again.
1054
ac8c974e
AR
10552009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
1056
1057 Adding Neutrino gdbserver.
1058 * configure: Regenerated.
1059 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
1060 * configure.srv (i[34567]86-*-nto*): New target.
1061 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
1062 * remote-utils.c [__QNX__]: Include sys/iomgr.h
1063 (nto_comctrl) [__QNX__]: New function.
1064 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
1065
4424e0c3 10662009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
1067
1068 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
1069 srv_tgtobj.
1070
912cf4ba
PA
10712009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
1072 Pedro Alves <pedro@codesourcery.com>
1073
1074 * win32-i386-low.c (i386_get_thread_context): Handle systems that
1075 don't support CONTEXT_EXTENDED_REGISTERS.
1076 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
1077 (the_low_target): Install them.
1078 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
1079 failing with ERROR_PIPE_NOT_CONNECTED.
1080
aa5ca48f
DE
10812009-06-30 Doug Evans <dje@google.com>
1082 Pierre Muller <muller@ics.u-strasbg.fr>
1083
1084 Add h/w watchpoint support to x86-linux, win32-i386.
1085 * Makefile.in (SFILES): Add i386-low.c
1086 (i386_low_h): Define.
1087 (i386-low.o): Add dependencies.
1088 (linux-x86-low.o): Add i386-low.h dependency.
1089 (win32-i386-low.o): Ditto.
1090 * i386-low.c: New file.
1091 * i386-low.h: New file.
1092 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
1093 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
1094 * linux-low.c (linux_add_process): Initialize arch_private.
1095 (linux_remove_process): Free arch_private.
1096 (add_lwp): Initialize arch_private.
1097 (delete_lwp): Free arch_private.
1098 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
1099 provided.
1100 * linux-low.h (process_info_private): New member arch_private.
1101 (lwp_info): New member arch_private.
1102 (linux_target_ops): New members new_process, new_thread,
1103 prepare_to_resume.
1104 (ptid_of): New macro.
1105 * linux-x86-low.c: Include stddef.h, i386-low.h.
1106 (arch_process_info): New struct.
1107 (arch_lwp_info): New struct.
1108 (x86_linux_dr_get, x86_linux_dr_set): New functions.
1109 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
1110 (i386_dr_low_get_status): New function.
1111 (x86_insert_point, x86_remove_point): New functions.
1112 (x86_stopped_by_watchpoint): New function.
1113 (x86_stopped_data_address): New function.
1114 (x86_linux_new_process, x86_linux_new_thread): New functions.
1115 (x86_linux_prepare_to_resume): New function.
1116 (the_low_target): Add entries for insert_point, remove_point,
1117 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
1118 prepare_to_resume.
1119 * server.c (debug_hw_points): New global.
1120 (monitor_show_help): Document set debug-hw-points.
1121 (handle_query): Process "set debug-hw-points".
1122 * server.h (debug_hw_points): Declare.
1123 (paddress): Declare.
1124 * utils.c (NUMCELLS, CELLSIZE): New macros.
1125 (get_sell, xsnprintf, paddress): New functions.
1126 * win32-arm-low.c (the_low_target): Add entries for insert_point,
1127 remove_point, stopped_by_watchpoint, stopped_data_address.
1128 * win32-i386-low.c: Include i386-low.h.
1129 (debug_reg_state): Replaces dr.
1130 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
1131 (i386_dr_low_get_status): New function.
1132 (i386_insert_point, i386_remove_point): New functions.
1133 (i386_stopped_by_watchpoint): New function.
1134 (i386_stopped_data_address): New function.
1135 (i386_initial_stuff): Update.
1136 (get_thread_context,set_thread_context,i386_thread_added): Update.
1137 (the_low_target): Add entries for insert_point,
1138 remove_point, stopped_by_watchpoint, stopped_data_address.
1139 * win32-low.c (win32_insert_watchpoint): New function.
1140 (win32_remove_watchpoint): New function.
1141 (win32_stopped_by_watchpoint): New function.
1142 (win32_stopped_data_address): New function.
1143 (win32_target_ops): Add entries for insert_watchpoint,
1144 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
1145 * win32-low.h (win32_target_ops): New members insert_point,
1146 remove_point, stopped_by_watchpoint, stopped_data_address.
1147
d993e290
PA
11482009-06-25 Pedro Alves <pedro@codesourcery.com>
1149
1150 * server.c (process_serial_event): Re-return unsupported, not
1151 error, if the type isn't recognized. Re-allow supporting only
1152 insert or remove packets. Also call require_running for
1153 breakpoints. Add missing break statement to default case. Tidy.
1154 * target.h (struct target_ops): Rename insert_watchpoint to
1155 insert_point, and remove_watchpoint to remove_point.
1156
1157 * linux-low.h (struct linux_target_ops): Likewise.
1158 * linux-low.c (linux_insert_watchpoint): Rename to ...
1159 (linux_insert_point): ... this. Adjust.
1160 (linux_remove_watchpoint): Rename to ...
1161 (linux_remove_point): ... this. Adjust.
1162 (linux_target_ops): Adjust.
1163 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
1164 (cris_insert_point): ... this.
1165 (cris_remove_watchpoint): Rename to ...
1166 (cris_remove_point): ... this.
1167 (the_low_target): Adjust.
1168
0f54c268
PM
11692009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
1170
1171 * server.c (handle_v_kill): Pass signal_pid to
1172 kill_inferior if multi_process is zero.
1173
c6314022
AR
11742009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
1175
1176 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
1177 * target.h (target_ops): Comment for *_watchpoint to make it clear
1178 the functions can get types '0' and '1'.
1179
4463ce24
AR
11802009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
1181
1182 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
1183 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
1184 * regcache.c (get_regcache): Likewise.
1185 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
1186 * win32-low.c (child_fetch_inferior_registers): Remove check for
1187 regno 0.
1188
cf8fd78b
PA
11892009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
1190 Pedro Alves <pedro@codesourcery.com>
1191
1192 * target.h (struct target_ops) <supports_multi_process>: New
1193 callback.
1194 (target_supports_multi_process): New.
1195 * server.c (handle_query): Even if GDB reports support, only
1196 enable multi-process if the target also supports it. Report
1197 multi-process support only if the target backend supports it.
1198 * linux-low.c (linux_supports_multi_process): New function.
1199 (linux_target_ops): Install it as target_supports_multi_process
1200 callback.
1201
47c0c975
DE
12022009-05-24 Doug Evans <dje@google.com>
1203
e09875d4
DE
1204 Global renaming of find_thread_pid to find_thread_ptid.
1205 * server.h (find_thread_ptid): Renamed from find_thread_pid.
1206 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
1207 All callers updated.
1208
e27d73f6
DE
1209 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
1210 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
1211 directly.
1212
47c0c975
DE
1213 * linux-low.c (get_stop_pc): Print pc if debug_threads.
1214 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
1215 (linux_resume_one_lwp): Ditto.
1216
2acc282a
DE
12172009-05-23 Doug Evans <dje@google.com>
1218
1219 * linux-low.c (linux_resume_one_lwp): Change type of first arg
1220 from struct inferior_list_entry * to struct lwp_info *.
1221 All callers updated.
1222
9f1036c1
DE
12232009-05-13 Doug Evans <dje@google.com>
1224
1225 * linux-x86-low.c: Don't include assert.h.
1226 (x86_siginfo_fixup): Use fatal, not assert.
1227 (x86_arch_setup): Fix comment.
1228
d0722149
DE
12292009-05-12 Doug Evans <dje@google.com>
1230
1231 Biarch support for i386/amd64 gdbserver.
1232 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
1233 Add linux-x86-low.c.
1234 (linux-i386-low.o, linux-x86-64-low.o): Delete.
1235 (linux-x86-low.o): Add.
1236 * linux-x86-64-low.c: Delete.
1237 * linux-i386-low.c: Delete.
1238 * linux-x86-low.c: New file.
1239 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
1240 linux-x86-low.o.
1241 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
1242 linux-x86-low.o.
1243 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
1244 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
1245 (linux_child_pid_to_exec_file): New function.
1246 (elf_64_header_p, elf_64_file_p): New functions.
1247 (siginfo_fixup): New function.
1248 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
1249 give target a chance to convert layout.
1250 * linux-low.h (linux_target_ops): New member siginfo_fixup.
1251 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
1252
fdeb2a12
DE
12532009-05-07 Doug Evans <dje@google.com>
1254
1255 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
1256 (regsets_store_inferior_registers): Ditto.
1257
a6dbe5df
PA
12582009-05-06 Pedro Alves <pedro@codesourcery.com>
1259
1260 PR server/10048
1261
1262 * linux-low.c (must_set_ptrace_flags): Delete.
1263 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
1264 of the global.
1265 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
1266 `lwp->must_set_ptrace_flags' instead.
ba42693b 1267 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
1268 (linux_wait_1): ... not here.
1269
5091eb23
DE
12702009-04-30 Doug Evans <dje@google.com>
1271
9f767825
DE
1272 * inferiors.c (started_inferior_callback): New function.
1273 (attached_inferior_callback): New function.
1274 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
1275 * server.c (print_started_pid, print_attached_pid): New functions.
1276 (detach_or_kill_for_exit): New function.
1277 (main): Call it instead of for_each_inferior (kill_inferior_callback).
1278 * server.h (have_started_inferiors_p): Declare.
1279 (have_attached_inferiors_p): Declare.
1280
5091eb23
DE
1281 * inferiors.c (remove_process): Fix memory leak, free process.
1282 * linux-low.c (linux_remove_process): New function.
1283 (linux_kill): Call it instead of remove_process.
1284 (linux_detach, linux_wait_1): Ditto.
1285
155c8968
PA
12862009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
1287
1288 * configure.srv: Add x86 Windows CE target.
1289
7fe519cb
UW
12902009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
1291
1292 * inferiors.c (get_thread_process): Make global.
1293 * server.h (get_thread_process): Add prototype.
1294 * thread-db.c (find_one_thread): Use get_thread_process
1295 instead of current_process.
1296 (thread_db_get_tls_address): Do not crash if called when
1297 thread layer is not yet initialized.
1298
5472f405
UW
12992009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
1300
1301 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
1302 * spu-low.c (current_tid): Rename to ...
1303 (current_ptid): ... this.
1304 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
1305 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
1306 ptid_get_lwp (current_ptid) instead of current_tid.
1307 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
1308 instead of current_tid. Use find_process_pid to verify pid
1309 argument is valid. Pass proper argument to remove_process.
1310 (spu_thread_alive): Compare current_ptid instead of current_tid.
1311 (spu_resume): Likewise.
1312
55ac2b99
PA
13132009-04-02 Pedro Alves <pedro@codesourcery.com>
1314
1315 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
1316 variable.
1317
95954743
PA
13182009-04-01 Pedro Alves <pedro@codesourcery.com>
1319
1320 Implement the multiprocess extensions, and add linux multiprocess
1321 support.
1322
1323 * server.h (ULONGEST): Declare.
1324 (struct ptid, ptid_t): New.
1325 (minus_one_ptid, null_ptid): Declare.
1326 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
1327 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
1328 (struct inferior_list_entry): Change `id' type from unsigned from
1329 to ptid_t.
1330 (struct sym_cache, struct breakpoint, struct
1331 process_info_private): Forward declare.
1332 (struct process_info): Declare.
1333 (current_process): Declare.
1334 (all_processes): Declare.
1335 (initialize_inferiors): Declare.
1336 (add_thread): Adjust to use ptid_t.
1337 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
1338 (add_process, remove_process, find_thread_pid): Declare.
1339 (find_inferior_id): Adjust to use ptid_t.
1340 (cont_thread, general_thread, step_thread): Change type to ptid_t.
1341 (multi_process): Declare.
1342 (push_event): Adjust to use ptid_t.
1343 (read_ptid, write_ptid): Declare.
1344 (prepare_resume_reply): Adjust to use ptid_t.
1345 (clear_symbol_cache): Declare.
1346 * inferiors.c (all_processes): New.
1347 (null_ptid, minus_one_ptid): New.
1348 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
1349 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
1350 (add_thread): Change unsigned long to ptid. Remove gdb_id
1351 parameter. Adjust.
1352 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
1353 (gdb_id_to_thread): Rename to ...
1354 (find_thread_pid): ... this. Change unsigned long to ptid.
1355 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
1356 (loaded_dll, pull_pid_from_list): Adjust.
1357 (add_process, remove_process, find_process_pid)
1358 (get_thread_process, current_process, initialize_inferiors): New.
1359 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
1360 (struct target_waitstatus) <related_pid>: Ditto.
1361 (struct target_ops) <kill, detach>: Add `pid' argument. Change
1362 return type to int.
1363 (struct target_ops) <join>: Add `pid' argument.
1364 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
1365 (struct target_ops) <wait>: Add `ptid' field. Change return type
1366 to ptid.
1367 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
1368 (mywait): Add `ptid' argument. Change return type to ptid_t.
1369 (target_pid_to_str): Declare.
1370 * target.c (set_desired_inferior): Adjust to use ptids.
1371 (mywait): Add new `ptid' argument. Adjust.
1372 (target_pid_to_str): New.
1373 * mem-break.h (free_all_breakpoints): Declare.
1374 * mem-break.c (breakpoints): Delelete.
1375 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
1376 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
1377 to use per-process breakpoint list.
1378 (free_all_breakpoints): New.
1379 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
1380 (symbol_cache, all_symbols_looked_up): Delete.
1381 (hexchars): New.
1382 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
1383 read_ptid): New.
1384 (prepare_resume_reply): Change ptid argument's type from unsigned
1385 long to ptid_t. Adjust. Implement W;process and X;process.
1386 (free_sym_cache, clear_symbol_cache): New.
1387 (look_up_one_symbol): Adjust to per-process symbol cache. *
1388 * server.c (cont_thread, general_thread, step_thread): Change type
1389 to ptid_t.
1390 (attached): Delete.
1391 (multi_process): New.
1392 (last_ptid): Change type to ptid_t.
1393 (struct vstop_notif) <ptid>: Change type to ptid_t.
1394 (queue_stop_reply, push_event): Change `ptid' argument's type to
1395 ptid_t.
1396 (discard_queued_stop_replies): Add `pid' argument.
1397 (start_inferior): Adjust to use ptids. Adjust to mywait interface
1398 changes. Don't reference the `attached' global.
1399 (attach_inferior): Adjust to mywait interface changes.
1400 (handle_query): Adjust to use ptids. Parse GDB's qSupported
1401 features. Handle and report "multiprocess+". Handle
1402 "qAttached:PID".
1403 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
1404 changes.
1405 (handle_v_kill): New.
1406 (handle_v_stopped): Adjust to use target_pid_to_str.
1407 (handle_v_requests): Allow multiple attaches and runs when
1408 multiprocess extensions are in effect. Handle "vKill".
1409 (myresume): Adjust to use ptids.
1410 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
1411 (handle_status): Adjust to discard_queued_stop_replies interface
1412 change.
1413 (first_thread_of, kill_inferior_callback)
1414 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
1415 (main): Call initialize_inferiors. Adjust to use ptids, killing
1416 and detaching from all inferiors. Handle multiprocess packet
1417 variants.
1418 * linux-low.h: Include gdb_proc_service.h.
1419 (struct process_info_private): New.
1420 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
1421 <lwpid_of>: Use ptid_get_lwp.
1422 (get_lwp_thread): Adjust.
1423 (struct lwp_info): Add `dead' member.
1424 (find_lwp_pid): Declare.
1425 * linux-low.c (thread_db_active): Delete.
1426 (new_inferior): Adjust comment.
1427 (inferior_pid): Delete.
1428 (linux_add_process): New.
1429 (handle_extended_wait): Adjust.
1430 (add_lwp): Change unsigned long to ptid.
1431 (linux_create_inferior): Add process to processes table. Adjust
1432 to use ptids. Don't set new_inferior here.
1433 (linux_attach_lwp): Rename to ...
1434 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
1435 it. Adjust to use ptids.
1436 (linux_attach_lwp): New.
1437 (linux_attach): Add process to processes table. Don't set
1438 new_inferior here.
1439 (struct counter): New.
1440 (second_thread_of_pid_p, last_thread_of_process_p): New.
1441 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
1442 multiple processes.
1443 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
1444 processes. Remove process from process table.
1445 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
1446 to multiple processes.
1447 (any_thread_of): New.
1448 (linux_detach): Add `pid' argument, and handle it. Remove process
1449 from processes table.
1450 (linux_join): Add `pid' argument. Handle it.
1451 (linux_thread_alive): Change unsighed long argument to ptid_t.
1452 Consider dead lwps as not being alive.
1453 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
1454 threads we're not interested in.
1455 (same_lwp, find_lwp_pid): New.
1456 (linux_wait_for_lwp): Change `pid' argument's type from int to
1457 ptid_t. Adjust.
1458 (linux_wait_for_event): Rename to ...
1459 (linux_wait_for_event_1): ... this. Change `pid' argument's type
1460 from int to ptid_t. Adjust.
1461 (linux_wait_for_event): New.
1462 (linux_wait_1): Add `ptid' argument. Change return type to
1463 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
1464 that exit from the process table.
1465 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
1466 Adjust.
1467 (mark_lwp_dead): New.
1468 (wait_for_sigstop): Adjust to use ptids. If a process exits while
1469 stopping all threads, mark its main lwp as dead.
1470 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
1471 ptids.
1472 (fetch_register, usr_store_inferior_registers)
1473 (regsets_fetch_inferior_registers)
1474 (regsets_store_inferior_registers, linux_read_memory)
1475 (linux_write_memory): Inline `inferior_pid'.
1476 (linux_look_up_symbols): Adjust to use per-process
1477 `thread_db_active'.
1478 (linux_request_interrupt): Adjust to use ptids.
1479 (linux_read_auxv): Inline `inferior_pid'.
1480 (initialize_low): Don't reference thread_db_active.
1481 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
1482 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
1483 (ps_getpid): Return the pid of the current inferior.
1484 * thread-db.c (proc_handle, thread_agent): Delete.
1485 (thread_db_create_event, thread_db_enable_reporting): Adjust to
1486 per-process data.
1487 (find_one_thread): Change argument type to ptid_t. Adjust to
1488 per-process data.
1489 (maybe_attach_thread): Adjust to per-process data and ptids.
1490 (thread_db_find_new_threads): Ditto.
1491 (thread_db_init): Ditto.
1492 * spu-low.c (spu_create_inferior, spu_attach): Add process to
1493 processes table. Adjust to use ptids.
1494 (spu_kill, spu_detach): Adjust interface. Remove process from
1495 processes table.
1496 (spu_join, spu_thread_alive): Adjust interface.
1497 (spu_wait): Adjust interface. Remove process from processes
1498 table. Adjust to use ptids.
1499 * win32-low.c (current_inferior_tid): Delete.
1500 (current_inferior_ptid): New.
1501 (debug_event_ptid): New.
1502 (thread_rec): Take a ptid. Adjust.
1503 (child_add_thread): Add `pid' argument. Adjust to use ptids.
1504 (child_delete_thread): Ditto.
1505 (do_initial_child_stuff): Add `attached' argument. Add process to
1506 processes table.
1507 (child_fetch_inferior_registers, child_store_inferior_registers):
1508 Adjust.
1509 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
1510 (win32_attach): Pass 1 to do_initial_child_stuff.
1511 (win32_kill): Adjust interface. Remove process from processes
1512 table.
1513 (win32_detach): Ditto.
1514 (win32_join): Adjust interface.
1515 (win32_thread_alive): Take a ptid.
1516 (win32_resume): Adjust to use ptids.
1517 (get_child_debug_event): Ditto.
1518 (win32_wait): Adjust interface. Remove exiting process from
1519 processes table.
1520
bd99dc85
PA
15212009-04-01 Pedro Alves <pedro@codesourcery.com>
1522
1523 Non-stop mode support.
1524
1525 * server.h (non_stop): Declare.
1526 (gdb_client_data, handler_func): Declare.
1527 (delete_file_handler, add_file_handler, start_event_loop):
1528 Declare.
1529 (handle_serial_event, handle_target_event, push_event)
1530 (putpkt_notif): Declare.
1531 * target.h (enum resume_kind): New.
1532 (struct thread_resume): Replace `step' field by `kind' field.
1533 (TARGET_WNOHANG): Define.
1534 (struct target_ops) <wait>: Add `options' argument.
1535 <supports_non_stop, async, start_non_stop>: New fields.
1536 (target_supports_non_stop, target_async): New.
1537 (start_non_stop): Declare.
1538 (mywait): Add `options' argument.
1539 * target.c (mywait): Add `options' argument. Print child exit
1540 notifications here.
1541 (start_non_stop): New.
1542 * server.c (non_stop, own_buf, mem_buf): New globals.
1543 (struct vstop_notif): New.
1544 (notif_queue): New global.
1545 (queue_stop_reply, push_event, discard_queued_stop_replies)
1546 (send_next_stop_reply): New.
1547 (start_inferior): Adjust to use resume_kind. Adjust to mywait
1548 interface changes.
1549 (attach_inferior): In non-stop mode, don't wait for the target
1550 here.
1551 (handle_general_set): Handle QNonStop.
1552 (handle_query): When handling qC, return the current general
1553 thread, instead of the first thread of the list.
1554 (handle_query): If the backend supports non-stop mode, include
1555 QNonStop+ in the qSupported query response.
1556 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
1557 and non-stop mode.
1558 (handle_v_attach, handle_v_run): Handle non-stop mode.
1559 (handle_v_stopped): New.
1560 (handle_v_requests): Report support for vCont;t. Handle vStopped.
1561 (myresume): Adjust to use resume_kind. Handle non-stop.
1562 (queue_stop_reply_callback): New.
1563 (handle_status): Handle non-stop mode.
1564 (main): Clear non_stop flag on reconnection. Use the event-loop.
1565 Refactor serial protocol handling from here ...
1566 (process_serial_event): ... to this new function. When GDB
1567 selects any thread, select one here. In non-stop mode, wait until
1568 GDB acks all pending events before exiting.
1569 (handle_serial_event, handle_target_event): New.
1570 * remote-utils.c (remote_open): Install remote_desc in the event
1571 loop.
1572 (remote_close): Remove remote_desc from the event loop.
1573 (putpkt_binary): Rename to...
1574 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
1575 (putpkt_binary): New as wrapper around putpkt_binary_1.
1576 (putpkt_notif): New.
1577 (prepare_resume_reply): In non-stop mode, don't change the
1578 general_thread.
1579 * event-loop.c: New.
1580 * Makefile.in (OBJ): Add event-loop.o.
1581 (event-loop.o): New rule.
1582
1583 * linux-low.h (pid_of): Moved here.
1584 (lwpid_of): New.
1585 (get_lwp_thread): Use lwpid_of.
1586 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
1587 * linux-low.c (pid_of): Delete.
1588 (inferior_pid): Use lwpid_of.
1589 (linux_event_pipe): New.
1590 (target_is_async_p): New.
1591 (delete_lwp): New.
1592 (handle_extended_wait): Use lwpid_of.
1593 (add_lwp): Don't set lwpid field.
1594 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
1595 (linux_kill_one_lwp): If killing a running lwp, stop it first.
1596 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
1597 (linux_detach_one_lwp): If detaching from a running lwp, stop it
1598 first. Adjust to linux_wait_for_event interface changes. Use
1599 lwpid_of.
1600 (linux_detach): Don't delete the main lwp here.
1601 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
1602 (status_pending_p): Don't consider explicitly suspended lwps.
1603 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
1604 pointer. Add OPTIONS argument. Change return type to int. Use
1605 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
1606 (linux_wait_for_event): Take an integer pid instead of a lwp_info
1607 pointer. Add status pointer argument. Return a pid instead of a
1608 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
1609 changes. In non-stop mode, don't switch to a random thread.
1610 (linux_wait): Rename to...
1611 (linux_wait_1): ... this. Add target_options argument, and handle
1612 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
1613 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
1614 clean exit and signal exit code. Don't stop all threads in
1615 non-stop mode. In all-stop mode, only stop all threads when
1616 reporting a stop to GDB. Handle explicit thread stop requests.
1617 (async_file_flush, async_file_mark): New.
1618 (linux_wait): New.
1619 (send_sigstop): Use lwpid_of.
1620 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
1621 interface changes. In non-stop mode, don't switch to a random
1622 thread.
1623 (linux_resume_one_lwp): Use lwpid_of.
1624 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
1625 (linux_resume_one_thread): ... this. Handle resume_stop. In
1626 non-stop mode, don't look for pending flag in all threads.
1627 (resume_status_pending_p): Don't consider explicitly suspended
1628 threads.
1629 (my_waitpid): Reimplement. Emulate __WALL.
1630 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
1631 Use lwpid_of.
1632 (sigchld_handler, linux_supports_non_stop, linux_async)
1633 (linux_start_non_stop): New.
1634 (linux_target_ops): Register linux_supports_non_stop, linux_async
1635 and linux_start_non_stop.
1636 (initialize_low): Install SIGCHLD handler.
1637 * thread-db.c (thread_db_create_event, find_one_thread)
1638 (thread_db_get_tls_address): Use lwpid_of.
1639 * win32-low.c (win32_detach): Adjust to use resume_kind.
1640 (win32_wait): Add `options' argument.
1641 * spu-low.c (spu_resume): Adjust to use resume_kind.
1642 (spu_wait): Add `options' argument.
1643
5b1c542e
PA
16442009-04-01 Pedro Alves <pedro@codesourcery.com>
1645
1646 Decouple target code from remote protocol.
1647
1648 * target.h (enum target_waitkind): New.
1649 (struct target_waitstatus): New.
1650 (struct target_ops) <wait>: Return an unsigned long. Take a
1651 target_waitstatus pointer instead of a char pointer.
1652 (mywait): Likewise.
1653 * target.c (mywait): Change prototype to return an unsigned long.
1654 Take a target_waitstatus pointer instead of a char pointer. Adjust.
1655 * server.h (thread_from_wait, old_thread_from_wait): Delete
1656 declarations.
1657 (prepare_resume_reply): Change prototype to take a
1658 target_waitstatus.
1659 * server.c (thread_from_wait, old_thread_from_wait): Delete.
1660 (last_status, last_ptid): New.
1661 (start_inferior): Remove "statusptr" argument. Adjust. Return a
1662 pid instead of a signal.
1663 (attach_inferior): Remove "status" and "signal" parameters.
1664 Adjust.
1665 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
1666 not as an address.
1667 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
1668 (handle_v_requests, myresume): Remove "status" and "signal"
1669 parameters. Adjust.
1670 (handle_status): New.
1671 (main): Delete local `status'. Adjust.
1672 * remote-utils.c: Include target.h.
1673 (prepare_resume_reply): Change prototype to take a
1674 target_waitstatus. Adjust.
1675
1676 * linux-low.c (linux_wait): Adjust to new target_ops->wait
1677 interface.
1678 * spu-low.c (spu_wait): Adjust.
1679 * win32-low.c (enum target_waitkind, struct target_waitstatus):
1680 Delete.
1681 (win32_wait): Adjust.
1682
2bd7c093
PA
16832009-04-01 Pedro Alves <pedro@codesourcery.com>
1684
1685 * target.h (struct thread_resume): Delete leave_stopped member.
1686 (struct target_ops): Add a `n' argument to the `resume' callback.
1687 * server.c (start_inferior): Adjust.
1688 (handle_v_cont, myresume): Adjust.
1689 * linux-low.c (check_removed_breakpoint): Adjust to resume
1690 interface change, and to removed leave_stopped field.
1691 (resume_ptr): Delete.
1692 (struct thread_resume_array): New.
1693 (linux_set_resume_request): Add new `arg' parameter. Adjust to
1694 resume interface change.
1695 (linux_continue_one_thread, linux_queue_one_thread)
1696 (resume_status_pending_p): Check if the resume field is NULL
1697 instead of checking the leave_stopped member.
1698 (linux_resume): Adjust to the target resume interface change.
1699 * spu-low.c (spu_resume): Adjust to the target resume interface
1700 change.
1701 * win32-low.c (win32_detach, win32_resume): Ditto.
1702
c35fafde
PA
17032009-04-01 Pedro Alves <pedro@codesourcery.com>
1704
1705 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
1706 flag.
1707 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
1708 pending.
1709 (linux_continue_one_thread): Only preserve the stepping flag if
1710 there's a pending breakpoint.
1711
0a59d50b
PA
17122009-03-31 Pedro Alves <pedro@codesourcery.com>
1713
1714 * server.c (main): After the inferior having exited, call
1715 remote_close before exiting gdbserver.
1716
f04c6d38
TJB
17172009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
1718
1719 Fix size of FPSCR in Power 7 processors.
1720 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
1721 (PPC_FEATURE_HAS_DFP): New #define.
1722 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
1723 size of the FPSCR.
1724
78e5cee6
PA
17252009-03-23 Pedro Alves <pedro@codesourcery.com>
1726
1727 * server.c (handle_query) Whitespace and formatting.
1728
1b3f6016
PA
17292009-03-22 Pedro Alves <pedro@codesourcery.com>
1730
1731 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
1732 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
1733 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
1734 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
1735 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
1736 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
1737 Makefile.in, configure.ac: Fix whitespace throughout.
1738 * configure: Regenerate.
1739
a07b2135
PA
17402009-03-22 Pedro Alves <pedro@codesourcery.com>
1741
1742 * inferiors.c (find_inferior): Make it safe for the callback
1743 function to delete the currently iterated inferior.
1744
67cc2626
PA
17452009-03-22 Pedro Alves <pedro@codesourcery.com>
1746
1747 * Makefile.in (linuw_low_h): Move higher.
1748 (thread-db.o): Depend on $(linux_low_h).
1749
54a0b537
PA
17502009-03-17 Pedro Alves <pedro@codesourcery.com>
1751
1752 Rename "process" to "lwp" throughout.
1753
1754 * linux-low.c (all_processes): Rename to...
1755 (all_lwps): ... this.
1756 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
1757 (add_process): Rename to ...
1758 (add_lwp): ... this. Adjust.
1759 (linux_create_inferior): Adjust.
1760 (linux_attach_lwp): Adjust.
1761 (linux_attach): Adjust.
1762 (linux_kill_one_process): Rename to ...
1763 (linux_kill_one_lwp): ... this. Adjust.
1764 (linux_kill): Adjust.
1765 (linux_detach_one_process): Rename to ...
1766 (linux_detach_one_lwp): ... this. Adjust.
1767 (linux_detach): Adjust.
1768 (check_removed_breakpoint): Adjust.
1769 (status_pending_p): Adjust.
1770 (linux_wait_for_process): Rename to ...
1771 (linux_wait_for_lwp): ... this. Adjust.
1772 (linux_wait_for_event): Adjust.
1773 (send_sigstop): Adjust.
1774 (wait_for_sigstop): Adjust.
1775 (stop_all_processes): Rename to ...
1776 (stop_all_lwps): ... this.
1777 (linux_resume_one_process): Rename to ...
1778 (linux_resume_one_lwp): ... this. Adjust.
1779 (linux_set_resume_request, linux_continue_one_thread)
1780 (linux_queue_one_thread, resume_status_pending_p)
1781 (usr_store_inferior_registers, regsets_store_inferior_registers)
1782 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
1783 Adjust.
1784 * linux-low.h (get_process): Rename to ...
1785 (get_lwp): ... this. Adjust.
1786 (get_thread_process): Rename to ...
1787 (get_thread_lwp): ... this. Adjust.
1788 (get_process_thread): Rename to ...
1789 (get_lwp_thread): ... this. Adjust.
1790 (struct process_info): Rename to ...
1791 (struct lwp_info): ... this.
1792 (all_processes): Rename to ...
1793 (all_lwps): ... this.
1794 * proc-service.c (ps_lgetregs): Adjust.
1795 * thread-db.c (thread_db_create_event, find_one_thread)
1796 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
1797
0b16c5cf
PA
17982009-03-14 Pedro Alves <pedro@codesourcery.com>
1799
1800 * server.c (handle_query): Handle "qAttached".
1801
32de4b9d
NS
18022009-03-13 Nathan Sidwell <nathan@codesourcery.com>
1803
1804 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
1805 GPLv3, update license URL.
1806
2aecd87f
DE
18072009-03-01 Doug Evans <dje@google.com>
1808
93efd302 1809 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
1810 (server_h): Add gdb_signals.h.
1811 (signals.o): Update.
1812 * server.h (target_signal_from_host,target_signal_to_host_p)
1813 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
1814
86b1f9c5
PM
18152009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
1816
1817 * remote-utils.c (getpkt): Also generate remote-debug
1818 information if noack_mode is set.
1819
4aa995e1
PA
18202009-02-06 Pedro Alves <pedro@codesourcery.com>
1821
1822 * server.c (handle_query): Report qXfer:siginfo:read and
1823 qXfer:siginfo:write as supported and handle them.
1824 * target.h (struct target_ops) <qxfer_siginfo>: New field.
1825 * linux-low.c (linux_xfer_siginfo): New.
1826 (linux_target_ops): Set it.
1827
62709adf
PA
18282009-01-26 Pedro Alves <pedro@codesourcery.com>
1829
1830 * server.c (gdbserver_usage): Mention --remote-debug.
1831 (main): Accept '--remote-debug' switch.
1832
aef93bd7
DE
18332009-01-18 Doug Evans <dje@google.com>
1834
1835 * regcache.c (new_register_cache): No need to check result of xcalloc.
1836 * server.c (handle_search_memory): Back out calls to xmalloc,
1837 result is checked and error is returned to user upon failure.
1838 (handle_query): Ditto. Add more checks for result of malloc.
1839 (handle_v_cont): Check result of malloc, report error back to
1840 user upon failure.
1841 (handle_v_run): Ditto. Call freeargv.
1842 * server.h (freeargv): Declare.
1843 * utils.c (freeargv): New fn.
1844
54363045
DE
18452009-01-15 Doug Evans <dje@google.com>
1846
f626972c
DE
1847 * gdbreplay.c (perror_with_name): Make arg const char *.
1848 * server.h (target_signal_to_name): Make return type const char *.
0842e787 1849 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 1850 * utils.c (perror_with_name): Make arg const char *.
54363045 1851
18aae699
PA
18522009-01-14 Pedro Alves <pedro@codesourcery.com>
1853
1854 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
1855 when handling a EXIT_PROCESS_DEBUG_EVENT.
1856
ff703abe
JB
18572009-01-06 Joel Brobecker <brobecker@adacore.com>
1858
1859 * gdbreplay.c (gdbreplay_version): Update copyright year.
1860 * server.c (gdbserver_version): Likewise.
1861
f21cc1a2 18622009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
1863
1864 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 1865 (handle_extended_wait): Improve comment.
0e21c1ec 1866
bca929d3
DE
18672008-12-13 Doug Evans <dje@google.com>
1868
1869 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
1870 * server.h (ATTR_MALLOC): New macro.
1871 (xmalloc,xcalloc,xstrdup): Declare.
1872 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
1873 * inferiors.c: Ditto.
1874 * linux-low.c: Ditto.
1875 * mem-break.c: Ditto.
1876 * regcache.c: Ditto.
1877 * remote-utils.c: Ditto.
1878 * server.c: Ditto.
1879 * target.c: Ditto.
1880 * win32-low.c: Ditto.
1881
97438e3f
DE
18822008-12-12 Doug Evans <dje@google.com>
1883
896c7fbb
DE
1884 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
1885 in debugging printf.
1886
97438e3f
DE
1887 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
1888
e3b886f8
DE
18892008-12-09 Doug Evans <dje@google.com>
1890
1891 * linux-low.h (struct process_info): Delete member tid, unused.
1892 * thread-db.c (find_one_thread): Update.
1893 (maybe_attach_thread): Update.
1894
07e059b5
VP
18952008-12-02 Pedro Alves <pedro@codesourcery.com>
1896
1897 * target.h (struct target_ops): Add qxfer_osdata member.
1898 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
1899 and dirent.h.
1900 (linux_qxfer_osdata): New functions.
1901 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
1902 callback.
1903 * server.c (handle_query): Handle "qXfer:osdata:read:".
1904 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
1905 (buffer_xml_printf): New functions.
1906 * server.h (struct buffer): New.
1907 (buffer_grow_str, buffer_grow_str0): New macros.
1908 (buffer_grow, buffer_free, buffer_init, buffer_finish)
1909 (buffer_xml_printf): Declare.
1910
4cab47ab
DE
19112008-11-24 Doug Evans <dje@google.com>
1912
1913 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
1914
f142445f
DJ
19152008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
1916
1917 * server.c (handle_v_run): Always use the supplied argument list.
1918
d0107bb6
BW
19192008-11-19 Bob Wilson <bob.wilson@acm.org>
1920
1921 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
1922 (xtensa_regmap_table): Add entry for scompare1.
1923
2c4ad781
TJB
19242008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
1925
1926 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
1927 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
1928 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
1929 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
1930 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
1931 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
1932 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
1933 XML target descriptions.
1934 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
1935 when inferior is running on an ISA 2.05 or later processor. Add
1936 special case to return offset for full 64-bit slot of FPSCR when
1937 in 32-bits.
1938
dfb64f85
DJ
19392008-11-14 Daniel Gutson <dgutson@codesourcery.com>
1940
1941 * Makefile.in (SFILES, clean): Added sparc64 files.
1942 (reg-sparc64.o, reg-sparc64.c): New.
1943 * configure.srv (sparc*-*-linux*): New configuration.
1944 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
1945 syscall arguments for SPARC.
1946 (regsets_store_inferior_registers): Likewise.
1947 * linux-sparc-low.c: New file.
1948
66b6e1dd
DE
19492008-10-21 Doug Evans <dje@google.com>
1950
1951 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
1952 (READLINE_DIR,READLINE_DEP): Delete.
1953 (INTERNAL_CFLAGS): Update.
1954 (LINTFLAGS): Update.
1955
9b710a42
PA
19562008-10-10 Pedro Alves <pedro@codesourcery.com>
1957
1958 * server.c (handle_v_run): If GDB didn't specify an argv, use the
1959 whole argv from the last run, not just argv[0].
1960
5822d809
PA
19612008-09-08 Pedro Alves <pedro@codesourcery.com>
1962
1963 * regcache.c (new_register_cache): Return NULL if the register
1964 cache size isn't known yet.
1965 (free_register_cache): Avoid dereferencing a NULL regcache.
1966
74aac56f
DJ
19672008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
1968
1969 * configure.srv: Merge MIPS and MIPS64.
1970
400b20f5
MR
19712008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
1972
1973 * Makefile.in (uninstall): Apply $(EXEEXT) too.
1974
677c5bb1
LM
19752008-08-18 Luis Machado <luisgpm@br.ibm.com>
1976
1977 * Makefile.in: Add required vsx dependencies.
1978
1979 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
1980 Declare init_registers_powerpc_vsx32l.
1981 Declare init_registers_powerpc_vsx64l.
1982 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
1983 (ppc_arch_setup): Check for VSX in hwcap.
1984 (ppc_fill_vsxregset): New function.
1985 (ppc_store_vsxregset): New function.
1986 Add new VSX entry in regset_info target_regsets.
1987
1988 * configure.srv: Add new VSX dependencies.
1989
a6f3e723
SL
19902008-08-12 Pedro Alves <pedro@codesourcery.com>
1991
1992 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
1993 (remote_open): Set or clear transport_is_reliable.
1994 (putpkt_binary): Don't expect acks in noack mode.
1995 (getpkt): Don't send ack/nac in noack mode.
1996 * server.c (handle_general_set): Handle QStartNoAckMode.
1997 (handle_query): If connected by tcp pass QStartNoAckMode+ in
1998 qSupported.
1999 (main): Reset noack_mode on every connection.
2000 * server.h (noack_mode): Declare.
2001
a417dc56
RW
20022008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2003
2004 * Makefile.in (GDBREPLAY_OBS): New variable.
2005 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
2006
3221518c
UW
20072008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
2008 Daniel Jacobowitz <dan@codesourcery.com>
2009
2010 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
2011 (usr_store_inferior_registers): Likewise.
2012 (regsets_store_inferior_registers): Likewise.
2013
ec56be1b
PA
20142008-07-31 Rolf Jansen <rj@surtec.com>
2015 Pedro Alves <pedro@codesourcery.com>
2016
2017 * configure.ac: Check for memmem declaration.
2018 * server.c [HAVE_MALLOC_H]: Include malloc.h.
2019 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
2020 (disable_packet_qfThreadInfo): Unconditionally compile.
2021 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
2022 * configure, config.in: Regenerate.
2023
2fe5e3ff
DE
20242008-07-28 Doug Kwan <dougkwan@google.com>
2025
2026 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
2027 (linux_write_memory): Remove declaration of errno.
2028
836acd6d
UW
20292008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
2030
2031 * linux-low.c (handle_extended_wait): Do not use "status"
2032 variable uninitialized.
2033
aeba519e
PA
20342008-07-07 Pedro Alves <pedro@codesourcery.com>
2035
2036 * server.c (handle_v_attach): Inhibit reporting dll changes.
2037
db42f210
PA
20382008-06-27 Pedro Alves <pedro@codesourcery.com>
2039
2040 * remote-utils.c (prepare_resume_reply): If requested, don't
2041 output "thread:TID" in the T stop reply.
2042
2043 * server.c (disable_packet_vCont, disable_packet_Tthread)
2044 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
2045 (handle_query): If requested, disable support for qC, qfThreadInfo
2046 and qsThreadInfo.
2047 (handle_v_requests): If requested, disable support for vCont.
2048 (gdbserver_show_disableable): New.
2049 (main): Handle --disable-packet and --disable-packet=LIST.
2050
2051 * server.h (disable_packet_vCont, disable_packet_Tthread)
2052 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
2053
8e4c5421
CD
20542008-06-20 Carlos O'Donell <carlos@codesourcery.com>
2055
2056 * server.c (gdbserver_usage): Mention --version.
2057
6e23a804
DJ
20582008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
2059
2060 * Makefile.in (gdbreplay.o): New rule.
2061
90aa6a40
JM
20622008-06-06 Joseph Myers <joseph@codesourcery.com>
2063
2064 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
2065 message, not gdbserver.
2066
c16158bc
JM
20672008-06-05 Vladimir Prus <vladimir@codesourcery.com>
2068 Nathan Sidwell <nathan@codesourcery.com>
2069 Joseph Myers <joseph@codesourcery.com>
2070
2071 * acinclude.m4: Include ../../config/acx.m4.
2072 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
2073 * configure, config.in: Regenerate.
2074 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
2075 * server.c (gdbserver_version): Print PKGVERSION.
2076 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
2077 (main): Adjust gdbserver_usage calls.
2078 * gdbreplay.c (version, host_name): Add declarations.
2079 (gdbreplay_version, gdbreplay_usage): New.
2080 (main): Accept --version and --help options.
2081
aeb75bf5
DJ
20822008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
2083
2084 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
2085 (arm_breakpoint_at): Handle Thumb.
2086 (the_low_target): Add comment.
2087
76b233dd
UW
20882008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
2089
2090 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
2091
08388c79
DE
20922008-05-09 Doug Evans <dje@google.com>
2093
a3c83fae
DE
2094 * server.h (decode_search_memory_packet): Declare.
2095 * remote-utils.c (decode_search_memory_packet): New fn.
2096 * server.c (handle_search_memory_1): New fn.
08388c79
DE
2097 (handle_search_memory): New fn.
2098 (handle_query): Process qSearch:memory packets.
2099
bb9c3d36
UW
21002008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
2101
2102 * regcache.c (registers_length): Remove.
2103 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
2104 full register packet.
2105 * regcache.h (registers_length): Remove prototype.
2106 * server.h (PBUFSIZ): Define to 16384.
2107
7284e1be
UW
21082008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
2109
2110 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
2111 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
2112 powerpc-64l.o, and powerpc-altivec64l.o.
2113 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
2114 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
2115 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
2116 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
2117 rs6000/power-linux.xml, and rs6000/power64-linux.xml
2118 to srv_xmlfiles.
2119
2120 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
2121 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
2122 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
2123 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
2124 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
2125 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
2126 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
2127 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
2128 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
2129 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
2130 (clean): Update.
2131
2132 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
2133 (init_registers_powerpc_32l): ... this new prototype.
2134 (init_registers_powerpc_32): Remove, replace by ...
2135 (init_registers_powerpc_altivec32l): ... this new prototype.
2136 (init_registers_powerpc_e500): Remove, replace by ...
2137 (init_registers_powerpc_e500l): ... this new prototype.
2138 (init_registers_ppc64): Remove, replace by ...
2139 (init_registers_powerpc_64l): ... this new prototype.
2140 (init_registers_powerpc_64): Remove, replace by ...
2141 (init_registers_powerpc_altivec64l): ... this new prototype.
2142 (ppc_num_regs): Set to 73.
2143 (PT_ORIG_R3, PT_TRAP): Define if necessary.
2144 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
2145 (ppc_cannot_store_register): Handle orig_r3 and trap.
2146 (ppc_arch_setup): Update init_registers_... calls.
2147 (ppc_fill_gregset): Handle orig_r3 and trap.
2148
2149 * inferiors.c (clear_inferiors): Reset current_inferior.
2150
fdc59709
PB
21512008-04-23 Paolo Bonzini <bonzini@gnu.org>
2152
2153 * acinclude.m4: Add override.m4.
2154 * configure: Regenerate.
2155
c9b2f845
UW
21562008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
2157
2158 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
2159 initial call to init_register_ppc64.
2160
550512b8
UW
21612008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
2162
2163 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into single
2164 powerpc*-*-linux* case.
2165 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
2166
b6430ec3
UW
21672008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
2168
2169 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
2170 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
2171 from reg_xmlfiles.
2172 * linux-ppc-low.c: Include <elf.h>.
2173 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
2174 (ppc_hwcap): New global variable.
2175 (ppc_regmap): Remove __SPE__ #ifdef sections.
2176 (ppc_regmap_e500): New global variable.
2177 (ppc_cannot_store_register): Update __SPE__ special case.
2178 (ppc_get_hwcap): New function.
2179 (ppc_arch_setup): Use it to determine whether inferior supports
2180 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
2181 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
2182 Do not access registers if target does not support AltiVec.
2183 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
2184 Do not access registers if target does not support SPE.
2185 (target_regsets): Unconditionally include AltiVec and SPE regsets.
2186
52fa2412
UW
21872008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
2188
2189 * linux-low.c (disabled_regsets, num_regsets): New.
2190 (use_regsets_p): Delete.
2191 (linux_wait_for_process): Clear disabled_regsets.
2192 (regsets_fetch_inferior_registers): Check and set it.
2193 (regsets_store_inferior_registers): Likewise.
2194 (linux_fetch_registers, linux_store_registers): Do not use
2195 use_regsets_p.
2196 (initialize_low): Allocate disabled_regsets.
2197
e28b3332
DJ
21982008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
2199
2200 * Makefile.in (LIBOBJS): New.
2201 (OBS): Use LIBOBJS.
2202 (memmem.o): New rule.
2203 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
2204 * configure: Regenerated.
2205
4536995d
UW
22062008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
2207
2208 * server.c (handle_query): Never return "unsupported" for
2209 qXfer:features:read queries.
2210
221c031f
UW
22112008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
2212
2213 * server.c (get_features_xml): Fix inverted condition.
2214 (handle_query): Always support qXfer:feature:read.
2215
ccd213ac
DJ
22162008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
2217
2218 * server.c (wrapper_argv): New.
2219 (start_inferior): Handle wrapper_argv. If set, expect an extra
2220 trap.
2221 (gdbserver_usage): Document --wrapper.
2222 (main): Parse --wrapper.
2223
6fe305f7
UW
22242008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
2225
2226 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
2227 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
2228 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
2229 (ppc_set_pc): Likewise.
2230 (ppc_arch_setup): New function.
2231 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
2232 of collect_register.
2233 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
2234
5b0a002e
UW
22352008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
2236
2237 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
2238 instead of linux-ppc64-low.o.
2239 * linux-ppc64-low.c: Remove file.
2240 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
2241 (linux-ppc64-low.o): Remove rule.
2242
2243 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
2244 (init_registers_powerpc_64): Likewise.
2245 (ppc_regmap): Conditionally define depending on __powerpc64__.
2246 (ppc_cannot_store_register): Do not special-case "fpscr" when
2247 compiled on __powerpc64__.
2248 (ppc_collect_ptrace_register): New function.
2249 (ppc_supply_ptrace_register): New function.
2250 (ppc_breakpoint): Change type to "unsigned int".
2251 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
2252 (the_low_target): Conditionally provide initializers for the
2253 arch_setup member depending on __powerpc64__. Install
2254 collect_ptrace_register and supply_ptrace_register members.
2255
9b4b61c8
UW
22562008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
2257
2258 * regcache.h (gdbserver_xmltarget): Add extern declaration.
2259 * server.c (gdbserver_xmltarget): Define.
2260 (get_features_xml): Use it to replace "target.xml" and arch_string.
2261
2262 * configure.srv: Remove srv_xmltarget. Add XML files that were
2263 mentioned there to srv_xmlfiles instead. Remove conditional tests
2264 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
2265 srv_xmlfiles and srv_regobj to include all possible choices.
2266 * configure.ac (srv_xmltarget): Remove.
2267 (srv_xmlfiles): Do not add "target.xml".
2268 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
2269 checks for supplementary target information.
2270 * configure: Regenerate.
2271 * Makefile.in (XML_TARGET): Remove.
2272 (target.xml): Remove rule.
2273 (clean): Do not clean up target.xml.
2274 (.PRECIOUS): Do not mention target.xml.
2275
2276 * target.h (struct target_ops): Remove arch_string member.
2277 * linux-low.c (linux_arch_string): Remove.
2278 (linux_target_ops): Remove arch_string initializer.
2279 * linux-low.h (struct linux_target_ops): Remove arch_string member.
2280 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
2281 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
2282 * spu-low.c (spu_arch_string): Remove.
2283 (spu_target_ops): Remove arch_string initializer.
2284 * win32-low.c (win32_arch_string): Remove.
2285 (win32_target_ops): Remove arch_string initializer.
2286 * win32-low.h (struct win32_target_ops): Remove arch_string member.
2287 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
2288 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
2289
ee1a7ae4
UW
22902008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
2291
2292 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
2293 by collect_ptrace_register and supply_ptrace_register hooks.
2294 * linux-low.c (fetch_register): Use supply_ptrace_register callback
2295 instead of checking for the_low_target.left_pad_xfer.
2296 (usr_store_inferior_registers): Use collect_ptrace_register callback
2297 instead of checking for the_low_target.left_pad_xfer.
2298
2299 * linux-s390-low.c (s390_collect_ptrace_register): New function.
2300 (s390_supply_ptrace_register): Likewise.
2301 (s390_fill_gregset): Call s390_collect_ptrace_register.
2302 (the_low_target): Update.
2303
2304 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
2305 (ppc_supply_ptrace_register): Likewise.
2306 (the_low_target): Update.
2307
2308 * linux-i386-low.c (the_low_target): Update.
2309 * linux-x86-64-low.c (the_low_target): Update.
2310
d61ddec4
UW
23112008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
2312
2313 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
2314 reg-s390.o and reg-s390x.o.
2315
2316 * linux-low.c (new_inferior): New global variable.
2317 (linux_create_inferior, linux_attach): Set it.
2318 (linux_wait_for_process): Call the_low_target.arch_setup after the
2319 target has stopped for the first time.
2320 (initialize_low): Do not call the_low_target.arch_setup.
2321
2322 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
2323 (s390_set_pc): Likewise.
2324 (s390_arch_setup): New function.
2325 (the_low_target): Use s390_arch_setup as arch_setup routine.
2326
2327 * regcache.c (realloc_register_cache): New function.
2328 (set_register_cache): Call it for each existing regcache.
2329
d05b4ac3
UW
23302008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
2331
2332 * server.h (init_registers): Remove prototype.
2333
2334 * linux-low.h (struct linux_target_ops): Add arch_setup field.
2335 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
2336 instead of init_registers ().
2337 * linux-arm-low.c (init_registers_arm): Add prototype.
2338 (init_registers_arm_with_iwmmxt): Likewise.
2339 (the_low_target): Add initializer for arch_setup field.
2340 * linux-cris-low.c (init_registers_cris): Add prototype.
2341 (the_low_target): Add initializer for arch_setup field.
2342 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
2343 (the_low_target): Add initializer for arch_setup field.
2344 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
2345 (the_low_target): Add initializer for arch_setup field.
2346 * linux-ia64-low.c (init_registers_ia64): Add prototype.
2347 (the_low_target): Add initializer for arch_setup field.
2348 * linux-m32r-low.c (init_registers_m32r): Add prototype.
2349 (the_low_target): Add initializer for arch_setup field.
2350 * linux-m68k-low.c (init_registers_m68k): Add prototype.
2351 (the_low_target): Add initializer for arch_setup field.
2352 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
2353 (init_registers_mips64_linux): Likewise.
2354 (the_low_target): Add initializer for arch_setup field.
2355 * linux-ppc-low.c (init_registers_ppc): Add prototype.
2356 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
2357 (the_low_target): Add initializer for arch_setup field.
2358 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
2359 (init_registers_powerpc_64): Likewise.
2360 (the_low_target): Add initializer for arch_setup field.
2361 * linux-s390-low.c (init_registers_s390): Add prototype.
2362 (init_registers_s390x): Likewise.
2363 (the_low_target): Add initializer for arch_setup field.
2364 * linux-sh-low.c (init_registers_sh): Add prototype.
2365 (the_low_target): Add initializer for arch_setup field.
2366 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
2367 (the_low_target): Add initializer for arch_setup field.
2368 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
2369 (the_low_target): Add initializer for arch_setup field.
2370
2371 * win32-low.h (struct win32_target_ops): Add arch_setup field.
2372 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
2373 instead of init_registers ().
2374 * win32-arm-low.c (init_registers_arm): Add prototype.
2375 (the_low_target): Add initializer for arch_setup field.
2376 * win32-i386-low.c (init_registers_i386): Add prototype.
2377 (the_low_target): Add initializer for arch_setup field.
2378
2379 * spu-low.c (init_registers_spu): Add prototype.
2380 (initialize_low): Call initialie_registers_spu () instead of
2381 initialize_registers ().
2382
fd96d250
PA
23832008-02-19 Pedro Alves <pedro@codesourcery.com>
2384
2385 * server.c (handle_v_requests): When handling the vRun and vAttach
2386 packets, if already debugging a process, don't kill it. Return an
2387 error instead.
2388
d41b6bb4
DJ
23892008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
2390
2391 * server.c (handle_query): Correct length check.
2392
5ac588cf
PA
23932008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
2394
2395 * win32-low.c (do_initial_child_stuff): Add process handle
2396 parameter. Set current_process_handle and current_process_id from the
2397 parameters. Clear globals.
2398 (win32_create_inferior): Don't set current_process_handle and
2399 current_process_id here. Instead pass them on the call to
2400 do_initial_child_stuff.
2401 (win32_attach): Likewise.
2402 (win32_clear_inferiors): New.
2403 (win32_kill): Don't close the current process handle or the
2404 current thread handle here. Instead call win32_clear_inferiors.
2405 (win32_detach): Don't open a new handle to the process. Call
2406 win32_clear_inferiors.
2407 (win32_join): Don't rely on current_process_handle; open a new
2408 handle using the process id.
2409 (win32_wait): Call win32_clear_inferiors when the inferior process
2410 has exited.
2411
ecd7ecbc
DJ
24122008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
2413
2414 * server.c (monitor_show_help): Add "exit".
2415
1525d545
MG
24162008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
2417
ecd7ecbc 2418 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
2419 (clean): Add reg-xtensa.c.
2420 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
2421 * configure.srv (xtensa*-*-linux*) New target.
2422 * linux-xtensa-low.c: New.
2423 * xtensa-xtregs.c: New.
1525d545 2424
59a016f0
PA
24252008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
2426
2427 * hostio.c: Don't include errno.h.
2428 (errno_to_fileio_errno): Move to hostio-errno.
2429 * hostio.c: (hostio_error): Remove the error parameter. Defer the
2430 error number outputting to the target->hostio_last_error callback.
2431 (hostio_packet_error): Use FILEIO_EINVAL directly.
2432 (handle_open, handle_pread, hostio_error, handle_unlink): Update
2433 calls to hostio_error.
2434 * hostio-errno.c: New.
2435 * server.h (hostio_last_error_from_errno): Declare.
2436 * target.h (target_ops): Add hostio_last_error member.
2437 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
2438 as hostio_last_error handler.
2439 * spu-low.c (spu_target_ops): Likewise.
2440 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
2441 (wince_hostio_last_error): New functions.
2442 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
2443 as hostio_last_error handler.
2444 (win32_target_ops) [!_WIN32_WCE]: Register
2445 hostio_last_error_from_errno as hostio_last_error handler.
2446 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
2447 (hostio-errno.o): New rule.
2448 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
2449 * configure.srv (srv_hostio_err_objs): New variable. Default to
2450 hostio-errno.o.
2451 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
2452 * configure: Regenerate.
2453
2d717e4f
DJ
24542008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
2455
2456 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
2457 (linux_kill, linux_detach): Clean up the process list.
2458 * remote-utils.c (remote_open): Improve port number parsing.
2459 (putpkt_binary, input_interrupt): Only send interrupts if the target
2460 is running.
2461 * server.c (extended_protocol): Make static.
2462 (attached): Define earlier.
2463 (exit_requested, response_needed, program_argv): New variables.
2464 (target_running): New.
2465 (start_inferior): Clear attached here.
2466 (attach_inferior): Set attached here.
2467 (require_running): Define.
2468 (handle_query): Use require_running and target_running. Implement
2469 "monitor exit".
2470 (handle_v_attach, handle_v_run): New.
2471 (handle_v_requests): Use require_running. Handle vAttach and vRun.
2472 (gdbserver_usage): Update.
2473 (main): Redo argument parsing. Handle --debug and --multi. Handle
2474 --attach along with other options or after the port. Save
2475 program_argv. Support no initial program. Resynchronize
2476 communication with GDB after an error. Handle "monitor exit".
2477 Use require_running and target_running. Always allow the extended
2478 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
2479 restart in extended mode.
2480 * README: Refer to the GDB manual. Update --attach usage.
2481
7407e2de
AS
24822007-12-20 Andreas Schwab <schwab@suse.de>
2483
2484 * linux-low.c (STACK_SIZE): Define.
2485 (linux_tracefork_child): Use it. Use __clone2 on ia64.
2486 (linux_test_for_tracefork): Likewise.
2487
b65d95c5
DJ
24882007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
2489
2490 * linux-low.c (linux_wait_for_event): Update messages. Do not
2491 reinsert auto-delete breakpoints.
2492 * mem-break.c (struct breakpoint): Change return type of handler to
2493 int.
2494 (set_breakpoint_at): Update handler type.
2495 (reinsert_breakpoint_handler): Return 1 instead of calling
2496 delete_breakpoint.
2497 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
2498 setting a new one.
2499 (check_breakpoints): Delete auto-delete breakpoints and return 2.
2500 * mem-break.h (set_breakpoint_at): Update handler type.
2501 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
2502 * win32-low.c (auto_delete_breakpoint): New.
2503 (get_child_debug_event): Use it.
2504
4e799345
DJ
25052007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
2506
2507 * configure.ac: Check for pread and pwrite.
2508 * hostio.c (handle_pread): Fall back to lseek and read.
2509 (handle_pwrite): Fall back to lseek and write.
2510 * config.in, configure: Regenerated.
2511
27524b67
DJ
25122007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
2513
2514 * server.c (myresume): Add own_buf argument.
2515 (main): Update calls.
2516
a20d5e98
DJ
25172007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
2518
2519 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
2520 * remote-utils.c (remote_open): Do not call disable_async_io.
2521 (block_async_io): Delete.
2522 (unblock_async_io): Make static.
2523 (initialize_async_io): New.
2524 * server.c (handle_v_cont): Handle async I/O here.
2525 (myresume): Likewise. Move other common resume tasks here...
2526 (main): ... from here. Call initialize_async_io. Disable async
2527 I/O before the main loop.
2528 * server.h (initialize_async_io): Declare.
2529 (block_async_io, unblock_async_io): Delete prototypes.
2530 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
2531
b79d787e
DJ
25322007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
2533
2534 * remote-utils.c (readchar): Allow binary data in received messages.
2535
d97903b2
PA
25362007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
2537
2538 * win32-low.c (attaching): New global.
2539 (win32_create_inferior): Clear the `attaching' global.
2540 (win32_attach): Set the `attaching' global.
2541 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
2542 attaching. Only set a breakpoint at the entry point if not
2543 attaching.
2544
311de423
PA
25452007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
2546
2547 * server.c (main): Don't report dll events on the initial
2548 connection on attaches.
2549
6c2d16d2
PA
25502007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
2551
2552 * server.c (main): Relax numerical bases supported for the pid of
2553 the --attach command line argument.
2554
5ca906e6
PA
25552007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
2556
2557 * win32-low.c (win32_attach): Call OpenProcess before
2558 DebugActiveProcess, not after. Add last error output to error
2559 call.
2560
9c6c8194
PA
25612007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
2562
2563 * win32-low.c (win32_get_thread_context)
2564 (win32_set_thread_context): New functions.
2565 (thread_rec): Use win32_get_thread_context.
2566 (continue_one_thread, win32_resume): Use win32_set_thread_context.
2567 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
2568 field.
2569
4d5d1aaa
PA
25702007-12-03 Leo Zayas
2571 Pedro Alves <pedro_alves@portugalmail.pt>
2572
2573 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
2574 global variables.
2575 (child_add_thread): Minor cleanup.
2576 (child_continue): Resume artificially suspended threads before
2577 calling ContinueDebugEvent.
2578 (suspend_one_thread): New.
2579 (fake_breakpoint_event): New.
2580 (get_child_debug_event): Change return type to int. Check here if
2581 gdb sent an interrupt request. If a soft interrupt was requested,
2582 fake a breakpoint event. Return 0 if there is no event to handle,
2583 and 1 otherwise.
2584 (win32_wait): Don't check here if gdb sent an interrupt request.
2585 Ensure there is a valid event to handle.
2586 (win32_request_interrupt): Add soft interruption method as last
2587 resort.
2588
c436e841
PA
25892007-12-03 Leo Zayas
2590 Pedro Alves <pedro_alves@portugalmail.pt>
2591
2592 * win32-low.h (win32_thread_info): Add descriptions to the
2593 structure members. Replace `suspend_count' counter by a
2594 `suspended' flag.
2595 * win32-low.c (thread_rec): Update condition of when to get the
2596 context from the inferior. Rely on ContextFlags being set if it
2597 has already been retrieved. Only suspend the inferior thread if
2598 we haven't already. Warn if that fails.
2599 (continue_one_thread): s/suspend_count/suspended/. Only call
2600 ResumeThread once. Warn if that fails.
2601
e7b5fa67
PA
26022007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
2603
2604 * win32-low.c (win32_wait): Don't read from the inferior when it
2605 has already exited.
2606
a385171d
PA
26072007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
2608
2609 * Makefile.in (win32_low_h): New variable.
2610 (win32-low.o): Add dependency on $(win32_low_h).
2611 (win32-arm-low.o, win32-i386-low.o): New rules.
2612
f80c84b3
DJ
26132007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
2614
2615 * hostio.c: Correct copyright year.
2616
a6b151f1
DJ
26172007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
2618
2619 * Makefile.in (OBS): Add hostio.o.
2620 (hostio.o): New rule.
2621 * server.h (handle_vFile): Declare.
2622 * hostio.c: New file.
2623 * server.c (handle_v_requests): Take packet_len and new_packet_len
2624 for binary packets. Call handle_vFile.
2625 (main): Update call to handle_v_requests.
2626
f9387fc3
DJ
26272007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
2628
2629 * linux-low.c: Include <sched.h>.
2630
51c2684e
DJ
26312007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
2632
2633 * linux-low.c (linux_tracefork_grandchild): New.
2634 (linux_tracefork_child): Use clone.
2635 (linux_test_for_tracefork): Use clone; allocate and free a stack.
2636
75f83163
JB
26372007-10-31 Joel Brobecker <brobecker@adacore.com>
2638
2639 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
2640
da5898ce
DJ
26412007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
2642
2643 * linux-low.c (handle_extended_wait): Handle unexpected signals.
2644
24a09b5f
DJ
26452007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
2646
2647 * inferiors.c (change_inferior_id): Delete.
2648 (add_pid_to_list, pull_pid_from_list): New.
2649 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
2650 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
2651 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
2652 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
2653 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
2654 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
2655 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
2656 (using_threads): Always set to 1.
2657 (handle_extended_wait): New.
2658 (add_process): Do not set TID.
2659 (linux_create_inferior): Set must_set_ptrace_flags.
2660 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
2661 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
2662 (linux_thread_alive): Rename TID argument to LWPID.
2663 (linux_wait_for_process): Handle unknown processes. Do not use TID.
2664 (linux_wait_for_event): Do not use TID or check using_threads. Update
2665 call to dead_thread_notify. Call handle_extended_wait.
2666 (linux_create_inferior): Use PTRACE_SETOPTIONS.
2667 (send_sigstop): Delete sigstop_sent.
2668 (wait_for_sigstop): Avoid TID.
2669 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
2670 (linux_test_for_tracefork): New.
2671 (linux_lookup_signals): Use thread_db_active and
2672 linux_supports_tracefork_flag.
2673 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
2674 * linux-low.h (get_process_thread): Avoid TID.
2675 (struct process_ifo): Move thread_known and tid to the end. Remove
2676 sigstop_sent.
2677 (linux_attach_lwp, thread_db_init): Update prototypes.
2678 * server.h (change_inferior_id): Delete prototype.
2679 (add_pid_to_list, pull_pid_from_list): New prototypes.
2680 * thread-db.c (thread_db_use_events): New.
2681 (find_first_thread): Rename to...
2682 (find_one_thread): ...this. Update callers and messages. Do not
2683 call fatal. Check thread_db_use_events. Do not call
2684 change_inferior_id or new_thread_notify.
2685 (maybe_attach_thread): Update. Do not call new_thread_notify.
2686 (thread_db_init): Set thread_db_use_events. Check use_events.
2687 * utils.c (fatal, warning): Correct message prefix.
2688
30ed0a8f
DJ
26892007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
2690
2691 * Makefile.in (clean): Remove new files.
2692 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
2693 (powerpc-64.o, powerpc-64.c): New rules.
2694 * configure.srv: Use alternate register sets for powerpc64-*-linux*
2695 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
2696 with SPE.
2697 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
2698 SPE targets.
2699 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
2700 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
2701 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
2702 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
2703 (target_regsets): Add AltiVec and SPE register sets.
2704 * configure.ac: Check for AltiVec and SPE.
2705 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
2706 (ppc_fill_vrregset, ppc_store_vrregset): New.
2707 (target_regsets): Add AltiVec register set.
2708 * configure: Regenerated.
2709
fd462a61
DJ
27102007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
2711
2712 * linux-low.c (O_LARGEFILE): Define.
2713 (linux_read_memory): Use /proc/PID/mem.
2714 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
2715 * configure, config.in: Regenerated.
2716
69f223ed
DJ
27172007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
2718
2719 * linux-low.c (linux_wait_for_event): Do not pass signals while
2720 single-stepping.
2721
aec18585
PA
27222007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
2723
2724 * win32-low.c (create_process): New.
2725 (win32_create_inferior): Use create_process instead of
2726 CreateProcess. If create_process failed retry appending an ".exe"
2727 suffix. Store the GetLastError result immediatelly after
2728 create_process calls and use it on the call to error.
2729
34d86ddd
PA
27302007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
2731
2732 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
2733
5a0e3bd0
JB
27342007-08-23 Joel Brobecker <brobecker@adacore.com>
2735
2736 * configure.ac: Switch license to GPLv3.
2737
f88c79e6
MS
27382007-08-01 Michael Snyder <msnyder@access-company.com>
2739
2740 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
2741
6b3d9b83
PA
27422007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
2743
2744 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
2745 typedef.
2746 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
2747 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
2748 CloseToolhelp32Snapshot.
2749 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
2750 CloseToolhelp32Snapshot.
2751
c588c53c
MS
27522007-07-27 Michael Snyder <michael.snyder@access-company.com>
2753
2754 * server.c (main): Check for inferior exit before main loop.
2755
aa0403d9
PA
27562007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
2757
2758 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
2759 instead of on tmp_desc.
2760
255e7678
DJ
27612007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
2762 Daniel Jacobowitz <dan@codesourcery.com>
2763
2764 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
2765 (add_thread): Minor cleanups.
2766 (clear_inferiors): Move lower in the file. Clear the DLL
2767 list.
2768 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
2769 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
2770 (xml_escape_text): New.
2771 * server.c (handle_query): Handle qXfer:libraries:read. Report it
2772 for qSupported.
2773 (handle_v_cont): Report errors.
2774 (gdbserver_version): Update.
2775 (main): Correct size of own_buf. Do not report initial DLL events.
2776 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
2777 (unloaded_dll, xml_escape_text): New.
2778 * win32-low.c (enum target_waitkind): Update comments.
2779 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
2780 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
2781 (win32_EnumProcessModules, win32_GetModuleInformation)
2782 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
2783 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
2784 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
2785 (win32_Module32First, win32_Module32Next, load_toolhelp)
2786 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
2787 (get_child_debug_event): Handle DLL events.
2788 (win32_wait): Likewise.
2789
0d37add9
DJ
27902007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
2791
2792 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
2793 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
2794
45e2715e
PA
27952007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
2796
2797 * win32-low.c (handle_output_debug_string): Ignore event if not
2798 waiting.
2799
c5674cf1
PA
28002007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
2801
2802 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
2803
2bbe3cc1
DJ
28042007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
2805
2806 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
2807
ae13219e
DJ
28082007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
2809
2810 * inferiors.c (change_inferior_id): Add comment.
2811 * linux-low.c (check_removed_breakpoint): Add an early
2812 prototype. Improve debug output.
2813 (linux_attach): Doc update.
2814 (linux_detach_one_process, linux_detach): Clean up before releasing
2815 each process.
2816 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
2817 * linux-low.h (struct process_info): Doc improvement.
2818 * mem-break.c (delete_all_breakpoints): New.
2819 * mem-break.h (delete_all_breakpoints): New prototype.
2820 * thread-db.c (find_first_thread): New.
2821 (thread_db_create_event): Call it instead of
2822 thread_db_find_new_threads. Clean up unused variables.
2823 (maybe_attach_thread): Remove first thread handling.
2824 (thread_db_find_new_threads): Use find_first_thread.
2825 (thread_db_get_tls_address): Likewise.
2826
4105de34
DJ
28272007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
2828
2829 * thread-db.c (thread_db_find_new_threads): Add prototype.
2830 (thread_db_create_event): Check for the main thread before adding
2831 a new thread.
2832 (maybe_attach_thread): Only enable event reporting if TID == 0.
2833 (thread_db_get_tls_address): Check for new threads.
2834
2b876972
DJ
28352007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
2836
2837 * linux-low.c (linux_create_inferior): Try execv before execvp.
2838 * spu-low.c (spu_create_inferior): Likewise.
2839
7a245884
DJ
28402007-06-13 Mike Frysinger <vapier@gentoo.org>
2841
2842 * linux-low.c (linux_create_inferior): Change execv to execvp.
2843 * spu-low.c (spu_create_inferior): Likewies.
2844
117ce543
DJ
28452007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
2846
2847 * Makefile.in (clean): Clean new files instead of deleted ones.
2848 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
2849 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
2850 rules.
2851 * configure.srv: Specify XML files and new regformats for MIPS and
2852 MIPS64 GNU/Linux.
2853 * linux-mips-low.c (mips_num_regs): Set to only used registers.
2854 (mips_regmap): Do not fetch $0. Remove unused registers. Add
2855 an entry for the restart register.
2856 (mips_cannot_fetch_register, mips_cannot_store_register)
2857 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
2858 register names to match the XML descriptions.
2859 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
2860 restart register instead of $0.
2861
0e7f50da
UW
28622007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
2863 Markus Deuling <deuling@de.ibm.com>
2864
2865 * remote-utils.c (decode_xfer_write): New function.
2866 * server.h (decode_xfer_write): Add prototype.
2867 * server.c (handle_query): Add PACKET_LEN argument. Support
2868 qXfer:spu:read and qXfer:spu:write packets.
2869 (main): Pass packet_len to handle_query.
2870 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
2871 * target.h (target_ops): Add qxfer_spu.
2872
374c1d38
UW
28732007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
2874
2875 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
2876 accessing non-seekable spufs files.
2877
bb63802a
UW
28782007-05-16 Markus Deuling <deuling@de.ibm.com>
2879
2880 * server.c (handle_query): Add reply for qC packet.
2881
7390519e
PA
28822007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
2883 Leo Zayas <lerele@champenstudios@com>
2884
2885 * server.h (check_remote_input_interrupt_request): New function.
2886 * remote_utils.c (INVALID_DESCRIPTOR): New define.
2887 (remote_desc): Initialize with INVALID_DESCRIPTOR.
2888 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
2889 (check_remote_input_interrupt_request): New function.
2890 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 2891 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
2892 winapi_GenerateConsoleCtrlEvent): New typedefs.
2893 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
2894 to 250 ms.
2895 (win32_wait): Check for remote interrupt request
2896 with check_remote_input_interrupt_request.
2897 (win32_request_interrupt): New function.
2898 (win32_target_op): Set request_interrupt to win32_request_interrupt.
2899
34b34921
PA
29002007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
2901
2902 * win32-low.c (debug_registers_changed,
2903 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
2904 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
2905 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
2906 (thread_rec): Get context using the low target.
2907 (child_add_thread): Call thread_added on the low target,
2908 which does the same thing.
2909 (regptr): Delete.
2910 (do_initial_child_stuff): Remove debug registers references.
2911 Set context using the low target. Resume threads after
2912 setting the contexts.
2913 (child_continue): Remove dead variable. Remove debug
2914 registers references.
2915 (child_fetch_inferior_registers): Go through the low target.
2916 (do_child_store_inferior_registers): Remove.
2917 (child_store_inferior_registers): Go through the low target.
2918 (win32_resume): Remove debug registers references.
2919 Set context using the low target.
2920 (handle_exception): Change return type to void. Don't record
2921 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
2922 first chance exception.
2923 (get_child_debug_event): Change return type to void. Remove
2924 goto loop. Always return after waiting for debug event.
2925 (win32_wait): Convert to switch statement. Handle spurious
2926 events.
2927
2928 * win32-i386-low.c (debug_registers_changed,
2929 debug_registers_used): New.
2930 (initial_stuff): Rename to ...
2931 (i386_initial_stuff): ... this. Clear debug registers
2932 state variables.
2933 (store_debug_registers): Delete.
2934 (i386_get_thread_context): New.
2935 (load_debug_registers): Delete.
2936 (i386_set_thread_context): New.
2937 (i386_thread_added): New.
2938 (single_step): Rename to ...
2939 (i386_single_step): ... this.
2940 (do_fetch_inferior_registers): Rename to ...
2941 (i386_fetch_inferior_register): ... this.
2942 (i386_store_inferior_register): New.
2943 (the_low_target): Adapt to new interface.
2944
2945 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
2946 (arm_get_thread_context): New.
2947 (arm_set_thread_context): New.
2948 (regptr): New.
2949 (do_fetch_inferior_registers): Rename to ...
2950 (arm_fetch_inferior_register): ... this.
2951 (arm_store_inferior_register): New.
2952 (arm_wince_breakpoint): Reimplement as unsigned long.
2953 (arm_wince_breakpoint_len): Define.
2954 (the_low_target): Adapt to new interface.
2955
2956 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
2957 load_debug_registers. Add get_thread_context, set_thread_context,
2958 thread_added and store_inferior_register. Rename
2959 fetch_inferior_registers to fetch_inferior_register.
2960 (regptr): Remove declaration.
2961
dd6953e1
PA
29622007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
2963
2964 * linux-low.c (linux_detach): Change return type to int. Return 0.
2965 * spu-low.c (spu_detach): Likewise.
2966
444d6139
PA
29672007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
2968
2969 * target.h (target_ops): Change return type of detach to int.
2970 Add join.
2971 (join_inferior): New.
2972 * server.c (main): Don't skip detach support on mingw32.
2973 If the inferior doesn't support detaching return error.
2974 Call join_inferior instead of using waitpid.
2975 * linux-low.c (linux_join): New.
2976 (linux_target_op): Add linux_join.
2977 * spu-low.c (spu_join): New.
2978 (spu_target_ops): Add spu_join.
2979 * win32-low.c (win32_detach): Adapt to new interface.
2980 Reopen current_process_handle before detaching. Issue a child
2981 resume before detaching.
2982 (win32_join): New.
2983 (win32_target_op): Add win32_join.
2984
1d5315fe
PA
29852007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
2986
2987 * win32-low.c (win32-attach): Fix return value.
2988 * target.h (target_ops): Describe ATTACH return values.
2989
bf914831
PA
29902007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
2991
2992 * win32-low.c (GETPROCADDRESS): Define.
2993 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
2994 (winapi_DebugSetProcessKillOnExit): Likewise.
2995 (win32_create_inferior): Force usage of ansi CreateProcessA.
2996 (win32_attach): Use GETPROCADDRESS.
2997 (win32_detach): Likewise.
2998
f72f3e60
PA
29992007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
3000
3001 * win32-low.c (win32_wait): Don't use WSTOPSIG.
3002
ed50f18f
PA
30032007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
3004
3005 * win32-low.c: Commit leftover changes from 2007-03-29.
3006
0c2ead7e
DJ
30072007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
3008
3009 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
3010 fields short instead of int. Add explicit padding.
3011 (i387_cache_to_fsave): Remove unnecessary casts.
3012 (i387_fsave_to_cache): Doc fix.
3013 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
3014
73725ff3
DJ
30152007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
3016
3017 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
3018 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
3019
d99f33d8
PA
30202007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
3021
3022 * configure.srv (arm*-*-mingw32ce*): Move near the other
3023 arm targets.
3024
68070c10
PA
30252007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
3026
2482afc6 3027 * configure.ac: Add errno checking.
68070c10
PA
3028 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
3029 sys/file.h and malloc.h.
3030 (AC_CHECK_DECLS): Add perror.
3031 (srv_mingwce): Handle.
2482afc6 3032 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
3033 win32-i386-low.o to srv_tgtobj.
3034 (i[34567]86-*-mingw*): Likewise.
3035 (arm*-*-mingw32ce*): Add case.
3036 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
3037 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
3038 [__MINGW32CE__] (strerror): New function.
3039 [__MINGW32CE__] (errno): Define to GetLastError.
3040 [__MINGW32CE__] (COUNTOF): New macro.
3041 (remote_open): Remove extra close call.
3042 * mem-break.c (delete_breakpoint_at): New function.
3043 * mem-break.h (delete_breakpoint_at): Declare.
3044 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
3045 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
3046 [USE_WIN32API] (read, write): Add char* casts.
3047 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
3048 * server.h: Include wincecompat.h on Windows CE.
3049 [HAVE_ERRNO_H]: Check.
3050 (perror): Declare if not declared.
3051 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
3052 (perror_with_name): Remove errno declaration.
3053 * wincecompat.h: New.
3054 * wincecompat.c: New.
3055 * win32-low.h: New.
3056 * win32-arm-low.c: New.
3057 * win32-i386-low.c: New.
3058 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
3059 (OUTMSG2): Make it safe.
3060 (_T): New macro.
3061 (COUNTOF): New macro.
3062 (NUM_REGS): Get it from the low target.
3063 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
3064 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
3065 (thread_rec): Let low target handle debug registers.
3066 (child_add_thread): Likewise.
3067 (child_init_thread_list): Likewise.
3068 (continue_one_thread): Likewise.
3069 (regptr): New.
3070 (do_child_fetch_inferior_registers): Move to ...
3071 * win32-i386-low.c: ... here, and rename to ...
3072 (do_fetch_inferior_registers): ... this.
3073 * win32-low.c (child_fetch_inferior_registers):
3074 Go through the low target.
3075 (do_child_store_inferior_registers): Use regptr.
3076 (strwinerror): New function.
3077 (win32_create_inferior): Handle Windows CE.
3078 Use strwinerror instead of strerror on Windows error
3079 codes. Add program to the error output.
3080 Don't close the main thread handle on Windows CE.
3081 (win32_attach): Use coredll.dll on Windows CE.
3082 (win32_kill): Close current process and current
3083 thread handles.
3084 (win32_detach): Use coredll.dll on Windows CE.
3085 (win32_resume): Let low target handle debug registers, and
3086 step request.
3087 (handle_exception): Add/Remove initial breakpoint. Avoid
3088 non-existant WSTOPSIG on Windows CE.
3089 (win32_read_inferior_memory): Cast to remove warning.
3090 (win32_arch_string): Go through the low target.
3091 (initialize_low): Call set_breakpoint_data with the low
3092 target's breakpoint.
3093 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
3094 FOP_REGNUM, mappings): Move to ...
3095 * win32-i386-low.c: ... here.
3096 * win32-low.c (win32_thread_info): Move to ...
3097 * win32-low.h: ... here.
3098 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
3099 win32-arm-low.c and wincecompat.c.
3100 (all:): Add $EXEEXT.
3101 (install-only:): Likewise.
3102 (gdbserver:): Likewise.
3103 (gdbreplay:): Likewise.
3104 * config.in: Regenerate.
3105 * configure: Regenerate.
3106
41093d81
PA
31072007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
3108
3109 * win32-low.c: Rename typedef thread_info to
3110 win32_thread_info throughout.
3111
544afa54
PA
31122007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
3113
3114 * win32-i386-low.c: Rename to ...
3115 * win32-low.c: ... this.
3116 * configure.srv: Replace win32-i386-low.o with win32-low.o.
3117 * Makefile.in: Likewise.
3118
bce7165d
PA
31192007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
3120
3121 * remote-utils.c (monitor_output): Constify msg parameter.
3122 * server.h (monitor_output): Likewise.
3123 * win32-i386-low.c (handle_output_debug_string): New.
3124 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
3125 handle_output_debug_string.
3126 (get_child_debug_event): Likewise.
3127
506c7aa0
DJ
31282007-03-27 Mat Hostetter <mat@lcs.mit.edu>
3129
3130 * server.c (main): Correct strtoul check.
3131
42c81e2a
DJ
31322007-03-27 Jon Ringle <jon@ringle.org>
3133
3134 * linux-low.c: Check __ARCH_HAS_MMU__ also.
3135
9453113a
DJ
31362007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
3137
3138 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
3139
64a69107
DJ
31402007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
3141
3142 * terminal.h: Check HAVE_SGTTY_H.
3143
31442007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
3145
3146 * remote-utils.c (remote_open): Print out the assigned port number.
3147
c74d0ad8
DJ
31482007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
3149
3150 * remote-utils.c (monitor_output): New function.
3151 * server.c (debug_threads): Define here.
3152 (monitor_show_help): New function.
3153 (handle_query): Handle qRcmd.
3154 (main): Do not handle 'd' packet.
3155 * server.h (debug_threads, remote_debug, monitor_output): Declare.
3156 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
3157 of debug_threads.
3158
de7c3b4a
PA
31592007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
3160
3161 * Makefile.in (EXEEXT): New.
3162 (clean): Use $(EXEEXT).
3163
ef57601b
PA
31642007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
3165
3166 * target.h (target_ops): Rename send_signal to request_interrupt,
3167 and remove enum target_signal parameter.
3168 * linux-low.c (linux_request_interrupt): Rename from
3169 linux_send_signal, and always send SIGINT.
3170 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
3171 and always send SIGINT.
3172 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
3173 of send_signal.
3174 (input_interrupt): Likewise.
3175
820f2bda
PA
31762007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
3177
3178 * server.c (get_features_xml): Check if target implemented
3179 arch_string.
3180 * win32-i386-low.c (win32_arch_string): New.
3181 (win32_target_ops): Add win32_arch_string as arch_string member.
3182
ab39bf24
UW
31832007-02-22 Markus Deuling <deuling@de.ibm.com>
3184
3185 * spu-low.c (spu_arch_string): New.
3186 (spu_target_ops): Add spu_arch_string.
3187
61ff6e04
DJ
31882007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
3189
3190 * remote-utils.c: Remove HAVE_TERMINAL_H check.
3191 * configure.ac: Do not check for terminal.h.
3192 * configure, config.in: Regenerated.
3193
fb1e4ffc
DJ
31942007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
3195
3196 * Makefile.in (OBS): Add $(XML_BUILTIN).
3197 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
3198 (clean): Update.
3199 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
3200 (arm-with-iwmmxt.c): New.
3201 * config.in, configure: Regenerate.
3202 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
3203 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
3204 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
3205 (arm*-*-linux*): Add iWMMXt and regset support.
3206 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
3207 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
3208 (arm_store_wmmxregset, target_regsets): New.
3209 * server.c (get_features_xml): Take annex argument. Check builtin
3210 XML documents.
3211 (handle_query): Handle multiple annexes.
3212
0f48aa01
DJ
32132007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
3214
3215 * remote-utils.c [USE_WIN32API] (read, write): Define.
3216 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
3217 write.
3218
23181151
DJ
32192007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
3220
3221 * linux-i386-low.c (the_low_target): Set arch_string.
3222 * linux-x86-64-low.c (the_low_target): Likewise.
3223 * linux-low.c (linux_arch_string): New.
3224 (linux_target_ops): Add it.
3225 * linux-low.h (struct linux_target_ops): Add arch_string.
3226 * server.c (write_qxfer_response): Use const void * for DATA.
3227 (get_features_xml): New.
3228 (handle_query): Handle qXfer:features:read. Report it for qSupported.
3229 * target.h (struct target_ops): Add arch_string method.
3230
9d606399
DJ
32312007-01-03 Denis Pilat <denis.pilat@st.com>
3232 Daniel Jacobowitz <dan@codesourcery.com>
3233
3234 * linux-low.c (linux_kill): Handle being called with no threads.
3235 * win32-i386-low.c (win32_kill): Likewise.
3236 (get_child_debug_event): Clear current_process_handle.
3237
32382006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
3239 Daniel Jacobowitz <dan@codesourcery.com>
3240
3241 * remote-utils.c (remote_open): Check the type of specified
3242 serial port devices before opening them.
3243 * server.c (main): Kill the inferior if an error occurs during
3244 the first remote_open.
3245
a5e13d24
DJ
32462006-12-05 Markus Deuling <deuling@de.ibm.com>
3247
3248 * README: Update supported targets.
3249
186947f7
DJ
32502006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
3251
3252 * Makefile.in (clean): Remove reg-mips64.c.
3253 (reg-mips64.c, reg-mips64.o): New rules.
3254 * configure.srv: Handle mips64. Include regset support for mips.
3255 * linux-mips-low.c (union mips_register): New.
3256 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
3257 (mips_breakpoint, mips_breakpoint_at): Use int.
3258 (mips_collect_register, mips_supply_register)
3259 (mips_collect_register_32bit, mips_supply_register_32bit)
3260 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
3261 (mips_store_fpregset, target_regsets): New.
3262 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
3263
a13e2c95
UW
32642006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
3265
3266 * configure.srv: Add target "spu*-*-*".
3267 * Makefile.in (clean): Remove reg-spu.c.
3268 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
3269 * spu-low.c: New file.
3270
cb7283db
DJ
32712006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
3272
3273 * configure.ac: Correct td_thr_tls_get_addr test.
3274 * configure: Regenerated.
3275
89be2091
DJ
32762006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
3277
3278 * linux-low.c (linux_wait_for_event): Reformat. Use the
3279 pass_signals array.
3280 * remote-utils.c (decode_address_to_semicolon): New.
3281 * server.c (pass_signals, handle_general_set): New.
3282 (handle_query): Mention QPassSignals for qSupported.
3283 (main): Call handle_general_set.
3284 * server.h (pass_signals, decode_address_to_semicolon): New.
3285
000ef4f0
DJ
32862006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
3287
3288 * server.c (handle_query): Correct error handling for read_auxv.
3289
b7149293
UW
32902005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
3291
3292 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
3293 and srv_linux_thread_db to yes.
3294 * linux-s390-low.c (s390_fill_gregset): New function.
3295 (target_regsets): Define data structure.
3296
dae5f5cf
DJ
32972006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
3298
3299 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
3300 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
3301 * config.in, configure: Regenerated.
3302 * inferiors.c (gdb_id_to_thread): New function.
3303 (gdb_id_to_thread_id): Use it.
3304 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
3305 * linux-low.h (struct process_info): Add th member.
3306 (thread_db_get_tls_address): New prototype.
3307 * remote-utils.c (decode_address): Make non-static.
3308 * server.c (handle_query): Handle qGetTLSAddr.
3309 * server.h (gdb_id_to_thread, decode_address): New prototypes.
3310 * target.h (struct target_ops): Add get_tls_address.
3311 * thread-db.c (maybe_attach_thread): Save the thread handle.
3312 (thread_db_get_tls_address): New.
3313
32ca6d61
DJ
33142006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
3315
3316 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
3317 (linux_resume_one_process): Take a siginfo_t *. Update all
3318 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
3319 (struct pending_signals): Add a siginfo_t.
3320 (linux_wait_for_process): Always set last_status.
3321 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
3322 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
3323 * linux-low.h (struct process_info): Add last_status.
3324
5ffff7c1
DJ
33252006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
3326
3327 * remote-utils.c (try_rle): New function.
3328 (putpkt_binary): Use it.
3329
8695c747
DJ
33302006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
3331
3332 * Makefile.in (clean): Clean reg-x86-64-linux.c.
3333 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
3334 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
3335 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
3336 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
3337 point registers.
3338
290fadea
RS
33392006-08-08 Richard Sandiford <richard@codesourcery.com>
3340
3341 * server.c (terminal_fd): New variable.
3342 (old_foreground_pgrp): Likewise.
3343 (restore_old_foreground_pgrp): New function.
3344 (start_inferior): Record the terminal file descriptor in terminal_fd
3345 and its original foreground group in old_foreground_pgrp. Register
3346 restore_old_foreground_pgrp with atexit().
3347
9f2e1e63
DJ
33482006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
3349
3350 * server.c (handle_query): Correct qPart to qXfer.
3351
b80864fb
DJ
33522006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
3353
3354 * configure.ac: Check for more headers which are missing on
3355 Windows. Automatically supply -lwsock32 and USE_WIN32API.
3356 * configure.srv: Add Cygwin and mingw32.
3357 * remote-utils.c: Don't include headers unconditionally which
3358 are missing on mingw32. Include <winsock.h> for mingw32.
3359 (remote_open): Adjust for mingw32 support. Flush
3360 standard error after writing to it.
3361 (remote_close, putpkt_binary, input_interrupt, block_async_io)
3362 (unblock_async_io, enable_async_io, disable_async_io)
3363 (readchar, getpkt): Update for Winsock support.
3364 (prepare_resume_reply): Expect a protocol signal number.
3365 * server.c: Disable <sys/wait.h> on mingw32.
3366 (start_inferior): Adjust for mingw32 support. Flush
3367 standard error after writing to it.
3368 (attach_inferior): Likewise. Use protocol signal
3369 numbers.
3370 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
3371 and names.
3372 * win32-i386-low.c: New file.
3373 * Makefile.in (XM_CLIBS): Set.
3374 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
3375 (win32-i386-low.o): New dependency rule.
3376 * linux-low.c (linux_wait): Use target signal numbers.
3377 * target.h (struct target_ops): Doc fix.
3378 * server.h (target_signal_to_name): New prototype.
3379 * gdbreplay.c: Don't include headers unconditionally which
3380 are missing on mingw32. Include <winsock.h> for mingw32.
3381 (remote_close, remote_open): Adjust for Winsock support.
3382 * configure, config.in: Regenerated.
3383
0876f84a
DJ
33842006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
3385
3386 * server.c (decode_xfer_read, write_qxfer_response): New.
3387 (handle_query): Take a packet length argument. Handle
3388 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
3389 the qSupported response.
3390 (main): Update call to handle_query.
3391
01f9e8fa
DJ
33922006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
3393
3394 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
3395 (putpkt_binary): Renamed from putpkt and adjusted for binary
3396 data.
3397 (putpkt): New wrapper for putpkt_binary.
3398 (readchar): Don't mask off the high bit.
3399 (decode_X_packet): New function.
3400 * server.c (main): Call putpkt_binary if a handler sets the packet
3401 length. Save the length of the incoming packet. Handle 'X'.
3402 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
3403
be2a5f71
DJ
34042006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
3405
3406 * server.c (handle_query): Handle qSupported.
3407
ea025f5f
DJ
34082006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
3409
3410 * remote-utils.c (all_symbols_looked_up): New variable.
3411 (look_up_one_symbol): Check it.
3412 * server.h (look_up_one_symbol): New declaration.
3413 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
3414
9308fc88
DJ
34152006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
3416
3417 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 3418 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
3419 (PTRACE_GET_THREAD_AREA): Define.
3420 (ps_get_thread_area): New function.
3421
52fb6437
NS
34222006-05-09 Nathan Sidwell <nathan@codesourcery.com>
3423
3424 * configure.srv (m68k*-*-uclinux*): New target.
3425 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
3426 (linux_resume_one_process): Remove extraneous cast.
3427 (linux_read_offsets): New.
3428 (linux_target_op): Add linux_read_offsets on mmuless systems.
3429 * server.c (handle_query): Add qOffsets logic.
3430 * target.h (struct target_ops): Add read_offsets.
3431
21b0f40c
DJ
34322006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
3433
3434 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
3435 (PTRACE_GET_THREAD_AREA): Define.
3436 (ps_get_thread_area): New function.
3437 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
3438 (linux-x86-64-low.o): Update.
3439
0050a760
DJ
34402006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
3441
3442 * configure.ac: Remove checks for prfpregset_t.
3443 * gdb_proc_service.h: New file.
3444 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
3445 new "gdb_proc_service.h".
3446 * proc-service.c: Likewise.
3447 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
3448 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
3449 * Makefile.in (gdb_proc_service_h): Updated.
3450 * configure, config.in: Regenerated.
3451
b92a518e
DJ
34522006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
3453
3454 * remote-utils.c (prepare_resume_reply): Move declaration
3455 of gdb_id_from_wait to the top of the block.
3456
545587ee
DJ
34572006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
3458
3459 * linux-low.c (regsets_store_inferior_registers): Read the regset
3460 from the target before filling it.
3461
9db87ebd
DJ
34622006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
3463
3464 * server.c (attach_inferior): Return SIGTRAP for a successful
3465 attach.
3466
dd24457d
DJ
34672006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
3468
3469 * Makefile.in (OBS): Add version.o.
3470 (STAGESTUFF): Delete.
3471 (version.o): Add dependencies.
3472 (version.c): Replace rule.
3473 (clean): Remove version.c.
3474 * server.c (gdbserver_version): New.
3475 (gdbserver_usage): Use printf.
3476 (main): Handle --version and --help.
3477 * server.h (version, host_name): Add declarations.
3478
6f0f660e
EZ
34792005-12-23 Eli Zaretskii <eliz@gnu.org>
3480
3481 * linux-arm-low.c:
3482 * linux-arm-low.c:
3483 * inferiors.c:
3484 * i387-fp.h:
3485 * i387-fp.c:
3486 * gdbreplay.c:
3487 * regcache.c:
3488 * proc-service.c:
3489 * mem-break.h:
3490 * mem-break.c:
3491 * linux-x86-64-low.c:
3492 * linux-sh-low.c:
3493 * linux-s390-low.c:
3494 * linux-ppc64-low.c:
3495 * linux-ppc-low.c:
3496 * linux-mips-low.c:
3497 * linux-m68k-low.c:
3498 * linux-m32r-low.c:
3499 * linux-low.h:
3500 * linux-low.c:
3501 * linux-ia64-low.c:
3502 * linux-i386-low.c:
3503 * linux-crisv32-low.c:
3504 * thread-db.c:
3505 * terminal.h:
3506 * target.h:
3507 * target.c:
3508 * server.h:
3509 * server.c:
3510 * remote-utils.c:
3511 * regcache.h:
3512 * utils.c:
3513 * Makefile.in:
3514 * configure.ac:
3515 * gdbserver.1: Add (C) after Copyright. Update the FSF
3516 address.
3517
9d1fb177
DJ
35182005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
3519
3520 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
3521 (arm_breakpoint_at): Recognize both breakpoints.
3522 (the_low_target): Use the correct breakpoint instruction.
3523
011a70c2
DJ
35242005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
3525
3526 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
3527 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
3528 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
3529 (the_low_target): Update.
3530
7fb85e41
AS
35312005-10-25 Andreas Schwab <schwab@suse.de>
3532
3533 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
3534
3535 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
3536 (ia64_num_regs): Reduce to 462.
3537
3db0444b
DJ
35382005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
3539
3540 * acinclude.m4: Correct quoting.
3541 * aclocal.m4: Regenerated.
3542
3543 Suggested by SZOKOVACS Robert <szo@ies.hu>:
3544 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
3545 (thread_db_init): Call thread_db_err_str.
3546 * configure.ac: Check for TD_VERSION.
3547 * config.in, configure: Regenerated.
3548
bee0189a
DJ
35492005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3550
3551 * server.h (error, fatal, warning): Add ATTR_FORMAT.
3552
e9d25b98
DJ
35532005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
3554
3555 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
3556 is not available. Define HAVE_PTRACE_GETREGS if it is.
3557 * config.in, configure: Regenerated.
3558 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
3559 * linux-i386-low.c, linux-m68k-low.c: Update to use
3560 HAVE_PTRACE_GETREGS.
3561 * linux-low.c (regsets_fetch_inferior_registers)
3562 (regsets_store_inferior_registers): Only return 0 if we processed
3563 GENERAL_REGS.
3564 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
3565 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
3566
a06660f7
DJ
35672005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
3568
3569 * inferiors.c (struct thread_info): Add gdb_id.
3570 (add_thread): Add gdb_id argument.
3571 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
3572 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
3573 calls to add_thread.
3574 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
3575 * server.c (handle_query): Use thread_to_gdb_id.
3576 (handle_v_cont, main): Use gdb_id_to_thread_id.
3577 * server.h (add_thread): Update prototype.
3578 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
3579 prototypes.
3580
5a1f5858
DJ
35812005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
3582
3583 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
3584 left-padded registers.
3585 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
3586 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
3587
e122f1f5
SE
35882005-07-01 Steve Ellcey <sje@cup.hp.com>
3589
3590 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
3591 * configure: Regenerate.
3592 * config.in: Regenerate.
3593 * server.h (NEED_DECLARATION_STRERROR):
3594 Replace with !HAVE_DECL_STRERROR.
3595
d592fa2f
DJ
35962005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
3597
3598 * linux-low.c (linux_wait, linux_send_signal): Don't test
3599 an unsigned long variable for > 0 if it could be MAX_ULONG.
3600 * server.c (myresume): Likewise.
3601 * target.c (set_desired_inferior): Likewise.
3602
ccbd4912
MK
36032005-06-13 Mark Kettenis <kettenis@gnu.org>
3604
3605 * configure.ac: Simplify and improve check for socklen_t.
3606 * configure, config.in: Regenerate.
3607
f450004a
DJ
36082005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
3609
3610 * acconfig.h: Remove.
3611 * configure.ac: Add a test for socklen_t. Use three-argument
3612 AC_DEFINE throughout.
3613 * config.in: Regenerated using autoheader 2.59.
3614 * configure: Regenerated.
3615
3616 * gdbreplay.c (socklen_t): Provide a default.
3617 (remote_open): Use socklen_t.
3618 * remote-utils.c (socklen_t): Provide a default.
3619 (remote_open): Use socklen_t.
3620 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
3621 unsigned char.
3622
3623 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
3624 char for buffers.
3625 * linux-low.c (linux_read_memory, linux_write_memory)
3626 (linux_read_auxv): Likewise.
3627 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
3628 (check_mem_write): Likewise.
3629 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
3630 Likewise.
3631 * regcache.c (struct inferior_rgcache_data, registers_to_string)
3632 (registers_from_string, register_data): Likewise.
3633 * server.c (handle_query, main): Likewise.
3634 * server.h (convert_ascii_to_int, convert_int_to_ascii)
3635 (decode_M_packet): Likewise.
3636 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
3637 * target.h (struct target_ops): Update read_memory, write_memory,
3638 and read_auxv.
3639 (read_inferior_memory, write_inferior_memory): Update.
3640 * linux-low.h (struct linux_target_ops): Change type of breakpoint
3641 to unsigned char *.
3642 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
3643 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
3644 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
3645 linux-s390-low.c, linux-sh-low.c: Update for changes in
3646 read_inferior_memory and the_low_target->breakpoint.
3647
eee84df1
DJ
36482005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
3649
3650 * Makefile.in (SFILES): Add linux-ppc64-low.c.
3651 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
3652 * configure.srv: Add powerpc64-*-linux*.
3653 * linux-ppc64-low.c: New file.
3654
45b134e5
OF
36552005-05-23 Orjan Friberg <orjanf@axis.com>
3656
3657 * linux-cris-low.c: New file with support for CRIS.
3658 * linux-crisv32-low.c: Ditto for CRISv32.
3659 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
3660 (clean): Add reg-cris.c and reg-crisv32.c.
3661 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
3662 reg-crisv32.o, and reg-crisv32.c to make rules.
3663 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
3664 recognized targets.
3665
48d93c75
UW
36662005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
3667
3668 * linux-low.c (fetch_register): Ensure buffer size is a multiple
3669 of sizeof (PTRACE_XFER_TYPE).
3670 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
3671
e013ee27
OF
36722005-05-12 Orjan Friberg <orjanf@axis.com>
3673
3674 * target.h (struct target_ops): Add insert_watchpoint,
3675 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
3676 pointers for hardware watchpoint support.
3677 * linux-low.h (struct linux_target_ops): Ditto.
3678 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
3679 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
3680 to linux_target_ops.
3681 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
3682 reply packet.
3683 * server.c (main): Recognize 'Z' and 'z' packets.
3684
b0ded00b
UW
36852005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
3686
3687 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
3688 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
3689 (the_low_target): Add new members.
3690
8643e2ad
DJ
36912005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
3692
3693 * proc-service.c (ps_lgetregs): Search all_processes instead of
3694 all_threads.
3695
fc620387
DJ
36962005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
3697
3698 * server.c (start_inferior): Change return type to int.
3699 (attach_inferior): Change sigptr to int *.
3700 (handle_v_cont, handle_v_requests): Change signal to int *.
3701 (main): Change signal to int.
3702
37032005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
3704
3705 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
3706 * configure.srv: Add m32r*-*-linux*.
3707 * linux-m32r-low.c: New file.
3708
e0e76420
DJ
37092005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
3710
3711 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
3712
a1928bad
DJ
37132005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
3714
3715 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
3716 Take unsigned long arguments for PIDs.
3717 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
3718 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
3719 (wait_for_sigstop, linux_resume_one_process)
3720 (regsets_fetch_inferior_registers, linux_send_signal)
3721 (linux_read_auxv): Likewise. Update the types of variables holding
3722 PIDs. Update format string specifiers.
3723 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
3724 * remote-utils.c (prepare_resume_reply): Likewise.
3725 * server.c (cont_thread, general_thread, step_thread)
3726 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
3727 unsigned long.
3728 (handle_query): Update format specifiers.
3729 (handle_v_cont, main): Use strtoul for thread IDs.
3730 * server.h (struct inferior_list_entry): Use unsigned long for ID.
3731 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
3732 (general_thread, step_thread, thread_from_wait)
3733 (old_thread_from_wait): Update.
3734 * target.h (struct thread_resume): Use unsigned long for THREAD.
3735 (struct target_ops): Use unsigned long for arguments to attach and
3736 thread_alive.
3737
dcdb98d2
DJ
37382005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
3739
3740 * acinclude.m4: Include bfd/bfd.m4 directly.
3741 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
3742 <agriffis@toolchain.org>.
3743 * aclocal.m4, configure: Regenerated.
3744
bec39cab
AC
37452005-01-07 Andrew Cagney <cagney@gnu.org>
3746
3747 * configure.ac: Rename configure.in, require autoconf 2.59.
3748 * configure: Re-generate.
3749
434c4c77
DJ
37502004-12-08 Daniel Jacobowitz <dan@debian.org>
3751
3752 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
3753 LIBS when finished.
3754 * aclocal.m4: Regenerated.
3755 * configure: Regenerated.
3756
db1d3e1b
AS
37572004-11-21 Andreas Schwab <schwab@suse.de>
3758
3759 * linux-m68k-low.c (m68k_num_gregs): Define.
3760 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
3761 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
3762 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
3763 (m68k_breakpoint_at): New. Add to the_low_target.
3764
3765 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
3766 srv_linux_thread_db to yes.
3767
43360365
JB
37682004-10-20 Joel Brobecker <brobecker@gnat.com>
3769
3770 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
3771 (ARCH_SET_FS): Likewise.
3772 (ARCH_GET_FS): Likewise.
3773 (ARCH_GET_GS): Likewise.
3774
fd500816
DJ
37752004-10-16 Daniel Jacobowitz <dan@debian.org>
3776
3777 * linux-i386-low.c (ps_get_thread_area): New.
3778 * linux-x86-64-low.c (ps_get_thread_area): New.
3779 * linux-low.c: Include <sys/syscall.h>.
3780 (linux_kill_one_process): Don't kill the first thread here.
3781 (linux_kill): Kill the first thread here.
3782 (kill_lwp): New function.
3783 (send_sigstop, linux_send_signal): Use it.
3784 * proc-service.c: Clean up #ifdefs.
3785 (fpregset_info): Delete.
3786 (ps_lgetregs): Update and enable implementation.
3787 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
3788 implementations.
3789 * remote-utils.c (struct sym_cache, symbol_cache): New.
3790 (input_interrupt): Print a clearer message.
3791 (async_io_enabled): New variable.
3792 (enable_async_io, disable_async_io): Use it. Update comments.
3793 (look_up_one_symbol): Use the symbol cache.
3794 * thread-db.c (thread_db_look_up_symbols): New function.
3795 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
3796
f6de3c42
DJ
37972004-10-16 Daniel Jacobowitz <dan@debian.org>
3798
3799 * configure.in: Test for -rdynamic.
3800 * configure: Regenerated.
3801 * Makefile (INTERNAL_LDFLAGS): New.
3802 (gdbserver, gdbreplay): Use it.
3803
2c0fc042
AC
38042004-09-02 Andrew Cagney <cagney@gnu.org>
3805
3806 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
3807
075b3282
DJ
38082004-03-23 Daniel Jacobowitz <drow@mvista.com>
3809
3810 * linux-low.c (linux_wait): Clear all_processes list also.
3811
fa6a77dc
DJ
38122004-03-12 Daniel Jacobowitz <drow@mvista.com>
3813
3814 * linux-low.c: Include <errno.h>. Remove extern declaration of
3815 errno.
3816
6d782a97
DJ
38172004-03-12 Daniel Jacobowitz <drow@mvista.com>
3818
3819 * gdbreplay.c, server.h, utils.c: Update copyright years.
3820
3a7fb99b
DJ
38212004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
3822
3823 * server.c (main): Print child status or termination signal from
3824 variable 'signal', not 'sig'.
3825
c3e735a6
DJ
38262004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
3827
3828 * linux-low.c (linux_read_memory): Change return type to
3829 int. Check for and return error from ptrace().
3830 * target.c (read_inferior_memory): Change return type to int. Pass
3831 back return status from the_target->read_memory().
3832 * target.h (struct target_ops): Adapt *read_memory() prototype.
3833 Update comment.
3834 (read_inferior_memory): Adapt prototype.
3835 * server.c (main): Return an error packet if
3836 read_inferior_memory() returns an error.
3837
a59d1c82
DJ
38382004-03-04 Daniel Jacobowitz <drow@mvista.com>
3839
3840 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
3841 Unify with other clean targets.
3842
dc3f8883
DJ
38432004-02-29 Daniel Jacobowitz <drow@mvista.com>
3844
3845 * server.c (handle_v_cont): Call set_desired_inferior.
3846
89a208da
DJ
38472004-02-29 Daniel Jacobowitz <drow@mvista.com>
3848
3849 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
3850
62ea82f5
DJ
38512004-02-29 Daniel Jacobowitz <drow@mvista.com>
3852
3853 * linux-low.c (linux_wait): Unblock async I/O.
3854 (linux_resume): Block and enable async I/O.
3855 * remote-utils.c (block_async_io, unblock_async_io): New functions.
3856 * server.h (block_async_io, unblock_async_io): Add prototypes.
3857
6910d122
DJ
38582004-02-29 Daniel Jacobowitz <drow@mvista.com>
3859
3860 * remote-utils.c (remote_open): Print a status notice after
3861 opening a TCP port.
3862 * server.c (attach_inferior): Print a status notice after
3863 attaching.
3864
38652004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
3866
3867 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
3868
c89dc5d4
DJ
38692004-02-26 Daniel Jacobowitz <drow@mvista.com>
3870
3871 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
3872 error packet.
3873 * server.c, target.h: Update copyright years.
3874
4b8dad4a
RM
38752004-02-25 Roland McGrath <roland@redhat.com>
3876
3877 * target.h (struct target_ops): New member `read_auxv'.
3878 * server.c (handle_query): Handle qPart:auxv:read: query using that.
3879 * linux-low.c (linux_read_auxv): New function.
3880 (linux_target_ops): Initialize `read_auxv' member to that.
3881
d7446758
JB
38822004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3883
3884 Committed by Jim Blandy <jimb@redhat.com>.
3885
3886 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 3887 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
3888 instead of GPR_SIZE to distiguish s390 and s390x targets.
3889
5544ad89
DJ
38902004-01-31 Daniel Jacobowitz <drow@mvista.com>
3891
3892 * linux-low.c: Update copyright year.
3893 (check_removed_breakpoint): Clear pending_is_breakpoint.
3894 (linux_set_resume_request, linux_queue_one_thread)
3895 (resume_status_pending_p): New functions.
3896 (linux_continue_one_thread): Use process->resume.
3897 (linux_resume): Only resume threads if there are no pending events.
3898 * linux-low.h (struct process_info): Add resume request
3899 pointer.
3900
2a68b70e
DJ
39012004-01-30 Daniel Jacobowitz <drow@mvista.com>
3902
3903 * regcache.c (new_register_cache): Clear the allocated register
3904 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
3905
64386c31
DJ
39062003-10-13 Daniel Jacobowitz <drow@mvista.com>
3907
3908 * linux-low.c (linux_resume): Take a struct thread_resume *
3909 argument.
3910 (linux_wait): Update call.
3911 (resume_ptr): New static variable.
3912 (linux_continue_one_thread): Renamed from
3913 linux_continue_one_process. Use resume_ptr.
3914 (linux_resume): Use linux_continue_one_thread.
3915 * server.c (handle_v_cont, handle_v_requests): New functions.
3916 (myresume): New function.
3917 (main): Handle 'v' case.
3918 * target.h (struct thread_resume): New type.
3919 (struct target_ops): Change argument of "resume" to struct
3920 thread_resume *.
3921 (myresume): Delete macro.
3922
c938e9b0
L
39232003-08-08 H.J. Lu <hongjiu.lu@intel.com>
3924
3925 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
3926 (uninstall): Support DESTDIR.
3927
7f313d07
BC
3928Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
3929
3930 * configure.srv: Add xscale*linux copy of arm*linux entry.
3931
3b2fc2ea
DJ
39322003-07-24 Daniel Jacobowitz <drow@mvista.com>
3933
3934 * linux-arm-low.c (arm_reinsert_addr): New function.
3935 (the_low_target): Add arm_reinsert_addr.
3936
1c0a559e
MK
39372003-07-08 Mark Kettenis <kettenis@gnu.org>
3938
3939 * mem-break.c: Remove whitespace at end of file.
3940
43d5792c
DJ
39412003-06-28 Daniel Jacobowitz <drow@mvista.com>
3942
3943 * configure.in: Check whether we need to prototype strerror.
3944 * server.h: Optionally prototype strerror.
3945 * gdbreplay.c (perror_with_name): Use strerror.
3946 * linux-low.c (linux_attach_lwp): Use strerror.
3947 * utils.c (perror_with_name): Use strerror.
3948 * config.in, configure: Regenerated.
3949
c8a86edf
DJ
39502003-06-28 Daniel Jacobowitz <drow@mvista.com>
3951
3952 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
3953 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
3954
73d37363
DJ
39552003-06-20 Daniel Jacobowitz <drow@mvista.com>
3956
3957 * Makefile.in (SFILES): Update.
3958 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
3959 low-sun3.c: Remove files.
3960
6ad8ae5c
DJ
39612003-06-17 Daniel Jacobowitz <drow@mvista.com>
3962
3963 * linux-low.c: Move comment to linux_thread_alive where it belonged.
3964 (linux_detach_one_process, linux_detach): New functions.
3965 (linux_target_ops): Add linux_detach.
3966 * server.c (main): Handle 'D' packet.
3967 * target.h (struct target_ops): Add "detach" member.
3968 (detach_inferior): Define.
3969
1581182a
MK
39702003-06-13 Mark Kettenis <kettenis@gnu.org>
3971
3972 From Kelley Cook <kelleycook@wideopenwest.com>:
3973 * configure.srv: Accept i[34567]86 variants.
3974
e5379b03
DJ
39752003-06-05 Daniel Jacobowitz <drow@mvista.com>
3976
3977 * linux-low.c (linux_wait_for_event): Correct comment typos.
3978 (linux_resume_one_process): Call check_removed_breakpoint.
3979 (linux_send_signal): New function.
3980 (linux_target_ops): Add linux_send_signal.
3981 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
3982 of kill.
3983 * target.h (struct target_ops): Add send_signal.
3984
2ff29de4
JB
39852003-05-29 Jim Blandy <jimb@redhat.com>
3986
3987 * linux-low.c (usr_store_inferior_registers): Transfer buf in
3988 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
3989 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
3990 away part of the register's value.
3991
254787d4
DJ
39922003-03-26 Daniel Jacobowitz <drow@mvista.com>
3993
3994 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
3995 (linux_wait_for_event, linux_init_signals): Likewise.
3996
94e10508
DJ
39972003-03-17 Daniel Jacobowitz <drow@mvista.com>
3998
3999 * configure.in: Check for stdlib.h.
4000 * configure: Regenerated.
4001 * config.in: Regenerated.
4002
4c0711e0
DJ
40032003-01-04 Andreas Schwab <schwab@suse.de>
4004
4005 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
4006
ef66e766
AC
40072003-01-02 Andrew Cagney <ac131313@redhat.com>
4008
4009 * Makefile.in: Remove obsolete code.
4010
a1358604
DJ
40112002-11-20 Daniel Jacobowitz <drow@mvista.com>
4012
4013 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
4014 defined(PT_FPR0_HI).
4015
23ce3b1c
DJ
40162002-11-17 Stuart Hughes <seh@zee2.com>
4017
4018 * linux-arm-low.c (arm_num_regs): Increase.
4019 (arm_regmap): Include status register.
4020
40212002-11-17 Daniel Jacobowitz <drow@mvista.com>
4022
4023 * linux-low.c (register_addr): Remove incorrect -1 check.
4024
a9fa9f7d
DJ
40252002-08-29 Daniel Jacobowitz <drow@mvista.com>
4026
4027 * linux-low.c (linux_create_inferior): Call setpgid. Return
4028 the new PID.
4029 (unstopped_p, linux_signal_pid): Remove.
4030 (linux_target_ops): Remove linux_signal_pid.
4031 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
4032 global instead of target method.
4033 * target.h (struct target_ops): Remove signal_pid. Update comment
4034 for create_inferior.
4035 * server.c (signal_pid): New variable.
4036 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 4037 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
4038 (attach_inferior): Set signal_pid.
4039
17574093
DJ
40402002-08-23 Daniel Jacobowitz <drow@mvista.com>
4041
4042 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
4043
40442002-08-20 Jim Blandy <jimb@redhat.com>
4045
4046 * Makefile.in (LDFLAGS): Allow the configure script to establish a
4047 default for this.
4048
40492002-08-01 Andrew Cagney <cagney@redhat.com>
4050
4051 * Makefile.in: Make chill references obsolete.
4052
40532002-07-24 Kevin Buettner <kevinb@redhat.com>
4054
4055 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
4056 * configure: Regenerate.
4057 * config.in: Regenerate.
4058
40592002-07-09 David O'Brien <obrien@FreeBSD.org>
4060
4061 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
4062 (perror_with_name, remote_close, remote_open, expect, play): Static.
4063
40642002-07-04 Michal Ludvig <mludvig@suse.cz>
4065
4b8dad4a 4066 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
4067 byte offsets instead of an array of indexes.
4068 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
4069
40702002-06-13 Daniel Jacobowitz <drow@mvista.com>
4071
4072 * regcache.c: Add comment.
4073
40742002-06-11 Daniel Jacobowitz <drow@mvista.com>
4075
4076 * thread-db.c: New file.
4077 * proc-service.c: New file.
4078 * acinclude.m4: New file.
4079 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
4080 proc-service.o, and thread-db.o.
4081 (linux-low.o): Add USE_THREAD_DB.
4082 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
4083 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
4084 * aclocal.m4: Regenerated.
4085 * config.in: Regenerated.
4086 * configure: Regenerated.
4087 * configure.in: Check for proc_service.h, sys/procfs.h,
4088 thread_db.h, and linux/elf.h headrs.
4089 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
4090 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
4091 Check for -lthread_db and thread support.
4092 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
4093 PowerPC, and SuperH.
4094 * i387-fp.c: Constify arguments.
4095 * i387-fp.h: Likewise.
4096 * inferiors.c: (struct thread_info): Renamed from
4097 `struct inferior_info'. Remove PID member. Use generic inferior
4098 list header. All uses updated.
4099 (inferiors, signal_pid): Removed.
4100 (all_threads): New variable.
4101 (get_thread): Define.
4102 (add_inferior_to_list): New function.
4103 (for_each_inferior): New function.
4104 (change_inferior_id): New function.
4105 (add_inferior): Removed.
4106 (remove_inferior): New function.
4107 (add_thread): New function.
4108 (free_one_thread): New function.
4109 (remove_thread): New function.
4110 (clear_inferiors): Use for_each_inferior and free_one_thread.
4111 (find_inferior): New function.
4112 (find_inferior_id): New function.
4113 (inferior_target_data): Update argument type.
4114 (set_inferior_target_data): Likewise.
4115 (inferior_regcache_data): Likewise.
4116 (set_inferior_regcache_data): Likewise.
4117 * linux-low.c (linux_bp_reinsert): Remove.
4118 (all_processes, stopping_threads, using_thrads)
4119 (struct pending_signals, debug_threads, pid_of): New.
4120 (inferior_pid): Replace with macro.
4121 (struct inferior_linux_data): Remove.
4122 (get_stop_pc, add_process): New functions.
4123 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
4124 Use add_process and add_thread.
4125 (linux_attach_lwp): New function, based on old linux_attach. Use
4126 add_process and add_thread. Set stop_expected for new threads.
4127 (linux_attach): New function.
4128 (linux_kill_one_process): New function.
4129 (linux_kill): Kill all LWPs.
4130 (linux_thread_alive): Use find_inferior_id.
4131 (check_removed_breakpoints, status_pending_p): New functions.
4132 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
4133 Update. Use WNOHANG. Wait for cloned processes also. Update process
4134 struct for the found process.
4135 (linux_wait_for_event): New function.
4136 (linux_wait): Use it. Support LWPs.
4137 (send_sigstop, wait_for_sigstop, stop_all_processes)
4138 (linux_resume_one_process, linux_continue_one_process): New functions.
4139 (linux_resume): Support LWPs.
4140 (REGISTER_RAW_SIZE): Remove.
4141 (fetch_register): Use register_size instead. Call supply_register.
4142 (usr_store_inferior_registers): Likewise. Call collect_register.
4143 Fix recursive case.
4144 (regsets_fetch_inferior_registers): Improve error message.
4145 (regsets_store_inferior_registers): Add debugging.
4146 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
4147 (unstopped_p, linux_signal_pid): New functions.
4148 (linux_target_ops): Add linux_signal_pid.
4149 (linux_init_signals): New function.
4150 (initialize_low): Call it. Initialize using_threads.
4151 * regcache.c (inferior_regcache_data): Add valid
4152 flag.
4153 (get_regcache): Fetch registers lazily. Add fetch argument
4154 and update all callers.
4155 (regcache_invalidate_one, regcache_invalidate): New
4156 functions.
4157 (new_register_cache): Renamed from create_register_cache.
4158 Return the new regcache.
4159 (free_register_cache): Change argument to a void *.
4160 (registers_to_string, registers_from_string): Call get_regcache
4161 with fetch flag set.
4162 (register_data): Make static. Pass fetch flag to get_regcache.
4163 (supply_register): Call get_regcache with fetch flag clear.
4164 (collect_register): Call get_regcache with fetch flag set.
4165 (collect_register_as_string): New function.
4166 * regcache.h: Update.
4167 * remote-utils.c (putpkt): Flush after debug output and use
4168 stderr.
4169 Handle input interrupts while waiting for an ACK.
4170 (input_interrupt): Use signal_pid method.
4171 (getpkt): Flush after debug output and use stderr.
4172 (outreg): Use collect_register_as_string.
4173 (new_thread_notify, dead_thread_notify): New functions.
4174 (prepare_resume_reply): Check using_threads. Set thread_from_wait
4175 and general_thread.
4176 (look_up_one_symbol): Flush after debug output.
4177 * server.c (step_thread, server_waiting): New variables.
4178 (start_inferior): Don't use signal_pid. Update call to mywait.
4179 (attach_inferior): Update call to mywait.
4180 (handle_query): Handle qfThreadInfo and qsThreadInfo.
4181 (main): Don't fetch/store registers explicitly. Use
4182 set_desired_inferior. Support proposed ``Hs'' packet. Update
4183 calls to mywait.
4184 * server.h: Update.
4185 (struct inferior_list, struct_inferior_list_entry): New.
4186 * target.c (set_desired_inferior): New.
4187 (write_inferior_memory): Constify.
4188 (mywait): New function.
4189 * target.h: Update.
4190 (struct target_ops): New signal_pid method.
4191 (mywait): Removed macro, added prototype.
4192
4193 * linux-low.h (regset_func): Removed.
4194 (regset_fill_func, regset_store_func): New.
4195 (enum regset_type): New.
4196 (struct regset_info): Add type field. Use new operation types.
4197 (struct linux_target_ops): stop_pc renamed to get_pc.
4198 Add decr_pc_after_break and breakpoint_at.
4199 (get_process, get_thread_proess, get_process_thread)
4200 (strut process_info, all_processes, linux_attach_lwp)
4201 (thread_db_init): New.
4202
4203 * linux-arm-low.c (arm_get_pc, arm_set_pc,
4204 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
4205 (the_low_target): Add new members.
4206 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
4207 (i386_store_fpxregset): Constify.
4208 (target_regsets): Add new kind identifier.
4209 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
4210 (i386_set_pc): Add debugging.
4211 (i386_breakpoint_at): New function.
4212 (the_low_target): Add new members.
4213 * linux-mips-low.c (mips_get_pc, mips_set_pc)
4214 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
4215 (mips_breakpoint_at): New.
4216 (the_low_target): Add new members.
4217 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
4218 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
4219 (the_low_target): Add new members.
4220 * linux-sh-low.c (sh_get_pc, sh_set_pc)
4221 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
4222 (the_low_target): Add new members.
4223 * linux-x86-64-low.c (target_regsets): Add new kind
4224 identifier.
4225
42262002-05-15 Daniel Jacobowitz <drow@mvista.com>
4227
4228 From Martin Pool <mbp@samba.org>:
4229 * server.c (gdbserver_usage): New function.
4230 (main): Call it.
4231
42322002-05-14 Daniel Jacobowitz <drow@mvista.com>
4233
4234 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
4235 stop_at -> stop_pc.
4236
42372002-05-04 Andrew Cagney <ac131313@redhat.com>
4238
4239 * Makefile.in: Remove obsolete code.
4240
42412002-04-24 Michal Ludvig <mludvig@suse.cz>
4242
4243 * linux-low.c (regsets_fetch_inferior_registers),
4244 (regsets_store_inferior_registers): Removed cast to int from
4245 ptrace() calls.
4246 * regcache.h: Added declaration of struct inferior_info.
4247
42482002-04-20 Daniel Jacobowitz <drow@mvista.com>
4249
4250 * inferiors.c (struct inferior_info): Add regcache_data.
4251 (add_inferior): Call create_register_cache.
4252 (clear_inferiors): Call free_register_cache.
4253 (inferior_regcache_data, set_inferior_regcache_data): New functions.
4254 * regcache.c (struct inferior_regcache_data): New.
4255 (registers): Remove.
4256 (get_regcache): New function.
4257 (create_register_cache, free_register_cache): New functions.
4258 (set_register_cache): Don't initialize the register cache here.
4259 (registers_to_string, registers_from_string, register_data): Call
4260 get_regcache.
4261 * regcache.h: Add prototypes.
4262 * server.h: Likewise.
4263
42642002-04-20 Daniel Jacobowitz <drow@mvista.com>
4265
4266 * mem-break.c: New file.
4267 * mem-break.h: New file.
4268 * Makefile.in: Add mem-break.o rule; update server.h
4269 dependencies.
4270 * inferiors.c (struct inferior_info): Add target_data
4271 member.
4272 (clear_inferiors): Free target_data member if set.
4273 (inferior_target_data, set_inferior_target_data): New functions.
4274 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
4275 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
4276 * linux-low.c (linux_bp_reinsert): New variable.
4277 (struct inferior_linux_data): New.
4278 (linux_create_inferior): Use set_inferior_target_data.
4279 (linux_attach): Likewise. Call add_inferior.
4280 (linux_wait_for_one_inferior): New function.
4281 (linux_wait): Call it.
4282 (linux_write_memory): Add const.
4283 (initialize_low): Call set_breakpoint_data.
4284 * linux-low.h (struct linux_target_ops): Add breakpoint
4285 handling members.
4286 * server.c (attach_inferior): Remove extra add_inferior
4287 call.
4288 * server.h: Include mem-break.h. Update inferior.c
4289 prototypes.
4290 * target.c (read_inferior_memory)
4291 (write_inferior_memory): New functions.
4292 * target.h (read_inferior_memory)
4293 (write_inferior_memory): Change macros to prototypes.
4294 (struct target_ops): Update comments. Add const to write_memory
4295 definition.
4296
42972002-04-11 Daniel Jacobowitz <drow@mvista.com>
4298
4299 * linux-low.c (usr_store_inferior_registers): Support
4300 registers which are allowed to fail to store.
4301 * linux-low.h (linux_target_ops): Likewise.
4302 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
4303 (ppc_cannot_store_register): FPSCR may not be storable.
4304
43052002-04-09 Daniel Jacobowitz <drow@mvista.com>
4306
4307 * server.h: Include <string.h> if HAVE_STRING_H.
4308 * ChangeLog: Correct paths in last ChangeLog entry.
4309
43102002-04-09 Daniel Jacobowitz <drow@mvista.com>
4311
4312 * linux-low.h: Remove obsolete prototypes.
4313 (struct linux_target_ops): New.
4314 (extern the_low_target): New.
4315 * linux-low.c (num_regs, regmap): Remove declarations.
4316 (register_addr): Use the_low_target explicitly.
4317 (fetch_register): Likewise.
4318 (usr_fetch_inferior_registers): Likewise.
4319 (usr_store_inferior_registers): Likewise.
4320 * linux-arm-low.c (num_regs): Remove.
4321 (arm_num_regs): Define.
4322 (arm_regmap): Renamed from regmap, made static.
4323 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
4324 made static.
4325 (arm_cannot_store_register): Renamed from cannot_store_register,
4326 made static.
4327 (the_low_target): New.
4328 * linux-i386-low.c (num_regs): Remove.
4329 (i386_num_regs): Define.
4330 (i386_regmap): Renamed from regmap, made static.
4331 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
4332 made static.
4333 (i386_cannot_store_register): Renamed from cannot_store_register,
4334 made static.
4335 (the_low_target): New.
4336 * linux-ia64-low.c (num_regs): Remove.
4337 (ia64_num_regs): Define.
4338 (ia64_regmap): Renamed from regmap, made static.
4339 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
4340 made static.
4341 (ia64_cannot_store_register): Renamed from cannot_store_register,
4342 made static.
4343 (the_low_target): New.
4344 * linux-m68k-low.c (num_regs): Remove.
4345 (m68k_num_regs): Define.
4346 (m68k_regmap): Renamed from regmap, made static.
4347 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
4348 made static.
4349 (m68k_cannot_store_register): Renamed from cannot_store_register,
4350 made static.
4351 (the_low_target): New.
4352 * linux-mips-low.c (num_regs): Remove.
4353 (mips_num_regs): Define.
4354 (mips_regmap): Renamed from regmap, made static.
4355 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
4356 made static.
4357 (mips_cannot_store_register): Renamed from cannot_store_register,
4358 made static.
4359 (the_low_target): New.
4360 * linux-ppc-low.c (num_regs): Remove.
4361 (ppc_num_regs): Define.
4362 (ppc_regmap): Renamed from regmap, made static.
4363 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
4364 made static.
4365 (ppc_cannot_store_register): Renamed from cannot_store_register,
4366 made static.
4367 (the_low_target): New.
4368 * linux-s390-low.c (num_regs): Remove.
4369 (s390_num_regs): Define.
4370 (s390_regmap): Renamed from regmap, made static.
4371 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
4372 made static.
4373 (s390_cannot_store_register): Renamed from cannot_store_register,
4374 made static.
4375 (the_low_target): New.
4376 * linux-sh-low.c (num_regs): Remove.
4377 (sh_num_regs): Define.
4378 (sh_regmap): Renamed from regmap, made static.
4379 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
4380 made static.
4381 (sh_cannot_store_register): Renamed from cannot_store_register,
4382 made static.
4383 (the_low_target): New.
4384 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
4385 (the_low_target): New.
4386
43872002-04-09 Daniel Jacobowitz <drow@mvista.com>
4388
4389 * Makefile.in: Add stamp-h target.
4390 * configure.in: Create stamp-h.
4391 * configure: Regenerated.
4392
43932002-04-09 Daniel Jacobowitz <drow@mvista.com>
4394
4395 * inferiors.c: New file.
4396 * target.c: New file.
4397 * target.h: New file.
4398 * Makefile.in: Add target.o and inferiors.o. Update
4399 dependencies.
4400 * linux-low.c (inferior_pid): New static variable,
4401 moved from server.c.
4402 (linux_create_inferior): Renamed from create_inferior.
4403 Call add_inferior. Return 0 on success instead of a PID.
4404 (linux_attach): Renamed from myattach.
4405 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
4406 (linux_thread_alive): Renamed from mythread_alive.
4407 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
4408 child dies.
4409 (linux_resume): Renamed from myresume. Add missing ``return 0''.
4410 (regsets_store_inferior_registers): Correct error message.
4411 Add missing ``return 0''.
4412 (linux_fetch_registers): Renamed from fetch_inferior_registers.
4413 (linux_store_registers): Renamed from store_inferior_registers.
4414 (linux_read_memory): Renamed from read_inferior_memory.
4415 (linux_write_memory): Renamed from write_inferior_memory.
4416 (linux_target_ops): New structure.
4417 (initialize_low): Call set_target_ops ().
4418 * remote-utils.c (unhexify): New function.
4419 (hexify): New function.
4420 (input_interrupt): Send signals to ``signal_pid''.
4421 * server.c (inferior_pid): Remove.
4422 (start_inferior): Update create_inferior call.
4423 (attach_inferior): Call add_inferior.
4424 (handle_query): New function.
4425 (main): Call handle_query for `q' packets.
4426 * server.h: Include "target.h". Remove obsolete prototypes.
4427 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
4428
44292002-04-09 Daniel Jacobowitz <drow@mvista.com>
4430
4431 * Makefile.in: Add WARN_CFLAGS. Update configury
4432 dependencies.
4433 * configure.in: Check for <string.h>
4434 * configure: Regenerate.
4435 * config.in: Regenerate.
4436 * gdbreplay.c: Include needed system headers.
4437 (remote_open): Remove strchr prototype.
4438 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
4439 * regcache.c (supply_register): Change buf argument to const void *.
4440 (supply_register_by_name): Likewise.
4441 (collect_register): Change buf argument to void *.
4442 (collect_register_by_name): Likewise.
4443 * regcache.h: Add missing prototypes.
4444 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
4445 * server.c (handle_query): New function.
4446 (attached): New static variable, moved out of main.
4447 (main): Quiet longjmp clobber warnings.
4448 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
4449 * utils.c (error): Remove NORETURN.
4450 (fatal): Likewise.