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