fix gdbserver/linux-low'c's pending status handling
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
1 2015-02-20 Pedro Alves <palves@redhat.com>
2
3 * linux-low.c (status_pending_p_callback): Use ptid_match.
4
5 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
6
7 PR breakpoints/16812
8 * linux-low.c (wstatus_maybe_breakpoint): Remove.
9 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
10 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
11
12 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
13
14 PR breakpoints/15956
15 * tracepoint.c (cmd_qtinit): Add check for current_thread.
16
17 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
18
19 * linux-low.c (linux_low_btrace_conf): Print size.
20 * server.c (handle_btrace_conf_general_set): New.
21 (hanle_general_set): Call handle_btrace_conf_general_set.
22 (handle_query): Report Qbtrace-conf:bts:size as supported.
23
24 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
25
26 * linux-low.c (linux_low_enable_btrace): Update parameters.
27 (linux_low_btrace_conf): New.
28 (linux_target_ops)<to_btrace_conf>: Initialize.
29 * server.c (current_btrace_conf): New.
30 (handle_btrace_enable): Rename to ...
31 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
32 to target_enable_btrace. Update comment. Update users.
33 (handle_qxfer_btrace_conf): New.
34 (qxfer_packets): Add btrace-conf entry.
35 (handle_query): Report qXfer:btrace-conf:read as supported packet.
36 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
37 (target_ops)<read_btrace_conf>: New.
38 (target_enable_btrace): Update parameters.
39 (target_read_btrace_conf): New.
40
41 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
42
43 * server.c (handle_btrace_general_set): Remove call to
44 target_supports_btrace.
45 (supported_btrace_packets): New.
46 (handle_query): Call supported_btrace_packets.
47 * target.h: include btrace-common.h.
48 (btrace_target_info): Removed.
49 (supports_btrace, target_supports_btrace): Update parameters.
50
51 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
52
53 * Makefile.in (SFILES): Add common/btrace-common.c.
54 (OBS): Add common/btrace-common.o.
55 (btrace-common.o): Add build rules.
56 * linux-low: Include btrace-common.h.
57 (linux_low_read_btrace): Use struct btrace_data. Call
58 btrace_data_init and btrace_data_fini.
59
60 2015-02-06 Pedro Alves <palves@redhat.com>
61
62 * thread-db.c (find_new_threads_callback): Add debug output.
63
64 2015-02-04 Pedro Alves <palves@redhat.com>
65
66 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
67 (resume_stopped_resumed_lwps): New function.
68 (linux_wait_for_event_filtered): Use it.
69
70 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
71
72 * Makefile.in (SFILES): Add linux-personality.c.
73 (linux-personality.o): New rule.
74 * configure.srv (srv_linux_obj): Add linux-personality.o to the
75 list of objects to be built.
76 * linux-low.c: Include nat/linux-personality.h.
77 (linux_create_inferior): Remove code to disable address space
78 randomization (moved to ../nat/linux-personality.c). Create
79 cleanup to disable address space randomization.
80
81 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
82
83 * Makefile.in (posix-strerror.o): New rule.
84 (mingw-strerror.o): Likewise.
85 * configure: Regenerated.
86 * configure.ac: Source file ../common/common.host. Initialize new
87 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
88
89 2015-01-14 Yao Qi <yao@codesourcery.com>
90
91 * Makefile.in (SFILES): Add nat/ppc-linux.c.
92 (ppc-linux.o): New rule.
93 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
94 * configure.ac: AC_CHECK_FUNCS(getauxval).
95 * config.in: Re-generated.
96 * configure: Re-generated.
97 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
98 ppc64_64bit_inferior_p
99
100 2015-01-14 Yao Qi <yao@codesourcery.com>
101
102 * linux-ppc-low.c: Include "nat/ppc-linux.h".
103 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
104 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
105 (PT_ORIG_R3, PT_TRAP): Likewise.
106 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
107 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
108 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
109
110 2015-01-10 Joel Brobecker <brobecker@adacore.com>
111
112 * i387-fp.c (i387_cache_to_xsave): In look over
113 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
114 zmmh_low_space field by use of zmmh_high_space.
115
116 2015-01-09 Pedro Alves <palves@redhat.com>
117
118 * linux-low.c (step_over_bkpt): Move higher up in the file.
119 (handle_extended_wait): Don't store the stop_pc here.
120 (get_stop_pc): Adjust comments and rename to ...
121 (check_stopped_by_breakpoint): ... this. Record whether the LWP
122 stopped for a software breakpoint or hardware breakpoint.
123 (thread_still_has_status_pending_p): New function.
124 (status_pending_p_callback): Use
125 thread_still_has_status_pending_p. If the event is no longer
126 interesting, resume the LWP.
127 (handle_tracepoints): Add assert.
128 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
129 (wstatus_maybe_breakpoint): New function.
130 (cancel_breakpoint): Delete function.
131 (check_stopped_by_watchpoint): New function, factored out from
132 linux_low_filter_event.
133 (lp_status_maybe_breakpoint): Delete function.
134 (linux_low_filter_event): Remove filter_ptid argument.
135 Leave thread group exits pending here. Store the LWP's stop PC.
136 Always leave events pending.
137 (linux_wait_for_event_filtered): Pull all events out of the
138 kernel, and leave them all pending.
139 (count_events_callback, select_event_lwp_callback): Consider all
140 events.
141 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
142 (select_event_lwp): Only give preference to the stepping LWP in
143 all-stop mode. Adjust comments.
144 (ignore_event): New function.
145 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
146 references to cancel_breakpoints. Adjust to renames. Also give
147 equal priority to all LWPs that have had events in non-stop mode.
148 If reporting a software breakpoint event, unadjust the LWP's PC.
149 (linux_wait): If linux_wait_1 returned an ignored event, retry.
150 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
151 Adjust.
152 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
153 (resume_status_pending_p): Use thread_still_has_status_pending_p.
154 (linux_stopped_by_watchpoint): Adjust.
155 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
156 * linux-low.h (enum lwp_stop_reason): New.
157 (struct lwp_info) <stop_pc>: Adjust comment.
158 <stopped_by_watchpoint>: Delete field.
159 <stop_reason>: New field.
160 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
161 * mem-break.c (software_breakpoint_inserted_here)
162 (hardware_breakpoint_inserted_here): New function.
163 * mem-break.h (software_breakpoint_inserted_here)
164 (hardware_breakpoint_inserted_here): Declare.
165 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
166 (cancel_breakpoints): Delete.
167 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
168 (upload_fast_traceframes): Remove references to
169 cancel_breakpoints.
170
171 2015-01-09 Pedro Alves <palves@redhat.com>
172
173 * thread-db.c (find_new_threads_callback): Ignore thread if the
174 kernel thread ID is -1.
175
176 2015-01-09 Pedro Alves <palves@redhat.com>
177
178 * linux-low.c (linux_attach_fail_reason_string): Move to
179 nat/linux-ptrace.c, and rename.
180 (linux_attach_lwp): Update comment.
181 (attach_proc_task_lwp_callback): New function.
182 (linux_attach): Adjust to rename and use
183 linux_proc_attach_tgid_threads.
184 (linux_attach_fail_reason_string): Delete declaration.
185
186 2015-01-01 Joel Brobecker <brobecker@adacore.com>
187
188 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
189 * server.c (gdbserver_version): Likewise.
190
191 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
192
193 * remote-utils.c: Include ctype.h.
194 (input_interrupt): Explicitly handle the case when the char
195 received is the NUL byte. Improve the printing of non-ASCII
196 characters.
197
198 2014-12-16 Joel Brobecker <brobecker@adacore.com>
199
200 * linux-low.c (linux_low_filter_event): Update call to
201 linux_enable_event_reporting following the addition of
202 a new parameter to that function.
203
204 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
205
206 PR server/17457
207 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
208 (AARCH64_FPCR_REGNO): Likewise.
209 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
210 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
211 (aarch64_store_fpregset): Likewise.
212
213 2014-12-15 Joel Brobecker <brobecker@adacore.com>
214
215 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
216 Remove FIXME comment about assumption about N.
217
218 2014-12-13 Joel Brobecker <brobecker@adacore.com>
219
220 * configure.ac: If large-file support is disabled in GDBserver,
221 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
222 * configure: Regenerate.
223
224 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
225
226 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
227 warning upon ENODATA from ptrace.
228 * linux-s390-low.c (s390_store_tdb): New.
229 (s390_regsets): Add regset for NT_S390_TDB.
230
231 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
232
233 * linux-low.c (regsets_store_inferior_registers): Skip regsets
234 without a fill_function.
235 * linux-s390-low.c (s390_fill_last_break): Remove.
236 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
237 (s390_arch_setup): Use regset's size instead of fill_function for
238 loop end condition.
239
240 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
241
242 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
243 the regset's store function when ptrace returned an error.
244 * regcache.c (get_thread_regcache): Invalidate register cache
245 before fetching inferior's registers.
246
247 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
248
249 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
250 while-loop as for-loop.
251 (regsets_store_inferior_registers): Likewise.
252
253 2014-11-28 Yao Qi <yao@codesourcery.com>
254
255 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
256 * config.in, configure: Re-generate.
257 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
258 is defined.
259
260 2014-11-21 Yao Qi <yao@codesourcery.com>
261
262 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
263 (AC_CHECK_HEADERS): Remove malloc.h.
264 * configure: Re-generated.
265 * config.in: Re-generated.
266 * server.h: Don't include alloca.h and malloc.h.
267 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
268 Don't include malloc.h.
269
270 2014-11-17 Joel Brobecker <brobecker@adacore.com>
271
272 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
273 corresponding ERRNO check in same block.
274
275 2014-11-12 Pedro Alves <palves@redhat.com>
276
277 * server.c (cont_thread): Update comment.
278 (start_inferior, attach_inferior): No longer clear cont_thread.
279 (handle_v_cont): No longer set cont_thread.
280 (captured_main): Clear cont_thread each time a GDB connects.
281
282 2014-11-12 Pedro Alves <palves@redhat.com>
283
284 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
285 thread, and don't resume all threads if the Hc thread has exited.
286
287 2014-11-12 Pedro Alves <palves@redhat.com>
288
289 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
290 the process group instead of to a specific LWP.
291
292 2014-10-15 Pedro Alves <palves@redhat.com>
293
294 PR server/17487
295 * win32-arm-low.c (arm_set_thread_context): Remove current_event
296 parameter.
297 (arm_set_thread_context): Delete.
298 (the_low_target): Adjust.
299 * win32-i386-low.c (debug_registers_changed)
300 (debug_registers_used): Delete.
301 (update_debug_registers_callback): New function.
302 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
303 needing to update their debug registers.
304 (win32_get_current_dr): New function.
305 (x86_dr_low_get_addr, x86_dr_low_get_control)
306 (x86_dr_low_get_status): Fetch the debug register from the thread
307 record's context.
308 (i386_initial_stuff): Adjust.
309 (i386_get_thread_context): Remove current_event parameter. Don't
310 clear debug_registers_changed nor copy DR values to
311 debug_reg_state.
312 (i386_set_thread_context): Delete.
313 (i386_prepare_to_resume): New function.
314 (i386_thread_added): Mark the thread as needing to update irs
315 debug registers.
316 (the_low_target): Remove i386_set_thread_context and install
317 i386_prepare_to_resume.
318 * win32-low.c (win32_get_thread_context): Adjust.
319 (win32_set_thread_context): Use SetThreadContext
320 directly.
321 (win32_prepare_to_resume): New function.
322 (win32_require_context): New function, factored out from ...
323 (thread_rec): ... this.
324 (continue_one_thread): Call win32_prepare_to_resume on each thread
325 we're about to continue.
326 (win32_resume): Call win32_prepare_to_resume on the event thread.
327 * win32-low.h (struct win32_thread_info)
328 <debug_registers_changed>: New field.
329 (struct win32_target_ops): Change prototype of set_thread_context,
330 delete set_thread_context and add prepare_to_resume.
331 (win32_require_context): New declaration.
332
333 2014-10-08 Gary Benson <gbenson@redhat.com>
334
335 * server.h: Do not include common-exceptions.h.
336
337 2014-10-08 Gary Benson <gbenson@redhat.com>
338
339 * server.h: Do not include cleanups.h.
340
341 2014-09-30 James Hogan <james.hogan@imgtec.com>
342
343 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
344 mips64-dsp-linux.c.
345
346 2014-09-23 Yao Qi <yao@codesourcery.com>
347
348 * linux-low.c (lp_status_maybe_breakpoint): New function.
349 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
350 (count_events_callback): Likewise.
351 (select_event_lwp_callback): Likewise.
352 (cancel_breakpoints_callback): Likewise.
353
354 2014-09-19 Don Breazeal <donb@codesourcery.com>
355
356 * linux-low.c (handle_extended_wait): Call
357 linux_ptrace_get_extended_event.
358 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
359 linux_is_extended_waitstatus.
360
361 2014-09-16 Joel Brobecker <brobecker@adacore.com>
362
363 * Makefile.in (CPPFLAGS): Define.
364 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
365 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
366
367 2014-09-16 Gary Benson <gbenson@redhat.com>
368
369 * inferiors.h (current_inferior): Renamed as...
370 (current_thread): New variable. All uses updated.
371 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
372 (maybe_move_out_of_jump_pad): Likewise.
373 (cancel_breakpoint): Likewise.
374 (linux_low_filter_event): Likewise.
375 (wait_for_sigstop): Likewise.
376 (linux_resume_one_lwp): Likewise.
377 (need_step_over_p): Likewise.
378 (start_step_over): Likewise.
379 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
380 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
381 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
382 and save_inferior as saved_thread.
383 * regcache.c (get_thread_regcache): Renamed saved_inferior as
384 saved_thread.
385 (regcache_invalidate_thread): Likewise.
386 * remote-utils.c (prepare_resume_reply): Likewise.
387 * thread-db.c (thread_db_get_tls_address): Likewise.
388 (disable_thread_event_reporting): Likewise.
389 (remove_thread_event_breakpoints): Likewise.
390 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
391 as saved_thread.
392 * target.h (set_desired_inferior): Renamed as...
393 (set_desired_thread): New declaration. All uses updated.
394 * server.c (myresume): Updated comment to reference thread instead
395 of inferior.
396 (handle_serial_event): Likewise.
397 (handle_target_event): Likewise.
398
399 2014-09-12 Tom Tromey <tromey@redhat.com>
400 Gary Benson <gbenson@redhat.com>
401
402 * regcache.h: Include common-regcache.h.
403 (regcache_read_pc): Don't declare.
404 * regcache.c (get_thread_regcache_for_ptid): New function.
405
406 2014-09-11 Tom Tromey <tromey@redhat.com>
407 Gary Benson <gbenson@redhat.com>
408
409 * symbol.c: New file.
410 * Makefile.in (SFILES): Add symbol.c.
411 (OBS): Add symbol.o.
412
413 2014-09-11 Gary Benson <gbenson@redhat.com>
414
415 * target.c (target_stop_ptid, target_continue_ptid): New
416 functions.
417
418 2014-09-11 Tom Tromey <tromey@redhat.com>
419 Gary Benson <gbenson@redhat.com>
420
421 * target.h: Include target/target.h.
422 * target.c (target_read_memory, target_read_uint32)
423 (target_write_memory): New functions.
424
425 2014-09-11 Gary Benson <gbenson@redhat.com>
426
427 * server.h (debug_hw_points): Don't declare.
428 * server.c (debug_hw_points): Don't define. Replace all uses
429 with show_debug_regs.
430 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
431 all uses with show_debug_regs.
432
433 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
434
435 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
436 endianness into account.
437 (ppc_supply_ptrace_register): Likewise.
438
439 2014-09-03 James Hogan <james.hogan@imgtec.com>
440
441 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
442 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
443
444 2014-09-03 Gary Benson <gbenson@redhat.com>
445
446 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
447 ALL_DEBUG_ADDRESS_REGISTERS.
448
449 2014-09-02 Gary Benson <gbenson@redhat.com>
450
451 * i386-low.h: Renamed as...
452 * x86-low.h: New file. All type, function and variable name
453 prefixes changed from "i386_" to "x86_". All references updated.
454 * i386-low.c: Renamed as...
455 * x86-low.c: New file. All type, function and variable name
456 prefixes changed from "i386_" to "x86_". All references updated.
457
458 2014-09-02 Gary Benson <gbenson@redhat.com>
459
460 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
461 (x86_linux_new_thread): Likewise.
462
463 2014-08-29 Gary Benson <gbenson@redhat.com>
464
465 * server.h (setjmp.h): Do not include.
466 (toplevel): Do not declare.
467 (common-exceptions.h): Include.
468 (cleanups.h): Likewise.
469 * server.c (toplevel): Do not define.
470 (exit_code): New static global.
471 (detach_or_kill_for_exit_cleanup): New function.
472 (main): New function. Original main renamed to...
473 (captured_main): New function.
474 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
475
476 2014-08-29 Gary Benson <gbenson@redhat.com>
477
478 * Makefile.in (SFILES): Add common/common-exceptions.c.
479 (OBS): Add common-exceptions.o.
480 (common-exceptions.o): New rule.
481 * utils.c (prepare_to_throw_exception): New function.
482
483 2014-08-29 Gary Benson <gbenson@redhat.com>
484
485 * config.in: Regenerate.
486 * configure: Likewise.
487
488 2014-08-29 Gary Benson <gbenson@redhat.com>
489
490 * Makefile.in (SFILES): Add common/cleanups.c.
491 (OBS): cleanups.o.
492 (cleanups.o): New rule.
493
494 2014-08-29 Gary Benson <gbenson@redhat.com>
495
496 * utils.c (internal_vwarning): New function.
497
498 2014-08-28 Gary Benson <gbenson@redhat.com>
499
500 * utils.h (fatal): Remove declaration.
501 * utils.c (fatal): Remove function.
502
503 2014-08-28 Gary Benson <gbenson@redhat.com>
504
505 * tracepoint.c (gdb_agent_init): Replace fatal with
506 perror_with_name.
507 (initialize_tracepoint): Likewise.
508
509 2014-08-28 Gary Benson <gbenson@redhat.com>
510
511 * remote-utils.c (remote_prepare): Replace fatal with error.
512
513 2014-08-28 Gary Benson <gbenson@redhat.com>
514
515 * linux-low.c (linux_async): Replace fatal with warning.
516 Tidy up and return.
517 (linux_start_non_stop): Return -1 if linux_async failed.
518
519 2014-08-28 Gary Benson <gbenson@redhat.com>
520
521 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
522 gdb_assert.
523 (i386_dr_low_get_addr): Remove vague comment.
524 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
525 gdb_assert.
526
527 2014-08-28 Gary Benson <gbenson@redhat.com>
528
529 * inferiors.c (get_thread_process): Replace check with gdb_assert.
530 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
531 internal_error.
532 (linux_resume_one_lwp): Likewise.
533 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
534 gdb_assert.
535 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
536 with internal_error.
537 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
538 (init_register_cache): Replace fatal with gdb_assert_not_reached.
539 (find_register_by_name): Replace fatal with internal_error.
540 (find_regno): Likewise.
541 * tdesc.c (init_target_desc): Replace check with gdb_assert.
542 * thread-db.c (thread_db_create_event): Likewise.
543 (thread_db_load_search): Likewise.
544 (try_thread_db_load_1): Likewise.
545 * tracepoint.c (get_jump_space_head): Replace fatal with
546 internal_error.
547 (claim_trampoline_space): Likewise.
548 (have_fast_tracepoint_trampoline_buffer): Likewise.
549 (cmd_qtstart): Likewise.
550 (stop_tracing): Likewise.
551 (fast_tracepoint_collecting): Likewise.
552 (target_malloc): Likewise.
553 (download_tracepoint): Likewise.
554 (download_trace_state_variables): Replace check with gdb_assert.
555 (upload_fast_traceframes): Replace fatal with internal_error.
556
557 2014-08-19 Tom Tromey <tromey@redhat.com>
558 Gary Benson <gbenson@redhat.com>
559
560 * Makefile.in (SFILES): Add common/common-debug.c.
561 (OBS): Add common-debug.o.
562 (common-debug.o): New rule.
563 * debug.h (debug_printf): Don't declare.
564 * debug.c (debug_printf): Renamed and rewritten as...
565 (debug_vprintf): New function.
566
567 2014-08-19 Gary Benson <gbenson@redhat.com>
568
569 * utils.h: Do not include print-utils.h.
570
571 2014-08-19 Tom Tromey <tromey@redhat.com>
572 Gary Benson <gbenson@redhat.com>
573
574 * server.h: Add static assertion.
575 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
576
577 2014-08-19 Tom Tromey <tromey@redhat.com>
578 Gary Benson <gbenson@redhat.com>
579
580 * Makefile.in (SFILES): Add common/errors.c.
581 (OBS): Add errors.o.
582 (IPA_OBS): Add errors-ipa.o.
583 (errors.o): New rule.
584 (errors-ipa.o): Likewise.
585 * utils.h (perror_with_name, error, warning): Don't declare.
586 * utils.c (warning): Renamed and rewritten as...
587 (vwarning): New function.
588 (error): Renamed and rewritten as...
589 (verror): New function.
590 (internal_error): Renamed and rewritten as...
591 (internal_verror): New function.
592
593 2014-08-07 Gary Benson <gbenson@redhat.com>
594
595 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
596 * configure: Regenerate.
597 * config.in: Likewise.
598 * server.h: Do not include errno.h.
599 * event-loop.c: Likewise.
600 * hostio-errno.c: Likewise.
601 * linux-low.c: Likewise.
602 * remote-utils.c: Likewise.
603 * spu-low.c: Likewise.
604 * utils.c: Likewise.
605 * gdbreplay.c: Unconditionally include errno.h.
606
607 2014-08-07 Gary Benson <gbenson@redhat.com>
608
609 * server.h: Do not include string.h.
610 * event-loop.c: Likewise.
611 * linux-low.c: Likewise.
612 * regcache.c: Likewise.
613 * remote-utils.c: Likewise.
614 * spu-low.c: Likewise.
615 * utils.c: Likewise.
616
617 2014-08-07 Gary Benson <gbenson@redhat.com>
618
619 * server.h: Do not include gdb_assert.h.
620
621 2014-08-07 Gary Benson <gbenson@redhat.com>
622
623 * server.h: Do not include common-utils.h.
624
625 2014-08-07 Gary Benson <gbenson@redhat.com>
626
627 * server.h: Do not include ptid.h.
628 * notif.h: Likewise.
629
630 2014-08-07 Gary Benson <gbenson@redhat.com>
631
632 * server.h: Do not include gdb_locale.h.
633
634 2014-08-07 Gary Benson <gbenson@redhat.com>
635
636 * server.h: Do not include gdb/signals.h.
637 * win32-low.c: Likewise.
638
639 2014-08-07 Gary Benson <gbenson@redhat.com>
640
641 * server.h: Do not include pathmax.h.
642
643 2014-08-07 Gary Benson <gbenson@redhat.com>
644
645 * server.h: Do not include libiberty.h.
646 * linux-bfin-low.c: Likewise.
647
648 2014-08-07 Gary Benson <gbenson@redhat.com>
649
650 * server.h: Do not include ansidecl.h.
651
652 2014-08-07 Gary Benson <gbenson@redhat.com>
653
654 * linux-x86-low.c: Do not include stddef.h.
655 * lynx-ppc-low.c: Likewise.
656 * tracepoint.c: Likewise.
657
658 2014-08-07 Gary Benson <gbenson@redhat.com>
659
660 * server.h: Do not include stdarg.h.
661 * nto-low.c: Likewise.
662
663 2014-08-07 Gary Benson <gbenson@redhat.com>
664
665 * server.h: Do not include stdlib.h.
666 * inferiors.c: Likewise.
667 * linux-low.c: Likewise.
668 * regcache.c: Likewise.
669 * spu-low.c: Likewise.
670 * tracepoint.c: Likewise.
671 * utils.c: Likewise.
672
673 2014-08-07 Gary Benson <gbenson@redhat.com>
674
675 * server.h: Do not include stdio.h.
676 * linux-low.c: Likewise.
677 * remote-utils.c: Likewise.
678 * spu-low.c: Likewise.
679 * utils.c: Likewise.
680 * wincecompat.c: Likewise.
681
682 2014-08-06 Gary Benson <gbenson@redhat.com>
683
684 * regcache.c (init_register_cache): Move conditionals inside if.
685
686 2014-08-06 Gary Benson <gbenson@redhat.com>
687
688 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
689
690 2014-07-31 Gary Benson <gbenson@redhat.com>
691
692 * ax.h: Do not include server.h.
693 * gdbthread.h: Likewise.
694 * lynx-low.h: Likewise.
695 * notif.h: Likewise.
696
697 2014-07-30 Gary Benson <gbenson@redhat.com>
698
699 * server.h: Include common-defs.h.
700 Do not include config.h or build-gnulib-gdbserver/config.h.
701
702 2014-07-30 Gary Benson <gbenson@redhat.com>
703
704 * hostio-errno.c: Move server.h to top of includes list.
705 * inferiors.c: Likewise.
706 * linux-x86-low.c: Likewise.
707 * notif.c: Include server.h.
708
709 2014-07-24 Tom Tromey <tromey@redhat.com>
710 Gary Benson <gbenson@redhat.com>
711
712 * server.h (CORE_ADDR): Now unsigned.
713
714 2014-07-16 Pedro Alves <palves@redhat.com>
715
716 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
717
718 2014-07-15 Pedro Alves <palves@redhat.com>
719
720 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
721 copy.
722
723 2014-07-11 Pedro Alves <palves@redhat.com>
724
725 * linux-low.c (kill_wait_lwp): New function, based on
726 kill_one_lwp_callback, but use my_waitpid directly.
727 (kill_one_lwp_callback, linux_kill): Use it.
728
729 2014-06-23 Pedro Alves <palves@redhat.com>
730
731 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
732 before setting DR0..DR3.
733
734 2014-06-20 Gary Benson <gbenson@redhat.com>
735
736 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
737 * configure: Regenerated.
738 * config.in: Likewise.
739
740 2014-06-20 Gary Benson <gbenson@redhat.com>
741
742 * Makefile.in (SFILES): Update locations for files moved
743 from common to nat.
744 (object file files): Reordered.
745
746 2014-06-20 Gary Benson <gbenson@redhat.com>
747
748 * i386-low.h (i386_dr_low_can_set_addr): Removed.
749 (i386_dr_low_set_addr): Likewise.
750 (i386_dr_low_get_addr): Likewise.
751 (i386_dr_low_can_set_control): Likewise.
752 (i386_dr_low_set_control): Likewise.
753 (i386_dr_low_get_control): Likewise.
754 (i386_dr_low_get_status): Likewise.
755 (i386_get_debug_register_length): Likewise.
756 * linux-x86-low.c (i386_dr_low_set_addr):
757 Changed signature. Made static.
758 (i386_dr_low_get_addr): Likewise.
759 (i386_dr_low_set_control): Likewise.
760 (i386_dr_low_get_control): Likewise.
761 (i386_dr_low_get_status): Likewise.
762 (i386_dr_low): New global variable.
763 * win32-i386-low.c (i386_dr_low_set_addr):
764 Changed signature. Made static.
765 (i386_dr_low_get_addr): Likewise.
766 (i386_dr_low_set_control): Likewise.
767 (i386_dr_low_get_control): Likewise.
768 (i386_dr_low_get_status): Likewise.
769 (i386_dr_low): New global variable.
770
771 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
772
773 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
774 * Makefile.in (AR, AR_FLAGS): Define.
775 * configure: Regenerate.
776
777 2014-06-19 Gary Benson <gbenson@redhat.com>
778
779 * Makefile.in (i386-dregs.o): New rule.
780 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
781 * i386-low.c (target.h): Remove include.
782 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
783 (DR_CONTROL_SHIFT): Likewise.
784 (DR_CONTROL_SIZE): Likewise.
785 (DR_RW_EXECUTE): Likewise.
786 (DR_RW_WRITE): Likewise.
787 (DR_RW_READ): Likewise.
788 (DR_RW_IORW): Likewise.
789 (DR_LEN_1): Likewise.
790 (DR_LEN_2): Likewise.
791 (DR_LEN_4): Likewise.
792 (DR_LEN_8): Likewise.
793 (DR_LOCAL_ENABLE_SHIFT): Likewise.
794 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
795 (DR_ENABLE_SIZE): Likewise.
796 (DR_LOCAL_SLOWDOWN): Likewise.
797 (DR_GLOBAL_SLOWDOWN): Likewise.
798 (DR_CONTROL_RESERVED): Likewise.
799 (I386_DR_CONTROL_MASK): Likewise.
800 (I386_DR_VACANT): Likewise.
801 (I386_DR_LOCAL_ENABLE): Likewise.
802 (I386_DR_GLOBAL_ENABLE): Likewise.
803 (I386_DR_DISABLE): Likewise.
804 (I386_DR_SET_RW_LEN): Likewise.
805 (I386_DR_GET_RW_LEN): Likewise.
806 (I386_DR_WATCH_HIT): Likewise.
807 (i386_wp_op_t): Likewise.
808 (i386_show_dr): Likewise.
809 (i386_length_and_rw_bits): Likewise.
810 (i386_insert_aligned_watchpoint): Likewise.
811 (i386_remove_aligned_watchpoint): Likewise.
812 (i386_handle_nonaligned_watchpoint): Likewise.
813 i386_update_inferior_debug_regs(): Likewise.
814 (i386_dr_insert_watchpoint): Likewise.
815 (i386_dr_remove_watchpoint): Likewise.
816 (i386_dr_region_ok_for_watchpoint): Likewise.
817 (i386_dr_stopped_data_address): Likewise.
818 (i386_dr_stopped_by_watchpoint): Likewise.
819
820 2014-06-19 Gary Benson <gbenson@redhat.com>
821
822 * i386-low.c (i386_dr_show): Renamed to
823 i386_show_dr and made static. All uses updated.
824 (i386_dr_length_and_rw_bits): Renamed to
825 i386_length_and_rw_bits and made static.
826 All uses updated.
827 (i386_dr_insert_aligned_watchpoint): Renamed to
828 i386_insert_aligned_watchpoint and made static.
829 All uses updated.
830 (i386_dr_remove_aligned_watchpoint): Renamed to
831 i386_remove_aligned_watchpoint and made static.
832 All uses updated.
833 (i386_dr_update_inferior_debug_regs): Renamed to
834 i386_update_inferior_debug_regs and made static.
835 All uses updated.
836
837 2014-06-18 Gary Benson <gbenson@redhat.com>
838
839 * i386-low.h (i386_dr_low_can_set_addr): New macro.
840 (i386_dr_low_can_set_control): Likewise.
841 (i386_get_debug_register_length): Likewise.
842 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
843 (i386_dr_low_can_set_control): Likewise.
844 (i386_get_debug_register_length): Likewise.
845
846 2014-06-17 Gary Benson <gbenson@redhat.com>
847
848 * i386-low.h (i386-dregs.h): New include.
849 (DR_FIRSTADDR): Now in i386-dregs.h.
850 (DR_LASTADDR): Likewise.
851 (DR_NADDR): Likewise.
852 (DR_STATUS): Likewise.
853 (DR_CONTROL): Likewise.
854 (i386_debug_reg_state): Likewise.
855 (i386_dr_insert_watchpoint): Likewise.
856 (i386_dr_remove_watchpoint): Likewise.
857 (i386_dr_region_ok_for_watchpoint): Likewise.
858 (i386_dr_stopped_data_address): Likewise.
859 (i386_dr_stopped_by_watchpoint): Likewise.
860 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
861
862 2014-06-18 Gary Benson <gbenson@redhat.com>
863
864 * i386-low.h (i386_low_insert_watchpoint): Renamed to
865 i386_dr_insert_watchpoint.
866 (i386_low_remove_watchpoint): Renamed to
867 i386_dr_remove_watchpoint.
868 (i386_low_region_ok_for_watchpoint): Renamed to
869 i386_dr_region_ok_for_watchpoint.
870 (i386_low_stopped_data_address): Renamed to
871 i386_dr_stopped_data_address.
872 (i386_low_stopped_by_watchpoint): Renamed to
873 i386_dr_stopped_by_watchpoint.
874 * i386-low.c (i386_show_dr): Renamed to
875 i386_dr_show and made nonstatic. All uses updated.
876 (i386_length_and_rw_bits): Renamed to
877 i386_dr_length_and_rw_bits and made nonstatic.
878 All uses updated.
879 (i386_insert_aligned_watchpoint): Renamed to
880 i386_dr_insert_aligned_watchpoint and made nonstatic.
881 All uses updated.
882 (i386_remove_aligned_watchpoint): Renamed to
883 i386_dr_remove_aligned_watchpoint and made nonstatic.
884 All uses updated.
885 (i386_update_inferior_debug_regs): Renamed to
886 i386_dr_update_inferior_debug_regs and made nonstatic.
887 All uses updated.
888 (i386_low_insert_watchpoint): Renamed to
889 i386_dr_insert_watchpoint. All uses updated.
890 (i386_low_remove_watchpoint): Renamed to
891 i386_dr_remove_watchpoint. All uses updated.
892 (i386_low_region_ok_for_watchpoint): Renamed to
893 i386_dr_region_ok_for_watchpoint. All uses updated.
894 (i386_low_stopped_data_address): Renamed to
895 i386_dr_stopped_data_address. All uses updated.
896 (i386_low_stopped_by_watchpoint): Renamed to
897 i386_dr_stopped_by_watchpoint. All uses updated.
898
899 2014-06-18 Gary Benson <gbenson@redhat.com>
900
901 * i386-low.c (i386_dr_low_can_set_addr): New macro.
902 (i386_dr_low_can_set_control): Likewise.
903 (i386_insert_aligned_watchpoint): New check.
904
905 2014-06-18 Gary Benson <gbenson@redhat.com>
906
907 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
908 Renamed to state.
909
910 2014-06-18 Gary Benson <gbenson@redhat.com>
911
912 * i386-low.c (i386_length_and_rw_bits): Use internal_error
913 instead of fatal and error.
914 (i386_handle_nonaligned_watchpoint): Likewise.
915
916 2014-06-18 Gary Benson <gbenson@redhat.com>
917
918 * i386-low.c (i386_get_debug_register_length): New macro.
919 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
920 (i386_show_dr): Use debug_printf instead of fprintf. Use
921 phex to format values.
922
923 2014-06-18 Gary Benson <gbenson@redhat.com>
924
925 * i386-low.h: Comment changes.
926 * i386-low.c: Likewise.
927
928 2014-06-18 Gary Benson <gbenson@redhat.com>
929
930 * i386-low.c: Whitespace changes.
931
932 2014-06-12 Tom Tromey <tromey@redhat.com>
933
934 * utils.c (freeargv): Remove.
935
936 2014-06-12 Tom Tromey <tromey@redhat.com>
937
938 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
939 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
940 (parse_debug_format_options): Likewise.
941 (gdbserver_usage): Likewise.
942 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
943 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
944 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
945 against libiberty.
946 ($(LIBGNU)): Depend on libiberty.
947 (all-lib): Recurse into all subdirs.
948 (install-only): Invoke "install" target in subdirs.
949 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
950 targets.
951 * configure: Rebuild.
952 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
953 for vasprintf, vsnprintf, or gettimeofday.
954 * configure.srv: Don't add safe-ctype.o or lbasename.o to
955 srv_tgtobj.
956
957 2014-06-05 Joel Brobecker <brobecker@adacore.com>
958
959 * development.sh: Delete.
960 * Makefile.in (config.status): Adjust dependency on development.sh.
961 * configure.ac: Adjust development.sh source call.
962 * configure: Regenerate.
963
964 2014-06-02 Pedro Alves <palves@redhat.com>
965
966 * ax.c (gdb_free_agent_expr): New function.
967 * ax.h (gdb_free_agent_expr): New declaration.
968 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
969 list.
970 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
971 static.
972 (clear_breakpoint_conditions_and_commands): New function.
973 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
974 (clear_breakpoint_conditions_and_commands): New declaration.
975
976 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
977
978 * linux-aarch64-low.c (asm/ptrace.h): Include.
979
980 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
981
982 Fix TLS access for -static -pthread.
983 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
984 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
985 (thread_db_load_search, try_thread_db_load_1): Initialize it.
986
987 2014-05-20 Pedro Alves <palves@redhat.com>
988
989 * linux-aarch64-low.c (aarch64_insert_point)
990 (aarch64_remove_point): No longer check whether the type is
991 supported here. Adjust to new interface.
992 (the_low_target): Install aarch64_supports_z_point_type as
993 supports_z_point_type method.
994 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
995 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
996 instead of a Z packet char. Adjust.
997 (arm_supports_z_point_type): New function.
998 (arm_insert_point, arm_remove_point): Adjust to new interface.
999 (the_low_target): Install arm_supports_z_point_type.
1000 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
1001 (cris_insert_point, cris_remove_point): Adjust to new interface.
1002 Don't check whether the type is supported here.
1003 (the_low_target): Install cris_supports_z_point_type.
1004 * linux-low.c (linux_supports_z_point_type): New function.
1005 (linux_insert_point, linux_remove_point): Adjust to new interface.
1006 * linux-low.h (struct linux_target_ops) <insert_point,
1007 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
1008 raw_breakpoint pointer parameter.
1009 <supports_z_point_type>: New method.
1010 * linux-mips-low.c (mips_supports_z_point_type): New function.
1011 (mips_insert_point, mips_remove_point): Adjust to new interface.
1012 Use mips_supports_z_point_type.
1013 (the_low_target): Install mips_supports_z_point_type.
1014 * linux-ppc-low.c (the_low_target): Install NULL as
1015 supports_z_point_type method.
1016 * linux-s390-low.c (the_low_target): Install NULL as
1017 supports_z_point_type method.
1018 * linux-sparc-low.c (the_low_target): Install NULL as
1019 supports_z_point_type method.
1020 * linux-x86-low.c (x86_supports_z_point_type): New function.
1021 (x86_insert_point): Adjust to new insert_point interface. Use
1022 insert_memory_breakpoint. Adjust to new
1023 i386_low_insert_watchpoint interface.
1024 (x86_remove_point): Adjust to remove_point interface. Use
1025 remove_memory_breakpoint. Adjust to new
1026 i386_low_remove_watchpoint interface.
1027 (the_low_target): Install x86_supports_z_point_type.
1028 * lynx-low.c (lynx_target_ops): Install NULL as
1029 supports_z_point_type callback.
1030 * nto-low.c (nto_supports_z_point_type): New.
1031 (nto_insert_point, nto_remove_point): Adjust to new interface.
1032 (nto_target_ops): Install nto_supports_z_point_type.
1033 * mem-break.c: Adjust intro comment.
1034 (struct raw_breakpoint) <raw_type, size>: New fields.
1035 <inserted>: Update comment.
1036 <shlib_disabled>: Delete field.
1037 (enum bkpt_type) <gdb_breakpoint>: Delete value.
1038 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
1039 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
1040 (raw_bkpt_type_to_target_hw_bp_type): New function.
1041 (find_enabled_raw_code_breakpoint_at): New function.
1042 (find_raw_breakpoint_at): New type and size parameters. Use them.
1043 (insert_memory_breakpoint): New function, based off
1044 set_raw_breakpoint_at.
1045 (remove_memory_breakpoint): New function.
1046 (set_raw_breakpoint_at): Reimplement.
1047 (set_breakpoint): New, based on set_breakpoint_at.
1048 (set_breakpoint_at): Reimplement.
1049 (delete_raw_breakpoint): Go through the_target->remove_point
1050 instead of assuming memory breakpoints.
1051 (find_gdb_breakpoint_at): Delete.
1052 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
1053 (find_gdb_breakpoint): New function.
1054 (set_gdb_breakpoint_at): Delete.
1055 (z_type_supported): New function.
1056 (set_gdb_breakpoint_1): New function, loosely based off
1057 set_gdb_breakpoint_at.
1058 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
1059 (delete_gdb_breakpoint_at): Delete.
1060 (delete_gdb_breakpoint_1): New function, loosely based off
1061 delete_gdb_breakpoint_at.
1062 (delete_gdb_breakpoint): New function.
1063 (clear_gdb_breakpoint_conditions): Rename to ...
1064 (clear_breakpoint_conditions): ... this. Don't handle a NULL
1065 breakpoint.
1066 (add_condition_to_breakpoint): Make static.
1067 (add_breakpoint_condition): Take a struct breakpoint pointer
1068 instead of an address. Adjust.
1069 (gdb_condition_true_at_breakpoint): Rename to ...
1070 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
1071 z_type parameter.
1072 (gdb_condition_true_at_breakpoint): Reimplement.
1073 (add_breakpoint_commands): Take a struct breakpoint pointer
1074 instead of an address. Adjust.
1075 (gdb_no_commands_at_breakpoint): Rename to ...
1076 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
1077 parameter. Return true if no breakpoint was found. Change debug
1078 output.
1079 (gdb_no_commands_at_breakpoint): Reimplement.
1080 (run_breakpoint_commands): Rename to ...
1081 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
1082 and change return type to boolean.
1083 (run_breakpoint_commands): New function.
1084 (gdb_breakpoint_here): Also check for Z1 breakpoints.
1085 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
1086 breakpoint. Go through the_target->remove_point instead of
1087 assuming memory breakpoint.
1088 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
1089 software and hardware breakpoints.
1090 (reinsert_raw_breakpoint): Go through the_target->insert_point
1091 instead of assuming memory breakpoint.
1092 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
1093 software and hardware breakpoints.
1094 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
1095 Check both software and hardware breakpoints.
1096 (validate_inserted_breakpoint): Assert the breakpoint is a
1097 software breakpoint. Set the inserted flag to -1 instead of
1098 setting shlib_disabled.
1099 (delete_disabled_breakpoints): Adjust.
1100 (validate_breakpoints): Only validate software breakpoints.
1101 Adjust to inserted flag change.
1102 (check_mem_read, check_mem_write): Skip breakpoint types other
1103 than software breakpoints. Adjust to inserted flag change.
1104 * mem-break.h (enum raw_bkpt_type): New enum.
1105 (raw_breakpoint, struct process_info): Forward declare.
1106 (Z_packet_to_target_hw_bp_type): Delete declaration.
1107 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
1108 (set_gdb_breakpoint, delete_gdb_breakpoint)
1109 (clear_breakpoint_conditions): New declarations.
1110 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
1111 (breakpoint_inserted_here): Update comment.
1112 (add_breakpoint_condition, add_breakpoint_commands): Replace
1113 address parameter with a breakpoint pointer parameter.
1114 (gdb_breakpoint_here): Update comment.
1115 (delete_gdb_breakpoint_at): Delete.
1116 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
1117 * server.c (process_point_options): Take a struct breakpoint
1118 pointer instead of an address. Adjust.
1119 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
1120 delete_gdb_breakpoint.
1121 * spu-low.c (spu_target_ops): Install NULL as
1122 supports_z_point_type method.
1123 * target.h: Include mem-break.h.
1124 (struct target_ops) <prepare_to_access_memory>: Update comment.
1125 <supports_z_point_type>: New field.
1126 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
1127 instead of a char. Also take a raw breakpoint pointer.
1128 * win32-arm-low.c (the_low_target): Install NULL as
1129 supports_z_point_type.
1130 * win32-i386-low.c (i386_supports_z_point_type): New function.
1131 (i386_insert_point, i386_remove_point): Adjust to new interface.
1132 (the_low_target): Install i386_supports_z_point_type.
1133 * win32-low.c (win32_supports_z_point_type): New function.
1134 (win32_insert_point, win32_remove_point): Adjust to new interface.
1135 (win32_target_ops): Install win32_supports_z_point_type.
1136 * win32-low.h (struct win32_target_ops):
1137 <supports_z_point_type>: New method.
1138 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
1139 instead of a char. Also take a raw breakpoint pointer.
1140
1141 2014-05-20 Pedro Alves <palves@redhat.com>
1142
1143 * mem-break.h: Include break-common.h.
1144 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
1145 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
1146 (Z_packet_to_target_hw_bp_type): New declaration.
1147 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
1148 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
1149 (Z_PACKET_ACCESS_WP): Delete macros.
1150 (Z_packet_to_hw_type): Delete function.
1151 * i386-low.h: Don't include break-common.h here.
1152 (Z_packet_to_hw_type): Delete declaration.
1153 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
1154 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
1155 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
1156 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
1157 * linux-aarch64-low.c: Don't include break-common.h here.
1158 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
1159 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
1160 (Z_packet_to_target_hw_bp_type): Delete function.
1161 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
1162 function.
1163 (mips_insert_point, mips_remove_point): Use
1164 Z_packet_to_target_hw_bp_type.
1165
1166 2014-05-20 Pedro Alves <palves@redhat.com>
1167
1168 * linux-aarch64-low.c: Include break-common.h.
1169 (enum target_point_type): Delete.
1170 (Z_packet_to_point_type): Rename to ...
1171 (Z_packet_to_target_hw_bp_type): ... this, and return a
1172 target_hw_bp_type instead.
1173 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
1174 instead of an enum target_point_type.
1175 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
1176 breakpoint type.
1177 (aarch64_dr_state_insert_one_point)
1178 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
1179 (aarch64_handle_aligned_watchpoint)
1180 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
1181 Take an enum target_hw_bp_type instead of an enum
1182 target_point_type.
1183 (aarch64_supports_z_point_type): New function.
1184 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
1185 use Z_packet_to_target_hw_bp_type.
1186
1187 2014-05-20 Joel Brobecker <brobecker@adacore.com>
1188
1189 * configure.ac: Only use -Werror by default when DEVELOPMENT
1190 is true.
1191 * configure: Regenerate.
1192
1193 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
1194
1195 Fix gdbserver qGetTLSAddr for x86_64 -m32.
1196 * linux-x86-low.c (X86_64_USER_REGS): New.
1197 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
1198
1199 2014-04-28 Yao Qi <yao@codesourcery.com>
1200
1201 * Makefile.in (i386-avx512.c): Fix the typo of generated file
1202 name.
1203
1204 2014-04-25 Pedro Alves <palves@redhat.com>
1205
1206 PR server/16255
1207 * linux-low.c (linux_attach_fail_reason_string): New function.
1208 (linux_attach_lwp): Delete.
1209 (linux_attach_lwp_1): Rename to ...
1210 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
1211 argument. Remove "initial" parameter. Return int instead of
1212 void. Don't error or warn here.
1213 (linux_attach): Adjust to call linux_attach_lwp. Call error on
1214 failure to attach to the tgid. Call warning when failing to
1215 attach to an lwp.
1216 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
1217 argument. Remove "initial" parameter. Return int instead of
1218 void. Don't error or warn here.
1219 (linux_attach_fail_reason_string): New declaration.
1220 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
1221 interface change. Use linux_attach_fail_reason_string.
1222
1223 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
1224 Walfred Tedeschi <walfred.tedeschi@intel.com>
1225
1226 * Makefile.in: Added rules to handle new files
1227 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
1228 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
1229 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
1230 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
1231 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
1232 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
1233 x32-avx512-linux.o.
1234 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
1235 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
1236 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
1237 i386/x32-avx512.xml.
1238 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
1239 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
1240 i386/x32-avx512-linux.xml.
1241 * i387-fp.c (num_avx512_k_registers): New constant for number
1242 of K registers.
1243 (num_avx512_zmmh_low_registers): New constant for number of
1244 lower ZMM registers (0-15).
1245 (num_avx512_zmmh_high_registers): New constant for number of
1246 higher ZMM registers (16-31).
1247 (num_avx512_ymmh_registers): New contant for number of higher
1248 YMM registers (ymm16-31 added by avx521 on x86_64).
1249 (num_avx512_xmm_registers): New constant for number of higher
1250 XMM registers (xmm16-31 added by AVX512 on x86_64).
1251 (struct i387_xsave): Add space for AVX512 registers.
1252 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
1253 Add code to handle AVX512 registers.
1254 (i387_xsave_to_cache): Add code to handle AVX512 registers.
1255 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
1256 prototypei from generated file.
1257 (tdesc_amd64_avx512_linux): Likewise.
1258 (init_registers_x32_avx512_linux): Likewise.
1259 (tdesc_x32_avx512_linux): Likewise.
1260 (init_registers_i386_avx512_linux): Likewise.
1261 (tdesc_i386_avx512_linux): Likewise.
1262 (x86_64_regmap): Add AVX512 registers.
1263 (x86_linux_read_description): Add code to handle AVX512 XSTATE
1264 mask.
1265 (initialize_low_arch): Add code to initialize AVX512 registers.
1266
1267 2014-04-23 Pedro Alves <palves@redhat.com>
1268
1269 * mem-break.c (find_gdb_breakpoint_at): Make static.
1270 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
1271
1272 2014-04-23 Pedro Alves <palves@redhat.com>
1273
1274 * i386-low.c: Don't include break-common.h here.
1275 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
1276 prototype to take target_hw_bp_type as argument instead of a Z
1277 packet char.
1278 * i386-low.h: Include break-common.h here.
1279 (Z_packet_to_hw_type): Declare.
1280 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
1281 prototypes.
1282 * linux-x86-low.c (x86_insert_point): Convert the packet number to
1283 a target_hw_bp_type before calling i386_low_insert_watchpoint.
1284 (x86_remove_point): Convert the packet number to a
1285 target_hw_bp_type before calling i386_low_remove_watchpoint.
1286 * win32-i386-low.c (i386_insert_point): Convert the packet number
1287 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
1288 (i386_remove_point): Convert the packet number to a
1289 target_hw_bp_type before calling i386_low_remove_watchpoint.
1290
1291 2014-04-23 Pedro Alves <palves@redhat.com>
1292
1293 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
1294
1295 2014-04-10 Pedro Alves <palves@redhat.com>
1296
1297 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1298 Check if the condition or command is NULL before checking if the
1299 breakpoint is known. On success, return true.
1300 * mem-break.h (add_breakpoint_condition): Document return.
1301 (add_breakpoint_commands): Add describing comment.
1302 * server.c (skip_to_semicolon): New function.
1303 (process_point_options): Use it.
1304
1305 2014-04-09 Pedro Alves <palves@redhat.com>
1306
1307 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
1308 to lwpid_of.
1309
1310 2014-02-27 Pedro Alves <palves@redhat.com>
1311
1312 PR 12702
1313 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
1314 macros.
1315 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
1316 output.
1317 (last_thread_of_process_p): Take a PID argument instead of a
1318 thread pointer.
1319 (linux_wait_for_lwp): Delete.
1320 (num_lwps, check_zombie_leaders, not_stopped_callback): New
1321 functions.
1322 (linux_low_filter_event): New function, party factored out from
1323 linux_wait_for_event.
1324 (linux_wait_for_event): Rename to ...
1325 (linux_wait_for_event_filtered): ... this. Add new filter ptid
1326 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
1327 sigsuspend. Check for zombie leaders.
1328 (linux_wait_for_event): Reimplement as wrapper around
1329 linux_wait_for_event_filtered.
1330 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
1331 a normal or signal exit is seen, it's the whole process exiting.
1332 (wait_for_sigstop): No longer a for_each_inferior callback.
1333 Rewrite on top of linux_wait_for_event_filtered.
1334 (stop_all_lwps): Call wait_for_sigstop directly.
1335 * server.c (resume, handle_target_event): Handle
1336 TARGET_WAITKIND_NO_RESUMED.
1337
1338 2014-02-26 Joel Brobecker <brobecker@adacore.com>
1339
1340 * win32-low.c (psapi_get_dll_name,
1341 * win32_CreateToolhelp32Snapshot): Delete.
1342 (win32_CreateToolhelp32Snapshot, win32_Module32First)
1343 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
1344 Delete.
1345 (handle_load_dll): Add function description.
1346 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
1347
1348 2014-02-26 Joel Brobecker <brobecker@adacore.com>
1349
1350 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
1351 Add comment.
1352 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
1353 base address when calling win32_add_one_solib.
1354 (handle_load_dll): Delete local variable load_addr.
1355 Remove 0x1000 offset applied to DLL base address when calling
1356 win32_add_one_solib.
1357 (handle_unload_dll): Add comment.
1358
1359 2014-02-26 Joel Brobecker <brobecker@adacore.com>
1360
1361 * win32-low.c (win32_add_all_dlls): Renames
1362 win32_ensure_ntdll_loaded. Rewrite function documentation.
1363 Adjust implementation to always load all DLLs.
1364 Add 0x1000 offset to DLL base address when calling
1365 win32_add_one_solib.
1366 (child_initialization_done): New static global.
1367 (do_initial_child_stuff): Set child_initialization_done to
1368 zero during child initialization, and 1 after. Replace call
1369 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
1370 Add comment.
1371 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
1372 (handle_unload_dll): Add function documentation.
1373 (get_child_debug_event): Ignore load and unload DLL events
1374 during child initialization.
1375
1376 2014-02-20 Doug Evans <dje@google.com>
1377
1378 Remove global all_lwps.
1379 * inferiors.h (ptid_of): Move here from linux-low.h.
1380 (pid_of, lwpid_of): Ditto.
1381 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
1382 parameter is a struct thread_info * now.
1383 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
1384 directly. Pass &all_threads to find_inferior instead of &all_lwps.
1385 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
1386 directly.
1387 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
1388 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
1389 * linux-arm-low.c (update_registers_callback): Update, "entry"
1390 parameter is a struct thread_info * now.
1391 Fetch lwpid from current_inferior directly.
1392 (arm_insert_point): Pass &all_threads to find_inferior instead of
1393 &all_lwps.
1394 (arm_remove_point): Ditto.
1395 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
1396 (arm_prepare_to_resume): Fetch pid from thread.
1397 (arm_read_description): Fetch lwpid from current_inferior directly.
1398 * linux-low.c (all_lwps): Delete.
1399 (delete_lwp): Delete call to remove_inferior.
1400 (handle_extended_wait): Fetch lwpid from thread.
1401 (add_lwp): Don't set lwp->entry.id. Remove call to
1402 add_inferior_to_list.
1403 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
1404 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
1405 (kill_one_lwp_callback): Ditto.
1406 (linux_kill): Don't dereference NULL pointer.
1407 Fetch ptid,lwpid from thread.
1408 (get_detach_signal): Fetch ptid from thread.
1409 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
1410 Simplify call to regcache_invalidate_thread.
1411 (delete_lwp_callback): Update, "entry" parameter is a
1412 struct thread_info * now. Fetch pid from thread.
1413 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
1414 (status_pending_p_callback): Update, "entry" parameter is a
1415 struct thread_info * now. Fetch ptid from thread.
1416 (find_lwp_pid): Update, "entry" parameter is a
1417 struct thread_info * now.
1418 (linux_wait_for_lwp): Fetch pid from thread.
1419 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
1420 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
1421 (enqueue_one_deferred_signal): Fetch lwpid from thread.
1422 (dequeue_one_deferred_signal): Ditto.
1423 (cancel_breakpoint): Fetch ptid from current_inferior.
1424 (linux_wait_for_event): Pass &all_threads to find_inferior,
1425 not &all_lwps. Fetch ptid, lwpid from thread.
1426 (count_events_callback): Update, "entry" parameter is a
1427 struct thread_info * now.
1428 (select_singlestep_lwp_callback): Ditto.
1429 (select_event_lwp_callback): Ditto.
1430 (cancel_breakpoints_callback): Ditto.
1431 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
1432 not &all_lwps.
1433 (select_event_lwp): Ditto. Fetch ptid from event_thread.
1434 (unsuspend_one_lwp): Update, "entry" parameter is a
1435 struct thread_info * now.
1436 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
1437 not &all_lwps.
1438 (linux_stabilize_threads): Ditto. And for for_each_inferior.
1439 Fetch lwpid from thread, not lwp.
1440 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
1441 Pass &all_threads to find_inferior, not &all_lwps.
1442 (send_sigstop): Fetch lwpid from thread, not lwp.
1443 (send_sigstop_callback): Update, "entry" parameter is a
1444 struct thread_info * now.
1445 (suspend_and_send_sigstop_callback): Ditto.
1446 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
1447 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
1448 struct thread_info * now.
1449 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
1450 from thread, lwp.
1451 (lwp_running): Update, "entry" parameter is a
1452 struct thread_info * now.
1453 (stop_all_lwps): Fetch ptid from thread.
1454 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
1455 (linux_resume_one_lwp): Fetch lwpid from thread.
1456 (linux_set_resume_request): Update, "entry" parameter is a
1457 struct thread_info * now. Fetch pid, lwpid from thread.
1458 (resume_status_pending_p): Update, "entry" parameter is a
1459 struct thread_info * now.
1460 (need_step_over_p): Ditto. Fetch lwpid from thread.
1461 (start_step_over): Fetch lwpid from thread.
1462 (linux_resume_one_thread): Update, "entry" parameter is a
1463 struct thread_info * now. Fetch lwpid from thread.
1464 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
1465 (proceed_one_lwp): Update, "entry" parameter is a
1466 struct thread_info * now. Fetch lwpid from thread.
1467 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
1468 struct thread_info * now.
1469 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
1470 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
1471 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
1472 directly.
1473 (regsets_store_inferior_registers): Ditto.
1474 (fetch_register, store_register): Ditto.
1475 (linux_read_memory, linux_write_memory): Ditto.
1476 (linux_request_interrupt): Ditto.
1477 (linux_read_auxv): Ditto.
1478 (linux_xfer_siginfo): Ditto.
1479 (linux_qxfer_spu): Ditto.
1480 (linux_qxfer_libraries_svr4): Ditto.
1481 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
1482 moved to inferiors.h.
1483 (get_lwp): Delete.
1484 (get_thread_lwp): Update.
1485 (struct lwp_info): Delete member "entry". Simplify comment for
1486 member "thread".
1487 (all_lwps): Delete.
1488 * linux-mips-low.c (mips_read_description): Fetch lwpid from
1489 current_inferior directly.
1490 (update_watch_registers_callback): Update, "entry" parameter is a
1491 struct thread_info * now. Fetch pid from thread.
1492 (mips_linux_prepare_to_resume): Fetch ptid from thread.
1493 (mips_insert_point): Fetch lwpid from current_inferior.
1494 Pass &all_threads to find_inferior, not &all_lwps.
1495 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
1496 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
1497 directly.
1498 (mips_stopped_data_address): Ditto.
1499 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
1500 directly.
1501 * linux-tile-low.c (tile_arch_setup): Ditto.
1502 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
1503 (update_debug_registers_callback): Update, "entry" parameter is a
1504 struct thread_info * now. Fetch pid from thread.
1505 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
1506 Pass &all_threads to find_inferior, not &all_lwps.
1507 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
1508 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
1509 Pass &all_threads to find_inferior, not &all_lwps.
1510 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
1511 (i386_dr_low_get_status): Ditto.
1512 (x86_linux_prepare_to_resume): Fetch ptid from thread.
1513 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
1514 (x86_linux_read_description): Ditto.
1515 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
1516
1517 2014-02-20 Doug Evans <dje@google.com>
1518
1519 * inferiors.c (get_first_inferior): Fix buglet.
1520
1521 2014-02-19 Doug Evans <dje@google.com>
1522
1523 * gdbthread.h (add_thread): Change result type to struct thread_info *.
1524 * inferiors.c (add_thread): Change result type to struct thread_info *.
1525 All callers updated.
1526 (add_lwp): Call add_thread here instead of in callers.
1527 All callers updated.
1528 * linux-low.h (get_lwp_thread): Rewrite.
1529 (struct lwp_info): New member "thread".
1530
1531 2014-02-19 Doug Evans <dje@google.com>
1532
1533 * linux-low.c (add_lwp): Change result to struct lwp_info *.
1534 All callers updated.
1535
1536 2014-02-19 Doug Evans <dje@google.com>
1537
1538 * inferiors.c (add_thread): Fix whitespace.
1539
1540 2014-02-19 Doug Evans <dje@google.com>
1541
1542 * dll.c (clear_dlls): Replace accessing list implemention details
1543 with API function.
1544 * gdbthread.h (get_first_thread): Declare.
1545 * inferiors.c (for_each_inferior_with_data): New function.
1546 (get_first_thread): New function.
1547 (find_thread_ptid): Simplify.
1548 (get_first_inferior): New function.
1549 (clear_list): Delete.
1550 (one_inferior_p): New function.
1551 (clear_inferior_list): New function.
1552 (clear_inferiors): Update.
1553 * inferiors.h (for_each_inferior_with_data): Declare.
1554 (clear_inferior_list): Declare.
1555 (one_inferior_p): Declare.
1556 (get_first_inferior): Declare.
1557 * linux-low.c (linux_wait_for_event): Replace accessing list
1558 implemention details with API function.
1559 * server.c (target_running): Ditto.
1560 (accumulate_file_name_length): New function.
1561 (emit_dll_description): New function.
1562 (handle_qxfer_libraries): Replace accessing list implemention
1563 details with API function.
1564 (handle_qxfer_threads_worker): New function.
1565 (handle_qxfer_threads_proper): Replace accessing list implemention
1566 details with API function.
1567 (handle_query): Ditto.
1568 (visit_actioned_threads_callback_ftype): New typedef.
1569 (visit_actioned_threads_data): New struct.
1570 (visit_actioned_threads): Rewrite to be find_inferior callback.
1571 (resume): Call find_inferior.
1572 (handle_status): Replace accessing list implemention
1573 details with API function.
1574 (process_serial_event): Replace accessing list implemention details
1575 with API function.
1576 * target.c (set_desired_inferior): Replace accessing list implemention
1577 details with API function.
1578 * tracepoint.c (same_process_p): New function.
1579 (gdb_agent_about_to_close): Replace accessing list implemention
1580 details with API function.
1581 * win32-low.c (child_delete_thread): Replace accessing list
1582 implemention details with API function.
1583 (match_dll_by_basename): New function.
1584 (dll_is_loaded_by_basename): New function.
1585 (win32_ensure_ntdll_loaded): Replace accessing list implemention
1586 details call to dll_is_loaded_by_basename.
1587
1588 2014-02-19 Doug Evans <dje@google.com>
1589
1590 * dll.h (struct dll_info): Add comment.
1591 * gdbthread.h (struct thread_info): Add comment.
1592 (current_ptid): Simplify.
1593 * inferiors.c (add_process): Update.
1594 (remove_process): Update.
1595 * inferiors.h (struct process_info): Rename member "head" to "entry".
1596 * linux-low.c (delete_lwp): Update.
1597 (add_lwp): Update.
1598 (last_thread_of_process_p): Update.
1599 (kill_one_lwp_callback, linux_kill): Update.
1600 (status_pending_p_callback): Update.
1601 (wait_for_sigstop): Update. Simplify read of ptid.
1602 (start_step_over): Update.
1603 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
1604 (get_lwp_thread): Update.
1605 (struct lwp_info): Rename member "head" to "entry".
1606 * regcache.h (inferior_list_entry): Delete.
1607 * server.c (kill_inferior_callback): Update.
1608 (detach_or_kill_inferior_callback): Update.
1609 (print_started_pid): Update.
1610 (print_attached_pid): Update.
1611 (process_serial_event): Simplify read of ptid.
1612 * thread-db.c (thread_db_create_event): Update.
1613 (thread_db_get_tls_address): Update.
1614 * win32-low.c (current_inferior_ptid): Simplify.
1615
1616 2014-02-19 Tom Tromey <tromey@redhat.com>
1617
1618 * target.h (struct target_ops) <supports_btrace>: Add target_ops
1619 argument.
1620 (target_supports_btrace): Update.
1621
1622 2014-02-14 Yao Qi <yao@codesourcery.com>
1623
1624 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
1625 (rsp-low-ipa.o): New target.
1626
1627 2014-02-12 Tom Tromey <tromey@redhat.com>
1628
1629 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
1630 convert_ascii_to_int.
1631 * regcache.c (registers_to_string): Likewise.
1632 * remote-utils.c (decode_M_packet): Likewise.
1633 * server.c (process_serial_event): Likewise.
1634
1635 2014-02-12 Tom Tromey <tromey@redhat.com>
1636
1637 * server.c (handle_query, handle_v_run): Use hex2bin, not
1638 unhexify.
1639 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
1640
1641 2014-02-12 Tom Tromey <tromey@redhat.com>
1642
1643 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
1644 convert_int_to_ascii.
1645 * regcache.c (registers_to_string, collect_register_as_string):
1646 Likewise.
1647 * remote-utils.c (look_up_one_symbol, relocate_instruction):
1648 Likewise.
1649 * server.c (process_serial_event): Likewise.
1650 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
1651 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
1652
1653 2014-02-12 Tom Tromey <tromey@redhat.com>
1654
1655 * remote-utils.c (look_up_one_symbol, monitor_output): Use
1656 bin2hex, not hexify.
1657 * tracepoint.c (cmd_qtstatus): Likewise.
1658
1659 2014-02-12 Tom Tromey <tromey@redhat.com>
1660
1661 * remote-utils.c (monitor_output): Pass explicit length to
1662 hexify.
1663
1664 2014-02-12 Tom Tromey <tromey@redhat.com>
1665
1666 * tracepoint.c: Include rsp-low.h.
1667 * server.c: Include rsp-low.h.
1668 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
1669 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
1670 declare.
1671 * remote-utils.c: Include rsp-low.h.
1672 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
1673 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
1674 (convert_int_to_ascii, convert_ascii_to_int): Move to
1675 common/rsp-low.c.
1676 * regcache.c: Include rsp-low.h.
1677 * ax.c: Include rsp-low.h.
1678 * Makefile.in (SFILES): Add common/rsp-low.c.
1679 (OBS): Add rsp-low.o.
1680 (rsp-low.o): New target.
1681
1682 2014-02-12 Tom Tromey <tromey@redhat.com>
1683
1684 * utils.h (pulongest, plongest, phex_nz): Don't declare.
1685 Include print-utils.h.
1686 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
1687 (plongest, thirty_two, phex_nz): Remove.
1688 * Makefile.in (SFILES): Add common/print-utils.c.
1689 (OBS): Add print-utils.o.
1690 (print-utils-ipa.o): New target.
1691 (print-utils.o): New target.
1692 (IPA_OBJS): Add print-utils-ipa.o.
1693
1694 2014-02-06 Tom Tromey <tromey@redhat.com>
1695
1696 * Makefile.in (SFILES): Fix indentation.
1697
1698 2014-02-05 Doug Evans <dje@google.com>
1699
1700 * linux-low.c (linux_wait_for_event): Improve comment.
1701 (linux_wait_1): Keep current_inferior in sync with event_child.
1702
1703 2014-01-22 Doug Evans <dje@google.com>
1704
1705 * gdbthread.h (gdb_id_to_thread): Delete, unused.
1706
1707 2014-01-22 Doug Evans <dje@google.com>
1708
1709 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
1710 * configure: Regenerate.
1711 * config.in: Regenerate.
1712 * Makefile.in (SFILES): Add debug.c.
1713 (OBS): Add debug.o.
1714 * debug.c: New file.
1715 * debug.h: New file.
1716 * linux-aarch64-low.c (*): Update all debugging printfs to use
1717 debug_printf instead of fprintf.
1718 * linux-arm-low.c (*): Ditto.
1719 * linux-cris-low.c (*): Ditto.
1720 * linux-crisv32-low.c (*): Ditto.
1721 * linux-m32r-low.c (*): Ditto.
1722 * linux-sparc-low.c (*): Ditto.
1723 * linux-x86.c (*): Ditto.
1724 * linux-low.c (*): Ditto.
1725 (linux_wait_1): Add calls to debug_enter, debug_exit.
1726 (linux_wait): Remove redundant debugging printf.
1727 (stop_all_lwps): Add calls to debug_enter, debug_exit.
1728 (linux_resume, unstop_all_lwps): Ditto.
1729 * mem-break.c (*): Update all debugging printfs to use
1730 debug_printf instead of fprintf.
1731 * remote-utils.c (*): Ditto.
1732 * thread-db.c (*): Ditto.
1733 * server.c #include <ctype.h>, "gdb_vecs.h".
1734 (debug_threads): Moved to debug.c.
1735 (*): Update all debugging printfs to use debug_printf instead of
1736 fprintf.
1737 (start_inferior): Replace call to fflush with call to debug_flush.
1738 (monitor_show_help): Mention set debug-format.
1739 (parse_debug_format_options): New function.
1740 (handle_monitor_command): Handle "monitor set debug-format".
1741 (gdbserver_usage): Mention --debug-format.
1742 (main): Parse --debug-format.
1743 * server.h (debug_threads): Declaration moved to debug.h.
1744 #include "debug.h".
1745 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
1746 trace_debug_1 that uses debug_printf.
1747 (tracepoint_look_up_symbols): Update all debugging printfs to use
1748 debug_printf instead of fprintf.
1749
1750 2014-01-20 Baruch Siach <baruch@tkos.co.il>
1751
1752 * linux-xtensa-low.c: Include asm/ptrace.h instead of
1753 sys/ptrace.h.
1754
1755 2014-01-17 Pedro Alves <palves@redhat.com>
1756
1757 PR build/16445
1758 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
1759 defined after including gdb_proc_service.h.
1760
1761 2014-01-16 Doug Evans <dje@google.com>
1762
1763 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
1764 (match_dll): Use it.
1765
1766 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
1767
1768 * target.h (target_ops) <read_btrace>: Change parameters and
1769 return type to allow error reporting.
1770 * server.c (handle_qxfer_btrace): Support delta reads. Pass
1771 trace reading errors on.
1772 * linux-low.c (linux_low_read_btrace): Pass trace reading
1773 errors on.
1774 (linux_low_disable_btrace): New.
1775
1776 2014-01-15 Doug Evans <dje@google.com>
1777
1778 * inferiors.c (thread_id_to_gdb_id): Delete.
1779 * inferiors.h (thread_id_to_gdb_id): Delete.
1780
1781 2014-01-13 Eli Zaretskii <eliz@gnu.org>
1782
1783 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
1784 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
1785 versions.
1786
1787 2014-01-08 Pedro Alves <palves@redhat.com>
1788
1789 * server.c (handle_status): Don't discard previous queued stop
1790 replies or thread's pending status here.
1791 (main) <disconnection>: Do it here instead.
1792
1793 2014-01-08 Pedro Alves <palves@redhat.com>
1794
1795 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
1796 * server.c (visit_actioned_threads, handle_pending_status): New
1797 function.
1798 (handle_v_cont): Factor out parts to ...
1799 (resume): ... this new function. If in all-stop, and a thread
1800 being resumed has a pending status, report it without actually
1801 resuming.
1802 (myresume): Adjust to use the new 'resume' function.
1803 (clear_pending_status_callback, set_pending_status_callback)
1804 (find_status_pending_thread_callback): New functions.
1805 (handle_status): Handle the case of multiple threads having
1806 interesting statuses to report. Report threads' real last signal
1807 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
1808 with an interesting thread to report the status for, instead of
1809 always reporting the status of the first thread.
1810
1811 2014-01-01 Joel Brobecker <brobecker@adacore.com>
1812
1813 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
1814 * gdbreplay.c (gdbreplay_version): Likewise.
1815
1816 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
1817
1818 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
1819 iov.iov_len with the real length in use.
1820
1821 2013-12-13 Joel Brobecker <brobecker@adacore.com>
1822
1823 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
1824 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
1825 for all targets that use win32-low.c.
1826 * win32-low.c (win32_ensure_ntdll_loaded): New function.
1827 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
1828
1829 2013-12-13 Pedro Alves <palves@redhat.com>
1830
1831 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
1832 if equal to TARGET_WAITKIND_LOADED.
1833 * win32-low.c (cached_status): New static global.
1834 (win32_wait): Add declaration.
1835 (do_initial_child_stuff): Flush all initial pending debug events
1836 up to the initial breakpoint.
1837 (win32_wait): If CACHED_STATUS was set, return that instead
1838 of doing a real wait. Remove the code resuming the execution
1839 of the inferior after receiving a TARGET_WAITKIND_LOADED event
1840 during the initial phase. Also remove the code changing
1841 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
1842 TARGET_WAITKIND_STOPPED.
1843
1844 2013-12-11 Yao Qi <yao@codesourcery.com>
1845
1846 * notif.c (handle_notif_ack): Return 0 if no notification
1847 matches.
1848
1849 2013-11-20 Doug Evans <dje@google.com>
1850
1851 * linux-low.c (linux_set_resume_request): Fix comment.
1852
1853 2013-11-20 Doug Evans <dje@google.com>
1854
1855 * linux-low.c (resume_status_pending_p): Tweak comment.
1856
1857 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
1858
1859 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
1860 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
1861 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
1862 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
1863 (srv_amd64_regobj): Add amd64-mpx.o.
1864 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
1865 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
1866 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
1867 * i387-fp.c (num_pl_bnd_register) Added constant.
1868 (num_pl_bnd_cfg_registers) Added constant.
1869 (struct i387_xsave) Added reserved area and MPX fields.
1870 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
1871 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
1872 function.
1873 (tdesc_i386_mpx_linux): Add MPX amd64 target.
1874 (init_registers_amd64_mpx_linux): Declare new function.
1875 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
1876 (x86_64_regmap): Add MPX registers.
1877 (x86_linux_read_description): Add MPX case.
1878 (initialize_low_arch): Initialize MPX targets.
1879
1880 2013-11-18 Tom Tromey <tromey@redhat.com>
1881
1882 * configure: Rebuild.
1883 * configure.ac: Don't check for stdlib.h.
1884 * gdbreplay.c: Unconditionally include stdlib.h.
1885
1886 2013-11-18 Tom Tromey <tromey@redhat.com>
1887
1888 * config.in: Rebuild.
1889 * configure: Rebuild.
1890 * configure.ac: Don't use AC_HEADER_DIRENT.
1891
1892 2013-11-18 Tom Tromey <tromey@redhat.com>
1893
1894 * server.h: Don't check HAVE_STRING_H.
1895 * gdbreplay.c: Don't check HAVE_STRING_H.
1896 * configure: Rebuild.
1897
1898 2013-11-18 Tom Tromey <tromey@redhat.com>
1899
1900 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
1901 LIBGNU.
1902
1903 2013-11-08 Tom Tromey <tromey@redhat.com>
1904
1905 * configure, config.in: Rebuild.
1906 * configure.ac: Remove unused configury.
1907
1908 2013-11-08 Tom Tromey <tromey@redhat.com>
1909
1910 * acinclude.m4: Include common.m4, codeset.m4.
1911 * configure, config.in: Rebuild.
1912 * configure.ac: Use GDB_AC_COMMON.
1913
1914 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
1915
1916 * linux-s390-low.c (HWCAP_S390_TE): New define.
1917 (s390_arch_setup): Consider the TE field in the HWCAP for
1918 determining 'have_regset_tdb'.
1919
1920 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
1921
1922 PR gdb/16014
1923 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
1924 call to sizeof.
1925
1926 2013-10-02 Pedro Alves <palves@redhat.com>
1927
1928 * server.c (process_serial_event): Don't output "GDBserver
1929 exiting" if GDB is connected through stdio.
1930 * target.c (mywait): Likewise, be silent if GDB is connected
1931 through stdio.
1932
1933 2013-10-01 Joel Brobecker <brobecker@adacore.com>
1934
1935 * lynx-low.c (lynx_add_threads_after_attach): New function.
1936 (lynx_attach): Remove call to add_thread. Add call to
1937 lynx_add_threads_after_attach instead.
1938
1939 2013-09-28 Mike Frysinger <vapier@gentoo.org>
1940
1941 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
1942 * config.in, configure: Regenerated.
1943
1944 2013-09-18 Yao Qi <yao@codesourcery.com>
1945
1946 PR server/15959
1947 * server.c (start_inferior): Clear 'resume_info'.
1948
1949 2013-09-16 Jiong Wang <jiwang@tilera.com>
1950
1951 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
1952 for each register.
1953
1954 2013-09-16 Jiong Wang <jiwang@tilera.com>
1955
1956 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
1957 linux-tile-low.o to srv_tgtobj.
1958
1959 2013-09-16 Will Newton <will.newton@linaro.org>
1960
1961 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
1962 out regs.
1963
1964 2013-09-06 Pedro Alves <palves@redhat.com>
1965
1966 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
1967 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
1968 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
1969 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
1970 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
1971 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
1972
1973 2013-09-06 Pedro Alves <palves@redhat.com>
1974
1975 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
1976 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
1977
1978 2013-09-06 Pedro Alves <palves@redhat.com>
1979
1980 * linux-amd64-ipa.c: Include tracepoint.h.
1981 * linux-i386-ipa.c: Include tracepoint.h.
1982
1983 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
1984
1985 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
1986 (ps_get_thread_area): New function.
1987
1988 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
1989
1990 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
1991 (initialize_low_arch): Call init_registers_crisv32 rather than
1992 init_register_crisv32.
1993
1994 2013-09-05 Pedro Alves <palves@redhat.com>
1995
1996 * server.h (handle_vFile, hostio_last_error_from_errno): Move
1997 to ...
1998 * hostio.h: ... this new file.
1999 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
2000 win32-low.c: Include hostio.h.
2001
2002 2013-09-05 Pedro Alves <palves@redhat.com>
2003
2004 * server.h (gdb_client_data, handler_func, callback_handler_func)
2005 (delete_file_handler, add_file_handler, append_callback_event)
2006 (delete_callback_event, start_event_loop, initialize_event_loop):
2007 Move to event-loop.h and include it.
2008 * event-loop.h: New file.
2009
2010 2013-09-05 Pedro Alves <palves@redhat.com>
2011
2012 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
2013 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
2014 (loaded_dll, unloaded_dll): Move to ...
2015 * dll.h: ... this new file.
2016 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
2017
2018 2013-09-05 Pedro Alves <palves@redhat.com>
2019
2020 * server.h (current_process, get_thread_process, all_processes)
2021 (add_inferior_to_list, for_each_inferior, current_inferior)
2022 (remove_inferior, add_process, remove_process, find_process_pid)
2023 (have_started_inferiors_p, have_attached_inferiors_p)
2024 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
2025 (clear_inferiors, find_inferior, find_inferior_id)
2026 (inferior_target_data, set_inferior_target_data)
2027 (inferior_regcache_data, set_inferior_regcache_data): Move to
2028 inferiors.h, and include it.
2029 * inferiors.h: New file.
2030
2031 2013-09-05 Pedro Alves <palves@redhat.com>
2032
2033 * server.h (struct emit_ops, current_insn_ptr, emit_error):
2034 Move ...
2035 * ax.h: ... here.
2036
2037 2013-09-05 Pedro Alves <palves@redhat.com>
2038
2039 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
2040 tracepoint.h.
2041 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
2042 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
2043 (handle_tracepoint_general_set, handle_tracepoint_query)
2044 (tracepoint_finished_step, tracepoint_was_hit)
2045 (release_while_stepping_state_list, current_traceframe)
2046 (in_readonly_region, traceframe_read_mem)
2047 (fetch_traceframe_registers, traceframe_read_sdata)
2048 (traceframe_read_info, struct fast_tpoint_collect_status)
2049 (fast_tracepoint_collecting, force_unlock_trace_buffer)
2050 (handle_tracepoit_bkpts, initialize_low_tracepoint)
2051 (supply_fast_tracepoint_registers)
2052 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
2053 (ipa_tdesc, claim_trampoline_space)
2054 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
2055 (agent_mem_read, agent_get_trace_state_variable_value)
2056 (agent_set_trace_state_variable_value, agent_tsv_read)
2057 (agent_mem_read_string, get_raw_reg_func_addr)
2058 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
2059 * tracepoint.h: ... this new file.
2060
2061 2013-09-05 Pedro Alves <palves@redhat.com>
2062
2063 * server.h (perror_with_name, error, fatal, warning, paddress)
2064 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
2065 include it.
2066 * utils.h: New file.
2067
2068 2013-09-05 Pedro Alves <palves@redhat.com>
2069
2070 * server.h (remote_debug, noack_mode, transport_is_reliable)
2071 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
2072 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
2073 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
2074 (write_enn, initialize_async_io, enable_async_io)
2075 (disable_async_io, check_remote_input_interrupt_request)
2076 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
2077 (dead_thread_notify, prepare_resume_reply)
2078 (decode_address_to_semicolon, decode_address, decode_m_packet)
2079 (decode_M_packet, decode_X_packet, decode_xfer_write)
2080 (decode_search_memory_packet, unhexify, hexify)
2081 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
2082 (look_up_one_symbol, relocate_instruction)
2083 (monitor_output): Move to remote-utils.h, and include it.
2084 * remote-utils.h: New file.
2085
2086 2013-09-05 Pedro Alves <palves@redhat.com>
2087
2088 * server.h (_): Delete.
2089
2090 2013-09-02 Pedro Alves <palves@redhat.com>
2091
2092 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
2093 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
2094 allocated.
2095 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
2096
2097 2013-09-02 Pierre Muller <muller@sourceware.org>
2098
2099 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
2100 or WriteProcessMemory complete successfully and handle
2101 ERROR_PARTIAL_COPY error.
2102
2103 2013-09-02 Pedro Alves <palves@redhat.com>
2104
2105 * server.c (gdb_read_memory): Return -1 on traceframe memory read
2106 error instead of EIO.
2107
2108 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
2109
2110 PR server/15604
2111 * linux-low.c: Include filestuff.h.
2112 (linux_create_inferior) <pid == 0>: Call close_most_fds.
2113 * lynx-low.c: Include filestuff.h.
2114 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
2115 * server.c: Include filestuff.h.
2116 (main): Call notice_open_fds.
2117 * spu-low.c: Include filestuff.h.
2118 (spu_create_inferior) <pid == 0>: Call close_most_fds.
2119
2120 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
2121
2122 * Makefile.in: Explain why ../target and ../nat are not
2123 listed as include file search paths.
2124 (linux-waitpid.o): New object file rule.
2125 * configure.srv (srv_native_linux_obj): New variable.
2126 Replace all occurrences of linux native object files with
2127 $srv_native_linux_obj.
2128 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
2129 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
2130 (linux_enable_event_reporting): Remove declaration.
2131 (my_waitpid): Moved to common/linux-waitpid.c.
2132 (linux_wait_for_event): Pass ptid when calling
2133 linux_enable_event_reporting.
2134 (linux_supports_tracefork_flag): Remove.
2135 (linux_enable_event_reporting): Likewise.
2136 (linux_tracefork_grandchild): Remove.
2137 (STACK_SIZE): Moved to common/linux-ptrace.c.
2138 (linux_tracefork_child): Remove.
2139 (linux_test_for_tracefork): Remove.
2140 (linux_look_up_symbols): Call linux_supports_traceclone.
2141 (initialize_low): Remove call to linux_test_for_tracefork.
2142 * linux-low.h (PTRACE_TYPE_ARG3): Move to
2143 common/linux-ptrace.h.
2144 (PTRACE_TYPE_ARG4): Likewise.
2145 Include linux-ptrace.h.
2146
2147 2013-08-21 Pedro Alves <palves@redhat.com>
2148
2149 * config.in: Renegerate.
2150
2151 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
2152
2153 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
2154 (SFILES): Remove $(srcdir)/common/target-common.c and
2155 add $(srcdir)/target/waitstatus.c.
2156 (OBS): Remove target-common.o and add waitstatus.o.
2157 (server_h): Remove $(srcdir)/../common/target-common.h and
2158 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
2159 and $(srcdir)/../target/waitstatus.h.
2160 (target-common.o): Remove.
2161 (waitstatus.o): New target object file.
2162 * target.h: Do not include target-common.h and
2163 include target/resume.h, target/wait.h and
2164 target/waitstatus.h.
2165
2166 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
2167
2168 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
2169 to PTRACE_TYPE_ARG3.
2170 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
2171 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
2172 PTRACE_TYPE_ARG4.
2173 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
2174 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
2175
2176 2013-07-27 Jie Zhang <jie@codesourcery.com>
2177 Daniel Jacobowitz <dan@codesourcery.com>
2178 Yao Qi <yao@codesourcery.com>
2179
2180 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
2181 (mips-linux-watch.o): New rule.
2182 (mips_linux_watch_h): New variable.
2183 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
2184 srv_tgtobj.
2185 * linux-mips-low.c: Include mips-linux-watch.h.
2186 (struct arch_process_info, struct arch_lwp_info): New.
2187 (update_watch_registers_callback): New function.
2188 (mips_linux_new_process, mips_linux_new_thread) New functions.
2189 (mips_linux_prepare_to_resume, mips_insert_point): New
2190 functions.
2191 (mips_remove_point, mips_stopped_by_watchpoint): New
2192 functions.
2193 (rsp_bp_type_to_target_hw_bp_type): New function.
2194 (mips_stopped_data_address): New function.
2195 (the_low_target): Add watchpoint support functions.
2196
2197 2013-07-27 Yao Qi <yao@codesourcery.com>
2198
2199 * i386-low.c: Include break-common.h.
2200 (enum target_hw_bp_type): Remove.
2201
2202 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
2203
2204 * Makefile.in (SFILES): /common/target-common.c.
2205 (OBS): Add target-common.o.
2206 (server_h): Add $(srcdir)/../common/target-common.h.
2207 (target-common.o): New target.
2208 * server.c (queue_stop_reply_callback): Free
2209 status string after use.
2210 * target.c (target_waitstatus_to_string): Remove.
2211 * target.h: Include target-common.h.
2212 (resume_kind): Likewise.
2213 (target_waitkind): Likewise.
2214 (target_waitstatus): Likewise.
2215 (TARGET_WNOHANG): Likewise.
2216
2217 2013-07-04 Yao Qi <yao@codesourcery.com>
2218
2219 * Makefile.in (host_alias): Use @host_noncanonical@.
2220 (target_alias): Use @target_noncanonical@.
2221 * configure.ac: Use ACX_NONCANONICAL_TARGET and
2222 ACX_NONCANONICAL_HOST.
2223 * configure: Regenerated.
2224
2225 Revert:
2226 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
2227
2228 * configure.ac (version_host, version_target): Set and AC_SUBST them.
2229 * configure: Rebuild.
2230 * Makefile.in (version_host, version_target): Get from configure.
2231 (version.c): Use $(version_host) and $(version_target).
2232
2233 2013-07-03 Pedro Alves <palves@redhat.com>
2234
2235 * Makefile.in (config.status): Depend on development.sh.
2236 * acinclude.m4: Include libmcheck.m4.
2237 * configure: Regenerate.
2238
2239 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
2240
2241 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
2242 attribute inside the parentheses.
2243 (winapi_DebugSetProcessKillOnExit): Ditto.
2244 (winapi_DebugBreakProcess): Ditto.
2245 (winapi_GenerateConsoleCtrlEvent): Ditto.
2246
2247 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
2248
2249 * notif.h (notif_event): Add a dummy member to avoid compiler
2250 errors.
2251
2252 2013-07-01 Pedro Alves <palves@redhat.com>
2253
2254 * hostio.c (HOSTIO_PATH_MAX): Define.
2255 (require_filename, handle_open, handle_unlink, handle_readlink):
2256 Use it.
2257
2258 2013-07-01 Pedro Alves <palves@redhat.com>
2259
2260 * server.h: Include "pathmax.h".
2261 * linux-low.c: Don't include sys/param.h.
2262 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
2263 MAXPATHLEN.
2264 * win32-low.c: Don't include sys/param.h.
2265 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
2266
2267 2013-07-01 Pedro Alves <palves@redhat.com>
2268
2269 * event-loop.c: Don't check HAVE_UNISTD_H before including
2270 <unistd.h>.
2271 * gdbreplay.c: Likewise.
2272 * remote-utils.c: Likewise.
2273 * server.c: Likewise.
2274 * configure.ac: Don't check for unistd.h.
2275 * configure: Regenerate.
2276
2277 2013-06-28 Tom Tromey <tromey@redhat.com>
2278
2279 * Makefile.in (version.c): Use version.in, not
2280 common/version.in.
2281
2282 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
2283
2284 * configure.ac (version_host, version_target): Set and AC_SUBST them.
2285 * configure: Rebuild.
2286 * Makefile.in (version_host, version_target): Get from configure.
2287 (version.c): Use $(version_host) and $(version_target).
2288
2289 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
2290
2291 Fix trace-status to output user name without trailing colon.
2292 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
2293
2294 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
2295
2296 Fix trace-status to output proper start-time and stop-time.
2297 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
2298 output start time and stop time in hex as gdb expects.
2299
2300 2013-06-26 Pedro Alves <pedro@codesourcery.com>
2301
2302 * tracepoint.c (build_traceframe_info_xml): Output trace state
2303 variables present in the trace buffer.
2304
2305 2013-06-24 Tom Tromey <tromey@redhat.com>
2306
2307 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
2308 create-version.sh.
2309 (version.o): Remove.
2310 * gdbreplay.c: Include version.h.
2311 (version, host_name): Don't declare.
2312 * server.h: Include version.h.
2313 (version, host_name): Don't declare.
2314
2315 2013-06-12 Pedro Alves <palves@redhat.com>
2316
2317 * linux-x86-low.c (linux_is_elf64): Delete global.
2318 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
2319 with local linux_pid_exe_is_elf_64_file use.
2320
2321 2013-06-11 Pedro Alves <palves@redhat.com>
2322
2323 * linux-low.c (regset_disabled, disable_regset): New functions.
2324 (regsets_fetch_inferior_registers)
2325 (regsets_store_inferior_registers): Use them.
2326 (initialize_regsets_info); Don't allocate the disabled_regsets
2327 array here.
2328 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
2329 comment.
2330
2331 2013-06-11 Pedro Alves <palves@redhat.com>
2332
2333 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
2334 xmalloc.
2335
2336 2013-06-11 Pedro Alves <palves@redhat.com>
2337
2338 * linux-x86-low.c (initialize_low_arch): Call
2339 init_registers_x32_avx_linux.
2340
2341 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
2342
2343 Fix compatibility with Android Bionic.
2344 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
2345 it is not empty.
2346
2347 2013-06-07 Pedro Alves <palves@redhat.com>
2348
2349 PR server/14823
2350 * Makefile.in (OBS): Add tdesc.o.
2351 (IPA_OBJS): Add tdesc-ipa.o.
2352 (tdesc-ipa.o): New rule.
2353 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
2354 interface.
2355 * linux-low.c (new_inferior): Delete.
2356 (disabled_regsets, num_regsets): Delete.
2357 (linux_add_process): Adjust to set the new per-process
2358 new_inferior flag.
2359 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
2360 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
2361 was a stop. When calling arch_setup, switch the current inferior
2362 to the thread that got an event.
2363 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
2364 (regsets_fetch_inferior_registers)
2365 (regsets_store_inferior_registers): New regsets_info parameter.
2366 Adjust to use it.
2367 (linux_register_in_regsets): New regs_info parameter. Adjust to
2368 use it.
2369 (register_addr, fetch_register, store_register): New usrregs_info
2370 parameter. Adjust to use it.
2371 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
2372 parameter regs_info. Adjust to use it.
2373 (linux_fetch_registers): Get the current inferior's regs_info, and
2374 adjust to use it.
2375 (linux_store_registers): Ditto.
2376 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
2377 (initialize_low): Don't initialize the target_regsets here. Call
2378 initialize_low_arch.
2379 * linux-low.h (target_regsets): Delete declaration.
2380 (struct regsets_info): New.
2381 (struct usrregs_info): New.
2382 (struct regs_info): New.
2383 (struct process_info_private) <new_inferior>: New field.
2384 (struct linux_target_ops): Delete the num_regs, regmap, and
2385 regset_bitmap fields. New field regs_info.
2386 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
2387 * i387-fp.c (num_xmm_registers): Delete.
2388 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
2389 calls to new interface.
2390 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
2391 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
2392 Infer the number of xmm registers from the regcache's target
2393 description.
2394 * i387-fp.h (num_xmm_registers): Delete.
2395 * inferiors.c (add_thread): Don't install the thread's regcache
2396 here.
2397 * proc-service.c (gregset_info): Fetch the current inferior's
2398 regs_info. Adjust to use it.
2399 * regcache.c: Include tdesc.h.
2400 (register_bytes, reg_defs, num_registers)
2401 (gdbserver_expedite_regs): Delete.
2402 (get_thread_regcache): If the thread doesn't have a regcache yet,
2403 create one, instead of aborting gdbserver.
2404 (regcache_invalidate_one): Rename to ...
2405 (regcache_invalidate_thread): ... this.
2406 (regcache_invalidate_one): New.
2407 (regcache_invalidate): Only invalidate registers of the current
2408 process.
2409 (init_register_cache): Add target_desc parameter, and use it.
2410 (new_register_cache): Ditto. Assert the target description has a
2411 non zero registers_size.
2412 (regcache_cpy): Add assertions. Adjust.
2413 (realloc_register_cache, set_register_cache): Delete.
2414 (registers_to_string, registers_from_string): Adjust.
2415 (find_register_by_name, find_regno, find_register_by_number)
2416 (register_cache_size): Add target_desc parameter, and use it.
2417 (free_register_cache_thread, free_register_cache_thread_one)
2418 (regcache_release, register_cache_size): New.
2419 (register_size): Add target_desc parameter, and use it.
2420 (register_data, supply_register, supply_register_zeroed)
2421 (supply_regblock, supply_register_by_name, collect_register)
2422 (collect_register_as_string, collect_register_by_name): Adjust.
2423 * regcache.h (struct target_desc): Forward declare.
2424 (struct regcache) <tdesc>: New field.
2425 (init_register_cache, new_register_cache): Add target_desc
2426 parameter.
2427 (regcache_invalidate_thread): Declare.
2428 (regcache_invalidate_one): Delete declaration.
2429 (regcache_release): Declare.
2430 (find_register_by_number, register_cache_size, register_size)
2431 (find_regno): Add target_desc parameter.
2432 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
2433 declarations.
2434 * remote-utils.c: Include tdesc.h.
2435 (outreg, prepare_resume_reply): Adjust.
2436 * server.c: Include tdesc.h.
2437 (gdbserver_xmltarget): Delete declaration.
2438 (get_features_xml, process_serial_event): Adjust.
2439 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
2440 declare.
2441 (struct process_info) <tdesc>: New field.
2442 (ipa_tdesc): Declare.
2443 * tdesc.c: New file.
2444 * tdesc.h: New file.
2445 * tracepoint.c: Include tdesc.h.
2446 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
2447 (get_context_regcache): Adjust to pass ipa_tdesc down.
2448 (do_action_at_tracepoint): Adjust to get the register cache size
2449 from the context regcache's description.
2450 (traceframe_walk_blocks): Adjust to get the register cache size
2451 from the current trace frame's description.
2452 (traceframe_get_pc): Adjust to get current trace frame's
2453 description and pass it down.
2454 (gdb_collect): Adjust to get the register cache size from the
2455 IPA's description.
2456 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
2457 (gdbserver_xmltarget): Delete.
2458 (initialize_low_tracepoint): Set the ipa's target description.
2459 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
2460 (initialize_low_tracepoint): Set the ipa's target description.
2461 * linux-x86-low.c: Include tdesc.h.
2462 [__x86_64__] (is_64bit_tdesc): New.
2463 (ps_get_thread_area, x86_get_thread_area): Use it.
2464 (i386_cannot_store_register): Rename to ...
2465 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
2466 (i386_cannot_fetch_register): Rename to ...
2467 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
2468 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
2469 to new interface.
2470 (target_regsets): Rename to ...
2471 (x86_regsets): ... this.
2472 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
2473 interface.
2474 (x86_siginfo_fixup): Use is_64bit_tdesc.
2475 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
2476 (tdesc_x32_avx_linux, tdesc_x32_linux)
2477 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
2478 Declare.
2479 (x86_linux_update_xmltarget): Delete.
2480 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
2481 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
2482 (AMD64_LINUX_USER64_CS): New.
2483 (x86_linux_read_description): New, based on
2484 x86_linux_update_xmltarget.
2485 (same_process_callback): New.
2486 (x86_arch_setup_process_callback): New.
2487 (x86_linux_update_xmltarget): New.
2488 (x86_regsets_info): New.
2489 (amd64_linux_regs_info): New.
2490 (i386_linux_usrregs_info): New.
2491 (i386_linux_regs_info): New.
2492 (x86_linux_regs_info): New.
2493 (x86_arch_setup): Reimplement.
2494 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
2495 (x86_emit_ops): Ditto.
2496 (the_low_target): Adjust. Install x86_linux_regs_info,
2497 x86_cannot_fetch_register, and x86_cannot_store_register.
2498 (initialize_low_arch): New.
2499 * linux-ia64-low.c (tdesc_ia64): Declare.
2500 (ia64_fetch_register): Adjust.
2501 (ia64_usrregs_info, regs_info): New globals.
2502 (ia64_regs_info): New function.
2503 (the_low_target): Adjust.
2504 (initialize_low_arch): New function.
2505 * linux-sparc-low.c (tdesc_sparc64): Declare.
2506 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
2507 Adjust.
2508 (sparc_arch_setup): New function.
2509 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
2510 (the_low_target): Adjust.
2511 (initialize_low_arch): New function.
2512 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
2513 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
2514 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
2515 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
2516 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
2517 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
2518 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
2519 (tdesc_powerpc_isa205_vsx64l): Declare.
2520 (ppc_cannot_store_register, ppc_collect_ptrace_register)
2521 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
2522 (ppc_set_pc, ppc_get_hwcap): Adjust.
2523 (ppc_usrregs_info): Forward declare.
2524 (!__powerpc64__) ppc_regmap_adjusted: New global.
2525 (ppc_arch_setup): Adjust to the current process'es target
2526 description.
2527 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
2528 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
2529 (ppc_store_evrregset): Adjust.
2530 (target_regsets): Rename to ...
2531 (ppc_regsets): ... this, and make static.
2532 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
2533 (ppc_regs_info): New function.
2534 (the_low_target): Adjust.
2535 (initialize_low_arch): New function.
2536 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
2537 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
2538 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
2539 (tdesc_s390x_linux64v2): Declare.
2540 (s390_collect_ptrace_register, s390_supply_ptrace_register)
2541 (s390_fill_gregset, s390_store_last_break): Adjust.
2542 (target_regsets): Rename to ...
2543 (s390_regsets): ... this, and make static.
2544 (s390_get_pc, s390_set_pc): Adjust.
2545 (s390_get_hwcap): New target_desc parameter, and use it.
2546 [__s390x__] (have_hwcap_s390_high_gprs): New global.
2547 (s390_arch_setup): Adjust to set the current process'es target
2548 description. Don't adjust the regmap.
2549 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
2550 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
2551 (regs_info_3264): New globals.
2552 (s390_regs_info): New function.
2553 (the_low_target): Adjust.
2554 (initialize_low_arch): New function.
2555 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
2556 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
2557 [__mips64] (init_registers_mips_linux)
2558 (init_registers_mips_dsp_linux): Delete defines.
2559 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
2560 (have_dsp): New global.
2561 (mips_read_description): New, based on mips_arch_setup.
2562 (mips_arch_setup): Reimplement.
2563 (get_usrregs_info): New function.
2564 (mips_cannot_fetch_register, mips_cannot_store_register)
2565 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
2566 (mips_fill_fpregset, mips_store_fpregset): Adjust.
2567 (target_regsets): Rename to ...
2568 (mips_regsets): ... this, and make static.
2569 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
2570 (dsp_regs_info, regs_info): New globals.
2571 (mips_regs_info): New function.
2572 (the_low_target): Adjust.
2573 (initialize_low_arch): New function.
2574 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
2575 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
2576 Declare.
2577 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
2578 (arm_read_description): New, with bits factored from
2579 arm_arch_setup.
2580 (arm_arch_setup): Reimplement.
2581 (target_regsets): Rename to ...
2582 (arm_regsets): ... this, and make static.
2583 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
2584 (arm_regs_info): New function.
2585 (the_low_target): Adjust.
2586 (initialize_low_arch): New function.
2587 * linux-m68k-low.c (tdesc_m68k): Declare.
2588 (target_regsets): Rename to ...
2589 (m68k_regsets): ... this, and make static.
2590 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
2591 (m68k_regs_info): New function.
2592 (m68k_arch_setup): New function.
2593 (the_low_target): Adjust.
2594 (initialize_low_arch): New function.
2595 * linux-sh-low.c (tdesc_sharch): Declare.
2596 (target_regsets): Rename to ...
2597 (sh_regsets): ... this, and make static.
2598 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
2599 (sh_regs_info, sh_arch_setup): New functions.
2600 (the_low_target): Adjust.
2601 (initialize_low_arch): New function.
2602 * linux-bfin-low.c (tdesc_bfin): Declare.
2603 (bfin_arch_setup): New function.
2604 (bfin_usrregs_info, regs_info): New globals.
2605 (bfin_regs_info): New function.
2606 (the_low_target): Adjust.
2607 (initialize_low_arch): New function.
2608 * linux-cris-low.c (tdesc_cris): Declare.
2609 (cris_arch_setup): New function.
2610 (cris_usrregs_info, regs_info): New globals.
2611 (cris_regs_info): New function.
2612 (the_low_target): Adjust.
2613 (initialize_low_arch): New function.
2614 * linux-cris-low.c (tdesc_crisv32): Declare.
2615 (cris_arch_setup): New function.
2616 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
2617 (cris_regs_info): New function.
2618 (the_low_target): Adjust.
2619 (initialize_low_arch): New function.
2620 * linux-m32r-low.c (tdesc_m32r): Declare.
2621 (m32r_arch_setup): New function.
2622 (m32r_usrregs_info, regs_info): New globals.
2623 (m32r_regs_info): Adjust.
2624 (initialize_low_arch): New function.
2625 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
2626 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
2627 (tic6x_usrregs_info): Forward declare.
2628 (tic6x_read_description): New function, based on ...
2629 (tic6x_arch_setup): ... this. Reimplement.
2630 (target_regsets): Rename to ...
2631 (tic6x_regsets): ... this, and make static.
2632 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
2633 (tic6x_regs_info): New function.
2634 (the_low_target): Adjust.
2635 (initialize_low_arch): New function.
2636 * linux-xtensa-low.c (tdesc_xtensa): Declare.
2637 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
2638 (target_regsets): Rename to ...
2639 (xtensa_regsets): ... this, and make static.
2640 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
2641 globals.
2642 (xtensa_arch_setup, xtensa_regs_info): New functions.
2643 (the_low_target): Adjust.
2644 (initialize_low_arch): New function.
2645 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
2646 (nios2_arch_setup): Set the current process'es tdesc.
2647 (target_regsets): Rename to ...
2648 (nios2_regsets): ... this.
2649 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
2650 (nios2_regs_info): New function.
2651 (the_low_target): Adjust.
2652 (initialize_low_arch): New function.
2653 * linux-aarch64-low.c (tdesc_aarch64): Declare.
2654 (aarch64_arch_setup): Set the current process'es tdesc.
2655 (target_regsets): Rename to ...
2656 (aarch64_regsets): ... this.
2657 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
2658 (aarch64_regs_info): New function.
2659 (the_low_target): Adjust.
2660 (initialize_low_arch): New function.
2661 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
2662 globals.
2663 (target_regsets): Rename to ...
2664 (tile_regsets): ... this.
2665 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
2666 (tile_regs_info): New function.
2667 (tile_arch_setup): Set the current process'es tdesc.
2668 (the_low_target): Adjust.
2669 (initialize_low_arch): New function.
2670 * spu-low.c (tdesc_spu): Declare.
2671 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
2672 * win32-arm-low.c (tdesc_arm): Declare.
2673 (arm_arch_setup): New function.
2674 (the_low_target): Install arm_arch_setup instead of
2675 init_registers_arm.
2676 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
2677 (init_windows_x86): Rename to ...
2678 (i386_arch_setup): ... this. Set `win32_tdesc'.
2679 (the_low_target): Adjust.
2680 * win32-low.c (win32_tdesc): New global.
2681 (child_add_thread): Don't create the thread cache here.
2682 (do_initial_child_stuff): Set the new process'es tdesc.
2683 * win32-low.h (struct target_desc): Forward declare.
2684 (win32_tdesc): Declare.
2685 * lynx-i386-low.c (tdesc_i386): Declare global.
2686 (lynx_i386_arch_setup): Set `lynx_tdesc'.
2687 * lynx-low.c (lynx_tdesc): New global.
2688 (lynx_add_process): Set the new process'es tdesc.
2689 * lynx-low.h (struct target_desc): Forward declare.
2690 (lynx_tdesc): Declare global.
2691 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
2692 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
2693 * nto-low.c (nto_tdesc): New global.
2694 (do_attach): Set the new process'es tdesc.
2695 * nto-low.h (struct target_desc): Forward declare.
2696 (nto_tdesc): Declare.
2697 * nto-x86-low.c (tdesc_i386): Declare.
2698 (nto_x86_arch_setup): Set `nto_tdesc'.
2699
2700 2013-06-04 Gary Benson <gbenson@redhat.com>
2701
2702 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
2703 to qSupported response when appropriate.
2704 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
2705 with nonzero-length annex.
2706 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
2707 arguments supplied in annex.
2708
2709 2013-05-31 Doug Evans <dje@google.com>
2710
2711 PR server/15594
2712 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
2713 64 bits in 64-cross-32 environment.
2714
2715 2013-05-28 Pedro Alves <palves@redhat.com>
2716
2717 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
2718 (aarch64-without-fpu.c): Delete rule.
2719 * configure.srv (aarch64*-*-linux*): Remove references to
2720 aarch64-without-fpu.o and aarch64-without-fpu.xml.
2721 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
2722 declaration.
2723
2724 2013-05-24 Pedro Alves <palves@redhat.com>
2725
2726 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
2727 instead of strchr/decode_address. Error if the range isn't split
2728 with a ','. Don't assume there's be a ':' in the action.
2729
2730 2013-05-23 Yao Qi <yao@codesourcery.com>
2731 Pedro Alves <palves@redhat.com>
2732
2733 * linux-low.c (lwp_in_step_range): New function.
2734 (linux_wait_1): If the thread was range stepping and stopped
2735 outside the stepping range, report the stop to GDB. Otherwise,
2736 continue stepping. Add range stepping debug output.
2737 (linux_set_resume_request): Copy the step range from the resume
2738 request to the lwp.
2739 (linux_supports_range_stepping): New.
2740 (linux_target_ops) <supports_range_stepping>: Set to
2741 linux_supports_range_stepping.
2742 * linux-low.h (struct linux_target_ops)
2743 <supports_range_stepping>: New field.
2744 (struct lwp_info) <step_range_start, step_range_end>: New fields.
2745 * linux-x86-low.c (x86_supports_range_stepping): New.
2746 (the_low_target) <supports_range_stepping>: Set to
2747 x86_supports_range_stepping.
2748 * server.c (handle_v_cont): Handle 'r' action.
2749 (handle_v_requests): Append ";r" if the target supports range
2750 stepping.
2751 * target.h (struct thread_resume) <step_range_start,
2752 step_range_end>: New fields.
2753 (struct target_ops) <supports_range_stepping>:
2754 New field.
2755 (target_supports_range_stepping): New macro.
2756
2757 2013-05-17 Joel Brobecker <brobecker@adacore.com>
2758
2759 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
2760 confusion in comment.
2761
2762 2013-05-17 Joel Brobecker <brobecker@adacore.com>
2763
2764 * lynx-low.c (struct process_info_private): New type.
2765 (lynx_add_process): New function.
2766 (lynx_create_inferior, lynx_attach): Replace calls to
2767 add_process by calls to lynx_add_process.
2768 (lynx_resume): If PTID is null, then try using
2769 current_process()->private->last_wait_event_ptid.
2770 Add comments.
2771 (lynx_clear_inferiors): Delete. The contents of that function
2772 has been inlined in lynx_mourn;
2773 (lynx_wait_1): Save the ptid in the process's private data.
2774 (lynx_mourn): Free the process' private data. Replace call
2775 to lynx_clear_inferiors by call to clear_inferiors.
2776
2777 2013-05-17 Yao Qi <yao@codesourcery.com>
2778
2779 * i386-low.c (i386_length_and_rw_bits): Move the comment to
2780 the right place.
2781
2782 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
2783
2784 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
2785 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
2786 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
2787 PT_TEXT_END_ADDR guards. Update comments.
2788 (linux_target_op) <read_offsets>: Conditionally define to
2789 linux_read_offsets if the target is UCLIBC and if it defines
2790 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
2791
2792 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
2793 Andrew Jenner <andrew@codesourcery.com>
2794
2795 * Makefile.in (SFILES): Add linux-nios2-low.c.
2796 (clean): Add action to delete nios2-linux.c.
2797 (nios2-linux.c): New rule.
2798 * configure.srv: Add nios2*-*-linux*.
2799 * linux-nios2-low.c: New.
2800
2801 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
2802
2803 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
2804
2805 2013-04-25 Hui Zhu <hui@codesourcery.com>
2806
2807 PR gdb/15186
2808 * ax.c (ax_printf): Add fflush.
2809
2810 2013-04-22 Tom Tromey <tromey@redhat.com>
2811
2812 * Makefile.in (SFILES): Add filestuff.c.
2813 (OBS): Add filestuff.o.
2814 (filestuff.o): New target.
2815 * config.in, configure: Rebuild.
2816 * configure.ac: Check for fdwalk, pipe2.
2817
2818 2013-04-17 Pedro Alves <palves@redhat.com>
2819
2820 * configure.ac (USE_THREAD_DB): Delete variable.
2821 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
2822 Don't AC_SUBST USE_THREAD_DB.
2823 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
2824 * config.in, configure: Regenerate.
2825
2826 2013-04-16 Pedro Alves <palves@redhat.com>
2827
2828 * linux-low.h (struct lwp_info) <thread_known>: Move under
2829 the USE_THREAD_DB #ifdef.
2830
2831 2013-04-16 Pedro Alves <palves@redhat.com>
2832
2833 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
2834 (linux-low.o): Delete rule.
2835 * linux-low.h: Always include "gdb_thread_db.h" instead of
2836 conditionally including thread_db.h.
2837 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
2838 HAVE_THREAD_DB_H.
2839
2840 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
2841
2842 * Makefile.in (install-only): Fix make install regression.
2843
2844 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
2845
2846 Convert man pages to texinfo, new gdbinit.5 texinfo page.
2847 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
2848 installation.
2849 * gdbserver.1: Remove.
2850
2851 2013-03-22 Pedro Alves <palves@redhat.com>
2852
2853 * linux-low.c (handle_extended_wait): Don't call
2854 linux_enable_event_reporting.
2855
2856 2013-03-15 Tony Theodore <tonyt@logyst.com>
2857
2858 PR build/9098:
2859 * Makefile.in (SHELL): Use @SHELL@.
2860
2861 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
2862
2863 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
2864 compiler warning.
2865
2866 2013-03-13 Joel Brobecker <brobecker@adacore.com>
2867
2868 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
2869 Remove extraneous NULL element.
2870
2871 2013-03-13 Yao Qi <yao@codesourcery.com>
2872
2873 * tracepoint.c (traceframe_read_tsv): Look for the last matched
2874 'V' block in trace frame.
2875
2876 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
2877
2878 * target.h (struct target_ops): Add btrace ops.
2879 (target_supports_btrace): New macro.
2880 (target_enable_btrace): New macro.
2881 (target_disable_btrace): New macro.
2882 (target_read_btrace): New macro.
2883 * gdbthread.h (struct thread_info): Add btrace field.
2884 * server.c: Include btrace-common.h.
2885 (handle_btrace_general_set): New function.
2886 (handle_btrace_enable): New function.
2887 (handle_btrace_disable): New function.
2888 (handle_general_set): Call handle_btrace_general_set.
2889 (handle_qxfer_btrace): New function.
2890 (struct qxfer qxfer_packets[]): Add btrace entry.
2891 * inferiors.c (remove_thread): Disable btrace.
2892 * linux-low: Include linux-btrace.h.
2893 (linux_low_enable_btrace): New function.
2894 (linux_low_read_btrace): New function.
2895 (linux_target_ops): Add btrace ops.
2896 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
2897 Add srv_linux_btrace=yes.
2898 (x86_64-*-linux*): Add linux-btrace.o.
2899 Add srv_linux_btrace=yes.
2900 * configure.ac: Define HAVE_LINUX_BTRACE.
2901 * config.in: Regenerated.
2902 * configure: Regenerated.
2903
2904 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
2905
2906 * server.c (handle_qxfer): Preserve error message if -3 is
2907 returned.
2908 (qxfer): Document the -3 return value.
2909
2910 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
2911
2912 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
2913 (linux_btrace_h): New variable.
2914 (linux-btrace.o): New rule.
2915
2916 2013-03-08 Stan Shebs <stan@codesourcery.com>
2917 Hafiz Abid Qadeer <abidh@codesourcery.com>
2918
2919 * tracepoint.c (trace_buffer_size): New global.
2920 (DEFAULT_TRACE_BUFFER_SIZE): New define.
2921 (init_trace_buffer): Change to one-argument function. Allocate
2922 trace buffer memory.
2923 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
2924 handle QTBuffer:size packet.
2925 (cmd_bigqtbuffer_size): New function.
2926 (initialize_tracepoint): Call init_trace_buffer with
2927 DEFAULT_TRACE_BUFFER_SIZE.
2928 * server.c (handle_query): Add QTBuffer:size in the
2929 supported packets.
2930
2931 2013-03-07 Yao Qi <yao@codesourcery.com>
2932
2933 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
2934 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
2935 of -1.
2936 (cmd_qtsp): Adjust condition. Do post increment.
2937 Set cur_action and cur_step_action back to 0.
2938
2939 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
2940
2941 PR server/15236
2942 * linux-low.c (linux_write_memory): Return early success if LEN is
2943 zero.
2944
2945 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
2946
2947 * configure.srv: Add x86_64-*-cygwin* as target.
2948
2949 2013-02-28 Tom Tromey <tromey@redhat.com>
2950
2951 * configure.ac: Invoke AC_SYS_LARGEFILE.
2952 * configure, config.in: Rebuild.
2953
2954 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
2955
2956 * win32-low.c: Throughout, fix format strings and casts of
2957 printf-like functions to avoid type related warnings on all
2958 platforms.
2959 (get_child_debug_event): Print dwDebugEventCode as hex since
2960 that's how it's usually documented.
2961
2962 2013-02-28 Yao Qi <yao@codesourcery.com>
2963
2964 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
2965 pulongest.
2966
2967 2013-02-27 Jiong Wang <jiwang@tilera.com>
2968
2969 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
2970 (reg-tilegx32.c): New rule.
2971 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
2972 * linux-tile-low.c (tile_arch_setup): New function. Invoke
2973 different register info initializer according to elf class.
2974 (init_registers_tilgx32): New function. The tilegx32 register info
2975 initializer.
2976 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
2977 (tile_store_gregset): Likewise.
2978
2979 2013-02-27 Yao Qi <yao@codesourcery.com>
2980
2981 * server.c (process_point_options): Print debug message when
2982 debug_threads is true.
2983
2984 2013-02-26 Yao Qi <yao@codesourcery.com>
2985
2986 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
2987
2988 2013-02-19 Pedro Alves <palves@redhat.com>
2989 Kai Tietz <ktietz@redhat.com>
2990
2991 PR gdb/15161
2992
2993 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
2994 instead of strtoul to extract address from packet.
2995 (process_serial_event) <'z'>: Likewise.
2996
2997 2013-02-18 Yao Qi <yao@codesourcery.com>
2998
2999 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
3000
3001 2013-02-14 Pedro Alves <palves@redhat.com>
3002
3003 Plug memory leak.
3004
3005 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
3006 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
3007
3008 2013-02-14 Pedro Alves <palves@redhat.com>
3009
3010 * tracepoint.c (cmd_qtdpsrc): Use savestring.
3011
3012 2013-02-14 Pedro Alves <palves@redhat.com>
3013
3014 * tracepoint.c (save_string): Delete.
3015 (add_tracepoint_action): Use savestring instead of save_string.
3016
3017 2013-02-12 Pedro Alves <palves@redhat.com>
3018
3019 * linux-xtensa-low.c: Ditto.
3020 * xtensa-xtregs.c: Ditto.
3021
3022 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
3023
3024 * thread-db.c (thread_db_get_tls_address): NULL pointer check
3025 thread_db.
3026
3027 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
3028
3029 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
3030 aarch64_num_wp_regs and aarch64_num_bp_regs to
3031 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
3032
3033 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
3034
3035 * linux-aarch64-low.c (ps_get_thread_area): Replace
3036 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
3037
3038 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
3039 Marcus Shawcroft <marcus.shawcroft@arm.com>
3040 Nigel Stephens <nigel.stephens@arm.com>
3041 Yufeng Zhang <yufeng.zhang@arm.com>
3042
3043 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
3044 (aarch64.c, aarch64-without-fpu.c): New targets.
3045 * configure.srv (aarch64*-*-linux*): New.
3046 * linux-aarch64-low.c: New file.
3047
3048 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
3049
3050 * linux-low.c (handle_extended_wait, linux_create_inferior)
3051 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
3052 (dequeue_one_deferred_signal, linux_resume_one_thread)
3053 (fetch_register, linux_write_memory, linux_enable_event_reporting)
3054 (linux_tracefork_grandchild, linux_test_for_tracefork)
3055 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
3056 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
3057 where the argument is 0.
3058
3059 2013-01-25 Yao Qi <yao@codesourcery.com>
3060
3061 * event-loop.c: Include "queue.h".
3062 (gdb_event_p): New typedef.
3063 (struct gdb_event) <next_event>: Remove.
3064 (event_queue): Change to QUEUE(gdb_event_p).
3065 (async_queue_event): Remove.
3066 (gdb_event_xfree): New.
3067 (initialize_event_loop): New.
3068 (process_event): Use API from QUEUE.
3069 (wait_for_event): Likewise.
3070 * server.c (main): Call initialize_event_loop.
3071 * server.h (initialize_event_loop): Declare.
3072
3073 2013-01-18 Yao Qi <yao@codesourcery.com>
3074
3075 * ax.h (struct eval_agent_expr_context): New.
3076 (gdb_eval_agent_expr): Update declaration.
3077 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
3078 TFRAME. Add new argument CTX.
3079 * server.h (struct eval_agent_expr_context): Declare.
3080 (agent_mem_read, agent_tsv_read): Update declaration.
3081 (agent_mem_read_string): Likewise.
3082 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
3083 (add_traceframe_block): Add new argument TPOINT.
3084 Increase TPOINT->traceframe_usage.
3085 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
3086 eval_tracepoint_agent_expr.
3087 (condition_true_at_tracepoint): Likewise.
3088 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
3089 (agent_mem_read_string, agent_tsv_read): Likewise.
3090
3091 2013-01-16 Yao Qi <yao@codesourcery.com>
3092
3093 * linux-low.c (linux_resume_one_lwp): Don't check
3094 'lwp->bp_reinsert != 0'.
3095
3096 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3097 Pedro Alves <palves@redhat.com>
3098
3099 * lynx-low.c (ptrace_request_to_str): Define a temporary
3100 macro and use it to simplify this function's implementation.
3101
3102 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3103
3104 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
3105 sets errno.
3106
3107 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3108
3109 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
3110
3111 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3112
3113 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
3114
3115 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3116
3117 * lynx-low.c (lynx_resume): Use the resume_info parameter
3118 to determine the ptid for the lynx_ptrace call, unless
3119 it is equal to minus_one_ptid, in which case we use the
3120 ptid of the current_inferior.
3121 (lynx_wait_1): After having received a thread create/exit
3122 event, resume the inferior's execution using the signaling
3123 thread's ptid, rather than the old ptid.
3124
3125 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3126
3127 * lynx-low.c (lynx_resume): Delete variable ret.
3128
3129 2013-01-01 Joel Brobecker <brobecker@adacore.com>
3130
3131 * gdbreplay.c (gdbreplay_version): Update copyright year.
3132 * server.c (gdbserver_version): Likewise.
3133
3134 2012-12-17 Joel Brobecker <brobecker@adacore.com>
3135
3136 * lynx-low.c (lynx_wait_1): Add debug trace before adding
3137 new thread.
3138
3139 2012-12-17 Joel Brobecker <brobecker@adacore.com>
3140
3141 * lynx-low.c (ptrace_request_to_str): Add handling for
3142 PTRACE_GETTRACESIG.
3143
3144 2012-12-17 Joel Brobecker <brobecker@adacore.com>
3145
3146 * lynx-low.c (lynx_attach): Delete variable new_process.
3147
3148 2012-12-17 Joel Brobecker <brobecker@adacore.com>
3149
3150 * lynx-low.c (lynx_create_inferior): Delete variable
3151 new_process.
3152
3153 2012-12-17 Joel Brobecker <brobecker@adacore.com>
3154
3155 * lynx-low.c (ptrace_request_to_str): Do not handle
3156 PTRACE_GETTHREADLIST if this macro does not exist.
3157
3158 2012-12-15 Yao Qi <yao@codesourcery.com>
3159
3160 * Makefile.in (OBS): Add notif.o.
3161 * notif.c, notif.h: New.
3162 * server.c: Include "notif.h".
3163 (struct vstop_notif) <next>: Remove.
3164 <base>: New field.
3165 (queue_stop_reply): Update.
3166 (push_event, send_next_stop_reply): Remove.
3167 (discard_queued_stop_replies): Update.
3168 (notif_stop): New variable.
3169 (handle_v_stopped): Remove.
3170 (handle_v_requests): Don't call handle_v_stopped. Call
3171 handle_ack_notif instead.
3172 (queue_stop_reply_callback): Call notif_event_enque instead
3173 of queue_stop_reply.
3174 (handle_status): Don't call send_next_stop_reply, call
3175 notif_write_event instead.
3176 (kill_inferior_callback): Likewise.
3177 (detach_or_kill_inferior_callback): Likewise.
3178 (main): Call initialize_notif.
3179 (process_serial_event): Call QUEUE_is_empty.
3180 (handle_target_event): Call notif_push instead of push event.
3181 * server.h (push_event): Remove declaration.
3182
3183 2012-12-10 Tom Tromey <tromey@redhat.com>
3184
3185 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
3186 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
3187 macros.
3188 (.c.o): Rewrite.
3189 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
3190 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
3191 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
3192 (amd64-linux-ipa.o, ax.o): Rewrite.
3193 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
3194 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
3195 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
3196 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
3197 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
3198 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
3199 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
3200 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
3201 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
3202 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
3203 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
3204 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
3205 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
3206 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
3207 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
3208 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
3209 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
3210 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
3211 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
3212 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
3213 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
3214 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
3215 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
3216 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
3217 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
3218 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
3219 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
3220 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
3221 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
3222 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
3223 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
3224 (reg-tilegx.o): Remove.
3225 (all_object_files): New macro.
3226 Include .deps files.
3227 * aclocal.m4, configure: Rebuild.
3228 * acinclude.m4: Include depstand.m4, lead-dot.m4.
3229 * configure.ac: Invoke ZW_CREATE_DEPDIR,
3230 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
3231
3232 2012-12-05 Tom Tromey <tromey@redhat.com>
3233
3234 PR gdb/14917:
3235 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
3236
3237 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
3238
3239 * configure.ac: Check for linux/perf_event.h.
3240 * config.in: Regenerated.
3241 * configure: Regenerated.
3242
3243 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
3244
3245 * hostio.c (handle_readlink): Decrease buffer size
3246 parameter passed to readlink by one byte.
3247
3248 2012-11-26 Yao Qi <yao@codesourcery.com>
3249
3250 * configure.ac (build_warnings): Append '-Wempty-body'.
3251 * configure: Regenerated.
3252 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
3253 body.
3254
3255 2012-11-15 Pierre Muller <muller@sourceware.org>
3256
3257 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
3258 * config.in: Regenerate.
3259 * configure: Regenerate.
3260 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
3261 Use "gdb_wait.h" header instead of <sys/wait.h> header.
3262 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
3263 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
3264 header.
3265 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
3266 instead of <sys/wait.h> header.
3267 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
3268
3269 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3270
3271 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
3272 (various make rules): Remove -DGDBSERVER
3273
3274 2012-11-09 Yao Qi <yao@codesourcery.com>
3275
3276 * spu-low.c (current_ptid): Move it to ..
3277 * gdbthread.h: ... here. New.
3278 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
3279 * server.c (myresume, process_serial_event): Likewise.
3280 * thread-db.c (thread_db_find_new_threads): Likewise.
3281 * tracepoint.c (run_inferior_command): Likewise.
3282
3283 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
3284
3285 * server.c (handle_search_memory_1): Include access length in
3286 warning message.
3287
3288 2012-09-05 Michael Brandt <michael.brandt@axis.com>
3289
3290 * linux-crisv32-low.c: Fix compile errors.
3291
3292 2012-09-04 Yao Qi <yao@codesourcery.com>
3293
3294 * tracepoint.c (cmd_qtsv): Adjust debug message.
3295 Don't check CUR_TPOINT.
3296
3297 2012-08-28 Yao Qi <yao@codesourcery.com>
3298
3299 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
3300 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
3301 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
3302 Remove declarations of xmalloc, xreallloc, xstrdup and
3303 freeargv.
3304 * Makefile.in (libiberty_h): New.
3305 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
3306 (linux-bfin-low.o): Append dependency 'libiberty.h'.
3307
3308 2012-08-23 Yao Qi <yao@codesourcery.com>
3309
3310 * server.h: Remove declaration of 'xsnprintf'.
3311
3312 2012-08-22 Keith Seitz <keiths@redhat.com>
3313
3314 * server.h: Include build-gnulib-gbserver/config.h.
3315 * gdbreplay.c: Likewise.
3316
3317 2012-08-08 Doug Evans <dje@google.com>
3318
3319 * Makefile.in (SFILES): Add gdb_vecs.c.
3320 (OBS): Add gdb_vecs.o.
3321 (gdb_vecs_h, host_defs_h): New variables.
3322 (thread-db.o): Add $(gdb_vecs_h) dependency.
3323 (gdb_vecs.o): New rule.
3324 * thread-db.c: #include "gdb_vecs.h".
3325 (thread_db_load_search): Use a vector to iterate over path elements.
3326 Handle text appearing after "$pdir".
3327
3328 * configure.ac: Add check for strstr.
3329 * config.in: Regenerate.
3330 * configure: Regenerate.
3331
3332 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
3333
3334 * hostio.c (handle_pread): If pread fails, fall back to attempting
3335 lseek/read.
3336 (handle_pwrite): Likewise for pwrite.
3337
3338 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
3339
3340 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
3341 between unsupported TYPE and unimplementable ADDR/LEN combination.
3342 (arm_insert_point): Act on new return value.
3343
3344 2012-07-31 Pedro Alves <palves@redhat.com>
3345
3346 * server.c (process_point_options): Only skip tokens if we find
3347 one that is unrecognized. Don't treat 'X' specially while
3348 skipping unrecognized tokens.
3349
3350 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
3351
3352 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
3353 to 4-byte-align HW breakpoint addresses for Thumb.
3354
3355 2012-07-27 Yao Qi <yao@codesourcery.com>
3356
3357 PR remote/14161.
3358
3359 * server.h: Declare gdb_agent_about_to_close.
3360 * target.c (kill_inferior): Include "agent.h".
3361 New. Send command 'kill'.
3362 * target.h (kill_inferior): Removed macro.
3363 * tracepoint.c (gdb_agent_about_to_close): New.
3364 (gdb_agent_helper_thread): Handle command 'close'.
3365 Wait endlessly until the inferior stops.
3366 Install gdb_agent_remove_socket to atexit hook.
3367 (agent_socket_name): New static variable.
3368 (gdb_agent_socket_init): Replace local variable 'name' with
3369 'agent_socket_name'.
3370 (gdb_agent_remove_socket): New.
3371
3372 2012-07-27 Yao Qi <yao@codesourcery.com>
3373
3374 * server.c (process_point_options): Stop at 'X' when parsing.
3375
3376 2012-07-19 Michael Eager <eager@eagercon.com>
3377
3378 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
3379 to hw_execute.
3380 * linux-x86-low.c (x86_insert_point, x86_remove_point):
3381 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
3382 hardware breakpoint.
3383
3384 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
3385
3386 * gdbserver/linux-low.c (initialize_low): Call
3387 linux_ptrace_init_warnings.
3388
3389 2012-07-02 Doug Evans <dje@google.com>
3390
3391 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
3392 pointer to int.
3393
3394 2012-07-02 Stan Shebs <stan@codesourcery.com>
3395
3396 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
3397 (ax.o): Add it to build rule.
3398 (ax-ipa.o): Ditto.
3399 (OBS): Add format.o.
3400 (IPA_OBS): Add format.o.
3401 * server.c (handle_query): Claim support for breakpoint commands.
3402 (process_point_options): Add command case.
3403 (process_serial_event): Leave running if there are printfs in
3404 effect.
3405 * mem-break.h (any_persistent_commands): Declare.
3406 (add_breakpoint_commands): Declare.
3407 (gdb_no_commands_at_breakpoint): Declare.
3408 (run_breakpoint_commands): Declare.
3409 * mem-break.c (struct point_command_list): New struct.
3410 (struct breakpoint): New field command_list.
3411 (any_persistent_commands): New function.
3412 (add_commands_to_breakpoint): New function.
3413 (add_breakpoint_commands): New function.
3414 (gdb_no_commands_at_breakpoint): New function.
3415 (run_breakpoint_commands): New function.
3416 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
3417 locally.
3418 * ax.c: Include format.h.
3419 (ax_printf): New function.
3420 (gdb_eval_agent_expr): Add printf opcode.
3421
3422 2012-06-13 Yao Qi <yao@codesourcery.com>
3423
3424 * server.c (start_inferior): Remove duplicated writes to fields
3425 'last_resume_kind' and 'last_status' of 'current_inferior'.
3426
3427 2012-06-12 Yao Qi <yao@codesourcery.com>
3428 Pedro Alves <palves@redhat.com>
3429
3430 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
3431 comment.
3432 * server.c (handle_v_cont): Extend comment.
3433
3434 2012-06-11 Yao Qi <yao@codesourcery.com>
3435
3436 * linux-low.c (linux_attach): Add 'static'.
3437
3438 2012-06-06 Yao Qi <yao@codesourcery.com>
3439
3440 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
3441
3442 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
3443
3444 Fix gcc -flto compilation warning.
3445 * server.c (main): Make variable multi_mode and attach volatile.
3446
3447 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
3448
3449 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
3450 if the platform doesn't know about it.
3451
3452 2012-05-30 Jeff Kenton <jkenton@tilera.com>
3453
3454 * Makefile.in (SFILES): Add linux-tile-low.c.
3455 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
3456 * configure.srv: Handle tilegx-*-linux*.
3457 * linux-tile-low.c: New file.
3458
3459 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
3460
3461 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
3462
3463 2012-05-24 Pedro Alves <palves@redhat.com>
3464
3465 PR gdb/7205
3466
3467 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
3468
3469 2012-05-24 Pedro Alves <palves@redhat.com>
3470
3471 PR gdb/7205
3472
3473 Replace target_signal with gdb_signal throughout.
3474
3475 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
3476
3477 * linux-low.c (linux_store_registers): Avoid the copying sequence
3478 when no data has been retrieved by ptrace.
3479
3480 2012-05-22 Will Deacon <will.deacon@arm.com>
3481
3482 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
3483 Include asm/ptrace.h.
3484 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
3485 already defined.
3486
3487 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
3488
3489 * linux-low.c (linux_store_registers): Don't re-retrieve data
3490 with ptrace that has already been obtained from /proc. Always
3491 copy any data retrieved with ptrace to the buffer supplied.
3492
3493 2012-05-11 Yao Qi <yao@codesourcery.com>
3494 Pedro Alves <palves@redhat.com>
3495
3496 * linux-low.c (enum stopping_threads_kind): New.
3497 (stopping_threads): Change type to `enum stopping_threads_kind'.
3498 (handle_extended_wait): If stopping and suspending threads, leave
3499 the new_lwp suspended too.
3500 (linux_wait_for_event): Adjust.
3501 (stop_all_lwps): Set `stopping_threads' to
3502 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
3503 whether we're suspending threads or just stopping them. Assert no
3504 recursion happens.
3505
3506 2012-04-29 Yao Qi <yao@codesourcery.com>
3507
3508 * server.h: Move some code to ...
3509 * gdbthread.h: ... here. New.
3510 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
3511 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
3512 (nto-low.o, win32-low.o): Likewise.
3513 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
3514 * regcache.c, remote-utils.c, server.c: Likewise.
3515 * target.c, tracepoint.c, win32-low.c: Likewise.
3516
3517 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
3518
3519 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
3520 (PTRACE_ARG4_TYPE): Likewise.
3521 (PTRACE_XFER_TYPE): Likewise.
3522 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
3523 ptrace to PTRACE_ARG3_TYPE.
3524 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
3525 (PTRACE_ARG4_TYPE): Likewise.
3526 (PTRACE_XFER_TYPE): Likewise.
3527 (linux_detach_one_lwp): Cast fourth argument of
3528 ptrace to long then PTRACE_ARG4_TYPE.
3529 (regsets_fetch_inferior_registers): Cast third argument of
3530 ptrace to long then PTRACE_ARG3_TYPE.
3531 (regsets_store_inferior_registers): Likewise.
3532
3533 2012-04-20 Pedro Alves <palves@redhat.com>
3534
3535 * configure: Regenerate.
3536
3537 2012-04-19 Pedro Alves <palves@redhat.com>
3538
3539 * Makefile.in (GNULIB_BUILDDIR): New.
3540 (LIBGNU, INCGNU, GNULIB_H): Adjust.
3541 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
3542 (all, install-only, uninstall, clean-info, all-lib, clean): No
3543 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
3544 (maintainer-clean realclean distclean): Use subdir_do.
3545 (subdir_do): New.
3546 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
3547 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
3548 * acinclude.m4: Include acx_configure_dir.m4.
3549 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
3550 calls. Call AC_PROG_RANLIB. Configure gnulib using
3551 ACX_CONFIGURE_DIR.
3552 (GNULIB): New.
3553 (GNULIB_STDINT_H): Adjust.
3554 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
3555 * gdbreplay.c: Include build-gnulib/config.h.
3556 * server.h: Likewise.
3557 * aclocal.m4: Regenerate.
3558 * config.in: Regenerate.
3559 * configure: Regenerate.
3560
3561 2012-04-19 Pedro Alves <palves@redhat.com>
3562
3563 * Makefile.in (LIBGNU, INCGNU): Adjust.
3564 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
3565 (all, install-only, uninstall, clean-info, all-lib, clean)
3566 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
3567 * configure.ac: Adjust AC_OUTPUT output.
3568 * aclocal.m4: Regenerate.
3569 * configure: Regenerate.
3570
3571 2012-04-19 Pedro Alves <palves@redhat.com>
3572
3573 * Makefile.in (generated_files): New.
3574 (server_h): Remove the explicit dependency on config.h, and depend
3575 on $generated_files.
3576
3577 2012-04-19 Pedro Alves <palves@redhat.com>
3578
3579 * Makefile.in (INCGNU): Add -Ignulib.
3580
3581 2012-04-19 Pedro Alves <palves@redhat.com>
3582
3583 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
3584 (INCGNU): ... this, and spell out -I here.
3585 (GNULIB_LIB): Rename to ...
3586 (LIBGNU): ... this.
3587 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
3588
3589 2012-04-19 Pedro Alves <palves@redhat.com>
3590
3591 * config.in: Regenerate.
3592
3593 2012-04-19 Pedro Alves <palves@redhat.com>
3594
3595 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
3596 * server.h (memmem): Remove declaration.
3597 * config.in: Regenerate.
3598 * configure: Regenerate.
3599
3600 2012-04-19 Yao Qi <yao@codesourcery.com>
3601
3602 * Makefile.in (SFILES): Add common/vec.c.
3603 (OBS): Add vec.o.
3604 (vec.o): New rule.
3605
3606 2012-04-19 Yao Qi <yao@codesourcery.com>
3607
3608 * remote-utils.c (prepare_resume_reply): Replace with macro
3609 target_core_of_thread.
3610 * server.c (handle_qxfer_threads_proper): Likewise.
3611 * target.h (traget_core_of_thread): New macro.
3612
3613 2012-04-18 Pedro Alves <palves@redhat.com>
3614
3615 * aclocal.m4: Regenerate.
3616 * configure: Regenerate.
3617
3618 2012-04-16 Yao Qi <yao@codesourcery.com>
3619
3620 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
3621 duplicated on address.
3622
3623 2012-04-16 Yao Qi <yao@codesourcery.com>
3624
3625 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
3626 (struct tracepoint_action_ops) <send>: New field.
3627 (m_tracepoint_action_send, r_tracepoint_action_send): New.
3628 (agent_expr_send, x_tracepoint_action_send): New.
3629 (l_tracepoint_action_send): New.
3630 (cmd_qtdp): Download and install tracepoint
3631 according to `use_agent'.
3632 (run_inferior_command): Add one more parameter `len'.
3633 Update callers.
3634 (tracepoint_send_agent): New.
3635 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
3636
3637 2012-04-16 Yao Qi <yao@codesourcery.com>
3638
3639 * tracepoint.c (download_tracepoints): Moved to ...
3640 (cmd_qtstart): ... here.
3641
3642 2012-04-14 Yao Qi <yao@codesourcery.com>
3643
3644 * tracepoint.c: Include inttypes.h.
3645 (struct collect_memory_action): Use sized types.
3646 (struct tracepoint): Likewise.
3647 (cmd_qtdp, stop_tracing): Update print specifiers.
3648 (cmd_qtp, response_tracepoint): Likewise.
3649 (collect_data_at_tracepoint): Likewise.
3650 (collect_data_at_step): Likewise.
3651
3652 2012-04-14 Yao Qi <yao@codesourcery.com>
3653
3654 Import gnulib module inttypes.
3655 * aclocal.m4, config.in, configure: Regenerated.
3656
3657 2012-04-14 Yao Qi <yao@codesourcery.com>
3658
3659 * Makefile.in (maintainer-clean, realclean, distclean): Remove
3660 Makefile and config.status at last.
3661
3662 2012-04-13 Yao Qi <yao@codesourcery.com>
3663
3664 * tracepoint.c: Include stdint.h unconditionally.
3665
3666 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
3667
3668 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
3669 on BFD_HAVE_SYS_PROCFS_TYPE.
3670 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
3671 * configure: Regenerate.
3672 * config.in: Likewise.
3673
3674 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
3675
3676 * Makefile.in (clean): Also remove x32.c x32-linux.c
3677 x32-avx.c x32-avx-linux.c.
3678 (x32.o): New target.
3679 (x32.c): Likewise.
3680 (x32-linux.o): Likewise.
3681 (x32-linux.c): Likewise.
3682 (x32-avx.o): Likewise.
3683 (x32-avx.c): Likewise.
3684 (x32-avx-linux.o): Likewise.
3685 (x32-avx-linux.c): Likewise.
3686
3687 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
3688 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
3689 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
3690 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
3691 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
3692 i386/x32-avx-linux.xml.
3693
3694 * linux-x86-low.c (init_registers_x32_linux): New prototype.
3695 (init_registers_x32_avx_linux): Likwise.
3696 (x86_linux_update_xmltarget): Call init_registers_x32_linux
3697 or init_registers_x32_avx_linux if linux_is_elf64 is false.
3698
3699 2012-04-13 Pedro Alves <palves@redhat.com>
3700
3701 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
3702 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
3703 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
3704 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
3705 the sub-make.
3706
3707 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
3708
3709 * linux-x86-low.c (compat_x32_clock_t): New.
3710 (compat_x32_siginfo_t): Likewise.
3711 (compat_x32_siginfo_from_siginfo): Likewise.
3712 (siginfo_from_compat_x32_siginfo): Likewise.
3713 (linux_is_elf64): Likewise.
3714 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
3715 and siginfo_from_compat_x32_siginfo for x32.
3716 (x86_arch_setup): Set linux_is_elf64.
3717
3718 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
3719
3720 PR gdb/13969
3721 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
3722 e_machine field.
3723 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
3724 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
3725 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
3726 compatible with process.
3727
3728 2012-04-12 Yao Qi <yao@codesourcery.com>
3729
3730 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
3731 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
3732 (install-only, install-info, clean): Handle sub dir gnulib.
3733 (all-lib, am--refresh): New targets.
3734 (memmem.o): Remove target.
3735 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
3736 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
3737 (AC_REPLACE_FUNCS): Remove memmem.
3738 Invoke gl_INIT and AM_INIT_AUTOMAKE.
3739 (AC_OUTPUT): Generate Makefile in gnulib/.
3740 * aclocal.m4, config.in, configure: Regenerated.
3741
3742 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
3743
3744 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
3745
3746 2012-04-05 Pedro Alves <palves@redhat.com>
3747
3748 -Werror=strict-aliasing
3749
3750 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
3751 pointer.
3752
3753 2012-04-04 Pedro Alves <palves@redhat.com>
3754
3755 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
3756 (sparc_store_gregset_from_stack, sparc_store_gregset)
3757 (sparc_breakpoint_at): Fix formatting.
3758
3759 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
3760
3761 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
3762 are available.
3763 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
3764 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
3765 * config.in: Regenerate.
3766 * configure: Likewise.
3767
3768 2012-03-29 Pedro Alves <palves@redhat.com>
3769
3770 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
3771 Correct ptrace arguments.
3772
3773 2012-03-28 Pedro Alves <palves@redhat.com>
3774
3775 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
3776 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
3777 (IA64_FR1_REGNUM): New defines.
3778 (ia64_fetch_register): New.
3779 (the_low_target): Install it.
3780 * linux-low.h (struct linux_target_ops) <fetch_register>: New
3781 field.
3782 * linux-low.c (linux_fetch_registers): Try the
3783 the_low_target.fetch_register hook first.
3784
3785 * linux-arm-low.c (the_low_target): Adjust.
3786 * linux-bfin-low.c (the_low_target): Adjust.
3787 * linux-cris-low.c (the_low_target): Adjust.
3788 * linux-crisv32-low.c (the_low_target): Adjust.
3789 * linux-m32r-low.c (the_low_target): Adjust.
3790 * linux-m68k-low.c (the_low_target): Adjust.
3791 * linux-mips-low.c (the_low_target): Adjust.
3792 * linux-ppc-low.c (the_low_target): Adjust.
3793 * linux-s390-low.c (the_low_target): Adjust.
3794 * linux-sh-low.c (the_low_target): Adjust.
3795 * linux-sparc-low.c (the_low_target): Adjust.
3796 * linux-tic6x-low.c (the_low_target): Adjust.
3797 * linux-x86-low.c (the_low_target): Adjust.
3798 * linux-xtensa-low.c (the_low_target): Adjust.
3799
3800 2012-03-26 Pedro Alves <palves@redhat.com>
3801
3802 * server.c (handle_qxfer_libraries): Don't bail early if
3803 the_target->qxfer_libraries_svr4 is not NULL.
3804
3805 2012-03-26 Pedro Alves <palves@redhat.com>
3806
3807 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
3808
3809 2012-03-23 Pedro Alves <palves@redhat.com>
3810
3811 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
3812 "library-list-svr4" element's start tag when the the DSO list is
3813 empty.
3814
3815 2012-03-23 Pedro Alves <palves@redhat.com>
3816
3817 * linux-low.c (read_one_ptr): Read the inferior's pointer through
3818 a variable whose type size is the same as the inferior's pointer
3819 size.
3820
3821 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
3822
3823 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
3824 struct siginfo.
3825 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
3826 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
3827 * linux-low.h: Include <signal.h>.
3828 (struct siginfo): Remove forward declaration.
3829 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
3830 struct siginfo.
3831
3832 2012-03-21 Mike Frysinger <vapier@gentoo.org>
3833
3834 * .gitignore: Ignore more files.
3835
3836 2012-03-19 Pedro Alves <palves@redhat.com>
3837 Jan Kratochvil <jan.kratochvil@redhat.com>
3838
3839 * server.c (cont_thread, general_thread): Add describing comments.
3840 (start_inferior): Clear `cont_thread'.
3841 (handle_v_cont): Don't set `cont_thread' if resuming all threads
3842 of a process.
3843
3844 2012-03-15 Yao Qi <yao@codesourcery.com>
3845
3846 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
3847 handling to ...
3848 (cmd_qtdp): ... here.
3849
3850 2012-03-15 Yao Qi <yao@codesourcery.com>
3851
3852 * tracepoint.c (struct tracepoint_action_ops): New.
3853 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
3854 (m_tracepoint_action_download): New.
3855 (r_tracepoint_action_download): New.
3856 (x_tracepoint_action_download): New.
3857 (l_tracepoint_action_download): New.
3858 (add_tracepoint_action): Install `action->ops' according type.
3859 (download_tracepoint_1): Move code `download' function pointer
3860 of various tracepoint_action_ops.
3861
3862 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
3863
3864 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
3865 linux_ptrace_attach_warnings.
3866
3867 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
3868
3869 * Makefile.in (linux-ptrace.o): New.
3870 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
3871 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
3872 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
3873 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
3874 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
3875 of these targets.
3876 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
3877
3878 2012-03-08 Yao Qi <yao@codesourcery.com>
3879 Pedro Alves <palves@redhat.com>
3880
3881 Fix PR server/13392.
3882 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
3883 offset of JMP insn.
3884 * tracepoint.c (remove_tracepoint): New.
3885 (cmd_qtdp): Call remove_tracepoint when failed to install.
3886
3887 2012-03-07 Pedro Alves <palves@redhat.com>
3888
3889 * linux-low.c (get_detach_signal): New.
3890 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
3891 Pass on pending signals to PTRACE_DETACH. Check the result of the
3892 ptrace call.
3893 * server.c (program_signals, program_signals_p): New.
3894 (handle_general_set): Handle QProgramSignals.
3895 * server.h (program_signals, program_signals_p): Declare.
3896
3897 2012-03-05 Pedro Alves <palves@redhat.com>
3898 Jan Kratochvil <jan.kratochvil@redhat.com>
3899
3900 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
3901 New comment why.
3902
3903 2012-03-03 Yao Qi <yao@codesourcery.com>
3904
3905 * tracepoint.c (tracepoint_look_up_symbols): Update call to
3906 agent_look_up_symbols.
3907
3908 2012-03-03 Yao Qi <yao@codesourcery.com>
3909
3910 * Makefile.in (linux-low.o): Keep dependence on agent.h.
3911 (linux-x86-low.o): Likewise.
3912 * server.h: Remove in_process_agent_loaded.
3913 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
3914 common/agent.c.
3915 Update callers.
3916
3917 2012-03-03 Yao Qi <yao@codesourcery.com>
3918
3919 * tracepoint.c (gdb_agent_capability): New global.
3920 (in_process_agent_loaded_ust): Renamed to
3921 `in_process_agent_supports_ust'.
3922 Update callers.
3923 (in_process_agent_supports_ust): Call agent_capability_check.
3924 (clear_installed_tracepoints): Assert that agent supports
3925 agent.
3926
3927 2012-03-03 Yao Qi <yao@codesourcery.com>
3928
3929 * linux-low.c (linux_supports_agent): New.
3930 (linux_target_ops): Initialize field `supports_agent' with
3931 linux_supports_agent.
3932 * target.h (struct target_ops) <supports_agent>: New.
3933 (target_supports_agent): New macro.
3934 * server.c (handle_general_set): Handle packet 'QAgent'.
3935 (handle_query): Send `QAgent+'.
3936 * Makefile.in (server.o): Depends on agent.h.
3937
3938 2012-03-03 Yao Qi <yao@codesourcery.com>
3939
3940 * Makefile.in (OBS): Add agent.o.
3941 Add new rule for agent.o.
3942 Track dependence of tracepoint.c on agent.h.
3943 * tracepoint.c (run_inferior_command_1):
3944 (run_inferior_command): Call agent_run_command.
3945 (gdb_ust_connect_sync_socket): Deleted. Move it to
3946 common/agent.c.
3947 (resume_thread, stop_thread): Likewise.
3948 (gdb_ust_socket_init): Renamed to ...
3949 (gdb_agent_socket_init): ... New.
3950 (gdb_ust_thread): Renamed to ...
3951 (gdb_agent_helper_thread): ... New.
3952 (gdb_ust_init): Move some code to ...
3953 (gdb_agent_init): ... here. New.
3954 [HAVE_UST]: Call gdb_ust_init.
3955 (initialize_tracepoint_ftlib): Call gdb_agent_init.
3956 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
3957 * config.in, configure: Regenerated.
3958
3959 2012-03-02 Pedro Alves <palves@redhat.com>
3960
3961 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
3962 * linux-low.c (struct simple_pid_list): New.
3963 (stopped_pids): New a struct simple_pid_list pointer.
3964 (add_to_pid_list, pull_pid_from_list): New.
3965 (handle_extended_wait): Don't assume the first signal new children
3966 report is SIGSTOP. Adjust call to pull_pid_from_list.
3967 (linux_wait_for_lwp): Adjust.
3968
3969 2012-03-02 Yao Qi <yao@codesourcery.com>
3970
3971 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
3972 debug log.
3973
3974 2012-03-02 Yao Qi <yao@codesourcery.com>
3975
3976 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
3977 `stop_pc' and `tpoint'. Update caller.
3978
3979 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
3980
3981 * linux-low.h (linux_target_ops): Add regset_bitmap member.
3982 * linux-low.c (use_linux_regsets): New macro.
3983 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
3984 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
3985 (linux_register_in_regsets): New function.
3986 (usr_fetch_inferior_registers): Skip registers covered by
3987 regsets.
3988 (usr_store_inferior_registers): Likewise.
3989 (usr_fetch_inferior_registers): New macro.
3990 (usr_store_inferior_registers): Likewise.
3991 (linux_fetch_registers): Handle mixed regset/non-regset targets.
3992 (linux_store_registers): Likewise.
3993 * linux-mips-low.c (init_registers_mips_dsp_linux): New
3994 prototype.
3995 (init_registers_mips64_dsp_linux): Likewise.
3996 (init_registers_mips_linux): New macro.
3997 (init_registers_mips_dsp_linux): Likewise.
3998 (mips_dsp_num_regs): Likewise.
3999 (DSP_BASE, DSP_CONTROL): New fallback macros.
4000 (mips_base_regs): New macro.
4001 (mips_regmap): Use it. Fix the size.
4002 (mips_dsp_regmap): New variable.
4003 (mips_dsp_regset_bitmap): Likewise.
4004 (mips_arch_setup): New function.
4005 (mips_cannot_fetch_register): Use the_low_target.regmap rather
4006 than mips_regmap.
4007 (mips_cannot_store_register): Likewise.
4008 (the_low_target): Update .arch_setup, .num_regs and .regmap
4009 initializers. Add .regset_bitmap initializer.
4010 * linux-arm-low.c (the_low_target): Add .regset_bitmap
4011 initializer.
4012 * linux-bfin-low.c (the_low_target): Likewise.
4013 * linux-cris-low.c (the_low_target): Likewise.
4014 * linux-crisv32-low.c (the_low_target): Likewise.
4015 * linux-ia64-low.c (the_low_target): Likewise.
4016 * linux-m32r-low.c (the_low_target): Likewise.
4017 * linux-m68k-low.c (the_low_target): Likewise.
4018 * linux-ppc-low.c (the_low_target): Likewise.
4019 * linux-s390-low.c (the_low_target): Likewise.
4020 * linux-sh-low.c (the_low_target): Likewise.
4021 * linux-sparc-low.c (the_low_target): Likewise.
4022 * linux-tic6x-low.c (the_low_target): Likewise.
4023 * linux-x86-low.c (the_low_target): Likewise.
4024 * linux-xtensa-low.c (the_low_target): Likewise.
4025 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
4026 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
4027 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
4028 srv_xmlfiles.
4029 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
4030 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
4031
4032 2012-02-29 Yao Qi <yao@codesourcery.com>
4033 Pedro Alves <palves@redhat.com>
4034
4035 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
4036 `step_over_finished' is true.
4037
4038 2012-02-27 Pedro Alves <palves@redhat.com>
4039
4040 * linux-low.c (pid_is_stopped): Delete, moved to common/.
4041 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
4042
4043 2012-02-27 Pedro Alves <palves@redhat.com>
4044
4045 PR server/9684
4046 * linux-low.c (pid_is_stopped): New.
4047 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
4048
4049 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
4050
4051 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
4052 of conditions.
4053
4054 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
4055
4056 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
4057
4058 2012-02-24 Luis Machado <lgustavo@codesourcery>
4059
4060 * server.c (handle_query): Advertise support for target-side
4061 breakpoint condition evaluation.
4062 (process_point_options): New function.
4063 (process_serial_event): When inserting a breakpoint, check for
4064 a target-side condition that should be evaluated.
4065
4066 * mem-break.c: Include regcache.h and ax.h.
4067 (point_cond_list_t): New data structure.
4068 (breakpoint) <cond_list>: New field.
4069 (find_gdb_breakpoint_at): Make non-static.
4070 (delete_gdb_breakpoint_at): Clear any target-side
4071 conditions.
4072 (clear_gdb_breakpoint_conditions): New function.
4073 (add_condition_to_breakpoint): Likewise.
4074 (add_breakpoint_condition): Likewise.
4075 (gdb_condition_true_at_breakpoint): Likewise.
4076 (gdb_breakpoint_here): Return result directly instead
4077 of going through a local variable.
4078
4079 * mem-break.h (find_gdb_breakpoint_at): New prototype.
4080 (clear_gdb_breakpoint_conditions): Likewise.
4081 (add_breakpoint_condition): Likewise.
4082 (gdb_condition_true_at_breakpoint): Likewise.
4083
4084 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
4085 (need_step_over_p): Take target-side breakpoint condition into
4086 consideration.
4087
4088 2012-02-24 Luis Machado <lgustavo@codesourcery>
4089
4090 * server.h: Include tracepoint.h.
4091 (agent_mem_read, agent_get_trace_state_variable_value,
4092 agent_set_trace_state_variable_value,
4093 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
4094 get_set_tsv_func_addr): New prototypes.
4095
4096 * ax.h: New include file.
4097 * ax.c: New source file.
4098
4099 * tracepoint.c: Include ax.h.
4100 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
4101 agent_expr, eval_result_type): Move to ax.h.
4102 (parse_agent_expr): Rename to ...
4103 (gdb_parse_agent_expr): ... this, make it non-static and move
4104 to ax.h.
4105 (unparse_agent_expr) Rename to ...
4106 (gdb_unparse_agent_expr): ... this, make it non-static and move
4107 to ax.h.
4108 (eval_agent_expr): Rename to ...
4109 (eval_tracepoint_agent_expr): ... this.
4110 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
4111 forward declarations.
4112 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
4113 (agent_get_trace_state_variable_value): New function.
4114 (agent_set_trace_state_variable_value): New function.
4115 (cmd_qtdp): Call gdb_parse_agent_expr (...).
4116 (response_tracepoint): Call gdb_unparse_agent_expr (...).
4117 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
4118 (condition_true_at_tracepoint): Likewise.
4119 (parse_agent_expr): Rename to ...
4120 (gdb_parse_agent_expr): ... this and move to ax.c.
4121 (unparse_agent_expr): Rename to ...
4122 (gdb_unparse_agent_expr): ... this and move to ax.c.
4123 (gdb_agent_op_name): Move to ax.c.
4124 (eval_agent_expr): Rename to ...
4125 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
4126 and move to ax.c.
4127 (eval_tracepoint_agent_expr): New function.
4128 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
4129 non-static.
4130 (current_insn_ptr, emit_error, struct bytecode_address): Move to
4131 ax.c.
4132 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
4133 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
4134 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
4135 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
4136 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
4137 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
4138 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
4139 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
4140 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
4141 (compile_bytecodes): Remove forward declaration.
4142 (is_goto_target): Move to ax.c.
4143 (compile_bytecodes): Move to ax.c and call
4144 agent_get_trace_state_variable_value (...) and
4145 agent_set_trace_state_variable_value (...).
4146
4147 * Makefile.in: Update ax.c and IPA dependencies.
4148
4149 2012-02-24 Pedro Alves <palves@redhat.com>
4150
4151 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
4152 (cmd_bigqtbuffer_circular): ... this. Only handle
4153 'QTBuffer:circular:'.
4154 (handle_tracepoint_general_set): Adjust.
4155
4156 2012-02-16 Yao Qi <yao@codesourcery.com>
4157
4158 * inferiors.c: Move code to ...
4159 * dll.c: .... here. New.
4160 * server.h: Declare clear_dlls.
4161 * Makefile.in (SFILES): Add dll.c.
4162 (OBS): Add dll.o
4163 (dll.o): New rule.
4164
4165 2012-02-11 Yao Qi <yao@codesourcery.com>
4166
4167 * server.c: (handle_monitor_command): Add a new parameter
4168 `own_buf'.
4169 (handle_query): Update caller.
4170
4171 2012-02-09 Joel Brobecker <brobecker@adacore.com>
4172
4173 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
4174 * configure, config.in: Regenerate.
4175 * hostio.c: Provide an alternate implementation if HAVE_READLINK
4176 is not defined.
4177
4178 2012-02-02 Pedro Alves <palves@redhat.com>
4179
4180 Try SIGKILL first, then PTRACE_KILL.
4181 * linux-low.c (linux_kill_one_lwp): New.
4182 (linux_kill_one_lwp): Rename to ...
4183 (kill_one_lwp_callback): ... this. Use the new
4184 linux_kill_one_lwp.
4185
4186 2012-02-02 Pedro Alves <palves@redhat.com>
4187
4188 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
4189 inferior.
4190
4191 2012-01-27 Pedro Alves <palves@redhat.com>
4192
4193 * linux-low.c (linux_child_pid_to_exec_file): Delete.
4194 (elf_64_file_p): Make static.
4195 (linux_pid_exe_is_elf_64_file): New.
4196 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
4197 Delete declarations.
4198 (linux_pid_exe_is_elf_64_file): Declare.
4199 * linux-x86-low.c (x86_arch_setup): Use
4200 linux_pid_exe_is_elf_64_file.
4201
4202 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
4203
4204 * linux-low.c (linux_wait_for_event_1): Rename to ...
4205 (linux_wait_for_event): ... here and merge it with former
4206 linux_wait_for_event - new variable wait_ptid, use it.
4207 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
4208
4209 2012-01-23 Pedro Alves <palves@redhat.com>
4210
4211 * server.c (main): Avoid yet another case of infinite loop while
4212 detaching/killing after a longjmp.
4213
4214 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
4215
4216 Code cleanup.
4217 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
4218
4219 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
4220
4221 * hostio.c (handle_readlink): New function.
4222 (handle_vFile): Call it to handle "vFile:readlink" packets.
4223
4224 2012-01-20 Pedro Alves <palves@redhat.com>
4225 Ulrich Weigand <ulrich.weigand@linaro.org>
4226
4227 * server.c (handle_v_requests): Only support vAttach and vRun to
4228 start multiple processes when in extended protocol mode.
4229
4230 2012-01-17 Pedro Alves <palves@redhat.com>
4231
4232 * tracepoint.c (initialize_tracepoint): Use mmap instead of
4233 memalign plus mprotect to allocate the scratch buffer.
4234
4235 2012-01-13 Pedro Alves <palves@redhat.com>
4236
4237 * server.c (attach_inferior): Clear `cont_thread'.
4238
4239 2012-01-13 Pedro Alves <palves@redhat.com>
4240
4241 * server.c (main): Avoid infinite loop while detaching/killing
4242 after a longjmp.
4243
4244 2012-01-09 Doug Evans <dje@google.com>
4245
4246 * server.c (start_inferior): Set last_ptid in --wrapper case.
4247
4248 2012-01-06 Yao Qi <yao@codesourcery.com>
4249
4250 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
4251 defined.
4252 [IN_PROCESS_AGENT] (debug_agent): New global variable.
4253
4254 2012-01-04 Yao Qi <yao@codesourcery.com>
4255
4256 * tracepoint.c (cmd_qtdp): Print debug message
4257 for static tracepoint.
4258
4259 2012-01-04 Yao Qi <yao@codesourcery.com>
4260
4261 * tracepoint.c (trace_vdebug): Differentiate debug message
4262 between gdbserver and IPA.
4263
4264 2012-01-03 Yao Qi <yao@codesourcery.com>
4265
4266 * tracepoint.c (tracepoint_was_hit): Don't collect for
4267 static tracepoint.
4268
4269 2012-01-02 Joel Brobecker <brobecker@adacore.com>
4270
4271 * terminal.h: Reformat copyright header.
4272
4273 2012-01-02 Joel Brobecker <brobecker@adacore.com>
4274
4275 * server.c (gdbserver_version): Update copyright year.
4276 * gdbreplay.c (gdbreplay_version): Likewise.
4277
4278 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
4279
4280 * linux-low.c (linux_create_inferior): Put empty if clause for write.
4281
4282 Revert:
4283 2011-12-18 Hui Zhu <teawater@gmail.com>
4284 * linux-low.c (linux_create_inferior): Save return value to ret.
4285
4286 2011-12-18 Hui Zhu <teawater@gmail.com>
4287
4288 * linux-low.c (linux_create_inferior): Save return value to ret.
4289
4290 2011-12-16 Doug Evans <dje@google.com>
4291
4292 * linux-low.c (linux_create_inferior): If stdio connection,
4293 redirect stdin from /dev/null, stdout to stderr.
4294 * remote-utils.c (remote_is_stdio): New static global.
4295 (remote_connection_is_stdio): New function.
4296 (remote_prepare): Handle stdio connection.
4297 (remote_open): Ditto.
4298 (remote_close): Don't close stdin for stdio connections.
4299 (read_prim,write_prim): New functions. Replace all calls to
4300 read/write to these.
4301 * server.c (main): Watch for "-" argument. Move call to
4302 remote_prepare before start_inferior.
4303 * server.h (STDIO_CONNECTION_NAME): New macro.
4304 (remote_connection_is_stdio): Declare.
4305
4306 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
4307 in debugging output.
4308
4309 2011-12-15 Yao Qi <yao@codesourcery.com>
4310
4311 * tracepoint.c: Include sys/syscall.h.
4312 (gdb_ust_thread): Remove preprocessor conditional.
4313
4314 2011-12-14 Pedro Alves <pedro@codesourcery.com>
4315
4316 * linux-low.c (linux_detach_one_lwp): Call
4317 the_low_target.prepare_to_resume before detaching.
4318
4319 2011-12-14 Yao Qi <yao@codesourcery.com>
4320
4321 * tracepoint.c (gdb_ust_thread): Don't ignore return value
4322 of write.
4323
4324 2011-12-14 Yao Qi <yao@codesourcery.com>
4325
4326 * i386-low.c (i386_low_stopped_data_address): Initialize local
4327 variable `control'.
4328
4329 2011-12-13 Pedro Alves <pedro@codesourcery.com>
4330
4331 PR remote/13492
4332
4333 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
4334 DR_CONTROL unless necessary. Extend comments.
4335 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
4336 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
4337
4338 2011-12-13 Yao Qi <yao@codesourcery.com>
4339
4340 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
4341 macros.
4342 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
4343
4344 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
4345
4346 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
4347 Print new debug message for such case.
4348
4349 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
4350
4351 Fix overlapping memcpy.
4352 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
4353 the read_inferior_memory transfer.
4354 (delete_fast_tracepoint_jump): New variable buf. Use it for the
4355 write_inferior_memory transfer.
4356 (set_fast_tracepoint_jump): New variable buf. Use it for the
4357 read_inferior_memory and write_inferior_memory transfers.
4358 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
4359 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
4360 Use it for the write_inferior_memory transfer.
4361 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
4362 buffers.
4363
4364 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
4365
4366 * linux-low.c (fetch_register, store_register): Make code
4367 consistent, fix formatting.
4368
4369 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
4370
4371 * linux-low.c (usr_store_inferior_registers): Factor out code
4372 to handle individual registers into...
4373 (store_register): ... this new function.
4374
4375 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
4376
4377 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
4378 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
4379 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
4380 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
4381 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
4382 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
4383 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
4384 (srv_xmlfiles): Add new XML files.
4385
4386 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
4387 and <sys/uio.h>.
4388 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
4389 (init_registers_s390_linux32v1): Add prototype.
4390 (init_registers_s390_linux32v2): Likewise.
4391 (init_registers_s390_linux64v1): Likewise.
4392 (init_registers_s390_linux64v2): Likewise.
4393 (init_registers_s390x_linux64v1): Likewise.
4394 (init_registers_s390x_linux64v2): Likewise.
4395 (s390_num_regs): Increment to 52.
4396 (s390_regmap): Add orig_r2 register.
4397 (s390_num_regs_3264): Increment to 68.
4398 (s390_regmap_3264): Add orig_r2 register.
4399 (s390_collect_ptrace_register): Handle orig_r2 register.
4400 (s390_supply_ptrace_register): Likewise.
4401 (s390_fill_last_break): New function.
4402 (s390_store_last_break): Likewise.
4403 (s390_fill_system_call): New function.
4404 (s390_store_system_call): Likewise.
4405 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
4406 register sets.
4407 (s390_check_regset): New function.
4408 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
4409 NT_S390_SYSTEM_CALL regsets and use appropriate description.
4410 Update target_regsets for available register sets.
4411
4412 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
4413 Jan Kratochvil <jan.kratochvil@redhat.com>
4414
4415 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
4416 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
4417 New.
4418 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
4419 * linux-low.h (struct process_info_private): New member r_debug.
4420 * server.c (handle_qxfer_libraries): Call
4421 the_target->qxfer_libraries_svr4.
4422 (handle_qxfer_libraries_svr4): New function.
4423 (qxfer_packets): New entry "libraries-svr4".
4424 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
4425 * target.h (struct target_ops): New member qxfer_libraries_svr4.
4426 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
4427 PACKET_qXfer_libraries_svr4.
4428
4429 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
4430
4431 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
4432 PSW address/mask between 8-byte and 16-byte formats.
4433 (s390_supply_ptrace_register): Likewise.
4434 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
4435 basic addressing mode bit.
4436
4437 2011-11-24 Stan Shebs <stan@codesourcery.com>
4438
4439 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
4440
4441 2011-11-17 Stan Shebs <stan@codesourcery.com>
4442
4443 * tracepoint.c (struct tracepoint): New field traceframe_usage.
4444 (tracing_start_time): New global.
4445 (tracing_stop_time): New global.
4446 (tracing_user_name): New global.
4447 (tracing_notes): New global.
4448 (tracing_stop_note): New global.
4449 (cmd_qtstart): Set traceframe_usage, start_time.
4450 (stop_tracing): Set stop_time.
4451 (cmd_qtstatus): Report additional status.
4452 (cmd_qtp): New function.
4453 (handle_tracepoint_query): Call it.
4454 (cmd_qtnotes): New function.
4455 (handle_tracepoint_general_set): Call it.
4456 (get_timestamp): Rename from tsv_get_timestamp.
4457
4458 2011-11-14 Stan Shebs <stan@codesourcery.com>
4459 Kwok Cheung Yeung <kcy@codesourcery.com>
4460
4461 * linux-x86-low.c (small_jump_insn): New.
4462 (i386_install_fast_tracepoint_jump_pad): Add arguments for
4463 trampoline and error message, build a trampoline and issue a small
4464 jump instruction to it.
4465 (x86_install_fast_tracepoint_jump_pad): Add arguments for
4466 trampoline and error message.
4467 (x86_get_min_fast_tracepoint_insn_len): New.
4468 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
4469 * linux-low.h (struct linux_target_ops): Add arguments to
4470 install_fast_tracepoint_jump_pad operation, add new operation.
4471 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
4472 arguments.
4473 (linux_get_min_fast_tracepoint_insn_len): New function.
4474 (linux_target_op): Add new operation.
4475 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
4476 (gdb_trampoline_buffer_end): Ditto.
4477 (gdb_trampoline_buffer_error): Ditto.
4478 (struct ipa_sym_addresses): Add fields for new IPA variables.
4479 (symbol_list): Add entries for new IPA variables.
4480 (struct tracepoint): Add fields to hold the address range of the
4481 trampoline used by the tracepoint.
4482 (trampoline_buffer_head): New static variable.
4483 (trampoline_buffer_tail): Ditto.
4484 (claim_trampoline_space): New function.
4485 (have_fast_tracepoint_trampoline_buffer): New function.
4486 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
4487 structure.
4488 (install_fast_tracepoint): Ditto, also add error buffer argument.
4489 (cmd_qtminftpilen): New function.
4490 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
4491 (fast_tracepoint_from_trampoline_address): New function.
4492 (fast_tracepoint_collecting): Handle trampoline as part of jump
4493 pad space.
4494 (set_trampoline_buffer_space): New function.
4495 (initialize_tracepoint): Initialize new IPA variables.
4496 * target.h (struct target_ops): Add arguments to
4497 install_fast_tracepoint_jump_pad operation, add new
4498 get_min_fast_tracepoint_insn_len operation.
4499 (target_get_min_fast_tracepoint_insn_len): New.
4500 (install_fast_tracepoint_jump_pad): Add arguments.
4501 * server.h (IPA_BUFSIZ): Define.
4502 * linux-i386-ipa.c: Include extra header files.
4503 (initialize_fast_tracepoint_trampoline_buffer): New function.
4504 (initialize_low_tracepoint): Call it.
4505 * server.h (set_trampoline_buffer_space): Declare.
4506 (claim_trampoline_space): Ditto.
4507 (have_fast_tracepoint_trampoline_buffer): Ditto.
4508
4509 2011-11-14 Yao Qi <yao@codesourcery.com>
4510
4511 * server.c (handle_query): Handle InstallInTrace for qSupported.
4512 * tracepoint.c (add_tracepoint): Sort list.
4513 (install_tracepoint, download_tracepoint): New.
4514 (cmd_qtdp): Call them to install and download tracepoints.
4515 (sort_tracepoints): Removed.
4516 (cmd_qtstart): Update.
4517
4518 2011-11-14 Yao Qi <yao@codesourcery.com>
4519
4520 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
4521 * mem-break.h: Declare.
4522 * tracepoint.c (cmd_qtstart): Move some code to ...
4523 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
4524 New.
4525 (download_tracepoints): Move some code to ...
4526 (download_tracepoint_1): ... here. New.
4527
4528 2011-11-08 Yao Qi <yao@codesourcery.com>
4529
4530 * remote-utils.c (relocate_instruction): A comment fix.
4531
4532 2011-11-07 Joel Brobecker <brobecker@adacore.com>
4533
4534 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
4535 (i386_dr_low_get_control, i386_dr_low_get_status): Use
4536 dr_status_mirror and dr_control_mirror from debug_reg_state.
4537 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
4538 (i386_initial_stuff): Remove use of deleted globals.
4539 (i386_get_thread_context, i386_set_thread_context,
4540 i386_thread_added): Use dr_status_mirror and dr_control_mirror
4541 from debug_reg_state.
4542
4543 2011-11-05 Yao Qi <yao@codesourcery.com>
4544
4545 * tracepoint.c (gdb_collect): Loop over tracepoints of same
4546 address as TPOINT's.
4547
4548 2011-11-02 Stan Shebs <stan@codesourcery.com>
4549
4550 * tracepoint.c (agent_mem_read_string): New function.
4551 (eval_agent_expr): Call it for tracenz.
4552 * server.c (handle_query): Report support for tracenz.
4553
4554 2011-11-02 Yao Qi <yao@codesourcery.com>
4555
4556 * tracepoint.c (cmd_qtstart): Remove unused local variables.
4557
4558 2011-11-02 Yao Qi <yao@codesourcery.com>
4559
4560 * target.h: Fix a typo in comment.
4561
4562 2011-10-31 Pedro Alves <pedro@codesourcery.com>
4563
4564 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
4565 clobber the breakpoints' shadows with fast tracepoint jumps.
4566 * mem-break.h (check_mem_write): Add `myaddr' parameter.
4567 * target.c (write_inferior_memory): Also pass MYADDR down to
4568 check_mem_write.
4569
4570 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
4571
4572 * configure.ac: Check support for personality routine.
4573 * configure: Regenerate.
4574 * config.in: Likewise.
4575 * linux-low.c: Include <sys/personality.h>.
4576 Define ADDR_NO_RANDOMIZE if necessary.
4577 (linux_create_inferior): Disable address space randomization when
4578 forking inferior, if requested.
4579 (linux_supports_disable_randomization): New function.
4580 (linux_target_ops): Install it.
4581 * server.h (disable_randomization): Declare.
4582 * server.c (disable_randomization): New global variable.
4583 (handle_general_set): Handle QDisableRandomization.
4584 (handle_query): Likewise for qSupported.
4585 (main): Support --disable-randomization and --no-disable-randomization
4586 command line arguments.
4587 * target.h (struct target_ops): Add supports_disable_randomization.
4588 (target_supports_disable_randomization): New macro.
4589
4590 2011-09-29 Mike Frysinger <vapier@gentoo.org>
4591
4592 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
4593 ifdef check.
4594 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
4595 [!PT_GETDSBT] (target_loadmap): New definition.
4596 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
4597 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
4598 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
4599 and PT_GETDSBT to LINUX_LOADMAP.
4600 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
4601 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
4602
4603 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
4604
4605 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
4606 (arm_linux_hwbp_cap): New static variable.
4607 (arm_linux_get_hwbp_cap): Replace by ...
4608 (arm_linux_init_hwbp_cap): ... this new function.
4609 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
4610 (arm_linux_get_hw_watchpoint_count): Likewise.
4611 (arm_linux_get_hw_watchpoint_max_length): Likewise.
4612 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
4613 (arm_prepare_to_resume): Use perror_with_name instead of error.
4614
4615 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
4616
4617 * linux-arm-low.c: Include <signal.h>.
4618 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
4619 (struct arm_linux_hwbp_cap): New data type.
4620 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
4621 (struct arm_linux_hw_breakpoint): New data type.
4622 (MAX_BPTS, MAX_WPTS): Define.
4623 (struct arch_process_info, struct arch_lwp_info): New data types.
4624 (arm_linux_get_hwbp_cap): New function.
4625 (arm_linux_get_hw_breakpoint_count): Likewise.
4626 (arm_linux_get_hw_watchpoint_count): Likewise.
4627 (arm_linux_get_hw_watchpoint_max_length): Likewise.
4628 (arm_hwbp_control_initialize): Likewise.
4629 (arm_hwbp_control_is_enabled): Likewise.
4630 (arm_hwbp_control_is_initialized): Likewise.
4631 (arm_hwbp_control_disable): Likewise.
4632 (arm_linux_hw_breakpoint_equal): Likewise.
4633 (arm_linux_hw_point_initialize): Likewise.
4634 (struct update_registers_data): New data structure.
4635 (update_registers_callback: New function.
4636 (arm_insert_point): Likewise.
4637 (arm_remove_point): Likewise.
4638 (arm_stopped_by_watchpoint): Likewise.
4639 (arm_stopped_data_address): Likewise.
4640 (arm_new_process): Likewise.
4641 (arm_new_thread): Likewise.
4642 (arm_prepare_to_resume): Likewise.
4643 (the_low_target): Register arm_insert_point, arm_remove_point,
4644 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
4645 arm_new_thread, and arm_prepare_to_resume.
4646
4647 2011-09-15 Stan Shebs <stan@codesourcery.com>
4648
4649 * server.h (struct emit_ops): Add compare-goto fields.
4650 * tracepoint.c (gdb_agent_op_sizes): New table.
4651 (emit_eq_goto): New function.
4652 (emit_ne_goto): New function.
4653 (emit_lt_goto): New function.
4654 (emit_le_goto): New function.
4655 (emit_gt_goto): New function.
4656 (emit_ge_goto): New function.
4657 (is_goto_target): New function.
4658 (compile_bytecodes): Recognize special cases of compare-goto
4659 combinations and call specialized emitters for them.
4660 * linux-x86-low.c (amd64_emit_eq_goto): New function.
4661 (amd64_emit_ne_goto): New function.
4662 (amd64_emit_lt_goto): New function.
4663 (amd64_emit_le_goto): New function.
4664 (amd64_emit_gt_goto): New function.
4665 (amd64_emit_ge_goto): New function.
4666 (amd64_emit_ops): Add the new functions.
4667 (i386_emit_eq_goto): New function.
4668 (i386_emit_ne_goto): New function.
4669 (i386_emit_lt_goto): New function.
4670 (i386_emit_le_goto): New function.
4671 (i386_emit_gt_goto): New function.
4672 (i386_emit_ge_goto): New function.
4673 (i386_emit_ops): Add the new functions.
4674
4675 2011-09-08 Stan Shebs <stan@codesourcery.com>
4676
4677 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
4678 (i386_emit_epilogue): Restore %ebx.
4679
4680 2011-08-31 Jie Zhang <jzhang918@gmail.com>
4681
4682 * server.c (step_thread): Remove definition.
4683 (process_serial_event): Don't handle Hs.
4684 * server.h (step_thread): Remove declaration.
4685 * target.c (set_desired_inferior): Remove use of step_thread.
4686
4687 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
4688
4689 * linux-low.c: Include linux-procfs.h.
4690 (linux_attach_lwp_1): Update comments.
4691 (linux_attach): Scan for existing threads when attaching to a
4692 process that is the tgid.
4693 * Makefile.in: Update dependencies.
4694
4695 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
4696
4697 * configure.srv: Add linux-procfs.o dependencies.
4698
4699 2011-08-14 Yao Qi <yao@codesourcery.com>
4700
4701 * target.h (struct target_ops): Fix indent.
4702 * win32-low.c (win32_target_ops): Fix comment.
4703
4704 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
4705 Yao Qi <yao@codesourcery.com>
4706
4707 * Makefile.in (clean): Remove tic6x-*.c files.
4708 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
4709 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
4710 (tic6x-c64xp-linux.c): Likewise.
4711 * configure.srv: Add support for tic6x-*-uclinux.
4712 * linux-tic6x-low.c: New.
4713 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
4714
4715 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
4716 Yao Qi <yao@codesourcery.com>
4717
4718 * target.h (struct target_ops): Add read_loadmap.
4719 * linux-low.c (struct target_loadseg): New type.
4720 (struct target_loadmap): New type.
4721 (linux_read_loadmap): New function.
4722 (linux_target_ops): Add linux_read_loadmap.
4723 * server.c (handle_query): Support qXfer:fdpic:read packet.
4724 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
4725 to NULL.
4726
4727 2011-08-05 Eli Zaretskii <eliz@gnu.org>
4728
4729 * win32-low.c: Include <stdint.h>.
4730
4731 2011-07-22 Pedro Alves <pedro@codesourcery.com>
4732
4733 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
4734 to the inferior here.
4735 (i386_remove_aligned_watchpoint): Ditto.
4736 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
4737 fit part of the watchpoint in the debug registers.
4738 (i386_update_inferior_debug_regs): New.
4739 (i386_low_insert_watchpoint): Work on a local mirror of the debug
4740 registers, and only update the inferior on success.
4741 (i386_low_remove_watchpoint): Ditto.
4742
4743 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
4744
4745 * linux-low.c (compare_ints, unique, list_threads, show_process,
4746 linux_core_of_thread): Delete.
4747 (linux_target_ops): Change linux_core_of_thread to
4748 linux_common_core_of_thread.
4749 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
4750 * utils.c (malloc_failure): Change type of argument.
4751 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
4752 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
4753 common/linux-osdata.c, common/ptid.c and common/buffer.c.
4754 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
4755 (IPA_OBJS): Add common-utils-ipa.o.
4756 (ptid_h, linux_osdata_h): New macros.
4757 (server_h): Add common/common-utils.h, common/xml-utils.h,
4758 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
4759 common/ptid.h.
4760 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
4761 ptid.o, buffer.o): New rules.
4762 (linux-low.o): Add common/linux-osdata.h as a dependency.
4763 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
4764 * configure.ac: Add AC_HEADER_DIRENT check.
4765 * config.in: Regenerate.
4766 * configure: Regenerate.
4767 * remote-utils.c (xml_escape_text): Delete.
4768 (buffer_grow, buffer_free, buffer_init, buffer_finish,
4769 buffer_xml_printf): Move to common/buffer.c.
4770 * server.c (main): Remove call to initialize_inferiors.
4771 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
4772 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
4773 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
4774 internal_error, gdb_assert, gdb_assert_fail): Delete.
4775 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
4776 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
4777 common/buffer.h.
4778 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
4779 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
4780 initialize_inferiors): Delete.
4781
4782 2011-07-20 Pedro Alves <pedro@codesourcery.com>
4783
4784 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
4785 symbol error.
4786
4787 2011-05-31 Pedro Alves <pedro@codesourcery.com>
4788
4789 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
4790 assertion.
4791 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
4792
4793 2011-05-26 Yao Qi <yao@codesourcery.com>
4794
4795 * Makefile.in (thread-db.o): Track dependence to
4796 common/gdb_thread_db.h.
4797 * thread-db.c: include gdb_thread_db.h from right place.
4798
4799 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
4800
4801 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
4802 __FILE__ and __LINE__ to internal_error.
4803
4804 2011-05-13 Doug Evans <dje@google.com>
4805
4806 * thread-db.c (try_thread_db_load_from_sdir): New function.
4807 (try_thread_db_load_from_dir): New function.
4808 (thread_db_load_search): Handle $sdir, ignore $pdir.
4809 Remove trying of system directories if search of
4810 libthread-db-search-path fails, that is now done via $sdir.
4811
4812 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
4813
4814 * server.c (handle_query): Add EnableDisableTracepoints to the list
4815 of supported features.
4816 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
4817 tracepoints.
4818 (cmd_qtenable_disable): New.
4819 (cmd_qtstart): Install tracepoints even if disabled.
4820 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
4821 receiving a QTEnable or QTDisable packet.
4822 (gdb_collect): Skip data collection if fast tracepoint is disabled.
4823 (ust_marker_to_static_tracepoint): Do not ignore disabled static
4824 tracepoints.
4825 (gdb_probe): Skip data collection if static tracepoint is disabled.
4826
4827 2011-05-10 Doug Evans <dje@google.com>
4828
4829 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
4830
4831 2011-05-04 Doug Evans <dje@google.com>
4832
4833 * linux-low.c (linux_join): Skip process lookup.
4834 * spu-low.c (spu_join): Ditto.
4835 * server.c (join_inferiors_callback): Delete.
4836 (process_serial_event): For 'D' packet (detach) call join_inferior
4837 directly.
4838
4839 2011-05-04 Joseph Myers <joseph@codesourcery.com>
4840
4841 * README: Don't mention xscale*-*-linux*.
4842 * configure.srv (xscale*-*-linux*): Don't handle target.
4843
4844 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
4845
4846 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
4847 casting pointers.
4848 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
4849 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
4850 (i386_emit_void_call_2): Likewise.
4851
4852 2011-04-26 Yao Qi <yao@codesourcery.com>
4853
4854 * linux-low.c: Move common macros to linux-ptrace.h.
4855 Include linux-ptrace.h.
4856 * Makefile.in (linux_ptrace_h): New.
4857 (linux-low.o): Depends on linux-ptrace.h.
4858
4859 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
4860
4861 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
4862 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
4863 (remote_prepare): New function with most of the TCP code from ...
4864 (remote_open): ... here. Detect PORT here unconditionally. Move also
4865 setting transport_is_reliable.
4866 * server.c (run_once): New variable.
4867 (gdbserver_usage): Document it.
4868 (main): Set run_once for `--once'. Call remote_prepare. Exit after
4869 the first run if RUN_ONCE.
4870 * server.h (run_once, remote_prepare): New declarations.
4871
4872 2011-04-19 Tom Tromey <tromey@redhat.com>
4873
4874 * win32-low.c (handle_load_dll): Remove duplicate "the".
4875
4876 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
4877
4878 Remove support for old Cygwin 1.5 versions.
4879 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
4880 function to avoid warning.
4881 (win32_add_one_solib): Use cygwin_conv_path function to avoid
4882 warning.
4883
4884 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
4885
4886 * gdbserver/server.h (Macro _): Define it if not available.
4887
4888 2011-03-14 Michael Snyder <msnyder@vmware.com>
4889
4890 * hostio.c (handle_close): Remove unnecessary null test.
4891
4892 2011-03-10 Joel Brobecker <brobecker@adacore.com>
4893
4894 * Makefile.in (maintainer-clean realclean distclean): Remove
4895 "make ... subdir_do" command.
4896
4897 2011-03-10 Michael Snyder <msnyder@vmware.com>
4898
4899 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
4900
4901 * server.c (handle_v_run): Free alloced buffer on early return.
4902
4903 2011-03-09 Yao Qi <yao@codesourcery.com>
4904
4905 Revert:
4906 2011-03-04 Yao Qi <yao@codesourcery.com>
4907
4908 * Makefile.in: Remove GNU make feature --directory.
4909
4910 2011-03-05 Yao Qi <yao@codesourcery.com>
4911
4912 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
4913 (subdir_do): New make target. Copied from gdb/Makefile.
4914 (maintainer-clean, realclean, distclean, clean): Call corresponding
4915 make targets in common/Makefile.
4916
4917 2011-02-11 Yao Qi <yao@codesourcery.com>
4918
4919 * configure.ac: Call AC_PROG_RANLIB.
4920 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
4921 * configure: Regenerate.
4922
4923 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
4924
4925 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
4926
4927 2011-03-06 Yao Qi <yao@codesourcery.com>
4928
4929 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
4930
4931 2011-03-05 Yao Qi <yao@codesourcery.com>
4932
4933 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
4934 (subdir_do): New make target. Copied from gdb/Makefile.
4935 (maintainer-clean, realclean, distclean, clean): Call corresponding
4936 make targets in common/Makefile.
4937
4938 2011-03-04 Yao Qi <yao@codesourcery.com>
4939
4940 * Makefile.in: Remove GNU make feature --directory.
4941
4942 2011-03-04 Michael Snyder <msnyder@vmware.com>
4943
4944 * server.c (queue_stop_reply): Call xmalloc not malloc.
4945
4946 2011-03-02 Michael Snyder <msnyder@vmware.com>
4947
4948 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
4949
4950 2011-02-28 Michael Snyder <msnyder@vmware.com>
4951
4952 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
4953 (cmd_qtframe): Ditto.
4954 (cmd_qtbuffer): Ditto.
4955 (cmd_bigqtbuffer): Ditto.
4956
4957 * utils.c (decimal2str): Initialize 'width' to nine, then
4958 don't mess with it.
4959
4960 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
4961
4962 * hostio.c (require_data): Free *data, not data.
4963
4964 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4965
4966 * hostio.c (require_data): Use free, not xfree.
4967
4968 2011-02-27 Michael Snyder <msnyder@vmware.com>
4969
4970 * server.c (handle_query): Discard unused value.
4971
4972 * hostio.c (require_data): Free malloc memory before returning
4973 error.
4974
4975 2011-02-26 Michael Snyder <msnyder@vmware.com>
4976
4977 * linux-low.c (list_threads): Call closedir for dirent.
4978
4979 2011-02-27 Michael Snyder <msnyder@vmware.com>
4980
4981 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
4982 a case statement falls through.
4983
4984 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
4985
4986 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
4987 in comparison.
4988
4989 2011-02-26 Michael Snyder <msnyder@vmware.com>
4990
4991 * utils.c (decimal2str): Eliminate dead code and dead param.
4992 (pulongest): Drop dead param from call to decimal2str.
4993 (plongest): Ditto.
4994
4995 2011-02-24 Joel Brobecker <brobecker@adacore.com>
4996
4997 Revert the following patch (not approved yet):
4998 2011-02-21 Hui Zhu <teawater@gmail.com>
4999 * tracepoint.c (tp_printf): New function.
5000 (eval_agent_expr): Handle gdb_agent_op_printf.
5001
5002 2011-02-21 Hui Zhu <teawater@gmail.com>
5003
5004 * tracepoint.c (tp_printf): New function.
5005 (eval_agent_expr): Handle gdb_agent_op_printf.
5006
5007 2011-02-18 Tom Tromey <tromey@redhat.com>
5008
5009 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
5010 (tracepoint.o): Likewise.
5011 * tracepoint.c (enum gdb_agent_op): Use ax.def.
5012 (gdb_agent_op_names): Likewise.
5013
5014 2011-02-18 Tom Tromey <tromey@redhat.com>
5015
5016 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
5017 gdb_agent_op_rot>: New constants.
5018 (gdb_agent_op_names): Add pick and roll.
5019 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
5020 cases.
5021
5022 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5023
5024 * aclocal.m4: Regenerated with aclocal-1.11.1.
5025
5026 2011-02-14 Pedro Alves <pedro@codesourcery.com>
5027
5028 * server.c (handle_qxfer_traceframe_info): New.
5029 (qxfer_packets): Register "traceframe-info".
5030 (handle_query): Report support for qXfer:traceframe-info:read+.
5031 * tracepoint.c (match_blocktype): New.
5032 (traceframe_find_block_type): Rename to ...
5033 (traceframe_walk_blocks): ... this. Add callback filter argument,
5034 and use it.
5035 (traceframe_find_block_type): New, reimplemented on top of
5036 traceframe_walk_blocks.
5037 (build_traceframe_info_xml): New.
5038 (traceframe_read_info): New.
5039 * server.h (traceframe_read_info): Declare.
5040
5041 2011-02-11 Yao Qi <yao@codesourcery.com>
5042
5043 * configure.ac: Call AC_PROG_RANLIB.
5044 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
5045 * configure: Regenerate.
5046
5047 2011-02-07 Pedro Alves <pedro@codesourcery.com>
5048
5049 * server.c (gdb_read_memory): Change return semantics to allow
5050 partial transfers.
5051 (handle_search_memory_1): Adjust.
5052 (process_serial_event) <'m' packet>: Handle partial transfers.
5053 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
5054
5055 2011-01-28 Pedro Alves <pedro@codesourcery.com>
5056
5057 * regcache.c (init_register_cache): Initialize
5058 regcache->register_status.
5059 (free_register_cache): Release regcache->register_status.
5060 (regcache_cpy): Copy register_status.
5061 (registers_to_string): Print 'x's for unavailable registers.
5062 (supply_register): Mark the register's status valid or
5063 unavailable, depending on whether a buffer was passed in or not.
5064 (supply_register_zeroed): New.
5065 (supply_regblock): Mark the registers' status valid or
5066 unavailable, depending on whether a buffer was passed in or not.
5067 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
5068 (struct regcache): New `register_status' field.
5069 (supply_register_zeroed): Declare.
5070 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
5071 supply_register_zeroed, rather than passing a NULL buffer to
5072 supply_register.
5073 * tracepoint.c (fetch_traceframe_registers): Update comment.
5074
5075 2011-01-28 Pedro Alves <pedro@codesourcery.com>
5076
5077 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
5078 buffer explicit.
5079
5080 2011-01-25 Pedro Alves <pedro@codesourcery.com>
5081
5082 * server.h (decode_xfer_write): Change prototype.
5083 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
5084 and don't extract the annex here.
5085 * server.c (decode_xfer_read): Remove `annex' parameter,
5086 and don't extract the annex here.
5087 (decode_xfer): New.
5088 (struct qxfer): New.
5089 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
5090 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
5091 (handle_qxfer_statictrace): New functions, abstracted out from
5092 handle_query, and made to use the struct qxfer interface.
5093 (handle_threads_qxfer_proper): Rename to ...
5094 (handle_qxfer_threads_proper): ... this.
5095 (handle_threads_qxfer): Rename to ...
5096 (handle_qxfer_threads): ... this. Adjust.
5097 (qxfer_packets): New array.
5098 (handle_qxfer): New function.
5099 (handle_query): Use handle_qxfer.
5100
5101 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
5102
5103 * gdbreplay.c: Shorten lines of >= 80 columns.
5104 * linux-low.c: Ditto.
5105 * linux-ppc-low.c: Ditto.
5106 * linux-s390-low.c: Ditto.
5107 * linux-sparc-low.c: Ditto.
5108 * linux-x86-low.c: Ditto.
5109 * linux-xtensa-low.c: Ditto.
5110 * mem-break.c: Ditto.
5111 * nto-low.c: Ditto.
5112 * regcache.h: Ditto.
5113 * remote-utils.c: Ditto.
5114 * server.c: Ditto.
5115 * server.h: Ditto.
5116 * thread-db.c: Ditto.
5117 * tracepoint.c: Ditto.
5118 * utils.c: Ditto.
5119 * win32-low.h: Ditto.
5120
5121 2011-01-05 Joel Brobecker <brobecker@adacore.com>
5122
5123 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
5124 update.
5125
5126 2011-01-01 Joel Brobecker <brobecker@adacore.com>
5127
5128 * server.c (gdbserver_version): Update copyright year in version
5129 output.
5130 * gdbreplay.c (gdbreplay_version): Ditto.
5131
5132 2010-12-29 Jie Zhang <jie.zhang@analog.com>
5133
5134 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
5135 * linux-bfin-low.c: New file.
5136 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
5137 PT_DATA_ADDR for BFIN targets.
5138 * Makefile.in (SFILES): Add linux-bfin-low.c.
5139 (clean): Remove reg-bfin.c.
5140 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
5141 * README: Mention supported Blackfin targets.
5142
5143 2010-12-23 Mike Frysinger <vapier@gentoo.org>
5144
5145 * .gitignore: New file.
5146
5147 2010-11-16 Mike Frysinger <vapier@gentoo.org>
5148
5149 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
5150
5151 2010-10-22 Jie Zhang <jie@codesourcery.com>
5152
5153 * Makefile.in: Add FLAGS_TO_PASS variable.
5154 (install): Remove dependency of install-only and recursively
5155 invoke make for install-only.
5156
5157 2010-10-04 Doug Evans <dje@google.com>
5158
5159 * Makefile.in (uninstall): Use $(DESTDIR).
5160
5161 2010-09-24 Pedro Alves <pedro@codesourcery.com>
5162
5163 PR gdb/11842
5164
5165 * linux-x86-low.c (compat_siginfo_from_siginfo)
5166 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
5167 si_code is < 0. Check for si_code == SI_TIMER before checking for
5168 si_code < 0.
5169
5170 2010-09-13 Joel Brobecker <brobecker@adacore.com>
5171
5172 * lynx-i386-low.c: New file.
5173 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
5174
5175 2010-09-13 Joel Brobecker <brobecker@adacore.com>
5176
5177 * lynx-low.c (ptrace_request_to_str): Remove handling for
5178 request values that have been removed in LynxOS 5.x.
5179
5180 2010-09-13 Joel Brobecker <brobecker@adacore.com>
5181
5182 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
5183 <ptrace.h>
5184
5185 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
5186
5187 * configure.ac: Add --enable-inprocess-agent option.
5188 * configure: Rebuilt.
5189
5190 2010-09-06 Yao Qi <yao@codesourcery.com>
5191
5192 * linux-low.c (linux_kill): Remove unused variable.
5193 (linux_stabilize_threads): Likewise.
5194 * server.c (start_inferior): Likewise.
5195 (queue_stop_reply_callback): Likewise.
5196 * tracepoint.c (do_action_at_tracepoint): Likewise.
5197
5198 2010-09-06 Yao Qi <yao@codesourcery.com>
5199
5200 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
5201 on return.
5202
5203 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
5204
5205 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
5206
5207 2010-09-06 Pedro Alves <pedro@codesourcery.com>
5208
5209 * Makefile.in (install-only): Replace $IPA_DEPFILES with
5210 "$(IPA_DEPFILES)".
5211
5212 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5213
5214 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
5215 gdbserver/lynx-ppc-low.c: New files.
5216 * Makefile.in (lynx_low_h): New variable.
5217 (lynx-low.o, lynx-ppc-low.o): New rules.
5218 * configure.ac: On LynxOS, link with -lnetinet.
5219 * configure.srv: Add handling of powerpc-*-lynxos* targets.
5220 * configure: regenerate.
5221
5222 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5223
5224 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
5225 * configure.ac: Add check for vasprintf and vsnprintf.
5226 * configure, config.in: Regenerate.
5227 * server.h (vasprintf, vsnprintf): Add conditional declarations.
5228
5229 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5230
5231 * gdbreplay.c: Move include of alloca.h up, next to include of
5232 malloc.h.
5233 * server.h: Add include of malloc.h.
5234 * mem-break.c: Remove include of malloc.h.
5235 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
5236
5237 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5238
5239 * Makefile.in (memmem.o): Build with -Wno-error.
5240
5241 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5242
5243 * utils.c (xsnprintf): Make non-static.
5244 * server.h: Add xsnprintf declaration.
5245 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
5246 replace calls to snprintf by calls to xsnprintf throughout.
5247
5248 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5249
5250 * configure.ac: Add configure check for alloca.
5251 * configure, config.in: Regenerate.
5252 * server.h: Include alloca.h if it exists.
5253 * gdbreplay.c: Include alloca.h if it exists.
5254
5255 2010-08-28 Pedro Alves <pedro@codesourcery.com>
5256
5257 * linux-low.c (__SIGRTMIN): Define if not already defined.
5258 (linux_create_inferior): Check for __ANDROID__ rather than
5259 __SIGRTMIN.
5260 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
5261 are already deferred.
5262 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
5263 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
5264 stopped and already has a pending signal to report.
5265 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
5266 a pending signal to report or is moving out of a jump pad.
5267 (linux_init_signals): Check for __ANDROID__ rather than
5268 __SIGRTMIN.
5269
5270 2010-08-28 Pedro Alves <pedro@codesourcery.com>
5271
5272 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
5273 debug_threads check. Avoid a linear search when not doing debug
5274 output.
5275
5276 2010-08-27 Pedro Alves <pedro@codesourcery.com>
5277
5278 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
5279 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
5280 (struct file_handler) <fd>: Change type to gdb_fildes_t.
5281 (process_event): Change local fd's type to gdb_fildes_t.
5282 (create_file_handler): Adjust prototype.
5283 (delete_file_handler): Adjust prototype.
5284 (handle_file_event): Adjust prototype. Use pfildes.
5285 (create_file_event): Adjsut prototype.
5286 * remote-utils.c (remote_desc, listen_desc): Change type to
5287 gdb_fildes_t.
5288 * server.h: New gdb_fildes_t typedef.
5289 [USE_WIN32API]: Include winsock2.h.
5290 (delete_file_handler, add_file_handler): Adjust prototypes.
5291 (pfildes): Declare.
5292 * utils.c (pfildes): New.
5293
5294 2010-08-27 Pedro Alves <pedro@codesourcery.com>
5295
5296 * configure.ac (build_warnings): Add -Wno-char-subscripts.
5297 * configure: Regenerate.
5298
5299 2010-08-27 Pedro Alves <pedro@codesourcery.com>
5300
5301 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
5302 (linux_done_accessing_memory): ... this.
5303 (linux_target_ops): Adjust.
5304 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
5305 * nto-low.c (nto_target_ops): Adjust comment.
5306 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
5307 * spu-low.c (spu_target_ops): Adjust comment.
5308 * target.h (target_ops): Rename unprepare_to_access_memory field
5309 to done_accessing_memory.
5310 (unprepare_to_access_memory): Rename to ...
5311 (done_accessing_memory): ... this.
5312
5313 2010-08-26 Pedro Alves <pedro@codesourcery.com>
5314
5315 * linux-low.c (linux_prepare_to_access_memory): New.
5316 (linux_unprepare_to_access_memory): New.
5317 (linux_target_ops): Install them.
5318 * server.c (read_memory): Rename to ...
5319 (gdb_read_memory): ... this. Use
5320 prepare_to_access_memory/prepare_to_access_memory.
5321 (write_memory): Rename to ...
5322 (gdb_write_memory): ... this. Use
5323 prepare_to_access_memory/prepare_to_access_memory.
5324 (handle_search_memory_1): Adjust.
5325 (process_serial_event): Adjust.
5326 * target.h (struct target_ops): New fields
5327 prepare_to_access_memory and unprepare_to_access_memory.
5328 (prepare_to_access_memory, unprepare_to_access_memory): New.
5329 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
5330 prepare_to_access_memory/prepare_to_access_memory.
5331 * nto-low.c (nto_target_ops): Adjust.
5332 * spu-low.c (spu_target_ops): Adjust.
5333 * win32-low.c (win32_target_ops): Adjust.
5334
5335 2010-08-26 Pedro Alves <pedro@codesourcery.com>
5336
5337 * Makefile.in (WARN_CFLAGS): Get it from configure.
5338 (WERROR_CFLAGS): New.
5339 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
5340 * configure.ac: Introduce --enable-werror, which adds -Werror to
5341 the compiler command line. Enabled by default. Disable with
5342 --disable-werror. Add -Wdeclaration-after-statement
5343 Wpointer-arith and -Wformat-nonliteral to warning flags.
5344 * configure: Regenerate.
5345
5346 2010-08-26 Pedro Alves <pedro@codesourcery.com>
5347
5348 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
5349
5350 2010-08-26 Pedro Alves <pedro@codesourcery.com>
5351
5352 * gdbreplay.c (remote_error): New.
5353 (gdbchar): New.
5354 (expect): Use gdbchar. Check for error reading from GDB.
5355 Clarify sync error output.
5356 (play): Check for errors writing to GDB.
5357 * linux-low.c (sigchld_handler): Really ignore `write' errors.
5358 * remote-utils.c (getpkt): Check for errors writing to the remote
5359 descriptor.
5360
5361 2010-08-25 Pedro Alves <pedro@codesourcery.com>
5362
5363 * linux-low.c (linux_wait_1): Move non-debugging code out of
5364 `debug_threads' control.
5365
5366 2010-08-25 Pedro Alves <pedro@codesourcery.com>
5367
5368 * linux-low.c (linux_wait_1): Don't set last_status here.
5369 * server.c (push_event, queue_stop_reply_callback): Assert we're
5370 not pushing a TARGET_WAITKIND_IGNORE event.
5371 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
5372 (myresume, handle_target_event): Set the thread's last_resume_kind
5373 and last_status from the target returned status.
5374
5375 2010-08-25 Pedro Alves <pedro@codesourcery.com>
5376
5377 PR threads/10729
5378
5379 * linux-x86-low.c (update_debug_registers_callback): New.
5380 (i386_dr_low_set_addr): Use it.
5381 (i386_dr_low_get_addr): New.
5382 (i386_dr_low_set_control): Use update_debug_registers_callback.
5383 (i386_dr_low_get_control): New.
5384 (i386_dr_low_get_status): Adjust.
5385 * linux-low.c (linux_stop_lwp): New.
5386 * linux-low.h (linux_stop_lwp): Declare.
5387
5388 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
5389 argument instead of a i386_debug_reg_state.
5390 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
5391 a i386_debug_reg_state.
5392 (i386_insert_aligned_watchpoint): Adjust.
5393 (i386_remove_aligned_watchpoint): Adjust.
5394 (i386_low_stopped_data_address): Read the debug registers from the
5395 inferior instead of from the mirrors.
5396 * i386-low.h (struct i386_debug_reg_state): Extend comment.
5397 (i386_dr_low_get_addr): Declare.
5398 (i386_dr_low_get_control): Declare.
5399 (i386_dr_low_get_status): Change prototype.
5400
5401 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
5402 (i386_dr_low_get_addr): New.
5403 (i386_dr_low_get_control): New.
5404 (i386_dr_low_get_status): Adjust prototype. Return
5405 dr_status_mirror.
5406 (i386_initial_stuff): Clear dr_status_mirror and
5407 dr_control_mirror.
5408 (i386_get_thread_context): Adjust.
5409 (i386_set_thread_context): Adjust.
5410 (i386_thread_added): Adjust.
5411
5412 2010-08-24 Pedro Alves <pedro@codesourcery.com>
5413
5414 * linux-low.h (linux_thread_area): Delete declaration.
5415
5416 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
5417
5418 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
5419 after its termination.
5420
5421 2010-08-09 Pedro Alves <pedro@codesourcery.com>
5422
5423 * linux-low.c (gdb_wants_lwp_stopped): Delete.
5424 (gdb_wants_all_stopped): Delete.
5425 (linux_wait_1): Don't call them.
5426 * server.c (handle_v_cont): Tag all threads as want-stopped.
5427 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
5428 stopped as "client-wants-stopped".
5429
5430 2010-07-31 Pedro Alves <pedro@codesourcery.com>
5431
5432 * Makefile.in (signals_h): New.
5433 (server_h): Depend on it.
5434 (server.o): Don't depend on $(signals_def).
5435 (signals.o): Depend on $(signals_def).
5436
5437 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
5438
5439 * Makefile.in (signals_def): New.
5440 (server_h): Append include/gdb/signals.h and signals_def.
5441 (server.o): Append signals_def.
5442
5443 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
5444
5445 * server.c (handle_target_event): Use target_signal_to_host for
5446 resume_info.sig initialization.
5447 * target.h (struct thread_resume) <sig>: New comment.
5448
5449 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
5450
5451 * server.c (handle_query): strcpy() the returned string from paddress()
5452 instead of sprintf().
5453 * utils.c (paddress): Return phex_nz().
5454
5455 2010-07-07 Joel Brobecker <brobecker@adacore.com>
5456
5457 * server.c (handle_v_cont): Call mourn_inferior if process
5458 just exited.
5459 (myresume): Likewise.
5460
5461 2010-07-01 Pedro Alves <pedro@codesourcery.com>
5462
5463 Static tracepoints, and integration with UST.
5464
5465 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
5466 * mem-break.c (uninsert_all_breakpoints)
5467 (reinsert_all_breakpoints): New.
5468 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
5469 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
5470 (gdb_agent_ust_loaded, helper_thread_id)
5471 (gdb_agent_helper_thread_id): New macros.
5472 (struct ipa_sym_addresses): Add addr_ust_loaded,
5473 addr_helper_thread_id, addr_cmd_buf.
5474 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
5475 (in_process_agent_loaded_ust): New.
5476 (write_e_ust_not_loaded): New.
5477 (maybe_write_ipa_ust_not_loaded): New.
5478 (struct collect_static_trace_data_action): New.
5479 (enum tracepoint_type) <static_tracepoint>: New.
5480 (struct tracepoint) <handle>: Mention static tracepoints.
5481 (struct static_tracepoint_ctx): New.
5482 (CMD_BUF_SIZE): New.
5483 (add_tracepoint_action): Handle static tracepoint actions.
5484 (unprobe_marker_at): New.
5485 (clear_installed_tracepoints): Handle static tracepoints.
5486 (cmd_qtdp): Handle static tracepoints.
5487 (probe_marker_at): New.
5488 (cmd_qtstart): Handle static tracepoints.
5489 (response_tracepoint): Handle static tracepoints.
5490 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
5491 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
5492 (get_context_regcache): Handle static tracepoints.
5493 (do_action_at_tracepoint): Handle static tracepoint actions.
5494 (traceframe_find_block_type): Handle static trace data blocks.
5495 (traceframe_read_sdata): New.
5496 (download_tracepoints): Download static tracepoint actions.
5497 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
5498 (GDB_PROBE_NAME): New.
5499 (ust_ops): New.
5500 (GET_UST_SYM): New.
5501 (USTF): New.
5502 (dlsym_ust): New.
5503 (ust_marker_to_static_tracepoint): New.
5504 (gdb_probe): New.
5505 (collect_ust_data_at_tracepoint): New.
5506 (gdb_ust_probe): New.
5507 (UNIX_PATH_MAX, SOCK_DIR): New.
5508 (gdb_ust_connect_sync_socket): New.
5509 (resume_thread, stop_thread): New.
5510 (run_inferior_command): New.
5511 (init_named_socket): New.
5512 (gdb_ust_socket_init): New.
5513 (cstr_to_hexstr): New.
5514 (next_st): New.
5515 (first_marker, next_marker): New.
5516 (response_ust_marker): New.
5517 (cmd_qtfstm, cmd_qtsstm): New.
5518 (unprobe_marker_at, probe_marker_at): New.
5519 (cmd_qtstmat, gdb_ust_thread): New.
5520 (gdb_ust_init): New.
5521 (initialize_tracepoint_ftlib): Call gdb_ust_init.
5522 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
5523 (ST_REGENTRY): New.
5524 (x86_64_st_collect_regmap): New.
5525 (X86_64_NUM_ST_COLLECT_GREGS): New.
5526 (AMD64_RIP_REGNUM): New.
5527 (supply_static_tracepoint_registers): New.
5528 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
5529 (ST_REGENTRY): New.
5530 (i386_st_collect_regmap): New.
5531 (i386_NUM_ST_COLLECT_GREGS): New.
5532 (supply_static_tracepoint_registers): New.
5533 * server.c (handle_query): Handle qXfer:statictrace:read.
5534 <qSupported>: Report support for StaticTracepoints, and
5535 qXfer:statictrace:read features.
5536 * server.h (traceframe_read_sdata)
5537 (supply_static_tracepoint_registers): Declare.
5538 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
5539 (unpack_varlen_hex): Include in IPA build.
5540 * Makefile.in (ustlibs, ustinc): New.
5541 (IPA_OBJS): Add remote-utils-ipa.o.
5542 ($(IPA_LIB)): Link -ldl and -lpthread.
5543 (UST_CFLAGS): New.
5544 (IPAGENT_CFLAGS): Add UST_CFLAGS.
5545 * config.in, configure: Regenerate.
5546
5547 2010-06-20 Ian Lance Taylor <iant@google.com>
5548 Pedro Alves <pedro@codesourcery.com>
5549
5550 * linux-x86-low.c (always_true): Delete.
5551 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
5552 trying to fool the compiler with always_true.
5553
5554 2010-06-20 Pedro Alves <pedro@codesourcery.com>
5555
5556 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
5557 conditions in gdbserver.
5558
5559 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
5560
5561 * spu-low.c (spu_read_memory): Wrap around local store limit.
5562 (spu_write_memory): Likewise.
5563
5564 2010-06-15 Pedro Alves <pedro@codesourcery.com>
5565
5566 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
5567 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
5568 LONGEST uses.
5569 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
5570 uses.
5571 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
5572 uses with LONGEST uses.
5573
5574 2010-06-14 Stan Shebs <stan@codesourcery.com>
5575 Pedro Alves <pedro@codesourcery.com>
5576
5577 Bytecode compiler.
5578
5579 * linux-x86-low.c: Include limits.h.
5580 (add_insns): New.
5581 (always_true): New.
5582 (EMIT_ASM): New.
5583 (EMIT_ASM32): New.
5584 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
5585 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
5586 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
5587 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
5588 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
5589 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
5590 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
5591 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
5592 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
5593 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
5594 (amd64_emit_void_call_2): New.
5595 (amd64_emit_ops): New.
5596 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
5597 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
5598 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
5599 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
5600 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
5601 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
5602 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
5603 (i386_emit_call, i386_emit_reg, i386_emit_pop)
5604 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
5605 (i386_emit_stack_adjust, i386_emit_int_call_1)
5606 (i386_emit_void_call_2): New.
5607 (i386_emit_ops): New.
5608 (x86_emit_ops): New.
5609 (the_low_target): Install x86_emit_ops.
5610 * server.h (struct emit_ops): New.
5611 (get_raw_reg_func_addr): Declare.
5612 (current_insn_ptr, emit_error): Declare.
5613 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
5614 (set_trace_state_variable_value): New defines.
5615 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
5616 addr_get_trace_state_variable_value and
5617 addr_set_trace_state_variable_value.
5618 (symbol_list): New fields for get_raw_reg,
5619 get_trace_state_variable_value and set_trace_state_variable_value.
5620 (condfn): New typedef.
5621 (struct tracepoint): New field `compiled_cond'.
5622 (do_action_at_tracepoint): Clear compiled_cond.
5623 (get_trace_state_variable_value, set_trace_state_variable_value):
5624 Export in the IPA.
5625 (condition_true_at_tracepoint): If there's a compiled condition,
5626 run that.
5627 (current_insn_ptr, emit_error): New globals.
5628 (struct bytecode_address): New.
5629 (get_raw_reg_func_addr): New.
5630 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
5631 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
5632 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
5633 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
5634 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
5635 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
5636 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
5637 (compile_tracepoint_condition, compile_bytecodes): New.
5638 * target.h (emit_ops): Forward declare.
5639 (struct target_ops): New field emit_ops.
5640 (target_emit_ops): New.
5641 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
5642 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
5643 * linux-low.c (linux_emit_ops): New.
5644 (linux_target_ops): Install it.
5645 * linux-low.h (struct linux_target_ops): New field emit_ops.
5646
5647 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
5648
5649 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
5650 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
5651
5652 2010-06-01 Pedro Alves <pedro@codesourcery.com>
5653 Stan Shebs <stan@codesourcery.com>
5654
5655 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
5656 (all): Depend on $(extra_libraries).
5657 (install-only): Install the IPA.
5658 (IPA_OBJS, IPA_LIB): New.
5659 (clean): Remove the IPA lib.
5660 (IPAGENT_CFLAGS): New.
5661 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
5662 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
5663 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
5664 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
5665 * configure.ac: Check for atomic builtins support in the compiler.
5666 (IPA_DEPFILES, extra_libraries): Define.
5667 * configure.srv (ipa_obj): Add description.
5668 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
5669 (i[34567]86-*-linux*): Set ipa_obj.
5670 (x86_64-*-linux*): Set ipa_obj.
5671 * linux-low.c (stabilizing_threads): New.
5672 (supports_fast_tracepoints): New.
5673 (linux_detach): Stabilize threads before detaching.
5674 (handle_tracepoints): Handle internal tracing breakpoints. Assert
5675 the lwp is either not stabilizing, or is moving out of a jump pad.
5676 (linux_fast_tracepoint_collecting): New.
5677 (maybe_move_out_of_jump_pad): New.
5678 (enqueue_one_deferred_signal): New.
5679 (dequeue_one_deferred_signal): New.
5680 (linux_wait_for_event_1): If moving out of a jump pad, defer
5681 pending signals to later.
5682 (linux_stabilize_threads): New.
5683 (linux_wait_1): Check if threads need moving out of jump pads, and
5684 do it if so.
5685 (stuck_in_jump_pad_callback): New.
5686 (move_out_of_jump_pad_callback): New.
5687 (lwp_running): New.
5688 (linux_resume_one_lwp): Handle moving out of jump pads.
5689 (linux_set_resume_request): Dequeue deferred signals.
5690 (need_step_over_p): Also step over fast tracepoint jumps.
5691 (start_step_over): Also uninsert fast tracepoint jumps.
5692 (finish_step_over): Also reinsert fast tracepoint jumps.
5693 (linux_install_fast_tracepoint_jump): New.
5694 (linux_target_ops): Install linux_stabilize_threads and
5695 linux_install_fast_tracepoint_jump_pad.
5696 * linux-low.h (linux_target_ops) <get_thread_area,
5697 install_fast_tracepoint_jump_pad>: New fields.
5698 (struct lwp_info) <collecting_fast_tracepoint,
5699 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
5700 (linux_get_thread_area): Declare.
5701 * linux-x86-low.c (jump_insn): New.
5702 (x86_get_thread_area): New.
5703 (append_insns): New.
5704 (push_opcode): New.
5705 (amd64_install_fast_tracepoint_jump_pad): New.
5706 (i386_install_fast_tracepoint_jump_pad): New.
5707 (x86_install_fast_tracepoint_jump_pad): New.
5708 (the_low_target): Install x86_get_thread_area and
5709 x86_install_fast_tracepoint_jump_pad.
5710 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
5711 (struct fast_tracepoint_jump): New.
5712 (fast_tracepoint_jump_insn): New.
5713 (fast_tracepoint_jump_shadow): New.
5714 (find_fast_tracepoint_jump_at): New.
5715 (fast_tracepoint_jump_here): New.
5716 (delete_fast_tracepoint_jump): New.
5717 (set_fast_tracepoint_jump): New.
5718 (uninsert_fast_tracepoint_jumps_at): New.
5719 (reinsert_fast_tracepoint_jumps_at): New.
5720 (set_breakpoint_at): Use write_inferior_memory.
5721 (uninsert_raw_breakpoint): Use write_inferior_memory.
5722 (check_mem_read): Mask out fast tracepoint jumps.
5723 (check_mem_write): Mask out fast tracepoint jumps.
5724 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
5725 (set_fast_tracepoint_jump): Declare.
5726 (delete_fast_tracepoint_jump)
5727 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
5728 (reinsert_fast_tracepoint_jumps_at): Declare.
5729 * regcache.c: Don't compile many functions when building the
5730 in-process agent library.
5731 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
5732 the register buffer in the heap.
5733 (free_register_cache): If the register buffer isn't owned by the
5734 regcache, don't free it.
5735 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
5736 pre-existing register caches.
5737 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
5738 type.
5739 (convert_ascii_to_int): : Constify `from' parameter type.
5740 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
5741 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
5742 the needed buffer in-place.
5743 (relocate_instruction): New.
5744 * server.c (handle_query) <qSymbols>: If the target supports
5745 tracepoints, give it a chance of looking up symbols. Report
5746 support for fast tracepoints.
5747 (handle_status): Stabilize threads.
5748 (process_serial_event): Adjust.
5749 * server.h (struct fast_tracepoint_jump): Forward declare.
5750 (struct process_info) <fast_tracepoint_jumps>: New field.
5751 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
5752 (decode_X_packet, decode_M_packet): Adjust.
5753 (relocate_instruction): Declare.
5754 (in_process_agent_loaded): Declare.
5755 (tracepoint_look_up_symbols): Declare.
5756 (struct fast_tpoint_collect_status): Declare.
5757 (fast_tracepoint_collecting): Declare.
5758 (force_unlock_trace_buffer): Declare.
5759 (handle_tracepoint_bkpts): Declare.
5760 (initialize_low_tracepoint)
5761 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
5762 * target.h (struct target_ops) <stabilize_threads,
5763 install_fast_tracepoint_jump_pad>: New fields.
5764 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
5765 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
5766 [HAVE_STDINT_H]: Include stdint.h.
5767 (trace_debug_1): Rename to ...
5768 (trace_vdebug): ... this.
5769 (trace_debug): Rename to ...
5770 (trace_debug_1): ... this. Add `level' parameter.
5771 (trace_debug): New.
5772 (ATTR_USED, ATTR_NOINLINE): New.
5773 (IP_AGENT_EXPORT): New.
5774 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5775 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
5776 (about_to_request_buffer_space, trace_buffer_is_full)
5777 (stopping_tracepoint, expr_eval_result, error_tracepoint)
5778 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
5779 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
5780 (traceframe_write_count, traceframes_created)
5781 (trace_state_variables)
5782 New renaming defines.
5783 (struct ipa_sym_addresses): New.
5784 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
5785 (symbol_list): New.
5786 (ipa_sym_addrs): New.
5787 (all_tracepoint_symbols_looked_up): New.
5788 (in_process_agent_loaded): New.
5789 (write_e_ipa_not_loaded): New.
5790 (maybe_write_ipa_not_loaded): New.
5791 (tracepoint_look_up_symbols): New.
5792 (debug_threads) [IN_PROCESS_AGENT]: New.
5793 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
5794 (UNKNOWN_SIDE_EFFECTS): New.
5795 (stop_tracing): New.
5796 (flush_trace_buffer): New.
5797 (stop_tracing_bkpt): New.
5798 (flush_trace_buffer_bkpt): New.
5799 (read_inferior_integer): New.
5800 (read_inferior_uinteger): New.
5801 (read_inferior_data_pointer): New.
5802 (write_inferior_data_pointer): New.
5803 (write_inferior_integer): New.
5804 (write_inferior_uinteger): New.
5805 (struct collect_static_trace_data_action): Delete.
5806 (enum tracepoint_type): New.
5807 (struct tracepoint) <type>: New field `type'.
5808 <actions_str, step_actions, step_actions_str>: Only include in
5809 GDBserver.
5810 <orig_size, obj_addr_on_target, adjusted_insn_addr>
5811 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
5812 (tracepoints): Use IP_AGENT_EXPORT.
5813 (last_tracepoint): Don't include in the IPA.
5814 (stopping_tracepoint): Use IP_AGENT_EXPORT.
5815 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
5816 (alloced_trace_state_variables): New.
5817 (trace_state_variables): Use IP_AGENT_EXPORT.
5818 (traceframe_t): Delete unused variable.
5819 (circular_trace_buffer): Don't include in the IPA.
5820 (trace_buffer_start): Delete.
5821 (struct trace_buffer_control): New.
5822 (trace_buffer_free): Delete.
5823 (struct ipa_trace_buffer_control): New.
5824 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
5825 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
5826 New.
5827 (trace_buffer_ctrl): New.
5828 (TRACE_BUFFER_CTRL_CURR): New.
5829 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
5830 Reimplement as macros.
5831 (trace_buffer_wrap): Delete.
5832 (traceframe_write_count, traceframe_read_count)
5833 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
5834 (struct tracepoint_hit_ctx) <type>: New field.
5835 (struct fast_tracepoint_ctx): New.
5836 (memory_barrier): New.
5837 (cmpxchg): New.
5838 (record_tracepoint_error): Update atomically in the IPA.
5839 (clear_inferior_trace_buffer): New.
5840 (about_to_request_buffer_space): New.
5841 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
5842 updating the same buffer.
5843 (add_tracepoint): Default the tracepoint's type to trap
5844 tracepoint, and orig_size to -1.
5845 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
5846 internal variables.
5847 (create_trace_state_variable): New parameter `gdb'. Handle it.
5848 (clear_installed_tracepoints): Clear fast tracepoint jumps.
5849 (cmd_qtdp): Handle fast tracepoints.
5850 (cmd_qtdv): Adjust.
5851 (max_jump_pad_size): New.
5852 (gdb_jump_pad_head): New.
5853 (get_jump_space_head): New.
5854 (claim_jump_space): New.
5855 (sort_tracepoints): New.
5856 (MAX_JUMP_SIZE): New.
5857 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
5858 IPA.
5859 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
5860 support. Upload fast traceframes, and delete internal IPA
5861 breakpoints.
5862 (stop_tracing_handler): New.
5863 (flush_trace_buffer_handler): New.
5864 (cmd_qtstop): Upload fast tracepoints.
5865 (response_tracepoint): Handle fast tracepoints.
5866 (tracepoint_finished_step): Upload fast traceframes. Set the
5867 tracepoint hit context's tracepoint type.
5868 (handle_tracepoint_bkpts): New.
5869 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
5870 type. Add comment about fast tracepoints.
5871 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
5872 non-existing action_str field.
5873 (get_context_regcache): Handle fast tracepoints.
5874 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
5875 to the regcache.
5876 (fast_tracepoint_from_jump_pad_address): New.
5877 (fast_tracepoint_from_ipa_tpoint_address): New.
5878 (collecting_t): New.
5879 (force_unlock_trace_buffer): New.
5880 (fast_tracepoint_collecting): New.
5881 (collecting): New.
5882 (gdb_collect): New.
5883 (write_inferior_data_ptr): New.
5884 (target_tp_heap): New.
5885 (target_malloc): New.
5886 (download_agent_expr): New.
5887 (UALIGN): New.
5888 (download_tracepoints): New.
5889 (download_trace_state_variables): New.
5890 (upload_fast_traceframes): New.
5891 (IPA_FIRST_TRACEFRAME): New.
5892 (IPA_NEXT_TRACEFRAME_1): New.
5893 (IPA_NEXT_TRACEFRAME): New.
5894 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
5895 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
5896 (gdb_jump_pad_buffer_end): New.
5897 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
5898 (initialize_tracepoint): Adjust.
5899 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
5900 buffer. Initialize the low module.
5901 * utils.c (PREFIX, TOOLNAME): New.
5902 (malloc_failure): Use PREFIX.
5903 (error): In the IPA, an error causes an exit.
5904 (fatal, warning): Use PREFIX.
5905 (internal_error): Use TOOLNAME.
5906 (NUMCELLS): Increase to 10.
5907 * configure, config.in: Regenerate.
5908
5909 2010-06-01 Pedro Alves <pedro@codesourcery.com>
5910
5911 * server.c (handle_query) <qSupported>: Do two passes over the
5912 qSupported string to avoid nesting strtok.
5913
5914 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5915
5916 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
5917 (CDEPS): New.
5918 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
5919 -Wl,--dynamic-list.
5920 * configure: Regenerate.
5921 * proc-service.list: New.
5922
5923 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5924
5925 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
5926 New comment.
5927
5928 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
5929
5930 * gdbreplay.c (remote_open): Check error return from socket() call by
5931 its equality to -1 not by it being negative.
5932 * remote-utils.c (remote_open): Likewise.
5933
5934 2010-05-23 Pedro Alves <pedro@codesourcery.com>
5935
5936 * config.h: Regenerate.
5937
5938 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
5939
5940 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
5941 doesn't provide PTRACE_GET_THREAD_AREA.
5942
5943 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
5944
5945 * linux-m68k-low.c: Include <asm/ptrace.h>
5946 (ps_get_thread_area): Implement.
5947
5948 2010-05-03 Doug Evans <dje@google.com>
5949
5950 * event-loop.c (struct callback_event): New struct.
5951 (callback_list): New global.
5952 (append_callback_event, delete_callback_event): New functions.
5953 (process_callback): New function.
5954 (start_event_loop): Call it.
5955 * remote-utils.c (NOT_SCHEDULED): Define.
5956 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
5957 moved out of readchar.
5958 (readchar): Rewrite. Call reschedule before returning.
5959 (reset_readchar): New function.
5960 (remote_close): Call it.
5961 (process_remaining, reschedule): New functions.
5962 * server.h (callback_handler_func): New typedef.
5963 (append_callback_event, delete_callback_event): Declare.
5964
5965 2010-05-03 Pedro Alves <pedro@codesourcery.com>
5966
5967 * proc-service.c (ps_pglobal_lookup): Use
5968 thread_db_look_up_one_symbol.
5969 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
5970 parameter. Use it instead of all_symbols_looked_up.
5971 * server.h (struct process_info) <all_symbols_looked_up>: Delete
5972 field.
5973 (all_symbols_looked_up): Don't declare.
5974 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
5975 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
5976 field.
5977 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
5978 Set all_symbols_looked_up here.
5979 (thread_db_look_up_one_symbol): New.
5980 (thread_db_get_tls_address): Adjust.
5981 (thread_db_load_search, try_thread_db_load_1): Always allocate the
5982 thread_db object on the heap, and tentatively set it in the
5983 process structure.
5984 (thread_db_init): Don't set all_symbols_looked_up here.
5985 * linux-low.h (thread_db_look_up_one_symbol): Declare.
5986
5987 2010-05-03 Pedro Alves <pedro@codesourcery.com>
5988
5989 * linux-low.c (linux_kill, linux_detach): Adjust.
5990 (status_pending_p_callback): Remove redundant statement. Check
5991 for !TARGET_WAITIKIND_IGNORE, instead of
5992 TARGET_WAITKIND_STOPPED.
5993 (handle_tracepoints): Make sure LWP is locked. Adjust.
5994 (linux_wait_for_event_1): Adjust.
5995 (linux_cancel_breakpoints): New.
5996 (unsuspend_one_lwp): New.
5997 (unsuspend_all_lwps): New.
5998 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
5999 (send_sigstop_callback): Change return type to int, add new
6000 `except' parameter and handle it.
6001 (suspend_and_send_sigstop_callback): New.
6002 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
6003 pass them down. If SUSPEND, also increment the lwp's suspend
6004 count.
6005 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
6006 (need_step_over_p): Don't consider suspended LWPs.
6007 (start_step_over): Adjust.
6008 (proceed_one_lwp): Change return type to int, add new `except'
6009 parameter and handle it.
6010 (unsuspend_and_proceed_one_lwp): New.
6011 (proceed_all_lwps): Use find_inferior instead of
6012 for_each_inferior.
6013 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
6014 also decrement the suspend count of LWPs. Pass `except' down,
6015 instead of hacking its suspend count.
6016 (linux_pause_all): Add `freeze' parameter. Adjust.
6017 (linux_unpause_all): New.
6018 (linux_target_ops): Install linux_unpause_all.
6019 * server.c (handle_status): Adjust.
6020 * target.h (struct target_ops): New fields `unpause_all' and
6021 `cancel_breakpoints'. Add new parameter to `pause_all'.
6022 (pause_all): Add new `freeze' parameter.
6023 (unpause_all): New.
6024 (cancel_breakpoints): New.
6025 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
6026 cancel breakpoints.
6027 (cmd_qtstart): Pause threads.
6028 (stop_tracing): Pause threads, and cancel breakpoints.
6029 * win32-low.c (win32_target_ops): Adjust.
6030
6031 2010-05-03 Pedro Alves <pedro@codesourcery.com>
6032
6033 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
6034 the inferior right away from here...
6035 (linux_wait_1): ... to here, and adjust to check the thread's
6036 last_resume_kind instead of the lwp's step or stop_expected flags.
6037
6038 2010-05-02 Pedro Alves <pedro@codesourcery.com>
6039
6040 * README: Use consistent `GDB' and `GDBserver' spellings.
6041
6042 2010-05-02 Pedro Alves <pedro@codesourcery.com>
6043
6044 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
6045 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
6046 (linux_detach_one_lwp): Assume the lwp is stopped.
6047 (any_thread_of): Delete.
6048 (linux_detach): Stop all lwps here. Don't blindly delete all
6049 breakpoints.
6050 (delete_lwp_callback): New.
6051 (linux_mourn): Delete all lwps of the process that is gone.
6052 (linux_wait_1): Don't delete the last lwp of the process here.
6053 * mem-break.h (mark_breakpoints_out): Declare.
6054 * mem-break.c (mark_breakpoints_out): New.
6055 (free_all_breakpoints): Use it.
6056 * server.c (handle_target_event): If the process is gone, mark
6057 breakpoints out.
6058 * thread-db.c (struct thread_db) <create_bp>: New field.
6059 (thread_db_enable_reporting): Fix prototype. Store a thread event
6060 breakpoint reference in the thread_db struct.
6061 (thread_db_load_search): Clear the thread_db object.
6062 (try_thread_db_load_1): Ditto.
6063 (switch_to_process): New.
6064 (disable_thread_event_reporting): Use it.
6065 (remove_thread_event_breakpoints): New.
6066 (thread_db_detach, thread_db_mourn): Use it.
6067
6068 2010-05-01 Pedro Alves <pedro@codesourcery.com>
6069
6070 * linux-low.c (linux_enable_event_reporting): New.
6071 (linux_wait_for_event_1, handle_extended_wait): Use it.
6072
6073 2010-04-30 Pedro Alves <pedro@codesourcery.com>
6074
6075 * linux-low.c (linux_kill_one_lwp, linux_kill)
6076 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
6077 (send_sigstop): Take an lwp_info as parameter instead. Queue a
6078 SIGSTOP even if the LWP is stopped.
6079 (send_sigstop_callback): New.
6080 (stop_all_lwps): Use send_sigstop_callback instead.
6081 (linux_resume_one_thread): Adjust.
6082 (proceed_one_lwp): Still proceed an LWP that the client has
6083 requested to stop, if we haven't reported it as stopped yet. Make
6084 sure that LWPs the client want stopped, have a pending SIGSTOP.
6085
6086 2010-04-26 Doug Evans <dje@google.com>
6087
6088 * server.c (handle_general_set): Make static.
6089
6090 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
6091 Print received char after testing for error/eof instead of before.
6092 (input_interrupt): Tweak comment.
6093
6094 2010-04-23 Doug Evans <dje@google.com>
6095
6096 * server.c (start_inferior): Print inferior argv if --debug.
6097
6098 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
6099
6100 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
6101 * nto-x86-low.c: Include server.h
6102
6103 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
6104
6105 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
6106 be consistent with other sources of this directory.
6107 (init_registers_amd64): Correct name of source file of this function
6108 in the comment.
6109
6110 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6111
6112 * configure.srv (x86_64-*-mingw*): New configuration for Windows
6113 64-bit executables.
6114
6115 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6116
6117 * win32-i386-low.c: Add 64-bit support.
6118 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
6119 (init_registers_amd64): Declare.
6120 (mappings): Add 64-bit version of array.
6121 (init_windows_x86): New function.
6122 (the_low_target): Change init_arch field to init_windows_x86.
6123
6124 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6125
6126 * win32-low.c: Adapt to support also 64-bit architecture.
6127 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
6128 (get_image_name): Use SIZE_T type for local variable `done'.
6129 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
6130 (toolhelp_get_dll_name): Idem.
6131 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
6132 Use uintptr_t typecast to avoid warning.
6133 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
6134 (handle_exception): Use phex_nz to avoid warning.
6135 (win32_wait): Remove unused local variable `process'.
6136
6137 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6138
6139 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
6140 `amd64-avx.o'.
6141
6142 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
6143
6144 * configure.ac: Use `ws2_32' library for srv_mingw.
6145 * configure: Regenerate.
6146 * gdbreplay.c: Include winsock2.h instead of winsock.h.
6147 * remote-utils.c: Likewise.
6148
6149 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
6150
6151 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
6152 if __x86_64__ is defined.
6153
6154 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
6155
6156 * configure: Regenerate.
6157
6158 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
6159
6160 * server.c (handle_query): Handle 'qGetTIBAddr' query.
6161 * target.h (target_ops): New get_tib_address field.
6162 * win32-low.h (win32_thread_info): Add thread_local_base field.
6163 * win32-low.c (child_add_thread): Add tlb argument.
6164 Set thread_local_base field to TLB.
6165 (get_child_debug_event): Adapt to child_add_thread change.
6166 (win32_get_tib_address): New function.
6167 (win32_target_ops): Set get_tib_address field to
6168 win32_get_tib_address.
6169 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
6170
6171 2010-04-12 Pedro Alves <pedro@codesourcery.com>
6172
6173 * linux-low.c (linux_mourn): Also remove the process.
6174 * server.c (handle_target_event): Don't remove the process here.
6175 * nto-low.c (nto_mourn): New.
6176 (nto_target_ops): Install it.
6177 * spu-low.c (spu_mourn): New.
6178 (spu_target_ops): Install it.
6179 * win32-low.c (win32_mourn): New.
6180 (win32_target_ops): Install it.
6181
6182 2010-04-12 Pedro Alves <pedro@codesourcery.com>
6183
6184 * server.h (buffer_xml_printf): Remove redundant `;'.
6185
6186 2010-04-12 Pedro Alves <pedro@codesourcery.com>
6187
6188 * regcache.c (set_register_cache): Invalidate regcaches before
6189 changing the register cache layout.
6190 (regcache_invalidate_one): Allow a NULL regcache.
6191 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
6192 regcaches before changing the register cache layout or the target
6193 regsets.
6194
6195 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
6196
6197 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
6198 variable warning on Linux/x86-64.
6199
6200 2010-04-11 Pedro Alves <pedro@codesourcery.com>
6201
6202 GDBserver disconnected tracing support.
6203
6204 * linux-low.c (linux_remove_process): Delete.
6205 (add_lwp): Don't set last_resume_kind here.
6206 (linux_kill): Use `mourn'.
6207 (linux_detach): Use `thread_db_detach', and `mourn'.
6208 (linux_mourn): New.
6209 (linux_attach_lwp_1): Adjust comment.
6210 (linux_attach): last_resume_kind moved the thread_info; adjust.
6211 (status_pending_p_callback): Adjust.
6212 (linux_wait_for_event_1): Adjust.
6213 (count_events_callback, select_singlestep_lwp_callback)
6214 (select_event_lwp_callback, cancel_breakpoints_callback)
6215 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
6216 (proceed_one_lwp): Adjust.
6217 (linux_async): Add debug output.
6218 (linux_thread_stopped): New.
6219 (linux_pause_all): New.
6220 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
6221 linux_pause_all.
6222 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
6223 (thread_db_free): Delete declaration.
6224 (thread_db_detach, thread_db_mourn): Declare.
6225 * thread-db.c (thread_db_init): Use thread_db_mourn.
6226 (thread_db_free): Delete, split in two.
6227 (disable_thread_event_reporting): New.
6228 (thread_db_detach): New.
6229 (thread_db_mourn): New.
6230
6231 * server.h (struct thread_info) <last_resume_kind>: New field.
6232 <attached>: Add comment.
6233 <gdb_detached>: New field.
6234 (handler_func): Change return type to int.
6235 (handle_serial_event, handle_target_event): Ditto.
6236 (gdb_connected): Declare.
6237 (tracing): Delete.
6238 (disconnected_tracing): Declare.
6239 (stop_tracing): Declare.
6240
6241 * server.c (handle_query) <qSupported>: Report support for
6242 disconnected tracing.
6243 (queue_stop_reply_callback): Account for running threads.
6244 (gdb_wants_thread_stopped): New.
6245 (gdb_wants_all_threads_stopped): New.
6246 (gdb_reattached_process): New.
6247 (handle_status): Clear the `gdb_detached' flag of all processes.
6248 In all-stop, stop all threads.
6249 (main): Be sure to leave tfind mode. Handle disconnected tracing.
6250 (process_serial_event): If the remote connection breaks, or if an
6251 exit was forced with "monitor exit", force an event loop exit.
6252 Handle disconnected tracing on detach.
6253 (handle_serial_event): Adjust.
6254 (handle_target_event): If GDB isn't connected, forward events back
6255 to the inferior, unless the last process exited, in which case,
6256 exit gdbserver. Adjust interface.
6257
6258 * remote-utils.c (remote_open): Don't block in accept. Instead
6259 register an event loop source on the listen socket file
6260 descriptor. Refactor bits into ...
6261 (listen_desc): ... this new global.
6262 (gdb_connected): ... this new function.
6263 (enable_async_notification): ... this new function.
6264 (handle_accept_event): ... this new function.
6265 (remote_close): Clear remote_desc.
6266
6267 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
6268
6269 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
6270 New fields.
6271 (mourn_inferior): Define.
6272 (target_process_qsupported): Avoid the dangling else problem.
6273 (thread_stopped): Define.
6274 (pause_all): Define.
6275 (target_waitstatus_to_string): Declare.
6276 * target.c (target_waitstatus_to_string): New.
6277
6278 * tracepoint.c (tracing): Make extern.
6279 (disconnected_tracing): New.
6280 (stop_tracing): Make extern. Handle tracing stops due to GDB
6281 disconnecting.
6282 (cmd_qtdisconnected): New.
6283 (cmd_qtstatus): Report disconnected tracing status in trace reply.
6284 (handle_tracepoint_general_set): Handle QTDisconnected.
6285
6286 * event-loop.c (event_handler_func): Change return type to int.
6287 (process_event): Bail out if the event handler wants the event
6288 loop to stop.
6289 (handle_file_event): Ditto.
6290 (start_event_loop): Bail out if the event handler wants the event
6291 loop to stop.
6292
6293 * nto-low.c (nto_target_ops): Adjust.
6294 * spu-low.c (spu_wait): Don't remove the process here.
6295 (spu_target_ops): Adjust.
6296 * win32-low.c (win32_wait): Don't remove the process here.
6297 (win32_target_ops): Adjust.
6298
6299 2010-04-11 Pedro Alves <pedro@codesourcery.com>
6300
6301 * regcache.c (realloc_register_cache): Invalidate inferior's
6302 regcache before recreating it.
6303
6304 2010-04-09 Pedro Alves <pedro@codesourcery.com>
6305
6306 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
6307
6308 2010-04-09 Stan Shebs <stan@codesourcery.com>
6309 Pedro Alves <pedro@codesourcery.com>
6310
6311 * server.h (LONGEST): New.
6312 (struct thread_info) <while_stepping>: New field.
6313 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
6314 Declare.
6315 (initialize_tracepoint, handle_tracepoint_general_set)
6316 (handle_tracepoint_query, tracepoint_finished_step)
6317 (tracepoint_was_hit, release_while_stepping_state_list):
6318 (current_traceframe): Declare.
6319 * server.c (handle_general_set): Handle tracepoint packets.
6320 (read_memory): New.
6321 (write_memory): New.
6322 (handle_search_memory_1): Use read_memory.
6323 (handle_query): Report support for conditional tracepoints, trace
6324 state variables, and tracepoint sources. Handle tracepoint
6325 queries.
6326 (main): Initialize the tracepoints module.
6327 (process_serial_event): Handle traceframe reads/writes.
6328
6329 * linux-low.c (handle_tracepoints): New.
6330 (linux_wait_1): Call it.
6331 (linux_resume_one_lwp): Handle while-stepping.
6332 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
6333 (linux_target_ops): Install them.
6334 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
6335 New field.
6336 * linux-x86-low.c (x86_supports_tracepoints): New.
6337 (the_low_target). Install it.
6338
6339 * mem-break.h (delete_breakpoint): Declare.
6340 * mem-break.c (delete_breakpoint): Make external.
6341
6342 * target.h (struct target_ops): Add `supports_tracepoints',
6343 `read_pc', and `write_pc' fields.
6344 (target_supports_tracepoints): Define.
6345 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
6346 (phex_nz): New.
6347
6348 * regcache.h (struct regcache) <registers_owned>: New field.
6349 (init_register_cache, regcache_cpy): Declare.
6350 (regcache_read_pc, regcache_write_pc): Declare.
6351 (register_cache_size): Declare.
6352 (supply_regblock): Declare.
6353 * regcache.c (init_register_cache): New.
6354 (new_register_cache): Use it.
6355 (regcache_cpy): New.
6356 (register_cache_size): New.
6357 (supply_regblock): New.
6358 (regcache_read_pc, regcache_write_pc): New.
6359
6360 * tracepoint.c: New.
6361
6362 * Makefile.in (OBS): Add tracepoint.o.
6363 (tracepoint.o): New rule.
6364
6365 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
6366
6367 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
6368 (i386-mmx.o): New.
6369 (i386-mmx.c): Likewise.
6370 (i386-mmx-linux.o): Likewise.
6371 (i386-mmx-linux.c): Likewise.
6372
6373 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
6374 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
6375 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
6376 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
6377
6378 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
6379 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
6380 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
6381
6382 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
6383
6384 * Makefile.in (clean): Updated.
6385 (i386-avx.o): New.
6386 (i386-avx.c): Likewise.
6387 (i386-avx-linux.o): Likewise.
6388 (i386-avx-linux.c): Likewise.
6389 (amd64-avx.o): Likewise.
6390 (amd64-avx.c): Likewise.
6391 (amd64-avx-linux.o): Likewise.
6392 (amd64-avx-linux.c): Likewise.
6393
6394 * configure.srv (srv_i386_regobj): Add i386-avx.o.
6395 (srv_i386_linux_regobj): Add i386-avx-linux.o.
6396 (srv_amd64_regobj): Add amd64-avx.o.
6397 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
6398 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
6399 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
6400 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
6401 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
6402 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
6403 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
6404
6405 * i387-fp.c: Include "i386-xstate.h".
6406 (i387_xsave): New.
6407 (i387_cache_to_xsave): Likewise.
6408 (i387_xsave_to_cache): Likewise.
6409 (x86_xcr0): Likewise.
6410
6411 * i387-fp.h (i387_cache_to_xsave): Likewise.
6412 (i387_xsave_to_cache): Likewise.
6413 (x86_xcr0): Likewise.
6414
6415 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
6416 * linux-crisv32-low.c (target_regsets): Likewise.
6417 * linux-m68k-low.c (target_regsets): Likewise.
6418 * linux-mips-low.c (target_regsets): Likewise.
6419 * linux-ppc-low.c (target_regsets): Likewise.
6420 * linux-s390-low.c (target_regsets): Likewise.
6421 * linux-sh-low.c (target_regsets): Likewise.
6422 * linux-sparc-low.c (target_regsets): Likewise.
6423 * linux-xtensa-low.c (target_regsets): Likewise.
6424
6425 * linux-low.c: Include <sys/uio.h>.
6426 (regsets_fetch_inferior_registers): Support nt_type.
6427 (regsets_store_inferior_registers): Likewise.
6428 (linux_process_qsupported): New.
6429 (linux_target_ops): Add linux_process_qsupported.
6430
6431 * linux-low.h (regset_info): Add nt_type.
6432 (linux_target_ops): Add process_qsupported.
6433
6434 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
6435 and <sys/uio.h>.
6436 (init_registers_i386_avx_linux): New.
6437 (init_registers_amd64_avx_linux): Likewise.
6438 (xmltarget_i386_linux_no_xml): Likewise.
6439 (xmltarget_amd64_linux_no_xml): Likewise.
6440 (PTRACE_GETREGSET): Likewise.
6441 (PTRACE_SETREGSET): Likewise.
6442 (x86_fill_xstateregset): Likewise.
6443 (x86_store_xstateregset): Likewise.
6444 (use_xml): Likewise.
6445 (x86_linux_update_xmltarget): Likewise.
6446 (x86_linux_process_qsupported): Likewise.
6447 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
6448 (x86_arch_setup): Don't call init_registers_amd64_linux nor
6449 init_registers_i386_linux here. Call
6450 x86_linux_update_xmltarget.
6451 (the_low_target): Add x86_linux_process_qsupported.
6452
6453 * server.c (handle_query): Call target_process_qsupported.
6454
6455 * target.h (target_ops): Add process_qsupported.
6456 (target_process_qsupported): New.
6457
6458 2010-04-03 Pedro Alves <pedro@codesourcery.com>
6459
6460 * inferiors.c (add_thread): Set last_status kind to
6461 TARGET_WAITKIND_IGNORE.
6462 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
6463 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
6464 (linux_wait_1): Move `thread' local definition to block that uses
6465 it. Don't NULL initialize `event_child'.
6466 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
6467 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
6468 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
6469
6470 2010-04-01 Pedro Alves <pedro@codesourcery.com>
6471
6472 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
6473 an extended waitstatus, or by a watchpoint.
6474 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
6475 thread was stepping or has been stopped by a watchpoint.
6476
6477 2010-04-01 Pedro Alves <pedro@codesourcery.com>
6478
6479 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
6480 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
6481 of another, then delete the previous, and validate all
6482 breakpoints.
6483 (validate_inserted_breakpoint): New.
6484 (delete_disabled_breakpoints): New.
6485 (validate_breakpoints): New.
6486 (check_mem_read): Validate breakpoints before trusting their
6487 shadow. Delete disabled breakpoints.
6488 (check_mem_write): Validate breakpoints before trusting they
6489 should be inserted. Delete disabled breakpoints.
6490 * mem-break.h (validate_breakpoints):
6491 * server.c (handle_query): Validate breakpoints when we see a
6492 qSymbol query.
6493
6494 2010-04-01 Pedro Alves <pedro@codesourcery.com>
6495
6496 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
6497 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
6498 if we could tell there's a GDB breakpoint at stop_pc.
6499 (need_step_over_p): Don't do a step over if we find a GDB
6500 breakpoint at the resume PC.
6501
6502 * mem-break.c (struct raw_breakpoint): New.
6503 (enum bkpt_type): New type `gdb_breakpoint'.
6504 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
6505 fields. New field `raw'.
6506 (find_raw_breakpoint_at): New.
6507 (set_raw_breakpoint_at): Handle refcounting. Create a raw
6508 breakpoint instead.
6509 (set_breakpoint_at): Adjust.
6510 (delete_raw_breakpoint): New.
6511 (release_breakpoint): New.
6512 (delete_breakpoint): Rename to...
6513 (delete_breakpoint_1): ... this. Add proc parameter. Use
6514 release_breakpoint. Return ENOENT.
6515 (delete_breakpoint): Reimplement.
6516 (find_breakpoint_at): Delete.
6517 (find_gdb_breakpoint_at): New.
6518 (delete_breakpoint_at): Delete.
6519 (set_gdb_breakpoint_at): New.
6520 (delete_gdb_breakpoint_at): New.
6521 (gdb_breakpoint_here): New.
6522 (set_reinsert_breakpoint): Use release_breakpoint.
6523 (uninsert_breakpoint): Rename to ...
6524 (uninsert_raw_breakpoint): ... this.
6525 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
6526 (reinsert_raw_breakpoint): Change parameter type to
6527 raw_breakpoint.
6528 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
6529 instead.
6530 (check_breakpoints): Adjust. Use release_breakpoint.
6531 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
6532 (breakpoint_inserted_here): Ditto.
6533 (check_mem_read): Adjust to iterate over raw breakpoints instead.
6534 Don't trust the breakpoint's shadow if it is not inserted.
6535 (check_mem_write): Adjust to iterate over raw breakpoints instead.
6536 (delete_all_breakpoints): Adjust.
6537 (free_all_breakpoints): Mark all breakpoints as uninserted, and
6538 use delete_breakpoint_1.
6539
6540 * mem-break.h (breakpoints_supported): Delete declaration.
6541 (set_gdb_breakpoint_at): Declare.
6542 (gdb_breakpoint_here): Declare.
6543 (delete_breakpoint_at): Delete.
6544 (delete_gdb_breakpoint_at): Declare.
6545
6546 * server.h (struct raw_breakpoint): Forward declare.
6547 (struct process_info): New field `raw_breakpoints'.
6548
6549 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
6550 breakpoints.
6551
6552 2010-03-24 Pedro Alves <pedro@codesourcery.com>
6553
6554 * linux-low.c (status_pending_p_callback): Fix comment.
6555 (linux_wait_for_event_1): Move most of the internal breakpoint
6556 handling from here...
6557 (linux_wait_1): ... to here.
6558 (count_events_callback): New.
6559 (select_singlestep_lwp_callback): New.
6560 (select_event_lwp_callback): New.
6561 (cancel_breakpoints_callback): New.
6562 (select_event_lwp): New.
6563 (linux_wait_1): Simplify internal breakpoint handling. Give equal
6564 priority to all LWPs that have had events that should be reported
6565 to the client. Cancel breakpoints when about to reporting the
6566 event to the client, not while stopping lwps. No longer cancel
6567 finished single-steps here.
6568 (cancel_finished_single_step): Delete.
6569 (cancel_finished_single_steps): Delete.
6570
6571 2010-03-24 Pedro Alves <pedro@codesourcery.com>
6572
6573 * mem-break.c (enum bkpt_type): New.
6574 (struct breakpoint): New field `type'.
6575 (set_breakpoint_at): Change return type to struct breakpoint
6576 pointer. Set type to `other_breakpoint' by default.
6577 (delete_breakpoint): Rewrite, supporting more than one breakpoint
6578 in the breakpoint list.
6579 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
6580 (reinsert_breakpoint): Rename to ...
6581 (reinsert_raw_breakpoint): ... this.
6582 (reinsert_breakpoints_at): Adjust.
6583 * mem-break.h (struct breakpoint): Declare.
6584 (set_breakpoint_at): Change return type to struct breakpoint
6585 pointer.
6586
6587 2010-03-24 Pedro Alves <pedro@codesourcery.com>
6588
6589 * server.c (handle_query): Assign, not compare.
6590
6591 2010-03-24 Pedro Alves <pedro@codesourcery.com>
6592
6593 Teach linux gdbserver to step-over-breakpoints.
6594
6595 * linux-low.c (can_hardware_single_step): New.
6596 (supports_breakpoints): New.
6597 (handle_extended_wait): If stopping threads, read the stop pc of
6598 the new cloned LWP.
6599 (get_pc): New.
6600 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
6601 low target doesn't support retrieving the PC.
6602 (add_lwp): Set last_resume_kind to resume_continue.
6603 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
6604 (linux_attach): Don't clear stop_expected. Set the lwp's
6605 last_resume_kind to resume_stop.
6606 (linux_detach_one_lwp): Don't check for removed breakpoints.
6607 (check_removed_breakpoint): Delete.
6608 (status_pending_p): Rename to ...
6609 (status_pending_p_callback): ... this. Don't check for removed
6610 breakpoints. Don't consider threads that are stopped from GDB's
6611 perspective.
6612 (linux_wait_for_lwp): Always read the stop_pc here.
6613 (cancel_breakpoint): New.
6614 (step_over_bkpt): New global.
6615 (linux_wait_for_event_1): Implement stepping over breakpoints.
6616 (gdb_wants_lwp_stopped): New.
6617 (gdb_wants_all_stopped): New.
6618 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
6619 single-step traps here. Store the thread's last reported target
6620 wait status.
6621 (send_sigstop): Don't clear stop_expected. Always set it,
6622 instead.
6623 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
6624 (cancel_finished_single_step): New.
6625 (cancel_finished_single_steps): New.
6626 (wait_for_sigstop): Don't cancel finished single-step traps here.
6627 (linux_resume_one_lwp): Don't check for removed breakpoints.
6628 Don't set `step' on non-hardware step archs.
6629 (linux_set_resume_request): Ignore resume_stop requests if already
6630 stopping or stopped. Set the lwp's last_resume_kind.
6631 (resume_status_pending_p): Don't check for removed breakpoints.
6632 (need_step_over_p): New.
6633 (start_step_over): New.
6634 (finish_step_over): New.
6635 (linux_resume_one_thread): Always queue a sigstop for resume_stop
6636 requests. Clear the thread's last reported target waitstatus.
6637 Don't use the `suspended' flag. Don't consider pending breakpoints.
6638 (linux_resume): Start a step-over if necessary.
6639 (proceed_one_lwp): New.
6640 (proceed_all_lwps): New.
6641 (unstop_all_lwps): New.
6642 * linux-low.h (struct lwp_info): Rewrite comment for the
6643 `suspended' flag. Add the `stop_pc' field. Delete the
6644 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
6645 Add `'last_resume_kind' and `need_step_over' fields.
6646 * inferiors.c (struct thread_info): Delete, moved elsewhere.
6647 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
6648 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
6649 (set_raw_breakpoint_at): New.
6650 (set_breakpoint_at): Rewrite to use it.
6651 (reinsert_breakpoint_handler): Delete.
6652 (set_reinsert_breakpoint): New.
6653 (reinsert_breakpoint_by_bp): Delete.
6654 (delete_reinsert_breakpoints): New.
6655 (uninsert_breakpoint): Rewrite.
6656 (uninsert_breakpoints_at): New.
6657 (reinsert_breakpoint): Rewrite.
6658 (reinsert_breakpoints_at): New.
6659 (check_breakpoints): Rewrite.
6660 (breakpoint_here): New.
6661 (breakpoint_inserted_here): New.
6662 (check_mem_read): Adjust.
6663 * mem-break.h (breakpoints_supported, breakpoint_here)
6664 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
6665 (reinsert_breakpoint_by_bp): Delete declaration.
6666 (delete_reinsert_breakpoints): Declare.
6667 (reinsert_breakpoint): Delete declaration.
6668 (reinsert_breakpoints_at): Declare.
6669 (uninsert_breakpoint): Delete declaration.
6670 (uninsert_breakpoints_at): Declare.
6671 (check_breakpoints): Adjust prototype.
6672 * server.h: Adjust include order.
6673 (struct thread_info): Declare here. Add a `last_status' field.
6674
6675 2010-03-23 Michael Snyder <msnyder@vmware.com>
6676
6677 * server.c (crc32): New function.
6678 (handle_query): Add handling for 'qCRC:' request.
6679
6680 2010-03-23 Pedro Alves <pedro@codesourcery.com>
6681
6682 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
6683 lwp had been stopped by a watchpoint.
6684
6685 2010-03-16 Pedro Alves <pedro@codesourcery.com>
6686
6687 * server.h (internal_error): Declare.
6688 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
6689 * utils.c (internal_error): New function.
6690
6691 2010-03-15 Andreas Schwab <schwab@redhat.com>
6692
6693 * configure.srv: Fix typo setting srv_regobj.
6694
6695 2010-03-15 Pedro Alves <pedro@codesourcery.com>
6696
6697 * linux-low.c (fetch_register): Avoid passing a non string literal
6698 format to `error'.
6699 (usr_store_inferior_registers): Ditto.
6700
6701 2010-03-14 Pedro Alves <pedro@codesourcery.com>
6702
6703 * linux-low.c (linux_write_memory): Bail out early if peeking
6704 memory failed.
6705
6706 2010-03-14 Pedro Alves <pedro@codesourcery.com>
6707
6708 * linux-low.h (struct lwp_info): New fields
6709 `stopped_by_watchpoint' and `stopped_data_address'.
6710 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
6711 here, and cache them in the lwp object.
6712 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
6713 directly.
6714 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
6715 field.
6716 (linux_stopped_by_watchpoint): Rewrite.
6717 (linux_stopped_data_address): Rewrite.
6718
6719 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
6720
6721 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
6722 switching the current inferior, not before.
6723
6724 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
6725
6726 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
6727 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
6728 i386-linux.c and amd64-linux.c.
6729 (reg-i386.o): Removed.
6730 (reg-i386.c): Likewise.
6731 (reg-i386-linux.o): Likewise.
6732 (reg-i386-linux.c): Likewise.
6733 (reg-x86-64.o): Likewise.
6734 (reg-x86-64.c): Likewise.
6735 (reg-x86-64-linux.o): Likewise.
6736 (reg-x86-64-linux.c): Likewise.
6737 (i386.o): New.
6738 (i386.c): Likewise.
6739 (i386-linux.o): Likewise.
6740 (i386-linux.c): Likewise.
6741 (amd64.o): Likewise.
6742 (amd64.c): Likewise.
6743 (amd64-linux.o): Likewise.
6744 (amd64-linux.c): Likewise.
6745
6746 * configure.srv (srv_i386_regobj): New.
6747 (srv_i386_linux_regobj): Likewise.
6748 (srv_amd64_regobj): Likewise.
6749 (srv_amd64_linux_regobj): Likewise.
6750 (srv_i386_32bit_xmlfiles): Likewise.
6751 (srv_i386_64bit_xmlfiles): Likewise.
6752 (srv_i386_xmlfiles): Likewise.
6753 (srv_amd64_xmlfiles): Likewise.
6754 (srv_i386_linux_xmlfiles): Likewise.
6755 (srv_amd64_linux_xmlfiles): Likewise.
6756 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
6757 srv_xmlfiles to $srv_i386_xmlfiles.
6758 (i[34567]86-*-mingw32ce*): Likewise.
6759 (i[34567]86-*-mingw*): Likewise.
6760 (i[34567]86-*-nto*): Likewise.
6761 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
6762 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
6763 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
6764 (x86_64-*-linux*): Likewise.
6765
6766 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
6767 (init_registers_amd64_linux): New.
6768 (x86_arch_setup): Replace init_registers_x86_64_linux with
6769 init_registers_amd64_linux.
6770
6771 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
6772
6773 * configure.ac: Check for libdl. If it is not available link against
6774 static libthread_db.
6775 * configure: Regenerate.
6776
6777 2010-02-22 Pedro Alves <pedro@codesourcery.com>
6778
6779 PR9605
6780
6781 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
6782 handing a read watchpoint.
6783 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
6784
6785 2010-02-12 Doug Evans <dje@google.com>
6786
6787 * linux-low.c (linux_supports_tracefork_flag): Document.
6788 (linux_look_up_symbols): Add comment.
6789
6790 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
6791
6792 * regcache.c (supply_register): Clear regcache if buf is NULL.
6793
6794 2010-02-02 Nicolas Roche <roche@sourceware.org>
6795 Joel Brobecker <brobecker@adacore.com>
6796
6797 * inferiors.c (find_inferior): Add function documentation.
6798 (unloaded_dll): Handle the case where the unloaded dll has not
6799 been previously registered in the dll list.
6800
6801 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
6802
6803 * linux-arm-low.c (thumb_breakpoint_len): Delete.
6804 (thumb2_breakpoint): New.
6805 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
6806
6807 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
6808
6809 * linux-low.c (get_stop_pc): Check for SIGTRAP.
6810 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
6811 breakpoints.
6812
6813 2010-01-21 Pedro Alves <pedro@codesourcery.com>
6814
6815 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
6816
6817 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
6818
6819 * linux-s390-low.c (s390_collect_ptrace_register)
6820 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
6821
6822 2010-01-21 Doug Evans <dje@google.com>
6823
6824 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
6825 (PTRACE_ARG4_TYPE): New macro.
6826 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
6827 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
6828 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
6829 (usr_store_inferior_registers): Ditto.
6830 (linux_read_memory, linux_write_memory): Ditto.
6831 (linux_test_for_tracefork): Ditto.
6832
6833 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
6834 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
6835
6836 2010-01-21 Pedro Alves <pedro@codesourcery.com>
6837
6838 * proc-service.c (ps_lgetregs): Don't refetch registers from the
6839 target.
6840
6841 2010-01-21 Pedro Alves <pedro@codesourcery.com>
6842
6843 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
6844 prototype to take a regcache. Adjust.
6845
6846 2010-01-20 Pedro Alves <pedro@codesourcery.com>
6847
6848 * regcache.h (struct thread_info): Forward declare.
6849 (struct regcache): New.
6850 (new_register_cache): Adjust prototype.
6851 (get_thread_regcache): Declare.
6852 (free_register_cache): Adjust prototype.
6853 (registers_to_string, registers_from_string): Ditto.
6854 (supply_register, supply_register_by_name, collect_register)
6855 (collect_register_as_string, collect_register_by_name): Ditto.
6856 * regcache.c (struct inferior_regcache_data): Delete.
6857 (get_regcache): Rename to ...
6858 (get_thread_regcache): ... this. Adjust. Switch inferior before
6859 fetching registers.
6860 (regcache_invalidate_one): Adjust.
6861 (regcache_invalidate): Fix prototype.
6862 (new_register_cache): Return the new register cache.
6863 (free_register_cache): Change prototype.
6864 (realloc_register_cache): Adjust.
6865 (registers_to_string): Change prototype to take a regcache. Adjust.
6866 (registers_from_string): Ditto.
6867 (register_data): Ditto.
6868 (supply_register): Ditto.
6869 (supply_register_by_name): Ditto.
6870 (collect_register): Ditto.
6871 (collect_register_as_string): Ditto.
6872 (collect_register_by_name): Ditto.
6873 * server.c (process_serial_event): Adjust.
6874 * linux-low.h (regset_fill_func, regset_store_func): Change
6875 prototype.
6876 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
6877 Change prototype.
6878 * linux-low.c (get_stop_pc): Adjust.
6879 (check_removed_breakpoint): Adjust.
6880 (linux_wait_for_event): Adjust.
6881 (linux_resume_one_lwp): Adjust.
6882 (fetch_register): Add regcache parameter. Adjust.
6883 (usr_store_inferior_registers): Ditto.
6884 (regsets_fetch_inferior_registers): Ditto.
6885 (regsets_store_inferior_registers): Ditto.
6886 (linux_fetch_registers, linux_store_registers): Ditto.
6887 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
6888 regcache. Adjust.
6889 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
6890 Ditto.
6891 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
6892 prototype to take a regcache.
6893 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
6894 * remote-utils.c (convert_ascii_to_int, outreg)
6895 (prepare_resume_reply): Change prototype to take a regcache.
6896 Adjust.
6897 * target.h (struct target_ops) <fetch_registers, store_registers>:
6898 Change prototype to take a regcache.
6899 (fetch_inferior_registers, store_inferior_registers): Change
6900 prototype to take a regcache. Adjust.
6901 * proc-service.c (ps_lgetregs): Adjust.
6902 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
6903 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
6904 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
6905 take a regcache. Adjust.
6906 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
6907 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
6908 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
6909 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
6910 * linux-cris-low.c (cris_get_pc, cris_set_pc)
6911 (cris_cannot_fetch_register):
6912 (cris_breakpoint_at): Change prototype to take a regcache.
6913 Adjust.
6914 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
6915 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
6916 to take a regcache. Adjust.
6917 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
6918 Adjust.
6919 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
6920 take a regcache. Adjust.
6921 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
6922 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
6923 (m68k_set_pc): Change prototype to take a regcache. Adjust.
6924 * linux-mips-low.c (mips_get_pc):
6925 (mips_set_pc): Change prototype to take a regcache. Adjust.
6926 (mips_reinsert_addr): Adjust.
6927 (mips_collect_register): Change prototype to take a regcache.
6928 Adjust.
6929 (mips_supply_register):
6930 (mips_collect_register_32bit, mips_supply_register_32bit)
6931 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
6932 (mips_store_fpregset): Ditto.
6933 * linux-ppc-low.c (ppc_supply_ptrace_register)
6934 (ppc_supply_ptrace_register): Ditto.
6935 (parse_spufs_run): Adjust.
6936 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
6937 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
6938 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
6939 take a regcache. Adjust.
6940 * linux-s390-low.c (s390_collect_ptrace_register)
6941 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
6942 (s390_set_pc): Change prototype to take a regcache. Adjust.
6943 (s390_arch_setup): Adjust.
6944 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
6945 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
6946 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
6947 (sparc_fill_gregset, sparc_store_gregset_from_stack)
6948 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
6949 regcache. Adjust.
6950 (sparc_breakpoint_at): Adjust.
6951 * linux-xtensa-low.c (xtensa_fill_gregset):
6952 (xtensa_store_gregset):
6953 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
6954 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
6955 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
6956 prototype to take a regcache. Adjust.
6957 * win32-arm-low.c (arm_fetch_inferior_register)
6958 (arm_store_inferior_register): Change prototype to take a
6959 regcache. Adjust.
6960 * win32-i386-low.c (i386_fetch_inferior_register)
6961 (i386_store_inferior_register): Change prototype to take a
6962 regcache. Adjust.
6963 * win32-low.c (child_fetch_inferior_registers)
6964 (child_store_inferior_registers): Change prototype to take a
6965 regcache. Adjust.
6966 (win32_wait): Adjust.
6967 (win32_fetch_inferior_registers): Change prototype to take a
6968 regcache. Adjust.
6969 (win32_store_inferior_registers): Adjust.
6970 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
6971 store_inferior_register>: Change prototype to take a regcache.
6972
6973 2010-01-20 Doug Evans <dje@google.com>
6974
6975 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
6976 #ifdef.
6977 (linux_wait_for_event1, linux_init_signals): Ditto.
6978 (W_STOPCODE): Provide definition if missing.
6979
6980 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
6981
6982 * linux-low.c (linux_core_of_thread): New.
6983 (compare_ints, show_process, list_threads): New.
6984 (linux_qxfer_osdata): Report threads and cores.
6985 (linux_target_op): Register linux_core_of_thread.
6986 * remote-utils.c (prepare_resume_reply): Report the core.
6987 (buffer_xml_printf): Support %d specifier.
6988 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
6989 New.
6990 (handle_query): Handle qXfer:threads. Announce availability
6991 thereof.
6992 * target.h (struct target_ops): New field core_of_thread.
6993
6994 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
6995
6996 * Makefile.in (clean): Remove new generated files.
6997 (reg-s390.o, reg-s390.c): Remove rules.
6998 (reg-s390x.o, reg-s390x.c): Likewise.
6999 (s390-linux32.o, s390-linux32.c): Add rules.
7000 (s390-linux64.o, s390-linux64.c): Likewise.
7001 (s390x-linux64.o, s390x-linux64.c): Likewise.
7002 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
7003 * linux-s390-low.c: Include <elf.h>.
7004 (HWCAP_S390_HIGH_GPRS): Define if undefined.
7005 (init_registers_s390): Remove prototype.
7006 (init_registers_s390x): Likewise.
7007 (init_registers_s390_linux32): Add prototype.
7008 (init_registers_s390_linux64): Likewise.
7009 (init_registers_s390x_linux64): Likewise.
7010 (s390_num_regs_3264): New define.
7011 (s390_regmap_3264): New global variable.
7012 (s390_cannot_fetch_register): Remove obsolete check.
7013 (s390_cannot_store_register): Likewise.
7014 (s390_collect_ptrace_register): Handle upper/lower register halves.
7015 (s390_supply_ptrace_register): Likewise.
7016 (s390_fill_gregset): Update to register number changes.
7017 (s390_get_hwcap): New routine.
7018 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
7019 Install appropriate regmap and register set.
7020
7021 2010-01-01 Joel Brobecker <brobecker@adacore.com>
7022
7023 * server.c (gdbserver_version): Update copyright year to 2010.
7024 * gdbreplay.c (gdbreplay_version): Likewise.
7025
7026 2009-12-28 Doug Evans <dje@google.com>
7027
7028 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
7029 elf/external.h. Include <elf.h> instead but only if necessary.
7030
7031 2009-12-28 Pedro Alves <pedro@codesourcery.com>
7032
7033 * linux-low.c (linux_remove_process): Remove `detaching'
7034 parameter. Don't release/detach from thread_db here.
7035 (linux_kill): Release/detach from thread_db here, ...
7036 (linux_detach): ... and here, before actually detaching.
7037 (linux_wait_1): ... and here, when a process exits.
7038 * thread-db.c (any_thread_of): New.
7039 (thread_db_free): Switch the current inferior to a thread of the
7040 passed in process.
7041
7042 2009-12-21 Doug Evans <dje@google.com>
7043
7044 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
7045
7046 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
7047 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
7048 warning ifndef __NR_tkill. Move setting of errno there too.
7049 Delete unnecessary resetting of errno after syscall.
7050 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
7051
7052 * configure.ac: Check for dladdr.
7053 * config.in: Regenerate.
7054 * configure: Regenerate.
7055 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
7056 (try_thread_db_load): Update.
7057
7058 * linux-low.c (my_waitpid): Delete unnecessary prototype.
7059
7060 2009-12-18 Doug Evans <dje@google.com>
7061
7062 * event-loop.c: Include unistd.h if it exists.
7063
7064 * linux-low.c (my_waitpid): Move definition away from being in
7065 between linux_tracefork_child/linux_test_for_tracefork.
7066
7067 * gdb_proc_service.h (psaddr_t): Fix type.
7068 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
7069 signature to match glibc.
7070
7071 2009-12-16 Doug Evans <dje@google.com>
7072
7073 * linux-low.c (linux_read_memory): Fix argument to read.
7074
7075 2009-11-26 Pedro Alves <pedro@codesourcery.com>
7076
7077 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
7078 events, don't leave current_inferior pointing at null.
7079
7080 2009-11-26 Pedro Alves <pedro@codesourcery.com>
7081
7082 * win32-low.c (LOG): Delete.
7083 (OUTMSG): Output to stderr.
7084 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
7085 on compile time LOG macro.
7086 (win32_wait): Fix debug output.
7087
7088 2009-11-26 Pedro Alves <pedro@codesourcery.com>
7089
7090 * win32-low.c (win32_add_one_solib): If the dll name is
7091 "ntdll.dll", prepend the system directory to the dll path.
7092
7093 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
7094
7095 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
7096
7097 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
7098 Vladimir Prus <vladimir@codesourcery.com>
7099
7100 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
7101 * configure.ac: Check for __mcoldfire__ and set
7102 gdb_cv_m68k_is_coldfire.
7103 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
7104 reg-cf.o and reg-m68k.o.
7105 * configure: Regenerated.
7106
7107 2009-11-16 Pedro Alves <pedro@codesourcery.com>
7108
7109 * linux-low.c (linux_remove_process): Add `detaching' parameter.
7110 Pass it to thread_db_free.
7111 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
7112 proper `detaching' argument to linux_remove_process.
7113 * linux-low.h (thread_db_free): Add `detaching' parameter.
7114 * thread-db.c (thread_db_init): Pass false as `detaching' argument
7115 to thread_db_free.
7116 (thread_db_free): Add `detaching' parameter. Only
7117 call td_ta_clear_event if detaching from process.
7118
7119 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
7120
7121 * thread-db.c (thread_db_free): Fix typo.
7122
7123 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
7124
7125 PR gdb/10838
7126 * thread-db.c (thread_db_free): Call td_ta_clear_event.
7127
7128 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
7129
7130 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
7131 with an i686 compiler.
7132 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
7133 needed.
7134 * configure: Rebuilt.
7135
7136 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
7137
7138 PR gdb/10783
7139
7140 * server.c (handle_search_memory_1): Correct read_addr initialization
7141 in loop for searching subsequent chunks.
7142
7143 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
7144
7145 * configure.ac: New --with-libthread-db option.
7146 * thread-db.c: Allow direct dependence on libthread_db.
7147 (thread_db_free): Adjust.
7148 * config.in: Regenerate.
7149 * configure: Likewise.
7150
7151 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
7152
7153 PR gdb/10757
7154 * thread-db.c (attach_thread): New function.
7155 (maybe_attach_thread): Return success/failure.
7156 (find_new_threads_callback): Adjust.
7157 (thread_db_find_new_threads): Loop until no new threads.
7158
7159 2009-10-13 Pedro Alves <pedro@codesourcery.com>
7160
7161 * proc-service.c (ps_lgetregs): Formatting.
7162
7163 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
7164
7165 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
7166 * configure.ac: Adjust.
7167 * linux-low.h (struct process_info_private): Move members to struct
7168 thread_db.
7169 (thread_db_free, thread_db_handle_monitor_command): New prototype.
7170 * linux-low.c (linux_remove_process): Adjust.
7171 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
7172 * server.c (handle_query): Move code ...
7173 (handle_monitor_command): ... here. New function.
7174 * target.h (struct target_ops): New member.
7175 * thread-db.c (struct thread_db): New.
7176 (libthread_db_search_path): New variable.
7177 (thread_db_create_event, thread_db_enable_reporting)
7178 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
7179 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
7180 (try_thread_db_load_1, dladdr_to_soname): New functions.
7181 (try_thread_db_load, thread_db_load_search): New functions.
7182 (thread_db_init): Search for libthread_db.
7183 (thread_db_free): New function.
7184 (thread_db_handle_monitor_command): Likewise.
7185 * config.in: Regenerate.
7186 * configure: Regenerate.
7187
7188 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
7189
7190 * spu-low.c (spu_kill): Wait for inferior to terminate.
7191 Call clear_inferiors.
7192 (spu_detach): Call clear_inferiors.
7193
7194 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7195
7196 * aclocal.m4: Regenerate.
7197 * config.in: Likewise.
7198 * configure: Likewise.
7199
7200 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7201
7202 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
7203 (parse_spufs_run): New function.
7204 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
7205 (ppc_breakpoint_at): Handle SPU breakpoints.
7206
7207 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7208
7209 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
7210 (SPUFS_MAGIC): Define.
7211 (spu_enumerate_spu_ids): New function.
7212 (linux_qxfer_spu): New function.
7213 (linux_target_ops): Install linux_qxfer_spu.
7214
7215 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7216
7217 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
7218 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
7219 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
7220 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
7221 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
7222 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
7223 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
7224 (init_registers_powerpc_cell32l): Add prototype.
7225 (init_registers_powerpc_cell64l): Likewise.
7226 (ppc_arch_setup): Detect Cell/B.E. architecture.
7227
7228 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7229
7230 * Makefile.in (datarootdir): New variable.
7231
7232 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
7233
7234 * linux-low.c (linux_write_memory): Update debugging output.
7235 * Makefile.in (clean): Add new descriptions.
7236 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
7237 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
7238 * configure.srv: Add new files for arm*-*-linux*.
7239 * linux-arm-low.c: Add new declarations.
7240 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
7241 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
7242 (HWCAP_VFPv3D16): New.
7243 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
7244 instead of __IWMMXT__.
7245 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
7246 (arm_arch_setup): New.
7247 (target_regsets): Remove #ifdef. Add VFP regset.
7248 (the_low_target): Use arm_arch_setup.
7249
7250 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
7251
7252 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
7253 the main thread again.
7254
7255 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
7256
7257 Adding Neutrino gdbserver.
7258 * configure: Regenerated.
7259 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
7260 * configure.srv (i[34567]86-*-nto*): New target.
7261 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
7262 * remote-utils.c [__QNX__]: Include sys/iomgr.h
7263 (nto_comctrl) [__QNX__]: New function.
7264 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
7265
7266 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7267
7268 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
7269 srv_tgtobj.
7270
7271 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
7272 Pedro Alves <pedro@codesourcery.com>
7273
7274 * win32-i386-low.c (i386_get_thread_context): Handle systems that
7275 don't support CONTEXT_EXTENDED_REGISTERS.
7276 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
7277 (the_low_target): Install them.
7278 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
7279 failing with ERROR_PIPE_NOT_CONNECTED.
7280
7281 2009-06-30 Doug Evans <dje@google.com>
7282 Pierre Muller <muller@ics.u-strasbg.fr>
7283
7284 Add h/w watchpoint support to x86-linux, win32-i386.
7285 * Makefile.in (SFILES): Add i386-low.c
7286 (i386_low_h): Define.
7287 (i386-low.o): Add dependencies.
7288 (linux-x86-low.o): Add i386-low.h dependency.
7289 (win32-i386-low.o): Ditto.
7290 * i386-low.c: New file.
7291 * i386-low.h: New file.
7292 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
7293 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
7294 * linux-low.c (linux_add_process): Initialize arch_private.
7295 (linux_remove_process): Free arch_private.
7296 (add_lwp): Initialize arch_private.
7297 (delete_lwp): Free arch_private.
7298 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
7299 provided.
7300 * linux-low.h (process_info_private): New member arch_private.
7301 (lwp_info): New member arch_private.
7302 (linux_target_ops): New members new_process, new_thread,
7303 prepare_to_resume.
7304 (ptid_of): New macro.
7305 * linux-x86-low.c: Include stddef.h, i386-low.h.
7306 (arch_process_info): New struct.
7307 (arch_lwp_info): New struct.
7308 (x86_linux_dr_get, x86_linux_dr_set): New functions.
7309 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
7310 (i386_dr_low_get_status): New function.
7311 (x86_insert_point, x86_remove_point): New functions.
7312 (x86_stopped_by_watchpoint): New function.
7313 (x86_stopped_data_address): New function.
7314 (x86_linux_new_process, x86_linux_new_thread): New functions.
7315 (x86_linux_prepare_to_resume): New function.
7316 (the_low_target): Add entries for insert_point, remove_point,
7317 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
7318 prepare_to_resume.
7319 * server.c (debug_hw_points): New global.
7320 (monitor_show_help): Document set debug-hw-points.
7321 (handle_query): Process "set debug-hw-points".
7322 * server.h (debug_hw_points): Declare.
7323 (paddress): Declare.
7324 * utils.c (NUMCELLS, CELLSIZE): New macros.
7325 (get_sell, xsnprintf, paddress): New functions.
7326 * win32-arm-low.c (the_low_target): Add entries for insert_point,
7327 remove_point, stopped_by_watchpoint, stopped_data_address.
7328 * win32-i386-low.c: Include i386-low.h.
7329 (debug_reg_state): Replaces dr.
7330 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
7331 (i386_dr_low_get_status): New function.
7332 (i386_insert_point, i386_remove_point): New functions.
7333 (i386_stopped_by_watchpoint): New function.
7334 (i386_stopped_data_address): New function.
7335 (i386_initial_stuff): Update.
7336 (get_thread_context,set_thread_context,i386_thread_added): Update.
7337 (the_low_target): Add entries for insert_point,
7338 remove_point, stopped_by_watchpoint, stopped_data_address.
7339 * win32-low.c (win32_insert_watchpoint): New function.
7340 (win32_remove_watchpoint): New function.
7341 (win32_stopped_by_watchpoint): New function.
7342 (win32_stopped_data_address): New function.
7343 (win32_target_ops): Add entries for insert_watchpoint,
7344 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
7345 * win32-low.h (win32_target_ops): New members insert_point,
7346 remove_point, stopped_by_watchpoint, stopped_data_address.
7347
7348 2009-06-25 Pedro Alves <pedro@codesourcery.com>
7349
7350 * server.c (process_serial_event): Re-return unsupported, not
7351 error, if the type isn't recognized. Re-allow supporting only
7352 insert or remove packets. Also call require_running for
7353 breakpoints. Add missing break statement to default case. Tidy.
7354 * target.h (struct target_ops): Rename insert_watchpoint to
7355 insert_point, and remove_watchpoint to remove_point.
7356
7357 * linux-low.h (struct linux_target_ops): Likewise.
7358 * linux-low.c (linux_insert_watchpoint): Rename to ...
7359 (linux_insert_point): ... this. Adjust.
7360 (linux_remove_watchpoint): Rename to ...
7361 (linux_remove_point): ... this. Adjust.
7362 (linux_target_ops): Adjust.
7363 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
7364 (cris_insert_point): ... this.
7365 (cris_remove_watchpoint): Rename to ...
7366 (cris_remove_point): ... this.
7367 (the_low_target): Adjust.
7368
7369 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
7370
7371 * server.c (handle_v_kill): Pass signal_pid to
7372 kill_inferior if multi_process is zero.
7373
7374 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
7375
7376 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
7377 * target.h (target_ops): Comment for *_watchpoint to make it clear
7378 the functions can get types '0' and '1'.
7379
7380 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
7381
7382 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
7383 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
7384 * regcache.c (get_regcache): Likewise.
7385 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
7386 * win32-low.c (child_fetch_inferior_registers): Remove check for
7387 regno 0.
7388
7389 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
7390 Pedro Alves <pedro@codesourcery.com>
7391
7392 * target.h (struct target_ops) <supports_multi_process>: New
7393 callback.
7394 (target_supports_multi_process): New.
7395 * server.c (handle_query): Even if GDB reports support, only
7396 enable multi-process if the target also supports it. Report
7397 multi-process support only if the target backend supports it.
7398 * linux-low.c (linux_supports_multi_process): New function.
7399 (linux_target_ops): Install it as target_supports_multi_process
7400 callback.
7401
7402 2009-05-24 Doug Evans <dje@google.com>
7403
7404 Global renaming of find_thread_pid to find_thread_ptid.
7405 * server.h (find_thread_ptid): Renamed from find_thread_pid.
7406 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
7407 All callers updated.
7408
7409 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
7410 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
7411 directly.
7412
7413 * linux-low.c (get_stop_pc): Print pc if debug_threads.
7414 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
7415 (linux_resume_one_lwp): Ditto.
7416
7417 2009-05-23 Doug Evans <dje@google.com>
7418
7419 * linux-low.c (linux_resume_one_lwp): Change type of first arg
7420 from struct inferior_list_entry * to struct lwp_info *.
7421 All callers updated.
7422
7423 2009-05-13 Doug Evans <dje@google.com>
7424
7425 * linux-x86-low.c: Don't include assert.h.
7426 (x86_siginfo_fixup): Use fatal, not assert.
7427 (x86_arch_setup): Fix comment.
7428
7429 2009-05-12 Doug Evans <dje@google.com>
7430
7431 Biarch support for i386/amd64 gdbserver.
7432 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
7433 Add linux-x86-low.c.
7434 (linux-i386-low.o, linux-x86-64-low.o): Delete.
7435 (linux-x86-low.o): Add.
7436 * linux-x86-64-low.c: Delete.
7437 * linux-i386-low.c: Delete.
7438 * linux-x86-low.c: New file.
7439 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
7440 linux-x86-low.o.
7441 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
7442 linux-x86-low.o.
7443 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
7444 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
7445 (linux_child_pid_to_exec_file): New function.
7446 (elf_64_header_p, elf_64_file_p): New functions.
7447 (siginfo_fixup): New function.
7448 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
7449 give target a chance to convert layout.
7450 * linux-low.h (linux_target_ops): New member siginfo_fixup.
7451 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
7452
7453 2009-05-07 Doug Evans <dje@google.com>
7454
7455 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
7456 (regsets_store_inferior_registers): Ditto.
7457
7458 2009-05-06 Pedro Alves <pedro@codesourcery.com>
7459
7460 PR server/10048
7461
7462 * linux-low.c (must_set_ptrace_flags): Delete.
7463 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
7464 of the global.
7465 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
7466 `lwp->must_set_ptrace_flags' instead.
7467 (linux_wait_for_event_1): Set ptrace options here.
7468 (linux_wait_1): ... not here.
7469
7470 2009-04-30 Doug Evans <dje@google.com>
7471
7472 * inferiors.c (started_inferior_callback): New function.
7473 (attached_inferior_callback): New function.
7474 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
7475 * server.c (print_started_pid, print_attached_pid): New functions.
7476 (detach_or_kill_for_exit): New function.
7477 (main): Call it instead of for_each_inferior (kill_inferior_callback).
7478 * server.h (have_started_inferiors_p): Declare.
7479 (have_attached_inferiors_p): Declare.
7480
7481 * inferiors.c (remove_process): Fix memory leak, free process.
7482 * linux-low.c (linux_remove_process): New function.
7483 (linux_kill): Call it instead of remove_process.
7484 (linux_detach, linux_wait_1): Ditto.
7485
7486 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
7487
7488 * configure.srv: Add x86 Windows CE target.
7489
7490 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
7491
7492 * inferiors.c (get_thread_process): Make global.
7493 * server.h (get_thread_process): Add prototype.
7494 * thread-db.c (find_one_thread): Use get_thread_process
7495 instead of current_process.
7496 (thread_db_get_tls_address): Do not crash if called when
7497 thread layer is not yet initialized.
7498
7499 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
7500
7501 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
7502 * spu-low.c (current_tid): Rename to ...
7503 (current_ptid): ... this.
7504 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
7505 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
7506 ptid_get_lwp (current_ptid) instead of current_tid.
7507 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
7508 instead of current_tid. Use find_process_pid to verify pid
7509 argument is valid. Pass proper argument to remove_process.
7510 (spu_thread_alive): Compare current_ptid instead of current_tid.
7511 (spu_resume): Likewise.
7512
7513 2009-04-02 Pedro Alves <pedro@codesourcery.com>
7514
7515 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
7516 variable.
7517
7518 2009-04-01 Pedro Alves <pedro@codesourcery.com>
7519
7520 Implement the multiprocess extensions, and add linux multiprocess
7521 support.
7522
7523 * server.h (ULONGEST): Declare.
7524 (struct ptid, ptid_t): New.
7525 (minus_one_ptid, null_ptid): Declare.
7526 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
7527 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
7528 (struct inferior_list_entry): Change `id' type from unsigned from
7529 to ptid_t.
7530 (struct sym_cache, struct breakpoint, struct
7531 process_info_private): Forward declare.
7532 (struct process_info): Declare.
7533 (current_process): Declare.
7534 (all_processes): Declare.
7535 (initialize_inferiors): Declare.
7536 (add_thread): Adjust to use ptid_t.
7537 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
7538 (add_process, remove_process, find_thread_pid): Declare.
7539 (find_inferior_id): Adjust to use ptid_t.
7540 (cont_thread, general_thread, step_thread): Change type to ptid_t.
7541 (multi_process): Declare.
7542 (push_event): Adjust to use ptid_t.
7543 (read_ptid, write_ptid): Declare.
7544 (prepare_resume_reply): Adjust to use ptid_t.
7545 (clear_symbol_cache): Declare.
7546 * inferiors.c (all_processes): New.
7547 (null_ptid, minus_one_ptid): New.
7548 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
7549 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
7550 (add_thread): Change unsigned long to ptid. Remove gdb_id
7551 parameter. Adjust.
7552 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
7553 (gdb_id_to_thread): Rename to ...
7554 (find_thread_pid): ... this. Change unsigned long to ptid.
7555 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
7556 (loaded_dll, pull_pid_from_list): Adjust.
7557 (add_process, remove_process, find_process_pid)
7558 (get_thread_process, current_process, initialize_inferiors): New.
7559 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
7560 (struct target_waitstatus) <related_pid>: Ditto.
7561 (struct target_ops) <kill, detach>: Add `pid' argument. Change
7562 return type to int.
7563 (struct target_ops) <join>: Add `pid' argument.
7564 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
7565 (struct target_ops) <wait>: Add `ptid' field. Change return type
7566 to ptid.
7567 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
7568 (mywait): Add `ptid' argument. Change return type to ptid_t.
7569 (target_pid_to_str): Declare.
7570 * target.c (set_desired_inferior): Adjust to use ptids.
7571 (mywait): Add new `ptid' argument. Adjust.
7572 (target_pid_to_str): New.
7573 * mem-break.h (free_all_breakpoints): Declare.
7574 * mem-break.c (breakpoints): Delelete.
7575 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
7576 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
7577 to use per-process breakpoint list.
7578 (free_all_breakpoints): New.
7579 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
7580 (symbol_cache, all_symbols_looked_up): Delete.
7581 (hexchars): New.
7582 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
7583 read_ptid): New.
7584 (prepare_resume_reply): Change ptid argument's type from unsigned
7585 long to ptid_t. Adjust. Implement W;process and X;process.
7586 (free_sym_cache, clear_symbol_cache): New.
7587 (look_up_one_symbol): Adjust to per-process symbol cache. *
7588 * server.c (cont_thread, general_thread, step_thread): Change type
7589 to ptid_t.
7590 (attached): Delete.
7591 (multi_process): New.
7592 (last_ptid): Change type to ptid_t.
7593 (struct vstop_notif) <ptid>: Change type to ptid_t.
7594 (queue_stop_reply, push_event): Change `ptid' argument's type to
7595 ptid_t.
7596 (discard_queued_stop_replies): Add `pid' argument.
7597 (start_inferior): Adjust to use ptids. Adjust to mywait interface
7598 changes. Don't reference the `attached' global.
7599 (attach_inferior): Adjust to mywait interface changes.
7600 (handle_query): Adjust to use ptids. Parse GDB's qSupported
7601 features. Handle and report "multiprocess+". Handle
7602 "qAttached:PID".
7603 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
7604 changes.
7605 (handle_v_kill): New.
7606 (handle_v_stopped): Adjust to use target_pid_to_str.
7607 (handle_v_requests): Allow multiple attaches and runs when
7608 multiprocess extensions are in effect. Handle "vKill".
7609 (myresume): Adjust to use ptids.
7610 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
7611 (handle_status): Adjust to discard_queued_stop_replies interface
7612 change.
7613 (first_thread_of, kill_inferior_callback)
7614 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
7615 (main): Call initialize_inferiors. Adjust to use ptids, killing
7616 and detaching from all inferiors. Handle multiprocess packet
7617 variants.
7618 * linux-low.h: Include gdb_proc_service.h.
7619 (struct process_info_private): New.
7620 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
7621 <lwpid_of>: Use ptid_get_lwp.
7622 (get_lwp_thread): Adjust.
7623 (struct lwp_info): Add `dead' member.
7624 (find_lwp_pid): Declare.
7625 * linux-low.c (thread_db_active): Delete.
7626 (new_inferior): Adjust comment.
7627 (inferior_pid): Delete.
7628 (linux_add_process): New.
7629 (handle_extended_wait): Adjust.
7630 (add_lwp): Change unsigned long to ptid.
7631 (linux_create_inferior): Add process to processes table. Adjust
7632 to use ptids. Don't set new_inferior here.
7633 (linux_attach_lwp): Rename to ...
7634 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
7635 it. Adjust to use ptids.
7636 (linux_attach_lwp): New.
7637 (linux_attach): Add process to processes table. Don't set
7638 new_inferior here.
7639 (struct counter): New.
7640 (second_thread_of_pid_p, last_thread_of_process_p): New.
7641 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
7642 multiple processes.
7643 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
7644 processes. Remove process from process table.
7645 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
7646 to multiple processes.
7647 (any_thread_of): New.
7648 (linux_detach): Add `pid' argument, and handle it. Remove process
7649 from processes table.
7650 (linux_join): Add `pid' argument. Handle it.
7651 (linux_thread_alive): Change unsighed long argument to ptid_t.
7652 Consider dead lwps as not being alive.
7653 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
7654 threads we're not interested in.
7655 (same_lwp, find_lwp_pid): New.
7656 (linux_wait_for_lwp): Change `pid' argument's type from int to
7657 ptid_t. Adjust.
7658 (linux_wait_for_event): Rename to ...
7659 (linux_wait_for_event_1): ... this. Change `pid' argument's type
7660 from int to ptid_t. Adjust.
7661 (linux_wait_for_event): New.
7662 (linux_wait_1): Add `ptid' argument. Change return type to
7663 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
7664 that exit from the process table.
7665 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
7666 Adjust.
7667 (mark_lwp_dead): New.
7668 (wait_for_sigstop): Adjust to use ptids. If a process exits while
7669 stopping all threads, mark its main lwp as dead.
7670 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
7671 ptids.
7672 (fetch_register, usr_store_inferior_registers)
7673 (regsets_fetch_inferior_registers)
7674 (regsets_store_inferior_registers, linux_read_memory)
7675 (linux_write_memory): Inline `inferior_pid'.
7676 (linux_look_up_symbols): Adjust to use per-process
7677 `thread_db_active'.
7678 (linux_request_interrupt): Adjust to use ptids.
7679 (linux_read_auxv): Inline `inferior_pid'.
7680 (initialize_low): Don't reference thread_db_active.
7681 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
7682 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
7683 (ps_getpid): Return the pid of the current inferior.
7684 * thread-db.c (proc_handle, thread_agent): Delete.
7685 (thread_db_create_event, thread_db_enable_reporting): Adjust to
7686 per-process data.
7687 (find_one_thread): Change argument type to ptid_t. Adjust to
7688 per-process data.
7689 (maybe_attach_thread): Adjust to per-process data and ptids.
7690 (thread_db_find_new_threads): Ditto.
7691 (thread_db_init): Ditto.
7692 * spu-low.c (spu_create_inferior, spu_attach): Add process to
7693 processes table. Adjust to use ptids.
7694 (spu_kill, spu_detach): Adjust interface. Remove process from
7695 processes table.
7696 (spu_join, spu_thread_alive): Adjust interface.
7697 (spu_wait): Adjust interface. Remove process from processes
7698 table. Adjust to use ptids.
7699 * win32-low.c (current_inferior_tid): Delete.
7700 (current_inferior_ptid): New.
7701 (debug_event_ptid): New.
7702 (thread_rec): Take a ptid. Adjust.
7703 (child_add_thread): Add `pid' argument. Adjust to use ptids.
7704 (child_delete_thread): Ditto.
7705 (do_initial_child_stuff): Add `attached' argument. Add process to
7706 processes table.
7707 (child_fetch_inferior_registers, child_store_inferior_registers):
7708 Adjust.
7709 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
7710 (win32_attach): Pass 1 to do_initial_child_stuff.
7711 (win32_kill): Adjust interface. Remove process from processes
7712 table.
7713 (win32_detach): Ditto.
7714 (win32_join): Adjust interface.
7715 (win32_thread_alive): Take a ptid.
7716 (win32_resume): Adjust to use ptids.
7717 (get_child_debug_event): Ditto.
7718 (win32_wait): Adjust interface. Remove exiting process from
7719 processes table.
7720
7721 2009-04-01 Pedro Alves <pedro@codesourcery.com>
7722
7723 Non-stop mode support.
7724
7725 * server.h (non_stop): Declare.
7726 (gdb_client_data, handler_func): Declare.
7727 (delete_file_handler, add_file_handler, start_event_loop):
7728 Declare.
7729 (handle_serial_event, handle_target_event, push_event)
7730 (putpkt_notif): Declare.
7731 * target.h (enum resume_kind): New.
7732 (struct thread_resume): Replace `step' field by `kind' field.
7733 (TARGET_WNOHANG): Define.
7734 (struct target_ops) <wait>: Add `options' argument.
7735 <supports_non_stop, async, start_non_stop>: New fields.
7736 (target_supports_non_stop, target_async): New.
7737 (start_non_stop): Declare.
7738 (mywait): Add `options' argument.
7739 * target.c (mywait): Add `options' argument. Print child exit
7740 notifications here.
7741 (start_non_stop): New.
7742 * server.c (non_stop, own_buf, mem_buf): New globals.
7743 (struct vstop_notif): New.
7744 (notif_queue): New global.
7745 (queue_stop_reply, push_event, discard_queued_stop_replies)
7746 (send_next_stop_reply): New.
7747 (start_inferior): Adjust to use resume_kind. Adjust to mywait
7748 interface changes.
7749 (attach_inferior): In non-stop mode, don't wait for the target
7750 here.
7751 (handle_general_set): Handle QNonStop.
7752 (handle_query): When handling qC, return the current general
7753 thread, instead of the first thread of the list.
7754 (handle_query): If the backend supports non-stop mode, include
7755 QNonStop+ in the qSupported query response.
7756 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
7757 and non-stop mode.
7758 (handle_v_attach, handle_v_run): Handle non-stop mode.
7759 (handle_v_stopped): New.
7760 (handle_v_requests): Report support for vCont;t. Handle vStopped.
7761 (myresume): Adjust to use resume_kind. Handle non-stop.
7762 (queue_stop_reply_callback): New.
7763 (handle_status): Handle non-stop mode.
7764 (main): Clear non_stop flag on reconnection. Use the event-loop.
7765 Refactor serial protocol handling from here ...
7766 (process_serial_event): ... to this new function. When GDB
7767 selects any thread, select one here. In non-stop mode, wait until
7768 GDB acks all pending events before exiting.
7769 (handle_serial_event, handle_target_event): New.
7770 * remote-utils.c (remote_open): Install remote_desc in the event
7771 loop.
7772 (remote_close): Remove remote_desc from the event loop.
7773 (putpkt_binary): Rename to...
7774 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
7775 (putpkt_binary): New as wrapper around putpkt_binary_1.
7776 (putpkt_notif): New.
7777 (prepare_resume_reply): In non-stop mode, don't change the
7778 general_thread.
7779 * event-loop.c: New.
7780 * Makefile.in (OBJ): Add event-loop.o.
7781 (event-loop.o): New rule.
7782
7783 * linux-low.h (pid_of): Moved here.
7784 (lwpid_of): New.
7785 (get_lwp_thread): Use lwpid_of.
7786 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
7787 * linux-low.c (pid_of): Delete.
7788 (inferior_pid): Use lwpid_of.
7789 (linux_event_pipe): New.
7790 (target_is_async_p): New.
7791 (delete_lwp): New.
7792 (handle_extended_wait): Use lwpid_of.
7793 (add_lwp): Don't set lwpid field.
7794 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
7795 (linux_kill_one_lwp): If killing a running lwp, stop it first.
7796 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
7797 (linux_detach_one_lwp): If detaching from a running lwp, stop it
7798 first. Adjust to linux_wait_for_event interface changes. Use
7799 lwpid_of.
7800 (linux_detach): Don't delete the main lwp here.
7801 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
7802 (status_pending_p): Don't consider explicitly suspended lwps.
7803 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
7804 pointer. Add OPTIONS argument. Change return type to int. Use
7805 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
7806 (linux_wait_for_event): Take an integer pid instead of a lwp_info
7807 pointer. Add status pointer argument. Return a pid instead of a
7808 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
7809 changes. In non-stop mode, don't switch to a random thread.
7810 (linux_wait): Rename to...
7811 (linux_wait_1): ... this. Add target_options argument, and handle
7812 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
7813 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
7814 clean exit and signal exit code. Don't stop all threads in
7815 non-stop mode. In all-stop mode, only stop all threads when
7816 reporting a stop to GDB. Handle explicit thread stop requests.
7817 (async_file_flush, async_file_mark): New.
7818 (linux_wait): New.
7819 (send_sigstop): Use lwpid_of.
7820 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
7821 interface changes. In non-stop mode, don't switch to a random
7822 thread.
7823 (linux_resume_one_lwp): Use lwpid_of.
7824 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
7825 (linux_resume_one_thread): ... this. Handle resume_stop. In
7826 non-stop mode, don't look for pending flag in all threads.
7827 (resume_status_pending_p): Don't consider explicitly suspended
7828 threads.
7829 (my_waitpid): Reimplement. Emulate __WALL.
7830 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
7831 Use lwpid_of.
7832 (sigchld_handler, linux_supports_non_stop, linux_async)
7833 (linux_start_non_stop): New.
7834 (linux_target_ops): Register linux_supports_non_stop, linux_async
7835 and linux_start_non_stop.
7836 (initialize_low): Install SIGCHLD handler.
7837 * thread-db.c (thread_db_create_event, find_one_thread)
7838 (thread_db_get_tls_address): Use lwpid_of.
7839 * win32-low.c (win32_detach): Adjust to use resume_kind.
7840 (win32_wait): Add `options' argument.
7841 * spu-low.c (spu_resume): Adjust to use resume_kind.
7842 (spu_wait): Add `options' argument.
7843
7844 2009-04-01 Pedro Alves <pedro@codesourcery.com>
7845
7846 Decouple target code from remote protocol.
7847
7848 * target.h (enum target_waitkind): New.
7849 (struct target_waitstatus): New.
7850 (struct target_ops) <wait>: Return an unsigned long. Take a
7851 target_waitstatus pointer instead of a char pointer.
7852 (mywait): Likewise.
7853 * target.c (mywait): Change prototype to return an unsigned long.
7854 Take a target_waitstatus pointer instead of a char pointer. Adjust.
7855 * server.h (thread_from_wait, old_thread_from_wait): Delete
7856 declarations.
7857 (prepare_resume_reply): Change prototype to take a
7858 target_waitstatus.
7859 * server.c (thread_from_wait, old_thread_from_wait): Delete.
7860 (last_status, last_ptid): New.
7861 (start_inferior): Remove "statusptr" argument. Adjust. Return a
7862 pid instead of a signal.
7863 (attach_inferior): Remove "status" and "signal" parameters.
7864 Adjust.
7865 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
7866 not as an address.
7867 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
7868 (handle_v_requests, myresume): Remove "status" and "signal"
7869 parameters. Adjust.
7870 (handle_status): New.
7871 (main): Delete local `status'. Adjust.
7872 * remote-utils.c: Include target.h.
7873 (prepare_resume_reply): Change prototype to take a
7874 target_waitstatus. Adjust.
7875
7876 * linux-low.c (linux_wait): Adjust to new target_ops->wait
7877 interface.
7878 * spu-low.c (spu_wait): Adjust.
7879 * win32-low.c (enum target_waitkind, struct target_waitstatus):
7880 Delete.
7881 (win32_wait): Adjust.
7882
7883 2009-04-01 Pedro Alves <pedro@codesourcery.com>
7884
7885 * target.h (struct thread_resume): Delete leave_stopped member.
7886 (struct target_ops): Add a `n' argument to the `resume' callback.
7887 * server.c (start_inferior): Adjust.
7888 (handle_v_cont, myresume): Adjust.
7889 * linux-low.c (check_removed_breakpoint): Adjust to resume
7890 interface change, and to removed leave_stopped field.
7891 (resume_ptr): Delete.
7892 (struct thread_resume_array): New.
7893 (linux_set_resume_request): Add new `arg' parameter. Adjust to
7894 resume interface change.
7895 (linux_continue_one_thread, linux_queue_one_thread)
7896 (resume_status_pending_p): Check if the resume field is NULL
7897 instead of checking the leave_stopped member.
7898 (linux_resume): Adjust to the target resume interface change.
7899 * spu-low.c (spu_resume): Adjust to the target resume interface
7900 change.
7901 * win32-low.c (win32_detach, win32_resume): Ditto.
7902
7903 2009-04-01 Pedro Alves <pedro@codesourcery.com>
7904
7905 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
7906 flag.
7907 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
7908 pending.
7909 (linux_continue_one_thread): Only preserve the stepping flag if
7910 there's a pending breakpoint.
7911
7912 2009-03-31 Pedro Alves <pedro@codesourcery.com>
7913
7914 * server.c (main): After the inferior having exited, call
7915 remote_close before exiting gdbserver.
7916
7917 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
7918
7919 Fix size of FPSCR in Power 7 processors.
7920 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
7921 (PPC_FEATURE_HAS_DFP): New #define.
7922 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
7923 size of the FPSCR.
7924
7925 2009-03-23 Pedro Alves <pedro@codesourcery.com>
7926
7927 * server.c (handle_query) Whitespace and formatting.
7928
7929 2009-03-22 Pedro Alves <pedro@codesourcery.com>
7930
7931 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
7932 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
7933 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
7934 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
7935 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
7936 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
7937 Makefile.in, configure.ac: Fix whitespace throughout.
7938 * configure: Regenerate.
7939
7940 2009-03-22 Pedro Alves <pedro@codesourcery.com>
7941
7942 * inferiors.c (find_inferior): Make it safe for the callback
7943 function to delete the currently iterated inferior.
7944
7945 2009-03-22 Pedro Alves <pedro@codesourcery.com>
7946
7947 * Makefile.in (linuw_low_h): Move higher.
7948 (thread-db.o): Depend on $(linux_low_h).
7949
7950 2009-03-17 Pedro Alves <pedro@codesourcery.com>
7951
7952 Rename "process" to "lwp" throughout.
7953
7954 * linux-low.c (all_processes): Rename to...
7955 (all_lwps): ... this.
7956 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
7957 (add_process): Rename to ...
7958 (add_lwp): ... this. Adjust.
7959 (linux_create_inferior): Adjust.
7960 (linux_attach_lwp): Adjust.
7961 (linux_attach): Adjust.
7962 (linux_kill_one_process): Rename to ...
7963 (linux_kill_one_lwp): ... this. Adjust.
7964 (linux_kill): Adjust.
7965 (linux_detach_one_process): Rename to ...
7966 (linux_detach_one_lwp): ... this. Adjust.
7967 (linux_detach): Adjust.
7968 (check_removed_breakpoint): Adjust.
7969 (status_pending_p): Adjust.
7970 (linux_wait_for_process): Rename to ...
7971 (linux_wait_for_lwp): ... this. Adjust.
7972 (linux_wait_for_event): Adjust.
7973 (send_sigstop): Adjust.
7974 (wait_for_sigstop): Adjust.
7975 (stop_all_processes): Rename to ...
7976 (stop_all_lwps): ... this.
7977 (linux_resume_one_process): Rename to ...
7978 (linux_resume_one_lwp): ... this. Adjust.
7979 (linux_set_resume_request, linux_continue_one_thread)
7980 (linux_queue_one_thread, resume_status_pending_p)
7981 (usr_store_inferior_registers, regsets_store_inferior_registers)
7982 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
7983 Adjust.
7984 * linux-low.h (get_process): Rename to ...
7985 (get_lwp): ... this. Adjust.
7986 (get_thread_process): Rename to ...
7987 (get_thread_lwp): ... this. Adjust.
7988 (get_process_thread): Rename to ...
7989 (get_lwp_thread): ... this. Adjust.
7990 (struct process_info): Rename to ...
7991 (struct lwp_info): ... this.
7992 (all_processes): Rename to ...
7993 (all_lwps): ... this.
7994 * proc-service.c (ps_lgetregs): Adjust.
7995 * thread-db.c (thread_db_create_event, find_one_thread)
7996 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
7997
7998 2009-03-14 Pedro Alves <pedro@codesourcery.com>
7999
8000 * server.c (handle_query): Handle "qAttached".
8001
8002 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
8003
8004 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
8005 GPLv3, update license URL.
8006
8007 2009-03-01 Doug Evans <dje@google.com>
8008
8009 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
8010 (server_h): Add gdb_signals.h.
8011 (signals.o): Update.
8012 * server.h (target_signal_from_host,target_signal_to_host_p)
8013 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
8014
8015 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
8016
8017 * remote-utils.c (getpkt): Also generate remote-debug
8018 information if noack_mode is set.
8019
8020 2009-02-06 Pedro Alves <pedro@codesourcery.com>
8021
8022 * server.c (handle_query): Report qXfer:siginfo:read and
8023 qXfer:siginfo:write as supported and handle them.
8024 * target.h (struct target_ops) <qxfer_siginfo>: New field.
8025 * linux-low.c (linux_xfer_siginfo): New.
8026 (linux_target_ops): Set it.
8027
8028 2009-01-26 Pedro Alves <pedro@codesourcery.com>
8029
8030 * server.c (gdbserver_usage): Mention --remote-debug.
8031 (main): Accept '--remote-debug' switch.
8032
8033 2009-01-18 Doug Evans <dje@google.com>
8034
8035 * regcache.c (new_register_cache): No need to check result of xcalloc.
8036 * server.c (handle_search_memory): Back out calls to xmalloc,
8037 result is checked and error is returned to user upon failure.
8038 (handle_query): Ditto. Add more checks for result of malloc.
8039 (handle_v_cont): Check result of malloc, report error back to
8040 user upon failure.
8041 (handle_v_run): Ditto. Call freeargv.
8042 * server.h (freeargv): Declare.
8043 * utils.c (freeargv): New fn.
8044
8045 2009-01-15 Doug Evans <dje@google.com>
8046
8047 * gdbreplay.c (perror_with_name): Make arg const char *.
8048 * server.h (target_signal_to_name): Make return type const char *.
8049 * thread-db.c (thread_db_err_str): Make return type const char *.
8050 * utils.c (perror_with_name): Make arg const char *.
8051
8052 2009-01-14 Pedro Alves <pedro@codesourcery.com>
8053
8054 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
8055 when handling a EXIT_PROCESS_DEBUG_EVENT.
8056
8057 2009-01-06 Joel Brobecker <brobecker@adacore.com>
8058
8059 * gdbreplay.c (gdbreplay_version): Update copyright year.
8060 * server.c (gdbserver_version): Likewise.
8061
8062 2009-01-05 Doug Evans <dje@google.com>
8063
8064 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
8065 (handle_extended_wait): Improve comment.
8066
8067 2008-12-13 Doug Evans <dje@google.com>
8068
8069 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
8070 * server.h (ATTR_MALLOC): New macro.
8071 (xmalloc,xcalloc,xstrdup): Declare.
8072 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
8073 * inferiors.c: Ditto.
8074 * linux-low.c: Ditto.
8075 * mem-break.c: Ditto.
8076 * regcache.c: Ditto.
8077 * remote-utils.c: Ditto.
8078 * server.c: Ditto.
8079 * target.c: Ditto.
8080 * win32-low.c: Ditto.
8081
8082 2008-12-12 Doug Evans <dje@google.com>
8083
8084 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
8085 in debugging printf.
8086
8087 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
8088
8089 2008-12-09 Doug Evans <dje@google.com>
8090
8091 * linux-low.h (struct process_info): Delete member tid, unused.
8092 * thread-db.c (find_one_thread): Update.
8093 (maybe_attach_thread): Update.
8094
8095 2008-12-02 Pedro Alves <pedro@codesourcery.com>
8096
8097 * target.h (struct target_ops): Add qxfer_osdata member.
8098 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
8099 and dirent.h.
8100 (linux_qxfer_osdata): New functions.
8101 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
8102 callback.
8103 * server.c (handle_query): Handle "qXfer:osdata:read:".
8104 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
8105 (buffer_xml_printf): New functions.
8106 * server.h (struct buffer): New.
8107 (buffer_grow_str, buffer_grow_str0): New macros.
8108 (buffer_grow, buffer_free, buffer_init, buffer_finish)
8109 (buffer_xml_printf): Declare.
8110
8111 2008-11-24 Doug Evans <dje@google.com>
8112
8113 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
8114
8115 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
8116
8117 * server.c (handle_v_run): Always use the supplied argument list.
8118
8119 2008-11-19 Bob Wilson <bob.wilson@acm.org>
8120
8121 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
8122 (xtensa_regmap_table): Add entry for scompare1.
8123
8124 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
8125
8126 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
8127 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
8128 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
8129 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
8130 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
8131 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
8132 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
8133 XML target descriptions.
8134 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
8135 when inferior is running on an ISA 2.05 or later processor. Add
8136 special case to return offset for full 64-bit slot of FPSCR when
8137 in 32-bits.
8138
8139 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
8140
8141 * Makefile.in (SFILES, clean): Added sparc64 files.
8142 (reg-sparc64.o, reg-sparc64.c): New.
8143 * configure.srv (sparc*-*-linux*): New configuration.
8144 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
8145 syscall arguments for SPARC.
8146 (regsets_store_inferior_registers): Likewise.
8147 * linux-sparc-low.c: New file.
8148
8149 2008-10-21 Doug Evans <dje@google.com>
8150
8151 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
8152 (READLINE_DIR,READLINE_DEP): Delete.
8153 (INTERNAL_CFLAGS): Update.
8154 (LINTFLAGS): Update.
8155
8156 2008-10-10 Pedro Alves <pedro@codesourcery.com>
8157
8158 * server.c (handle_v_run): If GDB didn't specify an argv, use the
8159 whole argv from the last run, not just argv[0].
8160
8161 2008-09-08 Pedro Alves <pedro@codesourcery.com>
8162
8163 * regcache.c (new_register_cache): Return NULL if the register
8164 cache size isn't known yet.
8165 (free_register_cache): Avoid dereferencing a NULL regcache.
8166
8167 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
8168
8169 * configure.srv: Merge MIPS and MIPS64.
8170
8171 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
8172
8173 * Makefile.in (uninstall): Apply $(EXEEXT) too.
8174
8175 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
8176
8177 * Makefile.in: Add required vsx dependencies.
8178
8179 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
8180 Declare init_registers_powerpc_vsx32l.
8181 Declare init_registers_powerpc_vsx64l.
8182 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
8183 (ppc_arch_setup): Check for VSX in hwcap.
8184 (ppc_fill_vsxregset): New function.
8185 (ppc_store_vsxregset): New function.
8186 Add new VSX entry in regset_info target_regsets.
8187
8188 * configure.srv: Add new VSX dependencies.
8189
8190 2008-08-12 Pedro Alves <pedro@codesourcery.com>
8191
8192 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
8193 (remote_open): Set or clear transport_is_reliable.
8194 (putpkt_binary): Don't expect acks in noack mode.
8195 (getpkt): Don't send ack/nac in noack mode.
8196 * server.c (handle_general_set): Handle QStartNoAckMode.
8197 (handle_query): If connected by tcp pass QStartNoAckMode+ in
8198 qSupported.
8199 (main): Reset noack_mode on every connection.
8200 * server.h (noack_mode): Declare.
8201
8202 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8203
8204 * Makefile.in (GDBREPLAY_OBS): New variable.
8205 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
8206
8207 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
8208 Daniel Jacobowitz <dan@codesourcery.com>
8209
8210 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
8211 (usr_store_inferior_registers): Likewise.
8212 (regsets_store_inferior_registers): Likewise.
8213
8214 2008-07-31 Rolf Jansen <rj@surtec.com>
8215 Pedro Alves <pedro@codesourcery.com>
8216
8217 * configure.ac: Check for memmem declaration.
8218 * server.c [HAVE_MALLOC_H]: Include malloc.h.
8219 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
8220 (disable_packet_qfThreadInfo): Unconditionally compile.
8221 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
8222 * configure, config.in: Regenerate.
8223
8224 2008-07-28 Doug Kwan <dougkwan@google.com>
8225
8226 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
8227 (linux_write_memory): Remove declaration of errno.
8228
8229 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
8230
8231 * linux-low.c (handle_extended_wait): Do not use "status"
8232 variable uninitialized.
8233
8234 2008-07-07 Pedro Alves <pedro@codesourcery.com>
8235
8236 * server.c (handle_v_attach): Inhibit reporting dll changes.
8237
8238 2008-06-27 Pedro Alves <pedro@codesourcery.com>
8239
8240 * remote-utils.c (prepare_resume_reply): If requested, don't
8241 output "thread:TID" in the T stop reply.
8242
8243 * server.c (disable_packet_vCont, disable_packet_Tthread)
8244 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
8245 (handle_query): If requested, disable support for qC, qfThreadInfo
8246 and qsThreadInfo.
8247 (handle_v_requests): If requested, disable support for vCont.
8248 (gdbserver_show_disableable): New.
8249 (main): Handle --disable-packet and --disable-packet=LIST.
8250
8251 * server.h (disable_packet_vCont, disable_packet_Tthread)
8252 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
8253
8254 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
8255
8256 * server.c (gdbserver_usage): Mention --version.
8257
8258 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
8259
8260 * Makefile.in (gdbreplay.o): New rule.
8261
8262 2008-06-06 Joseph Myers <joseph@codesourcery.com>
8263
8264 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
8265 message, not gdbserver.
8266
8267 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
8268 Nathan Sidwell <nathan@codesourcery.com>
8269 Joseph Myers <joseph@codesourcery.com>
8270
8271 * acinclude.m4: Include ../../config/acx.m4.
8272 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
8273 * configure, config.in: Regenerate.
8274 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
8275 * server.c (gdbserver_version): Print PKGVERSION.
8276 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
8277 (main): Adjust gdbserver_usage calls.
8278 * gdbreplay.c (version, host_name): Add declarations.
8279 (gdbreplay_version, gdbreplay_usage): New.
8280 (main): Accept --version and --help options.
8281
8282 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
8283
8284 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
8285 (arm_breakpoint_at): Handle Thumb.
8286 (the_low_target): Add comment.
8287
8288 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
8289
8290 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
8291
8292 2008-05-09 Doug Evans <dje@google.com>
8293
8294 * server.h (decode_search_memory_packet): Declare.
8295 * remote-utils.c (decode_search_memory_packet): New fn.
8296 * server.c (handle_search_memory_1): New fn.
8297 (handle_search_memory): New fn.
8298 (handle_query): Process qSearch:memory packets.
8299
8300 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
8301
8302 * regcache.c (registers_length): Remove.
8303 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
8304 full register packet.
8305 * regcache.h (registers_length): Remove prototype.
8306 * server.h (PBUFSIZ): Define to 16384.
8307
8308 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
8309
8310 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
8311 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
8312 powerpc-64l.o, and powerpc-altivec64l.o.
8313 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
8314 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
8315 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
8316 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
8317 rs6000/power-linux.xml, and rs6000/power64-linux.xml
8318 to srv_xmlfiles.
8319
8320 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
8321 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
8322 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
8323 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
8324 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
8325 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
8326 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
8327 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
8328 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
8329 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
8330 (clean): Update.
8331
8332 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
8333 (init_registers_powerpc_32l): ... this new prototype.
8334 (init_registers_powerpc_32): Remove, replace by ...
8335 (init_registers_powerpc_altivec32l): ... this new prototype.
8336 (init_registers_powerpc_e500): Remove, replace by ...
8337 (init_registers_powerpc_e500l): ... this new prototype.
8338 (init_registers_ppc64): Remove, replace by ...
8339 (init_registers_powerpc_64l): ... this new prototype.
8340 (init_registers_powerpc_64): Remove, replace by ...
8341 (init_registers_powerpc_altivec64l): ... this new prototype.
8342 (ppc_num_regs): Set to 73.
8343 (PT_ORIG_R3, PT_TRAP): Define if necessary.
8344 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
8345 (ppc_cannot_store_register): Handle orig_r3 and trap.
8346 (ppc_arch_setup): Update init_registers_... calls.
8347 (ppc_fill_gregset): Handle orig_r3 and trap.
8348
8349 * inferiors.c (clear_inferiors): Reset current_inferior.
8350
8351 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
8352
8353 * acinclude.m4: Add override.m4.
8354 * configure: Regenerate.
8355
8356 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
8357
8358 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
8359 initial call to init_register_ppc64.
8360
8361 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
8362
8363 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
8364 single powerpc*-*-linux* case.
8365 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
8366
8367 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
8368
8369 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
8370 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
8371 from reg_xmlfiles.
8372 * linux-ppc-low.c: Include <elf.h>.
8373 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
8374 (ppc_hwcap): New global variable.
8375 (ppc_regmap): Remove __SPE__ #ifdef sections.
8376 (ppc_regmap_e500): New global variable.
8377 (ppc_cannot_store_register): Update __SPE__ special case.
8378 (ppc_get_hwcap): New function.
8379 (ppc_arch_setup): Use it to determine whether inferior supports
8380 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
8381 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
8382 Do not access registers if target does not support AltiVec.
8383 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
8384 Do not access registers if target does not support SPE.
8385 (target_regsets): Unconditionally include AltiVec and SPE regsets.
8386
8387 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
8388
8389 * linux-low.c (disabled_regsets, num_regsets): New.
8390 (use_regsets_p): Delete.
8391 (linux_wait_for_process): Clear disabled_regsets.
8392 (regsets_fetch_inferior_registers): Check and set it.
8393 (regsets_store_inferior_registers): Likewise.
8394 (linux_fetch_registers, linux_store_registers): Do not use
8395 use_regsets_p.
8396 (initialize_low): Allocate disabled_regsets.
8397
8398 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
8399
8400 * Makefile.in (LIBOBJS): New.
8401 (OBS): Use LIBOBJS.
8402 (memmem.o): New rule.
8403 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
8404 * configure: Regenerated.
8405
8406 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
8407
8408 * server.c (handle_query): Never return "unsupported" for
8409 qXfer:features:read queries.
8410
8411 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
8412
8413 * server.c (get_features_xml): Fix inverted condition.
8414 (handle_query): Always support qXfer:feature:read.
8415
8416 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
8417
8418 * server.c (wrapper_argv): New.
8419 (start_inferior): Handle wrapper_argv. If set, expect an extra
8420 trap.
8421 (gdbserver_usage): Document --wrapper.
8422 (main): Parse --wrapper.
8423
8424 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8425
8426 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
8427 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
8428 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
8429 (ppc_set_pc): Likewise.
8430 (ppc_arch_setup): New function.
8431 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
8432 of collect_register.
8433 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
8434
8435 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8436
8437 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
8438 instead of linux-ppc64-low.o.
8439 * linux-ppc64-low.c: Remove file.
8440 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
8441 (linux-ppc64-low.o): Remove rule.
8442
8443 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
8444 (init_registers_powerpc_64): Likewise.
8445 (ppc_regmap): Conditionally define depending on __powerpc64__.
8446 (ppc_cannot_store_register): Do not special-case "fpscr" when
8447 compiled on __powerpc64__.
8448 (ppc_collect_ptrace_register): New function.
8449 (ppc_supply_ptrace_register): New function.
8450 (ppc_breakpoint): Change type to "unsigned int".
8451 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
8452 (the_low_target): Conditionally provide initializers for the
8453 arch_setup member depending on __powerpc64__. Install
8454 collect_ptrace_register and supply_ptrace_register members.
8455
8456 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8457
8458 * regcache.h (gdbserver_xmltarget): Add extern declaration.
8459 * server.c (gdbserver_xmltarget): Define.
8460 (get_features_xml): Use it to replace "target.xml" and arch_string.
8461
8462 * configure.srv: Remove srv_xmltarget. Add XML files that were
8463 mentioned there to srv_xmlfiles instead. Remove conditional tests
8464 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
8465 srv_xmlfiles and srv_regobj to include all possible choices.
8466 * configure.ac (srv_xmltarget): Remove.
8467 (srv_xmlfiles): Do not add "target.xml".
8468 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
8469 checks for supplementary target information.
8470 * configure: Regenerate.
8471 * Makefile.in (XML_TARGET): Remove.
8472 (target.xml): Remove rule.
8473 (clean): Do not clean up target.xml.
8474 (.PRECIOUS): Do not mention target.xml.
8475
8476 * target.h (struct target_ops): Remove arch_string member.
8477 * linux-low.c (linux_arch_string): Remove.
8478 (linux_target_ops): Remove arch_string initializer.
8479 * linux-low.h (struct linux_target_ops): Remove arch_string member.
8480 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
8481 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
8482 * spu-low.c (spu_arch_string): Remove.
8483 (spu_target_ops): Remove arch_string initializer.
8484 * win32-low.c (win32_arch_string): Remove.
8485 (win32_target_ops): Remove arch_string initializer.
8486 * win32-low.h (struct win32_target_ops): Remove arch_string member.
8487 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
8488 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
8489
8490 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
8491
8492 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
8493 by collect_ptrace_register and supply_ptrace_register hooks.
8494 * linux-low.c (fetch_register): Use supply_ptrace_register callback
8495 instead of checking for the_low_target.left_pad_xfer.
8496 (usr_store_inferior_registers): Use collect_ptrace_register callback
8497 instead of checking for the_low_target.left_pad_xfer.
8498
8499 * linux-s390-low.c (s390_collect_ptrace_register): New function.
8500 (s390_supply_ptrace_register): Likewise.
8501 (s390_fill_gregset): Call s390_collect_ptrace_register.
8502 (the_low_target): Update.
8503
8504 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
8505 (ppc_supply_ptrace_register): Likewise.
8506 (the_low_target): Update.
8507
8508 * linux-i386-low.c (the_low_target): Update.
8509 * linux-x86-64-low.c (the_low_target): Update.
8510
8511 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
8512
8513 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
8514 reg-s390.o and reg-s390x.o.
8515
8516 * linux-low.c (new_inferior): New global variable.
8517 (linux_create_inferior, linux_attach): Set it.
8518 (linux_wait_for_process): Call the_low_target.arch_setup after the
8519 target has stopped for the first time.
8520 (initialize_low): Do not call the_low_target.arch_setup.
8521
8522 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
8523 (s390_set_pc): Likewise.
8524 (s390_arch_setup): New function.
8525 (the_low_target): Use s390_arch_setup as arch_setup routine.
8526
8527 * regcache.c (realloc_register_cache): New function.
8528 (set_register_cache): Call it for each existing regcache.
8529
8530 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
8531
8532 * server.h (init_registers): Remove prototype.
8533
8534 * linux-low.h (struct linux_target_ops): Add arch_setup field.
8535 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
8536 instead of init_registers ().
8537 * linux-arm-low.c (init_registers_arm): Add prototype.
8538 (init_registers_arm_with_iwmmxt): Likewise.
8539 (the_low_target): Add initializer for arch_setup field.
8540 * linux-cris-low.c (init_registers_cris): Add prototype.
8541 (the_low_target): Add initializer for arch_setup field.
8542 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
8543 (the_low_target): Add initializer for arch_setup field.
8544 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
8545 (the_low_target): Add initializer for arch_setup field.
8546 * linux-ia64-low.c (init_registers_ia64): Add prototype.
8547 (the_low_target): Add initializer for arch_setup field.
8548 * linux-m32r-low.c (init_registers_m32r): Add prototype.
8549 (the_low_target): Add initializer for arch_setup field.
8550 * linux-m68k-low.c (init_registers_m68k): Add prototype.
8551 (the_low_target): Add initializer for arch_setup field.
8552 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
8553 (init_registers_mips64_linux): Likewise.
8554 (the_low_target): Add initializer for arch_setup field.
8555 * linux-ppc-low.c (init_registers_ppc): Add prototype.
8556 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
8557 (the_low_target): Add initializer for arch_setup field.
8558 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
8559 (init_registers_powerpc_64): Likewise.
8560 (the_low_target): Add initializer for arch_setup field.
8561 * linux-s390-low.c (init_registers_s390): Add prototype.
8562 (init_registers_s390x): Likewise.
8563 (the_low_target): Add initializer for arch_setup field.
8564 * linux-sh-low.c (init_registers_sh): Add prototype.
8565 (the_low_target): Add initializer for arch_setup field.
8566 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
8567 (the_low_target): Add initializer for arch_setup field.
8568 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
8569 (the_low_target): Add initializer for arch_setup field.
8570
8571 * win32-low.h (struct win32_target_ops): Add arch_setup field.
8572 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
8573 instead of init_registers ().
8574 * win32-arm-low.c (init_registers_arm): Add prototype.
8575 (the_low_target): Add initializer for arch_setup field.
8576 * win32-i386-low.c (init_registers_i386): Add prototype.
8577 (the_low_target): Add initializer for arch_setup field.
8578
8579 * spu-low.c (init_registers_spu): Add prototype.
8580 (initialize_low): Call initialie_registers_spu () instead of
8581 initialize_registers ().
8582
8583 2008-02-19 Pedro Alves <pedro@codesourcery.com>
8584
8585 * server.c (handle_v_requests): When handling the vRun and vAttach
8586 packets, if already debugging a process, don't kill it. Return an
8587 error instead.
8588
8589 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
8590
8591 * server.c (handle_query): Correct length check.
8592
8593 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
8594
8595 * win32-low.c (do_initial_child_stuff): Add process handle
8596 parameter. Set current_process_handle and current_process_id from the
8597 parameters. Clear globals.
8598 (win32_create_inferior): Don't set current_process_handle and
8599 current_process_id here. Instead pass them on the call to
8600 do_initial_child_stuff.
8601 (win32_attach): Likewise.
8602 (win32_clear_inferiors): New.
8603 (win32_kill): Don't close the current process handle or the
8604 current thread handle here. Instead call win32_clear_inferiors.
8605 (win32_detach): Don't open a new handle to the process. Call
8606 win32_clear_inferiors.
8607 (win32_join): Don't rely on current_process_handle; open a new
8608 handle using the process id.
8609 (win32_wait): Call win32_clear_inferiors when the inferior process
8610 has exited.
8611
8612 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
8613
8614 * server.c (monitor_show_help): Add "exit".
8615
8616 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
8617
8618 * Makefile.in (SFILES): Add linux-xtensa-low.c.
8619 (clean): Add reg-xtensa.c.
8620 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
8621 * configure.srv (xtensa*-*-linux*) New target.
8622 * linux-xtensa-low.c: New.
8623 * xtensa-xtregs.c: New.
8624
8625 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
8626
8627 * hostio.c: Don't include errno.h.
8628 (errno_to_fileio_errno): Move to hostio-errno.
8629 * hostio.c: (hostio_error): Remove the error parameter. Defer the
8630 error number outputting to the target->hostio_last_error callback.
8631 (hostio_packet_error): Use FILEIO_EINVAL directly.
8632 (handle_open, handle_pread, hostio_error, handle_unlink): Update
8633 calls to hostio_error.
8634 * hostio-errno.c: New.
8635 * server.h (hostio_last_error_from_errno): Declare.
8636 * target.h (target_ops): Add hostio_last_error member.
8637 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
8638 as hostio_last_error handler.
8639 * spu-low.c (spu_target_ops): Likewise.
8640 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
8641 (wince_hostio_last_error): New functions.
8642 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
8643 as hostio_last_error handler.
8644 (win32_target_ops) [!_WIN32_WCE]: Register
8645 hostio_last_error_from_errno as hostio_last_error handler.
8646 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
8647 (hostio-errno.o): New rule.
8648 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
8649 * configure.srv (srv_hostio_err_objs): New variable. Default to
8650 hostio-errno.o.
8651 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
8652 * configure: Regenerate.
8653
8654 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
8655
8656 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
8657 (linux_kill, linux_detach): Clean up the process list.
8658 * remote-utils.c (remote_open): Improve port number parsing.
8659 (putpkt_binary, input_interrupt): Only send interrupts if the target
8660 is running.
8661 * server.c (extended_protocol): Make static.
8662 (attached): Define earlier.
8663 (exit_requested, response_needed, program_argv): New variables.
8664 (target_running): New.
8665 (start_inferior): Clear attached here.
8666 (attach_inferior): Set attached here.
8667 (require_running): Define.
8668 (handle_query): Use require_running and target_running. Implement
8669 "monitor exit".
8670 (handle_v_attach, handle_v_run): New.
8671 (handle_v_requests): Use require_running. Handle vAttach and vRun.
8672 (gdbserver_usage): Update.
8673 (main): Redo argument parsing. Handle --debug and --multi. Handle
8674 --attach along with other options or after the port. Save
8675 program_argv. Support no initial program. Resynchronize
8676 communication with GDB after an error. Handle "monitor exit".
8677 Use require_running and target_running. Always allow the extended
8678 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
8679 restart in extended mode.
8680 * README: Refer to the GDB manual. Update --attach usage.
8681
8682 2007-12-20 Andreas Schwab <schwab@suse.de>
8683
8684 * linux-low.c (STACK_SIZE): Define.
8685 (linux_tracefork_child): Use it. Use __clone2 on ia64.
8686 (linux_test_for_tracefork): Likewise.
8687
8688 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
8689
8690 * linux-low.c (linux_wait_for_event): Update messages. Do not
8691 reinsert auto-delete breakpoints.
8692 * mem-break.c (struct breakpoint): Change return type of handler to
8693 int.
8694 (set_breakpoint_at): Update handler type.
8695 (reinsert_breakpoint_handler): Return 1 instead of calling
8696 delete_breakpoint.
8697 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
8698 setting a new one.
8699 (check_breakpoints): Delete auto-delete breakpoints and return 2.
8700 * mem-break.h (set_breakpoint_at): Update handler type.
8701 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
8702 * win32-low.c (auto_delete_breakpoint): New.
8703 (get_child_debug_event): Use it.
8704
8705 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
8706
8707 * configure.ac: Check for pread and pwrite.
8708 * hostio.c (handle_pread): Fall back to lseek and read.
8709 (handle_pwrite): Fall back to lseek and write.
8710 * config.in, configure: Regenerated.
8711
8712 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
8713
8714 * server.c (myresume): Add own_buf argument.
8715 (main): Update calls.
8716
8717 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
8718
8719 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
8720 * remote-utils.c (remote_open): Do not call disable_async_io.
8721 (block_async_io): Delete.
8722 (unblock_async_io): Make static.
8723 (initialize_async_io): New.
8724 * server.c (handle_v_cont): Handle async I/O here.
8725 (myresume): Likewise. Move other common resume tasks here...
8726 (main): ... from here. Call initialize_async_io. Disable async
8727 I/O before the main loop.
8728 * server.h (initialize_async_io): Declare.
8729 (block_async_io, unblock_async_io): Delete prototypes.
8730 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
8731
8732 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
8733
8734 * remote-utils.c (readchar): Allow binary data in received messages.
8735
8736 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8737
8738 * win32-low.c (attaching): New global.
8739 (win32_create_inferior): Clear the `attaching' global.
8740 (win32_attach): Set the `attaching' global.
8741 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
8742 attaching. Only set a breakpoint at the entry point if not
8743 attaching.
8744
8745 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8746
8747 * server.c (main): Don't report dll events on the initial
8748 connection on attaches.
8749
8750 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8751
8752 * server.c (main): Relax numerical bases supported for the pid of
8753 the --attach command line argument.
8754
8755 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8756
8757 * win32-low.c (win32_attach): Call OpenProcess before
8758 DebugActiveProcess, not after. Add last error output to error
8759 call.
8760
8761 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8762
8763 * win32-low.c (win32_get_thread_context)
8764 (win32_set_thread_context): New functions.
8765 (thread_rec): Use win32_get_thread_context.
8766 (continue_one_thread, win32_resume): Use win32_set_thread_context.
8767 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
8768 field.
8769
8770 2007-12-03 Leo Zayas
8771 Pedro Alves <pedro_alves@portugalmail.pt>
8772
8773 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
8774 global variables.
8775 (child_add_thread): Minor cleanup.
8776 (child_continue): Resume artificially suspended threads before
8777 calling ContinueDebugEvent.
8778 (suspend_one_thread): New.
8779 (fake_breakpoint_event): New.
8780 (get_child_debug_event): Change return type to int. Check here if
8781 gdb sent an interrupt request. If a soft interrupt was requested,
8782 fake a breakpoint event. Return 0 if there is no event to handle,
8783 and 1 otherwise.
8784 (win32_wait): Don't check here if gdb sent an interrupt request.
8785 Ensure there is a valid event to handle.
8786 (win32_request_interrupt): Add soft interruption method as last
8787 resort.
8788
8789 2007-12-03 Leo Zayas
8790 Pedro Alves <pedro_alves@portugalmail.pt>
8791
8792 * win32-low.h (win32_thread_info): Add descriptions to the
8793 structure members. Replace `suspend_count' counter by a
8794 `suspended' flag.
8795 * win32-low.c (thread_rec): Update condition of when to get the
8796 context from the inferior. Rely on ContextFlags being set if it
8797 has already been retrieved. Only suspend the inferior thread if
8798 we haven't already. Warn if that fails.
8799 (continue_one_thread): s/suspend_count/suspended/. Only call
8800 ResumeThread once. Warn if that fails.
8801
8802 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
8803
8804 * win32-low.c (win32_wait): Don't read from the inferior when it
8805 has already exited.
8806
8807 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
8808
8809 * Makefile.in (win32_low_h): New variable.
8810 (win32-low.o): Add dependency on $(win32_low_h).
8811 (win32-arm-low.o, win32-i386-low.o): New rules.
8812
8813 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
8814
8815 * hostio.c: Correct copyright year.
8816
8817 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
8818
8819 * Makefile.in (OBS): Add hostio.o.
8820 (hostio.o): New rule.
8821 * server.h (handle_vFile): Declare.
8822 * hostio.c: New file.
8823 * server.c (handle_v_requests): Take packet_len and new_packet_len
8824 for binary packets. Call handle_vFile.
8825 (main): Update call to handle_v_requests.
8826
8827 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
8828
8829 * linux-low.c: Include <sched.h>.
8830
8831 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
8832
8833 * linux-low.c (linux_tracefork_grandchild): New.
8834 (linux_tracefork_child): Use clone.
8835 (linux_test_for_tracefork): Use clone; allocate and free a stack.
8836
8837 2007-10-31 Joel Brobecker <brobecker@adacore.com>
8838
8839 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
8840
8841 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
8842
8843 * linux-low.c (handle_extended_wait): Handle unexpected signals.
8844
8845 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
8846
8847 * inferiors.c (change_inferior_id): Delete.
8848 (add_pid_to_list, pull_pid_from_list): New.
8849 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
8850 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
8851 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
8852 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
8853 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
8854 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
8855 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
8856 (using_threads): Always set to 1.
8857 (handle_extended_wait): New.
8858 (add_process): Do not set TID.
8859 (linux_create_inferior): Set must_set_ptrace_flags.
8860 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
8861 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
8862 (linux_thread_alive): Rename TID argument to LWPID.
8863 (linux_wait_for_process): Handle unknown processes. Do not use TID.
8864 (linux_wait_for_event): Do not use TID or check using_threads. Update
8865 call to dead_thread_notify. Call handle_extended_wait.
8866 (linux_create_inferior): Use PTRACE_SETOPTIONS.
8867 (send_sigstop): Delete sigstop_sent.
8868 (wait_for_sigstop): Avoid TID.
8869 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
8870 (linux_test_for_tracefork): New.
8871 (linux_lookup_signals): Use thread_db_active and
8872 linux_supports_tracefork_flag.
8873 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
8874 * linux-low.h (get_process_thread): Avoid TID.
8875 (struct process_ifo): Move thread_known and tid to the end. Remove
8876 sigstop_sent.
8877 (linux_attach_lwp, thread_db_init): Update prototypes.
8878 * server.h (change_inferior_id): Delete prototype.
8879 (add_pid_to_list, pull_pid_from_list): New prototypes.
8880 * thread-db.c (thread_db_use_events): New.
8881 (find_first_thread): Rename to...
8882 (find_one_thread): ...this. Update callers and messages. Do not
8883 call fatal. Check thread_db_use_events. Do not call
8884 change_inferior_id or new_thread_notify.
8885 (maybe_attach_thread): Update. Do not call new_thread_notify.
8886 (thread_db_init): Set thread_db_use_events. Check use_events.
8887 * utils.c (fatal, warning): Correct message prefix.
8888
8889 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
8890
8891 * Makefile.in (clean): Remove new files.
8892 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
8893 (powerpc-64.o, powerpc-64.c): New rules.
8894 * configure.srv: Use alternate register sets for powerpc64-*-linux*
8895 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
8896 with SPE.
8897 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
8898 SPE targets.
8899 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
8900 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
8901 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
8902 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
8903 (target_regsets): Add AltiVec and SPE register sets.
8904 * configure.ac: Check for AltiVec and SPE.
8905 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
8906 (ppc_fill_vrregset, ppc_store_vrregset): New.
8907 (target_regsets): Add AltiVec register set.
8908 * configure: Regenerated.
8909
8910 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
8911
8912 * linux-low.c (O_LARGEFILE): Define.
8913 (linux_read_memory): Use /proc/PID/mem.
8914 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
8915 * configure, config.in: Regenerated.
8916
8917 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
8918
8919 * linux-low.c (linux_wait_for_event): Do not pass signals while
8920 single-stepping.
8921
8922 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
8923
8924 * win32-low.c (create_process): New.
8925 (win32_create_inferior): Use create_process instead of
8926 CreateProcess. If create_process failed retry appending an ".exe"
8927 suffix. Store the GetLastError result immediatelly after
8928 create_process calls and use it on the call to error.
8929
8930 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
8931
8932 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
8933
8934 2007-08-23 Joel Brobecker <brobecker@adacore.com>
8935
8936 * configure.ac: Switch license to GPLv3.
8937
8938 2007-08-01 Michael Snyder <msnyder@access-company.com>
8939
8940 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
8941
8942 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
8943
8944 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
8945 typedef.
8946 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
8947 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
8948 CloseToolhelp32Snapshot.
8949 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
8950 CloseToolhelp32Snapshot.
8951
8952 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
8953
8954 * server.c (main): Check for inferior exit before main loop.
8955
8956 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
8957
8958 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
8959 instead of on tmp_desc.
8960
8961 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
8962 Daniel Jacobowitz <dan@codesourcery.com>
8963
8964 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
8965 (add_thread): Minor cleanups.
8966 (clear_inferiors): Move lower in the file. Clear the DLL
8967 list.
8968 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
8969 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
8970 (xml_escape_text): New.
8971 * server.c (handle_query): Handle qXfer:libraries:read. Report it
8972 for qSupported.
8973 (handle_v_cont): Report errors.
8974 (gdbserver_version): Update.
8975 (main): Correct size of own_buf. Do not report initial DLL events.
8976 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
8977 (unloaded_dll, xml_escape_text): New.
8978 * win32-low.c (enum target_waitkind): Update comments.
8979 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
8980 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
8981 (win32_EnumProcessModules, win32_GetModuleInformation)
8982 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
8983 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
8984 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
8985 (win32_Module32First, win32_Module32Next, load_toolhelp)
8986 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
8987 (get_child_debug_event): Handle DLL events.
8988 (win32_wait): Likewise.
8989
8990 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
8991
8992 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
8993 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
8994
8995 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
8996
8997 * win32-low.c (handle_output_debug_string): Ignore event if not
8998 waiting.
8999
9000 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
9001
9002 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
9003
9004 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
9005
9006 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
9007
9008 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
9009
9010 * inferiors.c (change_inferior_id): Add comment.
9011 * linux-low.c (check_removed_breakpoint): Add an early
9012 prototype. Improve debug output.
9013 (linux_attach): Doc update.
9014 (linux_detach_one_process, linux_detach): Clean up before releasing
9015 each process.
9016 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
9017 * linux-low.h (struct process_info): Doc improvement.
9018 * mem-break.c (delete_all_breakpoints): New.
9019 * mem-break.h (delete_all_breakpoints): New prototype.
9020 * thread-db.c (find_first_thread): New.
9021 (thread_db_create_event): Call it instead of
9022 thread_db_find_new_threads. Clean up unused variables.
9023 (maybe_attach_thread): Remove first thread handling.
9024 (thread_db_find_new_threads): Use find_first_thread.
9025 (thread_db_get_tls_address): Likewise.
9026
9027 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
9028
9029 * thread-db.c (thread_db_find_new_threads): Add prototype.
9030 (thread_db_create_event): Check for the main thread before adding
9031 a new thread.
9032 (maybe_attach_thread): Only enable event reporting if TID == 0.
9033 (thread_db_get_tls_address): Check for new threads.
9034
9035 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
9036
9037 * linux-low.c (linux_create_inferior): Try execv before execvp.
9038 * spu-low.c (spu_create_inferior): Likewise.
9039
9040 2007-06-13 Mike Frysinger <vapier@gentoo.org>
9041
9042 * linux-low.c (linux_create_inferior): Change execv to execvp.
9043 * spu-low.c (spu_create_inferior): Likewies.
9044
9045 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
9046
9047 * Makefile.in (clean): Clean new files instead of deleted ones.
9048 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
9049 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
9050 rules.
9051 * configure.srv: Specify XML files and new regformats for MIPS and
9052 MIPS64 GNU/Linux.
9053 * linux-mips-low.c (mips_num_regs): Set to only used registers.
9054 (mips_regmap): Do not fetch $0. Remove unused registers. Add
9055 an entry for the restart register.
9056 (mips_cannot_fetch_register, mips_cannot_store_register)
9057 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
9058 register names to match the XML descriptions.
9059 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
9060 restart register instead of $0.
9061
9062 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
9063 Markus Deuling <deuling@de.ibm.com>
9064
9065 * remote-utils.c (decode_xfer_write): New function.
9066 * server.h (decode_xfer_write): Add prototype.
9067 * server.c (handle_query): Add PACKET_LEN argument. Support
9068 qXfer:spu:read and qXfer:spu:write packets.
9069 (main): Pass packet_len to handle_query.
9070 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
9071 * target.h (target_ops): Add qxfer_spu.
9072
9073 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
9074
9075 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
9076 accessing non-seekable spufs files.
9077
9078 2007-05-16 Markus Deuling <deuling@de.ibm.com>
9079
9080 * server.c (handle_query): Add reply for qC packet.
9081
9082 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9083 Leo Zayas <lerele@champenstudios@com>
9084
9085 * server.h (check_remote_input_interrupt_request): New function.
9086 * remote_utils.c (INVALID_DESCRIPTOR): New define.
9087 (remote_desc): Initialize with INVALID_DESCRIPTOR.
9088 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
9089 (check_remote_input_interrupt_request): New function.
9090 * server.h (check_remote_input_interrupt_request): Declare.
9091 * win32-low.c (winapi_DebugBreakProcess,
9092 winapi_GenerateConsoleCtrlEvent): New typedefs.
9093 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
9094 to 250 ms.
9095 (win32_wait): Check for remote interrupt request
9096 with check_remote_input_interrupt_request.
9097 (win32_request_interrupt): New function.
9098 (win32_target_op): Set request_interrupt to win32_request_interrupt.
9099
9100 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9101
9102 * win32-low.c (debug_registers_changed,
9103 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
9104 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
9105 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
9106 (thread_rec): Get context using the low target.
9107 (child_add_thread): Call thread_added on the low target,
9108 which does the same thing.
9109 (regptr): Delete.
9110 (do_initial_child_stuff): Remove debug registers references.
9111 Set context using the low target. Resume threads after
9112 setting the contexts.
9113 (child_continue): Remove dead variable. Remove debug
9114 registers references.
9115 (child_fetch_inferior_registers): Go through the low target.
9116 (do_child_store_inferior_registers): Remove.
9117 (child_store_inferior_registers): Go through the low target.
9118 (win32_resume): Remove debug registers references.
9119 Set context using the low target.
9120 (handle_exception): Change return type to void. Don't record
9121 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
9122 first chance exception.
9123 (get_child_debug_event): Change return type to void. Remove
9124 goto loop. Always return after waiting for debug event.
9125 (win32_wait): Convert to switch statement. Handle spurious
9126 events.
9127
9128 * win32-i386-low.c (debug_registers_changed,
9129 debug_registers_used): New.
9130 (initial_stuff): Rename to ...
9131 (i386_initial_stuff): ... this. Clear debug registers
9132 state variables.
9133 (store_debug_registers): Delete.
9134 (i386_get_thread_context): New.
9135 (load_debug_registers): Delete.
9136 (i386_set_thread_context): New.
9137 (i386_thread_added): New.
9138 (single_step): Rename to ...
9139 (i386_single_step): ... this.
9140 (do_fetch_inferior_registers): Rename to ...
9141 (i386_fetch_inferior_register): ... this.
9142 (i386_store_inferior_register): New.
9143 (the_low_target): Adapt to new interface.
9144
9145 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
9146 (arm_get_thread_context): New.
9147 (arm_set_thread_context): New.
9148 (regptr): New.
9149 (do_fetch_inferior_registers): Rename to ...
9150 (arm_fetch_inferior_register): ... this.
9151 (arm_store_inferior_register): New.
9152 (arm_wince_breakpoint): Reimplement as unsigned long.
9153 (arm_wince_breakpoint_len): Define.
9154 (the_low_target): Adapt to new interface.
9155
9156 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
9157 load_debug_registers. Add get_thread_context, set_thread_context,
9158 thread_added and store_inferior_register. Rename
9159 fetch_inferior_registers to fetch_inferior_register.
9160 (regptr): Remove declaration.
9161
9162 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9163
9164 * linux-low.c (linux_detach): Change return type to int. Return 0.
9165 * spu-low.c (spu_detach): Likewise.
9166
9167 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9168
9169 * target.h (target_ops): Change return type of detach to int.
9170 Add join.
9171 (join_inferior): New.
9172 * server.c (main): Don't skip detach support on mingw32.
9173 If the inferior doesn't support detaching return error.
9174 Call join_inferior instead of using waitpid.
9175 * linux-low.c (linux_join): New.
9176 (linux_target_op): Add linux_join.
9177 * spu-low.c (spu_join): New.
9178 (spu_target_ops): Add spu_join.
9179 * win32-low.c (win32_detach): Adapt to new interface.
9180 Reopen current_process_handle before detaching. Issue a child
9181 resume before detaching.
9182 (win32_join): New.
9183 (win32_target_op): Add win32_join.
9184
9185 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9186
9187 * win32-low.c (win32-attach): Fix return value.
9188 * target.h (target_ops): Describe ATTACH return values.
9189
9190 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9191
9192 * win32-low.c (GETPROCADDRESS): Define.
9193 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
9194 (winapi_DebugSetProcessKillOnExit): Likewise.
9195 (win32_create_inferior): Force usage of ansi CreateProcessA.
9196 (win32_attach): Use GETPROCADDRESS.
9197 (win32_detach): Likewise.
9198
9199 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9200
9201 * win32-low.c (win32_wait): Don't use WSTOPSIG.
9202
9203 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
9204
9205 * win32-low.c: Commit leftover changes from 2007-03-29.
9206
9207 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
9208
9209 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
9210 fields short instead of int. Add explicit padding.
9211 (i387_cache_to_fsave): Remove unnecessary casts.
9212 (i387_fsave_to_cache): Doc fix.
9213 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
9214
9215 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
9216
9217 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
9218 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
9219
9220 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
9221
9222 * configure.srv (arm*-*-mingw32ce*): Move near the other
9223 arm targets.
9224
9225 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
9226
9227 * configure.ac: Add errno checking.
9228 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
9229 sys/file.h and malloc.h.
9230 (AC_CHECK_DECLS): Add perror.
9231 (srv_mingwce): Handle.
9232 * configure.srv (i[34567]86-*-cygwin*): Add
9233 win32-i386-low.o to srv_tgtobj.
9234 (i[34567]86-*-mingw*): Likewise.
9235 (arm*-*-mingw32ce*): Add case.
9236 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
9237 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
9238 [__MINGW32CE__] (strerror): New function.
9239 [__MINGW32CE__] (errno): Define to GetLastError.
9240 [__MINGW32CE__] (COUNTOF): New macro.
9241 (remote_open): Remove extra close call.
9242 * mem-break.c (delete_breakpoint_at): New function.
9243 * mem-break.h (delete_breakpoint_at): Declare.
9244 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
9245 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
9246 [USE_WIN32API] (read, write): Add char* casts.
9247 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
9248 * server.h: Include wincecompat.h on Windows CE.
9249 [HAVE_ERRNO_H]: Check.
9250 (perror): Declare if not declared.
9251 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
9252 (perror_with_name): Remove errno declaration.
9253 * wincecompat.h: New.
9254 * wincecompat.c: New.
9255 * win32-low.h: New.
9256 * win32-arm-low.c: New.
9257 * win32-i386-low.c: New.
9258 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
9259 (OUTMSG2): Make it safe.
9260 (_T): New macro.
9261 (COUNTOF): New macro.
9262 (NUM_REGS): Get it from the low target.
9263 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
9264 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
9265 (thread_rec): Let low target handle debug registers.
9266 (child_add_thread): Likewise.
9267 (child_init_thread_list): Likewise.
9268 (continue_one_thread): Likewise.
9269 (regptr): New.
9270 (do_child_fetch_inferior_registers): Move to ...
9271 * win32-i386-low.c: ... here, and rename to ...
9272 (do_fetch_inferior_registers): ... this.
9273 * win32-low.c (child_fetch_inferior_registers):
9274 Go through the low target.
9275 (do_child_store_inferior_registers): Use regptr.
9276 (strwinerror): New function.
9277 (win32_create_inferior): Handle Windows CE.
9278 Use strwinerror instead of strerror on Windows error
9279 codes. Add program to the error output.
9280 Don't close the main thread handle on Windows CE.
9281 (win32_attach): Use coredll.dll on Windows CE.
9282 (win32_kill): Close current process and current
9283 thread handles.
9284 (win32_detach): Use coredll.dll on Windows CE.
9285 (win32_resume): Let low target handle debug registers, and
9286 step request.
9287 (handle_exception): Add/Remove initial breakpoint. Avoid
9288 non-existant WSTOPSIG on Windows CE.
9289 (win32_read_inferior_memory): Cast to remove warning.
9290 (win32_arch_string): Go through the low target.
9291 (initialize_low): Call set_breakpoint_data with the low
9292 target's breakpoint.
9293 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
9294 FOP_REGNUM, mappings): Move to ...
9295 * win32-i386-low.c: ... here.
9296 * win32-low.c (win32_thread_info): Move to ...
9297 * win32-low.h: ... here.
9298 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
9299 win32-arm-low.c and wincecompat.c.
9300 (all:): Add $EXEEXT.
9301 (install-only:): Likewise.
9302 (gdbserver:): Likewise.
9303 (gdbreplay:): Likewise.
9304 * config.in: Regenerate.
9305 * configure: Regenerate.
9306
9307 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
9308
9309 * win32-low.c: Rename typedef thread_info to
9310 win32_thread_info throughout.
9311
9312 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
9313
9314 * win32-i386-low.c: Rename to ...
9315 * win32-low.c: ... this.
9316 * configure.srv: Replace win32-i386-low.o with win32-low.o.
9317 * Makefile.in: Likewise.
9318
9319 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
9320
9321 * remote-utils.c (monitor_output): Constify msg parameter.
9322 * server.h (monitor_output): Likewise.
9323 * win32-i386-low.c (handle_output_debug_string): New.
9324 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
9325 handle_output_debug_string.
9326 (get_child_debug_event): Likewise.
9327
9328 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
9329
9330 * server.c (main): Correct strtoul check.
9331
9332 2007-03-27 Jon Ringle <jon@ringle.org>
9333
9334 * linux-low.c: Check __ARCH_HAS_MMU__ also.
9335
9336 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
9337
9338 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
9339
9340 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
9341
9342 * terminal.h: Check HAVE_SGTTY_H.
9343
9344 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
9345
9346 * remote-utils.c (remote_open): Print out the assigned port number.
9347
9348 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
9349
9350 * remote-utils.c (monitor_output): New function.
9351 * server.c (debug_threads): Define here.
9352 (monitor_show_help): New function.
9353 (handle_query): Handle qRcmd.
9354 (main): Do not handle 'd' packet.
9355 * server.h (debug_threads, remote_debug, monitor_output): Declare.
9356 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
9357 of debug_threads.
9358
9359 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
9360
9361 * Makefile.in (EXEEXT): New.
9362 (clean): Use $(EXEEXT).
9363
9364 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
9365
9366 * target.h (target_ops): Rename send_signal to request_interrupt,
9367 and remove enum target_signal parameter.
9368 * linux-low.c (linux_request_interrupt): Rename from
9369 linux_send_signal, and always send SIGINT.
9370 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
9371 and always send SIGINT.
9372 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
9373 of send_signal.
9374 (input_interrupt): Likewise.
9375
9376 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
9377
9378 * server.c (get_features_xml): Check if target implemented
9379 arch_string.
9380 * win32-i386-low.c (win32_arch_string): New.
9381 (win32_target_ops): Add win32_arch_string as arch_string member.
9382
9383 2007-02-22 Markus Deuling <deuling@de.ibm.com>
9384
9385 * spu-low.c (spu_arch_string): New.
9386 (spu_target_ops): Add spu_arch_string.
9387
9388 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
9389
9390 * remote-utils.c: Remove HAVE_TERMINAL_H check.
9391 * configure.ac: Do not check for terminal.h.
9392 * configure, config.in: Regenerated.
9393
9394 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
9395
9396 * Makefile.in (OBS): Add $(XML_BUILTIN).
9397 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
9398 (clean): Update.
9399 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
9400 (arm-with-iwmmxt.c): New.
9401 * config.in, configure: Regenerate.
9402 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
9403 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
9404 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
9405 (arm*-*-linux*): Add iWMMXt and regset support.
9406 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
9407 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
9408 (arm_store_wmmxregset, target_regsets): New.
9409 * server.c (get_features_xml): Take annex argument. Check builtin
9410 XML documents.
9411 (handle_query): Handle multiple annexes.
9412
9413 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
9414
9415 * remote-utils.c [USE_WIN32API] (read, write): Define.
9416 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
9417 write.
9418
9419 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
9420
9421 * linux-i386-low.c (the_low_target): Set arch_string.
9422 * linux-x86-64-low.c (the_low_target): Likewise.
9423 * linux-low.c (linux_arch_string): New.
9424 (linux_target_ops): Add it.
9425 * linux-low.h (struct linux_target_ops): Add arch_string.
9426 * server.c (write_qxfer_response): Use const void * for DATA.
9427 (get_features_xml): New.
9428 (handle_query): Handle qXfer:features:read. Report it for qSupported.
9429 * target.h (struct target_ops): Add arch_string method.
9430
9431 2007-01-03 Denis Pilat <denis.pilat@st.com>
9432 Daniel Jacobowitz <dan@codesourcery.com>
9433
9434 * linux-low.c (linux_kill): Handle being called with no threads.
9435 * win32-i386-low.c (win32_kill): Likewise.
9436 (get_child_debug_event): Clear current_process_handle.
9437
9438 2006-12-30 Denis PILAT <denis.pilat@st.com>
9439 Daniel Jacobowitz <dan@codesourcery.com>
9440
9441 * remote-utils.c (remote_open): Check the type of specified
9442 serial port devices before opening them.
9443 * server.c (main): Kill the inferior if an error occurs during
9444 the first remote_open.
9445
9446 2006-12-05 Markus Deuling <deuling@de.ibm.com>
9447
9448 * README: Update supported targets.
9449
9450 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
9451
9452 * Makefile.in (clean): Remove reg-mips64.c.
9453 (reg-mips64.c, reg-mips64.o): New rules.
9454 * configure.srv: Handle mips64. Include regset support for mips.
9455 * linux-mips-low.c (union mips_register): New.
9456 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
9457 (mips_breakpoint, mips_breakpoint_at): Use int.
9458 (mips_collect_register, mips_supply_register)
9459 (mips_collect_register_32bit, mips_supply_register_32bit)
9460 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
9461 (mips_store_fpregset, target_regsets): New.
9462 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
9463
9464 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
9465
9466 * configure.srv: Add target "spu*-*-*".
9467 * Makefile.in (clean): Remove reg-spu.c.
9468 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
9469 * spu-low.c: New file.
9470
9471 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
9472
9473 * configure.ac: Correct td_thr_tls_get_addr test.
9474 * configure: Regenerated.
9475
9476 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
9477
9478 * linux-low.c (linux_wait_for_event): Reformat. Use the
9479 pass_signals array.
9480 * remote-utils.c (decode_address_to_semicolon): New.
9481 * server.c (pass_signals, handle_general_set): New.
9482 (handle_query): Mention QPassSignals for qSupported.
9483 (main): Call handle_general_set.
9484 * server.h (pass_signals, decode_address_to_semicolon): New.
9485
9486 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
9487
9488 * server.c (handle_query): Correct error handling for read_auxv.
9489
9490 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
9491
9492 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
9493 and srv_linux_thread_db to yes.
9494 * linux-s390-low.c (s390_fill_gregset): New function.
9495 (target_regsets): Define data structure.
9496
9497 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
9498
9499 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
9500 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
9501 * config.in, configure: Regenerated.
9502 * inferiors.c (gdb_id_to_thread): New function.
9503 (gdb_id_to_thread_id): Use it.
9504 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
9505 * linux-low.h (struct process_info): Add th member.
9506 (thread_db_get_tls_address): New prototype.
9507 * remote-utils.c (decode_address): Make non-static.
9508 * server.c (handle_query): Handle qGetTLSAddr.
9509 * server.h (gdb_id_to_thread, decode_address): New prototypes.
9510 * target.h (struct target_ops): Add get_tls_address.
9511 * thread-db.c (maybe_attach_thread): Save the thread handle.
9512 (thread_db_get_tls_address): New.
9513
9514 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
9515
9516 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
9517 (linux_resume_one_process): Take a siginfo_t *. Update all
9518 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
9519 (struct pending_signals): Add a siginfo_t.
9520 (linux_wait_for_process): Always set last_status.
9521 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
9522 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
9523 * linux-low.h (struct process_info): Add last_status.
9524
9525 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
9526
9527 * remote-utils.c (try_rle): New function.
9528 (putpkt_binary): Use it.
9529
9530 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
9531
9532 * Makefile.in (clean): Clean reg-x86-64-linux.c.
9533 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
9534 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
9535 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
9536 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
9537 point registers.
9538
9539 2006-08-08 Richard Sandiford <richard@codesourcery.com>
9540
9541 * server.c (terminal_fd): New variable.
9542 (old_foreground_pgrp): Likewise.
9543 (restore_old_foreground_pgrp): New function.
9544 (start_inferior): Record the terminal file descriptor in terminal_fd
9545 and its original foreground group in old_foreground_pgrp. Register
9546 restore_old_foreground_pgrp with atexit().
9547
9548 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
9549
9550 * server.c (handle_query): Correct qPart to qXfer.
9551
9552 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
9553
9554 * configure.ac: Check for more headers which are missing on
9555 Windows. Automatically supply -lwsock32 and USE_WIN32API.
9556 * configure.srv: Add Cygwin and mingw32.
9557 * remote-utils.c: Don't include headers unconditionally which
9558 are missing on mingw32. Include <winsock.h> for mingw32.
9559 (remote_open): Adjust for mingw32 support. Flush
9560 standard error after writing to it.
9561 (remote_close, putpkt_binary, input_interrupt, block_async_io)
9562 (unblock_async_io, enable_async_io, disable_async_io)
9563 (readchar, getpkt): Update for Winsock support.
9564 (prepare_resume_reply): Expect a protocol signal number.
9565 * server.c: Disable <sys/wait.h> on mingw32.
9566 (start_inferior): Adjust for mingw32 support. Flush
9567 standard error after writing to it.
9568 (attach_inferior): Likewise. Use protocol signal
9569 numbers.
9570 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
9571 and names.
9572 * win32-i386-low.c: New file.
9573 * Makefile.in (XM_CLIBS): Set.
9574 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
9575 (win32-i386-low.o): New dependency rule.
9576 * linux-low.c (linux_wait): Use target signal numbers.
9577 * target.h (struct target_ops): Doc fix.
9578 * server.h (target_signal_to_name): New prototype.
9579 * gdbreplay.c: Don't include headers unconditionally which
9580 are missing on mingw32. Include <winsock.h> for mingw32.
9581 (remote_close, remote_open): Adjust for Winsock support.
9582 * configure, config.in: Regenerated.
9583
9584 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
9585
9586 * server.c (decode_xfer_read, write_qxfer_response): New.
9587 (handle_query): Take a packet length argument. Handle
9588 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
9589 the qSupported response.
9590 (main): Update call to handle_query.
9591
9592 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
9593
9594 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
9595 (putpkt_binary): Renamed from putpkt and adjusted for binary
9596 data.
9597 (putpkt): New wrapper for putpkt_binary.
9598 (readchar): Don't mask off the high bit.
9599 (decode_X_packet): New function.
9600 * server.c (main): Call putpkt_binary if a handler sets the packet
9601 length. Save the length of the incoming packet. Handle 'X'.
9602 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
9603
9604 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
9605
9606 * server.c (handle_query): Handle qSupported.
9607
9608 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
9609
9610 * remote-utils.c (all_symbols_looked_up): New variable.
9611 (look_up_one_symbol): Check it.
9612 * server.h (look_up_one_symbol): New declaration.
9613 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
9614
9615 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
9616
9617 * Makefile.in (linux-arm-low.o): Update dependencies.
9618 * linux-arm-low.c: Include "gdb_proc_service.h".
9619 (PTRACE_GET_THREAD_AREA): Define.
9620 (ps_get_thread_area): New function.
9621
9622 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
9623
9624 * configure.srv (m68k*-*-uclinux*): New target.
9625 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
9626 (linux_resume_one_process): Remove extraneous cast.
9627 (linux_read_offsets): New.
9628 (linux_target_op): Add linux_read_offsets on mmuless systems.
9629 * server.c (handle_query): Add qOffsets logic.
9630 * target.h (struct target_ops): Add read_offsets.
9631
9632 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
9633
9634 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
9635 (PTRACE_GET_THREAD_AREA): Define.
9636 (ps_get_thread_area): New function.
9637 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
9638 (linux-x86-64-low.o): Update.
9639
9640 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
9641
9642 * configure.ac: Remove checks for prfpregset_t.
9643 * gdb_proc_service.h: New file.
9644 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
9645 new "gdb_proc_service.h".
9646 * proc-service.c: Likewise.
9647 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
9648 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
9649 * Makefile.in (gdb_proc_service_h): Updated.
9650 * configure, config.in: Regenerated.
9651
9652 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
9653
9654 * remote-utils.c (prepare_resume_reply): Move declaration
9655 of gdb_id_from_wait to the top of the block.
9656
9657 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
9658
9659 * linux-low.c (regsets_store_inferior_registers): Read the regset
9660 from the target before filling it.
9661
9662 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
9663
9664 * server.c (attach_inferior): Return SIGTRAP for a successful
9665 attach.
9666
9667 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
9668
9669 * Makefile.in (OBS): Add version.o.
9670 (STAGESTUFF): Delete.
9671 (version.o): Add dependencies.
9672 (version.c): Replace rule.
9673 (clean): Remove version.c.
9674 * server.c (gdbserver_version): New.
9675 (gdbserver_usage): Use printf.
9676 (main): Handle --version and --help.
9677 * server.h (version, host_name): Add declarations.
9678
9679 2005-12-23 Eli Zaretskii <eliz@gnu.org>
9680
9681 * linux-arm-low.c:
9682 * linux-arm-low.c:
9683 * inferiors.c:
9684 * i387-fp.h:
9685 * i387-fp.c:
9686 * gdbreplay.c:
9687 * regcache.c:
9688 * proc-service.c:
9689 * mem-break.h:
9690 * mem-break.c:
9691 * linux-x86-64-low.c:
9692 * linux-sh-low.c:
9693 * linux-s390-low.c:
9694 * linux-ppc64-low.c:
9695 * linux-ppc-low.c:
9696 * linux-mips-low.c:
9697 * linux-m68k-low.c:
9698 * linux-m32r-low.c:
9699 * linux-low.h:
9700 * linux-low.c:
9701 * linux-ia64-low.c:
9702 * linux-i386-low.c:
9703 * linux-crisv32-low.c:
9704 * thread-db.c:
9705 * terminal.h:
9706 * target.h:
9707 * target.c:
9708 * server.h:
9709 * server.c:
9710 * remote-utils.c:
9711 * regcache.h:
9712 * utils.c:
9713 * Makefile.in:
9714 * configure.ac:
9715 * gdbserver.1: Add (C) after Copyright. Update the FSF
9716 address.
9717
9718 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
9719
9720 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
9721 (arm_breakpoint_at): Recognize both breakpoints.
9722 (the_low_target): Use the correct breakpoint instruction.
9723
9724 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
9725
9726 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
9727 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
9728 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
9729 (the_low_target): Update.
9730
9731 2005-10-25 Andreas Schwab <schwab@suse.de>
9732
9733 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
9734
9735 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
9736 (ia64_num_regs): Reduce to 462.
9737
9738 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
9739
9740 * acinclude.m4: Correct quoting.
9741 * aclocal.m4: Regenerated.
9742
9743 Suggested by SZOKOVACS Robert <szo@ies.hu>:
9744 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
9745 (thread_db_init): Call thread_db_err_str.
9746 * configure.ac: Check for TD_VERSION.
9747 * config.in, configure: Regenerated.
9748
9749 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9750
9751 * server.h (error, fatal, warning): Add ATTR_FORMAT.
9752
9753 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
9754
9755 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
9756 is not available. Define HAVE_PTRACE_GETREGS if it is.
9757 * config.in, configure: Regenerated.
9758 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
9759 * linux-i386-low.c, linux-m68k-low.c: Update to use
9760 HAVE_PTRACE_GETREGS.
9761 * linux-low.c (regsets_fetch_inferior_registers)
9762 (regsets_store_inferior_registers): Only return 0 if we processed
9763 GENERAL_REGS.
9764 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
9765 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
9766
9767 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
9768
9769 * inferiors.c (struct thread_info): Add gdb_id.
9770 (add_thread): Add gdb_id argument.
9771 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
9772 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
9773 calls to add_thread.
9774 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
9775 * server.c (handle_query): Use thread_to_gdb_id.
9776 (handle_v_cont, main): Use gdb_id_to_thread_id.
9777 * server.h (add_thread): Update prototype.
9778 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
9779 prototypes.
9780
9781 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
9782
9783 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
9784 left-padded registers.
9785 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
9786 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
9787
9788 2005-07-01 Steve Ellcey <sje@cup.hp.com>
9789
9790 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
9791 * configure: Regenerate.
9792 * config.in: Regenerate.
9793 * server.h (NEED_DECLARATION_STRERROR):
9794 Replace with !HAVE_DECL_STRERROR.
9795
9796 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
9797
9798 * linux-low.c (linux_wait, linux_send_signal): Don't test
9799 an unsigned long variable for > 0 if it could be MAX_ULONG.
9800 * server.c (myresume): Likewise.
9801 * target.c (set_desired_inferior): Likewise.
9802
9803 2005-06-13 Mark Kettenis <kettenis@gnu.org>
9804
9805 * configure.ac: Simplify and improve check for socklen_t.
9806 * configure, config.in: Regenerate.
9807
9808 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
9809
9810 * acconfig.h: Remove.
9811 * configure.ac: Add a test for socklen_t. Use three-argument
9812 AC_DEFINE throughout.
9813 * config.in: Regenerated using autoheader 2.59.
9814 * configure: Regenerated.
9815
9816 * gdbreplay.c (socklen_t): Provide a default.
9817 (remote_open): Use socklen_t.
9818 * remote-utils.c (socklen_t): Provide a default.
9819 (remote_open): Use socklen_t.
9820 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
9821 unsigned char.
9822
9823 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
9824 char for buffers.
9825 * linux-low.c (linux_read_memory, linux_write_memory)
9826 (linux_read_auxv): Likewise.
9827 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
9828 (check_mem_write): Likewise.
9829 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
9830 Likewise.
9831 * regcache.c (struct inferior_rgcache_data, registers_to_string)
9832 (registers_from_string, register_data): Likewise.
9833 * server.c (handle_query, main): Likewise.
9834 * server.h (convert_ascii_to_int, convert_int_to_ascii)
9835 (decode_M_packet): Likewise.
9836 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
9837 * target.h (struct target_ops): Update read_memory, write_memory,
9838 and read_auxv.
9839 (read_inferior_memory, write_inferior_memory): Update.
9840 * linux-low.h (struct linux_target_ops): Change type of breakpoint
9841 to unsigned char *.
9842 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
9843 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
9844 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
9845 linux-s390-low.c, linux-sh-low.c: Update for changes in
9846 read_inferior_memory and the_low_target->breakpoint.
9847
9848 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
9849
9850 * Makefile.in (SFILES): Add linux-ppc64-low.c.
9851 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
9852 * configure.srv: Add powerpc64-*-linux*.
9853 * linux-ppc64-low.c: New file.
9854
9855 2005-05-23 Orjan Friberg <orjanf@axis.com>
9856
9857 * linux-cris-low.c: New file with support for CRIS.
9858 * linux-crisv32-low.c: Ditto for CRISv32.
9859 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
9860 (clean): Add reg-cris.c and reg-crisv32.c.
9861 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
9862 reg-crisv32.o, and reg-crisv32.c to make rules.
9863 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
9864 recognized targets.
9865
9866 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
9867
9868 * linux-low.c (fetch_register): Ensure buffer size is a multiple
9869 of sizeof (PTRACE_XFER_TYPE).
9870 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
9871
9872 2005-05-12 Orjan Friberg <orjanf@axis.com>
9873
9874 * target.h (struct target_ops): Add insert_watchpoint,
9875 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
9876 pointers for hardware watchpoint support.
9877 * linux-low.h (struct linux_target_ops): Ditto.
9878 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
9879 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
9880 to linux_target_ops.
9881 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
9882 reply packet.
9883 * server.c (main): Recognize 'Z' and 'z' packets.
9884
9885 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
9886
9887 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
9888 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
9889 (the_low_target): Add new members.
9890
9891 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
9892
9893 * proc-service.c (ps_lgetregs): Search all_processes instead of
9894 all_threads.
9895
9896 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
9897
9898 * server.c (start_inferior): Change return type to int.
9899 (attach_inferior): Change sigptr to int *.
9900 (handle_v_cont, handle_v_requests): Change signal to int *.
9901 (main): Change signal to int.
9902
9903 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
9904
9905 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
9906 * configure.srv: Add m32r*-*-linux*.
9907 * linux-m32r-low.c: New file.
9908
9909 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
9910
9911 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
9912
9913 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
9914
9915 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
9916 Take unsigned long arguments for PIDs.
9917 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
9918 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
9919 (wait_for_sigstop, linux_resume_one_process)
9920 (regsets_fetch_inferior_registers, linux_send_signal)
9921 (linux_read_auxv): Likewise. Update the types of variables holding
9922 PIDs. Update format string specifiers.
9923 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
9924 * remote-utils.c (prepare_resume_reply): Likewise.
9925 * server.c (cont_thread, general_thread, step_thread)
9926 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
9927 unsigned long.
9928 (handle_query): Update format specifiers.
9929 (handle_v_cont, main): Use strtoul for thread IDs.
9930 * server.h (struct inferior_list_entry): Use unsigned long for ID.
9931 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
9932 (general_thread, step_thread, thread_from_wait)
9933 (old_thread_from_wait): Update.
9934 * target.h (struct thread_resume): Use unsigned long for THREAD.
9935 (struct target_ops): Use unsigned long for arguments to attach and
9936 thread_alive.
9937
9938 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
9939
9940 * acinclude.m4: Include bfd/bfd.m4 directly.
9941 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
9942 <agriffis@toolchain.org>.
9943 * aclocal.m4, configure: Regenerated.
9944
9945 2005-01-07 Andrew Cagney <cagney@gnu.org>
9946
9947 * configure.ac: Rename configure.in, require autoconf 2.59.
9948 * configure: Re-generate.
9949
9950 2004-12-08 Daniel Jacobowitz <dan@debian.org>
9951
9952 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
9953 LIBS when finished.
9954 * aclocal.m4: Regenerated.
9955 * configure: Regenerated.
9956
9957 2004-11-21 Andreas Schwab <schwab@suse.de>
9958
9959 * linux-m68k-low.c (m68k_num_gregs): Define.
9960 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
9961 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
9962 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
9963 (m68k_breakpoint_at): New. Add to the_low_target.
9964
9965 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
9966 srv_linux_thread_db to yes.
9967
9968 2004-10-20 Joel Brobecker <brobecker@gnat.com>
9969
9970 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
9971 (ARCH_SET_FS): Likewise.
9972 (ARCH_GET_FS): Likewise.
9973 (ARCH_GET_GS): Likewise.
9974
9975 2004-10-16 Daniel Jacobowitz <dan@debian.org>
9976
9977 * linux-i386-low.c (ps_get_thread_area): New.
9978 * linux-x86-64-low.c (ps_get_thread_area): New.
9979 * linux-low.c: Include <sys/syscall.h>.
9980 (linux_kill_one_process): Don't kill the first thread here.
9981 (linux_kill): Kill the first thread here.
9982 (kill_lwp): New function.
9983 (send_sigstop, linux_send_signal): Use it.
9984 * proc-service.c: Clean up #ifdefs.
9985 (fpregset_info): Delete.
9986 (ps_lgetregs): Update and enable implementation.
9987 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
9988 implementations.
9989 * remote-utils.c (struct sym_cache, symbol_cache): New.
9990 (input_interrupt): Print a clearer message.
9991 (async_io_enabled): New variable.
9992 (enable_async_io, disable_async_io): Use it. Update comments.
9993 (look_up_one_symbol): Use the symbol cache.
9994 * thread-db.c (thread_db_look_up_symbols): New function.
9995 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
9996
9997 2004-10-16 Daniel Jacobowitz <dan@debian.org>
9998
9999 * configure.in: Test for -rdynamic.
10000 * configure: Regenerated.
10001 * Makefile (INTERNAL_LDFLAGS): New.
10002 (gdbserver, gdbreplay): Use it.
10003
10004 2004-09-02 Andrew Cagney <cagney@gnu.org>
10005
10006 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
10007
10008 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
10009
10010 * linux-low.c (linux_wait): Clear all_processes list also.
10011
10012 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
10013
10014 * linux-low.c: Include <errno.h>. Remove extern declaration of
10015 errno.
10016
10017 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
10018
10019 * gdbreplay.c, server.h, utils.c: Update copyright years.
10020
10021 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
10022
10023 * server.c (main): Print child status or termination signal from
10024 variable 'signal', not 'sig'.
10025
10026 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
10027
10028 * linux-low.c (linux_read_memory): Change return type to
10029 int. Check for and return error from ptrace().
10030 * target.c (read_inferior_memory): Change return type to int. Pass
10031 back return status from the_target->read_memory().
10032 * target.h (struct target_ops): Adapt *read_memory() prototype.
10033 Update comment.
10034 (read_inferior_memory): Adapt prototype.
10035 * server.c (main): Return an error packet if
10036 read_inferior_memory() returns an error.
10037
10038 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
10039
10040 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
10041 Unify with other clean targets.
10042
10043 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
10044
10045 * server.c (handle_v_cont): Call set_desired_inferior.
10046
10047 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
10048
10049 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
10050
10051 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
10052
10053 * linux-low.c (linux_wait): Unblock async I/O.
10054 (linux_resume): Block and enable async I/O.
10055 * remote-utils.c (block_async_io, unblock_async_io): New functions.
10056 * server.h (block_async_io, unblock_async_io): Add prototypes.
10057
10058 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
10059
10060 * remote-utils.c (remote_open): Print a status notice after
10061 opening a TCP port.
10062 * server.c (attach_inferior): Print a status notice after
10063 attaching.
10064
10065 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
10066
10067 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
10068
10069 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
10070
10071 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
10072 error packet.
10073 * server.c, target.h: Update copyright years.
10074
10075 2004-02-25 Roland McGrath <roland@redhat.com>
10076
10077 * target.h (struct target_ops): New member `read_auxv'.
10078 * server.c (handle_query): Handle qPart:auxv:read: query using that.
10079 * linux-low.c (linux_read_auxv): New function.
10080 (linux_target_ops): Initialize `read_auxv' member to that.
10081
10082 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
10083
10084 Committed by Jim Blandy <jimb@redhat.com>.
10085
10086 * linux-s390-low.c (s390_num_regs): Update.
10087 (s390_regmap): Remove control registers. Use __s390x__ predefine
10088 instead of GPR_SIZE to distiguish s390 and s390x targets.
10089
10090 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
10091
10092 * linux-low.c: Update copyright year.
10093 (check_removed_breakpoint): Clear pending_is_breakpoint.
10094 (linux_set_resume_request, linux_queue_one_thread)
10095 (resume_status_pending_p): New functions.
10096 (linux_continue_one_thread): Use process->resume.
10097 (linux_resume): Only resume threads if there are no pending events.
10098 * linux-low.h (struct process_info): Add resume request
10099 pointer.
10100
10101 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
10102
10103 * regcache.c (new_register_cache): Clear the allocated register
10104 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
10105
10106 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
10107
10108 * linux-low.c (linux_resume): Take a struct thread_resume *
10109 argument.
10110 (linux_wait): Update call.
10111 (resume_ptr): New static variable.
10112 (linux_continue_one_thread): Renamed from
10113 linux_continue_one_process. Use resume_ptr.
10114 (linux_resume): Use linux_continue_one_thread.
10115 * server.c (handle_v_cont, handle_v_requests): New functions.
10116 (myresume): New function.
10117 (main): Handle 'v' case.
10118 * target.h (struct thread_resume): New type.
10119 (struct target_ops): Change argument of "resume" to struct
10120 thread_resume *.
10121 (myresume): Delete macro.
10122
10123 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
10124
10125 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
10126 (uninstall): Support DESTDIR.
10127
10128 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
10129
10130 * configure.srv: Add xscale*linux copy of arm*linux entry.
10131
10132 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
10133
10134 * linux-arm-low.c (arm_reinsert_addr): New function.
10135 (the_low_target): Add arm_reinsert_addr.
10136
10137 2003-07-08 Mark Kettenis <kettenis@gnu.org>
10138
10139 * mem-break.c: Remove whitespace at end of file.
10140
10141 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
10142
10143 * configure.in: Check whether we need to prototype strerror.
10144 * server.h: Optionally prototype strerror.
10145 * gdbreplay.c (perror_with_name): Use strerror.
10146 * linux-low.c (linux_attach_lwp): Use strerror.
10147 * utils.c (perror_with_name): Use strerror.
10148 * config.in, configure: Regenerated.
10149
10150 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
10151
10152 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
10153 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
10154
10155 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
10156
10157 * Makefile.in (SFILES): Update.
10158 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
10159 low-sun3.c: Remove files.
10160
10161 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
10162
10163 * linux-low.c: Move comment to linux_thread_alive where it belonged.
10164 (linux_detach_one_process, linux_detach): New functions.
10165 (linux_target_ops): Add linux_detach.
10166 * server.c (main): Handle 'D' packet.
10167 * target.h (struct target_ops): Add "detach" member.
10168 (detach_inferior): Define.
10169
10170 2003-06-13 Mark Kettenis <kettenis@gnu.org>
10171
10172 From Kelley Cook <kelleycook@wideopenwest.com>:
10173 * configure.srv: Accept i[34567]86 variants.
10174
10175 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
10176
10177 * linux-low.c (linux_wait_for_event): Correct comment typos.
10178 (linux_resume_one_process): Call check_removed_breakpoint.
10179 (linux_send_signal): New function.
10180 (linux_target_ops): Add linux_send_signal.
10181 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
10182 of kill.
10183 * target.h (struct target_ops): Add send_signal.
10184
10185 2003-05-29 Jim Blandy <jimb@redhat.com>
10186
10187 * linux-low.c (usr_store_inferior_registers): Transfer buf in
10188 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
10189 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
10190 away part of the register's value.
10191
10192 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
10193
10194 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
10195 (linux_wait_for_event, linux_init_signals): Likewise.
10196
10197 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
10198
10199 * configure.in: Check for stdlib.h.
10200 * configure: Regenerated.
10201 * config.in: Regenerated.
10202
10203 2003-01-04 Andreas Schwab <schwab@suse.de>
10204
10205 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
10206
10207 2003-01-02 Andrew Cagney <ac131313@redhat.com>
10208
10209 * Makefile.in: Remove obsolete code.
10210
10211 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
10212
10213 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
10214 defined(PT_FPR0_HI).
10215
10216 2002-11-17 Stuart Hughes <seh@zee2.com>
10217
10218 * linux-arm-low.c (arm_num_regs): Increase.
10219 (arm_regmap): Include status register.
10220
10221 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
10222
10223 * linux-low.c (register_addr): Remove incorrect -1 check.
10224
10225 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
10226
10227 * linux-low.c (linux_create_inferior): Call setpgid. Return
10228 the new PID.
10229 (unstopped_p, linux_signal_pid): Remove.
10230 (linux_target_ops): Remove linux_signal_pid.
10231 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
10232 global instead of target method.
10233 * target.h (struct target_ops): Remove signal_pid. Update comment
10234 for create_inferior.
10235 * server.c (signal_pid): New variable.
10236 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
10237 gdbserver. Set the child to be the foreground process group.
10238 (attach_inferior): Set signal_pid.
10239
10240 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
10241
10242 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
10243
10244 2002-08-20 Jim Blandy <jimb@redhat.com>
10245
10246 * Makefile.in (LDFLAGS): Allow the configure script to establish a
10247 default for this.
10248
10249 2002-08-01 Andrew Cagney <cagney@redhat.com>
10250
10251 * Makefile.in: Make chill references obsolete.
10252
10253 2002-07-24 Kevin Buettner <kevinb@redhat.com>
10254
10255 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
10256 * configure: Regenerate.
10257 * config.in: Regenerate.
10258
10259 2002-07-09 David O'Brien <obrien@FreeBSD.org>
10260
10261 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
10262 (perror_with_name, remote_close, remote_open, expect, play): Static.
10263
10264 2002-07-04 Michal Ludvig <mludvig@suse.cz>
10265
10266 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
10267 byte offsets instead of an array of indexes.
10268 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
10269
10270 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
10271
10272 * regcache.c: Add comment.
10273
10274 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
10275
10276 * thread-db.c: New file.
10277 * proc-service.c: New file.
10278 * acinclude.m4: New file.
10279 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
10280 proc-service.o, and thread-db.o.
10281 (linux-low.o): Add USE_THREAD_DB.
10282 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
10283 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
10284 * aclocal.m4: Regenerated.
10285 * config.in: Regenerated.
10286 * configure: Regenerated.
10287 * configure.in: Check for proc_service.h, sys/procfs.h,
10288 thread_db.h, and linux/elf.h headrs.
10289 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
10290 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
10291 Check for -lthread_db and thread support.
10292 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
10293 PowerPC, and SuperH.
10294 * i387-fp.c: Constify arguments.
10295 * i387-fp.h: Likewise.
10296 * inferiors.c: (struct thread_info): Renamed from
10297 `struct inferior_info'. Remove PID member. Use generic inferior
10298 list header. All uses updated.
10299 (inferiors, signal_pid): Removed.
10300 (all_threads): New variable.
10301 (get_thread): Define.
10302 (add_inferior_to_list): New function.
10303 (for_each_inferior): New function.
10304 (change_inferior_id): New function.
10305 (add_inferior): Removed.
10306 (remove_inferior): New function.
10307 (add_thread): New function.
10308 (free_one_thread): New function.
10309 (remove_thread): New function.
10310 (clear_inferiors): Use for_each_inferior and free_one_thread.
10311 (find_inferior): New function.
10312 (find_inferior_id): New function.
10313 (inferior_target_data): Update argument type.
10314 (set_inferior_target_data): Likewise.
10315 (inferior_regcache_data): Likewise.
10316 (set_inferior_regcache_data): Likewise.
10317 * linux-low.c (linux_bp_reinsert): Remove.
10318 (all_processes, stopping_threads, using_thrads)
10319 (struct pending_signals, debug_threads, pid_of): New.
10320 (inferior_pid): Replace with macro.
10321 (struct inferior_linux_data): Remove.
10322 (get_stop_pc, add_process): New functions.
10323 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
10324 Use add_process and add_thread.
10325 (linux_attach_lwp): New function, based on old linux_attach. Use
10326 add_process and add_thread. Set stop_expected for new threads.
10327 (linux_attach): New function.
10328 (linux_kill_one_process): New function.
10329 (linux_kill): Kill all LWPs.
10330 (linux_thread_alive): Use find_inferior_id.
10331 (check_removed_breakpoints, status_pending_p): New functions.
10332 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
10333 Update. Use WNOHANG. Wait for cloned processes also. Update process
10334 struct for the found process.
10335 (linux_wait_for_event): New function.
10336 (linux_wait): Use it. Support LWPs.
10337 (send_sigstop, wait_for_sigstop, stop_all_processes)
10338 (linux_resume_one_process, linux_continue_one_process): New functions.
10339 (linux_resume): Support LWPs.
10340 (REGISTER_RAW_SIZE): Remove.
10341 (fetch_register): Use register_size instead. Call supply_register.
10342 (usr_store_inferior_registers): Likewise. Call collect_register.
10343 Fix recursive case.
10344 (regsets_fetch_inferior_registers): Improve error message.
10345 (regsets_store_inferior_registers): Add debugging.
10346 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
10347 (unstopped_p, linux_signal_pid): New functions.
10348 (linux_target_ops): Add linux_signal_pid.
10349 (linux_init_signals): New function.
10350 (initialize_low): Call it. Initialize using_threads.
10351 * regcache.c (inferior_regcache_data): Add valid
10352 flag.
10353 (get_regcache): Fetch registers lazily. Add fetch argument
10354 and update all callers.
10355 (regcache_invalidate_one, regcache_invalidate): New
10356 functions.
10357 (new_register_cache): Renamed from create_register_cache.
10358 Return the new regcache.
10359 (free_register_cache): Change argument to a void *.
10360 (registers_to_string, registers_from_string): Call get_regcache
10361 with fetch flag set.
10362 (register_data): Make static. Pass fetch flag to get_regcache.
10363 (supply_register): Call get_regcache with fetch flag clear.
10364 (collect_register): Call get_regcache with fetch flag set.
10365 (collect_register_as_string): New function.
10366 * regcache.h: Update.
10367 * remote-utils.c (putpkt): Flush after debug output and use
10368 stderr.
10369 Handle input interrupts while waiting for an ACK.
10370 (input_interrupt): Use signal_pid method.
10371 (getpkt): Flush after debug output and use stderr.
10372 (outreg): Use collect_register_as_string.
10373 (new_thread_notify, dead_thread_notify): New functions.
10374 (prepare_resume_reply): Check using_threads. Set thread_from_wait
10375 and general_thread.
10376 (look_up_one_symbol): Flush after debug output.
10377 * server.c (step_thread, server_waiting): New variables.
10378 (start_inferior): Don't use signal_pid. Update call to mywait.
10379 (attach_inferior): Update call to mywait.
10380 (handle_query): Handle qfThreadInfo and qsThreadInfo.
10381 (main): Don't fetch/store registers explicitly. Use
10382 set_desired_inferior. Support proposed ``Hs'' packet. Update
10383 calls to mywait.
10384 * server.h: Update.
10385 (struct inferior_list, struct_inferior_list_entry): New.
10386 * target.c (set_desired_inferior): New.
10387 (write_inferior_memory): Constify.
10388 (mywait): New function.
10389 * target.h: Update.
10390 (struct target_ops): New signal_pid method.
10391 (mywait): Removed macro, added prototype.
10392
10393 * linux-low.h (regset_func): Removed.
10394 (regset_fill_func, regset_store_func): New.
10395 (enum regset_type): New.
10396 (struct regset_info): Add type field. Use new operation types.
10397 (struct linux_target_ops): stop_pc renamed to get_pc.
10398 Add decr_pc_after_break and breakpoint_at.
10399 (get_process, get_thread_proess, get_process_thread)
10400 (strut process_info, all_processes, linux_attach_lwp)
10401 (thread_db_init): New.
10402
10403 * linux-arm-low.c (arm_get_pc, arm_set_pc,
10404 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
10405 (the_low_target): Add new members.
10406 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
10407 (i386_store_fpxregset): Constify.
10408 (target_regsets): Add new kind identifier.
10409 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
10410 (i386_set_pc): Add debugging.
10411 (i386_breakpoint_at): New function.
10412 (the_low_target): Add new members.
10413 * linux-mips-low.c (mips_get_pc, mips_set_pc)
10414 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
10415 (mips_breakpoint_at): New.
10416 (the_low_target): Add new members.
10417 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
10418 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
10419 (the_low_target): Add new members.
10420 * linux-sh-low.c (sh_get_pc, sh_set_pc)
10421 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
10422 (the_low_target): Add new members.
10423 * linux-x86-64-low.c (target_regsets): Add new kind
10424 identifier.
10425
10426 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
10427
10428 From Martin Pool <mbp@samba.org>:
10429 * server.c (gdbserver_usage): New function.
10430 (main): Call it.
10431
10432 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
10433
10434 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
10435 stop_at -> stop_pc.
10436
10437 2002-05-04 Andrew Cagney <ac131313@redhat.com>
10438
10439 * Makefile.in: Remove obsolete code.
10440
10441 2002-04-24 Michal Ludvig <mludvig@suse.cz>
10442
10443 * linux-low.c (regsets_fetch_inferior_registers),
10444 (regsets_store_inferior_registers): Removed cast to int from
10445 ptrace() calls.
10446 * regcache.h: Added declaration of struct inferior_info.
10447
10448 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
10449
10450 * inferiors.c (struct inferior_info): Add regcache_data.
10451 (add_inferior): Call create_register_cache.
10452 (clear_inferiors): Call free_register_cache.
10453 (inferior_regcache_data, set_inferior_regcache_data): New functions.
10454 * regcache.c (struct inferior_regcache_data): New.
10455 (registers): Remove.
10456 (get_regcache): New function.
10457 (create_register_cache, free_register_cache): New functions.
10458 (set_register_cache): Don't initialize the register cache here.
10459 (registers_to_string, registers_from_string, register_data): Call
10460 get_regcache.
10461 * regcache.h: Add prototypes.
10462 * server.h: Likewise.
10463
10464 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
10465
10466 * mem-break.c: New file.
10467 * mem-break.h: New file.
10468 * Makefile.in: Add mem-break.o rule; update server.h
10469 dependencies.
10470 * inferiors.c (struct inferior_info): Add target_data
10471 member.
10472 (clear_inferiors): Free target_data member if set.
10473 (inferior_target_data, set_inferior_target_data): New functions.
10474 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
10475 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
10476 * linux-low.c (linux_bp_reinsert): New variable.
10477 (struct inferior_linux_data): New.
10478 (linux_create_inferior): Use set_inferior_target_data.
10479 (linux_attach): Likewise. Call add_inferior.
10480 (linux_wait_for_one_inferior): New function.
10481 (linux_wait): Call it.
10482 (linux_write_memory): Add const.
10483 (initialize_low): Call set_breakpoint_data.
10484 * linux-low.h (struct linux_target_ops): Add breakpoint
10485 handling members.
10486 * server.c (attach_inferior): Remove extra add_inferior
10487 call.
10488 * server.h: Include mem-break.h. Update inferior.c
10489 prototypes.
10490 * target.c (read_inferior_memory)
10491 (write_inferior_memory): New functions.
10492 * target.h (read_inferior_memory)
10493 (write_inferior_memory): Change macros to prototypes.
10494 (struct target_ops): Update comments. Add const to write_memory
10495 definition.
10496
10497 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
10498
10499 * linux-low.c (usr_store_inferior_registers): Support
10500 registers which are allowed to fail to store.
10501 * linux-low.h (linux_target_ops): Likewise.
10502 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
10503 (ppc_cannot_store_register): FPSCR may not be storable.
10504
10505 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
10506
10507 * server.h: Include <string.h> if HAVE_STRING_H.
10508 * ChangeLog: Correct paths in last ChangeLog entry.
10509
10510 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
10511
10512 * linux-low.h: Remove obsolete prototypes.
10513 (struct linux_target_ops): New.
10514 (extern the_low_target): New.
10515 * linux-low.c (num_regs, regmap): Remove declarations.
10516 (register_addr): Use the_low_target explicitly.
10517 (fetch_register): Likewise.
10518 (usr_fetch_inferior_registers): Likewise.
10519 (usr_store_inferior_registers): Likewise.
10520 * linux-arm-low.c (num_regs): Remove.
10521 (arm_num_regs): Define.
10522 (arm_regmap): Renamed from regmap, made static.
10523 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
10524 made static.
10525 (arm_cannot_store_register): Renamed from cannot_store_register,
10526 made static.
10527 (the_low_target): New.
10528 * linux-i386-low.c (num_regs): Remove.
10529 (i386_num_regs): Define.
10530 (i386_regmap): Renamed from regmap, made static.
10531 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
10532 made static.
10533 (i386_cannot_store_register): Renamed from cannot_store_register,
10534 made static.
10535 (the_low_target): New.
10536 * linux-ia64-low.c (num_regs): Remove.
10537 (ia64_num_regs): Define.
10538 (ia64_regmap): Renamed from regmap, made static.
10539 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
10540 made static.
10541 (ia64_cannot_store_register): Renamed from cannot_store_register,
10542 made static.
10543 (the_low_target): New.
10544 * linux-m68k-low.c (num_regs): Remove.
10545 (m68k_num_regs): Define.
10546 (m68k_regmap): Renamed from regmap, made static.
10547 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
10548 made static.
10549 (m68k_cannot_store_register): Renamed from cannot_store_register,
10550 made static.
10551 (the_low_target): New.
10552 * linux-mips-low.c (num_regs): Remove.
10553 (mips_num_regs): Define.
10554 (mips_regmap): Renamed from regmap, made static.
10555 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
10556 made static.
10557 (mips_cannot_store_register): Renamed from cannot_store_register,
10558 made static.
10559 (the_low_target): New.
10560 * linux-ppc-low.c (num_regs): Remove.
10561 (ppc_num_regs): Define.
10562 (ppc_regmap): Renamed from regmap, made static.
10563 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
10564 made static.
10565 (ppc_cannot_store_register): Renamed from cannot_store_register,
10566 made static.
10567 (the_low_target): New.
10568 * linux-s390-low.c (num_regs): Remove.
10569 (s390_num_regs): Define.
10570 (s390_regmap): Renamed from regmap, made static.
10571 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
10572 made static.
10573 (s390_cannot_store_register): Renamed from cannot_store_register,
10574 made static.
10575 (the_low_target): New.
10576 * linux-sh-low.c (num_regs): Remove.
10577 (sh_num_regs): Define.
10578 (sh_regmap): Renamed from regmap, made static.
10579 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
10580 made static.
10581 (sh_cannot_store_register): Renamed from cannot_store_register,
10582 made static.
10583 (the_low_target): New.
10584 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
10585 (the_low_target): New.
10586
10587 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
10588
10589 * Makefile.in: Add stamp-h target.
10590 * configure.in: Create stamp-h.
10591 * configure: Regenerated.
10592
10593 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
10594
10595 * inferiors.c: New file.
10596 * target.c: New file.
10597 * target.h: New file.
10598 * Makefile.in: Add target.o and inferiors.o. Update
10599 dependencies.
10600 * linux-low.c (inferior_pid): New static variable,
10601 moved from server.c.
10602 (linux_create_inferior): Renamed from create_inferior.
10603 Call add_inferior. Return 0 on success instead of a PID.
10604 (linux_attach): Renamed from myattach.
10605 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
10606 (linux_thread_alive): Renamed from mythread_alive.
10607 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
10608 child dies.
10609 (linux_resume): Renamed from myresume. Add missing ``return 0''.
10610 (regsets_store_inferior_registers): Correct error message.
10611 Add missing ``return 0''.
10612 (linux_fetch_registers): Renamed from fetch_inferior_registers.
10613 (linux_store_registers): Renamed from store_inferior_registers.
10614 (linux_read_memory): Renamed from read_inferior_memory.
10615 (linux_write_memory): Renamed from write_inferior_memory.
10616 (linux_target_ops): New structure.
10617 (initialize_low): Call set_target_ops ().
10618 * remote-utils.c (unhexify): New function.
10619 (hexify): New function.
10620 (input_interrupt): Send signals to ``signal_pid''.
10621 * server.c (inferior_pid): Remove.
10622 (start_inferior): Update create_inferior call.
10623 (attach_inferior): Call add_inferior.
10624 (handle_query): New function.
10625 (main): Call handle_query for `q' packets.
10626 * server.h: Include "target.h". Remove obsolete prototypes.
10627 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
10628
10629 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
10630
10631 * Makefile.in: Add WARN_CFLAGS. Update configury
10632 dependencies.
10633 * configure.in: Check for <string.h>
10634 * configure: Regenerate.
10635 * config.in: Regenerate.
10636 * gdbreplay.c: Include needed system headers.
10637 (remote_open): Remove strchr prototype.
10638 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
10639 * regcache.c (supply_register): Change buf argument to const void *.
10640 (supply_register_by_name): Likewise.
10641 (collect_register): Change buf argument to void *.
10642 (collect_register_by_name): Likewise.
10643 * regcache.h: Add missing prototypes.
10644 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
10645 * server.c (handle_query): New function.
10646 (attached): New static variable, moved out of main.
10647 (main): Quiet longjmp clobber warnings.
10648 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
10649 * utils.c (error): Remove NORETURN.
10650 (fatal): Likewise.
This page took 0.275427 seconds and 4 git commands to generate.