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