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