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