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