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