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