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