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