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