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