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