]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/gdbserver/ChangeLog
* rs6000-tdep.c (rs6000_gdbarch_init): Use the BFD architecture,
[thirdparty/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
e28b3332
DJ
12008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
2
3 * Makefile.in (LIBOBJS): New.
4 (OBS): Use LIBOBJS.
5 (memmem.o): New rule.
6 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
7 * configure: Regenerated.
8
4536995d
UW
92008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
10
11 * server.c (handle_query): Never return "unsupported" for
12 qXfer:features:read queries.
13
221c031f
UW
142008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
15
16 * server.c (get_features_xml): Fix inverted condition.
17 (handle_query): Always support qXfer:feature:read.
18
ccd213ac
DJ
192008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
20
21 * server.c (wrapper_argv): New.
22 (start_inferior): Handle wrapper_argv. If set, expect an extra
23 trap.
24 (gdbserver_usage): Document --wrapper.
25 (main): Parse --wrapper.
26
6fe305f7
UW
272008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
28
29 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
30 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
31 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
32 (ppc_set_pc): Likewise.
33 (ppc_arch_setup): New function.
34 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
35 of collect_register.
36 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
37
5b0a002e
UW
382008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
39
40 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
41 instead of linux-ppc64-low.o.
42 * linux-ppc64-low.c: Remove file.
43 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
44 (linux-ppc64-low.o): Remove rule.
45
46 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
47 (init_registers_powerpc_64): Likewise.
48 (ppc_regmap): Conditionally define depending on __powerpc64__.
49 (ppc_cannot_store_register): Do not special-case "fpscr" when
50 compiled on __powerpc64__.
51 (ppc_collect_ptrace_register): New function.
52 (ppc_supply_ptrace_register): New function.
53 (ppc_breakpoint): Change type to "unsigned int".
54 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
55 (the_low_target): Conditionally provide initializers for the
56 arch_setup member depending on __powerpc64__. Install
57 collect_ptrace_register and supply_ptrace_register members.
58
9b4b61c8
UW
592008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
60
61 * regcache.h (gdbserver_xmltarget): Add extern declaration.
62 * server.c (gdbserver_xmltarget): Define.
63 (get_features_xml): Use it to replace "target.xml" and arch_string.
64
65 * configure.srv: Remove srv_xmltarget. Add XML files that were
66 mentioned there to srv_xmlfiles instead. Remove conditional tests
67 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
68 srv_xmlfiles and srv_regobj to include all possible choices.
69 * configure.ac (srv_xmltarget): Remove.
70 (srv_xmlfiles): Do not add "target.xml".
71 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
72 checks for supplementary target information.
73 * configure: Regenerate.
74 * Makefile.in (XML_TARGET): Remove.
75 (target.xml): Remove rule.
76 (clean): Do not clean up target.xml.
77 (.PRECIOUS): Do not mention target.xml.
78
79 * target.h (struct target_ops): Remove arch_string member.
80 * linux-low.c (linux_arch_string): Remove.
81 (linux_target_ops): Remove arch_string initializer.
82 * linux-low.h (struct linux_target_ops): Remove arch_string member.
83 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
84 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
85 * spu-low.c (spu_arch_string): Remove.
86 (spu_target_ops): Remove arch_string initializer.
87 * win32-low.c (win32_arch_string): Remove.
88 (win32_target_ops): Remove arch_string initializer.
89 * win32-low.h (struct win32_target_ops): Remove arch_string member.
90 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
91 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
92
ee1a7ae4
UW
932008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
94
95 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
96 by collect_ptrace_register and supply_ptrace_register hooks.
97 * linux-low.c (fetch_register): Use supply_ptrace_register callback
98 instead of checking for the_low_target.left_pad_xfer.
99 (usr_store_inferior_registers): Use collect_ptrace_register callback
100 instead of checking for the_low_target.left_pad_xfer.
101
102 * linux-s390-low.c (s390_collect_ptrace_register): New function.
103 (s390_supply_ptrace_register): Likewise.
104 (s390_fill_gregset): Call s390_collect_ptrace_register.
105 (the_low_target): Update.
106
107 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
108 (ppc_supply_ptrace_register): Likewise.
109 (the_low_target): Update.
110
111 * linux-i386-low.c (the_low_target): Update.
112 * linux-x86-64-low.c (the_low_target): Update.
113
d61ddec4
UW
1142008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
115
116 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
117 reg-s390.o and reg-s390x.o.
118
119 * linux-low.c (new_inferior): New global variable.
120 (linux_create_inferior, linux_attach): Set it.
121 (linux_wait_for_process): Call the_low_target.arch_setup after the
122 target has stopped for the first time.
123 (initialize_low): Do not call the_low_target.arch_setup.
124
125 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
126 (s390_set_pc): Likewise.
127 (s390_arch_setup): New function.
128 (the_low_target): Use s390_arch_setup as arch_setup routine.
129
130 * regcache.c (realloc_register_cache): New function.
131 (set_register_cache): Call it for each existing regcache.
132
d05b4ac3
UW
1332008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
134
135 * server.h (init_registers): Remove prototype.
136
137 * linux-low.h (struct linux_target_ops): Add arch_setup field.
138 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
139 instead of init_registers ().
140 * linux-arm-low.c (init_registers_arm): Add prototype.
141 (init_registers_arm_with_iwmmxt): Likewise.
142 (the_low_target): Add initializer for arch_setup field.
143 * linux-cris-low.c (init_registers_cris): Add prototype.
144 (the_low_target): Add initializer for arch_setup field.
145 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
146 (the_low_target): Add initializer for arch_setup field.
147 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
148 (the_low_target): Add initializer for arch_setup field.
149 * linux-ia64-low.c (init_registers_ia64): Add prototype.
150 (the_low_target): Add initializer for arch_setup field.
151 * linux-m32r-low.c (init_registers_m32r): Add prototype.
152 (the_low_target): Add initializer for arch_setup field.
153 * linux-m68k-low.c (init_registers_m68k): Add prototype.
154 (the_low_target): Add initializer for arch_setup field.
155 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
156 (init_registers_mips64_linux): Likewise.
157 (the_low_target): Add initializer for arch_setup field.
158 * linux-ppc-low.c (init_registers_ppc): Add prototype.
159 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
160 (the_low_target): Add initializer for arch_setup field.
161 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
162 (init_registers_powerpc_64): Likewise.
163 (the_low_target): Add initializer for arch_setup field.
164 * linux-s390-low.c (init_registers_s390): Add prototype.
165 (init_registers_s390x): Likewise.
166 (the_low_target): Add initializer for arch_setup field.
167 * linux-sh-low.c (init_registers_sh): Add prototype.
168 (the_low_target): Add initializer for arch_setup field.
169 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
170 (the_low_target): Add initializer for arch_setup field.
171 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
172 (the_low_target): Add initializer for arch_setup field.
173
174 * win32-low.h (struct win32_target_ops): Add arch_setup field.
175 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
176 instead of init_registers ().
177 * win32-arm-low.c (init_registers_arm): Add prototype.
178 (the_low_target): Add initializer for arch_setup field.
179 * win32-i386-low.c (init_registers_i386): Add prototype.
180 (the_low_target): Add initializer for arch_setup field.
181
182 * spu-low.c (init_registers_spu): Add prototype.
183 (initialize_low): Call initialie_registers_spu () instead of
184 initialize_registers ().
185
fd96d250
PA
1862008-02-19 Pedro Alves <pedro@codesourcery.com>
187
188 * server.c (handle_v_requests): When handling the vRun and vAttach
189 packets, if already debugging a process, don't kill it. Return an
190 error instead.
191
d41b6bb4
DJ
1922008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
193
194 * server.c (handle_query): Correct length check.
195
5ac588cf
PA
1962008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
197
198 * win32-low.c (do_initial_child_stuff): Add process handle
199 parameter. Set current_process_handle and current_process_id from the
200 parameters. Clear globals.
201 (win32_create_inferior): Don't set current_process_handle and
202 current_process_id here. Instead pass them on the call to
203 do_initial_child_stuff.
204 (win32_attach): Likewise.
205 (win32_clear_inferiors): New.
206 (win32_kill): Don't close the current process handle or the
207 current thread handle here. Instead call win32_clear_inferiors.
208 (win32_detach): Don't open a new handle to the process. Call
209 win32_clear_inferiors.
210 (win32_join): Don't rely on current_process_handle; open a new
211 handle using the process id.
212 (win32_wait): Call win32_clear_inferiors when the inferior process
213 has exited.
214
ecd7ecbc
DJ
2152008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
216
217 * server.c (monitor_show_help): Add "exit".
218
1525d545
MG
2192008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
220
ecd7ecbc 221 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
222 (clean): Add reg-xtensa.c.
223 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
224 * configure.srv (xtensa*-*-linux*) New target.
225 * linux-xtensa-low.c: New.
226 * xtensa-xtregs.c: New.
1525d545 227
59a016f0
PA
2282008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
229
230 * hostio.c: Don't include errno.h.
231 (errno_to_fileio_errno): Move to hostio-errno.
232 * hostio.c: (hostio_error): Remove the error parameter. Defer the
233 error number outputting to the target->hostio_last_error callback.
234 (hostio_packet_error): Use FILEIO_EINVAL directly.
235 (handle_open, handle_pread, hostio_error, handle_unlink): Update
236 calls to hostio_error.
237 * hostio-errno.c: New.
238 * server.h (hostio_last_error_from_errno): Declare.
239 * target.h (target_ops): Add hostio_last_error member.
240 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
241 as hostio_last_error handler.
242 * spu-low.c (spu_target_ops): Likewise.
243 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
244 (wince_hostio_last_error): New functions.
245 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
246 as hostio_last_error handler.
247 (win32_target_ops) [!_WIN32_WCE]: Register
248 hostio_last_error_from_errno as hostio_last_error handler.
249 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
250 (hostio-errno.o): New rule.
251 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
252 * configure.srv (srv_hostio_err_objs): New variable. Default to
253 hostio-errno.o.
254 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
255 * configure: Regenerate.
256
2d717e4f
DJ
2572008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
258
259 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
260 (linux_kill, linux_detach): Clean up the process list.
261 * remote-utils.c (remote_open): Improve port number parsing.
262 (putpkt_binary, input_interrupt): Only send interrupts if the target
263 is running.
264 * server.c (extended_protocol): Make static.
265 (attached): Define earlier.
266 (exit_requested, response_needed, program_argv): New variables.
267 (target_running): New.
268 (start_inferior): Clear attached here.
269 (attach_inferior): Set attached here.
270 (require_running): Define.
271 (handle_query): Use require_running and target_running. Implement
272 "monitor exit".
273 (handle_v_attach, handle_v_run): New.
274 (handle_v_requests): Use require_running. Handle vAttach and vRun.
275 (gdbserver_usage): Update.
276 (main): Redo argument parsing. Handle --debug and --multi. Handle
277 --attach along with other options or after the port. Save
278 program_argv. Support no initial program. Resynchronize
279 communication with GDB after an error. Handle "monitor exit".
280 Use require_running and target_running. Always allow the extended
281 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
282 restart in extended mode.
283 * README: Refer to the GDB manual. Update --attach usage.
284
7407e2de
AS
2852007-12-20 Andreas Schwab <schwab@suse.de>
286
287 * linux-low.c (STACK_SIZE): Define.
288 (linux_tracefork_child): Use it. Use __clone2 on ia64.
289 (linux_test_for_tracefork): Likewise.
290
b65d95c5
DJ
2912007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
292
293 * linux-low.c (linux_wait_for_event): Update messages. Do not
294 reinsert auto-delete breakpoints.
295 * mem-break.c (struct breakpoint): Change return type of handler to
296 int.
297 (set_breakpoint_at): Update handler type.
298 (reinsert_breakpoint_handler): Return 1 instead of calling
299 delete_breakpoint.
300 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
301 setting a new one.
302 (check_breakpoints): Delete auto-delete breakpoints and return 2.
303 * mem-break.h (set_breakpoint_at): Update handler type.
304 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
305 * win32-low.c (auto_delete_breakpoint): New.
306 (get_child_debug_event): Use it.
307
4e799345
DJ
3082007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
309
310 * configure.ac: Check for pread and pwrite.
311 * hostio.c (handle_pread): Fall back to lseek and read.
312 (handle_pwrite): Fall back to lseek and write.
313 * config.in, configure: Regenerated.
314
27524b67
DJ
3152007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
316
317 * server.c (myresume): Add own_buf argument.
318 (main): Update calls.
319
a20d5e98
DJ
3202007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
321
322 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
323 * remote-utils.c (remote_open): Do not call disable_async_io.
324 (block_async_io): Delete.
325 (unblock_async_io): Make static.
326 (initialize_async_io): New.
327 * server.c (handle_v_cont): Handle async I/O here.
328 (myresume): Likewise. Move other common resume tasks here...
329 (main): ... from here. Call initialize_async_io. Disable async
330 I/O before the main loop.
331 * server.h (initialize_async_io): Declare.
332 (block_async_io, unblock_async_io): Delete prototypes.
333 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
334
b79d787e
DJ
3352007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
336
337 * remote-utils.c (readchar): Allow binary data in received messages.
338
d97903b2
PA
3392007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
340
341 * win32-low.c (attaching): New global.
342 (win32_create_inferior): Clear the `attaching' global.
343 (win32_attach): Set the `attaching' global.
344 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
345 attaching. Only set a breakpoint at the entry point if not
346 attaching.
347
311de423
PA
3482007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
349
350 * server.c (main): Don't report dll events on the initial
351 connection on attaches.
352
6c2d16d2
PA
3532007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
354
355 * server.c (main): Relax numerical bases supported for the pid of
356 the --attach command line argument.
357
5ca906e6
PA
3582007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
359
360 * win32-low.c (win32_attach): Call OpenProcess before
361 DebugActiveProcess, not after. Add last error output to error
362 call.
363
9c6c8194
PA
3642007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
365
366 * win32-low.c (win32_get_thread_context)
367 (win32_set_thread_context): New functions.
368 (thread_rec): Use win32_get_thread_context.
369 (continue_one_thread, win32_resume): Use win32_set_thread_context.
370 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
371 field.
372
4d5d1aaa
PA
3732007-12-03 Leo Zayas
374 Pedro Alves <pedro_alves@portugalmail.pt>
375
376 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
377 global variables.
378 (child_add_thread): Minor cleanup.
379 (child_continue): Resume artificially suspended threads before
380 calling ContinueDebugEvent.
381 (suspend_one_thread): New.
382 (fake_breakpoint_event): New.
383 (get_child_debug_event): Change return type to int. Check here if
384 gdb sent an interrupt request. If a soft interrupt was requested,
385 fake a breakpoint event. Return 0 if there is no event to handle,
386 and 1 otherwise.
387 (win32_wait): Don't check here if gdb sent an interrupt request.
388 Ensure there is a valid event to handle.
389 (win32_request_interrupt): Add soft interruption method as last
390 resort.
391
c436e841
PA
3922007-12-03 Leo Zayas
393 Pedro Alves <pedro_alves@portugalmail.pt>
394
395 * win32-low.h (win32_thread_info): Add descriptions to the
396 structure members. Replace `suspend_count' counter by a
397 `suspended' flag.
398 * win32-low.c (thread_rec): Update condition of when to get the
399 context from the inferior. Rely on ContextFlags being set if it
400 has already been retrieved. Only suspend the inferior thread if
401 we haven't already. Warn if that fails.
402 (continue_one_thread): s/suspend_count/suspended/. Only call
403 ResumeThread once. Warn if that fails.
404
e7b5fa67
PA
4052007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
406
407 * win32-low.c (win32_wait): Don't read from the inferior when it
408 has already exited.
409
a385171d
PA
4102007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
411
412 * Makefile.in (win32_low_h): New variable.
413 (win32-low.o): Add dependency on $(win32_low_h).
414 (win32-arm-low.o, win32-i386-low.o): New rules.
415
f80c84b3
DJ
4162007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
417
418 * hostio.c: Correct copyright year.
419
a6b151f1
DJ
4202007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
421
422 * Makefile.in (OBS): Add hostio.o.
423 (hostio.o): New rule.
424 * server.h (handle_vFile): Declare.
425 * hostio.c: New file.
426 * server.c (handle_v_requests): Take packet_len and new_packet_len
427 for binary packets. Call handle_vFile.
428 (main): Update call to handle_v_requests.
429
f9387fc3
DJ
4302007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
431
432 * linux-low.c: Include <sched.h>.
433
51c2684e
DJ
4342007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
435
436 * linux-low.c (linux_tracefork_grandchild): New.
437 (linux_tracefork_child): Use clone.
438 (linux_test_for_tracefork): Use clone; allocate and free a stack.
439
75f83163
JB
4402007-10-31 Joel Brobecker <brobecker@adacore.com>
441
442 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
443
da5898ce
DJ
4442007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
445
446 * linux-low.c (handle_extended_wait): Handle unexpected signals.
447
24a09b5f
DJ
4482007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
449
450 * inferiors.c (change_inferior_id): Delete.
451 (add_pid_to_list, pull_pid_from_list): New.
452 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
453 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
454 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
455 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
456 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
457 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
458 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
459 (using_threads): Always set to 1.
460 (handle_extended_wait): New.
461 (add_process): Do not set TID.
462 (linux_create_inferior): Set must_set_ptrace_flags.
463 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
464 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
465 (linux_thread_alive): Rename TID argument to LWPID.
466 (linux_wait_for_process): Handle unknown processes. Do not use TID.
467 (linux_wait_for_event): Do not use TID or check using_threads. Update
468 call to dead_thread_notify. Call handle_extended_wait.
469 (linux_create_inferior): Use PTRACE_SETOPTIONS.
470 (send_sigstop): Delete sigstop_sent.
471 (wait_for_sigstop): Avoid TID.
472 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
473 (linux_test_for_tracefork): New.
474 (linux_lookup_signals): Use thread_db_active and
475 linux_supports_tracefork_flag.
476 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
477 * linux-low.h (get_process_thread): Avoid TID.
478 (struct process_ifo): Move thread_known and tid to the end. Remove
479 sigstop_sent.
480 (linux_attach_lwp, thread_db_init): Update prototypes.
481 * server.h (change_inferior_id): Delete prototype.
482 (add_pid_to_list, pull_pid_from_list): New prototypes.
483 * thread-db.c (thread_db_use_events): New.
484 (find_first_thread): Rename to...
485 (find_one_thread): ...this. Update callers and messages. Do not
486 call fatal. Check thread_db_use_events. Do not call
487 change_inferior_id or new_thread_notify.
488 (maybe_attach_thread): Update. Do not call new_thread_notify.
489 (thread_db_init): Set thread_db_use_events. Check use_events.
490 * utils.c (fatal, warning): Correct message prefix.
491
30ed0a8f
DJ
4922007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
493
494 * Makefile.in (clean): Remove new files.
495 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
496 (powerpc-64.o, powerpc-64.c): New rules.
497 * configure.srv: Use alternate register sets for powerpc64-*-linux*
498 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
499 with SPE.
500 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
501 SPE targets.
502 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
503 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
504 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
505 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
506 (target_regsets): Add AltiVec and SPE register sets.
507 * configure.ac: Check for AltiVec and SPE.
508 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
509 (ppc_fill_vrregset, ppc_store_vrregset): New.
510 (target_regsets): Add AltiVec register set.
511 * configure: Regenerated.
512
fd462a61
DJ
5132007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
514
515 * linux-low.c (O_LARGEFILE): Define.
516 (linux_read_memory): Use /proc/PID/mem.
517 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
518 * configure, config.in: Regenerated.
519
69f223ed
DJ
5202007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
521
522 * linux-low.c (linux_wait_for_event): Do not pass signals while
523 single-stepping.
524
aec18585
PA
5252007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
526
527 * win32-low.c (create_process): New.
528 (win32_create_inferior): Use create_process instead of
529 CreateProcess. If create_process failed retry appending an ".exe"
530 suffix. Store the GetLastError result immediatelly after
531 create_process calls and use it on the call to error.
532
34d86ddd
PA
5332007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
534
535 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
536
5a0e3bd0
JB
5372007-08-23 Joel Brobecker <brobecker@adacore.com>
538
539 * configure.ac: Switch license to GPLv3.
540
f88c79e6
MS
5412007-08-01 Michael Snyder <msnyder@access-company.com>
542
543 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
544
6b3d9b83
PA
5452007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
546
547 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
548 typedef.
549 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
550 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
551 CloseToolhelp32Snapshot.
552 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
553 CloseToolhelp32Snapshot.
554
c588c53c
MS
5552007-07-27 Michael Snyder <michael.snyder@access-company.com>
556
557 * server.c (main): Check for inferior exit before main loop.
558
aa0403d9
PA
5592007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
560
561 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
562 instead of on tmp_desc.
563
255e7678
DJ
5642007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
565 Daniel Jacobowitz <dan@codesourcery.com>
566
567 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
568 (add_thread): Minor cleanups.
569 (clear_inferiors): Move lower in the file. Clear the DLL
570 list.
571 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
572 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
573 (xml_escape_text): New.
574 * server.c (handle_query): Handle qXfer:libraries:read. Report it
575 for qSupported.
576 (handle_v_cont): Report errors.
577 (gdbserver_version): Update.
578 (main): Correct size of own_buf. Do not report initial DLL events.
579 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
580 (unloaded_dll, xml_escape_text): New.
581 * win32-low.c (enum target_waitkind): Update comments.
582 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
583 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
584 (win32_EnumProcessModules, win32_GetModuleInformation)
585 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
586 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
587 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
588 (win32_Module32First, win32_Module32Next, load_toolhelp)
589 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
590 (get_child_debug_event): Handle DLL events.
591 (win32_wait): Likewise.
592
0d37add9
DJ
5932007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
594
595 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
596 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
597
45e2715e
PA
5982007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
599
600 * win32-low.c (handle_output_debug_string): Ignore event if not
601 waiting.
602
c5674cf1
PA
6032007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
604
605 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
606
2bbe3cc1
DJ
6072007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
608
609 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
610
ae13219e
DJ
6112007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
612
613 * inferiors.c (change_inferior_id): Add comment.
614 * linux-low.c (check_removed_breakpoint): Add an early
615 prototype. Improve debug output.
616 (linux_attach): Doc update.
617 (linux_detach_one_process, linux_detach): Clean up before releasing
618 each process.
619 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
620 * linux-low.h (struct process_info): Doc improvement.
621 * mem-break.c (delete_all_breakpoints): New.
622 * mem-break.h (delete_all_breakpoints): New prototype.
623 * thread-db.c (find_first_thread): New.
624 (thread_db_create_event): Call it instead of
625 thread_db_find_new_threads. Clean up unused variables.
626 (maybe_attach_thread): Remove first thread handling.
627 (thread_db_find_new_threads): Use find_first_thread.
628 (thread_db_get_tls_address): Likewise.
629
4105de34
DJ
6302007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
631
632 * thread-db.c (thread_db_find_new_threads): Add prototype.
633 (thread_db_create_event): Check for the main thread before adding
634 a new thread.
635 (maybe_attach_thread): Only enable event reporting if TID == 0.
636 (thread_db_get_tls_address): Check for new threads.
637
2b876972
DJ
6382007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
639
640 * linux-low.c (linux_create_inferior): Try execv before execvp.
641 * spu-low.c (spu_create_inferior): Likewise.
642
7a245884
DJ
6432007-06-13 Mike Frysinger <vapier@gentoo.org>
644
645 * linux-low.c (linux_create_inferior): Change execv to execvp.
646 * spu-low.c (spu_create_inferior): Likewies.
647
117ce543
DJ
6482007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
649
650 * Makefile.in (clean): Clean new files instead of deleted ones.
651 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
652 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
653 rules.
654 * configure.srv: Specify XML files and new regformats for MIPS and
655 MIPS64 GNU/Linux.
656 * linux-mips-low.c (mips_num_regs): Set to only used registers.
657 (mips_regmap): Do not fetch $0. Remove unused registers. Add
658 an entry for the restart register.
659 (mips_cannot_fetch_register, mips_cannot_store_register)
660 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
661 register names to match the XML descriptions.
662 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
663 restart register instead of $0.
664
0e7f50da
UW
6652007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
666 Markus Deuling <deuling@de.ibm.com>
667
668 * remote-utils.c (decode_xfer_write): New function.
669 * server.h (decode_xfer_write): Add prototype.
670 * server.c (handle_query): Add PACKET_LEN argument. Support
671 qXfer:spu:read and qXfer:spu:write packets.
672 (main): Pass packet_len to handle_query.
673 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
674 * target.h (target_ops): Add qxfer_spu.
675
374c1d38
UW
6762007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
677
678 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
679 accessing non-seekable spufs files.
680
bb63802a
UW
6812007-05-16 Markus Deuling <deuling@de.ibm.com>
682
683 * server.c (handle_query): Add reply for qC packet.
684
7390519e
PA
6852007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
686 Leo Zayas <lerele@champenstudios@com>
687
688 * server.h (check_remote_input_interrupt_request): New function.
689 * remote_utils.c (INVALID_DESCRIPTOR): New define.
690 (remote_desc): Initialize with INVALID_DESCRIPTOR.
691 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
692 (check_remote_input_interrupt_request): New function.
693 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 694 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
695 winapi_GenerateConsoleCtrlEvent): New typedefs.
696 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
697 to 250 ms.
698 (win32_wait): Check for remote interrupt request
699 with check_remote_input_interrupt_request.
700 (win32_request_interrupt): New function.
701 (win32_target_op): Set request_interrupt to win32_request_interrupt.
702
34b34921
PA
7032007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
704
705 * win32-low.c (debug_registers_changed,
706 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
707 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
708 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
709 (thread_rec): Get context using the low target.
710 (child_add_thread): Call thread_added on the low target,
711 which does the same thing.
712 (regptr): Delete.
713 (do_initial_child_stuff): Remove debug registers references.
714 Set context using the low target. Resume threads after
715 setting the contexts.
716 (child_continue): Remove dead variable. Remove debug
717 registers references.
718 (child_fetch_inferior_registers): Go through the low target.
719 (do_child_store_inferior_registers): Remove.
720 (child_store_inferior_registers): Go through the low target.
721 (win32_resume): Remove debug registers references.
722 Set context using the low target.
723 (handle_exception): Change return type to void. Don't record
724 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
725 first chance exception.
726 (get_child_debug_event): Change return type to void. Remove
727 goto loop. Always return after waiting for debug event.
728 (win32_wait): Convert to switch statement. Handle spurious
729 events.
730
731 * win32-i386-low.c (debug_registers_changed,
732 debug_registers_used): New.
733 (initial_stuff): Rename to ...
734 (i386_initial_stuff): ... this. Clear debug registers
735 state variables.
736 (store_debug_registers): Delete.
737 (i386_get_thread_context): New.
738 (load_debug_registers): Delete.
739 (i386_set_thread_context): New.
740 (i386_thread_added): New.
741 (single_step): Rename to ...
742 (i386_single_step): ... this.
743 (do_fetch_inferior_registers): Rename to ...
744 (i386_fetch_inferior_register): ... this.
745 (i386_store_inferior_register): New.
746 (the_low_target): Adapt to new interface.
747
748 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
749 (arm_get_thread_context): New.
750 (arm_set_thread_context): New.
751 (regptr): New.
752 (do_fetch_inferior_registers): Rename to ...
753 (arm_fetch_inferior_register): ... this.
754 (arm_store_inferior_register): New.
755 (arm_wince_breakpoint): Reimplement as unsigned long.
756 (arm_wince_breakpoint_len): Define.
757 (the_low_target): Adapt to new interface.
758
759 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
760 load_debug_registers. Add get_thread_context, set_thread_context,
761 thread_added and store_inferior_register. Rename
762 fetch_inferior_registers to fetch_inferior_register.
763 (regptr): Remove declaration.
764
dd6953e1
PA
7652007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
766
767 * linux-low.c (linux_detach): Change return type to int. Return 0.
768 * spu-low.c (spu_detach): Likewise.
769
444d6139
PA
7702007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
771
772 * target.h (target_ops): Change return type of detach to int.
773 Add join.
774 (join_inferior): New.
775 * server.c (main): Don't skip detach support on mingw32.
776 If the inferior doesn't support detaching return error.
777 Call join_inferior instead of using waitpid.
778 * linux-low.c (linux_join): New.
779 (linux_target_op): Add linux_join.
780 * spu-low.c (spu_join): New.
781 (spu_target_ops): Add spu_join.
782 * win32-low.c (win32_detach): Adapt to new interface.
783 Reopen current_process_handle before detaching. Issue a child
784 resume before detaching.
785 (win32_join): New.
786 (win32_target_op): Add win32_join.
787
1d5315fe
PA
7882007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
789
790 * win32-low.c (win32-attach): Fix return value.
791 * target.h (target_ops): Describe ATTACH return values.
792
bf914831
PA
7932007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
794
795 * win32-low.c (GETPROCADDRESS): Define.
796 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
797 (winapi_DebugSetProcessKillOnExit): Likewise.
798 (win32_create_inferior): Force usage of ansi CreateProcessA.
799 (win32_attach): Use GETPROCADDRESS.
800 (win32_detach): Likewise.
801
f72f3e60
PA
8022007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
803
804 * win32-low.c (win32_wait): Don't use WSTOPSIG.
805
ed50f18f
PA
8062007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
807
808 * win32-low.c: Commit leftover changes from 2007-03-29.
809
0c2ead7e
DJ
8102007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
811
812 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
813 fields short instead of int. Add explicit padding.
814 (i387_cache_to_fsave): Remove unnecessary casts.
815 (i387_fsave_to_cache): Doc fix.
816 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
817
73725ff3
DJ
8182007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
819
820 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
821 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
822
d99f33d8
PA
8232007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
824
825 * configure.srv (arm*-*-mingw32ce*): Move near the other
826 arm targets.
827
68070c10
PA
8282007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
829
2482afc6 830 * configure.ac: Add errno checking.
68070c10
PA
831 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
832 sys/file.h and malloc.h.
833 (AC_CHECK_DECLS): Add perror.
834 (srv_mingwce): Handle.
2482afc6 835 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
836 win32-i386-low.o to srv_tgtobj.
837 (i[34567]86-*-mingw*): Likewise.
838 (arm*-*-mingw32ce*): Add case.
839 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
840 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
841 [__MINGW32CE__] (strerror): New function.
842 [__MINGW32CE__] (errno): Define to GetLastError.
843 [__MINGW32CE__] (COUNTOF): New macro.
844 (remote_open): Remove extra close call.
845 * mem-break.c (delete_breakpoint_at): New function.
846 * mem-break.h (delete_breakpoint_at): Declare.
847 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
848 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
849 [USE_WIN32API] (read, write): Add char* casts.
850 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
851 * server.h: Include wincecompat.h on Windows CE.
852 [HAVE_ERRNO_H]: Check.
853 (perror): Declare if not declared.
854 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
855 (perror_with_name): Remove errno declaration.
856 * wincecompat.h: New.
857 * wincecompat.c: New.
858 * win32-low.h: New.
859 * win32-arm-low.c: New.
860 * win32-i386-low.c: New.
861 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
862 (OUTMSG2): Make it safe.
863 (_T): New macro.
864 (COUNTOF): New macro.
865 (NUM_REGS): Get it from the low target.
866 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
867 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
868 (thread_rec): Let low target handle debug registers.
869 (child_add_thread): Likewise.
870 (child_init_thread_list): Likewise.
871 (continue_one_thread): Likewise.
872 (regptr): New.
873 (do_child_fetch_inferior_registers): Move to ...
874 * win32-i386-low.c: ... here, and rename to ...
875 (do_fetch_inferior_registers): ... this.
876 * win32-low.c (child_fetch_inferior_registers):
877 Go through the low target.
878 (do_child_store_inferior_registers): Use regptr.
879 (strwinerror): New function.
880 (win32_create_inferior): Handle Windows CE.
881 Use strwinerror instead of strerror on Windows error
882 codes. Add program to the error output.
883 Don't close the main thread handle on Windows CE.
884 (win32_attach): Use coredll.dll on Windows CE.
885 (win32_kill): Close current process and current
886 thread handles.
887 (win32_detach): Use coredll.dll on Windows CE.
888 (win32_resume): Let low target handle debug registers, and
889 step request.
890 (handle_exception): Add/Remove initial breakpoint. Avoid
891 non-existant WSTOPSIG on Windows CE.
892 (win32_read_inferior_memory): Cast to remove warning.
893 (win32_arch_string): Go through the low target.
894 (initialize_low): Call set_breakpoint_data with the low
895 target's breakpoint.
896 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
897 FOP_REGNUM, mappings): Move to ...
898 * win32-i386-low.c: ... here.
899 * win32-low.c (win32_thread_info): Move to ...
900 * win32-low.h: ... here.
901 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
902 win32-arm-low.c and wincecompat.c.
903 (all:): Add $EXEEXT.
904 (install-only:): Likewise.
905 (gdbserver:): Likewise.
906 (gdbreplay:): Likewise.
907 * config.in: Regenerate.
908 * configure: Regenerate.
909
41093d81
PA
9102007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
911
912 * win32-low.c: Rename typedef thread_info to
913 win32_thread_info throughout.
914
544afa54
PA
9152007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
916
917 * win32-i386-low.c: Rename to ...
918 * win32-low.c: ... this.
919 * configure.srv: Replace win32-i386-low.o with win32-low.o.
920 * Makefile.in: Likewise.
921
bce7165d
PA
9222007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
923
924 * remote-utils.c (monitor_output): Constify msg parameter.
925 * server.h (monitor_output): Likewise.
926 * win32-i386-low.c (handle_output_debug_string): New.
927 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
928 handle_output_debug_string.
929 (get_child_debug_event): Likewise.
930
506c7aa0
DJ
9312007-03-27 Mat Hostetter <mat@lcs.mit.edu>
932
933 * server.c (main): Correct strtoul check.
934
42c81e2a
DJ
9352007-03-27 Jon Ringle <jon@ringle.org>
936
937 * linux-low.c: Check __ARCH_HAS_MMU__ also.
938
9453113a
DJ
9392007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
940
941 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
942
64a69107
DJ
9432007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
944
945 * terminal.h: Check HAVE_SGTTY_H.
946
9472007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
948
949 * remote-utils.c (remote_open): Print out the assigned port number.
950
c74d0ad8
DJ
9512007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
952
953 * remote-utils.c (monitor_output): New function.
954 * server.c (debug_threads): Define here.
955 (monitor_show_help): New function.
956 (handle_query): Handle qRcmd.
957 (main): Do not handle 'd' packet.
958 * server.h (debug_threads, remote_debug, monitor_output): Declare.
959 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
960 of debug_threads.
961
de7c3b4a
PA
9622007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
963
964 * Makefile.in (EXEEXT): New.
965 (clean): Use $(EXEEXT).
966
ef57601b
PA
9672007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
968
969 * target.h (target_ops): Rename send_signal to request_interrupt,
970 and remove enum target_signal parameter.
971 * linux-low.c (linux_request_interrupt): Rename from
972 linux_send_signal, and always send SIGINT.
973 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
974 and always send SIGINT.
975 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
976 of send_signal.
977 (input_interrupt): Likewise.
978
820f2bda
PA
9792007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
980
981 * server.c (get_features_xml): Check if target implemented
982 arch_string.
983 * win32-i386-low.c (win32_arch_string): New.
984 (win32_target_ops): Add win32_arch_string as arch_string member.
985
ab39bf24
UW
9862007-02-22 Markus Deuling <deuling@de.ibm.com>
987
988 * spu-low.c (spu_arch_string): New.
989 (spu_target_ops): Add spu_arch_string.
990
61ff6e04
DJ
9912007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
992
993 * remote-utils.c: Remove HAVE_TERMINAL_H check.
994 * configure.ac: Do not check for terminal.h.
995 * configure, config.in: Regenerated.
996
fb1e4ffc
DJ
9972007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
998
999 * Makefile.in (OBS): Add $(XML_BUILTIN).
1000 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
1001 (clean): Update.
1002 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
1003 (arm-with-iwmmxt.c): New.
1004 * config.in, configure: Regenerate.
1005 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
1006 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
1007 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
1008 (arm*-*-linux*): Add iWMMXt and regset support.
1009 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
1010 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
1011 (arm_store_wmmxregset, target_regsets): New.
1012 * server.c (get_features_xml): Take annex argument. Check builtin
1013 XML documents.
1014 (handle_query): Handle multiple annexes.
1015
0f48aa01
DJ
10162007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
1017
1018 * remote-utils.c [USE_WIN32API] (read, write): Define.
1019 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
1020 write.
1021
23181151
DJ
10222007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
1023
1024 * linux-i386-low.c (the_low_target): Set arch_string.
1025 * linux-x86-64-low.c (the_low_target): Likewise.
1026 * linux-low.c (linux_arch_string): New.
1027 (linux_target_ops): Add it.
1028 * linux-low.h (struct linux_target_ops): Add arch_string.
1029 * server.c (write_qxfer_response): Use const void * for DATA.
1030 (get_features_xml): New.
1031 (handle_query): Handle qXfer:features:read. Report it for qSupported.
1032 * target.h (struct target_ops): Add arch_string method.
1033
9d606399
DJ
10342007-01-03 Denis Pilat <denis.pilat@st.com>
1035 Daniel Jacobowitz <dan@codesourcery.com>
1036
1037 * linux-low.c (linux_kill): Handle being called with no threads.
1038 * win32-i386-low.c (win32_kill): Likewise.
1039 (get_child_debug_event): Clear current_process_handle.
1040
10412006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
1042 Daniel Jacobowitz <dan@codesourcery.com>
1043
1044 * remote-utils.c (remote_open): Check the type of specified
1045 serial port devices before opening them.
1046 * server.c (main): Kill the inferior if an error occurs during
1047 the first remote_open.
1048
a5e13d24
DJ
10492006-12-05 Markus Deuling <deuling@de.ibm.com>
1050
1051 * README: Update supported targets.
1052
186947f7
DJ
10532006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
1054
1055 * Makefile.in (clean): Remove reg-mips64.c.
1056 (reg-mips64.c, reg-mips64.o): New rules.
1057 * configure.srv: Handle mips64. Include regset support for mips.
1058 * linux-mips-low.c (union mips_register): New.
1059 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
1060 (mips_breakpoint, mips_breakpoint_at): Use int.
1061 (mips_collect_register, mips_supply_register)
1062 (mips_collect_register_32bit, mips_supply_register_32bit)
1063 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
1064 (mips_store_fpregset, target_regsets): New.
1065 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
1066
a13e2c95
UW
10672006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
1068
1069 * configure.srv: Add target "spu*-*-*".
1070 * Makefile.in (clean): Remove reg-spu.c.
1071 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
1072 * spu-low.c: New file.
1073
cb7283db
DJ
10742006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
1075
1076 * configure.ac: Correct td_thr_tls_get_addr test.
1077 * configure: Regenerated.
1078
89be2091
DJ
10792006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
1080
1081 * linux-low.c (linux_wait_for_event): Reformat. Use the
1082 pass_signals array.
1083 * remote-utils.c (decode_address_to_semicolon): New.
1084 * server.c (pass_signals, handle_general_set): New.
1085 (handle_query): Mention QPassSignals for qSupported.
1086 (main): Call handle_general_set.
1087 * server.h (pass_signals, decode_address_to_semicolon): New.
1088
000ef4f0
DJ
10892006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
1090
1091 * server.c (handle_query): Correct error handling for read_auxv.
1092
b7149293
UW
10932005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
1094
1095 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
1096 and srv_linux_thread_db to yes.
1097 * linux-s390-low.c (s390_fill_gregset): New function.
1098 (target_regsets): Define data structure.
1099
dae5f5cf
DJ
11002006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
1101
1102 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
1103 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
1104 * config.in, configure: Regenerated.
1105 * inferiors.c (gdb_id_to_thread): New function.
1106 (gdb_id_to_thread_id): Use it.
1107 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
1108 * linux-low.h (struct process_info): Add th member.
1109 (thread_db_get_tls_address): New prototype.
1110 * remote-utils.c (decode_address): Make non-static.
1111 * server.c (handle_query): Handle qGetTLSAddr.
1112 * server.h (gdb_id_to_thread, decode_address): New prototypes.
1113 * target.h (struct target_ops): Add get_tls_address.
1114 * thread-db.c (maybe_attach_thread): Save the thread handle.
1115 (thread_db_get_tls_address): New.
1116
32ca6d61
DJ
11172006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
1118
1119 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
1120 (linux_resume_one_process): Take a siginfo_t *. Update all
1121 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
1122 (struct pending_signals): Add a siginfo_t.
1123 (linux_wait_for_process): Always set last_status.
1124 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
1125 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
1126 * linux-low.h (struct process_info): Add last_status.
1127
5ffff7c1
DJ
11282006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
1129
1130 * remote-utils.c (try_rle): New function.
1131 (putpkt_binary): Use it.
1132
8695c747
DJ
11332006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
1134
1135 * Makefile.in (clean): Clean reg-x86-64-linux.c.
1136 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
1137 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
1138 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
1139 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
1140 point registers.
1141
290fadea
RS
11422006-08-08 Richard Sandiford <richard@codesourcery.com>
1143
1144 * server.c (terminal_fd): New variable.
1145 (old_foreground_pgrp): Likewise.
1146 (restore_old_foreground_pgrp): New function.
1147 (start_inferior): Record the terminal file descriptor in terminal_fd
1148 and its original foreground group in old_foreground_pgrp. Register
1149 restore_old_foreground_pgrp with atexit().
1150
9f2e1e63
DJ
11512006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
1152
1153 * server.c (handle_query): Correct qPart to qXfer.
1154
b80864fb
DJ
11552006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
1156
1157 * configure.ac: Check for more headers which are missing on
1158 Windows. Automatically supply -lwsock32 and USE_WIN32API.
1159 * configure.srv: Add Cygwin and mingw32.
1160 * remote-utils.c: Don't include headers unconditionally which
1161 are missing on mingw32. Include <winsock.h> for mingw32.
1162 (remote_open): Adjust for mingw32 support. Flush
1163 standard error after writing to it.
1164 (remote_close, putpkt_binary, input_interrupt, block_async_io)
1165 (unblock_async_io, enable_async_io, disable_async_io)
1166 (readchar, getpkt): Update for Winsock support.
1167 (prepare_resume_reply): Expect a protocol signal number.
1168 * server.c: Disable <sys/wait.h> on mingw32.
1169 (start_inferior): Adjust for mingw32 support. Flush
1170 standard error after writing to it.
1171 (attach_inferior): Likewise. Use protocol signal
1172 numbers.
1173 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
1174 and names.
1175 * win32-i386-low.c: New file.
1176 * Makefile.in (XM_CLIBS): Set.
1177 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
1178 (win32-i386-low.o): New dependency rule.
1179 * linux-low.c (linux_wait): Use target signal numbers.
1180 * target.h (struct target_ops): Doc fix.
1181 * server.h (target_signal_to_name): New prototype.
1182 * gdbreplay.c: Don't include headers unconditionally which
1183 are missing on mingw32. Include <winsock.h> for mingw32.
1184 (remote_close, remote_open): Adjust for Winsock support.
1185 * configure, config.in: Regenerated.
1186
0876f84a
DJ
11872006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
1188
1189 * server.c (decode_xfer_read, write_qxfer_response): New.
1190 (handle_query): Take a packet length argument. Handle
1191 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
1192 the qSupported response.
1193 (main): Update call to handle_query.
1194
01f9e8fa
DJ
11952006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
1196
1197 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
1198 (putpkt_binary): Renamed from putpkt and adjusted for binary
1199 data.
1200 (putpkt): New wrapper for putpkt_binary.
1201 (readchar): Don't mask off the high bit.
1202 (decode_X_packet): New function.
1203 * server.c (main): Call putpkt_binary if a handler sets the packet
1204 length. Save the length of the incoming packet. Handle 'X'.
1205 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
1206
be2a5f71
DJ
12072006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
1208
1209 * server.c (handle_query): Handle qSupported.
1210
ea025f5f
DJ
12112006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
1212
1213 * remote-utils.c (all_symbols_looked_up): New variable.
1214 (look_up_one_symbol): Check it.
1215 * server.h (look_up_one_symbol): New declaration.
1216 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
1217
9308fc88
DJ
12182006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
1219
1220 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 1221 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
1222 (PTRACE_GET_THREAD_AREA): Define.
1223 (ps_get_thread_area): New function.
1224
52fb6437
NS
12252006-05-09 Nathan Sidwell <nathan@codesourcery.com>
1226
1227 * configure.srv (m68k*-*-uclinux*): New target.
1228 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
1229 (linux_resume_one_process): Remove extraneous cast.
1230 (linux_read_offsets): New.
1231 (linux_target_op): Add linux_read_offsets on mmuless systems.
1232 * server.c (handle_query): Add qOffsets logic.
1233 * target.h (struct target_ops): Add read_offsets.
1234
21b0f40c
DJ
12352006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
1236
1237 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
1238 (PTRACE_GET_THREAD_AREA): Define.
1239 (ps_get_thread_area): New function.
1240 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
1241 (linux-x86-64-low.o): Update.
1242
0050a760
DJ
12432006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
1244
1245 * configure.ac: Remove checks for prfpregset_t.
1246 * gdb_proc_service.h: New file.
1247 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
1248 new "gdb_proc_service.h".
1249 * proc-service.c: Likewise.
1250 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
1251 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
1252 * Makefile.in (gdb_proc_service_h): Updated.
1253 * configure, config.in: Regenerated.
1254
b92a518e
DJ
12552006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
1256
1257 * remote-utils.c (prepare_resume_reply): Move declaration
1258 of gdb_id_from_wait to the top of the block.
1259
545587ee
DJ
12602006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
1261
1262 * linux-low.c (regsets_store_inferior_registers): Read the regset
1263 from the target before filling it.
1264
9db87ebd
DJ
12652006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
1266
1267 * server.c (attach_inferior): Return SIGTRAP for a successful
1268 attach.
1269
dd24457d
DJ
12702006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
1271
1272 * Makefile.in (OBS): Add version.o.
1273 (STAGESTUFF): Delete.
1274 (version.o): Add dependencies.
1275 (version.c): Replace rule.
1276 (clean): Remove version.c.
1277 * server.c (gdbserver_version): New.
1278 (gdbserver_usage): Use printf.
1279 (main): Handle --version and --help.
1280 * server.h (version, host_name): Add declarations.
1281
6f0f660e
EZ
12822005-12-23 Eli Zaretskii <eliz@gnu.org>
1283
1284 * linux-arm-low.c:
1285 * linux-arm-low.c:
1286 * inferiors.c:
1287 * i387-fp.h:
1288 * i387-fp.c:
1289 * gdbreplay.c:
1290 * regcache.c:
1291 * proc-service.c:
1292 * mem-break.h:
1293 * mem-break.c:
1294 * linux-x86-64-low.c:
1295 * linux-sh-low.c:
1296 * linux-s390-low.c:
1297 * linux-ppc64-low.c:
1298 * linux-ppc-low.c:
1299 * linux-mips-low.c:
1300 * linux-m68k-low.c:
1301 * linux-m32r-low.c:
1302 * linux-low.h:
1303 * linux-low.c:
1304 * linux-ia64-low.c:
1305 * linux-i386-low.c:
1306 * linux-crisv32-low.c:
1307 * thread-db.c:
1308 * terminal.h:
1309 * target.h:
1310 * target.c:
1311 * server.h:
1312 * server.c:
1313 * remote-utils.c:
1314 * regcache.h:
1315 * utils.c:
1316 * Makefile.in:
1317 * configure.ac:
1318 * gdbserver.1: Add (C) after Copyright. Update the FSF
1319 address.
1320
9d1fb177
DJ
13212005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
1322
1323 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
1324 (arm_breakpoint_at): Recognize both breakpoints.
1325 (the_low_target): Use the correct breakpoint instruction.
1326
011a70c2
DJ
13272005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
1328
1329 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
1330 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
1331 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
1332 (the_low_target): Update.
1333
7fb85e41
AS
13342005-10-25 Andreas Schwab <schwab@suse.de>
1335
1336 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
1337
1338 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
1339 (ia64_num_regs): Reduce to 462.
1340
3db0444b
DJ
13412005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
1342
1343 * acinclude.m4: Correct quoting.
1344 * aclocal.m4: Regenerated.
1345
1346 Suggested by SZOKOVACS Robert <szo@ies.hu>:
1347 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
1348 (thread_db_init): Call thread_db_err_str.
1349 * configure.ac: Check for TD_VERSION.
1350 * config.in, configure: Regenerated.
1351
bee0189a
DJ
13522005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1353
1354 * server.h (error, fatal, warning): Add ATTR_FORMAT.
1355
e9d25b98
DJ
13562005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
1357
1358 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
1359 is not available. Define HAVE_PTRACE_GETREGS if it is.
1360 * config.in, configure: Regenerated.
1361 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
1362 * linux-i386-low.c, linux-m68k-low.c: Update to use
1363 HAVE_PTRACE_GETREGS.
1364 * linux-low.c (regsets_fetch_inferior_registers)
1365 (regsets_store_inferior_registers): Only return 0 if we processed
1366 GENERAL_REGS.
1367 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
1368 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
1369
a06660f7
DJ
13702005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
1371
1372 * inferiors.c (struct thread_info): Add gdb_id.
1373 (add_thread): Add gdb_id argument.
1374 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
1375 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
1376 calls to add_thread.
1377 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
1378 * server.c (handle_query): Use thread_to_gdb_id.
1379 (handle_v_cont, main): Use gdb_id_to_thread_id.
1380 * server.h (add_thread): Update prototype.
1381 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
1382 prototypes.
1383
5a1f5858
DJ
13842005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
1385
1386 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
1387 left-padded registers.
1388 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
1389 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
1390
e122f1f5
SE
13912005-07-01 Steve Ellcey <sje@cup.hp.com>
1392
1393 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
1394 * configure: Regenerate.
1395 * config.in: Regenerate.
1396 * server.h (NEED_DECLARATION_STRERROR):
1397 Replace with !HAVE_DECL_STRERROR.
1398
d592fa2f
DJ
13992005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
1400
1401 * linux-low.c (linux_wait, linux_send_signal): Don't test
1402 an unsigned long variable for > 0 if it could be MAX_ULONG.
1403 * server.c (myresume): Likewise.
1404 * target.c (set_desired_inferior): Likewise.
1405
ccbd4912
MK
14062005-06-13 Mark Kettenis <kettenis@gnu.org>
1407
1408 * configure.ac: Simplify and improve check for socklen_t.
1409 * configure, config.in: Regenerate.
1410
f450004a
DJ
14112005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
1412
1413 * acconfig.h: Remove.
1414 * configure.ac: Add a test for socklen_t. Use three-argument
1415 AC_DEFINE throughout.
1416 * config.in: Regenerated using autoheader 2.59.
1417 * configure: Regenerated.
1418
1419 * gdbreplay.c (socklen_t): Provide a default.
1420 (remote_open): Use socklen_t.
1421 * remote-utils.c (socklen_t): Provide a default.
1422 (remote_open): Use socklen_t.
1423 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
1424 unsigned char.
1425
1426 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
1427 char for buffers.
1428 * linux-low.c (linux_read_memory, linux_write_memory)
1429 (linux_read_auxv): Likewise.
1430 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
1431 (check_mem_write): Likewise.
1432 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
1433 Likewise.
1434 * regcache.c (struct inferior_rgcache_data, registers_to_string)
1435 (registers_from_string, register_data): Likewise.
1436 * server.c (handle_query, main): Likewise.
1437 * server.h (convert_ascii_to_int, convert_int_to_ascii)
1438 (decode_M_packet): Likewise.
1439 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
1440 * target.h (struct target_ops): Update read_memory, write_memory,
1441 and read_auxv.
1442 (read_inferior_memory, write_inferior_memory): Update.
1443 * linux-low.h (struct linux_target_ops): Change type of breakpoint
1444 to unsigned char *.
1445 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
1446 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
1447 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
1448 linux-s390-low.c, linux-sh-low.c: Update for changes in
1449 read_inferior_memory and the_low_target->breakpoint.
1450
eee84df1
DJ
14512005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
1452
1453 * Makefile.in (SFILES): Add linux-ppc64-low.c.
1454 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
1455 * configure.srv: Add powerpc64-*-linux*.
1456 * linux-ppc64-low.c: New file.
1457
45b134e5
OF
14582005-05-23 Orjan Friberg <orjanf@axis.com>
1459
1460 * linux-cris-low.c: New file with support for CRIS.
1461 * linux-crisv32-low.c: Ditto for CRISv32.
1462 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
1463 (clean): Add reg-cris.c and reg-crisv32.c.
1464 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
1465 reg-crisv32.o, and reg-crisv32.c to make rules.
1466 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
1467 recognized targets.
1468
48d93c75
UW
14692005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
1470
1471 * linux-low.c (fetch_register): Ensure buffer size is a multiple
1472 of sizeof (PTRACE_XFER_TYPE).
1473 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
1474
e013ee27
OF
14752005-05-12 Orjan Friberg <orjanf@axis.com>
1476
1477 * target.h (struct target_ops): Add insert_watchpoint,
1478 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
1479 pointers for hardware watchpoint support.
1480 * linux-low.h (struct linux_target_ops): Ditto.
1481 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
1482 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
1483 to linux_target_ops.
1484 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
1485 reply packet.
1486 * server.c (main): Recognize 'Z' and 'z' packets.
1487
b0ded00b
UW
14882005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
1489
1490 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
1491 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
1492 (the_low_target): Add new members.
1493
8643e2ad
DJ
14942005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
1495
1496 * proc-service.c (ps_lgetregs): Search all_processes instead of
1497 all_threads.
1498
fc620387
DJ
14992005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
1500
1501 * server.c (start_inferior): Change return type to int.
1502 (attach_inferior): Change sigptr to int *.
1503 (handle_v_cont, handle_v_requests): Change signal to int *.
1504 (main): Change signal to int.
1505
15062005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
1507
1508 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
1509 * configure.srv: Add m32r*-*-linux*.
1510 * linux-m32r-low.c: New file.
1511
e0e76420
DJ
15122005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
1513
1514 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
1515
a1928bad
DJ
15162005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
1517
1518 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
1519 Take unsigned long arguments for PIDs.
1520 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
1521 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
1522 (wait_for_sigstop, linux_resume_one_process)
1523 (regsets_fetch_inferior_registers, linux_send_signal)
1524 (linux_read_auxv): Likewise. Update the types of variables holding
1525 PIDs. Update format string specifiers.
1526 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
1527 * remote-utils.c (prepare_resume_reply): Likewise.
1528 * server.c (cont_thread, general_thread, step_thread)
1529 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
1530 unsigned long.
1531 (handle_query): Update format specifiers.
1532 (handle_v_cont, main): Use strtoul for thread IDs.
1533 * server.h (struct inferior_list_entry): Use unsigned long for ID.
1534 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
1535 (general_thread, step_thread, thread_from_wait)
1536 (old_thread_from_wait): Update.
1537 * target.h (struct thread_resume): Use unsigned long for THREAD.
1538 (struct target_ops): Use unsigned long for arguments to attach and
1539 thread_alive.
1540
dcdb98d2
DJ
15412005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
1542
1543 * acinclude.m4: Include bfd/bfd.m4 directly.
1544 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
1545 <agriffis@toolchain.org>.
1546 * aclocal.m4, configure: Regenerated.
1547
bec39cab
AC
15482005-01-07 Andrew Cagney <cagney@gnu.org>
1549
1550 * configure.ac: Rename configure.in, require autoconf 2.59.
1551 * configure: Re-generate.
1552
434c4c77
DJ
15532004-12-08 Daniel Jacobowitz <dan@debian.org>
1554
1555 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
1556 LIBS when finished.
1557 * aclocal.m4: Regenerated.
1558 * configure: Regenerated.
1559
db1d3e1b
AS
15602004-11-21 Andreas Schwab <schwab@suse.de>
1561
1562 * linux-m68k-low.c (m68k_num_gregs): Define.
1563 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
1564 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
1565 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
1566 (m68k_breakpoint_at): New. Add to the_low_target.
1567
1568 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
1569 srv_linux_thread_db to yes.
1570
43360365
JB
15712004-10-20 Joel Brobecker <brobecker@gnat.com>
1572
1573 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
1574 (ARCH_SET_FS): Likewise.
1575 (ARCH_GET_FS): Likewise.
1576 (ARCH_GET_GS): Likewise.
1577
fd500816
DJ
15782004-10-16 Daniel Jacobowitz <dan@debian.org>
1579
1580 * linux-i386-low.c (ps_get_thread_area): New.
1581 * linux-x86-64-low.c (ps_get_thread_area): New.
1582 * linux-low.c: Include <sys/syscall.h>.
1583 (linux_kill_one_process): Don't kill the first thread here.
1584 (linux_kill): Kill the first thread here.
1585 (kill_lwp): New function.
1586 (send_sigstop, linux_send_signal): Use it.
1587 * proc-service.c: Clean up #ifdefs.
1588 (fpregset_info): Delete.
1589 (ps_lgetregs): Update and enable implementation.
1590 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
1591 implementations.
1592 * remote-utils.c (struct sym_cache, symbol_cache): New.
1593 (input_interrupt): Print a clearer message.
1594 (async_io_enabled): New variable.
1595 (enable_async_io, disable_async_io): Use it. Update comments.
1596 (look_up_one_symbol): Use the symbol cache.
1597 * thread-db.c (thread_db_look_up_symbols): New function.
1598 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
1599
f6de3c42
DJ
16002004-10-16 Daniel Jacobowitz <dan@debian.org>
1601
1602 * configure.in: Test for -rdynamic.
1603 * configure: Regenerated.
1604 * Makefile (INTERNAL_LDFLAGS): New.
1605 (gdbserver, gdbreplay): Use it.
1606
2c0fc042
AC
16072004-09-02 Andrew Cagney <cagney@gnu.org>
1608
1609 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
1610
075b3282
DJ
16112004-03-23 Daniel Jacobowitz <drow@mvista.com>
1612
1613 * linux-low.c (linux_wait): Clear all_processes list also.
1614
fa6a77dc
DJ
16152004-03-12 Daniel Jacobowitz <drow@mvista.com>
1616
1617 * linux-low.c: Include <errno.h>. Remove extern declaration of
1618 errno.
1619
6d782a97
DJ
16202004-03-12 Daniel Jacobowitz <drow@mvista.com>
1621
1622 * gdbreplay.c, server.h, utils.c: Update copyright years.
1623
3a7fb99b
DJ
16242004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
1625
1626 * server.c (main): Print child status or termination signal from
1627 variable 'signal', not 'sig'.
1628
c3e735a6
DJ
16292004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
1630
1631 * linux-low.c (linux_read_memory): Change return type to
1632 int. Check for and return error from ptrace().
1633 * target.c (read_inferior_memory): Change return type to int. Pass
1634 back return status from the_target->read_memory().
1635 * target.h (struct target_ops): Adapt *read_memory() prototype.
1636 Update comment.
1637 (read_inferior_memory): Adapt prototype.
1638 * server.c (main): Return an error packet if
1639 read_inferior_memory() returns an error.
1640
a59d1c82
DJ
16412004-03-04 Daniel Jacobowitz <drow@mvista.com>
1642
1643 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
1644 Unify with other clean targets.
1645
dc3f8883
DJ
16462004-02-29 Daniel Jacobowitz <drow@mvista.com>
1647
1648 * server.c (handle_v_cont): Call set_desired_inferior.
1649
89a208da
DJ
16502004-02-29 Daniel Jacobowitz <drow@mvista.com>
1651
1652 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
1653
62ea82f5
DJ
16542004-02-29 Daniel Jacobowitz <drow@mvista.com>
1655
1656 * linux-low.c (linux_wait): Unblock async I/O.
1657 (linux_resume): Block and enable async I/O.
1658 * remote-utils.c (block_async_io, unblock_async_io): New functions.
1659 * server.h (block_async_io, unblock_async_io): Add prototypes.
1660
6910d122
DJ
16612004-02-29 Daniel Jacobowitz <drow@mvista.com>
1662
1663 * remote-utils.c (remote_open): Print a status notice after
1664 opening a TCP port.
1665 * server.c (attach_inferior): Print a status notice after
1666 attaching.
1667
16682004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
1669
1670 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
1671
c89dc5d4
DJ
16722004-02-26 Daniel Jacobowitz <drow@mvista.com>
1673
1674 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
1675 error packet.
1676 * server.c, target.h: Update copyright years.
1677
4b8dad4a
RM
16782004-02-25 Roland McGrath <roland@redhat.com>
1679
1680 * target.h (struct target_ops): New member `read_auxv'.
1681 * server.c (handle_query): Handle qPart:auxv:read: query using that.
1682 * linux-low.c (linux_read_auxv): New function.
1683 (linux_target_ops): Initialize `read_auxv' member to that.
1684
d7446758
JB
16852004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1686
1687 Committed by Jim Blandy <jimb@redhat.com>.
1688
1689 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 1690 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
1691 instead of GPR_SIZE to distiguish s390 and s390x targets.
1692
5544ad89
DJ
16932004-01-31 Daniel Jacobowitz <drow@mvista.com>
1694
1695 * linux-low.c: Update copyright year.
1696 (check_removed_breakpoint): Clear pending_is_breakpoint.
1697 (linux_set_resume_request, linux_queue_one_thread)
1698 (resume_status_pending_p): New functions.
1699 (linux_continue_one_thread): Use process->resume.
1700 (linux_resume): Only resume threads if there are no pending events.
1701 * linux-low.h (struct process_info): Add resume request
1702 pointer.
1703
2a68b70e
DJ
17042004-01-30 Daniel Jacobowitz <drow@mvista.com>
1705
1706 * regcache.c (new_register_cache): Clear the allocated register
1707 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
1708
64386c31
DJ
17092003-10-13 Daniel Jacobowitz <drow@mvista.com>
1710
1711 * linux-low.c (linux_resume): Take a struct thread_resume *
1712 argument.
1713 (linux_wait): Update call.
1714 (resume_ptr): New static variable.
1715 (linux_continue_one_thread): Renamed from
1716 linux_continue_one_process. Use resume_ptr.
1717 (linux_resume): Use linux_continue_one_thread.
1718 * server.c (handle_v_cont, handle_v_requests): New functions.
1719 (myresume): New function.
1720 (main): Handle 'v' case.
1721 * target.h (struct thread_resume): New type.
1722 (struct target_ops): Change argument of "resume" to struct
1723 thread_resume *.
1724 (myresume): Delete macro.
1725
c938e9b0
L
17262003-08-08 H.J. Lu <hongjiu.lu@intel.com>
1727
1728 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
1729 (uninstall): Support DESTDIR.
1730
7f313d07
BC
1731Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
1732
1733 * configure.srv: Add xscale*linux copy of arm*linux entry.
1734
3b2fc2ea
DJ
17352003-07-24 Daniel Jacobowitz <drow@mvista.com>
1736
1737 * linux-arm-low.c (arm_reinsert_addr): New function.
1738 (the_low_target): Add arm_reinsert_addr.
1739
1c0a559e
MK
17402003-07-08 Mark Kettenis <kettenis@gnu.org>
1741
1742 * mem-break.c: Remove whitespace at end of file.
1743
43d5792c
DJ
17442003-06-28 Daniel Jacobowitz <drow@mvista.com>
1745
1746 * configure.in: Check whether we need to prototype strerror.
1747 * server.h: Optionally prototype strerror.
1748 * gdbreplay.c (perror_with_name): Use strerror.
1749 * linux-low.c (linux_attach_lwp): Use strerror.
1750 * utils.c (perror_with_name): Use strerror.
1751 * config.in, configure: Regenerated.
1752
c8a86edf
DJ
17532003-06-28 Daniel Jacobowitz <drow@mvista.com>
1754
1755 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
1756 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
1757
73d37363
DJ
17582003-06-20 Daniel Jacobowitz <drow@mvista.com>
1759
1760 * Makefile.in (SFILES): Update.
1761 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
1762 low-sun3.c: Remove files.
1763
6ad8ae5c
DJ
17642003-06-17 Daniel Jacobowitz <drow@mvista.com>
1765
1766 * linux-low.c: Move comment to linux_thread_alive where it belonged.
1767 (linux_detach_one_process, linux_detach): New functions.
1768 (linux_target_ops): Add linux_detach.
1769 * server.c (main): Handle 'D' packet.
1770 * target.h (struct target_ops): Add "detach" member.
1771 (detach_inferior): Define.
1772
1581182a
MK
17732003-06-13 Mark Kettenis <kettenis@gnu.org>
1774
1775 From Kelley Cook <kelleycook@wideopenwest.com>:
1776 * configure.srv: Accept i[34567]86 variants.
1777
e5379b03
DJ
17782003-06-05 Daniel Jacobowitz <drow@mvista.com>
1779
1780 * linux-low.c (linux_wait_for_event): Correct comment typos.
1781 (linux_resume_one_process): Call check_removed_breakpoint.
1782 (linux_send_signal): New function.
1783 (linux_target_ops): Add linux_send_signal.
1784 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
1785 of kill.
1786 * target.h (struct target_ops): Add send_signal.
1787
2ff29de4
JB
17882003-05-29 Jim Blandy <jimb@redhat.com>
1789
1790 * linux-low.c (usr_store_inferior_registers): Transfer buf in
1791 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
1792 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
1793 away part of the register's value.
1794
254787d4
DJ
17952003-03-26 Daniel Jacobowitz <drow@mvista.com>
1796
1797 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
1798 (linux_wait_for_event, linux_init_signals): Likewise.
1799
94e10508
DJ
18002003-03-17 Daniel Jacobowitz <drow@mvista.com>
1801
1802 * configure.in: Check for stdlib.h.
1803 * configure: Regenerated.
1804 * config.in: Regenerated.
1805
4c0711e0
DJ
18062003-01-04 Andreas Schwab <schwab@suse.de>
1807
1808 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
1809
ef66e766
AC
18102003-01-02 Andrew Cagney <ac131313@redhat.com>
1811
1812 * Makefile.in: Remove obsolete code.
1813
a1358604
DJ
18142002-11-20 Daniel Jacobowitz <drow@mvista.com>
1815
1816 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
1817 defined(PT_FPR0_HI).
1818
23ce3b1c
DJ
18192002-11-17 Stuart Hughes <seh@zee2.com>
1820
1821 * linux-arm-low.c (arm_num_regs): Increase.
1822 (arm_regmap): Include status register.
1823
18242002-11-17 Daniel Jacobowitz <drow@mvista.com>
1825
1826 * linux-low.c (register_addr): Remove incorrect -1 check.
1827
a9fa9f7d
DJ
18282002-08-29 Daniel Jacobowitz <drow@mvista.com>
1829
1830 * linux-low.c (linux_create_inferior): Call setpgid. Return
1831 the new PID.
1832 (unstopped_p, linux_signal_pid): Remove.
1833 (linux_target_ops): Remove linux_signal_pid.
1834 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
1835 global instead of target method.
1836 * target.h (struct target_ops): Remove signal_pid. Update comment
1837 for create_inferior.
1838 * server.c (signal_pid): New variable.
1839 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 1840 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
1841 (attach_inferior): Set signal_pid.
1842
17574093
DJ
18432002-08-23 Daniel Jacobowitz <drow@mvista.com>
1844
1845 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
1846
18472002-08-20 Jim Blandy <jimb@redhat.com>
1848
1849 * Makefile.in (LDFLAGS): Allow the configure script to establish a
1850 default for this.
1851
18522002-08-01 Andrew Cagney <cagney@redhat.com>
1853
1854 * Makefile.in: Make chill references obsolete.
1855
18562002-07-24 Kevin Buettner <kevinb@redhat.com>
1857
1858 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
1859 * configure: Regenerate.
1860 * config.in: Regenerate.
1861
18622002-07-09 David O'Brien <obrien@FreeBSD.org>
1863
1864 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
1865 (perror_with_name, remote_close, remote_open, expect, play): Static.
1866
18672002-07-04 Michal Ludvig <mludvig@suse.cz>
1868
4b8dad4a 1869 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
1870 byte offsets instead of an array of indexes.
1871 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
1872
18732002-06-13 Daniel Jacobowitz <drow@mvista.com>
1874
1875 * regcache.c: Add comment.
1876
18772002-06-11 Daniel Jacobowitz <drow@mvista.com>
1878
1879 * thread-db.c: New file.
1880 * proc-service.c: New file.
1881 * acinclude.m4: New file.
1882 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
1883 proc-service.o, and thread-db.o.
1884 (linux-low.o): Add USE_THREAD_DB.
1885 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
1886 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
1887 * aclocal.m4: Regenerated.
1888 * config.in: Regenerated.
1889 * configure: Regenerated.
1890 * configure.in: Check for proc_service.h, sys/procfs.h,
1891 thread_db.h, and linux/elf.h headrs.
1892 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
1893 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
1894 Check for -lthread_db and thread support.
1895 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
1896 PowerPC, and SuperH.
1897 * i387-fp.c: Constify arguments.
1898 * i387-fp.h: Likewise.
1899 * inferiors.c: (struct thread_info): Renamed from
1900 `struct inferior_info'. Remove PID member. Use generic inferior
1901 list header. All uses updated.
1902 (inferiors, signal_pid): Removed.
1903 (all_threads): New variable.
1904 (get_thread): Define.
1905 (add_inferior_to_list): New function.
1906 (for_each_inferior): New function.
1907 (change_inferior_id): New function.
1908 (add_inferior): Removed.
1909 (remove_inferior): New function.
1910 (add_thread): New function.
1911 (free_one_thread): New function.
1912 (remove_thread): New function.
1913 (clear_inferiors): Use for_each_inferior and free_one_thread.
1914 (find_inferior): New function.
1915 (find_inferior_id): New function.
1916 (inferior_target_data): Update argument type.
1917 (set_inferior_target_data): Likewise.
1918 (inferior_regcache_data): Likewise.
1919 (set_inferior_regcache_data): Likewise.
1920 * linux-low.c (linux_bp_reinsert): Remove.
1921 (all_processes, stopping_threads, using_thrads)
1922 (struct pending_signals, debug_threads, pid_of): New.
1923 (inferior_pid): Replace with macro.
1924 (struct inferior_linux_data): Remove.
1925 (get_stop_pc, add_process): New functions.
1926 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
1927 Use add_process and add_thread.
1928 (linux_attach_lwp): New function, based on old linux_attach. Use
1929 add_process and add_thread. Set stop_expected for new threads.
1930 (linux_attach): New function.
1931 (linux_kill_one_process): New function.
1932 (linux_kill): Kill all LWPs.
1933 (linux_thread_alive): Use find_inferior_id.
1934 (check_removed_breakpoints, status_pending_p): New functions.
1935 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
1936 Update. Use WNOHANG. Wait for cloned processes also. Update process
1937 struct for the found process.
1938 (linux_wait_for_event): New function.
1939 (linux_wait): Use it. Support LWPs.
1940 (send_sigstop, wait_for_sigstop, stop_all_processes)
1941 (linux_resume_one_process, linux_continue_one_process): New functions.
1942 (linux_resume): Support LWPs.
1943 (REGISTER_RAW_SIZE): Remove.
1944 (fetch_register): Use register_size instead. Call supply_register.
1945 (usr_store_inferior_registers): Likewise. Call collect_register.
1946 Fix recursive case.
1947 (regsets_fetch_inferior_registers): Improve error message.
1948 (regsets_store_inferior_registers): Add debugging.
1949 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
1950 (unstopped_p, linux_signal_pid): New functions.
1951 (linux_target_ops): Add linux_signal_pid.
1952 (linux_init_signals): New function.
1953 (initialize_low): Call it. Initialize using_threads.
1954 * regcache.c (inferior_regcache_data): Add valid
1955 flag.
1956 (get_regcache): Fetch registers lazily. Add fetch argument
1957 and update all callers.
1958 (regcache_invalidate_one, regcache_invalidate): New
1959 functions.
1960 (new_register_cache): Renamed from create_register_cache.
1961 Return the new regcache.
1962 (free_register_cache): Change argument to a void *.
1963 (registers_to_string, registers_from_string): Call get_regcache
1964 with fetch flag set.
1965 (register_data): Make static. Pass fetch flag to get_regcache.
1966 (supply_register): Call get_regcache with fetch flag clear.
1967 (collect_register): Call get_regcache with fetch flag set.
1968 (collect_register_as_string): New function.
1969 * regcache.h: Update.
1970 * remote-utils.c (putpkt): Flush after debug output and use
1971 stderr.
1972 Handle input interrupts while waiting for an ACK.
1973 (input_interrupt): Use signal_pid method.
1974 (getpkt): Flush after debug output and use stderr.
1975 (outreg): Use collect_register_as_string.
1976 (new_thread_notify, dead_thread_notify): New functions.
1977 (prepare_resume_reply): Check using_threads. Set thread_from_wait
1978 and general_thread.
1979 (look_up_one_symbol): Flush after debug output.
1980 * server.c (step_thread, server_waiting): New variables.
1981 (start_inferior): Don't use signal_pid. Update call to mywait.
1982 (attach_inferior): Update call to mywait.
1983 (handle_query): Handle qfThreadInfo and qsThreadInfo.
1984 (main): Don't fetch/store registers explicitly. Use
1985 set_desired_inferior. Support proposed ``Hs'' packet. Update
1986 calls to mywait.
1987 * server.h: Update.
1988 (struct inferior_list, struct_inferior_list_entry): New.
1989 * target.c (set_desired_inferior): New.
1990 (write_inferior_memory): Constify.
1991 (mywait): New function.
1992 * target.h: Update.
1993 (struct target_ops): New signal_pid method.
1994 (mywait): Removed macro, added prototype.
1995
1996 * linux-low.h (regset_func): Removed.
1997 (regset_fill_func, regset_store_func): New.
1998 (enum regset_type): New.
1999 (struct regset_info): Add type field. Use new operation types.
2000 (struct linux_target_ops): stop_pc renamed to get_pc.
2001 Add decr_pc_after_break and breakpoint_at.
2002 (get_process, get_thread_proess, get_process_thread)
2003 (strut process_info, all_processes, linux_attach_lwp)
2004 (thread_db_init): New.
2005
2006 * linux-arm-low.c (arm_get_pc, arm_set_pc,
2007 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
2008 (the_low_target): Add new members.
2009 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
2010 (i386_store_fpxregset): Constify.
2011 (target_regsets): Add new kind identifier.
2012 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
2013 (i386_set_pc): Add debugging.
2014 (i386_breakpoint_at): New function.
2015 (the_low_target): Add new members.
2016 * linux-mips-low.c (mips_get_pc, mips_set_pc)
2017 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
2018 (mips_breakpoint_at): New.
2019 (the_low_target): Add new members.
2020 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
2021 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
2022 (the_low_target): Add new members.
2023 * linux-sh-low.c (sh_get_pc, sh_set_pc)
2024 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
2025 (the_low_target): Add new members.
2026 * linux-x86-64-low.c (target_regsets): Add new kind
2027 identifier.
2028
20292002-05-15 Daniel Jacobowitz <drow@mvista.com>
2030
2031 From Martin Pool <mbp@samba.org>:
2032 * server.c (gdbserver_usage): New function.
2033 (main): Call it.
2034
20352002-05-14 Daniel Jacobowitz <drow@mvista.com>
2036
2037 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
2038 stop_at -> stop_pc.
2039
20402002-05-04 Andrew Cagney <ac131313@redhat.com>
2041
2042 * Makefile.in: Remove obsolete code.
2043
20442002-04-24 Michal Ludvig <mludvig@suse.cz>
2045
2046 * linux-low.c (regsets_fetch_inferior_registers),
2047 (regsets_store_inferior_registers): Removed cast to int from
2048 ptrace() calls.
2049 * regcache.h: Added declaration of struct inferior_info.
2050
20512002-04-20 Daniel Jacobowitz <drow@mvista.com>
2052
2053 * inferiors.c (struct inferior_info): Add regcache_data.
2054 (add_inferior): Call create_register_cache.
2055 (clear_inferiors): Call free_register_cache.
2056 (inferior_regcache_data, set_inferior_regcache_data): New functions.
2057 * regcache.c (struct inferior_regcache_data): New.
2058 (registers): Remove.
2059 (get_regcache): New function.
2060 (create_register_cache, free_register_cache): New functions.
2061 (set_register_cache): Don't initialize the register cache here.
2062 (registers_to_string, registers_from_string, register_data): Call
2063 get_regcache.
2064 * regcache.h: Add prototypes.
2065 * server.h: Likewise.
2066
20672002-04-20 Daniel Jacobowitz <drow@mvista.com>
2068
2069 * mem-break.c: New file.
2070 * mem-break.h: New file.
2071 * Makefile.in: Add mem-break.o rule; update server.h
2072 dependencies.
2073 * inferiors.c (struct inferior_info): Add target_data
2074 member.
2075 (clear_inferiors): Free target_data member if set.
2076 (inferior_target_data, set_inferior_target_data): New functions.
2077 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
2078 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
2079 * linux-low.c (linux_bp_reinsert): New variable.
2080 (struct inferior_linux_data): New.
2081 (linux_create_inferior): Use set_inferior_target_data.
2082 (linux_attach): Likewise. Call add_inferior.
2083 (linux_wait_for_one_inferior): New function.
2084 (linux_wait): Call it.
2085 (linux_write_memory): Add const.
2086 (initialize_low): Call set_breakpoint_data.
2087 * linux-low.h (struct linux_target_ops): Add breakpoint
2088 handling members.
2089 * server.c (attach_inferior): Remove extra add_inferior
2090 call.
2091 * server.h: Include mem-break.h. Update inferior.c
2092 prototypes.
2093 * target.c (read_inferior_memory)
2094 (write_inferior_memory): New functions.
2095 * target.h (read_inferior_memory)
2096 (write_inferior_memory): Change macros to prototypes.
2097 (struct target_ops): Update comments. Add const to write_memory
2098 definition.
2099
21002002-04-11 Daniel Jacobowitz <drow@mvista.com>
2101
2102 * linux-low.c (usr_store_inferior_registers): Support
2103 registers which are allowed to fail to store.
2104 * linux-low.h (linux_target_ops): Likewise.
2105 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
2106 (ppc_cannot_store_register): FPSCR may not be storable.
2107
21082002-04-09 Daniel Jacobowitz <drow@mvista.com>
2109
2110 * server.h: Include <string.h> if HAVE_STRING_H.
2111 * ChangeLog: Correct paths in last ChangeLog entry.
2112
21132002-04-09 Daniel Jacobowitz <drow@mvista.com>
2114
2115 * linux-low.h: Remove obsolete prototypes.
2116 (struct linux_target_ops): New.
2117 (extern the_low_target): New.
2118 * linux-low.c (num_regs, regmap): Remove declarations.
2119 (register_addr): Use the_low_target explicitly.
2120 (fetch_register): Likewise.
2121 (usr_fetch_inferior_registers): Likewise.
2122 (usr_store_inferior_registers): Likewise.
2123 * linux-arm-low.c (num_regs): Remove.
2124 (arm_num_regs): Define.
2125 (arm_regmap): Renamed from regmap, made static.
2126 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
2127 made static.
2128 (arm_cannot_store_register): Renamed from cannot_store_register,
2129 made static.
2130 (the_low_target): New.
2131 * linux-i386-low.c (num_regs): Remove.
2132 (i386_num_regs): Define.
2133 (i386_regmap): Renamed from regmap, made static.
2134 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
2135 made static.
2136 (i386_cannot_store_register): Renamed from cannot_store_register,
2137 made static.
2138 (the_low_target): New.
2139 * linux-ia64-low.c (num_regs): Remove.
2140 (ia64_num_regs): Define.
2141 (ia64_regmap): Renamed from regmap, made static.
2142 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
2143 made static.
2144 (ia64_cannot_store_register): Renamed from cannot_store_register,
2145 made static.
2146 (the_low_target): New.
2147 * linux-m68k-low.c (num_regs): Remove.
2148 (m68k_num_regs): Define.
2149 (m68k_regmap): Renamed from regmap, made static.
2150 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
2151 made static.
2152 (m68k_cannot_store_register): Renamed from cannot_store_register,
2153 made static.
2154 (the_low_target): New.
2155 * linux-mips-low.c (num_regs): Remove.
2156 (mips_num_regs): Define.
2157 (mips_regmap): Renamed from regmap, made static.
2158 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
2159 made static.
2160 (mips_cannot_store_register): Renamed from cannot_store_register,
2161 made static.
2162 (the_low_target): New.
2163 * linux-ppc-low.c (num_regs): Remove.
2164 (ppc_num_regs): Define.
2165 (ppc_regmap): Renamed from regmap, made static.
2166 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
2167 made static.
2168 (ppc_cannot_store_register): Renamed from cannot_store_register,
2169 made static.
2170 (the_low_target): New.
2171 * linux-s390-low.c (num_regs): Remove.
2172 (s390_num_regs): Define.
2173 (s390_regmap): Renamed from regmap, made static.
2174 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
2175 made static.
2176 (s390_cannot_store_register): Renamed from cannot_store_register,
2177 made static.
2178 (the_low_target): New.
2179 * linux-sh-low.c (num_regs): Remove.
2180 (sh_num_regs): Define.
2181 (sh_regmap): Renamed from regmap, made static.
2182 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
2183 made static.
2184 (sh_cannot_store_register): Renamed from cannot_store_register,
2185 made static.
2186 (the_low_target): New.
2187 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
2188 (the_low_target): New.
2189
21902002-04-09 Daniel Jacobowitz <drow@mvista.com>
2191
2192 * Makefile.in: Add stamp-h target.
2193 * configure.in: Create stamp-h.
2194 * configure: Regenerated.
2195
21962002-04-09 Daniel Jacobowitz <drow@mvista.com>
2197
2198 * inferiors.c: New file.
2199 * target.c: New file.
2200 * target.h: New file.
2201 * Makefile.in: Add target.o and inferiors.o. Update
2202 dependencies.
2203 * linux-low.c (inferior_pid): New static variable,
2204 moved from server.c.
2205 (linux_create_inferior): Renamed from create_inferior.
2206 Call add_inferior. Return 0 on success instead of a PID.
2207 (linux_attach): Renamed from myattach.
2208 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
2209 (linux_thread_alive): Renamed from mythread_alive.
2210 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
2211 child dies.
2212 (linux_resume): Renamed from myresume. Add missing ``return 0''.
2213 (regsets_store_inferior_registers): Correct error message.
2214 Add missing ``return 0''.
2215 (linux_fetch_registers): Renamed from fetch_inferior_registers.
2216 (linux_store_registers): Renamed from store_inferior_registers.
2217 (linux_read_memory): Renamed from read_inferior_memory.
2218 (linux_write_memory): Renamed from write_inferior_memory.
2219 (linux_target_ops): New structure.
2220 (initialize_low): Call set_target_ops ().
2221 * remote-utils.c (unhexify): New function.
2222 (hexify): New function.
2223 (input_interrupt): Send signals to ``signal_pid''.
2224 * server.c (inferior_pid): Remove.
2225 (start_inferior): Update create_inferior call.
2226 (attach_inferior): Call add_inferior.
2227 (handle_query): New function.
2228 (main): Call handle_query for `q' packets.
2229 * server.h: Include "target.h". Remove obsolete prototypes.
2230 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
2231
22322002-04-09 Daniel Jacobowitz <drow@mvista.com>
2233
2234 * Makefile.in: Add WARN_CFLAGS. Update configury
2235 dependencies.
2236 * configure.in: Check for <string.h>
2237 * configure: Regenerate.
2238 * config.in: Regenerate.
2239 * gdbreplay.c: Include needed system headers.
2240 (remote_open): Remove strchr prototype.
2241 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
2242 * regcache.c (supply_register): Change buf argument to const void *.
2243 (supply_register_by_name): Likewise.
2244 (collect_register): Change buf argument to void *.
2245 (collect_register_by_name): Likewise.
2246 * regcache.h: Add missing prototypes.
2247 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
2248 * server.c (handle_query): New function.
2249 (attached): New static variable, moved out of main.
2250 (main): Quiet longjmp clobber warnings.
2251 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
2252 * utils.c (error): Remove NORETURN.
2253 (fatal): Likewise.