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