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