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