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