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