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