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