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