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