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