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