btrace, linux: add perf event buffer abstraction
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
043c3577
MM
12015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2
3 * server.c (handle_btrace_general_set): Remove call to
4 target_supports_btrace.
5 (supported_btrace_packets): New.
6 (handle_query): Call supported_btrace_packets.
7 * target.h: include btrace-common.h.
8 (btrace_target_info): Removed.
9 (supports_btrace, target_supports_btrace): Update parameters.
10
734b0e4b
MM
112015-02-09 Markus Metzger <markus.t.metzger@intel.com>
12
13 * Makefile.in (SFILES): Add common/btrace-common.c.
14 (OBS): Add common/btrace-common.o.
15 (btrace-common.o): Add build rules.
16 * linux-low: Include btrace-common.h.
17 (linux_low_read_btrace): Use struct btrace_data. Call
18 btrace_data_init and btrace_data_fini.
19
d6c146e9
PA
202015-02-06 Pedro Alves <palves@redhat.com>
21
22 * thread-db.c (find_new_threads_callback): Add debug output.
23
20ba1ce6
PA
242015-02-04 Pedro Alves <palves@redhat.com>
25
26 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
27 (resume_stopped_resumed_lwps): New function.
28 (linux_wait_for_event_filtered): Use it.
29
8cc73a39
SDJ
302015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
31
32 * Makefile.in (SFILES): Add linux-personality.c.
33 (linux-personality.o): New rule.
34 * configure.srv (srv_linux_obj): Add linux-personality.o to the
35 list of objects to be built.
36 * linux-low.c: Include nat/linux-personality.h.
37 (linux_create_inferior): Remove code to disable address space
38 randomization (moved to ../nat/linux-personality.c). Create
39 cleanup to disable address space randomization.
40
fb23d554
SDJ
412015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
42
43 * Makefile.in (posix-strerror.o): New rule.
44 (mingw-strerror.o): Likewise.
45 * configure: Regenerated.
46 * configure.ac: Source file ../common/common.host. Initialize new
47 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
48
cdf43629
YQ
492015-01-14 Yao Qi <yao@codesourcery.com>
50
51 * Makefile.in (SFILES): Add nat/ppc-linux.c.
52 (ppc-linux.o): New rule.
53 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
54 * configure.ac: AC_CHECK_FUNCS(getauxval).
55 * config.in: Re-generated.
56 * configure: Re-generated.
57 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
58 ppc64_64bit_inferior_p
59
514c5338
YQ
602015-01-14 Yao Qi <yao@codesourcery.com>
61
62 * linux-ppc-low.c: Include "nat/ppc-linux.h".
63 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
64 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
65 (PT_ORIG_R3, PT_TRAP): Likewise.
66 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
67 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
68 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
69
3368c1e5
JB
702015-01-10 Joel Brobecker <brobecker@adacore.com>
71
72 * i387-fp.c (i387_cache_to_xsave): In look over
73 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
74 zmmh_low_space field by use of zmmh_high_space.
75
582511be
PA
762015-01-09 Pedro Alves <palves@redhat.com>
77
78 * linux-low.c (step_over_bkpt): Move higher up in the file.
79 (handle_extended_wait): Don't store the stop_pc here.
80 (get_stop_pc): Adjust comments and rename to ...
81 (check_stopped_by_breakpoint): ... this. Record whether the LWP
82 stopped for a software breakpoint or hardware breakpoint.
83 (thread_still_has_status_pending_p): New function.
84 (status_pending_p_callback): Use
85 thread_still_has_status_pending_p. If the event is no longer
86 interesting, resume the LWP.
87 (handle_tracepoints): Add assert.
88 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
89 (wstatus_maybe_breakpoint): New function.
90 (cancel_breakpoint): Delete function.
91 (check_stopped_by_watchpoint): New function, factored out from
92 linux_low_filter_event.
93 (lp_status_maybe_breakpoint): Delete function.
94 (linux_low_filter_event): Remove filter_ptid argument.
95 Leave thread group exits pending here. Store the LWP's stop PC.
96 Always leave events pending.
97 (linux_wait_for_event_filtered): Pull all events out of the
98 kernel, and leave them all pending.
99 (count_events_callback, select_event_lwp_callback): Consider all
100 events.
101 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
102 (select_event_lwp): Only give preference to the stepping LWP in
103 all-stop mode. Adjust comments.
104 (ignore_event): New function.
105 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
106 references to cancel_breakpoints. Adjust to renames. Also give
107 equal priority to all LWPs that have had events in non-stop mode.
108 If reporting a software breakpoint event, unadjust the LWP's PC.
109 (linux_wait): If linux_wait_1 returned an ignored event, retry.
110 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
111 Adjust.
112 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
113 (resume_status_pending_p): Use thread_still_has_status_pending_p.
114 (linux_stopped_by_watchpoint): Adjust.
115 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
116 * linux-low.h (enum lwp_stop_reason): New.
117 (struct lwp_info) <stop_pc>: Adjust comment.
118 <stopped_by_watchpoint>: Delete field.
119 <stop_reason>: New field.
120 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
121 * mem-break.c (software_breakpoint_inserted_here)
122 (hardware_breakpoint_inserted_here): New function.
123 * mem-break.h (software_breakpoint_inserted_here)
124 (hardware_breakpoint_inserted_here): Declare.
125 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
126 (cancel_breakpoints): Delete.
127 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
128 (upload_fast_traceframes): Remove references to
129 cancel_breakpoints.
130
a33e3959
PA
1312015-01-09 Pedro Alves <palves@redhat.com>
132
133 * thread-db.c (find_new_threads_callback): Ignore thread if the
134 kernel thread ID is -1.
135
8784d563
PA
1362015-01-09 Pedro Alves <palves@redhat.com>
137
138 * linux-low.c (linux_attach_fail_reason_string): Move to
139 nat/linux-ptrace.c, and rename.
140 (linux_attach_lwp): Update comment.
141 (attach_proc_task_lwp_callback): New function.
142 (linux_attach): Adjust to rename and use
143 linux_proc_attach_tgid_threads.
144 (linux_attach_fail_reason_string): Delete declaration.
145
76f2b779
JB
1462015-01-01 Joel Brobecker <brobecker@adacore.com>
147
148 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
149 * server.c (gdbserver_version): Likewise.
150
fafcc06a
SDJ
1512014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
152
153 * remote-utils.c: Include ctype.h.
154 (input_interrupt): Explicitly handle the case when the char
155 received is the NUL byte. Improve the printing of non-ASCII
156 characters.
157
beed38b8
JB
1582014-12-16 Joel Brobecker <brobecker@adacore.com>
159
160 * linux-low.c (linux_low_filter_event): Update call to
161 linux_enable_event_reporting following the addition of
162 a new parameter to that function.
163
bf330350
CU
1642014-12-16 Catalin Udma <catalin.udma@freescale.com>
165
166 PR server/17457
167 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
168 (AARCH64_FPCR_REGNO): Likewise.
169 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
170 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
171 (aarch64_store_fpregset): Likewise.
172
5227d625
JB
1732014-12-15 Joel Brobecker <brobecker@adacore.com>
174
175 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
176 Remove FIXME comment about assumption about N.
177
f93b65a0
JB
1782014-12-13 Joel Brobecker <brobecker@adacore.com>
179
180 * configure.ac: If large-file support is disabled in GDBserver,
181 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
182 * configure: Regenerate.
183
e5a9158d
AA
1842014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
185
186 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
187 warning upon ENODATA from ptrace.
188 * linux-s390-low.c (s390_store_tdb): New.
189 (s390_regsets): Add regset for NT_S390_TDB.
190
feea5f36
AA
1912014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
192
193 * linux-low.c (regsets_store_inferior_registers): Skip regsets
194 without a fill_function.
195 * linux-s390-low.c (s390_fill_last_break): Remove.
196 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
197 (s390_arch_setup): Use regset's size instead of fill_function for
198 loop end condition.
199
098dbe61
AA
2002014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
201
202 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
203 the regset's store function when ptrace returned an error.
204 * regcache.c (get_thread_regcache): Invalidate register cache
205 before fetching inferior's registers.
206
28eef672
AA
2072014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
208
209 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
210 while-loop as for-loop.
211 (regsets_store_inferior_registers): Likewise.
212
bdca27a2
YQ
2132014-11-28 Yao Qi <yao@codesourcery.com>
214
215 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
216 * config.in, configure: Re-generate.
217 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
218 is defined.
219
9c232dda
YQ
2202014-11-21 Yao Qi <yao@codesourcery.com>
221
222 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
223 (AC_CHECK_HEADERS): Remove malloc.h.
224 * configure: Re-generated.
225 * config.in: Re-generated.
226 * server.h: Don't include alloca.h and malloc.h.
227 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
228 Don't include malloc.h.
229
43968415
JB
2302014-11-17 Joel Brobecker <brobecker@adacore.com>
231
232 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
233 corresponding ERRNO check in same block.
234
40e91bc7
PA
2352014-11-12 Pedro Alves <palves@redhat.com>
236
237 * server.c (cont_thread): Update comment.
238 (start_inferior, attach_inferior): No longer clear cont_thread.
239 (handle_v_cont): No longer set cont_thread.
240 (captured_main): Clear cont_thread each time a GDB connects.
241
c2c118cf
PA
2422014-11-12 Pedro Alves <palves@redhat.com>
243
244 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
245 thread, and don't resume all threads if the Hc thread has exited.
246
78708b7c
PA
2472014-11-12 Pedro Alves <palves@redhat.com>
248
249 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
250 the process group instead of to a specific LWP.
251
a2abc7de
PA
2522014-10-15 Pedro Alves <palves@redhat.com>
253
254 PR server/17487
255 * win32-arm-low.c (arm_set_thread_context): Remove current_event
256 parameter.
257 (arm_set_thread_context): Delete.
258 (the_low_target): Adjust.
259 * win32-i386-low.c (debug_registers_changed)
260 (debug_registers_used): Delete.
261 (update_debug_registers_callback): New function.
262 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
263 needing to update their debug registers.
264 (win32_get_current_dr): New function.
265 (x86_dr_low_get_addr, x86_dr_low_get_control)
266 (x86_dr_low_get_status): Fetch the debug register from the thread
267 record's context.
268 (i386_initial_stuff): Adjust.
269 (i386_get_thread_context): Remove current_event parameter. Don't
270 clear debug_registers_changed nor copy DR values to
271 debug_reg_state.
272 (i386_set_thread_context): Delete.
273 (i386_prepare_to_resume): New function.
274 (i386_thread_added): Mark the thread as needing to update irs
275 debug registers.
276 (the_low_target): Remove i386_set_thread_context and install
277 i386_prepare_to_resume.
278 * win32-low.c (win32_get_thread_context): Adjust.
279 (win32_set_thread_context): Use SetThreadContext
280 directly.
281 (win32_prepare_to_resume): New function.
282 (win32_require_context): New function, factored out from ...
283 (thread_rec): ... this.
284 (continue_one_thread): Call win32_prepare_to_resume on each thread
285 we're about to continue.
286 (win32_resume): Call win32_prepare_to_resume on the event thread.
287 * win32-low.h (struct win32_thread_info)
288 <debug_registers_changed>: New field.
289 (struct win32_target_ops): Change prototype of set_thread_context,
290 delete set_thread_context and add prepare_to_resume.
291 (win32_require_context): New declaration.
292
a442d071
GB
2932014-10-08 Gary Benson <gbenson@redhat.com>
294
295 * server.h: Do not include common-exceptions.h.
296
6f1947e8
GB
2972014-10-08 Gary Benson <gbenson@redhat.com>
298
299 * server.h: Do not include cleanups.h.
300
63b434a4
JH
3012014-09-30 James Hogan <james.hogan@imgtec.com>
302
303 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
304 mips64-dsp-linux.c.
305
c4d9ceb6
YQ
3062014-09-23 Yao Qi <yao@codesourcery.com>
307
308 * linux-low.c (lp_status_maybe_breakpoint): New function.
309 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
310 (count_events_callback): Likewise.
311 (select_event_lwp_callback): Likewise.
312 (cancel_breakpoints_callback): Likewise.
313
89a5711c
DB
3142014-09-19 Don Breazeal <donb@codesourcery.com>
315
316 * linux-low.c (handle_extended_wait): Call
317 linux_ptrace_get_extended_event.
318 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
319 linux_is_extended_waitstatus.
320
bffc0964
JB
3212014-09-16 Joel Brobecker <brobecker@adacore.com>
322
323 * Makefile.in (CPPFLAGS): Define.
324 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
325 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
326
0bfdf32f
GB
3272014-09-16 Gary Benson <gbenson@redhat.com>
328
329 * inferiors.h (current_inferior): Renamed as...
330 (current_thread): New variable. All uses updated.
331 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
332 (maybe_move_out_of_jump_pad): Likewise.
333 (cancel_breakpoint): Likewise.
334 (linux_low_filter_event): Likewise.
335 (wait_for_sigstop): Likewise.
336 (linux_resume_one_lwp): Likewise.
337 (need_step_over_p): Likewise.
338 (start_step_over): Likewise.
339 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
340 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
341 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
342 and save_inferior as saved_thread.
343 * regcache.c (get_thread_regcache): Renamed saved_inferior as
344 saved_thread.
345 (regcache_invalidate_thread): Likewise.
346 * remote-utils.c (prepare_resume_reply): Likewise.
347 * thread-db.c (thread_db_get_tls_address): Likewise.
348 (disable_thread_event_reporting): Likewise.
349 (remove_thread_event_breakpoints): Likewise.
350 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
351 as saved_thread.
352 * target.h (set_desired_inferior): Renamed as...
353 (set_desired_thread): New declaration. All uses updated.
354 * server.c (myresume): Updated comment to reference thread instead
355 of inferior.
356 (handle_serial_event): Likewise.
357 (handle_target_event): Likewise.
358
361c8ade
GB
3592014-09-12 Tom Tromey <tromey@redhat.com>
360 Gary Benson <gbenson@redhat.com>
361
362 * regcache.h: Include common-regcache.h.
363 (regcache_read_pc): Don't declare.
364 * regcache.c (get_thread_regcache_for_ptid): New function.
365
bd9269f7
GB
3662014-09-11 Tom Tromey <tromey@redhat.com>
367 Gary Benson <gbenson@redhat.com>
368
369 * symbol.c: New file.
370 * Makefile.in (SFILES): Add symbol.c.
371 (OBS): Add symbol.o.
372
f8c1d06b
GB
3732014-09-11 Gary Benson <gbenson@redhat.com>
374
375 * target.c (target_stop_ptid, target_continue_ptid): New
376 functions.
377
721ec300
GB
3782014-09-11 Tom Tromey <tromey@redhat.com>
379 Gary Benson <gbenson@redhat.com>
380
381 * target.h: Include target/target.h.
382 * target.c (target_read_memory, target_read_uint32)
383 (target_write_memory): New functions.
384
c5e92cca
GB
3852014-09-11 Gary Benson <gbenson@redhat.com>
386
387 * server.h (debug_hw_points): Don't declare.
388 * server.c (debug_hw_points): Don't define. Replace all uses
389 with show_debug_regs.
390 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
391 all uses with show_debug_regs.
392
2e4bb98a
EBM
3932014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
394
395 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
396 endianness into account.
397 (ppc_supply_ptrace_register): Likewise.
398
ac740bc7
JH
3992014-09-03 James Hogan <james.hogan@imgtec.com>
400
401 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
402 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
403
97ea6506
GB
4042014-09-03 Gary Benson <gbenson@redhat.com>
405
406 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
407 ALL_DEBUG_ADDRESS_REGISTERS.
408
df7e5265
GB
4092014-09-02 Gary Benson <gbenson@redhat.com>
410
411 * i386-low.h: Renamed as...
412 * x86-low.h: New file. All type, function and variable name
413 prefixes changed from "i386_" to "x86_". All references updated.
414 * i386-low.c: Renamed as...
415 * x86-low.c: New file. All type, function and variable name
416 prefixes changed from "i386_" to "x86_". All references updated.
417
ed859da7
GB
4182014-09-02 Gary Benson <gbenson@redhat.com>
419
420 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
421 (x86_linux_new_thread): Likewise.
422
860789c7
GB
4232014-08-29 Gary Benson <gbenson@redhat.com>
424
425 * server.h (setjmp.h): Do not include.
426 (toplevel): Do not declare.
427 (common-exceptions.h): Include.
428 (cleanups.h): Likewise.
429 * server.c (toplevel): Do not define.
430 (exit_code): New static global.
431 (detach_or_kill_for_exit_cleanup): New function.
432 (main): New function. Original main renamed to...
433 (captured_main): New function.
434 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
435
ff55e1b5
GB
4362014-08-29 Gary Benson <gbenson@redhat.com>
437
438 * Makefile.in (SFILES): Add common/common-exceptions.c.
439 (OBS): Add common-exceptions.o.
440 (common-exceptions.o): New rule.
441 * utils.c (prepare_to_throw_exception): New function.
442
e9bcb658
GB
4432014-08-29 Gary Benson <gbenson@redhat.com>
444
445 * config.in: Regenerate.
446 * configure: Likewise.
447
e3180625
GB
4482014-08-29 Gary Benson <gbenson@redhat.com>
449
450 * Makefile.in (SFILES): Add common/cleanups.c.
451 (OBS): cleanups.o.
452 (cleanups.o): New rule.
453
e3d6ba5d
GB
4542014-08-29 Gary Benson <gbenson@redhat.com>
455
456 * utils.c (internal_vwarning): New function.
457
7096e886
GB
4582014-08-28 Gary Benson <gbenson@redhat.com>
459
460 * utils.h (fatal): Remove declaration.
461 * utils.c (fatal): Remove function.
462
14ce3192
GB
4632014-08-28 Gary Benson <gbenson@redhat.com>
464
465 * tracepoint.c (gdb_agent_init): Replace fatal with
466 perror_with_name.
467 (initialize_tracepoint): Likewise.
468
50278d59
GB
4692014-08-28 Gary Benson <gbenson@redhat.com>
470
471 * remote-utils.c (remote_prepare): Replace fatal with error.
472
aa96c426
GB
4732014-08-28 Gary Benson <gbenson@redhat.com>
474
475 * linux-low.c (linux_async): Replace fatal with warning.
476 Tidy up and return.
477 (linux_start_non_stop): Return -1 if linux_async failed.
478
f7160e97
GB
4792014-08-28 Gary Benson <gbenson@redhat.com>
480
481 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
482 gdb_assert.
483 (i386_dr_low_get_addr): Remove vague comment.
484 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
485 gdb_assert.
486
38e08fca
GB
4872014-08-28 Gary Benson <gbenson@redhat.com>
488
489 * inferiors.c (get_thread_process): Replace check with gdb_assert.
490 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
491 internal_error.
492 (linux_resume_one_lwp): Likewise.
493 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
494 gdb_assert.
495 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
496 with internal_error.
497 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
498 (init_register_cache): Replace fatal with gdb_assert_not_reached.
499 (find_register_by_name): Replace fatal with internal_error.
500 (find_regno): Likewise.
501 * tdesc.c (init_target_desc): Replace check with gdb_assert.
502 * thread-db.c (thread_db_create_event): Likewise.
503 (thread_db_load_search): Likewise.
504 (try_thread_db_load_1): Likewise.
505 * tracepoint.c (get_jump_space_head): Replace fatal with
506 internal_error.
507 (claim_trampoline_space): Likewise.
508 (have_fast_tracepoint_trampoline_buffer): Likewise.
509 (cmd_qtstart): Likewise.
510 (stop_tracing): Likewise.
511 (fast_tracepoint_collecting): Likewise.
512 (target_malloc): Likewise.
513 (download_tracepoint): Likewise.
514 (download_trace_state_variables): Replace check with gdb_assert.
515 (upload_fast_traceframes): Replace fatal with internal_error.
516
34abf635
GB
5172014-08-19 Tom Tromey <tromey@redhat.com>
518 Gary Benson <gbenson@redhat.com>
519
520 * Makefile.in (SFILES): Add common/common-debug.c.
521 (OBS): Add common-debug.o.
522 (common-debug.o): New rule.
523 * debug.h (debug_printf): Don't declare.
524 * debug.c (debug_printf): Renamed and rewritten as...
525 (debug_vprintf): New function.
526
f6e94d78
GB
5272014-08-19 Gary Benson <gbenson@redhat.com>
528
529 * utils.h: Do not include print-utils.h.
530
9239eeab
GB
5312014-08-19 Tom Tromey <tromey@redhat.com>
532 Gary Benson <gbenson@redhat.com>
533
534 * server.h: Add static assertion.
535 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
536
ef87c8bb
GB
5372014-08-19 Tom Tromey <tromey@redhat.com>
538 Gary Benson <gbenson@redhat.com>
539
540 * Makefile.in (SFILES): Add common/errors.c.
541 (OBS): Add errors.o.
542 (IPA_OBS): Add errors-ipa.o.
543 (errors.o): New rule.
544 (errors-ipa.o): Likewise.
545 * utils.h (perror_with_name, error, warning): Don't declare.
546 * utils.c (warning): Renamed and rewritten as...
547 (vwarning): New function.
548 (error): Renamed and rewritten as...
549 (verror): New function.
550 (internal_error): Renamed and rewritten as...
551 (internal_verror): New function.
552
bb974a24
GB
5532014-08-07 Gary Benson <gbenson@redhat.com>
554
555 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
556 * configure: Regenerate.
557 * config.in: Likewise.
558 * server.h: Do not include errno.h.
559 * event-loop.c: Likewise.
560 * hostio-errno.c: Likewise.
561 * linux-low.c: Likewise.
562 * remote-utils.c: Likewise.
563 * spu-low.c: Likewise.
564 * utils.c: Likewise.
565 * gdbreplay.c: Unconditionally include errno.h.
566
6d3d12eb
GB
5672014-08-07 Gary Benson <gbenson@redhat.com>
568
569 * server.h: Do not include string.h.
570 * event-loop.c: Likewise.
571 * linux-low.c: Likewise.
572 * regcache.c: Likewise.
573 * remote-utils.c: Likewise.
574 * spu-low.c: Likewise.
575 * utils.c: Likewise.
576
dccbb609
GB
5772014-08-07 Gary Benson <gbenson@redhat.com>
578
579 * server.h: Do not include gdb_assert.h.
580
e76df0d0
GB
5812014-08-07 Gary Benson <gbenson@redhat.com>
582
583 * server.h: Do not include common-utils.h.
584
4cb9c816
GB
5852014-08-07 Gary Benson <gbenson@redhat.com>
586
587 * server.h: Do not include ptid.h.
588 * notif.h: Likewise.
589
3995eeee
GB
5902014-08-07 Gary Benson <gbenson@redhat.com>
591
592 * server.h: Do not include gdb_locale.h.
593
cb9f1a9b
GB
5942014-08-07 Gary Benson <gbenson@redhat.com>
595
596 * server.h: Do not include gdb/signals.h.
597 * win32-low.c: Likewise.
598
a5fceff8
GB
5992014-08-07 Gary Benson <gbenson@redhat.com>
600
601 * server.h: Do not include pathmax.h.
602
b9391142
GB
6032014-08-07 Gary Benson <gbenson@redhat.com>
604
605 * server.h: Do not include libiberty.h.
606 * linux-bfin-low.c: Likewise.
607
0e443c87
GB
6082014-08-07 Gary Benson <gbenson@redhat.com>
609
610 * server.h: Do not include ansidecl.h.
611
8ebb3f56
GB
6122014-08-07 Gary Benson <gbenson@redhat.com>
613
614 * linux-x86-low.c: Do not include stddef.h.
615 * lynx-ppc-low.c: Likewise.
616 * tracepoint.c: Likewise.
617
8980bdf6
GB
6182014-08-07 Gary Benson <gbenson@redhat.com>
619
620 * server.h: Do not include stdarg.h.
621 * nto-low.c: Likewise.
622
d7096f71
GB
6232014-08-07 Gary Benson <gbenson@redhat.com>
624
625 * server.h: Do not include stdlib.h.
626 * inferiors.c: Likewise.
627 * linux-low.c: Likewise.
628 * regcache.c: Likewise.
629 * spu-low.c: Likewise.
630 * tracepoint.c: Likewise.
631 * utils.c: Likewise.
632
d02f550d
GB
6332014-08-07 Gary Benson <gbenson@redhat.com>
634
635 * server.h: Do not include stdio.h.
636 * linux-low.c: Likewise.
637 * remote-utils.c: Likewise.
638 * spu-low.c: Likewise.
639 * utils.c: Likewise.
640 * wincecompat.c: Likewise.
641
87f6c4e3
GB
6422014-08-06 Gary Benson <gbenson@redhat.com>
643
644 * regcache.c (init_register_cache): Move conditionals inside if.
645
7089dca4
GB
6462014-08-06 Gary Benson <gbenson@redhat.com>
647
648 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
649
462f517e
GB
6502014-07-31 Gary Benson <gbenson@redhat.com>
651
652 * ax.h: Do not include server.h.
653 * gdbthread.h: Likewise.
654 * lynx-low.h: Likewise.
655 * notif.h: Likewise.
656
976411d6
GB
6572014-07-30 Gary Benson <gbenson@redhat.com>
658
659 * server.h: Include common-defs.h.
660 Do not include config.h or build-gnulib-gdbserver/config.h.
661
d41f6d8e
GB
6622014-07-30 Gary Benson <gbenson@redhat.com>
663
664 * hostio-errno.c: Move server.h to top of includes list.
665 * inferiors.c: Likewise.
666 * linux-x86-low.c: Likewise.
667 * notif.c: Include server.h.
668
314c6a35
TT
6692014-07-24 Tom Tromey <tromey@redhat.com>
670 Gary Benson <gbenson@redhat.com>
671
672 * server.h (CORE_ADDR): Now unsigned.
673
69ff6be5
PA
6742014-07-16 Pedro Alves <palves@redhat.com>
675
676 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
677
ce9e3fe7
PA
6782014-07-15 Pedro Alves <palves@redhat.com>
679
680 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
681 copy.
682
e76126e8
PA
6832014-07-11 Pedro Alves <palves@redhat.com>
684
685 * linux-low.c (kill_wait_lwp): New function, based on
686 kill_one_lwp_callback, but use my_waitpid directly.
687 (kill_one_lwp_callback, linux_kill): Use it.
688
8e9db26e
PA
6892014-06-23 Pedro Alves <palves@redhat.com>
690
691 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
692 before setting DR0..DR3.
693
698b3e08
GB
6942014-06-20 Gary Benson <gbenson@redhat.com>
695
696 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
697 * configure: Regenerated.
698 * config.in: Likewise.
699
125f8a3d
GB
7002014-06-20 Gary Benson <gbenson@redhat.com>
701
702 * Makefile.in (SFILES): Update locations for files moved
703 from common to nat.
704 (object file files): Reordered.
705
42995dbd
GB
7062014-06-20 Gary Benson <gbenson@redhat.com>
707
708 * i386-low.h (i386_dr_low_can_set_addr): Removed.
709 (i386_dr_low_set_addr): Likewise.
710 (i386_dr_low_get_addr): Likewise.
711 (i386_dr_low_can_set_control): Likewise.
712 (i386_dr_low_set_control): Likewise.
713 (i386_dr_low_get_control): Likewise.
714 (i386_dr_low_get_status): Likewise.
715 (i386_get_debug_register_length): Likewise.
716 * linux-x86-low.c (i386_dr_low_set_addr):
717 Changed signature. Made static.
718 (i386_dr_low_get_addr): Likewise.
719 (i386_dr_low_set_control): Likewise.
720 (i386_dr_low_get_control): Likewise.
721 (i386_dr_low_get_status): Likewise.
722 (i386_dr_low): New global variable.
723 * win32-i386-low.c (i386_dr_low_set_addr):
724 Changed signature. Made static.
725 (i386_dr_low_get_addr): Likewise.
726 (i386_dr_low_set_control): Likewise.
727 (i386_dr_low_get_control): Likewise.
728 (i386_dr_low_get_status): Likewise.
729 (i386_dr_low): New global variable.
730
e1d2394b
MS
7312014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
732
733 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
734 * Makefile.in (AR, AR_FLAGS): Define.
735 * configure: Regenerate.
736
3a8ee006
GB
7372014-06-19 Gary Benson <gbenson@redhat.com>
738
739 * Makefile.in (i386-dregs.o): New rule.
740 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
741 * i386-low.c (target.h): Remove include.
742 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
743 (DR_CONTROL_SHIFT): Likewise.
744 (DR_CONTROL_SIZE): Likewise.
745 (DR_RW_EXECUTE): Likewise.
746 (DR_RW_WRITE): Likewise.
747 (DR_RW_READ): Likewise.
748 (DR_RW_IORW): Likewise.
749 (DR_LEN_1): Likewise.
750 (DR_LEN_2): Likewise.
751 (DR_LEN_4): Likewise.
752 (DR_LEN_8): Likewise.
753 (DR_LOCAL_ENABLE_SHIFT): Likewise.
754 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
755 (DR_ENABLE_SIZE): Likewise.
756 (DR_LOCAL_SLOWDOWN): Likewise.
757 (DR_GLOBAL_SLOWDOWN): Likewise.
758 (DR_CONTROL_RESERVED): Likewise.
759 (I386_DR_CONTROL_MASK): Likewise.
760 (I386_DR_VACANT): Likewise.
761 (I386_DR_LOCAL_ENABLE): Likewise.
762 (I386_DR_GLOBAL_ENABLE): Likewise.
763 (I386_DR_DISABLE): Likewise.
764 (I386_DR_SET_RW_LEN): Likewise.
765 (I386_DR_GET_RW_LEN): Likewise.
766 (I386_DR_WATCH_HIT): Likewise.
767 (i386_wp_op_t): Likewise.
768 (i386_show_dr): Likewise.
769 (i386_length_and_rw_bits): Likewise.
770 (i386_insert_aligned_watchpoint): Likewise.
771 (i386_remove_aligned_watchpoint): Likewise.
772 (i386_handle_nonaligned_watchpoint): Likewise.
773 i386_update_inferior_debug_regs(): Likewise.
774 (i386_dr_insert_watchpoint): Likewise.
775 (i386_dr_remove_watchpoint): Likewise.
776 (i386_dr_region_ok_for_watchpoint): Likewise.
777 (i386_dr_stopped_data_address): Likewise.
778 (i386_dr_stopped_by_watchpoint): Likewise.
779
8f26655c
GB
7802014-06-19 Gary Benson <gbenson@redhat.com>
781
782 * i386-low.c (i386_dr_show): Renamed to
783 i386_show_dr and made static. All uses updated.
784 (i386_dr_length_and_rw_bits): Renamed to
785 i386_length_and_rw_bits and made static.
786 All uses updated.
787 (i386_dr_insert_aligned_watchpoint): Renamed to
788 i386_insert_aligned_watchpoint and made static.
789 All uses updated.
790 (i386_dr_remove_aligned_watchpoint): Renamed to
791 i386_remove_aligned_watchpoint and made static.
792 All uses updated.
793 (i386_dr_update_inferior_debug_regs): Renamed to
794 i386_update_inferior_debug_regs and made static.
795 All uses updated.
796
b9228891
GB
7972014-06-18 Gary Benson <gbenson@redhat.com>
798
5171def3
GB
799 * i386-low.h (i386_dr_low_can_set_addr): New macro.
800 (i386_dr_low_can_set_control): Likewise.
801 (i386_get_debug_register_length): Likewise.
802 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
803 (i386_dr_low_can_set_control): Likewise.
804 (i386_get_debug_register_length): Likewise.
805
8062014-06-17 Gary Benson <gbenson@redhat.com>
807
b9228891
GB
808 * i386-low.h (i386-dregs.h): New include.
809 (DR_FIRSTADDR): Now in i386-dregs.h.
810 (DR_LASTADDR): Likewise.
811 (DR_NADDR): Likewise.
812 (DR_STATUS): Likewise.
813 (DR_CONTROL): Likewise.
814 (i386_debug_reg_state): Likewise.
815 (i386_dr_insert_watchpoint): Likewise.
816 (i386_dr_remove_watchpoint): Likewise.
817 (i386_dr_region_ok_for_watchpoint): Likewise.
818 (i386_dr_stopped_data_address): Likewise.
819 (i386_dr_stopped_by_watchpoint): Likewise.
820 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
821
4be83cc2
GB
8222014-06-18 Gary Benson <gbenson@redhat.com>
823
824 * i386-low.h (i386_low_insert_watchpoint): Renamed to
825 i386_dr_insert_watchpoint.
826 (i386_low_remove_watchpoint): Renamed to
827 i386_dr_remove_watchpoint.
828 (i386_low_region_ok_for_watchpoint): Renamed to
829 i386_dr_region_ok_for_watchpoint.
830 (i386_low_stopped_data_address): Renamed to
831 i386_dr_stopped_data_address.
832 (i386_low_stopped_by_watchpoint): Renamed to
833 i386_dr_stopped_by_watchpoint.
834 * i386-low.c (i386_show_dr): Renamed to
835 i386_dr_show and made nonstatic. All uses updated.
836 (i386_length_and_rw_bits): Renamed to
837 i386_dr_length_and_rw_bits and made nonstatic.
838 All uses updated.
839 (i386_insert_aligned_watchpoint): Renamed to
840 i386_dr_insert_aligned_watchpoint and made nonstatic.
841 All uses updated.
842 (i386_remove_aligned_watchpoint): Renamed to
843 i386_dr_remove_aligned_watchpoint and made nonstatic.
844 All uses updated.
845 (i386_update_inferior_debug_regs): Renamed to
846 i386_dr_update_inferior_debug_regs and made nonstatic.
847 All uses updated.
848 (i386_low_insert_watchpoint): Renamed to
849 i386_dr_insert_watchpoint. All uses updated.
850 (i386_low_remove_watchpoint): Renamed to
851 i386_dr_remove_watchpoint. All uses updated.
852 (i386_low_region_ok_for_watchpoint): Renamed to
853 i386_dr_region_ok_for_watchpoint. All uses updated.
854 (i386_low_stopped_data_address): Renamed to
855 i386_dr_stopped_data_address. All uses updated.
856 (i386_low_stopped_by_watchpoint): Renamed to
857 i386_dr_stopped_by_watchpoint. All uses updated.
858
131aa0d4
GB
8592014-06-18 Gary Benson <gbenson@redhat.com>
860
861 * i386-low.c (i386_dr_low_can_set_addr): New macro.
862 (i386_dr_low_can_set_control): Likewise.
863 (i386_insert_aligned_watchpoint): New check.
864
d9305f7f
GB
8652014-06-18 Gary Benson <gbenson@redhat.com>
866
867 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
868 Renamed to state.
869
e927c9fc
GB
8702014-06-18 Gary Benson <gbenson@redhat.com>
871
872 * i386-low.c (i386_length_and_rw_bits): Use internal_error
873 instead of fatal and error.
874 (i386_handle_nonaligned_watchpoint): Likewise.
875
1b6d4134
GB
8762014-06-18 Gary Benson <gbenson@redhat.com>
877
878 * i386-low.c (i386_get_debug_register_length): New macro.
879 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
880 (i386_show_dr): Use debug_printf instead of fprintf. Use
881 phex to format values.
882
6e62758f
GB
8832014-06-18 Gary Benson <gbenson@redhat.com>
884
885 * i386-low.h: Comment changes.
886 * i386-low.c: Likewise.
887
fc6e2f03
GB
8882014-06-18 Gary Benson <gbenson@redhat.com>
889
890 * i386-low.c: Whitespace changes.
891
f9d1eeed
TT
8922014-06-12 Tom Tromey <tromey@redhat.com>
893
894 * utils.c (freeargv): Remove.
895
0b04e523
TT
8962014-06-12 Tom Tromey <tromey@redhat.com>
897
898 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
899 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
900 (parse_debug_format_options): Likewise.
901 (gdbserver_usage): Likewise.
902 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
903 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
904 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
905 against libiberty.
906 ($(LIBGNU)): Depend on libiberty.
907 (all-lib): Recurse into all subdirs.
908 (install-only): Invoke "install" target in subdirs.
909 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
910 targets.
911 * configure: Rebuild.
912 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
913 for vasprintf, vsnprintf, or gettimeofday.
914 * configure.srv: Don't add safe-ctype.o or lbasename.o to
915 srv_tgtobj.
916
270c9937
JB
9172014-06-05 Joel Brobecker <brobecker@adacore.com>
918
919 * development.sh: Delete.
920 * Makefile.in (config.status): Adjust dependency on development.sh.
921 * configure.ac: Adjust development.sh source call.
922 * configure: Regenerate.
923
0a261ed8
PA
9242014-06-02 Pedro Alves <palves@redhat.com>
925
926 * ax.c (gdb_free_agent_expr): New function.
927 * ax.h (gdb_free_agent_expr): New declaration.
928 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
929 list.
930 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
931 static.
932 (clear_breakpoint_conditions_and_commands): New function.
933 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
934 (clear_breakpoint_conditions_and_commands): New declaration.
935
e9dae05e
RR
9362014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
937
938 * linux-aarch64-low.c (asm/ptrace.h): Include.
939
5876f503
JK
9402014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
941
942 Fix TLS access for -static -pthread.
943 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
944 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
945 (thread_db_load_search, try_thread_db_load_1): Initialize it.
946
802e8e6d
PA
9472014-05-20 Pedro Alves <palves@redhat.com>
948
949 * linux-aarch64-low.c (aarch64_insert_point)
950 (aarch64_remove_point): No longer check whether the type is
951 supported here. Adjust to new interface.
952 (the_low_target): Install aarch64_supports_z_point_type as
953 supports_z_point_type method.
954 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
955 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
956 instead of a Z packet char. Adjust.
957 (arm_supports_z_point_type): New function.
958 (arm_insert_point, arm_remove_point): Adjust to new interface.
959 (the_low_target): Install arm_supports_z_point_type.
960 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
961 (cris_insert_point, cris_remove_point): Adjust to new interface.
962 Don't check whether the type is supported here.
963 (the_low_target): Install cris_supports_z_point_type.
964 * linux-low.c (linux_supports_z_point_type): New function.
965 (linux_insert_point, linux_remove_point): Adjust to new interface.
966 * linux-low.h (struct linux_target_ops) <insert_point,
967 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
968 raw_breakpoint pointer parameter.
969 <supports_z_point_type>: New method.
970 * linux-mips-low.c (mips_supports_z_point_type): New function.
971 (mips_insert_point, mips_remove_point): Adjust to new interface.
972 Use mips_supports_z_point_type.
973 (the_low_target): Install mips_supports_z_point_type.
974 * linux-ppc-low.c (the_low_target): Install NULL as
975 supports_z_point_type method.
976 * linux-s390-low.c (the_low_target): Install NULL as
977 supports_z_point_type method.
978 * linux-sparc-low.c (the_low_target): Install NULL as
979 supports_z_point_type method.
980 * linux-x86-low.c (x86_supports_z_point_type): New function.
981 (x86_insert_point): Adjust to new insert_point interface. Use
982 insert_memory_breakpoint. Adjust to new
983 i386_low_insert_watchpoint interface.
984 (x86_remove_point): Adjust to remove_point interface. Use
985 remove_memory_breakpoint. Adjust to new
986 i386_low_remove_watchpoint interface.
987 (the_low_target): Install x86_supports_z_point_type.
988 * lynx-low.c (lynx_target_ops): Install NULL as
989 supports_z_point_type callback.
990 * nto-low.c (nto_supports_z_point_type): New.
991 (nto_insert_point, nto_remove_point): Adjust to new interface.
992 (nto_target_ops): Install nto_supports_z_point_type.
993 * mem-break.c: Adjust intro comment.
994 (struct raw_breakpoint) <raw_type, size>: New fields.
995 <inserted>: Update comment.
996 <shlib_disabled>: Delete field.
997 (enum bkpt_type) <gdb_breakpoint>: Delete value.
998 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
999 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
1000 (raw_bkpt_type_to_target_hw_bp_type): New function.
1001 (find_enabled_raw_code_breakpoint_at): New function.
1002 (find_raw_breakpoint_at): New type and size parameters. Use them.
1003 (insert_memory_breakpoint): New function, based off
1004 set_raw_breakpoint_at.
1005 (remove_memory_breakpoint): New function.
1006 (set_raw_breakpoint_at): Reimplement.
1007 (set_breakpoint): New, based on set_breakpoint_at.
1008 (set_breakpoint_at): Reimplement.
1009 (delete_raw_breakpoint): Go through the_target->remove_point
1010 instead of assuming memory breakpoints.
1011 (find_gdb_breakpoint_at): Delete.
1012 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
1013 (find_gdb_breakpoint): New function.
1014 (set_gdb_breakpoint_at): Delete.
1015 (z_type_supported): New function.
1016 (set_gdb_breakpoint_1): New function, loosely based off
1017 set_gdb_breakpoint_at.
1018 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
1019 (delete_gdb_breakpoint_at): Delete.
1020 (delete_gdb_breakpoint_1): New function, loosely based off
1021 delete_gdb_breakpoint_at.
1022 (delete_gdb_breakpoint): New function.
1023 (clear_gdb_breakpoint_conditions): Rename to ...
1024 (clear_breakpoint_conditions): ... this. Don't handle a NULL
1025 breakpoint.
1026 (add_condition_to_breakpoint): Make static.
1027 (add_breakpoint_condition): Take a struct breakpoint pointer
1028 instead of an address. Adjust.
1029 (gdb_condition_true_at_breakpoint): Rename to ...
1030 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
1031 z_type parameter.
1032 (gdb_condition_true_at_breakpoint): Reimplement.
1033 (add_breakpoint_commands): Take a struct breakpoint pointer
1034 instead of an address. Adjust.
1035 (gdb_no_commands_at_breakpoint): Rename to ...
1036 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
1037 parameter. Return true if no breakpoint was found. Change debug
1038 output.
1039 (gdb_no_commands_at_breakpoint): Reimplement.
1040 (run_breakpoint_commands): Rename to ...
1041 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
1042 and change return type to boolean.
1043 (run_breakpoint_commands): New function.
1044 (gdb_breakpoint_here): Also check for Z1 breakpoints.
1045 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
1046 breakpoint. Go through the_target->remove_point instead of
1047 assuming memory breakpoint.
1048 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
1049 software and hardware breakpoints.
1050 (reinsert_raw_breakpoint): Go through the_target->insert_point
1051 instead of assuming memory breakpoint.
1052 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
1053 software and hardware breakpoints.
1054 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
1055 Check both software and hardware breakpoints.
1056 (validate_inserted_breakpoint): Assert the breakpoint is a
1057 software breakpoint. Set the inserted flag to -1 instead of
1058 setting shlib_disabled.
1059 (delete_disabled_breakpoints): Adjust.
1060 (validate_breakpoints): Only validate software breakpoints.
1061 Adjust to inserted flag change.
1062 (check_mem_read, check_mem_write): Skip breakpoint types other
1063 than software breakpoints. Adjust to inserted flag change.
1064 * mem-break.h (enum raw_bkpt_type): New enum.
1065 (raw_breakpoint, struct process_info): Forward declare.
1066 (Z_packet_to_target_hw_bp_type): Delete declaration.
1067 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
1068 (set_gdb_breakpoint, delete_gdb_breakpoint)
1069 (clear_breakpoint_conditions): New declarations.
1070 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
1071 (breakpoint_inserted_here): Update comment.
1072 (add_breakpoint_condition, add_breakpoint_commands): Replace
1073 address parameter with a breakpoint pointer parameter.
1074 (gdb_breakpoint_here): Update comment.
1075 (delete_gdb_breakpoint_at): Delete.
1076 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
1077 * server.c (process_point_options): Take a struct breakpoint
1078 pointer instead of an address. Adjust.
1079 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
1080 delete_gdb_breakpoint.
1081 * spu-low.c (spu_target_ops): Install NULL as
1082 supports_z_point_type method.
1083 * target.h: Include mem-break.h.
1084 (struct target_ops) <prepare_to_access_memory>: Update comment.
1085 <supports_z_point_type>: New field.
1086 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
1087 instead of a char. Also take a raw breakpoint pointer.
1088 * win32-arm-low.c (the_low_target): Install NULL as
1089 supports_z_point_type.
1090 * win32-i386-low.c (i386_supports_z_point_type): New function.
1091 (i386_insert_point, i386_remove_point): Adjust to new interface.
1092 (the_low_target): Install i386_supports_z_point_type.
1093 * win32-low.c (win32_supports_z_point_type): New function.
1094 (win32_insert_point, win32_remove_point): Adjust to new interface.
1095 (win32_target_ops): Install win32_supports_z_point_type.
1096 * win32-low.h (struct win32_target_ops):
1097 <supports_z_point_type>: New method.
1098 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
1099 instead of a char. Also take a raw breakpoint pointer.
1100
932539e3
PA
11012014-05-20 Pedro Alves <palves@redhat.com>
1102
1103 * mem-break.h: Include break-common.h.
1104 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
1105 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
1106 (Z_packet_to_target_hw_bp_type): New declaration.
1107 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
1108 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
1109 (Z_PACKET_ACCESS_WP): Delete macros.
1110 (Z_packet_to_hw_type): Delete function.
1111 * i386-low.h: Don't include break-common.h here.
1112 (Z_packet_to_hw_type): Delete declaration.
1113 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
1114 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
1115 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
1116 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
1117 * linux-aarch64-low.c: Don't include break-common.h here.
1118 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
1119 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
1120 (Z_packet_to_target_hw_bp_type): Delete function.
1121 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
1122 function.
1123 (mips_insert_point, mips_remove_point): Use
1124 Z_packet_to_target_hw_bp_type.
1125
4ff0d3d8
PA
11262014-05-20 Pedro Alves <palves@redhat.com>
1127
1128 * linux-aarch64-low.c: Include break-common.h.
1129 (enum target_point_type): Delete.
1130 (Z_packet_to_point_type): Rename to ...
1131 (Z_packet_to_target_hw_bp_type): ... this, and return a
1132 target_hw_bp_type instead.
1133 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
1134 instead of an enum target_point_type.
1135 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
1136 breakpoint type.
1137 (aarch64_dr_state_insert_one_point)
1138 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
1139 (aarch64_handle_aligned_watchpoint)
1140 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
1141 Take an enum target_hw_bp_type instead of an enum
1142 target_point_type.
1143 (aarch64_supports_z_point_type): New function.
1144 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
1145 use Z_packet_to_target_hw_bp_type.
1146
786dc519
JB
11472014-05-20 Joel Brobecker <brobecker@adacore.com>
1148
1149 * configure.ac: Only use -Werror by default when DEVELOPMENT
1150 is true.
1151 * configure: Regenerate.
1152
9e0aa64f
JK
11532014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
1154
1155 Fix gdbserver qGetTLSAddr for x86_64 -m32.
1156 * linux-x86-low.c (X86_64_USER_REGS): New.
1157 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
1158
2b577b92
YQ
11592014-04-28 Yao Qi <yao@codesourcery.com>
1160
1161 * Makefile.in (i386-avx512.c): Fix the typo of generated file
1162 name.
1163
94611da2
PA
11642014-04-25 Pedro Alves <palves@redhat.com>
1165
1166 PR server/16255
1167 * linux-low.c (linux_attach_fail_reason_string): New function.
1168 (linux_attach_lwp): Delete.
1169 (linux_attach_lwp_1): Rename to ...
1170 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
1171 argument. Remove "initial" parameter. Return int instead of
1172 void. Don't error or warn here.
1173 (linux_attach): Adjust to call linux_attach_lwp. Call error on
1174 failure to attach to the tgid. Call warning when failing to
1175 attach to an lwp.
1176 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
1177 argument. Remove "initial" parameter. Return int instead of
1178 void. Don't error or warn here.
1179 (linux_attach_fail_reason_string): New declaration.
1180 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
1181 interface change. Use linux_attach_fail_reason_string.
1182
01f9f808
MS
11832014-04-24 Michael Sturm <michael.sturm@mintel.com>
1184 Walfred Tedeschi <walfred.tedeschi@intel.com>
1185
1186 * Makefile.in: Added rules to handle new files
1187 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
1188 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
1189 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
1190 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
1191 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
1192 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
1193 x32-avx512-linux.o.
1194 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
1195 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
1196 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
1197 i386/x32-avx512.xml.
1198 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
1199 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
1200 i386/x32-avx512-linux.xml.
1201 * i387-fp.c (num_avx512_k_registers): New constant for number
1202 of K registers.
1203 (num_avx512_zmmh_low_registers): New constant for number of
1204 lower ZMM registers (0-15).
1205 (num_avx512_zmmh_high_registers): New constant for number of
1206 higher ZMM registers (16-31).
1207 (num_avx512_ymmh_registers): New contant for number of higher
1208 YMM registers (ymm16-31 added by avx521 on x86_64).
1209 (num_avx512_xmm_registers): New constant for number of higher
1210 XMM registers (xmm16-31 added by AVX512 on x86_64).
1211 (struct i387_xsave): Add space for AVX512 registers.
1212 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
1213 Add code to handle AVX512 registers.
1214 (i387_xsave_to_cache): Add code to handle AVX512 registers.
1215 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
1216 prototypei from generated file.
1217 (tdesc_amd64_avx512_linux): Likewise.
1218 (init_registers_x32_avx512_linux): Likewise.
1219 (tdesc_x32_avx512_linux): Likewise.
1220 (init_registers_i386_avx512_linux): Likewise.
1221 (tdesc_i386_avx512_linux): Likewise.
1222 (x86_64_regmap): Add AVX512 registers.
1223 (x86_linux_read_description): Add code to handle AVX512 XSTATE
1224 mask.
1225 (initialize_low_arch): Add code to initialize AVX512 registers.
1226
51aa91f9
PA
12272014-04-23 Pedro Alves <palves@redhat.com>
1228
1229 * mem-break.c (find_gdb_breakpoint_at): Make static.
1230 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
1231
a4165e94
PA
12322014-04-23 Pedro Alves <palves@redhat.com>
1233
1234 * i386-low.c: Don't include break-common.h here.
1235 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
1236 prototype to take target_hw_bp_type as argument instead of a Z
1237 packet char.
1238 * i386-low.h: Include break-common.h here.
1239 (Z_packet_to_hw_type): Declare.
1240 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
1241 prototypes.
1242 * linux-x86-low.c (x86_insert_point): Convert the packet number to
1243 a target_hw_bp_type before calling i386_low_insert_watchpoint.
1244 (x86_remove_point): Convert the packet number to a
1245 target_hw_bp_type before calling i386_low_remove_watchpoint.
1246 * win32-i386-low.c (i386_insert_point): Convert the packet number
1247 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
1248 (i386_remove_point): Convert the packet number to a
1249 target_hw_bp_type before calling i386_low_remove_watchpoint.
1250
b8acf843
PA
12512014-04-23 Pedro Alves <palves@redhat.com>
1252
1253 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
1254
d708bcd1
PA
12552014-04-10 Pedro Alves <palves@redhat.com>
1256
1257 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1258 Check if the condition or command is NULL before checking if the
1259 breakpoint is known. On success, return true.
1260 * mem-break.h (add_breakpoint_condition): Document return.
1261 (add_breakpoint_commands): Add describing comment.
1262 * server.c (skip_to_semicolon): New function.
1263 (process_point_options): Use it.
1264
2eec7d5b
PA
12652014-04-09 Pedro Alves <palves@redhat.com>
1266
1267 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
1268 to lwpid_of.
1269
fa96cb38
PA
12702014-02-27 Pedro Alves <palves@redhat.com>
1271
1272 PR 12702
1273 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
1274 macros.
1275 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
1276 output.
1277 (last_thread_of_process_p): Take a PID argument instead of a
1278 thread pointer.
1279 (linux_wait_for_lwp): Delete.
1280 (num_lwps, check_zombie_leaders, not_stopped_callback): New
1281 functions.
1282 (linux_low_filter_event): New function, party factored out from
1283 linux_wait_for_event.
1284 (linux_wait_for_event): Rename to ...
1285 (linux_wait_for_event_filtered): ... this. Add new filter ptid
1286 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
1287 sigsuspend. Check for zombie leaders.
1288 (linux_wait_for_event): Reimplement as wrapper around
1289 linux_wait_for_event_filtered.
1290 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
1291 a normal or signal exit is seen, it's the whole process exiting.
1292 (wait_for_sigstop): No longer a for_each_inferior callback.
1293 Rewrite on top of linux_wait_for_event_filtered.
1294 (stop_all_lwps): Call wait_for_sigstop directly.
1295 * server.c (resume, handle_target_event): Handle
1296 TARGET_WAITKIND_NO_RESUMED.
1297
d763de10
JB
12982014-02-26 Joel Brobecker <brobecker@adacore.com>
1299
1300 * win32-low.c (psapi_get_dll_name,
1301 * win32_CreateToolhelp32Snapshot): Delete.
1302 (win32_CreateToolhelp32Snapshot, win32_Module32First)
1303 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
1304 Delete.
1305 (handle_load_dll): Add function description.
1306 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
1307
850a0f76
JB
13082014-02-26 Joel Brobecker <brobecker@adacore.com>
1309
1310 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
1311 Add comment.
1312 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
1313 base address when calling win32_add_one_solib.
1314 (handle_load_dll): Delete local variable load_addr.
1315 Remove 0x1000 offset applied to DLL base address when calling
1316 win32_add_one_solib.
1317 (handle_unload_dll): Add comment.
1318
f25b3fc3
JB
13192014-02-26 Joel Brobecker <brobecker@adacore.com>
1320
1321 * win32-low.c (win32_add_all_dlls): Renames
1322 win32_ensure_ntdll_loaded. Rewrite function documentation.
1323 Adjust implementation to always load all DLLs.
1324 Add 0x1000 offset to DLL base address when calling
1325 win32_add_one_solib.
1326 (child_initialization_done): New static global.
1327 (do_initial_child_stuff): Set child_initialization_done to
1328 zero during child initialization, and 1 after. Replace call
1329 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
1330 Add comment.
1331 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
1332 (handle_unload_dll): Add function documentation.
1333 (get_child_debug_event): Ignore load and unload DLL events
1334 during child initialization.
1335
d86d4aaf
DE
13362014-02-20 Doug Evans <dje@google.com>
1337
3bc32da3 1338 Remove global all_lwps.
d86d4aaf
DE
1339 * inferiors.h (ptid_of): Move here from linux-low.h.
1340 (pid_of, lwpid_of): Ditto.
1341 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
1342 parameter is a struct thread_info * now.
1343 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
1344 directly. Pass &all_threads to find_inferior instead of &all_lwps.
1345 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
1346 directly.
1347 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
1348 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
1349 * linux-arm-low.c (update_registers_callback): Update, "entry"
1350 parameter is a struct thread_info * now.
1351 Fetch lwpid from current_inferior directly.
1352 (arm_insert_point): Pass &all_threads to find_inferior instead of
1353 &all_lwps.
1354 (arm_remove_point): Ditto.
1355 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
1356 (arm_prepare_to_resume): Fetch pid from thread.
1357 (arm_read_description): Fetch lwpid from current_inferior directly.
1358 * linux-low.c (all_lwps): Delete.
1359 (delete_lwp): Delete call to remove_inferior.
1360 (handle_extended_wait): Fetch lwpid from thread.
1361 (add_lwp): Don't set lwp->entry.id. Remove call to
1362 add_inferior_to_list.
1363 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
1364 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
1365 (kill_one_lwp_callback): Ditto.
1366 (linux_kill): Don't dereference NULL pointer.
1367 Fetch ptid,lwpid from thread.
1368 (get_detach_signal): Fetch ptid from thread.
1369 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
1370 Simplify call to regcache_invalidate_thread.
1371 (delete_lwp_callback): Update, "entry" parameter is a
1372 struct thread_info * now. Fetch pid from thread.
1373 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
1374 (status_pending_p_callback): Update, "entry" parameter is a
1375 struct thread_info * now. Fetch ptid from thread.
1376 (find_lwp_pid): Update, "entry" parameter is a
1377 struct thread_info * now.
1378 (linux_wait_for_lwp): Fetch pid from thread.
1379 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
1380 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
1381 (enqueue_one_deferred_signal): Fetch lwpid from thread.
1382 (dequeue_one_deferred_signal): Ditto.
1383 (cancel_breakpoint): Fetch ptid from current_inferior.
1384 (linux_wait_for_event): Pass &all_threads to find_inferior,
1385 not &all_lwps. Fetch ptid, lwpid from thread.
1386 (count_events_callback): Update, "entry" parameter is a
1387 struct thread_info * now.
1388 (select_singlestep_lwp_callback): Ditto.
1389 (select_event_lwp_callback): Ditto.
1390 (cancel_breakpoints_callback): Ditto.
1391 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
1392 not &all_lwps.
1393 (select_event_lwp): Ditto. Fetch ptid from event_thread.
1394 (unsuspend_one_lwp): Update, "entry" parameter is a
1395 struct thread_info * now.
1396 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
1397 not &all_lwps.
1398 (linux_stabilize_threads): Ditto. And for for_each_inferior.
1399 Fetch lwpid from thread, not lwp.
1400 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
1401 Pass &all_threads to find_inferior, not &all_lwps.
1402 (send_sigstop): Fetch lwpid from thread, not lwp.
1403 (send_sigstop_callback): Update, "entry" parameter is a
1404 struct thread_info * now.
1405 (suspend_and_send_sigstop_callback): Ditto.
1406 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
1407 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
1408 struct thread_info * now.
1409 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
1410 from thread, lwp.
1411 (lwp_running): Update, "entry" parameter is a
1412 struct thread_info * now.
1413 (stop_all_lwps): Fetch ptid from thread.
1414 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
1415 (linux_resume_one_lwp): Fetch lwpid from thread.
1416 (linux_set_resume_request): Update, "entry" parameter is a
1417 struct thread_info * now. Fetch pid, lwpid from thread.
1418 (resume_status_pending_p): Update, "entry" parameter is a
1419 struct thread_info * now.
1420 (need_step_over_p): Ditto. Fetch lwpid from thread.
1421 (start_step_over): Fetch lwpid from thread.
1422 (linux_resume_one_thread): Update, "entry" parameter is a
1423 struct thread_info * now. Fetch lwpid from thread.
1424 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
1425 (proceed_one_lwp): Update, "entry" parameter is a
1426 struct thread_info * now. Fetch lwpid from thread.
1427 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
1428 struct thread_info * now.
1429 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
1430 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
1431 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
1432 directly.
1433 (regsets_store_inferior_registers): Ditto.
1434 (fetch_register, store_register): Ditto.
1435 (linux_read_memory, linux_write_memory): Ditto.
1436 (linux_request_interrupt): Ditto.
1437 (linux_read_auxv): Ditto.
1438 (linux_xfer_siginfo): Ditto.
1439 (linux_qxfer_spu): Ditto.
1440 (linux_qxfer_libraries_svr4): Ditto.
1441 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
1442 moved to inferiors.h.
1443 (get_lwp): Delete.
1444 (get_thread_lwp): Update.
1445 (struct lwp_info): Delete member "entry". Simplify comment for
1446 member "thread".
1447 (all_lwps): Delete.
1448 * linux-mips-low.c (mips_read_description): Fetch lwpid from
1449 current_inferior directly.
1450 (update_watch_registers_callback): Update, "entry" parameter is a
1451 struct thread_info * now. Fetch pid from thread.
1452 (mips_linux_prepare_to_resume): Fetch ptid from thread.
1453 (mips_insert_point): Fetch lwpid from current_inferior.
1454 Pass &all_threads to find_inferior, not &all_lwps.
1455 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
1456 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
1457 directly.
1458 (mips_stopped_data_address): Ditto.
1459 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
1460 directly.
1461 * linux-tile-low.c (tile_arch_setup): Ditto.
1462 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
1463 (update_debug_registers_callback): Update, "entry" parameter is a
1464 struct thread_info * now. Fetch pid from thread.
1465 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
1466 Pass &all_threads to find_inferior, not &all_lwps.
1467 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
1468 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
1469 Pass &all_threads to find_inferior, not &all_lwps.
1470 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
1471 (i386_dr_low_get_status): Ditto.
1472 (x86_linux_prepare_to_resume): Fetch ptid from thread.
1473 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
1474 (x86_linux_read_description): Ditto.
1475 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
1476
3b8361aa
DE
14772014-02-20 Doug Evans <dje@google.com>
1478
1479 * inferiors.c (get_first_inferior): Fix buglet.
1480
f7667f0d
DE
14812014-02-19 Doug Evans <dje@google.com>
1482
1483 * gdbthread.h (add_thread): Change result type to struct thread_info *.
1484 * inferiors.c (add_thread): Change result type to struct thread_info *.
1485 All callers updated.
1486 (add_lwp): Call add_thread here instead of in callers.
1487 All callers updated.
1488 * linux-low.h (get_lwp_thread): Rewrite.
1489 (struct lwp_info): New member "thread".
1490
b3312d80
DE
14912014-02-19 Doug Evans <dje@google.com>
1492
1493 * linux-low.c (add_lwp): Change result to struct lwp_info *.
1494 All callers updated.
1495
ecc6f45c
DE
14962014-02-19 Doug Evans <dje@google.com>
1497
1498 * inferiors.c (add_thread): Fix whitespace.
1499
649ebbca
DE
15002014-02-19 Doug Evans <dje@google.com>
1501
1502 * dll.c (clear_dlls): Replace accessing list implemention details
1503 with API function.
1504 * gdbthread.h (get_first_thread): Declare.
1505 * inferiors.c (for_each_inferior_with_data): New function.
1506 (get_first_thread): New function.
1507 (find_thread_ptid): Simplify.
1508 (get_first_inferior): New function.
1509 (clear_list): Delete.
1510 (one_inferior_p): New function.
1511 (clear_inferior_list): New function.
1512 (clear_inferiors): Update.
1513 * inferiors.h (for_each_inferior_with_data): Declare.
1514 (clear_inferior_list): Declare.
1515 (one_inferior_p): Declare.
1516 (get_first_inferior): Declare.
1517 * linux-low.c (linux_wait_for_event): Replace accessing list
1518 implemention details with API function.
1519 * server.c (target_running): Ditto.
1520 (accumulate_file_name_length): New function.
1521 (emit_dll_description): New function.
1522 (handle_qxfer_libraries): Replace accessing list implemention
1523 details with API function.
1524 (handle_qxfer_threads_worker): New function.
1525 (handle_qxfer_threads_proper): Replace accessing list implemention
1526 details with API function.
1527 (handle_query): Ditto.
1528 (visit_actioned_threads_callback_ftype): New typedef.
1529 (visit_actioned_threads_data): New struct.
1530 (visit_actioned_threads): Rewrite to be find_inferior callback.
1531 (resume): Call find_inferior.
1532 (handle_status): Replace accessing list implemention
1533 details with API function.
1534 (process_serial_event): Replace accessing list implemention details
1535 with API function.
1536 * target.c (set_desired_inferior): Replace accessing list implemention
1537 details with API function.
1538 * tracepoint.c (same_process_p): New function.
1539 (gdb_agent_about_to_close): Replace accessing list implemention
1540 details with API function.
1541 * win32-low.c (child_delete_thread): Replace accessing list
1542 implemention details with API function.
1543 (match_dll_by_basename): New function.
1544 (dll_is_loaded_by_basename): New function.
1545 (win32_ensure_ntdll_loaded): Replace accessing list implemention
1546 details call to dll_is_loaded_by_basename.
1547
80894984
DE
15482014-02-19 Doug Evans <dje@google.com>
1549
1550 * dll.h (struct dll_info): Add comment.
1551 * gdbthread.h (struct thread_info): Add comment.
1552 (current_ptid): Simplify.
1553 * inferiors.c (add_process): Update.
1554 (remove_process): Update.
1555 * inferiors.h (struct process_info): Rename member "head" to "entry".
1556 * linux-low.c (delete_lwp): Update.
1557 (add_lwp): Update.
1558 (last_thread_of_process_p): Update.
1559 (kill_one_lwp_callback, linux_kill): Update.
1560 (status_pending_p_callback): Update.
1561 (wait_for_sigstop): Update. Simplify read of ptid.
1562 (start_step_over): Update.
1563 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
1564 (get_lwp_thread): Update.
1565 (struct lwp_info): Rename member "head" to "entry".
1566 * regcache.h (inferior_list_entry): Delete.
1567 * server.c (kill_inferior_callback): Update.
1568 (detach_or_kill_inferior_callback): Update.
1569 (print_started_pid): Update.
1570 (print_attached_pid): Update.
1571 (process_serial_event): Simplify read of ptid.
1572 * thread-db.c (thread_db_create_event): Update.
1573 (thread_db_get_tls_address): Update.
1574 * win32-low.c (current_inferior_ptid): Simplify.
1575
46917d26
TT
15762014-02-19 Tom Tromey <tromey@redhat.com>
1577
1578 * target.h (struct target_ops) <supports_btrace>: Add target_ops
1579 argument.
1580 (target_supports_btrace): Update.
1581
0759a81e
YQ
15822014-02-14 Yao Qi <yao@codesourcery.com>
1583
1584 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
1585 (rsp-low-ipa.o): New target.
1586
a7191e8b
TT
15872014-02-12 Tom Tromey <tromey@redhat.com>
1588
1589 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
1590 convert_ascii_to_int.
1591 * regcache.c (registers_to_string): Likewise.
1592 * remote-utils.c (decode_M_packet): Likewise.
1593 * server.c (process_serial_event): Likewise.
1594
ff0e980e
TT
15952014-02-12 Tom Tromey <tromey@redhat.com>
1596
1597 * server.c (handle_query, handle_v_run): Use hex2bin, not
1598 unhexify.
1599 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
1600
e9371aff
TT
16012014-02-12 Tom Tromey <tromey@redhat.com>
1602
1603 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
1604 convert_int_to_ascii.
1605 * regcache.c (registers_to_string, collect_register_as_string):
1606 Likewise.
1607 * remote-utils.c (look_up_one_symbol, relocate_instruction):
1608 Likewise.
1609 * server.c (process_serial_event): Likewise.
1610 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
1611 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
1612
971dc0b8
TT
16132014-02-12 Tom Tromey <tromey@redhat.com>
1614
1615 * remote-utils.c (look_up_one_symbol, monitor_output): Use
1616 bin2hex, not hexify.
1617 * tracepoint.c (cmd_qtstatus): Likewise.
1618
0a822afb
TT
16192014-02-12 Tom Tromey <tromey@redhat.com>
1620
1621 * remote-utils.c (monitor_output): Pass explicit length to
1622 hexify.
1623
9c3d6531
TT
16242014-02-12 Tom Tromey <tromey@redhat.com>
1625
1626 * tracepoint.c: Include rsp-low.h.
1627 * server.c: Include rsp-low.h.
1628 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
1629 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
1630 declare.
1631 * remote-utils.c: Include rsp-low.h.
1632 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
1633 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
1634 (convert_int_to_ascii, convert_ascii_to_int): Move to
1635 common/rsp-low.c.
1636 * regcache.c: Include rsp-low.h.
1637 * ax.c: Include rsp-low.h.
1638 * Makefile.in (SFILES): Add common/rsp-low.c.
1639 (OBS): Add rsp-low.o.
1640 (rsp-low.o): New target.
1641
01fd3ea5
TT
16422014-02-12 Tom Tromey <tromey@redhat.com>
1643
1644 * utils.h (pulongest, plongest, phex_nz): Don't declare.
1645 Include print-utils.h.
1646 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
1647 (plongest, thirty_two, phex_nz): Remove.
1648 * Makefile.in (SFILES): Add common/print-utils.c.
1649 (OBS): Add print-utils.o.
1650 (print-utils-ipa.o): New target.
1651 (print-utils.o): New target.
1652 (IPA_OBJS): Add print-utils-ipa.o.
1653
e99dc820
TT
16542014-02-06 Tom Tromey <tromey@redhat.com>
1655
1656 * Makefile.in (SFILES): Fix indentation.
1657
ee1e2d4f
DE
16582014-02-05 Doug Evans <dje@google.com>
1659
1660 * linux-low.c (linux_wait_for_event): Improve comment.
1661 (linux_wait_1): Keep current_inferior in sync with event_child.
1662
f5a02773
DE
16632014-01-22 Doug Evans <dje@google.com>
1664
1665 * gdbthread.h (gdb_id_to_thread): Delete, unused.
1666
87ce2a04
DE
16672014-01-22 Doug Evans <dje@google.com>
1668
1669 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
1670 * configure: Regenerate.
1671 * config.in: Regenerate.
1672 * Makefile.in (SFILES): Add debug.c.
1673 (OBS): Add debug.o.
1674 * debug.c: New file.
1675 * debug.h: New file.
1676 * linux-aarch64-low.c (*): Update all debugging printfs to use
1677 debug_printf instead of fprintf.
1678 * linux-arm-low.c (*): Ditto.
1679 * linux-cris-low.c (*): Ditto.
1680 * linux-crisv32-low.c (*): Ditto.
1681 * linux-m32r-low.c (*): Ditto.
1682 * linux-sparc-low.c (*): Ditto.
1683 * linux-x86.c (*): Ditto.
1684 * linux-low.c (*): Ditto.
1685 (linux_wait_1): Add calls to debug_enter, debug_exit.
1686 (linux_wait): Remove redundant debugging printf.
1687 (stop_all_lwps): Add calls to debug_enter, debug_exit.
1688 (linux_resume, unstop_all_lwps): Ditto.
1689 * mem-break.c (*): Update all debugging printfs to use
1690 debug_printf instead of fprintf.
1691 * remote-utils.c (*): Ditto.
1692 * thread-db.c (*): Ditto.
1693 * server.c #include <ctype.h>, "gdb_vecs.h".
1694 (debug_threads): Moved to debug.c.
1695 (*): Update all debugging printfs to use debug_printf instead of
1696 fprintf.
1697 (start_inferior): Replace call to fflush with call to debug_flush.
1698 (monitor_show_help): Mention set debug-format.
1699 (parse_debug_format_options): New function.
1700 (handle_monitor_command): Handle "monitor set debug-format".
1701 (gdbserver_usage): Mention --debug-format.
1702 (main): Parse --debug-format.
1703 * server.h (debug_threads): Declaration moved to debug.h.
1704 #include "debug.h".
1705 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
1706 trace_debug_1 that uses debug_printf.
1707 (tracepoint_look_up_symbols): Update all debugging printfs to use
1708 debug_printf instead of fprintf.
1709
e671835b
BS
17102014-01-20 Baruch Siach <baruch@tkos.co.il>
1711
1712 * linux-xtensa-low.c: Include asm/ptrace.h instead of
1713 sys/ptrace.h.
1714
b5737fa9
PA
17152014-01-17 Pedro Alves <palves@redhat.com>
1716
ea38d2a9 1717 PR build/16445
c7faa97a
PA
1718 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
1719 defined after including gdb_proc_service.h.
b5737fa9 1720
40ed484e
DE
17212014-01-16 Doug Evans <dje@google.com>
1722
1723 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
1724 (match_dll): Use it.
1725
969c39fb
MM
17262014-01-16 Markus Metzger <markus.t.metzger@intel.com>
1727
1728 * target.h (target_ops) <read_btrace>: Change parameters and
1729 return type to allow error reporting.
1730 * server.c (handle_qxfer_btrace): Support delta reads. Pass
1731 trace reading errors on.
1732 * linux-low.c (linux_low_read_btrace): Pass trace reading
1733 errors on.
1734 (linux_low_disable_btrace): New.
1735
ab7f45ba
DE
17362014-01-15 Doug Evans <dje@google.com>
1737
1738 * inferiors.c (thread_id_to_gdb_id): Delete.
1739 * inferiors.h (thread_id_to_gdb_id): Delete.
1740
66af0f44
EZ
17412014-01-13 Eli Zaretskii <eliz@gnu.org>
1742
1743 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
1744 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
1745 versions.
1746
9939e131
PA
17472014-01-08 Pedro Alves <palves@redhat.com>
1748
1749 * server.c (handle_status): Don't discard previous queued stop
1750 replies or thread's pending status here.
1751 (main) <disconnection>: Do it here instead.
1752
b7ea362b
PA
17532014-01-08 Pedro Alves <palves@redhat.com>
1754
1755 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
1756 * server.c (visit_actioned_threads, handle_pending_status): New
1757 function.
1758 (handle_v_cont): Factor out parts to ...
1759 (resume): ... this new function. If in all-stop, and a thread
1760 being resumed has a pending status, report it without actually
1761 resuming.
1762 (myresume): Adjust to use the new 'resume' function.
1763 (clear_pending_status_callback, set_pending_status_callback)
1764 (find_status_pending_thread_callback): New functions.
1765 (handle_status): Handle the case of multiple threads having
1766 interesting statuses to report. Report threads' real last signal
1767 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
1768 with an interesting thread to report the status for, instead of
1769 always reporting the status of the first thread.
1770
28498c42
JB
17712014-01-01 Joel Brobecker <brobecker@adacore.com>
1772
1773 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
1774 * gdbreplay.c (gdbreplay_version): Likewise.
1775
f45c82da
YZ
17762013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
1777
1778 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
1779 iov.iov_len with the real length in use.
1780
379a5e2d
JB
17812013-12-13 Joel Brobecker <brobecker@adacore.com>
1782
1783 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
1784 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
1785 for all targets that use win32-low.c.
1786 * win32-low.c (win32_ensure_ntdll_loaded): New function.
1787 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
1788
4210d83e
PA
17892013-12-13 Pedro Alves <palves@redhat.com>
1790
1791 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
1792 if equal to TARGET_WAITKIND_LOADED.
1793 * win32-low.c (cached_status): New static global.
1794 (win32_wait): Add declaration.
1795 (do_initial_child_stuff): Flush all initial pending debug events
1796 up to the initial breakpoint.
1797 (win32_wait): If CACHED_STATUS was set, return that instead
1798 of doing a real wait. Remove the code resuming the execution
1799 of the inferior after receiving a TARGET_WAITKIND_LOADED event
1800 during the initial phase. Also remove the code changing
1801 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
1802 TARGET_WAITKIND_STOPPED.
1803
e7f0d979
YQ
18042013-12-11 Yao Qi <yao@codesourcery.com>
1805
1806 * notif.c (handle_notif_ack): Return 0 if no notification
1807 matches.
1808
ebcf782c
DE
18092013-11-20 Doug Evans <dje@google.com>
1810
1811 * linux-low.c (linux_set_resume_request): Fix comment.
1812
20ad9378
DE
18132013-11-20 Doug Evans <dje@google.com>
1814
1815 * linux-low.c (resume_status_pending_p): Tweak comment.
1816
a196ebeb
WT
18172013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
1818
1819 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
1820 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
1821 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
1822 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
1823 (srv_amd64_regobj): Add amd64-mpx.o.
1824 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
1825 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
1826 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
1827 * i387-fp.c (num_pl_bnd_register) Added constant.
1828 (num_pl_bnd_cfg_registers) Added constant.
1829 (struct i387_xsave) Added reserved area and MPX fields.
1830 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
1831 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
1832 function.
1833 (tdesc_i386_mpx_linux): Add MPX amd64 target.
1834 (init_registers_amd64_mpx_linux): Declare new function.
1835 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
1836 (x86_64_regmap): Add MPX registers.
1837 (x86_linux_read_description): Add MPX case.
1838 (initialize_low_arch): Initialize MPX targets.
1839
0080a2f6
TT
18402013-11-18 Tom Tromey <tromey@redhat.com>
1841
1842 * configure: Rebuild.
1843 * configure.ac: Don't check for stdlib.h.
1844 * gdbreplay.c: Unconditionally include stdlib.h.
1845
2978b111
TT
18462013-11-18 Tom Tromey <tromey@redhat.com>
1847
1848 * config.in: Rebuild.
1849 * configure: Rebuild.
1850 * configure.ac: Don't use AC_HEADER_DIRENT.
1851
a3d08894
TT
18522013-11-18 Tom Tromey <tromey@redhat.com>
1853
1854 * server.h: Don't check HAVE_STRING_H.
1855 * gdbreplay.c: Don't check HAVE_STRING_H.
1856 * configure: Rebuild.
1857
0a5dd17d
TT
18582013-11-18 Tom Tromey <tromey@redhat.com>
1859
1860 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
1861 LIBGNU.
1862
1bd2f0ba
TT
18632013-11-08 Tom Tromey <tromey@redhat.com>
1864
1865 * configure, config.in: Rebuild.
1866 * configure.ac: Remove unused configury.
1867
3266f10b
TT
18682013-11-08 Tom Tromey <tromey@redhat.com>
1869
1870 * acinclude.m4: Include common.m4, codeset.m4.
1871 * configure, config.in: Rebuild.
1872 * configure.ac: Use GDB_AC_COMMON.
1873
6682d959
AA
18742013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
1875
1876 * linux-s390-low.c (HWCAP_S390_TE): New define.
1877 (s390_arch_setup): Consider the TE field in the HWCAP for
1878 determining 'have_regset_tdb'.
1879
fd0a4d76
SDJ
18802013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
1881
1882 PR gdb/16014
1883 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
1884 call to sizeof.
1885
1a3d890b
PA
18862013-10-02 Pedro Alves <palves@redhat.com>
1887
1888 * server.c (process_serial_event): Don't output "GDBserver
1889 exiting" if GDB is connected through stdio.
1890 * target.c (mywait): Likewise, be silent if GDB is connected
1891 through stdio.
1892
97ad4581
JB
18932013-10-01 Joel Brobecker <brobecker@adacore.com>
1894
1895 * lynx-low.c (lynx_add_threads_after_attach): New function.
1896 (lynx_attach): Remove call to add_thread. Add call to
1897 lynx_add_threads_after_attach instead.
1898
5b4e221c
MF
18992013-09-28 Mike Frysinger <vapier@gentoo.org>
1900
1901 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
1902 * config.in, configure: Regenerated.
1903
ee47b2f8
YQ
19042013-09-18 Yao Qi <yao@codesourcery.com>
1905
1906 PR server/15959
1907 * server.c (start_inferior): Clear 'resume_info'.
1908
d6707650 19092013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 1910
d6707650
JW
1911 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
1912 for each register.
1913
9243dd0e 19142013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 1915
9243dd0e
JW
1916 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
1917 linux-tile-low.o to srv_tgtobj.
1918
c623a6ef
WN
19192013-09-16 Will Newton <will.newton@linaro.org>
1920
1921 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
1922 out regs.
1923
fb71d39e
PA
19242013-09-06 Pedro Alves <palves@redhat.com>
1925
1926 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
1927 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
1928 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
1929 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
1930 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
1931 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
1932
8e7e9910
PA
19332013-09-06 Pedro Alves <palves@redhat.com>
1934
1935 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
1936 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
1937
7c3a12ca
PA
19382013-09-06 Pedro Alves <palves@redhat.com>
1939
1940 * linux-amd64-ipa.c: Include tracepoint.h.
1941 * linux-i386-ipa.c: Include tracepoint.h.
1942
8eb3d7b6
RW
19432013-09-06 Ricard Wanderlof <ricardw@axis.com>
1944
1945 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
1946 (ps_get_thread_area): New function.
1947
eddddb9d
RW
19482013-09-06 Ricard Wanderlof <ricardw@axis.com>
1949
1950 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
1951 (initialize_low_arch): Call init_registers_crisv32 rather than
1952 init_register_crisv32.
1953
533b0600
PA
19542013-09-05 Pedro Alves <palves@redhat.com>
1955
1956 * server.h (handle_vFile, hostio_last_error_from_errno): Move
1957 to ...
1958 * hostio.h: ... this new file.
1959 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
1960 win32-low.c: Include hostio.h.
1961
0ce3d3b5
PA
19622013-09-05 Pedro Alves <palves@redhat.com>
1963
1964 * server.h (gdb_client_data, handler_func, callback_handler_func)
1965 (delete_file_handler, add_file_handler, append_callback_event)
1966 (delete_callback_event, start_event_loop, initialize_event_loop):
1967 Move to event-loop.h and include it.
1968 * event-loop.h: New file.
1969
799cdc37
PA
19702013-09-05 Pedro Alves <palves@redhat.com>
1971
1972 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
1973 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
1974 (loaded_dll, unloaded_dll): Move to ...
1975 * dll.h: ... this new file.
1976 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
1977
6a6bbd9d
PA
19782013-09-05 Pedro Alves <palves@redhat.com>
1979
1980 * server.h (current_process, get_thread_process, all_processes)
1981 (add_inferior_to_list, for_each_inferior, current_inferior)
1982 (remove_inferior, add_process, remove_process, find_process_pid)
1983 (have_started_inferiors_p, have_attached_inferiors_p)
1984 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
1985 (clear_inferiors, find_inferior, find_inferior_id)
1986 (inferior_target_data, set_inferior_target_data)
1987 (inferior_regcache_data, set_inferior_regcache_data): Move to
1988 inferiors.h, and include it.
1989 * inferiors.h: New file.
1990
f699aaba
PA
19912013-09-05 Pedro Alves <palves@redhat.com>
1992
1993 * server.h (struct emit_ops, current_insn_ptr, emit_error):
1994 Move ...
1995 * ax.h: ... here.
1996
c144c7a0
PA
19972013-09-05 Pedro Alves <palves@redhat.com>
1998
1999 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
2000 tracepoint.h.
2001 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
2002 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
2003 (handle_tracepoint_general_set, handle_tracepoint_query)
2004 (tracepoint_finished_step, tracepoint_was_hit)
2005 (release_while_stepping_state_list, current_traceframe)
2006 (in_readonly_region, traceframe_read_mem)
2007 (fetch_traceframe_registers, traceframe_read_sdata)
2008 (traceframe_read_info, struct fast_tpoint_collect_status)
2009 (fast_tracepoint_collecting, force_unlock_trace_buffer)
2010 (handle_tracepoit_bkpts, initialize_low_tracepoint)
2011 (supply_fast_tracepoint_registers)
2012 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
2013 (ipa_tdesc, claim_trampoline_space)
2014 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
2015 (agent_mem_read, agent_get_trace_state_variable_value)
2016 (agent_set_trace_state_variable_value, agent_tsv_read)
2017 (agent_mem_read_string, get_raw_reg_func_addr)
2018 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
2019 * tracepoint.h: ... this new file.
2020
ff42e6ab
PA
20212013-09-05 Pedro Alves <palves@redhat.com>
2022
2023 * server.h (perror_with_name, error, fatal, warning, paddress)
2024 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
2025 include it.
2026 * utils.h: New file.
2027
541af0f4
PA
20282013-09-05 Pedro Alves <palves@redhat.com>
2029
2030 * server.h (remote_debug, noack_mode, transport_is_reliable)
2031 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
2032 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
2033 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
2034 (write_enn, initialize_async_io, enable_async_io)
2035 (disable_async_io, check_remote_input_interrupt_request)
2036 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
2037 (dead_thread_notify, prepare_resume_reply)
2038 (decode_address_to_semicolon, decode_address, decode_m_packet)
2039 (decode_M_packet, decode_X_packet, decode_xfer_write)
2040 (decode_search_memory_packet, unhexify, hexify)
2041 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
2042 (look_up_one_symbol, relocate_instruction)
2043 (monitor_output): Move to remote-utils.h, and include it.
2044 * remote-utils.h: New file.
2045
eebdf26b
PA
20462013-09-05 Pedro Alves <palves@redhat.com>
2047
2048 * server.h (_): Delete.
2049
3aafd2ff
PA
20502013-09-02 Pedro Alves <palves@redhat.com>
2051
2052 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
2053 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
2054 allocated.
2055 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
2056
cee83bcb
PM
20572013-09-02 Pierre Muller <muller@sourceware.org>
2058
2059 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
2060 or WriteProcessMemory complete successfully and handle
2061 ERROR_PARTIAL_COPY error.
2062
9a13b2fa
PA
20632013-09-02 Pedro Alves <palves@redhat.com>
2064
2065 * server.c (gdb_read_memory): Return -1 on traceframe memory read
2066 error instead of EIO.
2067
602e3198
JK
20682013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
2069
2070 PR server/15604
2071 * linux-low.c: Include filestuff.h.
2072 (linux_create_inferior) <pid == 0>: Call close_most_fds.
2073 * lynx-low.c: Include filestuff.h.
2074 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
2075 * server.c: Include filestuff.h.
2076 (main): Call notice_open_fds.
2077 * spu-low.c: Include filestuff.h.
2078 (spu_create_inferior) <pid == 0>: Call close_most_fds.
2079
96d7229d
LM
20802013-08-22 Luis Machado <lgustavo@codesourcery.com>
2081
2082 * Makefile.in: Explain why ../target and ../nat are not
2083 listed as include file search paths.
2084 (linux-waitpid.o): New object file rule.
2085 * configure.srv (srv_native_linux_obj): New variable.
2086 Replace all occurrences of linux native object files with
2087 $srv_native_linux_obj.
2088 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
2089 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
2090 (linux_enable_event_reporting): Remove declaration.
2091 (my_waitpid): Moved to common/linux-waitpid.c.
2092 (linux_wait_for_event): Pass ptid when calling
2093 linux_enable_event_reporting.
2094 (linux_supports_tracefork_flag): Remove.
2095 (linux_enable_event_reporting): Likewise.
2096 (linux_tracefork_grandchild): Remove.
2097 (STACK_SIZE): Moved to common/linux-ptrace.c.
2098 (linux_tracefork_child): Remove.
2099 (linux_test_for_tracefork): Remove.
2100 (linux_look_up_symbols): Call linux_supports_traceclone.
2101 (initialize_low): Remove call to linux_test_for_tracefork.
2102 * linux-low.h (PTRACE_TYPE_ARG3): Move to
2103 common/linux-ptrace.h.
2104 (PTRACE_TYPE_ARG4): Likewise.
2105 Include linux-ptrace.h.
2106
32940073
PA
21072013-08-21 Pedro Alves <palves@redhat.com>
2108
2109 * config.in: Renegerate.
2110
33b60d58 21112013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 2112
33b60d58
LM
2113 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
2114 (SFILES): Remove $(srcdir)/common/target-common.c and
2115 add $(srcdir)/target/waitstatus.c.
2116 (OBS): Remove target-common.o and add waitstatus.o.
2117 (server_h): Remove $(srcdir)/../common/target-common.h and
2118 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
2119 and $(srcdir)/../target/waitstatus.h.
2120 (target-common.o): Remove.
2121 (waitstatus.o): New target object file.
2122 * target.h: Do not include target-common.h and
2123 include target/resume.h, target/wait.h and
2124 target/waitstatus.h.
2125
b8e1b30e
LM
21262013-08-13 Luis Machado <lgustavo@codesourcery.com>
2127
2128 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
2129 to PTRACE_TYPE_ARG3.
2130 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
2131 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
2132 PTRACE_TYPE_ARG4.
2133 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
2134 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
2135
7a60ad40
YQ
21362013-07-27 Jie Zhang <jie@codesourcery.com>
2137 Daniel Jacobowitz <dan@codesourcery.com>
2138 Yao Qi <yao@codesourcery.com>
2139
2140 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
2141 (mips-linux-watch.o): New rule.
2142 (mips_linux_watch_h): New variable.
2143 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
2144 srv_tgtobj.
2145 * linux-mips-low.c: Include mips-linux-watch.h.
2146 (struct arch_process_info, struct arch_lwp_info): New.
2147 (update_watch_registers_callback): New function.
2148 (mips_linux_new_process, mips_linux_new_thread) New functions.
2149 (mips_linux_prepare_to_resume, mips_insert_point): New
2150 functions.
2151 (mips_remove_point, mips_stopped_by_watchpoint): New
2152 functions.
2153 (rsp_bp_type_to_target_hw_bp_type): New function.
2154 (mips_stopped_data_address): New function.
2155 (the_low_target): Add watchpoint support functions.
2156
de6f69ad
YQ
21572013-07-27 Yao Qi <yao@codesourcery.com>
2158
2159 * i386-low.c: Include break-common.h.
2160 (enum target_hw_bp_type): Remove.
2161
3360c0bf
LM
21622013-07-24 Luis Machado <lgustavo@codesourcery.com>
2163
2164 * Makefile.in (SFILES): /common/target-common.c.
2165 (OBS): Add target-common.o.
2166 (server_h): Add $(srcdir)/../common/target-common.h.
2167 (target-common.o): New target.
2168 * server.c (queue_stop_reply_callback): Free
2169 status string after use.
2170 * target.c (target_waitstatus_to_string): Remove.
2171 * target.h: Include target-common.h.
2172 (resume_kind): Likewise.
2173 (target_waitkind): Likewise.
2174 (target_waitstatus): Likewise.
2175 (TARGET_WNOHANG): Likewise.
2176
bd885420
YQ
21772013-07-04 Yao Qi <yao@codesourcery.com>
2178
2179 * Makefile.in (host_alias): Use @host_noncanonical@.
2180 (target_alias): Use @target_noncanonical@.
2181 * configure.ac: Use ACX_NONCANONICAL_TARGET and
2182 ACX_NONCANONICAL_HOST.
2183 * configure: Regenerated.
2184
2185 Revert:
2186 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
2187
2188 * configure.ac (version_host, version_target): Set and AC_SUBST them.
2189 * configure: Rebuild.
2190 * Makefile.in (version_host, version_target): Get from configure.
2191 (version.c): Use $(version_host) and $(version_target).
2192
17ef446e
PA
21932013-07-03 Pedro Alves <palves@redhat.com>
2194
2195 * Makefile.in (config.status): Depend on development.sh.
2196 * acinclude.m4: Include libmcheck.m4.
2197 * configure: Regenerate.
2198
7a9a7487
MG
21992013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
2200
2201 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
2202 attribute inside the parentheses.
2203 (winapi_DebugSetProcessKillOnExit): Ditto.
2204 (winapi_DebugBreakProcess): Ditto.
2205 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 2206
49b64de6
MG
22072013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
2208
2209 * notif.h (notif_event): Add a dummy member to avoid compiler
2210 errors.
2211
d5749ee7
PA
22122013-07-01 Pedro Alves <palves@redhat.com>
2213
2214 * hostio.c (HOSTIO_PATH_MAX): Define.
2215 (require_filename, handle_open, handle_unlink, handle_readlink):
2216 Use it.
2217
d8d2a3ee
PA
22182013-07-01 Pedro Alves <palves@redhat.com>
2219
2220 * server.h: Include "pathmax.h".
2221 * linux-low.c: Don't include sys/param.h.
2222 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
2223 MAXPATHLEN.
2224 * win32-low.c: Don't include sys/param.h.
2225 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
2226
bc7dea8d
PA
22272013-07-01 Pedro Alves <palves@redhat.com>
2228
2229 * event-loop.c: Don't check HAVE_UNISTD_H before including
2230 <unistd.h>.
2231 * gdbreplay.c: Likewise.
2232 * remote-utils.c: Likewise.
2233 * server.c: Likewise.
2234 * configure.ac: Don't check for unistd.h.
2235 * configure: Regenerate.
2236
d6c2da54
TT
22372013-06-28 Tom Tromey <tromey@redhat.com>
2238
2239 * Makefile.in (version.c): Use version.in, not
2240 common/version.in.
2241
257b6bec
MG
22422013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
2243
2244 * configure.ac (version_host, version_target): Set and AC_SUBST them.
2245 * configure: Rebuild.
2246 * Makefile.in (version_host, version_target): Get from configure.
2247 (version.c): Use $(version_host) and $(version_target).
2248
86ebe149
DK
22492013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
2250
2251 Fix trace-status to output user name without trailing colon.
2252 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
2253
f30aa5af
DK
22542013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
2255
2256 Fix trace-status to output proper start-time and stop-time.
2257 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
2258 output start time and stop time in hex as gdb expects.
2259
28a93511
YQ
22602013-06-26 Pedro Alves <pedro@codesourcery.com>
2261
2262 * tracepoint.c (build_traceframe_info_xml): Output trace state
2263 variables present in the trace buffer.
2264
01208463
TT
22652013-06-24 Tom Tromey <tromey@redhat.com>
2266
2267 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
2268 create-version.sh.
2269 (version.o): Remove.
2270 * gdbreplay.c: Include version.h.
2271 (version, host_name): Don't declare.
2272 * server.h: Include version.h.
2273 (version, host_name): Don't declare.
2274
760256f9
PA
22752013-06-12 Pedro Alves <palves@redhat.com>
2276
2277 * linux-x86-low.c (linux_is_elf64): Delete global.
2278 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
2279 with local linux_pid_exe_is_elf_64_file use.
2280
030031ee
PA
22812013-06-11 Pedro Alves <palves@redhat.com>
2282
2283 * linux-low.c (regset_disabled, disable_regset): New functions.
2284 (regsets_fetch_inferior_registers)
2285 (regsets_store_inferior_registers): Use them.
2286 (initialize_regsets_info); Don't allocate the disabled_regsets
2287 array here.
2288 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
2289 comment.
2290
5da6eb0a
PA
22912013-06-11 Pedro Alves <palves@redhat.com>
2292
2293 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
2294 xmalloc.
2295
7e5aaa09
PA
22962013-06-11 Pedro Alves <palves@redhat.com>
2297
2298 * linux-x86-low.c (initialize_low_arch): Call
2299 init_registers_x32_avx_linux.
2300
d878444c
JK
23012013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
2302
2303 Fix compatibility with Android Bionic.
2304 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
2305 it is not empty.
2306
3aee8918
PA
23072013-06-07 Pedro Alves <palves@redhat.com>
2308
5f2b57b5 2309 PR server/14823
3aee8918
PA
2310 * Makefile.in (OBS): Add tdesc.o.
2311 (IPA_OBJS): Add tdesc-ipa.o.
2312 (tdesc-ipa.o): New rule.
2313 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
2314 interface.
2315 * linux-low.c (new_inferior): Delete.
2316 (disabled_regsets, num_regsets): Delete.
2317 (linux_add_process): Adjust to set the new per-process
2318 new_inferior flag.
2319 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
2320 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
2321 was a stop. When calling arch_setup, switch the current inferior
2322 to the thread that got an event.
2323 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
2324 (regsets_fetch_inferior_registers)
2325 (regsets_store_inferior_registers): New regsets_info parameter.
2326 Adjust to use it.
2327 (linux_register_in_regsets): New regs_info parameter. Adjust to
2328 use it.
2329 (register_addr, fetch_register, store_register): New usrregs_info
2330 parameter. Adjust to use it.
2331 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
2332 parameter regs_info. Adjust to use it.
2333 (linux_fetch_registers): Get the current inferior's regs_info, and
2334 adjust to use it.
2335 (linux_store_registers): Ditto.
2336 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
2337 (initialize_low): Don't initialize the target_regsets here. Call
2338 initialize_low_arch.
2339 * linux-low.h (target_regsets): Delete declaration.
2340 (struct regsets_info): New.
2341 (struct usrregs_info): New.
2342 (struct regs_info): New.
2343 (struct process_info_private) <new_inferior>: New field.
2344 (struct linux_target_ops): Delete the num_regs, regmap, and
2345 regset_bitmap fields. New field regs_info.
2346 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
2347 * i387-fp.c (num_xmm_registers): Delete.
2348 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
2349 calls to new interface.
2350 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
2351 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
2352 Infer the number of xmm registers from the regcache's target
2353 description.
2354 * i387-fp.h (num_xmm_registers): Delete.
2355 * inferiors.c (add_thread): Don't install the thread's regcache
2356 here.
2357 * proc-service.c (gregset_info): Fetch the current inferior's
2358 regs_info. Adjust to use it.
2359 * regcache.c: Include tdesc.h.
2360 (register_bytes, reg_defs, num_registers)
2361 (gdbserver_expedite_regs): Delete.
2362 (get_thread_regcache): If the thread doesn't have a regcache yet,
2363 create one, instead of aborting gdbserver.
2364 (regcache_invalidate_one): Rename to ...
2365 (regcache_invalidate_thread): ... this.
2366 (regcache_invalidate_one): New.
2367 (regcache_invalidate): Only invalidate registers of the current
2368 process.
2369 (init_register_cache): Add target_desc parameter, and use it.
2370 (new_register_cache): Ditto. Assert the target description has a
2371 non zero registers_size.
2372 (regcache_cpy): Add assertions. Adjust.
2373 (realloc_register_cache, set_register_cache): Delete.
2374 (registers_to_string, registers_from_string): Adjust.
2375 (find_register_by_name, find_regno, find_register_by_number)
2376 (register_cache_size): Add target_desc parameter, and use it.
2377 (free_register_cache_thread, free_register_cache_thread_one)
2378 (regcache_release, register_cache_size): New.
2379 (register_size): Add target_desc parameter, and use it.
2380 (register_data, supply_register, supply_register_zeroed)
2381 (supply_regblock, supply_register_by_name, collect_register)
2382 (collect_register_as_string, collect_register_by_name): Adjust.
2383 * regcache.h (struct target_desc): Forward declare.
2384 (struct regcache) <tdesc>: New field.
2385 (init_register_cache, new_register_cache): Add target_desc
2386 parameter.
2387 (regcache_invalidate_thread): Declare.
2388 (regcache_invalidate_one): Delete declaration.
2389 (regcache_release): Declare.
2390 (find_register_by_number, register_cache_size, register_size)
2391 (find_regno): Add target_desc parameter.
2392 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
2393 declarations.
2394 * remote-utils.c: Include tdesc.h.
2395 (outreg, prepare_resume_reply): Adjust.
2396 * server.c: Include tdesc.h.
2397 (gdbserver_xmltarget): Delete declaration.
2398 (get_features_xml, process_serial_event): Adjust.
2399 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
2400 declare.
2401 (struct process_info) <tdesc>: New field.
2402 (ipa_tdesc): Declare.
2403 * tdesc.c: New file.
2404 * tdesc.h: New file.
2405 * tracepoint.c: Include tdesc.h.
2406 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
2407 (get_context_regcache): Adjust to pass ipa_tdesc down.
2408 (do_action_at_tracepoint): Adjust to get the register cache size
2409 from the context regcache's description.
2410 (traceframe_walk_blocks): Adjust to get the register cache size
2411 from the current trace frame's description.
2412 (traceframe_get_pc): Adjust to get current trace frame's
2413 description and pass it down.
2414 (gdb_collect): Adjust to get the register cache size from the
2415 IPA's description.
2416 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
2417 (gdbserver_xmltarget): Delete.
2418 (initialize_low_tracepoint): Set the ipa's target description.
2419 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
2420 (initialize_low_tracepoint): Set the ipa's target description.
2421 * linux-x86-low.c: Include tdesc.h.
2422 [__x86_64__] (is_64bit_tdesc): New.
2423 (ps_get_thread_area, x86_get_thread_area): Use it.
2424 (i386_cannot_store_register): Rename to ...
2425 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
2426 (i386_cannot_fetch_register): Rename to ...
2427 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
2428 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
2429 to new interface.
2430 (target_regsets): Rename to ...
2431 (x86_regsets): ... this.
2432 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
2433 interface.
2434 (x86_siginfo_fixup): Use is_64bit_tdesc.
2435 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
2436 (tdesc_x32_avx_linux, tdesc_x32_linux)
2437 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
2438 Declare.
2439 (x86_linux_update_xmltarget): Delete.
2440 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
2441 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
2442 (AMD64_LINUX_USER64_CS): New.
2443 (x86_linux_read_description): New, based on
2444 x86_linux_update_xmltarget.
2445 (same_process_callback): New.
2446 (x86_arch_setup_process_callback): New.
2447 (x86_linux_update_xmltarget): New.
2448 (x86_regsets_info): New.
2449 (amd64_linux_regs_info): New.
2450 (i386_linux_usrregs_info): New.
2451 (i386_linux_regs_info): New.
2452 (x86_linux_regs_info): New.
2453 (x86_arch_setup): Reimplement.
2454 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
2455 (x86_emit_ops): Ditto.
2456 (the_low_target): Adjust. Install x86_linux_regs_info,
2457 x86_cannot_fetch_register, and x86_cannot_store_register.
2458 (initialize_low_arch): New.
2459 * linux-ia64-low.c (tdesc_ia64): Declare.
2460 (ia64_fetch_register): Adjust.
2461 (ia64_usrregs_info, regs_info): New globals.
2462 (ia64_regs_info): New function.
2463 (the_low_target): Adjust.
2464 (initialize_low_arch): New function.
2465 * linux-sparc-low.c (tdesc_sparc64): Declare.
2466 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
2467 Adjust.
2468 (sparc_arch_setup): New function.
2469 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
2470 (the_low_target): Adjust.
2471 (initialize_low_arch): New function.
2472 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
2473 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
2474 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
2475 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
2476 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
2477 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
2478 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
2479 (tdesc_powerpc_isa205_vsx64l): Declare.
2480 (ppc_cannot_store_register, ppc_collect_ptrace_register)
2481 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
2482 (ppc_set_pc, ppc_get_hwcap): Adjust.
2483 (ppc_usrregs_info): Forward declare.
2484 (!__powerpc64__) ppc_regmap_adjusted: New global.
2485 (ppc_arch_setup): Adjust to the current process'es target
2486 description.
2487 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
2488 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
2489 (ppc_store_evrregset): Adjust.
2490 (target_regsets): Rename to ...
2491 (ppc_regsets): ... this, and make static.
2492 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
2493 (ppc_regs_info): New function.
2494 (the_low_target): Adjust.
2495 (initialize_low_arch): New function.
2496 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
2497 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
2498 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
2499 (tdesc_s390x_linux64v2): Declare.
2500 (s390_collect_ptrace_register, s390_supply_ptrace_register)
2501 (s390_fill_gregset, s390_store_last_break): Adjust.
2502 (target_regsets): Rename to ...
2503 (s390_regsets): ... this, and make static.
2504 (s390_get_pc, s390_set_pc): Adjust.
2505 (s390_get_hwcap): New target_desc parameter, and use it.
2506 [__s390x__] (have_hwcap_s390_high_gprs): New global.
2507 (s390_arch_setup): Adjust to set the current process'es target
2508 description. Don't adjust the regmap.
2509 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
2510 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
2511 (regs_info_3264): New globals.
2512 (s390_regs_info): New function.
2513 (the_low_target): Adjust.
2514 (initialize_low_arch): New function.
2515 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
2516 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
2517 [__mips64] (init_registers_mips_linux)
2518 (init_registers_mips_dsp_linux): Delete defines.
2519 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
2520 (have_dsp): New global.
2521 (mips_read_description): New, based on mips_arch_setup.
2522 (mips_arch_setup): Reimplement.
2523 (get_usrregs_info): New function.
2524 (mips_cannot_fetch_register, mips_cannot_store_register)
2525 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
2526 (mips_fill_fpregset, mips_store_fpregset): Adjust.
2527 (target_regsets): Rename to ...
2528 (mips_regsets): ... this, and make static.
2529 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
2530 (dsp_regs_info, regs_info): New globals.
2531 (mips_regs_info): New function.
2532 (the_low_target): Adjust.
2533 (initialize_low_arch): New function.
2534 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
2535 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
2536 Declare.
2537 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
2538 (arm_read_description): New, with bits factored from
2539 arm_arch_setup.
2540 (arm_arch_setup): Reimplement.
2541 (target_regsets): Rename to ...
2542 (arm_regsets): ... this, and make static.
2543 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
2544 (arm_regs_info): New function.
2545 (the_low_target): Adjust.
2546 (initialize_low_arch): New function.
2547 * linux-m68k-low.c (tdesc_m68k): Declare.
2548 (target_regsets): Rename to ...
2549 (m68k_regsets): ... this, and make static.
2550 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
2551 (m68k_regs_info): New function.
2552 (m68k_arch_setup): New function.
2553 (the_low_target): Adjust.
2554 (initialize_low_arch): New function.
2555 * linux-sh-low.c (tdesc_sharch): Declare.
2556 (target_regsets): Rename to ...
2557 (sh_regsets): ... this, and make static.
2558 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
2559 (sh_regs_info, sh_arch_setup): New functions.
2560 (the_low_target): Adjust.
2561 (initialize_low_arch): New function.
2562 * linux-bfin-low.c (tdesc_bfin): Declare.
2563 (bfin_arch_setup): New function.
2564 (bfin_usrregs_info, regs_info): New globals.
2565 (bfin_regs_info): New function.
2566 (the_low_target): Adjust.
2567 (initialize_low_arch): New function.
2568 * linux-cris-low.c (tdesc_cris): Declare.
2569 (cris_arch_setup): New function.
2570 (cris_usrregs_info, regs_info): New globals.
2571 (cris_regs_info): New function.
2572 (the_low_target): Adjust.
2573 (initialize_low_arch): New function.
2574 * linux-cris-low.c (tdesc_crisv32): Declare.
2575 (cris_arch_setup): New function.
2576 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
2577 (cris_regs_info): New function.
2578 (the_low_target): Adjust.
2579 (initialize_low_arch): New function.
2580 * linux-m32r-low.c (tdesc_m32r): Declare.
2581 (m32r_arch_setup): New function.
2582 (m32r_usrregs_info, regs_info): New globals.
2583 (m32r_regs_info): Adjust.
2584 (initialize_low_arch): New function.
2585 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
2586 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
2587 (tic6x_usrregs_info): Forward declare.
2588 (tic6x_read_description): New function, based on ...
2589 (tic6x_arch_setup): ... this. Reimplement.
2590 (target_regsets): Rename to ...
2591 (tic6x_regsets): ... this, and make static.
2592 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
2593 (tic6x_regs_info): New function.
2594 (the_low_target): Adjust.
2595 (initialize_low_arch): New function.
2596 * linux-xtensa-low.c (tdesc_xtensa): Declare.
2597 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
2598 (target_regsets): Rename to ...
2599 (xtensa_regsets): ... this, and make static.
2600 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
2601 globals.
2602 (xtensa_arch_setup, xtensa_regs_info): New functions.
2603 (the_low_target): Adjust.
2604 (initialize_low_arch): New function.
2605 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
2606 (nios2_arch_setup): Set the current process'es tdesc.
2607 (target_regsets): Rename to ...
2608 (nios2_regsets): ... this.
2609 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
2610 (nios2_regs_info): New function.
2611 (the_low_target): Adjust.
2612 (initialize_low_arch): New function.
a261b8f5
PA
2613 * linux-aarch64-low.c (tdesc_aarch64): Declare.
2614 (aarch64_arch_setup): Set the current process'es tdesc.
2615 (target_regsets): Rename to ...
2616 (aarch64_regsets): ... this.
2617 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
2618 (aarch64_regs_info): New function.
2619 (the_low_target): Adjust.
2620 (initialize_low_arch): New function.
3aee8918
PA
2621 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
2622 globals.
2623 (target_regsets): Rename to ...
2624 (tile_regsets): ... this.
2625 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
2626 (tile_regs_info): New function.
2627 (tile_arch_setup): Set the current process'es tdesc.
2628 (the_low_target): Adjust.
2629 (initialize_low_arch): New function.
2630 * spu-low.c (tdesc_spu): Declare.
2631 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
2632 * win32-arm-low.c (tdesc_arm): Declare.
2633 (arm_arch_setup): New function.
2634 (the_low_target): Install arm_arch_setup instead of
2635 init_registers_arm.
2636 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
2637 (init_windows_x86): Rename to ...
2638 (i386_arch_setup): ... this. Set `win32_tdesc'.
2639 (the_low_target): Adjust.
2640 * win32-low.c (win32_tdesc): New global.
2641 (child_add_thread): Don't create the thread cache here.
2642 (do_initial_child_stuff): Set the new process'es tdesc.
2643 * win32-low.h (struct target_desc): Forward declare.
2644 (win32_tdesc): Declare.
2645 * lynx-i386-low.c (tdesc_i386): Declare global.
2646 (lynx_i386_arch_setup): Set `lynx_tdesc'.
2647 * lynx-low.c (lynx_tdesc): New global.
2648 (lynx_add_process): Set the new process'es tdesc.
2649 * lynx-low.h (struct target_desc): Forward declare.
2650 (lynx_tdesc): Declare global.
2651 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
2652 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
2653 * nto-low.c (nto_tdesc): New global.
2654 (do_attach): Set the new process'es tdesc.
2655 * nto-low.h (struct target_desc): Forward declare.
2656 (nto_tdesc): Declare.
2657 * nto-x86-low.c (tdesc_i386): Declare.
2658 (nto_x86_arch_setup): Set `nto_tdesc'.
2659
b1fbec62
GB
26602013-06-04 Gary Benson <gbenson@redhat.com>
2661
2662 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
2663 to qSupported response when appropriate.
2664 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
2665 with nonzero-length annex.
2666 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
2667 arguments supplied in annex.
2668
d1ec4ce7
DE
26692013-05-31 Doug Evans <dje@google.com>
2670
ac44adcb 2671 PR server/15594
d1ec4ce7
DE
2672 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
2673 64 bits in 64-cross-32 environment.
2674
9b25f2d3
PA
26752013-05-28 Pedro Alves <palves@redhat.com>
2676
2677 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
2678 (aarch64-without-fpu.c): Delete rule.
2679 * configure.srv (aarch64*-*-linux*): Remove references to
2680 aarch64-without-fpu.o and aarch64-without-fpu.xml.
2681 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
2682 declaration.
2683
6740dc9c
PA
26842013-05-24 Pedro Alves <palves@redhat.com>
2685
2686 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
2687 instead of strchr/decode_address. Error if the range isn't split
2688 with a ','. Don't assume there's be a ':' in the action.
2689
c2d6af84
PA
26902013-05-23 Yao Qi <yao@codesourcery.com>
2691 Pedro Alves <palves@redhat.com>
2692
2693 * linux-low.c (lwp_in_step_range): New function.
2694 (linux_wait_1): If the thread was range stepping and stopped
2695 outside the stepping range, report the stop to GDB. Otherwise,
2696 continue stepping. Add range stepping debug output.
2697 (linux_set_resume_request): Copy the step range from the resume
2698 request to the lwp.
2699 (linux_supports_range_stepping): New.
2700 (linux_target_ops) <supports_range_stepping>: Set to
2701 linux_supports_range_stepping.
2702 * linux-low.h (struct linux_target_ops)
2703 <supports_range_stepping>: New field.
2704 (struct lwp_info) <step_range_start, step_range_end>: New fields.
2705 * linux-x86-low.c (x86_supports_range_stepping): New.
2706 (the_low_target) <supports_range_stepping>: Set to
2707 x86_supports_range_stepping.
2708 * server.c (handle_v_cont): Handle 'r' action.
2709 (handle_v_requests): Append ";r" if the target supports range
2710 stepping.
2711 * target.h (struct thread_resume) <step_range_start,
2712 step_range_end>: New fields.
2713 (struct target_ops) <supports_range_stepping>:
2714 New field.
2715 (target_supports_range_stepping): New macro.
2716
58794e1a
JB
27172013-05-17 Joel Brobecker <brobecker@adacore.com>
2718
2719 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
2720 confusion in comment.
2721
d631c5a7
JB
27222013-05-17 Joel Brobecker <brobecker@adacore.com>
2723
2724 * lynx-low.c (struct process_info_private): New type.
2725 (lynx_add_process): New function.
2726 (lynx_create_inferior, lynx_attach): Replace calls to
2727 add_process by calls to lynx_add_process.
2728 (lynx_resume): If PTID is null, then try using
2729 current_process()->private->last_wait_event_ptid.
2730 Add comments.
2731 (lynx_clear_inferiors): Delete. The contents of that function
2732 has been inlined in lynx_mourn;
2733 (lynx_wait_1): Save the ptid in the process's private data.
2734 (lynx_mourn): Free the process' private data. Replace call
2735 to lynx_clear_inferiors by call to clear_inferiors.
2736
96f7a20f
YQ
27372013-05-17 Yao Qi <yao@codesourcery.com>
2738
2739 * i386-low.c (i386_length_and_rw_bits): Move the comment to
2740 the right place.
2741
db0dfaa0
LM
27422013-05-16 Luis Machado <lgustavo@codesourcery.com>
2743
2744 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
2745 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
2746 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
2747 PT_TEXT_END_ADDR guards. Update comments.
2748 (linux_target_op) <read_offsets>: Conditionally define to
2749 linux_read_offsets if the target is UCLIBC and if it defines
2750 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
2751
68f5f838
SL
27522013-05-06 Sandra Loosemore <sandra@codesourcery.com>
2753 Andrew Jenner <andrew@codesourcery.com>
2754
2755 * Makefile.in (SFILES): Add linux-nios2-low.c.
2756 (clean): Add action to delete nios2-linux.c.
2757 (nios2-linux.c): New rule.
2758 * configure.srv: Add nios2*-*-linux*.
2759 * linux-nios2-low.c: New.
2760
1ebff1fd
HAQ
27612013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
2762
2763 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
2764
f6150862
HZ
27652013-04-25 Hui Zhu <hui@codesourcery.com>
2766
2767 PR gdb/15186
f6150862
HZ
2768 * ax.c (ax_printf): Add fflush.
2769
614c279d
TT
27702013-04-22 Tom Tromey <tromey@redhat.com>
2771
2772 * Makefile.in (SFILES): Add filestuff.c.
2773 (OBS): Add filestuff.o.
2774 (filestuff.o): New target.
2775 * config.in, configure: Rebuild.
2776 * configure.ac: Check for fdwalk, pipe2.
2777
7d4e5717
PA
27782013-04-17 Pedro Alves <palves@redhat.com>
2779
2780 * configure.ac (USE_THREAD_DB): Delete variable.
2781 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
2782 Don't AC_SUBST USE_THREAD_DB.
2783 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
2784 * config.in, configure: Regenerate.
2785
d5c93e41
PA
27862013-04-16 Pedro Alves <palves@redhat.com>
2787
2788 * linux-low.h (struct lwp_info) <thread_known>: Move under
2789 the USE_THREAD_DB #ifdef.
2790
04f5fe89
PA
27912013-04-16 Pedro Alves <palves@redhat.com>
2792
2793 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
2794 (linux-low.o): Delete rule.
2795 * linux-low.h: Always include "gdb_thread_db.h" instead of
2796 conditionally including thread_db.h.
2797 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
2798 HAVE_THREAD_DB_H.
2799
480b27bf
JK
28002013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
2801
2802 * Makefile.in (install-only): Fix make install regression.
2803
43662968
JK
28042013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
2805
2806 Convert man pages to texinfo, new gdbinit.5 texinfo page.
2807 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
2808 installation.
2809 * gdbserver.1: Remove.
2810
3e74e146
PA
28112013-03-22 Pedro Alves <palves@redhat.com>
2812
2813 * linux-low.c (handle_extended_wait): Don't call
2814 linux_enable_event_reporting.
2815
a8347a2a
TT
28162013-03-15 Tony Theodore <tonyt@logyst.com>
2817
2818 PR build/9098:
2819 * Makefile.in (SHELL): Use @SHELL@.
2820
eeb56fa7
SDJ
28212013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
2822
2823 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
2824 compiler warning.
2825
4fa7e2ff
JB
28262013-03-13 Joel Brobecker <brobecker@adacore.com>
2827
2828 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
2829 Remove extraneous NULL element.
2830
8ddb1965
YQ
28312013-03-13 Yao Qi <yao@codesourcery.com>
2832
2833 * tracepoint.c (traceframe_read_tsv): Look for the last matched
2834 'V' block in trace frame.
2835
9accd112
MM
28362013-03-11 Markus Metzger <markus.t.metzger@intel.com>
2837
2838 * target.h (struct target_ops): Add btrace ops.
2839 (target_supports_btrace): New macro.
2840 (target_enable_btrace): New macro.
2841 (target_disable_btrace): New macro.
2842 (target_read_btrace): New macro.
2843 * gdbthread.h (struct thread_info): Add btrace field.
2844 * server.c: Include btrace-common.h.
2845 (handle_btrace_general_set): New function.
2846 (handle_btrace_enable): New function.
2847 (handle_btrace_disable): New function.
2848 (handle_general_set): Call handle_btrace_general_set.
2849 (handle_qxfer_btrace): New function.
2850 (struct qxfer qxfer_packets[]): Add btrace entry.
2851 * inferiors.c (remove_thread): Disable btrace.
2852 * linux-low: Include linux-btrace.h.
2853 (linux_low_enable_btrace): New function.
2854 (linux_low_read_btrace): New function.
2855 (linux_target_ops): Add btrace ops.
2856 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
2857 Add srv_linux_btrace=yes.
2858 (x86_64-*-linux*): Add linux-btrace.o.
2859 Add srv_linux_btrace=yes.
2860 * configure.ac: Define HAVE_LINUX_BTRACE.
2861 * config.in: Regenerated.
2862 * configure: Regenerated.
2863
5cc22e4c
MM
28642013-03-11 Markus Metzger <markus.t.metzger@intel.com>
2865
2866 * server.c (handle_qxfer): Preserve error message if -3 is
2867 returned.
2868 (qxfer): Document the -3 return value.
2869
7c97f91e
MM
28702013-03-11 Markus Metzger <markus.t.metzger@intel.com>
2871
2872 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
2873 (linux_btrace_h): New variable.
2874 (linux-btrace.o): New rule.
2875
be9a119c 28762013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
2877 Hafiz Abid Qadeer <abidh@codesourcery.com>
2878
2879 * tracepoint.c (trace_buffer_size): New global.
2880 (DEFAULT_TRACE_BUFFER_SIZE): New define.
2881 (init_trace_buffer): Change to one-argument function. Allocate
2882 trace buffer memory.
2883 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
2884 handle QTBuffer:size packet.
2885 (cmd_bigqtbuffer_size): New function.
2886 (initialize_tracepoint): Call init_trace_buffer with
2887 DEFAULT_TRACE_BUFFER_SIZE.
2888 * server.c (handle_query): Add QTBuffer:size in the
2889 supported packets.
2890
e64f7499
YQ
28912013-03-07 Yao Qi <yao@codesourcery.com>
2892
2893 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
2894 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
2895 of -1.
2896 (cmd_qtsp): Adjust condition. Do post increment.
2897 Set cur_action and cur_step_action back to 0.
2898
f0ae6fc3
PA
28992013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
2900
2901 PR server/15236
2902 * linux-low.c (linux_write_memory): Return early success if LEN is
2903 zero.
2904
b5b0b0af
CV
29052013-03-05 Corinna Vinschen <vinschen@redhat.de>
2906
334ad4a8 2907 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 2908
589bc927
TT
29092013-02-28 Tom Tromey <tromey@redhat.com>
2910
2911 * configure.ac: Invoke AC_SYS_LARGEFILE.
2912 * configure, config.in: Rebuild.
2913
dfe07582
CV
29142013-02-28 Corinna Vinschen <vinschen@redhat.com>
2915
2916 * win32-low.c: Throughout, fix format strings and casts of
2917 printf-like functions to avoid type related warnings on all
2918 platforms.
2919 (get_child_debug_event): Print dwDebugEventCode as hex since
2920 that's how it's usually documented.
2921
736cd585
YQ
29222013-02-28 Yao Qi <yao@codesourcery.com>
2923
2924 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
2925 pulongest.
2926
e1f58301
JW
29272013-02-27 Jiong Wang <jiwang@tilera.com>
2928
2929 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
2930 (reg-tilegx32.c): New rule.
2931 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
2932 * linux-tile-low.c (tile_arch_setup): New function. Invoke
2933 different register info initializer according to elf class.
2934 (init_registers_tilgx32): New function. The tilegx32 register info
2935 initializer.
2936 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
2937 (tile_store_gregset): Likewise.
2938
d171ca78
YQ
29392013-02-27 Yao Qi <yao@codesourcery.com>
2940
2941 * server.c (process_point_options): Print debug message when
2942 debug_threads is true.
2943
282bbdf3
YQ
29442013-02-26 Yao Qi <yao@codesourcery.com>
2945
2946 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
2947
aca22551
PA
29482013-02-19 Pedro Alves <palves@redhat.com>
2949 Kai Tietz <ktietz@redhat.com>
2950
2951 PR gdb/15161
2952
2953 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
2954 instead of strtoul to extract address from packet.
2955 (process_serial_event) <'z'>: Likewise.
2956
4f3cee1c
YQ
29572013-02-18 Yao Qi <yao@codesourcery.com>
2958
2959 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
2960
8e1d55a3
PA
29612013-02-14 Pedro Alves <palves@redhat.com>
2962
2963 Plug memory leak.
2964
2965 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
2966 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
2967
458820da
PA
29682013-02-14 Pedro Alves <palves@redhat.com>
2969
2970 * tracepoint.c (cmd_qtdpsrc): Use savestring.
2971
baea0dae
PA
29722013-02-14 Pedro Alves <palves@redhat.com>
2973
2974 * tracepoint.c (save_string): Delete.
2975 (add_tracepoint_action): Use savestring instead of save_string.
2976
0b1afbb3
PA
29772013-02-12 Pedro Alves <palves@redhat.com>
2978
2979 * linux-xtensa-low.c: Ditto.
2980 * xtensa-xtregs.c: Ditto.
2981
8a4ac37e
PA
29822013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
2983
2984 * thread-db.c (thread_db_get_tls_address): NULL pointer check
2985 thread_db.
2986
148de6bb
MS
29872013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
2988
2989 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
2990 aarch64_num_wp_regs and aarch64_num_bp_regs to
2991 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
2992
55fac6e0
MS
29932013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
2994
2995 * linux-aarch64-low.c (ps_get_thread_area): Replace
2996 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
2997
176eb98c
MS
29982013-02-04 Jim MacArthur <jim.macarthur@arm.com>
2999 Marcus Shawcroft <marcus.shawcroft@arm.com>
3000 Nigel Stephens <nigel.stephens@arm.com>
3001 Yufeng Zhang <yufeng.zhang@arm.com>
3002
3003 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
3004 (aarch64.c, aarch64-without-fpu.c): New targets.
3005 * configure.srv (aarch64*-*-linux*): New.
3006 * linux-aarch64-low.c: New file.
3007
56f7af9c
MS
30082013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
3009
43aaf8b6 3010 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
3011 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
3012 (dequeue_one_deferred_signal, linux_resume_one_thread)
3013 (fetch_register, linux_write_memory, linux_enable_event_reporting)
3014 (linux_tracefork_grandchild, linux_test_for_tracefork)
3015 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
3016 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
3017 where the argument is 0.
3018
60f662b0
YQ
30192013-01-25 Yao Qi <yao@codesourcery.com>
3020
3021 * event-loop.c: Include "queue.h".
3022 (gdb_event_p): New typedef.
3023 (struct gdb_event) <next_event>: Remove.
3024 (event_queue): Change to QUEUE(gdb_event_p).
3025 (async_queue_event): Remove.
3026 (gdb_event_xfree): New.
3027 (initialize_event_loop): New.
3028 (process_event): Use API from QUEUE.
3029 (wait_for_event): Likewise.
3030 * server.c (main): Call initialize_event_loop.
3031 * server.h (initialize_event_loop): Declare.
3032
5ae4861a
YQ
30332013-01-18 Yao Qi <yao@codesourcery.com>
3034
3035 * ax.h (struct eval_agent_expr_context): New.
3036 (gdb_eval_agent_expr): Update declaration.
3037 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
3038 TFRAME. Add new argument CTX.
3039 * server.h (struct eval_agent_expr_context): Declare.
3040 (agent_mem_read, agent_tsv_read): Update declaration.
3041 (agent_mem_read_string): Likewise.
3042 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
3043 (add_traceframe_block): Add new argument TPOINT.
3044 Increase TPOINT->traceframe_usage.
3045 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
3046 eval_tracepoint_agent_expr.
3047 (condition_true_at_tracepoint): Likewise.
3048 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
3049 (agent_mem_read_string, agent_tsv_read): Likewise.
3050
85e00e85
YQ
30512013-01-16 Yao Qi <yao@codesourcery.com>
3052
3053 * linux-low.c (linux_resume_one_lwp): Don't check
3054 'lwp->bp_reinsert != 0'.
3055
4039cf45
JB
30562013-01-07 Joel Brobecker <brobecker@adacore.com>
3057 Pedro Alves <palves@redhat.com>
3058
3059 * lynx-low.c (ptrace_request_to_str): Define a temporary
3060 macro and use it to simplify this function's implementation.
3061
9044dee2
JB
30622013-01-07 Joel Brobecker <brobecker@adacore.com>
3063
3064 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
3065 sets errno.
3066
e6352c8f
JB
30672013-01-07 Joel Brobecker <brobecker@adacore.com>
3068
3069 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
3070
50681a27
JB
30712013-01-07 Joel Brobecker <brobecker@adacore.com>
3072
3073 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
3074
3f6e77ef
JB
30752013-01-07 Joel Brobecker <brobecker@adacore.com>
3076
3077 * lynx-low.c (lynx_resume): Use the resume_info parameter
3078 to determine the ptid for the lynx_ptrace call, unless
3079 it is equal to minus_one_ptid, in which case we use the
3080 ptid of the current_inferior.
3081 (lynx_wait_1): After having received a thread create/exit
3082 event, resume the inferior's execution using the signaling
3083 thread's ptid, rather than the old ptid.
3084
7fda33ae
JB
30852013-01-07 Joel Brobecker <brobecker@adacore.com>
3086
3087 * lynx-low.c (lynx_resume): Delete variable ret.
3088
b9786c74
JB
30892013-01-01 Joel Brobecker <brobecker@adacore.com>
3090
3091 * gdbreplay.c (gdbreplay_version): Update copyright year.
3092 * server.c (gdbserver_version): Likewise.
3093
8b93d60f
JB
30942012-12-17 Joel Brobecker <brobecker@adacore.com>
3095
3096 * lynx-low.c (lynx_wait_1): Add debug trace before adding
3097 new thread.
3098
037335a7
JB
30992012-12-17 Joel Brobecker <brobecker@adacore.com>
3100
3101 * lynx-low.c (ptrace_request_to_str): Add handling for
3102 PTRACE_GETTRACESIG.
3103
52d4cbd8
JB
31042012-12-17 Joel Brobecker <brobecker@adacore.com>
3105
3106 * lynx-low.c (lynx_attach): Delete variable new_process.
3107
ab8f6ca9
JB
31082012-12-17 Joel Brobecker <brobecker@adacore.com>
3109
3110 * lynx-low.c (lynx_create_inferior): Delete variable
3111 new_process.
3112
78cbc024
JB
31132012-12-17 Joel Brobecker <brobecker@adacore.com>
3114
3115 * lynx-low.c (ptrace_request_to_str): Do not handle
3116 PTRACE_GETTHREADLIST if this macro does not exist.
3117
14a00470
YQ
31182012-12-15 Yao Qi <yao@codesourcery.com>
3119
3120 * Makefile.in (OBS): Add notif.o.
3121 * notif.c, notif.h: New.
3122 * server.c: Include "notif.h".
3123 (struct vstop_notif) <next>: Remove.
3124 <base>: New field.
3125 (queue_stop_reply): Update.
3126 (push_event, send_next_stop_reply): Remove.
3127 (discard_queued_stop_replies): Update.
3128 (notif_stop): New variable.
3129 (handle_v_stopped): Remove.
3130 (handle_v_requests): Don't call handle_v_stopped. Call
3131 handle_ack_notif instead.
3132 (queue_stop_reply_callback): Call notif_event_enque instead
3133 of queue_stop_reply.
3134 (handle_status): Don't call send_next_stop_reply, call
3135 notif_write_event instead.
3136 (kill_inferior_callback): Likewise.
3137 (detach_or_kill_inferior_callback): Likewise.
3138 (main): Call initialize_notif.
3139 (process_serial_event): Call QUEUE_is_empty.
3140 (handle_target_event): Call notif_push instead of push event.
3141 * server.h (push_event): Remove declaration.
3142
61c125b9
TT
31432012-12-10 Tom Tromey <tromey@redhat.com>
3144
3145 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
3146 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
3147 macros.
3148 (.c.o): Rewrite.
3149 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
3150 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
3151 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
3152 (amd64-linux-ipa.o, ax.o): Rewrite.
3153 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
3154 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
3155 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
3156 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
3157 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
3158 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
3159 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
3160 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
3161 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
3162 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
3163 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
3164 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
3165 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
3166 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
3167 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
3168 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
3169 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
3170 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
3171 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
3172 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
3173 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
3174 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
3175 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
3176 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
3177 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
3178 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
3179 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
3180 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
3181 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
3182 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
3183 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
3184 (reg-tilegx.o): Remove.
3185 (all_object_files): New macro.
3186 Include .deps files.
3187 * aclocal.m4, configure: Rebuild.
3188 * acinclude.m4: Include depstand.m4, lead-dot.m4.
3189 * configure.ac: Invoke ZW_CREATE_DEPDIR,
3190 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
3191
e90e9ad9
TT
31922012-12-05 Tom Tromey <tromey@redhat.com>
3193
3194 PR gdb/14917:
3195 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
3196
02d403bf 31972012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
3198
3199 * configure.ac: Check for linux/perf_event.h.
3200 * config.in: Regenerated.
3201 * configure: Regenerated.
3202
0270a750
PA
32032012-11-26 Maxime Villard <rustyBSD@gmx.fr>
3204
3205 * hostio.c (handle_readlink): Decrease buffer size
3206 parameter passed to readlink by one byte.
3207
8c29b58e
YQ
32082012-11-26 Yao Qi <yao@codesourcery.com>
3209
3210 * configure.ac (build_warnings): Append '-Wempty-body'.
3211 * configure: Regenerated.
3212 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
3213 body.
3214
8bdce1ff
PM
32152012-11-15 Pierre Muller <muller@sourceware.org>
3216
3217 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
3218 * config.in: Regenerate.
3219 * configure: Regenerate.
3220 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
3221 Use "gdb_wait.h" header instead of <sys/wait.h> header.
3222 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
3223 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
3224 header.
3225 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
3226 instead of <sys/wait.h> header.
3227 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
3228
02d403bf 32292012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
3230
3231 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
3232 (various make rules): Remove -DGDBSERVER
3233
fbd5db48
YQ
32342012-11-09 Yao Qi <yao@codesourcery.com>
3235
3236 * spu-low.c (current_ptid): Move it to ..
3237 * gdbthread.h: ... here. New.
3238 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
3239 * server.c (myresume, process_serial_event): Likewise.
3240 * thread-db.c (thread_db_find_new_threads): Likewise.
3241 * tracepoint.c (run_inferior_command): Likewise.
3242
b3dc46ff
AB
32432012-10-01 Andrew Burgess <aburgess@broadcom.com>
3244
3245 * server.c (handle_search_memory_1): Include access length in
3246 warning message.
3247
07c04788
HPN
32482012-09-05 Michael Brandt <michael.brandt@axis.com>
3249
3250 * linux-crisv32-low.c: Fix compile errors.
3251
918d227b
YQ
32522012-09-04 Yao Qi <yao@codesourcery.com>
3253
3254 * tracepoint.c (cmd_qtsv): Adjust debug message.
3255 Don't check CUR_TPOINT.
3256
18c1b81a
YQ
32572012-08-28 Yao Qi <yao@codesourcery.com>
3258
3259 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
3260 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
3261 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
3262 Remove declarations of xmalloc, xreallloc, xstrdup and
3263 freeargv.
3264 * Makefile.in (libiberty_h): New.
3265 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
3266 (linux-bfin-low.o): Append dependency 'libiberty.h'.
3267
dc82f37b
YQ
32682012-08-23 Yao Qi <yao@codesourcery.com>
3269
3270 * server.h: Remove declaration of 'xsnprintf'.
3271
406b1477
KS
32722012-08-22 Keith Seitz <keiths@redhat.com>
3273
3274 * server.h: Include build-gnulib-gbserver/config.h.
3275 * gdbreplay.c: Likewise.
3276
e6712ff1
DE
32772012-08-08 Doug Evans <dje@google.com>
3278
3279 * Makefile.in (SFILES): Add gdb_vecs.c.
3280 (OBS): Add gdb_vecs.o.
3281 (gdb_vecs_h, host_defs_h): New variables.
3282 (thread-db.o): Add $(gdb_vecs_h) dependency.
3283 (gdb_vecs.o): New rule.
3284 * thread-db.c: #include "gdb_vecs.h".
3285 (thread_db_load_search): Use a vector to iterate over path elements.
3286 Handle text appearing after "$pdir".
3287
3288 * configure.ac: Add check for strstr.
3289 * config.in: Regenerate.
3290 * configure: Regenerate.
3291
7c3270ae
UW
32922012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
3293
3294 * hostio.c (handle_pread): If pread fails, fall back to attempting
3295 lseek/read.
3296 (handle_pwrite): Likewise for pwrite.
3297
b62e2b27
UW
32982012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
3299
3300 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
3301 between unsupported TYPE and unimplementable ADDR/LEN combination.
3302 (arm_insert_point): Act on new return value.
3303
78a99e91
PA
33042012-07-31 Pedro Alves <palves@redhat.com>
3305
3306 * server.c (process_point_options): Only skip tokens if we find
3307 one that is unrecognized. Don't treat 'X' specially while
3308 skipping unrecognized tokens.
3309
fcf303ab
UW
33102012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
3311
3312 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
3313 to 4-byte-align HW breakpoint addresses for Thumb.
3314
7255706c
YQ
33152012-07-27 Yao Qi <yao@codesourcery.com>
3316
3317 PR remote/14161.
3318
3319 * server.h: Declare gdb_agent_about_to_close.
3320 * target.c (kill_inferior): Include "agent.h".
3321 New. Send command 'kill'.
3322 * target.h (kill_inferior): Removed macro.
3323 * tracepoint.c (gdb_agent_about_to_close): New.
3324 (gdb_agent_helper_thread): Handle command 'close'.
3325 Wait endlessly until the inferior stops.
3326 Install gdb_agent_remove_socket to atexit hook.
3327 (agent_socket_name): New static variable.
3328 (gdb_agent_socket_init): Replace local variable 'name' with
3329 'agent_socket_name'.
3330 (gdb_agent_remove_socket): New.
3331
5a3f286f
YQ
33322012-07-27 Yao Qi <yao@codesourcery.com>
3333
3334 * server.c (process_point_options): Stop at 'X' when parsing.
3335
961bd387
ME
33362012-07-19 Michael Eager <eager@eagercon.com>
3337
a261b8f5 3338 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
3339 to hw_execute.
3340 * linux-x86-low.c (x86_insert_point, x86_remove_point):
3341 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
3342 hardware breakpoint.
3343
aa7c7447
JK
33442012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
3345
3346 * gdbserver/linux-low.c (initialize_low): Call
3347 linux_ptrace_init_warnings.
3348
7f216e7c
DE
33492012-07-02 Doug Evans <dje@google.com>
3350
3351 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
3352 pointer to int.
3353
d3ce09f5
SS
33542012-07-02 Stan Shebs <stan@codesourcery.com>
3355
3356 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
3357 (ax.o): Add it to build rule.
3358 (ax-ipa.o): Ditto.
3359 (OBS): Add format.o.
3360 (IPA_OBS): Add format.o.
3361 * server.c (handle_query): Claim support for breakpoint commands.
3362 (process_point_options): Add command case.
3363 (process_serial_event): Leave running if there are printfs in
3364 effect.
3365 * mem-break.h (any_persistent_commands): Declare.
3366 (add_breakpoint_commands): Declare.
3367 (gdb_no_commands_at_breakpoint): Declare.
3368 (run_breakpoint_commands): Declare.
3369 * mem-break.c (struct point_command_list): New struct.
3370 (struct breakpoint): New field command_list.
3371 (any_persistent_commands): New function.
3372 (add_commands_to_breakpoint): New function.
3373 (add_breakpoint_commands): New function.
3374 (gdb_no_commands_at_breakpoint): New function.
3375 (run_breakpoint_commands): New function.
3376 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
3377 locally.
3378 * ax.c: Include format.h.
3379 (ax_printf): New function.
3380 (gdb_eval_agent_expr): Add printf opcode.
3381
2f8f6aed
YQ
33822012-06-13 Yao Qi <yao@codesourcery.com>
3383
3384 * server.c (start_inferior): Remove duplicated writes to fields
3385 'last_resume_kind' and 'last_status' of 'current_inferior'.
3386
0c9070b3
YQ
33872012-06-12 Yao Qi <yao@codesourcery.com>
3388 Pedro Alves <palves@redhat.com>
3389
3390 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
3391 comment.
3392 * server.c (handle_v_cont): Extend comment.
3393
c52daf70
YQ
33942012-06-11 Yao Qi <yao@codesourcery.com>
3395
3396 * linux-low.c (linux_attach): Add 'static'.
3397
d38bbb0a
YQ
33982012-06-06 Yao Qi <yao@codesourcery.com>
3399
3400 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
3401
89dc0afd
JK
34022012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
3403
3404 Fix gcc -flto compilation warning.
3405 * server.c (main): Make variable multi_mode and attach volatile.
3406
75f62ce7
TJB
34072012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
3408
3409 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
3410 if the platform doesn't know about it.
3411
65f479b6
PA
34122012-05-30 Jeff Kenton <jkenton@tilera.com>
3413
3414 * Makefile.in (SFILES): Add linux-tile-low.c.
3415 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
3416 * configure.srv: Handle tilegx-*-linux*.
3417 * linux-tile-low.c: New file.
3418
0c5bf5a9
JK
34192012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
3420
3421 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
3422
a493e3e2
PA
34232012-05-24 Pedro Alves <palves@redhat.com>
3424
3425 PR gdb/7205
3426
43aaf8b6 3427 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 3428
2ea28649
PA
34292012-05-24 Pedro Alves <palves@redhat.com>
3430
3431 PR gdb/7205
3432
3433 Replace target_signal with gdb_signal throughout.
3434
8d409d16
MR
34352012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
3436
3437 * linux-low.c (linux_store_registers): Avoid the copying sequence
3438 when no data has been retrieved by ptrace.
3439
23512c01
MGD
34402012-05-22 Will Deacon <will.deacon@arm.com>
3441
3442 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
3443 Include asm/ptrace.h.
3444 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
3445 already defined.
3446
4934b29e
MR
34472012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
3448
3449 * linux-low.c (linux_store_registers): Don't re-retrieve data
3450 with ptrace that has already been obtained from /proc. Always
3451 copy any data retrieved with ptrace to the buffer supplied.
3452
bde24c0a
PA
34532012-05-11 Yao Qi <yao@codesourcery.com>
3454 Pedro Alves <palves@redhat.com>
3455
3456 * linux-low.c (enum stopping_threads_kind): New.
3457 (stopping_threads): Change type to `enum stopping_threads_kind'.
3458 (handle_extended_wait): If stopping and suspending threads, leave
3459 the new_lwp suspended too.
3460 (linux_wait_for_event): Adjust.
3461 (stop_all_lwps): Set `stopping_threads' to
3462 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
3463 whether we're suspending threads or just stopping them. Assert no
3464 recursion happens.
3465
623b6bdf
YQ
34662012-04-29 Yao Qi <yao@codesourcery.com>
3467
3468 * server.h: Move some code to ...
3469 * gdbthread.h: ... here. New.
3470 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
3471 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
3472 (nto-low.o, win32-low.o): Likewise.
3473 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
3474 * regcache.c, remote-utils.c, server.c: Likewise.
3475 * target.c, tracepoint.c, win32-low.c: Likewise.
3476
f15f9948
TJB
34772012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
3478
3479 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
3480 (PTRACE_ARG4_TYPE): Likewise.
3481 (PTRACE_XFER_TYPE): Likewise.
3482 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
3483 ptrace to PTRACE_ARG3_TYPE.
3484 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
3485 (PTRACE_ARG4_TYPE): Likewise.
3486 (PTRACE_XFER_TYPE): Likewise.
3487 (linux_detach_one_lwp): Cast fourth argument of
3488 ptrace to long then PTRACE_ARG4_TYPE.
3489 (regsets_fetch_inferior_registers): Cast third argument of
3490 ptrace to long then PTRACE_ARG3_TYPE.
3491 (regsets_store_inferior_registers): Likewise.
3492
38ea300a
PA
34932012-04-20 Pedro Alves <palves@redhat.com>
3494
3495 * configure: Regenerate.
3496
c971b7fa
PA
34972012-04-19 Pedro Alves <palves@redhat.com>
3498
43aaf8b6 3499 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 3500 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
3501 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
3502 (all, install-only, uninstall, clean-info, all-lib, clean): No
3503 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
3504 (maintainer-clean realclean distclean): Use subdir_do.
3505 (subdir_do): New.
3506 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 3507 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
3508 * acinclude.m4: Include acx_configure_dir.m4.
3509 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
3510 calls. Call AC_PROG_RANLIB. Configure gnulib using
3511 ACX_CONFIGURE_DIR.
3512 (GNULIB): New.
3513 (GNULIB_STDINT_H): Adjust.
3514 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
3515 * gdbreplay.c: Include build-gnulib/config.h.
3516 * server.h: Likewise.
3517 * aclocal.m4: Regenerate.
3518 * config.in: Regenerate.
3519 * configure: Regenerate.
c971b7fa 3520
809277f8
PA
35212012-04-19 Pedro Alves <palves@redhat.com>
3522
3523 * Makefile.in (LIBGNU, INCGNU): Adjust.
3524 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
3525 (all, install-only, uninstall, clean-info, all-lib, clean)
3526 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
3527 * configure.ac: Adjust AC_OUTPUT output.
3528 * aclocal.m4: Regenerate.
3529 * configure: Regenerate.
3530
fd9bb8b8
PA
35312012-04-19 Pedro Alves <palves@redhat.com>
3532
3533 * Makefile.in (generated_files): New.
3534 (server_h): Remove the explicit dependency on config.h, and depend
3535 on $generated_files.
3536
1c298c66
PA
35372012-04-19 Pedro Alves <palves@redhat.com>
3538
3539 * Makefile.in (INCGNU): Add -Ignulib.
3540
57c4b50b
PA
35412012-04-19 Pedro Alves <palves@redhat.com>
3542
3543 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
3544 (INCGNU): ... this, and spell out -I here.
3545 (GNULIB_LIB): Rename to ...
3546 (LIBGNU): ... this.
3547 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
3548
1030e047
PA
35492012-04-19 Pedro Alves <palves@redhat.com>
3550
3551 * config.in: Regenerate.
3552
447d4319
PA
35532012-04-19 Pedro Alves <palves@redhat.com>
3554
3555 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
3556 * server.h (memmem): Remove declaration.
3557 * config.in: Regenerate.
3558 * configure: Regenerate.
3559
aad9eab9
YQ
35602012-04-19 Yao Qi <yao@codesourcery.com>
3561
3562 * Makefile.in (SFILES): Add common/vec.c.
3563 (OBS): Add vec.o.
3564 (vec.o): New rule.
3565
3e10640f
YQ
35662012-04-19 Yao Qi <yao@codesourcery.com>
3567
3568 * remote-utils.c (prepare_resume_reply): Replace with macro
3569 target_core_of_thread.
3570 * server.c (handle_qxfer_threads_proper): Likewise.
3571 * target.h (traget_core_of_thread): New macro.
3572
71622373
PA
35732012-04-18 Pedro Alves <palves@redhat.com>
3574
3575 * aclocal.m4: Regenerate.
3576 * configure: Regenerate.
3577
80d26939
YQ
35782012-04-16 Yao Qi <yao@codesourcery.com>
3579
3580 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
3581 duplicated on address.
3582
42476b70
YQ
35832012-04-16 Yao Qi <yao@codesourcery.com>
3584
3585 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
3586 (struct tracepoint_action_ops) <send>: New field.
3587 (m_tracepoint_action_send, r_tracepoint_action_send): New.
3588 (agent_expr_send, x_tracepoint_action_send): New.
3589 (l_tracepoint_action_send): New.
3590 (cmd_qtdp): Download and install tracepoint
3591 according to `use_agent'.
3592 (run_inferior_command): Add one more parameter `len'.
3593 Update callers.
3594 (tracepoint_send_agent): New.
3595 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
3596
7bc83639
YQ
35972012-04-16 Yao Qi <yao@codesourcery.com>
3598
3599 * tracepoint.c (download_tracepoints): Moved to ...
3600 (cmd_qtstart): ... here.
3601
5f18041e
YQ
36022012-04-14 Yao Qi <yao@codesourcery.com>
3603
3604 * tracepoint.c: Include inttypes.h.
3605 (struct collect_memory_action): Use sized types.
3606 (struct tracepoint): Likewise.
3607 (cmd_qtdp, stop_tracing): Update print specifiers.
3608 (cmd_qtp, response_tracepoint): Likewise.
3609 (collect_data_at_tracepoint): Likewise.
3610 (collect_data_at_step): Likewise.
3611
55a8c076
YQ
36122012-04-14 Yao Qi <yao@codesourcery.com>
3613
3614 Import gnulib module inttypes.
3615 * aclocal.m4, config.in, configure: Regenerated.
3616
dc750257
YQ
36172012-04-14 Yao Qi <yao@codesourcery.com>
3618
3619 * Makefile.in (maintainer-clean, realclean, distclean): Remove
3620 Makefile and config.status at last.
3621
0ab5faf9
YQ
36222012-04-13 Yao Qi <yao@codesourcery.com>
3623
3624 * tracepoint.c: Include stdint.h unconditionally.
3625
18f5fd81
TJB
36262012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
3627
3628 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
3629 on BFD_HAVE_SYS_PROCFS_TYPE.
3630 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
3631 * configure: Regenerate.
3632 * config.in: Likewise.
3633
4d47af5c
L
36342012-04-13 H.J. Lu <hongjiu.lu@intel.com>
3635
3636 * Makefile.in (clean): Also remove x32.c x32-linux.c
3637 x32-avx.c x32-avx-linux.c.
3638 (x32.o): New target.
3639 (x32.c): Likewise.
3640 (x32-linux.o): Likewise.
3641 (x32-linux.c): Likewise.
3642 (x32-avx.o): Likewise.
3643 (x32-avx.c): Likewise.
3644 (x32-avx-linux.o): Likewise.
3645 (x32-avx-linux.c): Likewise.
3646
3647 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
3648 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
3649 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
3650 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
3651 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
3652 i386/x32-avx-linux.xml.
3653
3654 * linux-x86-low.c (init_registers_x32_linux): New prototype.
3655 (init_registers_x32_avx_linux): Likwise.
3656 (x86_linux_update_xmltarget): Call init_registers_x32_linux
3657 or init_registers_x32_avx_linux if linux_is_elf64 is false.
3658
ecedbe58
PA
36592012-04-13 Pedro Alves <palves@redhat.com>
3660
3661 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
3662 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
3663 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
3664 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
3665 the sub-make.
3666
c92b5177
L
36672012-04-12 H.J. Lu <hongjiu.lu@intel.com>
3668
3669 * linux-x86-low.c (compat_x32_clock_t): New.
3670 (compat_x32_siginfo_t): Likewise.
3671 (compat_x32_siginfo_from_siginfo): Likewise.
3672 (siginfo_from_compat_x32_siginfo): Likewise.
3673 (linux_is_elf64): Likewise.
3674 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
3675 and siginfo_from_compat_x32_siginfo for x32.
3676 (x86_arch_setup): Set linux_is_elf64.
3677
214d508e
L
36782012-04-12 H.J. Lu <hongjiu.lu@intel.com>
3679
3680 PR gdb/13969
3681 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
3682 e_machine field.
3683 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
3684 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
3685 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
3686 compatible with process.
3687
c9a1864a
YQ
36882012-04-12 Yao Qi <yao@codesourcery.com>
3689
3690 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
3691 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
3692 (install-only, install-info, clean): Handle sub dir gnulib.
3693 (all-lib, am--refresh): New targets.
3694 (memmem.o): Remove target.
3695 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
3696 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
3697 (AC_REPLACE_FUNCS): Remove memmem.
3698 Invoke gl_INIT and AM_INIT_AUTOMAKE.
3699 (AC_OUTPUT): Generate Makefile in gnulib/.
3700 * aclocal.m4, config.in, configure: Regenerated.
3701
367ba2c2
MR
37022012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
3703
3704 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
3705
9d236627
PA
37062012-04-05 Pedro Alves <palves@redhat.com>
3707
3708 -Werror=strict-aliasing
3709
3710 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
3711 pointer.
3712
111217b3
PA
37132012-04-04 Pedro Alves <palves@redhat.com>
3714
3715 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
3716 (sparc_store_gregset_from_stack, sparc_store_gregset)
3717 (sparc_breakpoint_at): Fix formatting.
3718
8365dcf5
TJB
37192012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
3720
3721 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
3722 are available.
3723 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
3724 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
3725 * config.in: Regenerate.
3726 * configure: Likewise.
3727
689cc2ae
PA
37282012-03-29 Pedro Alves <palves@redhat.com>
3729
3730 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
3731 Correct ptrace arguments.
3732
c14dfd32
PA
37332012-03-28 Pedro Alves <palves@redhat.com>
3734
3735 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
3736 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
3737 (IA64_FR1_REGNUM): New defines.
3738 (ia64_fetch_register): New.
3739 (the_low_target): Install it.
3740 * linux-low.h (struct linux_target_ops) <fetch_register>: New
3741 field.
3742 * linux-low.c (linux_fetch_registers): Try the
3743 the_low_target.fetch_register hook first.
3744
3745 * linux-arm-low.c (the_low_target): Adjust.
3746 * linux-bfin-low.c (the_low_target): Adjust.
3747 * linux-cris-low.c (the_low_target): Adjust.
3748 * linux-crisv32-low.c (the_low_target): Adjust.
3749 * linux-m32r-low.c (the_low_target): Adjust.
3750 * linux-m68k-low.c (the_low_target): Adjust.
3751 * linux-mips-low.c (the_low_target): Adjust.
3752 * linux-ppc-low.c (the_low_target): Adjust.
3753 * linux-s390-low.c (the_low_target): Adjust.
3754 * linux-sh-low.c (the_low_target): Adjust.
3755 * linux-sparc-low.c (the_low_target): Adjust.
3756 * linux-tic6x-low.c (the_low_target): Adjust.
3757 * linux-x86-low.c (the_low_target): Adjust.
3758 * linux-xtensa-low.c (the_low_target): Adjust.
3759
63c88e13
PA
37602012-03-26 Pedro Alves <palves@redhat.com>
3761
3762 * server.c (handle_qxfer_libraries): Don't bail early if
3763 the_target->qxfer_libraries_svr4 is not NULL.
3764
fb723180
PA
37652012-03-26 Pedro Alves <palves@redhat.com>
3766
3767 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
3768
0afae3cf
PA
37692012-03-23 Pedro Alves <palves@redhat.com>
3770
3771 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
3772 "library-list-svr4" element's start tag when the the DSO list is
3773 empty.
3774
485f1ee4
PA
37752012-03-23 Pedro Alves <palves@redhat.com>
3776
3777 * linux-low.c (read_one_ptr): Read the inferior's pointer through
3778 a variable whose type size is the same as the inferior's pointer
3779 size.
3780
a5362b9a
TS
37812012-03-21 Thomas Schwinge <thomas@codesourcery.com>
3782
3783 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
3784 struct siginfo.
3785 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
3786 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
3787 * linux-low.h: Include <signal.h>.
3788 (struct siginfo): Remove forward declaration.
3789 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
3790 struct siginfo.
3791
d226c142
MF
37922012-03-21 Mike Frysinger <vapier@gentoo.org>
3793
3794 * .gitignore: Ignore more files.
3795
122f36ef
PA
37962012-03-19 Pedro Alves <palves@redhat.com>
3797 Jan Kratochvil <jan.kratochvil@redhat.com>
3798
3799 * server.c (cont_thread, general_thread): Add describing comments.
3800 (start_inferior): Clear `cont_thread'.
3801 (handle_v_cont): Don't set `cont_thread' if resuming all threads
3802 of a process.
3803
fc3e5175
YQ
38042012-03-15 Yao Qi <yao@codesourcery.com>
3805
3806 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
3807 handling to ...
3808 (cmd_qtdp): ... here.
3809
8d0d92cd
YQ
38102012-03-15 Yao Qi <yao@codesourcery.com>
3811
3812 * tracepoint.c (struct tracepoint_action_ops): New.
3813 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
3814 (m_tracepoint_action_download): New.
3815 (r_tracepoint_action_download): New.
3816 (x_tracepoint_action_download): New.
3817 (l_tracepoint_action_download): New.
3818 (add_tracepoint_action): Install `action->ops' according type.
3819 (download_tracepoint_1): Move code `download' function pointer
3820 of various tracepoint_action_ops.
3821
87b0bb13
JK
38222012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
3823
3824 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
3825 linux_ptrace_attach_warnings.
3826
5f572dec
JK
38272012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
3828
3829 * Makefile.in (linux-ptrace.o): New.
3830 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
3831 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
3832 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
3833 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
3834 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
3835 of these targets.
3836 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
3837
f4647387
YQ
38382012-03-08 Yao Qi <yao@codesourcery.com>
3839 Pedro Alves <palves@redhat.com>
3840
3841 Fix PR server/13392.
3842 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
3843 offset of JMP insn.
3844 * tracepoint.c (remove_tracepoint): New.
3845 (cmd_qtdp): Call remove_tracepoint when failed to install.
3846
9b224c5e
PA
38472012-03-07 Pedro Alves <palves@redhat.com>
3848
3849 * linux-low.c (get_detach_signal): New.
3850 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
3851 Pass on pending signals to PTRACE_DETACH. Check the result of the
3852 ptrace call.
3853 * server.c (program_signals, program_signals_p): New.
3854 (handle_general_set): Handle QProgramSignals.
3855 * server.h (program_signals, program_signals_p): Declare.
3856
e237a7e2
JK
38572012-03-05 Pedro Alves <palves@redhat.com>
3858 Jan Kratochvil <jan.kratochvil@redhat.com>
3859
3860 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
3861 New comment why.
3862
5808517f
YQ
38632012-03-03 Yao Qi <yao@codesourcery.com>
3864
3865 * tracepoint.c (tracepoint_look_up_symbols): Update call to
3866 agent_look_up_symbols.
3867
58b4daa5
YQ
38682012-03-03 Yao Qi <yao@codesourcery.com>
3869
3870 * Makefile.in (linux-low.o): Keep dependence on agent.h.
3871 (linux-x86-low.o): Likewise.
3872 * server.h: Remove in_process_agent_loaded.
3873 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
3874 common/agent.c.
3875 Update callers.
3876
8ffcbaaf
YQ
38772012-03-03 Yao Qi <yao@codesourcery.com>
3878
3879 * tracepoint.c (gdb_agent_capability): New global.
3880 (in_process_agent_loaded_ust): Renamed to
3881 `in_process_agent_supports_ust'.
3882 Update callers.
3883 (in_process_agent_supports_ust): Call agent_capability_check.
3884 (clear_installed_tracepoints): Assert that agent supports
3885 agent.
3886
d1feda86
YQ
38872012-03-03 Yao Qi <yao@codesourcery.com>
3888
3889 * linux-low.c (linux_supports_agent): New.
3890 (linux_target_ops): Initialize field `supports_agent' with
3891 linux_supports_agent.
3892 * target.h (struct target_ops) <supports_agent>: New.
3893 (target_supports_agent): New macro.
3894 * server.c (handle_general_set): Handle packet 'QAgent'.
3895 (handle_query): Send `QAgent+'.
3896 * Makefile.in (server.o): Depends on agent.h.
3897
2fa291ac
YQ
38982012-03-03 Yao Qi <yao@codesourcery.com>
3899
3900 * Makefile.in (OBS): Add agent.o.
3901 Add new rule for agent.o.
3902 Track dependence of tracepoint.c on agent.h.
3903 * tracepoint.c (run_inferior_command_1):
3904 (run_inferior_command): Call agent_run_command.
3905 (gdb_ust_connect_sync_socket): Deleted. Move it to
3906 common/agent.c.
3907 (resume_thread, stop_thread): Likewise.
3908 (gdb_ust_socket_init): Renamed to ...
3909 (gdb_agent_socket_init): ... New.
3910 (gdb_ust_thread): Renamed to ...
3911 (gdb_agent_helper_thread): ... New.
3912 (gdb_ust_init): Move some code to ...
3913 (gdb_agent_init): ... here. New.
3914 [HAVE_UST]: Call gdb_ust_init.
3915 (initialize_tracepoint_ftlib): Call gdb_agent_init.
3916 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
3917 * config.in, configure: Regenerated.
3918
05044653
PA
39192012-03-02 Pedro Alves <palves@redhat.com>
3920
3921 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
3922 * linux-low.c (struct simple_pid_list): New.
3923 (stopped_pids): New a struct simple_pid_list pointer.
3924 (add_to_pid_list, pull_pid_from_list): New.
3925 (handle_extended_wait): Don't assume the first signal new children
3926 report is SIGSTOP. Adjust call to pull_pid_from_list.
3927 (linux_wait_for_lwp): Adjust.
3928
8d00225b
YQ
39292012-03-02 Yao Qi <yao@codesourcery.com>
3930
3931 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
3932 debug log.
3933
19560ba5
YQ
39342012-03-02 Yao Qi <yao@codesourcery.com>
3935
3936 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
3937 `stop_pc' and `tpoint'. Update caller.
3938
1faeff08
MR
39392012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
3940
3941 * linux-low.h (linux_target_ops): Add regset_bitmap member.
3942 * linux-low.c (use_linux_regsets): New macro.
3943 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
3944 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
3945 (linux_register_in_regsets): New function.
3946 (usr_fetch_inferior_registers): Skip registers covered by
3947 regsets.
3948 (usr_store_inferior_registers): Likewise.
3949 (usr_fetch_inferior_registers): New macro.
3950 (usr_store_inferior_registers): Likewise.
3951 (linux_fetch_registers): Handle mixed regset/non-regset targets.
3952 (linux_store_registers): Likewise.
3953 * linux-mips-low.c (init_registers_mips_dsp_linux): New
3954 prototype.
3955 (init_registers_mips64_dsp_linux): Likewise.
3956 (init_registers_mips_linux): New macro.
3957 (init_registers_mips_dsp_linux): Likewise.
3958 (mips_dsp_num_regs): Likewise.
3959 (DSP_BASE, DSP_CONTROL): New fallback macros.
3960 (mips_base_regs): New macro.
3961 (mips_regmap): Use it. Fix the size.
3962 (mips_dsp_regmap): New variable.
3963 (mips_dsp_regset_bitmap): Likewise.
3964 (mips_arch_setup): New function.
3965 (mips_cannot_fetch_register): Use the_low_target.regmap rather
3966 than mips_regmap.
3967 (mips_cannot_store_register): Likewise.
3968 (the_low_target): Update .arch_setup, .num_regs and .regmap
3969 initializers. Add .regset_bitmap initializer.
3970 * linux-arm-low.c (the_low_target): Add .regset_bitmap
3971 initializer.
3972 * linux-bfin-low.c (the_low_target): Likewise.
3973 * linux-cris-low.c (the_low_target): Likewise.
3974 * linux-crisv32-low.c (the_low_target): Likewise.
3975 * linux-ia64-low.c (the_low_target): Likewise.
3976 * linux-m32r-low.c (the_low_target): Likewise.
3977 * linux-m68k-low.c (the_low_target): Likewise.
3978 * linux-ppc-low.c (the_low_target): Likewise.
3979 * linux-s390-low.c (the_low_target): Likewise.
3980 * linux-sh-low.c (the_low_target): Likewise.
3981 * linux-sparc-low.c (the_low_target): Likewise.
3982 * linux-tic6x-low.c (the_low_target): Likewise.
3983 * linux-x86-low.c (the_low_target): Likewise.
3984 * linux-xtensa-low.c (the_low_target): Likewise.
3985 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
3986 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
3987 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
3988 srv_xmlfiles.
3989 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
3990 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
3991
c03e6ccc
YQ
39922012-02-29 Yao Qi <yao@codesourcery.com>
3993 Pedro Alves <palves@redhat.com>
3994
3995 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
3996 `step_over_finished' is true.
3997
644cebc9
PA
39982012-02-27 Pedro Alves <palves@redhat.com>
3999
4000 * linux-low.c (pid_is_stopped): Delete, moved to common/.
4001 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
4002
c14d7ab2
PA
40032012-02-27 Pedro Alves <palves@redhat.com>
4004
4005 PR server/9684
4006 * linux-low.c (pid_is_stopped): New.
4007 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
4008
412c89dd
LM
40092012-02-25 Luis Machado <lgustavo@codesourcery.com>
4010
4011 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
4012 of conditions.
4013
b745defe
MR
40142012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
4015
4016 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
4017
9f3a5c85
LM
40182012-02-24 Luis Machado <lgustavo@codesourcery>
4019
4020 * server.c (handle_query): Advertise support for target-side
4021 breakpoint condition evaluation.
4022 (process_point_options): New function.
4023 (process_serial_event): When inserting a breakpoint, check for
4024 a target-side condition that should be evaluated.
4025
4026 * mem-break.c: Include regcache.h and ax.h.
4027 (point_cond_list_t): New data structure.
4028 (breakpoint) <cond_list>: New field.
4029 (find_gdb_breakpoint_at): Make non-static.
4030 (delete_gdb_breakpoint_at): Clear any target-side
4031 conditions.
4032 (clear_gdb_breakpoint_conditions): New function.
4033 (add_condition_to_breakpoint): Likewise.
4034 (add_breakpoint_condition): Likewise.
4035 (gdb_condition_true_at_breakpoint): Likewise.
4036 (gdb_breakpoint_here): Return result directly instead
4037 of going through a local variable.
4038
4039 * mem-break.h (find_gdb_breakpoint_at): New prototype.
4040 (clear_gdb_breakpoint_conditions): Likewise.
4041 (add_breakpoint_condition): Likewise.
4042 (gdb_condition_true_at_breakpoint): Likewise.
4043
4044 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
4045 (need_step_over_p): Take target-side breakpoint condition into
4046 consideration.
4047
5e1dc496
LM
40482012-02-24 Luis Machado <lgustavo@codesourcery>
4049
4050 * server.h: Include tracepoint.h.
4051 (agent_mem_read, agent_get_trace_state_variable_value,
4052 agent_set_trace_state_variable_value,
4053 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
4054 get_set_tsv_func_addr): New prototypes.
4055
4056 * ax.h: New include file.
4057 * ax.c: New source file.
4058
4059 * tracepoint.c: Include ax.h.
4060 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
4061 agent_expr, eval_result_type): Move to ax.h.
4062 (parse_agent_expr): Rename to ...
4063 (gdb_parse_agent_expr): ... this, make it non-static and move
4064 to ax.h.
4065 (unparse_agent_expr) Rename to ...
4066 (gdb_unparse_agent_expr): ... this, make it non-static and move
4067 to ax.h.
4068 (eval_agent_expr): Rename to ...
4069 (eval_tracepoint_agent_expr): ... this.
4070 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
4071 forward declarations.
4072 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
4073 (agent_get_trace_state_variable_value): New function.
4074 (agent_set_trace_state_variable_value): New function.
4075 (cmd_qtdp): Call gdb_parse_agent_expr (...).
4076 (response_tracepoint): Call gdb_unparse_agent_expr (...).
4077 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
4078 (condition_true_at_tracepoint): Likewise.
4079 (parse_agent_expr): Rename to ...
4080 (gdb_parse_agent_expr): ... this and move to ax.c.
4081 (unparse_agent_expr): Rename to ...
4082 (gdb_unparse_agent_expr): ... this and move to ax.c.
4083 (gdb_agent_op_name): Move to ax.c.
4084 (eval_agent_expr): Rename to ...
4085 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
4086 and move to ax.c.
4087 (eval_tracepoint_agent_expr): New function.
4088 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 4089 non-static.
5e1dc496
LM
4090 (current_insn_ptr, emit_error, struct bytecode_address): Move to
4091 ax.c.
4092 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
4093 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
4094 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
4095 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
4096 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
4097 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
4098 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
4099 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
4100 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
4101 (compile_bytecodes): Remove forward declaration.
4102 (is_goto_target): Move to ax.c.
4103 (compile_bytecodes): Move to ax.c and call
4104 agent_get_trace_state_variable_value (...) and
4105 agent_set_trace_state_variable_value (...).
4106
4107 * Makefile.in: Update ax.c and IPA dependencies.
4108
277e4e52
PA
41092012-02-24 Pedro Alves <palves@redhat.com>
4110
4111 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
4112 (cmd_bigqtbuffer_circular): ... this. Only handle
4113 'QTBuffer:circular:'.
4114 (handle_tracepoint_general_set): Adjust.
4115
bf4c19f7
YQ
41162012-02-16 Yao Qi <yao@codesourcery.com>
4117
4118 * inferiors.c: Move code to ...
4119 * dll.c: .... here. New.
4120 * server.h: Declare clear_dlls.
4121 * Makefile.in (SFILES): Add dll.c.
4122 (OBS): Add dll.o
4123 (dll.o): New rule.
4124
d73f2619
YQ
41252012-02-11 Yao Qi <yao@codesourcery.com>
4126
4127 * server.c: (handle_monitor_command): Add a new parameter
4128 `own_buf'.
4129 (handle_query): Update caller.
4130
f8255c2a
JB
41312012-02-09 Joel Brobecker <brobecker@adacore.com>
4132
4133 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
4134 * configure, config.in: Regenerate.
4135 * hostio.c: Provide an alternate implementation if HAVE_READLINK
4136 is not defined.
4137
da84f473
PA
41382012-02-02 Pedro Alves <palves@redhat.com>
4139
4140 Try SIGKILL first, then PTRACE_KILL.
4141 * linux-low.c (linux_kill_one_lwp): New.
4142 (linux_kill_one_lwp): Rename to ...
4143 (kill_one_lwp_callback): ... this. Use the new
4144 linux_kill_one_lwp.
4145
e886a173
PA
41462012-02-02 Pedro Alves <palves@redhat.com>
4147
4148 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
4149 inferior.
4150
be07f1a2
PA
41512012-01-27 Pedro Alves <palves@redhat.com>
4152
4153 * linux-low.c (linux_child_pid_to_exec_file): Delete.
4154 (elf_64_file_p): Make static.
4155 (linux_pid_exe_is_elf_64_file): New.
4156 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
4157 Delete declarations.
4158 (linux_pid_exe_is_elf_64_file): Declare.
4159 * linux-x86-low.c (x86_arch_setup): Use
4160 linux_pid_exe_is_elf_64_file.
4161
d8301ad1
JK
41622012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
4163
4164 * linux-low.c (linux_wait_for_event_1): Rename to ...
4165 (linux_wait_for_event): ... here and merge it with former
4166 linux_wait_for_event - new variable wait_ptid, use it.
4167 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
4168
01b17894
PA
41692012-01-23 Pedro Alves <palves@redhat.com>
4170
4171 * server.c (main): Avoid yet another case of infinite loop while
4172 detaching/killing after a longjmp.
4173
e825046f
JK
41742012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
4175
4176 Code cleanup.
4177 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
4178
b9e7b9c3
UW
41792012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
4180
4181 * hostio.c (handle_readlink): New function.
4182 (handle_vFile): Call it to handle "vFile:readlink" packets.
4183
901f9912
UW
41842012-01-20 Pedro Alves <palves@redhat.com>
4185 Ulrich Weigand <ulrich.weigand@linaro.org>
4186
4187 * server.c (handle_v_requests): Only support vAttach and vRun to
4188 start multiple processes when in extended protocol mode.
4189
fc1ab1a0
PA
41902012-01-17 Pedro Alves <palves@redhat.com>
4191
4192 * tracepoint.c (initialize_tracepoint): Use mmap instead of
4193 memalign plus mprotect to allocate the scratch buffer.
4194
7d5d4e98
PA
41952012-01-13 Pedro Alves <palves@redhat.com>
4196
4197 * server.c (attach_inferior): Clear `cont_thread'.
4198
f128d5e9
PA
41992012-01-13 Pedro Alves <palves@redhat.com>
4200
4201 * server.c (main): Avoid infinite loop while detaching/killing
4202 after a longjmp.
4203
06db92f0
DE
42042012-01-09 Doug Evans <dje@google.com>
4205
4206 * server.c (start_inferior): Set last_ptid in --wrapper case.
4207
32d92999
YQ
42082012-01-06 Yao Qi <yao@codesourcery.com>
4209
4210 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
4211 defined.
4212 [IN_PROCESS_AGENT] (debug_agent): New global variable.
4213
5e0a92a9
YQ
42142012-01-04 Yao Qi <yao@codesourcery.com>
4215
4216 * tracepoint.c (cmd_qtdp): Print debug message
4217 for static tracepoint.
4218
ae639e8c
YQ
42192012-01-04 Yao Qi <yao@codesourcery.com>
4220
4221 * tracepoint.c (trace_vdebug): Differentiate debug message
4222 between gdbserver and IPA.
4223
f72429c5
YQ
42242012-01-03 Yao Qi <yao@codesourcery.com>
4225
4226 * tracepoint.c (tracepoint_was_hit): Don't collect for
4227 static tracepoint.
4228
12c3e59c
JB
42292012-01-02 Joel Brobecker <brobecker@adacore.com>
4230
4231 * terminal.h: Reformat copyright header.
4232
67827812
JB
42332012-01-02 Joel Brobecker <brobecker@adacore.com>
4234
4235 * server.c (gdbserver_version): Update copyright year.
4236 * gdbreplay.c (gdbreplay_version): Likewise.
4237
3e52c33d
JK
42382011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
4239
4240 * linux-low.c (linux_create_inferior): Put empty if clause for write.
4241
4242 Revert:
4243 2011-12-18 Hui Zhu <teawater@gmail.com>
4244 * linux-low.c (linux_create_inferior): Save return value to ret.
4245
66f1260e
HZ
42462011-12-18 Hui Zhu <teawater@gmail.com>
4247
4248 * linux-low.c (linux_create_inferior): Save return value to ret.
4249
e77616d7
DE
42502011-12-16 Doug Evans <dje@google.com>
4251
e7b06c57
DE
4252 * linux-low.c (linux_create_inferior): If stdio connection,
4253 redirect stdin from /dev/null, stdout to stderr.
4254 * remote-utils.c (remote_is_stdio): New static global.
4255 (remote_connection_is_stdio): New function.
4256 (remote_prepare): Handle stdio connection.
4257 (remote_open): Ditto.
4258 (remote_close): Don't close stdin for stdio connections.
4259 (read_prim,write_prim): New functions. Replace all calls to
4260 read/write to these.
4261 * server.c (main): Watch for "-" argument. Move call to
4262 remote_prepare before start_inferior.
4263 * server.h (STDIO_CONNECTION_NAME): New macro.
4264 (remote_connection_is_stdio): Declare.
4265
e77616d7
DE
4266 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
4267 in debugging output.
4268
82067193
YQ
42692011-12-15 Yao Qi <yao@codesourcery.com>
4270
4271 * tracepoint.c: Include sys/syscall.h.
4272 (gdb_ust_thread): Remove preprocessor conditional.
4273
82bfbe7e
PA
42742011-12-14 Pedro Alves <pedro@codesourcery.com>
4275
4276 * linux-low.c (linux_detach_one_lwp): Call
4277 the_low_target.prepare_to_resume before detaching.
4278
712c6575
YQ
42792011-12-14 Yao Qi <yao@codesourcery.com>
4280
4281 * tracepoint.c (gdb_ust_thread): Don't ignore return value
4282 of write.
4283
d54d1edf
YQ
42842011-12-14 Yao Qi <yao@codesourcery.com>
4285
4286 * i386-low.c (i386_low_stopped_data_address): Initialize local
4287 variable `control'.
4288
6210a125
PA
42892011-12-13 Pedro Alves <pedro@codesourcery.com>
4290
4291 PR remote/13492
4292
4293 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
4294 DR_CONTROL unless necessary. Extend comments.
4295 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
4296 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
4297
2ece8244
YQ
42982011-12-13 Yao Qi <yao@codesourcery.com>
4299
4300 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
4301 macros.
4302 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
4303
784867a5
JK
43042011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
4305
4306 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
4307 Print new debug message for such case.
4308
6bf36717
JK
43092011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
4310
4311 Fix overlapping memcpy.
4312 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
4313 the read_inferior_memory transfer.
4314 (delete_fast_tracepoint_jump): New variable buf. Use it for the
4315 write_inferior_memory transfer.
4316 (set_fast_tracepoint_jump): New variable buf. Use it for the
4317 read_inferior_memory and write_inferior_memory transfers.
4318 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
4319 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
4320 Use it for the write_inferior_memory transfer.
4321 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
4322 buffers.
4323
50275556
MR
43242011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
4325
4326 * linux-low.c (fetch_register, store_register): Make code
4327 consistent, fix formatting.
4328
7325beb4
MR
43292011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
4330
4331 * linux-low.c (usr_store_inferior_registers): Factor out code
4332 to handle individual registers into...
4333 (store_register): ... this new function.
4334
c642a434
UW
43352011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
4336
4337 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
4338 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
4339 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
4340 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
4341 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
4342 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
4343 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
4344 (srv_xmlfiles): Add new XML files.
4345
4346 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
4347 and <sys/uio.h>.
4348 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
4349 (init_registers_s390_linux32v1): Add prototype.
4350 (init_registers_s390_linux32v2): Likewise.
4351 (init_registers_s390_linux64v1): Likewise.
4352 (init_registers_s390_linux64v2): Likewise.
4353 (init_registers_s390x_linux64v1): Likewise.
4354 (init_registers_s390x_linux64v2): Likewise.
4355 (s390_num_regs): Increment to 52.
4356 (s390_regmap): Add orig_r2 register.
4357 (s390_num_regs_3264): Increment to 68.
4358 (s390_regmap_3264): Add orig_r2 register.
4359 (s390_collect_ptrace_register): Handle orig_r2 register.
4360 (s390_supply_ptrace_register): Likewise.
4361 (s390_fill_last_break): New function.
4362 (s390_store_last_break): Likewise.
4363 (s390_fill_system_call): New function.
4364 (s390_store_system_call): Likewise.
4365 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
4366 register sets.
4367 (s390_check_regset): New function.
4368 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
4369 NT_S390_SYSTEM_CALL regsets and use appropriate description.
4370 Update target_regsets for available register sets.
4371
2268b414
JK
43722011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
4373 Jan Kratochvil <jan.kratochvil@redhat.com>
4374
4375 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
4376 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
4377 New.
4378 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
4379 * linux-low.h (struct process_info_private): New member r_debug.
4380 * server.c (handle_qxfer_libraries): Call
4381 the_target->qxfer_libraries_svr4.
4382 (handle_qxfer_libraries_svr4): New function.
4383 (qxfer_packets): New entry "libraries-svr4".
4384 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
4385 * target.h (struct target_ops): New member qxfer_libraries_svr4.
4386 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
4387 PACKET_qXfer_libraries_svr4.
4388
d6db1fab
UW
43892011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
4390
4391 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
4392 PSW address/mask between 8-byte and 16-byte formats.
4393 (s390_supply_ptrace_register): Likewise.
4394 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
4395 basic addressing mode bit.
4396
242f5f1c
SS
43972011-11-24 Stan Shebs <stan@codesourcery.com>
4398
4399 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
4400
f196051f
SS
44012011-11-17 Stan Shebs <stan@codesourcery.com>
4402
4403 * tracepoint.c (struct tracepoint): New field traceframe_usage.
4404 (tracing_start_time): New global.
4405 (tracing_stop_time): New global.
4406 (tracing_user_name): New global.
4407 (tracing_notes): New global.
4408 (tracing_stop_note): New global.
4409 (cmd_qtstart): Set traceframe_usage, start_time.
4410 (stop_tracing): Set stop_time.
4411 (cmd_qtstatus): Report additional status.
4412 (cmd_qtp): New function.
4413 (handle_tracepoint_query): Call it.
4414 (cmd_qtnotes): New function.
4415 (handle_tracepoint_general_set): Call it.
4416 (get_timestamp): Rename from tsv_get_timestamp.
4417
405f8e94
SS
44182011-11-14 Stan Shebs <stan@codesourcery.com>
4419 Kwok Cheung Yeung <kcy@codesourcery.com>
4420
4421 * linux-x86-low.c (small_jump_insn): New.
4422 (i386_install_fast_tracepoint_jump_pad): Add arguments for
4423 trampoline and error message, build a trampoline and issue a small
4424 jump instruction to it.
4425 (x86_install_fast_tracepoint_jump_pad): Add arguments for
4426 trampoline and error message.
4427 (x86_get_min_fast_tracepoint_insn_len): New.
4428 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
4429 * linux-low.h (struct linux_target_ops): Add arguments to
4430 install_fast_tracepoint_jump_pad operation, add new operation.
4431 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
4432 arguments.
4433 (linux_get_min_fast_tracepoint_insn_len): New function.
4434 (linux_target_op): Add new operation.
4435 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
4436 (gdb_trampoline_buffer_end): Ditto.
4437 (gdb_trampoline_buffer_error): Ditto.
4438 (struct ipa_sym_addresses): Add fields for new IPA variables.
4439 (symbol_list): Add entries for new IPA variables.
4440 (struct tracepoint): Add fields to hold the address range of the
4441 trampoline used by the tracepoint.
4442 (trampoline_buffer_head): New static variable.
4443 (trampoline_buffer_tail): Ditto.
4444 (claim_trampoline_space): New function.
4445 (have_fast_tracepoint_trampoline_buffer): New function.
4446 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
4447 structure.
4448 (install_fast_tracepoint): Ditto, also add error buffer argument.
4449 (cmd_qtminftpilen): New function.
4450 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
4451 (fast_tracepoint_from_trampoline_address): New function.
4452 (fast_tracepoint_collecting): Handle trampoline as part of jump
4453 pad space.
4454 (set_trampoline_buffer_space): New function.
4455 (initialize_tracepoint): Initialize new IPA variables.
4456 * target.h (struct target_ops): Add arguments to
4457 install_fast_tracepoint_jump_pad operation, add new
4458 get_min_fast_tracepoint_insn_len operation.
4459 (target_get_min_fast_tracepoint_insn_len): New.
4460 (install_fast_tracepoint_jump_pad): Add arguments.
4461 * server.h (IPA_BUFSIZ): Define.
4462 * linux-i386-ipa.c: Include extra header files.
4463 (initialize_fast_tracepoint_trampoline_buffer): New function.
4464 (initialize_low_tracepoint): Call it.
4465 * server.h (set_trampoline_buffer_space): Declare.
4466 (claim_trampoline_space): Ditto.
4467 (have_fast_tracepoint_trampoline_buffer): Ditto.
4468
1e4d1764
YQ
44692011-11-14 Yao Qi <yao@codesourcery.com>
4470
4471 * server.c (handle_query): Handle InstallInTrace for qSupported.
4472 * tracepoint.c (add_tracepoint): Sort list.
4473 (install_tracepoint, download_tracepoint): New.
4474 (cmd_qtdp): Call them to install and download tracepoints.
4475 (sort_tracepoints): Removed.
4476 (cmd_qtstart): Update.
4477
5c73ff4e
YQ
44782011-11-14 Yao Qi <yao@codesourcery.com>
4479
4480 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
4481 * mem-break.h: Declare.
4482 * tracepoint.c (cmd_qtstart): Move some code to ...
4483 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
4484 New.
4485 (download_tracepoints): Move some code to ...
4486 (download_tracepoint_1): ... here. New.
4487
86a30030
YQ
44882011-11-08 Yao Qi <yao@codesourcery.com>
4489
4490 * remote-utils.c (relocate_instruction): A comment fix.
4491
8d26e50c
JB
44922011-11-07 Joel Brobecker <brobecker@adacore.com>
4493
4494 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
4495 (i386_dr_low_get_control, i386_dr_low_get_status): Use
4496 dr_status_mirror and dr_control_mirror from debug_reg_state.
4497 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
4498 (i386_initial_stuff): Remove use of deleted globals.
4499 (i386_get_thread_context, i386_set_thread_context,
4500 i386_thread_added): Use dr_status_mirror and dr_control_mirror
4501 from debug_reg_state.
4502
a59306a3
YQ
45032011-11-05 Yao Qi <yao@codesourcery.com>
4504
4505 * tracepoint.c (gdb_collect): Loop over tracepoints of same
4506 address as TPOINT's.
4507
3065dfb6
SS
45082011-11-02 Stan Shebs <stan@codesourcery.com>
4509
4510 * tracepoint.c (agent_mem_read_string): New function.
4511 (eval_agent_expr): Call it for tracenz.
4512 * server.c (handle_query): Report support for tracenz.
4513
fd0d8c7c
YQ
45142011-11-02 Yao Qi <yao@codesourcery.com>
4515
4516 * tracepoint.c (cmd_qtstart): Remove unused local variables.
4517
609086b1
YQ
45182011-11-02 Yao Qi <yao@codesourcery.com>
4519
4520 * target.h: Fix a typo in comment.
4521
b9fd1791
PA
45222011-10-31 Pedro Alves <pedro@codesourcery.com>
4523
4524 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
4525 clobber the breakpoints' shadows with fast tracepoint jumps.
4526 * mem-break.h (check_mem_write): Add `myaddr' parameter.
4527 * target.c (write_inferior_memory): Also pass MYADDR down to
4528 check_mem_write.
4529
03583c20
UW
45302011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
4531
4532 * configure.ac: Check support for personality routine.
4533 * configure: Regenerate.
4534 * config.in: Likewise.
4535 * linux-low.c: Include <sys/personality.h>.
4536 Define ADDR_NO_RANDOMIZE if necessary.
4537 (linux_create_inferior): Disable address space randomization when
4538 forking inferior, if requested.
4539 (linux_supports_disable_randomization): New function.
4540 (linux_target_ops): Install it.
4541 * server.h (disable_randomization): Declare.
4542 * server.c (disable_randomization): New global variable.
4543 (handle_general_set): Handle QDisableRandomization.
4544 (handle_query): Likewise for qSupported.
4545 (main): Support --disable-randomization and --no-disable-randomization
4546 command line arguments.
4547 * target.h (struct target_ops): Add supports_disable_randomization.
4548 (target_supports_disable_randomization): New macro.
4549
723b724b
MF
45502011-09-29 Mike Frysinger <vapier@gentoo.org>
4551
4552 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
4553 ifdef check.
4554 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
4555 [!PT_GETDSBT] (target_loadmap): New definition.
4556 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
4557 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
4558 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
4559 and PT_GETDSBT to LINUX_LOADMAP.
4560 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
4561 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
4562
55329a5c 45632011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
4564
4565 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
4566 (arm_linux_hwbp_cap): New static variable.
4567 (arm_linux_get_hwbp_cap): Replace by ...
4568 (arm_linux_init_hwbp_cap): ... this new function.
4569 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
4570 (arm_linux_get_hw_watchpoint_count): Likewise.
4571 (arm_linux_get_hw_watchpoint_max_length): Likewise.
4572 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
4573 (arm_prepare_to_resume): Use perror_with_name instead of error.
4574
55329a5c 45752011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
4576
4577 * linux-arm-low.c: Include <signal.h>.
4578 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
4579 (struct arm_linux_hwbp_cap): New data type.
4580 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
4581 (struct arm_linux_hw_breakpoint): New data type.
4582 (MAX_BPTS, MAX_WPTS): Define.
4583 (struct arch_process_info, struct arch_lwp_info): New data types.
4584 (arm_linux_get_hwbp_cap): New function.
4585 (arm_linux_get_hw_breakpoint_count): Likewise.
4586 (arm_linux_get_hw_watchpoint_count): Likewise.
4587 (arm_linux_get_hw_watchpoint_max_length): Likewise.
4588 (arm_hwbp_control_initialize): Likewise.
4589 (arm_hwbp_control_is_enabled): Likewise.
4590 (arm_hwbp_control_is_initialized): Likewise.
4591 (arm_hwbp_control_disable): Likewise.
4592 (arm_linux_hw_breakpoint_equal): Likewise.
4593 (arm_linux_hw_point_initialize): Likewise.
4594 (struct update_registers_data): New data structure.
4595 (update_registers_callback: New function.
4596 (arm_insert_point): Likewise.
4597 (arm_remove_point): Likewise.
4598 (arm_stopped_by_watchpoint): Likewise.
4599 (arm_stopped_data_address): Likewise.
4600 (arm_new_process): Likewise.
4601 (arm_new_thread): Likewise.
4602 (arm_prepare_to_resume): Likewise.
4603 (the_low_target): Register arm_insert_point, arm_remove_point,
4604 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
4605 arm_new_thread, and arm_prepare_to_resume.
4606
6b9801d4
SS
46072011-09-15 Stan Shebs <stan@codesourcery.com>
4608
4609 * server.h (struct emit_ops): Add compare-goto fields.
4610 * tracepoint.c (gdb_agent_op_sizes): New table.
4611 (emit_eq_goto): New function.
4612 (emit_ne_goto): New function.
4613 (emit_lt_goto): New function.
4614 (emit_le_goto): New function.
4615 (emit_gt_goto): New function.
4616 (emit_ge_goto): New function.
4617 (is_goto_target): New function.
4618 (compile_bytecodes): Recognize special cases of compare-goto
4619 combinations and call specialized emitters for them.
4620 * linux-x86-low.c (amd64_emit_eq_goto): New function.
4621 (amd64_emit_ne_goto): New function.
4622 (amd64_emit_lt_goto): New function.
4623 (amd64_emit_le_goto): New function.
4624 (amd64_emit_gt_goto): New function.
4625 (amd64_emit_ge_goto): New function.
4626 (amd64_emit_ops): Add the new functions.
4627 (i386_emit_eq_goto): New function.
4628 (i386_emit_ne_goto): New function.
4629 (i386_emit_lt_goto): New function.
4630 (i386_emit_le_goto): New function.
4631 (i386_emit_gt_goto): New function.
4632 (i386_emit_ge_goto): New function.
4633 (i386_emit_ops): Add the new functions.
4634
bf15cbda
SS
46352011-09-08 Stan Shebs <stan@codesourcery.com>
4636
4637 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
4638 (i386_emit_epilogue): Restore %ebx.
4639
943ca1dd
JZ
46402011-08-31 Jie Zhang <jzhang918@gmail.com>
4641
4642 * server.c (step_thread): Remove definition.
4643 (process_serial_event): Don't handle Hs.
4644 * server.h (step_thread): Remove declaration.
4645 * target.c (set_desired_inferior): Remove use of step_thread.
4646
e3deef73
LM
46472011-08-24 Luis Machado <lgustavo@codesourcery.com>
4648
4649 * linux-low.c: Include linux-procfs.h.
4650 (linux_attach_lwp_1): Update comments.
4651 (linux_attach): Scan for existing threads when attaching to a
4652 process that is the tgid.
4653 * Makefile.in: Update dependencies.
4654
13da1c97
LM
46552011-08-24 Luis Machado <lgustavo@codesourcery.com>
4656
4657 * configure.srv: Add linux-procfs.o dependencies.
4658
881127c9
YQ
46592011-08-14 Yao Qi <yao@codesourcery.com>
4660
4661 * target.h (struct target_ops): Fix indent.
4662 * win32-low.c (win32_target_ops): Fix comment.
4663
58dbd541
YQ
46642011-08-14 Andrew Jenner <andrew@codesourcery.com>
4665 Yao Qi <yao@codesourcery.com>
4666
4667 * Makefile.in (clean): Remove tic6x-*.c files.
4668 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
4669 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
4670 (tic6x-c64xp-linux.c): Likewise.
4671 * configure.srv: Add support for tic6x-*-uclinux.
4672 * linux-tic6x-low.c: New.
4673 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
4674
78d85199
YQ
46752011-08-14 Andrew Stubbs <ams@codesourcery.com>
4676 Yao Qi <yao@codesourcery.com>
4677
4678 * target.h (struct target_ops): Add read_loadmap.
4679 * linux-low.c (struct target_loadseg): New type.
4680 (struct target_loadmap): New type.
4681 (linux_read_loadmap): New function.
4682 (linux_target_ops): Add linux_read_loadmap.
4683 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
4684 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
4685 to NULL.
78d85199 4686
a959a88d
EZ
46872011-08-05 Eli Zaretskii <eliz@gnu.org>
4688
4689 * win32-low.c: Include <stdint.h>.
4690
1ced966e
PA
46912011-07-22 Pedro Alves <pedro@codesourcery.com>
4692
4693 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
4694 to the inferior here.
4695 (i386_remove_aligned_watchpoint): Ditto.
4696 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
4697 fit part of the watchpoint in the debug registers.
4698 (i386_update_inferior_debug_regs): New.
4699 (i386_low_insert_watchpoint): Work on a local mirror of the debug
4700 registers, and only update the inferior on success.
4701 (i386_low_remove_watchpoint): Ditto.
4702
d26e3629
KY
47032011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
4704
4705 * linux-low.c (compare_ints, unique, list_threads, show_process,
4706 linux_core_of_thread): Delete.
4707 (linux_target_ops): Change linux_core_of_thread to
4708 linux_common_core_of_thread.
4709 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
4710 * utils.c (malloc_failure): Change type of argument.
4711 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
4712 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
4713 common/linux-osdata.c, common/ptid.c and common/buffer.c.
4714 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
4715 (IPA_OBJS): Add common-utils-ipa.o.
4716 (ptid_h, linux_osdata_h): New macros.
4717 (server_h): Add common/common-utils.h, common/xml-utils.h,
4718 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
4719 common/ptid.h.
4720 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
4721 ptid.o, buffer.o): New rules.
4722 (linux-low.o): Add common/linux-osdata.h as a dependency.
4723 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
4724 * configure.ac: Add AC_HEADER_DIRENT check.
4725 * config.in: Regenerate.
4726 * configure: Regenerate.
4727 * remote-utils.c (xml_escape_text): Delete.
4728 (buffer_grow, buffer_free, buffer_init, buffer_finish,
4729 buffer_xml_printf): Move to common/buffer.c.
4730 * server.c (main): Remove call to initialize_inferiors.
4731 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
4732 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
4733 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
4734 internal_error, gdb_assert, gdb_assert_fail): Delete.
4735 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
4736 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
4737 common/buffer.h.
4738 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
4739 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
4740 initialize_inferiors): Delete.
4741
2275a1a7
PA
47422011-07-20 Pedro Alves <pedro@codesourcery.com>
4743
4744 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
4745 symbol error.
4746
0a5b1e09
PA
47472011-05-31 Pedro Alves <pedro@codesourcery.com>
4748
4749 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
4750 assertion.
4751 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
4752
6938fd34
YQ
47532011-05-26 Yao Qi <yao@codesourcery.com>
4754
4755 * Makefile.in (thread-db.o): Track dependence to
4756 common/gdb_thread_db.h.
4757 * thread-db.c: include gdb_thread_db.h from right place.
4758
b481f9e0
TT
47592011-05-16 Adrian Cornish <gnu@bluedreamer.com>
4760
4761 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
4762 __FILE__ and __LINE__ to internal_error.
4763
98a5dd13
DE
47642011-05-13 Doug Evans <dje@google.com>
4765
4766 * thread-db.c (try_thread_db_load_from_sdir): New function.
4767 (try_thread_db_load_from_dir): New function.
4768 (thread_db_load_search): Handle $sdir, ignore $pdir.
4769 Remove trying of system directories if search of
4770 libthread-db-search-path fails, that is now done via $sdir.
4771
d248b706
KY
47722011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
4773
4774 * server.c (handle_query): Add EnableDisableTracepoints to the list
4775 of supported features.
43aaf8b6 4776 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 4777 tracepoints.
43aaf8b6
PA
4778 (cmd_qtenable_disable): New.
4779 (cmd_qtstart): Install tracepoints even if disabled.
4780 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
4781 receiving a QTEnable or QTDisable packet.
4782 (gdb_collect): Skip data collection if fast tracepoint is disabled.
4783 (ust_marker_to_static_tracepoint): Do not ignore disabled static
4784 tracepoints.
4785 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 4786
84e578fb
DE
47872011-05-10 Doug Evans <dje@google.com>
4788
4789 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
4790
71f55dd8
DE
47912011-05-04 Doug Evans <dje@google.com>
4792
4793 * linux-low.c (linux_join): Skip process lookup.
4794 * spu-low.c (spu_join): Ditto.
4795 * server.c (join_inferiors_callback): Delete.
4796 (process_serial_event): For 'D' packet (detach) call join_inferior
4797 directly.
4798
4d393d60
JM
47992011-05-04 Joseph Myers <joseph@codesourcery.com>
4800
4801 * README: Don't mention xscale*-*-linux*.
4802 * configure.srv (xscale*-*-linux*): Don't handle target.
4803
b00ad6ff
NF
48042011-04-27 Nathan Froyd <froydnj@codesourcery.com>
4805
4806 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
4807 casting pointers.
4808 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
4809 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
4810 (i386_emit_void_call_2): Likewise.
4811
af96c192
YQ
48122011-04-26 Yao Qi <yao@codesourcery.com>
4813
43aaf8b6
PA
4814 * linux-low.c: Move common macros to linux-ptrace.h.
4815 Include linux-ptrace.h.
af96c192
YQ
4816 * Makefile.in (linux_ptrace_h): New.
4817 (linux-low.o): Depends on linux-ptrace.h.
4818
03f2bd59
JK
48192011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
4820
4821 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
4822 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
4823 (remote_prepare): New function with most of the TCP code from ...
4824 (remote_open): ... here. Detect PORT here unconditionally. Move also
4825 setting transport_is_reliable.
4826 * server.c (run_once): New variable.
4827 (gdbserver_usage): Document it.
4828 (main): Set run_once for `--once'. Call remote_prepare. Exit after
4829 the first run if RUN_ONCE.
4830 * server.h (run_once, remote_prepare): New declarations.
4831
7a9dd1b2
TT
48322011-04-19 Tom Tromey <tromey@redhat.com>
4833
4834 * win32-low.c (handle_load_dll): Remove duplicate "the".
4835
81239425
PM
48362011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
4837
4838 Remove support for old Cygwin 1.5 versions.
4839 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
4840 function to avoid warning.
4841 (win32_add_one_solib): Use cygwin_conv_path function to avoid
4842 warning.
4843
9e0627f1
PM
48442011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
4845
4846 * gdbserver/server.h (Macro _): Define it if not available.
4847
588eebee
MS
48482011-03-14 Michael Snyder <msnyder@vmware.com>
4849
348af9f7 4850 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 4851
43f70d4c
JB
48522011-03-10 Joel Brobecker <brobecker@adacore.com>
4853
4854 * Makefile.in (maintainer-clean realclean distclean): Remove
4855 "make ... subdir_do" command.
4856
348af9f7
MS
48572011-03-10 Michael Snyder <msnyder@vmware.com>
4858
4859 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
4860
4861 * server.c (handle_v_run): Free alloced buffer on early return.
4862
e637a4f5
YQ
48632011-03-09 Yao Qi <yao@codesourcery.com>
4864
4865 Revert:
4866 2011-03-04 Yao Qi <yao@codesourcery.com>
4867
4868 * Makefile.in: Remove GNU make feature --directory.
4869
4870 2011-03-05 Yao Qi <yao@codesourcery.com>
4871
4872 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
4873 (subdir_do): New make target. Copied from gdb/Makefile.
4874 (maintainer-clean, realclean, distclean, clean): Call corresponding
4875 make targets in common/Makefile.
4876
4877 2011-02-11 Yao Qi <yao@codesourcery.com>
4878
4879 * configure.ac: Call AC_PROG_RANLIB.
4880 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
4881 * configure: Regenerate.
4882
e6edda56
JK
48832011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
4884
4885 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
4886
e5141119
JB
48872011-03-06 Yao Qi <yao@codesourcery.com>
4888
4889 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
4890
64794aa4
JB
48912011-03-05 Yao Qi <yao@codesourcery.com>
4892
4893 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
4894 (subdir_do): New make target. Copied from gdb/Makefile.
4895 (maintainer-clean, realclean, distclean, clean): Call corresponding
4896 make targets in common/Makefile.
4897
7a762829
YQ
48982011-03-04 Yao Qi <yao@codesourcery.com>
4899
4900 * Makefile.in: Remove GNU make feature --directory.
4901
348af9f7
MS
49022011-03-04 Michael Snyder <msnyder@vmware.com>
4903
4904 * server.c (queue_stop_reply): Call xmalloc not malloc.
4905
49062011-03-02 Michael Snyder <msnyder@vmware.com>
4907
4908 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
4909
9f72fee2
MS
49102011-02-28 Michael Snyder <msnyder@vmware.com>
4911
588eebee
MS
4912 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
4913 (cmd_qtframe): Ditto.
4914 (cmd_qtbuffer): Ditto.
4915 (cmd_bigqtbuffer): Ditto.
4916
9f72fee2
MS
4917 * utils.c (decimal2str): Initialize 'width' to nine, then
4918 don't mess with it.
4919
8040bd49
UW
49202011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
4921
4922 * hostio.c (require_data): Free *data, not data.
4923
7e52cbd0
JK
49242011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4925
4926 * hostio.c (require_data): Use free, not xfree.
4927
9130f83e
MS
49282011-02-27 Michael Snyder <msnyder@vmware.com>
4929
4b812f4e
MS
4930 * server.c (handle_query): Discard unused value.
4931
9130f83e
MS
4932 * hostio.c (require_data): Free malloc memory before returning
4933 error.
4934
69d37113
MS
49352011-02-26 Michael Snyder <msnyder@vmware.com>
4936
4937 * linux-low.c (list_threads): Call closedir for dirent.
4938
35f5825a
MS
49392011-02-27 Michael Snyder <msnyder@vmware.com>
4940
2a589cef
MS
4941 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
4942 a case statement falls through.
4943
0adea5f7
MS
4944 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
4945
35f5825a
MS
4946 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
4947 in comparison.
4948
238f1c74
MS
49492011-02-26 Michael Snyder <msnyder@vmware.com>
4950
4951 * utils.c (decimal2str): Eliminate dead code and dead param.
4952 (pulongest): Drop dead param from call to decimal2str.
4953 (plongest): Ditto.
4954
633ff500
JB
49552011-02-24 Joel Brobecker <brobecker@adacore.com>
4956
4957 Revert the following patch (not approved yet):
4958 2011-02-21 Hui Zhu <teawater@gmail.com>
4959 * tracepoint.c (tp_printf): New function.
4960 (eval_agent_expr): Handle gdb_agent_op_printf.
4961
f9c6ff72
HZ
49622011-02-21 Hui Zhu <teawater@gmail.com>
4963
4964 * tracepoint.c (tp_printf): New function.
4965 (eval_agent_expr): Handle gdb_agent_op_printf.
4966
94d5e490
TT
49672011-02-18 Tom Tromey <tromey@redhat.com>
4968
4969 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
4970 (tracepoint.o): Likewise.
4971 * tracepoint.c (enum gdb_agent_op): Use ax.def.
4972 (gdb_agent_op_names): Likewise.
4973
c7f96d2b
TT
49742011-02-18 Tom Tromey <tromey@redhat.com>
4975
4976 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
4977 gdb_agent_op_rot>: New constants.
4978 (gdb_agent_op_names): Add pick and roll.
4979 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
4980 cases.
4981
0feedb2c
JK
49822011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4983
4984 * aclocal.m4: Regenerated with aclocal-1.11.1.
4985
b3b9301e
PA
49862011-02-14 Pedro Alves <pedro@codesourcery.com>
4987
4988 * server.c (handle_qxfer_traceframe_info): New.
4989 (qxfer_packets): Register "traceframe-info".
4990 (handle_query): Report support for qXfer:traceframe-info:read+.
4991 * tracepoint.c (match_blocktype): New.
4992 (traceframe_find_block_type): Rename to ...
4993 (traceframe_walk_blocks): ... this. Add callback filter argument,
4994 and use it.
4995 (traceframe_find_block_type): New, reimplemented on top of
4996 traceframe_walk_blocks.
4997 (build_traceframe_info_xml): New.
4998 (traceframe_read_info): New.
4999 * server.h (traceframe_read_info): Declare.
5000
4f3e6fb7
YQ
50012011-02-11 Yao Qi <yao@codesourcery.com>
5002
5003 * configure.ac: Call AC_PROG_RANLIB.
5004 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
5005 * configure: Regenerate.
5006
764880b7
PA
50072011-02-07 Pedro Alves <pedro@codesourcery.com>
5008
5009 * server.c (gdb_read_memory): Change return semantics to allow
5010 partial transfers.
5011 (handle_search_memory_1): Adjust.
5012 (process_serial_event) <'m' packet>: Handle partial transfers.
5013 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
5014
1c79eb8a
PA
50152011-01-28 Pedro Alves <pedro@codesourcery.com>
5016
5017 * regcache.c (init_register_cache): Initialize
5018 regcache->register_status.
5019 (free_register_cache): Release regcache->register_status.
5020 (regcache_cpy): Copy register_status.
5021 (registers_to_string): Print 'x's for unavailable registers.
5022 (supply_register): Mark the register's status valid or
5023 unavailable, depending on whether a buffer was passed in or not.
5024 (supply_register_zeroed): New.
5025 (supply_regblock): Mark the registers' status valid or
5026 unavailable, depending on whether a buffer was passed in or not.
5027 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
5028 (struct regcache): New `register_status' field.
5029 (supply_register_zeroed): Declare.
5030 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
5031 supply_register_zeroed, rather than passing a NULL buffer to
5032 supply_register.
5033 * tracepoint.c (fetch_traceframe_registers): Update comment.
5034
85724a0e
PA
50352011-01-28 Pedro Alves <pedro@codesourcery.com>
5036
5037 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
5038 buffer explicit.
5039
d08aafef
PA
50402011-01-25 Pedro Alves <pedro@codesourcery.com>
5041
5042 * server.h (decode_xfer_write): Change prototype.
5043 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
5044 and don't extract the annex here.
5045 * server.c (decode_xfer_read): Remove `annex' parameter,
5046 and don't extract the annex here.
5047 (decode_xfer): New.
5048 (struct qxfer): New.
5049 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
5050 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
5051 (handle_qxfer_statictrace): New functions, abstracted out from
5052 handle_query, and made to use the struct qxfer interface.
5053 (handle_threads_qxfer_proper): Rename to ...
5054 (handle_qxfer_threads_proper): ... this.
5055 (handle_threads_qxfer): Rename to ...
5056 (handle_qxfer_threads): ... this. Adjust.
5057 (qxfer_packets): New array.
5058 (handle_qxfer): New function.
5059 (handle_query): Use handle_qxfer.
5060
493e2a69
MS
50612011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
5062
5063 * gdbreplay.c: Shorten lines of >= 80 columns.
5064 * linux-low.c: Ditto.
5065 * linux-ppc-low.c: Ditto.
5066 * linux-s390-low.c: Ditto.
5067 * linux-sparc-low.c: Ditto.
5068 * linux-x86-low.c: Ditto.
5069 * linux-xtensa-low.c: Ditto.
5070 * mem-break.c: Ditto.
5071 * nto-low.c: Ditto.
5072 * regcache.h: Ditto.
5073 * remote-utils.c: Ditto.
5074 * server.c: Ditto.
5075 * server.h: Ditto.
5076 * thread-db.c: Ditto.
5077 * tracepoint.c: Ditto.
5078 * utils.c: Ditto.
5079 * win32-low.h: Ditto.
5080
44944448
JB
50812011-01-05 Joel Brobecker <brobecker@adacore.com>
5082
5083 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
5084 update.
5085
71ce852c
JB
50862011-01-01 Joel Brobecker <brobecker@adacore.com>
5087
5088 * server.c (gdbserver_version): Update copyright year in version
5089 output.
5090 * gdbreplay.c (gdbreplay_version): Ditto.
5091
eb826dc6
MF
50922010-12-29 Jie Zhang <jie.zhang@analog.com>
5093
5094 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
5095 * linux-bfin-low.c: New file.
5096 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
5097 PT_DATA_ADDR for BFIN targets.
5098 * Makefile.in (SFILES): Add linux-bfin-low.c.
5099 (clean): Remove reg-bfin.c.
5100 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
5101 * README: Mention supported Blackfin targets.
5102
39ab222a
MF
51032010-12-23 Mike Frysinger <vapier@gentoo.org>
5104
5105 * .gitignore: New file.
5106
a1f2ce7d
MF
51072010-11-16 Mike Frysinger <vapier@gentoo.org>
5108
5109 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
5110
f474844c
JZ
51112010-10-22 Jie Zhang <jie@codesourcery.com>
5112
5113 * Makefile.in: Add FLAGS_TO_PASS variable.
5114 (install): Remove dependency of install-only and recursively
5115 invoke make for install-only.
5116
f1048712
DE
51172010-10-04 Doug Evans <dje@google.com>
5118
5119 * Makefile.in (uninstall): Use $(DESTDIR).
5120
b53a1623
PA
51212010-09-24 Pedro Alves <pedro@codesourcery.com>
5122
e6ee044d
PA
5123 PR gdb/11842
5124
b53a1623
PA
5125 * linux-x86-low.c (compat_siginfo_from_siginfo)
5126 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
5127 si_code is < 0. Check for si_code == SI_TIMER before checking for
5128 si_code < 0.
5129
fa1bd1e4
JB
51302010-09-13 Joel Brobecker <brobecker@adacore.com>
5131
5132 * lynx-i386-low.c: New file.
5133 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
5134
47fac8f8
JB
51352010-09-13 Joel Brobecker <brobecker@adacore.com>
5136
5137 * lynx-low.c (ptrace_request_to_str): Remove handling for
5138 request values that have been removed in LynxOS 5.x.
5139
1adfc54d
JB
51402010-09-13 Joel Brobecker <brobecker@adacore.com>
5141
5142 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
5143 <ptrace.h>
5144
c2a66c29
NS
51452010-09-09 Nathan Sidwell <nathan@codesourcery.com>
5146
5147 * configure.ac: Add --enable-inprocess-agent option.
5148 * configure: Rebuilt.
5149
32fcada3
YQ
51502010-09-06 Yao Qi <yao@codesourcery.com>
5151
5152 * linux-low.c (linux_kill): Remove unused variable.
5153 (linux_stabilize_threads): Likewise.
5154 * server.c (start_inferior): Likewise.
5155 (queue_stop_reply_callback): Likewise.
5156 * tracepoint.c (do_action_at_tracepoint): Likewise.
5157
0cccb683
YQ
51582010-09-06 Yao Qi <yao@codesourcery.com>
5159
5160 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
5161 on return.
5162
423ec54c
JK
51632010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
5164
5165 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
5166
12ac6819
PA
51672010-09-06 Pedro Alves <pedro@codesourcery.com>
5168
5169 * Makefile.in (install-only): Replace $IPA_DEPFILES with
5170 "$(IPA_DEPFILES)".
5171
8ed54b31
JB
51722010-09-01 Joel Brobecker <brobecker@adacore.com>
5173
5174 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
5175 gdbserver/lynx-ppc-low.c: New files.
5176 * Makefile.in (lynx_low_h): New variable.
5177 (lynx-low.o, lynx-ppc-low.o): New rules.
5178 * configure.ac: On LynxOS, link with -lnetinet.
5179 * configure.srv: Add handling of powerpc-*-lynxos* targets.
5180 * configure: regenerate.
5181
bb0116a4
JB
51822010-09-01 Joel Brobecker <brobecker@adacore.com>
5183
5184 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
5185 * configure.ac: Add check for vasprintf and vsnprintf.
5186 * configure, config.in: Regenerate.
5187 * server.h (vasprintf, vsnprintf): Add conditional declarations.
5188
a778ab81 51892010-09-01 Joel Brobecker <brobecker@adacore.com>
5190
5191 * gdbreplay.c: Move include of alloca.h up, next to include of
5192 malloc.h.
5193 * server.h: Add include of malloc.h.
5194 * mem-break.c: Remove include of malloc.h.
5195 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
5196
8b034a19 51972010-09-01 Joel Brobecker <brobecker@adacore.com>
5198
5199 * Makefile.in (memmem.o): Build with -Wno-error.
5200
52012010-09-01 Joel Brobecker <brobecker@adacore.com>
5202
5203 * utils.c (xsnprintf): Make non-static.
5204 * server.h: Add xsnprintf declaration.
5205 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
5206 replace calls to snprintf by calls to xsnprintf throughout.
5207
52082010-09-01 Joel Brobecker <brobecker@adacore.com>
5209
5210 * configure.ac: Add configure check for alloca.
5211 * configure, config.in: Regenerate.
5212 * server.h: Include alloca.h if it exists.
5213 * gdbreplay.c: Include alloca.h if it exists.
5214
1a981360
PA
52152010-08-28 Pedro Alves <pedro@codesourcery.com>
5216
5217 * linux-low.c (__SIGRTMIN): Define if not already defined.
5218 (linux_create_inferior): Check for __ANDROID__ rather than
5219 __SIGRTMIN.
5220 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
5221 are already deferred.
5222 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
5223 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
5224 stopped and already has a pending signal to report.
5225 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
5226 a pending signal to report or is moving out of a jump pad.
5227 (linux_init_signals): Check for __ANDROID__ rather than
5228 __SIGRTMIN.
5229
b4d51a55
PA
52302010-08-28 Pedro Alves <pedro@codesourcery.com>
5231
5232 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
5233 debug_threads check. Avoid a linear search when not doing debug
5234 output.
5235
ec48365d
PA
52362010-08-27 Pedro Alves <pedro@codesourcery.com>
5237
5238 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
5239 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
5240 (struct file_handler) <fd>: Change type to gdb_fildes_t.
5241 (process_event): Change local fd's type to gdb_fildes_t.
5242 (create_file_handler): Adjust prototype.
5243 (delete_file_handler): Adjust prototype.
5244 (handle_file_event): Adjust prototype. Use pfildes.
5245 (create_file_event): Adjsut prototype.
5246 * remote-utils.c (remote_desc, listen_desc): Change type to
5247 gdb_fildes_t.
5248 * server.h: New gdb_fildes_t typedef.
5249 [USE_WIN32API]: Include winsock2.h.
5250 (delete_file_handler, add_file_handler): Adjust prototypes.
5251 (pfildes): Declare.
5252 * utils.c (pfildes): New.
5253
854d88f0
PA
52542010-08-27 Pedro Alves <pedro@codesourcery.com>
5255
5256 * configure.ac (build_warnings): Add -Wno-char-subscripts.
5257 * configure: Regenerate.
5258
0146f85b
PA
52592010-08-27 Pedro Alves <pedro@codesourcery.com>
5260
5261 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
5262 (linux_done_accessing_memory): ... this.
5263 (linux_target_ops): Adjust.
5264 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
5265 * nto-low.c (nto_target_ops): Adjust comment.
5266 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
5267 * spu-low.c (spu_target_ops): Adjust comment.
5268 * target.h (target_ops): Rename unprepare_to_access_memory field
5269 to done_accessing_memory.
5270 (unprepare_to_access_memory): Rename to ...
5271 (done_accessing_memory): ... this.
5272
90d74c30
PA
52732010-08-26 Pedro Alves <pedro@codesourcery.com>
5274
5275 * linux-low.c (linux_prepare_to_access_memory): New.
5276 (linux_unprepare_to_access_memory): New.
5277 (linux_target_ops): Install them.
5278 * server.c (read_memory): Rename to ...
5279 (gdb_read_memory): ... this. Use
5280 prepare_to_access_memory/prepare_to_access_memory.
5281 (write_memory): Rename to ...
5282 (gdb_write_memory): ... this. Use
5283 prepare_to_access_memory/prepare_to_access_memory.
5284 (handle_search_memory_1): Adjust.
5285 (process_serial_event): Adjust.
5286 * target.h (struct target_ops): New fields
5287 prepare_to_access_memory and unprepare_to_access_memory.
5288 (prepare_to_access_memory, unprepare_to_access_memory): New.
5289 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
5290 prepare_to_access_memory/prepare_to_access_memory.
5291 * nto-low.c (nto_target_ops): Adjust.
5292 * spu-low.c (spu_target_ops): Adjust.
5293 * win32-low.c (win32_target_ops): Adjust.
5294
fd467969
PA
52952010-08-26 Pedro Alves <pedro@codesourcery.com>
5296
5297 * Makefile.in (WARN_CFLAGS): Get it from configure.
5298 (WERROR_CFLAGS): New.
5299 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
5300 * configure.ac: Introduce --enable-werror, which adds -Werror to
5301 the compiler command line. Enabled by default. Disable with
5302 --disable-werror. Add -Wdeclaration-after-statement
5303 Wpointer-arith and -Wformat-nonliteral to warning flags.
5304 * configure: Regenerate.
5305
331e2f5f
PA
53062010-08-26 Pedro Alves <pedro@codesourcery.com>
5307
5308 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
5309
e581f2b4
PA
53102010-08-26 Pedro Alves <pedro@codesourcery.com>
5311
5312 * gdbreplay.c (remote_error): New.
5313 (gdbchar): New.
5314 (expect): Use gdbchar. Check for error reading from GDB.
5315 Clarify sync error output.
5316 (play): Check for errors writing to GDB.
5317 * linux-low.c (sigchld_handler): Really ignore `write' errors.
5318 * remote-utils.c (getpkt): Check for errors writing to the remote
5319 descriptor.
5320
3c11dd79
PA
53212010-08-25 Pedro Alves <pedro@codesourcery.com>
5322
5323 * linux-low.c (linux_wait_1): Move non-debugging code out of
5324 `debug_threads' control.
5325
d20a8ad9
PA
53262010-08-25 Pedro Alves <pedro@codesourcery.com>
5327
5328 * linux-low.c (linux_wait_1): Don't set last_status here.
5329 * server.c (push_event, queue_stop_reply_callback): Assert we're
5330 not pushing a TARGET_WAITKIND_IGNORE event.
5331 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
5332 (myresume, handle_target_event): Set the thread's last_resume_kind
5333 and last_status from the target returned status.
5334
964e4306
PA
53352010-08-25 Pedro Alves <pedro@codesourcery.com>
5336
5337 PR threads/10729
5338
5339 * linux-x86-low.c (update_debug_registers_callback): New.
5340 (i386_dr_low_set_addr): Use it.
5341 (i386_dr_low_get_addr): New.
5342 (i386_dr_low_set_control): Use update_debug_registers_callback.
5343 (i386_dr_low_get_control): New.
5344 (i386_dr_low_get_status): Adjust.
5345 * linux-low.c (linux_stop_lwp): New.
5346 * linux-low.h (linux_stop_lwp): Declare.
5347
5348 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
5349 argument instead of a i386_debug_reg_state.
5350 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
5351 a i386_debug_reg_state.
5352 (i386_insert_aligned_watchpoint): Adjust.
5353 (i386_remove_aligned_watchpoint): Adjust.
5354 (i386_low_stopped_data_address): Read the debug registers from the
5355 inferior instead of from the mirrors.
5356 * i386-low.h (struct i386_debug_reg_state): Extend comment.
5357 (i386_dr_low_get_addr): Declare.
5358 (i386_dr_low_get_control): Declare.
5359 (i386_dr_low_get_status): Change prototype.
5360
5361 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
5362 (i386_dr_low_get_addr): New.
5363 (i386_dr_low_get_control): New.
5364 (i386_dr_low_get_status): Adjust prototype. Return
5365 dr_status_mirror.
5366 (i386_initial_stuff): Clear dr_status_mirror and
5367 dr_control_mirror.
5368 (i386_get_thread_context): Adjust.
5369 (i386_set_thread_context): Adjust.
5370 (i386_thread_added): Adjust.
5371
5f21a75b
PA
53722010-08-24 Pedro Alves <pedro@codesourcery.com>
5373
5374 * linux-low.h (linux_thread_area): Delete declaration.
5375
3e4c1235
TS
53762010-08-11 Thomas Schwinge <thomas@codesourcery.com>
5377
5378 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
5379 after its termination.
5380
1971b033
PA
53812010-08-09 Pedro Alves <pedro@codesourcery.com>
5382
5383 * linux-low.c (gdb_wants_lwp_stopped): Delete.
5384 (gdb_wants_all_stopped): Delete.
5385 (linux_wait_1): Don't call them.
5386 * server.c (handle_v_cont): Tag all threads as want-stopped.
5387 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
5388 stopped as "client-wants-stopped".
5389
310444ac
PA
53902010-07-31 Pedro Alves <pedro@codesourcery.com>
5391
5392 * Makefile.in (signals_h): New.
5393 (server_h): Depend on it.
5394 (server.o): Don't depend on $(signals_def).
5395 (signals.o): Depend on $(signals_def).
5396
a19cae16
JK
53972010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
5398
5399 * Makefile.in (signals_def): New.
5400 (server_h): Append include/gdb/signals.h and signals_def.
5401 (server.o): Append signals_def.
5402
30d50328
JK
54032010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
5404
5405 * server.c (handle_target_event): Use target_signal_to_host for
5406 resume_info.sig initialization.
5407 * target.h (struct thread_resume) <sig>: New comment.
5408
5c3216e2
OS
54092010-07-20 Ozkan Sezer <sezeroz@gmail.com>
5410
c6f46ca0
OS
5411 * server.c (handle_query): strcpy() the returned string from paddress()
5412 instead of sprintf().
5c3216e2
OS
5413 * utils.c (paddress): Return phex_nz().
5414
6bd31874
JB
54152010-07-07 Joel Brobecker <brobecker@adacore.com>
5416
5417 * server.c (handle_v_cont): Call mourn_inferior if process
5418 just exited.
5419 (myresume): Likewise.
5420
0fb4aa4b
PA
54212010-07-01 Pedro Alves <pedro@codesourcery.com>
5422
5423 Static tracepoints, and integration with UST.
5424
5425 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
5426 * mem-break.c (uninsert_all_breakpoints)
5427 (reinsert_all_breakpoints): New.
5428 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
5429 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
5430 (gdb_agent_ust_loaded, helper_thread_id)
5431 (gdb_agent_helper_thread_id): New macros.
5432 (struct ipa_sym_addresses): Add addr_ust_loaded,
5433 addr_helper_thread_id, addr_cmd_buf.
5434 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
5435 (in_process_agent_loaded_ust): New.
5436 (write_e_ust_not_loaded): New.
5437 (maybe_write_ipa_ust_not_loaded): New.
5438 (struct collect_static_trace_data_action): New.
5439 (enum tracepoint_type) <static_tracepoint>: New.
5440 (struct tracepoint) <handle>: Mention static tracepoints.
5441 (struct static_tracepoint_ctx): New.
5442 (CMD_BUF_SIZE): New.
5443 (add_tracepoint_action): Handle static tracepoint actions.
5444 (unprobe_marker_at): New.
5445 (clear_installed_tracepoints): Handle static tracepoints.
5446 (cmd_qtdp): Handle static tracepoints.
5447 (probe_marker_at): New.
5448 (cmd_qtstart): Handle static tracepoints.
5449 (response_tracepoint): Handle static tracepoints.
5450 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
5451 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
5452 (get_context_regcache): Handle static tracepoints.
5453 (do_action_at_tracepoint): Handle static tracepoint actions.
5454 (traceframe_find_block_type): Handle static trace data blocks.
5455 (traceframe_read_sdata): New.
5456 (download_tracepoints): Download static tracepoint actions.
5457 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
5458 (GDB_PROBE_NAME): New.
5459 (ust_ops): New.
5460 (GET_UST_SYM): New.
5461 (USTF): New.
5462 (dlsym_ust): New.
5463 (ust_marker_to_static_tracepoint): New.
5464 (gdb_probe): New.
5465 (collect_ust_data_at_tracepoint): New.
5466 (gdb_ust_probe): New.
5467 (UNIX_PATH_MAX, SOCK_DIR): New.
5468 (gdb_ust_connect_sync_socket): New.
5469 (resume_thread, stop_thread): New.
5470 (run_inferior_command): New.
5471 (init_named_socket): New.
5472 (gdb_ust_socket_init): New.
5473 (cstr_to_hexstr): New.
5474 (next_st): New.
5475 (first_marker, next_marker): New.
5476 (response_ust_marker): New.
5477 (cmd_qtfstm, cmd_qtsstm): New.
5478 (unprobe_marker_at, probe_marker_at): New.
5479 (cmd_qtstmat, gdb_ust_thread): New.
5480 (gdb_ust_init): New.
5481 (initialize_tracepoint_ftlib): Call gdb_ust_init.
5482 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
5483 (ST_REGENTRY): New.
5484 (x86_64_st_collect_regmap): New.
5485 (X86_64_NUM_ST_COLLECT_GREGS): New.
5486 (AMD64_RIP_REGNUM): New.
5487 (supply_static_tracepoint_registers): New.
5488 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
5489 (ST_REGENTRY): New.
5490 (i386_st_collect_regmap): New.
5491 (i386_NUM_ST_COLLECT_GREGS): New.
5492 (supply_static_tracepoint_registers): New.
5493 * server.c (handle_query): Handle qXfer:statictrace:read.
5494 <qSupported>: Report support for StaticTracepoints, and
5495 qXfer:statictrace:read features.
5496 * server.h (traceframe_read_sdata)
5497 (supply_static_tracepoint_registers): Declare.
5498 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
5499 (unpack_varlen_hex): Include in IPA build.
5500 * Makefile.in (ustlibs, ustinc): New.
5501 (IPA_OBJS): Add remote-utils-ipa.o.
5502 ($(IPA_LIB)): Link -ldl and -lpthread.
5503 (UST_CFLAGS): New.
5504 (IPAGENT_CFLAGS): Add UST_CFLAGS.
5505 * config.in, configure: Regenerate.
5506
9e4344e5
PA
55072010-06-20 Ian Lance Taylor <iant@google.com>
5508 Pedro Alves <pedro@codesourcery.com>
5509
5510 * linux-x86-low.c (always_true): Delete.
5511 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
5512 trying to fool the compiler with always_true.
5513
c6beb2cb
PA
55142010-06-20 Pedro Alves <pedro@codesourcery.com>
5515
5516 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
5517 conditions in gdbserver.
5518
d2ed6730
UW
55192010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
5520
5521 * spu-low.c (spu_read_memory): Wrap around local store limit.
5522 (spu_write_memory): Likewise.
5523
4e29fb54
PA
55242010-06-15 Pedro Alves <pedro@codesourcery.com>
5525
5526 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
5527 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
5528 LONGEST uses.
5529 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
5530 uses.
5531 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
5532 uses with LONGEST uses.
5533
6a271cae
PA
55342010-06-14 Stan Shebs <stan@codesourcery.com>
5535 Pedro Alves <pedro@codesourcery.com>
5536
5537 Bytecode compiler.
5538
5539 * linux-x86-low.c: Include limits.h.
5540 (add_insns): New.
5541 (always_true): New.
5542 (EMIT_ASM): New.
5543 (EMIT_ASM32): New.
5544 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
5545 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
5546 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
5547 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
5548 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
5549 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
5550 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
5551 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
5552 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
5553 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
5554 (amd64_emit_void_call_2): New.
5555 (amd64_emit_ops): New.
5556 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
5557 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
5558 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
5559 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
5560 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
5561 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
5562 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
5563 (i386_emit_call, i386_emit_reg, i386_emit_pop)
5564 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
5565 (i386_emit_stack_adjust, i386_emit_int_call_1)
5566 (i386_emit_void_call_2): New.
5567 (i386_emit_ops): New.
5568 (x86_emit_ops): New.
5569 (the_low_target): Install x86_emit_ops.
5570 * server.h (struct emit_ops): New.
5571 (get_raw_reg_func_addr): Declare.
5572 (current_insn_ptr, emit_error): Declare.
5573 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
5574 (set_trace_state_variable_value): New defines.
5575 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
5576 addr_get_trace_state_variable_value and
5577 addr_set_trace_state_variable_value.
5578 (symbol_list): New fields for get_raw_reg,
5579 get_trace_state_variable_value and set_trace_state_variable_value.
5580 (condfn): New typedef.
5581 (struct tracepoint): New field `compiled_cond'.
5582 (do_action_at_tracepoint): Clear compiled_cond.
5583 (get_trace_state_variable_value, set_trace_state_variable_value):
5584 Export in the IPA.
5585 (condition_true_at_tracepoint): If there's a compiled condition,
5586 run that.
5587 (current_insn_ptr, emit_error): New globals.
5588 (struct bytecode_address): New.
5589 (get_raw_reg_func_addr): New.
5590 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
5591 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
5592 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
5593 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
5594 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
5595 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
5596 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
5597 (compile_tracepoint_condition, compile_bytecodes): New.
5598 * target.h (emit_ops): Forward declare.
5599 (struct target_ops): New field emit_ops.
5600 (target_emit_ops): New.
5601 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
5602 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
5603 * linux-low.c (linux_emit_ops): New.
5604 (linux_target_ops): Install it.
5605 * linux-low.h (struct linux_target_ops): New field emit_ops.
5606
92b72907
UW
56072010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
5608
5609 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
5610 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
5611
fa593d66
PA
56122010-06-01 Pedro Alves <pedro@codesourcery.com>
5613 Stan Shebs <stan@codesourcery.com>
5614
5615 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
5616 (all): Depend on $(extra_libraries).
5617 (install-only): Install the IPA.
5618 (IPA_OBJS, IPA_LIB): New.
5619 (clean): Remove the IPA lib.
5620 (IPAGENT_CFLAGS): New.
5621 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
5622 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
5623 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
5624 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
5625 * configure.ac: Check for atomic builtins support in the compiler.
5626 (IPA_DEPFILES, extra_libraries): Define.
5627 * configure.srv (ipa_obj): Add description.
5628 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
5629 (i[34567]86-*-linux*): Set ipa_obj.
5630 (x86_64-*-linux*): Set ipa_obj.
5631 * linux-low.c (stabilizing_threads): New.
5632 (supports_fast_tracepoints): New.
5633 (linux_detach): Stabilize threads before detaching.
5634 (handle_tracepoints): Handle internal tracing breakpoints. Assert
5635 the lwp is either not stabilizing, or is moving out of a jump pad.
5636 (linux_fast_tracepoint_collecting): New.
5637 (maybe_move_out_of_jump_pad): New.
5638 (enqueue_one_deferred_signal): New.
5639 (dequeue_one_deferred_signal): New.
5640 (linux_wait_for_event_1): If moving out of a jump pad, defer
5641 pending signals to later.
5642 (linux_stabilize_threads): New.
5643 (linux_wait_1): Check if threads need moving out of jump pads, and
5644 do it if so.
5645 (stuck_in_jump_pad_callback): New.
5646 (move_out_of_jump_pad_callback): New.
5647 (lwp_running): New.
5648 (linux_resume_one_lwp): Handle moving out of jump pads.
5649 (linux_set_resume_request): Dequeue deferred signals.
5650 (need_step_over_p): Also step over fast tracepoint jumps.
5651 (start_step_over): Also uninsert fast tracepoint jumps.
5652 (finish_step_over): Also reinsert fast tracepoint jumps.
5653 (linux_install_fast_tracepoint_jump): New.
5654 (linux_target_ops): Install linux_stabilize_threads and
5655 linux_install_fast_tracepoint_jump_pad.
5656 * linux-low.h (linux_target_ops) <get_thread_area,
5657 install_fast_tracepoint_jump_pad>: New fields.
5658 (struct lwp_info) <collecting_fast_tracepoint,
5659 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
5660 (linux_get_thread_area): Declare.
5661 * linux-x86-low.c (jump_insn): New.
5662 (x86_get_thread_area): New.
5663 (append_insns): New.
5664 (push_opcode): New.
5665 (amd64_install_fast_tracepoint_jump_pad): New.
5666 (i386_install_fast_tracepoint_jump_pad): New.
5667 (x86_install_fast_tracepoint_jump_pad): New.
5668 (the_low_target): Install x86_get_thread_area and
5669 x86_install_fast_tracepoint_jump_pad.
5670 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
5671 (struct fast_tracepoint_jump): New.
5672 (fast_tracepoint_jump_insn): New.
5673 (fast_tracepoint_jump_shadow): New.
5674 (find_fast_tracepoint_jump_at): New.
5675 (fast_tracepoint_jump_here): New.
5676 (delete_fast_tracepoint_jump): New.
5677 (set_fast_tracepoint_jump): New.
5678 (uninsert_fast_tracepoint_jumps_at): New.
5679 (reinsert_fast_tracepoint_jumps_at): New.
5680 (set_breakpoint_at): Use write_inferior_memory.
5681 (uninsert_raw_breakpoint): Use write_inferior_memory.
5682 (check_mem_read): Mask out fast tracepoint jumps.
5683 (check_mem_write): Mask out fast tracepoint jumps.
5684 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
5685 (set_fast_tracepoint_jump): Declare.
5686 (delete_fast_tracepoint_jump)
5687 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
5688 (reinsert_fast_tracepoint_jumps_at): Declare.
5689 * regcache.c: Don't compile many functions when building the
5690 in-process agent library.
5691 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
5692 the register buffer in the heap.
5693 (free_register_cache): If the register buffer isn't owned by the
5694 regcache, don't free it.
5695 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
5696 pre-existing register caches.
5697 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
5698 type.
5699 (convert_ascii_to_int): : Constify `from' parameter type.
5700 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
5701 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
5702 the needed buffer in-place.
5703 (relocate_instruction): New.
5704 * server.c (handle_query) <qSymbols>: If the target supports
5705 tracepoints, give it a chance of looking up symbols. Report
5706 support for fast tracepoints.
5707 (handle_status): Stabilize threads.
5708 (process_serial_event): Adjust.
5709 * server.h (struct fast_tracepoint_jump): Forward declare.
5710 (struct process_info) <fast_tracepoint_jumps>: New field.
5711 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
5712 (decode_X_packet, decode_M_packet): Adjust.
5713 (relocate_instruction): Declare.
5714 (in_process_agent_loaded): Declare.
5715 (tracepoint_look_up_symbols): Declare.
5716 (struct fast_tpoint_collect_status): Declare.
5717 (fast_tracepoint_collecting): Declare.
5718 (force_unlock_trace_buffer): Declare.
5719 (handle_tracepoint_bkpts): Declare.
5720 (initialize_low_tracepoint)
5721 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
5722 * target.h (struct target_ops) <stabilize_threads,
5723 install_fast_tracepoint_jump_pad>: New fields.
5724 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
5725 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
5726 [HAVE_STDINT_H]: Include stdint.h.
5727 (trace_debug_1): Rename to ...
5728 (trace_vdebug): ... this.
5729 (trace_debug): Rename to ...
5730 (trace_debug_1): ... this. Add `level' parameter.
5731 (trace_debug): New.
5732 (ATTR_USED, ATTR_NOINLINE): New.
5733 (IP_AGENT_EXPORT): New.
5734 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5735 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
5736 (about_to_request_buffer_space, trace_buffer_is_full)
5737 (stopping_tracepoint, expr_eval_result, error_tracepoint)
5738 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
5739 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
5740 (traceframe_write_count, traceframes_created)
5741 (trace_state_variables)
5742 New renaming defines.
5743 (struct ipa_sym_addresses): New.
5744 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
5745 (symbol_list): New.
5746 (ipa_sym_addrs): New.
5747 (all_tracepoint_symbols_looked_up): New.
5748 (in_process_agent_loaded): New.
5749 (write_e_ipa_not_loaded): New.
5750 (maybe_write_ipa_not_loaded): New.
5751 (tracepoint_look_up_symbols): New.
5752 (debug_threads) [IN_PROCESS_AGENT]: New.
5753 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
5754 (UNKNOWN_SIDE_EFFECTS): New.
5755 (stop_tracing): New.
5756 (flush_trace_buffer): New.
5757 (stop_tracing_bkpt): New.
5758 (flush_trace_buffer_bkpt): New.
5759 (read_inferior_integer): New.
5760 (read_inferior_uinteger): New.
5761 (read_inferior_data_pointer): New.
5762 (write_inferior_data_pointer): New.
5763 (write_inferior_integer): New.
5764 (write_inferior_uinteger): New.
5765 (struct collect_static_trace_data_action): Delete.
5766 (enum tracepoint_type): New.
5767 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
5768 <actions_str, step_actions, step_actions_str>: Only include in
5769 GDBserver.
fa593d66
PA
5770 <orig_size, obj_addr_on_target, adjusted_insn_addr>
5771 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
5772 (tracepoints): Use IP_AGENT_EXPORT.
5773 (last_tracepoint): Don't include in the IPA.
5774 (stopping_tracepoint): Use IP_AGENT_EXPORT.
5775 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
5776 (alloced_trace_state_variables): New.
5777 (trace_state_variables): Use IP_AGENT_EXPORT.
5778 (traceframe_t): Delete unused variable.
5779 (circular_trace_buffer): Don't include in the IPA.
5780 (trace_buffer_start): Delete.
5781 (struct trace_buffer_control): New.
5782 (trace_buffer_free): Delete.
5783 (struct ipa_trace_buffer_control): New.
5784 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
5785 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
5786 New.
5787 (trace_buffer_ctrl): New.
5788 (TRACE_BUFFER_CTRL_CURR): New.
5789 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
5790 Reimplement as macros.
5791 (trace_buffer_wrap): Delete.
5792 (traceframe_write_count, traceframe_read_count)
5793 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
5794 (struct tracepoint_hit_ctx) <type>: New field.
5795 (struct fast_tracepoint_ctx): New.
5796 (memory_barrier): New.
5797 (cmpxchg): New.
5798 (record_tracepoint_error): Update atomically in the IPA.
5799 (clear_inferior_trace_buffer): New.
5800 (about_to_request_buffer_space): New.
5801 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
5802 updating the same buffer.
5803 (add_tracepoint): Default the tracepoint's type to trap
5804 tracepoint, and orig_size to -1.
5805 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
5806 internal variables.
5807 (create_trace_state_variable): New parameter `gdb'. Handle it.
5808 (clear_installed_tracepoints): Clear fast tracepoint jumps.
5809 (cmd_qtdp): Handle fast tracepoints.
5810 (cmd_qtdv): Adjust.
5811 (max_jump_pad_size): New.
5812 (gdb_jump_pad_head): New.
5813 (get_jump_space_head): New.
5814 (claim_jump_space): New.
5815 (sort_tracepoints): New.
5816 (MAX_JUMP_SIZE): New.
5817 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
5818 IPA.
5819 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
5820 support. Upload fast traceframes, and delete internal IPA
5821 breakpoints.
5822 (stop_tracing_handler): New.
5823 (flush_trace_buffer_handler): New.
5824 (cmd_qtstop): Upload fast tracepoints.
5825 (response_tracepoint): Handle fast tracepoints.
5826 (tracepoint_finished_step): Upload fast traceframes. Set the
5827 tracepoint hit context's tracepoint type.
5828 (handle_tracepoint_bkpts): New.
5829 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
5830 type. Add comment about fast tracepoints.
5831 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
5832 non-existing action_str field.
5833 (get_context_regcache): Handle fast tracepoints.
5834 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
5835 to the regcache.
5836 (fast_tracepoint_from_jump_pad_address): New.
5837 (fast_tracepoint_from_ipa_tpoint_address): New.
5838 (collecting_t): New.
5839 (force_unlock_trace_buffer): New.
5840 (fast_tracepoint_collecting): New.
5841 (collecting): New.
5842 (gdb_collect): New.
5843 (write_inferior_data_ptr): New.
5844 (target_tp_heap): New.
5845 (target_malloc): New.
5846 (download_agent_expr): New.
5847 (UALIGN): New.
5848 (download_tracepoints): New.
5849 (download_trace_state_variables): New.
5850 (upload_fast_traceframes): New.
5851 (IPA_FIRST_TRACEFRAME): New.
5852 (IPA_NEXT_TRACEFRAME_1): New.
5853 (IPA_NEXT_TRACEFRAME): New.
5854 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
5855 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
5856 (gdb_jump_pad_buffer_end): New.
5857 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
5858 (initialize_tracepoint): Adjust.
5859 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
5860 buffer. Initialize the low module.
5861 * utils.c (PREFIX, TOOLNAME): New.
5862 (malloc_failure): Use PREFIX.
5863 (error): In the IPA, an error causes an exit.
5864 (fatal, warning): Use PREFIX.
5865 (internal_error): Use TOOLNAME.
5866 (NUMCELLS): Increase to 10.
5867 * configure, config.in: Regenerate.
5868
d149dd1d
PA
58692010-06-01 Pedro Alves <pedro@codesourcery.com>
5870
5871 * server.c (handle_query) <qSupported>: Do two passes over the
5872 qSupported string to avoid nesting strtok.
5873
f6528abd
JK
58742010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5875
5876 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
5877 (CDEPS): New.
5878 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
5879 -Wl,--dynamic-list.
5880 * configure: Regenerate.
5881 * proc-service.list: New.
5882
ca2a87a0
JK
58832010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5884
5885 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
5886 New comment.
5887
363a6e9f
OS
58882010-05-26 Ozkan Sezer <sezeroz@gmail.com>
5889
5890 * gdbreplay.c (remote_open): Check error return from socket() call by
5891 its equality to -1 not by it being negative.
5892 * remote-utils.c (remote_open): Likewise.
5893
d23b6cb1
PA
58942010-05-23 Pedro Alves <pedro@codesourcery.com>
5895
5896 * config.h: Regenerate.
5897
28d3cf85
MK
58982010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
5899
5900 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
5901 doesn't provide PTRACE_GET_THREAD_AREA.
5902
fea36a59
MK
59032010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
5904
5905 * linux-m68k-low.c: Include <asm/ptrace.h>
5906 (ps_get_thread_area): Implement.
5907
24b066ba
DE
59082010-05-03 Doug Evans <dje@google.com>
5909
5910 * event-loop.c (struct callback_event): New struct.
5911 (callback_list): New global.
5912 (append_callback_event, delete_callback_event): New functions.
5913 (process_callback): New function.
5914 (start_event_loop): Call it.
5915 * remote-utils.c (NOT_SCHEDULED): Define.
5916 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
5917 moved out of readchar.
5918 (readchar): Rewrite. Call reschedule before returning.
5919 (reset_readchar): New function.
5920 (remote_close): Call it.
5921 (process_remaining, reschedule): New functions.
5922 * server.h (callback_handler_func): New typedef.
5923 (append_callback_event, delete_callback_event): Declare.
5924
9836d6ea
PA
59252010-05-03 Pedro Alves <pedro@codesourcery.com>
5926
5927 * proc-service.c (ps_pglobal_lookup): Use
5928 thread_db_look_up_one_symbol.
5929 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
5930 parameter. Use it instead of all_symbols_looked_up.
5931 * server.h (struct process_info) <all_symbols_looked_up>: Delete
5932 field.
5933 (all_symbols_looked_up): Don't declare.
5934 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
5935 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
5936 field.
5937 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
5938 Set all_symbols_looked_up here.
5939 (thread_db_look_up_one_symbol): New.
5940 (thread_db_get_tls_address): Adjust.
5941 (thread_db_load_search, try_thread_db_load_1): Always allocate the
5942 thread_db object on the heap, and tentatively set it in the
5943 process structure.
5944 (thread_db_init): Don't set all_symbols_looked_up here.
5945 * linux-low.h (thread_db_look_up_one_symbol): Declare.
5946
7984d532
PA
59472010-05-03 Pedro Alves <pedro@codesourcery.com>
5948
5949 * linux-low.c (linux_kill, linux_detach): Adjust.
5950 (status_pending_p_callback): Remove redundant statement. Check
5951 for !TARGET_WAITIKIND_IGNORE, instead of
5952 TARGET_WAITKIND_STOPPED.
5953 (handle_tracepoints): Make sure LWP is locked. Adjust.
5954 (linux_wait_for_event_1): Adjust.
5955 (linux_cancel_breakpoints): New.
5956 (unsuspend_one_lwp): New.
5957 (unsuspend_all_lwps): New.
5958 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
5959 (send_sigstop_callback): Change return type to int, add new
5960 `except' parameter and handle it.
5961 (suspend_and_send_sigstop_callback): New.
5962 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
5963 pass them down. If SUSPEND, also increment the lwp's suspend
5964 count.
5965 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
5966 (need_step_over_p): Don't consider suspended LWPs.
5967 (start_step_over): Adjust.
5968 (proceed_one_lwp): Change return type to int, add new `except'
5969 parameter and handle it.
5970 (unsuspend_and_proceed_one_lwp): New.
5971 (proceed_all_lwps): Use find_inferior instead of
5972 for_each_inferior.
5973 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
5974 also decrement the suspend count of LWPs. Pass `except' down,
5975 instead of hacking its suspend count.
5976 (linux_pause_all): Add `freeze' parameter. Adjust.
5977 (linux_unpause_all): New.
5978 (linux_target_ops): Install linux_unpause_all.
5979 * server.c (handle_status): Adjust.
5980 * target.h (struct target_ops): New fields `unpause_all' and
5981 `cancel_breakpoints'. Add new parameter to `pause_all'.
5982 (pause_all): Add new `freeze' parameter.
5983 (unpause_all): New.
5984 (cancel_breakpoints): New.
5985 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
5986 cancel breakpoints.
5987 (cmd_qtstart): Pause threads.
5988 (stop_tracing): Pause threads, and cancel breakpoints.
5989 * win32-low.c (win32_target_ops): Adjust.
5990
e471f25b
PA
59912010-05-03 Pedro Alves <pedro@codesourcery.com>
5992
5993 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
5994 the inferior right away from here...
5995 (linux_wait_1): ... to here, and adjust to check the thread's
5996 last_resume_kind instead of the lwp's step or stop_expected flags.
5997
1915ef4f
PA
59982010-05-02 Pedro Alves <pedro@codesourcery.com>
5999
6000 * README: Use consistent `GDB' and `GDBserver' spellings.
6001
f9e39928
PA
60022010-05-02 Pedro Alves <pedro@codesourcery.com>
6003
6004 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
6005 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
6006 (linux_detach_one_lwp): Assume the lwp is stopped.
6007 (any_thread_of): Delete.
6008 (linux_detach): Stop all lwps here. Don't blindly delete all
6009 breakpoints.
6010 (delete_lwp_callback): New.
6011 (linux_mourn): Delete all lwps of the process that is gone.
6012 (linux_wait_1): Don't delete the last lwp of the process here.
6013 * mem-break.h (mark_breakpoints_out): Declare.
6014 * mem-break.c (mark_breakpoints_out): New.
6015 (free_all_breakpoints): Use it.
6016 * server.c (handle_target_event): If the process is gone, mark
6017 breakpoints out.
6018 * thread-db.c (struct thread_db) <create_bp>: New field.
6019 (thread_db_enable_reporting): Fix prototype. Store a thread event
6020 breakpoint reference in the thread_db struct.
6021 (thread_db_load_search): Clear the thread_db object.
6022 (try_thread_db_load_1): Ditto.
6023 (switch_to_process): New.
6024 (disable_thread_event_reporting): Use it.
6025 (remove_thread_event_breakpoints): New.
6026 (thread_db_detach, thread_db_mourn): Use it.
6027
1e7fc18c
PA
60282010-05-01 Pedro Alves <pedro@codesourcery.com>
6029
6030 * linux-low.c (linux_enable_event_reporting): New.
6031 (linux_wait_for_event_1, handle_extended_wait): Use it.
6032
02fc4de7
PA
60332010-04-30 Pedro Alves <pedro@codesourcery.com>
6034
6035 * linux-low.c (linux_kill_one_lwp, linux_kill)
6036 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
6037 (send_sigstop): Take an lwp_info as parameter instead. Queue a
6038 SIGSTOP even if the LWP is stopped.
6039 (send_sigstop_callback): New.
6040 (stop_all_lwps): Use send_sigstop_callback instead.
6041 (linux_resume_one_thread): Adjust.
6042 (proceed_one_lwp): Still proceed an LWP that the client has
6043 requested to stop, if we haven't reported it as stopped yet. Make
6044 sure that LWPs the client want stopped, have a pending SIGSTOP.
6045
bc3b5632
DE
60462010-04-26 Doug Evans <dje@google.com>
6047
ae1ada35
DE
6048 * server.c (handle_general_set): Make static.
6049
bc3b5632
DE
6050 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
6051 Print received char after testing for error/eof instead of before.
6052 (input_interrupt): Tweak comment.
6053
65730243
DE
60542010-04-23 Doug Evans <dje@google.com>
6055
6056 * server.c (start_inferior): Print inferior argv if --debug.
6057
a8ae7dc0
AR
60582010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
6059
6060 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
6061 * nto-x86-low.c: Include server.h
6062
1c07cc19
PM
60632010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
6064
6065 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
6066 be consistent with other sources of this directory.
6067 (init_registers_amd64): Correct name of source file of this function
6068 in the comment.
6069
e0a61e09
PM
60702010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6071
6072 * configure.srv (x86_64-*-mingw*): New configuration for Windows
6073 64-bit executables.
6074
54709339
PM
60752010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6076
6077 * win32-i386-low.c: Add 64-bit support.
6078 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
6079 (init_registers_amd64): Declare.
6080 (mappings): Add 64-bit version of array.
6081 (init_windows_x86): New function.
6082 (the_low_target): Change init_arch field to init_windows_x86.
6083
e8f0053d
PM
60842010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6085
6086 * win32-low.c: Adapt to support also 64-bit architecture.
6087 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
6088 (get_image_name): Use SIZE_T type for local variable `done'.
6089 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
6090 (toolhelp_get_dll_name): Idem.
6091 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
6092 Use uintptr_t typecast to avoid warning.
6093 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
6094 (handle_exception): Use phex_nz to avoid warning.
6095 (win32_wait): Remove unused local variable `process'.
6096
c481e77e
PM
60972010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6098
6099 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
6100 `amd64-avx.o'.
6101
12ea4b69
PM
61022010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
6103
6104 * configure.ac: Use `ws2_32' library for srv_mingw.
6105 * configure: Regenerate.
6106 * gdbreplay.c: Include winsock2.h instead of winsock.h.
6107 * remote-utils.c: Likewise.
6108
f6d1620c
L
61092010-04-17 H.J. Lu <hongjiu.lu@intel.com>
6110
6111 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
6112 if __x86_64__ is defined.
6113
8e642873
PM
61142010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
6115
6116 * configure: Regenerate.
6117
711e434b
PM
61182010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
6119
6120 * server.c (handle_query): Handle 'qGetTIBAddr' query.
6121 * target.h (target_ops): New get_tib_address field.
6122 * win32-low.h (win32_thread_info): Add thread_local_base field.
6123 * win32-low.c (child_add_thread): Add tlb argument.
6124 Set thread_local_base field to TLB.
6125 (get_child_debug_event): Adapt to child_add_thread change.
6126 (win32_get_tib_address): New function.
6127 (win32_target_ops): Set get_tib_address field to
6128 win32_get_tib_address.
6129 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
6130
505106cd
PA
61312010-04-12 Pedro Alves <pedro@codesourcery.com>
6132
505106cd
PA
6133 * linux-low.c (linux_mourn): Also remove the process.
6134 * server.c (handle_target_event): Don't remove the process here.
6135 * nto-low.c (nto_mourn): New.
6136 (nto_target_ops): Install it.
6137 * spu-low.c (spu_mourn): New.
6138 (spu_target_ops): Install it.
6139 * win32-low.c (win32_mourn): New.
6140 (win32_target_ops): Install it.
6141
e8470a06
PA
61422010-04-12 Pedro Alves <pedro@codesourcery.com>
6143
6144 * server.h (buffer_xml_printf): Remove redundant `;'.
6145
45ba0d02
PA
61462010-04-12 Pedro Alves <pedro@codesourcery.com>
6147
6148 * regcache.c (set_register_cache): Invalidate regcaches before
6149 changing the register cache layout.
6150 (regcache_invalidate_one): Allow a NULL regcache.
6151 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
6152 regcaches before changing the register cache layout or the target
6153 regsets.
6154
59e04013
L
61552010-04-12 H.J. Lu <hongjiu.lu@intel.com>
6156
6157 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
6158 variable warning on Linux/x86-64.
6159
8336d594
PA
61602010-04-11 Pedro Alves <pedro@codesourcery.com>
6161
6162 GDBserver disconnected tracing support.
6163
6164 * linux-low.c (linux_remove_process): Delete.
6165 (add_lwp): Don't set last_resume_kind here.
6166 (linux_kill): Use `mourn'.
6167 (linux_detach): Use `thread_db_detach', and `mourn'.
6168 (linux_mourn): New.
6169 (linux_attach_lwp_1): Adjust comment.
6170 (linux_attach): last_resume_kind moved the thread_info; adjust.
6171 (status_pending_p_callback): Adjust.
6172 (linux_wait_for_event_1): Adjust.
6173 (count_events_callback, select_singlestep_lwp_callback)
6174 (select_event_lwp_callback, cancel_breakpoints_callback)
6175 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
6176 (proceed_one_lwp): Adjust.
6177 (linux_async): Add debug output.
6178 (linux_thread_stopped): New.
6179 (linux_pause_all): New.
6180 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
6181 linux_pause_all.
6182 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
6183 (thread_db_free): Delete declaration.
6184 (thread_db_detach, thread_db_mourn): Declare.
6185 * thread-db.c (thread_db_init): Use thread_db_mourn.
6186 (thread_db_free): Delete, split in two.
6187 (disable_thread_event_reporting): New.
6188 (thread_db_detach): New.
6189 (thread_db_mourn): New.
6190
6191 * server.h (struct thread_info) <last_resume_kind>: New field.
6192 <attached>: Add comment.
6193 <gdb_detached>: New field.
6194 (handler_func): Change return type to int.
6195 (handle_serial_event, handle_target_event): Ditto.
6196 (gdb_connected): Declare.
6197 (tracing): Delete.
6198 (disconnected_tracing): Declare.
6199 (stop_tracing): Declare.
6200
6201 * server.c (handle_query) <qSupported>: Report support for
6202 disconnected tracing.
6203 (queue_stop_reply_callback): Account for running threads.
6204 (gdb_wants_thread_stopped): New.
6205 (gdb_wants_all_threads_stopped): New.
6206 (gdb_reattached_process): New.
6207 (handle_status): Clear the `gdb_detached' flag of all processes.
6208 In all-stop, stop all threads.
6209 (main): Be sure to leave tfind mode. Handle disconnected tracing.
6210 (process_serial_event): If the remote connection breaks, or if an
6211 exit was forced with "monitor exit", force an event loop exit.
6212 Handle disconnected tracing on detach.
6213 (handle_serial_event): Adjust.
6214 (handle_target_event): If GDB isn't connected, forward events back
6215 to the inferior, unless the last process exited, in which case,
6216 exit gdbserver. Adjust interface.
6217
6218 * remote-utils.c (remote_open): Don't block in accept. Instead
6219 register an event loop source on the listen socket file
6220 descriptor. Refactor bits into ...
6221 (listen_desc): ... this new global.
6222 (gdb_connected): ... this new function.
6223 (enable_async_notification): ... this new function.
6224 (handle_accept_event): ... this new function.
6225 (remote_close): Clear remote_desc.
6226
6227 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
6228
6229 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
6230 New fields.
6231 (mourn_inferior): Define.
6232 (target_process_qsupported): Avoid the dangling else problem.
6233 (thread_stopped): Define.
6234 (pause_all): Define.
6235 (target_waitstatus_to_string): Declare.
6236 * target.c (target_waitstatus_to_string): New.
6237
6238 * tracepoint.c (tracing): Make extern.
6239 (disconnected_tracing): New.
6240 (stop_tracing): Make extern. Handle tracing stops due to GDB
6241 disconnecting.
6242 (cmd_qtdisconnected): New.
6243 (cmd_qtstatus): Report disconnected tracing status in trace reply.
6244 (handle_tracepoint_general_set): Handle QTDisconnected.
6245
6246 * event-loop.c (event_handler_func): Change return type to int.
6247 (process_event): Bail out if the event handler wants the event
6248 loop to stop.
6249 (handle_file_event): Ditto.
6250 (start_event_loop): Bail out if the event handler wants the event
6251 loop to stop.
6252
6253 * nto-low.c (nto_target_ops): Adjust.
6254 * spu-low.c (spu_wait): Don't remove the process here.
6255 (spu_target_ops): Adjust.
6256 * win32-low.c (win32_wait): Don't remove the process here.
6257 (win32_target_ops): Adjust.
6258
5d267c4c
PA
62592010-04-11 Pedro Alves <pedro@codesourcery.com>
6260
6261 * regcache.c (realloc_register_cache): Invalidate inferior's
6262 regcache before recreating it.
6263
623ccd72
PA
62642010-04-09 Pedro Alves <pedro@codesourcery.com>
6265
6266 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
6267
219f2f23
PA
62682010-04-09 Stan Shebs <stan@codesourcery.com>
6269 Pedro Alves <pedro@codesourcery.com>
6270
6271 * server.h (LONGEST): New.
6272 (struct thread_info) <while_stepping>: New field.
6273 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
6274 Declare.
6275 (initialize_tracepoint, handle_tracepoint_general_set)
6276 (handle_tracepoint_query, tracepoint_finished_step)
6277 (tracepoint_was_hit, release_while_stepping_state_list):
6278 (current_traceframe): Declare.
6279 * server.c (handle_general_set): Handle tracepoint packets.
6280 (read_memory): New.
6281 (write_memory): New.
6282 (handle_search_memory_1): Use read_memory.
6283 (handle_query): Report support for conditional tracepoints, trace
6284 state variables, and tracepoint sources. Handle tracepoint
6285 queries.
6286 (main): Initialize the tracepoints module.
6287 (process_serial_event): Handle traceframe reads/writes.
6288
6289 * linux-low.c (handle_tracepoints): New.
6290 (linux_wait_1): Call it.
6291 (linux_resume_one_lwp): Handle while-stepping.
6292 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
6293 (linux_target_ops): Install them.
6294 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
6295 New field.
6296 * linux-x86-low.c (x86_supports_tracepoints): New.
6297 (the_low_target). Install it.
6298
6299 * mem-break.h (delete_breakpoint): Declare.
6300 * mem-break.c (delete_breakpoint): Make external.
6301
6302 * target.h (struct target_ops): Add `supports_tracepoints',
6303 `read_pc', and `write_pc' fields.
6304 (target_supports_tracepoints): Define.
6305 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
6306 (phex_nz): New.
6307
6308 * regcache.h (struct regcache) <registers_owned>: New field.
6309 (init_register_cache, regcache_cpy): Declare.
6310 (regcache_read_pc, regcache_write_pc): Declare.
6311 (register_cache_size): Declare.
6312 (supply_regblock): Declare.
6313 * regcache.c (init_register_cache): New.
6314 (new_register_cache): Use it.
6315 (regcache_cpy): New.
6316 (register_cache_size): New.
6317 (supply_regblock): New.
6318 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 6319
219f2f23
PA
6320 * tracepoint.c: New.
6321
6322 * Makefile.in (OBS): Add tracepoint.o.
6323 (tracepoint.o): New rule.
6324
3a13a53b
L
63252010-04-08 H.J. Lu <hongjiu.lu@intel.com>
6326
6327 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
6328 (i386-mmx.o): New.
6329 (i386-mmx.c): Likewise.
6330 (i386-mmx-linux.o): Likewise.
6331 (i386-mmx-linux.c): Likewise.
6332
6333 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
6334 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
6335 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
6336 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
6337
6338 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
6339 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
6340 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
6341
1570b33e
L
63422010-04-07 H.J. Lu <hongjiu.lu@intel.com>
6343
6344 * Makefile.in (clean): Updated.
6345 (i386-avx.o): New.
6346 (i386-avx.c): Likewise.
6347 (i386-avx-linux.o): Likewise.
6348 (i386-avx-linux.c): Likewise.
6349 (amd64-avx.o): Likewise.
6350 (amd64-avx.c): Likewise.
6351 (amd64-avx-linux.o): Likewise.
6352 (amd64-avx-linux.c): Likewise.
6353
6354 * configure.srv (srv_i386_regobj): Add i386-avx.o.
6355 (srv_i386_linux_regobj): Add i386-avx-linux.o.
6356 (srv_amd64_regobj): Add amd64-avx.o.
6357 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
6358 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
6359 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
6360 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
6361 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
6362 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
6363 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
6364
6365 * i387-fp.c: Include "i386-xstate.h".
6366 (i387_xsave): New.
6367 (i387_cache_to_xsave): Likewise.
6368 (i387_xsave_to_cache): Likewise.
6369 (x86_xcr0): Likewise.
6370
6371 * i387-fp.h (i387_cache_to_xsave): Likewise.
6372 (i387_xsave_to_cache): Likewise.
6373 (x86_xcr0): Likewise.
6374
6375 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
6376 * linux-crisv32-low.c (target_regsets): Likewise.
6377 * linux-m68k-low.c (target_regsets): Likewise.
6378 * linux-mips-low.c (target_regsets): Likewise.
6379 * linux-ppc-low.c (target_regsets): Likewise.
6380 * linux-s390-low.c (target_regsets): Likewise.
6381 * linux-sh-low.c (target_regsets): Likewise.
6382 * linux-sparc-low.c (target_regsets): Likewise.
6383 * linux-xtensa-low.c (target_regsets): Likewise.
6384
6385 * linux-low.c: Include <sys/uio.h>.
6386 (regsets_fetch_inferior_registers): Support nt_type.
6387 (regsets_store_inferior_registers): Likewise.
6388 (linux_process_qsupported): New.
6389 (linux_target_ops): Add linux_process_qsupported.
6390
6391 * linux-low.h (regset_info): Add nt_type.
6392 (linux_target_ops): Add process_qsupported.
6393
6394 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
6395 and <sys/uio.h>.
6396 (init_registers_i386_avx_linux): New.
6397 (init_registers_amd64_avx_linux): Likewise.
6398 (xmltarget_i386_linux_no_xml): Likewise.
6399 (xmltarget_amd64_linux_no_xml): Likewise.
6400 (PTRACE_GETREGSET): Likewise.
6401 (PTRACE_SETREGSET): Likewise.
6402 (x86_fill_xstateregset): Likewise.
6403 (x86_store_xstateregset): Likewise.
6404 (use_xml): Likewise.
6405 (x86_linux_update_xmltarget): Likewise.
6406 (x86_linux_process_qsupported): Likewise.
6407 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
6408 (x86_arch_setup): Don't call init_registers_amd64_linux nor
6409 init_registers_i386_linux here. Call
6410 x86_linux_update_xmltarget.
6411 (the_low_target): Add x86_linux_process_qsupported.
6412
6413 * server.c (handle_query): Call target_process_qsupported.
6414
6415 * target.h (target_ops): Add process_qsupported.
6416 (target_process_qsupported): New.
6417
fc7238bb
PA
64182010-04-03 Pedro Alves <pedro@codesourcery.com>
6419
6420 * inferiors.c (add_thread): Set last_status kind to
6421 TARGET_WAITKIND_IGNORE.
6422 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
6423 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
6424 (linux_wait_1): Move `thread' local definition to block that uses
6425 it. Don't NULL initialize `event_child'.
6426 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
6427 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
6428 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
6429
bdabb078
PA
64302010-04-01 Pedro Alves <pedro@codesourcery.com>
6431
6432 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
6433 an extended waitstatus, or by a watchpoint.
6434 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
6435 thread was stepping or has been stopped by a watchpoint.
6436
d3bbe7a0
PA
64372010-04-01 Pedro Alves <pedro@codesourcery.com>
6438
6439 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
6440 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
6441 of another, then delete the previous, and validate all
6442 breakpoints.
6443 (validate_inserted_breakpoint): New.
6444 (delete_disabled_breakpoints): New.
6445 (validate_breakpoints): New.
6446 (check_mem_read): Validate breakpoints before trusting their
6447 shadow. Delete disabled breakpoints.
6448 (check_mem_write): Validate breakpoints before trusting they
6449 should be inserted. Delete disabled breakpoints.
6450 * mem-break.h (validate_breakpoints):
6451 * server.c (handle_query): Validate breakpoints when we see a
6452 qSymbol query.
6453
8b07ae33
PA
64542010-04-01 Pedro Alves <pedro@codesourcery.com>
6455
6456 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
6457 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
6458 if we could tell there's a GDB breakpoint at stop_pc.
6459 (need_step_over_p): Don't do a step over if we find a GDB
6460 breakpoint at the resume PC.
6461
6462 * mem-break.c (struct raw_breakpoint): New.
6463 (enum bkpt_type): New type `gdb_breakpoint'.
6464 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
6465 fields. New field `raw'.
6466 (find_raw_breakpoint_at): New.
6467 (set_raw_breakpoint_at): Handle refcounting. Create a raw
6468 breakpoint instead.
6469 (set_breakpoint_at): Adjust.
6470 (delete_raw_breakpoint): New.
6471 (release_breakpoint): New.
6472 (delete_breakpoint): Rename to...
6473 (delete_breakpoint_1): ... this. Add proc parameter. Use
6474 release_breakpoint. Return ENOENT.
6475 (delete_breakpoint): Reimplement.
6476 (find_breakpoint_at): Delete.
6477 (find_gdb_breakpoint_at): New.
6478 (delete_breakpoint_at): Delete.
6479 (set_gdb_breakpoint_at): New.
6480 (delete_gdb_breakpoint_at): New.
6481 (gdb_breakpoint_here): New.
6482 (set_reinsert_breakpoint): Use release_breakpoint.
6483 (uninsert_breakpoint): Rename to ...
6484 (uninsert_raw_breakpoint): ... this.
6485 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
6486 (reinsert_raw_breakpoint): Change parameter type to
6487 raw_breakpoint.
6488 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
6489 instead.
6490 (check_breakpoints): Adjust. Use release_breakpoint.
6491 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
6492 (breakpoint_inserted_here): Ditto.
6493 (check_mem_read): Adjust to iterate over raw breakpoints instead.
6494 Don't trust the breakpoint's shadow if it is not inserted.
6495 (check_mem_write): Adjust to iterate over raw breakpoints instead.
6496 (delete_all_breakpoints): Adjust.
6497 (free_all_breakpoints): Mark all breakpoints as uninserted, and
6498 use delete_breakpoint_1.
6499
6500 * mem-break.h (breakpoints_supported): Delete declaration.
6501 (set_gdb_breakpoint_at): Declare.
6502 (gdb_breakpoint_here): Declare.
6503 (delete_breakpoint_at): Delete.
6504 (delete_gdb_breakpoint_at): Declare.
6505
6506 * server.h (struct raw_breakpoint): Forward declare.
6507 (struct process_info): New field `raw_breakpoints'.
6508
6509 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
6510 breakpoints.
6511
6bf5e0ba
PA
65122010-03-24 Pedro Alves <pedro@codesourcery.com>
6513
6514 * linux-low.c (status_pending_p_callback): Fix comment.
6515 (linux_wait_for_event_1): Move most of the internal breakpoint
6516 handling from here...
6517 (linux_wait_1): ... to here.
6518 (count_events_callback): New.
6519 (select_singlestep_lwp_callback): New.
6520 (select_event_lwp_callback): New.
6521 (cancel_breakpoints_callback): New.
6522 (select_event_lwp): New.
6523 (linux_wait_1): Simplify internal breakpoint handling. Give equal
6524 priority to all LWPs that have had events that should be reported
6525 to the client. Cancel breakpoints when about to reporting the
6526 event to the client, not while stopping lwps. No longer cancel
6527 finished single-steps here.
6528 (cancel_finished_single_step): Delete.
6529 (cancel_finished_single_steps): Delete.
6530
414a389f
PA
65312010-03-24 Pedro Alves <pedro@codesourcery.com>
6532
6533 * mem-break.c (enum bkpt_type): New.
6534 (struct breakpoint): New field `type'.
6535 (set_breakpoint_at): Change return type to struct breakpoint
6536 pointer. Set type to `other_breakpoint' by default.
6537 (delete_breakpoint): Rewrite, supporting more than one breakpoint
6538 in the breakpoint list.
6539 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
6540 (reinsert_breakpoint): Rename to ...
6541 (reinsert_raw_breakpoint): ... this.
6542 (reinsert_breakpoints_at): Adjust.
6543 * mem-break.h (struct breakpoint): Declare.
6544 (set_breakpoint_at): Change return type to struct breakpoint
6545 pointer.
6546
2280c721
PA
65472010-03-24 Pedro Alves <pedro@codesourcery.com>
6548
6549 * server.c (handle_query): Assign, not compare.
6550
d50171e4
PA
65512010-03-24 Pedro Alves <pedro@codesourcery.com>
6552
6553 Teach linux gdbserver to step-over-breakpoints.
6554
6555 * linux-low.c (can_hardware_single_step): New.
6556 (supports_breakpoints): New.
6557 (handle_extended_wait): If stopping threads, read the stop pc of
6558 the new cloned LWP.
6559 (get_pc): New.
6560 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
6561 low target doesn't support retrieving the PC.
6562 (add_lwp): Set last_resume_kind to resume_continue.
6563 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
6564 (linux_attach): Don't clear stop_expected. Set the lwp's
6565 last_resume_kind to resume_stop.
6566 (linux_detach_one_lwp): Don't check for removed breakpoints.
6567 (check_removed_breakpoint): Delete.
6568 (status_pending_p): Rename to ...
6569 (status_pending_p_callback): ... this. Don't check for removed
6570 breakpoints. Don't consider threads that are stopped from GDB's
6571 perspective.
6572 (linux_wait_for_lwp): Always read the stop_pc here.
6573 (cancel_breakpoint): New.
6574 (step_over_bkpt): New global.
6575 (linux_wait_for_event_1): Implement stepping over breakpoints.
6576 (gdb_wants_lwp_stopped): New.
6577 (gdb_wants_all_stopped): New.
6578 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
6579 single-step traps here. Store the thread's last reported target
6580 wait status.
6581 (send_sigstop): Don't clear stop_expected. Always set it,
6582 instead.
6583 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
6584 (cancel_finished_single_step): New.
6585 (cancel_finished_single_steps): New.
6586 (wait_for_sigstop): Don't cancel finished single-step traps here.
6587 (linux_resume_one_lwp): Don't check for removed breakpoints.
6588 Don't set `step' on non-hardware step archs.
6589 (linux_set_resume_request): Ignore resume_stop requests if already
6590 stopping or stopped. Set the lwp's last_resume_kind.
6591 (resume_status_pending_p): Don't check for removed breakpoints.
6592 (need_step_over_p): New.
6593 (start_step_over): New.
6594 (finish_step_over): New.
6595 (linux_resume_one_thread): Always queue a sigstop for resume_stop
6596 requests. Clear the thread's last reported target waitstatus.
6597 Don't use the `suspended' flag. Don't consider pending breakpoints.
6598 (linux_resume): Start a step-over if necessary.
6599 (proceed_one_lwp): New.
6600 (proceed_all_lwps): New.
6601 (unstop_all_lwps): New.
6602 * linux-low.h (struct lwp_info): Rewrite comment for the
6603 `suspended' flag. Add the `stop_pc' field. Delete the
6604 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
6605 Add `'last_resume_kind' and `need_step_over' fields.
6606 * inferiors.c (struct thread_info): Delete, moved elsewhere.
6607 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
6608 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
6609 (set_raw_breakpoint_at): New.
6610 (set_breakpoint_at): Rewrite to use it.
6611 (reinsert_breakpoint_handler): Delete.
6612 (set_reinsert_breakpoint): New.
6613 (reinsert_breakpoint_by_bp): Delete.
6614 (delete_reinsert_breakpoints): New.
6615 (uninsert_breakpoint): Rewrite.
6616 (uninsert_breakpoints_at): New.
6617 (reinsert_breakpoint): Rewrite.
6618 (reinsert_breakpoints_at): New.
6619 (check_breakpoints): Rewrite.
6620 (breakpoint_here): New.
6621 (breakpoint_inserted_here): New.
6622 (check_mem_read): Adjust.
6623 * mem-break.h (breakpoints_supported, breakpoint_here)
6624 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
6625 (reinsert_breakpoint_by_bp): Delete declaration.
6626 (delete_reinsert_breakpoints): Declare.
6627 (reinsert_breakpoint): Delete declaration.
6628 (reinsert_breakpoints_at): Declare.
6629 (uninsert_breakpoint): Delete declaration.
6630 (uninsert_breakpoints_at): Declare.
6631 (check_breakpoints): Adjust prototype.
6632 * server.h: Adjust include order.
6633 (struct thread_info): Declare here. Add a `last_status' field.
6634
30ba68cb
MS
66352010-03-23 Michael Snyder <msnyder@vmware.com>
6636
6637 * server.c (crc32): New function.
6638 (handle_query): Add handling for 'qCRC:' request.
6639
b9a881c2
PA
66402010-03-23 Pedro Alves <pedro@codesourcery.com>
6641
6642 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
6643 lwp had been stopped by a watchpoint.
6644
e92d13d5
PA
66452010-03-16 Pedro Alves <pedro@codesourcery.com>
6646
6647 * server.h (internal_error): Declare.
6648 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
6649 * utils.c (internal_error): New function.
6650
64daa791
AS
66512010-03-15 Andreas Schwab <schwab@redhat.com>
6652
6653 * configure.srv: Fix typo setting srv_regobj.
6654
f52cd8cd
PA
66552010-03-15 Pedro Alves <pedro@codesourcery.com>
6656
6657 * linux-low.c (fetch_register): Avoid passing a non string literal
6658 format to `error'.
6659 (usr_store_inferior_registers): Ditto.
6660
93ae6fdc
PA
66612010-03-14 Pedro Alves <pedro@codesourcery.com>
6662
6663 * linux-low.c (linux_write_memory): Bail out early if peeking
6664 memory failed.
6665
c3adc08c
PA
66662010-03-14 Pedro Alves <pedro@codesourcery.com>
6667
6668 * linux-low.h (struct lwp_info): New fields
6669 `stopped_by_watchpoint' and `stopped_data_address'.
6670 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
6671 here, and cache them in the lwp object.
6672 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
6673 directly.
6674 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
6675 field.
6676 (linux_stopped_by_watchpoint): Rewrite.
6677 (linux_stopped_data_address): Rewrite.
6678
bce522a2
PA
66792010-03-06 Simo Melenius <simo.melenius@iki.fi>
6680
6681 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
6682 switching the current inferior, not before.
6683
90884b2b
L
66842010-03-01 H.J. Lu <hongjiu.lu@intel.com>
6685
6686 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
6687 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
6688 i386-linux.c and amd64-linux.c.
6689 (reg-i386.o): Removed.
6690 (reg-i386.c): Likewise.
6691 (reg-i386-linux.o): Likewise.
6692 (reg-i386-linux.c): Likewise.
6693 (reg-x86-64.o): Likewise.
6694 (reg-x86-64.c): Likewise.
6695 (reg-x86-64-linux.o): Likewise.
6696 (reg-x86-64-linux.c): Likewise.
6697 (i386.o): New.
6698 (i386.c): Likewise.
6699 (i386-linux.o): Likewise.
6700 (i386-linux.c): Likewise.
6701 (amd64.o): Likewise.
6702 (amd64.c): Likewise.
6703 (amd64-linux.o): Likewise.
6704 (amd64-linux.c): Likewise.
6705
6706 * configure.srv (srv_i386_regobj): New.
6707 (srv_i386_linux_regobj): Likewise.
6708 (srv_amd64_regobj): Likewise.
6709 (srv_amd64_linux_regobj): Likewise.
6710 (srv_i386_32bit_xmlfiles): Likewise.
6711 (srv_i386_64bit_xmlfiles): Likewise.
6712 (srv_i386_xmlfiles): Likewise.
6713 (srv_amd64_xmlfiles): Likewise.
6714 (srv_i386_linux_xmlfiles): Likewise.
6715 (srv_amd64_linux_xmlfiles): Likewise.
6716 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
6717 srv_xmlfiles to $srv_i386_xmlfiles.
6718 (i[34567]86-*-mingw32ce*): Likewise.
6719 (i[34567]86-*-mingw*): Likewise.
6720 (i[34567]86-*-nto*): Likewise.
6721 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
6722 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
6723 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
6724 (x86_64-*-linux*): Likewise.
6725
6726 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
6727 (init_registers_amd64_linux): New.
6728 (x86_arch_setup): Replace init_registers_x86_64_linux with
6729 init_registers_amd64_linux.
6730
193f13e6
MK
67312010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
6732
6733 * configure.ac: Check for libdl. If it is not available link against
6734 static libthread_db.
6735 * configure: Regenerate.
6736
85d721b8
PA
67372010-02-22 Pedro Alves <pedro@codesourcery.com>
6738
6739 PR9605
6740
6741 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
6742 handing a read watchpoint.
6743 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
6744
6076632b
DE
67452010-02-12 Doug Evans <dje@google.com>
6746
6747 * linux-low.c (linux_supports_tracefork_flag): Document.
6748 (linux_look_up_symbols): Add comment.
6749
3327ccf7
L
67502010-02-03 H.J. Lu <hongjiu.lu@intel.com>
6751
6752 * regcache.c (supply_register): Clear regcache if buf is NULL.
6753
0718675c 67542010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 6755 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
6756
6757 * inferiors.c (find_inferior): Add function documentation.
6758 (unloaded_dll): Handle the case where the unloaded dll has not
6759 been previously registered in the dll list.
6760
177321bd
DJ
67612010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
6762
6763 * linux-arm-low.c (thumb_breakpoint_len): Delete.
6764 (thumb2_breakpoint): New.
6765 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
6766
2b009048
DJ
67672010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
6768
6769 * linux-low.c (get_stop_pc): Check for SIGTRAP.
6770 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
6771 breakpoints.
6772
3be029c7
PA
67732010-01-21 Pedro Alves <pedro@codesourcery.com>
6774
6775 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
6776
18f5de3b
JK
67772010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
6778
6779 * linux-s390-low.c (s390_collect_ptrace_register)
6780 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
6781
3743bb4f
DE
67822010-01-21 Doug Evans <dje@google.com>
6783
14ce3065
DE
6784 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
6785 (PTRACE_ARG4_TYPE): New macro.
6786 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
6787 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
6788 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
6789 (usr_store_inferior_registers): Ditto.
6790 (linux_read_memory, linux_write_memory): Ditto.
6791 (linux_test_for_tracefork): Ditto.
6792
3743bb4f
DE
6793 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
6794 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
6795
8b315be5
PA
67962010-01-21 Pedro Alves <pedro@codesourcery.com>
6797
6798 * proc-service.c (ps_lgetregs): Don't refetch registers from the
6799 target.
6800
85492558
PA
68012010-01-21 Pedro Alves <pedro@codesourcery.com>
6802
6803 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
6804 prototype to take a regcache. Adjust.
6805
442ea881
PA
68062010-01-20 Pedro Alves <pedro@codesourcery.com>
6807
6808 * regcache.h (struct thread_info): Forward declare.
6809 (struct regcache): New.
6810 (new_register_cache): Adjust prototype.
6811 (get_thread_regcache): Declare.
6812 (free_register_cache): Adjust prototype.
6813 (registers_to_string, registers_from_string): Ditto.
6814 (supply_register, supply_register_by_name, collect_register)
6815 (collect_register_as_string, collect_register_by_name): Ditto.
6816 * regcache.c (struct inferior_regcache_data): Delete.
6817 (get_regcache): Rename to ...
6818 (get_thread_regcache): ... this. Adjust. Switch inferior before
6819 fetching registers.
6820 (regcache_invalidate_one): Adjust.
6821 (regcache_invalidate): Fix prototype.
6822 (new_register_cache): Return the new register cache.
6823 (free_register_cache): Change prototype.
6824 (realloc_register_cache): Adjust.
6825 (registers_to_string): Change prototype to take a regcache. Adjust.
6826 (registers_from_string): Ditto.
6827 (register_data): Ditto.
6828 (supply_register): Ditto.
6829 (supply_register_by_name): Ditto.
6830 (collect_register): Ditto.
6831 (collect_register_as_string): Ditto.
6832 (collect_register_by_name): Ditto.
6833 * server.c (process_serial_event): Adjust.
6834 * linux-low.h (regset_fill_func, regset_store_func): Change
6835 prototype.
6836 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
6837 Change prototype.
6838 * linux-low.c (get_stop_pc): Adjust.
6839 (check_removed_breakpoint): Adjust.
6840 (linux_wait_for_event): Adjust.
6841 (linux_resume_one_lwp): Adjust.
6842 (fetch_register): Add regcache parameter. Adjust.
6843 (usr_store_inferior_registers): Ditto.
6844 (regsets_fetch_inferior_registers): Ditto.
6845 (regsets_store_inferior_registers): Ditto.
6846 (linux_fetch_registers, linux_store_registers): Ditto.
6847 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
6848 regcache. Adjust.
43aaf8b6
PA
6849 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
6850 Ditto.
442ea881
PA
6851 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
6852 prototype to take a regcache.
6853 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
6854 * remote-utils.c (convert_ascii_to_int, outreg)
6855 (prepare_resume_reply): Change prototype to take a regcache.
6856 Adjust.
6857 * target.h (struct target_ops) <fetch_registers, store_registers>:
6858 Change prototype to take a regcache.
6859 (fetch_inferior_registers, store_inferior_registers): Change
6860 prototype to take a regcache. Adjust.
6861 * proc-service.c (ps_lgetregs): Adjust.
6862 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
6863 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
6864 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
6865 take a regcache. Adjust.
6866 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
6867 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
6868 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
6869 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
6870 * linux-cris-low.c (cris_get_pc, cris_set_pc)
6871 (cris_cannot_fetch_register):
6872 (cris_breakpoint_at): Change prototype to take a regcache.
6873 Adjust.
6874 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
6875 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
6876 to take a regcache. Adjust.
6877 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
6878 Adjust.
6879 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
6880 take a regcache. Adjust.
6881 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
6882 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
6883 (m68k_set_pc): Change prototype to take a regcache. Adjust.
6884 * linux-mips-low.c (mips_get_pc):
6885 (mips_set_pc): Change prototype to take a regcache. Adjust.
6886 (mips_reinsert_addr): Adjust.
6887 (mips_collect_register): Change prototype to take a regcache.
6888 Adjust.
6889 (mips_supply_register):
6890 (mips_collect_register_32bit, mips_supply_register_32bit)
6891 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
6892 (mips_store_fpregset): Ditto.
43aaf8b6
PA
6893 * linux-ppc-low.c (ppc_supply_ptrace_register)
6894 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
6895 (parse_spufs_run): Adjust.
6896 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
6897 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
6898 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
6899 take a regcache. Adjust.
6900 * linux-s390-low.c (s390_collect_ptrace_register)
6901 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
6902 (s390_set_pc): Change prototype to take a regcache. Adjust.
6903 (s390_arch_setup): Adjust.
6904 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
6905 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
6906 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
6907 (sparc_fill_gregset, sparc_store_gregset_from_stack)
6908 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
6909 regcache. Adjust.
6910 (sparc_breakpoint_at): Adjust.
6911 * linux-xtensa-low.c (xtensa_fill_gregset):
6912 (xtensa_store_gregset):
6913 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
6914 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
6915 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
6916 prototype to take a regcache. Adjust.
6917 * win32-arm-low.c (arm_fetch_inferior_register)
6918 (arm_store_inferior_register): Change prototype to take a
6919 regcache. Adjust.
6920 * win32-i386-low.c (i386_fetch_inferior_register)
6921 (i386_store_inferior_register): Change prototype to take a
6922 regcache. Adjust.
6923 * win32-low.c (child_fetch_inferior_registers)
6924 (child_store_inferior_registers): Change prototype to take a
6925 regcache. Adjust.
6926 (win32_wait): Adjust.
6927 (win32_fetch_inferior_registers): Change prototype to take a
6928 regcache. Adjust.
6929 (win32_store_inferior_registers): Adjust.
6930 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
6931 store_inferior_register>: Change prototype to take a regcache.
6932
60c3d7b0
DE
69332010-01-20 Doug Evans <dje@google.com>
6934
6935 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
6936 #ifdef.
6937 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 6938 (W_STOPCODE): Provide definition if missing.
60c3d7b0 6939
dc146f7c
VP
69402010-01-13 Vladimir Prus <vladimir@codesourcery.com>
6941
6942 * linux-low.c (linux_core_of_thread): New.
6943 (compare_ints, show_process, list_threads): New.
6944 (linux_qxfer_osdata): Report threads and cores.
6945 (linux_target_op): Register linux_core_of_thread.
6946 * remote-utils.c (prepare_resume_reply): Report the core.
6947 (buffer_xml_printf): Support %d specifier.
6948 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
6949 New.
6950 (handle_query): Handle qXfer:threads. Announce availability
6951 thereof.
6952 * target.h (struct target_ops): New field core_of_thread.
6953
7803799a
UW
69542010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
6955
6956 * Makefile.in (clean): Remove new generated files.
6957 (reg-s390.o, reg-s390.c): Remove rules.
6958 (reg-s390x.o, reg-s390x.c): Likewise.
6959 (s390-linux32.o, s390-linux32.c): Add rules.
6960 (s390-linux64.o, s390-linux64.c): Likewise.
6961 (s390x-linux64.o, s390x-linux64.c): Likewise.
6962 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
6963 * linux-s390-low.c: Include <elf.h>.
6964 (HWCAP_S390_HIGH_GPRS): Define if undefined.
6965 (init_registers_s390): Remove prototype.
6966 (init_registers_s390x): Likewise.
6967 (init_registers_s390_linux32): Add prototype.
6968 (init_registers_s390_linux64): Likewise.
6969 (init_registers_s390x_linux64): Likewise.
6970 (s390_num_regs_3264): New define.
6971 (s390_regmap_3264): New global variable.
6972 (s390_cannot_fetch_register): Remove obsolete check.
6973 (s390_cannot_store_register): Likewise.
6974 (s390_collect_ptrace_register): Handle upper/lower register halves.
6975 (s390_supply_ptrace_register): Likewise.
6976 (s390_fill_gregset): Update to register number changes.
6977 (s390_get_hwcap): New routine.
6978 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
6979 Install appropriate regmap and register set.
6980
6e7ffa39
JB
69812010-01-01 Joel Brobecker <brobecker@adacore.com>
6982
6983 * server.c (gdbserver_version): Update copyright year to 2010.
6984 * gdbreplay.c (gdbreplay_version): Likewise.
6985
957f3f49
DE
69862009-12-28 Doug Evans <dje@google.com>
6987
6988 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
6989 elf/external.h. Include <elf.h> instead but only if necessary.
6990
ca5c370d
PA
69912009-12-28 Pedro Alves <pedro@codesourcery.com>
6992
6993 * linux-low.c (linux_remove_process): Remove `detaching'
6994 parameter. Don't release/detach from thread_db here.
6995 (linux_kill): Release/detach from thread_db here, ...
6996 (linux_detach): ... and here, before actually detaching.
6997 (linux_wait_1): ... and here, when a process exits.
6998 * thread-db.c (any_thread_of): New.
6999 (thread_db_free): Switch the current inferior to a thread of the
7000 passed in process.
7001
4ee62156
DE
70022009-12-21 Doug Evans <dje@google.com>
7003
d90e6a88
DE
7004 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
7005
c5f62d5f
DE
7006 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
7007 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
7008 warning ifndef __NR_tkill. Move setting of errno there too.
7009 Delete unnecessary resetting of errno after syscall.
7010 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
7011
10e86dd7
DE
7012 * configure.ac: Check for dladdr.
7013 * config.in: Regenerate.
7014 * configure: Regenerate.
7015 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
7016 (try_thread_db_load): Update.
7017
4ee62156
DE
7018 * linux-low.c (my_waitpid): Delete unnecessary prototype.
7019
00f515da
DE
70202009-12-18 Doug Evans <dje@google.com>
7021
e9464885
DE
7022 * event-loop.c: Include unistd.h if it exists.
7023
07d4f67e
DE
7024 * linux-low.c (my_waitpid): Move definition away from being in
7025 between linux_tracefork_child/linux_test_for_tracefork.
7026
00f515da
DE
7027 * gdb_proc_service.h (psaddr_t): Fix type.
7028 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
7029 signature to match glibc.
7030
1de1badb
DE
70312009-12-16 Doug Evans <dje@google.com>
7032
7033 * linux-low.c (linux_read_memory): Fix argument to read.
7034
aeeb81d1
PA
70352009-11-26 Pedro Alves <pedro@codesourcery.com>
7036
7037 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
7038 events, don't leave current_inferior pointing at null.
7039
10357975
PA
70402009-11-26 Pedro Alves <pedro@codesourcery.com>
7041
7042 * win32-low.c (LOG): Delete.
7043 (OUTMSG): Output to stderr.
7044 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
7045 on compile time LOG macro.
7046 (win32_wait): Fix debug output.
7047
cf6e3471
PA
70482009-11-26 Pedro Alves <pedro@codesourcery.com>
7049
7050 * win32-low.c (win32_add_one_solib): If the dll name is
7051 "ntdll.dll", prepend the system directory to the dll path.
7052
0c85e18e
MK
70532009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
7054
7055 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
7056
9ac544ce 70572009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 7058 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
7059
7060 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
7061 * configure.ac: Check for __mcoldfire__ and set
7062 gdb_cv_m68k_is_coldfire.
7063 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
7064 reg-cf.o and reg-m68k.o.
7065 * configure: Regenerated.
7066
fd7dd3e6
PA
70672009-11-16 Pedro Alves <pedro@codesourcery.com>
7068
7069 * linux-low.c (linux_remove_process): Add `detaching' parameter.
7070 Pass it to thread_db_free.
7071 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
7072 proper `detaching' argument to linux_remove_process.
7073 * linux-low.h (thread_db_free): Add `detaching' parameter.
7074 * thread-db.c (thread_db_init): Pass false as `detaching' argument
7075 to thread_db_free.
7076 (thread_db_free): Add `detaching' parameter. Only
7077 call td_ta_clear_event if detaching from process.
7078
75aa492e
MK
70792009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
7080
7081 * thread-db.c (thread_db_free): Fix typo.
7082
21e1bee4
PP
70832009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
7084
7085 PR gdb/10838
7086 * thread-db.c (thread_db_free): Call td_ta_clear_event.
7087
8838b45e
NS
70882009-11-03 Nathan Sidwell <nathan@codesourcery.com>
7089
7090 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
7091 with an i686 compiler.
7092 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
7093 needed.
7094 * configure: Rebuilt.
7095
8a35fb51
SL
70962009-10-29 Sandra Loosemore <sandra@codesourcery.com>
7097
7098 PR gdb/10783
7099
7100 * server.c (handle_search_memory_1): Correct read_addr initialization
7101 in loop for searching subsequent chunks.
7102
96f15937
PP
71032009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
7104
7105 * configure.ac: New --with-libthread-db option.
7106 * thread-db.c: Allow direct dependence on libthread_db.
7107 (thread_db_free): Adjust.
7108 * config.in: Regenerate.
7109 * configure: Likewise.
889bf7c5 7110
5f7d1694
PP
71112009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
7112
7113 PR gdb/10757
7114 * thread-db.c (attach_thread): New function.
7115 (maybe_attach_thread): Return success/failure.
7116 (find_new_threads_callback): Adjust.
889bf7c5
PA
7117 (thread_db_find_new_threads): Loop until no new threads.
7118
88e3b899
PA
71192009-10-13 Pedro Alves <pedro@codesourcery.com>
7120
7121 * proc-service.c (ps_lgetregs): Formatting.
7122
cdbfd419
PP
71232009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
7124
7125 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
7126 * configure.ac: Adjust.
7127 * linux-low.h (struct process_info_private): Move members to struct
7128 thread_db.
7129 (thread_db_free, thread_db_handle_monitor_command): New prototype.
7130 * linux-low.c (linux_remove_process): Adjust.
7131 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
7132 * server.c (handle_query): Move code ...
7133 (handle_monitor_command): ... here. New function.
7134 * target.h (struct target_ops): New member.
7135 * thread-db.c (struct thread_db): New.
7136 (libthread_db_search_path): New variable.
7137 (thread_db_create_event, thread_db_enable_reporting)
7138 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
7139 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
7140 (try_thread_db_load_1, dladdr_to_soname): New functions.
7141 (try_thread_db_load, thread_db_load_search): New functions.
7142 (thread_db_init): Search for libthread_db.
7143 (thread_db_free): New function.
7144 (thread_db_handle_monitor_command): Likewise.
7145 * config.in: Regenerate.
7146 * configure: Regenerate.
889bf7c5 7147
4168d2d6
UW
71482009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
7149
7150 * spu-low.c (spu_kill): Wait for inferior to terminate.
7151 Call clear_inferiors.
7152 (spu_detach): Call clear_inferiors.
7153
81ecdfbb
RW
71542009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7155
7156 * aclocal.m4: Regenerate.
7157 * config.in: Likewise.
7158 * configure: Likewise.
7159
0b9ff2c0
UW
71602009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7161
7162 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
7163 (parse_spufs_run): New function.
7164 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
7165 (ppc_breakpoint_at): Handle SPU breakpoints.
7166
efcbbd14
UW
71672009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7168
7169 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
7170 (SPUFS_MAGIC): Define.
7171 (spu_enumerate_spu_ids): New function.
7172 (linux_qxfer_spu): New function.
7173 (linux_target_ops): Install linux_qxfer_spu.
7174
f4d9bade
UW
71752009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7176
7177 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
7178 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
7179 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
7180 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
7181 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
7182 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
7183 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
7184 (init_registers_powerpc_cell32l): Add prototype.
7185 (init_registers_powerpc_cell64l): Likewise.
7186 (ppc_arch_setup): Detect Cell/B.E. architecture.
7187
96e946ca
RW
71882009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7189
7190 * Makefile.in (datarootdir): New variable.
7191
58d6951d
DJ
71922009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
7193
7194 * linux-low.c (linux_write_memory): Update debugging output.
7195 * Makefile.in (clean): Add new descriptions.
7196 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
7197 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
7198 * configure.srv: Add new files for arm*-*-linux*.
7199 * linux-arm-low.c: Add new declarations.
7200 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
7201 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
7202 (HWCAP_VFPv3D16): New.
7203 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
7204 instead of __IWMMXT__.
7205 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
7206 (arm_arch_setup): New.
7207 (target_regsets): Remove #ifdef. Add VFP regset.
7208 (the_low_target): Use arm_arch_setup.
7209
12b42a12
DJ
72102009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
7211
7212 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
7213 the main thread again.
7214
ac8c974e
AR
72152009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
7216
7217 Adding Neutrino gdbserver.
7218 * configure: Regenerated.
7219 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
7220 * configure.srv (i[34567]86-*-nto*): New target.
7221 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
7222 * remote-utils.c [__QNX__]: Include sys/iomgr.h
7223 (nto_comctrl) [__QNX__]: New function.
7224 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
7225
4424e0c3 72262009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
7227
7228 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
7229 srv_tgtobj.
7230
912cf4ba
PA
72312009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
7232 Pedro Alves <pedro@codesourcery.com>
7233
7234 * win32-i386-low.c (i386_get_thread_context): Handle systems that
7235 don't support CONTEXT_EXTENDED_REGISTERS.
7236 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
7237 (the_low_target): Install them.
7238 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
7239 failing with ERROR_PIPE_NOT_CONNECTED.
7240
aa5ca48f
DE
72412009-06-30 Doug Evans <dje@google.com>
7242 Pierre Muller <muller@ics.u-strasbg.fr>
7243
7244 Add h/w watchpoint support to x86-linux, win32-i386.
7245 * Makefile.in (SFILES): Add i386-low.c
7246 (i386_low_h): Define.
7247 (i386-low.o): Add dependencies.
7248 (linux-x86-low.o): Add i386-low.h dependency.
7249 (win32-i386-low.o): Ditto.
7250 * i386-low.c: New file.
7251 * i386-low.h: New file.
7252 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
7253 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
7254 * linux-low.c (linux_add_process): Initialize arch_private.
7255 (linux_remove_process): Free arch_private.
7256 (add_lwp): Initialize arch_private.
7257 (delete_lwp): Free arch_private.
7258 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
7259 provided.
7260 * linux-low.h (process_info_private): New member arch_private.
7261 (lwp_info): New member arch_private.
7262 (linux_target_ops): New members new_process, new_thread,
7263 prepare_to_resume.
7264 (ptid_of): New macro.
7265 * linux-x86-low.c: Include stddef.h, i386-low.h.
7266 (arch_process_info): New struct.
7267 (arch_lwp_info): New struct.
7268 (x86_linux_dr_get, x86_linux_dr_set): New functions.
7269 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
7270 (i386_dr_low_get_status): New function.
7271 (x86_insert_point, x86_remove_point): New functions.
7272 (x86_stopped_by_watchpoint): New function.
7273 (x86_stopped_data_address): New function.
7274 (x86_linux_new_process, x86_linux_new_thread): New functions.
7275 (x86_linux_prepare_to_resume): New function.
7276 (the_low_target): Add entries for insert_point, remove_point,
7277 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
7278 prepare_to_resume.
7279 * server.c (debug_hw_points): New global.
7280 (monitor_show_help): Document set debug-hw-points.
7281 (handle_query): Process "set debug-hw-points".
7282 * server.h (debug_hw_points): Declare.
7283 (paddress): Declare.
7284 * utils.c (NUMCELLS, CELLSIZE): New macros.
7285 (get_sell, xsnprintf, paddress): New functions.
7286 * win32-arm-low.c (the_low_target): Add entries for insert_point,
7287 remove_point, stopped_by_watchpoint, stopped_data_address.
7288 * win32-i386-low.c: Include i386-low.h.
7289 (debug_reg_state): Replaces dr.
7290 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
7291 (i386_dr_low_get_status): New function.
7292 (i386_insert_point, i386_remove_point): New functions.
7293 (i386_stopped_by_watchpoint): New function.
7294 (i386_stopped_data_address): New function.
7295 (i386_initial_stuff): Update.
7296 (get_thread_context,set_thread_context,i386_thread_added): Update.
7297 (the_low_target): Add entries for insert_point,
7298 remove_point, stopped_by_watchpoint, stopped_data_address.
7299 * win32-low.c (win32_insert_watchpoint): New function.
7300 (win32_remove_watchpoint): New function.
7301 (win32_stopped_by_watchpoint): New function.
7302 (win32_stopped_data_address): New function.
7303 (win32_target_ops): Add entries for insert_watchpoint,
7304 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
7305 * win32-low.h (win32_target_ops): New members insert_point,
7306 remove_point, stopped_by_watchpoint, stopped_data_address.
7307
d993e290
PA
73082009-06-25 Pedro Alves <pedro@codesourcery.com>
7309
7310 * server.c (process_serial_event): Re-return unsupported, not
7311 error, if the type isn't recognized. Re-allow supporting only
7312 insert or remove packets. Also call require_running for
7313 breakpoints. Add missing break statement to default case. Tidy.
7314 * target.h (struct target_ops): Rename insert_watchpoint to
7315 insert_point, and remove_watchpoint to remove_point.
7316
7317 * linux-low.h (struct linux_target_ops): Likewise.
7318 * linux-low.c (linux_insert_watchpoint): Rename to ...
7319 (linux_insert_point): ... this. Adjust.
7320 (linux_remove_watchpoint): Rename to ...
7321 (linux_remove_point): ... this. Adjust.
7322 (linux_target_ops): Adjust.
7323 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
7324 (cris_insert_point): ... this.
7325 (cris_remove_watchpoint): Rename to ...
7326 (cris_remove_point): ... this.
7327 (the_low_target): Adjust.
7328
0f54c268
PM
73292009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
7330
7331 * server.c (handle_v_kill): Pass signal_pid to
7332 kill_inferior if multi_process is zero.
7333
c6314022
AR
73342009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
7335
7336 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
7337 * target.h (target_ops): Comment for *_watchpoint to make it clear
7338 the functions can get types '0' and '1'.
7339
4463ce24
AR
73402009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
7341
7342 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
7343 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
7344 * regcache.c (get_regcache): Likewise.
7345 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
7346 * win32-low.c (child_fetch_inferior_registers): Remove check for
7347 regno 0.
7348
cf8fd78b
PA
73492009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
7350 Pedro Alves <pedro@codesourcery.com>
7351
7352 * target.h (struct target_ops) <supports_multi_process>: New
7353 callback.
7354 (target_supports_multi_process): New.
7355 * server.c (handle_query): Even if GDB reports support, only
7356 enable multi-process if the target also supports it. Report
7357 multi-process support only if the target backend supports it.
7358 * linux-low.c (linux_supports_multi_process): New function.
7359 (linux_target_ops): Install it as target_supports_multi_process
7360 callback.
7361
47c0c975
DE
73622009-05-24 Doug Evans <dje@google.com>
7363
e09875d4
DE
7364 Global renaming of find_thread_pid to find_thread_ptid.
7365 * server.h (find_thread_ptid): Renamed from find_thread_pid.
7366 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
7367 All callers updated.
7368
e27d73f6
DE
7369 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
7370 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
7371 directly.
7372
47c0c975
DE
7373 * linux-low.c (get_stop_pc): Print pc if debug_threads.
7374 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
7375 (linux_resume_one_lwp): Ditto.
7376
2acc282a
DE
73772009-05-23 Doug Evans <dje@google.com>
7378
7379 * linux-low.c (linux_resume_one_lwp): Change type of first arg
7380 from struct inferior_list_entry * to struct lwp_info *.
7381 All callers updated.
7382
9f1036c1
DE
73832009-05-13 Doug Evans <dje@google.com>
7384
7385 * linux-x86-low.c: Don't include assert.h.
7386 (x86_siginfo_fixup): Use fatal, not assert.
7387 (x86_arch_setup): Fix comment.
7388
d0722149
DE
73892009-05-12 Doug Evans <dje@google.com>
7390
7391 Biarch support for i386/amd64 gdbserver.
7392 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
7393 Add linux-x86-low.c.
7394 (linux-i386-low.o, linux-x86-64-low.o): Delete.
7395 (linux-x86-low.o): Add.
7396 * linux-x86-64-low.c: Delete.
7397 * linux-i386-low.c: Delete.
7398 * linux-x86-low.c: New file.
7399 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
7400 linux-x86-low.o.
7401 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
7402 linux-x86-low.o.
7403 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
7404 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
7405 (linux_child_pid_to_exec_file): New function.
7406 (elf_64_header_p, elf_64_file_p): New functions.
7407 (siginfo_fixup): New function.
7408 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
7409 give target a chance to convert layout.
7410 * linux-low.h (linux_target_ops): New member siginfo_fixup.
7411 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
7412
fdeb2a12
DE
74132009-05-07 Doug Evans <dje@google.com>
7414
7415 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
7416 (regsets_store_inferior_registers): Ditto.
7417
a6dbe5df
PA
74182009-05-06 Pedro Alves <pedro@codesourcery.com>
7419
7420 PR server/10048
7421
7422 * linux-low.c (must_set_ptrace_flags): Delete.
7423 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
7424 of the global.
7425 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
7426 `lwp->must_set_ptrace_flags' instead.
ba42693b 7427 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
7428 (linux_wait_1): ... not here.
7429
5091eb23
DE
74302009-04-30 Doug Evans <dje@google.com>
7431
9f767825
DE
7432 * inferiors.c (started_inferior_callback): New function.
7433 (attached_inferior_callback): New function.
7434 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
7435 * server.c (print_started_pid, print_attached_pid): New functions.
7436 (detach_or_kill_for_exit): New function.
7437 (main): Call it instead of for_each_inferior (kill_inferior_callback).
7438 * server.h (have_started_inferiors_p): Declare.
7439 (have_attached_inferiors_p): Declare.
7440
5091eb23
DE
7441 * inferiors.c (remove_process): Fix memory leak, free process.
7442 * linux-low.c (linux_remove_process): New function.
7443 (linux_kill): Call it instead of remove_process.
7444 (linux_detach, linux_wait_1): Ditto.
7445
155c8968
PA
74462009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
7447
7448 * configure.srv: Add x86 Windows CE target.
7449
7fe519cb
UW
74502009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
7451
7452 * inferiors.c (get_thread_process): Make global.
7453 * server.h (get_thread_process): Add prototype.
7454 * thread-db.c (find_one_thread): Use get_thread_process
7455 instead of current_process.
7456 (thread_db_get_tls_address): Do not crash if called when
7457 thread layer is not yet initialized.
7458
5472f405
UW
74592009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
7460
7461 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
7462 * spu-low.c (current_tid): Rename to ...
7463 (current_ptid): ... this.
7464 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
7465 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
7466 ptid_get_lwp (current_ptid) instead of current_tid.
7467 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
7468 instead of current_tid. Use find_process_pid to verify pid
7469 argument is valid. Pass proper argument to remove_process.
7470 (spu_thread_alive): Compare current_ptid instead of current_tid.
7471 (spu_resume): Likewise.
7472
55ac2b99
PA
74732009-04-02 Pedro Alves <pedro@codesourcery.com>
7474
7475 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
7476 variable.
7477
95954743
PA
74782009-04-01 Pedro Alves <pedro@codesourcery.com>
7479
7480 Implement the multiprocess extensions, and add linux multiprocess
7481 support.
7482
7483 * server.h (ULONGEST): Declare.
7484 (struct ptid, ptid_t): New.
7485 (minus_one_ptid, null_ptid): Declare.
7486 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
7487 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
7488 (struct inferior_list_entry): Change `id' type from unsigned from
7489 to ptid_t.
7490 (struct sym_cache, struct breakpoint, struct
7491 process_info_private): Forward declare.
7492 (struct process_info): Declare.
7493 (current_process): Declare.
7494 (all_processes): Declare.
7495 (initialize_inferiors): Declare.
7496 (add_thread): Adjust to use ptid_t.
7497 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
7498 (add_process, remove_process, find_thread_pid): Declare.
7499 (find_inferior_id): Adjust to use ptid_t.
7500 (cont_thread, general_thread, step_thread): Change type to ptid_t.
7501 (multi_process): Declare.
7502 (push_event): Adjust to use ptid_t.
7503 (read_ptid, write_ptid): Declare.
7504 (prepare_resume_reply): Adjust to use ptid_t.
7505 (clear_symbol_cache): Declare.
7506 * inferiors.c (all_processes): New.
7507 (null_ptid, minus_one_ptid): New.
7508 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
7509 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
7510 (add_thread): Change unsigned long to ptid. Remove gdb_id
7511 parameter. Adjust.
7512 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
7513 (gdb_id_to_thread): Rename to ...
7514 (find_thread_pid): ... this. Change unsigned long to ptid.
7515 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
7516 (loaded_dll, pull_pid_from_list): Adjust.
7517 (add_process, remove_process, find_process_pid)
7518 (get_thread_process, current_process, initialize_inferiors): New.
7519 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
7520 (struct target_waitstatus) <related_pid>: Ditto.
7521 (struct target_ops) <kill, detach>: Add `pid' argument. Change
7522 return type to int.
7523 (struct target_ops) <join>: Add `pid' argument.
7524 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
7525 (struct target_ops) <wait>: Add `ptid' field. Change return type
7526 to ptid.
7527 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
7528 (mywait): Add `ptid' argument. Change return type to ptid_t.
7529 (target_pid_to_str): Declare.
7530 * target.c (set_desired_inferior): Adjust to use ptids.
7531 (mywait): Add new `ptid' argument. Adjust.
7532 (target_pid_to_str): New.
7533 * mem-break.h (free_all_breakpoints): Declare.
7534 * mem-break.c (breakpoints): Delelete.
7535 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
7536 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
7537 to use per-process breakpoint list.
7538 (free_all_breakpoints): New.
7539 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
7540 (symbol_cache, all_symbols_looked_up): Delete.
7541 (hexchars): New.
7542 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
7543 read_ptid): New.
7544 (prepare_resume_reply): Change ptid argument's type from unsigned
7545 long to ptid_t. Adjust. Implement W;process and X;process.
7546 (free_sym_cache, clear_symbol_cache): New.
7547 (look_up_one_symbol): Adjust to per-process symbol cache. *
7548 * server.c (cont_thread, general_thread, step_thread): Change type
7549 to ptid_t.
7550 (attached): Delete.
7551 (multi_process): New.
7552 (last_ptid): Change type to ptid_t.
7553 (struct vstop_notif) <ptid>: Change type to ptid_t.
7554 (queue_stop_reply, push_event): Change `ptid' argument's type to
7555 ptid_t.
7556 (discard_queued_stop_replies): Add `pid' argument.
7557 (start_inferior): Adjust to use ptids. Adjust to mywait interface
7558 changes. Don't reference the `attached' global.
7559 (attach_inferior): Adjust to mywait interface changes.
7560 (handle_query): Adjust to use ptids. Parse GDB's qSupported
7561 features. Handle and report "multiprocess+". Handle
7562 "qAttached:PID".
7563 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
7564 changes.
7565 (handle_v_kill): New.
7566 (handle_v_stopped): Adjust to use target_pid_to_str.
7567 (handle_v_requests): Allow multiple attaches and runs when
7568 multiprocess extensions are in effect. Handle "vKill".
7569 (myresume): Adjust to use ptids.
7570 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
7571 (handle_status): Adjust to discard_queued_stop_replies interface
7572 change.
7573 (first_thread_of, kill_inferior_callback)
7574 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
7575 (main): Call initialize_inferiors. Adjust to use ptids, killing
7576 and detaching from all inferiors. Handle multiprocess packet
7577 variants.
7578 * linux-low.h: Include gdb_proc_service.h.
7579 (struct process_info_private): New.
7580 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
7581 <lwpid_of>: Use ptid_get_lwp.
7582 (get_lwp_thread): Adjust.
7583 (struct lwp_info): Add `dead' member.
7584 (find_lwp_pid): Declare.
7585 * linux-low.c (thread_db_active): Delete.
7586 (new_inferior): Adjust comment.
7587 (inferior_pid): Delete.
7588 (linux_add_process): New.
7589 (handle_extended_wait): Adjust.
7590 (add_lwp): Change unsigned long to ptid.
7591 (linux_create_inferior): Add process to processes table. Adjust
7592 to use ptids. Don't set new_inferior here.
7593 (linux_attach_lwp): Rename to ...
7594 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
7595 it. Adjust to use ptids.
7596 (linux_attach_lwp): New.
7597 (linux_attach): Add process to processes table. Don't set
7598 new_inferior here.
7599 (struct counter): New.
7600 (second_thread_of_pid_p, last_thread_of_process_p): New.
7601 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
7602 multiple processes.
7603 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
7604 processes. Remove process from process table.
7605 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
7606 to multiple processes.
7607 (any_thread_of): New.
7608 (linux_detach): Add `pid' argument, and handle it. Remove process
7609 from processes table.
7610 (linux_join): Add `pid' argument. Handle it.
7611 (linux_thread_alive): Change unsighed long argument to ptid_t.
7612 Consider dead lwps as not being alive.
7613 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
7614 threads we're not interested in.
7615 (same_lwp, find_lwp_pid): New.
7616 (linux_wait_for_lwp): Change `pid' argument's type from int to
7617 ptid_t. Adjust.
7618 (linux_wait_for_event): Rename to ...
7619 (linux_wait_for_event_1): ... this. Change `pid' argument's type
7620 from int to ptid_t. Adjust.
7621 (linux_wait_for_event): New.
7622 (linux_wait_1): Add `ptid' argument. Change return type to
7623 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
7624 that exit from the process table.
7625 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
7626 Adjust.
7627 (mark_lwp_dead): New.
7628 (wait_for_sigstop): Adjust to use ptids. If a process exits while
7629 stopping all threads, mark its main lwp as dead.
7630 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
7631 ptids.
7632 (fetch_register, usr_store_inferior_registers)
7633 (regsets_fetch_inferior_registers)
7634 (regsets_store_inferior_registers, linux_read_memory)
7635 (linux_write_memory): Inline `inferior_pid'.
7636 (linux_look_up_symbols): Adjust to use per-process
7637 `thread_db_active'.
7638 (linux_request_interrupt): Adjust to use ptids.
7639 (linux_read_auxv): Inline `inferior_pid'.
7640 (initialize_low): Don't reference thread_db_active.
7641 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
7642 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
7643 (ps_getpid): Return the pid of the current inferior.
7644 * thread-db.c (proc_handle, thread_agent): Delete.
7645 (thread_db_create_event, thread_db_enable_reporting): Adjust to
7646 per-process data.
7647 (find_one_thread): Change argument type to ptid_t. Adjust to
7648 per-process data.
7649 (maybe_attach_thread): Adjust to per-process data and ptids.
7650 (thread_db_find_new_threads): Ditto.
7651 (thread_db_init): Ditto.
7652 * spu-low.c (spu_create_inferior, spu_attach): Add process to
7653 processes table. Adjust to use ptids.
7654 (spu_kill, spu_detach): Adjust interface. Remove process from
7655 processes table.
7656 (spu_join, spu_thread_alive): Adjust interface.
7657 (spu_wait): Adjust interface. Remove process from processes
7658 table. Adjust to use ptids.
7659 * win32-low.c (current_inferior_tid): Delete.
7660 (current_inferior_ptid): New.
7661 (debug_event_ptid): New.
7662 (thread_rec): Take a ptid. Adjust.
7663 (child_add_thread): Add `pid' argument. Adjust to use ptids.
7664 (child_delete_thread): Ditto.
7665 (do_initial_child_stuff): Add `attached' argument. Add process to
7666 processes table.
7667 (child_fetch_inferior_registers, child_store_inferior_registers):
7668 Adjust.
7669 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
7670 (win32_attach): Pass 1 to do_initial_child_stuff.
7671 (win32_kill): Adjust interface. Remove process from processes
7672 table.
7673 (win32_detach): Ditto.
7674 (win32_join): Adjust interface.
7675 (win32_thread_alive): Take a ptid.
7676 (win32_resume): Adjust to use ptids.
7677 (get_child_debug_event): Ditto.
7678 (win32_wait): Adjust interface. Remove exiting process from
7679 processes table.
7680
bd99dc85
PA
76812009-04-01 Pedro Alves <pedro@codesourcery.com>
7682
7683 Non-stop mode support.
7684
7685 * server.h (non_stop): Declare.
7686 (gdb_client_data, handler_func): Declare.
7687 (delete_file_handler, add_file_handler, start_event_loop):
7688 Declare.
7689 (handle_serial_event, handle_target_event, push_event)
7690 (putpkt_notif): Declare.
7691 * target.h (enum resume_kind): New.
7692 (struct thread_resume): Replace `step' field by `kind' field.
7693 (TARGET_WNOHANG): Define.
7694 (struct target_ops) <wait>: Add `options' argument.
7695 <supports_non_stop, async, start_non_stop>: New fields.
7696 (target_supports_non_stop, target_async): New.
7697 (start_non_stop): Declare.
7698 (mywait): Add `options' argument.
7699 * target.c (mywait): Add `options' argument. Print child exit
7700 notifications here.
7701 (start_non_stop): New.
7702 * server.c (non_stop, own_buf, mem_buf): New globals.
7703 (struct vstop_notif): New.
7704 (notif_queue): New global.
7705 (queue_stop_reply, push_event, discard_queued_stop_replies)
7706 (send_next_stop_reply): New.
7707 (start_inferior): Adjust to use resume_kind. Adjust to mywait
7708 interface changes.
7709 (attach_inferior): In non-stop mode, don't wait for the target
7710 here.
7711 (handle_general_set): Handle QNonStop.
7712 (handle_query): When handling qC, return the current general
7713 thread, instead of the first thread of the list.
7714 (handle_query): If the backend supports non-stop mode, include
7715 QNonStop+ in the qSupported query response.
7716 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
7717 and non-stop mode.
7718 (handle_v_attach, handle_v_run): Handle non-stop mode.
7719 (handle_v_stopped): New.
7720 (handle_v_requests): Report support for vCont;t. Handle vStopped.
7721 (myresume): Adjust to use resume_kind. Handle non-stop.
7722 (queue_stop_reply_callback): New.
7723 (handle_status): Handle non-stop mode.
7724 (main): Clear non_stop flag on reconnection. Use the event-loop.
7725 Refactor serial protocol handling from here ...
7726 (process_serial_event): ... to this new function. When GDB
7727 selects any thread, select one here. In non-stop mode, wait until
7728 GDB acks all pending events before exiting.
7729 (handle_serial_event, handle_target_event): New.
7730 * remote-utils.c (remote_open): Install remote_desc in the event
7731 loop.
7732 (remote_close): Remove remote_desc from the event loop.
7733 (putpkt_binary): Rename to...
7734 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
7735 (putpkt_binary): New as wrapper around putpkt_binary_1.
7736 (putpkt_notif): New.
7737 (prepare_resume_reply): In non-stop mode, don't change the
7738 general_thread.
7739 * event-loop.c: New.
7740 * Makefile.in (OBJ): Add event-loop.o.
7741 (event-loop.o): New rule.
7742
7743 * linux-low.h (pid_of): Moved here.
7744 (lwpid_of): New.
7745 (get_lwp_thread): Use lwpid_of.
7746 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
7747 * linux-low.c (pid_of): Delete.
7748 (inferior_pid): Use lwpid_of.
7749 (linux_event_pipe): New.
7750 (target_is_async_p): New.
7751 (delete_lwp): New.
7752 (handle_extended_wait): Use lwpid_of.
7753 (add_lwp): Don't set lwpid field.
7754 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
7755 (linux_kill_one_lwp): If killing a running lwp, stop it first.
7756 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
7757 (linux_detach_one_lwp): If detaching from a running lwp, stop it
7758 first. Adjust to linux_wait_for_event interface changes. Use
7759 lwpid_of.
7760 (linux_detach): Don't delete the main lwp here.
7761 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
7762 (status_pending_p): Don't consider explicitly suspended lwps.
7763 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
7764 pointer. Add OPTIONS argument. Change return type to int. Use
7765 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
7766 (linux_wait_for_event): Take an integer pid instead of a lwp_info
7767 pointer. Add status pointer argument. Return a pid instead of a
7768 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
7769 changes. In non-stop mode, don't switch to a random thread.
7770 (linux_wait): Rename to...
7771 (linux_wait_1): ... this. Add target_options argument, and handle
7772 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
7773 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
7774 clean exit and signal exit code. Don't stop all threads in
7775 non-stop mode. In all-stop mode, only stop all threads when
7776 reporting a stop to GDB. Handle explicit thread stop requests.
7777 (async_file_flush, async_file_mark): New.
7778 (linux_wait): New.
7779 (send_sigstop): Use lwpid_of.
7780 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
7781 interface changes. In non-stop mode, don't switch to a random
7782 thread.
7783 (linux_resume_one_lwp): Use lwpid_of.
7784 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
7785 (linux_resume_one_thread): ... this. Handle resume_stop. In
7786 non-stop mode, don't look for pending flag in all threads.
7787 (resume_status_pending_p): Don't consider explicitly suspended
7788 threads.
7789 (my_waitpid): Reimplement. Emulate __WALL.
7790 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
7791 Use lwpid_of.
7792 (sigchld_handler, linux_supports_non_stop, linux_async)
7793 (linux_start_non_stop): New.
7794 (linux_target_ops): Register linux_supports_non_stop, linux_async
7795 and linux_start_non_stop.
7796 (initialize_low): Install SIGCHLD handler.
7797 * thread-db.c (thread_db_create_event, find_one_thread)
7798 (thread_db_get_tls_address): Use lwpid_of.
7799 * win32-low.c (win32_detach): Adjust to use resume_kind.
7800 (win32_wait): Add `options' argument.
7801 * spu-low.c (spu_resume): Adjust to use resume_kind.
7802 (spu_wait): Add `options' argument.
7803
5b1c542e
PA
78042009-04-01 Pedro Alves <pedro@codesourcery.com>
7805
7806 Decouple target code from remote protocol.
7807
7808 * target.h (enum target_waitkind): New.
7809 (struct target_waitstatus): New.
7810 (struct target_ops) <wait>: Return an unsigned long. Take a
7811 target_waitstatus pointer instead of a char pointer.
7812 (mywait): Likewise.
7813 * target.c (mywait): Change prototype to return an unsigned long.
7814 Take a target_waitstatus pointer instead of a char pointer. Adjust.
7815 * server.h (thread_from_wait, old_thread_from_wait): Delete
7816 declarations.
7817 (prepare_resume_reply): Change prototype to take a
7818 target_waitstatus.
7819 * server.c (thread_from_wait, old_thread_from_wait): Delete.
7820 (last_status, last_ptid): New.
7821 (start_inferior): Remove "statusptr" argument. Adjust. Return a
7822 pid instead of a signal.
7823 (attach_inferior): Remove "status" and "signal" parameters.
7824 Adjust.
7825 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
7826 not as an address.
7827 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
7828 (handle_v_requests, myresume): Remove "status" and "signal"
7829 parameters. Adjust.
7830 (handle_status): New.
7831 (main): Delete local `status'. Adjust.
7832 * remote-utils.c: Include target.h.
7833 (prepare_resume_reply): Change prototype to take a
7834 target_waitstatus. Adjust.
7835
7836 * linux-low.c (linux_wait): Adjust to new target_ops->wait
7837 interface.
7838 * spu-low.c (spu_wait): Adjust.
7839 * win32-low.c (enum target_waitkind, struct target_waitstatus):
7840 Delete.
7841 (win32_wait): Adjust.
7842
2bd7c093
PA
78432009-04-01 Pedro Alves <pedro@codesourcery.com>
7844
7845 * target.h (struct thread_resume): Delete leave_stopped member.
7846 (struct target_ops): Add a `n' argument to the `resume' callback.
7847 * server.c (start_inferior): Adjust.
7848 (handle_v_cont, myresume): Adjust.
7849 * linux-low.c (check_removed_breakpoint): Adjust to resume
7850 interface change, and to removed leave_stopped field.
7851 (resume_ptr): Delete.
7852 (struct thread_resume_array): New.
7853 (linux_set_resume_request): Add new `arg' parameter. Adjust to
7854 resume interface change.
7855 (linux_continue_one_thread, linux_queue_one_thread)
7856 (resume_status_pending_p): Check if the resume field is NULL
7857 instead of checking the leave_stopped member.
7858 (linux_resume): Adjust to the target resume interface change.
7859 * spu-low.c (spu_resume): Adjust to the target resume interface
7860 change.
7861 * win32-low.c (win32_detach, win32_resume): Ditto.
7862
c35fafde
PA
78632009-04-01 Pedro Alves <pedro@codesourcery.com>
7864
7865 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
7866 flag.
7867 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
7868 pending.
7869 (linux_continue_one_thread): Only preserve the stepping flag if
7870 there's a pending breakpoint.
7871
0a59d50b
PA
78722009-03-31 Pedro Alves <pedro@codesourcery.com>
7873
7874 * server.c (main): After the inferior having exited, call
7875 remote_close before exiting gdbserver.
7876
f04c6d38
TJB
78772009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
7878
7879 Fix size of FPSCR in Power 7 processors.
7880 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
7881 (PPC_FEATURE_HAS_DFP): New #define.
7882 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
7883 size of the FPSCR.
7884
78e5cee6
PA
78852009-03-23 Pedro Alves <pedro@codesourcery.com>
7886
7887 * server.c (handle_query) Whitespace and formatting.
7888
1b3f6016
PA
78892009-03-22 Pedro Alves <pedro@codesourcery.com>
7890
7891 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
7892 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
7893 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
7894 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
7895 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
7896 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
7897 Makefile.in, configure.ac: Fix whitespace throughout.
7898 * configure: Regenerate.
7899
a07b2135
PA
79002009-03-22 Pedro Alves <pedro@codesourcery.com>
7901
7902 * inferiors.c (find_inferior): Make it safe for the callback
7903 function to delete the currently iterated inferior.
7904
67cc2626
PA
79052009-03-22 Pedro Alves <pedro@codesourcery.com>
7906
7907 * Makefile.in (linuw_low_h): Move higher.
7908 (thread-db.o): Depend on $(linux_low_h).
7909
54a0b537
PA
79102009-03-17 Pedro Alves <pedro@codesourcery.com>
7911
7912 Rename "process" to "lwp" throughout.
7913
7914 * linux-low.c (all_processes): Rename to...
7915 (all_lwps): ... this.
7916 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
7917 (add_process): Rename to ...
7918 (add_lwp): ... this. Adjust.
7919 (linux_create_inferior): Adjust.
7920 (linux_attach_lwp): Adjust.
7921 (linux_attach): Adjust.
7922 (linux_kill_one_process): Rename to ...
7923 (linux_kill_one_lwp): ... this. Adjust.
7924 (linux_kill): Adjust.
7925 (linux_detach_one_process): Rename to ...
7926 (linux_detach_one_lwp): ... this. Adjust.
7927 (linux_detach): Adjust.
7928 (check_removed_breakpoint): Adjust.
7929 (status_pending_p): Adjust.
7930 (linux_wait_for_process): Rename to ...
7931 (linux_wait_for_lwp): ... this. Adjust.
7932 (linux_wait_for_event): Adjust.
7933 (send_sigstop): Adjust.
7934 (wait_for_sigstop): Adjust.
7935 (stop_all_processes): Rename to ...
7936 (stop_all_lwps): ... this.
7937 (linux_resume_one_process): Rename to ...
7938 (linux_resume_one_lwp): ... this. Adjust.
7939 (linux_set_resume_request, linux_continue_one_thread)
7940 (linux_queue_one_thread, resume_status_pending_p)
7941 (usr_store_inferior_registers, regsets_store_inferior_registers)
7942 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
7943 Adjust.
7944 * linux-low.h (get_process): Rename to ...
7945 (get_lwp): ... this. Adjust.
7946 (get_thread_process): Rename to ...
7947 (get_thread_lwp): ... this. Adjust.
7948 (get_process_thread): Rename to ...
7949 (get_lwp_thread): ... this. Adjust.
7950 (struct process_info): Rename to ...
7951 (struct lwp_info): ... this.
7952 (all_processes): Rename to ...
7953 (all_lwps): ... this.
7954 * proc-service.c (ps_lgetregs): Adjust.
7955 * thread-db.c (thread_db_create_event, find_one_thread)
7956 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
7957
0b16c5cf
PA
79582009-03-14 Pedro Alves <pedro@codesourcery.com>
7959
7960 * server.c (handle_query): Handle "qAttached".
7961
32de4b9d
NS
79622009-03-13 Nathan Sidwell <nathan@codesourcery.com>
7963
7964 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
7965 GPLv3, update license URL.
7966
2aecd87f
DE
79672009-03-01 Doug Evans <dje@google.com>
7968
93efd302 7969 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
7970 (server_h): Add gdb_signals.h.
7971 (signals.o): Update.
7972 * server.h (target_signal_from_host,target_signal_to_host_p)
7973 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
7974
86b1f9c5
PM
79752009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
7976
7977 * remote-utils.c (getpkt): Also generate remote-debug
7978 information if noack_mode is set.
7979
4aa995e1
PA
79802009-02-06 Pedro Alves <pedro@codesourcery.com>
7981
7982 * server.c (handle_query): Report qXfer:siginfo:read and
7983 qXfer:siginfo:write as supported and handle them.
7984 * target.h (struct target_ops) <qxfer_siginfo>: New field.
7985 * linux-low.c (linux_xfer_siginfo): New.
7986 (linux_target_ops): Set it.
7987
62709adf
PA
79882009-01-26 Pedro Alves <pedro@codesourcery.com>
7989
7990 * server.c (gdbserver_usage): Mention --remote-debug.
7991 (main): Accept '--remote-debug' switch.
7992
aef93bd7
DE
79932009-01-18 Doug Evans <dje@google.com>
7994
7995 * regcache.c (new_register_cache): No need to check result of xcalloc.
7996 * server.c (handle_search_memory): Back out calls to xmalloc,
7997 result is checked and error is returned to user upon failure.
7998 (handle_query): Ditto. Add more checks for result of malloc.
7999 (handle_v_cont): Check result of malloc, report error back to
8000 user upon failure.
8001 (handle_v_run): Ditto. Call freeargv.
8002 * server.h (freeargv): Declare.
8003 * utils.c (freeargv): New fn.
8004
54363045
DE
80052009-01-15 Doug Evans <dje@google.com>
8006
f626972c
DE
8007 * gdbreplay.c (perror_with_name): Make arg const char *.
8008 * server.h (target_signal_to_name): Make return type const char *.
0842e787 8009 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 8010 * utils.c (perror_with_name): Make arg const char *.
54363045 8011
18aae699
PA
80122009-01-14 Pedro Alves <pedro@codesourcery.com>
8013
8014 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
8015 when handling a EXIT_PROCESS_DEBUG_EVENT.
8016
ff703abe
JB
80172009-01-06 Joel Brobecker <brobecker@adacore.com>
8018
8019 * gdbreplay.c (gdbreplay_version): Update copyright year.
8020 * server.c (gdbserver_version): Likewise.
8021
f21cc1a2 80222009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
8023
8024 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 8025 (handle_extended_wait): Improve comment.
0e21c1ec 8026
bca929d3
DE
80272008-12-13 Doug Evans <dje@google.com>
8028
8029 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
8030 * server.h (ATTR_MALLOC): New macro.
8031 (xmalloc,xcalloc,xstrdup): Declare.
8032 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
8033 * inferiors.c: Ditto.
8034 * linux-low.c: Ditto.
8035 * mem-break.c: Ditto.
8036 * regcache.c: Ditto.
8037 * remote-utils.c: Ditto.
8038 * server.c: Ditto.
8039 * target.c: Ditto.
8040 * win32-low.c: Ditto.
8041
97438e3f
DE
80422008-12-12 Doug Evans <dje@google.com>
8043
896c7fbb
DE
8044 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
8045 in debugging printf.
8046
97438e3f
DE
8047 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
8048
e3b886f8
DE
80492008-12-09 Doug Evans <dje@google.com>
8050
8051 * linux-low.h (struct process_info): Delete member tid, unused.
8052 * thread-db.c (find_one_thread): Update.
8053 (maybe_attach_thread): Update.
8054
07e059b5
VP
80552008-12-02 Pedro Alves <pedro@codesourcery.com>
8056
889bf7c5
PA
8057 * target.h (struct target_ops): Add qxfer_osdata member.
8058 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
8059 and dirent.h.
8060 (linux_qxfer_osdata): New functions.
8061 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
8062 callback.
8063 * server.c (handle_query): Handle "qXfer:osdata:read:".
8064 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
8065 (buffer_xml_printf): New functions.
8066 * server.h (struct buffer): New.
8067 (buffer_grow_str, buffer_grow_str0): New macros.
8068 (buffer_grow, buffer_free, buffer_init, buffer_finish)
8069 (buffer_xml_printf): Declare.
07e059b5 8070
4cab47ab
DE
80712008-11-24 Doug Evans <dje@google.com>
8072
8073 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
8074
f142445f
DJ
80752008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
8076
8077 * server.c (handle_v_run): Always use the supplied argument list.
8078
d0107bb6 80792008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 8080
d0107bb6
BW
8081 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
8082 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 8083
2c4ad781
TJB
80842008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
8085
8086 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
8087 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
8088 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
8089 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
8090 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
8091 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
8092 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
8093 XML target descriptions.
8094 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
8095 when inferior is running on an ISA 2.05 or later processor. Add
8096 special case to return offset for full 64-bit slot of FPSCR when
8097 in 32-bits.
8098
dfb64f85
DJ
80992008-11-14 Daniel Gutson <dgutson@codesourcery.com>
8100
8101 * Makefile.in (SFILES, clean): Added sparc64 files.
8102 (reg-sparc64.o, reg-sparc64.c): New.
8103 * configure.srv (sparc*-*-linux*): New configuration.
8104 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
8105 syscall arguments for SPARC.
8106 (regsets_store_inferior_registers): Likewise.
8107 * linux-sparc-low.c: New file.
8108
66b6e1dd
DE
81092008-10-21 Doug Evans <dje@google.com>
8110
8111 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
8112 (READLINE_DIR,READLINE_DEP): Delete.
8113 (INTERNAL_CFLAGS): Update.
8114 (LINTFLAGS): Update.
8115
9b710a42
PA
81162008-10-10 Pedro Alves <pedro@codesourcery.com>
8117
8118 * server.c (handle_v_run): If GDB didn't specify an argv, use the
8119 whole argv from the last run, not just argv[0].
8120
5822d809
PA
81212008-09-08 Pedro Alves <pedro@codesourcery.com>
8122
8123 * regcache.c (new_register_cache): Return NULL if the register
8124 cache size isn't known yet.
8125 (free_register_cache): Avoid dereferencing a NULL regcache.
8126
74aac56f
DJ
81272008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
8128
8129 * configure.srv: Merge MIPS and MIPS64.
8130
400b20f5
MR
81312008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
8132
8133 * Makefile.in (uninstall): Apply $(EXEEXT) too.
8134
677c5bb1
LM
81352008-08-18 Luis Machado <luisgpm@br.ibm.com>
8136
8137 * Makefile.in: Add required vsx dependencies.
8138
8139 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
8140 Declare init_registers_powerpc_vsx32l.
8141 Declare init_registers_powerpc_vsx64l.
8142 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
8143 (ppc_arch_setup): Check for VSX in hwcap.
8144 (ppc_fill_vsxregset): New function.
8145 (ppc_store_vsxregset): New function.
8146 Add new VSX entry in regset_info target_regsets.
8147
8148 * configure.srv: Add new VSX dependencies.
8149
a6f3e723
SL
81502008-08-12 Pedro Alves <pedro@codesourcery.com>
8151
8152 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
8153 (remote_open): Set or clear transport_is_reliable.
8154 (putpkt_binary): Don't expect acks in noack mode.
8155 (getpkt): Don't send ack/nac in noack mode.
8156 * server.c (handle_general_set): Handle QStartNoAckMode.
8157 (handle_query): If connected by tcp pass QStartNoAckMode+ in
8158 qSupported.
8159 (main): Reset noack_mode on every connection.
8160 * server.h (noack_mode): Declare.
8161
a417dc56
RW
81622008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8163
8164 * Makefile.in (GDBREPLAY_OBS): New variable.
8165 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
8166
3221518c
UW
81672008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
8168 Daniel Jacobowitz <dan@codesourcery.com>
8169
8170 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
8171 (usr_store_inferior_registers): Likewise.
8172 (regsets_store_inferior_registers): Likewise.
8173
ec56be1b
PA
81742008-07-31 Rolf Jansen <rj@surtec.com>
8175 Pedro Alves <pedro@codesourcery.com>
8176
8177 * configure.ac: Check for memmem declaration.
8178 * server.c [HAVE_MALLOC_H]: Include malloc.h.
8179 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
8180 (disable_packet_qfThreadInfo): Unconditionally compile.
8181 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
8182 * configure, config.in: Regenerate.
8183
2fe5e3ff
DE
81842008-07-28 Doug Kwan <dougkwan@google.com>
8185
8186 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
8187 (linux_write_memory): Remove declaration of errno.
8188
836acd6d
UW
81892008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
8190
8191 * linux-low.c (handle_extended_wait): Do not use "status"
8192 variable uninitialized.
8193
aeba519e
PA
81942008-07-07 Pedro Alves <pedro@codesourcery.com>
8195
8196 * server.c (handle_v_attach): Inhibit reporting dll changes.
8197
db42f210
PA
81982008-06-27 Pedro Alves <pedro@codesourcery.com>
8199
8200 * remote-utils.c (prepare_resume_reply): If requested, don't
8201 output "thread:TID" in the T stop reply.
8202
8203 * server.c (disable_packet_vCont, disable_packet_Tthread)
8204 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
8205 (handle_query): If requested, disable support for qC, qfThreadInfo
8206 and qsThreadInfo.
8207 (handle_v_requests): If requested, disable support for vCont.
8208 (gdbserver_show_disableable): New.
8209 (main): Handle --disable-packet and --disable-packet=LIST.
8210
8211 * server.h (disable_packet_vCont, disable_packet_Tthread)
8212 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
8213
8e4c5421
CD
82142008-06-20 Carlos O'Donell <carlos@codesourcery.com>
8215
8216 * server.c (gdbserver_usage): Mention --version.
8217
6e23a804
DJ
82182008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
8219
8220 * Makefile.in (gdbreplay.o): New rule.
8221
90aa6a40
JM
82222008-06-06 Joseph Myers <joseph@codesourcery.com>
8223
8224 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
8225 message, not gdbserver.
8226
c16158bc 82272008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
8228 Nathan Sidwell <nathan@codesourcery.com>
8229 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
8230
8231 * acinclude.m4: Include ../../config/acx.m4.
8232 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
8233 * configure, config.in: Regenerate.
8234 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
8235 * server.c (gdbserver_version): Print PKGVERSION.
8236 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
8237 (main): Adjust gdbserver_usage calls.
8238 * gdbreplay.c (version, host_name): Add declarations.
8239 (gdbreplay_version, gdbreplay_usage): New.
8240 (main): Accept --version and --help options.
8241
aeb75bf5
DJ
82422008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
8243
8244 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
8245 (arm_breakpoint_at): Handle Thumb.
8246 (the_low_target): Add comment.
8247
76b233dd
UW
82482008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
8249
8250 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
8251
08388c79
DE
82522008-05-09 Doug Evans <dje@google.com>
8253
a3c83fae
DE
8254 * server.h (decode_search_memory_packet): Declare.
8255 * remote-utils.c (decode_search_memory_packet): New fn.
8256 * server.c (handle_search_memory_1): New fn.
08388c79
DE
8257 (handle_search_memory): New fn.
8258 (handle_query): Process qSearch:memory packets.
8259
bb9c3d36
UW
82602008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
8261
8262 * regcache.c (registers_length): Remove.
8263 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
8264 full register packet.
8265 * regcache.h (registers_length): Remove prototype.
8266 * server.h (PBUFSIZ): Define to 16384.
8267
7284e1be
UW
82682008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
8269
8270 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
8271 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
8272 powerpc-64l.o, and powerpc-altivec64l.o.
8273 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
8274 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
8275 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
8276 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
8277 rs6000/power-linux.xml, and rs6000/power64-linux.xml
8278 to srv_xmlfiles.
8279
8280 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
8281 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
8282 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
8283 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
8284 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
8285 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
8286 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
8287 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
8288 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
8289 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
8290 (clean): Update.
8291
8292 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
8293 (init_registers_powerpc_32l): ... this new prototype.
8294 (init_registers_powerpc_32): Remove, replace by ...
8295 (init_registers_powerpc_altivec32l): ... this new prototype.
8296 (init_registers_powerpc_e500): Remove, replace by ...
8297 (init_registers_powerpc_e500l): ... this new prototype.
8298 (init_registers_ppc64): Remove, replace by ...
8299 (init_registers_powerpc_64l): ... this new prototype.
8300 (init_registers_powerpc_64): Remove, replace by ...
8301 (init_registers_powerpc_altivec64l): ... this new prototype.
8302 (ppc_num_regs): Set to 73.
8303 (PT_ORIG_R3, PT_TRAP): Define if necessary.
8304 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
8305 (ppc_cannot_store_register): Handle orig_r3 and trap.
8306 (ppc_arch_setup): Update init_registers_... calls.
8307 (ppc_fill_gregset): Handle orig_r3 and trap.
8308
8309 * inferiors.c (clear_inferiors): Reset current_inferior.
8310
fdc59709
PB
83112008-04-23 Paolo Bonzini <bonzini@gnu.org>
8312
889bf7c5
PA
8313 * acinclude.m4: Add override.m4.
8314 * configure: Regenerate.
fdc59709 8315
c9b2f845
UW
83162008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
8317
8318 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
8319 initial call to init_register_ppc64.
8320
550512b8
UW
83212008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
8322
43aaf8b6
PA
8323 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
8324 single powerpc*-*-linux* case.
550512b8
UW
8325 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
8326
b6430ec3
UW
83272008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
8328
8329 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 8330 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
8331 from reg_xmlfiles.
8332 * linux-ppc-low.c: Include <elf.h>.
8333 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
8334 (ppc_hwcap): New global variable.
8335 (ppc_regmap): Remove __SPE__ #ifdef sections.
8336 (ppc_regmap_e500): New global variable.
8337 (ppc_cannot_store_register): Update __SPE__ special case.
8338 (ppc_get_hwcap): New function.
8339 (ppc_arch_setup): Use it to determine whether inferior supports
8340 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
8341 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
8342 Do not access registers if target does not support AltiVec.
8343 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
8344 Do not access registers if target does not support SPE.
8345 (target_regsets): Unconditionally include AltiVec and SPE regsets.
8346
52fa2412
UW
83472008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
8348
8349 * linux-low.c (disabled_regsets, num_regsets): New.
8350 (use_regsets_p): Delete.
8351 (linux_wait_for_process): Clear disabled_regsets.
8352 (regsets_fetch_inferior_registers): Check and set it.
8353 (regsets_store_inferior_registers): Likewise.
8354 (linux_fetch_registers, linux_store_registers): Do not use
8355 use_regsets_p.
8356 (initialize_low): Allocate disabled_regsets.
8357
e28b3332
DJ
83582008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
8359
8360 * Makefile.in (LIBOBJS): New.
8361 (OBS): Use LIBOBJS.
8362 (memmem.o): New rule.
8363 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
8364 * configure: Regenerated.
8365
4536995d
UW
83662008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
8367
8368 * server.c (handle_query): Never return "unsupported" for
8369 qXfer:features:read queries.
8370
221c031f
UW
83712008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
8372
8373 * server.c (get_features_xml): Fix inverted condition.
8374 (handle_query): Always support qXfer:feature:read.
8375
ccd213ac
DJ
83762008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
8377
8378 * server.c (wrapper_argv): New.
8379 (start_inferior): Handle wrapper_argv. If set, expect an extra
8380 trap.
8381 (gdbserver_usage): Document --wrapper.
8382 (main): Parse --wrapper.
8383
6fe305f7
UW
83842008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8385
8386 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
8387 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
8388 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
8389 (ppc_set_pc): Likewise.
8390 (ppc_arch_setup): New function.
8391 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
8392 of collect_register.
889bf7c5 8393 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 8394
5b0a002e
UW
83952008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8396
8397 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
8398 instead of linux-ppc64-low.o.
8399 * linux-ppc64-low.c: Remove file.
8400 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
8401 (linux-ppc64-low.o): Remove rule.
8402
8403 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
8404 (init_registers_powerpc_64): Likewise.
8405 (ppc_regmap): Conditionally define depending on __powerpc64__.
8406 (ppc_cannot_store_register): Do not special-case "fpscr" when
8407 compiled on __powerpc64__.
8408 (ppc_collect_ptrace_register): New function.
8409 (ppc_supply_ptrace_register): New function.
8410 (ppc_breakpoint): Change type to "unsigned int".
8411 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
8412 (the_low_target): Conditionally provide initializers for the
889bf7c5 8413 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
8414 collect_ptrace_register and supply_ptrace_register members.
8415
9b4b61c8
UW
84162008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8417
8418 * regcache.h (gdbserver_xmltarget): Add extern declaration.
8419 * server.c (gdbserver_xmltarget): Define.
8420 (get_features_xml): Use it to replace "target.xml" and arch_string.
8421
8422 * configure.srv: Remove srv_xmltarget. Add XML files that were
8423 mentioned there to srv_xmlfiles instead. Remove conditional tests
8424 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
8425 srv_xmlfiles and srv_regobj to include all possible choices.
8426 * configure.ac (srv_xmltarget): Remove.
8427 (srv_xmlfiles): Do not add "target.xml".
8428 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
8429 checks for supplementary target information.
8430 * configure: Regenerate.
8431 * Makefile.in (XML_TARGET): Remove.
8432 (target.xml): Remove rule.
8433 (clean): Do not clean up target.xml.
8434 (.PRECIOUS): Do not mention target.xml.
8435
8436 * target.h (struct target_ops): Remove arch_string member.
8437 * linux-low.c (linux_arch_string): Remove.
8438 (linux_target_ops): Remove arch_string initializer.
8439 * linux-low.h (struct linux_target_ops): Remove arch_string member.
8440 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
8441 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
8442 * spu-low.c (spu_arch_string): Remove.
8443 (spu_target_ops): Remove arch_string initializer.
8444 * win32-low.c (win32_arch_string): Remove.
8445 (win32_target_ops): Remove arch_string initializer.
8446 * win32-low.h (struct win32_target_ops): Remove arch_string member.
8447 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
8448 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
8449
ee1a7ae4
UW
84502008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
8451
8452 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
8453 by collect_ptrace_register and supply_ptrace_register hooks.
8454 * linux-low.c (fetch_register): Use supply_ptrace_register callback
8455 instead of checking for the_low_target.left_pad_xfer.
8456 (usr_store_inferior_registers): Use collect_ptrace_register callback
8457 instead of checking for the_low_target.left_pad_xfer.
8458
8459 * linux-s390-low.c (s390_collect_ptrace_register): New function.
8460 (s390_supply_ptrace_register): Likewise.
8461 (s390_fill_gregset): Call s390_collect_ptrace_register.
8462 (the_low_target): Update.
8463
8464 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
8465 (ppc_supply_ptrace_register): Likewise.
8466 (the_low_target): Update.
8467
8468 * linux-i386-low.c (the_low_target): Update.
8469 * linux-x86-64-low.c (the_low_target): Update.
8470
d61ddec4
UW
84712008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
8472
8473 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
8474 reg-s390.o and reg-s390x.o.
8475
8476 * linux-low.c (new_inferior): New global variable.
8477 (linux_create_inferior, linux_attach): Set it.
8478 (linux_wait_for_process): Call the_low_target.arch_setup after the
8479 target has stopped for the first time.
8480 (initialize_low): Do not call the_low_target.arch_setup.
8481
8482 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
8483 (s390_set_pc): Likewise.
8484 (s390_arch_setup): New function.
8485 (the_low_target): Use s390_arch_setup as arch_setup routine.
8486
8487 * regcache.c (realloc_register_cache): New function.
8488 (set_register_cache): Call it for each existing regcache.
8489
d05b4ac3
UW
84902008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
8491
8492 * server.h (init_registers): Remove prototype.
8493
8494 * linux-low.h (struct linux_target_ops): Add arch_setup field.
8495 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
8496 instead of init_registers ().
8497 * linux-arm-low.c (init_registers_arm): Add prototype.
8498 (init_registers_arm_with_iwmmxt): Likewise.
8499 (the_low_target): Add initializer for arch_setup field.
8500 * linux-cris-low.c (init_registers_cris): Add prototype.
8501 (the_low_target): Add initializer for arch_setup field.
8502 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
8503 (the_low_target): Add initializer for arch_setup field.
8504 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
8505 (the_low_target): Add initializer for arch_setup field.
8506 * linux-ia64-low.c (init_registers_ia64): Add prototype.
8507 (the_low_target): Add initializer for arch_setup field.
8508 * linux-m32r-low.c (init_registers_m32r): Add prototype.
8509 (the_low_target): Add initializer for arch_setup field.
8510 * linux-m68k-low.c (init_registers_m68k): Add prototype.
8511 (the_low_target): Add initializer for arch_setup field.
8512 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
8513 (init_registers_mips64_linux): Likewise.
8514 (the_low_target): Add initializer for arch_setup field.
8515 * linux-ppc-low.c (init_registers_ppc): Add prototype.
8516 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
8517 (the_low_target): Add initializer for arch_setup field.
8518 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
8519 (init_registers_powerpc_64): Likewise.
8520 (the_low_target): Add initializer for arch_setup field.
8521 * linux-s390-low.c (init_registers_s390): Add prototype.
8522 (init_registers_s390x): Likewise.
8523 (the_low_target): Add initializer for arch_setup field.
8524 * linux-sh-low.c (init_registers_sh): Add prototype.
8525 (the_low_target): Add initializer for arch_setup field.
8526 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
8527 (the_low_target): Add initializer for arch_setup field.
8528 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
8529 (the_low_target): Add initializer for arch_setup field.
8530
8531 * win32-low.h (struct win32_target_ops): Add arch_setup field.
8532 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
8533 instead of init_registers ().
8534 * win32-arm-low.c (init_registers_arm): Add prototype.
8535 (the_low_target): Add initializer for arch_setup field.
8536 * win32-i386-low.c (init_registers_i386): Add prototype.
8537 (the_low_target): Add initializer for arch_setup field.
8538
8539 * spu-low.c (init_registers_spu): Add prototype.
8540 (initialize_low): Call initialie_registers_spu () instead of
8541 initialize_registers ().
8542
fd96d250
PA
85432008-02-19 Pedro Alves <pedro@codesourcery.com>
8544
8545 * server.c (handle_v_requests): When handling the vRun and vAttach
8546 packets, if already debugging a process, don't kill it. Return an
8547 error instead.
8548
d41b6bb4
DJ
85492008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
8550
8551 * server.c (handle_query): Correct length check.
8552
5ac588cf
PA
85532008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
8554
8555 * win32-low.c (do_initial_child_stuff): Add process handle
8556 parameter. Set current_process_handle and current_process_id from the
8557 parameters. Clear globals.
8558 (win32_create_inferior): Don't set current_process_handle and
8559 current_process_id here. Instead pass them on the call to
8560 do_initial_child_stuff.
8561 (win32_attach): Likewise.
8562 (win32_clear_inferiors): New.
8563 (win32_kill): Don't close the current process handle or the
8564 current thread handle here. Instead call win32_clear_inferiors.
8565 (win32_detach): Don't open a new handle to the process. Call
8566 win32_clear_inferiors.
8567 (win32_join): Don't rely on current_process_handle; open a new
8568 handle using the process id.
8569 (win32_wait): Call win32_clear_inferiors when the inferior process
8570 has exited.
8571
ecd7ecbc
DJ
85722008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
8573
8574 * server.c (monitor_show_help): Add "exit".
8575
1525d545
MG
85762008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
8577
ecd7ecbc 8578 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
8579 (clean): Add reg-xtensa.c.
8580 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
8581 * configure.srv (xtensa*-*-linux*) New target.
8582 * linux-xtensa-low.c: New.
8583 * xtensa-xtregs.c: New.
1525d545 8584
59a016f0
PA
85852008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
8586
8587 * hostio.c: Don't include errno.h.
8588 (errno_to_fileio_errno): Move to hostio-errno.
8589 * hostio.c: (hostio_error): Remove the error parameter. Defer the
8590 error number outputting to the target->hostio_last_error callback.
8591 (hostio_packet_error): Use FILEIO_EINVAL directly.
8592 (handle_open, handle_pread, hostio_error, handle_unlink): Update
8593 calls to hostio_error.
8594 * hostio-errno.c: New.
8595 * server.h (hostio_last_error_from_errno): Declare.
8596 * target.h (target_ops): Add hostio_last_error member.
8597 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
8598 as hostio_last_error handler.
889bf7c5 8599 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
8600 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
8601 (wince_hostio_last_error): New functions.
8602 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
8603 as hostio_last_error handler.
8604 (win32_target_ops) [!_WIN32_WCE]: Register
8605 hostio_last_error_from_errno as hostio_last_error handler.
8606 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
8607 (hostio-errno.o): New rule.
8608 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
8609 * configure.srv (srv_hostio_err_objs): New variable. Default to
8610 hostio-errno.o.
8611 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
8612 * configure: Regenerate.
8613
2d717e4f
DJ
86142008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
8615
8616 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
8617 (linux_kill, linux_detach): Clean up the process list.
8618 * remote-utils.c (remote_open): Improve port number parsing.
8619 (putpkt_binary, input_interrupt): Only send interrupts if the target
8620 is running.
8621 * server.c (extended_protocol): Make static.
8622 (attached): Define earlier.
8623 (exit_requested, response_needed, program_argv): New variables.
8624 (target_running): New.
8625 (start_inferior): Clear attached here.
8626 (attach_inferior): Set attached here.
8627 (require_running): Define.
8628 (handle_query): Use require_running and target_running. Implement
8629 "monitor exit".
8630 (handle_v_attach, handle_v_run): New.
8631 (handle_v_requests): Use require_running. Handle vAttach and vRun.
8632 (gdbserver_usage): Update.
8633 (main): Redo argument parsing. Handle --debug and --multi. Handle
8634 --attach along with other options or after the port. Save
8635 program_argv. Support no initial program. Resynchronize
8636 communication with GDB after an error. Handle "monitor exit".
8637 Use require_running and target_running. Always allow the extended
8638 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
8639 restart in extended mode.
8640 * README: Refer to the GDB manual. Update --attach usage.
8641
7407e2de
AS
86422007-12-20 Andreas Schwab <schwab@suse.de>
8643
8644 * linux-low.c (STACK_SIZE): Define.
8645 (linux_tracefork_child): Use it. Use __clone2 on ia64.
8646 (linux_test_for_tracefork): Likewise.
8647
b65d95c5
DJ
86482007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
8649
8650 * linux-low.c (linux_wait_for_event): Update messages. Do not
8651 reinsert auto-delete breakpoints.
8652 * mem-break.c (struct breakpoint): Change return type of handler to
8653 int.
8654 (set_breakpoint_at): Update handler type.
8655 (reinsert_breakpoint_handler): Return 1 instead of calling
8656 delete_breakpoint.
8657 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
8658 setting a new one.
8659 (check_breakpoints): Delete auto-delete breakpoints and return 2.
8660 * mem-break.h (set_breakpoint_at): Update handler type.
8661 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
8662 * win32-low.c (auto_delete_breakpoint): New.
8663 (get_child_debug_event): Use it.
8664
4e799345
DJ
86652007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
8666
8667 * configure.ac: Check for pread and pwrite.
8668 * hostio.c (handle_pread): Fall back to lseek and read.
8669 (handle_pwrite): Fall back to lseek and write.
8670 * config.in, configure: Regenerated.
8671
27524b67
DJ
86722007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
8673
8674 * server.c (myresume): Add own_buf argument.
8675 (main): Update calls.
8676
a20d5e98
DJ
86772007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
8678
8679 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
8680 * remote-utils.c (remote_open): Do not call disable_async_io.
8681 (block_async_io): Delete.
8682 (unblock_async_io): Make static.
8683 (initialize_async_io): New.
8684 * server.c (handle_v_cont): Handle async I/O here.
8685 (myresume): Likewise. Move other common resume tasks here...
8686 (main): ... from here. Call initialize_async_io. Disable async
8687 I/O before the main loop.
8688 * server.h (initialize_async_io): Declare.
8689 (block_async_io, unblock_async_io): Delete prototypes.
8690 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
8691
b79d787e
DJ
86922007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
8693
8694 * remote-utils.c (readchar): Allow binary data in received messages.
8695
d97903b2
PA
86962007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8697
8698 * win32-low.c (attaching): New global.
8699 (win32_create_inferior): Clear the `attaching' global.
8700 (win32_attach): Set the `attaching' global.
8701 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
8702 attaching. Only set a breakpoint at the entry point if not
8703 attaching.
8704
311de423
PA
87052007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8706
8707 * server.c (main): Don't report dll events on the initial
8708 connection on attaches.
8709
6c2d16d2
PA
87102007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8711
8712 * server.c (main): Relax numerical bases supported for the pid of
8713 the --attach command line argument.
8714
5ca906e6
PA
87152007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8716
8717 * win32-low.c (win32_attach): Call OpenProcess before
8718 DebugActiveProcess, not after. Add last error output to error
8719 call.
8720
9c6c8194
PA
87212007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8722
8723 * win32-low.c (win32_get_thread_context)
8724 (win32_set_thread_context): New functions.
8725 (thread_rec): Use win32_get_thread_context.
8726 (continue_one_thread, win32_resume): Use win32_set_thread_context.
8727 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
8728 field.
8729
4d5d1aaa
PA
87302007-12-03 Leo Zayas
8731 Pedro Alves <pedro_alves@portugalmail.pt>
8732
8733 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
8734 global variables.
8735 (child_add_thread): Minor cleanup.
8736 (child_continue): Resume artificially suspended threads before
8737 calling ContinueDebugEvent.
8738 (suspend_one_thread): New.
8739 (fake_breakpoint_event): New.
8740 (get_child_debug_event): Change return type to int. Check here if
8741 gdb sent an interrupt request. If a soft interrupt was requested,
8742 fake a breakpoint event. Return 0 if there is no event to handle,
8743 and 1 otherwise.
8744 (win32_wait): Don't check here if gdb sent an interrupt request.
8745 Ensure there is a valid event to handle.
8746 (win32_request_interrupt): Add soft interruption method as last
8747 resort.
8748
c436e841
PA
87492007-12-03 Leo Zayas
8750 Pedro Alves <pedro_alves@portugalmail.pt>
8751
8752 * win32-low.h (win32_thread_info): Add descriptions to the
8753 structure members. Replace `suspend_count' counter by a
8754 `suspended' flag.
8755 * win32-low.c (thread_rec): Update condition of when to get the
8756 context from the inferior. Rely on ContextFlags being set if it
8757 has already been retrieved. Only suspend the inferior thread if
8758 we haven't already. Warn if that fails.
8759 (continue_one_thread): s/suspend_count/suspended/. Only call
8760 ResumeThread once. Warn if that fails.
8761
e7b5fa67
PA
87622007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
8763
8764 * win32-low.c (win32_wait): Don't read from the inferior when it
8765 has already exited.
8766
a385171d
PA
87672007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
8768
8769 * Makefile.in (win32_low_h): New variable.
8770 (win32-low.o): Add dependency on $(win32_low_h).
8771 (win32-arm-low.o, win32-i386-low.o): New rules.
8772
f80c84b3
DJ
87732007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
8774
8775 * hostio.c: Correct copyright year.
8776
a6b151f1
DJ
87772007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
8778
8779 * Makefile.in (OBS): Add hostio.o.
8780 (hostio.o): New rule.
8781 * server.h (handle_vFile): Declare.
8782 * hostio.c: New file.
8783 * server.c (handle_v_requests): Take packet_len and new_packet_len
8784 for binary packets. Call handle_vFile.
8785 (main): Update call to handle_v_requests.
8786
f9387fc3
DJ
87872007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
8788
8789 * linux-low.c: Include <sched.h>.
8790
51c2684e
DJ
87912007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
8792
8793 * linux-low.c (linux_tracefork_grandchild): New.
8794 (linux_tracefork_child): Use clone.
8795 (linux_test_for_tracefork): Use clone; allocate and free a stack.
8796
75f83163
JB
87972007-10-31 Joel Brobecker <brobecker@adacore.com>
8798
8799 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
8800
da5898ce
DJ
88012007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
8802
8803 * linux-low.c (handle_extended_wait): Handle unexpected signals.
8804
24a09b5f
DJ
88052007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
8806
8807 * inferiors.c (change_inferior_id): Delete.
8808 (add_pid_to_list, pull_pid_from_list): New.
8809 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
8810 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
8811 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
8812 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
8813 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
8814 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
8815 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
8816 (using_threads): Always set to 1.
8817 (handle_extended_wait): New.
8818 (add_process): Do not set TID.
8819 (linux_create_inferior): Set must_set_ptrace_flags.
8820 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
8821 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
8822 (linux_thread_alive): Rename TID argument to LWPID.
8823 (linux_wait_for_process): Handle unknown processes. Do not use TID.
8824 (linux_wait_for_event): Do not use TID or check using_threads. Update
8825 call to dead_thread_notify. Call handle_extended_wait.
8826 (linux_create_inferior): Use PTRACE_SETOPTIONS.
8827 (send_sigstop): Delete sigstop_sent.
8828 (wait_for_sigstop): Avoid TID.
8829 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
8830 (linux_test_for_tracefork): New.
8831 (linux_lookup_signals): Use thread_db_active and
8832 linux_supports_tracefork_flag.
8833 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
8834 * linux-low.h (get_process_thread): Avoid TID.
8835 (struct process_ifo): Move thread_known and tid to the end. Remove
8836 sigstop_sent.
8837 (linux_attach_lwp, thread_db_init): Update prototypes.
8838 * server.h (change_inferior_id): Delete prototype.
8839 (add_pid_to_list, pull_pid_from_list): New prototypes.
8840 * thread-db.c (thread_db_use_events): New.
8841 (find_first_thread): Rename to...
8842 (find_one_thread): ...this. Update callers and messages. Do not
8843 call fatal. Check thread_db_use_events. Do not call
8844 change_inferior_id or new_thread_notify.
8845 (maybe_attach_thread): Update. Do not call new_thread_notify.
8846 (thread_db_init): Set thread_db_use_events. Check use_events.
8847 * utils.c (fatal, warning): Correct message prefix.
8848
30ed0a8f
DJ
88492007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
8850
8851 * Makefile.in (clean): Remove new files.
8852 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
8853 (powerpc-64.o, powerpc-64.c): New rules.
8854 * configure.srv: Use alternate register sets for powerpc64-*-linux*
8855 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
8856 with SPE.
8857 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
8858 SPE targets.
8859 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
8860 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
8861 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
8862 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
8863 (target_regsets): Add AltiVec and SPE register sets.
8864 * configure.ac: Check for AltiVec and SPE.
8865 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
8866 (ppc_fill_vrregset, ppc_store_vrregset): New.
8867 (target_regsets): Add AltiVec register set.
8868 * configure: Regenerated.
8869
fd462a61
DJ
88702007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
8871
8872 * linux-low.c (O_LARGEFILE): Define.
8873 (linux_read_memory): Use /proc/PID/mem.
8874 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
8875 * configure, config.in: Regenerated.
8876
69f223ed
DJ
88772007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
8878
8879 * linux-low.c (linux_wait_for_event): Do not pass signals while
8880 single-stepping.
8881
aec18585
PA
88822007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
8883
8884 * win32-low.c (create_process): New.
8885 (win32_create_inferior): Use create_process instead of
8886 CreateProcess. If create_process failed retry appending an ".exe"
8887 suffix. Store the GetLastError result immediatelly after
8888 create_process calls and use it on the call to error.
8889
34d86ddd
PA
88902007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
8891
8892 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
8893
5a0e3bd0
JB
88942007-08-23 Joel Brobecker <brobecker@adacore.com>
8895
8896 * configure.ac: Switch license to GPLv3.
8897
f88c79e6
MS
88982007-08-01 Michael Snyder <msnyder@access-company.com>
8899
8900 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
8901
6b3d9b83
PA
89022007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
8903
8904 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
8905 typedef.
8906 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
8907 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
8908 CloseToolhelp32Snapshot.
8909 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
8910 CloseToolhelp32Snapshot.
8911
c588c53c
MS
89122007-07-27 Michael Snyder <michael.snyder@access-company.com>
8913
8914 * server.c (main): Check for inferior exit before main loop.
8915
aa0403d9
PA
89162007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
8917
8918 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
8919 instead of on tmp_desc.
8920
255e7678
DJ
89212007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
8922 Daniel Jacobowitz <dan@codesourcery.com>
8923
8924 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
8925 (add_thread): Minor cleanups.
8926 (clear_inferiors): Move lower in the file. Clear the DLL
8927 list.
8928 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
8929 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
8930 (xml_escape_text): New.
8931 * server.c (handle_query): Handle qXfer:libraries:read. Report it
8932 for qSupported.
8933 (handle_v_cont): Report errors.
8934 (gdbserver_version): Update.
8935 (main): Correct size of own_buf. Do not report initial DLL events.
8936 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
8937 (unloaded_dll, xml_escape_text): New.
8938 * win32-low.c (enum target_waitkind): Update comments.
8939 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
8940 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
8941 (win32_EnumProcessModules, win32_GetModuleInformation)
8942 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
8943 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
8944 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
8945 (win32_Module32First, win32_Module32Next, load_toolhelp)
8946 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
8947 (get_child_debug_event): Handle DLL events.
8948 (win32_wait): Likewise.
8949
0d37add9
DJ
89502007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
8951
8952 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
8953 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
8954
45e2715e
PA
89552007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
8956
8957 * win32-low.c (handle_output_debug_string): Ignore event if not
8958 waiting.
8959
c5674cf1
PA
89602007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
8961
8962 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
8963
2bbe3cc1
DJ
89642007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
8965
8966 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
8967
ae13219e
DJ
89682007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
8969
8970 * inferiors.c (change_inferior_id): Add comment.
8971 * linux-low.c (check_removed_breakpoint): Add an early
8972 prototype. Improve debug output.
8973 (linux_attach): Doc update.
8974 (linux_detach_one_process, linux_detach): Clean up before releasing
8975 each process.
8976 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
8977 * linux-low.h (struct process_info): Doc improvement.
8978 * mem-break.c (delete_all_breakpoints): New.
8979 * mem-break.h (delete_all_breakpoints): New prototype.
8980 * thread-db.c (find_first_thread): New.
8981 (thread_db_create_event): Call it instead of
8982 thread_db_find_new_threads. Clean up unused variables.
8983 (maybe_attach_thread): Remove first thread handling.
8984 (thread_db_find_new_threads): Use find_first_thread.
8985 (thread_db_get_tls_address): Likewise.
8986
4105de34
DJ
89872007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
8988
8989 * thread-db.c (thread_db_find_new_threads): Add prototype.
8990 (thread_db_create_event): Check for the main thread before adding
8991 a new thread.
8992 (maybe_attach_thread): Only enable event reporting if TID == 0.
8993 (thread_db_get_tls_address): Check for new threads.
8994
2b876972
DJ
89952007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
8996
8997 * linux-low.c (linux_create_inferior): Try execv before execvp.
8998 * spu-low.c (spu_create_inferior): Likewise.
8999
7a245884
DJ
90002007-06-13 Mike Frysinger <vapier@gentoo.org>
9001
9002 * linux-low.c (linux_create_inferior): Change execv to execvp.
9003 * spu-low.c (spu_create_inferior): Likewies.
9004
117ce543
DJ
90052007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
9006
9007 * Makefile.in (clean): Clean new files instead of deleted ones.
9008 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
9009 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
9010 rules.
9011 * configure.srv: Specify XML files and new regformats for MIPS and
9012 MIPS64 GNU/Linux.
9013 * linux-mips-low.c (mips_num_regs): Set to only used registers.
9014 (mips_regmap): Do not fetch $0. Remove unused registers. Add
9015 an entry for the restart register.
9016 (mips_cannot_fetch_register, mips_cannot_store_register)
9017 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
9018 register names to match the XML descriptions.
9019 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
9020 restart register instead of $0.
9021
0e7f50da
UW
90222007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
9023 Markus Deuling <deuling@de.ibm.com>
9024
9025 * remote-utils.c (decode_xfer_write): New function.
9026 * server.h (decode_xfer_write): Add prototype.
9027 * server.c (handle_query): Add PACKET_LEN argument. Support
9028 qXfer:spu:read and qXfer:spu:write packets.
9029 (main): Pass packet_len to handle_query.
9030 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
9031 * target.h (target_ops): Add qxfer_spu.
9032
374c1d38
UW
90332007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
9034
9035 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
9036 accessing non-seekable spufs files.
9037
bb63802a
UW
90382007-05-16 Markus Deuling <deuling@de.ibm.com>
9039
889bf7c5 9040 * server.c (handle_query): Add reply for qC packet.
bb63802a 9041
7390519e
PA
90422007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9043 Leo Zayas <lerele@champenstudios@com>
9044
9045 * server.h (check_remote_input_interrupt_request): New function.
9046 * remote_utils.c (INVALID_DESCRIPTOR): New define.
9047 (remote_desc): Initialize with INVALID_DESCRIPTOR.
9048 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
9049 (check_remote_input_interrupt_request): New function.
9050 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 9051 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
9052 winapi_GenerateConsoleCtrlEvent): New typedefs.
9053 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
9054 to 250 ms.
9055 (win32_wait): Check for remote interrupt request
9056 with check_remote_input_interrupt_request.
9057 (win32_request_interrupt): New function.
9058 (win32_target_op): Set request_interrupt to win32_request_interrupt.
9059
34b34921
PA
90602007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9061
9062 * win32-low.c (debug_registers_changed,
9063 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
9064 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
9065 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
9066 (thread_rec): Get context using the low target.
9067 (child_add_thread): Call thread_added on the low target,
9068 which does the same thing.
9069 (regptr): Delete.
9070 (do_initial_child_stuff): Remove debug registers references.
9071 Set context using the low target. Resume threads after
9072 setting the contexts.
9073 (child_continue): Remove dead variable. Remove debug
9074 registers references.
9075 (child_fetch_inferior_registers): Go through the low target.
9076 (do_child_store_inferior_registers): Remove.
9077 (child_store_inferior_registers): Go through the low target.
9078 (win32_resume): Remove debug registers references.
9079 Set context using the low target.
9080 (handle_exception): Change return type to void. Don't record
9081 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
9082 first chance exception.
889bf7c5 9083 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
9084 goto loop. Always return after waiting for debug event.
9085 (win32_wait): Convert to switch statement. Handle spurious
9086 events.
9087
9088 * win32-i386-low.c (debug_registers_changed,
9089 debug_registers_used): New.
9090 (initial_stuff): Rename to ...
9091 (i386_initial_stuff): ... this. Clear debug registers
9092 state variables.
9093 (store_debug_registers): Delete.
9094 (i386_get_thread_context): New.
9095 (load_debug_registers): Delete.
9096 (i386_set_thread_context): New.
9097 (i386_thread_added): New.
9098 (single_step): Rename to ...
9099 (i386_single_step): ... this.
9100 (do_fetch_inferior_registers): Rename to ...
9101 (i386_fetch_inferior_register): ... this.
9102 (i386_store_inferior_register): New.
9103 (the_low_target): Adapt to new interface.
9104
9105 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
9106 (arm_get_thread_context): New.
9107 (arm_set_thread_context): New.
9108 (regptr): New.
9109 (do_fetch_inferior_registers): Rename to ...
9110 (arm_fetch_inferior_register): ... this.
9111 (arm_store_inferior_register): New.
9112 (arm_wince_breakpoint): Reimplement as unsigned long.
9113 (arm_wince_breakpoint_len): Define.
9114 (the_low_target): Adapt to new interface.
9115
9116 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
9117 load_debug_registers. Add get_thread_context, set_thread_context,
9118 thread_added and store_inferior_register. Rename
9119 fetch_inferior_registers to fetch_inferior_register.
9120 (regptr): Remove declaration.
9121
dd6953e1
PA
91222007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9123
9124 * linux-low.c (linux_detach): Change return type to int. Return 0.
9125 * spu-low.c (spu_detach): Likewise.
9126
444d6139
PA
91272007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9128
9129 * target.h (target_ops): Change return type of detach to int.
9130 Add join.
9131 (join_inferior): New.
9132 * server.c (main): Don't skip detach support on mingw32.
9133 If the inferior doesn't support detaching return error.
9134 Call join_inferior instead of using waitpid.
9135 * linux-low.c (linux_join): New.
9136 (linux_target_op): Add linux_join.
9137 * spu-low.c (spu_join): New.
9138 (spu_target_ops): Add spu_join.
9139 * win32-low.c (win32_detach): Adapt to new interface.
9140 Reopen current_process_handle before detaching. Issue a child
9141 resume before detaching.
9142 (win32_join): New.
9143 (win32_target_op): Add win32_join.
9144
1d5315fe
PA
91452007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9146
9147 * win32-low.c (win32-attach): Fix return value.
9148 * target.h (target_ops): Describe ATTACH return values.
9149
bf914831
PA
91502007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9151
9152 * win32-low.c (GETPROCADDRESS): Define.
9153 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
9154 (winapi_DebugSetProcessKillOnExit): Likewise.
9155 (win32_create_inferior): Force usage of ansi CreateProcessA.
9156 (win32_attach): Use GETPROCADDRESS.
9157 (win32_detach): Likewise.
9158
f72f3e60
PA
91592007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9160
9161 * win32-low.c (win32_wait): Don't use WSTOPSIG.
9162
ed50f18f
PA
91632007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
9164
9165 * win32-low.c: Commit leftover changes from 2007-03-29.
9166
0c2ead7e
DJ
91672007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
9168
9169 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
9170 fields short instead of int. Add explicit padding.
9171 (i387_cache_to_fsave): Remove unnecessary casts.
9172 (i387_fsave_to_cache): Doc fix.
9173 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
9174
73725ff3
DJ
91752007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
9176
9177 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
9178 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
9179
d99f33d8
PA
91802007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
9181
9182 * configure.srv (arm*-*-mingw32ce*): Move near the other
9183 arm targets.
9184
68070c10
PA
91852007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
9186
2482afc6 9187 * configure.ac: Add errno checking.
68070c10
PA
9188 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
9189 sys/file.h and malloc.h.
9190 (AC_CHECK_DECLS): Add perror.
9191 (srv_mingwce): Handle.
2482afc6 9192 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
9193 win32-i386-low.o to srv_tgtobj.
9194 (i[34567]86-*-mingw*): Likewise.
9195 (arm*-*-mingw32ce*): Add case.
9196 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
9197 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
9198 [__MINGW32CE__] (strerror): New function.
9199 [__MINGW32CE__] (errno): Define to GetLastError.
9200 [__MINGW32CE__] (COUNTOF): New macro.
9201 (remote_open): Remove extra close call.
9202 * mem-break.c (delete_breakpoint_at): New function.
9203 * mem-break.h (delete_breakpoint_at): Declare.
9204 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
9205 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
9206 [USE_WIN32API] (read, write): Add char* casts.
9207 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
9208 * server.h: Include wincecompat.h on Windows CE.
9209 [HAVE_ERRNO_H]: Check.
9210 (perror): Declare if not declared.
9211 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
9212 (perror_with_name): Remove errno declaration.
9213 * wincecompat.h: New.
9214 * wincecompat.c: New.
9215 * win32-low.h: New.
9216 * win32-arm-low.c: New.
9217 * win32-i386-low.c: New.
9218 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
9219 (OUTMSG2): Make it safe.
9220 (_T): New macro.
9221 (COUNTOF): New macro.
9222 (NUM_REGS): Get it from the low target.
9223 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
9224 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
9225 (thread_rec): Let low target handle debug registers.
9226 (child_add_thread): Likewise.
9227 (child_init_thread_list): Likewise.
9228 (continue_one_thread): Likewise.
9229 (regptr): New.
9230 (do_child_fetch_inferior_registers): Move to ...
9231 * win32-i386-low.c: ... here, and rename to ...
9232 (do_fetch_inferior_registers): ... this.
889bf7c5 9233 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
9234 Go through the low target.
9235 (do_child_store_inferior_registers): Use regptr.
9236 (strwinerror): New function.
9237 (win32_create_inferior): Handle Windows CE.
9238 Use strwinerror instead of strerror on Windows error
9239 codes. Add program to the error output.
9240 Don't close the main thread handle on Windows CE.
9241 (win32_attach): Use coredll.dll on Windows CE.
9242 (win32_kill): Close current process and current
9243 thread handles.
9244 (win32_detach): Use coredll.dll on Windows CE.
9245 (win32_resume): Let low target handle debug registers, and
9246 step request.
9247 (handle_exception): Add/Remove initial breakpoint. Avoid
9248 non-existant WSTOPSIG on Windows CE.
9249 (win32_read_inferior_memory): Cast to remove warning.
9250 (win32_arch_string): Go through the low target.
9251 (initialize_low): Call set_breakpoint_data with the low
9252 target's breakpoint.
9253 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
9254 FOP_REGNUM, mappings): Move to ...
9255 * win32-i386-low.c: ... here.
9256 * win32-low.c (win32_thread_info): Move to ...
9257 * win32-low.h: ... here.
9258 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
9259 win32-arm-low.c and wincecompat.c.
9260 (all:): Add $EXEEXT.
9261 (install-only:): Likewise.
9262 (gdbserver:): Likewise.
9263 (gdbreplay:): Likewise.
9264 * config.in: Regenerate.
9265 * configure: Regenerate.
9266
41093d81
PA
92672007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
9268
9269 * win32-low.c: Rename typedef thread_info to
9270 win32_thread_info throughout.
9271
544afa54
PA
92722007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
9273
9274 * win32-i386-low.c: Rename to ...
9275 * win32-low.c: ... this.
9276 * configure.srv: Replace win32-i386-low.o with win32-low.o.
9277 * Makefile.in: Likewise.
9278
bce7165d
PA
92792007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
9280
9281 * remote-utils.c (monitor_output): Constify msg parameter.
9282 * server.h (monitor_output): Likewise.
9283 * win32-i386-low.c (handle_output_debug_string): New.
9284 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
9285 handle_output_debug_string.
9286 (get_child_debug_event): Likewise.
9287
506c7aa0
DJ
92882007-03-27 Mat Hostetter <mat@lcs.mit.edu>
9289
9290 * server.c (main): Correct strtoul check.
9291
42c81e2a
DJ
92922007-03-27 Jon Ringle <jon@ringle.org>
9293
9294 * linux-low.c: Check __ARCH_HAS_MMU__ also.
9295
9453113a
DJ
92962007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
9297
9298 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
9299
64a69107
DJ
93002007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
9301
9302 * terminal.h: Check HAVE_SGTTY_H.
9303
93042007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
9305
9306 * remote-utils.c (remote_open): Print out the assigned port number.
9307
c74d0ad8
DJ
93082007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
9309
9310 * remote-utils.c (monitor_output): New function.
9311 * server.c (debug_threads): Define here.
9312 (monitor_show_help): New function.
9313 (handle_query): Handle qRcmd.
9314 (main): Do not handle 'd' packet.
9315 * server.h (debug_threads, remote_debug, monitor_output): Declare.
9316 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
9317 of debug_threads.
9318
de7c3b4a
PA
93192007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
9320
9321 * Makefile.in (EXEEXT): New.
9322 (clean): Use $(EXEEXT).
9323
ef57601b
PA
93242007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
9325
9326 * target.h (target_ops): Rename send_signal to request_interrupt,
9327 and remove enum target_signal parameter.
9328 * linux-low.c (linux_request_interrupt): Rename from
9329 linux_send_signal, and always send SIGINT.
9330 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
9331 and always send SIGINT.
9332 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
9333 of send_signal.
9334 (input_interrupt): Likewise.
9335
820f2bda
PA
93362007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
9337
9338 * server.c (get_features_xml): Check if target implemented
9339 arch_string.
9340 * win32-i386-low.c (win32_arch_string): New.
9341 (win32_target_ops): Add win32_arch_string as arch_string member.
9342
ab39bf24
UW
93432007-02-22 Markus Deuling <deuling@de.ibm.com>
9344
9345 * spu-low.c (spu_arch_string): New.
9346 (spu_target_ops): Add spu_arch_string.
9347
61ff6e04
DJ
93482007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
9349
9350 * remote-utils.c: Remove HAVE_TERMINAL_H check.
9351 * configure.ac: Do not check for terminal.h.
9352 * configure, config.in: Regenerated.
9353
fb1e4ffc
DJ
93542007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
9355
9356 * Makefile.in (OBS): Add $(XML_BUILTIN).
9357 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
9358 (clean): Update.
9359 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
9360 (arm-with-iwmmxt.c): New.
9361 * config.in, configure: Regenerate.
9362 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
9363 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
9364 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
9365 (arm*-*-linux*): Add iWMMXt and regset support.
9366 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
9367 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
9368 (arm_store_wmmxregset, target_regsets): New.
9369 * server.c (get_features_xml): Take annex argument. Check builtin
9370 XML documents.
9371 (handle_query): Handle multiple annexes.
9372
0f48aa01
DJ
93732007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
9374
9375 * remote-utils.c [USE_WIN32API] (read, write): Define.
9376 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
9377 write.
9378
23181151
DJ
93792007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
9380
9381 * linux-i386-low.c (the_low_target): Set arch_string.
9382 * linux-x86-64-low.c (the_low_target): Likewise.
9383 * linux-low.c (linux_arch_string): New.
9384 (linux_target_ops): Add it.
9385 * linux-low.h (struct linux_target_ops): Add arch_string.
9386 * server.c (write_qxfer_response): Use const void * for DATA.
9387 (get_features_xml): New.
9388 (handle_query): Handle qXfer:features:read. Report it for qSupported.
9389 * target.h (struct target_ops): Add arch_string method.
9390
9d606399
DJ
93912007-01-03 Denis Pilat <denis.pilat@st.com>
9392 Daniel Jacobowitz <dan@codesourcery.com>
9393
9394 * linux-low.c (linux_kill): Handle being called with no threads.
9395 * win32-i386-low.c (win32_kill): Likewise.
9396 (get_child_debug_event): Clear current_process_handle.
9397
93982006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
9399 Daniel Jacobowitz <dan@codesourcery.com>
9400
9401 * remote-utils.c (remote_open): Check the type of specified
9402 serial port devices before opening them.
9403 * server.c (main): Kill the inferior if an error occurs during
9404 the first remote_open.
9405
a5e13d24
DJ
94062006-12-05 Markus Deuling <deuling@de.ibm.com>
9407
9408 * README: Update supported targets.
9409
186947f7
DJ
94102006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
9411
9412 * Makefile.in (clean): Remove reg-mips64.c.
9413 (reg-mips64.c, reg-mips64.o): New rules.
9414 * configure.srv: Handle mips64. Include regset support for mips.
9415 * linux-mips-low.c (union mips_register): New.
9416 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
9417 (mips_breakpoint, mips_breakpoint_at): Use int.
9418 (mips_collect_register, mips_supply_register)
9419 (mips_collect_register_32bit, mips_supply_register_32bit)
9420 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
9421 (mips_store_fpregset, target_regsets): New.
9422 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
9423
a13e2c95
UW
94242006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
9425
9426 * configure.srv: Add target "spu*-*-*".
9427 * Makefile.in (clean): Remove reg-spu.c.
9428 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
9429 * spu-low.c: New file.
9430
cb7283db
DJ
94312006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
9432
9433 * configure.ac: Correct td_thr_tls_get_addr test.
9434 * configure: Regenerated.
9435
89be2091
DJ
94362006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
9437
9438 * linux-low.c (linux_wait_for_event): Reformat. Use the
9439 pass_signals array.
9440 * remote-utils.c (decode_address_to_semicolon): New.
9441 * server.c (pass_signals, handle_general_set): New.
9442 (handle_query): Mention QPassSignals for qSupported.
9443 (main): Call handle_general_set.
9444 * server.h (pass_signals, decode_address_to_semicolon): New.
9445
000ef4f0
DJ
94462006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
9447
9448 * server.c (handle_query): Correct error handling for read_auxv.
9449
b7149293
UW
94502005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
9451
9452 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
9453 and srv_linux_thread_db to yes.
9454 * linux-s390-low.c (s390_fill_gregset): New function.
9455 (target_regsets): Define data structure.
9456
dae5f5cf
DJ
94572006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
9458
9459 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
9460 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
9461 * config.in, configure: Regenerated.
9462 * inferiors.c (gdb_id_to_thread): New function.
9463 (gdb_id_to_thread_id): Use it.
9464 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
9465 * linux-low.h (struct process_info): Add th member.
9466 (thread_db_get_tls_address): New prototype.
9467 * remote-utils.c (decode_address): Make non-static.
9468 * server.c (handle_query): Handle qGetTLSAddr.
9469 * server.h (gdb_id_to_thread, decode_address): New prototypes.
9470 * target.h (struct target_ops): Add get_tls_address.
9471 * thread-db.c (maybe_attach_thread): Save the thread handle.
9472 (thread_db_get_tls_address): New.
9473
32ca6d61
DJ
94742006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
9475
9476 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
9477 (linux_resume_one_process): Take a siginfo_t *. Update all
9478 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
9479 (struct pending_signals): Add a siginfo_t.
9480 (linux_wait_for_process): Always set last_status.
9481 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
9482 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
9483 * linux-low.h (struct process_info): Add last_status.
9484
5ffff7c1
DJ
94852006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
9486
9487 * remote-utils.c (try_rle): New function.
9488 (putpkt_binary): Use it.
9489
8695c747
DJ
94902006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
9491
9492 * Makefile.in (clean): Clean reg-x86-64-linux.c.
9493 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
9494 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
9495 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
9496 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
9497 point registers.
9498
290fadea
RS
94992006-08-08 Richard Sandiford <richard@codesourcery.com>
9500
9501 * server.c (terminal_fd): New variable.
9502 (old_foreground_pgrp): Likewise.
9503 (restore_old_foreground_pgrp): New function.
9504 (start_inferior): Record the terminal file descriptor in terminal_fd
9505 and its original foreground group in old_foreground_pgrp. Register
9506 restore_old_foreground_pgrp with atexit().
9507
9f2e1e63
DJ
95082006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
9509
9510 * server.c (handle_query): Correct qPart to qXfer.
9511
b80864fb
DJ
95122006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
9513
9514 * configure.ac: Check for more headers which are missing on
9515 Windows. Automatically supply -lwsock32 and USE_WIN32API.
9516 * configure.srv: Add Cygwin and mingw32.
9517 * remote-utils.c: Don't include headers unconditionally which
9518 are missing on mingw32. Include <winsock.h> for mingw32.
9519 (remote_open): Adjust for mingw32 support. Flush
9520 standard error after writing to it.
9521 (remote_close, putpkt_binary, input_interrupt, block_async_io)
9522 (unblock_async_io, enable_async_io, disable_async_io)
9523 (readchar, getpkt): Update for Winsock support.
9524 (prepare_resume_reply): Expect a protocol signal number.
9525 * server.c: Disable <sys/wait.h> on mingw32.
9526 (start_inferior): Adjust for mingw32 support. Flush
9527 standard error after writing to it.
9528 (attach_inferior): Likewise. Use protocol signal
9529 numbers.
9530 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
9531 and names.
9532 * win32-i386-low.c: New file.
9533 * Makefile.in (XM_CLIBS): Set.
9534 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
9535 (win32-i386-low.o): New dependency rule.
9536 * linux-low.c (linux_wait): Use target signal numbers.
9537 * target.h (struct target_ops): Doc fix.
9538 * server.h (target_signal_to_name): New prototype.
9539 * gdbreplay.c: Don't include headers unconditionally which
9540 are missing on mingw32. Include <winsock.h> for mingw32.
9541 (remote_close, remote_open): Adjust for Winsock support.
9542 * configure, config.in: Regenerated.
9543
0876f84a
DJ
95442006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
9545
9546 * server.c (decode_xfer_read, write_qxfer_response): New.
9547 (handle_query): Take a packet length argument. Handle
9548 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
9549 the qSupported response.
9550 (main): Update call to handle_query.
9551
01f9e8fa
DJ
95522006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
9553
9554 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
9555 (putpkt_binary): Renamed from putpkt and adjusted for binary
9556 data.
9557 (putpkt): New wrapper for putpkt_binary.
9558 (readchar): Don't mask off the high bit.
9559 (decode_X_packet): New function.
9560 * server.c (main): Call putpkt_binary if a handler sets the packet
9561 length. Save the length of the incoming packet. Handle 'X'.
9562 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
9563
be2a5f71
DJ
95642006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
9565
9566 * server.c (handle_query): Handle qSupported.
9567
ea025f5f
DJ
95682006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
9569
9570 * remote-utils.c (all_symbols_looked_up): New variable.
9571 (look_up_one_symbol): Check it.
9572 * server.h (look_up_one_symbol): New declaration.
9573 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
9574
9308fc88
DJ
95752006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
9576
9577 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 9578 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
9579 (PTRACE_GET_THREAD_AREA): Define.
9580 (ps_get_thread_area): New function.
9581
52fb6437
NS
95822006-05-09 Nathan Sidwell <nathan@codesourcery.com>
9583
9584 * configure.srv (m68k*-*-uclinux*): New target.
9585 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
9586 (linux_resume_one_process): Remove extraneous cast.
9587 (linux_read_offsets): New.
9588 (linux_target_op): Add linux_read_offsets on mmuless systems.
9589 * server.c (handle_query): Add qOffsets logic.
9590 * target.h (struct target_ops): Add read_offsets.
9591
21b0f40c
DJ
95922006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
9593
9594 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
9595 (PTRACE_GET_THREAD_AREA): Define.
9596 (ps_get_thread_area): New function.
9597 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
9598 (linux-x86-64-low.o): Update.
9599
0050a760
DJ
96002006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
9601
9602 * configure.ac: Remove checks for prfpregset_t.
9603 * gdb_proc_service.h: New file.
9604 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
9605 new "gdb_proc_service.h".
9606 * proc-service.c: Likewise.
9607 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
9608 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
9609 * Makefile.in (gdb_proc_service_h): Updated.
9610 * configure, config.in: Regenerated.
9611
b92a518e
DJ
96122006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
9613
9614 * remote-utils.c (prepare_resume_reply): Move declaration
9615 of gdb_id_from_wait to the top of the block.
9616
545587ee
DJ
96172006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
9618
9619 * linux-low.c (regsets_store_inferior_registers): Read the regset
9620 from the target before filling it.
9621
9db87ebd
DJ
96222006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
9623
9624 * server.c (attach_inferior): Return SIGTRAP for a successful
9625 attach.
9626
dd24457d
DJ
96272006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
9628
9629 * Makefile.in (OBS): Add version.o.
9630 (STAGESTUFF): Delete.
9631 (version.o): Add dependencies.
9632 (version.c): Replace rule.
9633 (clean): Remove version.c.
9634 * server.c (gdbserver_version): New.
9635 (gdbserver_usage): Use printf.
9636 (main): Handle --version and --help.
9637 * server.h (version, host_name): Add declarations.
9638
6f0f660e
EZ
96392005-12-23 Eli Zaretskii <eliz@gnu.org>
9640
889bf7c5
PA
9641 * linux-arm-low.c:
9642 * linux-arm-low.c:
9643 * inferiors.c:
9644 * i387-fp.h:
9645 * i387-fp.c:
9646 * gdbreplay.c:
9647 * regcache.c:
9648 * proc-service.c:
9649 * mem-break.h:
9650 * mem-break.c:
9651 * linux-x86-64-low.c:
9652 * linux-sh-low.c:
9653 * linux-s390-low.c:
9654 * linux-ppc64-low.c:
9655 * linux-ppc-low.c:
9656 * linux-mips-low.c:
9657 * linux-m68k-low.c:
9658 * linux-m32r-low.c:
9659 * linux-low.h:
9660 * linux-low.c:
9661 * linux-ia64-low.c:
9662 * linux-i386-low.c:
9663 * linux-crisv32-low.c:
9664 * thread-db.c:
9665 * terminal.h:
9666 * target.h:
9667 * target.c:
9668 * server.h:
9669 * server.c:
9670 * remote-utils.c:
9671 * regcache.h:
9672 * utils.c:
9673 * Makefile.in:
9674 * configure.ac:
6f0f660e
EZ
9675 * gdbserver.1: Add (C) after Copyright. Update the FSF
9676 address.
9677
9d1fb177
DJ
96782005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
9679
9680 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
9681 (arm_breakpoint_at): Recognize both breakpoints.
9682 (the_low_target): Use the correct breakpoint instruction.
9683
011a70c2
DJ
96842005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
9685
9686 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
9687 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
9688 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
9689 (the_low_target): Update.
9690
7fb85e41
AS
96912005-10-25 Andreas Schwab <schwab@suse.de>
9692
9693 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
9694
9695 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
9696 (ia64_num_regs): Reduce to 462.
9697
3db0444b
DJ
96982005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
9699
9700 * acinclude.m4: Correct quoting.
9701 * aclocal.m4: Regenerated.
9702
9703 Suggested by SZOKOVACS Robert <szo@ies.hu>:
9704 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
9705 (thread_db_init): Call thread_db_err_str.
9706 * configure.ac: Check for TD_VERSION.
9707 * config.in, configure: Regenerated.
9708
bee0189a
DJ
97092005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9710
9711 * server.h (error, fatal, warning): Add ATTR_FORMAT.
9712
e9d25b98
DJ
97132005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
9714
9715 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
9716 is not available. Define HAVE_PTRACE_GETREGS if it is.
9717 * config.in, configure: Regenerated.
9718 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
9719 * linux-i386-low.c, linux-m68k-low.c: Update to use
9720 HAVE_PTRACE_GETREGS.
9721 * linux-low.c (regsets_fetch_inferior_registers)
9722 (regsets_store_inferior_registers): Only return 0 if we processed
9723 GENERAL_REGS.
9724 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
9725 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
9726
a06660f7
DJ
97272005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
9728
9729 * inferiors.c (struct thread_info): Add gdb_id.
9730 (add_thread): Add gdb_id argument.
9731 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
9732 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
9733 calls to add_thread.
9734 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
9735 * server.c (handle_query): Use thread_to_gdb_id.
9736 (handle_v_cont, main): Use gdb_id_to_thread_id.
9737 * server.h (add_thread): Update prototype.
9738 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
9739 prototypes.
9740
5a1f5858
DJ
97412005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
9742
9743 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
9744 left-padded registers.
9745 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
9746 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
9747
e122f1f5
SE
97482005-07-01 Steve Ellcey <sje@cup.hp.com>
9749
9750 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
9751 * configure: Regenerate.
9752 * config.in: Regenerate.
9753 * server.h (NEED_DECLARATION_STRERROR):
9754 Replace with !HAVE_DECL_STRERROR.
9755
d592fa2f
DJ
97562005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
9757
9758 * linux-low.c (linux_wait, linux_send_signal): Don't test
9759 an unsigned long variable for > 0 if it could be MAX_ULONG.
9760 * server.c (myresume): Likewise.
9761 * target.c (set_desired_inferior): Likewise.
9762
ccbd4912
MK
97632005-06-13 Mark Kettenis <kettenis@gnu.org>
9764
9765 * configure.ac: Simplify and improve check for socklen_t.
9766 * configure, config.in: Regenerate.
9767
f450004a
DJ
97682005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
9769
9770 * acconfig.h: Remove.
9771 * configure.ac: Add a test for socklen_t. Use three-argument
9772 AC_DEFINE throughout.
9773 * config.in: Regenerated using autoheader 2.59.
9774 * configure: Regenerated.
9775
9776 * gdbreplay.c (socklen_t): Provide a default.
9777 (remote_open): Use socklen_t.
9778 * remote-utils.c (socklen_t): Provide a default.
9779 (remote_open): Use socklen_t.
9780 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
9781 unsigned char.
9782
9783 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
9784 char for buffers.
9785 * linux-low.c (linux_read_memory, linux_write_memory)
9786 (linux_read_auxv): Likewise.
9787 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
9788 (check_mem_write): Likewise.
9789 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
9790 Likewise.
9791 * regcache.c (struct inferior_rgcache_data, registers_to_string)
9792 (registers_from_string, register_data): Likewise.
9793 * server.c (handle_query, main): Likewise.
9794 * server.h (convert_ascii_to_int, convert_int_to_ascii)
9795 (decode_M_packet): Likewise.
9796 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
9797 * target.h (struct target_ops): Update read_memory, write_memory,
9798 and read_auxv.
9799 (read_inferior_memory, write_inferior_memory): Update.
9800 * linux-low.h (struct linux_target_ops): Change type of breakpoint
9801 to unsigned char *.
9802 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
9803 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
9804 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
9805 linux-s390-low.c, linux-sh-low.c: Update for changes in
9806 read_inferior_memory and the_low_target->breakpoint.
9807
eee84df1
DJ
98082005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
9809
9810 * Makefile.in (SFILES): Add linux-ppc64-low.c.
9811 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
9812 * configure.srv: Add powerpc64-*-linux*.
9813 * linux-ppc64-low.c: New file.
9814
45b134e5
OF
98152005-05-23 Orjan Friberg <orjanf@axis.com>
9816
9817 * linux-cris-low.c: New file with support for CRIS.
9818 * linux-crisv32-low.c: Ditto for CRISv32.
9819 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
9820 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 9821 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
9822 reg-crisv32.o, and reg-crisv32.c to make rules.
9823 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
9824 recognized targets.
9825
48d93c75
UW
98262005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
9827
9828 * linux-low.c (fetch_register): Ensure buffer size is a multiple
9829 of sizeof (PTRACE_XFER_TYPE).
9830 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
9831
e013ee27
OF
98322005-05-12 Orjan Friberg <orjanf@axis.com>
9833
889bf7c5 9834 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
9835 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
9836 pointers for hardware watchpoint support.
9837 * linux-low.h (struct linux_target_ops): Ditto.
9838 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
9839 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
9840 to linux_target_ops.
9841 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
9842 reply packet.
9843 * server.c (main): Recognize 'Z' and 'z' packets.
9844
b0ded00b
UW
98452005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
9846
9847 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
9848 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
9849 (the_low_target): Add new members.
9850
8643e2ad
DJ
98512005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
9852
9853 * proc-service.c (ps_lgetregs): Search all_processes instead of
9854 all_threads.
9855
fc620387
DJ
98562005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
9857
9858 * server.c (start_inferior): Change return type to int.
9859 (attach_inferior): Change sigptr to int *.
9860 (handle_v_cont, handle_v_requests): Change signal to int *.
9861 (main): Change signal to int.
9862
98632005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
9864
9865 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
9866 * configure.srv: Add m32r*-*-linux*.
9867 * linux-m32r-low.c: New file.
9868
e0e76420
DJ
98692005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
9870
9871 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
9872
a1928bad
DJ
98732005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
9874
9875 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
9876 Take unsigned long arguments for PIDs.
9877 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
9878 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
9879 (wait_for_sigstop, linux_resume_one_process)
9880 (regsets_fetch_inferior_registers, linux_send_signal)
9881 (linux_read_auxv): Likewise. Update the types of variables holding
9882 PIDs. Update format string specifiers.
9883 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
9884 * remote-utils.c (prepare_resume_reply): Likewise.
9885 * server.c (cont_thread, general_thread, step_thread)
9886 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
9887 unsigned long.
9888 (handle_query): Update format specifiers.
9889 (handle_v_cont, main): Use strtoul for thread IDs.
9890 * server.h (struct inferior_list_entry): Use unsigned long for ID.
9891 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
9892 (general_thread, step_thread, thread_from_wait)
9893 (old_thread_from_wait): Update.
9894 * target.h (struct thread_resume): Use unsigned long for THREAD.
9895 (struct target_ops): Use unsigned long for arguments to attach and
9896 thread_alive.
9897
dcdb98d2
DJ
98982005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
9899
9900 * acinclude.m4: Include bfd/bfd.m4 directly.
9901 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
9902 <agriffis@toolchain.org>.
9903 * aclocal.m4, configure: Regenerated.
9904
bec39cab
AC
99052005-01-07 Andrew Cagney <cagney@gnu.org>
9906
9907 * configure.ac: Rename configure.in, require autoconf 2.59.
9908 * configure: Re-generate.
9909
434c4c77
DJ
99102004-12-08 Daniel Jacobowitz <dan@debian.org>
9911
9912 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
9913 LIBS when finished.
9914 * aclocal.m4: Regenerated.
9915 * configure: Regenerated.
9916
db1d3e1b
AS
99172004-11-21 Andreas Schwab <schwab@suse.de>
9918
9919 * linux-m68k-low.c (m68k_num_gregs): Define.
9920 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
9921 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
9922 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
9923 (m68k_breakpoint_at): New. Add to the_low_target.
9924
9925 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
9926 srv_linux_thread_db to yes.
9927
43360365
JB
99282004-10-20 Joel Brobecker <brobecker@gnat.com>
9929
9930 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
9931 (ARCH_SET_FS): Likewise.
9932 (ARCH_GET_FS): Likewise.
9933 (ARCH_GET_GS): Likewise.
9934
fd500816
DJ
99352004-10-16 Daniel Jacobowitz <dan@debian.org>
9936
9937 * linux-i386-low.c (ps_get_thread_area): New.
9938 * linux-x86-64-low.c (ps_get_thread_area): New.
9939 * linux-low.c: Include <sys/syscall.h>.
9940 (linux_kill_one_process): Don't kill the first thread here.
9941 (linux_kill): Kill the first thread here.
9942 (kill_lwp): New function.
9943 (send_sigstop, linux_send_signal): Use it.
9944 * proc-service.c: Clean up #ifdefs.
9945 (fpregset_info): Delete.
9946 (ps_lgetregs): Update and enable implementation.
9947 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
9948 implementations.
9949 * remote-utils.c (struct sym_cache, symbol_cache): New.
9950 (input_interrupt): Print a clearer message.
9951 (async_io_enabled): New variable.
9952 (enable_async_io, disable_async_io): Use it. Update comments.
9953 (look_up_one_symbol): Use the symbol cache.
9954 * thread-db.c (thread_db_look_up_symbols): New function.
9955 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
9956
f6de3c42
DJ
99572004-10-16 Daniel Jacobowitz <dan@debian.org>
9958
9959 * configure.in: Test for -rdynamic.
9960 * configure: Regenerated.
9961 * Makefile (INTERNAL_LDFLAGS): New.
9962 (gdbserver, gdbreplay): Use it.
9963
2c0fc042
AC
99642004-09-02 Andrew Cagney <cagney@gnu.org>
9965
9966 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
9967
075b3282
DJ
99682004-03-23 Daniel Jacobowitz <drow@mvista.com>
9969
9970 * linux-low.c (linux_wait): Clear all_processes list also.
9971
fa6a77dc
DJ
99722004-03-12 Daniel Jacobowitz <drow@mvista.com>
9973
9974 * linux-low.c: Include <errno.h>. Remove extern declaration of
9975 errno.
9976
6d782a97
DJ
99772004-03-12 Daniel Jacobowitz <drow@mvista.com>
9978
9979 * gdbreplay.c, server.h, utils.c: Update copyright years.
9980
3a7fb99b
DJ
99812004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
9982
9983 * server.c (main): Print child status or termination signal from
9984 variable 'signal', not 'sig'.
9985
c3e735a6
DJ
99862004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
9987
9988 * linux-low.c (linux_read_memory): Change return type to
9989 int. Check for and return error from ptrace().
9990 * target.c (read_inferior_memory): Change return type to int. Pass
9991 back return status from the_target->read_memory().
9992 * target.h (struct target_ops): Adapt *read_memory() prototype.
9993 Update comment.
9994 (read_inferior_memory): Adapt prototype.
9995 * server.c (main): Return an error packet if
9996 read_inferior_memory() returns an error.
9997
a59d1c82
DJ
99982004-03-04 Daniel Jacobowitz <drow@mvista.com>
9999
10000 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
10001 Unify with other clean targets.
10002
dc3f8883
DJ
100032004-02-29 Daniel Jacobowitz <drow@mvista.com>
10004
10005 * server.c (handle_v_cont): Call set_desired_inferior.
10006
89a208da
DJ
100072004-02-29 Daniel Jacobowitz <drow@mvista.com>
10008
10009 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
10010
62ea82f5
DJ
100112004-02-29 Daniel Jacobowitz <drow@mvista.com>
10012
10013 * linux-low.c (linux_wait): Unblock async I/O.
10014 (linux_resume): Block and enable async I/O.
10015 * remote-utils.c (block_async_io, unblock_async_io): New functions.
10016 * server.h (block_async_io, unblock_async_io): Add prototypes.
10017
6910d122
DJ
100182004-02-29 Daniel Jacobowitz <drow@mvista.com>
10019
10020 * remote-utils.c (remote_open): Print a status notice after
10021 opening a TCP port.
10022 * server.c (attach_inferior): Print a status notice after
10023 attaching.
10024
100252004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
10026
10027 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
10028
c89dc5d4
DJ
100292004-02-26 Daniel Jacobowitz <drow@mvista.com>
10030
10031 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
10032 error packet.
10033 * server.c, target.h: Update copyright years.
10034
4b8dad4a
RM
100352004-02-25 Roland McGrath <roland@redhat.com>
10036
10037 * target.h (struct target_ops): New member `read_auxv'.
10038 * server.c (handle_query): Handle qPart:auxv:read: query using that.
10039 * linux-low.c (linux_read_auxv): New function.
10040 (linux_target_ops): Initialize `read_auxv' member to that.
10041
d7446758
JB
100422004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
10043
10044 Committed by Jim Blandy <jimb@redhat.com>.
10045
10046 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 10047 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
10048 instead of GPR_SIZE to distiguish s390 and s390x targets.
10049
5544ad89
DJ
100502004-01-31 Daniel Jacobowitz <drow@mvista.com>
10051
10052 * linux-low.c: Update copyright year.
10053 (check_removed_breakpoint): Clear pending_is_breakpoint.
10054 (linux_set_resume_request, linux_queue_one_thread)
10055 (resume_status_pending_p): New functions.
10056 (linux_continue_one_thread): Use process->resume.
10057 (linux_resume): Only resume threads if there are no pending events.
10058 * linux-low.h (struct process_info): Add resume request
10059 pointer.
10060
2a68b70e
DJ
100612004-01-30 Daniel Jacobowitz <drow@mvista.com>
10062
10063 * regcache.c (new_register_cache): Clear the allocated register
10064 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
10065
64386c31
DJ
100662003-10-13 Daniel Jacobowitz <drow@mvista.com>
10067
10068 * linux-low.c (linux_resume): Take a struct thread_resume *
10069 argument.
10070 (linux_wait): Update call.
10071 (resume_ptr): New static variable.
10072 (linux_continue_one_thread): Renamed from
10073 linux_continue_one_process. Use resume_ptr.
10074 (linux_resume): Use linux_continue_one_thread.
10075 * server.c (handle_v_cont, handle_v_requests): New functions.
10076 (myresume): New function.
10077 (main): Handle 'v' case.
10078 * target.h (struct thread_resume): New type.
10079 (struct target_ops): Change argument of "resume" to struct
10080 thread_resume *.
10081 (myresume): Delete macro.
10082
c938e9b0
L
100832003-08-08 H.J. Lu <hongjiu.lu@intel.com>
10084
10085 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
10086 (uninstall): Support DESTDIR.
10087
7f313d07
BC
10088Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
10089
10090 * configure.srv: Add xscale*linux copy of arm*linux entry.
10091
3b2fc2ea
DJ
100922003-07-24 Daniel Jacobowitz <drow@mvista.com>
10093
10094 * linux-arm-low.c (arm_reinsert_addr): New function.
10095 (the_low_target): Add arm_reinsert_addr.
10096
1c0a559e
MK
100972003-07-08 Mark Kettenis <kettenis@gnu.org>
10098
10099 * mem-break.c: Remove whitespace at end of file.
10100
43d5792c
DJ
101012003-06-28 Daniel Jacobowitz <drow@mvista.com>
10102
10103 * configure.in: Check whether we need to prototype strerror.
10104 * server.h: Optionally prototype strerror.
10105 * gdbreplay.c (perror_with_name): Use strerror.
10106 * linux-low.c (linux_attach_lwp): Use strerror.
10107 * utils.c (perror_with_name): Use strerror.
10108 * config.in, configure: Regenerated.
10109
c8a86edf
DJ
101102003-06-28 Daniel Jacobowitz <drow@mvista.com>
10111
10112 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
10113 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
10114
73d37363
DJ
101152003-06-20 Daniel Jacobowitz <drow@mvista.com>
10116
10117 * Makefile.in (SFILES): Update.
10118 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
10119 low-sun3.c: Remove files.
10120
6ad8ae5c
DJ
101212003-06-17 Daniel Jacobowitz <drow@mvista.com>
10122
10123 * linux-low.c: Move comment to linux_thread_alive where it belonged.
10124 (linux_detach_one_process, linux_detach): New functions.
10125 (linux_target_ops): Add linux_detach.
10126 * server.c (main): Handle 'D' packet.
10127 * target.h (struct target_ops): Add "detach" member.
10128 (detach_inferior): Define.
10129
1581182a
MK
101302003-06-13 Mark Kettenis <kettenis@gnu.org>
10131
10132 From Kelley Cook <kelleycook@wideopenwest.com>:
10133 * configure.srv: Accept i[34567]86 variants.
10134
e5379b03
DJ
101352003-06-05 Daniel Jacobowitz <drow@mvista.com>
10136
10137 * linux-low.c (linux_wait_for_event): Correct comment typos.
10138 (linux_resume_one_process): Call check_removed_breakpoint.
10139 (linux_send_signal): New function.
10140 (linux_target_ops): Add linux_send_signal.
10141 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
10142 of kill.
10143 * target.h (struct target_ops): Add send_signal.
10144
2ff29de4
JB
101452003-05-29 Jim Blandy <jimb@redhat.com>
10146
10147 * linux-low.c (usr_store_inferior_registers): Transfer buf in
10148 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
10149 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
10150 away part of the register's value.
10151
254787d4
DJ
101522003-03-26 Daniel Jacobowitz <drow@mvista.com>
10153
10154 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
10155 (linux_wait_for_event, linux_init_signals): Likewise.
10156
94e10508
DJ
101572003-03-17 Daniel Jacobowitz <drow@mvista.com>
10158
10159 * configure.in: Check for stdlib.h.
10160 * configure: Regenerated.
10161 * config.in: Regenerated.
10162
4c0711e0
DJ
101632003-01-04 Andreas Schwab <schwab@suse.de>
10164
10165 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
10166
ef66e766
AC
101672003-01-02 Andrew Cagney <ac131313@redhat.com>
10168
10169 * Makefile.in: Remove obsolete code.
10170
a1358604
DJ
101712002-11-20 Daniel Jacobowitz <drow@mvista.com>
10172
10173 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
10174 defined(PT_FPR0_HI).
10175
23ce3b1c
DJ
101762002-11-17 Stuart Hughes <seh@zee2.com>
10177
10178 * linux-arm-low.c (arm_num_regs): Increase.
10179 (arm_regmap): Include status register.
10180
101812002-11-17 Daniel Jacobowitz <drow@mvista.com>
10182
10183 * linux-low.c (register_addr): Remove incorrect -1 check.
10184
a9fa9f7d
DJ
101852002-08-29 Daniel Jacobowitz <drow@mvista.com>
10186
10187 * linux-low.c (linux_create_inferior): Call setpgid. Return
10188 the new PID.
10189 (unstopped_p, linux_signal_pid): Remove.
10190 (linux_target_ops): Remove linux_signal_pid.
10191 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
10192 global instead of target method.
10193 * target.h (struct target_ops): Remove signal_pid. Update comment
10194 for create_inferior.
10195 * server.c (signal_pid): New variable.
10196 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 10197 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
10198 (attach_inferior): Set signal_pid.
10199
17574093
DJ
102002002-08-23 Daniel Jacobowitz <drow@mvista.com>
10201
10202 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
10203
102042002-08-20 Jim Blandy <jimb@redhat.com>
10205
10206 * Makefile.in (LDFLAGS): Allow the configure script to establish a
10207 default for this.
10208
102092002-08-01 Andrew Cagney <cagney@redhat.com>
10210
10211 * Makefile.in: Make chill references obsolete.
10212
102132002-07-24 Kevin Buettner <kevinb@redhat.com>
10214
10215 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
10216 * configure: Regenerate.
10217 * config.in: Regenerate.
10218
102192002-07-09 David O'Brien <obrien@FreeBSD.org>
10220
10221 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
10222 (perror_with_name, remote_close, remote_open, expect, play): Static.
10223
102242002-07-04 Michal Ludvig <mludvig@suse.cz>
10225
4b8dad4a 10226 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
10227 byte offsets instead of an array of indexes.
10228 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
10229
102302002-06-13 Daniel Jacobowitz <drow@mvista.com>
10231
10232 * regcache.c: Add comment.
10233
102342002-06-11 Daniel Jacobowitz <drow@mvista.com>
10235
10236 * thread-db.c: New file.
10237 * proc-service.c: New file.
10238 * acinclude.m4: New file.
10239 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
10240 proc-service.o, and thread-db.o.
10241 (linux-low.o): Add USE_THREAD_DB.
10242 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
10243 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
10244 * aclocal.m4: Regenerated.
10245 * config.in: Regenerated.
10246 * configure: Regenerated.
10247 * configure.in: Check for proc_service.h, sys/procfs.h,
10248 thread_db.h, and linux/elf.h headrs.
10249 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
10250 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
10251 Check for -lthread_db and thread support.
10252 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
10253 PowerPC, and SuperH.
10254 * i387-fp.c: Constify arguments.
10255 * i387-fp.h: Likewise.
10256 * inferiors.c: (struct thread_info): Renamed from
10257 `struct inferior_info'. Remove PID member. Use generic inferior
10258 list header. All uses updated.
10259 (inferiors, signal_pid): Removed.
10260 (all_threads): New variable.
10261 (get_thread): Define.
10262 (add_inferior_to_list): New function.
10263 (for_each_inferior): New function.
10264 (change_inferior_id): New function.
10265 (add_inferior): Removed.
10266 (remove_inferior): New function.
10267 (add_thread): New function.
10268 (free_one_thread): New function.
10269 (remove_thread): New function.
10270 (clear_inferiors): Use for_each_inferior and free_one_thread.
10271 (find_inferior): New function.
10272 (find_inferior_id): New function.
10273 (inferior_target_data): Update argument type.
10274 (set_inferior_target_data): Likewise.
10275 (inferior_regcache_data): Likewise.
10276 (set_inferior_regcache_data): Likewise.
10277 * linux-low.c (linux_bp_reinsert): Remove.
10278 (all_processes, stopping_threads, using_thrads)
10279 (struct pending_signals, debug_threads, pid_of): New.
10280 (inferior_pid): Replace with macro.
10281 (struct inferior_linux_data): Remove.
10282 (get_stop_pc, add_process): New functions.
10283 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
10284 Use add_process and add_thread.
10285 (linux_attach_lwp): New function, based on old linux_attach. Use
10286 add_process and add_thread. Set stop_expected for new threads.
10287 (linux_attach): New function.
10288 (linux_kill_one_process): New function.
10289 (linux_kill): Kill all LWPs.
10290 (linux_thread_alive): Use find_inferior_id.
10291 (check_removed_breakpoints, status_pending_p): New functions.
10292 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
10293 Update. Use WNOHANG. Wait for cloned processes also. Update process
10294 struct for the found process.
10295 (linux_wait_for_event): New function.
10296 (linux_wait): Use it. Support LWPs.
10297 (send_sigstop, wait_for_sigstop, stop_all_processes)
10298 (linux_resume_one_process, linux_continue_one_process): New functions.
10299 (linux_resume): Support LWPs.
10300 (REGISTER_RAW_SIZE): Remove.
10301 (fetch_register): Use register_size instead. Call supply_register.
10302 (usr_store_inferior_registers): Likewise. Call collect_register.
10303 Fix recursive case.
10304 (regsets_fetch_inferior_registers): Improve error message.
10305 (regsets_store_inferior_registers): Add debugging.
10306 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
10307 (unstopped_p, linux_signal_pid): New functions.
10308 (linux_target_ops): Add linux_signal_pid.
10309 (linux_init_signals): New function.
10310 (initialize_low): Call it. Initialize using_threads.
10311 * regcache.c (inferior_regcache_data): Add valid
10312 flag.
10313 (get_regcache): Fetch registers lazily. Add fetch argument
10314 and update all callers.
10315 (regcache_invalidate_one, regcache_invalidate): New
10316 functions.
10317 (new_register_cache): Renamed from create_register_cache.
10318 Return the new regcache.
10319 (free_register_cache): Change argument to a void *.
10320 (registers_to_string, registers_from_string): Call get_regcache
10321 with fetch flag set.
10322 (register_data): Make static. Pass fetch flag to get_regcache.
10323 (supply_register): Call get_regcache with fetch flag clear.
10324 (collect_register): Call get_regcache with fetch flag set.
10325 (collect_register_as_string): New function.
10326 * regcache.h: Update.
10327 * remote-utils.c (putpkt): Flush after debug output and use
10328 stderr.
10329 Handle input interrupts while waiting for an ACK.
10330 (input_interrupt): Use signal_pid method.
10331 (getpkt): Flush after debug output and use stderr.
10332 (outreg): Use collect_register_as_string.
10333 (new_thread_notify, dead_thread_notify): New functions.
10334 (prepare_resume_reply): Check using_threads. Set thread_from_wait
10335 and general_thread.
10336 (look_up_one_symbol): Flush after debug output.
10337 * server.c (step_thread, server_waiting): New variables.
10338 (start_inferior): Don't use signal_pid. Update call to mywait.
10339 (attach_inferior): Update call to mywait.
10340 (handle_query): Handle qfThreadInfo and qsThreadInfo.
10341 (main): Don't fetch/store registers explicitly. Use
10342 set_desired_inferior. Support proposed ``Hs'' packet. Update
10343 calls to mywait.
10344 * server.h: Update.
10345 (struct inferior_list, struct_inferior_list_entry): New.
10346 * target.c (set_desired_inferior): New.
10347 (write_inferior_memory): Constify.
10348 (mywait): New function.
10349 * target.h: Update.
10350 (struct target_ops): New signal_pid method.
10351 (mywait): Removed macro, added prototype.
10352
10353 * linux-low.h (regset_func): Removed.
10354 (regset_fill_func, regset_store_func): New.
10355 (enum regset_type): New.
10356 (struct regset_info): Add type field. Use new operation types.
10357 (struct linux_target_ops): stop_pc renamed to get_pc.
10358 Add decr_pc_after_break and breakpoint_at.
10359 (get_process, get_thread_proess, get_process_thread)
10360 (strut process_info, all_processes, linux_attach_lwp)
10361 (thread_db_init): New.
10362
10363 * linux-arm-low.c (arm_get_pc, arm_set_pc,
10364 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
10365 (the_low_target): Add new members.
10366 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
10367 (i386_store_fpxregset): Constify.
10368 (target_regsets): Add new kind identifier.
10369 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
10370 (i386_set_pc): Add debugging.
10371 (i386_breakpoint_at): New function.
10372 (the_low_target): Add new members.
10373 * linux-mips-low.c (mips_get_pc, mips_set_pc)
10374 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
10375 (mips_breakpoint_at): New.
10376 (the_low_target): Add new members.
10377 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
10378 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
10379 (the_low_target): Add new members.
10380 * linux-sh-low.c (sh_get_pc, sh_set_pc)
10381 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
10382 (the_low_target): Add new members.
10383 * linux-x86-64-low.c (target_regsets): Add new kind
10384 identifier.
10385
103862002-05-15 Daniel Jacobowitz <drow@mvista.com>
10387
10388 From Martin Pool <mbp@samba.org>:
10389 * server.c (gdbserver_usage): New function.
10390 (main): Call it.
10391
103922002-05-14 Daniel Jacobowitz <drow@mvista.com>
10393
10394 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
10395 stop_at -> stop_pc.
10396
103972002-05-04 Andrew Cagney <ac131313@redhat.com>
10398
10399 * Makefile.in: Remove obsolete code.
10400
104012002-04-24 Michal Ludvig <mludvig@suse.cz>
10402
10403 * linux-low.c (regsets_fetch_inferior_registers),
10404 (regsets_store_inferior_registers): Removed cast to int from
10405 ptrace() calls.
10406 * regcache.h: Added declaration of struct inferior_info.
10407
104082002-04-20 Daniel Jacobowitz <drow@mvista.com>
10409
10410 * inferiors.c (struct inferior_info): Add regcache_data.
10411 (add_inferior): Call create_register_cache.
10412 (clear_inferiors): Call free_register_cache.
10413 (inferior_regcache_data, set_inferior_regcache_data): New functions.
10414 * regcache.c (struct inferior_regcache_data): New.
10415 (registers): Remove.
10416 (get_regcache): New function.
10417 (create_register_cache, free_register_cache): New functions.
10418 (set_register_cache): Don't initialize the register cache here.
10419 (registers_to_string, registers_from_string, register_data): Call
10420 get_regcache.
10421 * regcache.h: Add prototypes.
10422 * server.h: Likewise.
10423
104242002-04-20 Daniel Jacobowitz <drow@mvista.com>
10425
10426 * mem-break.c: New file.
10427 * mem-break.h: New file.
10428 * Makefile.in: Add mem-break.o rule; update server.h
10429 dependencies.
10430 * inferiors.c (struct inferior_info): Add target_data
10431 member.
10432 (clear_inferiors): Free target_data member if set.
10433 (inferior_target_data, set_inferior_target_data): New functions.
10434 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
10435 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
10436 * linux-low.c (linux_bp_reinsert): New variable.
10437 (struct inferior_linux_data): New.
10438 (linux_create_inferior): Use set_inferior_target_data.
10439 (linux_attach): Likewise. Call add_inferior.
10440 (linux_wait_for_one_inferior): New function.
10441 (linux_wait): Call it.
10442 (linux_write_memory): Add const.
10443 (initialize_low): Call set_breakpoint_data.
10444 * linux-low.h (struct linux_target_ops): Add breakpoint
10445 handling members.
10446 * server.c (attach_inferior): Remove extra add_inferior
10447 call.
10448 * server.h: Include mem-break.h. Update inferior.c
10449 prototypes.
10450 * target.c (read_inferior_memory)
10451 (write_inferior_memory): New functions.
10452 * target.h (read_inferior_memory)
10453 (write_inferior_memory): Change macros to prototypes.
10454 (struct target_ops): Update comments. Add const to write_memory
10455 definition.
10456
104572002-04-11 Daniel Jacobowitz <drow@mvista.com>
10458
10459 * linux-low.c (usr_store_inferior_registers): Support
10460 registers which are allowed to fail to store.
10461 * linux-low.h (linux_target_ops): Likewise.
10462 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
10463 (ppc_cannot_store_register): FPSCR may not be storable.
10464
104652002-04-09 Daniel Jacobowitz <drow@mvista.com>
10466
10467 * server.h: Include <string.h> if HAVE_STRING_H.
10468 * ChangeLog: Correct paths in last ChangeLog entry.
10469
104702002-04-09 Daniel Jacobowitz <drow@mvista.com>
10471
10472 * linux-low.h: Remove obsolete prototypes.
10473 (struct linux_target_ops): New.
10474 (extern the_low_target): New.
10475 * linux-low.c (num_regs, regmap): Remove declarations.
10476 (register_addr): Use the_low_target explicitly.
10477 (fetch_register): Likewise.
10478 (usr_fetch_inferior_registers): Likewise.
10479 (usr_store_inferior_registers): Likewise.
10480 * linux-arm-low.c (num_regs): Remove.
10481 (arm_num_regs): Define.
10482 (arm_regmap): Renamed from regmap, made static.
10483 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
10484 made static.
10485 (arm_cannot_store_register): Renamed from cannot_store_register,
10486 made static.
10487 (the_low_target): New.
10488 * linux-i386-low.c (num_regs): Remove.
10489 (i386_num_regs): Define.
10490 (i386_regmap): Renamed from regmap, made static.
10491 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
10492 made static.
10493 (i386_cannot_store_register): Renamed from cannot_store_register,
10494 made static.
10495 (the_low_target): New.
10496 * linux-ia64-low.c (num_regs): Remove.
10497 (ia64_num_regs): Define.
10498 (ia64_regmap): Renamed from regmap, made static.
10499 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
10500 made static.
10501 (ia64_cannot_store_register): Renamed from cannot_store_register,
10502 made static.
10503 (the_low_target): New.
10504 * linux-m68k-low.c (num_regs): Remove.
10505 (m68k_num_regs): Define.
10506 (m68k_regmap): Renamed from regmap, made static.
10507 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
10508 made static.
10509 (m68k_cannot_store_register): Renamed from cannot_store_register,
10510 made static.
10511 (the_low_target): New.
10512 * linux-mips-low.c (num_regs): Remove.
10513 (mips_num_regs): Define.
10514 (mips_regmap): Renamed from regmap, made static.
10515 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
10516 made static.
10517 (mips_cannot_store_register): Renamed from cannot_store_register,
10518 made static.
10519 (the_low_target): New.
10520 * linux-ppc-low.c (num_regs): Remove.
10521 (ppc_num_regs): Define.
10522 (ppc_regmap): Renamed from regmap, made static.
10523 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
10524 made static.
10525 (ppc_cannot_store_register): Renamed from cannot_store_register,
10526 made static.
10527 (the_low_target): New.
10528 * linux-s390-low.c (num_regs): Remove.
10529 (s390_num_regs): Define.
10530 (s390_regmap): Renamed from regmap, made static.
10531 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
10532 made static.
10533 (s390_cannot_store_register): Renamed from cannot_store_register,
10534 made static.
10535 (the_low_target): New.
10536 * linux-sh-low.c (num_regs): Remove.
10537 (sh_num_regs): Define.
10538 (sh_regmap): Renamed from regmap, made static.
10539 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
10540 made static.
10541 (sh_cannot_store_register): Renamed from cannot_store_register,
10542 made static.
10543 (the_low_target): New.
10544 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
10545 (the_low_target): New.
10546
105472002-04-09 Daniel Jacobowitz <drow@mvista.com>
10548
10549 * Makefile.in: Add stamp-h target.
10550 * configure.in: Create stamp-h.
10551 * configure: Regenerated.
10552
105532002-04-09 Daniel Jacobowitz <drow@mvista.com>
10554
10555 * inferiors.c: New file.
10556 * target.c: New file.
10557 * target.h: New file.
10558 * Makefile.in: Add target.o and inferiors.o. Update
10559 dependencies.
10560 * linux-low.c (inferior_pid): New static variable,
10561 moved from server.c.
10562 (linux_create_inferior): Renamed from create_inferior.
10563 Call add_inferior. Return 0 on success instead of a PID.
10564 (linux_attach): Renamed from myattach.
10565 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
10566 (linux_thread_alive): Renamed from mythread_alive.
10567 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
10568 child dies.
10569 (linux_resume): Renamed from myresume. Add missing ``return 0''.
10570 (regsets_store_inferior_registers): Correct error message.
10571 Add missing ``return 0''.
10572 (linux_fetch_registers): Renamed from fetch_inferior_registers.
10573 (linux_store_registers): Renamed from store_inferior_registers.
10574 (linux_read_memory): Renamed from read_inferior_memory.
10575 (linux_write_memory): Renamed from write_inferior_memory.
10576 (linux_target_ops): New structure.
10577 (initialize_low): Call set_target_ops ().
10578 * remote-utils.c (unhexify): New function.
10579 (hexify): New function.
10580 (input_interrupt): Send signals to ``signal_pid''.
10581 * server.c (inferior_pid): Remove.
10582 (start_inferior): Update create_inferior call.
10583 (attach_inferior): Call add_inferior.
10584 (handle_query): New function.
10585 (main): Call handle_query for `q' packets.
10586 * server.h: Include "target.h". Remove obsolete prototypes.
10587 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
10588
105892002-04-09 Daniel Jacobowitz <drow@mvista.com>
10590
10591 * Makefile.in: Add WARN_CFLAGS. Update configury
10592 dependencies.
10593 * configure.in: Check for <string.h>
10594 * configure: Regenerate.
10595 * config.in: Regenerate.
10596 * gdbreplay.c: Include needed system headers.
10597 (remote_open): Remove strchr prototype.
10598 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
10599 * regcache.c (supply_register): Change buf argument to const void *.
10600 (supply_register_by_name): Likewise.
10601 (collect_register): Change buf argument to void *.
10602 (collect_register_by_name): Likewise.
10603 * regcache.h: Add missing prototypes.
10604 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
10605 * server.c (handle_query): New function.
10606 (attached): New static variable, moved out of main.
10607 (main): Quiet longjmp clobber warnings.
10608 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
10609 * utils.c (error): Remove NORETURN.
10610 (fatal): Likewise.
This page took 1.430507 seconds and 4 git commands to generate.