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