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