1 2008-08-12 Pedro Alves <pedro@codesourcery.com>
3 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
4 (remote_open): Set or clear transport_is_reliable.
5 (putpkt_binary): Don't expect acks in noack mode.
6 (getpkt): Don't send ack/nac in noack mode.
7 * server.c (handle_general_set): Handle QStartNoAckMode.
8 (handle_query): If connected by tcp pass QStartNoAckMode+ in
10 (main): Reset noack_mode on every connection.
11 * server.h (noack_mode): Declare.
13 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
15 * Makefile.in (GDBREPLAY_OBS): New variable.
16 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
18 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
19 Daniel Jacobowitz <dan@codesourcery.com>
21 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
22 (usr_store_inferior_registers): Likewise.
23 (regsets_store_inferior_registers): Likewise.
25 2008-07-31 Rolf Jansen <rj@surtec.com>
26 Pedro Alves <pedro@codesourcery.com>
28 * configure.ac: Check for memmem declaration.
29 * server.c [HAVE_MALLOC_H]: Include malloc.h.
30 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
31 (disable_packet_qfThreadInfo): Unconditionally compile.
32 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
33 * configure, config.in: Regenerate.
35 2008-07-28 Doug Kwan <dougkwan@google.com>
37 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
38 (linux_write_memory): Remove declaration of errno.
40 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
42 * linux-low.c (handle_extended_wait): Do not use "status"
43 variable uninitialized.
45 2008-07-07 Pedro Alves <pedro@codesourcery.com>
47 * server.c (handle_v_attach): Inhibit reporting dll changes.
49 2008-06-27 Pedro Alves <pedro@codesourcery.com>
51 * remote-utils.c (prepare_resume_reply): If requested, don't
52 output "thread:TID" in the T stop reply.
54 * server.c (disable_packet_vCont, disable_packet_Tthread)
55 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
56 (handle_query): If requested, disable support for qC, qfThreadInfo
58 (handle_v_requests): If requested, disable support for vCont.
59 (gdbserver_show_disableable): New.
60 (main): Handle --disable-packet and --disable-packet=LIST.
62 * server.h (disable_packet_vCont, disable_packet_Tthread)
63 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
65 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
67 * server.c (gdbserver_usage): Mention --version.
69 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
71 * Makefile.in (gdbreplay.o): New rule.
73 2008-06-06 Joseph Myers <joseph@codesourcery.com>
75 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
76 message, not gdbserver.
78 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
79 Nathan Sidwell <nathan@codesourcery.com>
80 Joseph Myers <joseph@codesourcery.com>
82 * acinclude.m4: Include ../../config/acx.m4.
83 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
84 * configure, config.in: Regenerate.
85 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
86 * server.c (gdbserver_version): Print PKGVERSION.
87 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
88 (main): Adjust gdbserver_usage calls.
89 * gdbreplay.c (version, host_name): Add declarations.
90 (gdbreplay_version, gdbreplay_usage): New.
91 (main): Accept --version and --help options.
93 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
95 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
96 (arm_breakpoint_at): Handle Thumb.
97 (the_low_target): Add comment.
99 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
101 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
103 2008-05-09 Doug Evans <dje@google.com>
105 * server.h (decode_search_memory_packet): Declare.
106 * remote-utils.c (decode_search_memory_packet): New fn.
107 * server.c (handle_search_memory_1): New fn.
108 (handle_search_memory): New fn.
109 (handle_query): Process qSearch:memory packets.
111 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
113 * regcache.c (registers_length): Remove.
114 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
115 full register packet.
116 * regcache.h (registers_length): Remove prototype.
117 * server.h (PBUFSIZ): Define to 16384.
119 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
121 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
122 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
123 powerpc-64l.o, and powerpc-altivec64l.o.
124 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
125 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
126 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
127 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
128 rs6000/power-linux.xml, and rs6000/power64-linux.xml
131 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
132 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
133 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
134 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
135 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
136 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
137 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
138 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
139 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
140 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
143 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
144 (init_registers_powerpc_32l): ... this new prototype.
145 (init_registers_powerpc_32): Remove, replace by ...
146 (init_registers_powerpc_altivec32l): ... this new prototype.
147 (init_registers_powerpc_e500): Remove, replace by ...
148 (init_registers_powerpc_e500l): ... this new prototype.
149 (init_registers_ppc64): Remove, replace by ...
150 (init_registers_powerpc_64l): ... this new prototype.
151 (init_registers_powerpc_64): Remove, replace by ...
152 (init_registers_powerpc_altivec64l): ... this new prototype.
153 (ppc_num_regs): Set to 73.
154 (PT_ORIG_R3, PT_TRAP): Define if necessary.
155 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
156 (ppc_cannot_store_register): Handle orig_r3 and trap.
157 (ppc_arch_setup): Update init_registers_... calls.
158 (ppc_fill_gregset): Handle orig_r3 and trap.
160 * inferiors.c (clear_inferiors): Reset current_inferior.
162 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
164 * acinclude.m4: Add override.m4.
165 * configure: Regenerate.
167 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
169 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
170 initial call to init_register_ppc64.
172 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
174 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into single
175 powerpc*-*-linux* case.
176 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
178 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
180 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
181 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
183 * linux-ppc-low.c: Include <elf.h>.
184 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
185 (ppc_hwcap): New global variable.
186 (ppc_regmap): Remove __SPE__ #ifdef sections.
187 (ppc_regmap_e500): New global variable.
188 (ppc_cannot_store_register): Update __SPE__ special case.
189 (ppc_get_hwcap): New function.
190 (ppc_arch_setup): Use it to determine whether inferior supports
191 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
192 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
193 Do not access registers if target does not support AltiVec.
194 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
195 Do not access registers if target does not support SPE.
196 (target_regsets): Unconditionally include AltiVec and SPE regsets.
198 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
200 * linux-low.c (disabled_regsets, num_regsets): New.
201 (use_regsets_p): Delete.
202 (linux_wait_for_process): Clear disabled_regsets.
203 (regsets_fetch_inferior_registers): Check and set it.
204 (regsets_store_inferior_registers): Likewise.
205 (linux_fetch_registers, linux_store_registers): Do not use
207 (initialize_low): Allocate disabled_regsets.
209 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
211 * Makefile.in (LIBOBJS): New.
213 (memmem.o): New rule.
214 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
215 * configure: Regenerated.
217 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
219 * server.c (handle_query): Never return "unsupported" for
220 qXfer:features:read queries.
222 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
224 * server.c (get_features_xml): Fix inverted condition.
225 (handle_query): Always support qXfer:feature:read.
227 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
229 * server.c (wrapper_argv): New.
230 (start_inferior): Handle wrapper_argv. If set, expect an extra
232 (gdbserver_usage): Document --wrapper.
233 (main): Parse --wrapper.
235 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
237 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
238 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
239 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
240 (ppc_set_pc): Likewise.
241 (ppc_arch_setup): New function.
242 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
244 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
246 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
248 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
249 instead of linux-ppc64-low.o.
250 * linux-ppc64-low.c: Remove file.
251 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
252 (linux-ppc64-low.o): Remove rule.
254 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
255 (init_registers_powerpc_64): Likewise.
256 (ppc_regmap): Conditionally define depending on __powerpc64__.
257 (ppc_cannot_store_register): Do not special-case "fpscr" when
258 compiled on __powerpc64__.
259 (ppc_collect_ptrace_register): New function.
260 (ppc_supply_ptrace_register): New function.
261 (ppc_breakpoint): Change type to "unsigned int".
262 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
263 (the_low_target): Conditionally provide initializers for the
264 arch_setup member depending on __powerpc64__. Install
265 collect_ptrace_register and supply_ptrace_register members.
267 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
269 * regcache.h (gdbserver_xmltarget): Add extern declaration.
270 * server.c (gdbserver_xmltarget): Define.
271 (get_features_xml): Use it to replace "target.xml" and arch_string.
273 * configure.srv: Remove srv_xmltarget. Add XML files that were
274 mentioned there to srv_xmlfiles instead. Remove conditional tests
275 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
276 srv_xmlfiles and srv_regobj to include all possible choices.
277 * configure.ac (srv_xmltarget): Remove.
278 (srv_xmlfiles): Do not add "target.xml".
279 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
280 checks for supplementary target information.
281 * configure: Regenerate.
282 * Makefile.in (XML_TARGET): Remove.
283 (target.xml): Remove rule.
284 (clean): Do not clean up target.xml.
285 (.PRECIOUS): Do not mention target.xml.
287 * target.h (struct target_ops): Remove arch_string member.
288 * linux-low.c (linux_arch_string): Remove.
289 (linux_target_ops): Remove arch_string initializer.
290 * linux-low.h (struct linux_target_ops): Remove arch_string member.
291 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
292 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
293 * spu-low.c (spu_arch_string): Remove.
294 (spu_target_ops): Remove arch_string initializer.
295 * win32-low.c (win32_arch_string): Remove.
296 (win32_target_ops): Remove arch_string initializer.
297 * win32-low.h (struct win32_target_ops): Remove arch_string member.
298 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
299 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
301 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
303 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
304 by collect_ptrace_register and supply_ptrace_register hooks.
305 * linux-low.c (fetch_register): Use supply_ptrace_register callback
306 instead of checking for the_low_target.left_pad_xfer.
307 (usr_store_inferior_registers): Use collect_ptrace_register callback
308 instead of checking for the_low_target.left_pad_xfer.
310 * linux-s390-low.c (s390_collect_ptrace_register): New function.
311 (s390_supply_ptrace_register): Likewise.
312 (s390_fill_gregset): Call s390_collect_ptrace_register.
313 (the_low_target): Update.
315 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
316 (ppc_supply_ptrace_register): Likewise.
317 (the_low_target): Update.
319 * linux-i386-low.c (the_low_target): Update.
320 * linux-x86-64-low.c (the_low_target): Update.
322 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
324 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
325 reg-s390.o and reg-s390x.o.
327 * linux-low.c (new_inferior): New global variable.
328 (linux_create_inferior, linux_attach): Set it.
329 (linux_wait_for_process): Call the_low_target.arch_setup after the
330 target has stopped for the first time.
331 (initialize_low): Do not call the_low_target.arch_setup.
333 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
334 (s390_set_pc): Likewise.
335 (s390_arch_setup): New function.
336 (the_low_target): Use s390_arch_setup as arch_setup routine.
338 * regcache.c (realloc_register_cache): New function.
339 (set_register_cache): Call it for each existing regcache.
341 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
343 * server.h (init_registers): Remove prototype.
345 * linux-low.h (struct linux_target_ops): Add arch_setup field.
346 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
347 instead of init_registers ().
348 * linux-arm-low.c (init_registers_arm): Add prototype.
349 (init_registers_arm_with_iwmmxt): Likewise.
350 (the_low_target): Add initializer for arch_setup field.
351 * linux-cris-low.c (init_registers_cris): Add prototype.
352 (the_low_target): Add initializer for arch_setup field.
353 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
354 (the_low_target): Add initializer for arch_setup field.
355 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
356 (the_low_target): Add initializer for arch_setup field.
357 * linux-ia64-low.c (init_registers_ia64): Add prototype.
358 (the_low_target): Add initializer for arch_setup field.
359 * linux-m32r-low.c (init_registers_m32r): Add prototype.
360 (the_low_target): Add initializer for arch_setup field.
361 * linux-m68k-low.c (init_registers_m68k): Add prototype.
362 (the_low_target): Add initializer for arch_setup field.
363 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
364 (init_registers_mips64_linux): Likewise.
365 (the_low_target): Add initializer for arch_setup field.
366 * linux-ppc-low.c (init_registers_ppc): Add prototype.
367 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
368 (the_low_target): Add initializer for arch_setup field.
369 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
370 (init_registers_powerpc_64): Likewise.
371 (the_low_target): Add initializer for arch_setup field.
372 * linux-s390-low.c (init_registers_s390): Add prototype.
373 (init_registers_s390x): Likewise.
374 (the_low_target): Add initializer for arch_setup field.
375 * linux-sh-low.c (init_registers_sh): Add prototype.
376 (the_low_target): Add initializer for arch_setup field.
377 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
378 (the_low_target): Add initializer for arch_setup field.
379 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
380 (the_low_target): Add initializer for arch_setup field.
382 * win32-low.h (struct win32_target_ops): Add arch_setup field.
383 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
384 instead of init_registers ().
385 * win32-arm-low.c (init_registers_arm): Add prototype.
386 (the_low_target): Add initializer for arch_setup field.
387 * win32-i386-low.c (init_registers_i386): Add prototype.
388 (the_low_target): Add initializer for arch_setup field.
390 * spu-low.c (init_registers_spu): Add prototype.
391 (initialize_low): Call initialie_registers_spu () instead of
392 initialize_registers ().
394 2008-02-19 Pedro Alves <pedro@codesourcery.com>
396 * server.c (handle_v_requests): When handling the vRun and vAttach
397 packets, if already debugging a process, don't kill it. Return an
400 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
402 * server.c (handle_query): Correct length check.
404 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
406 * win32-low.c (do_initial_child_stuff): Add process handle
407 parameter. Set current_process_handle and current_process_id from the
408 parameters. Clear globals.
409 (win32_create_inferior): Don't set current_process_handle and
410 current_process_id here. Instead pass them on the call to
411 do_initial_child_stuff.
412 (win32_attach): Likewise.
413 (win32_clear_inferiors): New.
414 (win32_kill): Don't close the current process handle or the
415 current thread handle here. Instead call win32_clear_inferiors.
416 (win32_detach): Don't open a new handle to the process. Call
417 win32_clear_inferiors.
418 (win32_join): Don't rely on current_process_handle; open a new
419 handle using the process id.
420 (win32_wait): Call win32_clear_inferiors when the inferior process
423 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
425 * server.c (monitor_show_help): Add "exit".
427 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
429 * Makefile.in (SFILES): Add linux-xtensa-low.c.
430 (clean): Add reg-xtensa.c.
431 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
432 * configure.srv (xtensa*-*-linux*) New target.
433 * linux-xtensa-low.c: New.
434 * xtensa-xtregs.c: New.
436 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
438 * hostio.c: Don't include errno.h.
439 (errno_to_fileio_errno): Move to hostio-errno.
440 * hostio.c: (hostio_error): Remove the error parameter. Defer the
441 error number outputting to the target->hostio_last_error callback.
442 (hostio_packet_error): Use FILEIO_EINVAL directly.
443 (handle_open, handle_pread, hostio_error, handle_unlink): Update
444 calls to hostio_error.
445 * hostio-errno.c: New.
446 * server.h (hostio_last_error_from_errno): Declare.
447 * target.h (target_ops): Add hostio_last_error member.
448 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
449 as hostio_last_error handler.
450 * spu-low.c (spu_target_ops): Likewise.
451 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
452 (wince_hostio_last_error): New functions.
453 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
454 as hostio_last_error handler.
455 (win32_target_ops) [!_WIN32_WCE]: Register
456 hostio_last_error_from_errno as hostio_last_error handler.
457 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
458 (hostio-errno.o): New rule.
459 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
460 * configure.srv (srv_hostio_err_objs): New variable. Default to
462 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
463 * configure: Regenerate.
465 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
467 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
468 (linux_kill, linux_detach): Clean up the process list.
469 * remote-utils.c (remote_open): Improve port number parsing.
470 (putpkt_binary, input_interrupt): Only send interrupts if the target
472 * server.c (extended_protocol): Make static.
473 (attached): Define earlier.
474 (exit_requested, response_needed, program_argv): New variables.
475 (target_running): New.
476 (start_inferior): Clear attached here.
477 (attach_inferior): Set attached here.
478 (require_running): Define.
479 (handle_query): Use require_running and target_running. Implement
481 (handle_v_attach, handle_v_run): New.
482 (handle_v_requests): Use require_running. Handle vAttach and vRun.
483 (gdbserver_usage): Update.
484 (main): Redo argument parsing. Handle --debug and --multi. Handle
485 --attach along with other options or after the port. Save
486 program_argv. Support no initial program. Resynchronize
487 communication with GDB after an error. Handle "monitor exit".
488 Use require_running and target_running. Always allow the extended
489 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
490 restart in extended mode.
491 * README: Refer to the GDB manual. Update --attach usage.
493 2007-12-20 Andreas Schwab <schwab@suse.de>
495 * linux-low.c (STACK_SIZE): Define.
496 (linux_tracefork_child): Use it. Use __clone2 on ia64.
497 (linux_test_for_tracefork): Likewise.
499 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
501 * linux-low.c (linux_wait_for_event): Update messages. Do not
502 reinsert auto-delete breakpoints.
503 * mem-break.c (struct breakpoint): Change return type of handler to
505 (set_breakpoint_at): Update handler type.
506 (reinsert_breakpoint_handler): Return 1 instead of calling
508 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
510 (check_breakpoints): Delete auto-delete breakpoints and return 2.
511 * mem-break.h (set_breakpoint_at): Update handler type.
512 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
513 * win32-low.c (auto_delete_breakpoint): New.
514 (get_child_debug_event): Use it.
516 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
518 * configure.ac: Check for pread and pwrite.
519 * hostio.c (handle_pread): Fall back to lseek and read.
520 (handle_pwrite): Fall back to lseek and write.
521 * config.in, configure: Regenerated.
523 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
525 * server.c (myresume): Add own_buf argument.
526 (main): Update calls.
528 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
530 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
531 * remote-utils.c (remote_open): Do not call disable_async_io.
532 (block_async_io): Delete.
533 (unblock_async_io): Make static.
534 (initialize_async_io): New.
535 * server.c (handle_v_cont): Handle async I/O here.
536 (myresume): Likewise. Move other common resume tasks here...
537 (main): ... from here. Call initialize_async_io. Disable async
538 I/O before the main loop.
539 * server.h (initialize_async_io): Declare.
540 (block_async_io, unblock_async_io): Delete prototypes.
541 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
543 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
545 * remote-utils.c (readchar): Allow binary data in received messages.
547 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
549 * win32-low.c (attaching): New global.
550 (win32_create_inferior): Clear the `attaching' global.
551 (win32_attach): Set the `attaching' global.
552 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
553 attaching. Only set a breakpoint at the entry point if not
556 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
558 * server.c (main): Don't report dll events on the initial
559 connection on attaches.
561 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
563 * server.c (main): Relax numerical bases supported for the pid of
564 the --attach command line argument.
566 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
568 * win32-low.c (win32_attach): Call OpenProcess before
569 DebugActiveProcess, not after. Add last error output to error
572 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
574 * win32-low.c (win32_get_thread_context)
575 (win32_set_thread_context): New functions.
576 (thread_rec): Use win32_get_thread_context.
577 (continue_one_thread, win32_resume): Use win32_set_thread_context.
578 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
582 Pedro Alves <pedro_alves@portugalmail.pt>
584 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
586 (child_add_thread): Minor cleanup.
587 (child_continue): Resume artificially suspended threads before
588 calling ContinueDebugEvent.
589 (suspend_one_thread): New.
590 (fake_breakpoint_event): New.
591 (get_child_debug_event): Change return type to int. Check here if
592 gdb sent an interrupt request. If a soft interrupt was requested,
593 fake a breakpoint event. Return 0 if there is no event to handle,
595 (win32_wait): Don't check here if gdb sent an interrupt request.
596 Ensure there is a valid event to handle.
597 (win32_request_interrupt): Add soft interruption method as last
601 Pedro Alves <pedro_alves@portugalmail.pt>
603 * win32-low.h (win32_thread_info): Add descriptions to the
604 structure members. Replace `suspend_count' counter by a
606 * win32-low.c (thread_rec): Update condition of when to get the
607 context from the inferior. Rely on ContextFlags being set if it
608 has already been retrieved. Only suspend the inferior thread if
609 we haven't already. Warn if that fails.
610 (continue_one_thread): s/suspend_count/suspended/. Only call
611 ResumeThread once. Warn if that fails.
613 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
615 * win32-low.c (win32_wait): Don't read from the inferior when it
618 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
620 * Makefile.in (win32_low_h): New variable.
621 (win32-low.o): Add dependency on $(win32_low_h).
622 (win32-arm-low.o, win32-i386-low.o): New rules.
624 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
626 * hostio.c: Correct copyright year.
628 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
630 * Makefile.in (OBS): Add hostio.o.
631 (hostio.o): New rule.
632 * server.h (handle_vFile): Declare.
633 * hostio.c: New file.
634 * server.c (handle_v_requests): Take packet_len and new_packet_len
635 for binary packets. Call handle_vFile.
636 (main): Update call to handle_v_requests.
638 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
640 * linux-low.c: Include <sched.h>.
642 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
644 * linux-low.c (linux_tracefork_grandchild): New.
645 (linux_tracefork_child): Use clone.
646 (linux_test_for_tracefork): Use clone; allocate and free a stack.
648 2007-10-31 Joel Brobecker <brobecker@adacore.com>
650 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
652 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
654 * linux-low.c (handle_extended_wait): Handle unexpected signals.
656 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
658 * inferiors.c (change_inferior_id): Delete.
659 (add_pid_to_list, pull_pid_from_list): New.
660 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
661 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
662 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
663 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
664 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
665 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
666 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
667 (using_threads): Always set to 1.
668 (handle_extended_wait): New.
669 (add_process): Do not set TID.
670 (linux_create_inferior): Set must_set_ptrace_flags.
671 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
672 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
673 (linux_thread_alive): Rename TID argument to LWPID.
674 (linux_wait_for_process): Handle unknown processes. Do not use TID.
675 (linux_wait_for_event): Do not use TID or check using_threads. Update
676 call to dead_thread_notify. Call handle_extended_wait.
677 (linux_create_inferior): Use PTRACE_SETOPTIONS.
678 (send_sigstop): Delete sigstop_sent.
679 (wait_for_sigstop): Avoid TID.
680 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
681 (linux_test_for_tracefork): New.
682 (linux_lookup_signals): Use thread_db_active and
683 linux_supports_tracefork_flag.
684 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
685 * linux-low.h (get_process_thread): Avoid TID.
686 (struct process_ifo): Move thread_known and tid to the end. Remove
688 (linux_attach_lwp, thread_db_init): Update prototypes.
689 * server.h (change_inferior_id): Delete prototype.
690 (add_pid_to_list, pull_pid_from_list): New prototypes.
691 * thread-db.c (thread_db_use_events): New.
692 (find_first_thread): Rename to...
693 (find_one_thread): ...this. Update callers and messages. Do not
694 call fatal. Check thread_db_use_events. Do not call
695 change_inferior_id or new_thread_notify.
696 (maybe_attach_thread): Update. Do not call new_thread_notify.
697 (thread_db_init): Set thread_db_use_events. Check use_events.
698 * utils.c (fatal, warning): Correct message prefix.
700 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
702 * Makefile.in (clean): Remove new files.
703 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
704 (powerpc-64.o, powerpc-64.c): New rules.
705 * configure.srv: Use alternate register sets for powerpc64-*-linux*
706 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
708 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
710 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
711 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
712 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
713 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
714 (target_regsets): Add AltiVec and SPE register sets.
715 * configure.ac: Check for AltiVec and SPE.
716 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
717 (ppc_fill_vrregset, ppc_store_vrregset): New.
718 (target_regsets): Add AltiVec register set.
719 * configure: Regenerated.
721 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
723 * linux-low.c (O_LARGEFILE): Define.
724 (linux_read_memory): Use /proc/PID/mem.
725 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
726 * configure, config.in: Regenerated.
728 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
730 * linux-low.c (linux_wait_for_event): Do not pass signals while
733 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
735 * win32-low.c (create_process): New.
736 (win32_create_inferior): Use create_process instead of
737 CreateProcess. If create_process failed retry appending an ".exe"
738 suffix. Store the GetLastError result immediatelly after
739 create_process calls and use it on the call to error.
741 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
743 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
745 2007-08-23 Joel Brobecker <brobecker@adacore.com>
747 * configure.ac: Switch license to GPLv3.
749 2007-08-01 Michael Snyder <msnyder@access-company.com>
751 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
753 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
755 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
757 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
758 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
759 CloseToolhelp32Snapshot.
760 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
761 CloseToolhelp32Snapshot.
763 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
765 * server.c (main): Check for inferior exit before main loop.
767 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
769 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
770 instead of on tmp_desc.
772 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
773 Daniel Jacobowitz <dan@codesourcery.com>
775 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
776 (add_thread): Minor cleanups.
777 (clear_inferiors): Move lower in the file. Clear the DLL
779 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
780 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
781 (xml_escape_text): New.
782 * server.c (handle_query): Handle qXfer:libraries:read. Report it
784 (handle_v_cont): Report errors.
785 (gdbserver_version): Update.
786 (main): Correct size of own_buf. Do not report initial DLL events.
787 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
788 (unloaded_dll, xml_escape_text): New.
789 * win32-low.c (enum target_waitkind): Update comments.
790 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
791 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
792 (win32_EnumProcessModules, win32_GetModuleInformation)
793 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
794 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
795 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
796 (win32_Module32First, win32_Module32Next, load_toolhelp)
797 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
798 (get_child_debug_event): Handle DLL events.
799 (win32_wait): Likewise.
801 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
803 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
804 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
806 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
808 * win32-low.c (handle_output_debug_string): Ignore event if not
811 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
813 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
815 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
817 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
819 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
821 * inferiors.c (change_inferior_id): Add comment.
822 * linux-low.c (check_removed_breakpoint): Add an early
823 prototype. Improve debug output.
824 (linux_attach): Doc update.
825 (linux_detach_one_process, linux_detach): Clean up before releasing
827 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
828 * linux-low.h (struct process_info): Doc improvement.
829 * mem-break.c (delete_all_breakpoints): New.
830 * mem-break.h (delete_all_breakpoints): New prototype.
831 * thread-db.c (find_first_thread): New.
832 (thread_db_create_event): Call it instead of
833 thread_db_find_new_threads. Clean up unused variables.
834 (maybe_attach_thread): Remove first thread handling.
835 (thread_db_find_new_threads): Use find_first_thread.
836 (thread_db_get_tls_address): Likewise.
838 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
840 * thread-db.c (thread_db_find_new_threads): Add prototype.
841 (thread_db_create_event): Check for the main thread before adding
843 (maybe_attach_thread): Only enable event reporting if TID == 0.
844 (thread_db_get_tls_address): Check for new threads.
846 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
848 * linux-low.c (linux_create_inferior): Try execv before execvp.
849 * spu-low.c (spu_create_inferior): Likewise.
851 2007-06-13 Mike Frysinger <vapier@gentoo.org>
853 * linux-low.c (linux_create_inferior): Change execv to execvp.
854 * spu-low.c (spu_create_inferior): Likewies.
856 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
858 * Makefile.in (clean): Clean new files instead of deleted ones.
859 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
860 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
862 * configure.srv: Specify XML files and new regformats for MIPS and
864 * linux-mips-low.c (mips_num_regs): Set to only used registers.
865 (mips_regmap): Do not fetch $0. Remove unused registers. Add
866 an entry for the restart register.
867 (mips_cannot_fetch_register, mips_cannot_store_register)
868 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
869 register names to match the XML descriptions.
870 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
871 restart register instead of $0.
873 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
874 Markus Deuling <deuling@de.ibm.com>
876 * remote-utils.c (decode_xfer_write): New function.
877 * server.h (decode_xfer_write): Add prototype.
878 * server.c (handle_query): Add PACKET_LEN argument. Support
879 qXfer:spu:read and qXfer:spu:write packets.
880 (main): Pass packet_len to handle_query.
881 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
882 * target.h (target_ops): Add qxfer_spu.
884 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
886 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
887 accessing non-seekable spufs files.
889 2007-05-16 Markus Deuling <deuling@de.ibm.com>
891 * server.c (handle_query): Add reply for qC packet.
893 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
894 Leo Zayas <lerele@champenstudios@com>
896 * server.h (check_remote_input_interrupt_request): New function.
897 * remote_utils.c (INVALID_DESCRIPTOR): New define.
898 (remote_desc): Initialize with INVALID_DESCRIPTOR.
899 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
900 (check_remote_input_interrupt_request): New function.
901 * server.h (check_remote_input_interrupt_request): Declare.
902 * win32-low.c (winapi_DebugBreakProcess,
903 winapi_GenerateConsoleCtrlEvent): New typedefs.
904 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
906 (win32_wait): Check for remote interrupt request
907 with check_remote_input_interrupt_request.
908 (win32_request_interrupt): New function.
909 (win32_target_op): Set request_interrupt to win32_request_interrupt.
911 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
913 * win32-low.c (debug_registers_changed,
914 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
915 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
916 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
917 (thread_rec): Get context using the low target.
918 (child_add_thread): Call thread_added on the low target,
919 which does the same thing.
921 (do_initial_child_stuff): Remove debug registers references.
922 Set context using the low target. Resume threads after
923 setting the contexts.
924 (child_continue): Remove dead variable. Remove debug
925 registers references.
926 (child_fetch_inferior_registers): Go through the low target.
927 (do_child_store_inferior_registers): Remove.
928 (child_store_inferior_registers): Go through the low target.
929 (win32_resume): Remove debug registers references.
930 Set context using the low target.
931 (handle_exception): Change return type to void. Don't record
932 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
933 first chance exception.
934 (get_child_debug_event): Change return type to void. Remove
935 goto loop. Always return after waiting for debug event.
936 (win32_wait): Convert to switch statement. Handle spurious
939 * win32-i386-low.c (debug_registers_changed,
940 debug_registers_used): New.
941 (initial_stuff): Rename to ...
942 (i386_initial_stuff): ... this. Clear debug registers
944 (store_debug_registers): Delete.
945 (i386_get_thread_context): New.
946 (load_debug_registers): Delete.
947 (i386_set_thread_context): New.
948 (i386_thread_added): New.
949 (single_step): Rename to ...
950 (i386_single_step): ... this.
951 (do_fetch_inferior_registers): Rename to ...
952 (i386_fetch_inferior_register): ... this.
953 (i386_store_inferior_register): New.
954 (the_low_target): Adapt to new interface.
956 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
957 (arm_get_thread_context): New.
958 (arm_set_thread_context): New.
960 (do_fetch_inferior_registers): Rename to ...
961 (arm_fetch_inferior_register): ... this.
962 (arm_store_inferior_register): New.
963 (arm_wince_breakpoint): Reimplement as unsigned long.
964 (arm_wince_breakpoint_len): Define.
965 (the_low_target): Adapt to new interface.
967 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
968 load_debug_registers. Add get_thread_context, set_thread_context,
969 thread_added and store_inferior_register. Rename
970 fetch_inferior_registers to fetch_inferior_register.
971 (regptr): Remove declaration.
973 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
975 * linux-low.c (linux_detach): Change return type to int. Return 0.
976 * spu-low.c (spu_detach): Likewise.
978 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
980 * target.h (target_ops): Change return type of detach to int.
982 (join_inferior): New.
983 * server.c (main): Don't skip detach support on mingw32.
984 If the inferior doesn't support detaching return error.
985 Call join_inferior instead of using waitpid.
986 * linux-low.c (linux_join): New.
987 (linux_target_op): Add linux_join.
988 * spu-low.c (spu_join): New.
989 (spu_target_ops): Add spu_join.
990 * win32-low.c (win32_detach): Adapt to new interface.
991 Reopen current_process_handle before detaching. Issue a child
992 resume before detaching.
994 (win32_target_op): Add win32_join.
996 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
998 * win32-low.c (win32-attach): Fix return value.
999 * target.h (target_ops): Describe ATTACH return values.
1001 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
1003 * win32-low.c (GETPROCADDRESS): Define.
1004 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
1005 (winapi_DebugSetProcessKillOnExit): Likewise.
1006 (win32_create_inferior): Force usage of ansi CreateProcessA.
1007 (win32_attach): Use GETPROCADDRESS.
1008 (win32_detach): Likewise.
1010 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
1012 * win32-low.c (win32_wait): Don't use WSTOPSIG.
1014 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
1016 * win32-low.c: Commit leftover changes from 2007-03-29.
1018 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
1020 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
1021 fields short instead of int. Add explicit padding.
1022 (i387_cache_to_fsave): Remove unnecessary casts.
1023 (i387_fsave_to_cache): Doc fix.
1024 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
1026 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
1028 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
1029 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
1031 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
1033 * configure.srv (arm*-*-mingw32ce*): Move near the other
1036 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
1038 * configure.ac: Add errno checking.
1039 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
1040 sys/file.h and malloc.h.
1041 (AC_CHECK_DECLS): Add perror.
1042 (srv_mingwce): Handle.
1043 * configure.srv (i[34567]86-*-cygwin*): Add
1044 win32-i386-low.o to srv_tgtobj.
1045 (i[34567]86-*-mingw*): Likewise.
1046 (arm*-*-mingw32ce*): Add case.
1047 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
1048 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
1049 [__MINGW32CE__] (strerror): New function.
1050 [__MINGW32CE__] (errno): Define to GetLastError.
1051 [__MINGW32CE__] (COUNTOF): New macro.
1052 (remote_open): Remove extra close call.
1053 * mem-break.c (delete_breakpoint_at): New function.
1054 * mem-break.h (delete_breakpoint_at): Declare.
1055 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
1056 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
1057 [USE_WIN32API] (read, write): Add char* casts.
1058 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
1059 * server.h: Include wincecompat.h on Windows CE.
1060 [HAVE_ERRNO_H]: Check.
1061 (perror): Declare if not declared.
1062 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
1063 (perror_with_name): Remove errno declaration.
1064 * wincecompat.h: New.
1065 * wincecompat.c: New.
1067 * win32-arm-low.c: New.
1068 * win32-i386-low.c: New.
1069 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
1070 (OUTMSG2): Make it safe.
1072 (COUNTOF): New macro.
1073 (NUM_REGS): Get it from the low target.
1074 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
1075 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
1076 (thread_rec): Let low target handle debug registers.
1077 (child_add_thread): Likewise.
1078 (child_init_thread_list): Likewise.
1079 (continue_one_thread): Likewise.
1081 (do_child_fetch_inferior_registers): Move to ...
1082 * win32-i386-low.c: ... here, and rename to ...
1083 (do_fetch_inferior_registers): ... this.
1084 * win32-low.c (child_fetch_inferior_registers):
1085 Go through the low target.
1086 (do_child_store_inferior_registers): Use regptr.
1087 (strwinerror): New function.
1088 (win32_create_inferior): Handle Windows CE.
1089 Use strwinerror instead of strerror on Windows error
1090 codes. Add program to the error output.
1091 Don't close the main thread handle on Windows CE.
1092 (win32_attach): Use coredll.dll on Windows CE.
1093 (win32_kill): Close current process and current
1095 (win32_detach): Use coredll.dll on Windows CE.
1096 (win32_resume): Let low target handle debug registers, and
1098 (handle_exception): Add/Remove initial breakpoint. Avoid
1099 non-existant WSTOPSIG on Windows CE.
1100 (win32_read_inferior_memory): Cast to remove warning.
1101 (win32_arch_string): Go through the low target.
1102 (initialize_low): Call set_breakpoint_data with the low
1103 target's breakpoint.
1104 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
1105 FOP_REGNUM, mappings): Move to ...
1106 * win32-i386-low.c: ... here.
1107 * win32-low.c (win32_thread_info): Move to ...
1108 * win32-low.h: ... here.
1109 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
1110 win32-arm-low.c and wincecompat.c.
1111 (all:): Add $EXEEXT.
1112 (install-only:): Likewise.
1113 (gdbserver:): Likewise.
1114 (gdbreplay:): Likewise.
1115 * config.in: Regenerate.
1116 * configure: Regenerate.
1118 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
1120 * win32-low.c: Rename typedef thread_info to
1121 win32_thread_info throughout.
1123 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
1125 * win32-i386-low.c: Rename to ...
1126 * win32-low.c: ... this.
1127 * configure.srv: Replace win32-i386-low.o with win32-low.o.
1128 * Makefile.in: Likewise.
1130 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
1132 * remote-utils.c (monitor_output): Constify msg parameter.
1133 * server.h (monitor_output): Likewise.
1134 * win32-i386-low.c (handle_output_debug_string): New.
1135 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
1136 handle_output_debug_string.
1137 (get_child_debug_event): Likewise.
1139 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
1141 * server.c (main): Correct strtoul check.
1143 2007-03-27 Jon Ringle <jon@ringle.org>
1145 * linux-low.c: Check __ARCH_HAS_MMU__ also.
1147 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
1149 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
1151 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
1153 * terminal.h: Check HAVE_SGTTY_H.
1155 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
1157 * remote-utils.c (remote_open): Print out the assigned port number.
1159 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
1161 * remote-utils.c (monitor_output): New function.
1162 * server.c (debug_threads): Define here.
1163 (monitor_show_help): New function.
1164 (handle_query): Handle qRcmd.
1165 (main): Do not handle 'd' packet.
1166 * server.h (debug_threads, remote_debug, monitor_output): Declare.
1167 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
1170 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
1172 * Makefile.in (EXEEXT): New.
1173 (clean): Use $(EXEEXT).
1175 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
1177 * target.h (target_ops): Rename send_signal to request_interrupt,
1178 and remove enum target_signal parameter.
1179 * linux-low.c (linux_request_interrupt): Rename from
1180 linux_send_signal, and always send SIGINT.
1181 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
1182 and always send SIGINT.
1183 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
1185 (input_interrupt): Likewise.
1187 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
1189 * server.c (get_features_xml): Check if target implemented
1191 * win32-i386-low.c (win32_arch_string): New.
1192 (win32_target_ops): Add win32_arch_string as arch_string member.
1194 2007-02-22 Markus Deuling <deuling@de.ibm.com>
1196 * spu-low.c (spu_arch_string): New.
1197 (spu_target_ops): Add spu_arch_string.
1199 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
1201 * remote-utils.c: Remove HAVE_TERMINAL_H check.
1202 * configure.ac: Do not check for terminal.h.
1203 * configure, config.in: Regenerated.
1205 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
1207 * Makefile.in (OBS): Add $(XML_BUILTIN).
1208 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
1210 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
1211 (arm-with-iwmmxt.c): New.
1212 * config.in, configure: Regenerate.
1213 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
1214 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
1215 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
1216 (arm*-*-linux*): Add iWMMXt and regset support.
1217 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
1218 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
1219 (arm_store_wmmxregset, target_regsets): New.
1220 * server.c (get_features_xml): Take annex argument. Check builtin
1222 (handle_query): Handle multiple annexes.
1224 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
1226 * remote-utils.c [USE_WIN32API] (read, write): Define.
1227 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
1230 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
1232 * linux-i386-low.c (the_low_target): Set arch_string.
1233 * linux-x86-64-low.c (the_low_target): Likewise.
1234 * linux-low.c (linux_arch_string): New.
1235 (linux_target_ops): Add it.
1236 * linux-low.h (struct linux_target_ops): Add arch_string.
1237 * server.c (write_qxfer_response): Use const void * for DATA.
1238 (get_features_xml): New.
1239 (handle_query): Handle qXfer:features:read. Report it for qSupported.
1240 * target.h (struct target_ops): Add arch_string method.
1242 2007-01-03 Denis Pilat <denis.pilat@st.com>
1243 Daniel Jacobowitz <dan@codesourcery.com>
1245 * linux-low.c (linux_kill): Handle being called with no threads.
1246 * win32-i386-low.c (win32_kill): Likewise.
1247 (get_child_debug_event): Clear current_process_handle.
1249 2006-12-30 Denis PILAT <denis.pilat@st.com>
1250 Daniel Jacobowitz <dan@codesourcery.com>
1252 * remote-utils.c (remote_open): Check the type of specified
1253 serial port devices before opening them.
1254 * server.c (main): Kill the inferior if an error occurs during
1255 the first remote_open.
1257 2006-12-05 Markus Deuling <deuling@de.ibm.com>
1259 * README: Update supported targets.
1261 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
1263 * Makefile.in (clean): Remove reg-mips64.c.
1264 (reg-mips64.c, reg-mips64.o): New rules.
1265 * configure.srv: Handle mips64. Include regset support for mips.
1266 * linux-mips-low.c (union mips_register): New.
1267 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
1268 (mips_breakpoint, mips_breakpoint_at): Use int.
1269 (mips_collect_register, mips_supply_register)
1270 (mips_collect_register_32bit, mips_supply_register_32bit)
1271 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
1272 (mips_store_fpregset, target_regsets): New.
1273 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
1275 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
1277 * configure.srv: Add target "spu*-*-*".
1278 * Makefile.in (clean): Remove reg-spu.c.
1279 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
1280 * spu-low.c: New file.
1282 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
1284 * configure.ac: Correct td_thr_tls_get_addr test.
1285 * configure: Regenerated.
1287 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
1289 * linux-low.c (linux_wait_for_event): Reformat. Use the
1291 * remote-utils.c (decode_address_to_semicolon): New.
1292 * server.c (pass_signals, handle_general_set): New.
1293 (handle_query): Mention QPassSignals for qSupported.
1294 (main): Call handle_general_set.
1295 * server.h (pass_signals, decode_address_to_semicolon): New.
1297 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
1299 * server.c (handle_query): Correct error handling for read_auxv.
1301 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
1303 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
1304 and srv_linux_thread_db to yes.
1305 * linux-s390-low.c (s390_fill_gregset): New function.
1306 (target_regsets): Define data structure.
1308 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
1310 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
1311 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
1312 * config.in, configure: Regenerated.
1313 * inferiors.c (gdb_id_to_thread): New function.
1314 (gdb_id_to_thread_id): Use it.
1315 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
1316 * linux-low.h (struct process_info): Add th member.
1317 (thread_db_get_tls_address): New prototype.
1318 * remote-utils.c (decode_address): Make non-static.
1319 * server.c (handle_query): Handle qGetTLSAddr.
1320 * server.h (gdb_id_to_thread, decode_address): New prototypes.
1321 * target.h (struct target_ops): Add get_tls_address.
1322 * thread-db.c (maybe_attach_thread): Save the thread handle.
1323 (thread_db_get_tls_address): New.
1325 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
1327 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
1328 (linux_resume_one_process): Take a siginfo_t *. Update all
1329 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
1330 (struct pending_signals): Add a siginfo_t.
1331 (linux_wait_for_process): Always set last_status.
1332 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
1333 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
1334 * linux-low.h (struct process_info): Add last_status.
1336 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
1338 * remote-utils.c (try_rle): New function.
1339 (putpkt_binary): Use it.
1341 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
1343 * Makefile.in (clean): Clean reg-x86-64-linux.c.
1344 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
1345 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
1346 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
1347 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
1350 2006-08-08 Richard Sandiford <richard@codesourcery.com>
1352 * server.c (terminal_fd): New variable.
1353 (old_foreground_pgrp): Likewise.
1354 (restore_old_foreground_pgrp): New function.
1355 (start_inferior): Record the terminal file descriptor in terminal_fd
1356 and its original foreground group in old_foreground_pgrp. Register
1357 restore_old_foreground_pgrp with atexit().
1359 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
1361 * server.c (handle_query): Correct qPart to qXfer.
1363 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
1365 * configure.ac: Check for more headers which are missing on
1366 Windows. Automatically supply -lwsock32 and USE_WIN32API.
1367 * configure.srv: Add Cygwin and mingw32.
1368 * remote-utils.c: Don't include headers unconditionally which
1369 are missing on mingw32. Include <winsock.h> for mingw32.
1370 (remote_open): Adjust for mingw32 support. Flush
1371 standard error after writing to it.
1372 (remote_close, putpkt_binary, input_interrupt, block_async_io)
1373 (unblock_async_io, enable_async_io, disable_async_io)
1374 (readchar, getpkt): Update for Winsock support.
1375 (prepare_resume_reply): Expect a protocol signal number.
1376 * server.c: Disable <sys/wait.h> on mingw32.
1377 (start_inferior): Adjust for mingw32 support. Flush
1378 standard error after writing to it.
1379 (attach_inferior): Likewise. Use protocol signal
1381 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
1383 * win32-i386-low.c: New file.
1384 * Makefile.in (XM_CLIBS): Set.
1385 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
1386 (win32-i386-low.o): New dependency rule.
1387 * linux-low.c (linux_wait): Use target signal numbers.
1388 * target.h (struct target_ops): Doc fix.
1389 * server.h (target_signal_to_name): New prototype.
1390 * gdbreplay.c: Don't include headers unconditionally which
1391 are missing on mingw32. Include <winsock.h> for mingw32.
1392 (remote_close, remote_open): Adjust for Winsock support.
1393 * configure, config.in: Regenerated.
1395 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
1397 * server.c (decode_xfer_read, write_qxfer_response): New.
1398 (handle_query): Take a packet length argument. Handle
1399 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
1400 the qSupported response.
1401 (main): Update call to handle_query.
1403 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
1405 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
1406 (putpkt_binary): Renamed from putpkt and adjusted for binary
1408 (putpkt): New wrapper for putpkt_binary.
1409 (readchar): Don't mask off the high bit.
1410 (decode_X_packet): New function.
1411 * server.c (main): Call putpkt_binary if a handler sets the packet
1412 length. Save the length of the incoming packet. Handle 'X'.
1413 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
1415 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
1417 * server.c (handle_query): Handle qSupported.
1419 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
1421 * remote-utils.c (all_symbols_looked_up): New variable.
1422 (look_up_one_symbol): Check it.
1423 * server.h (look_up_one_symbol): New declaration.
1424 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
1426 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
1428 * Makefile.in (linux-arm-low.o): Update dependencies.
1429 * linux-arm-low.c: Include "gdb_proc_service.h".
1430 (PTRACE_GET_THREAD_AREA): Define.
1431 (ps_get_thread_area): New function.
1433 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
1435 * configure.srv (m68k*-*-uclinux*): New target.
1436 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
1437 (linux_resume_one_process): Remove extraneous cast.
1438 (linux_read_offsets): New.
1439 (linux_target_op): Add linux_read_offsets on mmuless systems.
1440 * server.c (handle_query): Add qOffsets logic.
1441 * target.h (struct target_ops): Add read_offsets.
1443 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
1445 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
1446 (PTRACE_GET_THREAD_AREA): Define.
1447 (ps_get_thread_area): New function.
1448 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
1449 (linux-x86-64-low.o): Update.
1451 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
1453 * configure.ac: Remove checks for prfpregset_t.
1454 * gdb_proc_service.h: New file.
1455 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
1456 new "gdb_proc_service.h".
1457 * proc-service.c: Likewise.
1458 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
1459 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
1460 * Makefile.in (gdb_proc_service_h): Updated.
1461 * configure, config.in: Regenerated.
1463 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
1465 * remote-utils.c (prepare_resume_reply): Move declaration
1466 of gdb_id_from_wait to the top of the block.
1468 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
1470 * linux-low.c (regsets_store_inferior_registers): Read the regset
1471 from the target before filling it.
1473 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
1475 * server.c (attach_inferior): Return SIGTRAP for a successful
1478 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
1480 * Makefile.in (OBS): Add version.o.
1481 (STAGESTUFF): Delete.
1482 (version.o): Add dependencies.
1483 (version.c): Replace rule.
1484 (clean): Remove version.c.
1485 * server.c (gdbserver_version): New.
1486 (gdbserver_usage): Use printf.
1487 (main): Handle --version and --help.
1488 * server.h (version, host_name): Add declarations.
1490 2005-12-23 Eli Zaretskii <eliz@gnu.org>
1502 * linux-x86-64-low.c:
1505 * linux-ppc64-low.c:
1514 * linux-crisv32-low.c:
1526 * gdbserver.1: Add (C) after Copyright. Update the FSF
1529 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
1531 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
1532 (arm_breakpoint_at): Recognize both breakpoints.
1533 (the_low_target): Use the correct breakpoint instruction.
1535 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
1537 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
1538 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
1539 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
1540 (the_low_target): Update.
1542 2005-10-25 Andreas Schwab <schwab@suse.de>
1544 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
1546 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
1547 (ia64_num_regs): Reduce to 462.
1549 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
1551 * acinclude.m4: Correct quoting.
1552 * aclocal.m4: Regenerated.
1554 Suggested by SZOKOVACS Robert <szo@ies.hu>:
1555 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
1556 (thread_db_init): Call thread_db_err_str.
1557 * configure.ac: Check for TD_VERSION.
1558 * config.in, configure: Regenerated.
1560 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1562 * server.h (error, fatal, warning): Add ATTR_FORMAT.
1564 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
1566 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
1567 is not available. Define HAVE_PTRACE_GETREGS if it is.
1568 * config.in, configure: Regenerated.
1569 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
1570 * linux-i386-low.c, linux-m68k-low.c: Update to use
1571 HAVE_PTRACE_GETREGS.
1572 * linux-low.c (regsets_fetch_inferior_registers)
1573 (regsets_store_inferior_registers): Only return 0 if we processed
1575 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
1576 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
1578 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
1580 * inferiors.c (struct thread_info): Add gdb_id.
1581 (add_thread): Add gdb_id argument.
1582 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
1583 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
1584 calls to add_thread.
1585 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
1586 * server.c (handle_query): Use thread_to_gdb_id.
1587 (handle_v_cont, main): Use gdb_id_to_thread_id.
1588 * server.h (add_thread): Update prototype.
1589 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
1592 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
1594 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
1595 left-padded registers.
1596 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
1597 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
1599 2005-07-01 Steve Ellcey <sje@cup.hp.com>
1601 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
1602 * configure: Regenerate.
1603 * config.in: Regenerate.
1604 * server.h (NEED_DECLARATION_STRERROR):
1605 Replace with !HAVE_DECL_STRERROR.
1607 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
1609 * linux-low.c (linux_wait, linux_send_signal): Don't test
1610 an unsigned long variable for > 0 if it could be MAX_ULONG.
1611 * server.c (myresume): Likewise.
1612 * target.c (set_desired_inferior): Likewise.
1614 2005-06-13 Mark Kettenis <kettenis@gnu.org>
1616 * configure.ac: Simplify and improve check for socklen_t.
1617 * configure, config.in: Regenerate.
1619 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
1621 * acconfig.h: Remove.
1622 * configure.ac: Add a test for socklen_t. Use three-argument
1623 AC_DEFINE throughout.
1624 * config.in: Regenerated using autoheader 2.59.
1625 * configure: Regenerated.
1627 * gdbreplay.c (socklen_t): Provide a default.
1628 (remote_open): Use socklen_t.
1629 * remote-utils.c (socklen_t): Provide a default.
1630 (remote_open): Use socklen_t.
1631 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
1634 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
1636 * linux-low.c (linux_read_memory, linux_write_memory)
1637 (linux_read_auxv): Likewise.
1638 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
1639 (check_mem_write): Likewise.
1640 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
1642 * regcache.c (struct inferior_rgcache_data, registers_to_string)
1643 (registers_from_string, register_data): Likewise.
1644 * server.c (handle_query, main): Likewise.
1645 * server.h (convert_ascii_to_int, convert_int_to_ascii)
1646 (decode_M_packet): Likewise.
1647 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
1648 * target.h (struct target_ops): Update read_memory, write_memory,
1650 (read_inferior_memory, write_inferior_memory): Update.
1651 * linux-low.h (struct linux_target_ops): Change type of breakpoint
1653 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
1654 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
1655 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
1656 linux-s390-low.c, linux-sh-low.c: Update for changes in
1657 read_inferior_memory and the_low_target->breakpoint.
1659 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
1661 * Makefile.in (SFILES): Add linux-ppc64-low.c.
1662 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
1663 * configure.srv: Add powerpc64-*-linux*.
1664 * linux-ppc64-low.c: New file.
1666 2005-05-23 Orjan Friberg <orjanf@axis.com>
1668 * linux-cris-low.c: New file with support for CRIS.
1669 * linux-crisv32-low.c: Ditto for CRISv32.
1670 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
1671 (clean): Add reg-cris.c and reg-crisv32.c.
1672 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
1673 reg-crisv32.o, and reg-crisv32.c to make rules.
1674 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
1677 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
1679 * linux-low.c (fetch_register): Ensure buffer size is a multiple
1680 of sizeof (PTRACE_XFER_TYPE).
1681 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
1683 2005-05-12 Orjan Friberg <orjanf@axis.com>
1685 * target.h (struct target_ops): Add insert_watchpoint,
1686 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
1687 pointers for hardware watchpoint support.
1688 * linux-low.h (struct linux_target_ops): Ditto.
1689 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
1690 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
1691 to linux_target_ops.
1692 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
1694 * server.c (main): Recognize 'Z' and 'z' packets.
1696 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
1698 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
1699 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
1700 (the_low_target): Add new members.
1702 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
1704 * proc-service.c (ps_lgetregs): Search all_processes instead of
1707 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
1709 * server.c (start_inferior): Change return type to int.
1710 (attach_inferior): Change sigptr to int *.
1711 (handle_v_cont, handle_v_requests): Change signal to int *.
1712 (main): Change signal to int.
1714 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
1716 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
1717 * configure.srv: Add m32r*-*-linux*.
1718 * linux-m32r-low.c: New file.
1720 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
1722 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
1724 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
1726 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
1727 Take unsigned long arguments for PIDs.
1728 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
1729 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
1730 (wait_for_sigstop, linux_resume_one_process)
1731 (regsets_fetch_inferior_registers, linux_send_signal)
1732 (linux_read_auxv): Likewise. Update the types of variables holding
1733 PIDs. Update format string specifiers.
1734 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
1735 * remote-utils.c (prepare_resume_reply): Likewise.
1736 * server.c (cont_thread, general_thread, step_thread)
1737 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
1739 (handle_query): Update format specifiers.
1740 (handle_v_cont, main): Use strtoul for thread IDs.
1741 * server.h (struct inferior_list_entry): Use unsigned long for ID.
1742 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
1743 (general_thread, step_thread, thread_from_wait)
1744 (old_thread_from_wait): Update.
1745 * target.h (struct thread_resume): Use unsigned long for THREAD.
1746 (struct target_ops): Use unsigned long for arguments to attach and
1749 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
1751 * acinclude.m4: Include bfd/bfd.m4 directly.
1752 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
1753 <agriffis@toolchain.org>.
1754 * aclocal.m4, configure: Regenerated.
1756 2005-01-07 Andrew Cagney <cagney@gnu.org>
1758 * configure.ac: Rename configure.in, require autoconf 2.59.
1759 * configure: Re-generate.
1761 2004-12-08 Daniel Jacobowitz <dan@debian.org>
1763 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
1765 * aclocal.m4: Regenerated.
1766 * configure: Regenerated.
1768 2004-11-21 Andreas Schwab <schwab@suse.de>
1770 * linux-m68k-low.c (m68k_num_gregs): Define.
1771 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
1772 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
1773 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
1774 (m68k_breakpoint_at): New. Add to the_low_target.
1776 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
1777 srv_linux_thread_db to yes.
1779 2004-10-20 Joel Brobecker <brobecker@gnat.com>
1781 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
1782 (ARCH_SET_FS): Likewise.
1783 (ARCH_GET_FS): Likewise.
1784 (ARCH_GET_GS): Likewise.
1786 2004-10-16 Daniel Jacobowitz <dan@debian.org>
1788 * linux-i386-low.c (ps_get_thread_area): New.
1789 * linux-x86-64-low.c (ps_get_thread_area): New.
1790 * linux-low.c: Include <sys/syscall.h>.
1791 (linux_kill_one_process): Don't kill the first thread here.
1792 (linux_kill): Kill the first thread here.
1793 (kill_lwp): New function.
1794 (send_sigstop, linux_send_signal): Use it.
1795 * proc-service.c: Clean up #ifdefs.
1796 (fpregset_info): Delete.
1797 (ps_lgetregs): Update and enable implementation.
1798 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
1800 * remote-utils.c (struct sym_cache, symbol_cache): New.
1801 (input_interrupt): Print a clearer message.
1802 (async_io_enabled): New variable.
1803 (enable_async_io, disable_async_io): Use it. Update comments.
1804 (look_up_one_symbol): Use the symbol cache.
1805 * thread-db.c (thread_db_look_up_symbols): New function.
1806 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
1808 2004-10-16 Daniel Jacobowitz <dan@debian.org>
1810 * configure.in: Test for -rdynamic.
1811 * configure: Regenerated.
1812 * Makefile (INTERNAL_LDFLAGS): New.
1813 (gdbserver, gdbreplay): Use it.
1815 2004-09-02 Andrew Cagney <cagney@gnu.org>
1817 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
1819 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
1821 * linux-low.c (linux_wait): Clear all_processes list also.
1823 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
1825 * linux-low.c: Include <errno.h>. Remove extern declaration of
1828 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
1830 * gdbreplay.c, server.h, utils.c: Update copyright years.
1832 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
1834 * server.c (main): Print child status or termination signal from
1835 variable 'signal', not 'sig'.
1837 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
1839 * linux-low.c (linux_read_memory): Change return type to
1840 int. Check for and return error from ptrace().
1841 * target.c (read_inferior_memory): Change return type to int. Pass
1842 back return status from the_target->read_memory().
1843 * target.h (struct target_ops): Adapt *read_memory() prototype.
1845 (read_inferior_memory): Adapt prototype.
1846 * server.c (main): Return an error packet if
1847 read_inferior_memory() returns an error.
1849 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
1851 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
1852 Unify with other clean targets.
1854 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
1856 * server.c (handle_v_cont): Call set_desired_inferior.
1858 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
1860 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
1862 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
1864 * linux-low.c (linux_wait): Unblock async I/O.
1865 (linux_resume): Block and enable async I/O.
1866 * remote-utils.c (block_async_io, unblock_async_io): New functions.
1867 * server.h (block_async_io, unblock_async_io): Add prototypes.
1869 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
1871 * remote-utils.c (remote_open): Print a status notice after
1873 * server.c (attach_inferior): Print a status notice after
1876 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
1878 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
1880 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
1882 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
1884 * server.c, target.h: Update copyright years.
1886 2004-02-25 Roland McGrath <roland@redhat.com>
1888 * target.h (struct target_ops): New member `read_auxv'.
1889 * server.c (handle_query): Handle qPart:auxv:read: query using that.
1890 * linux-low.c (linux_read_auxv): New function.
1891 (linux_target_ops): Initialize `read_auxv' member to that.
1893 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1895 Committed by Jim Blandy <jimb@redhat.com>.
1897 * linux-s390-low.c (s390_num_regs): Update.
1898 (s390_regmap): Remove control registers. Use __s390x__ predefine
1899 instead of GPR_SIZE to distiguish s390 and s390x targets.
1901 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
1903 * linux-low.c: Update copyright year.
1904 (check_removed_breakpoint): Clear pending_is_breakpoint.
1905 (linux_set_resume_request, linux_queue_one_thread)
1906 (resume_status_pending_p): New functions.
1907 (linux_continue_one_thread): Use process->resume.
1908 (linux_resume): Only resume threads if there are no pending events.
1909 * linux-low.h (struct process_info): Add resume request
1912 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
1914 * regcache.c (new_register_cache): Clear the allocated register
1915 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
1917 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
1919 * linux-low.c (linux_resume): Take a struct thread_resume *
1921 (linux_wait): Update call.
1922 (resume_ptr): New static variable.
1923 (linux_continue_one_thread): Renamed from
1924 linux_continue_one_process. Use resume_ptr.
1925 (linux_resume): Use linux_continue_one_thread.
1926 * server.c (handle_v_cont, handle_v_requests): New functions.
1927 (myresume): New function.
1928 (main): Handle 'v' case.
1929 * target.h (struct thread_resume): New type.
1930 (struct target_ops): Change argument of "resume" to struct
1932 (myresume): Delete macro.
1934 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
1936 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
1937 (uninstall): Support DESTDIR.
1939 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
1941 * configure.srv: Add xscale*linux copy of arm*linux entry.
1943 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
1945 * linux-arm-low.c (arm_reinsert_addr): New function.
1946 (the_low_target): Add arm_reinsert_addr.
1948 2003-07-08 Mark Kettenis <kettenis@gnu.org>
1950 * mem-break.c: Remove whitespace at end of file.
1952 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
1954 * configure.in: Check whether we need to prototype strerror.
1955 * server.h: Optionally prototype strerror.
1956 * gdbreplay.c (perror_with_name): Use strerror.
1957 * linux-low.c (linux_attach_lwp): Use strerror.
1958 * utils.c (perror_with_name): Use strerror.
1959 * config.in, configure: Regenerated.
1961 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
1963 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
1964 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
1966 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
1968 * Makefile.in (SFILES): Update.
1969 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
1970 low-sun3.c: Remove files.
1972 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
1974 * linux-low.c: Move comment to linux_thread_alive where it belonged.
1975 (linux_detach_one_process, linux_detach): New functions.
1976 (linux_target_ops): Add linux_detach.
1977 * server.c (main): Handle 'D' packet.
1978 * target.h (struct target_ops): Add "detach" member.
1979 (detach_inferior): Define.
1981 2003-06-13 Mark Kettenis <kettenis@gnu.org>
1983 From Kelley Cook <kelleycook@wideopenwest.com>:
1984 * configure.srv: Accept i[34567]86 variants.
1986 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
1988 * linux-low.c (linux_wait_for_event): Correct comment typos.
1989 (linux_resume_one_process): Call check_removed_breakpoint.
1990 (linux_send_signal): New function.
1991 (linux_target_ops): Add linux_send_signal.
1992 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
1994 * target.h (struct target_ops): Add send_signal.
1996 2003-05-29 Jim Blandy <jimb@redhat.com>
1998 * linux-low.c (usr_store_inferior_registers): Transfer buf in
1999 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
2000 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
2001 away part of the register's value.
2003 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
2005 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
2006 (linux_wait_for_event, linux_init_signals): Likewise.
2008 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
2010 * configure.in: Check for stdlib.h.
2011 * configure: Regenerated.
2012 * config.in: Regenerated.
2014 2003-01-04 Andreas Schwab <schwab@suse.de>
2016 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
2018 2003-01-02 Andrew Cagney <ac131313@redhat.com>
2020 * Makefile.in: Remove obsolete code.
2022 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
2024 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
2025 defined(PT_FPR0_HI).
2027 2002-11-17 Stuart Hughes <seh@zee2.com>
2029 * linux-arm-low.c (arm_num_regs): Increase.
2030 (arm_regmap): Include status register.
2032 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
2034 * linux-low.c (register_addr): Remove incorrect -1 check.
2036 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
2038 * linux-low.c (linux_create_inferior): Call setpgid. Return
2040 (unstopped_p, linux_signal_pid): Remove.
2041 (linux_target_ops): Remove linux_signal_pid.
2042 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
2043 global instead of target method.
2044 * target.h (struct target_ops): Remove signal_pid. Update comment
2045 for create_inferior.
2046 * server.c (signal_pid): New variable.
2047 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
2048 gdbserver. Set the child to be the foreground process group.
2049 (attach_inferior): Set signal_pid.
2051 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
2053 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
2055 2002-08-20 Jim Blandy <jimb@redhat.com>
2057 * Makefile.in (LDFLAGS): Allow the configure script to establish a
2060 2002-08-01 Andrew Cagney <cagney@redhat.com>
2062 * Makefile.in: Make chill references obsolete.
2064 2002-07-24 Kevin Buettner <kevinb@redhat.com>
2066 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
2067 * configure: Regenerate.
2068 * config.in: Regenerate.
2070 2002-07-09 David O'Brien <obrien@FreeBSD.org>
2072 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
2073 (perror_with_name, remote_close, remote_open, expect, play): Static.
2075 2002-07-04 Michal Ludvig <mludvig@suse.cz>
2077 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
2078 byte offsets instead of an array of indexes.
2079 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
2081 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
2083 * regcache.c: Add comment.
2085 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
2087 * thread-db.c: New file.
2088 * proc-service.c: New file.
2089 * acinclude.m4: New file.
2090 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
2091 proc-service.o, and thread-db.o.
2092 (linux-low.o): Add USE_THREAD_DB.
2093 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
2094 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
2095 * aclocal.m4: Regenerated.
2096 * config.in: Regenerated.
2097 * configure: Regenerated.
2098 * configure.in: Check for proc_service.h, sys/procfs.h,
2099 thread_db.h, and linux/elf.h headrs.
2100 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
2101 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
2102 Check for -lthread_db and thread support.
2103 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
2104 PowerPC, and SuperH.
2105 * i387-fp.c: Constify arguments.
2106 * i387-fp.h: Likewise.
2107 * inferiors.c: (struct thread_info): Renamed from
2108 `struct inferior_info'. Remove PID member. Use generic inferior
2109 list header. All uses updated.
2110 (inferiors, signal_pid): Removed.
2111 (all_threads): New variable.
2112 (get_thread): Define.
2113 (add_inferior_to_list): New function.
2114 (for_each_inferior): New function.
2115 (change_inferior_id): New function.
2116 (add_inferior): Removed.
2117 (remove_inferior): New function.
2118 (add_thread): New function.
2119 (free_one_thread): New function.
2120 (remove_thread): New function.
2121 (clear_inferiors): Use for_each_inferior and free_one_thread.
2122 (find_inferior): New function.
2123 (find_inferior_id): New function.
2124 (inferior_target_data): Update argument type.
2125 (set_inferior_target_data): Likewise.
2126 (inferior_regcache_data): Likewise.
2127 (set_inferior_regcache_data): Likewise.
2128 * linux-low.c (linux_bp_reinsert): Remove.
2129 (all_processes, stopping_threads, using_thrads)
2130 (struct pending_signals, debug_threads, pid_of): New.
2131 (inferior_pid): Replace with macro.
2132 (struct inferior_linux_data): Remove.
2133 (get_stop_pc, add_process): New functions.
2134 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
2135 Use add_process and add_thread.
2136 (linux_attach_lwp): New function, based on old linux_attach. Use
2137 add_process and add_thread. Set stop_expected for new threads.
2138 (linux_attach): New function.
2139 (linux_kill_one_process): New function.
2140 (linux_kill): Kill all LWPs.
2141 (linux_thread_alive): Use find_inferior_id.
2142 (check_removed_breakpoints, status_pending_p): New functions.
2143 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
2144 Update. Use WNOHANG. Wait for cloned processes also. Update process
2145 struct for the found process.
2146 (linux_wait_for_event): New function.
2147 (linux_wait): Use it. Support LWPs.
2148 (send_sigstop, wait_for_sigstop, stop_all_processes)
2149 (linux_resume_one_process, linux_continue_one_process): New functions.
2150 (linux_resume): Support LWPs.
2151 (REGISTER_RAW_SIZE): Remove.
2152 (fetch_register): Use register_size instead. Call supply_register.
2153 (usr_store_inferior_registers): Likewise. Call collect_register.
2155 (regsets_fetch_inferior_registers): Improve error message.
2156 (regsets_store_inferior_registers): Add debugging.
2157 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
2158 (unstopped_p, linux_signal_pid): New functions.
2159 (linux_target_ops): Add linux_signal_pid.
2160 (linux_init_signals): New function.
2161 (initialize_low): Call it. Initialize using_threads.
2162 * regcache.c (inferior_regcache_data): Add valid
2164 (get_regcache): Fetch registers lazily. Add fetch argument
2165 and update all callers.
2166 (regcache_invalidate_one, regcache_invalidate): New
2168 (new_register_cache): Renamed from create_register_cache.
2169 Return the new regcache.
2170 (free_register_cache): Change argument to a void *.
2171 (registers_to_string, registers_from_string): Call get_regcache
2172 with fetch flag set.
2173 (register_data): Make static. Pass fetch flag to get_regcache.
2174 (supply_register): Call get_regcache with fetch flag clear.
2175 (collect_register): Call get_regcache with fetch flag set.
2176 (collect_register_as_string): New function.
2177 * regcache.h: Update.
2178 * remote-utils.c (putpkt): Flush after debug output and use
2180 Handle input interrupts while waiting for an ACK.
2181 (input_interrupt): Use signal_pid method.
2182 (getpkt): Flush after debug output and use stderr.
2183 (outreg): Use collect_register_as_string.
2184 (new_thread_notify, dead_thread_notify): New functions.
2185 (prepare_resume_reply): Check using_threads. Set thread_from_wait
2187 (look_up_one_symbol): Flush after debug output.
2188 * server.c (step_thread, server_waiting): New variables.
2189 (start_inferior): Don't use signal_pid. Update call to mywait.
2190 (attach_inferior): Update call to mywait.
2191 (handle_query): Handle qfThreadInfo and qsThreadInfo.
2192 (main): Don't fetch/store registers explicitly. Use
2193 set_desired_inferior. Support proposed ``Hs'' packet. Update
2196 (struct inferior_list, struct_inferior_list_entry): New.
2197 * target.c (set_desired_inferior): New.
2198 (write_inferior_memory): Constify.
2199 (mywait): New function.
2201 (struct target_ops): New signal_pid method.
2202 (mywait): Removed macro, added prototype.
2204 * linux-low.h (regset_func): Removed.
2205 (regset_fill_func, regset_store_func): New.
2206 (enum regset_type): New.
2207 (struct regset_info): Add type field. Use new operation types.
2208 (struct linux_target_ops): stop_pc renamed to get_pc.
2209 Add decr_pc_after_break and breakpoint_at.
2210 (get_process, get_thread_proess, get_process_thread)
2211 (strut process_info, all_processes, linux_attach_lwp)
2212 (thread_db_init): New.
2214 * linux-arm-low.c (arm_get_pc, arm_set_pc,
2215 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
2216 (the_low_target): Add new members.
2217 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
2218 (i386_store_fpxregset): Constify.
2219 (target_regsets): Add new kind identifier.
2220 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
2221 (i386_set_pc): Add debugging.
2222 (i386_breakpoint_at): New function.
2223 (the_low_target): Add new members.
2224 * linux-mips-low.c (mips_get_pc, mips_set_pc)
2225 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
2226 (mips_breakpoint_at): New.
2227 (the_low_target): Add new members.
2228 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
2229 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
2230 (the_low_target): Add new members.
2231 * linux-sh-low.c (sh_get_pc, sh_set_pc)
2232 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
2233 (the_low_target): Add new members.
2234 * linux-x86-64-low.c (target_regsets): Add new kind
2237 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
2239 From Martin Pool <mbp@samba.org>:
2240 * server.c (gdbserver_usage): New function.
2243 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
2245 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
2248 2002-05-04 Andrew Cagney <ac131313@redhat.com>
2250 * Makefile.in: Remove obsolete code.
2252 2002-04-24 Michal Ludvig <mludvig@suse.cz>
2254 * linux-low.c (regsets_fetch_inferior_registers),
2255 (regsets_store_inferior_registers): Removed cast to int from
2257 * regcache.h: Added declaration of struct inferior_info.
2259 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
2261 * inferiors.c (struct inferior_info): Add regcache_data.
2262 (add_inferior): Call create_register_cache.
2263 (clear_inferiors): Call free_register_cache.
2264 (inferior_regcache_data, set_inferior_regcache_data): New functions.
2265 * regcache.c (struct inferior_regcache_data): New.
2266 (registers): Remove.
2267 (get_regcache): New function.
2268 (create_register_cache, free_register_cache): New functions.
2269 (set_register_cache): Don't initialize the register cache here.
2270 (registers_to_string, registers_from_string, register_data): Call
2272 * regcache.h: Add prototypes.
2273 * server.h: Likewise.
2275 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
2277 * mem-break.c: New file.
2278 * mem-break.h: New file.
2279 * Makefile.in: Add mem-break.o rule; update server.h
2281 * inferiors.c (struct inferior_info): Add target_data
2283 (clear_inferiors): Free target_data member if set.
2284 (inferior_target_data, set_inferior_target_data): New functions.
2285 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
2286 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
2287 * linux-low.c (linux_bp_reinsert): New variable.
2288 (struct inferior_linux_data): New.
2289 (linux_create_inferior): Use set_inferior_target_data.
2290 (linux_attach): Likewise. Call add_inferior.
2291 (linux_wait_for_one_inferior): New function.
2292 (linux_wait): Call it.
2293 (linux_write_memory): Add const.
2294 (initialize_low): Call set_breakpoint_data.
2295 * linux-low.h (struct linux_target_ops): Add breakpoint
2297 * server.c (attach_inferior): Remove extra add_inferior
2299 * server.h: Include mem-break.h. Update inferior.c
2301 * target.c (read_inferior_memory)
2302 (write_inferior_memory): New functions.
2303 * target.h (read_inferior_memory)
2304 (write_inferior_memory): Change macros to prototypes.
2305 (struct target_ops): Update comments. Add const to write_memory
2308 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
2310 * linux-low.c (usr_store_inferior_registers): Support
2311 registers which are allowed to fail to store.
2312 * linux-low.h (linux_target_ops): Likewise.
2313 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
2314 (ppc_cannot_store_register): FPSCR may not be storable.
2316 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
2318 * server.h: Include <string.h> if HAVE_STRING_H.
2319 * ChangeLog: Correct paths in last ChangeLog entry.
2321 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
2323 * linux-low.h: Remove obsolete prototypes.
2324 (struct linux_target_ops): New.
2325 (extern the_low_target): New.
2326 * linux-low.c (num_regs, regmap): Remove declarations.
2327 (register_addr): Use the_low_target explicitly.
2328 (fetch_register): Likewise.
2329 (usr_fetch_inferior_registers): Likewise.
2330 (usr_store_inferior_registers): Likewise.
2331 * linux-arm-low.c (num_regs): Remove.
2332 (arm_num_regs): Define.
2333 (arm_regmap): Renamed from regmap, made static.
2334 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
2336 (arm_cannot_store_register): Renamed from cannot_store_register,
2338 (the_low_target): New.
2339 * linux-i386-low.c (num_regs): Remove.
2340 (i386_num_regs): Define.
2341 (i386_regmap): Renamed from regmap, made static.
2342 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
2344 (i386_cannot_store_register): Renamed from cannot_store_register,
2346 (the_low_target): New.
2347 * linux-ia64-low.c (num_regs): Remove.
2348 (ia64_num_regs): Define.
2349 (ia64_regmap): Renamed from regmap, made static.
2350 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
2352 (ia64_cannot_store_register): Renamed from cannot_store_register,
2354 (the_low_target): New.
2355 * linux-m68k-low.c (num_regs): Remove.
2356 (m68k_num_regs): Define.
2357 (m68k_regmap): Renamed from regmap, made static.
2358 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
2360 (m68k_cannot_store_register): Renamed from cannot_store_register,
2362 (the_low_target): New.
2363 * linux-mips-low.c (num_regs): Remove.
2364 (mips_num_regs): Define.
2365 (mips_regmap): Renamed from regmap, made static.
2366 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
2368 (mips_cannot_store_register): Renamed from cannot_store_register,
2370 (the_low_target): New.
2371 * linux-ppc-low.c (num_regs): Remove.
2372 (ppc_num_regs): Define.
2373 (ppc_regmap): Renamed from regmap, made static.
2374 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
2376 (ppc_cannot_store_register): Renamed from cannot_store_register,
2378 (the_low_target): New.
2379 * linux-s390-low.c (num_regs): Remove.
2380 (s390_num_regs): Define.
2381 (s390_regmap): Renamed from regmap, made static.
2382 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
2384 (s390_cannot_store_register): Renamed from cannot_store_register,
2386 (the_low_target): New.
2387 * linux-sh-low.c (num_regs): Remove.
2388 (sh_num_regs): Define.
2389 (sh_regmap): Renamed from regmap, made static.
2390 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
2392 (sh_cannot_store_register): Renamed from cannot_store_register,
2394 (the_low_target): New.
2395 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
2396 (the_low_target): New.
2398 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
2400 * Makefile.in: Add stamp-h target.
2401 * configure.in: Create stamp-h.
2402 * configure: Regenerated.
2404 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
2406 * inferiors.c: New file.
2407 * target.c: New file.
2408 * target.h: New file.
2409 * Makefile.in: Add target.o and inferiors.o. Update
2411 * linux-low.c (inferior_pid): New static variable,
2412 moved from server.c.
2413 (linux_create_inferior): Renamed from create_inferior.
2414 Call add_inferior. Return 0 on success instead of a PID.
2415 (linux_attach): Renamed from myattach.
2416 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
2417 (linux_thread_alive): Renamed from mythread_alive.
2418 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
2420 (linux_resume): Renamed from myresume. Add missing ``return 0''.
2421 (regsets_store_inferior_registers): Correct error message.
2422 Add missing ``return 0''.
2423 (linux_fetch_registers): Renamed from fetch_inferior_registers.
2424 (linux_store_registers): Renamed from store_inferior_registers.
2425 (linux_read_memory): Renamed from read_inferior_memory.
2426 (linux_write_memory): Renamed from write_inferior_memory.
2427 (linux_target_ops): New structure.
2428 (initialize_low): Call set_target_ops ().
2429 * remote-utils.c (unhexify): New function.
2430 (hexify): New function.
2431 (input_interrupt): Send signals to ``signal_pid''.
2432 * server.c (inferior_pid): Remove.
2433 (start_inferior): Update create_inferior call.
2434 (attach_inferior): Call add_inferior.
2435 (handle_query): New function.
2436 (main): Call handle_query for `q' packets.
2437 * server.h: Include "target.h". Remove obsolete prototypes.
2438 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
2440 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
2442 * Makefile.in: Add WARN_CFLAGS. Update configury
2444 * configure.in: Check for <string.h>
2445 * configure: Regenerate.
2446 * config.in: Regenerate.
2447 * gdbreplay.c: Include needed system headers.
2448 (remote_open): Remove strchr prototype.
2449 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
2450 * regcache.c (supply_register): Change buf argument to const void *.
2451 (supply_register_by_name): Likewise.
2452 (collect_register): Change buf argument to void *.
2453 (collect_register_by_name): Likewise.
2454 * regcache.h: Add missing prototypes.
2455 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
2456 * server.c (handle_query): New function.
2457 (attached): New static variable, moved out of main.
2458 (main): Quiet longjmp clobber warnings.
2459 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
2460 * utils.c (error): Remove NORETURN.