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