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