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