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