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