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