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