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