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