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