]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/gdbserver/ChangeLog
daily update
[thirdparty/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
7a9dd1b2
TT
12011-04-19 Tom Tromey <tromey@redhat.com>
2
3 * win32-low.c (handle_load_dll): Remove duplicate "the".
4
81239425
PM
52011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
6
7 Remove support for old Cygwin 1.5 versions.
8 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
9 function to avoid warning.
10 (win32_add_one_solib): Use cygwin_conv_path function to avoid
11 warning.
12
9e0627f1
PM
132011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
14
15 * gdbserver/server.h (Macro _): Define it if not available.
16
588eebee
MS
172011-03-14 Michael Snyder <msnyder@vmware.com>
18
348af9f7 19 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 20
43f70d4c
JB
212011-03-10 Joel Brobecker <brobecker@adacore.com>
22
23 * Makefile.in (maintainer-clean realclean distclean): Remove
24 "make ... subdir_do" command.
25
348af9f7
MS
262011-03-10 Michael Snyder <msnyder@vmware.com>
27
28 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
29
30 * server.c (handle_v_run): Free alloced buffer on early return.
31
e637a4f5
YQ
322011-03-09 Yao Qi <yao@codesourcery.com>
33
34 Revert:
35 2011-03-04 Yao Qi <yao@codesourcery.com>
36
37 * Makefile.in: Remove GNU make feature --directory.
38
39 2011-03-05 Yao Qi <yao@codesourcery.com>
40
41 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
42 (subdir_do): New make target. Copied from gdb/Makefile.
43 (maintainer-clean, realclean, distclean, clean): Call corresponding
44 make targets in common/Makefile.
45
46 2011-02-11 Yao Qi <yao@codesourcery.com>
47
48 * configure.ac: Call AC_PROG_RANLIB.
49 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
50 * configure: Regenerate.
51
e6edda56
JK
522011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
53
54 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
55
e5141119
JB
562011-03-06 Yao Qi <yao@codesourcery.com>
57
58 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
59
64794aa4
JB
602011-03-05 Yao Qi <yao@codesourcery.com>
61
62 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
63 (subdir_do): New make target. Copied from gdb/Makefile.
64 (maintainer-clean, realclean, distclean, clean): Call corresponding
65 make targets in common/Makefile.
66
7a762829
YQ
672011-03-04 Yao Qi <yao@codesourcery.com>
68
69 * Makefile.in: Remove GNU make feature --directory.
70
348af9f7
MS
712011-03-04 Michael Snyder <msnyder@vmware.com>
72
73 * server.c (queue_stop_reply): Call xmalloc not malloc.
74
752011-03-02 Michael Snyder <msnyder@vmware.com>
76
77 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
78
9f72fee2
MS
792011-02-28 Michael Snyder <msnyder@vmware.com>
80
588eebee
MS
81 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
82 (cmd_qtframe): Ditto.
83 (cmd_qtbuffer): Ditto.
84 (cmd_bigqtbuffer): Ditto.
85
9f72fee2
MS
86 * utils.c (decimal2str): Initialize 'width' to nine, then
87 don't mess with it.
88
8040bd49
UW
892011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
90
91 * hostio.c (require_data): Free *data, not data.
92
7e52cbd0
JK
932011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
94
95 * hostio.c (require_data): Use free, not xfree.
96
9130f83e
MS
972011-02-27 Michael Snyder <msnyder@vmware.com>
98
4b812f4e
MS
99 * server.c (handle_query): Discard unused value.
100
9130f83e
MS
101 * hostio.c (require_data): Free malloc memory before returning
102 error.
103
69d37113
MS
1042011-02-26 Michael Snyder <msnyder@vmware.com>
105
106 * linux-low.c (list_threads): Call closedir for dirent.
107
35f5825a
MS
1082011-02-27 Michael Snyder <msnyder@vmware.com>
109
2a589cef
MS
110 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
111 a case statement falls through.
112
0adea5f7
MS
113 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
114
35f5825a
MS
115 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
116 in comparison.
117
238f1c74
MS
1182011-02-26 Michael Snyder <msnyder@vmware.com>
119
120 * utils.c (decimal2str): Eliminate dead code and dead param.
121 (pulongest): Drop dead param from call to decimal2str.
122 (plongest): Ditto.
123
633ff500
JB
1242011-02-24 Joel Brobecker <brobecker@adacore.com>
125
126 Revert the following patch (not approved yet):
127 2011-02-21 Hui Zhu <teawater@gmail.com>
128 * tracepoint.c (tp_printf): New function.
129 (eval_agent_expr): Handle gdb_agent_op_printf.
130
f9c6ff72
HZ
1312011-02-21 Hui Zhu <teawater@gmail.com>
132
133 * tracepoint.c (tp_printf): New function.
134 (eval_agent_expr): Handle gdb_agent_op_printf.
135
94d5e490
TT
1362011-02-18 Tom Tromey <tromey@redhat.com>
137
138 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
139 (tracepoint.o): Likewise.
140 * tracepoint.c (enum gdb_agent_op): Use ax.def.
141 (gdb_agent_op_names): Likewise.
142
c7f96d2b
TT
1432011-02-18 Tom Tromey <tromey@redhat.com>
144
145 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
146 gdb_agent_op_rot>: New constants.
147 (gdb_agent_op_names): Add pick and roll.
148 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
149 cases.
150
0feedb2c
JK
1512011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
152
153 * aclocal.m4: Regenerated with aclocal-1.11.1.
154
b3b9301e
PA
1552011-02-14 Pedro Alves <pedro@codesourcery.com>
156
157 * server.c (handle_qxfer_traceframe_info): New.
158 (qxfer_packets): Register "traceframe-info".
159 (handle_query): Report support for qXfer:traceframe-info:read+.
160 * tracepoint.c (match_blocktype): New.
161 (traceframe_find_block_type): Rename to ...
162 (traceframe_walk_blocks): ... this. Add callback filter argument,
163 and use it.
164 (traceframe_find_block_type): New, reimplemented on top of
165 traceframe_walk_blocks.
166 (build_traceframe_info_xml): New.
167 (traceframe_read_info): New.
168 * server.h (traceframe_read_info): Declare.
169
4f3e6fb7
YQ
1702011-02-11 Yao Qi <yao@codesourcery.com>
171
172 * configure.ac: Call AC_PROG_RANLIB.
173 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
174 * configure: Regenerate.
175
764880b7
PA
1762011-02-07 Pedro Alves <pedro@codesourcery.com>
177
178 * server.c (gdb_read_memory): Change return semantics to allow
179 partial transfers.
180 (handle_search_memory_1): Adjust.
181 (process_serial_event) <'m' packet>: Handle partial transfers.
182 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
183
1c79eb8a
PA
1842011-01-28 Pedro Alves <pedro@codesourcery.com>
185
186 * regcache.c (init_register_cache): Initialize
187 regcache->register_status.
188 (free_register_cache): Release regcache->register_status.
189 (regcache_cpy): Copy register_status.
190 (registers_to_string): Print 'x's for unavailable registers.
191 (supply_register): Mark the register's status valid or
192 unavailable, depending on whether a buffer was passed in or not.
193 (supply_register_zeroed): New.
194 (supply_regblock): Mark the registers' status valid or
195 unavailable, depending on whether a buffer was passed in or not.
196 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
197 (struct regcache): New `register_status' field.
198 (supply_register_zeroed): Declare.
199 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
200 supply_register_zeroed, rather than passing a NULL buffer to
201 supply_register.
202 * tracepoint.c (fetch_traceframe_registers): Update comment.
203
85724a0e
PA
2042011-01-28 Pedro Alves <pedro@codesourcery.com>
205
206 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
207 buffer explicit.
208
d08aafef
PA
2092011-01-25 Pedro Alves <pedro@codesourcery.com>
210
211 * server.h (decode_xfer_write): Change prototype.
212 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
213 and don't extract the annex here.
214 * server.c (decode_xfer_read): Remove `annex' parameter,
215 and don't extract the annex here.
216 (decode_xfer): New.
217 (struct qxfer): New.
218 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
219 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
220 (handle_qxfer_statictrace): New functions, abstracted out from
221 handle_query, and made to use the struct qxfer interface.
222 (handle_threads_qxfer_proper): Rename to ...
223 (handle_qxfer_threads_proper): ... this.
224 (handle_threads_qxfer): Rename to ...
225 (handle_qxfer_threads): ... this. Adjust.
226 (qxfer_packets): New array.
227 (handle_qxfer): New function.
228 (handle_query): Use handle_qxfer.
229
493e2a69
MS
2302011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
231
232 * gdbreplay.c: Shorten lines of >= 80 columns.
233 * linux-low.c: Ditto.
234 * linux-ppc-low.c: Ditto.
235 * linux-s390-low.c: Ditto.
236 * linux-sparc-low.c: Ditto.
237 * linux-x86-low.c: Ditto.
238 * linux-xtensa-low.c: Ditto.
239 * mem-break.c: Ditto.
240 * nto-low.c: Ditto.
241 * regcache.h: Ditto.
242 * remote-utils.c: Ditto.
243 * server.c: Ditto.
244 * server.h: Ditto.
245 * thread-db.c: Ditto.
246 * tracepoint.c: Ditto.
247 * utils.c: Ditto.
248 * win32-low.h: Ditto.
249
44944448
JB
2502011-01-05 Joel Brobecker <brobecker@adacore.com>
251
252 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
253 update.
254
71ce852c
JB
2552011-01-01 Joel Brobecker <brobecker@adacore.com>
256
257 * server.c (gdbserver_version): Update copyright year in version
258 output.
259 * gdbreplay.c (gdbreplay_version): Ditto.
260
eb826dc6
MF
2612010-12-29 Jie Zhang <jie.zhang@analog.com>
262
263 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
264 * linux-bfin-low.c: New file.
265 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
266 PT_DATA_ADDR for BFIN targets.
267 * Makefile.in (SFILES): Add linux-bfin-low.c.
268 (clean): Remove reg-bfin.c.
269 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
270 * README: Mention supported Blackfin targets.
271
39ab222a
MF
2722010-12-23 Mike Frysinger <vapier@gentoo.org>
273
274 * .gitignore: New file.
275
a1f2ce7d
MF
2762010-11-16 Mike Frysinger <vapier@gentoo.org>
277
278 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
279
f474844c
JZ
2802010-10-22 Jie Zhang <jie@codesourcery.com>
281
282 * Makefile.in: Add FLAGS_TO_PASS variable.
283 (install): Remove dependency of install-only and recursively
284 invoke make for install-only.
285
f1048712
DE
2862010-10-04 Doug Evans <dje@google.com>
287
288 * Makefile.in (uninstall): Use $(DESTDIR).
289
b53a1623
PA
2902010-09-24 Pedro Alves <pedro@codesourcery.com>
291
e6ee044d
PA
292 PR gdb/11842
293
b53a1623
PA
294 * linux-x86-low.c (compat_siginfo_from_siginfo)
295 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
296 si_code is < 0. Check for si_code == SI_TIMER before checking for
297 si_code < 0.
298
fa1bd1e4
JB
2992010-09-13 Joel Brobecker <brobecker@adacore.com>
300
301 * lynx-i386-low.c: New file.
302 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
303
47fac8f8
JB
3042010-09-13 Joel Brobecker <brobecker@adacore.com>
305
306 * lynx-low.c (ptrace_request_to_str): Remove handling for
307 request values that have been removed in LynxOS 5.x.
308
1adfc54d
JB
3092010-09-13 Joel Brobecker <brobecker@adacore.com>
310
311 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
312 <ptrace.h>
313
c2a66c29
NS
3142010-09-09 Nathan Sidwell <nathan@codesourcery.com>
315
316 * configure.ac: Add --enable-inprocess-agent option.
317 * configure: Rebuilt.
318
32fcada3
YQ
3192010-09-06 Yao Qi <yao@codesourcery.com>
320
321 * linux-low.c (linux_kill): Remove unused variable.
322 (linux_stabilize_threads): Likewise.
323 * server.c (start_inferior): Likewise.
324 (queue_stop_reply_callback): Likewise.
325 * tracepoint.c (do_action_at_tracepoint): Likewise.
326
0cccb683
YQ
3272010-09-06 Yao Qi <yao@codesourcery.com>
328
329 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
330 on return.
331
423ec54c
JK
3322010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
333
334 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
335
12ac6819
PA
3362010-09-06 Pedro Alves <pedro@codesourcery.com>
337
338 * Makefile.in (install-only): Replace $IPA_DEPFILES with
339 "$(IPA_DEPFILES)".
340
8ed54b31
JB
3412010-09-01 Joel Brobecker <brobecker@adacore.com>
342
343 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
344 gdbserver/lynx-ppc-low.c: New files.
345 * Makefile.in (lynx_low_h): New variable.
346 (lynx-low.o, lynx-ppc-low.o): New rules.
347 * configure.ac: On LynxOS, link with -lnetinet.
348 * configure.srv: Add handling of powerpc-*-lynxos* targets.
349 * configure: regenerate.
350
bb0116a4
JB
3512010-09-01 Joel Brobecker <brobecker@adacore.com>
352
353 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
354 * configure.ac: Add check for vasprintf and vsnprintf.
355 * configure, config.in: Regenerate.
356 * server.h (vasprintf, vsnprintf): Add conditional declarations.
357
a778ab81 3582010-09-01 Joel Brobecker <brobecker@adacore.com>
359
360 * gdbreplay.c: Move include of alloca.h up, next to include of
361 malloc.h.
362 * server.h: Add include of malloc.h.
363 * mem-break.c: Remove include of malloc.h.
364 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
365
8b034a19 3662010-09-01 Joel Brobecker <brobecker@adacore.com>
367
368 * Makefile.in (memmem.o): Build with -Wno-error.
369
3702010-09-01 Joel Brobecker <brobecker@adacore.com>
371
372 * utils.c (xsnprintf): Make non-static.
373 * server.h: Add xsnprintf declaration.
374 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
375 replace calls to snprintf by calls to xsnprintf throughout.
376
3772010-09-01 Joel Brobecker <brobecker@adacore.com>
378
379 * configure.ac: Add configure check for alloca.
380 * configure, config.in: Regenerate.
381 * server.h: Include alloca.h if it exists.
382 * gdbreplay.c: Include alloca.h if it exists.
383
1a981360
PA
3842010-08-28 Pedro Alves <pedro@codesourcery.com>
385
386 * linux-low.c (__SIGRTMIN): Define if not already defined.
387 (linux_create_inferior): Check for __ANDROID__ rather than
388 __SIGRTMIN.
389 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
390 are already deferred.
391 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
392 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
393 stopped and already has a pending signal to report.
394 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
395 a pending signal to report or is moving out of a jump pad.
396 (linux_init_signals): Check for __ANDROID__ rather than
397 __SIGRTMIN.
398
b4d51a55
PA
3992010-08-28 Pedro Alves <pedro@codesourcery.com>
400
401 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
402 debug_threads check. Avoid a linear search when not doing debug
403 output.
404
ec48365d
PA
4052010-08-27 Pedro Alves <pedro@codesourcery.com>
406
407 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
408 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
409 (struct file_handler) <fd>: Change type to gdb_fildes_t.
410 (process_event): Change local fd's type to gdb_fildes_t.
411 (create_file_handler): Adjust prototype.
412 (delete_file_handler): Adjust prototype.
413 (handle_file_event): Adjust prototype. Use pfildes.
414 (create_file_event): Adjsut prototype.
415 * remote-utils.c (remote_desc, listen_desc): Change type to
416 gdb_fildes_t.
417 * server.h: New gdb_fildes_t typedef.
418 [USE_WIN32API]: Include winsock2.h.
419 (delete_file_handler, add_file_handler): Adjust prototypes.
420 (pfildes): Declare.
421 * utils.c (pfildes): New.
422
854d88f0
PA
4232010-08-27 Pedro Alves <pedro@codesourcery.com>
424
425 * configure.ac (build_warnings): Add -Wno-char-subscripts.
426 * configure: Regenerate.
427
0146f85b
PA
4282010-08-27 Pedro Alves <pedro@codesourcery.com>
429
430 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
431 (linux_done_accessing_memory): ... this.
432 (linux_target_ops): Adjust.
433 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
434 * nto-low.c (nto_target_ops): Adjust comment.
435 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
436 * spu-low.c (spu_target_ops): Adjust comment.
437 * target.h (target_ops): Rename unprepare_to_access_memory field
438 to done_accessing_memory.
439 (unprepare_to_access_memory): Rename to ...
440 (done_accessing_memory): ... this.
441
90d74c30
PA
4422010-08-26 Pedro Alves <pedro@codesourcery.com>
443
444 * linux-low.c (linux_prepare_to_access_memory): New.
445 (linux_unprepare_to_access_memory): New.
446 (linux_target_ops): Install them.
447 * server.c (read_memory): Rename to ...
448 (gdb_read_memory): ... this. Use
449 prepare_to_access_memory/prepare_to_access_memory.
450 (write_memory): Rename to ...
451 (gdb_write_memory): ... this. Use
452 prepare_to_access_memory/prepare_to_access_memory.
453 (handle_search_memory_1): Adjust.
454 (process_serial_event): Adjust.
455 * target.h (struct target_ops): New fields
456 prepare_to_access_memory and unprepare_to_access_memory.
457 (prepare_to_access_memory, unprepare_to_access_memory): New.
458 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
459 prepare_to_access_memory/prepare_to_access_memory.
460 * nto-low.c (nto_target_ops): Adjust.
461 * spu-low.c (spu_target_ops): Adjust.
462 * win32-low.c (win32_target_ops): Adjust.
463
fd467969
PA
4642010-08-26 Pedro Alves <pedro@codesourcery.com>
465
466 * Makefile.in (WARN_CFLAGS): Get it from configure.
467 (WERROR_CFLAGS): New.
468 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
469 * configure.ac: Introduce --enable-werror, which adds -Werror to
470 the compiler command line. Enabled by default. Disable with
471 --disable-werror. Add -Wdeclaration-after-statement
472 Wpointer-arith and -Wformat-nonliteral to warning flags.
473 * configure: Regenerate.
474
331e2f5f
PA
4752010-08-26 Pedro Alves <pedro@codesourcery.com>
476
477 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
478
e581f2b4
PA
4792010-08-26 Pedro Alves <pedro@codesourcery.com>
480
481 * gdbreplay.c (remote_error): New.
482 (gdbchar): New.
483 (expect): Use gdbchar. Check for error reading from GDB.
484 Clarify sync error output.
485 (play): Check for errors writing to GDB.
486 * linux-low.c (sigchld_handler): Really ignore `write' errors.
487 * remote-utils.c (getpkt): Check for errors writing to the remote
488 descriptor.
489
3c11dd79
PA
4902010-08-25 Pedro Alves <pedro@codesourcery.com>
491
492 * linux-low.c (linux_wait_1): Move non-debugging code out of
493 `debug_threads' control.
494
d20a8ad9
PA
4952010-08-25 Pedro Alves <pedro@codesourcery.com>
496
497 * linux-low.c (linux_wait_1): Don't set last_status here.
498 * server.c (push_event, queue_stop_reply_callback): Assert we're
499 not pushing a TARGET_WAITKIND_IGNORE event.
500 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
501 (myresume, handle_target_event): Set the thread's last_resume_kind
502 and last_status from the target returned status.
503
964e4306
PA
5042010-08-25 Pedro Alves <pedro@codesourcery.com>
505
506 PR threads/10729
507
508 * linux-x86-low.c (update_debug_registers_callback): New.
509 (i386_dr_low_set_addr): Use it.
510 (i386_dr_low_get_addr): New.
511 (i386_dr_low_set_control): Use update_debug_registers_callback.
512 (i386_dr_low_get_control): New.
513 (i386_dr_low_get_status): Adjust.
514 * linux-low.c (linux_stop_lwp): New.
515 * linux-low.h (linux_stop_lwp): Declare.
516
517 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
518 argument instead of a i386_debug_reg_state.
519 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
520 a i386_debug_reg_state.
521 (i386_insert_aligned_watchpoint): Adjust.
522 (i386_remove_aligned_watchpoint): Adjust.
523 (i386_low_stopped_data_address): Read the debug registers from the
524 inferior instead of from the mirrors.
525 * i386-low.h (struct i386_debug_reg_state): Extend comment.
526 (i386_dr_low_get_addr): Declare.
527 (i386_dr_low_get_control): Declare.
528 (i386_dr_low_get_status): Change prototype.
529
530 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
531 (i386_dr_low_get_addr): New.
532 (i386_dr_low_get_control): New.
533 (i386_dr_low_get_status): Adjust prototype. Return
534 dr_status_mirror.
535 (i386_initial_stuff): Clear dr_status_mirror and
536 dr_control_mirror.
537 (i386_get_thread_context): Adjust.
538 (i386_set_thread_context): Adjust.
539 (i386_thread_added): Adjust.
540
5f21a75b
PA
5412010-08-24 Pedro Alves <pedro@codesourcery.com>
542
543 * linux-low.h (linux_thread_area): Delete declaration.
544
3e4c1235
TS
5452010-08-11 Thomas Schwinge <thomas@codesourcery.com>
546
547 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
548 after its termination.
549
1971b033
PA
5502010-08-09 Pedro Alves <pedro@codesourcery.com>
551
552 * linux-low.c (gdb_wants_lwp_stopped): Delete.
553 (gdb_wants_all_stopped): Delete.
554 (linux_wait_1): Don't call them.
555 * server.c (handle_v_cont): Tag all threads as want-stopped.
556 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
557 stopped as "client-wants-stopped".
558
310444ac
PA
5592010-07-31 Pedro Alves <pedro@codesourcery.com>
560
561 * Makefile.in (signals_h): New.
562 (server_h): Depend on it.
563 (server.o): Don't depend on $(signals_def).
564 (signals.o): Depend on $(signals_def).
565
a19cae16
JK
5662010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
567
568 * Makefile.in (signals_def): New.
569 (server_h): Append include/gdb/signals.h and signals_def.
570 (server.o): Append signals_def.
571
30d50328
JK
5722010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
573
574 * server.c (handle_target_event): Use target_signal_to_host for
575 resume_info.sig initialization.
576 * target.h (struct thread_resume) <sig>: New comment.
577
5c3216e2
OS
5782010-07-20 Ozkan Sezer <sezeroz@gmail.com>
579
c6f46ca0
OS
580 * server.c (handle_query): strcpy() the returned string from paddress()
581 instead of sprintf().
5c3216e2
OS
582 * utils.c (paddress): Return phex_nz().
583
6bd31874
JB
5842010-07-07 Joel Brobecker <brobecker@adacore.com>
585
586 * server.c (handle_v_cont): Call mourn_inferior if process
587 just exited.
588 (myresume): Likewise.
589
0fb4aa4b
PA
5902010-07-01 Pedro Alves <pedro@codesourcery.com>
591
592 Static tracepoints, and integration with UST.
593
594 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
595 * mem-break.c (uninsert_all_breakpoints)
596 (reinsert_all_breakpoints): New.
597 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
598 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
599 (gdb_agent_ust_loaded, helper_thread_id)
600 (gdb_agent_helper_thread_id): New macros.
601 (struct ipa_sym_addresses): Add addr_ust_loaded,
602 addr_helper_thread_id, addr_cmd_buf.
603 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
604 (in_process_agent_loaded_ust): New.
605 (write_e_ust_not_loaded): New.
606 (maybe_write_ipa_ust_not_loaded): New.
607 (struct collect_static_trace_data_action): New.
608 (enum tracepoint_type) <static_tracepoint>: New.
609 (struct tracepoint) <handle>: Mention static tracepoints.
610 (struct static_tracepoint_ctx): New.
611 (CMD_BUF_SIZE): New.
612 (add_tracepoint_action): Handle static tracepoint actions.
613 (unprobe_marker_at): New.
614 (clear_installed_tracepoints): Handle static tracepoints.
615 (cmd_qtdp): Handle static tracepoints.
616 (probe_marker_at): New.
617 (cmd_qtstart): Handle static tracepoints.
618 (response_tracepoint): Handle static tracepoints.
619 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
620 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
621 (get_context_regcache): Handle static tracepoints.
622 (do_action_at_tracepoint): Handle static tracepoint actions.
623 (traceframe_find_block_type): Handle static trace data blocks.
624 (traceframe_read_sdata): New.
625 (download_tracepoints): Download static tracepoint actions.
626 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
627 (GDB_PROBE_NAME): New.
628 (ust_ops): New.
629 (GET_UST_SYM): New.
630 (USTF): New.
631 (dlsym_ust): New.
632 (ust_marker_to_static_tracepoint): New.
633 (gdb_probe): New.
634 (collect_ust_data_at_tracepoint): New.
635 (gdb_ust_probe): New.
636 (UNIX_PATH_MAX, SOCK_DIR): New.
637 (gdb_ust_connect_sync_socket): New.
638 (resume_thread, stop_thread): New.
639 (run_inferior_command): New.
640 (init_named_socket): New.
641 (gdb_ust_socket_init): New.
642 (cstr_to_hexstr): New.
643 (next_st): New.
644 (first_marker, next_marker): New.
645 (response_ust_marker): New.
646 (cmd_qtfstm, cmd_qtsstm): New.
647 (unprobe_marker_at, probe_marker_at): New.
648 (cmd_qtstmat, gdb_ust_thread): New.
649 (gdb_ust_init): New.
650 (initialize_tracepoint_ftlib): Call gdb_ust_init.
651 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
652 (ST_REGENTRY): New.
653 (x86_64_st_collect_regmap): New.
654 (X86_64_NUM_ST_COLLECT_GREGS): New.
655 (AMD64_RIP_REGNUM): New.
656 (supply_static_tracepoint_registers): New.
657 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
658 (ST_REGENTRY): New.
659 (i386_st_collect_regmap): New.
660 (i386_NUM_ST_COLLECT_GREGS): New.
661 (supply_static_tracepoint_registers): New.
662 * server.c (handle_query): Handle qXfer:statictrace:read.
663 <qSupported>: Report support for StaticTracepoints, and
664 qXfer:statictrace:read features.
665 * server.h (traceframe_read_sdata)
666 (supply_static_tracepoint_registers): Declare.
667 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
668 (unpack_varlen_hex): Include in IPA build.
669 * Makefile.in (ustlibs, ustinc): New.
670 (IPA_OBJS): Add remote-utils-ipa.o.
671 ($(IPA_LIB)): Link -ldl and -lpthread.
672 (UST_CFLAGS): New.
673 (IPAGENT_CFLAGS): Add UST_CFLAGS.
674 * config.in, configure: Regenerate.
675
9e4344e5
PA
6762010-06-20 Ian Lance Taylor <iant@google.com>
677 Pedro Alves <pedro@codesourcery.com>
678
679 * linux-x86-low.c (always_true): Delete.
680 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
681 trying to fool the compiler with always_true.
682
c6beb2cb
PA
6832010-06-20 Pedro Alves <pedro@codesourcery.com>
684
685 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
686 conditions in gdbserver.
687
d2ed6730
UW
6882010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
689
690 * spu-low.c (spu_read_memory): Wrap around local store limit.
691 (spu_write_memory): Likewise.
692
4e29fb54
PA
6932010-06-15 Pedro Alves <pedro@codesourcery.com>
694
695 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
696 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
697 LONGEST uses.
698 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
699 uses.
700 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
701 uses with LONGEST uses.
702
6a271cae
PA
7032010-06-14 Stan Shebs <stan@codesourcery.com>
704 Pedro Alves <pedro@codesourcery.com>
705
706 Bytecode compiler.
707
708 * linux-x86-low.c: Include limits.h.
709 (add_insns): New.
710 (always_true): New.
711 (EMIT_ASM): New.
712 (EMIT_ASM32): New.
713 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
714 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
715 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
716 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
717 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
718 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
719 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
720 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
721 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
722 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
723 (amd64_emit_void_call_2): New.
724 (amd64_emit_ops): New.
725 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
726 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
727 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
728 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
729 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
730 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
731 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
732 (i386_emit_call, i386_emit_reg, i386_emit_pop)
733 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
734 (i386_emit_stack_adjust, i386_emit_int_call_1)
735 (i386_emit_void_call_2): New.
736 (i386_emit_ops): New.
737 (x86_emit_ops): New.
738 (the_low_target): Install x86_emit_ops.
739 * server.h (struct emit_ops): New.
740 (get_raw_reg_func_addr): Declare.
741 (current_insn_ptr, emit_error): Declare.
742 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
743 (set_trace_state_variable_value): New defines.
744 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
745 addr_get_trace_state_variable_value and
746 addr_set_trace_state_variable_value.
747 (symbol_list): New fields for get_raw_reg,
748 get_trace_state_variable_value and set_trace_state_variable_value.
749 (condfn): New typedef.
750 (struct tracepoint): New field `compiled_cond'.
751 (do_action_at_tracepoint): Clear compiled_cond.
752 (get_trace_state_variable_value, set_trace_state_variable_value):
753 Export in the IPA.
754 (condition_true_at_tracepoint): If there's a compiled condition,
755 run that.
756 (current_insn_ptr, emit_error): New globals.
757 (struct bytecode_address): New.
758 (get_raw_reg_func_addr): New.
759 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
760 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
761 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
762 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
763 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
764 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
765 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
766 (compile_tracepoint_condition, compile_bytecodes): New.
767 * target.h (emit_ops): Forward declare.
768 (struct target_ops): New field emit_ops.
769 (target_emit_ops): New.
770 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
771 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
772 * linux-low.c (linux_emit_ops): New.
773 (linux_target_ops): Install it.
774 * linux-low.h (struct linux_target_ops): New field emit_ops.
775
92b72907
UW
7762010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
777
778 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
779 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
780
fa593d66
PA
7812010-06-01 Pedro Alves <pedro@codesourcery.com>
782 Stan Shebs <stan@codesourcery.com>
783
784 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
785 (all): Depend on $(extra_libraries).
786 (install-only): Install the IPA.
787 (IPA_OBJS, IPA_LIB): New.
788 (clean): Remove the IPA lib.
789 (IPAGENT_CFLAGS): New.
790 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
791 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
792 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
793 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
794 * configure.ac: Check for atomic builtins support in the compiler.
795 (IPA_DEPFILES, extra_libraries): Define.
796 * configure.srv (ipa_obj): Add description.
797 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
798 (i[34567]86-*-linux*): Set ipa_obj.
799 (x86_64-*-linux*): Set ipa_obj.
800 * linux-low.c (stabilizing_threads): New.
801 (supports_fast_tracepoints): New.
802 (linux_detach): Stabilize threads before detaching.
803 (handle_tracepoints): Handle internal tracing breakpoints. Assert
804 the lwp is either not stabilizing, or is moving out of a jump pad.
805 (linux_fast_tracepoint_collecting): New.
806 (maybe_move_out_of_jump_pad): New.
807 (enqueue_one_deferred_signal): New.
808 (dequeue_one_deferred_signal): New.
809 (linux_wait_for_event_1): If moving out of a jump pad, defer
810 pending signals to later.
811 (linux_stabilize_threads): New.
812 (linux_wait_1): Check if threads need moving out of jump pads, and
813 do it if so.
814 (stuck_in_jump_pad_callback): New.
815 (move_out_of_jump_pad_callback): New.
816 (lwp_running): New.
817 (linux_resume_one_lwp): Handle moving out of jump pads.
818 (linux_set_resume_request): Dequeue deferred signals.
819 (need_step_over_p): Also step over fast tracepoint jumps.
820 (start_step_over): Also uninsert fast tracepoint jumps.
821 (finish_step_over): Also reinsert fast tracepoint jumps.
822 (linux_install_fast_tracepoint_jump): New.
823 (linux_target_ops): Install linux_stabilize_threads and
824 linux_install_fast_tracepoint_jump_pad.
825 * linux-low.h (linux_target_ops) <get_thread_area,
826 install_fast_tracepoint_jump_pad>: New fields.
827 (struct lwp_info) <collecting_fast_tracepoint,
828 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
829 (linux_get_thread_area): Declare.
830 * linux-x86-low.c (jump_insn): New.
831 (x86_get_thread_area): New.
832 (append_insns): New.
833 (push_opcode): New.
834 (amd64_install_fast_tracepoint_jump_pad): New.
835 (i386_install_fast_tracepoint_jump_pad): New.
836 (x86_install_fast_tracepoint_jump_pad): New.
837 (the_low_target): Install x86_get_thread_area and
838 x86_install_fast_tracepoint_jump_pad.
839 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
840 (struct fast_tracepoint_jump): New.
841 (fast_tracepoint_jump_insn): New.
842 (fast_tracepoint_jump_shadow): New.
843 (find_fast_tracepoint_jump_at): New.
844 (fast_tracepoint_jump_here): New.
845 (delete_fast_tracepoint_jump): New.
846 (set_fast_tracepoint_jump): New.
847 (uninsert_fast_tracepoint_jumps_at): New.
848 (reinsert_fast_tracepoint_jumps_at): New.
849 (set_breakpoint_at): Use write_inferior_memory.
850 (uninsert_raw_breakpoint): Use write_inferior_memory.
851 (check_mem_read): Mask out fast tracepoint jumps.
852 (check_mem_write): Mask out fast tracepoint jumps.
853 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
854 (set_fast_tracepoint_jump): Declare.
855 (delete_fast_tracepoint_jump)
856 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
857 (reinsert_fast_tracepoint_jumps_at): Declare.
858 * regcache.c: Don't compile many functions when building the
859 in-process agent library.
860 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
861 the register buffer in the heap.
862 (free_register_cache): If the register buffer isn't owned by the
863 regcache, don't free it.
864 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
865 pre-existing register caches.
866 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
867 type.
868 (convert_ascii_to_int): : Constify `from' parameter type.
869 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
870 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
871 the needed buffer in-place.
872 (relocate_instruction): New.
873 * server.c (handle_query) <qSymbols>: If the target supports
874 tracepoints, give it a chance of looking up symbols. Report
875 support for fast tracepoints.
876 (handle_status): Stabilize threads.
877 (process_serial_event): Adjust.
878 * server.h (struct fast_tracepoint_jump): Forward declare.
879 (struct process_info) <fast_tracepoint_jumps>: New field.
880 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
881 (decode_X_packet, decode_M_packet): Adjust.
882 (relocate_instruction): Declare.
883 (in_process_agent_loaded): Declare.
884 (tracepoint_look_up_symbols): Declare.
885 (struct fast_tpoint_collect_status): Declare.
886 (fast_tracepoint_collecting): Declare.
887 (force_unlock_trace_buffer): Declare.
888 (handle_tracepoint_bkpts): Declare.
889 (initialize_low_tracepoint)
890 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
891 * target.h (struct target_ops) <stabilize_threads,
892 install_fast_tracepoint_jump_pad>: New fields.
893 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
894 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
895 [HAVE_STDINT_H]: Include stdint.h.
896 (trace_debug_1): Rename to ...
897 (trace_vdebug): ... this.
898 (trace_debug): Rename to ...
899 (trace_debug_1): ... this. Add `level' parameter.
900 (trace_debug): New.
901 (ATTR_USED, ATTR_NOINLINE): New.
902 (IP_AGENT_EXPORT): New.
903 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
904 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
905 (about_to_request_buffer_space, trace_buffer_is_full)
906 (stopping_tracepoint, expr_eval_result, error_tracepoint)
907 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
908 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
909 (traceframe_write_count, traceframes_created)
910 (trace_state_variables)
911 New renaming defines.
912 (struct ipa_sym_addresses): New.
913 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
914 (symbol_list): New.
915 (ipa_sym_addrs): New.
916 (all_tracepoint_symbols_looked_up): New.
917 (in_process_agent_loaded): New.
918 (write_e_ipa_not_loaded): New.
919 (maybe_write_ipa_not_loaded): New.
920 (tracepoint_look_up_symbols): New.
921 (debug_threads) [IN_PROCESS_AGENT]: New.
922 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
923 (UNKNOWN_SIDE_EFFECTS): New.
924 (stop_tracing): New.
925 (flush_trace_buffer): New.
926 (stop_tracing_bkpt): New.
927 (flush_trace_buffer_bkpt): New.
928 (read_inferior_integer): New.
929 (read_inferior_uinteger): New.
930 (read_inferior_data_pointer): New.
931 (write_inferior_data_pointer): New.
932 (write_inferior_integer): New.
933 (write_inferior_uinteger): New.
934 (struct collect_static_trace_data_action): Delete.
935 (enum tracepoint_type): New.
936 (struct tracepoint) <type>: New field `type'.
937 <actions_str, step_actions, step_actions_str>: Only include in GDBserver.
938 <orig_size, obj_addr_on_target, adjusted_insn_addr>
939 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
940 (tracepoints): Use IP_AGENT_EXPORT.
941 (last_tracepoint): Don't include in the IPA.
942 (stopping_tracepoint): Use IP_AGENT_EXPORT.
943 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
944 (alloced_trace_state_variables): New.
945 (trace_state_variables): Use IP_AGENT_EXPORT.
946 (traceframe_t): Delete unused variable.
947 (circular_trace_buffer): Don't include in the IPA.
948 (trace_buffer_start): Delete.
949 (struct trace_buffer_control): New.
950 (trace_buffer_free): Delete.
951 (struct ipa_trace_buffer_control): New.
952 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
953 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
954 New.
955 (trace_buffer_ctrl): New.
956 (TRACE_BUFFER_CTRL_CURR): New.
957 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
958 Reimplement as macros.
959 (trace_buffer_wrap): Delete.
960 (traceframe_write_count, traceframe_read_count)
961 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
962 (struct tracepoint_hit_ctx) <type>: New field.
963 (struct fast_tracepoint_ctx): New.
964 (memory_barrier): New.
965 (cmpxchg): New.
966 (record_tracepoint_error): Update atomically in the IPA.
967 (clear_inferior_trace_buffer): New.
968 (about_to_request_buffer_space): New.
969 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
970 updating the same buffer.
971 (add_tracepoint): Default the tracepoint's type to trap
972 tracepoint, and orig_size to -1.
973 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
974 internal variables.
975 (create_trace_state_variable): New parameter `gdb'. Handle it.
976 (clear_installed_tracepoints): Clear fast tracepoint jumps.
977 (cmd_qtdp): Handle fast tracepoints.
978 (cmd_qtdv): Adjust.
979 (max_jump_pad_size): New.
980 (gdb_jump_pad_head): New.
981 (get_jump_space_head): New.
982 (claim_jump_space): New.
983 (sort_tracepoints): New.
984 (MAX_JUMP_SIZE): New.
985 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
986 IPA.
987 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
988 support. Upload fast traceframes, and delete internal IPA
989 breakpoints.
990 (stop_tracing_handler): New.
991 (flush_trace_buffer_handler): New.
992 (cmd_qtstop): Upload fast tracepoints.
993 (response_tracepoint): Handle fast tracepoints.
994 (tracepoint_finished_step): Upload fast traceframes. Set the
995 tracepoint hit context's tracepoint type.
996 (handle_tracepoint_bkpts): New.
997 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
998 type. Add comment about fast tracepoints.
999 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
1000 non-existing action_str field.
1001 (get_context_regcache): Handle fast tracepoints.
1002 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
1003 to the regcache.
1004 (fast_tracepoint_from_jump_pad_address): New.
1005 (fast_tracepoint_from_ipa_tpoint_address): New.
1006 (collecting_t): New.
1007 (force_unlock_trace_buffer): New.
1008 (fast_tracepoint_collecting): New.
1009 (collecting): New.
1010 (gdb_collect): New.
1011 (write_inferior_data_ptr): New.
1012 (target_tp_heap): New.
1013 (target_malloc): New.
1014 (download_agent_expr): New.
1015 (UALIGN): New.
1016 (download_tracepoints): New.
1017 (download_trace_state_variables): New.
1018 (upload_fast_traceframes): New.
1019 (IPA_FIRST_TRACEFRAME): New.
1020 (IPA_NEXT_TRACEFRAME_1): New.
1021 (IPA_NEXT_TRACEFRAME): New.
1022 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
1023 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
1024 (gdb_jump_pad_buffer_end): New.
1025 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
1026 (initialize_tracepoint): Adjust.
1027 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
1028 buffer. Initialize the low module.
1029 * utils.c (PREFIX, TOOLNAME): New.
1030 (malloc_failure): Use PREFIX.
1031 (error): In the IPA, an error causes an exit.
1032 (fatal, warning): Use PREFIX.
1033 (internal_error): Use TOOLNAME.
1034 (NUMCELLS): Increase to 10.
1035 * configure, config.in: Regenerate.
1036
d149dd1d
PA
10372010-06-01 Pedro Alves <pedro@codesourcery.com>
1038
1039 * server.c (handle_query) <qSupported>: Do two passes over the
1040 qSupported string to avoid nesting strtok.
1041
f6528abd
JK
10422010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
1043
1044 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
1045 (CDEPS): New.
1046 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
1047 -Wl,--dynamic-list.
1048 * configure: Regenerate.
1049 * proc-service.list: New.
1050
ca2a87a0
JK
10512010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
1052
1053 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
1054 New comment.
1055
363a6e9f
OS
10562010-05-26 Ozkan Sezer <sezeroz@gmail.com>
1057
1058 * gdbreplay.c (remote_open): Check error return from socket() call by
1059 its equality to -1 not by it being negative.
1060 * remote-utils.c (remote_open): Likewise.
1061
d23b6cb1
PA
10622010-05-23 Pedro Alves <pedro@codesourcery.com>
1063
1064 * config.h: Regenerate.
1065
28d3cf85
MK
10662010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
1067
1068 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
1069 doesn't provide PTRACE_GET_THREAD_AREA.
1070
fea36a59
MK
10712010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
1072
1073 * linux-m68k-low.c: Include <asm/ptrace.h>
1074 (ps_get_thread_area): Implement.
1075
24b066ba
DE
10762010-05-03 Doug Evans <dje@google.com>
1077
1078 * event-loop.c (struct callback_event): New struct.
1079 (callback_list): New global.
1080 (append_callback_event, delete_callback_event): New functions.
1081 (process_callback): New function.
1082 (start_event_loop): Call it.
1083 * remote-utils.c (NOT_SCHEDULED): Define.
1084 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
1085 moved out of readchar.
1086 (readchar): Rewrite. Call reschedule before returning.
1087 (reset_readchar): New function.
1088 (remote_close): Call it.
1089 (process_remaining, reschedule): New functions.
1090 * server.h (callback_handler_func): New typedef.
1091 (append_callback_event, delete_callback_event): Declare.
1092
9836d6ea
PA
10932010-05-03 Pedro Alves <pedro@codesourcery.com>
1094
1095 * proc-service.c (ps_pglobal_lookup): Use
1096 thread_db_look_up_one_symbol.
1097 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
1098 parameter. Use it instead of all_symbols_looked_up.
1099 * server.h (struct process_info) <all_symbols_looked_up>: Delete
1100 field.
1101 (all_symbols_looked_up): Don't declare.
1102 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
1103 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
1104 field.
1105 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
1106 Set all_symbols_looked_up here.
1107 (thread_db_look_up_one_symbol): New.
1108 (thread_db_get_tls_address): Adjust.
1109 (thread_db_load_search, try_thread_db_load_1): Always allocate the
1110 thread_db object on the heap, and tentatively set it in the
1111 process structure.
1112 (thread_db_init): Don't set all_symbols_looked_up here.
1113 * linux-low.h (thread_db_look_up_one_symbol): Declare.
1114
7984d532
PA
11152010-05-03 Pedro Alves <pedro@codesourcery.com>
1116
1117 * linux-low.c (linux_kill, linux_detach): Adjust.
1118 (status_pending_p_callback): Remove redundant statement. Check
1119 for !TARGET_WAITIKIND_IGNORE, instead of
1120 TARGET_WAITKIND_STOPPED.
1121 (handle_tracepoints): Make sure LWP is locked. Adjust.
1122 (linux_wait_for_event_1): Adjust.
1123 (linux_cancel_breakpoints): New.
1124 (unsuspend_one_lwp): New.
1125 (unsuspend_all_lwps): New.
1126 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
1127 (send_sigstop_callback): Change return type to int, add new
1128 `except' parameter and handle it.
1129 (suspend_and_send_sigstop_callback): New.
1130 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
1131 pass them down. If SUSPEND, also increment the lwp's suspend
1132 count.
1133 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
1134 (need_step_over_p): Don't consider suspended LWPs.
1135 (start_step_over): Adjust.
1136 (proceed_one_lwp): Change return type to int, add new `except'
1137 parameter and handle it.
1138 (unsuspend_and_proceed_one_lwp): New.
1139 (proceed_all_lwps): Use find_inferior instead of
1140 for_each_inferior.
1141 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
1142 also decrement the suspend count of LWPs. Pass `except' down,
1143 instead of hacking its suspend count.
1144 (linux_pause_all): Add `freeze' parameter. Adjust.
1145 (linux_unpause_all): New.
1146 (linux_target_ops): Install linux_unpause_all.
1147 * server.c (handle_status): Adjust.
1148 * target.h (struct target_ops): New fields `unpause_all' and
1149 `cancel_breakpoints'. Add new parameter to `pause_all'.
1150 (pause_all): Add new `freeze' parameter.
1151 (unpause_all): New.
1152 (cancel_breakpoints): New.
1153 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
1154 cancel breakpoints.
1155 (cmd_qtstart): Pause threads.
1156 (stop_tracing): Pause threads, and cancel breakpoints.
1157 * win32-low.c (win32_target_ops): Adjust.
1158
e471f25b
PA
11592010-05-03 Pedro Alves <pedro@codesourcery.com>
1160
1161 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
1162 the inferior right away from here...
1163 (linux_wait_1): ... to here, and adjust to check the thread's
1164 last_resume_kind instead of the lwp's step or stop_expected flags.
1165
1915ef4f
PA
11662010-05-02 Pedro Alves <pedro@codesourcery.com>
1167
1168 * README: Use consistent `GDB' and `GDBserver' spellings.
1169
f9e39928
PA
11702010-05-02 Pedro Alves <pedro@codesourcery.com>
1171
1172 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
1173 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
1174 (linux_detach_one_lwp): Assume the lwp is stopped.
1175 (any_thread_of): Delete.
1176 (linux_detach): Stop all lwps here. Don't blindly delete all
1177 breakpoints.
1178 (delete_lwp_callback): New.
1179 (linux_mourn): Delete all lwps of the process that is gone.
1180 (linux_wait_1): Don't delete the last lwp of the process here.
1181 * mem-break.h (mark_breakpoints_out): Declare.
1182 * mem-break.c (mark_breakpoints_out): New.
1183 (free_all_breakpoints): Use it.
1184 * server.c (handle_target_event): If the process is gone, mark
1185 breakpoints out.
1186 * thread-db.c (struct thread_db) <create_bp>: New field.
1187 (thread_db_enable_reporting): Fix prototype. Store a thread event
1188 breakpoint reference in the thread_db struct.
1189 (thread_db_load_search): Clear the thread_db object.
1190 (try_thread_db_load_1): Ditto.
1191 (switch_to_process): New.
1192 (disable_thread_event_reporting): Use it.
1193 (remove_thread_event_breakpoints): New.
1194 (thread_db_detach, thread_db_mourn): Use it.
1195
1e7fc18c
PA
11962010-05-01 Pedro Alves <pedro@codesourcery.com>
1197
1198 * linux-low.c (linux_enable_event_reporting): New.
1199 (linux_wait_for_event_1, handle_extended_wait): Use it.
1200
02fc4de7
PA
12012010-04-30 Pedro Alves <pedro@codesourcery.com>
1202
1203 * linux-low.c (linux_kill_one_lwp, linux_kill)
1204 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
1205 (send_sigstop): Take an lwp_info as parameter instead. Queue a
1206 SIGSTOP even if the LWP is stopped.
1207 (send_sigstop_callback): New.
1208 (stop_all_lwps): Use send_sigstop_callback instead.
1209 (linux_resume_one_thread): Adjust.
1210 (proceed_one_lwp): Still proceed an LWP that the client has
1211 requested to stop, if we haven't reported it as stopped yet. Make
1212 sure that LWPs the client want stopped, have a pending SIGSTOP.
1213
bc3b5632
DE
12142010-04-26 Doug Evans <dje@google.com>
1215
ae1ada35
DE
1216 * server.c (handle_general_set): Make static.
1217
bc3b5632
DE
1218 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
1219 Print received char after testing for error/eof instead of before.
1220 (input_interrupt): Tweak comment.
1221
65730243
DE
12222010-04-23 Doug Evans <dje@google.com>
1223
1224 * server.c (start_inferior): Print inferior argv if --debug.
1225
a8ae7dc0
AR
12262010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
1227
1228 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
1229 * nto-x86-low.c: Include server.h
1230
1c07cc19
PM
12312010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
1232
1233 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
1234 be consistent with other sources of this directory.
1235 (init_registers_amd64): Correct name of source file of this function
1236 in the comment.
1237
e0a61e09
PM
12382010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
1239
1240 * configure.srv (x86_64-*-mingw*): New configuration for Windows
1241 64-bit executables.
1242
54709339
PM
12432010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
1244
1245 * win32-i386-low.c: Add 64-bit support.
1246 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
1247 (init_registers_amd64): Declare.
1248 (mappings): Add 64-bit version of array.
1249 (init_windows_x86): New function.
1250 (the_low_target): Change init_arch field to init_windows_x86.
1251
e8f0053d
PM
12522010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
1253
1254 * win32-low.c: Adapt to support also 64-bit architecture.
1255 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
1256 (get_image_name): Use SIZE_T type for local variable `done'.
1257 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
1258 (toolhelp_get_dll_name): Idem.
1259 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
1260 Use uintptr_t typecast to avoid warning.
1261 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
1262 (handle_exception): Use phex_nz to avoid warning.
1263 (win32_wait): Remove unused local variable `process'.
1264
c481e77e
PM
12652010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
1266
1267 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
1268 `amd64-avx.o'.
1269
12ea4b69
PM
12702010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
1271
1272 * configure.ac: Use `ws2_32' library for srv_mingw.
1273 * configure: Regenerate.
1274 * gdbreplay.c: Include winsock2.h instead of winsock.h.
1275 * remote-utils.c: Likewise.
1276
f6d1620c
L
12772010-04-17 H.J. Lu <hongjiu.lu@intel.com>
1278
1279 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
1280 if __x86_64__ is defined.
1281
8e642873
PM
12822010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
1283
1284 * configure: Regenerate.
1285
711e434b
PM
12862010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
1287
1288 * server.c (handle_query): Handle 'qGetTIBAddr' query.
1289 * target.h (target_ops): New get_tib_address field.
1290 * win32-low.h (win32_thread_info): Add thread_local_base field.
1291 * win32-low.c (child_add_thread): Add tlb argument.
1292 Set thread_local_base field to TLB.
1293 (get_child_debug_event): Adapt to child_add_thread change.
1294 (win32_get_tib_address): New function.
1295 (win32_target_ops): Set get_tib_address field to
1296 win32_get_tib_address.
1297 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
1298
505106cd
PA
12992010-04-12 Pedro Alves <pedro@codesourcery.com>
1300
505106cd
PA
1301 * linux-low.c (linux_mourn): Also remove the process.
1302 * server.c (handle_target_event): Don't remove the process here.
1303 * nto-low.c (nto_mourn): New.
1304 (nto_target_ops): Install it.
1305 * spu-low.c (spu_mourn): New.
1306 (spu_target_ops): Install it.
1307 * win32-low.c (win32_mourn): New.
1308 (win32_target_ops): Install it.
1309
e8470a06
PA
13102010-04-12 Pedro Alves <pedro@codesourcery.com>
1311
1312 * server.h (buffer_xml_printf): Remove redundant `;'.
1313
45ba0d02
PA
13142010-04-12 Pedro Alves <pedro@codesourcery.com>
1315
1316 * regcache.c (set_register_cache): Invalidate regcaches before
1317 changing the register cache layout.
1318 (regcache_invalidate_one): Allow a NULL regcache.
1319 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
1320 regcaches before changing the register cache layout or the target
1321 regsets.
1322
59e04013
L
13232010-04-12 H.J. Lu <hongjiu.lu@intel.com>
1324
1325 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
1326 variable warning on Linux/x86-64.
1327
8336d594
PA
13282010-04-11 Pedro Alves <pedro@codesourcery.com>
1329
1330 GDBserver disconnected tracing support.
1331
1332 * linux-low.c (linux_remove_process): Delete.
1333 (add_lwp): Don't set last_resume_kind here.
1334 (linux_kill): Use `mourn'.
1335 (linux_detach): Use `thread_db_detach', and `mourn'.
1336 (linux_mourn): New.
1337 (linux_attach_lwp_1): Adjust comment.
1338 (linux_attach): last_resume_kind moved the thread_info; adjust.
1339 (status_pending_p_callback): Adjust.
1340 (linux_wait_for_event_1): Adjust.
1341 (count_events_callback, select_singlestep_lwp_callback)
1342 (select_event_lwp_callback, cancel_breakpoints_callback)
1343 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
1344 (proceed_one_lwp): Adjust.
1345 (linux_async): Add debug output.
1346 (linux_thread_stopped): New.
1347 (linux_pause_all): New.
1348 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
1349 linux_pause_all.
1350 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
1351 (thread_db_free): Delete declaration.
1352 (thread_db_detach, thread_db_mourn): Declare.
1353 * thread-db.c (thread_db_init): Use thread_db_mourn.
1354 (thread_db_free): Delete, split in two.
1355 (disable_thread_event_reporting): New.
1356 (thread_db_detach): New.
1357 (thread_db_mourn): New.
1358
1359 * server.h (struct thread_info) <last_resume_kind>: New field.
1360 <attached>: Add comment.
1361 <gdb_detached>: New field.
1362 (handler_func): Change return type to int.
1363 (handle_serial_event, handle_target_event): Ditto.
1364 (gdb_connected): Declare.
1365 (tracing): Delete.
1366 (disconnected_tracing): Declare.
1367 (stop_tracing): Declare.
1368
1369 * server.c (handle_query) <qSupported>: Report support for
1370 disconnected tracing.
1371 (queue_stop_reply_callback): Account for running threads.
1372 (gdb_wants_thread_stopped): New.
1373 (gdb_wants_all_threads_stopped): New.
1374 (gdb_reattached_process): New.
1375 (handle_status): Clear the `gdb_detached' flag of all processes.
1376 In all-stop, stop all threads.
1377 (main): Be sure to leave tfind mode. Handle disconnected tracing.
1378 (process_serial_event): If the remote connection breaks, or if an
1379 exit was forced with "monitor exit", force an event loop exit.
1380 Handle disconnected tracing on detach.
1381 (handle_serial_event): Adjust.
1382 (handle_target_event): If GDB isn't connected, forward events back
1383 to the inferior, unless the last process exited, in which case,
1384 exit gdbserver. Adjust interface.
1385
1386 * remote-utils.c (remote_open): Don't block in accept. Instead
1387 register an event loop source on the listen socket file
1388 descriptor. Refactor bits into ...
1389 (listen_desc): ... this new global.
1390 (gdb_connected): ... this new function.
1391 (enable_async_notification): ... this new function.
1392 (handle_accept_event): ... this new function.
1393 (remote_close): Clear remote_desc.
1394
1395 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
1396
1397 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
1398 New fields.
1399 (mourn_inferior): Define.
1400 (target_process_qsupported): Avoid the dangling else problem.
1401 (thread_stopped): Define.
1402 (pause_all): Define.
1403 (target_waitstatus_to_string): Declare.
1404 * target.c (target_waitstatus_to_string): New.
1405
1406 * tracepoint.c (tracing): Make extern.
1407 (disconnected_tracing): New.
1408 (stop_tracing): Make extern. Handle tracing stops due to GDB
1409 disconnecting.
1410 (cmd_qtdisconnected): New.
1411 (cmd_qtstatus): Report disconnected tracing status in trace reply.
1412 (handle_tracepoint_general_set): Handle QTDisconnected.
1413
1414 * event-loop.c (event_handler_func): Change return type to int.
1415 (process_event): Bail out if the event handler wants the event
1416 loop to stop.
1417 (handle_file_event): Ditto.
1418 (start_event_loop): Bail out if the event handler wants the event
1419 loop to stop.
1420
1421 * nto-low.c (nto_target_ops): Adjust.
1422 * spu-low.c (spu_wait): Don't remove the process here.
1423 (spu_target_ops): Adjust.
1424 * win32-low.c (win32_wait): Don't remove the process here.
1425 (win32_target_ops): Adjust.
1426
5d267c4c
PA
14272010-04-11 Pedro Alves <pedro@codesourcery.com>
1428
1429 * regcache.c (realloc_register_cache): Invalidate inferior's
1430 regcache before recreating it.
1431
623ccd72
PA
14322010-04-09 Pedro Alves <pedro@codesourcery.com>
1433
1434 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
1435
219f2f23
PA
14362010-04-09 Stan Shebs <stan@codesourcery.com>
1437 Pedro Alves <pedro@codesourcery.com>
1438
1439 * server.h (LONGEST): New.
1440 (struct thread_info) <while_stepping>: New field.
1441 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
1442 Declare.
1443 (initialize_tracepoint, handle_tracepoint_general_set)
1444 (handle_tracepoint_query, tracepoint_finished_step)
1445 (tracepoint_was_hit, release_while_stepping_state_list):
1446 (current_traceframe): Declare.
1447 * server.c (handle_general_set): Handle tracepoint packets.
1448 (read_memory): New.
1449 (write_memory): New.
1450 (handle_search_memory_1): Use read_memory.
1451 (handle_query): Report support for conditional tracepoints, trace
1452 state variables, and tracepoint sources. Handle tracepoint
1453 queries.
1454 (main): Initialize the tracepoints module.
1455 (process_serial_event): Handle traceframe reads/writes.
1456
1457 * linux-low.c (handle_tracepoints): New.
1458 (linux_wait_1): Call it.
1459 (linux_resume_one_lwp): Handle while-stepping.
1460 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
1461 (linux_target_ops): Install them.
1462 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
1463 New field.
1464 * linux-x86-low.c (x86_supports_tracepoints): New.
1465 (the_low_target). Install it.
1466
1467 * mem-break.h (delete_breakpoint): Declare.
1468 * mem-break.c (delete_breakpoint): Make external.
1469
1470 * target.h (struct target_ops): Add `supports_tracepoints',
1471 `read_pc', and `write_pc' fields.
1472 (target_supports_tracepoints): Define.
1473 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
1474 (phex_nz): New.
1475
1476 * regcache.h (struct regcache) <registers_owned>: New field.
1477 (init_register_cache, regcache_cpy): Declare.
1478 (regcache_read_pc, regcache_write_pc): Declare.
1479 (register_cache_size): Declare.
1480 (supply_regblock): Declare.
1481 * regcache.c (init_register_cache): New.
1482 (new_register_cache): Use it.
1483 (regcache_cpy): New.
1484 (register_cache_size): New.
1485 (supply_regblock): New.
1486 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 1487
219f2f23
PA
1488 * tracepoint.c: New.
1489
1490 * Makefile.in (OBS): Add tracepoint.o.
1491 (tracepoint.o): New rule.
1492
3a13a53b
L
14932010-04-08 H.J. Lu <hongjiu.lu@intel.com>
1494
1495 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
1496 (i386-mmx.o): New.
1497 (i386-mmx.c): Likewise.
1498 (i386-mmx-linux.o): Likewise.
1499 (i386-mmx-linux.c): Likewise.
1500
1501 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
1502 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
1503 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
1504 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
1505
1506 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
1507 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
1508 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
1509
1570b33e
L
15102010-04-07 H.J. Lu <hongjiu.lu@intel.com>
1511
1512 * Makefile.in (clean): Updated.
1513 (i386-avx.o): New.
1514 (i386-avx.c): Likewise.
1515 (i386-avx-linux.o): Likewise.
1516 (i386-avx-linux.c): Likewise.
1517 (amd64-avx.o): Likewise.
1518 (amd64-avx.c): Likewise.
1519 (amd64-avx-linux.o): Likewise.
1520 (amd64-avx-linux.c): Likewise.
1521
1522 * configure.srv (srv_i386_regobj): Add i386-avx.o.
1523 (srv_i386_linux_regobj): Add i386-avx-linux.o.
1524 (srv_amd64_regobj): Add amd64-avx.o.
1525 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
1526 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
1527 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
1528 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
1529 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
1530 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
1531 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
1532
1533 * i387-fp.c: Include "i386-xstate.h".
1534 (i387_xsave): New.
1535 (i387_cache_to_xsave): Likewise.
1536 (i387_xsave_to_cache): Likewise.
1537 (x86_xcr0): Likewise.
1538
1539 * i387-fp.h (i387_cache_to_xsave): Likewise.
1540 (i387_xsave_to_cache): Likewise.
1541 (x86_xcr0): Likewise.
1542
1543 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
1544 * linux-crisv32-low.c (target_regsets): Likewise.
1545 * linux-m68k-low.c (target_regsets): Likewise.
1546 * linux-mips-low.c (target_regsets): Likewise.
1547 * linux-ppc-low.c (target_regsets): Likewise.
1548 * linux-s390-low.c (target_regsets): Likewise.
1549 * linux-sh-low.c (target_regsets): Likewise.
1550 * linux-sparc-low.c (target_regsets): Likewise.
1551 * linux-xtensa-low.c (target_regsets): Likewise.
1552
1553 * linux-low.c: Include <sys/uio.h>.
1554 (regsets_fetch_inferior_registers): Support nt_type.
1555 (regsets_store_inferior_registers): Likewise.
1556 (linux_process_qsupported): New.
1557 (linux_target_ops): Add linux_process_qsupported.
1558
1559 * linux-low.h (regset_info): Add nt_type.
1560 (linux_target_ops): Add process_qsupported.
1561
1562 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
1563 and <sys/uio.h>.
1564 (init_registers_i386_avx_linux): New.
1565 (init_registers_amd64_avx_linux): Likewise.
1566 (xmltarget_i386_linux_no_xml): Likewise.
1567 (xmltarget_amd64_linux_no_xml): Likewise.
1568 (PTRACE_GETREGSET): Likewise.
1569 (PTRACE_SETREGSET): Likewise.
1570 (x86_fill_xstateregset): Likewise.
1571 (x86_store_xstateregset): Likewise.
1572 (use_xml): Likewise.
1573 (x86_linux_update_xmltarget): Likewise.
1574 (x86_linux_process_qsupported): Likewise.
1575 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
1576 (x86_arch_setup): Don't call init_registers_amd64_linux nor
1577 init_registers_i386_linux here. Call
1578 x86_linux_update_xmltarget.
1579 (the_low_target): Add x86_linux_process_qsupported.
1580
1581 * server.c (handle_query): Call target_process_qsupported.
1582
1583 * target.h (target_ops): Add process_qsupported.
1584 (target_process_qsupported): New.
1585
fc7238bb
PA
15862010-04-03 Pedro Alves <pedro@codesourcery.com>
1587
1588 * inferiors.c (add_thread): Set last_status kind to
1589 TARGET_WAITKIND_IGNORE.
1590 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
1591 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
1592 (linux_wait_1): Move `thread' local definition to block that uses
1593 it. Don't NULL initialize `event_child'.
1594 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
1595 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
1596 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
1597
bdabb078
PA
15982010-04-01 Pedro Alves <pedro@codesourcery.com>
1599
1600 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
1601 an extended waitstatus, or by a watchpoint.
1602 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
1603 thread was stepping or has been stopped by a watchpoint.
1604
d3bbe7a0
PA
16052010-04-01 Pedro Alves <pedro@codesourcery.com>
1606
1607 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
1608 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
1609 of another, then delete the previous, and validate all
1610 breakpoints.
1611 (validate_inserted_breakpoint): New.
1612 (delete_disabled_breakpoints): New.
1613 (validate_breakpoints): New.
1614 (check_mem_read): Validate breakpoints before trusting their
1615 shadow. Delete disabled breakpoints.
1616 (check_mem_write): Validate breakpoints before trusting they
1617 should be inserted. Delete disabled breakpoints.
1618 * mem-break.h (validate_breakpoints):
1619 * server.c (handle_query): Validate breakpoints when we see a
1620 qSymbol query.
1621
8b07ae33
PA
16222010-04-01 Pedro Alves <pedro@codesourcery.com>
1623
1624 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
1625 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
1626 if we could tell there's a GDB breakpoint at stop_pc.
1627 (need_step_over_p): Don't do a step over if we find a GDB
1628 breakpoint at the resume PC.
1629
1630 * mem-break.c (struct raw_breakpoint): New.
1631 (enum bkpt_type): New type `gdb_breakpoint'.
1632 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
1633 fields. New field `raw'.
1634 (find_raw_breakpoint_at): New.
1635 (set_raw_breakpoint_at): Handle refcounting. Create a raw
1636 breakpoint instead.
1637 (set_breakpoint_at): Adjust.
1638 (delete_raw_breakpoint): New.
1639 (release_breakpoint): New.
1640 (delete_breakpoint): Rename to...
1641 (delete_breakpoint_1): ... this. Add proc parameter. Use
1642 release_breakpoint. Return ENOENT.
1643 (delete_breakpoint): Reimplement.
1644 (find_breakpoint_at): Delete.
1645 (find_gdb_breakpoint_at): New.
1646 (delete_breakpoint_at): Delete.
1647 (set_gdb_breakpoint_at): New.
1648 (delete_gdb_breakpoint_at): New.
1649 (gdb_breakpoint_here): New.
1650 (set_reinsert_breakpoint): Use release_breakpoint.
1651 (uninsert_breakpoint): Rename to ...
1652 (uninsert_raw_breakpoint): ... this.
1653 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
1654 (reinsert_raw_breakpoint): Change parameter type to
1655 raw_breakpoint.
1656 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
1657 instead.
1658 (check_breakpoints): Adjust. Use release_breakpoint.
1659 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
1660 (breakpoint_inserted_here): Ditto.
1661 (check_mem_read): Adjust to iterate over raw breakpoints instead.
1662 Don't trust the breakpoint's shadow if it is not inserted.
1663 (check_mem_write): Adjust to iterate over raw breakpoints instead.
1664 (delete_all_breakpoints): Adjust.
1665 (free_all_breakpoints): Mark all breakpoints as uninserted, and
1666 use delete_breakpoint_1.
1667
1668 * mem-break.h (breakpoints_supported): Delete declaration.
1669 (set_gdb_breakpoint_at): Declare.
1670 (gdb_breakpoint_here): Declare.
1671 (delete_breakpoint_at): Delete.
1672 (delete_gdb_breakpoint_at): Declare.
1673
1674 * server.h (struct raw_breakpoint): Forward declare.
1675 (struct process_info): New field `raw_breakpoints'.
1676
1677 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
1678 breakpoints.
1679
6bf5e0ba
PA
16802010-03-24 Pedro Alves <pedro@codesourcery.com>
1681
1682 * linux-low.c (status_pending_p_callback): Fix comment.
1683 (linux_wait_for_event_1): Move most of the internal breakpoint
1684 handling from here...
1685 (linux_wait_1): ... to here.
1686 (count_events_callback): New.
1687 (select_singlestep_lwp_callback): New.
1688 (select_event_lwp_callback): New.
1689 (cancel_breakpoints_callback): New.
1690 (select_event_lwp): New.
1691 (linux_wait_1): Simplify internal breakpoint handling. Give equal
1692 priority to all LWPs that have had events that should be reported
1693 to the client. Cancel breakpoints when about to reporting the
1694 event to the client, not while stopping lwps. No longer cancel
1695 finished single-steps here.
1696 (cancel_finished_single_step): Delete.
1697 (cancel_finished_single_steps): Delete.
1698
414a389f
PA
16992010-03-24 Pedro Alves <pedro@codesourcery.com>
1700
1701 * mem-break.c (enum bkpt_type): New.
1702 (struct breakpoint): New field `type'.
1703 (set_breakpoint_at): Change return type to struct breakpoint
1704 pointer. Set type to `other_breakpoint' by default.
1705 (delete_breakpoint): Rewrite, supporting more than one breakpoint
1706 in the breakpoint list.
1707 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
1708 (reinsert_breakpoint): Rename to ...
1709 (reinsert_raw_breakpoint): ... this.
1710 (reinsert_breakpoints_at): Adjust.
1711 * mem-break.h (struct breakpoint): Declare.
1712 (set_breakpoint_at): Change return type to struct breakpoint
1713 pointer.
1714
2280c721
PA
17152010-03-24 Pedro Alves <pedro@codesourcery.com>
1716
1717 * server.c (handle_query): Assign, not compare.
1718
d50171e4
PA
17192010-03-24 Pedro Alves <pedro@codesourcery.com>
1720
1721 Teach linux gdbserver to step-over-breakpoints.
1722
1723 * linux-low.c (can_hardware_single_step): New.
1724 (supports_breakpoints): New.
1725 (handle_extended_wait): If stopping threads, read the stop pc of
1726 the new cloned LWP.
1727 (get_pc): New.
1728 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
1729 low target doesn't support retrieving the PC.
1730 (add_lwp): Set last_resume_kind to resume_continue.
1731 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
1732 (linux_attach): Don't clear stop_expected. Set the lwp's
1733 last_resume_kind to resume_stop.
1734 (linux_detach_one_lwp): Don't check for removed breakpoints.
1735 (check_removed_breakpoint): Delete.
1736 (status_pending_p): Rename to ...
1737 (status_pending_p_callback): ... this. Don't check for removed
1738 breakpoints. Don't consider threads that are stopped from GDB's
1739 perspective.
1740 (linux_wait_for_lwp): Always read the stop_pc here.
1741 (cancel_breakpoint): New.
1742 (step_over_bkpt): New global.
1743 (linux_wait_for_event_1): Implement stepping over breakpoints.
1744 (gdb_wants_lwp_stopped): New.
1745 (gdb_wants_all_stopped): New.
1746 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
1747 single-step traps here. Store the thread's last reported target
1748 wait status.
1749 (send_sigstop): Don't clear stop_expected. Always set it,
1750 instead.
1751 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
1752 (cancel_finished_single_step): New.
1753 (cancel_finished_single_steps): New.
1754 (wait_for_sigstop): Don't cancel finished single-step traps here.
1755 (linux_resume_one_lwp): Don't check for removed breakpoints.
1756 Don't set `step' on non-hardware step archs.
1757 (linux_set_resume_request): Ignore resume_stop requests if already
1758 stopping or stopped. Set the lwp's last_resume_kind.
1759 (resume_status_pending_p): Don't check for removed breakpoints.
1760 (need_step_over_p): New.
1761 (start_step_over): New.
1762 (finish_step_over): New.
1763 (linux_resume_one_thread): Always queue a sigstop for resume_stop
1764 requests. Clear the thread's last reported target waitstatus.
1765 Don't use the `suspended' flag. Don't consider pending breakpoints.
1766 (linux_resume): Start a step-over if necessary.
1767 (proceed_one_lwp): New.
1768 (proceed_all_lwps): New.
1769 (unstop_all_lwps): New.
1770 * linux-low.h (struct lwp_info): Rewrite comment for the
1771 `suspended' flag. Add the `stop_pc' field. Delete the
1772 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
1773 Add `'last_resume_kind' and `need_step_over' fields.
1774 * inferiors.c (struct thread_info): Delete, moved elsewhere.
1775 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
1776 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
1777 (set_raw_breakpoint_at): New.
1778 (set_breakpoint_at): Rewrite to use it.
1779 (reinsert_breakpoint_handler): Delete.
1780 (set_reinsert_breakpoint): New.
1781 (reinsert_breakpoint_by_bp): Delete.
1782 (delete_reinsert_breakpoints): New.
1783 (uninsert_breakpoint): Rewrite.
1784 (uninsert_breakpoints_at): New.
1785 (reinsert_breakpoint): Rewrite.
1786 (reinsert_breakpoints_at): New.
1787 (check_breakpoints): Rewrite.
1788 (breakpoint_here): New.
1789 (breakpoint_inserted_here): New.
1790 (check_mem_read): Adjust.
1791 * mem-break.h (breakpoints_supported, breakpoint_here)
1792 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
1793 (reinsert_breakpoint_by_bp): Delete declaration.
1794 (delete_reinsert_breakpoints): Declare.
1795 (reinsert_breakpoint): Delete declaration.
1796 (reinsert_breakpoints_at): Declare.
1797 (uninsert_breakpoint): Delete declaration.
1798 (uninsert_breakpoints_at): Declare.
1799 (check_breakpoints): Adjust prototype.
1800 * server.h: Adjust include order.
1801 (struct thread_info): Declare here. Add a `last_status' field.
1802
30ba68cb
MS
18032010-03-23 Michael Snyder <msnyder@vmware.com>
1804
1805 * server.c (crc32): New function.
1806 (handle_query): Add handling for 'qCRC:' request.
1807
b9a881c2
PA
18082010-03-23 Pedro Alves <pedro@codesourcery.com>
1809
1810 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
1811 lwp had been stopped by a watchpoint.
1812
e92d13d5
PA
18132010-03-16 Pedro Alves <pedro@codesourcery.com>
1814
1815 * server.h (internal_error): Declare.
1816 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
1817 * utils.c (internal_error): New function.
1818
64daa791
AS
18192010-03-15 Andreas Schwab <schwab@redhat.com>
1820
1821 * configure.srv: Fix typo setting srv_regobj.
1822
f52cd8cd
PA
18232010-03-15 Pedro Alves <pedro@codesourcery.com>
1824
1825 * linux-low.c (fetch_register): Avoid passing a non string literal
1826 format to `error'.
1827 (usr_store_inferior_registers): Ditto.
1828
93ae6fdc
PA
18292010-03-14 Pedro Alves <pedro@codesourcery.com>
1830
1831 * linux-low.c (linux_write_memory): Bail out early if peeking
1832 memory failed.
1833
c3adc08c
PA
18342010-03-14 Pedro Alves <pedro@codesourcery.com>
1835
1836 * linux-low.h (struct lwp_info): New fields
1837 `stopped_by_watchpoint' and `stopped_data_address'.
1838 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
1839 here, and cache them in the lwp object.
1840 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
1841 directly.
1842 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
1843 field.
1844 (linux_stopped_by_watchpoint): Rewrite.
1845 (linux_stopped_data_address): Rewrite.
1846
bce522a2
PA
18472010-03-06 Simo Melenius <simo.melenius@iki.fi>
1848
1849 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
1850 switching the current inferior, not before.
1851
90884b2b
L
18522010-03-01 H.J. Lu <hongjiu.lu@intel.com>
1853
1854 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
1855 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
1856 i386-linux.c and amd64-linux.c.
1857 (reg-i386.o): Removed.
1858 (reg-i386.c): Likewise.
1859 (reg-i386-linux.o): Likewise.
1860 (reg-i386-linux.c): Likewise.
1861 (reg-x86-64.o): Likewise.
1862 (reg-x86-64.c): Likewise.
1863 (reg-x86-64-linux.o): Likewise.
1864 (reg-x86-64-linux.c): Likewise.
1865 (i386.o): New.
1866 (i386.c): Likewise.
1867 (i386-linux.o): Likewise.
1868 (i386-linux.c): Likewise.
1869 (amd64.o): Likewise.
1870 (amd64.c): Likewise.
1871 (amd64-linux.o): Likewise.
1872 (amd64-linux.c): Likewise.
1873
1874 * configure.srv (srv_i386_regobj): New.
1875 (srv_i386_linux_regobj): Likewise.
1876 (srv_amd64_regobj): Likewise.
1877 (srv_amd64_linux_regobj): Likewise.
1878 (srv_i386_32bit_xmlfiles): Likewise.
1879 (srv_i386_64bit_xmlfiles): Likewise.
1880 (srv_i386_xmlfiles): Likewise.
1881 (srv_amd64_xmlfiles): Likewise.
1882 (srv_i386_linux_xmlfiles): Likewise.
1883 (srv_amd64_linux_xmlfiles): Likewise.
1884 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
1885 srv_xmlfiles to $srv_i386_xmlfiles.
1886 (i[34567]86-*-mingw32ce*): Likewise.
1887 (i[34567]86-*-mingw*): Likewise.
1888 (i[34567]86-*-nto*): Likewise.
1889 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
1890 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
1891 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
1892 (x86_64-*-linux*): Likewise.
1893
1894 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
1895 (init_registers_amd64_linux): New.
1896 (x86_arch_setup): Replace init_registers_x86_64_linux with
1897 init_registers_amd64_linux.
1898
193f13e6
MK
18992010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
1900
1901 * configure.ac: Check for libdl. If it is not available link against
1902 static libthread_db.
1903 * configure: Regenerate.
1904
85d721b8
PA
19052010-02-22 Pedro Alves <pedro@codesourcery.com>
1906
1907 PR9605
1908
1909 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
1910 handing a read watchpoint.
1911 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
1912
6076632b
DE
19132010-02-12 Doug Evans <dje@google.com>
1914
1915 * linux-low.c (linux_supports_tracefork_flag): Document.
1916 (linux_look_up_symbols): Add comment.
1917
3327ccf7
L
19182010-02-03 H.J. Lu <hongjiu.lu@intel.com>
1919
1920 * regcache.c (supply_register): Clear regcache if buf is NULL.
1921
0718675c 19222010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 1923 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
1924
1925 * inferiors.c (find_inferior): Add function documentation.
1926 (unloaded_dll): Handle the case where the unloaded dll has not
1927 been previously registered in the dll list.
1928
177321bd
DJ
19292010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
1930
1931 * linux-arm-low.c (thumb_breakpoint_len): Delete.
1932 (thumb2_breakpoint): New.
1933 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
1934
2b009048
DJ
19352010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
1936
1937 * linux-low.c (get_stop_pc): Check for SIGTRAP.
1938 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
1939 breakpoints.
1940
3be029c7
PA
19412010-01-21 Pedro Alves <pedro@codesourcery.com>
1942
1943 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
1944
18f5de3b
JK
19452010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
1946
1947 * linux-s390-low.c (s390_collect_ptrace_register)
1948 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
1949
3743bb4f
DE
19502010-01-21 Doug Evans <dje@google.com>
1951
14ce3065
DE
1952 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
1953 (PTRACE_ARG4_TYPE): New macro.
1954 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
1955 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
1956 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
1957 (usr_store_inferior_registers): Ditto.
1958 (linux_read_memory, linux_write_memory): Ditto.
1959 (linux_test_for_tracefork): Ditto.
1960
3743bb4f
DE
1961 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
1962 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
1963
8b315be5
PA
19642010-01-21 Pedro Alves <pedro@codesourcery.com>
1965
1966 * proc-service.c (ps_lgetregs): Don't refetch registers from the
1967 target.
1968
85492558
PA
19692010-01-21 Pedro Alves <pedro@codesourcery.com>
1970
1971 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
1972 prototype to take a regcache. Adjust.
1973
442ea881
PA
19742010-01-20 Pedro Alves <pedro@codesourcery.com>
1975
1976 * regcache.h (struct thread_info): Forward declare.
1977 (struct regcache): New.
1978 (new_register_cache): Adjust prototype.
1979 (get_thread_regcache): Declare.
1980 (free_register_cache): Adjust prototype.
1981 (registers_to_string, registers_from_string): Ditto.
1982 (supply_register, supply_register_by_name, collect_register)
1983 (collect_register_as_string, collect_register_by_name): Ditto.
1984 * regcache.c (struct inferior_regcache_data): Delete.
1985 (get_regcache): Rename to ...
1986 (get_thread_regcache): ... this. Adjust. Switch inferior before
1987 fetching registers.
1988 (regcache_invalidate_one): Adjust.
1989 (regcache_invalidate): Fix prototype.
1990 (new_register_cache): Return the new register cache.
1991 (free_register_cache): Change prototype.
1992 (realloc_register_cache): Adjust.
1993 (registers_to_string): Change prototype to take a regcache. Adjust.
1994 (registers_from_string): Ditto.
1995 (register_data): Ditto.
1996 (supply_register): Ditto.
1997 (supply_register_by_name): Ditto.
1998 (collect_register): Ditto.
1999 (collect_register_as_string): Ditto.
2000 (collect_register_by_name): Ditto.
2001 * server.c (process_serial_event): Adjust.
2002 * linux-low.h (regset_fill_func, regset_store_func): Change
2003 prototype.
2004 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
2005 Change prototype.
2006 * linux-low.c (get_stop_pc): Adjust.
2007 (check_removed_breakpoint): Adjust.
2008 (linux_wait_for_event): Adjust.
2009 (linux_resume_one_lwp): Adjust.
2010 (fetch_register): Add regcache parameter. Adjust.
2011 (usr_store_inferior_registers): Ditto.
2012 (regsets_fetch_inferior_registers): Ditto.
2013 (regsets_store_inferior_registers): Ditto.
2014 (linux_fetch_registers, linux_store_registers): Ditto.
2015 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
2016 regcache. Adjust.
2017 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
2018 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
2019 prototype to take a regcache.
2020 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
2021 * remote-utils.c (convert_ascii_to_int, outreg)
2022 (prepare_resume_reply): Change prototype to take a regcache.
2023 Adjust.
2024 * target.h (struct target_ops) <fetch_registers, store_registers>:
2025 Change prototype to take a regcache.
2026 (fetch_inferior_registers, store_inferior_registers): Change
2027 prototype to take a regcache. Adjust.
2028 * proc-service.c (ps_lgetregs): Adjust.
2029 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
2030 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
2031 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
2032 take a regcache. Adjust.
2033 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
2034 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
2035 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
2036 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
2037 * linux-cris-low.c (cris_get_pc, cris_set_pc)
2038 (cris_cannot_fetch_register):
2039 (cris_breakpoint_at): Change prototype to take a regcache.
2040 Adjust.
2041 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
2042 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
2043 to take a regcache. Adjust.
2044 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
2045 Adjust.
2046 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
2047 take a regcache. Adjust.
2048 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
2049 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
2050 (m68k_set_pc): Change prototype to take a regcache. Adjust.
2051 * linux-mips-low.c (mips_get_pc):
2052 (mips_set_pc): Change prototype to take a regcache. Adjust.
2053 (mips_reinsert_addr): Adjust.
2054 (mips_collect_register): Change prototype to take a regcache.
2055 Adjust.
2056 (mips_supply_register):
2057 (mips_collect_register_32bit, mips_supply_register_32bit)
2058 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
2059 (mips_store_fpregset): Ditto.
2060 * linux-ppc-low.c (ppc_supply_ptrace_register, ppc_supply_ptrace_register):
2061 Ditto.
2062 (parse_spufs_run): Adjust.
2063 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
2064 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
2065 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
2066 take a regcache. Adjust.
2067 * linux-s390-low.c (s390_collect_ptrace_register)
2068 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
2069 (s390_set_pc): Change prototype to take a regcache. Adjust.
2070 (s390_arch_setup): Adjust.
2071 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
2072 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
2073 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
2074 (sparc_fill_gregset, sparc_store_gregset_from_stack)
2075 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
2076 regcache. Adjust.
2077 (sparc_breakpoint_at): Adjust.
2078 * linux-xtensa-low.c (xtensa_fill_gregset):
2079 (xtensa_store_gregset):
2080 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
2081 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
2082 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
2083 prototype to take a regcache. Adjust.
2084 * win32-arm-low.c (arm_fetch_inferior_register)
2085 (arm_store_inferior_register): Change prototype to take a
2086 regcache. Adjust.
2087 * win32-i386-low.c (i386_fetch_inferior_register)
2088 (i386_store_inferior_register): Change prototype to take a
2089 regcache. Adjust.
2090 * win32-low.c (child_fetch_inferior_registers)
2091 (child_store_inferior_registers): Change prototype to take a
2092 regcache. Adjust.
2093 (win32_wait): Adjust.
2094 (win32_fetch_inferior_registers): Change prototype to take a
2095 regcache. Adjust.
2096 (win32_store_inferior_registers): Adjust.
2097 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
2098 store_inferior_register>: Change prototype to take a regcache.
2099
60c3d7b0
DE
21002010-01-20 Doug Evans <dje@google.com>
2101
2102 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
2103 #ifdef.
2104 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 2105 (W_STOPCODE): Provide definition if missing.
60c3d7b0 2106
dc146f7c
VP
21072010-01-13 Vladimir Prus <vladimir@codesourcery.com>
2108
2109 * linux-low.c (linux_core_of_thread): New.
2110 (compare_ints, show_process, list_threads): New.
2111 (linux_qxfer_osdata): Report threads and cores.
2112 (linux_target_op): Register linux_core_of_thread.
2113 * remote-utils.c (prepare_resume_reply): Report the core.
2114 (buffer_xml_printf): Support %d specifier.
2115 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
2116 New.
2117 (handle_query): Handle qXfer:threads. Announce availability
2118 thereof.
2119 * target.h (struct target_ops): New field core_of_thread.
2120
7803799a
UW
21212010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
2122
2123 * Makefile.in (clean): Remove new generated files.
2124 (reg-s390.o, reg-s390.c): Remove rules.
2125 (reg-s390x.o, reg-s390x.c): Likewise.
2126 (s390-linux32.o, s390-linux32.c): Add rules.
2127 (s390-linux64.o, s390-linux64.c): Likewise.
2128 (s390x-linux64.o, s390x-linux64.c): Likewise.
2129 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
2130 * linux-s390-low.c: Include <elf.h>.
2131 (HWCAP_S390_HIGH_GPRS): Define if undefined.
2132 (init_registers_s390): Remove prototype.
2133 (init_registers_s390x): Likewise.
2134 (init_registers_s390_linux32): Add prototype.
2135 (init_registers_s390_linux64): Likewise.
2136 (init_registers_s390x_linux64): Likewise.
2137 (s390_num_regs_3264): New define.
2138 (s390_regmap_3264): New global variable.
2139 (s390_cannot_fetch_register): Remove obsolete check.
2140 (s390_cannot_store_register): Likewise.
2141 (s390_collect_ptrace_register): Handle upper/lower register halves.
2142 (s390_supply_ptrace_register): Likewise.
2143 (s390_fill_gregset): Update to register number changes.
2144 (s390_get_hwcap): New routine.
2145 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
2146 Install appropriate regmap and register set.
2147
6e7ffa39
JB
21482010-01-01 Joel Brobecker <brobecker@adacore.com>
2149
2150 * server.c (gdbserver_version): Update copyright year to 2010.
2151 * gdbreplay.c (gdbreplay_version): Likewise.
2152
957f3f49
DE
21532009-12-28 Doug Evans <dje@google.com>
2154
2155 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
2156 elf/external.h. Include <elf.h> instead but only if necessary.
2157
ca5c370d
PA
21582009-12-28 Pedro Alves <pedro@codesourcery.com>
2159
2160 * linux-low.c (linux_remove_process): Remove `detaching'
2161 parameter. Don't release/detach from thread_db here.
2162 (linux_kill): Release/detach from thread_db here, ...
2163 (linux_detach): ... and here, before actually detaching.
2164 (linux_wait_1): ... and here, when a process exits.
2165 * thread-db.c (any_thread_of): New.
2166 (thread_db_free): Switch the current inferior to a thread of the
2167 passed in process.
2168
4ee62156
DE
21692009-12-21 Doug Evans <dje@google.com>
2170
d90e6a88
DE
2171 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
2172
c5f62d5f
DE
2173 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
2174 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
2175 warning ifndef __NR_tkill. Move setting of errno there too.
2176 Delete unnecessary resetting of errno after syscall.
2177 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
2178
10e86dd7
DE
2179 * configure.ac: Check for dladdr.
2180 * config.in: Regenerate.
2181 * configure: Regenerate.
2182 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
2183 (try_thread_db_load): Update.
2184
4ee62156
DE
2185 * linux-low.c (my_waitpid): Delete unnecessary prototype.
2186
00f515da
DE
21872009-12-18 Doug Evans <dje@google.com>
2188
e9464885
DE
2189 * event-loop.c: Include unistd.h if it exists.
2190
07d4f67e
DE
2191 * linux-low.c (my_waitpid): Move definition away from being in
2192 between linux_tracefork_child/linux_test_for_tracefork.
2193
00f515da
DE
2194 * gdb_proc_service.h (psaddr_t): Fix type.
2195 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
2196 signature to match glibc.
2197
1de1badb
DE
21982009-12-16 Doug Evans <dje@google.com>
2199
2200 * linux-low.c (linux_read_memory): Fix argument to read.
2201
aeeb81d1
PA
22022009-11-26 Pedro Alves <pedro@codesourcery.com>
2203
2204 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
2205 events, don't leave current_inferior pointing at null.
2206
10357975
PA
22072009-11-26 Pedro Alves <pedro@codesourcery.com>
2208
2209 * win32-low.c (LOG): Delete.
2210 (OUTMSG): Output to stderr.
2211 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
2212 on compile time LOG macro.
2213 (win32_wait): Fix debug output.
2214
cf6e3471
PA
22152009-11-26 Pedro Alves <pedro@codesourcery.com>
2216
2217 * win32-low.c (win32_add_one_solib): If the dll name is
2218 "ntdll.dll", prepend the system directory to the dll path.
2219
0c85e18e
MK
22202009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
2221
2222 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
2223
9ac544ce 22242009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 2225 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
2226
2227 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
2228 * configure.ac: Check for __mcoldfire__ and set
2229 gdb_cv_m68k_is_coldfire.
2230 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
2231 reg-cf.o and reg-m68k.o.
2232 * configure: Regenerated.
2233
fd7dd3e6
PA
22342009-11-16 Pedro Alves <pedro@codesourcery.com>
2235
2236 * linux-low.c (linux_remove_process): Add `detaching' parameter.
2237 Pass it to thread_db_free.
2238 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
2239 proper `detaching' argument to linux_remove_process.
2240 * linux-low.h (thread_db_free): Add `detaching' parameter.
2241 * thread-db.c (thread_db_init): Pass false as `detaching' argument
2242 to thread_db_free.
2243 (thread_db_free): Add `detaching' parameter. Only
2244 call td_ta_clear_event if detaching from process.
2245
75aa492e
MK
22462009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
2247
2248 * thread-db.c (thread_db_free): Fix typo.
2249
21e1bee4
PP
22502009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
2251
2252 PR gdb/10838
2253 * thread-db.c (thread_db_free): Call td_ta_clear_event.
2254
8838b45e
NS
22552009-11-03 Nathan Sidwell <nathan@codesourcery.com>
2256
2257 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
2258 with an i686 compiler.
2259 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
2260 needed.
2261 * configure: Rebuilt.
2262
8a35fb51
SL
22632009-10-29 Sandra Loosemore <sandra@codesourcery.com>
2264
2265 PR gdb/10783
2266
2267 * server.c (handle_search_memory_1): Correct read_addr initialization
2268 in loop for searching subsequent chunks.
2269
96f15937
PP
22702009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
2271
2272 * configure.ac: New --with-libthread-db option.
2273 * thread-db.c: Allow direct dependence on libthread_db.
2274 (thread_db_free): Adjust.
2275 * config.in: Regenerate.
2276 * configure: Likewise.
889bf7c5 2277
5f7d1694
PP
22782009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
2279
2280 PR gdb/10757
2281 * thread-db.c (attach_thread): New function.
2282 (maybe_attach_thread): Return success/failure.
2283 (find_new_threads_callback): Adjust.
889bf7c5
PA
2284 (thread_db_find_new_threads): Loop until no new threads.
2285
88e3b899
PA
22862009-10-13 Pedro Alves <pedro@codesourcery.com>
2287
2288 * proc-service.c (ps_lgetregs): Formatting.
2289
cdbfd419
PP
22902009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
2291
2292 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
2293 * configure.ac: Adjust.
2294 * linux-low.h (struct process_info_private): Move members to struct
2295 thread_db.
2296 (thread_db_free, thread_db_handle_monitor_command): New prototype.
2297 * linux-low.c (linux_remove_process): Adjust.
2298 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
2299 * server.c (handle_query): Move code ...
2300 (handle_monitor_command): ... here. New function.
2301 * target.h (struct target_ops): New member.
2302 * thread-db.c (struct thread_db): New.
2303 (libthread_db_search_path): New variable.
2304 (thread_db_create_event, thread_db_enable_reporting)
2305 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
2306 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
2307 (try_thread_db_load_1, dladdr_to_soname): New functions.
2308 (try_thread_db_load, thread_db_load_search): New functions.
2309 (thread_db_init): Search for libthread_db.
2310 (thread_db_free): New function.
2311 (thread_db_handle_monitor_command): Likewise.
2312 * config.in: Regenerate.
2313 * configure: Regenerate.
889bf7c5 2314
4168d2d6
UW
23152009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
2316
2317 * spu-low.c (spu_kill): Wait for inferior to terminate.
2318 Call clear_inferiors.
2319 (spu_detach): Call clear_inferiors.
2320
81ecdfbb
RW
23212009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2322
2323 * aclocal.m4: Regenerate.
2324 * config.in: Likewise.
2325 * configure: Likewise.
2326
0b9ff2c0
UW
23272009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
2328
2329 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
2330 (parse_spufs_run): New function.
2331 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
2332 (ppc_breakpoint_at): Handle SPU breakpoints.
2333
efcbbd14
UW
23342009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
2335
2336 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
2337 (SPUFS_MAGIC): Define.
2338 (spu_enumerate_spu_ids): New function.
2339 (linux_qxfer_spu): New function.
2340 (linux_target_ops): Install linux_qxfer_spu.
2341
f4d9bade
UW
23422009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
2343
2344 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
2345 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
2346 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
2347 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
2348 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
2349 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
2350 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
2351 (init_registers_powerpc_cell32l): Add prototype.
2352 (init_registers_powerpc_cell64l): Likewise.
2353 (ppc_arch_setup): Detect Cell/B.E. architecture.
2354
96e946ca
RW
23552009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2356
2357 * Makefile.in (datarootdir): New variable.
2358
58d6951d
DJ
23592009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
2360
2361 * linux-low.c (linux_write_memory): Update debugging output.
2362 * Makefile.in (clean): Add new descriptions.
2363 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
2364 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
2365 * configure.srv: Add new files for arm*-*-linux*.
2366 * linux-arm-low.c: Add new declarations.
2367 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
2368 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
2369 (HWCAP_VFPv3D16): New.
2370 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
2371 instead of __IWMMXT__.
2372 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
2373 (arm_arch_setup): New.
2374 (target_regsets): Remove #ifdef. Add VFP regset.
2375 (the_low_target): Use arm_arch_setup.
2376
12b42a12
DJ
23772009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
2378
2379 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
2380 the main thread again.
2381
ac8c974e
AR
23822009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
2383
2384 Adding Neutrino gdbserver.
2385 * configure: Regenerated.
2386 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
2387 * configure.srv (i[34567]86-*-nto*): New target.
2388 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
2389 * remote-utils.c [__QNX__]: Include sys/iomgr.h
2390 (nto_comctrl) [__QNX__]: New function.
2391 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
2392
4424e0c3 23932009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
2394
2395 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
2396 srv_tgtobj.
2397
912cf4ba
PA
23982009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
2399 Pedro Alves <pedro@codesourcery.com>
2400
2401 * win32-i386-low.c (i386_get_thread_context): Handle systems that
2402 don't support CONTEXT_EXTENDED_REGISTERS.
2403 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
2404 (the_low_target): Install them.
2405 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
2406 failing with ERROR_PIPE_NOT_CONNECTED.
2407
aa5ca48f
DE
24082009-06-30 Doug Evans <dje@google.com>
2409 Pierre Muller <muller@ics.u-strasbg.fr>
2410
2411 Add h/w watchpoint support to x86-linux, win32-i386.
2412 * Makefile.in (SFILES): Add i386-low.c
2413 (i386_low_h): Define.
2414 (i386-low.o): Add dependencies.
2415 (linux-x86-low.o): Add i386-low.h dependency.
2416 (win32-i386-low.o): Ditto.
2417 * i386-low.c: New file.
2418 * i386-low.h: New file.
2419 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
2420 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
2421 * linux-low.c (linux_add_process): Initialize arch_private.
2422 (linux_remove_process): Free arch_private.
2423 (add_lwp): Initialize arch_private.
2424 (delete_lwp): Free arch_private.
2425 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
2426 provided.
2427 * linux-low.h (process_info_private): New member arch_private.
2428 (lwp_info): New member arch_private.
2429 (linux_target_ops): New members new_process, new_thread,
2430 prepare_to_resume.
2431 (ptid_of): New macro.
2432 * linux-x86-low.c: Include stddef.h, i386-low.h.
2433 (arch_process_info): New struct.
2434 (arch_lwp_info): New struct.
2435 (x86_linux_dr_get, x86_linux_dr_set): New functions.
2436 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
2437 (i386_dr_low_get_status): New function.
2438 (x86_insert_point, x86_remove_point): New functions.
2439 (x86_stopped_by_watchpoint): New function.
2440 (x86_stopped_data_address): New function.
2441 (x86_linux_new_process, x86_linux_new_thread): New functions.
2442 (x86_linux_prepare_to_resume): New function.
2443 (the_low_target): Add entries for insert_point, remove_point,
2444 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
2445 prepare_to_resume.
2446 * server.c (debug_hw_points): New global.
2447 (monitor_show_help): Document set debug-hw-points.
2448 (handle_query): Process "set debug-hw-points".
2449 * server.h (debug_hw_points): Declare.
2450 (paddress): Declare.
2451 * utils.c (NUMCELLS, CELLSIZE): New macros.
2452 (get_sell, xsnprintf, paddress): New functions.
2453 * win32-arm-low.c (the_low_target): Add entries for insert_point,
2454 remove_point, stopped_by_watchpoint, stopped_data_address.
2455 * win32-i386-low.c: Include i386-low.h.
2456 (debug_reg_state): Replaces dr.
2457 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
2458 (i386_dr_low_get_status): New function.
2459 (i386_insert_point, i386_remove_point): New functions.
2460 (i386_stopped_by_watchpoint): New function.
2461 (i386_stopped_data_address): New function.
2462 (i386_initial_stuff): Update.
2463 (get_thread_context,set_thread_context,i386_thread_added): Update.
2464 (the_low_target): Add entries for insert_point,
2465 remove_point, stopped_by_watchpoint, stopped_data_address.
2466 * win32-low.c (win32_insert_watchpoint): New function.
2467 (win32_remove_watchpoint): New function.
2468 (win32_stopped_by_watchpoint): New function.
2469 (win32_stopped_data_address): New function.
2470 (win32_target_ops): Add entries for insert_watchpoint,
2471 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
2472 * win32-low.h (win32_target_ops): New members insert_point,
2473 remove_point, stopped_by_watchpoint, stopped_data_address.
2474
d993e290
PA
24752009-06-25 Pedro Alves <pedro@codesourcery.com>
2476
2477 * server.c (process_serial_event): Re-return unsupported, not
2478 error, if the type isn't recognized. Re-allow supporting only
2479 insert or remove packets. Also call require_running for
2480 breakpoints. Add missing break statement to default case. Tidy.
2481 * target.h (struct target_ops): Rename insert_watchpoint to
2482 insert_point, and remove_watchpoint to remove_point.
2483
2484 * linux-low.h (struct linux_target_ops): Likewise.
2485 * linux-low.c (linux_insert_watchpoint): Rename to ...
2486 (linux_insert_point): ... this. Adjust.
2487 (linux_remove_watchpoint): Rename to ...
2488 (linux_remove_point): ... this. Adjust.
2489 (linux_target_ops): Adjust.
2490 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
2491 (cris_insert_point): ... this.
2492 (cris_remove_watchpoint): Rename to ...
2493 (cris_remove_point): ... this.
2494 (the_low_target): Adjust.
2495
0f54c268
PM
24962009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
2497
2498 * server.c (handle_v_kill): Pass signal_pid to
2499 kill_inferior if multi_process is zero.
2500
c6314022
AR
25012009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
2502
2503 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
2504 * target.h (target_ops): Comment for *_watchpoint to make it clear
2505 the functions can get types '0' and '1'.
2506
4463ce24
AR
25072009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
2508
2509 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
2510 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
2511 * regcache.c (get_regcache): Likewise.
2512 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
2513 * win32-low.c (child_fetch_inferior_registers): Remove check for
2514 regno 0.
2515
cf8fd78b
PA
25162009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
2517 Pedro Alves <pedro@codesourcery.com>
2518
2519 * target.h (struct target_ops) <supports_multi_process>: New
2520 callback.
2521 (target_supports_multi_process): New.
2522 * server.c (handle_query): Even if GDB reports support, only
2523 enable multi-process if the target also supports it. Report
2524 multi-process support only if the target backend supports it.
2525 * linux-low.c (linux_supports_multi_process): New function.
2526 (linux_target_ops): Install it as target_supports_multi_process
2527 callback.
2528
47c0c975
DE
25292009-05-24 Doug Evans <dje@google.com>
2530
e09875d4
DE
2531 Global renaming of find_thread_pid to find_thread_ptid.
2532 * server.h (find_thread_ptid): Renamed from find_thread_pid.
2533 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
2534 All callers updated.
2535
e27d73f6
DE
2536 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
2537 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
2538 directly.
2539
47c0c975
DE
2540 * linux-low.c (get_stop_pc): Print pc if debug_threads.
2541 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
2542 (linux_resume_one_lwp): Ditto.
2543
2acc282a
DE
25442009-05-23 Doug Evans <dje@google.com>
2545
2546 * linux-low.c (linux_resume_one_lwp): Change type of first arg
2547 from struct inferior_list_entry * to struct lwp_info *.
2548 All callers updated.
2549
9f1036c1
DE
25502009-05-13 Doug Evans <dje@google.com>
2551
2552 * linux-x86-low.c: Don't include assert.h.
2553 (x86_siginfo_fixup): Use fatal, not assert.
2554 (x86_arch_setup): Fix comment.
2555
d0722149
DE
25562009-05-12 Doug Evans <dje@google.com>
2557
2558 Biarch support for i386/amd64 gdbserver.
2559 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
2560 Add linux-x86-low.c.
2561 (linux-i386-low.o, linux-x86-64-low.o): Delete.
2562 (linux-x86-low.o): Add.
2563 * linux-x86-64-low.c: Delete.
2564 * linux-i386-low.c: Delete.
2565 * linux-x86-low.c: New file.
2566 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
2567 linux-x86-low.o.
2568 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
2569 linux-x86-low.o.
2570 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
2571 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
2572 (linux_child_pid_to_exec_file): New function.
2573 (elf_64_header_p, elf_64_file_p): New functions.
2574 (siginfo_fixup): New function.
2575 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
2576 give target a chance to convert layout.
2577 * linux-low.h (linux_target_ops): New member siginfo_fixup.
2578 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
2579
fdeb2a12
DE
25802009-05-07 Doug Evans <dje@google.com>
2581
2582 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
2583 (regsets_store_inferior_registers): Ditto.
2584
a6dbe5df
PA
25852009-05-06 Pedro Alves <pedro@codesourcery.com>
2586
2587 PR server/10048
2588
2589 * linux-low.c (must_set_ptrace_flags): Delete.
2590 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
2591 of the global.
2592 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
2593 `lwp->must_set_ptrace_flags' instead.
ba42693b 2594 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
2595 (linux_wait_1): ... not here.
2596
5091eb23
DE
25972009-04-30 Doug Evans <dje@google.com>
2598
9f767825
DE
2599 * inferiors.c (started_inferior_callback): New function.
2600 (attached_inferior_callback): New function.
2601 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
2602 * server.c (print_started_pid, print_attached_pid): New functions.
2603 (detach_or_kill_for_exit): New function.
2604 (main): Call it instead of for_each_inferior (kill_inferior_callback).
2605 * server.h (have_started_inferiors_p): Declare.
2606 (have_attached_inferiors_p): Declare.
2607
5091eb23
DE
2608 * inferiors.c (remove_process): Fix memory leak, free process.
2609 * linux-low.c (linux_remove_process): New function.
2610 (linux_kill): Call it instead of remove_process.
2611 (linux_detach, linux_wait_1): Ditto.
2612
155c8968
PA
26132009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
2614
2615 * configure.srv: Add x86 Windows CE target.
2616
7fe519cb
UW
26172009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
2618
2619 * inferiors.c (get_thread_process): Make global.
2620 * server.h (get_thread_process): Add prototype.
2621 * thread-db.c (find_one_thread): Use get_thread_process
2622 instead of current_process.
2623 (thread_db_get_tls_address): Do not crash if called when
2624 thread layer is not yet initialized.
2625
5472f405
UW
26262009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
2627
2628 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
2629 * spu-low.c (current_tid): Rename to ...
2630 (current_ptid): ... this.
2631 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
2632 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
2633 ptid_get_lwp (current_ptid) instead of current_tid.
2634 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
2635 instead of current_tid. Use find_process_pid to verify pid
2636 argument is valid. Pass proper argument to remove_process.
2637 (spu_thread_alive): Compare current_ptid instead of current_tid.
2638 (spu_resume): Likewise.
2639
55ac2b99
PA
26402009-04-02 Pedro Alves <pedro@codesourcery.com>
2641
2642 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
2643 variable.
2644
95954743
PA
26452009-04-01 Pedro Alves <pedro@codesourcery.com>
2646
2647 Implement the multiprocess extensions, and add linux multiprocess
2648 support.
2649
2650 * server.h (ULONGEST): Declare.
2651 (struct ptid, ptid_t): New.
2652 (minus_one_ptid, null_ptid): Declare.
2653 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
2654 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
2655 (struct inferior_list_entry): Change `id' type from unsigned from
2656 to ptid_t.
2657 (struct sym_cache, struct breakpoint, struct
2658 process_info_private): Forward declare.
2659 (struct process_info): Declare.
2660 (current_process): Declare.
2661 (all_processes): Declare.
2662 (initialize_inferiors): Declare.
2663 (add_thread): Adjust to use ptid_t.
2664 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
2665 (add_process, remove_process, find_thread_pid): Declare.
2666 (find_inferior_id): Adjust to use ptid_t.
2667 (cont_thread, general_thread, step_thread): Change type to ptid_t.
2668 (multi_process): Declare.
2669 (push_event): Adjust to use ptid_t.
2670 (read_ptid, write_ptid): Declare.
2671 (prepare_resume_reply): Adjust to use ptid_t.
2672 (clear_symbol_cache): Declare.
2673 * inferiors.c (all_processes): New.
2674 (null_ptid, minus_one_ptid): New.
2675 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
2676 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
2677 (add_thread): Change unsigned long to ptid. Remove gdb_id
2678 parameter. Adjust.
2679 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
2680 (gdb_id_to_thread): Rename to ...
2681 (find_thread_pid): ... this. Change unsigned long to ptid.
2682 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
2683 (loaded_dll, pull_pid_from_list): Adjust.
2684 (add_process, remove_process, find_process_pid)
2685 (get_thread_process, current_process, initialize_inferiors): New.
2686 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
2687 (struct target_waitstatus) <related_pid>: Ditto.
2688 (struct target_ops) <kill, detach>: Add `pid' argument. Change
2689 return type to int.
2690 (struct target_ops) <join>: Add `pid' argument.
2691 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
2692 (struct target_ops) <wait>: Add `ptid' field. Change return type
2693 to ptid.
2694 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
2695 (mywait): Add `ptid' argument. Change return type to ptid_t.
2696 (target_pid_to_str): Declare.
2697 * target.c (set_desired_inferior): Adjust to use ptids.
2698 (mywait): Add new `ptid' argument. Adjust.
2699 (target_pid_to_str): New.
2700 * mem-break.h (free_all_breakpoints): Declare.
2701 * mem-break.c (breakpoints): Delelete.
2702 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
2703 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
2704 to use per-process breakpoint list.
2705 (free_all_breakpoints): New.
2706 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
2707 (symbol_cache, all_symbols_looked_up): Delete.
2708 (hexchars): New.
2709 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
2710 read_ptid): New.
2711 (prepare_resume_reply): Change ptid argument's type from unsigned
2712 long to ptid_t. Adjust. Implement W;process and X;process.
2713 (free_sym_cache, clear_symbol_cache): New.
2714 (look_up_one_symbol): Adjust to per-process symbol cache. *
2715 * server.c (cont_thread, general_thread, step_thread): Change type
2716 to ptid_t.
2717 (attached): Delete.
2718 (multi_process): New.
2719 (last_ptid): Change type to ptid_t.
2720 (struct vstop_notif) <ptid>: Change type to ptid_t.
2721 (queue_stop_reply, push_event): Change `ptid' argument's type to
2722 ptid_t.
2723 (discard_queued_stop_replies): Add `pid' argument.
2724 (start_inferior): Adjust to use ptids. Adjust to mywait interface
2725 changes. Don't reference the `attached' global.
2726 (attach_inferior): Adjust to mywait interface changes.
2727 (handle_query): Adjust to use ptids. Parse GDB's qSupported
2728 features. Handle and report "multiprocess+". Handle
2729 "qAttached:PID".
2730 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
2731 changes.
2732 (handle_v_kill): New.
2733 (handle_v_stopped): Adjust to use target_pid_to_str.
2734 (handle_v_requests): Allow multiple attaches and runs when
2735 multiprocess extensions are in effect. Handle "vKill".
2736 (myresume): Adjust to use ptids.
2737 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
2738 (handle_status): Adjust to discard_queued_stop_replies interface
2739 change.
2740 (first_thread_of, kill_inferior_callback)
2741 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
2742 (main): Call initialize_inferiors. Adjust to use ptids, killing
2743 and detaching from all inferiors. Handle multiprocess packet
2744 variants.
2745 * linux-low.h: Include gdb_proc_service.h.
2746 (struct process_info_private): New.
2747 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
2748 <lwpid_of>: Use ptid_get_lwp.
2749 (get_lwp_thread): Adjust.
2750 (struct lwp_info): Add `dead' member.
2751 (find_lwp_pid): Declare.
2752 * linux-low.c (thread_db_active): Delete.
2753 (new_inferior): Adjust comment.
2754 (inferior_pid): Delete.
2755 (linux_add_process): New.
2756 (handle_extended_wait): Adjust.
2757 (add_lwp): Change unsigned long to ptid.
2758 (linux_create_inferior): Add process to processes table. Adjust
2759 to use ptids. Don't set new_inferior here.
2760 (linux_attach_lwp): Rename to ...
2761 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
2762 it. Adjust to use ptids.
2763 (linux_attach_lwp): New.
2764 (linux_attach): Add process to processes table. Don't set
2765 new_inferior here.
2766 (struct counter): New.
2767 (second_thread_of_pid_p, last_thread_of_process_p): New.
2768 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
2769 multiple processes.
2770 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
2771 processes. Remove process from process table.
2772 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
2773 to multiple processes.
2774 (any_thread_of): New.
2775 (linux_detach): Add `pid' argument, and handle it. Remove process
2776 from processes table.
2777 (linux_join): Add `pid' argument. Handle it.
2778 (linux_thread_alive): Change unsighed long argument to ptid_t.
2779 Consider dead lwps as not being alive.
2780 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
2781 threads we're not interested in.
2782 (same_lwp, find_lwp_pid): New.
2783 (linux_wait_for_lwp): Change `pid' argument's type from int to
2784 ptid_t. Adjust.
2785 (linux_wait_for_event): Rename to ...
2786 (linux_wait_for_event_1): ... this. Change `pid' argument's type
2787 from int to ptid_t. Adjust.
2788 (linux_wait_for_event): New.
2789 (linux_wait_1): Add `ptid' argument. Change return type to
2790 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
2791 that exit from the process table.
2792 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
2793 Adjust.
2794 (mark_lwp_dead): New.
2795 (wait_for_sigstop): Adjust to use ptids. If a process exits while
2796 stopping all threads, mark its main lwp as dead.
2797 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
2798 ptids.
2799 (fetch_register, usr_store_inferior_registers)
2800 (regsets_fetch_inferior_registers)
2801 (regsets_store_inferior_registers, linux_read_memory)
2802 (linux_write_memory): Inline `inferior_pid'.
2803 (linux_look_up_symbols): Adjust to use per-process
2804 `thread_db_active'.
2805 (linux_request_interrupt): Adjust to use ptids.
2806 (linux_read_auxv): Inline `inferior_pid'.
2807 (initialize_low): Don't reference thread_db_active.
2808 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
2809 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
2810 (ps_getpid): Return the pid of the current inferior.
2811 * thread-db.c (proc_handle, thread_agent): Delete.
2812 (thread_db_create_event, thread_db_enable_reporting): Adjust to
2813 per-process data.
2814 (find_one_thread): Change argument type to ptid_t. Adjust to
2815 per-process data.
2816 (maybe_attach_thread): Adjust to per-process data and ptids.
2817 (thread_db_find_new_threads): Ditto.
2818 (thread_db_init): Ditto.
2819 * spu-low.c (spu_create_inferior, spu_attach): Add process to
2820 processes table. Adjust to use ptids.
2821 (spu_kill, spu_detach): Adjust interface. Remove process from
2822 processes table.
2823 (spu_join, spu_thread_alive): Adjust interface.
2824 (spu_wait): Adjust interface. Remove process from processes
2825 table. Adjust to use ptids.
2826 * win32-low.c (current_inferior_tid): Delete.
2827 (current_inferior_ptid): New.
2828 (debug_event_ptid): New.
2829 (thread_rec): Take a ptid. Adjust.
2830 (child_add_thread): Add `pid' argument. Adjust to use ptids.
2831 (child_delete_thread): Ditto.
2832 (do_initial_child_stuff): Add `attached' argument. Add process to
2833 processes table.
2834 (child_fetch_inferior_registers, child_store_inferior_registers):
2835 Adjust.
2836 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
2837 (win32_attach): Pass 1 to do_initial_child_stuff.
2838 (win32_kill): Adjust interface. Remove process from processes
2839 table.
2840 (win32_detach): Ditto.
2841 (win32_join): Adjust interface.
2842 (win32_thread_alive): Take a ptid.
2843 (win32_resume): Adjust to use ptids.
2844 (get_child_debug_event): Ditto.
2845 (win32_wait): Adjust interface. Remove exiting process from
2846 processes table.
2847
bd99dc85
PA
28482009-04-01 Pedro Alves <pedro@codesourcery.com>
2849
2850 Non-stop mode support.
2851
2852 * server.h (non_stop): Declare.
2853 (gdb_client_data, handler_func): Declare.
2854 (delete_file_handler, add_file_handler, start_event_loop):
2855 Declare.
2856 (handle_serial_event, handle_target_event, push_event)
2857 (putpkt_notif): Declare.
2858 * target.h (enum resume_kind): New.
2859 (struct thread_resume): Replace `step' field by `kind' field.
2860 (TARGET_WNOHANG): Define.
2861 (struct target_ops) <wait>: Add `options' argument.
2862 <supports_non_stop, async, start_non_stop>: New fields.
2863 (target_supports_non_stop, target_async): New.
2864 (start_non_stop): Declare.
2865 (mywait): Add `options' argument.
2866 * target.c (mywait): Add `options' argument. Print child exit
2867 notifications here.
2868 (start_non_stop): New.
2869 * server.c (non_stop, own_buf, mem_buf): New globals.
2870 (struct vstop_notif): New.
2871 (notif_queue): New global.
2872 (queue_stop_reply, push_event, discard_queued_stop_replies)
2873 (send_next_stop_reply): New.
2874 (start_inferior): Adjust to use resume_kind. Adjust to mywait
2875 interface changes.
2876 (attach_inferior): In non-stop mode, don't wait for the target
2877 here.
2878 (handle_general_set): Handle QNonStop.
2879 (handle_query): When handling qC, return the current general
2880 thread, instead of the first thread of the list.
2881 (handle_query): If the backend supports non-stop mode, include
2882 QNonStop+ in the qSupported query response.
2883 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
2884 and non-stop mode.
2885 (handle_v_attach, handle_v_run): Handle non-stop mode.
2886 (handle_v_stopped): New.
2887 (handle_v_requests): Report support for vCont;t. Handle vStopped.
2888 (myresume): Adjust to use resume_kind. Handle non-stop.
2889 (queue_stop_reply_callback): New.
2890 (handle_status): Handle non-stop mode.
2891 (main): Clear non_stop flag on reconnection. Use the event-loop.
2892 Refactor serial protocol handling from here ...
2893 (process_serial_event): ... to this new function. When GDB
2894 selects any thread, select one here. In non-stop mode, wait until
2895 GDB acks all pending events before exiting.
2896 (handle_serial_event, handle_target_event): New.
2897 * remote-utils.c (remote_open): Install remote_desc in the event
2898 loop.
2899 (remote_close): Remove remote_desc from the event loop.
2900 (putpkt_binary): Rename to...
2901 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
2902 (putpkt_binary): New as wrapper around putpkt_binary_1.
2903 (putpkt_notif): New.
2904 (prepare_resume_reply): In non-stop mode, don't change the
2905 general_thread.
2906 * event-loop.c: New.
2907 * Makefile.in (OBJ): Add event-loop.o.
2908 (event-loop.o): New rule.
2909
2910 * linux-low.h (pid_of): Moved here.
2911 (lwpid_of): New.
2912 (get_lwp_thread): Use lwpid_of.
2913 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
2914 * linux-low.c (pid_of): Delete.
2915 (inferior_pid): Use lwpid_of.
2916 (linux_event_pipe): New.
2917 (target_is_async_p): New.
2918 (delete_lwp): New.
2919 (handle_extended_wait): Use lwpid_of.
2920 (add_lwp): Don't set lwpid field.
2921 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
2922 (linux_kill_one_lwp): If killing a running lwp, stop it first.
2923 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
2924 (linux_detach_one_lwp): If detaching from a running lwp, stop it
2925 first. Adjust to linux_wait_for_event interface changes. Use
2926 lwpid_of.
2927 (linux_detach): Don't delete the main lwp here.
2928 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
2929 (status_pending_p): Don't consider explicitly suspended lwps.
2930 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
2931 pointer. Add OPTIONS argument. Change return type to int. Use
2932 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
2933 (linux_wait_for_event): Take an integer pid instead of a lwp_info
2934 pointer. Add status pointer argument. Return a pid instead of a
2935 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
2936 changes. In non-stop mode, don't switch to a random thread.
2937 (linux_wait): Rename to...
2938 (linux_wait_1): ... this. Add target_options argument, and handle
2939 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
2940 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
2941 clean exit and signal exit code. Don't stop all threads in
2942 non-stop mode. In all-stop mode, only stop all threads when
2943 reporting a stop to GDB. Handle explicit thread stop requests.
2944 (async_file_flush, async_file_mark): New.
2945 (linux_wait): New.
2946 (send_sigstop): Use lwpid_of.
2947 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
2948 interface changes. In non-stop mode, don't switch to a random
2949 thread.
2950 (linux_resume_one_lwp): Use lwpid_of.
2951 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
2952 (linux_resume_one_thread): ... this. Handle resume_stop. In
2953 non-stop mode, don't look for pending flag in all threads.
2954 (resume_status_pending_p): Don't consider explicitly suspended
2955 threads.
2956 (my_waitpid): Reimplement. Emulate __WALL.
2957 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
2958 Use lwpid_of.
2959 (sigchld_handler, linux_supports_non_stop, linux_async)
2960 (linux_start_non_stop): New.
2961 (linux_target_ops): Register linux_supports_non_stop, linux_async
2962 and linux_start_non_stop.
2963 (initialize_low): Install SIGCHLD handler.
2964 * thread-db.c (thread_db_create_event, find_one_thread)
2965 (thread_db_get_tls_address): Use lwpid_of.
2966 * win32-low.c (win32_detach): Adjust to use resume_kind.
2967 (win32_wait): Add `options' argument.
2968 * spu-low.c (spu_resume): Adjust to use resume_kind.
2969 (spu_wait): Add `options' argument.
2970
5b1c542e
PA
29712009-04-01 Pedro Alves <pedro@codesourcery.com>
2972
2973 Decouple target code from remote protocol.
2974
2975 * target.h (enum target_waitkind): New.
2976 (struct target_waitstatus): New.
2977 (struct target_ops) <wait>: Return an unsigned long. Take a
2978 target_waitstatus pointer instead of a char pointer.
2979 (mywait): Likewise.
2980 * target.c (mywait): Change prototype to return an unsigned long.
2981 Take a target_waitstatus pointer instead of a char pointer. Adjust.
2982 * server.h (thread_from_wait, old_thread_from_wait): Delete
2983 declarations.
2984 (prepare_resume_reply): Change prototype to take a
2985 target_waitstatus.
2986 * server.c (thread_from_wait, old_thread_from_wait): Delete.
2987 (last_status, last_ptid): New.
2988 (start_inferior): Remove "statusptr" argument. Adjust. Return a
2989 pid instead of a signal.
2990 (attach_inferior): Remove "status" and "signal" parameters.
2991 Adjust.
2992 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
2993 not as an address.
2994 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
2995 (handle_v_requests, myresume): Remove "status" and "signal"
2996 parameters. Adjust.
2997 (handle_status): New.
2998 (main): Delete local `status'. Adjust.
2999 * remote-utils.c: Include target.h.
3000 (prepare_resume_reply): Change prototype to take a
3001 target_waitstatus. Adjust.
3002
3003 * linux-low.c (linux_wait): Adjust to new target_ops->wait
3004 interface.
3005 * spu-low.c (spu_wait): Adjust.
3006 * win32-low.c (enum target_waitkind, struct target_waitstatus):
3007 Delete.
3008 (win32_wait): Adjust.
3009
2bd7c093
PA
30102009-04-01 Pedro Alves <pedro@codesourcery.com>
3011
3012 * target.h (struct thread_resume): Delete leave_stopped member.
3013 (struct target_ops): Add a `n' argument to the `resume' callback.
3014 * server.c (start_inferior): Adjust.
3015 (handle_v_cont, myresume): Adjust.
3016 * linux-low.c (check_removed_breakpoint): Adjust to resume
3017 interface change, and to removed leave_stopped field.
3018 (resume_ptr): Delete.
3019 (struct thread_resume_array): New.
3020 (linux_set_resume_request): Add new `arg' parameter. Adjust to
3021 resume interface change.
3022 (linux_continue_one_thread, linux_queue_one_thread)
3023 (resume_status_pending_p): Check if the resume field is NULL
3024 instead of checking the leave_stopped member.
3025 (linux_resume): Adjust to the target resume interface change.
3026 * spu-low.c (spu_resume): Adjust to the target resume interface
3027 change.
3028 * win32-low.c (win32_detach, win32_resume): Ditto.
3029
c35fafde
PA
30302009-04-01 Pedro Alves <pedro@codesourcery.com>
3031
3032 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
3033 flag.
3034 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
3035 pending.
3036 (linux_continue_one_thread): Only preserve the stepping flag if
3037 there's a pending breakpoint.
3038
0a59d50b
PA
30392009-03-31 Pedro Alves <pedro@codesourcery.com>
3040
3041 * server.c (main): After the inferior having exited, call
3042 remote_close before exiting gdbserver.
3043
f04c6d38
TJB
30442009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
3045
3046 Fix size of FPSCR in Power 7 processors.
3047 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
3048 (PPC_FEATURE_HAS_DFP): New #define.
3049 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
3050 size of the FPSCR.
3051
78e5cee6
PA
30522009-03-23 Pedro Alves <pedro@codesourcery.com>
3053
3054 * server.c (handle_query) Whitespace and formatting.
3055
1b3f6016
PA
30562009-03-22 Pedro Alves <pedro@codesourcery.com>
3057
3058 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
3059 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
3060 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
3061 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
3062 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
3063 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
3064 Makefile.in, configure.ac: Fix whitespace throughout.
3065 * configure: Regenerate.
3066
a07b2135
PA
30672009-03-22 Pedro Alves <pedro@codesourcery.com>
3068
3069 * inferiors.c (find_inferior): Make it safe for the callback
3070 function to delete the currently iterated inferior.
3071
67cc2626
PA
30722009-03-22 Pedro Alves <pedro@codesourcery.com>
3073
3074 * Makefile.in (linuw_low_h): Move higher.
3075 (thread-db.o): Depend on $(linux_low_h).
3076
54a0b537
PA
30772009-03-17 Pedro Alves <pedro@codesourcery.com>
3078
3079 Rename "process" to "lwp" throughout.
3080
3081 * linux-low.c (all_processes): Rename to...
3082 (all_lwps): ... this.
3083 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
3084 (add_process): Rename to ...
3085 (add_lwp): ... this. Adjust.
3086 (linux_create_inferior): Adjust.
3087 (linux_attach_lwp): Adjust.
3088 (linux_attach): Adjust.
3089 (linux_kill_one_process): Rename to ...
3090 (linux_kill_one_lwp): ... this. Adjust.
3091 (linux_kill): Adjust.
3092 (linux_detach_one_process): Rename to ...
3093 (linux_detach_one_lwp): ... this. Adjust.
3094 (linux_detach): Adjust.
3095 (check_removed_breakpoint): Adjust.
3096 (status_pending_p): Adjust.
3097 (linux_wait_for_process): Rename to ...
3098 (linux_wait_for_lwp): ... this. Adjust.
3099 (linux_wait_for_event): Adjust.
3100 (send_sigstop): Adjust.
3101 (wait_for_sigstop): Adjust.
3102 (stop_all_processes): Rename to ...
3103 (stop_all_lwps): ... this.
3104 (linux_resume_one_process): Rename to ...
3105 (linux_resume_one_lwp): ... this. Adjust.
3106 (linux_set_resume_request, linux_continue_one_thread)
3107 (linux_queue_one_thread, resume_status_pending_p)
3108 (usr_store_inferior_registers, regsets_store_inferior_registers)
3109 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
3110 Adjust.
3111 * linux-low.h (get_process): Rename to ...
3112 (get_lwp): ... this. Adjust.
3113 (get_thread_process): Rename to ...
3114 (get_thread_lwp): ... this. Adjust.
3115 (get_process_thread): Rename to ...
3116 (get_lwp_thread): ... this. Adjust.
3117 (struct process_info): Rename to ...
3118 (struct lwp_info): ... this.
3119 (all_processes): Rename to ...
3120 (all_lwps): ... this.
3121 * proc-service.c (ps_lgetregs): Adjust.
3122 * thread-db.c (thread_db_create_event, find_one_thread)
3123 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
3124
0b16c5cf
PA
31252009-03-14 Pedro Alves <pedro@codesourcery.com>
3126
3127 * server.c (handle_query): Handle "qAttached".
3128
32de4b9d
NS
31292009-03-13 Nathan Sidwell <nathan@codesourcery.com>
3130
3131 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
3132 GPLv3, update license URL.
3133
2aecd87f
DE
31342009-03-01 Doug Evans <dje@google.com>
3135
93efd302 3136 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
3137 (server_h): Add gdb_signals.h.
3138 (signals.o): Update.
3139 * server.h (target_signal_from_host,target_signal_to_host_p)
3140 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
3141
86b1f9c5
PM
31422009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
3143
3144 * remote-utils.c (getpkt): Also generate remote-debug
3145 information if noack_mode is set.
3146
4aa995e1
PA
31472009-02-06 Pedro Alves <pedro@codesourcery.com>
3148
3149 * server.c (handle_query): Report qXfer:siginfo:read and
3150 qXfer:siginfo:write as supported and handle them.
3151 * target.h (struct target_ops) <qxfer_siginfo>: New field.
3152 * linux-low.c (linux_xfer_siginfo): New.
3153 (linux_target_ops): Set it.
3154
62709adf
PA
31552009-01-26 Pedro Alves <pedro@codesourcery.com>
3156
3157 * server.c (gdbserver_usage): Mention --remote-debug.
3158 (main): Accept '--remote-debug' switch.
3159
aef93bd7
DE
31602009-01-18 Doug Evans <dje@google.com>
3161
3162 * regcache.c (new_register_cache): No need to check result of xcalloc.
3163 * server.c (handle_search_memory): Back out calls to xmalloc,
3164 result is checked and error is returned to user upon failure.
3165 (handle_query): Ditto. Add more checks for result of malloc.
3166 (handle_v_cont): Check result of malloc, report error back to
3167 user upon failure.
3168 (handle_v_run): Ditto. Call freeargv.
3169 * server.h (freeargv): Declare.
3170 * utils.c (freeargv): New fn.
3171
54363045
DE
31722009-01-15 Doug Evans <dje@google.com>
3173
f626972c
DE
3174 * gdbreplay.c (perror_with_name): Make arg const char *.
3175 * server.h (target_signal_to_name): Make return type const char *.
0842e787 3176 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 3177 * utils.c (perror_with_name): Make arg const char *.
54363045 3178
18aae699
PA
31792009-01-14 Pedro Alves <pedro@codesourcery.com>
3180
3181 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
3182 when handling a EXIT_PROCESS_DEBUG_EVENT.
3183
ff703abe
JB
31842009-01-06 Joel Brobecker <brobecker@adacore.com>
3185
3186 * gdbreplay.c (gdbreplay_version): Update copyright year.
3187 * server.c (gdbserver_version): Likewise.
3188
f21cc1a2 31892009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
3190
3191 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 3192 (handle_extended_wait): Improve comment.
0e21c1ec 3193
bca929d3
DE
31942008-12-13 Doug Evans <dje@google.com>
3195
3196 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
3197 * server.h (ATTR_MALLOC): New macro.
3198 (xmalloc,xcalloc,xstrdup): Declare.
3199 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
3200 * inferiors.c: Ditto.
3201 * linux-low.c: Ditto.
3202 * mem-break.c: Ditto.
3203 * regcache.c: Ditto.
3204 * remote-utils.c: Ditto.
3205 * server.c: Ditto.
3206 * target.c: Ditto.
3207 * win32-low.c: Ditto.
3208
97438e3f
DE
32092008-12-12 Doug Evans <dje@google.com>
3210
896c7fbb
DE
3211 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
3212 in debugging printf.
3213
97438e3f
DE
3214 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
3215
e3b886f8
DE
32162008-12-09 Doug Evans <dje@google.com>
3217
3218 * linux-low.h (struct process_info): Delete member tid, unused.
3219 * thread-db.c (find_one_thread): Update.
3220 (maybe_attach_thread): Update.
3221
07e059b5
VP
32222008-12-02 Pedro Alves <pedro@codesourcery.com>
3223
889bf7c5
PA
3224 * target.h (struct target_ops): Add qxfer_osdata member.
3225 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
3226 and dirent.h.
3227 (linux_qxfer_osdata): New functions.
3228 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
3229 callback.
3230 * server.c (handle_query): Handle "qXfer:osdata:read:".
3231 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
3232 (buffer_xml_printf): New functions.
3233 * server.h (struct buffer): New.
3234 (buffer_grow_str, buffer_grow_str0): New macros.
3235 (buffer_grow, buffer_free, buffer_init, buffer_finish)
3236 (buffer_xml_printf): Declare.
07e059b5 3237
4cab47ab
DE
32382008-11-24 Doug Evans <dje@google.com>
3239
3240 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
3241
f142445f
DJ
32422008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
3243
3244 * server.c (handle_v_run): Always use the supplied argument list.
3245
d0107bb6 32462008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 3247
d0107bb6
BW
3248 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
3249 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 3250
2c4ad781
TJB
32512008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
3252
3253 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
3254 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
3255 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
3256 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
3257 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
3258 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
3259 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
3260 XML target descriptions.
3261 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
3262 when inferior is running on an ISA 2.05 or later processor. Add
3263 special case to return offset for full 64-bit slot of FPSCR when
3264 in 32-bits.
3265
dfb64f85
DJ
32662008-11-14 Daniel Gutson <dgutson@codesourcery.com>
3267
3268 * Makefile.in (SFILES, clean): Added sparc64 files.
3269 (reg-sparc64.o, reg-sparc64.c): New.
3270 * configure.srv (sparc*-*-linux*): New configuration.
3271 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
3272 syscall arguments for SPARC.
3273 (regsets_store_inferior_registers): Likewise.
3274 * linux-sparc-low.c: New file.
3275
66b6e1dd
DE
32762008-10-21 Doug Evans <dje@google.com>
3277
3278 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
3279 (READLINE_DIR,READLINE_DEP): Delete.
3280 (INTERNAL_CFLAGS): Update.
3281 (LINTFLAGS): Update.
3282
9b710a42
PA
32832008-10-10 Pedro Alves <pedro@codesourcery.com>
3284
3285 * server.c (handle_v_run): If GDB didn't specify an argv, use the
3286 whole argv from the last run, not just argv[0].
3287
5822d809
PA
32882008-09-08 Pedro Alves <pedro@codesourcery.com>
3289
3290 * regcache.c (new_register_cache): Return NULL if the register
3291 cache size isn't known yet.
3292 (free_register_cache): Avoid dereferencing a NULL regcache.
3293
74aac56f
DJ
32942008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
3295
3296 * configure.srv: Merge MIPS and MIPS64.
3297
400b20f5
MR
32982008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
3299
3300 * Makefile.in (uninstall): Apply $(EXEEXT) too.
3301
677c5bb1
LM
33022008-08-18 Luis Machado <luisgpm@br.ibm.com>
3303
3304 * Makefile.in: Add required vsx dependencies.
3305
3306 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
3307 Declare init_registers_powerpc_vsx32l.
3308 Declare init_registers_powerpc_vsx64l.
3309 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
3310 (ppc_arch_setup): Check for VSX in hwcap.
3311 (ppc_fill_vsxregset): New function.
3312 (ppc_store_vsxregset): New function.
3313 Add new VSX entry in regset_info target_regsets.
3314
3315 * configure.srv: Add new VSX dependencies.
3316
a6f3e723
SL
33172008-08-12 Pedro Alves <pedro@codesourcery.com>
3318
3319 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
3320 (remote_open): Set or clear transport_is_reliable.
3321 (putpkt_binary): Don't expect acks in noack mode.
3322 (getpkt): Don't send ack/nac in noack mode.
3323 * server.c (handle_general_set): Handle QStartNoAckMode.
3324 (handle_query): If connected by tcp pass QStartNoAckMode+ in
3325 qSupported.
3326 (main): Reset noack_mode on every connection.
3327 * server.h (noack_mode): Declare.
3328
a417dc56
RW
33292008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
3330
3331 * Makefile.in (GDBREPLAY_OBS): New variable.
3332 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
3333
3221518c
UW
33342008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
3335 Daniel Jacobowitz <dan@codesourcery.com>
3336
3337 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
3338 (usr_store_inferior_registers): Likewise.
3339 (regsets_store_inferior_registers): Likewise.
3340
ec56be1b
PA
33412008-07-31 Rolf Jansen <rj@surtec.com>
3342 Pedro Alves <pedro@codesourcery.com>
3343
3344 * configure.ac: Check for memmem declaration.
3345 * server.c [HAVE_MALLOC_H]: Include malloc.h.
3346 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
3347 (disable_packet_qfThreadInfo): Unconditionally compile.
3348 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
3349 * configure, config.in: Regenerate.
3350
2fe5e3ff
DE
33512008-07-28 Doug Kwan <dougkwan@google.com>
3352
3353 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
3354 (linux_write_memory): Remove declaration of errno.
3355
836acd6d
UW
33562008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
3357
3358 * linux-low.c (handle_extended_wait): Do not use "status"
3359 variable uninitialized.
3360
aeba519e
PA
33612008-07-07 Pedro Alves <pedro@codesourcery.com>
3362
3363 * server.c (handle_v_attach): Inhibit reporting dll changes.
3364
db42f210
PA
33652008-06-27 Pedro Alves <pedro@codesourcery.com>
3366
3367 * remote-utils.c (prepare_resume_reply): If requested, don't
3368 output "thread:TID" in the T stop reply.
3369
3370 * server.c (disable_packet_vCont, disable_packet_Tthread)
3371 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
3372 (handle_query): If requested, disable support for qC, qfThreadInfo
3373 and qsThreadInfo.
3374 (handle_v_requests): If requested, disable support for vCont.
3375 (gdbserver_show_disableable): New.
3376 (main): Handle --disable-packet and --disable-packet=LIST.
3377
3378 * server.h (disable_packet_vCont, disable_packet_Tthread)
3379 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
3380
8e4c5421
CD
33812008-06-20 Carlos O'Donell <carlos@codesourcery.com>
3382
3383 * server.c (gdbserver_usage): Mention --version.
3384
6e23a804
DJ
33852008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
3386
3387 * Makefile.in (gdbreplay.o): New rule.
3388
90aa6a40
JM
33892008-06-06 Joseph Myers <joseph@codesourcery.com>
3390
3391 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
3392 message, not gdbserver.
3393
c16158bc 33942008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
3395 Nathan Sidwell <nathan@codesourcery.com>
3396 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
3397
3398 * acinclude.m4: Include ../../config/acx.m4.
3399 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
3400 * configure, config.in: Regenerate.
3401 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
3402 * server.c (gdbserver_version): Print PKGVERSION.
3403 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
3404 (main): Adjust gdbserver_usage calls.
3405 * gdbreplay.c (version, host_name): Add declarations.
3406 (gdbreplay_version, gdbreplay_usage): New.
3407 (main): Accept --version and --help options.
3408
aeb75bf5
DJ
34092008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
3410
3411 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
3412 (arm_breakpoint_at): Handle Thumb.
3413 (the_low_target): Add comment.
3414
76b233dd
UW
34152008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
3416
3417 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
3418
08388c79
DE
34192008-05-09 Doug Evans <dje@google.com>
3420
a3c83fae
DE
3421 * server.h (decode_search_memory_packet): Declare.
3422 * remote-utils.c (decode_search_memory_packet): New fn.
3423 * server.c (handle_search_memory_1): New fn.
08388c79
DE
3424 (handle_search_memory): New fn.
3425 (handle_query): Process qSearch:memory packets.
3426
bb9c3d36
UW
34272008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
3428
3429 * regcache.c (registers_length): Remove.
3430 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
3431 full register packet.
3432 * regcache.h (registers_length): Remove prototype.
3433 * server.h (PBUFSIZ): Define to 16384.
3434
7284e1be
UW
34352008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
3436
3437 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
3438 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
3439 powerpc-64l.o, and powerpc-altivec64l.o.
3440 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
3441 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
3442 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
3443 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
3444 rs6000/power-linux.xml, and rs6000/power64-linux.xml
3445 to srv_xmlfiles.
3446
3447 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
3448 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
3449 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
3450 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
3451 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
3452 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
3453 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
3454 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
3455 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
3456 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
3457 (clean): Update.
3458
3459 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
3460 (init_registers_powerpc_32l): ... this new prototype.
3461 (init_registers_powerpc_32): Remove, replace by ...
3462 (init_registers_powerpc_altivec32l): ... this new prototype.
3463 (init_registers_powerpc_e500): Remove, replace by ...
3464 (init_registers_powerpc_e500l): ... this new prototype.
3465 (init_registers_ppc64): Remove, replace by ...
3466 (init_registers_powerpc_64l): ... this new prototype.
3467 (init_registers_powerpc_64): Remove, replace by ...
3468 (init_registers_powerpc_altivec64l): ... this new prototype.
3469 (ppc_num_regs): Set to 73.
3470 (PT_ORIG_R3, PT_TRAP): Define if necessary.
3471 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
3472 (ppc_cannot_store_register): Handle orig_r3 and trap.
3473 (ppc_arch_setup): Update init_registers_... calls.
3474 (ppc_fill_gregset): Handle orig_r3 and trap.
3475
3476 * inferiors.c (clear_inferiors): Reset current_inferior.
3477
fdc59709
PB
34782008-04-23 Paolo Bonzini <bonzini@gnu.org>
3479
889bf7c5
PA
3480 * acinclude.m4: Add override.m4.
3481 * configure: Regenerate.
fdc59709 3482
c9b2f845
UW
34832008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
3484
3485 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
3486 initial call to init_register_ppc64.
3487
550512b8
UW
34882008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
3489
3490 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into single
3491 powerpc*-*-linux* case.
3492 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
3493
b6430ec3
UW
34942008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
3495
3496 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 3497 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
3498 from reg_xmlfiles.
3499 * linux-ppc-low.c: Include <elf.h>.
3500 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
3501 (ppc_hwcap): New global variable.
3502 (ppc_regmap): Remove __SPE__ #ifdef sections.
3503 (ppc_regmap_e500): New global variable.
3504 (ppc_cannot_store_register): Update __SPE__ special case.
3505 (ppc_get_hwcap): New function.
3506 (ppc_arch_setup): Use it to determine whether inferior supports
3507 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
3508 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
3509 Do not access registers if target does not support AltiVec.
3510 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
3511 Do not access registers if target does not support SPE.
3512 (target_regsets): Unconditionally include AltiVec and SPE regsets.
3513
52fa2412
UW
35142008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
3515
3516 * linux-low.c (disabled_regsets, num_regsets): New.
3517 (use_regsets_p): Delete.
3518 (linux_wait_for_process): Clear disabled_regsets.
3519 (regsets_fetch_inferior_registers): Check and set it.
3520 (regsets_store_inferior_registers): Likewise.
3521 (linux_fetch_registers, linux_store_registers): Do not use
3522 use_regsets_p.
3523 (initialize_low): Allocate disabled_regsets.
3524
e28b3332
DJ
35252008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
3526
3527 * Makefile.in (LIBOBJS): New.
3528 (OBS): Use LIBOBJS.
3529 (memmem.o): New rule.
3530 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
3531 * configure: Regenerated.
3532
4536995d
UW
35332008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
3534
3535 * server.c (handle_query): Never return "unsupported" for
3536 qXfer:features:read queries.
3537
221c031f
UW
35382008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
3539
3540 * server.c (get_features_xml): Fix inverted condition.
3541 (handle_query): Always support qXfer:feature:read.
3542
ccd213ac
DJ
35432008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
3544
3545 * server.c (wrapper_argv): New.
3546 (start_inferior): Handle wrapper_argv. If set, expect an extra
3547 trap.
3548 (gdbserver_usage): Document --wrapper.
3549 (main): Parse --wrapper.
3550
6fe305f7
UW
35512008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
3552
3553 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
3554 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
3555 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
3556 (ppc_set_pc): Likewise.
3557 (ppc_arch_setup): New function.
3558 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
3559 of collect_register.
889bf7c5 3560 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 3561
5b0a002e
UW
35622008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
3563
3564 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
3565 instead of linux-ppc64-low.o.
3566 * linux-ppc64-low.c: Remove file.
3567 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
3568 (linux-ppc64-low.o): Remove rule.
3569
3570 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
3571 (init_registers_powerpc_64): Likewise.
3572 (ppc_regmap): Conditionally define depending on __powerpc64__.
3573 (ppc_cannot_store_register): Do not special-case "fpscr" when
3574 compiled on __powerpc64__.
3575 (ppc_collect_ptrace_register): New function.
3576 (ppc_supply_ptrace_register): New function.
3577 (ppc_breakpoint): Change type to "unsigned int".
3578 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
3579 (the_low_target): Conditionally provide initializers for the
889bf7c5 3580 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
3581 collect_ptrace_register and supply_ptrace_register members.
3582
9b4b61c8
UW
35832008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
3584
3585 * regcache.h (gdbserver_xmltarget): Add extern declaration.
3586 * server.c (gdbserver_xmltarget): Define.
3587 (get_features_xml): Use it to replace "target.xml" and arch_string.
3588
3589 * configure.srv: Remove srv_xmltarget. Add XML files that were
3590 mentioned there to srv_xmlfiles instead. Remove conditional tests
3591 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
3592 srv_xmlfiles and srv_regobj to include all possible choices.
3593 * configure.ac (srv_xmltarget): Remove.
3594 (srv_xmlfiles): Do not add "target.xml".
3595 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
3596 checks for supplementary target information.
3597 * configure: Regenerate.
3598 * Makefile.in (XML_TARGET): Remove.
3599 (target.xml): Remove rule.
3600 (clean): Do not clean up target.xml.
3601 (.PRECIOUS): Do not mention target.xml.
3602
3603 * target.h (struct target_ops): Remove arch_string member.
3604 * linux-low.c (linux_arch_string): Remove.
3605 (linux_target_ops): Remove arch_string initializer.
3606 * linux-low.h (struct linux_target_ops): Remove arch_string member.
3607 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
3608 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
3609 * spu-low.c (spu_arch_string): Remove.
3610 (spu_target_ops): Remove arch_string initializer.
3611 * win32-low.c (win32_arch_string): Remove.
3612 (win32_target_ops): Remove arch_string initializer.
3613 * win32-low.h (struct win32_target_ops): Remove arch_string member.
3614 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
3615 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
3616
ee1a7ae4
UW
36172008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
3618
3619 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
3620 by collect_ptrace_register and supply_ptrace_register hooks.
3621 * linux-low.c (fetch_register): Use supply_ptrace_register callback
3622 instead of checking for the_low_target.left_pad_xfer.
3623 (usr_store_inferior_registers): Use collect_ptrace_register callback
3624 instead of checking for the_low_target.left_pad_xfer.
3625
3626 * linux-s390-low.c (s390_collect_ptrace_register): New function.
3627 (s390_supply_ptrace_register): Likewise.
3628 (s390_fill_gregset): Call s390_collect_ptrace_register.
3629 (the_low_target): Update.
3630
3631 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
3632 (ppc_supply_ptrace_register): Likewise.
3633 (the_low_target): Update.
3634
3635 * linux-i386-low.c (the_low_target): Update.
3636 * linux-x86-64-low.c (the_low_target): Update.
3637
d61ddec4
UW
36382008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
3639
3640 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
3641 reg-s390.o and reg-s390x.o.
3642
3643 * linux-low.c (new_inferior): New global variable.
3644 (linux_create_inferior, linux_attach): Set it.
3645 (linux_wait_for_process): Call the_low_target.arch_setup after the
3646 target has stopped for the first time.
3647 (initialize_low): Do not call the_low_target.arch_setup.
3648
3649 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
3650 (s390_set_pc): Likewise.
3651 (s390_arch_setup): New function.
3652 (the_low_target): Use s390_arch_setup as arch_setup routine.
3653
3654 * regcache.c (realloc_register_cache): New function.
3655 (set_register_cache): Call it for each existing regcache.
3656
d05b4ac3
UW
36572008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
3658
3659 * server.h (init_registers): Remove prototype.
3660
3661 * linux-low.h (struct linux_target_ops): Add arch_setup field.
3662 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
3663 instead of init_registers ().
3664 * linux-arm-low.c (init_registers_arm): Add prototype.
3665 (init_registers_arm_with_iwmmxt): Likewise.
3666 (the_low_target): Add initializer for arch_setup field.
3667 * linux-cris-low.c (init_registers_cris): Add prototype.
3668 (the_low_target): Add initializer for arch_setup field.
3669 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
3670 (the_low_target): Add initializer for arch_setup field.
3671 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
3672 (the_low_target): Add initializer for arch_setup field.
3673 * linux-ia64-low.c (init_registers_ia64): Add prototype.
3674 (the_low_target): Add initializer for arch_setup field.
3675 * linux-m32r-low.c (init_registers_m32r): Add prototype.
3676 (the_low_target): Add initializer for arch_setup field.
3677 * linux-m68k-low.c (init_registers_m68k): Add prototype.
3678 (the_low_target): Add initializer for arch_setup field.
3679 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
3680 (init_registers_mips64_linux): Likewise.
3681 (the_low_target): Add initializer for arch_setup field.
3682 * linux-ppc-low.c (init_registers_ppc): Add prototype.
3683 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
3684 (the_low_target): Add initializer for arch_setup field.
3685 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
3686 (init_registers_powerpc_64): Likewise.
3687 (the_low_target): Add initializer for arch_setup field.
3688 * linux-s390-low.c (init_registers_s390): Add prototype.
3689 (init_registers_s390x): Likewise.
3690 (the_low_target): Add initializer for arch_setup field.
3691 * linux-sh-low.c (init_registers_sh): Add prototype.
3692 (the_low_target): Add initializer for arch_setup field.
3693 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
3694 (the_low_target): Add initializer for arch_setup field.
3695 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
3696 (the_low_target): Add initializer for arch_setup field.
3697
3698 * win32-low.h (struct win32_target_ops): Add arch_setup field.
3699 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
3700 instead of init_registers ().
3701 * win32-arm-low.c (init_registers_arm): Add prototype.
3702 (the_low_target): Add initializer for arch_setup field.
3703 * win32-i386-low.c (init_registers_i386): Add prototype.
3704 (the_low_target): Add initializer for arch_setup field.
3705
3706 * spu-low.c (init_registers_spu): Add prototype.
3707 (initialize_low): Call initialie_registers_spu () instead of
3708 initialize_registers ().
3709
fd96d250
PA
37102008-02-19 Pedro Alves <pedro@codesourcery.com>
3711
3712 * server.c (handle_v_requests): When handling the vRun and vAttach
3713 packets, if already debugging a process, don't kill it. Return an
3714 error instead.
3715
d41b6bb4
DJ
37162008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
3717
3718 * server.c (handle_query): Correct length check.
3719
5ac588cf
PA
37202008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
3721
3722 * win32-low.c (do_initial_child_stuff): Add process handle
3723 parameter. Set current_process_handle and current_process_id from the
3724 parameters. Clear globals.
3725 (win32_create_inferior): Don't set current_process_handle and
3726 current_process_id here. Instead pass them on the call to
3727 do_initial_child_stuff.
3728 (win32_attach): Likewise.
3729 (win32_clear_inferiors): New.
3730 (win32_kill): Don't close the current process handle or the
3731 current thread handle here. Instead call win32_clear_inferiors.
3732 (win32_detach): Don't open a new handle to the process. Call
3733 win32_clear_inferiors.
3734 (win32_join): Don't rely on current_process_handle; open a new
3735 handle using the process id.
3736 (win32_wait): Call win32_clear_inferiors when the inferior process
3737 has exited.
3738
ecd7ecbc
DJ
37392008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
3740
3741 * server.c (monitor_show_help): Add "exit".
3742
1525d545
MG
37432008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
3744
ecd7ecbc 3745 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
3746 (clean): Add reg-xtensa.c.
3747 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
3748 * configure.srv (xtensa*-*-linux*) New target.
3749 * linux-xtensa-low.c: New.
3750 * xtensa-xtregs.c: New.
1525d545 3751
59a016f0
PA
37522008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
3753
3754 * hostio.c: Don't include errno.h.
3755 (errno_to_fileio_errno): Move to hostio-errno.
3756 * hostio.c: (hostio_error): Remove the error parameter. Defer the
3757 error number outputting to the target->hostio_last_error callback.
3758 (hostio_packet_error): Use FILEIO_EINVAL directly.
3759 (handle_open, handle_pread, hostio_error, handle_unlink): Update
3760 calls to hostio_error.
3761 * hostio-errno.c: New.
3762 * server.h (hostio_last_error_from_errno): Declare.
3763 * target.h (target_ops): Add hostio_last_error member.
3764 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
3765 as hostio_last_error handler.
889bf7c5 3766 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
3767 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
3768 (wince_hostio_last_error): New functions.
3769 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
3770 as hostio_last_error handler.
3771 (win32_target_ops) [!_WIN32_WCE]: Register
3772 hostio_last_error_from_errno as hostio_last_error handler.
3773 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
3774 (hostio-errno.o): New rule.
3775 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
3776 * configure.srv (srv_hostio_err_objs): New variable. Default to
3777 hostio-errno.o.
3778 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
3779 * configure: Regenerate.
3780
2d717e4f
DJ
37812008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
3782
3783 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
3784 (linux_kill, linux_detach): Clean up the process list.
3785 * remote-utils.c (remote_open): Improve port number parsing.
3786 (putpkt_binary, input_interrupt): Only send interrupts if the target
3787 is running.
3788 * server.c (extended_protocol): Make static.
3789 (attached): Define earlier.
3790 (exit_requested, response_needed, program_argv): New variables.
3791 (target_running): New.
3792 (start_inferior): Clear attached here.
3793 (attach_inferior): Set attached here.
3794 (require_running): Define.
3795 (handle_query): Use require_running and target_running. Implement
3796 "monitor exit".
3797 (handle_v_attach, handle_v_run): New.
3798 (handle_v_requests): Use require_running. Handle vAttach and vRun.
3799 (gdbserver_usage): Update.
3800 (main): Redo argument parsing. Handle --debug and --multi. Handle
3801 --attach along with other options or after the port. Save
3802 program_argv. Support no initial program. Resynchronize
3803 communication with GDB after an error. Handle "monitor exit".
3804 Use require_running and target_running. Always allow the extended
3805 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
3806 restart in extended mode.
3807 * README: Refer to the GDB manual. Update --attach usage.
3808
7407e2de
AS
38092007-12-20 Andreas Schwab <schwab@suse.de>
3810
3811 * linux-low.c (STACK_SIZE): Define.
3812 (linux_tracefork_child): Use it. Use __clone2 on ia64.
3813 (linux_test_for_tracefork): Likewise.
3814
b65d95c5
DJ
38152007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
3816
3817 * linux-low.c (linux_wait_for_event): Update messages. Do not
3818 reinsert auto-delete breakpoints.
3819 * mem-break.c (struct breakpoint): Change return type of handler to
3820 int.
3821 (set_breakpoint_at): Update handler type.
3822 (reinsert_breakpoint_handler): Return 1 instead of calling
3823 delete_breakpoint.
3824 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
3825 setting a new one.
3826 (check_breakpoints): Delete auto-delete breakpoints and return 2.
3827 * mem-break.h (set_breakpoint_at): Update handler type.
3828 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
3829 * win32-low.c (auto_delete_breakpoint): New.
3830 (get_child_debug_event): Use it.
3831
4e799345
DJ
38322007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
3833
3834 * configure.ac: Check for pread and pwrite.
3835 * hostio.c (handle_pread): Fall back to lseek and read.
3836 (handle_pwrite): Fall back to lseek and write.
3837 * config.in, configure: Regenerated.
3838
27524b67
DJ
38392007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
3840
3841 * server.c (myresume): Add own_buf argument.
3842 (main): Update calls.
3843
a20d5e98
DJ
38442007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
3845
3846 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
3847 * remote-utils.c (remote_open): Do not call disable_async_io.
3848 (block_async_io): Delete.
3849 (unblock_async_io): Make static.
3850 (initialize_async_io): New.
3851 * server.c (handle_v_cont): Handle async I/O here.
3852 (myresume): Likewise. Move other common resume tasks here...
3853 (main): ... from here. Call initialize_async_io. Disable async
3854 I/O before the main loop.
3855 * server.h (initialize_async_io): Declare.
3856 (block_async_io, unblock_async_io): Delete prototypes.
3857 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
3858
b79d787e
DJ
38592007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
3860
3861 * remote-utils.c (readchar): Allow binary data in received messages.
3862
d97903b2
PA
38632007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
3864
3865 * win32-low.c (attaching): New global.
3866 (win32_create_inferior): Clear the `attaching' global.
3867 (win32_attach): Set the `attaching' global.
3868 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
3869 attaching. Only set a breakpoint at the entry point if not
3870 attaching.
3871
311de423
PA
38722007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
3873
3874 * server.c (main): Don't report dll events on the initial
3875 connection on attaches.
3876
6c2d16d2
PA
38772007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
3878
3879 * server.c (main): Relax numerical bases supported for the pid of
3880 the --attach command line argument.
3881
5ca906e6
PA
38822007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
3883
3884 * win32-low.c (win32_attach): Call OpenProcess before
3885 DebugActiveProcess, not after. Add last error output to error
3886 call.
3887
9c6c8194
PA
38882007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
3889
3890 * win32-low.c (win32_get_thread_context)
3891 (win32_set_thread_context): New functions.
3892 (thread_rec): Use win32_get_thread_context.
3893 (continue_one_thread, win32_resume): Use win32_set_thread_context.
3894 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
3895 field.
3896
4d5d1aaa
PA
38972007-12-03 Leo Zayas
3898 Pedro Alves <pedro_alves@portugalmail.pt>
3899
3900 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
3901 global variables.
3902 (child_add_thread): Minor cleanup.
3903 (child_continue): Resume artificially suspended threads before
3904 calling ContinueDebugEvent.
3905 (suspend_one_thread): New.
3906 (fake_breakpoint_event): New.
3907 (get_child_debug_event): Change return type to int. Check here if
3908 gdb sent an interrupt request. If a soft interrupt was requested,
3909 fake a breakpoint event. Return 0 if there is no event to handle,
3910 and 1 otherwise.
3911 (win32_wait): Don't check here if gdb sent an interrupt request.
3912 Ensure there is a valid event to handle.
3913 (win32_request_interrupt): Add soft interruption method as last
3914 resort.
3915
c436e841
PA
39162007-12-03 Leo Zayas
3917 Pedro Alves <pedro_alves@portugalmail.pt>
3918
3919 * win32-low.h (win32_thread_info): Add descriptions to the
3920 structure members. Replace `suspend_count' counter by a
3921 `suspended' flag.
3922 * win32-low.c (thread_rec): Update condition of when to get the
3923 context from the inferior. Rely on ContextFlags being set if it
3924 has already been retrieved. Only suspend the inferior thread if
3925 we haven't already. Warn if that fails.
3926 (continue_one_thread): s/suspend_count/suspended/. Only call
3927 ResumeThread once. Warn if that fails.
3928
e7b5fa67
PA
39292007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
3930
3931 * win32-low.c (win32_wait): Don't read from the inferior when it
3932 has already exited.
3933
a385171d
PA
39342007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
3935
3936 * Makefile.in (win32_low_h): New variable.
3937 (win32-low.o): Add dependency on $(win32_low_h).
3938 (win32-arm-low.o, win32-i386-low.o): New rules.
3939
f80c84b3
DJ
39402007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
3941
3942 * hostio.c: Correct copyright year.
3943
a6b151f1
DJ
39442007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
3945
3946 * Makefile.in (OBS): Add hostio.o.
3947 (hostio.o): New rule.
3948 * server.h (handle_vFile): Declare.
3949 * hostio.c: New file.
3950 * server.c (handle_v_requests): Take packet_len and new_packet_len
3951 for binary packets. Call handle_vFile.
3952 (main): Update call to handle_v_requests.
3953
f9387fc3
DJ
39542007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
3955
3956 * linux-low.c: Include <sched.h>.
3957
51c2684e
DJ
39582007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
3959
3960 * linux-low.c (linux_tracefork_grandchild): New.
3961 (linux_tracefork_child): Use clone.
3962 (linux_test_for_tracefork): Use clone; allocate and free a stack.
3963
75f83163
JB
39642007-10-31 Joel Brobecker <brobecker@adacore.com>
3965
3966 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
3967
da5898ce
DJ
39682007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
3969
3970 * linux-low.c (handle_extended_wait): Handle unexpected signals.
3971
24a09b5f
DJ
39722007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
3973
3974 * inferiors.c (change_inferior_id): Delete.
3975 (add_pid_to_list, pull_pid_from_list): New.
3976 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
3977 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
3978 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
3979 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
3980 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
3981 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
3982 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
3983 (using_threads): Always set to 1.
3984 (handle_extended_wait): New.
3985 (add_process): Do not set TID.
3986 (linux_create_inferior): Set must_set_ptrace_flags.
3987 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
3988 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
3989 (linux_thread_alive): Rename TID argument to LWPID.
3990 (linux_wait_for_process): Handle unknown processes. Do not use TID.
3991 (linux_wait_for_event): Do not use TID or check using_threads. Update
3992 call to dead_thread_notify. Call handle_extended_wait.
3993 (linux_create_inferior): Use PTRACE_SETOPTIONS.
3994 (send_sigstop): Delete sigstop_sent.
3995 (wait_for_sigstop): Avoid TID.
3996 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
3997 (linux_test_for_tracefork): New.
3998 (linux_lookup_signals): Use thread_db_active and
3999 linux_supports_tracefork_flag.
4000 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
4001 * linux-low.h (get_process_thread): Avoid TID.
4002 (struct process_ifo): Move thread_known and tid to the end. Remove
4003 sigstop_sent.
4004 (linux_attach_lwp, thread_db_init): Update prototypes.
4005 * server.h (change_inferior_id): Delete prototype.
4006 (add_pid_to_list, pull_pid_from_list): New prototypes.
4007 * thread-db.c (thread_db_use_events): New.
4008 (find_first_thread): Rename to...
4009 (find_one_thread): ...this. Update callers and messages. Do not
4010 call fatal. Check thread_db_use_events. Do not call
4011 change_inferior_id or new_thread_notify.
4012 (maybe_attach_thread): Update. Do not call new_thread_notify.
4013 (thread_db_init): Set thread_db_use_events. Check use_events.
4014 * utils.c (fatal, warning): Correct message prefix.
4015
30ed0a8f
DJ
40162007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
4017
4018 * Makefile.in (clean): Remove new files.
4019 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
4020 (powerpc-64.o, powerpc-64.c): New rules.
4021 * configure.srv: Use alternate register sets for powerpc64-*-linux*
4022 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
4023 with SPE.
4024 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
4025 SPE targets.
4026 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
4027 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
4028 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
4029 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
4030 (target_regsets): Add AltiVec and SPE register sets.
4031 * configure.ac: Check for AltiVec and SPE.
4032 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
4033 (ppc_fill_vrregset, ppc_store_vrregset): New.
4034 (target_regsets): Add AltiVec register set.
4035 * configure: Regenerated.
4036
fd462a61
DJ
40372007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
4038
4039 * linux-low.c (O_LARGEFILE): Define.
4040 (linux_read_memory): Use /proc/PID/mem.
4041 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
4042 * configure, config.in: Regenerated.
4043
69f223ed
DJ
40442007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
4045
4046 * linux-low.c (linux_wait_for_event): Do not pass signals while
4047 single-stepping.
4048
aec18585
PA
40492007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
4050
4051 * win32-low.c (create_process): New.
4052 (win32_create_inferior): Use create_process instead of
4053 CreateProcess. If create_process failed retry appending an ".exe"
4054 suffix. Store the GetLastError result immediatelly after
4055 create_process calls and use it on the call to error.
4056
34d86ddd
PA
40572007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
4058
4059 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
4060
5a0e3bd0
JB
40612007-08-23 Joel Brobecker <brobecker@adacore.com>
4062
4063 * configure.ac: Switch license to GPLv3.
4064
f88c79e6
MS
40652007-08-01 Michael Snyder <msnyder@access-company.com>
4066
4067 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
4068
6b3d9b83
PA
40692007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
4070
4071 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
4072 typedef.
4073 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
4074 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
4075 CloseToolhelp32Snapshot.
4076 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
4077 CloseToolhelp32Snapshot.
4078
c588c53c
MS
40792007-07-27 Michael Snyder <michael.snyder@access-company.com>
4080
4081 * server.c (main): Check for inferior exit before main loop.
4082
aa0403d9
PA
40832007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
4084
4085 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
4086 instead of on tmp_desc.
4087
255e7678
DJ
40882007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
4089 Daniel Jacobowitz <dan@codesourcery.com>
4090
4091 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
4092 (add_thread): Minor cleanups.
4093 (clear_inferiors): Move lower in the file. Clear the DLL
4094 list.
4095 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
4096 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
4097 (xml_escape_text): New.
4098 * server.c (handle_query): Handle qXfer:libraries:read. Report it
4099 for qSupported.
4100 (handle_v_cont): Report errors.
4101 (gdbserver_version): Update.
4102 (main): Correct size of own_buf. Do not report initial DLL events.
4103 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
4104 (unloaded_dll, xml_escape_text): New.
4105 * win32-low.c (enum target_waitkind): Update comments.
4106 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
4107 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
4108 (win32_EnumProcessModules, win32_GetModuleInformation)
4109 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
4110 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
4111 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
4112 (win32_Module32First, win32_Module32Next, load_toolhelp)
4113 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
4114 (get_child_debug_event): Handle DLL events.
4115 (win32_wait): Likewise.
4116
0d37add9
DJ
41172007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
4118
4119 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
4120 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
4121
45e2715e
PA
41222007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
4123
4124 * win32-low.c (handle_output_debug_string): Ignore event if not
4125 waiting.
4126
c5674cf1
PA
41272007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
4128
4129 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
4130
2bbe3cc1
DJ
41312007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
4132
4133 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
4134
ae13219e
DJ
41352007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
4136
4137 * inferiors.c (change_inferior_id): Add comment.
4138 * linux-low.c (check_removed_breakpoint): Add an early
4139 prototype. Improve debug output.
4140 (linux_attach): Doc update.
4141 (linux_detach_one_process, linux_detach): Clean up before releasing
4142 each process.
4143 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
4144 * linux-low.h (struct process_info): Doc improvement.
4145 * mem-break.c (delete_all_breakpoints): New.
4146 * mem-break.h (delete_all_breakpoints): New prototype.
4147 * thread-db.c (find_first_thread): New.
4148 (thread_db_create_event): Call it instead of
4149 thread_db_find_new_threads. Clean up unused variables.
4150 (maybe_attach_thread): Remove first thread handling.
4151 (thread_db_find_new_threads): Use find_first_thread.
4152 (thread_db_get_tls_address): Likewise.
4153
4105de34
DJ
41542007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
4155
4156 * thread-db.c (thread_db_find_new_threads): Add prototype.
4157 (thread_db_create_event): Check for the main thread before adding
4158 a new thread.
4159 (maybe_attach_thread): Only enable event reporting if TID == 0.
4160 (thread_db_get_tls_address): Check for new threads.
4161
2b876972
DJ
41622007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
4163
4164 * linux-low.c (linux_create_inferior): Try execv before execvp.
4165 * spu-low.c (spu_create_inferior): Likewise.
4166
7a245884
DJ
41672007-06-13 Mike Frysinger <vapier@gentoo.org>
4168
4169 * linux-low.c (linux_create_inferior): Change execv to execvp.
4170 * spu-low.c (spu_create_inferior): Likewies.
4171
117ce543
DJ
41722007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
4173
4174 * Makefile.in (clean): Clean new files instead of deleted ones.
4175 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
4176 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
4177 rules.
4178 * configure.srv: Specify XML files and new regformats for MIPS and
4179 MIPS64 GNU/Linux.
4180 * linux-mips-low.c (mips_num_regs): Set to only used registers.
4181 (mips_regmap): Do not fetch $0. Remove unused registers. Add
4182 an entry for the restart register.
4183 (mips_cannot_fetch_register, mips_cannot_store_register)
4184 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
4185 register names to match the XML descriptions.
4186 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
4187 restart register instead of $0.
4188
0e7f50da
UW
41892007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
4190 Markus Deuling <deuling@de.ibm.com>
4191
4192 * remote-utils.c (decode_xfer_write): New function.
4193 * server.h (decode_xfer_write): Add prototype.
4194 * server.c (handle_query): Add PACKET_LEN argument. Support
4195 qXfer:spu:read and qXfer:spu:write packets.
4196 (main): Pass packet_len to handle_query.
4197 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
4198 * target.h (target_ops): Add qxfer_spu.
4199
374c1d38
UW
42002007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
4201
4202 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
4203 accessing non-seekable spufs files.
4204
bb63802a
UW
42052007-05-16 Markus Deuling <deuling@de.ibm.com>
4206
889bf7c5 4207 * server.c (handle_query): Add reply for qC packet.
bb63802a 4208
7390519e
PA
42092007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
4210 Leo Zayas <lerele@champenstudios@com>
4211
4212 * server.h (check_remote_input_interrupt_request): New function.
4213 * remote_utils.c (INVALID_DESCRIPTOR): New define.
4214 (remote_desc): Initialize with INVALID_DESCRIPTOR.
4215 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
4216 (check_remote_input_interrupt_request): New function.
4217 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 4218 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
4219 winapi_GenerateConsoleCtrlEvent): New typedefs.
4220 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
4221 to 250 ms.
4222 (win32_wait): Check for remote interrupt request
4223 with check_remote_input_interrupt_request.
4224 (win32_request_interrupt): New function.
4225 (win32_target_op): Set request_interrupt to win32_request_interrupt.
4226
34b34921
PA
42272007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
4228
4229 * win32-low.c (debug_registers_changed,
4230 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
4231 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
4232 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
4233 (thread_rec): Get context using the low target.
4234 (child_add_thread): Call thread_added on the low target,
4235 which does the same thing.
4236 (regptr): Delete.
4237 (do_initial_child_stuff): Remove debug registers references.
4238 Set context using the low target. Resume threads after
4239 setting the contexts.
4240 (child_continue): Remove dead variable. Remove debug
4241 registers references.
4242 (child_fetch_inferior_registers): Go through the low target.
4243 (do_child_store_inferior_registers): Remove.
4244 (child_store_inferior_registers): Go through the low target.
4245 (win32_resume): Remove debug registers references.
4246 Set context using the low target.
4247 (handle_exception): Change return type to void. Don't record
4248 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
4249 first chance exception.
889bf7c5 4250 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
4251 goto loop. Always return after waiting for debug event.
4252 (win32_wait): Convert to switch statement. Handle spurious
4253 events.
4254
4255 * win32-i386-low.c (debug_registers_changed,
4256 debug_registers_used): New.
4257 (initial_stuff): Rename to ...
4258 (i386_initial_stuff): ... this. Clear debug registers
4259 state variables.
4260 (store_debug_registers): Delete.
4261 (i386_get_thread_context): New.
4262 (load_debug_registers): Delete.
4263 (i386_set_thread_context): New.
4264 (i386_thread_added): New.
4265 (single_step): Rename to ...
4266 (i386_single_step): ... this.
4267 (do_fetch_inferior_registers): Rename to ...
4268 (i386_fetch_inferior_register): ... this.
4269 (i386_store_inferior_register): New.
4270 (the_low_target): Adapt to new interface.
4271
4272 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
4273 (arm_get_thread_context): New.
4274 (arm_set_thread_context): New.
4275 (regptr): New.
4276 (do_fetch_inferior_registers): Rename to ...
4277 (arm_fetch_inferior_register): ... this.
4278 (arm_store_inferior_register): New.
4279 (arm_wince_breakpoint): Reimplement as unsigned long.
4280 (arm_wince_breakpoint_len): Define.
4281 (the_low_target): Adapt to new interface.
4282
4283 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
4284 load_debug_registers. Add get_thread_context, set_thread_context,
4285 thread_added and store_inferior_register. Rename
4286 fetch_inferior_registers to fetch_inferior_register.
4287 (regptr): Remove declaration.
4288
dd6953e1
PA
42892007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
4290
4291 * linux-low.c (linux_detach): Change return type to int. Return 0.
4292 * spu-low.c (spu_detach): Likewise.
4293
444d6139
PA
42942007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
4295
4296 * target.h (target_ops): Change return type of detach to int.
4297 Add join.
4298 (join_inferior): New.
4299 * server.c (main): Don't skip detach support on mingw32.
4300 If the inferior doesn't support detaching return error.
4301 Call join_inferior instead of using waitpid.
4302 * linux-low.c (linux_join): New.
4303 (linux_target_op): Add linux_join.
4304 * spu-low.c (spu_join): New.
4305 (spu_target_ops): Add spu_join.
4306 * win32-low.c (win32_detach): Adapt to new interface.
4307 Reopen current_process_handle before detaching. Issue a child
4308 resume before detaching.
4309 (win32_join): New.
4310 (win32_target_op): Add win32_join.
4311
1d5315fe
PA
43122007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
4313
4314 * win32-low.c (win32-attach): Fix return value.
4315 * target.h (target_ops): Describe ATTACH return values.
4316
bf914831
PA
43172007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
4318
4319 * win32-low.c (GETPROCADDRESS): Define.
4320 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
4321 (winapi_DebugSetProcessKillOnExit): Likewise.
4322 (win32_create_inferior): Force usage of ansi CreateProcessA.
4323 (win32_attach): Use GETPROCADDRESS.
4324 (win32_detach): Likewise.
4325
f72f3e60
PA
43262007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
4327
4328 * win32-low.c (win32_wait): Don't use WSTOPSIG.
4329
ed50f18f
PA
43302007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
4331
4332 * win32-low.c: Commit leftover changes from 2007-03-29.
4333
0c2ead7e
DJ
43342007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
4335
4336 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
4337 fields short instead of int. Add explicit padding.
4338 (i387_cache_to_fsave): Remove unnecessary casts.
4339 (i387_fsave_to_cache): Doc fix.
4340 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
4341
73725ff3
DJ
43422007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
4343
4344 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
4345 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
4346
d99f33d8
PA
43472007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
4348
4349 * configure.srv (arm*-*-mingw32ce*): Move near the other
4350 arm targets.
4351
68070c10
PA
43522007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
4353
2482afc6 4354 * configure.ac: Add errno checking.
68070c10
PA
4355 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
4356 sys/file.h and malloc.h.
4357 (AC_CHECK_DECLS): Add perror.
4358 (srv_mingwce): Handle.
2482afc6 4359 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
4360 win32-i386-low.o to srv_tgtobj.
4361 (i[34567]86-*-mingw*): Likewise.
4362 (arm*-*-mingw32ce*): Add case.
4363 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
4364 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
4365 [__MINGW32CE__] (strerror): New function.
4366 [__MINGW32CE__] (errno): Define to GetLastError.
4367 [__MINGW32CE__] (COUNTOF): New macro.
4368 (remote_open): Remove extra close call.
4369 * mem-break.c (delete_breakpoint_at): New function.
4370 * mem-break.h (delete_breakpoint_at): Declare.
4371 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
4372 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
4373 [USE_WIN32API] (read, write): Add char* casts.
4374 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
4375 * server.h: Include wincecompat.h on Windows CE.
4376 [HAVE_ERRNO_H]: Check.
4377 (perror): Declare if not declared.
4378 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
4379 (perror_with_name): Remove errno declaration.
4380 * wincecompat.h: New.
4381 * wincecompat.c: New.
4382 * win32-low.h: New.
4383 * win32-arm-low.c: New.
4384 * win32-i386-low.c: New.
4385 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
4386 (OUTMSG2): Make it safe.
4387 (_T): New macro.
4388 (COUNTOF): New macro.
4389 (NUM_REGS): Get it from the low target.
4390 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
4391 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
4392 (thread_rec): Let low target handle debug registers.
4393 (child_add_thread): Likewise.
4394 (child_init_thread_list): Likewise.
4395 (continue_one_thread): Likewise.
4396 (regptr): New.
4397 (do_child_fetch_inferior_registers): Move to ...
4398 * win32-i386-low.c: ... here, and rename to ...
4399 (do_fetch_inferior_registers): ... this.
889bf7c5 4400 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
4401 Go through the low target.
4402 (do_child_store_inferior_registers): Use regptr.
4403 (strwinerror): New function.
4404 (win32_create_inferior): Handle Windows CE.
4405 Use strwinerror instead of strerror on Windows error
4406 codes. Add program to the error output.
4407 Don't close the main thread handle on Windows CE.
4408 (win32_attach): Use coredll.dll on Windows CE.
4409 (win32_kill): Close current process and current
4410 thread handles.
4411 (win32_detach): Use coredll.dll on Windows CE.
4412 (win32_resume): Let low target handle debug registers, and
4413 step request.
4414 (handle_exception): Add/Remove initial breakpoint. Avoid
4415 non-existant WSTOPSIG on Windows CE.
4416 (win32_read_inferior_memory): Cast to remove warning.
4417 (win32_arch_string): Go through the low target.
4418 (initialize_low): Call set_breakpoint_data with the low
4419 target's breakpoint.
4420 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
4421 FOP_REGNUM, mappings): Move to ...
4422 * win32-i386-low.c: ... here.
4423 * win32-low.c (win32_thread_info): Move to ...
4424 * win32-low.h: ... here.
4425 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
4426 win32-arm-low.c and wincecompat.c.
4427 (all:): Add $EXEEXT.
4428 (install-only:): Likewise.
4429 (gdbserver:): Likewise.
4430 (gdbreplay:): Likewise.
4431 * config.in: Regenerate.
4432 * configure: Regenerate.
4433
41093d81
PA
44342007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
4435
4436 * win32-low.c: Rename typedef thread_info to
4437 win32_thread_info throughout.
4438
544afa54
PA
44392007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
4440
4441 * win32-i386-low.c: Rename to ...
4442 * win32-low.c: ... this.
4443 * configure.srv: Replace win32-i386-low.o with win32-low.o.
4444 * Makefile.in: Likewise.
4445
bce7165d
PA
44462007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
4447
4448 * remote-utils.c (monitor_output): Constify msg parameter.
4449 * server.h (monitor_output): Likewise.
4450 * win32-i386-low.c (handle_output_debug_string): New.
4451 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
4452 handle_output_debug_string.
4453 (get_child_debug_event): Likewise.
4454
506c7aa0
DJ
44552007-03-27 Mat Hostetter <mat@lcs.mit.edu>
4456
4457 * server.c (main): Correct strtoul check.
4458
42c81e2a
DJ
44592007-03-27 Jon Ringle <jon@ringle.org>
4460
4461 * linux-low.c: Check __ARCH_HAS_MMU__ also.
4462
9453113a
DJ
44632007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
4464
4465 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
4466
64a69107
DJ
44672007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
4468
4469 * terminal.h: Check HAVE_SGTTY_H.
4470
44712007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
4472
4473 * remote-utils.c (remote_open): Print out the assigned port number.
4474
c74d0ad8
DJ
44752007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
4476
4477 * remote-utils.c (monitor_output): New function.
4478 * server.c (debug_threads): Define here.
4479 (monitor_show_help): New function.
4480 (handle_query): Handle qRcmd.
4481 (main): Do not handle 'd' packet.
4482 * server.h (debug_threads, remote_debug, monitor_output): Declare.
4483 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
4484 of debug_threads.
4485
de7c3b4a
PA
44862007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
4487
4488 * Makefile.in (EXEEXT): New.
4489 (clean): Use $(EXEEXT).
4490
ef57601b
PA
44912007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
4492
4493 * target.h (target_ops): Rename send_signal to request_interrupt,
4494 and remove enum target_signal parameter.
4495 * linux-low.c (linux_request_interrupt): Rename from
4496 linux_send_signal, and always send SIGINT.
4497 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
4498 and always send SIGINT.
4499 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
4500 of send_signal.
4501 (input_interrupt): Likewise.
4502
820f2bda
PA
45032007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
4504
4505 * server.c (get_features_xml): Check if target implemented
4506 arch_string.
4507 * win32-i386-low.c (win32_arch_string): New.
4508 (win32_target_ops): Add win32_arch_string as arch_string member.
4509
ab39bf24
UW
45102007-02-22 Markus Deuling <deuling@de.ibm.com>
4511
4512 * spu-low.c (spu_arch_string): New.
4513 (spu_target_ops): Add spu_arch_string.
4514
61ff6e04
DJ
45152007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
4516
4517 * remote-utils.c: Remove HAVE_TERMINAL_H check.
4518 * configure.ac: Do not check for terminal.h.
4519 * configure, config.in: Regenerated.
4520
fb1e4ffc
DJ
45212007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
4522
4523 * Makefile.in (OBS): Add $(XML_BUILTIN).
4524 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
4525 (clean): Update.
4526 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
4527 (arm-with-iwmmxt.c): New.
4528 * config.in, configure: Regenerate.
4529 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
4530 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
4531 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
4532 (arm*-*-linux*): Add iWMMXt and regset support.
4533 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
4534 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
4535 (arm_store_wmmxregset, target_regsets): New.
4536 * server.c (get_features_xml): Take annex argument. Check builtin
4537 XML documents.
4538 (handle_query): Handle multiple annexes.
4539
0f48aa01
DJ
45402007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
4541
4542 * remote-utils.c [USE_WIN32API] (read, write): Define.
4543 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
4544 write.
4545
23181151
DJ
45462007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
4547
4548 * linux-i386-low.c (the_low_target): Set arch_string.
4549 * linux-x86-64-low.c (the_low_target): Likewise.
4550 * linux-low.c (linux_arch_string): New.
4551 (linux_target_ops): Add it.
4552 * linux-low.h (struct linux_target_ops): Add arch_string.
4553 * server.c (write_qxfer_response): Use const void * for DATA.
4554 (get_features_xml): New.
4555 (handle_query): Handle qXfer:features:read. Report it for qSupported.
4556 * target.h (struct target_ops): Add arch_string method.
4557
9d606399
DJ
45582007-01-03 Denis Pilat <denis.pilat@st.com>
4559 Daniel Jacobowitz <dan@codesourcery.com>
4560
4561 * linux-low.c (linux_kill): Handle being called with no threads.
4562 * win32-i386-low.c (win32_kill): Likewise.
4563 (get_child_debug_event): Clear current_process_handle.
4564
45652006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
4566 Daniel Jacobowitz <dan@codesourcery.com>
4567
4568 * remote-utils.c (remote_open): Check the type of specified
4569 serial port devices before opening them.
4570 * server.c (main): Kill the inferior if an error occurs during
4571 the first remote_open.
4572
a5e13d24
DJ
45732006-12-05 Markus Deuling <deuling@de.ibm.com>
4574
4575 * README: Update supported targets.
4576
186947f7
DJ
45772006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
4578
4579 * Makefile.in (clean): Remove reg-mips64.c.
4580 (reg-mips64.c, reg-mips64.o): New rules.
4581 * configure.srv: Handle mips64. Include regset support for mips.
4582 * linux-mips-low.c (union mips_register): New.
4583 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
4584 (mips_breakpoint, mips_breakpoint_at): Use int.
4585 (mips_collect_register, mips_supply_register)
4586 (mips_collect_register_32bit, mips_supply_register_32bit)
4587 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
4588 (mips_store_fpregset, target_regsets): New.
4589 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
4590
a13e2c95
UW
45912006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
4592
4593 * configure.srv: Add target "spu*-*-*".
4594 * Makefile.in (clean): Remove reg-spu.c.
4595 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
4596 * spu-low.c: New file.
4597
cb7283db
DJ
45982006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
4599
4600 * configure.ac: Correct td_thr_tls_get_addr test.
4601 * configure: Regenerated.
4602
89be2091
DJ
46032006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
4604
4605 * linux-low.c (linux_wait_for_event): Reformat. Use the
4606 pass_signals array.
4607 * remote-utils.c (decode_address_to_semicolon): New.
4608 * server.c (pass_signals, handle_general_set): New.
4609 (handle_query): Mention QPassSignals for qSupported.
4610 (main): Call handle_general_set.
4611 * server.h (pass_signals, decode_address_to_semicolon): New.
4612
000ef4f0
DJ
46132006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
4614
4615 * server.c (handle_query): Correct error handling for read_auxv.
4616
b7149293
UW
46172005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
4618
4619 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
4620 and srv_linux_thread_db to yes.
4621 * linux-s390-low.c (s390_fill_gregset): New function.
4622 (target_regsets): Define data structure.
4623
dae5f5cf
DJ
46242006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
4625
4626 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
4627 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
4628 * config.in, configure: Regenerated.
4629 * inferiors.c (gdb_id_to_thread): New function.
4630 (gdb_id_to_thread_id): Use it.
4631 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
4632 * linux-low.h (struct process_info): Add th member.
4633 (thread_db_get_tls_address): New prototype.
4634 * remote-utils.c (decode_address): Make non-static.
4635 * server.c (handle_query): Handle qGetTLSAddr.
4636 * server.h (gdb_id_to_thread, decode_address): New prototypes.
4637 * target.h (struct target_ops): Add get_tls_address.
4638 * thread-db.c (maybe_attach_thread): Save the thread handle.
4639 (thread_db_get_tls_address): New.
4640
32ca6d61
DJ
46412006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
4642
4643 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
4644 (linux_resume_one_process): Take a siginfo_t *. Update all
4645 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
4646 (struct pending_signals): Add a siginfo_t.
4647 (linux_wait_for_process): Always set last_status.
4648 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
4649 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
4650 * linux-low.h (struct process_info): Add last_status.
4651
5ffff7c1
DJ
46522006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
4653
4654 * remote-utils.c (try_rle): New function.
4655 (putpkt_binary): Use it.
4656
8695c747
DJ
46572006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
4658
4659 * Makefile.in (clean): Clean reg-x86-64-linux.c.
4660 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
4661 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
4662 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
4663 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
4664 point registers.
4665
290fadea
RS
46662006-08-08 Richard Sandiford <richard@codesourcery.com>
4667
4668 * server.c (terminal_fd): New variable.
4669 (old_foreground_pgrp): Likewise.
4670 (restore_old_foreground_pgrp): New function.
4671 (start_inferior): Record the terminal file descriptor in terminal_fd
4672 and its original foreground group in old_foreground_pgrp. Register
4673 restore_old_foreground_pgrp with atexit().
4674
9f2e1e63
DJ
46752006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
4676
4677 * server.c (handle_query): Correct qPart to qXfer.
4678
b80864fb
DJ
46792006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
4680
4681 * configure.ac: Check for more headers which are missing on
4682 Windows. Automatically supply -lwsock32 and USE_WIN32API.
4683 * configure.srv: Add Cygwin and mingw32.
4684 * remote-utils.c: Don't include headers unconditionally which
4685 are missing on mingw32. Include <winsock.h> for mingw32.
4686 (remote_open): Adjust for mingw32 support. Flush
4687 standard error after writing to it.
4688 (remote_close, putpkt_binary, input_interrupt, block_async_io)
4689 (unblock_async_io, enable_async_io, disable_async_io)
4690 (readchar, getpkt): Update for Winsock support.
4691 (prepare_resume_reply): Expect a protocol signal number.
4692 * server.c: Disable <sys/wait.h> on mingw32.
4693 (start_inferior): Adjust for mingw32 support. Flush
4694 standard error after writing to it.
4695 (attach_inferior): Likewise. Use protocol signal
4696 numbers.
4697 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
4698 and names.
4699 * win32-i386-low.c: New file.
4700 * Makefile.in (XM_CLIBS): Set.
4701 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
4702 (win32-i386-low.o): New dependency rule.
4703 * linux-low.c (linux_wait): Use target signal numbers.
4704 * target.h (struct target_ops): Doc fix.
4705 * server.h (target_signal_to_name): New prototype.
4706 * gdbreplay.c: Don't include headers unconditionally which
4707 are missing on mingw32. Include <winsock.h> for mingw32.
4708 (remote_close, remote_open): Adjust for Winsock support.
4709 * configure, config.in: Regenerated.
4710
0876f84a
DJ
47112006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
4712
4713 * server.c (decode_xfer_read, write_qxfer_response): New.
4714 (handle_query): Take a packet length argument. Handle
4715 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
4716 the qSupported response.
4717 (main): Update call to handle_query.
4718
01f9e8fa
DJ
47192006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
4720
4721 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
4722 (putpkt_binary): Renamed from putpkt and adjusted for binary
4723 data.
4724 (putpkt): New wrapper for putpkt_binary.
4725 (readchar): Don't mask off the high bit.
4726 (decode_X_packet): New function.
4727 * server.c (main): Call putpkt_binary if a handler sets the packet
4728 length. Save the length of the incoming packet. Handle 'X'.
4729 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
4730
be2a5f71
DJ
47312006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
4732
4733 * server.c (handle_query): Handle qSupported.
4734
ea025f5f
DJ
47352006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
4736
4737 * remote-utils.c (all_symbols_looked_up): New variable.
4738 (look_up_one_symbol): Check it.
4739 * server.h (look_up_one_symbol): New declaration.
4740 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
4741
9308fc88
DJ
47422006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
4743
4744 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 4745 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
4746 (PTRACE_GET_THREAD_AREA): Define.
4747 (ps_get_thread_area): New function.
4748
52fb6437
NS
47492006-05-09 Nathan Sidwell <nathan@codesourcery.com>
4750
4751 * configure.srv (m68k*-*-uclinux*): New target.
4752 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
4753 (linux_resume_one_process): Remove extraneous cast.
4754 (linux_read_offsets): New.
4755 (linux_target_op): Add linux_read_offsets on mmuless systems.
4756 * server.c (handle_query): Add qOffsets logic.
4757 * target.h (struct target_ops): Add read_offsets.
4758
21b0f40c
DJ
47592006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
4760
4761 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
4762 (PTRACE_GET_THREAD_AREA): Define.
4763 (ps_get_thread_area): New function.
4764 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
4765 (linux-x86-64-low.o): Update.
4766
0050a760
DJ
47672006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
4768
4769 * configure.ac: Remove checks for prfpregset_t.
4770 * gdb_proc_service.h: New file.
4771 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
4772 new "gdb_proc_service.h".
4773 * proc-service.c: Likewise.
4774 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
4775 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
4776 * Makefile.in (gdb_proc_service_h): Updated.
4777 * configure, config.in: Regenerated.
4778
b92a518e
DJ
47792006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
4780
4781 * remote-utils.c (prepare_resume_reply): Move declaration
4782 of gdb_id_from_wait to the top of the block.
4783
545587ee
DJ
47842006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
4785
4786 * linux-low.c (regsets_store_inferior_registers): Read the regset
4787 from the target before filling it.
4788
9db87ebd
DJ
47892006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
4790
4791 * server.c (attach_inferior): Return SIGTRAP for a successful
4792 attach.
4793
dd24457d
DJ
47942006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
4795
4796 * Makefile.in (OBS): Add version.o.
4797 (STAGESTUFF): Delete.
4798 (version.o): Add dependencies.
4799 (version.c): Replace rule.
4800 (clean): Remove version.c.
4801 * server.c (gdbserver_version): New.
4802 (gdbserver_usage): Use printf.
4803 (main): Handle --version and --help.
4804 * server.h (version, host_name): Add declarations.
4805
6f0f660e
EZ
48062005-12-23 Eli Zaretskii <eliz@gnu.org>
4807
889bf7c5
PA
4808 * linux-arm-low.c:
4809 * linux-arm-low.c:
4810 * inferiors.c:
4811 * i387-fp.h:
4812 * i387-fp.c:
4813 * gdbreplay.c:
4814 * regcache.c:
4815 * proc-service.c:
4816 * mem-break.h:
4817 * mem-break.c:
4818 * linux-x86-64-low.c:
4819 * linux-sh-low.c:
4820 * linux-s390-low.c:
4821 * linux-ppc64-low.c:
4822 * linux-ppc-low.c:
4823 * linux-mips-low.c:
4824 * linux-m68k-low.c:
4825 * linux-m32r-low.c:
4826 * linux-low.h:
4827 * linux-low.c:
4828 * linux-ia64-low.c:
4829 * linux-i386-low.c:
4830 * linux-crisv32-low.c:
4831 * thread-db.c:
4832 * terminal.h:
4833 * target.h:
4834 * target.c:
4835 * server.h:
4836 * server.c:
4837 * remote-utils.c:
4838 * regcache.h:
4839 * utils.c:
4840 * Makefile.in:
4841 * configure.ac:
6f0f660e
EZ
4842 * gdbserver.1: Add (C) after Copyright. Update the FSF
4843 address.
4844
9d1fb177
DJ
48452005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
4846
4847 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
4848 (arm_breakpoint_at): Recognize both breakpoints.
4849 (the_low_target): Use the correct breakpoint instruction.
4850
011a70c2
DJ
48512005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
4852
4853 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
4854 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
4855 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
4856 (the_low_target): Update.
4857
7fb85e41
AS
48582005-10-25 Andreas Schwab <schwab@suse.de>
4859
4860 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
4861
4862 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
4863 (ia64_num_regs): Reduce to 462.
4864
3db0444b
DJ
48652005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
4866
4867 * acinclude.m4: Correct quoting.
4868 * aclocal.m4: Regenerated.
4869
4870 Suggested by SZOKOVACS Robert <szo@ies.hu>:
4871 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
4872 (thread_db_init): Call thread_db_err_str.
4873 * configure.ac: Check for TD_VERSION.
4874 * config.in, configure: Regenerated.
4875
bee0189a
DJ
48762005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4877
4878 * server.h (error, fatal, warning): Add ATTR_FORMAT.
4879
e9d25b98
DJ
48802005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
4881
4882 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
4883 is not available. Define HAVE_PTRACE_GETREGS if it is.
4884 * config.in, configure: Regenerated.
4885 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
4886 * linux-i386-low.c, linux-m68k-low.c: Update to use
4887 HAVE_PTRACE_GETREGS.
4888 * linux-low.c (regsets_fetch_inferior_registers)
4889 (regsets_store_inferior_registers): Only return 0 if we processed
4890 GENERAL_REGS.
4891 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
4892 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
4893
a06660f7
DJ
48942005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
4895
4896 * inferiors.c (struct thread_info): Add gdb_id.
4897 (add_thread): Add gdb_id argument.
4898 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
4899 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
4900 calls to add_thread.
4901 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
4902 * server.c (handle_query): Use thread_to_gdb_id.
4903 (handle_v_cont, main): Use gdb_id_to_thread_id.
4904 * server.h (add_thread): Update prototype.
4905 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
4906 prototypes.
4907
5a1f5858
DJ
49082005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
4909
4910 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
4911 left-padded registers.
4912 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
4913 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
4914
e122f1f5
SE
49152005-07-01 Steve Ellcey <sje@cup.hp.com>
4916
4917 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
4918 * configure: Regenerate.
4919 * config.in: Regenerate.
4920 * server.h (NEED_DECLARATION_STRERROR):
4921 Replace with !HAVE_DECL_STRERROR.
4922
d592fa2f
DJ
49232005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
4924
4925 * linux-low.c (linux_wait, linux_send_signal): Don't test
4926 an unsigned long variable for > 0 if it could be MAX_ULONG.
4927 * server.c (myresume): Likewise.
4928 * target.c (set_desired_inferior): Likewise.
4929
ccbd4912
MK
49302005-06-13 Mark Kettenis <kettenis@gnu.org>
4931
4932 * configure.ac: Simplify and improve check for socklen_t.
4933 * configure, config.in: Regenerate.
4934
f450004a
DJ
49352005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
4936
4937 * acconfig.h: Remove.
4938 * configure.ac: Add a test for socklen_t. Use three-argument
4939 AC_DEFINE throughout.
4940 * config.in: Regenerated using autoheader 2.59.
4941 * configure: Regenerated.
4942
4943 * gdbreplay.c (socklen_t): Provide a default.
4944 (remote_open): Use socklen_t.
4945 * remote-utils.c (socklen_t): Provide a default.
4946 (remote_open): Use socklen_t.
4947 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
4948 unsigned char.
4949
4950 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
4951 char for buffers.
4952 * linux-low.c (linux_read_memory, linux_write_memory)
4953 (linux_read_auxv): Likewise.
4954 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
4955 (check_mem_write): Likewise.
4956 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
4957 Likewise.
4958 * regcache.c (struct inferior_rgcache_data, registers_to_string)
4959 (registers_from_string, register_data): Likewise.
4960 * server.c (handle_query, main): Likewise.
4961 * server.h (convert_ascii_to_int, convert_int_to_ascii)
4962 (decode_M_packet): Likewise.
4963 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
4964 * target.h (struct target_ops): Update read_memory, write_memory,
4965 and read_auxv.
4966 (read_inferior_memory, write_inferior_memory): Update.
4967 * linux-low.h (struct linux_target_ops): Change type of breakpoint
4968 to unsigned char *.
4969 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
4970 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
4971 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
4972 linux-s390-low.c, linux-sh-low.c: Update for changes in
4973 read_inferior_memory and the_low_target->breakpoint.
4974
eee84df1
DJ
49752005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
4976
4977 * Makefile.in (SFILES): Add linux-ppc64-low.c.
4978 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
4979 * configure.srv: Add powerpc64-*-linux*.
4980 * linux-ppc64-low.c: New file.
4981
45b134e5
OF
49822005-05-23 Orjan Friberg <orjanf@axis.com>
4983
4984 * linux-cris-low.c: New file with support for CRIS.
4985 * linux-crisv32-low.c: Ditto for CRISv32.
4986 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
4987 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 4988 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
4989 reg-crisv32.o, and reg-crisv32.c to make rules.
4990 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
4991 recognized targets.
4992
48d93c75
UW
49932005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
4994
4995 * linux-low.c (fetch_register): Ensure buffer size is a multiple
4996 of sizeof (PTRACE_XFER_TYPE).
4997 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
4998
e013ee27
OF
49992005-05-12 Orjan Friberg <orjanf@axis.com>
5000
889bf7c5 5001 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
5002 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
5003 pointers for hardware watchpoint support.
5004 * linux-low.h (struct linux_target_ops): Ditto.
5005 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
5006 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
5007 to linux_target_ops.
5008 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
5009 reply packet.
5010 * server.c (main): Recognize 'Z' and 'z' packets.
5011
b0ded00b
UW
50122005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
5013
5014 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
5015 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
5016 (the_low_target): Add new members.
5017
8643e2ad
DJ
50182005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
5019
5020 * proc-service.c (ps_lgetregs): Search all_processes instead of
5021 all_threads.
5022
fc620387
DJ
50232005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
5024
5025 * server.c (start_inferior): Change return type to int.
5026 (attach_inferior): Change sigptr to int *.
5027 (handle_v_cont, handle_v_requests): Change signal to int *.
5028 (main): Change signal to int.
5029
50302005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
5031
5032 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
5033 * configure.srv: Add m32r*-*-linux*.
5034 * linux-m32r-low.c: New file.
5035
e0e76420
DJ
50362005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
5037
5038 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
5039
a1928bad
DJ
50402005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
5041
5042 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
5043 Take unsigned long arguments for PIDs.
5044 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
5045 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
5046 (wait_for_sigstop, linux_resume_one_process)
5047 (regsets_fetch_inferior_registers, linux_send_signal)
5048 (linux_read_auxv): Likewise. Update the types of variables holding
5049 PIDs. Update format string specifiers.
5050 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
5051 * remote-utils.c (prepare_resume_reply): Likewise.
5052 * server.c (cont_thread, general_thread, step_thread)
5053 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
5054 unsigned long.
5055 (handle_query): Update format specifiers.
5056 (handle_v_cont, main): Use strtoul for thread IDs.
5057 * server.h (struct inferior_list_entry): Use unsigned long for ID.
5058 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
5059 (general_thread, step_thread, thread_from_wait)
5060 (old_thread_from_wait): Update.
5061 * target.h (struct thread_resume): Use unsigned long for THREAD.
5062 (struct target_ops): Use unsigned long for arguments to attach and
5063 thread_alive.
5064
dcdb98d2
DJ
50652005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
5066
5067 * acinclude.m4: Include bfd/bfd.m4 directly.
5068 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
5069 <agriffis@toolchain.org>.
5070 * aclocal.m4, configure: Regenerated.
5071
bec39cab
AC
50722005-01-07 Andrew Cagney <cagney@gnu.org>
5073
5074 * configure.ac: Rename configure.in, require autoconf 2.59.
5075 * configure: Re-generate.
5076
434c4c77
DJ
50772004-12-08 Daniel Jacobowitz <dan@debian.org>
5078
5079 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
5080 LIBS when finished.
5081 * aclocal.m4: Regenerated.
5082 * configure: Regenerated.
5083
db1d3e1b
AS
50842004-11-21 Andreas Schwab <schwab@suse.de>
5085
5086 * linux-m68k-low.c (m68k_num_gregs): Define.
5087 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
5088 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
5089 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
5090 (m68k_breakpoint_at): New. Add to the_low_target.
5091
5092 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
5093 srv_linux_thread_db to yes.
5094
43360365
JB
50952004-10-20 Joel Brobecker <brobecker@gnat.com>
5096
5097 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
5098 (ARCH_SET_FS): Likewise.
5099 (ARCH_GET_FS): Likewise.
5100 (ARCH_GET_GS): Likewise.
5101
fd500816
DJ
51022004-10-16 Daniel Jacobowitz <dan@debian.org>
5103
5104 * linux-i386-low.c (ps_get_thread_area): New.
5105 * linux-x86-64-low.c (ps_get_thread_area): New.
5106 * linux-low.c: Include <sys/syscall.h>.
5107 (linux_kill_one_process): Don't kill the first thread here.
5108 (linux_kill): Kill the first thread here.
5109 (kill_lwp): New function.
5110 (send_sigstop, linux_send_signal): Use it.
5111 * proc-service.c: Clean up #ifdefs.
5112 (fpregset_info): Delete.
5113 (ps_lgetregs): Update and enable implementation.
5114 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
5115 implementations.
5116 * remote-utils.c (struct sym_cache, symbol_cache): New.
5117 (input_interrupt): Print a clearer message.
5118 (async_io_enabled): New variable.
5119 (enable_async_io, disable_async_io): Use it. Update comments.
5120 (look_up_one_symbol): Use the symbol cache.
5121 * thread-db.c (thread_db_look_up_symbols): New function.
5122 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
5123
f6de3c42
DJ
51242004-10-16 Daniel Jacobowitz <dan@debian.org>
5125
5126 * configure.in: Test for -rdynamic.
5127 * configure: Regenerated.
5128 * Makefile (INTERNAL_LDFLAGS): New.
5129 (gdbserver, gdbreplay): Use it.
5130
2c0fc042
AC
51312004-09-02 Andrew Cagney <cagney@gnu.org>
5132
5133 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
5134
075b3282
DJ
51352004-03-23 Daniel Jacobowitz <drow@mvista.com>
5136
5137 * linux-low.c (linux_wait): Clear all_processes list also.
5138
fa6a77dc
DJ
51392004-03-12 Daniel Jacobowitz <drow@mvista.com>
5140
5141 * linux-low.c: Include <errno.h>. Remove extern declaration of
5142 errno.
5143
6d782a97
DJ
51442004-03-12 Daniel Jacobowitz <drow@mvista.com>
5145
5146 * gdbreplay.c, server.h, utils.c: Update copyright years.
5147
3a7fb99b
DJ
51482004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
5149
5150 * server.c (main): Print child status or termination signal from
5151 variable 'signal', not 'sig'.
5152
c3e735a6
DJ
51532004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
5154
5155 * linux-low.c (linux_read_memory): Change return type to
5156 int. Check for and return error from ptrace().
5157 * target.c (read_inferior_memory): Change return type to int. Pass
5158 back return status from the_target->read_memory().
5159 * target.h (struct target_ops): Adapt *read_memory() prototype.
5160 Update comment.
5161 (read_inferior_memory): Adapt prototype.
5162 * server.c (main): Return an error packet if
5163 read_inferior_memory() returns an error.
5164
a59d1c82
DJ
51652004-03-04 Daniel Jacobowitz <drow@mvista.com>
5166
5167 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
5168 Unify with other clean targets.
5169
dc3f8883
DJ
51702004-02-29 Daniel Jacobowitz <drow@mvista.com>
5171
5172 * server.c (handle_v_cont): Call set_desired_inferior.
5173
89a208da
DJ
51742004-02-29 Daniel Jacobowitz <drow@mvista.com>
5175
5176 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
5177
62ea82f5
DJ
51782004-02-29 Daniel Jacobowitz <drow@mvista.com>
5179
5180 * linux-low.c (linux_wait): Unblock async I/O.
5181 (linux_resume): Block and enable async I/O.
5182 * remote-utils.c (block_async_io, unblock_async_io): New functions.
5183 * server.h (block_async_io, unblock_async_io): Add prototypes.
5184
6910d122
DJ
51852004-02-29 Daniel Jacobowitz <drow@mvista.com>
5186
5187 * remote-utils.c (remote_open): Print a status notice after
5188 opening a TCP port.
5189 * server.c (attach_inferior): Print a status notice after
5190 attaching.
5191
51922004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
5193
5194 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
5195
c89dc5d4
DJ
51962004-02-26 Daniel Jacobowitz <drow@mvista.com>
5197
5198 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
5199 error packet.
5200 * server.c, target.h: Update copyright years.
5201
4b8dad4a
RM
52022004-02-25 Roland McGrath <roland@redhat.com>
5203
5204 * target.h (struct target_ops): New member `read_auxv'.
5205 * server.c (handle_query): Handle qPart:auxv:read: query using that.
5206 * linux-low.c (linux_read_auxv): New function.
5207 (linux_target_ops): Initialize `read_auxv' member to that.
5208
d7446758
JB
52092004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
5210
5211 Committed by Jim Blandy <jimb@redhat.com>.
5212
5213 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 5214 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
5215 instead of GPR_SIZE to distiguish s390 and s390x targets.
5216
5544ad89
DJ
52172004-01-31 Daniel Jacobowitz <drow@mvista.com>
5218
5219 * linux-low.c: Update copyright year.
5220 (check_removed_breakpoint): Clear pending_is_breakpoint.
5221 (linux_set_resume_request, linux_queue_one_thread)
5222 (resume_status_pending_p): New functions.
5223 (linux_continue_one_thread): Use process->resume.
5224 (linux_resume): Only resume threads if there are no pending events.
5225 * linux-low.h (struct process_info): Add resume request
5226 pointer.
5227
2a68b70e
DJ
52282004-01-30 Daniel Jacobowitz <drow@mvista.com>
5229
5230 * regcache.c (new_register_cache): Clear the allocated register
5231 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
5232
64386c31
DJ
52332003-10-13 Daniel Jacobowitz <drow@mvista.com>
5234
5235 * linux-low.c (linux_resume): Take a struct thread_resume *
5236 argument.
5237 (linux_wait): Update call.
5238 (resume_ptr): New static variable.
5239 (linux_continue_one_thread): Renamed from
5240 linux_continue_one_process. Use resume_ptr.
5241 (linux_resume): Use linux_continue_one_thread.
5242 * server.c (handle_v_cont, handle_v_requests): New functions.
5243 (myresume): New function.
5244 (main): Handle 'v' case.
5245 * target.h (struct thread_resume): New type.
5246 (struct target_ops): Change argument of "resume" to struct
5247 thread_resume *.
5248 (myresume): Delete macro.
5249
c938e9b0
L
52502003-08-08 H.J. Lu <hongjiu.lu@intel.com>
5251
5252 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
5253 (uninstall): Support DESTDIR.
5254
7f313d07
BC
5255Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
5256
5257 * configure.srv: Add xscale*linux copy of arm*linux entry.
5258
3b2fc2ea
DJ
52592003-07-24 Daniel Jacobowitz <drow@mvista.com>
5260
5261 * linux-arm-low.c (arm_reinsert_addr): New function.
5262 (the_low_target): Add arm_reinsert_addr.
5263
1c0a559e
MK
52642003-07-08 Mark Kettenis <kettenis@gnu.org>
5265
5266 * mem-break.c: Remove whitespace at end of file.
5267
43d5792c
DJ
52682003-06-28 Daniel Jacobowitz <drow@mvista.com>
5269
5270 * configure.in: Check whether we need to prototype strerror.
5271 * server.h: Optionally prototype strerror.
5272 * gdbreplay.c (perror_with_name): Use strerror.
5273 * linux-low.c (linux_attach_lwp): Use strerror.
5274 * utils.c (perror_with_name): Use strerror.
5275 * config.in, configure: Regenerated.
5276
c8a86edf
DJ
52772003-06-28 Daniel Jacobowitz <drow@mvista.com>
5278
5279 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
5280 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
5281
73d37363
DJ
52822003-06-20 Daniel Jacobowitz <drow@mvista.com>
5283
5284 * Makefile.in (SFILES): Update.
5285 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
5286 low-sun3.c: Remove files.
5287
6ad8ae5c
DJ
52882003-06-17 Daniel Jacobowitz <drow@mvista.com>
5289
5290 * linux-low.c: Move comment to linux_thread_alive where it belonged.
5291 (linux_detach_one_process, linux_detach): New functions.
5292 (linux_target_ops): Add linux_detach.
5293 * server.c (main): Handle 'D' packet.
5294 * target.h (struct target_ops): Add "detach" member.
5295 (detach_inferior): Define.
5296
1581182a
MK
52972003-06-13 Mark Kettenis <kettenis@gnu.org>
5298
5299 From Kelley Cook <kelleycook@wideopenwest.com>:
5300 * configure.srv: Accept i[34567]86 variants.
5301
e5379b03
DJ
53022003-06-05 Daniel Jacobowitz <drow@mvista.com>
5303
5304 * linux-low.c (linux_wait_for_event): Correct comment typos.
5305 (linux_resume_one_process): Call check_removed_breakpoint.
5306 (linux_send_signal): New function.
5307 (linux_target_ops): Add linux_send_signal.
5308 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
5309 of kill.
5310 * target.h (struct target_ops): Add send_signal.
5311
2ff29de4
JB
53122003-05-29 Jim Blandy <jimb@redhat.com>
5313
5314 * linux-low.c (usr_store_inferior_registers): Transfer buf in
5315 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
5316 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
5317 away part of the register's value.
5318
254787d4
DJ
53192003-03-26 Daniel Jacobowitz <drow@mvista.com>
5320
5321 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
5322 (linux_wait_for_event, linux_init_signals): Likewise.
5323
94e10508
DJ
53242003-03-17 Daniel Jacobowitz <drow@mvista.com>
5325
5326 * configure.in: Check for stdlib.h.
5327 * configure: Regenerated.
5328 * config.in: Regenerated.
5329
4c0711e0
DJ
53302003-01-04 Andreas Schwab <schwab@suse.de>
5331
5332 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
5333
ef66e766
AC
53342003-01-02 Andrew Cagney <ac131313@redhat.com>
5335
5336 * Makefile.in: Remove obsolete code.
5337
a1358604
DJ
53382002-11-20 Daniel Jacobowitz <drow@mvista.com>
5339
5340 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
5341 defined(PT_FPR0_HI).
5342
23ce3b1c
DJ
53432002-11-17 Stuart Hughes <seh@zee2.com>
5344
5345 * linux-arm-low.c (arm_num_regs): Increase.
5346 (arm_regmap): Include status register.
5347
53482002-11-17 Daniel Jacobowitz <drow@mvista.com>
5349
5350 * linux-low.c (register_addr): Remove incorrect -1 check.
5351
a9fa9f7d
DJ
53522002-08-29 Daniel Jacobowitz <drow@mvista.com>
5353
5354 * linux-low.c (linux_create_inferior): Call setpgid. Return
5355 the new PID.
5356 (unstopped_p, linux_signal_pid): Remove.
5357 (linux_target_ops): Remove linux_signal_pid.
5358 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
5359 global instead of target method.
5360 * target.h (struct target_ops): Remove signal_pid. Update comment
5361 for create_inferior.
5362 * server.c (signal_pid): New variable.
5363 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 5364 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
5365 (attach_inferior): Set signal_pid.
5366
17574093
DJ
53672002-08-23 Daniel Jacobowitz <drow@mvista.com>
5368
5369 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
5370
53712002-08-20 Jim Blandy <jimb@redhat.com>
5372
5373 * Makefile.in (LDFLAGS): Allow the configure script to establish a
5374 default for this.
5375
53762002-08-01 Andrew Cagney <cagney@redhat.com>
5377
5378 * Makefile.in: Make chill references obsolete.
5379
53802002-07-24 Kevin Buettner <kevinb@redhat.com>
5381
5382 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
5383 * configure: Regenerate.
5384 * config.in: Regenerate.
5385
53862002-07-09 David O'Brien <obrien@FreeBSD.org>
5387
5388 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
5389 (perror_with_name, remote_close, remote_open, expect, play): Static.
5390
53912002-07-04 Michal Ludvig <mludvig@suse.cz>
5392
4b8dad4a 5393 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
5394 byte offsets instead of an array of indexes.
5395 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
5396
53972002-06-13 Daniel Jacobowitz <drow@mvista.com>
5398
5399 * regcache.c: Add comment.
5400
54012002-06-11 Daniel Jacobowitz <drow@mvista.com>
5402
5403 * thread-db.c: New file.
5404 * proc-service.c: New file.
5405 * acinclude.m4: New file.
5406 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
5407 proc-service.o, and thread-db.o.
5408 (linux-low.o): Add USE_THREAD_DB.
5409 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
5410 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
5411 * aclocal.m4: Regenerated.
5412 * config.in: Regenerated.
5413 * configure: Regenerated.
5414 * configure.in: Check for proc_service.h, sys/procfs.h,
5415 thread_db.h, and linux/elf.h headrs.
5416 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
5417 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
5418 Check for -lthread_db and thread support.
5419 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
5420 PowerPC, and SuperH.
5421 * i387-fp.c: Constify arguments.
5422 * i387-fp.h: Likewise.
5423 * inferiors.c: (struct thread_info): Renamed from
5424 `struct inferior_info'. Remove PID member. Use generic inferior
5425 list header. All uses updated.
5426 (inferiors, signal_pid): Removed.
5427 (all_threads): New variable.
5428 (get_thread): Define.
5429 (add_inferior_to_list): New function.
5430 (for_each_inferior): New function.
5431 (change_inferior_id): New function.
5432 (add_inferior): Removed.
5433 (remove_inferior): New function.
5434 (add_thread): New function.
5435 (free_one_thread): New function.
5436 (remove_thread): New function.
5437 (clear_inferiors): Use for_each_inferior and free_one_thread.
5438 (find_inferior): New function.
5439 (find_inferior_id): New function.
5440 (inferior_target_data): Update argument type.
5441 (set_inferior_target_data): Likewise.
5442 (inferior_regcache_data): Likewise.
5443 (set_inferior_regcache_data): Likewise.
5444 * linux-low.c (linux_bp_reinsert): Remove.
5445 (all_processes, stopping_threads, using_thrads)
5446 (struct pending_signals, debug_threads, pid_of): New.
5447 (inferior_pid): Replace with macro.
5448 (struct inferior_linux_data): Remove.
5449 (get_stop_pc, add_process): New functions.
5450 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
5451 Use add_process and add_thread.
5452 (linux_attach_lwp): New function, based on old linux_attach. Use
5453 add_process and add_thread. Set stop_expected for new threads.
5454 (linux_attach): New function.
5455 (linux_kill_one_process): New function.
5456 (linux_kill): Kill all LWPs.
5457 (linux_thread_alive): Use find_inferior_id.
5458 (check_removed_breakpoints, status_pending_p): New functions.
5459 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
5460 Update. Use WNOHANG. Wait for cloned processes also. Update process
5461 struct for the found process.
5462 (linux_wait_for_event): New function.
5463 (linux_wait): Use it. Support LWPs.
5464 (send_sigstop, wait_for_sigstop, stop_all_processes)
5465 (linux_resume_one_process, linux_continue_one_process): New functions.
5466 (linux_resume): Support LWPs.
5467 (REGISTER_RAW_SIZE): Remove.
5468 (fetch_register): Use register_size instead. Call supply_register.
5469 (usr_store_inferior_registers): Likewise. Call collect_register.
5470 Fix recursive case.
5471 (regsets_fetch_inferior_registers): Improve error message.
5472 (regsets_store_inferior_registers): Add debugging.
5473 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
5474 (unstopped_p, linux_signal_pid): New functions.
5475 (linux_target_ops): Add linux_signal_pid.
5476 (linux_init_signals): New function.
5477 (initialize_low): Call it. Initialize using_threads.
5478 * regcache.c (inferior_regcache_data): Add valid
5479 flag.
5480 (get_regcache): Fetch registers lazily. Add fetch argument
5481 and update all callers.
5482 (regcache_invalidate_one, regcache_invalidate): New
5483 functions.
5484 (new_register_cache): Renamed from create_register_cache.
5485 Return the new regcache.
5486 (free_register_cache): Change argument to a void *.
5487 (registers_to_string, registers_from_string): Call get_regcache
5488 with fetch flag set.
5489 (register_data): Make static. Pass fetch flag to get_regcache.
5490 (supply_register): Call get_regcache with fetch flag clear.
5491 (collect_register): Call get_regcache with fetch flag set.
5492 (collect_register_as_string): New function.
5493 * regcache.h: Update.
5494 * remote-utils.c (putpkt): Flush after debug output and use
5495 stderr.
5496 Handle input interrupts while waiting for an ACK.
5497 (input_interrupt): Use signal_pid method.
5498 (getpkt): Flush after debug output and use stderr.
5499 (outreg): Use collect_register_as_string.
5500 (new_thread_notify, dead_thread_notify): New functions.
5501 (prepare_resume_reply): Check using_threads. Set thread_from_wait
5502 and general_thread.
5503 (look_up_one_symbol): Flush after debug output.
5504 * server.c (step_thread, server_waiting): New variables.
5505 (start_inferior): Don't use signal_pid. Update call to mywait.
5506 (attach_inferior): Update call to mywait.
5507 (handle_query): Handle qfThreadInfo and qsThreadInfo.
5508 (main): Don't fetch/store registers explicitly. Use
5509 set_desired_inferior. Support proposed ``Hs'' packet. Update
5510 calls to mywait.
5511 * server.h: Update.
5512 (struct inferior_list, struct_inferior_list_entry): New.
5513 * target.c (set_desired_inferior): New.
5514 (write_inferior_memory): Constify.
5515 (mywait): New function.
5516 * target.h: Update.
5517 (struct target_ops): New signal_pid method.
5518 (mywait): Removed macro, added prototype.
5519
5520 * linux-low.h (regset_func): Removed.
5521 (regset_fill_func, regset_store_func): New.
5522 (enum regset_type): New.
5523 (struct regset_info): Add type field. Use new operation types.
5524 (struct linux_target_ops): stop_pc renamed to get_pc.
5525 Add decr_pc_after_break and breakpoint_at.
5526 (get_process, get_thread_proess, get_process_thread)
5527 (strut process_info, all_processes, linux_attach_lwp)
5528 (thread_db_init): New.
5529
5530 * linux-arm-low.c (arm_get_pc, arm_set_pc,
5531 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
5532 (the_low_target): Add new members.
5533 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
5534 (i386_store_fpxregset): Constify.
5535 (target_regsets): Add new kind identifier.
5536 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
5537 (i386_set_pc): Add debugging.
5538 (i386_breakpoint_at): New function.
5539 (the_low_target): Add new members.
5540 * linux-mips-low.c (mips_get_pc, mips_set_pc)
5541 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
5542 (mips_breakpoint_at): New.
5543 (the_low_target): Add new members.
5544 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
5545 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
5546 (the_low_target): Add new members.
5547 * linux-sh-low.c (sh_get_pc, sh_set_pc)
5548 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
5549 (the_low_target): Add new members.
5550 * linux-x86-64-low.c (target_regsets): Add new kind
5551 identifier.
5552
55532002-05-15 Daniel Jacobowitz <drow@mvista.com>
5554
5555 From Martin Pool <mbp@samba.org>:
5556 * server.c (gdbserver_usage): New function.
5557 (main): Call it.
5558
55592002-05-14 Daniel Jacobowitz <drow@mvista.com>
5560
5561 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
5562 stop_at -> stop_pc.
5563
55642002-05-04 Andrew Cagney <ac131313@redhat.com>
5565
5566 * Makefile.in: Remove obsolete code.
5567
55682002-04-24 Michal Ludvig <mludvig@suse.cz>
5569
5570 * linux-low.c (regsets_fetch_inferior_registers),
5571 (regsets_store_inferior_registers): Removed cast to int from
5572 ptrace() calls.
5573 * regcache.h: Added declaration of struct inferior_info.
5574
55752002-04-20 Daniel Jacobowitz <drow@mvista.com>
5576
5577 * inferiors.c (struct inferior_info): Add regcache_data.
5578 (add_inferior): Call create_register_cache.
5579 (clear_inferiors): Call free_register_cache.
5580 (inferior_regcache_data, set_inferior_regcache_data): New functions.
5581 * regcache.c (struct inferior_regcache_data): New.
5582 (registers): Remove.
5583 (get_regcache): New function.
5584 (create_register_cache, free_register_cache): New functions.
5585 (set_register_cache): Don't initialize the register cache here.
5586 (registers_to_string, registers_from_string, register_data): Call
5587 get_regcache.
5588 * regcache.h: Add prototypes.
5589 * server.h: Likewise.
5590
55912002-04-20 Daniel Jacobowitz <drow@mvista.com>
5592
5593 * mem-break.c: New file.
5594 * mem-break.h: New file.
5595 * Makefile.in: Add mem-break.o rule; update server.h
5596 dependencies.
5597 * inferiors.c (struct inferior_info): Add target_data
5598 member.
5599 (clear_inferiors): Free target_data member if set.
5600 (inferior_target_data, set_inferior_target_data): New functions.
5601 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
5602 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
5603 * linux-low.c (linux_bp_reinsert): New variable.
5604 (struct inferior_linux_data): New.
5605 (linux_create_inferior): Use set_inferior_target_data.
5606 (linux_attach): Likewise. Call add_inferior.
5607 (linux_wait_for_one_inferior): New function.
5608 (linux_wait): Call it.
5609 (linux_write_memory): Add const.
5610 (initialize_low): Call set_breakpoint_data.
5611 * linux-low.h (struct linux_target_ops): Add breakpoint
5612 handling members.
5613 * server.c (attach_inferior): Remove extra add_inferior
5614 call.
5615 * server.h: Include mem-break.h. Update inferior.c
5616 prototypes.
5617 * target.c (read_inferior_memory)
5618 (write_inferior_memory): New functions.
5619 * target.h (read_inferior_memory)
5620 (write_inferior_memory): Change macros to prototypes.
5621 (struct target_ops): Update comments. Add const to write_memory
5622 definition.
5623
56242002-04-11 Daniel Jacobowitz <drow@mvista.com>
5625
5626 * linux-low.c (usr_store_inferior_registers): Support
5627 registers which are allowed to fail to store.
5628 * linux-low.h (linux_target_ops): Likewise.
5629 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
5630 (ppc_cannot_store_register): FPSCR may not be storable.
5631
56322002-04-09 Daniel Jacobowitz <drow@mvista.com>
5633
5634 * server.h: Include <string.h> if HAVE_STRING_H.
5635 * ChangeLog: Correct paths in last ChangeLog entry.
5636
56372002-04-09 Daniel Jacobowitz <drow@mvista.com>
5638
5639 * linux-low.h: Remove obsolete prototypes.
5640 (struct linux_target_ops): New.
5641 (extern the_low_target): New.
5642 * linux-low.c (num_regs, regmap): Remove declarations.
5643 (register_addr): Use the_low_target explicitly.
5644 (fetch_register): Likewise.
5645 (usr_fetch_inferior_registers): Likewise.
5646 (usr_store_inferior_registers): Likewise.
5647 * linux-arm-low.c (num_regs): Remove.
5648 (arm_num_regs): Define.
5649 (arm_regmap): Renamed from regmap, made static.
5650 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
5651 made static.
5652 (arm_cannot_store_register): Renamed from cannot_store_register,
5653 made static.
5654 (the_low_target): New.
5655 * linux-i386-low.c (num_regs): Remove.
5656 (i386_num_regs): Define.
5657 (i386_regmap): Renamed from regmap, made static.
5658 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
5659 made static.
5660 (i386_cannot_store_register): Renamed from cannot_store_register,
5661 made static.
5662 (the_low_target): New.
5663 * linux-ia64-low.c (num_regs): Remove.
5664 (ia64_num_regs): Define.
5665 (ia64_regmap): Renamed from regmap, made static.
5666 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
5667 made static.
5668 (ia64_cannot_store_register): Renamed from cannot_store_register,
5669 made static.
5670 (the_low_target): New.
5671 * linux-m68k-low.c (num_regs): Remove.
5672 (m68k_num_regs): Define.
5673 (m68k_regmap): Renamed from regmap, made static.
5674 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
5675 made static.
5676 (m68k_cannot_store_register): Renamed from cannot_store_register,
5677 made static.
5678 (the_low_target): New.
5679 * linux-mips-low.c (num_regs): Remove.
5680 (mips_num_regs): Define.
5681 (mips_regmap): Renamed from regmap, made static.
5682 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
5683 made static.
5684 (mips_cannot_store_register): Renamed from cannot_store_register,
5685 made static.
5686 (the_low_target): New.
5687 * linux-ppc-low.c (num_regs): Remove.
5688 (ppc_num_regs): Define.
5689 (ppc_regmap): Renamed from regmap, made static.
5690 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
5691 made static.
5692 (ppc_cannot_store_register): Renamed from cannot_store_register,
5693 made static.
5694 (the_low_target): New.
5695 * linux-s390-low.c (num_regs): Remove.
5696 (s390_num_regs): Define.
5697 (s390_regmap): Renamed from regmap, made static.
5698 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
5699 made static.
5700 (s390_cannot_store_register): Renamed from cannot_store_register,
5701 made static.
5702 (the_low_target): New.
5703 * linux-sh-low.c (num_regs): Remove.
5704 (sh_num_regs): Define.
5705 (sh_regmap): Renamed from regmap, made static.
5706 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
5707 made static.
5708 (sh_cannot_store_register): Renamed from cannot_store_register,
5709 made static.
5710 (the_low_target): New.
5711 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
5712 (the_low_target): New.
5713
57142002-04-09 Daniel Jacobowitz <drow@mvista.com>
5715
5716 * Makefile.in: Add stamp-h target.
5717 * configure.in: Create stamp-h.
5718 * configure: Regenerated.
5719
57202002-04-09 Daniel Jacobowitz <drow@mvista.com>
5721
5722 * inferiors.c: New file.
5723 * target.c: New file.
5724 * target.h: New file.
5725 * Makefile.in: Add target.o and inferiors.o. Update
5726 dependencies.
5727 * linux-low.c (inferior_pid): New static variable,
5728 moved from server.c.
5729 (linux_create_inferior): Renamed from create_inferior.
5730 Call add_inferior. Return 0 on success instead of a PID.
5731 (linux_attach): Renamed from myattach.
5732 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
5733 (linux_thread_alive): Renamed from mythread_alive.
5734 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
5735 child dies.
5736 (linux_resume): Renamed from myresume. Add missing ``return 0''.
5737 (regsets_store_inferior_registers): Correct error message.
5738 Add missing ``return 0''.
5739 (linux_fetch_registers): Renamed from fetch_inferior_registers.
5740 (linux_store_registers): Renamed from store_inferior_registers.
5741 (linux_read_memory): Renamed from read_inferior_memory.
5742 (linux_write_memory): Renamed from write_inferior_memory.
5743 (linux_target_ops): New structure.
5744 (initialize_low): Call set_target_ops ().
5745 * remote-utils.c (unhexify): New function.
5746 (hexify): New function.
5747 (input_interrupt): Send signals to ``signal_pid''.
5748 * server.c (inferior_pid): Remove.
5749 (start_inferior): Update create_inferior call.
5750 (attach_inferior): Call add_inferior.
5751 (handle_query): New function.
5752 (main): Call handle_query for `q' packets.
5753 * server.h: Include "target.h". Remove obsolete prototypes.
5754 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
5755
57562002-04-09 Daniel Jacobowitz <drow@mvista.com>
5757
5758 * Makefile.in: Add WARN_CFLAGS. Update configury
5759 dependencies.
5760 * configure.in: Check for <string.h>
5761 * configure: Regenerate.
5762 * config.in: Regenerate.
5763 * gdbreplay.c: Include needed system headers.
5764 (remote_open): Remove strchr prototype.
5765 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
5766 * regcache.c (supply_register): Change buf argument to const void *.
5767 (supply_register_by_name): Likewise.
5768 (collect_register): Change buf argument to void *.
5769 (collect_register_by_name): Likewise.
5770 * regcache.h: Add missing prototypes.
5771 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
5772 * server.c (handle_query): New function.
5773 (attached): New static variable, moved out of main.
5774 (main): Quiet longjmp clobber warnings.
5775 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
5776 * utils.c (error): Remove NORETURN.
5777 (fatal): Likewise.