Fix non executable stack handling when calling functions in the inferior.
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
c9587f88
AT
12015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
2
3 PR breakpoints/16812
4 * linux-low.c (wstatus_maybe_breakpoint): Remove.
5 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
6 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
7
b05ec7a5
AT
82015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
9
10 PR breakpoints/15956
11 * tracepoint.c (cmd_qtinit): Add check for current_thread.
12
d33501a5
MM
132015-02-09 Markus Metzger <markus.t.metzger@intel.com>
14
15 * linux-low.c (linux_low_btrace_conf): Print size.
16 * server.c (handle_btrace_conf_general_set): New.
17 (hanle_general_set): Call handle_btrace_conf_general_set.
18 (handle_query): Report Qbtrace-conf:bts:size as supported.
19
f4abbc16
MM
202015-02-09 Markus Metzger <markus.t.metzger@intel.com>
21
22 * linux-low.c (linux_low_enable_btrace): Update parameters.
23 (linux_low_btrace_conf): New.
24 (linux_target_ops)<to_btrace_conf>: Initialize.
25 * server.c (current_btrace_conf): New.
26 (handle_btrace_enable): Rename to ...
27 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
28 to target_enable_btrace. Update comment. Update users.
29 (handle_qxfer_btrace_conf): New.
30 (qxfer_packets): Add btrace-conf entry.
31 (handle_query): Report qXfer:btrace-conf:read as supported packet.
32 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
33 (target_ops)<read_btrace_conf>: New.
34 (target_enable_btrace): Update parameters.
35 (target_read_btrace_conf): New.
36
043c3577
MM
372015-02-09 Markus Metzger <markus.t.metzger@intel.com>
38
39 * server.c (handle_btrace_general_set): Remove call to
40 target_supports_btrace.
41 (supported_btrace_packets): New.
42 (handle_query): Call supported_btrace_packets.
43 * target.h: include btrace-common.h.
44 (btrace_target_info): Removed.
45 (supports_btrace, target_supports_btrace): Update parameters.
46
734b0e4b
MM
472015-02-09 Markus Metzger <markus.t.metzger@intel.com>
48
49 * Makefile.in (SFILES): Add common/btrace-common.c.
50 (OBS): Add common/btrace-common.o.
51 (btrace-common.o): Add build rules.
52 * linux-low: Include btrace-common.h.
53 (linux_low_read_btrace): Use struct btrace_data. Call
54 btrace_data_init and btrace_data_fini.
55
d6c146e9
PA
562015-02-06 Pedro Alves <palves@redhat.com>
57
58 * thread-db.c (find_new_threads_callback): Add debug output.
59
20ba1ce6
PA
602015-02-04 Pedro Alves <palves@redhat.com>
61
62 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
63 (resume_stopped_resumed_lwps): New function.
64 (linux_wait_for_event_filtered): Use it.
65
8cc73a39
SDJ
662015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
67
68 * Makefile.in (SFILES): Add linux-personality.c.
69 (linux-personality.o): New rule.
70 * configure.srv (srv_linux_obj): Add linux-personality.o to the
71 list of objects to be built.
72 * linux-low.c: Include nat/linux-personality.h.
73 (linux_create_inferior): Remove code to disable address space
74 randomization (moved to ../nat/linux-personality.c). Create
75 cleanup to disable address space randomization.
76
fb23d554
SDJ
772015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
78
79 * Makefile.in (posix-strerror.o): New rule.
80 (mingw-strerror.o): Likewise.
81 * configure: Regenerated.
82 * configure.ac: Source file ../common/common.host. Initialize new
83 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
84
cdf43629
YQ
852015-01-14 Yao Qi <yao@codesourcery.com>
86
87 * Makefile.in (SFILES): Add nat/ppc-linux.c.
88 (ppc-linux.o): New rule.
89 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
90 * configure.ac: AC_CHECK_FUNCS(getauxval).
91 * config.in: Re-generated.
92 * configure: Re-generated.
93 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
94 ppc64_64bit_inferior_p
95
514c5338
YQ
962015-01-14 Yao Qi <yao@codesourcery.com>
97
98 * linux-ppc-low.c: Include "nat/ppc-linux.h".
99 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
100 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
101 (PT_ORIG_R3, PT_TRAP): Likewise.
102 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
103 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
104 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
105
3368c1e5
JB
1062015-01-10 Joel Brobecker <brobecker@adacore.com>
107
108 * i387-fp.c (i387_cache_to_xsave): In look over
109 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
110 zmmh_low_space field by use of zmmh_high_space.
111
582511be
PA
1122015-01-09 Pedro Alves <palves@redhat.com>
113
114 * linux-low.c (step_over_bkpt): Move higher up in the file.
115 (handle_extended_wait): Don't store the stop_pc here.
116 (get_stop_pc): Adjust comments and rename to ...
117 (check_stopped_by_breakpoint): ... this. Record whether the LWP
118 stopped for a software breakpoint or hardware breakpoint.
119 (thread_still_has_status_pending_p): New function.
120 (status_pending_p_callback): Use
121 thread_still_has_status_pending_p. If the event is no longer
122 interesting, resume the LWP.
123 (handle_tracepoints): Add assert.
124 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
125 (wstatus_maybe_breakpoint): New function.
126 (cancel_breakpoint): Delete function.
127 (check_stopped_by_watchpoint): New function, factored out from
128 linux_low_filter_event.
129 (lp_status_maybe_breakpoint): Delete function.
130 (linux_low_filter_event): Remove filter_ptid argument.
131 Leave thread group exits pending here. Store the LWP's stop PC.
132 Always leave events pending.
133 (linux_wait_for_event_filtered): Pull all events out of the
134 kernel, and leave them all pending.
135 (count_events_callback, select_event_lwp_callback): Consider all
136 events.
137 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
138 (select_event_lwp): Only give preference to the stepping LWP in
139 all-stop mode. Adjust comments.
140 (ignore_event): New function.
141 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
142 references to cancel_breakpoints. Adjust to renames. Also give
143 equal priority to all LWPs that have had events in non-stop mode.
144 If reporting a software breakpoint event, unadjust the LWP's PC.
145 (linux_wait): If linux_wait_1 returned an ignored event, retry.
146 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
147 Adjust.
148 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
149 (resume_status_pending_p): Use thread_still_has_status_pending_p.
150 (linux_stopped_by_watchpoint): Adjust.
151 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
152 * linux-low.h (enum lwp_stop_reason): New.
153 (struct lwp_info) <stop_pc>: Adjust comment.
154 <stopped_by_watchpoint>: Delete field.
155 <stop_reason>: New field.
156 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
157 * mem-break.c (software_breakpoint_inserted_here)
158 (hardware_breakpoint_inserted_here): New function.
159 * mem-break.h (software_breakpoint_inserted_here)
160 (hardware_breakpoint_inserted_here): Declare.
161 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
162 (cancel_breakpoints): Delete.
163 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
164 (upload_fast_traceframes): Remove references to
165 cancel_breakpoints.
166
a33e3959
PA
1672015-01-09 Pedro Alves <palves@redhat.com>
168
169 * thread-db.c (find_new_threads_callback): Ignore thread if the
170 kernel thread ID is -1.
171
8784d563
PA
1722015-01-09 Pedro Alves <palves@redhat.com>
173
174 * linux-low.c (linux_attach_fail_reason_string): Move to
175 nat/linux-ptrace.c, and rename.
176 (linux_attach_lwp): Update comment.
177 (attach_proc_task_lwp_callback): New function.
178 (linux_attach): Adjust to rename and use
179 linux_proc_attach_tgid_threads.
180 (linux_attach_fail_reason_string): Delete declaration.
181
76f2b779
JB
1822015-01-01 Joel Brobecker <brobecker@adacore.com>
183
184 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
185 * server.c (gdbserver_version): Likewise.
186
fafcc06a
SDJ
1872014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
188
189 * remote-utils.c: Include ctype.h.
190 (input_interrupt): Explicitly handle the case when the char
191 received is the NUL byte. Improve the printing of non-ASCII
192 characters.
193
beed38b8
JB
1942014-12-16 Joel Brobecker <brobecker@adacore.com>
195
196 * linux-low.c (linux_low_filter_event): Update call to
197 linux_enable_event_reporting following the addition of
198 a new parameter to that function.
199
bf330350
CU
2002014-12-16 Catalin Udma <catalin.udma@freescale.com>
201
202 PR server/17457
203 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
204 (AARCH64_FPCR_REGNO): Likewise.
205 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
206 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
207 (aarch64_store_fpregset): Likewise.
208
5227d625
JB
2092014-12-15 Joel Brobecker <brobecker@adacore.com>
210
211 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
212 Remove FIXME comment about assumption about N.
213
f93b65a0
JB
2142014-12-13 Joel Brobecker <brobecker@adacore.com>
215
216 * configure.ac: If large-file support is disabled in GDBserver,
217 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
218 * configure: Regenerate.
219
e5a9158d
AA
2202014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
221
222 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
223 warning upon ENODATA from ptrace.
224 * linux-s390-low.c (s390_store_tdb): New.
225 (s390_regsets): Add regset for NT_S390_TDB.
226
feea5f36
AA
2272014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
228
229 * linux-low.c (regsets_store_inferior_registers): Skip regsets
230 without a fill_function.
231 * linux-s390-low.c (s390_fill_last_break): Remove.
232 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
233 (s390_arch_setup): Use regset's size instead of fill_function for
234 loop end condition.
235
098dbe61
AA
2362014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
237
238 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
239 the regset's store function when ptrace returned an error.
240 * regcache.c (get_thread_regcache): Invalidate register cache
241 before fetching inferior's registers.
242
28eef672
AA
2432014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
244
245 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
246 while-loop as for-loop.
247 (regsets_store_inferior_registers): Likewise.
248
bdca27a2
YQ
2492014-11-28 Yao Qi <yao@codesourcery.com>
250
251 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
252 * config.in, configure: Re-generate.
253 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
254 is defined.
255
9c232dda
YQ
2562014-11-21 Yao Qi <yao@codesourcery.com>
257
258 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
259 (AC_CHECK_HEADERS): Remove malloc.h.
260 * configure: Re-generated.
261 * config.in: Re-generated.
262 * server.h: Don't include alloca.h and malloc.h.
263 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
264 Don't include malloc.h.
265
43968415
JB
2662014-11-17 Joel Brobecker <brobecker@adacore.com>
267
268 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
269 corresponding ERRNO check in same block.
270
40e91bc7
PA
2712014-11-12 Pedro Alves <palves@redhat.com>
272
273 * server.c (cont_thread): Update comment.
274 (start_inferior, attach_inferior): No longer clear cont_thread.
275 (handle_v_cont): No longer set cont_thread.
276 (captured_main): Clear cont_thread each time a GDB connects.
277
c2c118cf
PA
2782014-11-12 Pedro Alves <palves@redhat.com>
279
280 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
281 thread, and don't resume all threads if the Hc thread has exited.
282
78708b7c
PA
2832014-11-12 Pedro Alves <palves@redhat.com>
284
285 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
286 the process group instead of to a specific LWP.
287
a2abc7de
PA
2882014-10-15 Pedro Alves <palves@redhat.com>
289
290 PR server/17487
291 * win32-arm-low.c (arm_set_thread_context): Remove current_event
292 parameter.
293 (arm_set_thread_context): Delete.
294 (the_low_target): Adjust.
295 * win32-i386-low.c (debug_registers_changed)
296 (debug_registers_used): Delete.
297 (update_debug_registers_callback): New function.
298 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
299 needing to update their debug registers.
300 (win32_get_current_dr): New function.
301 (x86_dr_low_get_addr, x86_dr_low_get_control)
302 (x86_dr_low_get_status): Fetch the debug register from the thread
303 record's context.
304 (i386_initial_stuff): Adjust.
305 (i386_get_thread_context): Remove current_event parameter. Don't
306 clear debug_registers_changed nor copy DR values to
307 debug_reg_state.
308 (i386_set_thread_context): Delete.
309 (i386_prepare_to_resume): New function.
310 (i386_thread_added): Mark the thread as needing to update irs
311 debug registers.
312 (the_low_target): Remove i386_set_thread_context and install
313 i386_prepare_to_resume.
314 * win32-low.c (win32_get_thread_context): Adjust.
315 (win32_set_thread_context): Use SetThreadContext
316 directly.
317 (win32_prepare_to_resume): New function.
318 (win32_require_context): New function, factored out from ...
319 (thread_rec): ... this.
320 (continue_one_thread): Call win32_prepare_to_resume on each thread
321 we're about to continue.
322 (win32_resume): Call win32_prepare_to_resume on the event thread.
323 * win32-low.h (struct win32_thread_info)
324 <debug_registers_changed>: New field.
325 (struct win32_target_ops): Change prototype of set_thread_context,
326 delete set_thread_context and add prepare_to_resume.
327 (win32_require_context): New declaration.
328
a442d071
GB
3292014-10-08 Gary Benson <gbenson@redhat.com>
330
331 * server.h: Do not include common-exceptions.h.
332
6f1947e8
GB
3332014-10-08 Gary Benson <gbenson@redhat.com>
334
335 * server.h: Do not include cleanups.h.
336
63b434a4
JH
3372014-09-30 James Hogan <james.hogan@imgtec.com>
338
339 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
340 mips64-dsp-linux.c.
341
c4d9ceb6
YQ
3422014-09-23 Yao Qi <yao@codesourcery.com>
343
344 * linux-low.c (lp_status_maybe_breakpoint): New function.
345 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
346 (count_events_callback): Likewise.
347 (select_event_lwp_callback): Likewise.
348 (cancel_breakpoints_callback): Likewise.
349
89a5711c
DB
3502014-09-19 Don Breazeal <donb@codesourcery.com>
351
352 * linux-low.c (handle_extended_wait): Call
353 linux_ptrace_get_extended_event.
354 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
355 linux_is_extended_waitstatus.
356
bffc0964
JB
3572014-09-16 Joel Brobecker <brobecker@adacore.com>
358
359 * Makefile.in (CPPFLAGS): Define.
360 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
361 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
362
0bfdf32f
GB
3632014-09-16 Gary Benson <gbenson@redhat.com>
364
365 * inferiors.h (current_inferior): Renamed as...
366 (current_thread): New variable. All uses updated.
367 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
368 (maybe_move_out_of_jump_pad): Likewise.
369 (cancel_breakpoint): Likewise.
370 (linux_low_filter_event): Likewise.
371 (wait_for_sigstop): Likewise.
372 (linux_resume_one_lwp): Likewise.
373 (need_step_over_p): Likewise.
374 (start_step_over): Likewise.
375 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
376 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
377 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
378 and save_inferior as saved_thread.
379 * regcache.c (get_thread_regcache): Renamed saved_inferior as
380 saved_thread.
381 (regcache_invalidate_thread): Likewise.
382 * remote-utils.c (prepare_resume_reply): Likewise.
383 * thread-db.c (thread_db_get_tls_address): Likewise.
384 (disable_thread_event_reporting): Likewise.
385 (remove_thread_event_breakpoints): Likewise.
386 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
387 as saved_thread.
388 * target.h (set_desired_inferior): Renamed as...
389 (set_desired_thread): New declaration. All uses updated.
390 * server.c (myresume): Updated comment to reference thread instead
391 of inferior.
392 (handle_serial_event): Likewise.
393 (handle_target_event): Likewise.
394
361c8ade
GB
3952014-09-12 Tom Tromey <tromey@redhat.com>
396 Gary Benson <gbenson@redhat.com>
397
398 * regcache.h: Include common-regcache.h.
399 (regcache_read_pc): Don't declare.
400 * regcache.c (get_thread_regcache_for_ptid): New function.
401
bd9269f7
GB
4022014-09-11 Tom Tromey <tromey@redhat.com>
403 Gary Benson <gbenson@redhat.com>
404
405 * symbol.c: New file.
406 * Makefile.in (SFILES): Add symbol.c.
407 (OBS): Add symbol.o.
408
f8c1d06b
GB
4092014-09-11 Gary Benson <gbenson@redhat.com>
410
411 * target.c (target_stop_ptid, target_continue_ptid): New
412 functions.
413
721ec300
GB
4142014-09-11 Tom Tromey <tromey@redhat.com>
415 Gary Benson <gbenson@redhat.com>
416
417 * target.h: Include target/target.h.
418 * target.c (target_read_memory, target_read_uint32)
419 (target_write_memory): New functions.
420
c5e92cca
GB
4212014-09-11 Gary Benson <gbenson@redhat.com>
422
423 * server.h (debug_hw_points): Don't declare.
424 * server.c (debug_hw_points): Don't define. Replace all uses
425 with show_debug_regs.
426 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
427 all uses with show_debug_regs.
428
2e4bb98a
EBM
4292014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
430
431 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
432 endianness into account.
433 (ppc_supply_ptrace_register): Likewise.
434
ac740bc7
JH
4352014-09-03 James Hogan <james.hogan@imgtec.com>
436
437 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
438 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
439
97ea6506
GB
4402014-09-03 Gary Benson <gbenson@redhat.com>
441
442 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
443 ALL_DEBUG_ADDRESS_REGISTERS.
444
df7e5265
GB
4452014-09-02 Gary Benson <gbenson@redhat.com>
446
447 * i386-low.h: Renamed as...
448 * x86-low.h: New file. All type, function and variable name
449 prefixes changed from "i386_" to "x86_". All references updated.
450 * i386-low.c: Renamed as...
451 * x86-low.c: New file. All type, function and variable name
452 prefixes changed from "i386_" to "x86_". All references updated.
453
ed859da7
GB
4542014-09-02 Gary Benson <gbenson@redhat.com>
455
456 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
457 (x86_linux_new_thread): Likewise.
458
860789c7
GB
4592014-08-29 Gary Benson <gbenson@redhat.com>
460
461 * server.h (setjmp.h): Do not include.
462 (toplevel): Do not declare.
463 (common-exceptions.h): Include.
464 (cleanups.h): Likewise.
465 * server.c (toplevel): Do not define.
466 (exit_code): New static global.
467 (detach_or_kill_for_exit_cleanup): New function.
468 (main): New function. Original main renamed to...
469 (captured_main): New function.
470 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
471
ff55e1b5
GB
4722014-08-29 Gary Benson <gbenson@redhat.com>
473
474 * Makefile.in (SFILES): Add common/common-exceptions.c.
475 (OBS): Add common-exceptions.o.
476 (common-exceptions.o): New rule.
477 * utils.c (prepare_to_throw_exception): New function.
478
e9bcb658
GB
4792014-08-29 Gary Benson <gbenson@redhat.com>
480
481 * config.in: Regenerate.
482 * configure: Likewise.
483
e3180625
GB
4842014-08-29 Gary Benson <gbenson@redhat.com>
485
486 * Makefile.in (SFILES): Add common/cleanups.c.
487 (OBS): cleanups.o.
488 (cleanups.o): New rule.
489
e3d6ba5d
GB
4902014-08-29 Gary Benson <gbenson@redhat.com>
491
492 * utils.c (internal_vwarning): New function.
493
7096e886
GB
4942014-08-28 Gary Benson <gbenson@redhat.com>
495
496 * utils.h (fatal): Remove declaration.
497 * utils.c (fatal): Remove function.
498
14ce3192
GB
4992014-08-28 Gary Benson <gbenson@redhat.com>
500
501 * tracepoint.c (gdb_agent_init): Replace fatal with
502 perror_with_name.
503 (initialize_tracepoint): Likewise.
504
50278d59
GB
5052014-08-28 Gary Benson <gbenson@redhat.com>
506
507 * remote-utils.c (remote_prepare): Replace fatal with error.
508
aa96c426
GB
5092014-08-28 Gary Benson <gbenson@redhat.com>
510
511 * linux-low.c (linux_async): Replace fatal with warning.
512 Tidy up and return.
513 (linux_start_non_stop): Return -1 if linux_async failed.
514
f7160e97
GB
5152014-08-28 Gary Benson <gbenson@redhat.com>
516
517 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
518 gdb_assert.
519 (i386_dr_low_get_addr): Remove vague comment.
520 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
521 gdb_assert.
522
38e08fca
GB
5232014-08-28 Gary Benson <gbenson@redhat.com>
524
525 * inferiors.c (get_thread_process): Replace check with gdb_assert.
526 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
527 internal_error.
528 (linux_resume_one_lwp): Likewise.
529 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
530 gdb_assert.
531 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
532 with internal_error.
533 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
534 (init_register_cache): Replace fatal with gdb_assert_not_reached.
535 (find_register_by_name): Replace fatal with internal_error.
536 (find_regno): Likewise.
537 * tdesc.c (init_target_desc): Replace check with gdb_assert.
538 * thread-db.c (thread_db_create_event): Likewise.
539 (thread_db_load_search): Likewise.
540 (try_thread_db_load_1): Likewise.
541 * tracepoint.c (get_jump_space_head): Replace fatal with
542 internal_error.
543 (claim_trampoline_space): Likewise.
544 (have_fast_tracepoint_trampoline_buffer): Likewise.
545 (cmd_qtstart): Likewise.
546 (stop_tracing): Likewise.
547 (fast_tracepoint_collecting): Likewise.
548 (target_malloc): Likewise.
549 (download_tracepoint): Likewise.
550 (download_trace_state_variables): Replace check with gdb_assert.
551 (upload_fast_traceframes): Replace fatal with internal_error.
552
34abf635
GB
5532014-08-19 Tom Tromey <tromey@redhat.com>
554 Gary Benson <gbenson@redhat.com>
555
556 * Makefile.in (SFILES): Add common/common-debug.c.
557 (OBS): Add common-debug.o.
558 (common-debug.o): New rule.
559 * debug.h (debug_printf): Don't declare.
560 * debug.c (debug_printf): Renamed and rewritten as...
561 (debug_vprintf): New function.
562
f6e94d78
GB
5632014-08-19 Gary Benson <gbenson@redhat.com>
564
565 * utils.h: Do not include print-utils.h.
566
9239eeab
GB
5672014-08-19 Tom Tromey <tromey@redhat.com>
568 Gary Benson <gbenson@redhat.com>
569
570 * server.h: Add static assertion.
571 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
572
ef87c8bb
GB
5732014-08-19 Tom Tromey <tromey@redhat.com>
574 Gary Benson <gbenson@redhat.com>
575
576 * Makefile.in (SFILES): Add common/errors.c.
577 (OBS): Add errors.o.
578 (IPA_OBS): Add errors-ipa.o.
579 (errors.o): New rule.
580 (errors-ipa.o): Likewise.
581 * utils.h (perror_with_name, error, warning): Don't declare.
582 * utils.c (warning): Renamed and rewritten as...
583 (vwarning): New function.
584 (error): Renamed and rewritten as...
585 (verror): New function.
586 (internal_error): Renamed and rewritten as...
587 (internal_verror): New function.
588
bb974a24
GB
5892014-08-07 Gary Benson <gbenson@redhat.com>
590
591 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
592 * configure: Regenerate.
593 * config.in: Likewise.
594 * server.h: Do not include errno.h.
595 * event-loop.c: Likewise.
596 * hostio-errno.c: Likewise.
597 * linux-low.c: Likewise.
598 * remote-utils.c: Likewise.
599 * spu-low.c: Likewise.
600 * utils.c: Likewise.
601 * gdbreplay.c: Unconditionally include errno.h.
602
6d3d12eb
GB
6032014-08-07 Gary Benson <gbenson@redhat.com>
604
605 * server.h: Do not include string.h.
606 * event-loop.c: Likewise.
607 * linux-low.c: Likewise.
608 * regcache.c: Likewise.
609 * remote-utils.c: Likewise.
610 * spu-low.c: Likewise.
611 * utils.c: Likewise.
612
dccbb609
GB
6132014-08-07 Gary Benson <gbenson@redhat.com>
614
615 * server.h: Do not include gdb_assert.h.
616
e76df0d0
GB
6172014-08-07 Gary Benson <gbenson@redhat.com>
618
619 * server.h: Do not include common-utils.h.
620
4cb9c816
GB
6212014-08-07 Gary Benson <gbenson@redhat.com>
622
623 * server.h: Do not include ptid.h.
624 * notif.h: Likewise.
625
3995eeee
GB
6262014-08-07 Gary Benson <gbenson@redhat.com>
627
628 * server.h: Do not include gdb_locale.h.
629
cb9f1a9b
GB
6302014-08-07 Gary Benson <gbenson@redhat.com>
631
632 * server.h: Do not include gdb/signals.h.
633 * win32-low.c: Likewise.
634
a5fceff8
GB
6352014-08-07 Gary Benson <gbenson@redhat.com>
636
637 * server.h: Do not include pathmax.h.
638
b9391142
GB
6392014-08-07 Gary Benson <gbenson@redhat.com>
640
641 * server.h: Do not include libiberty.h.
642 * linux-bfin-low.c: Likewise.
643
0e443c87
GB
6442014-08-07 Gary Benson <gbenson@redhat.com>
645
646 * server.h: Do not include ansidecl.h.
647
8ebb3f56
GB
6482014-08-07 Gary Benson <gbenson@redhat.com>
649
650 * linux-x86-low.c: Do not include stddef.h.
651 * lynx-ppc-low.c: Likewise.
652 * tracepoint.c: Likewise.
653
8980bdf6
GB
6542014-08-07 Gary Benson <gbenson@redhat.com>
655
656 * server.h: Do not include stdarg.h.
657 * nto-low.c: Likewise.
658
d7096f71
GB
6592014-08-07 Gary Benson <gbenson@redhat.com>
660
661 * server.h: Do not include stdlib.h.
662 * inferiors.c: Likewise.
663 * linux-low.c: Likewise.
664 * regcache.c: Likewise.
665 * spu-low.c: Likewise.
666 * tracepoint.c: Likewise.
667 * utils.c: Likewise.
668
d02f550d
GB
6692014-08-07 Gary Benson <gbenson@redhat.com>
670
671 * server.h: Do not include stdio.h.
672 * linux-low.c: Likewise.
673 * remote-utils.c: Likewise.
674 * spu-low.c: Likewise.
675 * utils.c: Likewise.
676 * wincecompat.c: Likewise.
677
87f6c4e3
GB
6782014-08-06 Gary Benson <gbenson@redhat.com>
679
680 * regcache.c (init_register_cache): Move conditionals inside if.
681
7089dca4
GB
6822014-08-06 Gary Benson <gbenson@redhat.com>
683
684 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
685
462f517e
GB
6862014-07-31 Gary Benson <gbenson@redhat.com>
687
688 * ax.h: Do not include server.h.
689 * gdbthread.h: Likewise.
690 * lynx-low.h: Likewise.
691 * notif.h: Likewise.
692
976411d6
GB
6932014-07-30 Gary Benson <gbenson@redhat.com>
694
695 * server.h: Include common-defs.h.
696 Do not include config.h or build-gnulib-gdbserver/config.h.
697
d41f6d8e
GB
6982014-07-30 Gary Benson <gbenson@redhat.com>
699
700 * hostio-errno.c: Move server.h to top of includes list.
701 * inferiors.c: Likewise.
702 * linux-x86-low.c: Likewise.
703 * notif.c: Include server.h.
704
314c6a35
TT
7052014-07-24 Tom Tromey <tromey@redhat.com>
706 Gary Benson <gbenson@redhat.com>
707
708 * server.h (CORE_ADDR): Now unsigned.
709
69ff6be5
PA
7102014-07-16 Pedro Alves <palves@redhat.com>
711
712 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
713
ce9e3fe7
PA
7142014-07-15 Pedro Alves <palves@redhat.com>
715
716 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
717 copy.
718
e76126e8
PA
7192014-07-11 Pedro Alves <palves@redhat.com>
720
721 * linux-low.c (kill_wait_lwp): New function, based on
722 kill_one_lwp_callback, but use my_waitpid directly.
723 (kill_one_lwp_callback, linux_kill): Use it.
724
8e9db26e
PA
7252014-06-23 Pedro Alves <palves@redhat.com>
726
727 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
728 before setting DR0..DR3.
729
698b3e08
GB
7302014-06-20 Gary Benson <gbenson@redhat.com>
731
732 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
733 * configure: Regenerated.
734 * config.in: Likewise.
735
125f8a3d
GB
7362014-06-20 Gary Benson <gbenson@redhat.com>
737
738 * Makefile.in (SFILES): Update locations for files moved
739 from common to nat.
740 (object file files): Reordered.
741
42995dbd
GB
7422014-06-20 Gary Benson <gbenson@redhat.com>
743
744 * i386-low.h (i386_dr_low_can_set_addr): Removed.
745 (i386_dr_low_set_addr): Likewise.
746 (i386_dr_low_get_addr): Likewise.
747 (i386_dr_low_can_set_control): Likewise.
748 (i386_dr_low_set_control): Likewise.
749 (i386_dr_low_get_control): Likewise.
750 (i386_dr_low_get_status): Likewise.
751 (i386_get_debug_register_length): Likewise.
752 * linux-x86-low.c (i386_dr_low_set_addr):
753 Changed signature. Made static.
754 (i386_dr_low_get_addr): Likewise.
755 (i386_dr_low_set_control): Likewise.
756 (i386_dr_low_get_control): Likewise.
757 (i386_dr_low_get_status): Likewise.
758 (i386_dr_low): New global variable.
759 * win32-i386-low.c (i386_dr_low_set_addr):
760 Changed signature. Made static.
761 (i386_dr_low_get_addr): Likewise.
762 (i386_dr_low_set_control): Likewise.
763 (i386_dr_low_get_control): Likewise.
764 (i386_dr_low_get_status): Likewise.
765 (i386_dr_low): New global variable.
766
e1d2394b
MS
7672014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
768
769 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
770 * Makefile.in (AR, AR_FLAGS): Define.
771 * configure: Regenerate.
772
3a8ee006
GB
7732014-06-19 Gary Benson <gbenson@redhat.com>
774
775 * Makefile.in (i386-dregs.o): New rule.
776 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
777 * i386-low.c (target.h): Remove include.
778 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
779 (DR_CONTROL_SHIFT): Likewise.
780 (DR_CONTROL_SIZE): Likewise.
781 (DR_RW_EXECUTE): Likewise.
782 (DR_RW_WRITE): Likewise.
783 (DR_RW_READ): Likewise.
784 (DR_RW_IORW): Likewise.
785 (DR_LEN_1): Likewise.
786 (DR_LEN_2): Likewise.
787 (DR_LEN_4): Likewise.
788 (DR_LEN_8): Likewise.
789 (DR_LOCAL_ENABLE_SHIFT): Likewise.
790 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
791 (DR_ENABLE_SIZE): Likewise.
792 (DR_LOCAL_SLOWDOWN): Likewise.
793 (DR_GLOBAL_SLOWDOWN): Likewise.
794 (DR_CONTROL_RESERVED): Likewise.
795 (I386_DR_CONTROL_MASK): Likewise.
796 (I386_DR_VACANT): Likewise.
797 (I386_DR_LOCAL_ENABLE): Likewise.
798 (I386_DR_GLOBAL_ENABLE): Likewise.
799 (I386_DR_DISABLE): Likewise.
800 (I386_DR_SET_RW_LEN): Likewise.
801 (I386_DR_GET_RW_LEN): Likewise.
802 (I386_DR_WATCH_HIT): Likewise.
803 (i386_wp_op_t): Likewise.
804 (i386_show_dr): Likewise.
805 (i386_length_and_rw_bits): Likewise.
806 (i386_insert_aligned_watchpoint): Likewise.
807 (i386_remove_aligned_watchpoint): Likewise.
808 (i386_handle_nonaligned_watchpoint): Likewise.
809 i386_update_inferior_debug_regs(): Likewise.
810 (i386_dr_insert_watchpoint): Likewise.
811 (i386_dr_remove_watchpoint): Likewise.
812 (i386_dr_region_ok_for_watchpoint): Likewise.
813 (i386_dr_stopped_data_address): Likewise.
814 (i386_dr_stopped_by_watchpoint): Likewise.
815
8f26655c
GB
8162014-06-19 Gary Benson <gbenson@redhat.com>
817
818 * i386-low.c (i386_dr_show): Renamed to
819 i386_show_dr and made static. All uses updated.
820 (i386_dr_length_and_rw_bits): Renamed to
821 i386_length_and_rw_bits and made static.
822 All uses updated.
823 (i386_dr_insert_aligned_watchpoint): Renamed to
824 i386_insert_aligned_watchpoint and made static.
825 All uses updated.
826 (i386_dr_remove_aligned_watchpoint): Renamed to
827 i386_remove_aligned_watchpoint and made static.
828 All uses updated.
829 (i386_dr_update_inferior_debug_regs): Renamed to
830 i386_update_inferior_debug_regs and made static.
831 All uses updated.
832
b9228891
GB
8332014-06-18 Gary Benson <gbenson@redhat.com>
834
5171def3
GB
835 * i386-low.h (i386_dr_low_can_set_addr): New macro.
836 (i386_dr_low_can_set_control): Likewise.
837 (i386_get_debug_register_length): Likewise.
838 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
839 (i386_dr_low_can_set_control): Likewise.
840 (i386_get_debug_register_length): Likewise.
841
8422014-06-17 Gary Benson <gbenson@redhat.com>
843
b9228891
GB
844 * i386-low.h (i386-dregs.h): New include.
845 (DR_FIRSTADDR): Now in i386-dregs.h.
846 (DR_LASTADDR): Likewise.
847 (DR_NADDR): Likewise.
848 (DR_STATUS): Likewise.
849 (DR_CONTROL): Likewise.
850 (i386_debug_reg_state): Likewise.
851 (i386_dr_insert_watchpoint): Likewise.
852 (i386_dr_remove_watchpoint): Likewise.
853 (i386_dr_region_ok_for_watchpoint): Likewise.
854 (i386_dr_stopped_data_address): Likewise.
855 (i386_dr_stopped_by_watchpoint): Likewise.
856 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
857
4be83cc2
GB
8582014-06-18 Gary Benson <gbenson@redhat.com>
859
860 * i386-low.h (i386_low_insert_watchpoint): Renamed to
861 i386_dr_insert_watchpoint.
862 (i386_low_remove_watchpoint): Renamed to
863 i386_dr_remove_watchpoint.
864 (i386_low_region_ok_for_watchpoint): Renamed to
865 i386_dr_region_ok_for_watchpoint.
866 (i386_low_stopped_data_address): Renamed to
867 i386_dr_stopped_data_address.
868 (i386_low_stopped_by_watchpoint): Renamed to
869 i386_dr_stopped_by_watchpoint.
870 * i386-low.c (i386_show_dr): Renamed to
871 i386_dr_show and made nonstatic. All uses updated.
872 (i386_length_and_rw_bits): Renamed to
873 i386_dr_length_and_rw_bits and made nonstatic.
874 All uses updated.
875 (i386_insert_aligned_watchpoint): Renamed to
876 i386_dr_insert_aligned_watchpoint and made nonstatic.
877 All uses updated.
878 (i386_remove_aligned_watchpoint): Renamed to
879 i386_dr_remove_aligned_watchpoint and made nonstatic.
880 All uses updated.
881 (i386_update_inferior_debug_regs): Renamed to
882 i386_dr_update_inferior_debug_regs and made nonstatic.
883 All uses updated.
884 (i386_low_insert_watchpoint): Renamed to
885 i386_dr_insert_watchpoint. All uses updated.
886 (i386_low_remove_watchpoint): Renamed to
887 i386_dr_remove_watchpoint. All uses updated.
888 (i386_low_region_ok_for_watchpoint): Renamed to
889 i386_dr_region_ok_for_watchpoint. All uses updated.
890 (i386_low_stopped_data_address): Renamed to
891 i386_dr_stopped_data_address. All uses updated.
892 (i386_low_stopped_by_watchpoint): Renamed to
893 i386_dr_stopped_by_watchpoint. All uses updated.
894
131aa0d4
GB
8952014-06-18 Gary Benson <gbenson@redhat.com>
896
897 * i386-low.c (i386_dr_low_can_set_addr): New macro.
898 (i386_dr_low_can_set_control): Likewise.
899 (i386_insert_aligned_watchpoint): New check.
900
d9305f7f
GB
9012014-06-18 Gary Benson <gbenson@redhat.com>
902
903 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
904 Renamed to state.
905
e927c9fc
GB
9062014-06-18 Gary Benson <gbenson@redhat.com>
907
908 * i386-low.c (i386_length_and_rw_bits): Use internal_error
909 instead of fatal and error.
910 (i386_handle_nonaligned_watchpoint): Likewise.
911
1b6d4134
GB
9122014-06-18 Gary Benson <gbenson@redhat.com>
913
914 * i386-low.c (i386_get_debug_register_length): New macro.
915 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
916 (i386_show_dr): Use debug_printf instead of fprintf. Use
917 phex to format values.
918
6e62758f
GB
9192014-06-18 Gary Benson <gbenson@redhat.com>
920
921 * i386-low.h: Comment changes.
922 * i386-low.c: Likewise.
923
fc6e2f03
GB
9242014-06-18 Gary Benson <gbenson@redhat.com>
925
926 * i386-low.c: Whitespace changes.
927
f9d1eeed
TT
9282014-06-12 Tom Tromey <tromey@redhat.com>
929
930 * utils.c (freeargv): Remove.
931
0b04e523
TT
9322014-06-12 Tom Tromey <tromey@redhat.com>
933
934 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
935 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
936 (parse_debug_format_options): Likewise.
937 (gdbserver_usage): Likewise.
938 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
939 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
940 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
941 against libiberty.
942 ($(LIBGNU)): Depend on libiberty.
943 (all-lib): Recurse into all subdirs.
944 (install-only): Invoke "install" target in subdirs.
945 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
946 targets.
947 * configure: Rebuild.
948 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
949 for vasprintf, vsnprintf, or gettimeofday.
950 * configure.srv: Don't add safe-ctype.o or lbasename.o to
951 srv_tgtobj.
952
270c9937
JB
9532014-06-05 Joel Brobecker <brobecker@adacore.com>
954
955 * development.sh: Delete.
956 * Makefile.in (config.status): Adjust dependency on development.sh.
957 * configure.ac: Adjust development.sh source call.
958 * configure: Regenerate.
959
0a261ed8
PA
9602014-06-02 Pedro Alves <palves@redhat.com>
961
962 * ax.c (gdb_free_agent_expr): New function.
963 * ax.h (gdb_free_agent_expr): New declaration.
964 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
965 list.
966 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
967 static.
968 (clear_breakpoint_conditions_and_commands): New function.
969 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
970 (clear_breakpoint_conditions_and_commands): New declaration.
971
e9dae05e
RR
9722014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
973
974 * linux-aarch64-low.c (asm/ptrace.h): Include.
975
5876f503
JK
9762014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
977
978 Fix TLS access for -static -pthread.
979 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
980 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
981 (thread_db_load_search, try_thread_db_load_1): Initialize it.
982
802e8e6d
PA
9832014-05-20 Pedro Alves <palves@redhat.com>
984
985 * linux-aarch64-low.c (aarch64_insert_point)
986 (aarch64_remove_point): No longer check whether the type is
987 supported here. Adjust to new interface.
988 (the_low_target): Install aarch64_supports_z_point_type as
989 supports_z_point_type method.
990 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
991 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
992 instead of a Z packet char. Adjust.
993 (arm_supports_z_point_type): New function.
994 (arm_insert_point, arm_remove_point): Adjust to new interface.
995 (the_low_target): Install arm_supports_z_point_type.
996 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
997 (cris_insert_point, cris_remove_point): Adjust to new interface.
998 Don't check whether the type is supported here.
999 (the_low_target): Install cris_supports_z_point_type.
1000 * linux-low.c (linux_supports_z_point_type): New function.
1001 (linux_insert_point, linux_remove_point): Adjust to new interface.
1002 * linux-low.h (struct linux_target_ops) <insert_point,
1003 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
1004 raw_breakpoint pointer parameter.
1005 <supports_z_point_type>: New method.
1006 * linux-mips-low.c (mips_supports_z_point_type): New function.
1007 (mips_insert_point, mips_remove_point): Adjust to new interface.
1008 Use mips_supports_z_point_type.
1009 (the_low_target): Install mips_supports_z_point_type.
1010 * linux-ppc-low.c (the_low_target): Install NULL as
1011 supports_z_point_type method.
1012 * linux-s390-low.c (the_low_target): Install NULL as
1013 supports_z_point_type method.
1014 * linux-sparc-low.c (the_low_target): Install NULL as
1015 supports_z_point_type method.
1016 * linux-x86-low.c (x86_supports_z_point_type): New function.
1017 (x86_insert_point): Adjust to new insert_point interface. Use
1018 insert_memory_breakpoint. Adjust to new
1019 i386_low_insert_watchpoint interface.
1020 (x86_remove_point): Adjust to remove_point interface. Use
1021 remove_memory_breakpoint. Adjust to new
1022 i386_low_remove_watchpoint interface.
1023 (the_low_target): Install x86_supports_z_point_type.
1024 * lynx-low.c (lynx_target_ops): Install NULL as
1025 supports_z_point_type callback.
1026 * nto-low.c (nto_supports_z_point_type): New.
1027 (nto_insert_point, nto_remove_point): Adjust to new interface.
1028 (nto_target_ops): Install nto_supports_z_point_type.
1029 * mem-break.c: Adjust intro comment.
1030 (struct raw_breakpoint) <raw_type, size>: New fields.
1031 <inserted>: Update comment.
1032 <shlib_disabled>: Delete field.
1033 (enum bkpt_type) <gdb_breakpoint>: Delete value.
1034 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
1035 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
1036 (raw_bkpt_type_to_target_hw_bp_type): New function.
1037 (find_enabled_raw_code_breakpoint_at): New function.
1038 (find_raw_breakpoint_at): New type and size parameters. Use them.
1039 (insert_memory_breakpoint): New function, based off
1040 set_raw_breakpoint_at.
1041 (remove_memory_breakpoint): New function.
1042 (set_raw_breakpoint_at): Reimplement.
1043 (set_breakpoint): New, based on set_breakpoint_at.
1044 (set_breakpoint_at): Reimplement.
1045 (delete_raw_breakpoint): Go through the_target->remove_point
1046 instead of assuming memory breakpoints.
1047 (find_gdb_breakpoint_at): Delete.
1048 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
1049 (find_gdb_breakpoint): New function.
1050 (set_gdb_breakpoint_at): Delete.
1051 (z_type_supported): New function.
1052 (set_gdb_breakpoint_1): New function, loosely based off
1053 set_gdb_breakpoint_at.
1054 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
1055 (delete_gdb_breakpoint_at): Delete.
1056 (delete_gdb_breakpoint_1): New function, loosely based off
1057 delete_gdb_breakpoint_at.
1058 (delete_gdb_breakpoint): New function.
1059 (clear_gdb_breakpoint_conditions): Rename to ...
1060 (clear_breakpoint_conditions): ... this. Don't handle a NULL
1061 breakpoint.
1062 (add_condition_to_breakpoint): Make static.
1063 (add_breakpoint_condition): Take a struct breakpoint pointer
1064 instead of an address. Adjust.
1065 (gdb_condition_true_at_breakpoint): Rename to ...
1066 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
1067 z_type parameter.
1068 (gdb_condition_true_at_breakpoint): Reimplement.
1069 (add_breakpoint_commands): Take a struct breakpoint pointer
1070 instead of an address. Adjust.
1071 (gdb_no_commands_at_breakpoint): Rename to ...
1072 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
1073 parameter. Return true if no breakpoint was found. Change debug
1074 output.
1075 (gdb_no_commands_at_breakpoint): Reimplement.
1076 (run_breakpoint_commands): Rename to ...
1077 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
1078 and change return type to boolean.
1079 (run_breakpoint_commands): New function.
1080 (gdb_breakpoint_here): Also check for Z1 breakpoints.
1081 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
1082 breakpoint. Go through the_target->remove_point instead of
1083 assuming memory breakpoint.
1084 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
1085 software and hardware breakpoints.
1086 (reinsert_raw_breakpoint): Go through the_target->insert_point
1087 instead of assuming memory breakpoint.
1088 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
1089 software and hardware breakpoints.
1090 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
1091 Check both software and hardware breakpoints.
1092 (validate_inserted_breakpoint): Assert the breakpoint is a
1093 software breakpoint. Set the inserted flag to -1 instead of
1094 setting shlib_disabled.
1095 (delete_disabled_breakpoints): Adjust.
1096 (validate_breakpoints): Only validate software breakpoints.
1097 Adjust to inserted flag change.
1098 (check_mem_read, check_mem_write): Skip breakpoint types other
1099 than software breakpoints. Adjust to inserted flag change.
1100 * mem-break.h (enum raw_bkpt_type): New enum.
1101 (raw_breakpoint, struct process_info): Forward declare.
1102 (Z_packet_to_target_hw_bp_type): Delete declaration.
1103 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
1104 (set_gdb_breakpoint, delete_gdb_breakpoint)
1105 (clear_breakpoint_conditions): New declarations.
1106 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
1107 (breakpoint_inserted_here): Update comment.
1108 (add_breakpoint_condition, add_breakpoint_commands): Replace
1109 address parameter with a breakpoint pointer parameter.
1110 (gdb_breakpoint_here): Update comment.
1111 (delete_gdb_breakpoint_at): Delete.
1112 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
1113 * server.c (process_point_options): Take a struct breakpoint
1114 pointer instead of an address. Adjust.
1115 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
1116 delete_gdb_breakpoint.
1117 * spu-low.c (spu_target_ops): Install NULL as
1118 supports_z_point_type method.
1119 * target.h: Include mem-break.h.
1120 (struct target_ops) <prepare_to_access_memory>: Update comment.
1121 <supports_z_point_type>: New field.
1122 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
1123 instead of a char. Also take a raw breakpoint pointer.
1124 * win32-arm-low.c (the_low_target): Install NULL as
1125 supports_z_point_type.
1126 * win32-i386-low.c (i386_supports_z_point_type): New function.
1127 (i386_insert_point, i386_remove_point): Adjust to new interface.
1128 (the_low_target): Install i386_supports_z_point_type.
1129 * win32-low.c (win32_supports_z_point_type): New function.
1130 (win32_insert_point, win32_remove_point): Adjust to new interface.
1131 (win32_target_ops): Install win32_supports_z_point_type.
1132 * win32-low.h (struct win32_target_ops):
1133 <supports_z_point_type>: New method.
1134 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
1135 instead of a char. Also take a raw breakpoint pointer.
1136
932539e3
PA
11372014-05-20 Pedro Alves <palves@redhat.com>
1138
1139 * mem-break.h: Include break-common.h.
1140 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
1141 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
1142 (Z_packet_to_target_hw_bp_type): New declaration.
1143 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
1144 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
1145 (Z_PACKET_ACCESS_WP): Delete macros.
1146 (Z_packet_to_hw_type): Delete function.
1147 * i386-low.h: Don't include break-common.h here.
1148 (Z_packet_to_hw_type): Delete declaration.
1149 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
1150 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
1151 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
1152 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
1153 * linux-aarch64-low.c: Don't include break-common.h here.
1154 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
1155 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
1156 (Z_packet_to_target_hw_bp_type): Delete function.
1157 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
1158 function.
1159 (mips_insert_point, mips_remove_point): Use
1160 Z_packet_to_target_hw_bp_type.
1161
4ff0d3d8
PA
11622014-05-20 Pedro Alves <palves@redhat.com>
1163
1164 * linux-aarch64-low.c: Include break-common.h.
1165 (enum target_point_type): Delete.
1166 (Z_packet_to_point_type): Rename to ...
1167 (Z_packet_to_target_hw_bp_type): ... this, and return a
1168 target_hw_bp_type instead.
1169 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
1170 instead of an enum target_point_type.
1171 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
1172 breakpoint type.
1173 (aarch64_dr_state_insert_one_point)
1174 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
1175 (aarch64_handle_aligned_watchpoint)
1176 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
1177 Take an enum target_hw_bp_type instead of an enum
1178 target_point_type.
1179 (aarch64_supports_z_point_type): New function.
1180 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
1181 use Z_packet_to_target_hw_bp_type.
1182
786dc519
JB
11832014-05-20 Joel Brobecker <brobecker@adacore.com>
1184
1185 * configure.ac: Only use -Werror by default when DEVELOPMENT
1186 is true.
1187 * configure: Regenerate.
1188
9e0aa64f
JK
11892014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
1190
1191 Fix gdbserver qGetTLSAddr for x86_64 -m32.
1192 * linux-x86-low.c (X86_64_USER_REGS): New.
1193 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
1194
2b577b92
YQ
11952014-04-28 Yao Qi <yao@codesourcery.com>
1196
1197 * Makefile.in (i386-avx512.c): Fix the typo of generated file
1198 name.
1199
94611da2
PA
12002014-04-25 Pedro Alves <palves@redhat.com>
1201
1202 PR server/16255
1203 * linux-low.c (linux_attach_fail_reason_string): New function.
1204 (linux_attach_lwp): Delete.
1205 (linux_attach_lwp_1): Rename to ...
1206 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
1207 argument. Remove "initial" parameter. Return int instead of
1208 void. Don't error or warn here.
1209 (linux_attach): Adjust to call linux_attach_lwp. Call error on
1210 failure to attach to the tgid. Call warning when failing to
1211 attach to an lwp.
1212 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
1213 argument. Remove "initial" parameter. Return int instead of
1214 void. Don't error or warn here.
1215 (linux_attach_fail_reason_string): New declaration.
1216 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
1217 interface change. Use linux_attach_fail_reason_string.
1218
01f9f808
MS
12192014-04-24 Michael Sturm <michael.sturm@mintel.com>
1220 Walfred Tedeschi <walfred.tedeschi@intel.com>
1221
1222 * Makefile.in: Added rules to handle new files
1223 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
1224 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
1225 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
1226 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
1227 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
1228 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
1229 x32-avx512-linux.o.
1230 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
1231 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
1232 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
1233 i386/x32-avx512.xml.
1234 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
1235 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
1236 i386/x32-avx512-linux.xml.
1237 * i387-fp.c (num_avx512_k_registers): New constant for number
1238 of K registers.
1239 (num_avx512_zmmh_low_registers): New constant for number of
1240 lower ZMM registers (0-15).
1241 (num_avx512_zmmh_high_registers): New constant for number of
1242 higher ZMM registers (16-31).
1243 (num_avx512_ymmh_registers): New contant for number of higher
1244 YMM registers (ymm16-31 added by avx521 on x86_64).
1245 (num_avx512_xmm_registers): New constant for number of higher
1246 XMM registers (xmm16-31 added by AVX512 on x86_64).
1247 (struct i387_xsave): Add space for AVX512 registers.
1248 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
1249 Add code to handle AVX512 registers.
1250 (i387_xsave_to_cache): Add code to handle AVX512 registers.
1251 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
1252 prototypei from generated file.
1253 (tdesc_amd64_avx512_linux): Likewise.
1254 (init_registers_x32_avx512_linux): Likewise.
1255 (tdesc_x32_avx512_linux): Likewise.
1256 (init_registers_i386_avx512_linux): Likewise.
1257 (tdesc_i386_avx512_linux): Likewise.
1258 (x86_64_regmap): Add AVX512 registers.
1259 (x86_linux_read_description): Add code to handle AVX512 XSTATE
1260 mask.
1261 (initialize_low_arch): Add code to initialize AVX512 registers.
1262
51aa91f9
PA
12632014-04-23 Pedro Alves <palves@redhat.com>
1264
1265 * mem-break.c (find_gdb_breakpoint_at): Make static.
1266 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
1267
a4165e94
PA
12682014-04-23 Pedro Alves <palves@redhat.com>
1269
1270 * i386-low.c: Don't include break-common.h here.
1271 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
1272 prototype to take target_hw_bp_type as argument instead of a Z
1273 packet char.
1274 * i386-low.h: Include break-common.h here.
1275 (Z_packet_to_hw_type): Declare.
1276 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
1277 prototypes.
1278 * linux-x86-low.c (x86_insert_point): Convert the packet number to
1279 a target_hw_bp_type before calling i386_low_insert_watchpoint.
1280 (x86_remove_point): Convert the packet number to a
1281 target_hw_bp_type before calling i386_low_remove_watchpoint.
1282 * win32-i386-low.c (i386_insert_point): Convert the packet number
1283 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
1284 (i386_remove_point): Convert the packet number to a
1285 target_hw_bp_type before calling i386_low_remove_watchpoint.
1286
b8acf843
PA
12872014-04-23 Pedro Alves <palves@redhat.com>
1288
1289 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
1290
d708bcd1
PA
12912014-04-10 Pedro Alves <palves@redhat.com>
1292
1293 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1294 Check if the condition or command is NULL before checking if the
1295 breakpoint is known. On success, return true.
1296 * mem-break.h (add_breakpoint_condition): Document return.
1297 (add_breakpoint_commands): Add describing comment.
1298 * server.c (skip_to_semicolon): New function.
1299 (process_point_options): Use it.
1300
2eec7d5b
PA
13012014-04-09 Pedro Alves <palves@redhat.com>
1302
1303 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
1304 to lwpid_of.
1305
fa96cb38
PA
13062014-02-27 Pedro Alves <palves@redhat.com>
1307
1308 PR 12702
1309 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
1310 macros.
1311 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
1312 output.
1313 (last_thread_of_process_p): Take a PID argument instead of a
1314 thread pointer.
1315 (linux_wait_for_lwp): Delete.
1316 (num_lwps, check_zombie_leaders, not_stopped_callback): New
1317 functions.
1318 (linux_low_filter_event): New function, party factored out from
1319 linux_wait_for_event.
1320 (linux_wait_for_event): Rename to ...
1321 (linux_wait_for_event_filtered): ... this. Add new filter ptid
1322 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
1323 sigsuspend. Check for zombie leaders.
1324 (linux_wait_for_event): Reimplement as wrapper around
1325 linux_wait_for_event_filtered.
1326 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
1327 a normal or signal exit is seen, it's the whole process exiting.
1328 (wait_for_sigstop): No longer a for_each_inferior callback.
1329 Rewrite on top of linux_wait_for_event_filtered.
1330 (stop_all_lwps): Call wait_for_sigstop directly.
1331 * server.c (resume, handle_target_event): Handle
1332 TARGET_WAITKIND_NO_RESUMED.
1333
d763de10
JB
13342014-02-26 Joel Brobecker <brobecker@adacore.com>
1335
1336 * win32-low.c (psapi_get_dll_name,
1337 * win32_CreateToolhelp32Snapshot): Delete.
1338 (win32_CreateToolhelp32Snapshot, win32_Module32First)
1339 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
1340 Delete.
1341 (handle_load_dll): Add function description.
1342 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
1343
850a0f76
JB
13442014-02-26 Joel Brobecker <brobecker@adacore.com>
1345
1346 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
1347 Add comment.
1348 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
1349 base address when calling win32_add_one_solib.
1350 (handle_load_dll): Delete local variable load_addr.
1351 Remove 0x1000 offset applied to DLL base address when calling
1352 win32_add_one_solib.
1353 (handle_unload_dll): Add comment.
1354
f25b3fc3
JB
13552014-02-26 Joel Brobecker <brobecker@adacore.com>
1356
1357 * win32-low.c (win32_add_all_dlls): Renames
1358 win32_ensure_ntdll_loaded. Rewrite function documentation.
1359 Adjust implementation to always load all DLLs.
1360 Add 0x1000 offset to DLL base address when calling
1361 win32_add_one_solib.
1362 (child_initialization_done): New static global.
1363 (do_initial_child_stuff): Set child_initialization_done to
1364 zero during child initialization, and 1 after. Replace call
1365 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
1366 Add comment.
1367 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
1368 (handle_unload_dll): Add function documentation.
1369 (get_child_debug_event): Ignore load and unload DLL events
1370 during child initialization.
1371
d86d4aaf
DE
13722014-02-20 Doug Evans <dje@google.com>
1373
3bc32da3 1374 Remove global all_lwps.
d86d4aaf
DE
1375 * inferiors.h (ptid_of): Move here from linux-low.h.
1376 (pid_of, lwpid_of): Ditto.
1377 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
1378 parameter is a struct thread_info * now.
1379 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
1380 directly. Pass &all_threads to find_inferior instead of &all_lwps.
1381 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
1382 directly.
1383 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
1384 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
1385 * linux-arm-low.c (update_registers_callback): Update, "entry"
1386 parameter is a struct thread_info * now.
1387 Fetch lwpid from current_inferior directly.
1388 (arm_insert_point): Pass &all_threads to find_inferior instead of
1389 &all_lwps.
1390 (arm_remove_point): Ditto.
1391 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
1392 (arm_prepare_to_resume): Fetch pid from thread.
1393 (arm_read_description): Fetch lwpid from current_inferior directly.
1394 * linux-low.c (all_lwps): Delete.
1395 (delete_lwp): Delete call to remove_inferior.
1396 (handle_extended_wait): Fetch lwpid from thread.
1397 (add_lwp): Don't set lwp->entry.id. Remove call to
1398 add_inferior_to_list.
1399 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
1400 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
1401 (kill_one_lwp_callback): Ditto.
1402 (linux_kill): Don't dereference NULL pointer.
1403 Fetch ptid,lwpid from thread.
1404 (get_detach_signal): Fetch ptid from thread.
1405 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
1406 Simplify call to regcache_invalidate_thread.
1407 (delete_lwp_callback): Update, "entry" parameter is a
1408 struct thread_info * now. Fetch pid from thread.
1409 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
1410 (status_pending_p_callback): Update, "entry" parameter is a
1411 struct thread_info * now. Fetch ptid from thread.
1412 (find_lwp_pid): Update, "entry" parameter is a
1413 struct thread_info * now.
1414 (linux_wait_for_lwp): Fetch pid from thread.
1415 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
1416 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
1417 (enqueue_one_deferred_signal): Fetch lwpid from thread.
1418 (dequeue_one_deferred_signal): Ditto.
1419 (cancel_breakpoint): Fetch ptid from current_inferior.
1420 (linux_wait_for_event): Pass &all_threads to find_inferior,
1421 not &all_lwps. Fetch ptid, lwpid from thread.
1422 (count_events_callback): Update, "entry" parameter is a
1423 struct thread_info * now.
1424 (select_singlestep_lwp_callback): Ditto.
1425 (select_event_lwp_callback): Ditto.
1426 (cancel_breakpoints_callback): Ditto.
1427 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
1428 not &all_lwps.
1429 (select_event_lwp): Ditto. Fetch ptid from event_thread.
1430 (unsuspend_one_lwp): Update, "entry" parameter is a
1431 struct thread_info * now.
1432 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
1433 not &all_lwps.
1434 (linux_stabilize_threads): Ditto. And for for_each_inferior.
1435 Fetch lwpid from thread, not lwp.
1436 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
1437 Pass &all_threads to find_inferior, not &all_lwps.
1438 (send_sigstop): Fetch lwpid from thread, not lwp.
1439 (send_sigstop_callback): Update, "entry" parameter is a
1440 struct thread_info * now.
1441 (suspend_and_send_sigstop_callback): Ditto.
1442 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
1443 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
1444 struct thread_info * now.
1445 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
1446 from thread, lwp.
1447 (lwp_running): Update, "entry" parameter is a
1448 struct thread_info * now.
1449 (stop_all_lwps): Fetch ptid from thread.
1450 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
1451 (linux_resume_one_lwp): Fetch lwpid from thread.
1452 (linux_set_resume_request): Update, "entry" parameter is a
1453 struct thread_info * now. Fetch pid, lwpid from thread.
1454 (resume_status_pending_p): Update, "entry" parameter is a
1455 struct thread_info * now.
1456 (need_step_over_p): Ditto. Fetch lwpid from thread.
1457 (start_step_over): Fetch lwpid from thread.
1458 (linux_resume_one_thread): Update, "entry" parameter is a
1459 struct thread_info * now. Fetch lwpid from thread.
1460 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
1461 (proceed_one_lwp): Update, "entry" parameter is a
1462 struct thread_info * now. Fetch lwpid from thread.
1463 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
1464 struct thread_info * now.
1465 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
1466 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
1467 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
1468 directly.
1469 (regsets_store_inferior_registers): Ditto.
1470 (fetch_register, store_register): Ditto.
1471 (linux_read_memory, linux_write_memory): Ditto.
1472 (linux_request_interrupt): Ditto.
1473 (linux_read_auxv): Ditto.
1474 (linux_xfer_siginfo): Ditto.
1475 (linux_qxfer_spu): Ditto.
1476 (linux_qxfer_libraries_svr4): Ditto.
1477 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
1478 moved to inferiors.h.
1479 (get_lwp): Delete.
1480 (get_thread_lwp): Update.
1481 (struct lwp_info): Delete member "entry". Simplify comment for
1482 member "thread".
1483 (all_lwps): Delete.
1484 * linux-mips-low.c (mips_read_description): Fetch lwpid from
1485 current_inferior directly.
1486 (update_watch_registers_callback): Update, "entry" parameter is a
1487 struct thread_info * now. Fetch pid from thread.
1488 (mips_linux_prepare_to_resume): Fetch ptid from thread.
1489 (mips_insert_point): Fetch lwpid from current_inferior.
1490 Pass &all_threads to find_inferior, not &all_lwps.
1491 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
1492 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
1493 directly.
1494 (mips_stopped_data_address): Ditto.
1495 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
1496 directly.
1497 * linux-tile-low.c (tile_arch_setup): Ditto.
1498 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
1499 (update_debug_registers_callback): Update, "entry" parameter is a
1500 struct thread_info * now. Fetch pid from thread.
1501 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
1502 Pass &all_threads to find_inferior, not &all_lwps.
1503 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
1504 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
1505 Pass &all_threads to find_inferior, not &all_lwps.
1506 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
1507 (i386_dr_low_get_status): Ditto.
1508 (x86_linux_prepare_to_resume): Fetch ptid from thread.
1509 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
1510 (x86_linux_read_description): Ditto.
1511 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
1512
3b8361aa
DE
15132014-02-20 Doug Evans <dje@google.com>
1514
1515 * inferiors.c (get_first_inferior): Fix buglet.
1516
f7667f0d
DE
15172014-02-19 Doug Evans <dje@google.com>
1518
1519 * gdbthread.h (add_thread): Change result type to struct thread_info *.
1520 * inferiors.c (add_thread): Change result type to struct thread_info *.
1521 All callers updated.
1522 (add_lwp): Call add_thread here instead of in callers.
1523 All callers updated.
1524 * linux-low.h (get_lwp_thread): Rewrite.
1525 (struct lwp_info): New member "thread".
1526
b3312d80
DE
15272014-02-19 Doug Evans <dje@google.com>
1528
1529 * linux-low.c (add_lwp): Change result to struct lwp_info *.
1530 All callers updated.
1531
ecc6f45c
DE
15322014-02-19 Doug Evans <dje@google.com>
1533
1534 * inferiors.c (add_thread): Fix whitespace.
1535
649ebbca
DE
15362014-02-19 Doug Evans <dje@google.com>
1537
1538 * dll.c (clear_dlls): Replace accessing list implemention details
1539 with API function.
1540 * gdbthread.h (get_first_thread): Declare.
1541 * inferiors.c (for_each_inferior_with_data): New function.
1542 (get_first_thread): New function.
1543 (find_thread_ptid): Simplify.
1544 (get_first_inferior): New function.
1545 (clear_list): Delete.
1546 (one_inferior_p): New function.
1547 (clear_inferior_list): New function.
1548 (clear_inferiors): Update.
1549 * inferiors.h (for_each_inferior_with_data): Declare.
1550 (clear_inferior_list): Declare.
1551 (one_inferior_p): Declare.
1552 (get_first_inferior): Declare.
1553 * linux-low.c (linux_wait_for_event): Replace accessing list
1554 implemention details with API function.
1555 * server.c (target_running): Ditto.
1556 (accumulate_file_name_length): New function.
1557 (emit_dll_description): New function.
1558 (handle_qxfer_libraries): Replace accessing list implemention
1559 details with API function.
1560 (handle_qxfer_threads_worker): New function.
1561 (handle_qxfer_threads_proper): Replace accessing list implemention
1562 details with API function.
1563 (handle_query): Ditto.
1564 (visit_actioned_threads_callback_ftype): New typedef.
1565 (visit_actioned_threads_data): New struct.
1566 (visit_actioned_threads): Rewrite to be find_inferior callback.
1567 (resume): Call find_inferior.
1568 (handle_status): Replace accessing list implemention
1569 details with API function.
1570 (process_serial_event): Replace accessing list implemention details
1571 with API function.
1572 * target.c (set_desired_inferior): Replace accessing list implemention
1573 details with API function.
1574 * tracepoint.c (same_process_p): New function.
1575 (gdb_agent_about_to_close): Replace accessing list implemention
1576 details with API function.
1577 * win32-low.c (child_delete_thread): Replace accessing list
1578 implemention details with API function.
1579 (match_dll_by_basename): New function.
1580 (dll_is_loaded_by_basename): New function.
1581 (win32_ensure_ntdll_loaded): Replace accessing list implemention
1582 details call to dll_is_loaded_by_basename.
1583
80894984
DE
15842014-02-19 Doug Evans <dje@google.com>
1585
1586 * dll.h (struct dll_info): Add comment.
1587 * gdbthread.h (struct thread_info): Add comment.
1588 (current_ptid): Simplify.
1589 * inferiors.c (add_process): Update.
1590 (remove_process): Update.
1591 * inferiors.h (struct process_info): Rename member "head" to "entry".
1592 * linux-low.c (delete_lwp): Update.
1593 (add_lwp): Update.
1594 (last_thread_of_process_p): Update.
1595 (kill_one_lwp_callback, linux_kill): Update.
1596 (status_pending_p_callback): Update.
1597 (wait_for_sigstop): Update. Simplify read of ptid.
1598 (start_step_over): Update.
1599 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
1600 (get_lwp_thread): Update.
1601 (struct lwp_info): Rename member "head" to "entry".
1602 * regcache.h (inferior_list_entry): Delete.
1603 * server.c (kill_inferior_callback): Update.
1604 (detach_or_kill_inferior_callback): Update.
1605 (print_started_pid): Update.
1606 (print_attached_pid): Update.
1607 (process_serial_event): Simplify read of ptid.
1608 * thread-db.c (thread_db_create_event): Update.
1609 (thread_db_get_tls_address): Update.
1610 * win32-low.c (current_inferior_ptid): Simplify.
1611
46917d26
TT
16122014-02-19 Tom Tromey <tromey@redhat.com>
1613
1614 * target.h (struct target_ops) <supports_btrace>: Add target_ops
1615 argument.
1616 (target_supports_btrace): Update.
1617
0759a81e
YQ
16182014-02-14 Yao Qi <yao@codesourcery.com>
1619
1620 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
1621 (rsp-low-ipa.o): New target.
1622
a7191e8b
TT
16232014-02-12 Tom Tromey <tromey@redhat.com>
1624
1625 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
1626 convert_ascii_to_int.
1627 * regcache.c (registers_to_string): Likewise.
1628 * remote-utils.c (decode_M_packet): Likewise.
1629 * server.c (process_serial_event): Likewise.
1630
ff0e980e
TT
16312014-02-12 Tom Tromey <tromey@redhat.com>
1632
1633 * server.c (handle_query, handle_v_run): Use hex2bin, not
1634 unhexify.
1635 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
1636
e9371aff
TT
16372014-02-12 Tom Tromey <tromey@redhat.com>
1638
1639 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
1640 convert_int_to_ascii.
1641 * regcache.c (registers_to_string, collect_register_as_string):
1642 Likewise.
1643 * remote-utils.c (look_up_one_symbol, relocate_instruction):
1644 Likewise.
1645 * server.c (process_serial_event): Likewise.
1646 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
1647 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
1648
971dc0b8
TT
16492014-02-12 Tom Tromey <tromey@redhat.com>
1650
1651 * remote-utils.c (look_up_one_symbol, monitor_output): Use
1652 bin2hex, not hexify.
1653 * tracepoint.c (cmd_qtstatus): Likewise.
1654
0a822afb
TT
16552014-02-12 Tom Tromey <tromey@redhat.com>
1656
1657 * remote-utils.c (monitor_output): Pass explicit length to
1658 hexify.
1659
9c3d6531
TT
16602014-02-12 Tom Tromey <tromey@redhat.com>
1661
1662 * tracepoint.c: Include rsp-low.h.
1663 * server.c: Include rsp-low.h.
1664 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
1665 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
1666 declare.
1667 * remote-utils.c: Include rsp-low.h.
1668 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
1669 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
1670 (convert_int_to_ascii, convert_ascii_to_int): Move to
1671 common/rsp-low.c.
1672 * regcache.c: Include rsp-low.h.
1673 * ax.c: Include rsp-low.h.
1674 * Makefile.in (SFILES): Add common/rsp-low.c.
1675 (OBS): Add rsp-low.o.
1676 (rsp-low.o): New target.
1677
01fd3ea5
TT
16782014-02-12 Tom Tromey <tromey@redhat.com>
1679
1680 * utils.h (pulongest, plongest, phex_nz): Don't declare.
1681 Include print-utils.h.
1682 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
1683 (plongest, thirty_two, phex_nz): Remove.
1684 * Makefile.in (SFILES): Add common/print-utils.c.
1685 (OBS): Add print-utils.o.
1686 (print-utils-ipa.o): New target.
1687 (print-utils.o): New target.
1688 (IPA_OBJS): Add print-utils-ipa.o.
1689
e99dc820
TT
16902014-02-06 Tom Tromey <tromey@redhat.com>
1691
1692 * Makefile.in (SFILES): Fix indentation.
1693
ee1e2d4f
DE
16942014-02-05 Doug Evans <dje@google.com>
1695
1696 * linux-low.c (linux_wait_for_event): Improve comment.
1697 (linux_wait_1): Keep current_inferior in sync with event_child.
1698
f5a02773
DE
16992014-01-22 Doug Evans <dje@google.com>
1700
1701 * gdbthread.h (gdb_id_to_thread): Delete, unused.
1702
87ce2a04
DE
17032014-01-22 Doug Evans <dje@google.com>
1704
1705 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
1706 * configure: Regenerate.
1707 * config.in: Regenerate.
1708 * Makefile.in (SFILES): Add debug.c.
1709 (OBS): Add debug.o.
1710 * debug.c: New file.
1711 * debug.h: New file.
1712 * linux-aarch64-low.c (*): Update all debugging printfs to use
1713 debug_printf instead of fprintf.
1714 * linux-arm-low.c (*): Ditto.
1715 * linux-cris-low.c (*): Ditto.
1716 * linux-crisv32-low.c (*): Ditto.
1717 * linux-m32r-low.c (*): Ditto.
1718 * linux-sparc-low.c (*): Ditto.
1719 * linux-x86.c (*): Ditto.
1720 * linux-low.c (*): Ditto.
1721 (linux_wait_1): Add calls to debug_enter, debug_exit.
1722 (linux_wait): Remove redundant debugging printf.
1723 (stop_all_lwps): Add calls to debug_enter, debug_exit.
1724 (linux_resume, unstop_all_lwps): Ditto.
1725 * mem-break.c (*): Update all debugging printfs to use
1726 debug_printf instead of fprintf.
1727 * remote-utils.c (*): Ditto.
1728 * thread-db.c (*): Ditto.
1729 * server.c #include <ctype.h>, "gdb_vecs.h".
1730 (debug_threads): Moved to debug.c.
1731 (*): Update all debugging printfs to use debug_printf instead of
1732 fprintf.
1733 (start_inferior): Replace call to fflush with call to debug_flush.
1734 (monitor_show_help): Mention set debug-format.
1735 (parse_debug_format_options): New function.
1736 (handle_monitor_command): Handle "monitor set debug-format".
1737 (gdbserver_usage): Mention --debug-format.
1738 (main): Parse --debug-format.
1739 * server.h (debug_threads): Declaration moved to debug.h.
1740 #include "debug.h".
1741 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
1742 trace_debug_1 that uses debug_printf.
1743 (tracepoint_look_up_symbols): Update all debugging printfs to use
1744 debug_printf instead of fprintf.
1745
e671835b
BS
17462014-01-20 Baruch Siach <baruch@tkos.co.il>
1747
1748 * linux-xtensa-low.c: Include asm/ptrace.h instead of
1749 sys/ptrace.h.
1750
b5737fa9
PA
17512014-01-17 Pedro Alves <palves@redhat.com>
1752
ea38d2a9 1753 PR build/16445
c7faa97a
PA
1754 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
1755 defined after including gdb_proc_service.h.
b5737fa9 1756
40ed484e
DE
17572014-01-16 Doug Evans <dje@google.com>
1758
1759 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
1760 (match_dll): Use it.
1761
969c39fb
MM
17622014-01-16 Markus Metzger <markus.t.metzger@intel.com>
1763
1764 * target.h (target_ops) <read_btrace>: Change parameters and
1765 return type to allow error reporting.
1766 * server.c (handle_qxfer_btrace): Support delta reads. Pass
1767 trace reading errors on.
1768 * linux-low.c (linux_low_read_btrace): Pass trace reading
1769 errors on.
1770 (linux_low_disable_btrace): New.
1771
ab7f45ba
DE
17722014-01-15 Doug Evans <dje@google.com>
1773
1774 * inferiors.c (thread_id_to_gdb_id): Delete.
1775 * inferiors.h (thread_id_to_gdb_id): Delete.
1776
66af0f44
EZ
17772014-01-13 Eli Zaretskii <eliz@gnu.org>
1778
1779 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
1780 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
1781 versions.
1782
9939e131
PA
17832014-01-08 Pedro Alves <palves@redhat.com>
1784
1785 * server.c (handle_status): Don't discard previous queued stop
1786 replies or thread's pending status here.
1787 (main) <disconnection>: Do it here instead.
1788
b7ea362b
PA
17892014-01-08 Pedro Alves <palves@redhat.com>
1790
1791 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
1792 * server.c (visit_actioned_threads, handle_pending_status): New
1793 function.
1794 (handle_v_cont): Factor out parts to ...
1795 (resume): ... this new function. If in all-stop, and a thread
1796 being resumed has a pending status, report it without actually
1797 resuming.
1798 (myresume): Adjust to use the new 'resume' function.
1799 (clear_pending_status_callback, set_pending_status_callback)
1800 (find_status_pending_thread_callback): New functions.
1801 (handle_status): Handle the case of multiple threads having
1802 interesting statuses to report. Report threads' real last signal
1803 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
1804 with an interesting thread to report the status for, instead of
1805 always reporting the status of the first thread.
1806
28498c42
JB
18072014-01-01 Joel Brobecker <brobecker@adacore.com>
1808
1809 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
1810 * gdbreplay.c (gdbreplay_version): Likewise.
1811
f45c82da
YZ
18122013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
1813
1814 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
1815 iov.iov_len with the real length in use.
1816
379a5e2d
JB
18172013-12-13 Joel Brobecker <brobecker@adacore.com>
1818
1819 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
1820 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
1821 for all targets that use win32-low.c.
1822 * win32-low.c (win32_ensure_ntdll_loaded): New function.
1823 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
1824
4210d83e
PA
18252013-12-13 Pedro Alves <palves@redhat.com>
1826
1827 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
1828 if equal to TARGET_WAITKIND_LOADED.
1829 * win32-low.c (cached_status): New static global.
1830 (win32_wait): Add declaration.
1831 (do_initial_child_stuff): Flush all initial pending debug events
1832 up to the initial breakpoint.
1833 (win32_wait): If CACHED_STATUS was set, return that instead
1834 of doing a real wait. Remove the code resuming the execution
1835 of the inferior after receiving a TARGET_WAITKIND_LOADED event
1836 during the initial phase. Also remove the code changing
1837 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
1838 TARGET_WAITKIND_STOPPED.
1839
e7f0d979
YQ
18402013-12-11 Yao Qi <yao@codesourcery.com>
1841
1842 * notif.c (handle_notif_ack): Return 0 if no notification
1843 matches.
1844
ebcf782c
DE
18452013-11-20 Doug Evans <dje@google.com>
1846
1847 * linux-low.c (linux_set_resume_request): Fix comment.
1848
20ad9378
DE
18492013-11-20 Doug Evans <dje@google.com>
1850
1851 * linux-low.c (resume_status_pending_p): Tweak comment.
1852
a196ebeb
WT
18532013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
1854
1855 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
1856 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
1857 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
1858 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
1859 (srv_amd64_regobj): Add amd64-mpx.o.
1860 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
1861 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
1862 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
1863 * i387-fp.c (num_pl_bnd_register) Added constant.
1864 (num_pl_bnd_cfg_registers) Added constant.
1865 (struct i387_xsave) Added reserved area and MPX fields.
1866 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
1867 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
1868 function.
1869 (tdesc_i386_mpx_linux): Add MPX amd64 target.
1870 (init_registers_amd64_mpx_linux): Declare new function.
1871 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
1872 (x86_64_regmap): Add MPX registers.
1873 (x86_linux_read_description): Add MPX case.
1874 (initialize_low_arch): Initialize MPX targets.
1875
0080a2f6
TT
18762013-11-18 Tom Tromey <tromey@redhat.com>
1877
1878 * configure: Rebuild.
1879 * configure.ac: Don't check for stdlib.h.
1880 * gdbreplay.c: Unconditionally include stdlib.h.
1881
2978b111
TT
18822013-11-18 Tom Tromey <tromey@redhat.com>
1883
1884 * config.in: Rebuild.
1885 * configure: Rebuild.
1886 * configure.ac: Don't use AC_HEADER_DIRENT.
1887
a3d08894
TT
18882013-11-18 Tom Tromey <tromey@redhat.com>
1889
1890 * server.h: Don't check HAVE_STRING_H.
1891 * gdbreplay.c: Don't check HAVE_STRING_H.
1892 * configure: Rebuild.
1893
0a5dd17d
TT
18942013-11-18 Tom Tromey <tromey@redhat.com>
1895
1896 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
1897 LIBGNU.
1898
1bd2f0ba
TT
18992013-11-08 Tom Tromey <tromey@redhat.com>
1900
1901 * configure, config.in: Rebuild.
1902 * configure.ac: Remove unused configury.
1903
3266f10b
TT
19042013-11-08 Tom Tromey <tromey@redhat.com>
1905
1906 * acinclude.m4: Include common.m4, codeset.m4.
1907 * configure, config.in: Rebuild.
1908 * configure.ac: Use GDB_AC_COMMON.
1909
6682d959
AA
19102013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
1911
1912 * linux-s390-low.c (HWCAP_S390_TE): New define.
1913 (s390_arch_setup): Consider the TE field in the HWCAP for
1914 determining 'have_regset_tdb'.
1915
fd0a4d76
SDJ
19162013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
1917
1918 PR gdb/16014
1919 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
1920 call to sizeof.
1921
1a3d890b
PA
19222013-10-02 Pedro Alves <palves@redhat.com>
1923
1924 * server.c (process_serial_event): Don't output "GDBserver
1925 exiting" if GDB is connected through stdio.
1926 * target.c (mywait): Likewise, be silent if GDB is connected
1927 through stdio.
1928
97ad4581
JB
19292013-10-01 Joel Brobecker <brobecker@adacore.com>
1930
1931 * lynx-low.c (lynx_add_threads_after_attach): New function.
1932 (lynx_attach): Remove call to add_thread. Add call to
1933 lynx_add_threads_after_attach instead.
1934
5b4e221c
MF
19352013-09-28 Mike Frysinger <vapier@gentoo.org>
1936
1937 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
1938 * config.in, configure: Regenerated.
1939
ee47b2f8
YQ
19402013-09-18 Yao Qi <yao@codesourcery.com>
1941
1942 PR server/15959
1943 * server.c (start_inferior): Clear 'resume_info'.
1944
d6707650 19452013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 1946
d6707650
JW
1947 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
1948 for each register.
1949
9243dd0e 19502013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 1951
9243dd0e
JW
1952 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
1953 linux-tile-low.o to srv_tgtobj.
1954
c623a6ef
WN
19552013-09-16 Will Newton <will.newton@linaro.org>
1956
1957 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
1958 out regs.
1959
fb71d39e
PA
19602013-09-06 Pedro Alves <palves@redhat.com>
1961
1962 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
1963 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
1964 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
1965 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
1966 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
1967 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
1968
8e7e9910
PA
19692013-09-06 Pedro Alves <palves@redhat.com>
1970
1971 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
1972 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
1973
7c3a12ca
PA
19742013-09-06 Pedro Alves <palves@redhat.com>
1975
1976 * linux-amd64-ipa.c: Include tracepoint.h.
1977 * linux-i386-ipa.c: Include tracepoint.h.
1978
8eb3d7b6
RW
19792013-09-06 Ricard Wanderlof <ricardw@axis.com>
1980
1981 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
1982 (ps_get_thread_area): New function.
1983
eddddb9d
RW
19842013-09-06 Ricard Wanderlof <ricardw@axis.com>
1985
1986 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
1987 (initialize_low_arch): Call init_registers_crisv32 rather than
1988 init_register_crisv32.
1989
533b0600
PA
19902013-09-05 Pedro Alves <palves@redhat.com>
1991
1992 * server.h (handle_vFile, hostio_last_error_from_errno): Move
1993 to ...
1994 * hostio.h: ... this new file.
1995 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
1996 win32-low.c: Include hostio.h.
1997
0ce3d3b5
PA
19982013-09-05 Pedro Alves <palves@redhat.com>
1999
2000 * server.h (gdb_client_data, handler_func, callback_handler_func)
2001 (delete_file_handler, add_file_handler, append_callback_event)
2002 (delete_callback_event, start_event_loop, initialize_event_loop):
2003 Move to event-loop.h and include it.
2004 * event-loop.h: New file.
2005
799cdc37
PA
20062013-09-05 Pedro Alves <palves@redhat.com>
2007
2008 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
2009 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
2010 (loaded_dll, unloaded_dll): Move to ...
2011 * dll.h: ... this new file.
2012 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
2013
6a6bbd9d
PA
20142013-09-05 Pedro Alves <palves@redhat.com>
2015
2016 * server.h (current_process, get_thread_process, all_processes)
2017 (add_inferior_to_list, for_each_inferior, current_inferior)
2018 (remove_inferior, add_process, remove_process, find_process_pid)
2019 (have_started_inferiors_p, have_attached_inferiors_p)
2020 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
2021 (clear_inferiors, find_inferior, find_inferior_id)
2022 (inferior_target_data, set_inferior_target_data)
2023 (inferior_regcache_data, set_inferior_regcache_data): Move to
2024 inferiors.h, and include it.
2025 * inferiors.h: New file.
2026
f699aaba
PA
20272013-09-05 Pedro Alves <palves@redhat.com>
2028
2029 * server.h (struct emit_ops, current_insn_ptr, emit_error):
2030 Move ...
2031 * ax.h: ... here.
2032
c144c7a0
PA
20332013-09-05 Pedro Alves <palves@redhat.com>
2034
2035 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
2036 tracepoint.h.
2037 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
2038 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
2039 (handle_tracepoint_general_set, handle_tracepoint_query)
2040 (tracepoint_finished_step, tracepoint_was_hit)
2041 (release_while_stepping_state_list, current_traceframe)
2042 (in_readonly_region, traceframe_read_mem)
2043 (fetch_traceframe_registers, traceframe_read_sdata)
2044 (traceframe_read_info, struct fast_tpoint_collect_status)
2045 (fast_tracepoint_collecting, force_unlock_trace_buffer)
2046 (handle_tracepoit_bkpts, initialize_low_tracepoint)
2047 (supply_fast_tracepoint_registers)
2048 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
2049 (ipa_tdesc, claim_trampoline_space)
2050 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
2051 (agent_mem_read, agent_get_trace_state_variable_value)
2052 (agent_set_trace_state_variable_value, agent_tsv_read)
2053 (agent_mem_read_string, get_raw_reg_func_addr)
2054 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
2055 * tracepoint.h: ... this new file.
2056
ff42e6ab
PA
20572013-09-05 Pedro Alves <palves@redhat.com>
2058
2059 * server.h (perror_with_name, error, fatal, warning, paddress)
2060 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
2061 include it.
2062 * utils.h: New file.
2063
541af0f4
PA
20642013-09-05 Pedro Alves <palves@redhat.com>
2065
2066 * server.h (remote_debug, noack_mode, transport_is_reliable)
2067 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
2068 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
2069 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
2070 (write_enn, initialize_async_io, enable_async_io)
2071 (disable_async_io, check_remote_input_interrupt_request)
2072 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
2073 (dead_thread_notify, prepare_resume_reply)
2074 (decode_address_to_semicolon, decode_address, decode_m_packet)
2075 (decode_M_packet, decode_X_packet, decode_xfer_write)
2076 (decode_search_memory_packet, unhexify, hexify)
2077 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
2078 (look_up_one_symbol, relocate_instruction)
2079 (monitor_output): Move to remote-utils.h, and include it.
2080 * remote-utils.h: New file.
2081
eebdf26b
PA
20822013-09-05 Pedro Alves <palves@redhat.com>
2083
2084 * server.h (_): Delete.
2085
3aafd2ff
PA
20862013-09-02 Pedro Alves <palves@redhat.com>
2087
2088 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
2089 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
2090 allocated.
2091 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
2092
cee83bcb
PM
20932013-09-02 Pierre Muller <muller@sourceware.org>
2094
2095 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
2096 or WriteProcessMemory complete successfully and handle
2097 ERROR_PARTIAL_COPY error.
2098
9a13b2fa
PA
20992013-09-02 Pedro Alves <palves@redhat.com>
2100
2101 * server.c (gdb_read_memory): Return -1 on traceframe memory read
2102 error instead of EIO.
2103
602e3198
JK
21042013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
2105
2106 PR server/15604
2107 * linux-low.c: Include filestuff.h.
2108 (linux_create_inferior) <pid == 0>: Call close_most_fds.
2109 * lynx-low.c: Include filestuff.h.
2110 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
2111 * server.c: Include filestuff.h.
2112 (main): Call notice_open_fds.
2113 * spu-low.c: Include filestuff.h.
2114 (spu_create_inferior) <pid == 0>: Call close_most_fds.
2115
96d7229d
LM
21162013-08-22 Luis Machado <lgustavo@codesourcery.com>
2117
2118 * Makefile.in: Explain why ../target and ../nat are not
2119 listed as include file search paths.
2120 (linux-waitpid.o): New object file rule.
2121 * configure.srv (srv_native_linux_obj): New variable.
2122 Replace all occurrences of linux native object files with
2123 $srv_native_linux_obj.
2124 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
2125 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
2126 (linux_enable_event_reporting): Remove declaration.
2127 (my_waitpid): Moved to common/linux-waitpid.c.
2128 (linux_wait_for_event): Pass ptid when calling
2129 linux_enable_event_reporting.
2130 (linux_supports_tracefork_flag): Remove.
2131 (linux_enable_event_reporting): Likewise.
2132 (linux_tracefork_grandchild): Remove.
2133 (STACK_SIZE): Moved to common/linux-ptrace.c.
2134 (linux_tracefork_child): Remove.
2135 (linux_test_for_tracefork): Remove.
2136 (linux_look_up_symbols): Call linux_supports_traceclone.
2137 (initialize_low): Remove call to linux_test_for_tracefork.
2138 * linux-low.h (PTRACE_TYPE_ARG3): Move to
2139 common/linux-ptrace.h.
2140 (PTRACE_TYPE_ARG4): Likewise.
2141 Include linux-ptrace.h.
2142
32940073
PA
21432013-08-21 Pedro Alves <palves@redhat.com>
2144
2145 * config.in: Renegerate.
2146
33b60d58 21472013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 2148
33b60d58
LM
2149 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
2150 (SFILES): Remove $(srcdir)/common/target-common.c and
2151 add $(srcdir)/target/waitstatus.c.
2152 (OBS): Remove target-common.o and add waitstatus.o.
2153 (server_h): Remove $(srcdir)/../common/target-common.h and
2154 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
2155 and $(srcdir)/../target/waitstatus.h.
2156 (target-common.o): Remove.
2157 (waitstatus.o): New target object file.
2158 * target.h: Do not include target-common.h and
2159 include target/resume.h, target/wait.h and
2160 target/waitstatus.h.
2161
b8e1b30e
LM
21622013-08-13 Luis Machado <lgustavo@codesourcery.com>
2163
2164 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
2165 to PTRACE_TYPE_ARG3.
2166 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
2167 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
2168 PTRACE_TYPE_ARG4.
2169 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
2170 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
2171
7a60ad40
YQ
21722013-07-27 Jie Zhang <jie@codesourcery.com>
2173 Daniel Jacobowitz <dan@codesourcery.com>
2174 Yao Qi <yao@codesourcery.com>
2175
2176 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
2177 (mips-linux-watch.o): New rule.
2178 (mips_linux_watch_h): New variable.
2179 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
2180 srv_tgtobj.
2181 * linux-mips-low.c: Include mips-linux-watch.h.
2182 (struct arch_process_info, struct arch_lwp_info): New.
2183 (update_watch_registers_callback): New function.
2184 (mips_linux_new_process, mips_linux_new_thread) New functions.
2185 (mips_linux_prepare_to_resume, mips_insert_point): New
2186 functions.
2187 (mips_remove_point, mips_stopped_by_watchpoint): New
2188 functions.
2189 (rsp_bp_type_to_target_hw_bp_type): New function.
2190 (mips_stopped_data_address): New function.
2191 (the_low_target): Add watchpoint support functions.
2192
de6f69ad
YQ
21932013-07-27 Yao Qi <yao@codesourcery.com>
2194
2195 * i386-low.c: Include break-common.h.
2196 (enum target_hw_bp_type): Remove.
2197
3360c0bf
LM
21982013-07-24 Luis Machado <lgustavo@codesourcery.com>
2199
2200 * Makefile.in (SFILES): /common/target-common.c.
2201 (OBS): Add target-common.o.
2202 (server_h): Add $(srcdir)/../common/target-common.h.
2203 (target-common.o): New target.
2204 * server.c (queue_stop_reply_callback): Free
2205 status string after use.
2206 * target.c (target_waitstatus_to_string): Remove.
2207 * target.h: Include target-common.h.
2208 (resume_kind): Likewise.
2209 (target_waitkind): Likewise.
2210 (target_waitstatus): Likewise.
2211 (TARGET_WNOHANG): Likewise.
2212
bd885420
YQ
22132013-07-04 Yao Qi <yao@codesourcery.com>
2214
2215 * Makefile.in (host_alias): Use @host_noncanonical@.
2216 (target_alias): Use @target_noncanonical@.
2217 * configure.ac: Use ACX_NONCANONICAL_TARGET and
2218 ACX_NONCANONICAL_HOST.
2219 * configure: Regenerated.
2220
2221 Revert:
2222 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
2223
2224 * configure.ac (version_host, version_target): Set and AC_SUBST them.
2225 * configure: Rebuild.
2226 * Makefile.in (version_host, version_target): Get from configure.
2227 (version.c): Use $(version_host) and $(version_target).
2228
17ef446e
PA
22292013-07-03 Pedro Alves <palves@redhat.com>
2230
2231 * Makefile.in (config.status): Depend on development.sh.
2232 * acinclude.m4: Include libmcheck.m4.
2233 * configure: Regenerate.
2234
7a9a7487
MG
22352013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
2236
2237 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
2238 attribute inside the parentheses.
2239 (winapi_DebugSetProcessKillOnExit): Ditto.
2240 (winapi_DebugBreakProcess): Ditto.
2241 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 2242
49b64de6
MG
22432013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
2244
2245 * notif.h (notif_event): Add a dummy member to avoid compiler
2246 errors.
2247
d5749ee7
PA
22482013-07-01 Pedro Alves <palves@redhat.com>
2249
2250 * hostio.c (HOSTIO_PATH_MAX): Define.
2251 (require_filename, handle_open, handle_unlink, handle_readlink):
2252 Use it.
2253
d8d2a3ee
PA
22542013-07-01 Pedro Alves <palves@redhat.com>
2255
2256 * server.h: Include "pathmax.h".
2257 * linux-low.c: Don't include sys/param.h.
2258 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
2259 MAXPATHLEN.
2260 * win32-low.c: Don't include sys/param.h.
2261 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
2262
bc7dea8d
PA
22632013-07-01 Pedro Alves <palves@redhat.com>
2264
2265 * event-loop.c: Don't check HAVE_UNISTD_H before including
2266 <unistd.h>.
2267 * gdbreplay.c: Likewise.
2268 * remote-utils.c: Likewise.
2269 * server.c: Likewise.
2270 * configure.ac: Don't check for unistd.h.
2271 * configure: Regenerate.
2272
d6c2da54
TT
22732013-06-28 Tom Tromey <tromey@redhat.com>
2274
2275 * Makefile.in (version.c): Use version.in, not
2276 common/version.in.
2277
257b6bec
MG
22782013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
2279
2280 * configure.ac (version_host, version_target): Set and AC_SUBST them.
2281 * configure: Rebuild.
2282 * Makefile.in (version_host, version_target): Get from configure.
2283 (version.c): Use $(version_host) and $(version_target).
2284
86ebe149
DK
22852013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
2286
2287 Fix trace-status to output user name without trailing colon.
2288 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
2289
f30aa5af
DK
22902013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
2291
2292 Fix trace-status to output proper start-time and stop-time.
2293 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
2294 output start time and stop time in hex as gdb expects.
2295
28a93511
YQ
22962013-06-26 Pedro Alves <pedro@codesourcery.com>
2297
2298 * tracepoint.c (build_traceframe_info_xml): Output trace state
2299 variables present in the trace buffer.
2300
01208463
TT
23012013-06-24 Tom Tromey <tromey@redhat.com>
2302
2303 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
2304 create-version.sh.
2305 (version.o): Remove.
2306 * gdbreplay.c: Include version.h.
2307 (version, host_name): Don't declare.
2308 * server.h: Include version.h.
2309 (version, host_name): Don't declare.
2310
760256f9
PA
23112013-06-12 Pedro Alves <palves@redhat.com>
2312
2313 * linux-x86-low.c (linux_is_elf64): Delete global.
2314 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
2315 with local linux_pid_exe_is_elf_64_file use.
2316
030031ee
PA
23172013-06-11 Pedro Alves <palves@redhat.com>
2318
2319 * linux-low.c (regset_disabled, disable_regset): New functions.
2320 (regsets_fetch_inferior_registers)
2321 (regsets_store_inferior_registers): Use them.
2322 (initialize_regsets_info); Don't allocate the disabled_regsets
2323 array here.
2324 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
2325 comment.
2326
5da6eb0a
PA
23272013-06-11 Pedro Alves <palves@redhat.com>
2328
2329 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
2330 xmalloc.
2331
7e5aaa09
PA
23322013-06-11 Pedro Alves <palves@redhat.com>
2333
2334 * linux-x86-low.c (initialize_low_arch): Call
2335 init_registers_x32_avx_linux.
2336
d878444c
JK
23372013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
2338
2339 Fix compatibility with Android Bionic.
2340 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
2341 it is not empty.
2342
3aee8918
PA
23432013-06-07 Pedro Alves <palves@redhat.com>
2344
5f2b57b5 2345 PR server/14823
3aee8918
PA
2346 * Makefile.in (OBS): Add tdesc.o.
2347 (IPA_OBJS): Add tdesc-ipa.o.
2348 (tdesc-ipa.o): New rule.
2349 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
2350 interface.
2351 * linux-low.c (new_inferior): Delete.
2352 (disabled_regsets, num_regsets): Delete.
2353 (linux_add_process): Adjust to set the new per-process
2354 new_inferior flag.
2355 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
2356 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
2357 was a stop. When calling arch_setup, switch the current inferior
2358 to the thread that got an event.
2359 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
2360 (regsets_fetch_inferior_registers)
2361 (regsets_store_inferior_registers): New regsets_info parameter.
2362 Adjust to use it.
2363 (linux_register_in_regsets): New regs_info parameter. Adjust to
2364 use it.
2365 (register_addr, fetch_register, store_register): New usrregs_info
2366 parameter. Adjust to use it.
2367 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
2368 parameter regs_info. Adjust to use it.
2369 (linux_fetch_registers): Get the current inferior's regs_info, and
2370 adjust to use it.
2371 (linux_store_registers): Ditto.
2372 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
2373 (initialize_low): Don't initialize the target_regsets here. Call
2374 initialize_low_arch.
2375 * linux-low.h (target_regsets): Delete declaration.
2376 (struct regsets_info): New.
2377 (struct usrregs_info): New.
2378 (struct regs_info): New.
2379 (struct process_info_private) <new_inferior>: New field.
2380 (struct linux_target_ops): Delete the num_regs, regmap, and
2381 regset_bitmap fields. New field regs_info.
2382 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
2383 * i387-fp.c (num_xmm_registers): Delete.
2384 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
2385 calls to new interface.
2386 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
2387 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
2388 Infer the number of xmm registers from the regcache's target
2389 description.
2390 * i387-fp.h (num_xmm_registers): Delete.
2391 * inferiors.c (add_thread): Don't install the thread's regcache
2392 here.
2393 * proc-service.c (gregset_info): Fetch the current inferior's
2394 regs_info. Adjust to use it.
2395 * regcache.c: Include tdesc.h.
2396 (register_bytes, reg_defs, num_registers)
2397 (gdbserver_expedite_regs): Delete.
2398 (get_thread_regcache): If the thread doesn't have a regcache yet,
2399 create one, instead of aborting gdbserver.
2400 (regcache_invalidate_one): Rename to ...
2401 (regcache_invalidate_thread): ... this.
2402 (regcache_invalidate_one): New.
2403 (regcache_invalidate): Only invalidate registers of the current
2404 process.
2405 (init_register_cache): Add target_desc parameter, and use it.
2406 (new_register_cache): Ditto. Assert the target description has a
2407 non zero registers_size.
2408 (regcache_cpy): Add assertions. Adjust.
2409 (realloc_register_cache, set_register_cache): Delete.
2410 (registers_to_string, registers_from_string): Adjust.
2411 (find_register_by_name, find_regno, find_register_by_number)
2412 (register_cache_size): Add target_desc parameter, and use it.
2413 (free_register_cache_thread, free_register_cache_thread_one)
2414 (regcache_release, register_cache_size): New.
2415 (register_size): Add target_desc parameter, and use it.
2416 (register_data, supply_register, supply_register_zeroed)
2417 (supply_regblock, supply_register_by_name, collect_register)
2418 (collect_register_as_string, collect_register_by_name): Adjust.
2419 * regcache.h (struct target_desc): Forward declare.
2420 (struct regcache) <tdesc>: New field.
2421 (init_register_cache, new_register_cache): Add target_desc
2422 parameter.
2423 (regcache_invalidate_thread): Declare.
2424 (regcache_invalidate_one): Delete declaration.
2425 (regcache_release): Declare.
2426 (find_register_by_number, register_cache_size, register_size)
2427 (find_regno): Add target_desc parameter.
2428 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
2429 declarations.
2430 * remote-utils.c: Include tdesc.h.
2431 (outreg, prepare_resume_reply): Adjust.
2432 * server.c: Include tdesc.h.
2433 (gdbserver_xmltarget): Delete declaration.
2434 (get_features_xml, process_serial_event): Adjust.
2435 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
2436 declare.
2437 (struct process_info) <tdesc>: New field.
2438 (ipa_tdesc): Declare.
2439 * tdesc.c: New file.
2440 * tdesc.h: New file.
2441 * tracepoint.c: Include tdesc.h.
2442 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
2443 (get_context_regcache): Adjust to pass ipa_tdesc down.
2444 (do_action_at_tracepoint): Adjust to get the register cache size
2445 from the context regcache's description.
2446 (traceframe_walk_blocks): Adjust to get the register cache size
2447 from the current trace frame's description.
2448 (traceframe_get_pc): Adjust to get current trace frame's
2449 description and pass it down.
2450 (gdb_collect): Adjust to get the register cache size from the
2451 IPA's description.
2452 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
2453 (gdbserver_xmltarget): Delete.
2454 (initialize_low_tracepoint): Set the ipa's target description.
2455 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
2456 (initialize_low_tracepoint): Set the ipa's target description.
2457 * linux-x86-low.c: Include tdesc.h.
2458 [__x86_64__] (is_64bit_tdesc): New.
2459 (ps_get_thread_area, x86_get_thread_area): Use it.
2460 (i386_cannot_store_register): Rename to ...
2461 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
2462 (i386_cannot_fetch_register): Rename to ...
2463 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
2464 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
2465 to new interface.
2466 (target_regsets): Rename to ...
2467 (x86_regsets): ... this.
2468 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
2469 interface.
2470 (x86_siginfo_fixup): Use is_64bit_tdesc.
2471 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
2472 (tdesc_x32_avx_linux, tdesc_x32_linux)
2473 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
2474 Declare.
2475 (x86_linux_update_xmltarget): Delete.
2476 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
2477 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
2478 (AMD64_LINUX_USER64_CS): New.
2479 (x86_linux_read_description): New, based on
2480 x86_linux_update_xmltarget.
2481 (same_process_callback): New.
2482 (x86_arch_setup_process_callback): New.
2483 (x86_linux_update_xmltarget): New.
2484 (x86_regsets_info): New.
2485 (amd64_linux_regs_info): New.
2486 (i386_linux_usrregs_info): New.
2487 (i386_linux_regs_info): New.
2488 (x86_linux_regs_info): New.
2489 (x86_arch_setup): Reimplement.
2490 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
2491 (x86_emit_ops): Ditto.
2492 (the_low_target): Adjust. Install x86_linux_regs_info,
2493 x86_cannot_fetch_register, and x86_cannot_store_register.
2494 (initialize_low_arch): New.
2495 * linux-ia64-low.c (tdesc_ia64): Declare.
2496 (ia64_fetch_register): Adjust.
2497 (ia64_usrregs_info, regs_info): New globals.
2498 (ia64_regs_info): New function.
2499 (the_low_target): Adjust.
2500 (initialize_low_arch): New function.
2501 * linux-sparc-low.c (tdesc_sparc64): Declare.
2502 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
2503 Adjust.
2504 (sparc_arch_setup): New function.
2505 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
2506 (the_low_target): Adjust.
2507 (initialize_low_arch): New function.
2508 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
2509 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
2510 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
2511 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
2512 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
2513 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
2514 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
2515 (tdesc_powerpc_isa205_vsx64l): Declare.
2516 (ppc_cannot_store_register, ppc_collect_ptrace_register)
2517 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
2518 (ppc_set_pc, ppc_get_hwcap): Adjust.
2519 (ppc_usrregs_info): Forward declare.
2520 (!__powerpc64__) ppc_regmap_adjusted: New global.
2521 (ppc_arch_setup): Adjust to the current process'es target
2522 description.
2523 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
2524 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
2525 (ppc_store_evrregset): Adjust.
2526 (target_regsets): Rename to ...
2527 (ppc_regsets): ... this, and make static.
2528 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
2529 (ppc_regs_info): New function.
2530 (the_low_target): Adjust.
2531 (initialize_low_arch): New function.
2532 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
2533 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
2534 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
2535 (tdesc_s390x_linux64v2): Declare.
2536 (s390_collect_ptrace_register, s390_supply_ptrace_register)
2537 (s390_fill_gregset, s390_store_last_break): Adjust.
2538 (target_regsets): Rename to ...
2539 (s390_regsets): ... this, and make static.
2540 (s390_get_pc, s390_set_pc): Adjust.
2541 (s390_get_hwcap): New target_desc parameter, and use it.
2542 [__s390x__] (have_hwcap_s390_high_gprs): New global.
2543 (s390_arch_setup): Adjust to set the current process'es target
2544 description. Don't adjust the regmap.
2545 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
2546 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
2547 (regs_info_3264): New globals.
2548 (s390_regs_info): New function.
2549 (the_low_target): Adjust.
2550 (initialize_low_arch): New function.
2551 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
2552 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
2553 [__mips64] (init_registers_mips_linux)
2554 (init_registers_mips_dsp_linux): Delete defines.
2555 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
2556 (have_dsp): New global.
2557 (mips_read_description): New, based on mips_arch_setup.
2558 (mips_arch_setup): Reimplement.
2559 (get_usrregs_info): New function.
2560 (mips_cannot_fetch_register, mips_cannot_store_register)
2561 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
2562 (mips_fill_fpregset, mips_store_fpregset): Adjust.
2563 (target_regsets): Rename to ...
2564 (mips_regsets): ... this, and make static.
2565 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
2566 (dsp_regs_info, regs_info): New globals.
2567 (mips_regs_info): New function.
2568 (the_low_target): Adjust.
2569 (initialize_low_arch): New function.
2570 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
2571 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
2572 Declare.
2573 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
2574 (arm_read_description): New, with bits factored from
2575 arm_arch_setup.
2576 (arm_arch_setup): Reimplement.
2577 (target_regsets): Rename to ...
2578 (arm_regsets): ... this, and make static.
2579 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
2580 (arm_regs_info): New function.
2581 (the_low_target): Adjust.
2582 (initialize_low_arch): New function.
2583 * linux-m68k-low.c (tdesc_m68k): Declare.
2584 (target_regsets): Rename to ...
2585 (m68k_regsets): ... this, and make static.
2586 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
2587 (m68k_regs_info): New function.
2588 (m68k_arch_setup): New function.
2589 (the_low_target): Adjust.
2590 (initialize_low_arch): New function.
2591 * linux-sh-low.c (tdesc_sharch): Declare.
2592 (target_regsets): Rename to ...
2593 (sh_regsets): ... this, and make static.
2594 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
2595 (sh_regs_info, sh_arch_setup): New functions.
2596 (the_low_target): Adjust.
2597 (initialize_low_arch): New function.
2598 * linux-bfin-low.c (tdesc_bfin): Declare.
2599 (bfin_arch_setup): New function.
2600 (bfin_usrregs_info, regs_info): New globals.
2601 (bfin_regs_info): New function.
2602 (the_low_target): Adjust.
2603 (initialize_low_arch): New function.
2604 * linux-cris-low.c (tdesc_cris): Declare.
2605 (cris_arch_setup): New function.
2606 (cris_usrregs_info, regs_info): New globals.
2607 (cris_regs_info): New function.
2608 (the_low_target): Adjust.
2609 (initialize_low_arch): New function.
2610 * linux-cris-low.c (tdesc_crisv32): Declare.
2611 (cris_arch_setup): New function.
2612 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
2613 (cris_regs_info): New function.
2614 (the_low_target): Adjust.
2615 (initialize_low_arch): New function.
2616 * linux-m32r-low.c (tdesc_m32r): Declare.
2617 (m32r_arch_setup): New function.
2618 (m32r_usrregs_info, regs_info): New globals.
2619 (m32r_regs_info): Adjust.
2620 (initialize_low_arch): New function.
2621 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
2622 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
2623 (tic6x_usrregs_info): Forward declare.
2624 (tic6x_read_description): New function, based on ...
2625 (tic6x_arch_setup): ... this. Reimplement.
2626 (target_regsets): Rename to ...
2627 (tic6x_regsets): ... this, and make static.
2628 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
2629 (tic6x_regs_info): New function.
2630 (the_low_target): Adjust.
2631 (initialize_low_arch): New function.
2632 * linux-xtensa-low.c (tdesc_xtensa): Declare.
2633 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
2634 (target_regsets): Rename to ...
2635 (xtensa_regsets): ... this, and make static.
2636 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
2637 globals.
2638 (xtensa_arch_setup, xtensa_regs_info): New functions.
2639 (the_low_target): Adjust.
2640 (initialize_low_arch): New function.
2641 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
2642 (nios2_arch_setup): Set the current process'es tdesc.
2643 (target_regsets): Rename to ...
2644 (nios2_regsets): ... this.
2645 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
2646 (nios2_regs_info): New function.
2647 (the_low_target): Adjust.
2648 (initialize_low_arch): New function.
a261b8f5
PA
2649 * linux-aarch64-low.c (tdesc_aarch64): Declare.
2650 (aarch64_arch_setup): Set the current process'es tdesc.
2651 (target_regsets): Rename to ...
2652 (aarch64_regsets): ... this.
2653 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
2654 (aarch64_regs_info): New function.
2655 (the_low_target): Adjust.
2656 (initialize_low_arch): New function.
3aee8918
PA
2657 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
2658 globals.
2659 (target_regsets): Rename to ...
2660 (tile_regsets): ... this.
2661 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
2662 (tile_regs_info): New function.
2663 (tile_arch_setup): Set the current process'es tdesc.
2664 (the_low_target): Adjust.
2665 (initialize_low_arch): New function.
2666 * spu-low.c (tdesc_spu): Declare.
2667 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
2668 * win32-arm-low.c (tdesc_arm): Declare.
2669 (arm_arch_setup): New function.
2670 (the_low_target): Install arm_arch_setup instead of
2671 init_registers_arm.
2672 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
2673 (init_windows_x86): Rename to ...
2674 (i386_arch_setup): ... this. Set `win32_tdesc'.
2675 (the_low_target): Adjust.
2676 * win32-low.c (win32_tdesc): New global.
2677 (child_add_thread): Don't create the thread cache here.
2678 (do_initial_child_stuff): Set the new process'es tdesc.
2679 * win32-low.h (struct target_desc): Forward declare.
2680 (win32_tdesc): Declare.
2681 * lynx-i386-low.c (tdesc_i386): Declare global.
2682 (lynx_i386_arch_setup): Set `lynx_tdesc'.
2683 * lynx-low.c (lynx_tdesc): New global.
2684 (lynx_add_process): Set the new process'es tdesc.
2685 * lynx-low.h (struct target_desc): Forward declare.
2686 (lynx_tdesc): Declare global.
2687 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
2688 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
2689 * nto-low.c (nto_tdesc): New global.
2690 (do_attach): Set the new process'es tdesc.
2691 * nto-low.h (struct target_desc): Forward declare.
2692 (nto_tdesc): Declare.
2693 * nto-x86-low.c (tdesc_i386): Declare.
2694 (nto_x86_arch_setup): Set `nto_tdesc'.
2695
b1fbec62
GB
26962013-06-04 Gary Benson <gbenson@redhat.com>
2697
2698 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
2699 to qSupported response when appropriate.
2700 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
2701 with nonzero-length annex.
2702 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
2703 arguments supplied in annex.
2704
d1ec4ce7
DE
27052013-05-31 Doug Evans <dje@google.com>
2706
ac44adcb 2707 PR server/15594
d1ec4ce7
DE
2708 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
2709 64 bits in 64-cross-32 environment.
2710
9b25f2d3
PA
27112013-05-28 Pedro Alves <palves@redhat.com>
2712
2713 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
2714 (aarch64-without-fpu.c): Delete rule.
2715 * configure.srv (aarch64*-*-linux*): Remove references to
2716 aarch64-without-fpu.o and aarch64-without-fpu.xml.
2717 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
2718 declaration.
2719
6740dc9c
PA
27202013-05-24 Pedro Alves <palves@redhat.com>
2721
2722 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
2723 instead of strchr/decode_address. Error if the range isn't split
2724 with a ','. Don't assume there's be a ':' in the action.
2725
c2d6af84
PA
27262013-05-23 Yao Qi <yao@codesourcery.com>
2727 Pedro Alves <palves@redhat.com>
2728
2729 * linux-low.c (lwp_in_step_range): New function.
2730 (linux_wait_1): If the thread was range stepping and stopped
2731 outside the stepping range, report the stop to GDB. Otherwise,
2732 continue stepping. Add range stepping debug output.
2733 (linux_set_resume_request): Copy the step range from the resume
2734 request to the lwp.
2735 (linux_supports_range_stepping): New.
2736 (linux_target_ops) <supports_range_stepping>: Set to
2737 linux_supports_range_stepping.
2738 * linux-low.h (struct linux_target_ops)
2739 <supports_range_stepping>: New field.
2740 (struct lwp_info) <step_range_start, step_range_end>: New fields.
2741 * linux-x86-low.c (x86_supports_range_stepping): New.
2742 (the_low_target) <supports_range_stepping>: Set to
2743 x86_supports_range_stepping.
2744 * server.c (handle_v_cont): Handle 'r' action.
2745 (handle_v_requests): Append ";r" if the target supports range
2746 stepping.
2747 * target.h (struct thread_resume) <step_range_start,
2748 step_range_end>: New fields.
2749 (struct target_ops) <supports_range_stepping>:
2750 New field.
2751 (target_supports_range_stepping): New macro.
2752
58794e1a
JB
27532013-05-17 Joel Brobecker <brobecker@adacore.com>
2754
2755 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
2756 confusion in comment.
2757
d631c5a7
JB
27582013-05-17 Joel Brobecker <brobecker@adacore.com>
2759
2760 * lynx-low.c (struct process_info_private): New type.
2761 (lynx_add_process): New function.
2762 (lynx_create_inferior, lynx_attach): Replace calls to
2763 add_process by calls to lynx_add_process.
2764 (lynx_resume): If PTID is null, then try using
2765 current_process()->private->last_wait_event_ptid.
2766 Add comments.
2767 (lynx_clear_inferiors): Delete. The contents of that function
2768 has been inlined in lynx_mourn;
2769 (lynx_wait_1): Save the ptid in the process's private data.
2770 (lynx_mourn): Free the process' private data. Replace call
2771 to lynx_clear_inferiors by call to clear_inferiors.
2772
96f7a20f
YQ
27732013-05-17 Yao Qi <yao@codesourcery.com>
2774
2775 * i386-low.c (i386_length_and_rw_bits): Move the comment to
2776 the right place.
2777
db0dfaa0
LM
27782013-05-16 Luis Machado <lgustavo@codesourcery.com>
2779
2780 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
2781 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
2782 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
2783 PT_TEXT_END_ADDR guards. Update comments.
2784 (linux_target_op) <read_offsets>: Conditionally define to
2785 linux_read_offsets if the target is UCLIBC and if it defines
2786 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
2787
68f5f838
SL
27882013-05-06 Sandra Loosemore <sandra@codesourcery.com>
2789 Andrew Jenner <andrew@codesourcery.com>
2790
2791 * Makefile.in (SFILES): Add linux-nios2-low.c.
2792 (clean): Add action to delete nios2-linux.c.
2793 (nios2-linux.c): New rule.
2794 * configure.srv: Add nios2*-*-linux*.
2795 * linux-nios2-low.c: New.
2796
1ebff1fd
HAQ
27972013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
2798
2799 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
2800
f6150862
HZ
28012013-04-25 Hui Zhu <hui@codesourcery.com>
2802
2803 PR gdb/15186
f6150862
HZ
2804 * ax.c (ax_printf): Add fflush.
2805
614c279d
TT
28062013-04-22 Tom Tromey <tromey@redhat.com>
2807
2808 * Makefile.in (SFILES): Add filestuff.c.
2809 (OBS): Add filestuff.o.
2810 (filestuff.o): New target.
2811 * config.in, configure: Rebuild.
2812 * configure.ac: Check for fdwalk, pipe2.
2813
7d4e5717
PA
28142013-04-17 Pedro Alves <palves@redhat.com>
2815
2816 * configure.ac (USE_THREAD_DB): Delete variable.
2817 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
2818 Don't AC_SUBST USE_THREAD_DB.
2819 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
2820 * config.in, configure: Regenerate.
2821
d5c93e41
PA
28222013-04-16 Pedro Alves <palves@redhat.com>
2823
2824 * linux-low.h (struct lwp_info) <thread_known>: Move under
2825 the USE_THREAD_DB #ifdef.
2826
04f5fe89
PA
28272013-04-16 Pedro Alves <palves@redhat.com>
2828
2829 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
2830 (linux-low.o): Delete rule.
2831 * linux-low.h: Always include "gdb_thread_db.h" instead of
2832 conditionally including thread_db.h.
2833 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
2834 HAVE_THREAD_DB_H.
2835
480b27bf
JK
28362013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
2837
2838 * Makefile.in (install-only): Fix make install regression.
2839
43662968
JK
28402013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
2841
2842 Convert man pages to texinfo, new gdbinit.5 texinfo page.
2843 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
2844 installation.
2845 * gdbserver.1: Remove.
2846
3e74e146
PA
28472013-03-22 Pedro Alves <palves@redhat.com>
2848
2849 * linux-low.c (handle_extended_wait): Don't call
2850 linux_enable_event_reporting.
2851
a8347a2a
TT
28522013-03-15 Tony Theodore <tonyt@logyst.com>
2853
2854 PR build/9098:
2855 * Makefile.in (SHELL): Use @SHELL@.
2856
eeb56fa7
SDJ
28572013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
2858
2859 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
2860 compiler warning.
2861
4fa7e2ff
JB
28622013-03-13 Joel Brobecker <brobecker@adacore.com>
2863
2864 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
2865 Remove extraneous NULL element.
2866
8ddb1965
YQ
28672013-03-13 Yao Qi <yao@codesourcery.com>
2868
2869 * tracepoint.c (traceframe_read_tsv): Look for the last matched
2870 'V' block in trace frame.
2871
9accd112
MM
28722013-03-11 Markus Metzger <markus.t.metzger@intel.com>
2873
2874 * target.h (struct target_ops): Add btrace ops.
2875 (target_supports_btrace): New macro.
2876 (target_enable_btrace): New macro.
2877 (target_disable_btrace): New macro.
2878 (target_read_btrace): New macro.
2879 * gdbthread.h (struct thread_info): Add btrace field.
2880 * server.c: Include btrace-common.h.
2881 (handle_btrace_general_set): New function.
2882 (handle_btrace_enable): New function.
2883 (handle_btrace_disable): New function.
2884 (handle_general_set): Call handle_btrace_general_set.
2885 (handle_qxfer_btrace): New function.
2886 (struct qxfer qxfer_packets[]): Add btrace entry.
2887 * inferiors.c (remove_thread): Disable btrace.
2888 * linux-low: Include linux-btrace.h.
2889 (linux_low_enable_btrace): New function.
2890 (linux_low_read_btrace): New function.
2891 (linux_target_ops): Add btrace ops.
2892 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
2893 Add srv_linux_btrace=yes.
2894 (x86_64-*-linux*): Add linux-btrace.o.
2895 Add srv_linux_btrace=yes.
2896 * configure.ac: Define HAVE_LINUX_BTRACE.
2897 * config.in: Regenerated.
2898 * configure: Regenerated.
2899
5cc22e4c
MM
29002013-03-11 Markus Metzger <markus.t.metzger@intel.com>
2901
2902 * server.c (handle_qxfer): Preserve error message if -3 is
2903 returned.
2904 (qxfer): Document the -3 return value.
2905
7c97f91e
MM
29062013-03-11 Markus Metzger <markus.t.metzger@intel.com>
2907
2908 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
2909 (linux_btrace_h): New variable.
2910 (linux-btrace.o): New rule.
2911
be9a119c 29122013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
2913 Hafiz Abid Qadeer <abidh@codesourcery.com>
2914
2915 * tracepoint.c (trace_buffer_size): New global.
2916 (DEFAULT_TRACE_BUFFER_SIZE): New define.
2917 (init_trace_buffer): Change to one-argument function. Allocate
2918 trace buffer memory.
2919 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
2920 handle QTBuffer:size packet.
2921 (cmd_bigqtbuffer_size): New function.
2922 (initialize_tracepoint): Call init_trace_buffer with
2923 DEFAULT_TRACE_BUFFER_SIZE.
2924 * server.c (handle_query): Add QTBuffer:size in the
2925 supported packets.
2926
e64f7499
YQ
29272013-03-07 Yao Qi <yao@codesourcery.com>
2928
2929 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
2930 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
2931 of -1.
2932 (cmd_qtsp): Adjust condition. Do post increment.
2933 Set cur_action and cur_step_action back to 0.
2934
f0ae6fc3
PA
29352013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
2936
2937 PR server/15236
2938 * linux-low.c (linux_write_memory): Return early success if LEN is
2939 zero.
2940
b5b0b0af
CV
29412013-03-05 Corinna Vinschen <vinschen@redhat.de>
2942
334ad4a8 2943 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 2944
589bc927
TT
29452013-02-28 Tom Tromey <tromey@redhat.com>
2946
2947 * configure.ac: Invoke AC_SYS_LARGEFILE.
2948 * configure, config.in: Rebuild.
2949
dfe07582
CV
29502013-02-28 Corinna Vinschen <vinschen@redhat.com>
2951
2952 * win32-low.c: Throughout, fix format strings and casts of
2953 printf-like functions to avoid type related warnings on all
2954 platforms.
2955 (get_child_debug_event): Print dwDebugEventCode as hex since
2956 that's how it's usually documented.
2957
736cd585
YQ
29582013-02-28 Yao Qi <yao@codesourcery.com>
2959
2960 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
2961 pulongest.
2962
e1f58301
JW
29632013-02-27 Jiong Wang <jiwang@tilera.com>
2964
2965 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
2966 (reg-tilegx32.c): New rule.
2967 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
2968 * linux-tile-low.c (tile_arch_setup): New function. Invoke
2969 different register info initializer according to elf class.
2970 (init_registers_tilgx32): New function. The tilegx32 register info
2971 initializer.
2972 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
2973 (tile_store_gregset): Likewise.
2974
d171ca78
YQ
29752013-02-27 Yao Qi <yao@codesourcery.com>
2976
2977 * server.c (process_point_options): Print debug message when
2978 debug_threads is true.
2979
282bbdf3
YQ
29802013-02-26 Yao Qi <yao@codesourcery.com>
2981
2982 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
2983
aca22551
PA
29842013-02-19 Pedro Alves <palves@redhat.com>
2985 Kai Tietz <ktietz@redhat.com>
2986
2987 PR gdb/15161
2988
2989 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
2990 instead of strtoul to extract address from packet.
2991 (process_serial_event) <'z'>: Likewise.
2992
4f3cee1c
YQ
29932013-02-18 Yao Qi <yao@codesourcery.com>
2994
2995 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
2996
8e1d55a3
PA
29972013-02-14 Pedro Alves <palves@redhat.com>
2998
2999 Plug memory leak.
3000
3001 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
3002 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
3003
458820da
PA
30042013-02-14 Pedro Alves <palves@redhat.com>
3005
3006 * tracepoint.c (cmd_qtdpsrc): Use savestring.
3007
baea0dae
PA
30082013-02-14 Pedro Alves <palves@redhat.com>
3009
3010 * tracepoint.c (save_string): Delete.
3011 (add_tracepoint_action): Use savestring instead of save_string.
3012
0b1afbb3
PA
30132013-02-12 Pedro Alves <palves@redhat.com>
3014
3015 * linux-xtensa-low.c: Ditto.
3016 * xtensa-xtregs.c: Ditto.
3017
8a4ac37e
PA
30182013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
3019
3020 * thread-db.c (thread_db_get_tls_address): NULL pointer check
3021 thread_db.
3022
148de6bb
MS
30232013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
3024
3025 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
3026 aarch64_num_wp_regs and aarch64_num_bp_regs to
3027 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
3028
55fac6e0
MS
30292013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
3030
3031 * linux-aarch64-low.c (ps_get_thread_area): Replace
3032 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
3033
176eb98c
MS
30342013-02-04 Jim MacArthur <jim.macarthur@arm.com>
3035 Marcus Shawcroft <marcus.shawcroft@arm.com>
3036 Nigel Stephens <nigel.stephens@arm.com>
3037 Yufeng Zhang <yufeng.zhang@arm.com>
3038
3039 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
3040 (aarch64.c, aarch64-without-fpu.c): New targets.
3041 * configure.srv (aarch64*-*-linux*): New.
3042 * linux-aarch64-low.c: New file.
3043
56f7af9c
MS
30442013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
3045
43aaf8b6 3046 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
3047 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
3048 (dequeue_one_deferred_signal, linux_resume_one_thread)
3049 (fetch_register, linux_write_memory, linux_enable_event_reporting)
3050 (linux_tracefork_grandchild, linux_test_for_tracefork)
3051 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
3052 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
3053 where the argument is 0.
3054
60f662b0
YQ
30552013-01-25 Yao Qi <yao@codesourcery.com>
3056
3057 * event-loop.c: Include "queue.h".
3058 (gdb_event_p): New typedef.
3059 (struct gdb_event) <next_event>: Remove.
3060 (event_queue): Change to QUEUE(gdb_event_p).
3061 (async_queue_event): Remove.
3062 (gdb_event_xfree): New.
3063 (initialize_event_loop): New.
3064 (process_event): Use API from QUEUE.
3065 (wait_for_event): Likewise.
3066 * server.c (main): Call initialize_event_loop.
3067 * server.h (initialize_event_loop): Declare.
3068
5ae4861a
YQ
30692013-01-18 Yao Qi <yao@codesourcery.com>
3070
3071 * ax.h (struct eval_agent_expr_context): New.
3072 (gdb_eval_agent_expr): Update declaration.
3073 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
3074 TFRAME. Add new argument CTX.
3075 * server.h (struct eval_agent_expr_context): Declare.
3076 (agent_mem_read, agent_tsv_read): Update declaration.
3077 (agent_mem_read_string): Likewise.
3078 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
3079 (add_traceframe_block): Add new argument TPOINT.
3080 Increase TPOINT->traceframe_usage.
3081 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
3082 eval_tracepoint_agent_expr.
3083 (condition_true_at_tracepoint): Likewise.
3084 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
3085 (agent_mem_read_string, agent_tsv_read): Likewise.
3086
85e00e85
YQ
30872013-01-16 Yao Qi <yao@codesourcery.com>
3088
3089 * linux-low.c (linux_resume_one_lwp): Don't check
3090 'lwp->bp_reinsert != 0'.
3091
4039cf45
JB
30922013-01-07 Joel Brobecker <brobecker@adacore.com>
3093 Pedro Alves <palves@redhat.com>
3094
3095 * lynx-low.c (ptrace_request_to_str): Define a temporary
3096 macro and use it to simplify this function's implementation.
3097
9044dee2
JB
30982013-01-07 Joel Brobecker <brobecker@adacore.com>
3099
3100 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
3101 sets errno.
3102
e6352c8f
JB
31032013-01-07 Joel Brobecker <brobecker@adacore.com>
3104
3105 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
3106
50681a27
JB
31072013-01-07 Joel Brobecker <brobecker@adacore.com>
3108
3109 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
3110
3f6e77ef
JB
31112013-01-07 Joel Brobecker <brobecker@adacore.com>
3112
3113 * lynx-low.c (lynx_resume): Use the resume_info parameter
3114 to determine the ptid for the lynx_ptrace call, unless
3115 it is equal to minus_one_ptid, in which case we use the
3116 ptid of the current_inferior.
3117 (lynx_wait_1): After having received a thread create/exit
3118 event, resume the inferior's execution using the signaling
3119 thread's ptid, rather than the old ptid.
3120
7fda33ae
JB
31212013-01-07 Joel Brobecker <brobecker@adacore.com>
3122
3123 * lynx-low.c (lynx_resume): Delete variable ret.
3124
b9786c74
JB
31252013-01-01 Joel Brobecker <brobecker@adacore.com>
3126
3127 * gdbreplay.c (gdbreplay_version): Update copyright year.
3128 * server.c (gdbserver_version): Likewise.
3129
8b93d60f
JB
31302012-12-17 Joel Brobecker <brobecker@adacore.com>
3131
3132 * lynx-low.c (lynx_wait_1): Add debug trace before adding
3133 new thread.
3134
037335a7
JB
31352012-12-17 Joel Brobecker <brobecker@adacore.com>
3136
3137 * lynx-low.c (ptrace_request_to_str): Add handling for
3138 PTRACE_GETTRACESIG.
3139
52d4cbd8
JB
31402012-12-17 Joel Brobecker <brobecker@adacore.com>
3141
3142 * lynx-low.c (lynx_attach): Delete variable new_process.
3143
ab8f6ca9
JB
31442012-12-17 Joel Brobecker <brobecker@adacore.com>
3145
3146 * lynx-low.c (lynx_create_inferior): Delete variable
3147 new_process.
3148
78cbc024
JB
31492012-12-17 Joel Brobecker <brobecker@adacore.com>
3150
3151 * lynx-low.c (ptrace_request_to_str): Do not handle
3152 PTRACE_GETTHREADLIST if this macro does not exist.
3153
14a00470
YQ
31542012-12-15 Yao Qi <yao@codesourcery.com>
3155
3156 * Makefile.in (OBS): Add notif.o.
3157 * notif.c, notif.h: New.
3158 * server.c: Include "notif.h".
3159 (struct vstop_notif) <next>: Remove.
3160 <base>: New field.
3161 (queue_stop_reply): Update.
3162 (push_event, send_next_stop_reply): Remove.
3163 (discard_queued_stop_replies): Update.
3164 (notif_stop): New variable.
3165 (handle_v_stopped): Remove.
3166 (handle_v_requests): Don't call handle_v_stopped. Call
3167 handle_ack_notif instead.
3168 (queue_stop_reply_callback): Call notif_event_enque instead
3169 of queue_stop_reply.
3170 (handle_status): Don't call send_next_stop_reply, call
3171 notif_write_event instead.
3172 (kill_inferior_callback): Likewise.
3173 (detach_or_kill_inferior_callback): Likewise.
3174 (main): Call initialize_notif.
3175 (process_serial_event): Call QUEUE_is_empty.
3176 (handle_target_event): Call notif_push instead of push event.
3177 * server.h (push_event): Remove declaration.
3178
61c125b9
TT
31792012-12-10 Tom Tromey <tromey@redhat.com>
3180
3181 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
3182 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
3183 macros.
3184 (.c.o): Rewrite.
3185 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
3186 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
3187 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
3188 (amd64-linux-ipa.o, ax.o): Rewrite.
3189 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
3190 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
3191 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
3192 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
3193 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
3194 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
3195 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
3196 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
3197 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
3198 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
3199 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
3200 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
3201 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
3202 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
3203 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
3204 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
3205 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
3206 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
3207 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
3208 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
3209 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
3210 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
3211 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
3212 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
3213 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
3214 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
3215 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
3216 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
3217 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
3218 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
3219 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
3220 (reg-tilegx.o): Remove.
3221 (all_object_files): New macro.
3222 Include .deps files.
3223 * aclocal.m4, configure: Rebuild.
3224 * acinclude.m4: Include depstand.m4, lead-dot.m4.
3225 * configure.ac: Invoke ZW_CREATE_DEPDIR,
3226 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
3227
e90e9ad9
TT
32282012-12-05 Tom Tromey <tromey@redhat.com>
3229
3230 PR gdb/14917:
3231 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
3232
02d403bf 32332012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
3234
3235 * configure.ac: Check for linux/perf_event.h.
3236 * config.in: Regenerated.
3237 * configure: Regenerated.
3238
0270a750
PA
32392012-11-26 Maxime Villard <rustyBSD@gmx.fr>
3240
3241 * hostio.c (handle_readlink): Decrease buffer size
3242 parameter passed to readlink by one byte.
3243
8c29b58e
YQ
32442012-11-26 Yao Qi <yao@codesourcery.com>
3245
3246 * configure.ac (build_warnings): Append '-Wempty-body'.
3247 * configure: Regenerated.
3248 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
3249 body.
3250
8bdce1ff
PM
32512012-11-15 Pierre Muller <muller@sourceware.org>
3252
3253 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
3254 * config.in: Regenerate.
3255 * configure: Regenerate.
3256 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
3257 Use "gdb_wait.h" header instead of <sys/wait.h> header.
3258 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
3259 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
3260 header.
3261 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
3262 instead of <sys/wait.h> header.
3263 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
3264
02d403bf 32652012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
3266
3267 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
3268 (various make rules): Remove -DGDBSERVER
3269
fbd5db48
YQ
32702012-11-09 Yao Qi <yao@codesourcery.com>
3271
3272 * spu-low.c (current_ptid): Move it to ..
3273 * gdbthread.h: ... here. New.
3274 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
3275 * server.c (myresume, process_serial_event): Likewise.
3276 * thread-db.c (thread_db_find_new_threads): Likewise.
3277 * tracepoint.c (run_inferior_command): Likewise.
3278
b3dc46ff
AB
32792012-10-01 Andrew Burgess <aburgess@broadcom.com>
3280
3281 * server.c (handle_search_memory_1): Include access length in
3282 warning message.
3283
07c04788
HPN
32842012-09-05 Michael Brandt <michael.brandt@axis.com>
3285
3286 * linux-crisv32-low.c: Fix compile errors.
3287
918d227b
YQ
32882012-09-04 Yao Qi <yao@codesourcery.com>
3289
3290 * tracepoint.c (cmd_qtsv): Adjust debug message.
3291 Don't check CUR_TPOINT.
3292
18c1b81a
YQ
32932012-08-28 Yao Qi <yao@codesourcery.com>
3294
3295 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
3296 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
3297 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
3298 Remove declarations of xmalloc, xreallloc, xstrdup and
3299 freeargv.
3300 * Makefile.in (libiberty_h): New.
3301 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
3302 (linux-bfin-low.o): Append dependency 'libiberty.h'.
3303
dc82f37b
YQ
33042012-08-23 Yao Qi <yao@codesourcery.com>
3305
3306 * server.h: Remove declaration of 'xsnprintf'.
3307
406b1477
KS
33082012-08-22 Keith Seitz <keiths@redhat.com>
3309
3310 * server.h: Include build-gnulib-gbserver/config.h.
3311 * gdbreplay.c: Likewise.
3312
e6712ff1
DE
33132012-08-08 Doug Evans <dje@google.com>
3314
3315 * Makefile.in (SFILES): Add gdb_vecs.c.
3316 (OBS): Add gdb_vecs.o.
3317 (gdb_vecs_h, host_defs_h): New variables.
3318 (thread-db.o): Add $(gdb_vecs_h) dependency.
3319 (gdb_vecs.o): New rule.
3320 * thread-db.c: #include "gdb_vecs.h".
3321 (thread_db_load_search): Use a vector to iterate over path elements.
3322 Handle text appearing after "$pdir".
3323
3324 * configure.ac: Add check for strstr.
3325 * config.in: Regenerate.
3326 * configure: Regenerate.
3327
7c3270ae
UW
33282012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
3329
3330 * hostio.c (handle_pread): If pread fails, fall back to attempting
3331 lseek/read.
3332 (handle_pwrite): Likewise for pwrite.
3333
b62e2b27
UW
33342012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
3335
3336 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
3337 between unsupported TYPE and unimplementable ADDR/LEN combination.
3338 (arm_insert_point): Act on new return value.
3339
78a99e91
PA
33402012-07-31 Pedro Alves <palves@redhat.com>
3341
3342 * server.c (process_point_options): Only skip tokens if we find
3343 one that is unrecognized. Don't treat 'X' specially while
3344 skipping unrecognized tokens.
3345
fcf303ab
UW
33462012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
3347
3348 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
3349 to 4-byte-align HW breakpoint addresses for Thumb.
3350
7255706c
YQ
33512012-07-27 Yao Qi <yao@codesourcery.com>
3352
3353 PR remote/14161.
3354
3355 * server.h: Declare gdb_agent_about_to_close.
3356 * target.c (kill_inferior): Include "agent.h".
3357 New. Send command 'kill'.
3358 * target.h (kill_inferior): Removed macro.
3359 * tracepoint.c (gdb_agent_about_to_close): New.
3360 (gdb_agent_helper_thread): Handle command 'close'.
3361 Wait endlessly until the inferior stops.
3362 Install gdb_agent_remove_socket to atexit hook.
3363 (agent_socket_name): New static variable.
3364 (gdb_agent_socket_init): Replace local variable 'name' with
3365 'agent_socket_name'.
3366 (gdb_agent_remove_socket): New.
3367
5a3f286f
YQ
33682012-07-27 Yao Qi <yao@codesourcery.com>
3369
3370 * server.c (process_point_options): Stop at 'X' when parsing.
3371
961bd387
ME
33722012-07-19 Michael Eager <eager@eagercon.com>
3373
a261b8f5 3374 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
3375 to hw_execute.
3376 * linux-x86-low.c (x86_insert_point, x86_remove_point):
3377 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
3378 hardware breakpoint.
3379
aa7c7447
JK
33802012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
3381
3382 * gdbserver/linux-low.c (initialize_low): Call
3383 linux_ptrace_init_warnings.
3384
7f216e7c
DE
33852012-07-02 Doug Evans <dje@google.com>
3386
3387 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
3388 pointer to int.
3389
d3ce09f5
SS
33902012-07-02 Stan Shebs <stan@codesourcery.com>
3391
3392 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
3393 (ax.o): Add it to build rule.
3394 (ax-ipa.o): Ditto.
3395 (OBS): Add format.o.
3396 (IPA_OBS): Add format.o.
3397 * server.c (handle_query): Claim support for breakpoint commands.
3398 (process_point_options): Add command case.
3399 (process_serial_event): Leave running if there are printfs in
3400 effect.
3401 * mem-break.h (any_persistent_commands): Declare.
3402 (add_breakpoint_commands): Declare.
3403 (gdb_no_commands_at_breakpoint): Declare.
3404 (run_breakpoint_commands): Declare.
3405 * mem-break.c (struct point_command_list): New struct.
3406 (struct breakpoint): New field command_list.
3407 (any_persistent_commands): New function.
3408 (add_commands_to_breakpoint): New function.
3409 (add_breakpoint_commands): New function.
3410 (gdb_no_commands_at_breakpoint): New function.
3411 (run_breakpoint_commands): New function.
3412 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
3413 locally.
3414 * ax.c: Include format.h.
3415 (ax_printf): New function.
3416 (gdb_eval_agent_expr): Add printf opcode.
3417
2f8f6aed
YQ
34182012-06-13 Yao Qi <yao@codesourcery.com>
3419
3420 * server.c (start_inferior): Remove duplicated writes to fields
3421 'last_resume_kind' and 'last_status' of 'current_inferior'.
3422
0c9070b3
YQ
34232012-06-12 Yao Qi <yao@codesourcery.com>
3424 Pedro Alves <palves@redhat.com>
3425
3426 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
3427 comment.
3428 * server.c (handle_v_cont): Extend comment.
3429
c52daf70
YQ
34302012-06-11 Yao Qi <yao@codesourcery.com>
3431
3432 * linux-low.c (linux_attach): Add 'static'.
3433
d38bbb0a
YQ
34342012-06-06 Yao Qi <yao@codesourcery.com>
3435
3436 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
3437
89dc0afd
JK
34382012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
3439
3440 Fix gcc -flto compilation warning.
3441 * server.c (main): Make variable multi_mode and attach volatile.
3442
75f62ce7
TJB
34432012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
3444
3445 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
3446 if the platform doesn't know about it.
3447
65f479b6
PA
34482012-05-30 Jeff Kenton <jkenton@tilera.com>
3449
3450 * Makefile.in (SFILES): Add linux-tile-low.c.
3451 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
3452 * configure.srv: Handle tilegx-*-linux*.
3453 * linux-tile-low.c: New file.
3454
0c5bf5a9
JK
34552012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
3456
3457 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
3458
a493e3e2
PA
34592012-05-24 Pedro Alves <palves@redhat.com>
3460
3461 PR gdb/7205
3462
43aaf8b6 3463 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 3464
2ea28649
PA
34652012-05-24 Pedro Alves <palves@redhat.com>
3466
3467 PR gdb/7205
3468
3469 Replace target_signal with gdb_signal throughout.
3470
8d409d16
MR
34712012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
3472
3473 * linux-low.c (linux_store_registers): Avoid the copying sequence
3474 when no data has been retrieved by ptrace.
3475
23512c01
MGD
34762012-05-22 Will Deacon <will.deacon@arm.com>
3477
3478 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
3479 Include asm/ptrace.h.
3480 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
3481 already defined.
3482
4934b29e
MR
34832012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
3484
3485 * linux-low.c (linux_store_registers): Don't re-retrieve data
3486 with ptrace that has already been obtained from /proc. Always
3487 copy any data retrieved with ptrace to the buffer supplied.
3488
bde24c0a
PA
34892012-05-11 Yao Qi <yao@codesourcery.com>
3490 Pedro Alves <palves@redhat.com>
3491
3492 * linux-low.c (enum stopping_threads_kind): New.
3493 (stopping_threads): Change type to `enum stopping_threads_kind'.
3494 (handle_extended_wait): If stopping and suspending threads, leave
3495 the new_lwp suspended too.
3496 (linux_wait_for_event): Adjust.
3497 (stop_all_lwps): Set `stopping_threads' to
3498 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
3499 whether we're suspending threads or just stopping them. Assert no
3500 recursion happens.
3501
623b6bdf
YQ
35022012-04-29 Yao Qi <yao@codesourcery.com>
3503
3504 * server.h: Move some code to ...
3505 * gdbthread.h: ... here. New.
3506 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
3507 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
3508 (nto-low.o, win32-low.o): Likewise.
3509 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
3510 * regcache.c, remote-utils.c, server.c: Likewise.
3511 * target.c, tracepoint.c, win32-low.c: Likewise.
3512
f15f9948
TJB
35132012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
3514
3515 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
3516 (PTRACE_ARG4_TYPE): Likewise.
3517 (PTRACE_XFER_TYPE): Likewise.
3518 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
3519 ptrace to PTRACE_ARG3_TYPE.
3520 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
3521 (PTRACE_ARG4_TYPE): Likewise.
3522 (PTRACE_XFER_TYPE): Likewise.
3523 (linux_detach_one_lwp): Cast fourth argument of
3524 ptrace to long then PTRACE_ARG4_TYPE.
3525 (regsets_fetch_inferior_registers): Cast third argument of
3526 ptrace to long then PTRACE_ARG3_TYPE.
3527 (regsets_store_inferior_registers): Likewise.
3528
38ea300a
PA
35292012-04-20 Pedro Alves <palves@redhat.com>
3530
3531 * configure: Regenerate.
3532
c971b7fa
PA
35332012-04-19 Pedro Alves <palves@redhat.com>
3534
43aaf8b6 3535 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 3536 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
3537 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
3538 (all, install-only, uninstall, clean-info, all-lib, clean): No
3539 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
3540 (maintainer-clean realclean distclean): Use subdir_do.
3541 (subdir_do): New.
3542 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 3543 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
3544 * acinclude.m4: Include acx_configure_dir.m4.
3545 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
3546 calls. Call AC_PROG_RANLIB. Configure gnulib using
3547 ACX_CONFIGURE_DIR.
3548 (GNULIB): New.
3549 (GNULIB_STDINT_H): Adjust.
3550 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
3551 * gdbreplay.c: Include build-gnulib/config.h.
3552 * server.h: Likewise.
3553 * aclocal.m4: Regenerate.
3554 * config.in: Regenerate.
3555 * configure: Regenerate.
c971b7fa 3556
809277f8
PA
35572012-04-19 Pedro Alves <palves@redhat.com>
3558
3559 * Makefile.in (LIBGNU, INCGNU): Adjust.
3560 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
3561 (all, install-only, uninstall, clean-info, all-lib, clean)
3562 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
3563 * configure.ac: Adjust AC_OUTPUT output.
3564 * aclocal.m4: Regenerate.
3565 * configure: Regenerate.
3566
fd9bb8b8
PA
35672012-04-19 Pedro Alves <palves@redhat.com>
3568
3569 * Makefile.in (generated_files): New.
3570 (server_h): Remove the explicit dependency on config.h, and depend
3571 on $generated_files.
3572
1c298c66
PA
35732012-04-19 Pedro Alves <palves@redhat.com>
3574
3575 * Makefile.in (INCGNU): Add -Ignulib.
3576
57c4b50b
PA
35772012-04-19 Pedro Alves <palves@redhat.com>
3578
3579 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
3580 (INCGNU): ... this, and spell out -I here.
3581 (GNULIB_LIB): Rename to ...
3582 (LIBGNU): ... this.
3583 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
3584
1030e047
PA
35852012-04-19 Pedro Alves <palves@redhat.com>
3586
3587 * config.in: Regenerate.
3588
447d4319
PA
35892012-04-19 Pedro Alves <palves@redhat.com>
3590
3591 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
3592 * server.h (memmem): Remove declaration.
3593 * config.in: Regenerate.
3594 * configure: Regenerate.
3595
aad9eab9
YQ
35962012-04-19 Yao Qi <yao@codesourcery.com>
3597
3598 * Makefile.in (SFILES): Add common/vec.c.
3599 (OBS): Add vec.o.
3600 (vec.o): New rule.
3601
3e10640f
YQ
36022012-04-19 Yao Qi <yao@codesourcery.com>
3603
3604 * remote-utils.c (prepare_resume_reply): Replace with macro
3605 target_core_of_thread.
3606 * server.c (handle_qxfer_threads_proper): Likewise.
3607 * target.h (traget_core_of_thread): New macro.
3608
71622373
PA
36092012-04-18 Pedro Alves <palves@redhat.com>
3610
3611 * aclocal.m4: Regenerate.
3612 * configure: Regenerate.
3613
80d26939
YQ
36142012-04-16 Yao Qi <yao@codesourcery.com>
3615
3616 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
3617 duplicated on address.
3618
42476b70
YQ
36192012-04-16 Yao Qi <yao@codesourcery.com>
3620
3621 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
3622 (struct tracepoint_action_ops) <send>: New field.
3623 (m_tracepoint_action_send, r_tracepoint_action_send): New.
3624 (agent_expr_send, x_tracepoint_action_send): New.
3625 (l_tracepoint_action_send): New.
3626 (cmd_qtdp): Download and install tracepoint
3627 according to `use_agent'.
3628 (run_inferior_command): Add one more parameter `len'.
3629 Update callers.
3630 (tracepoint_send_agent): New.
3631 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
3632
7bc83639
YQ
36332012-04-16 Yao Qi <yao@codesourcery.com>
3634
3635 * tracepoint.c (download_tracepoints): Moved to ...
3636 (cmd_qtstart): ... here.
3637
5f18041e
YQ
36382012-04-14 Yao Qi <yao@codesourcery.com>
3639
3640 * tracepoint.c: Include inttypes.h.
3641 (struct collect_memory_action): Use sized types.
3642 (struct tracepoint): Likewise.
3643 (cmd_qtdp, stop_tracing): Update print specifiers.
3644 (cmd_qtp, response_tracepoint): Likewise.
3645 (collect_data_at_tracepoint): Likewise.
3646 (collect_data_at_step): Likewise.
3647
55a8c076
YQ
36482012-04-14 Yao Qi <yao@codesourcery.com>
3649
3650 Import gnulib module inttypes.
3651 * aclocal.m4, config.in, configure: Regenerated.
3652
dc750257
YQ
36532012-04-14 Yao Qi <yao@codesourcery.com>
3654
3655 * Makefile.in (maintainer-clean, realclean, distclean): Remove
3656 Makefile and config.status at last.
3657
0ab5faf9
YQ
36582012-04-13 Yao Qi <yao@codesourcery.com>
3659
3660 * tracepoint.c: Include stdint.h unconditionally.
3661
18f5fd81
TJB
36622012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
3663
3664 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
3665 on BFD_HAVE_SYS_PROCFS_TYPE.
3666 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
3667 * configure: Regenerate.
3668 * config.in: Likewise.
3669
4d47af5c
L
36702012-04-13 H.J. Lu <hongjiu.lu@intel.com>
3671
3672 * Makefile.in (clean): Also remove x32.c x32-linux.c
3673 x32-avx.c x32-avx-linux.c.
3674 (x32.o): New target.
3675 (x32.c): Likewise.
3676 (x32-linux.o): Likewise.
3677 (x32-linux.c): Likewise.
3678 (x32-avx.o): Likewise.
3679 (x32-avx.c): Likewise.
3680 (x32-avx-linux.o): Likewise.
3681 (x32-avx-linux.c): Likewise.
3682
3683 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
3684 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
3685 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
3686 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
3687 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
3688 i386/x32-avx-linux.xml.
3689
3690 * linux-x86-low.c (init_registers_x32_linux): New prototype.
3691 (init_registers_x32_avx_linux): Likwise.
3692 (x86_linux_update_xmltarget): Call init_registers_x32_linux
3693 or init_registers_x32_avx_linux if linux_is_elf64 is false.
3694
ecedbe58
PA
36952012-04-13 Pedro Alves <palves@redhat.com>
3696
3697 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
3698 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
3699 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
3700 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
3701 the sub-make.
3702
c92b5177
L
37032012-04-12 H.J. Lu <hongjiu.lu@intel.com>
3704
3705 * linux-x86-low.c (compat_x32_clock_t): New.
3706 (compat_x32_siginfo_t): Likewise.
3707 (compat_x32_siginfo_from_siginfo): Likewise.
3708 (siginfo_from_compat_x32_siginfo): Likewise.
3709 (linux_is_elf64): Likewise.
3710 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
3711 and siginfo_from_compat_x32_siginfo for x32.
3712 (x86_arch_setup): Set linux_is_elf64.
3713
214d508e
L
37142012-04-12 H.J. Lu <hongjiu.lu@intel.com>
3715
3716 PR gdb/13969
3717 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
3718 e_machine field.
3719 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
3720 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
3721 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
3722 compatible with process.
3723
c9a1864a
YQ
37242012-04-12 Yao Qi <yao@codesourcery.com>
3725
3726 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
3727 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
3728 (install-only, install-info, clean): Handle sub dir gnulib.
3729 (all-lib, am--refresh): New targets.
3730 (memmem.o): Remove target.
3731 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
3732 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
3733 (AC_REPLACE_FUNCS): Remove memmem.
3734 Invoke gl_INIT and AM_INIT_AUTOMAKE.
3735 (AC_OUTPUT): Generate Makefile in gnulib/.
3736 * aclocal.m4, config.in, configure: Regenerated.
3737
367ba2c2
MR
37382012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
3739
3740 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
3741
9d236627
PA
37422012-04-05 Pedro Alves <palves@redhat.com>
3743
3744 -Werror=strict-aliasing
3745
3746 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
3747 pointer.
3748
111217b3
PA
37492012-04-04 Pedro Alves <palves@redhat.com>
3750
3751 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
3752 (sparc_store_gregset_from_stack, sparc_store_gregset)
3753 (sparc_breakpoint_at): Fix formatting.
3754
8365dcf5
TJB
37552012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
3756
3757 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
3758 are available.
3759 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
3760 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
3761 * config.in: Regenerate.
3762 * configure: Likewise.
3763
689cc2ae
PA
37642012-03-29 Pedro Alves <palves@redhat.com>
3765
3766 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
3767 Correct ptrace arguments.
3768
c14dfd32
PA
37692012-03-28 Pedro Alves <palves@redhat.com>
3770
3771 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
3772 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
3773 (IA64_FR1_REGNUM): New defines.
3774 (ia64_fetch_register): New.
3775 (the_low_target): Install it.
3776 * linux-low.h (struct linux_target_ops) <fetch_register>: New
3777 field.
3778 * linux-low.c (linux_fetch_registers): Try the
3779 the_low_target.fetch_register hook first.
3780
3781 * linux-arm-low.c (the_low_target): Adjust.
3782 * linux-bfin-low.c (the_low_target): Adjust.
3783 * linux-cris-low.c (the_low_target): Adjust.
3784 * linux-crisv32-low.c (the_low_target): Adjust.
3785 * linux-m32r-low.c (the_low_target): Adjust.
3786 * linux-m68k-low.c (the_low_target): Adjust.
3787 * linux-mips-low.c (the_low_target): Adjust.
3788 * linux-ppc-low.c (the_low_target): Adjust.
3789 * linux-s390-low.c (the_low_target): Adjust.
3790 * linux-sh-low.c (the_low_target): Adjust.
3791 * linux-sparc-low.c (the_low_target): Adjust.
3792 * linux-tic6x-low.c (the_low_target): Adjust.
3793 * linux-x86-low.c (the_low_target): Adjust.
3794 * linux-xtensa-low.c (the_low_target): Adjust.
3795
63c88e13
PA
37962012-03-26 Pedro Alves <palves@redhat.com>
3797
3798 * server.c (handle_qxfer_libraries): Don't bail early if
3799 the_target->qxfer_libraries_svr4 is not NULL.
3800
fb723180
PA
38012012-03-26 Pedro Alves <palves@redhat.com>
3802
3803 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
3804
0afae3cf
PA
38052012-03-23 Pedro Alves <palves@redhat.com>
3806
3807 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
3808 "library-list-svr4" element's start tag when the the DSO list is
3809 empty.
3810
485f1ee4
PA
38112012-03-23 Pedro Alves <palves@redhat.com>
3812
3813 * linux-low.c (read_one_ptr): Read the inferior's pointer through
3814 a variable whose type size is the same as the inferior's pointer
3815 size.
3816
a5362b9a
TS
38172012-03-21 Thomas Schwinge <thomas@codesourcery.com>
3818
3819 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
3820 struct siginfo.
3821 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
3822 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
3823 * linux-low.h: Include <signal.h>.
3824 (struct siginfo): Remove forward declaration.
3825 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
3826 struct siginfo.
3827
d226c142
MF
38282012-03-21 Mike Frysinger <vapier@gentoo.org>
3829
3830 * .gitignore: Ignore more files.
3831
122f36ef
PA
38322012-03-19 Pedro Alves <palves@redhat.com>
3833 Jan Kratochvil <jan.kratochvil@redhat.com>
3834
3835 * server.c (cont_thread, general_thread): Add describing comments.
3836 (start_inferior): Clear `cont_thread'.
3837 (handle_v_cont): Don't set `cont_thread' if resuming all threads
3838 of a process.
3839
fc3e5175
YQ
38402012-03-15 Yao Qi <yao@codesourcery.com>
3841
3842 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
3843 handling to ...
3844 (cmd_qtdp): ... here.
3845
8d0d92cd
YQ
38462012-03-15 Yao Qi <yao@codesourcery.com>
3847
3848 * tracepoint.c (struct tracepoint_action_ops): New.
3849 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
3850 (m_tracepoint_action_download): New.
3851 (r_tracepoint_action_download): New.
3852 (x_tracepoint_action_download): New.
3853 (l_tracepoint_action_download): New.
3854 (add_tracepoint_action): Install `action->ops' according type.
3855 (download_tracepoint_1): Move code `download' function pointer
3856 of various tracepoint_action_ops.
3857
87b0bb13
JK
38582012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
3859
3860 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
3861 linux_ptrace_attach_warnings.
3862
5f572dec
JK
38632012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
3864
3865 * Makefile.in (linux-ptrace.o): New.
3866 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
3867 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
3868 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
3869 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
3870 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
3871 of these targets.
3872 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
3873
f4647387
YQ
38742012-03-08 Yao Qi <yao@codesourcery.com>
3875 Pedro Alves <palves@redhat.com>
3876
3877 Fix PR server/13392.
3878 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
3879 offset of JMP insn.
3880 * tracepoint.c (remove_tracepoint): New.
3881 (cmd_qtdp): Call remove_tracepoint when failed to install.
3882
9b224c5e
PA
38832012-03-07 Pedro Alves <palves@redhat.com>
3884
3885 * linux-low.c (get_detach_signal): New.
3886 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
3887 Pass on pending signals to PTRACE_DETACH. Check the result of the
3888 ptrace call.
3889 * server.c (program_signals, program_signals_p): New.
3890 (handle_general_set): Handle QProgramSignals.
3891 * server.h (program_signals, program_signals_p): Declare.
3892
e237a7e2
JK
38932012-03-05 Pedro Alves <palves@redhat.com>
3894 Jan Kratochvil <jan.kratochvil@redhat.com>
3895
3896 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
3897 New comment why.
3898
5808517f
YQ
38992012-03-03 Yao Qi <yao@codesourcery.com>
3900
3901 * tracepoint.c (tracepoint_look_up_symbols): Update call to
3902 agent_look_up_symbols.
3903
58b4daa5
YQ
39042012-03-03 Yao Qi <yao@codesourcery.com>
3905
3906 * Makefile.in (linux-low.o): Keep dependence on agent.h.
3907 (linux-x86-low.o): Likewise.
3908 * server.h: Remove in_process_agent_loaded.
3909 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
3910 common/agent.c.
3911 Update callers.
3912
8ffcbaaf
YQ
39132012-03-03 Yao Qi <yao@codesourcery.com>
3914
3915 * tracepoint.c (gdb_agent_capability): New global.
3916 (in_process_agent_loaded_ust): Renamed to
3917 `in_process_agent_supports_ust'.
3918 Update callers.
3919 (in_process_agent_supports_ust): Call agent_capability_check.
3920 (clear_installed_tracepoints): Assert that agent supports
3921 agent.
3922
d1feda86
YQ
39232012-03-03 Yao Qi <yao@codesourcery.com>
3924
3925 * linux-low.c (linux_supports_agent): New.
3926 (linux_target_ops): Initialize field `supports_agent' with
3927 linux_supports_agent.
3928 * target.h (struct target_ops) <supports_agent>: New.
3929 (target_supports_agent): New macro.
3930 * server.c (handle_general_set): Handle packet 'QAgent'.
3931 (handle_query): Send `QAgent+'.
3932 * Makefile.in (server.o): Depends on agent.h.
3933
2fa291ac
YQ
39342012-03-03 Yao Qi <yao@codesourcery.com>
3935
3936 * Makefile.in (OBS): Add agent.o.
3937 Add new rule for agent.o.
3938 Track dependence of tracepoint.c on agent.h.
3939 * tracepoint.c (run_inferior_command_1):
3940 (run_inferior_command): Call agent_run_command.
3941 (gdb_ust_connect_sync_socket): Deleted. Move it to
3942 common/agent.c.
3943 (resume_thread, stop_thread): Likewise.
3944 (gdb_ust_socket_init): Renamed to ...
3945 (gdb_agent_socket_init): ... New.
3946 (gdb_ust_thread): Renamed to ...
3947 (gdb_agent_helper_thread): ... New.
3948 (gdb_ust_init): Move some code to ...
3949 (gdb_agent_init): ... here. New.
3950 [HAVE_UST]: Call gdb_ust_init.
3951 (initialize_tracepoint_ftlib): Call gdb_agent_init.
3952 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
3953 * config.in, configure: Regenerated.
3954
05044653
PA
39552012-03-02 Pedro Alves <palves@redhat.com>
3956
3957 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
3958 * linux-low.c (struct simple_pid_list): New.
3959 (stopped_pids): New a struct simple_pid_list pointer.
3960 (add_to_pid_list, pull_pid_from_list): New.
3961 (handle_extended_wait): Don't assume the first signal new children
3962 report is SIGSTOP. Adjust call to pull_pid_from_list.
3963 (linux_wait_for_lwp): Adjust.
3964
8d00225b
YQ
39652012-03-02 Yao Qi <yao@codesourcery.com>
3966
3967 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
3968 debug log.
3969
19560ba5
YQ
39702012-03-02 Yao Qi <yao@codesourcery.com>
3971
3972 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
3973 `stop_pc' and `tpoint'. Update caller.
3974
1faeff08
MR
39752012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
3976
3977 * linux-low.h (linux_target_ops): Add regset_bitmap member.
3978 * linux-low.c (use_linux_regsets): New macro.
3979 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
3980 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
3981 (linux_register_in_regsets): New function.
3982 (usr_fetch_inferior_registers): Skip registers covered by
3983 regsets.
3984 (usr_store_inferior_registers): Likewise.
3985 (usr_fetch_inferior_registers): New macro.
3986 (usr_store_inferior_registers): Likewise.
3987 (linux_fetch_registers): Handle mixed regset/non-regset targets.
3988 (linux_store_registers): Likewise.
3989 * linux-mips-low.c (init_registers_mips_dsp_linux): New
3990 prototype.
3991 (init_registers_mips64_dsp_linux): Likewise.
3992 (init_registers_mips_linux): New macro.
3993 (init_registers_mips_dsp_linux): Likewise.
3994 (mips_dsp_num_regs): Likewise.
3995 (DSP_BASE, DSP_CONTROL): New fallback macros.
3996 (mips_base_regs): New macro.
3997 (mips_regmap): Use it. Fix the size.
3998 (mips_dsp_regmap): New variable.
3999 (mips_dsp_regset_bitmap): Likewise.
4000 (mips_arch_setup): New function.
4001 (mips_cannot_fetch_register): Use the_low_target.regmap rather
4002 than mips_regmap.
4003 (mips_cannot_store_register): Likewise.
4004 (the_low_target): Update .arch_setup, .num_regs and .regmap
4005 initializers. Add .regset_bitmap initializer.
4006 * linux-arm-low.c (the_low_target): Add .regset_bitmap
4007 initializer.
4008 * linux-bfin-low.c (the_low_target): Likewise.
4009 * linux-cris-low.c (the_low_target): Likewise.
4010 * linux-crisv32-low.c (the_low_target): Likewise.
4011 * linux-ia64-low.c (the_low_target): Likewise.
4012 * linux-m32r-low.c (the_low_target): Likewise.
4013 * linux-m68k-low.c (the_low_target): Likewise.
4014 * linux-ppc-low.c (the_low_target): Likewise.
4015 * linux-s390-low.c (the_low_target): Likewise.
4016 * linux-sh-low.c (the_low_target): Likewise.
4017 * linux-sparc-low.c (the_low_target): Likewise.
4018 * linux-tic6x-low.c (the_low_target): Likewise.
4019 * linux-x86-low.c (the_low_target): Likewise.
4020 * linux-xtensa-low.c (the_low_target): Likewise.
4021 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
4022 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
4023 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
4024 srv_xmlfiles.
4025 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
4026 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
4027
c03e6ccc
YQ
40282012-02-29 Yao Qi <yao@codesourcery.com>
4029 Pedro Alves <palves@redhat.com>
4030
4031 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
4032 `step_over_finished' is true.
4033
644cebc9
PA
40342012-02-27 Pedro Alves <palves@redhat.com>
4035
4036 * linux-low.c (pid_is_stopped): Delete, moved to common/.
4037 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
4038
c14d7ab2
PA
40392012-02-27 Pedro Alves <palves@redhat.com>
4040
4041 PR server/9684
4042 * linux-low.c (pid_is_stopped): New.
4043 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
4044
412c89dd
LM
40452012-02-25 Luis Machado <lgustavo@codesourcery.com>
4046
4047 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
4048 of conditions.
4049
b745defe
MR
40502012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
4051
4052 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
4053
9f3a5c85
LM
40542012-02-24 Luis Machado <lgustavo@codesourcery>
4055
4056 * server.c (handle_query): Advertise support for target-side
4057 breakpoint condition evaluation.
4058 (process_point_options): New function.
4059 (process_serial_event): When inserting a breakpoint, check for
4060 a target-side condition that should be evaluated.
4061
4062 * mem-break.c: Include regcache.h and ax.h.
4063 (point_cond_list_t): New data structure.
4064 (breakpoint) <cond_list>: New field.
4065 (find_gdb_breakpoint_at): Make non-static.
4066 (delete_gdb_breakpoint_at): Clear any target-side
4067 conditions.
4068 (clear_gdb_breakpoint_conditions): New function.
4069 (add_condition_to_breakpoint): Likewise.
4070 (add_breakpoint_condition): Likewise.
4071 (gdb_condition_true_at_breakpoint): Likewise.
4072 (gdb_breakpoint_here): Return result directly instead
4073 of going through a local variable.
4074
4075 * mem-break.h (find_gdb_breakpoint_at): New prototype.
4076 (clear_gdb_breakpoint_conditions): Likewise.
4077 (add_breakpoint_condition): Likewise.
4078 (gdb_condition_true_at_breakpoint): Likewise.
4079
4080 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
4081 (need_step_over_p): Take target-side breakpoint condition into
4082 consideration.
4083
5e1dc496
LM
40842012-02-24 Luis Machado <lgustavo@codesourcery>
4085
4086 * server.h: Include tracepoint.h.
4087 (agent_mem_read, agent_get_trace_state_variable_value,
4088 agent_set_trace_state_variable_value,
4089 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
4090 get_set_tsv_func_addr): New prototypes.
4091
4092 * ax.h: New include file.
4093 * ax.c: New source file.
4094
4095 * tracepoint.c: Include ax.h.
4096 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
4097 agent_expr, eval_result_type): Move to ax.h.
4098 (parse_agent_expr): Rename to ...
4099 (gdb_parse_agent_expr): ... this, make it non-static and move
4100 to ax.h.
4101 (unparse_agent_expr) Rename to ...
4102 (gdb_unparse_agent_expr): ... this, make it non-static and move
4103 to ax.h.
4104 (eval_agent_expr): Rename to ...
4105 (eval_tracepoint_agent_expr): ... this.
4106 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
4107 forward declarations.
4108 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
4109 (agent_get_trace_state_variable_value): New function.
4110 (agent_set_trace_state_variable_value): New function.
4111 (cmd_qtdp): Call gdb_parse_agent_expr (...).
4112 (response_tracepoint): Call gdb_unparse_agent_expr (...).
4113 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
4114 (condition_true_at_tracepoint): Likewise.
4115 (parse_agent_expr): Rename to ...
4116 (gdb_parse_agent_expr): ... this and move to ax.c.
4117 (unparse_agent_expr): Rename to ...
4118 (gdb_unparse_agent_expr): ... this and move to ax.c.
4119 (gdb_agent_op_name): Move to ax.c.
4120 (eval_agent_expr): Rename to ...
4121 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
4122 and move to ax.c.
4123 (eval_tracepoint_agent_expr): New function.
4124 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 4125 non-static.
5e1dc496
LM
4126 (current_insn_ptr, emit_error, struct bytecode_address): Move to
4127 ax.c.
4128 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
4129 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
4130 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
4131 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
4132 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
4133 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
4134 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
4135 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
4136 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
4137 (compile_bytecodes): Remove forward declaration.
4138 (is_goto_target): Move to ax.c.
4139 (compile_bytecodes): Move to ax.c and call
4140 agent_get_trace_state_variable_value (...) and
4141 agent_set_trace_state_variable_value (...).
4142
4143 * Makefile.in: Update ax.c and IPA dependencies.
4144
277e4e52
PA
41452012-02-24 Pedro Alves <palves@redhat.com>
4146
4147 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
4148 (cmd_bigqtbuffer_circular): ... this. Only handle
4149 'QTBuffer:circular:'.
4150 (handle_tracepoint_general_set): Adjust.
4151
bf4c19f7
YQ
41522012-02-16 Yao Qi <yao@codesourcery.com>
4153
4154 * inferiors.c: Move code to ...
4155 * dll.c: .... here. New.
4156 * server.h: Declare clear_dlls.
4157 * Makefile.in (SFILES): Add dll.c.
4158 (OBS): Add dll.o
4159 (dll.o): New rule.
4160
d73f2619
YQ
41612012-02-11 Yao Qi <yao@codesourcery.com>
4162
4163 * server.c: (handle_monitor_command): Add a new parameter
4164 `own_buf'.
4165 (handle_query): Update caller.
4166
f8255c2a
JB
41672012-02-09 Joel Brobecker <brobecker@adacore.com>
4168
4169 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
4170 * configure, config.in: Regenerate.
4171 * hostio.c: Provide an alternate implementation if HAVE_READLINK
4172 is not defined.
4173
da84f473
PA
41742012-02-02 Pedro Alves <palves@redhat.com>
4175
4176 Try SIGKILL first, then PTRACE_KILL.
4177 * linux-low.c (linux_kill_one_lwp): New.
4178 (linux_kill_one_lwp): Rename to ...
4179 (kill_one_lwp_callback): ... this. Use the new
4180 linux_kill_one_lwp.
4181
e886a173
PA
41822012-02-02 Pedro Alves <palves@redhat.com>
4183
4184 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
4185 inferior.
4186
be07f1a2
PA
41872012-01-27 Pedro Alves <palves@redhat.com>
4188
4189 * linux-low.c (linux_child_pid_to_exec_file): Delete.
4190 (elf_64_file_p): Make static.
4191 (linux_pid_exe_is_elf_64_file): New.
4192 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
4193 Delete declarations.
4194 (linux_pid_exe_is_elf_64_file): Declare.
4195 * linux-x86-low.c (x86_arch_setup): Use
4196 linux_pid_exe_is_elf_64_file.
4197
d8301ad1
JK
41982012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
4199
4200 * linux-low.c (linux_wait_for_event_1): Rename to ...
4201 (linux_wait_for_event): ... here and merge it with former
4202 linux_wait_for_event - new variable wait_ptid, use it.
4203 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
4204
01b17894
PA
42052012-01-23 Pedro Alves <palves@redhat.com>
4206
4207 * server.c (main): Avoid yet another case of infinite loop while
4208 detaching/killing after a longjmp.
4209
e825046f
JK
42102012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
4211
4212 Code cleanup.
4213 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
4214
b9e7b9c3
UW
42152012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
4216
4217 * hostio.c (handle_readlink): New function.
4218 (handle_vFile): Call it to handle "vFile:readlink" packets.
4219
901f9912
UW
42202012-01-20 Pedro Alves <palves@redhat.com>
4221 Ulrich Weigand <ulrich.weigand@linaro.org>
4222
4223 * server.c (handle_v_requests): Only support vAttach and vRun to
4224 start multiple processes when in extended protocol mode.
4225
fc1ab1a0
PA
42262012-01-17 Pedro Alves <palves@redhat.com>
4227
4228 * tracepoint.c (initialize_tracepoint): Use mmap instead of
4229 memalign plus mprotect to allocate the scratch buffer.
4230
7d5d4e98
PA
42312012-01-13 Pedro Alves <palves@redhat.com>
4232
4233 * server.c (attach_inferior): Clear `cont_thread'.
4234
f128d5e9
PA
42352012-01-13 Pedro Alves <palves@redhat.com>
4236
4237 * server.c (main): Avoid infinite loop while detaching/killing
4238 after a longjmp.
4239
06db92f0
DE
42402012-01-09 Doug Evans <dje@google.com>
4241
4242 * server.c (start_inferior): Set last_ptid in --wrapper case.
4243
32d92999
YQ
42442012-01-06 Yao Qi <yao@codesourcery.com>
4245
4246 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
4247 defined.
4248 [IN_PROCESS_AGENT] (debug_agent): New global variable.
4249
5e0a92a9
YQ
42502012-01-04 Yao Qi <yao@codesourcery.com>
4251
4252 * tracepoint.c (cmd_qtdp): Print debug message
4253 for static tracepoint.
4254
ae639e8c
YQ
42552012-01-04 Yao Qi <yao@codesourcery.com>
4256
4257 * tracepoint.c (trace_vdebug): Differentiate debug message
4258 between gdbserver and IPA.
4259
f72429c5
YQ
42602012-01-03 Yao Qi <yao@codesourcery.com>
4261
4262 * tracepoint.c (tracepoint_was_hit): Don't collect for
4263 static tracepoint.
4264
12c3e59c
JB
42652012-01-02 Joel Brobecker <brobecker@adacore.com>
4266
4267 * terminal.h: Reformat copyright header.
4268
67827812
JB
42692012-01-02 Joel Brobecker <brobecker@adacore.com>
4270
4271 * server.c (gdbserver_version): Update copyright year.
4272 * gdbreplay.c (gdbreplay_version): Likewise.
4273
3e52c33d
JK
42742011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
4275
4276 * linux-low.c (linux_create_inferior): Put empty if clause for write.
4277
4278 Revert:
4279 2011-12-18 Hui Zhu <teawater@gmail.com>
4280 * linux-low.c (linux_create_inferior): Save return value to ret.
4281
66f1260e
HZ
42822011-12-18 Hui Zhu <teawater@gmail.com>
4283
4284 * linux-low.c (linux_create_inferior): Save return value to ret.
4285
e77616d7
DE
42862011-12-16 Doug Evans <dje@google.com>
4287
e7b06c57
DE
4288 * linux-low.c (linux_create_inferior): If stdio connection,
4289 redirect stdin from /dev/null, stdout to stderr.
4290 * remote-utils.c (remote_is_stdio): New static global.
4291 (remote_connection_is_stdio): New function.
4292 (remote_prepare): Handle stdio connection.
4293 (remote_open): Ditto.
4294 (remote_close): Don't close stdin for stdio connections.
4295 (read_prim,write_prim): New functions. Replace all calls to
4296 read/write to these.
4297 * server.c (main): Watch for "-" argument. Move call to
4298 remote_prepare before start_inferior.
4299 * server.h (STDIO_CONNECTION_NAME): New macro.
4300 (remote_connection_is_stdio): Declare.
4301
e77616d7
DE
4302 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
4303 in debugging output.
4304
82067193
YQ
43052011-12-15 Yao Qi <yao@codesourcery.com>
4306
4307 * tracepoint.c: Include sys/syscall.h.
4308 (gdb_ust_thread): Remove preprocessor conditional.
4309
82bfbe7e
PA
43102011-12-14 Pedro Alves <pedro@codesourcery.com>
4311
4312 * linux-low.c (linux_detach_one_lwp): Call
4313 the_low_target.prepare_to_resume before detaching.
4314
712c6575
YQ
43152011-12-14 Yao Qi <yao@codesourcery.com>
4316
4317 * tracepoint.c (gdb_ust_thread): Don't ignore return value
4318 of write.
4319
d54d1edf
YQ
43202011-12-14 Yao Qi <yao@codesourcery.com>
4321
4322 * i386-low.c (i386_low_stopped_data_address): Initialize local
4323 variable `control'.
4324
6210a125
PA
43252011-12-13 Pedro Alves <pedro@codesourcery.com>
4326
4327 PR remote/13492
4328
4329 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
4330 DR_CONTROL unless necessary. Extend comments.
4331 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
4332 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
4333
2ece8244
YQ
43342011-12-13 Yao Qi <yao@codesourcery.com>
4335
4336 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
4337 macros.
4338 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
4339
784867a5
JK
43402011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
4341
4342 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
4343 Print new debug message for such case.
4344
6bf36717
JK
43452011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
4346
4347 Fix overlapping memcpy.
4348 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
4349 the read_inferior_memory transfer.
4350 (delete_fast_tracepoint_jump): New variable buf. Use it for the
4351 write_inferior_memory transfer.
4352 (set_fast_tracepoint_jump): New variable buf. Use it for the
4353 read_inferior_memory and write_inferior_memory transfers.
4354 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
4355 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
4356 Use it for the write_inferior_memory transfer.
4357 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
4358 buffers.
4359
50275556
MR
43602011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
4361
4362 * linux-low.c (fetch_register, store_register): Make code
4363 consistent, fix formatting.
4364
7325beb4
MR
43652011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
4366
4367 * linux-low.c (usr_store_inferior_registers): Factor out code
4368 to handle individual registers into...
4369 (store_register): ... this new function.
4370
c642a434
UW
43712011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
4372
4373 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
4374 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
4375 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
4376 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
4377 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
4378 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
4379 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
4380 (srv_xmlfiles): Add new XML files.
4381
4382 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
4383 and <sys/uio.h>.
4384 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
4385 (init_registers_s390_linux32v1): Add prototype.
4386 (init_registers_s390_linux32v2): Likewise.
4387 (init_registers_s390_linux64v1): Likewise.
4388 (init_registers_s390_linux64v2): Likewise.
4389 (init_registers_s390x_linux64v1): Likewise.
4390 (init_registers_s390x_linux64v2): Likewise.
4391 (s390_num_regs): Increment to 52.
4392 (s390_regmap): Add orig_r2 register.
4393 (s390_num_regs_3264): Increment to 68.
4394 (s390_regmap_3264): Add orig_r2 register.
4395 (s390_collect_ptrace_register): Handle orig_r2 register.
4396 (s390_supply_ptrace_register): Likewise.
4397 (s390_fill_last_break): New function.
4398 (s390_store_last_break): Likewise.
4399 (s390_fill_system_call): New function.
4400 (s390_store_system_call): Likewise.
4401 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
4402 register sets.
4403 (s390_check_regset): New function.
4404 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
4405 NT_S390_SYSTEM_CALL regsets and use appropriate description.
4406 Update target_regsets for available register sets.
4407
2268b414
JK
44082011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
4409 Jan Kratochvil <jan.kratochvil@redhat.com>
4410
4411 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
4412 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
4413 New.
4414 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
4415 * linux-low.h (struct process_info_private): New member r_debug.
4416 * server.c (handle_qxfer_libraries): Call
4417 the_target->qxfer_libraries_svr4.
4418 (handle_qxfer_libraries_svr4): New function.
4419 (qxfer_packets): New entry "libraries-svr4".
4420 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
4421 * target.h (struct target_ops): New member qxfer_libraries_svr4.
4422 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
4423 PACKET_qXfer_libraries_svr4.
4424
d6db1fab
UW
44252011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
4426
4427 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
4428 PSW address/mask between 8-byte and 16-byte formats.
4429 (s390_supply_ptrace_register): Likewise.
4430 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
4431 basic addressing mode bit.
4432
242f5f1c
SS
44332011-11-24 Stan Shebs <stan@codesourcery.com>
4434
4435 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
4436
f196051f
SS
44372011-11-17 Stan Shebs <stan@codesourcery.com>
4438
4439 * tracepoint.c (struct tracepoint): New field traceframe_usage.
4440 (tracing_start_time): New global.
4441 (tracing_stop_time): New global.
4442 (tracing_user_name): New global.
4443 (tracing_notes): New global.
4444 (tracing_stop_note): New global.
4445 (cmd_qtstart): Set traceframe_usage, start_time.
4446 (stop_tracing): Set stop_time.
4447 (cmd_qtstatus): Report additional status.
4448 (cmd_qtp): New function.
4449 (handle_tracepoint_query): Call it.
4450 (cmd_qtnotes): New function.
4451 (handle_tracepoint_general_set): Call it.
4452 (get_timestamp): Rename from tsv_get_timestamp.
4453
405f8e94
SS
44542011-11-14 Stan Shebs <stan@codesourcery.com>
4455 Kwok Cheung Yeung <kcy@codesourcery.com>
4456
4457 * linux-x86-low.c (small_jump_insn): New.
4458 (i386_install_fast_tracepoint_jump_pad): Add arguments for
4459 trampoline and error message, build a trampoline and issue a small
4460 jump instruction to it.
4461 (x86_install_fast_tracepoint_jump_pad): Add arguments for
4462 trampoline and error message.
4463 (x86_get_min_fast_tracepoint_insn_len): New.
4464 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
4465 * linux-low.h (struct linux_target_ops): Add arguments to
4466 install_fast_tracepoint_jump_pad operation, add new operation.
4467 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
4468 arguments.
4469 (linux_get_min_fast_tracepoint_insn_len): New function.
4470 (linux_target_op): Add new operation.
4471 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
4472 (gdb_trampoline_buffer_end): Ditto.
4473 (gdb_trampoline_buffer_error): Ditto.
4474 (struct ipa_sym_addresses): Add fields for new IPA variables.
4475 (symbol_list): Add entries for new IPA variables.
4476 (struct tracepoint): Add fields to hold the address range of the
4477 trampoline used by the tracepoint.
4478 (trampoline_buffer_head): New static variable.
4479 (trampoline_buffer_tail): Ditto.
4480 (claim_trampoline_space): New function.
4481 (have_fast_tracepoint_trampoline_buffer): New function.
4482 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
4483 structure.
4484 (install_fast_tracepoint): Ditto, also add error buffer argument.
4485 (cmd_qtminftpilen): New function.
4486 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
4487 (fast_tracepoint_from_trampoline_address): New function.
4488 (fast_tracepoint_collecting): Handle trampoline as part of jump
4489 pad space.
4490 (set_trampoline_buffer_space): New function.
4491 (initialize_tracepoint): Initialize new IPA variables.
4492 * target.h (struct target_ops): Add arguments to
4493 install_fast_tracepoint_jump_pad operation, add new
4494 get_min_fast_tracepoint_insn_len operation.
4495 (target_get_min_fast_tracepoint_insn_len): New.
4496 (install_fast_tracepoint_jump_pad): Add arguments.
4497 * server.h (IPA_BUFSIZ): Define.
4498 * linux-i386-ipa.c: Include extra header files.
4499 (initialize_fast_tracepoint_trampoline_buffer): New function.
4500 (initialize_low_tracepoint): Call it.
4501 * server.h (set_trampoline_buffer_space): Declare.
4502 (claim_trampoline_space): Ditto.
4503 (have_fast_tracepoint_trampoline_buffer): Ditto.
4504
1e4d1764
YQ
45052011-11-14 Yao Qi <yao@codesourcery.com>
4506
4507 * server.c (handle_query): Handle InstallInTrace for qSupported.
4508 * tracepoint.c (add_tracepoint): Sort list.
4509 (install_tracepoint, download_tracepoint): New.
4510 (cmd_qtdp): Call them to install and download tracepoints.
4511 (sort_tracepoints): Removed.
4512 (cmd_qtstart): Update.
4513
5c73ff4e
YQ
45142011-11-14 Yao Qi <yao@codesourcery.com>
4515
4516 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
4517 * mem-break.h: Declare.
4518 * tracepoint.c (cmd_qtstart): Move some code to ...
4519 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
4520 New.
4521 (download_tracepoints): Move some code to ...
4522 (download_tracepoint_1): ... here. New.
4523
86a30030
YQ
45242011-11-08 Yao Qi <yao@codesourcery.com>
4525
4526 * remote-utils.c (relocate_instruction): A comment fix.
4527
8d26e50c
JB
45282011-11-07 Joel Brobecker <brobecker@adacore.com>
4529
4530 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
4531 (i386_dr_low_get_control, i386_dr_low_get_status): Use
4532 dr_status_mirror and dr_control_mirror from debug_reg_state.
4533 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
4534 (i386_initial_stuff): Remove use of deleted globals.
4535 (i386_get_thread_context, i386_set_thread_context,
4536 i386_thread_added): Use dr_status_mirror and dr_control_mirror
4537 from debug_reg_state.
4538
a59306a3
YQ
45392011-11-05 Yao Qi <yao@codesourcery.com>
4540
4541 * tracepoint.c (gdb_collect): Loop over tracepoints of same
4542 address as TPOINT's.
4543
3065dfb6
SS
45442011-11-02 Stan Shebs <stan@codesourcery.com>
4545
4546 * tracepoint.c (agent_mem_read_string): New function.
4547 (eval_agent_expr): Call it for tracenz.
4548 * server.c (handle_query): Report support for tracenz.
4549
fd0d8c7c
YQ
45502011-11-02 Yao Qi <yao@codesourcery.com>
4551
4552 * tracepoint.c (cmd_qtstart): Remove unused local variables.
4553
609086b1
YQ
45542011-11-02 Yao Qi <yao@codesourcery.com>
4555
4556 * target.h: Fix a typo in comment.
4557
b9fd1791
PA
45582011-10-31 Pedro Alves <pedro@codesourcery.com>
4559
4560 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
4561 clobber the breakpoints' shadows with fast tracepoint jumps.
4562 * mem-break.h (check_mem_write): Add `myaddr' parameter.
4563 * target.c (write_inferior_memory): Also pass MYADDR down to
4564 check_mem_write.
4565
03583c20
UW
45662011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
4567
4568 * configure.ac: Check support for personality routine.
4569 * configure: Regenerate.
4570 * config.in: Likewise.
4571 * linux-low.c: Include <sys/personality.h>.
4572 Define ADDR_NO_RANDOMIZE if necessary.
4573 (linux_create_inferior): Disable address space randomization when
4574 forking inferior, if requested.
4575 (linux_supports_disable_randomization): New function.
4576 (linux_target_ops): Install it.
4577 * server.h (disable_randomization): Declare.
4578 * server.c (disable_randomization): New global variable.
4579 (handle_general_set): Handle QDisableRandomization.
4580 (handle_query): Likewise for qSupported.
4581 (main): Support --disable-randomization and --no-disable-randomization
4582 command line arguments.
4583 * target.h (struct target_ops): Add supports_disable_randomization.
4584 (target_supports_disable_randomization): New macro.
4585
723b724b
MF
45862011-09-29 Mike Frysinger <vapier@gentoo.org>
4587
4588 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
4589 ifdef check.
4590 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
4591 [!PT_GETDSBT] (target_loadmap): New definition.
4592 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
4593 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
4594 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
4595 and PT_GETDSBT to LINUX_LOADMAP.
4596 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
4597 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
4598
55329a5c 45992011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
4600
4601 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
4602 (arm_linux_hwbp_cap): New static variable.
4603 (arm_linux_get_hwbp_cap): Replace by ...
4604 (arm_linux_init_hwbp_cap): ... this new function.
4605 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
4606 (arm_linux_get_hw_watchpoint_count): Likewise.
4607 (arm_linux_get_hw_watchpoint_max_length): Likewise.
4608 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
4609 (arm_prepare_to_resume): Use perror_with_name instead of error.
4610
55329a5c 46112011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
4612
4613 * linux-arm-low.c: Include <signal.h>.
4614 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
4615 (struct arm_linux_hwbp_cap): New data type.
4616 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
4617 (struct arm_linux_hw_breakpoint): New data type.
4618 (MAX_BPTS, MAX_WPTS): Define.
4619 (struct arch_process_info, struct arch_lwp_info): New data types.
4620 (arm_linux_get_hwbp_cap): New function.
4621 (arm_linux_get_hw_breakpoint_count): Likewise.
4622 (arm_linux_get_hw_watchpoint_count): Likewise.
4623 (arm_linux_get_hw_watchpoint_max_length): Likewise.
4624 (arm_hwbp_control_initialize): Likewise.
4625 (arm_hwbp_control_is_enabled): Likewise.
4626 (arm_hwbp_control_is_initialized): Likewise.
4627 (arm_hwbp_control_disable): Likewise.
4628 (arm_linux_hw_breakpoint_equal): Likewise.
4629 (arm_linux_hw_point_initialize): Likewise.
4630 (struct update_registers_data): New data structure.
4631 (update_registers_callback: New function.
4632 (arm_insert_point): Likewise.
4633 (arm_remove_point): Likewise.
4634 (arm_stopped_by_watchpoint): Likewise.
4635 (arm_stopped_data_address): Likewise.
4636 (arm_new_process): Likewise.
4637 (arm_new_thread): Likewise.
4638 (arm_prepare_to_resume): Likewise.
4639 (the_low_target): Register arm_insert_point, arm_remove_point,
4640 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
4641 arm_new_thread, and arm_prepare_to_resume.
4642
6b9801d4
SS
46432011-09-15 Stan Shebs <stan@codesourcery.com>
4644
4645 * server.h (struct emit_ops): Add compare-goto fields.
4646 * tracepoint.c (gdb_agent_op_sizes): New table.
4647 (emit_eq_goto): New function.
4648 (emit_ne_goto): New function.
4649 (emit_lt_goto): New function.
4650 (emit_le_goto): New function.
4651 (emit_gt_goto): New function.
4652 (emit_ge_goto): New function.
4653 (is_goto_target): New function.
4654 (compile_bytecodes): Recognize special cases of compare-goto
4655 combinations and call specialized emitters for them.
4656 * linux-x86-low.c (amd64_emit_eq_goto): New function.
4657 (amd64_emit_ne_goto): New function.
4658 (amd64_emit_lt_goto): New function.
4659 (amd64_emit_le_goto): New function.
4660 (amd64_emit_gt_goto): New function.
4661 (amd64_emit_ge_goto): New function.
4662 (amd64_emit_ops): Add the new functions.
4663 (i386_emit_eq_goto): New function.
4664 (i386_emit_ne_goto): New function.
4665 (i386_emit_lt_goto): New function.
4666 (i386_emit_le_goto): New function.
4667 (i386_emit_gt_goto): New function.
4668 (i386_emit_ge_goto): New function.
4669 (i386_emit_ops): Add the new functions.
4670
bf15cbda
SS
46712011-09-08 Stan Shebs <stan@codesourcery.com>
4672
4673 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
4674 (i386_emit_epilogue): Restore %ebx.
4675
943ca1dd
JZ
46762011-08-31 Jie Zhang <jzhang918@gmail.com>
4677
4678 * server.c (step_thread): Remove definition.
4679 (process_serial_event): Don't handle Hs.
4680 * server.h (step_thread): Remove declaration.
4681 * target.c (set_desired_inferior): Remove use of step_thread.
4682
e3deef73
LM
46832011-08-24 Luis Machado <lgustavo@codesourcery.com>
4684
4685 * linux-low.c: Include linux-procfs.h.
4686 (linux_attach_lwp_1): Update comments.
4687 (linux_attach): Scan for existing threads when attaching to a
4688 process that is the tgid.
4689 * Makefile.in: Update dependencies.
4690
13da1c97
LM
46912011-08-24 Luis Machado <lgustavo@codesourcery.com>
4692
4693 * configure.srv: Add linux-procfs.o dependencies.
4694
881127c9
YQ
46952011-08-14 Yao Qi <yao@codesourcery.com>
4696
4697 * target.h (struct target_ops): Fix indent.
4698 * win32-low.c (win32_target_ops): Fix comment.
4699
58dbd541
YQ
47002011-08-14 Andrew Jenner <andrew@codesourcery.com>
4701 Yao Qi <yao@codesourcery.com>
4702
4703 * Makefile.in (clean): Remove tic6x-*.c files.
4704 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
4705 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
4706 (tic6x-c64xp-linux.c): Likewise.
4707 * configure.srv: Add support for tic6x-*-uclinux.
4708 * linux-tic6x-low.c: New.
4709 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
4710
78d85199
YQ
47112011-08-14 Andrew Stubbs <ams@codesourcery.com>
4712 Yao Qi <yao@codesourcery.com>
4713
4714 * target.h (struct target_ops): Add read_loadmap.
4715 * linux-low.c (struct target_loadseg): New type.
4716 (struct target_loadmap): New type.
4717 (linux_read_loadmap): New function.
4718 (linux_target_ops): Add linux_read_loadmap.
4719 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
4720 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
4721 to NULL.
78d85199 4722
a959a88d
EZ
47232011-08-05 Eli Zaretskii <eliz@gnu.org>
4724
4725 * win32-low.c: Include <stdint.h>.
4726
1ced966e
PA
47272011-07-22 Pedro Alves <pedro@codesourcery.com>
4728
4729 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
4730 to the inferior here.
4731 (i386_remove_aligned_watchpoint): Ditto.
4732 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
4733 fit part of the watchpoint in the debug registers.
4734 (i386_update_inferior_debug_regs): New.
4735 (i386_low_insert_watchpoint): Work on a local mirror of the debug
4736 registers, and only update the inferior on success.
4737 (i386_low_remove_watchpoint): Ditto.
4738
d26e3629
KY
47392011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
4740
4741 * linux-low.c (compare_ints, unique, list_threads, show_process,
4742 linux_core_of_thread): Delete.
4743 (linux_target_ops): Change linux_core_of_thread to
4744 linux_common_core_of_thread.
4745 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
4746 * utils.c (malloc_failure): Change type of argument.
4747 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
4748 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
4749 common/linux-osdata.c, common/ptid.c and common/buffer.c.
4750 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
4751 (IPA_OBJS): Add common-utils-ipa.o.
4752 (ptid_h, linux_osdata_h): New macros.
4753 (server_h): Add common/common-utils.h, common/xml-utils.h,
4754 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
4755 common/ptid.h.
4756 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
4757 ptid.o, buffer.o): New rules.
4758 (linux-low.o): Add common/linux-osdata.h as a dependency.
4759 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
4760 * configure.ac: Add AC_HEADER_DIRENT check.
4761 * config.in: Regenerate.
4762 * configure: Regenerate.
4763 * remote-utils.c (xml_escape_text): Delete.
4764 (buffer_grow, buffer_free, buffer_init, buffer_finish,
4765 buffer_xml_printf): Move to common/buffer.c.
4766 * server.c (main): Remove call to initialize_inferiors.
4767 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
4768 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
4769 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
4770 internal_error, gdb_assert, gdb_assert_fail): Delete.
4771 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
4772 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
4773 common/buffer.h.
4774 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
4775 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
4776 initialize_inferiors): Delete.
4777
2275a1a7
PA
47782011-07-20 Pedro Alves <pedro@codesourcery.com>
4779
4780 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
4781 symbol error.
4782
0a5b1e09
PA
47832011-05-31 Pedro Alves <pedro@codesourcery.com>
4784
4785 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
4786 assertion.
4787 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
4788
6938fd34
YQ
47892011-05-26 Yao Qi <yao@codesourcery.com>
4790
4791 * Makefile.in (thread-db.o): Track dependence to
4792 common/gdb_thread_db.h.
4793 * thread-db.c: include gdb_thread_db.h from right place.
4794
b481f9e0
TT
47952011-05-16 Adrian Cornish <gnu@bluedreamer.com>
4796
4797 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
4798 __FILE__ and __LINE__ to internal_error.
4799
98a5dd13
DE
48002011-05-13 Doug Evans <dje@google.com>
4801
4802 * thread-db.c (try_thread_db_load_from_sdir): New function.
4803 (try_thread_db_load_from_dir): New function.
4804 (thread_db_load_search): Handle $sdir, ignore $pdir.
4805 Remove trying of system directories if search of
4806 libthread-db-search-path fails, that is now done via $sdir.
4807
d248b706
KY
48082011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
4809
4810 * server.c (handle_query): Add EnableDisableTracepoints to the list
4811 of supported features.
43aaf8b6 4812 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 4813 tracepoints.
43aaf8b6
PA
4814 (cmd_qtenable_disable): New.
4815 (cmd_qtstart): Install tracepoints even if disabled.
4816 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
4817 receiving a QTEnable or QTDisable packet.
4818 (gdb_collect): Skip data collection if fast tracepoint is disabled.
4819 (ust_marker_to_static_tracepoint): Do not ignore disabled static
4820 tracepoints.
4821 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 4822
84e578fb
DE
48232011-05-10 Doug Evans <dje@google.com>
4824
4825 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
4826
71f55dd8
DE
48272011-05-04 Doug Evans <dje@google.com>
4828
4829 * linux-low.c (linux_join): Skip process lookup.
4830 * spu-low.c (spu_join): Ditto.
4831 * server.c (join_inferiors_callback): Delete.
4832 (process_serial_event): For 'D' packet (detach) call join_inferior
4833 directly.
4834
4d393d60
JM
48352011-05-04 Joseph Myers <joseph@codesourcery.com>
4836
4837 * README: Don't mention xscale*-*-linux*.
4838 * configure.srv (xscale*-*-linux*): Don't handle target.
4839
b00ad6ff
NF
48402011-04-27 Nathan Froyd <froydnj@codesourcery.com>
4841
4842 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
4843 casting pointers.
4844 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
4845 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
4846 (i386_emit_void_call_2): Likewise.
4847
af96c192
YQ
48482011-04-26 Yao Qi <yao@codesourcery.com>
4849
43aaf8b6
PA
4850 * linux-low.c: Move common macros to linux-ptrace.h.
4851 Include linux-ptrace.h.
af96c192
YQ
4852 * Makefile.in (linux_ptrace_h): New.
4853 (linux-low.o): Depends on linux-ptrace.h.
4854
03f2bd59
JK
48552011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
4856
4857 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
4858 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
4859 (remote_prepare): New function with most of the TCP code from ...
4860 (remote_open): ... here. Detect PORT here unconditionally. Move also
4861 setting transport_is_reliable.
4862 * server.c (run_once): New variable.
4863 (gdbserver_usage): Document it.
4864 (main): Set run_once for `--once'. Call remote_prepare. Exit after
4865 the first run if RUN_ONCE.
4866 * server.h (run_once, remote_prepare): New declarations.
4867
7a9dd1b2
TT
48682011-04-19 Tom Tromey <tromey@redhat.com>
4869
4870 * win32-low.c (handle_load_dll): Remove duplicate "the".
4871
81239425
PM
48722011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
4873
4874 Remove support for old Cygwin 1.5 versions.
4875 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
4876 function to avoid warning.
4877 (win32_add_one_solib): Use cygwin_conv_path function to avoid
4878 warning.
4879
9e0627f1
PM
48802011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
4881
4882 * gdbserver/server.h (Macro _): Define it if not available.
4883
588eebee
MS
48842011-03-14 Michael Snyder <msnyder@vmware.com>
4885
348af9f7 4886 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 4887
43f70d4c
JB
48882011-03-10 Joel Brobecker <brobecker@adacore.com>
4889
4890 * Makefile.in (maintainer-clean realclean distclean): Remove
4891 "make ... subdir_do" command.
4892
348af9f7
MS
48932011-03-10 Michael Snyder <msnyder@vmware.com>
4894
4895 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
4896
4897 * server.c (handle_v_run): Free alloced buffer on early return.
4898
e637a4f5
YQ
48992011-03-09 Yao Qi <yao@codesourcery.com>
4900
4901 Revert:
4902 2011-03-04 Yao Qi <yao@codesourcery.com>
4903
4904 * Makefile.in: Remove GNU make feature --directory.
4905
4906 2011-03-05 Yao Qi <yao@codesourcery.com>
4907
4908 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
4909 (subdir_do): New make target. Copied from gdb/Makefile.
4910 (maintainer-clean, realclean, distclean, clean): Call corresponding
4911 make targets in common/Makefile.
4912
4913 2011-02-11 Yao Qi <yao@codesourcery.com>
4914
4915 * configure.ac: Call AC_PROG_RANLIB.
4916 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
4917 * configure: Regenerate.
4918
e6edda56
JK
49192011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
4920
4921 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
4922
e5141119
JB
49232011-03-06 Yao Qi <yao@codesourcery.com>
4924
4925 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
4926
64794aa4
JB
49272011-03-05 Yao Qi <yao@codesourcery.com>
4928
4929 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
4930 (subdir_do): New make target. Copied from gdb/Makefile.
4931 (maintainer-clean, realclean, distclean, clean): Call corresponding
4932 make targets in common/Makefile.
4933
7a762829
YQ
49342011-03-04 Yao Qi <yao@codesourcery.com>
4935
4936 * Makefile.in: Remove GNU make feature --directory.
4937
348af9f7
MS
49382011-03-04 Michael Snyder <msnyder@vmware.com>
4939
4940 * server.c (queue_stop_reply): Call xmalloc not malloc.
4941
49422011-03-02 Michael Snyder <msnyder@vmware.com>
4943
4944 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
4945
9f72fee2
MS
49462011-02-28 Michael Snyder <msnyder@vmware.com>
4947
588eebee
MS
4948 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
4949 (cmd_qtframe): Ditto.
4950 (cmd_qtbuffer): Ditto.
4951 (cmd_bigqtbuffer): Ditto.
4952
9f72fee2
MS
4953 * utils.c (decimal2str): Initialize 'width' to nine, then
4954 don't mess with it.
4955
8040bd49
UW
49562011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
4957
4958 * hostio.c (require_data): Free *data, not data.
4959
7e52cbd0
JK
49602011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4961
4962 * hostio.c (require_data): Use free, not xfree.
4963
9130f83e
MS
49642011-02-27 Michael Snyder <msnyder@vmware.com>
4965
4b812f4e
MS
4966 * server.c (handle_query): Discard unused value.
4967
9130f83e
MS
4968 * hostio.c (require_data): Free malloc memory before returning
4969 error.
4970
69d37113
MS
49712011-02-26 Michael Snyder <msnyder@vmware.com>
4972
4973 * linux-low.c (list_threads): Call closedir for dirent.
4974
35f5825a
MS
49752011-02-27 Michael Snyder <msnyder@vmware.com>
4976
2a589cef
MS
4977 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
4978 a case statement falls through.
4979
0adea5f7
MS
4980 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
4981
35f5825a
MS
4982 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
4983 in comparison.
4984
238f1c74
MS
49852011-02-26 Michael Snyder <msnyder@vmware.com>
4986
4987 * utils.c (decimal2str): Eliminate dead code and dead param.
4988 (pulongest): Drop dead param from call to decimal2str.
4989 (plongest): Ditto.
4990
633ff500
JB
49912011-02-24 Joel Brobecker <brobecker@adacore.com>
4992
4993 Revert the following patch (not approved yet):
4994 2011-02-21 Hui Zhu <teawater@gmail.com>
4995 * tracepoint.c (tp_printf): New function.
4996 (eval_agent_expr): Handle gdb_agent_op_printf.
4997
f9c6ff72
HZ
49982011-02-21 Hui Zhu <teawater@gmail.com>
4999
5000 * tracepoint.c (tp_printf): New function.
5001 (eval_agent_expr): Handle gdb_agent_op_printf.
5002
94d5e490
TT
50032011-02-18 Tom Tromey <tromey@redhat.com>
5004
5005 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
5006 (tracepoint.o): Likewise.
5007 * tracepoint.c (enum gdb_agent_op): Use ax.def.
5008 (gdb_agent_op_names): Likewise.
5009
c7f96d2b
TT
50102011-02-18 Tom Tromey <tromey@redhat.com>
5011
5012 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
5013 gdb_agent_op_rot>: New constants.
5014 (gdb_agent_op_names): Add pick and roll.
5015 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
5016 cases.
5017
0feedb2c
JK
50182011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5019
5020 * aclocal.m4: Regenerated with aclocal-1.11.1.
5021
b3b9301e
PA
50222011-02-14 Pedro Alves <pedro@codesourcery.com>
5023
5024 * server.c (handle_qxfer_traceframe_info): New.
5025 (qxfer_packets): Register "traceframe-info".
5026 (handle_query): Report support for qXfer:traceframe-info:read+.
5027 * tracepoint.c (match_blocktype): New.
5028 (traceframe_find_block_type): Rename to ...
5029 (traceframe_walk_blocks): ... this. Add callback filter argument,
5030 and use it.
5031 (traceframe_find_block_type): New, reimplemented on top of
5032 traceframe_walk_blocks.
5033 (build_traceframe_info_xml): New.
5034 (traceframe_read_info): New.
5035 * server.h (traceframe_read_info): Declare.
5036
4f3e6fb7
YQ
50372011-02-11 Yao Qi <yao@codesourcery.com>
5038
5039 * configure.ac: Call AC_PROG_RANLIB.
5040 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
5041 * configure: Regenerate.
5042
764880b7
PA
50432011-02-07 Pedro Alves <pedro@codesourcery.com>
5044
5045 * server.c (gdb_read_memory): Change return semantics to allow
5046 partial transfers.
5047 (handle_search_memory_1): Adjust.
5048 (process_serial_event) <'m' packet>: Handle partial transfers.
5049 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
5050
1c79eb8a
PA
50512011-01-28 Pedro Alves <pedro@codesourcery.com>
5052
5053 * regcache.c (init_register_cache): Initialize
5054 regcache->register_status.
5055 (free_register_cache): Release regcache->register_status.
5056 (regcache_cpy): Copy register_status.
5057 (registers_to_string): Print 'x's for unavailable registers.
5058 (supply_register): Mark the register's status valid or
5059 unavailable, depending on whether a buffer was passed in or not.
5060 (supply_register_zeroed): New.
5061 (supply_regblock): Mark the registers' status valid or
5062 unavailable, depending on whether a buffer was passed in or not.
5063 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
5064 (struct regcache): New `register_status' field.
5065 (supply_register_zeroed): Declare.
5066 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
5067 supply_register_zeroed, rather than passing a NULL buffer to
5068 supply_register.
5069 * tracepoint.c (fetch_traceframe_registers): Update comment.
5070
85724a0e
PA
50712011-01-28 Pedro Alves <pedro@codesourcery.com>
5072
5073 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
5074 buffer explicit.
5075
d08aafef
PA
50762011-01-25 Pedro Alves <pedro@codesourcery.com>
5077
5078 * server.h (decode_xfer_write): Change prototype.
5079 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
5080 and don't extract the annex here.
5081 * server.c (decode_xfer_read): Remove `annex' parameter,
5082 and don't extract the annex here.
5083 (decode_xfer): New.
5084 (struct qxfer): New.
5085 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
5086 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
5087 (handle_qxfer_statictrace): New functions, abstracted out from
5088 handle_query, and made to use the struct qxfer interface.
5089 (handle_threads_qxfer_proper): Rename to ...
5090 (handle_qxfer_threads_proper): ... this.
5091 (handle_threads_qxfer): Rename to ...
5092 (handle_qxfer_threads): ... this. Adjust.
5093 (qxfer_packets): New array.
5094 (handle_qxfer): New function.
5095 (handle_query): Use handle_qxfer.
5096
493e2a69
MS
50972011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
5098
5099 * gdbreplay.c: Shorten lines of >= 80 columns.
5100 * linux-low.c: Ditto.
5101 * linux-ppc-low.c: Ditto.
5102 * linux-s390-low.c: Ditto.
5103 * linux-sparc-low.c: Ditto.
5104 * linux-x86-low.c: Ditto.
5105 * linux-xtensa-low.c: Ditto.
5106 * mem-break.c: Ditto.
5107 * nto-low.c: Ditto.
5108 * regcache.h: Ditto.
5109 * remote-utils.c: Ditto.
5110 * server.c: Ditto.
5111 * server.h: Ditto.
5112 * thread-db.c: Ditto.
5113 * tracepoint.c: Ditto.
5114 * utils.c: Ditto.
5115 * win32-low.h: Ditto.
5116
44944448
JB
51172011-01-05 Joel Brobecker <brobecker@adacore.com>
5118
5119 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
5120 update.
5121
71ce852c
JB
51222011-01-01 Joel Brobecker <brobecker@adacore.com>
5123
5124 * server.c (gdbserver_version): Update copyright year in version
5125 output.
5126 * gdbreplay.c (gdbreplay_version): Ditto.
5127
eb826dc6
MF
51282010-12-29 Jie Zhang <jie.zhang@analog.com>
5129
5130 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
5131 * linux-bfin-low.c: New file.
5132 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
5133 PT_DATA_ADDR for BFIN targets.
5134 * Makefile.in (SFILES): Add linux-bfin-low.c.
5135 (clean): Remove reg-bfin.c.
5136 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
5137 * README: Mention supported Blackfin targets.
5138
39ab222a
MF
51392010-12-23 Mike Frysinger <vapier@gentoo.org>
5140
5141 * .gitignore: New file.
5142
a1f2ce7d
MF
51432010-11-16 Mike Frysinger <vapier@gentoo.org>
5144
5145 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
5146
f474844c
JZ
51472010-10-22 Jie Zhang <jie@codesourcery.com>
5148
5149 * Makefile.in: Add FLAGS_TO_PASS variable.
5150 (install): Remove dependency of install-only and recursively
5151 invoke make for install-only.
5152
f1048712
DE
51532010-10-04 Doug Evans <dje@google.com>
5154
5155 * Makefile.in (uninstall): Use $(DESTDIR).
5156
b53a1623
PA
51572010-09-24 Pedro Alves <pedro@codesourcery.com>
5158
e6ee044d
PA
5159 PR gdb/11842
5160
b53a1623
PA
5161 * linux-x86-low.c (compat_siginfo_from_siginfo)
5162 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
5163 si_code is < 0. Check for si_code == SI_TIMER before checking for
5164 si_code < 0.
5165
fa1bd1e4
JB
51662010-09-13 Joel Brobecker <brobecker@adacore.com>
5167
5168 * lynx-i386-low.c: New file.
5169 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
5170
47fac8f8
JB
51712010-09-13 Joel Brobecker <brobecker@adacore.com>
5172
5173 * lynx-low.c (ptrace_request_to_str): Remove handling for
5174 request values that have been removed in LynxOS 5.x.
5175
1adfc54d
JB
51762010-09-13 Joel Brobecker <brobecker@adacore.com>
5177
5178 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
5179 <ptrace.h>
5180
c2a66c29
NS
51812010-09-09 Nathan Sidwell <nathan@codesourcery.com>
5182
5183 * configure.ac: Add --enable-inprocess-agent option.
5184 * configure: Rebuilt.
5185
32fcada3
YQ
51862010-09-06 Yao Qi <yao@codesourcery.com>
5187
5188 * linux-low.c (linux_kill): Remove unused variable.
5189 (linux_stabilize_threads): Likewise.
5190 * server.c (start_inferior): Likewise.
5191 (queue_stop_reply_callback): Likewise.
5192 * tracepoint.c (do_action_at_tracepoint): Likewise.
5193
0cccb683
YQ
51942010-09-06 Yao Qi <yao@codesourcery.com>
5195
5196 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
5197 on return.
5198
423ec54c
JK
51992010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
5200
5201 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
5202
12ac6819
PA
52032010-09-06 Pedro Alves <pedro@codesourcery.com>
5204
5205 * Makefile.in (install-only): Replace $IPA_DEPFILES with
5206 "$(IPA_DEPFILES)".
5207
8ed54b31
JB
52082010-09-01 Joel Brobecker <brobecker@adacore.com>
5209
5210 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
5211 gdbserver/lynx-ppc-low.c: New files.
5212 * Makefile.in (lynx_low_h): New variable.
5213 (lynx-low.o, lynx-ppc-low.o): New rules.
5214 * configure.ac: On LynxOS, link with -lnetinet.
5215 * configure.srv: Add handling of powerpc-*-lynxos* targets.
5216 * configure: regenerate.
5217
bb0116a4
JB
52182010-09-01 Joel Brobecker <brobecker@adacore.com>
5219
5220 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
5221 * configure.ac: Add check for vasprintf and vsnprintf.
5222 * configure, config.in: Regenerate.
5223 * server.h (vasprintf, vsnprintf): Add conditional declarations.
5224
a778ab81 52252010-09-01 Joel Brobecker <brobecker@adacore.com>
5226
5227 * gdbreplay.c: Move include of alloca.h up, next to include of
5228 malloc.h.
5229 * server.h: Add include of malloc.h.
5230 * mem-break.c: Remove include of malloc.h.
5231 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
5232
8b034a19 52332010-09-01 Joel Brobecker <brobecker@adacore.com>
5234
5235 * Makefile.in (memmem.o): Build with -Wno-error.
5236
52372010-09-01 Joel Brobecker <brobecker@adacore.com>
5238
5239 * utils.c (xsnprintf): Make non-static.
5240 * server.h: Add xsnprintf declaration.
5241 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
5242 replace calls to snprintf by calls to xsnprintf throughout.
5243
52442010-09-01 Joel Brobecker <brobecker@adacore.com>
5245
5246 * configure.ac: Add configure check for alloca.
5247 * configure, config.in: Regenerate.
5248 * server.h: Include alloca.h if it exists.
5249 * gdbreplay.c: Include alloca.h if it exists.
5250
1a981360
PA
52512010-08-28 Pedro Alves <pedro@codesourcery.com>
5252
5253 * linux-low.c (__SIGRTMIN): Define if not already defined.
5254 (linux_create_inferior): Check for __ANDROID__ rather than
5255 __SIGRTMIN.
5256 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
5257 are already deferred.
5258 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
5259 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
5260 stopped and already has a pending signal to report.
5261 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
5262 a pending signal to report or is moving out of a jump pad.
5263 (linux_init_signals): Check for __ANDROID__ rather than
5264 __SIGRTMIN.
5265
b4d51a55
PA
52662010-08-28 Pedro Alves <pedro@codesourcery.com>
5267
5268 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
5269 debug_threads check. Avoid a linear search when not doing debug
5270 output.
5271
ec48365d
PA
52722010-08-27 Pedro Alves <pedro@codesourcery.com>
5273
5274 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
5275 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
5276 (struct file_handler) <fd>: Change type to gdb_fildes_t.
5277 (process_event): Change local fd's type to gdb_fildes_t.
5278 (create_file_handler): Adjust prototype.
5279 (delete_file_handler): Adjust prototype.
5280 (handle_file_event): Adjust prototype. Use pfildes.
5281 (create_file_event): Adjsut prototype.
5282 * remote-utils.c (remote_desc, listen_desc): Change type to
5283 gdb_fildes_t.
5284 * server.h: New gdb_fildes_t typedef.
5285 [USE_WIN32API]: Include winsock2.h.
5286 (delete_file_handler, add_file_handler): Adjust prototypes.
5287 (pfildes): Declare.
5288 * utils.c (pfildes): New.
5289
854d88f0
PA
52902010-08-27 Pedro Alves <pedro@codesourcery.com>
5291
5292 * configure.ac (build_warnings): Add -Wno-char-subscripts.
5293 * configure: Regenerate.
5294
0146f85b
PA
52952010-08-27 Pedro Alves <pedro@codesourcery.com>
5296
5297 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
5298 (linux_done_accessing_memory): ... this.
5299 (linux_target_ops): Adjust.
5300 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
5301 * nto-low.c (nto_target_ops): Adjust comment.
5302 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
5303 * spu-low.c (spu_target_ops): Adjust comment.
5304 * target.h (target_ops): Rename unprepare_to_access_memory field
5305 to done_accessing_memory.
5306 (unprepare_to_access_memory): Rename to ...
5307 (done_accessing_memory): ... this.
5308
90d74c30
PA
53092010-08-26 Pedro Alves <pedro@codesourcery.com>
5310
5311 * linux-low.c (linux_prepare_to_access_memory): New.
5312 (linux_unprepare_to_access_memory): New.
5313 (linux_target_ops): Install them.
5314 * server.c (read_memory): Rename to ...
5315 (gdb_read_memory): ... this. Use
5316 prepare_to_access_memory/prepare_to_access_memory.
5317 (write_memory): Rename to ...
5318 (gdb_write_memory): ... this. Use
5319 prepare_to_access_memory/prepare_to_access_memory.
5320 (handle_search_memory_1): Adjust.
5321 (process_serial_event): Adjust.
5322 * target.h (struct target_ops): New fields
5323 prepare_to_access_memory and unprepare_to_access_memory.
5324 (prepare_to_access_memory, unprepare_to_access_memory): New.
5325 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
5326 prepare_to_access_memory/prepare_to_access_memory.
5327 * nto-low.c (nto_target_ops): Adjust.
5328 * spu-low.c (spu_target_ops): Adjust.
5329 * win32-low.c (win32_target_ops): Adjust.
5330
fd467969
PA
53312010-08-26 Pedro Alves <pedro@codesourcery.com>
5332
5333 * Makefile.in (WARN_CFLAGS): Get it from configure.
5334 (WERROR_CFLAGS): New.
5335 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
5336 * configure.ac: Introduce --enable-werror, which adds -Werror to
5337 the compiler command line. Enabled by default. Disable with
5338 --disable-werror. Add -Wdeclaration-after-statement
5339 Wpointer-arith and -Wformat-nonliteral to warning flags.
5340 * configure: Regenerate.
5341
331e2f5f
PA
53422010-08-26 Pedro Alves <pedro@codesourcery.com>
5343
5344 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
5345
e581f2b4
PA
53462010-08-26 Pedro Alves <pedro@codesourcery.com>
5347
5348 * gdbreplay.c (remote_error): New.
5349 (gdbchar): New.
5350 (expect): Use gdbchar. Check for error reading from GDB.
5351 Clarify sync error output.
5352 (play): Check for errors writing to GDB.
5353 * linux-low.c (sigchld_handler): Really ignore `write' errors.
5354 * remote-utils.c (getpkt): Check for errors writing to the remote
5355 descriptor.
5356
3c11dd79
PA
53572010-08-25 Pedro Alves <pedro@codesourcery.com>
5358
5359 * linux-low.c (linux_wait_1): Move non-debugging code out of
5360 `debug_threads' control.
5361
d20a8ad9
PA
53622010-08-25 Pedro Alves <pedro@codesourcery.com>
5363
5364 * linux-low.c (linux_wait_1): Don't set last_status here.
5365 * server.c (push_event, queue_stop_reply_callback): Assert we're
5366 not pushing a TARGET_WAITKIND_IGNORE event.
5367 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
5368 (myresume, handle_target_event): Set the thread's last_resume_kind
5369 and last_status from the target returned status.
5370
964e4306
PA
53712010-08-25 Pedro Alves <pedro@codesourcery.com>
5372
5373 PR threads/10729
5374
5375 * linux-x86-low.c (update_debug_registers_callback): New.
5376 (i386_dr_low_set_addr): Use it.
5377 (i386_dr_low_get_addr): New.
5378 (i386_dr_low_set_control): Use update_debug_registers_callback.
5379 (i386_dr_low_get_control): New.
5380 (i386_dr_low_get_status): Adjust.
5381 * linux-low.c (linux_stop_lwp): New.
5382 * linux-low.h (linux_stop_lwp): Declare.
5383
5384 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
5385 argument instead of a i386_debug_reg_state.
5386 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
5387 a i386_debug_reg_state.
5388 (i386_insert_aligned_watchpoint): Adjust.
5389 (i386_remove_aligned_watchpoint): Adjust.
5390 (i386_low_stopped_data_address): Read the debug registers from the
5391 inferior instead of from the mirrors.
5392 * i386-low.h (struct i386_debug_reg_state): Extend comment.
5393 (i386_dr_low_get_addr): Declare.
5394 (i386_dr_low_get_control): Declare.
5395 (i386_dr_low_get_status): Change prototype.
5396
5397 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
5398 (i386_dr_low_get_addr): New.
5399 (i386_dr_low_get_control): New.
5400 (i386_dr_low_get_status): Adjust prototype. Return
5401 dr_status_mirror.
5402 (i386_initial_stuff): Clear dr_status_mirror and
5403 dr_control_mirror.
5404 (i386_get_thread_context): Adjust.
5405 (i386_set_thread_context): Adjust.
5406 (i386_thread_added): Adjust.
5407
5f21a75b
PA
54082010-08-24 Pedro Alves <pedro@codesourcery.com>
5409
5410 * linux-low.h (linux_thread_area): Delete declaration.
5411
3e4c1235
TS
54122010-08-11 Thomas Schwinge <thomas@codesourcery.com>
5413
5414 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
5415 after its termination.
5416
1971b033
PA
54172010-08-09 Pedro Alves <pedro@codesourcery.com>
5418
5419 * linux-low.c (gdb_wants_lwp_stopped): Delete.
5420 (gdb_wants_all_stopped): Delete.
5421 (linux_wait_1): Don't call them.
5422 * server.c (handle_v_cont): Tag all threads as want-stopped.
5423 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
5424 stopped as "client-wants-stopped".
5425
310444ac
PA
54262010-07-31 Pedro Alves <pedro@codesourcery.com>
5427
5428 * Makefile.in (signals_h): New.
5429 (server_h): Depend on it.
5430 (server.o): Don't depend on $(signals_def).
5431 (signals.o): Depend on $(signals_def).
5432
a19cae16
JK
54332010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
5434
5435 * Makefile.in (signals_def): New.
5436 (server_h): Append include/gdb/signals.h and signals_def.
5437 (server.o): Append signals_def.
5438
30d50328
JK
54392010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
5440
5441 * server.c (handle_target_event): Use target_signal_to_host for
5442 resume_info.sig initialization.
5443 * target.h (struct thread_resume) <sig>: New comment.
5444
5c3216e2
OS
54452010-07-20 Ozkan Sezer <sezeroz@gmail.com>
5446
c6f46ca0
OS
5447 * server.c (handle_query): strcpy() the returned string from paddress()
5448 instead of sprintf().
5c3216e2
OS
5449 * utils.c (paddress): Return phex_nz().
5450
6bd31874
JB
54512010-07-07 Joel Brobecker <brobecker@adacore.com>
5452
5453 * server.c (handle_v_cont): Call mourn_inferior if process
5454 just exited.
5455 (myresume): Likewise.
5456
0fb4aa4b
PA
54572010-07-01 Pedro Alves <pedro@codesourcery.com>
5458
5459 Static tracepoints, and integration with UST.
5460
5461 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
5462 * mem-break.c (uninsert_all_breakpoints)
5463 (reinsert_all_breakpoints): New.
5464 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
5465 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
5466 (gdb_agent_ust_loaded, helper_thread_id)
5467 (gdb_agent_helper_thread_id): New macros.
5468 (struct ipa_sym_addresses): Add addr_ust_loaded,
5469 addr_helper_thread_id, addr_cmd_buf.
5470 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
5471 (in_process_agent_loaded_ust): New.
5472 (write_e_ust_not_loaded): New.
5473 (maybe_write_ipa_ust_not_loaded): New.
5474 (struct collect_static_trace_data_action): New.
5475 (enum tracepoint_type) <static_tracepoint>: New.
5476 (struct tracepoint) <handle>: Mention static tracepoints.
5477 (struct static_tracepoint_ctx): New.
5478 (CMD_BUF_SIZE): New.
5479 (add_tracepoint_action): Handle static tracepoint actions.
5480 (unprobe_marker_at): New.
5481 (clear_installed_tracepoints): Handle static tracepoints.
5482 (cmd_qtdp): Handle static tracepoints.
5483 (probe_marker_at): New.
5484 (cmd_qtstart): Handle static tracepoints.
5485 (response_tracepoint): Handle static tracepoints.
5486 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
5487 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
5488 (get_context_regcache): Handle static tracepoints.
5489 (do_action_at_tracepoint): Handle static tracepoint actions.
5490 (traceframe_find_block_type): Handle static trace data blocks.
5491 (traceframe_read_sdata): New.
5492 (download_tracepoints): Download static tracepoint actions.
5493 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
5494 (GDB_PROBE_NAME): New.
5495 (ust_ops): New.
5496 (GET_UST_SYM): New.
5497 (USTF): New.
5498 (dlsym_ust): New.
5499 (ust_marker_to_static_tracepoint): New.
5500 (gdb_probe): New.
5501 (collect_ust_data_at_tracepoint): New.
5502 (gdb_ust_probe): New.
5503 (UNIX_PATH_MAX, SOCK_DIR): New.
5504 (gdb_ust_connect_sync_socket): New.
5505 (resume_thread, stop_thread): New.
5506 (run_inferior_command): New.
5507 (init_named_socket): New.
5508 (gdb_ust_socket_init): New.
5509 (cstr_to_hexstr): New.
5510 (next_st): New.
5511 (first_marker, next_marker): New.
5512 (response_ust_marker): New.
5513 (cmd_qtfstm, cmd_qtsstm): New.
5514 (unprobe_marker_at, probe_marker_at): New.
5515 (cmd_qtstmat, gdb_ust_thread): New.
5516 (gdb_ust_init): New.
5517 (initialize_tracepoint_ftlib): Call gdb_ust_init.
5518 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
5519 (ST_REGENTRY): New.
5520 (x86_64_st_collect_regmap): New.
5521 (X86_64_NUM_ST_COLLECT_GREGS): New.
5522 (AMD64_RIP_REGNUM): New.
5523 (supply_static_tracepoint_registers): New.
5524 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
5525 (ST_REGENTRY): New.
5526 (i386_st_collect_regmap): New.
5527 (i386_NUM_ST_COLLECT_GREGS): New.
5528 (supply_static_tracepoint_registers): New.
5529 * server.c (handle_query): Handle qXfer:statictrace:read.
5530 <qSupported>: Report support for StaticTracepoints, and
5531 qXfer:statictrace:read features.
5532 * server.h (traceframe_read_sdata)
5533 (supply_static_tracepoint_registers): Declare.
5534 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
5535 (unpack_varlen_hex): Include in IPA build.
5536 * Makefile.in (ustlibs, ustinc): New.
5537 (IPA_OBJS): Add remote-utils-ipa.o.
5538 ($(IPA_LIB)): Link -ldl and -lpthread.
5539 (UST_CFLAGS): New.
5540 (IPAGENT_CFLAGS): Add UST_CFLAGS.
5541 * config.in, configure: Regenerate.
5542
9e4344e5
PA
55432010-06-20 Ian Lance Taylor <iant@google.com>
5544 Pedro Alves <pedro@codesourcery.com>
5545
5546 * linux-x86-low.c (always_true): Delete.
5547 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
5548 trying to fool the compiler with always_true.
5549
c6beb2cb
PA
55502010-06-20 Pedro Alves <pedro@codesourcery.com>
5551
5552 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
5553 conditions in gdbserver.
5554
d2ed6730
UW
55552010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
5556
5557 * spu-low.c (spu_read_memory): Wrap around local store limit.
5558 (spu_write_memory): Likewise.
5559
4e29fb54
PA
55602010-06-15 Pedro Alves <pedro@codesourcery.com>
5561
5562 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
5563 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
5564 LONGEST uses.
5565 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
5566 uses.
5567 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
5568 uses with LONGEST uses.
5569
6a271cae
PA
55702010-06-14 Stan Shebs <stan@codesourcery.com>
5571 Pedro Alves <pedro@codesourcery.com>
5572
5573 Bytecode compiler.
5574
5575 * linux-x86-low.c: Include limits.h.
5576 (add_insns): New.
5577 (always_true): New.
5578 (EMIT_ASM): New.
5579 (EMIT_ASM32): New.
5580 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
5581 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
5582 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
5583 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
5584 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
5585 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
5586 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
5587 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
5588 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
5589 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
5590 (amd64_emit_void_call_2): New.
5591 (amd64_emit_ops): New.
5592 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
5593 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
5594 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
5595 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
5596 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
5597 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
5598 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
5599 (i386_emit_call, i386_emit_reg, i386_emit_pop)
5600 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
5601 (i386_emit_stack_adjust, i386_emit_int_call_1)
5602 (i386_emit_void_call_2): New.
5603 (i386_emit_ops): New.
5604 (x86_emit_ops): New.
5605 (the_low_target): Install x86_emit_ops.
5606 * server.h (struct emit_ops): New.
5607 (get_raw_reg_func_addr): Declare.
5608 (current_insn_ptr, emit_error): Declare.
5609 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
5610 (set_trace_state_variable_value): New defines.
5611 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
5612 addr_get_trace_state_variable_value and
5613 addr_set_trace_state_variable_value.
5614 (symbol_list): New fields for get_raw_reg,
5615 get_trace_state_variable_value and set_trace_state_variable_value.
5616 (condfn): New typedef.
5617 (struct tracepoint): New field `compiled_cond'.
5618 (do_action_at_tracepoint): Clear compiled_cond.
5619 (get_trace_state_variable_value, set_trace_state_variable_value):
5620 Export in the IPA.
5621 (condition_true_at_tracepoint): If there's a compiled condition,
5622 run that.
5623 (current_insn_ptr, emit_error): New globals.
5624 (struct bytecode_address): New.
5625 (get_raw_reg_func_addr): New.
5626 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
5627 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
5628 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
5629 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
5630 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
5631 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
5632 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
5633 (compile_tracepoint_condition, compile_bytecodes): New.
5634 * target.h (emit_ops): Forward declare.
5635 (struct target_ops): New field emit_ops.
5636 (target_emit_ops): New.
5637 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
5638 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
5639 * linux-low.c (linux_emit_ops): New.
5640 (linux_target_ops): Install it.
5641 * linux-low.h (struct linux_target_ops): New field emit_ops.
5642
92b72907
UW
56432010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
5644
5645 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
5646 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
5647
fa593d66
PA
56482010-06-01 Pedro Alves <pedro@codesourcery.com>
5649 Stan Shebs <stan@codesourcery.com>
5650
5651 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
5652 (all): Depend on $(extra_libraries).
5653 (install-only): Install the IPA.
5654 (IPA_OBJS, IPA_LIB): New.
5655 (clean): Remove the IPA lib.
5656 (IPAGENT_CFLAGS): New.
5657 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
5658 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
5659 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
5660 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
5661 * configure.ac: Check for atomic builtins support in the compiler.
5662 (IPA_DEPFILES, extra_libraries): Define.
5663 * configure.srv (ipa_obj): Add description.
5664 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
5665 (i[34567]86-*-linux*): Set ipa_obj.
5666 (x86_64-*-linux*): Set ipa_obj.
5667 * linux-low.c (stabilizing_threads): New.
5668 (supports_fast_tracepoints): New.
5669 (linux_detach): Stabilize threads before detaching.
5670 (handle_tracepoints): Handle internal tracing breakpoints. Assert
5671 the lwp is either not stabilizing, or is moving out of a jump pad.
5672 (linux_fast_tracepoint_collecting): New.
5673 (maybe_move_out_of_jump_pad): New.
5674 (enqueue_one_deferred_signal): New.
5675 (dequeue_one_deferred_signal): New.
5676 (linux_wait_for_event_1): If moving out of a jump pad, defer
5677 pending signals to later.
5678 (linux_stabilize_threads): New.
5679 (linux_wait_1): Check if threads need moving out of jump pads, and
5680 do it if so.
5681 (stuck_in_jump_pad_callback): New.
5682 (move_out_of_jump_pad_callback): New.
5683 (lwp_running): New.
5684 (linux_resume_one_lwp): Handle moving out of jump pads.
5685 (linux_set_resume_request): Dequeue deferred signals.
5686 (need_step_over_p): Also step over fast tracepoint jumps.
5687 (start_step_over): Also uninsert fast tracepoint jumps.
5688 (finish_step_over): Also reinsert fast tracepoint jumps.
5689 (linux_install_fast_tracepoint_jump): New.
5690 (linux_target_ops): Install linux_stabilize_threads and
5691 linux_install_fast_tracepoint_jump_pad.
5692 * linux-low.h (linux_target_ops) <get_thread_area,
5693 install_fast_tracepoint_jump_pad>: New fields.
5694 (struct lwp_info) <collecting_fast_tracepoint,
5695 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
5696 (linux_get_thread_area): Declare.
5697 * linux-x86-low.c (jump_insn): New.
5698 (x86_get_thread_area): New.
5699 (append_insns): New.
5700 (push_opcode): New.
5701 (amd64_install_fast_tracepoint_jump_pad): New.
5702 (i386_install_fast_tracepoint_jump_pad): New.
5703 (x86_install_fast_tracepoint_jump_pad): New.
5704 (the_low_target): Install x86_get_thread_area and
5705 x86_install_fast_tracepoint_jump_pad.
5706 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
5707 (struct fast_tracepoint_jump): New.
5708 (fast_tracepoint_jump_insn): New.
5709 (fast_tracepoint_jump_shadow): New.
5710 (find_fast_tracepoint_jump_at): New.
5711 (fast_tracepoint_jump_here): New.
5712 (delete_fast_tracepoint_jump): New.
5713 (set_fast_tracepoint_jump): New.
5714 (uninsert_fast_tracepoint_jumps_at): New.
5715 (reinsert_fast_tracepoint_jumps_at): New.
5716 (set_breakpoint_at): Use write_inferior_memory.
5717 (uninsert_raw_breakpoint): Use write_inferior_memory.
5718 (check_mem_read): Mask out fast tracepoint jumps.
5719 (check_mem_write): Mask out fast tracepoint jumps.
5720 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
5721 (set_fast_tracepoint_jump): Declare.
5722 (delete_fast_tracepoint_jump)
5723 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
5724 (reinsert_fast_tracepoint_jumps_at): Declare.
5725 * regcache.c: Don't compile many functions when building the
5726 in-process agent library.
5727 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
5728 the register buffer in the heap.
5729 (free_register_cache): If the register buffer isn't owned by the
5730 regcache, don't free it.
5731 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
5732 pre-existing register caches.
5733 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
5734 type.
5735 (convert_ascii_to_int): : Constify `from' parameter type.
5736 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
5737 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
5738 the needed buffer in-place.
5739 (relocate_instruction): New.
5740 * server.c (handle_query) <qSymbols>: If the target supports
5741 tracepoints, give it a chance of looking up symbols. Report
5742 support for fast tracepoints.
5743 (handle_status): Stabilize threads.
5744 (process_serial_event): Adjust.
5745 * server.h (struct fast_tracepoint_jump): Forward declare.
5746 (struct process_info) <fast_tracepoint_jumps>: New field.
5747 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
5748 (decode_X_packet, decode_M_packet): Adjust.
5749 (relocate_instruction): Declare.
5750 (in_process_agent_loaded): Declare.
5751 (tracepoint_look_up_symbols): Declare.
5752 (struct fast_tpoint_collect_status): Declare.
5753 (fast_tracepoint_collecting): Declare.
5754 (force_unlock_trace_buffer): Declare.
5755 (handle_tracepoint_bkpts): Declare.
5756 (initialize_low_tracepoint)
5757 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
5758 * target.h (struct target_ops) <stabilize_threads,
5759 install_fast_tracepoint_jump_pad>: New fields.
5760 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
5761 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
5762 [HAVE_STDINT_H]: Include stdint.h.
5763 (trace_debug_1): Rename to ...
5764 (trace_vdebug): ... this.
5765 (trace_debug): Rename to ...
5766 (trace_debug_1): ... this. Add `level' parameter.
5767 (trace_debug): New.
5768 (ATTR_USED, ATTR_NOINLINE): New.
5769 (IP_AGENT_EXPORT): New.
5770 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5771 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
5772 (about_to_request_buffer_space, trace_buffer_is_full)
5773 (stopping_tracepoint, expr_eval_result, error_tracepoint)
5774 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
5775 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
5776 (traceframe_write_count, traceframes_created)
5777 (trace_state_variables)
5778 New renaming defines.
5779 (struct ipa_sym_addresses): New.
5780 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
5781 (symbol_list): New.
5782 (ipa_sym_addrs): New.
5783 (all_tracepoint_symbols_looked_up): New.
5784 (in_process_agent_loaded): New.
5785 (write_e_ipa_not_loaded): New.
5786 (maybe_write_ipa_not_loaded): New.
5787 (tracepoint_look_up_symbols): New.
5788 (debug_threads) [IN_PROCESS_AGENT]: New.
5789 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
5790 (UNKNOWN_SIDE_EFFECTS): New.
5791 (stop_tracing): New.
5792 (flush_trace_buffer): New.
5793 (stop_tracing_bkpt): New.
5794 (flush_trace_buffer_bkpt): New.
5795 (read_inferior_integer): New.
5796 (read_inferior_uinteger): New.
5797 (read_inferior_data_pointer): New.
5798 (write_inferior_data_pointer): New.
5799 (write_inferior_integer): New.
5800 (write_inferior_uinteger): New.
5801 (struct collect_static_trace_data_action): Delete.
5802 (enum tracepoint_type): New.
5803 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
5804 <actions_str, step_actions, step_actions_str>: Only include in
5805 GDBserver.
fa593d66
PA
5806 <orig_size, obj_addr_on_target, adjusted_insn_addr>
5807 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
5808 (tracepoints): Use IP_AGENT_EXPORT.
5809 (last_tracepoint): Don't include in the IPA.
5810 (stopping_tracepoint): Use IP_AGENT_EXPORT.
5811 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
5812 (alloced_trace_state_variables): New.
5813 (trace_state_variables): Use IP_AGENT_EXPORT.
5814 (traceframe_t): Delete unused variable.
5815 (circular_trace_buffer): Don't include in the IPA.
5816 (trace_buffer_start): Delete.
5817 (struct trace_buffer_control): New.
5818 (trace_buffer_free): Delete.
5819 (struct ipa_trace_buffer_control): New.
5820 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
5821 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
5822 New.
5823 (trace_buffer_ctrl): New.
5824 (TRACE_BUFFER_CTRL_CURR): New.
5825 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
5826 Reimplement as macros.
5827 (trace_buffer_wrap): Delete.
5828 (traceframe_write_count, traceframe_read_count)
5829 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
5830 (struct tracepoint_hit_ctx) <type>: New field.
5831 (struct fast_tracepoint_ctx): New.
5832 (memory_barrier): New.
5833 (cmpxchg): New.
5834 (record_tracepoint_error): Update atomically in the IPA.
5835 (clear_inferior_trace_buffer): New.
5836 (about_to_request_buffer_space): New.
5837 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
5838 updating the same buffer.
5839 (add_tracepoint): Default the tracepoint's type to trap
5840 tracepoint, and orig_size to -1.
5841 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
5842 internal variables.
5843 (create_trace_state_variable): New parameter `gdb'. Handle it.
5844 (clear_installed_tracepoints): Clear fast tracepoint jumps.
5845 (cmd_qtdp): Handle fast tracepoints.
5846 (cmd_qtdv): Adjust.
5847 (max_jump_pad_size): New.
5848 (gdb_jump_pad_head): New.
5849 (get_jump_space_head): New.
5850 (claim_jump_space): New.
5851 (sort_tracepoints): New.
5852 (MAX_JUMP_SIZE): New.
5853 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
5854 IPA.
5855 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
5856 support. Upload fast traceframes, and delete internal IPA
5857 breakpoints.
5858 (stop_tracing_handler): New.
5859 (flush_trace_buffer_handler): New.
5860 (cmd_qtstop): Upload fast tracepoints.
5861 (response_tracepoint): Handle fast tracepoints.
5862 (tracepoint_finished_step): Upload fast traceframes. Set the
5863 tracepoint hit context's tracepoint type.
5864 (handle_tracepoint_bkpts): New.
5865 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
5866 type. Add comment about fast tracepoints.
5867 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
5868 non-existing action_str field.
5869 (get_context_regcache): Handle fast tracepoints.
5870 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
5871 to the regcache.
5872 (fast_tracepoint_from_jump_pad_address): New.
5873 (fast_tracepoint_from_ipa_tpoint_address): New.
5874 (collecting_t): New.
5875 (force_unlock_trace_buffer): New.
5876 (fast_tracepoint_collecting): New.
5877 (collecting): New.
5878 (gdb_collect): New.
5879 (write_inferior_data_ptr): New.
5880 (target_tp_heap): New.
5881 (target_malloc): New.
5882 (download_agent_expr): New.
5883 (UALIGN): New.
5884 (download_tracepoints): New.
5885 (download_trace_state_variables): New.
5886 (upload_fast_traceframes): New.
5887 (IPA_FIRST_TRACEFRAME): New.
5888 (IPA_NEXT_TRACEFRAME_1): New.
5889 (IPA_NEXT_TRACEFRAME): New.
5890 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
5891 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
5892 (gdb_jump_pad_buffer_end): New.
5893 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
5894 (initialize_tracepoint): Adjust.
5895 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
5896 buffer. Initialize the low module.
5897 * utils.c (PREFIX, TOOLNAME): New.
5898 (malloc_failure): Use PREFIX.
5899 (error): In the IPA, an error causes an exit.
5900 (fatal, warning): Use PREFIX.
5901 (internal_error): Use TOOLNAME.
5902 (NUMCELLS): Increase to 10.
5903 * configure, config.in: Regenerate.
5904
d149dd1d
PA
59052010-06-01 Pedro Alves <pedro@codesourcery.com>
5906
5907 * server.c (handle_query) <qSupported>: Do two passes over the
5908 qSupported string to avoid nesting strtok.
5909
f6528abd
JK
59102010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5911
5912 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
5913 (CDEPS): New.
5914 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
5915 -Wl,--dynamic-list.
5916 * configure: Regenerate.
5917 * proc-service.list: New.
5918
ca2a87a0
JK
59192010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5920
5921 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
5922 New comment.
5923
363a6e9f
OS
59242010-05-26 Ozkan Sezer <sezeroz@gmail.com>
5925
5926 * gdbreplay.c (remote_open): Check error return from socket() call by
5927 its equality to -1 not by it being negative.
5928 * remote-utils.c (remote_open): Likewise.
5929
d23b6cb1
PA
59302010-05-23 Pedro Alves <pedro@codesourcery.com>
5931
5932 * config.h: Regenerate.
5933
28d3cf85
MK
59342010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
5935
5936 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
5937 doesn't provide PTRACE_GET_THREAD_AREA.
5938
fea36a59
MK
59392010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
5940
5941 * linux-m68k-low.c: Include <asm/ptrace.h>
5942 (ps_get_thread_area): Implement.
5943
24b066ba
DE
59442010-05-03 Doug Evans <dje@google.com>
5945
5946 * event-loop.c (struct callback_event): New struct.
5947 (callback_list): New global.
5948 (append_callback_event, delete_callback_event): New functions.
5949 (process_callback): New function.
5950 (start_event_loop): Call it.
5951 * remote-utils.c (NOT_SCHEDULED): Define.
5952 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
5953 moved out of readchar.
5954 (readchar): Rewrite. Call reschedule before returning.
5955 (reset_readchar): New function.
5956 (remote_close): Call it.
5957 (process_remaining, reschedule): New functions.
5958 * server.h (callback_handler_func): New typedef.
5959 (append_callback_event, delete_callback_event): Declare.
5960
9836d6ea
PA
59612010-05-03 Pedro Alves <pedro@codesourcery.com>
5962
5963 * proc-service.c (ps_pglobal_lookup): Use
5964 thread_db_look_up_one_symbol.
5965 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
5966 parameter. Use it instead of all_symbols_looked_up.
5967 * server.h (struct process_info) <all_symbols_looked_up>: Delete
5968 field.
5969 (all_symbols_looked_up): Don't declare.
5970 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
5971 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
5972 field.
5973 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
5974 Set all_symbols_looked_up here.
5975 (thread_db_look_up_one_symbol): New.
5976 (thread_db_get_tls_address): Adjust.
5977 (thread_db_load_search, try_thread_db_load_1): Always allocate the
5978 thread_db object on the heap, and tentatively set it in the
5979 process structure.
5980 (thread_db_init): Don't set all_symbols_looked_up here.
5981 * linux-low.h (thread_db_look_up_one_symbol): Declare.
5982
7984d532
PA
59832010-05-03 Pedro Alves <pedro@codesourcery.com>
5984
5985 * linux-low.c (linux_kill, linux_detach): Adjust.
5986 (status_pending_p_callback): Remove redundant statement. Check
5987 for !TARGET_WAITIKIND_IGNORE, instead of
5988 TARGET_WAITKIND_STOPPED.
5989 (handle_tracepoints): Make sure LWP is locked. Adjust.
5990 (linux_wait_for_event_1): Adjust.
5991 (linux_cancel_breakpoints): New.
5992 (unsuspend_one_lwp): New.
5993 (unsuspend_all_lwps): New.
5994 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
5995 (send_sigstop_callback): Change return type to int, add new
5996 `except' parameter and handle it.
5997 (suspend_and_send_sigstop_callback): New.
5998 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
5999 pass them down. If SUSPEND, also increment the lwp's suspend
6000 count.
6001 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
6002 (need_step_over_p): Don't consider suspended LWPs.
6003 (start_step_over): Adjust.
6004 (proceed_one_lwp): Change return type to int, add new `except'
6005 parameter and handle it.
6006 (unsuspend_and_proceed_one_lwp): New.
6007 (proceed_all_lwps): Use find_inferior instead of
6008 for_each_inferior.
6009 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
6010 also decrement the suspend count of LWPs. Pass `except' down,
6011 instead of hacking its suspend count.
6012 (linux_pause_all): Add `freeze' parameter. Adjust.
6013 (linux_unpause_all): New.
6014 (linux_target_ops): Install linux_unpause_all.
6015 * server.c (handle_status): Adjust.
6016 * target.h (struct target_ops): New fields `unpause_all' and
6017 `cancel_breakpoints'. Add new parameter to `pause_all'.
6018 (pause_all): Add new `freeze' parameter.
6019 (unpause_all): New.
6020 (cancel_breakpoints): New.
6021 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
6022 cancel breakpoints.
6023 (cmd_qtstart): Pause threads.
6024 (stop_tracing): Pause threads, and cancel breakpoints.
6025 * win32-low.c (win32_target_ops): Adjust.
6026
e471f25b
PA
60272010-05-03 Pedro Alves <pedro@codesourcery.com>
6028
6029 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
6030 the inferior right away from here...
6031 (linux_wait_1): ... to here, and adjust to check the thread's
6032 last_resume_kind instead of the lwp's step or stop_expected flags.
6033
1915ef4f
PA
60342010-05-02 Pedro Alves <pedro@codesourcery.com>
6035
6036 * README: Use consistent `GDB' and `GDBserver' spellings.
6037
f9e39928
PA
60382010-05-02 Pedro Alves <pedro@codesourcery.com>
6039
6040 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
6041 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
6042 (linux_detach_one_lwp): Assume the lwp is stopped.
6043 (any_thread_of): Delete.
6044 (linux_detach): Stop all lwps here. Don't blindly delete all
6045 breakpoints.
6046 (delete_lwp_callback): New.
6047 (linux_mourn): Delete all lwps of the process that is gone.
6048 (linux_wait_1): Don't delete the last lwp of the process here.
6049 * mem-break.h (mark_breakpoints_out): Declare.
6050 * mem-break.c (mark_breakpoints_out): New.
6051 (free_all_breakpoints): Use it.
6052 * server.c (handle_target_event): If the process is gone, mark
6053 breakpoints out.
6054 * thread-db.c (struct thread_db) <create_bp>: New field.
6055 (thread_db_enable_reporting): Fix prototype. Store a thread event
6056 breakpoint reference in the thread_db struct.
6057 (thread_db_load_search): Clear the thread_db object.
6058 (try_thread_db_load_1): Ditto.
6059 (switch_to_process): New.
6060 (disable_thread_event_reporting): Use it.
6061 (remove_thread_event_breakpoints): New.
6062 (thread_db_detach, thread_db_mourn): Use it.
6063
1e7fc18c
PA
60642010-05-01 Pedro Alves <pedro@codesourcery.com>
6065
6066 * linux-low.c (linux_enable_event_reporting): New.
6067 (linux_wait_for_event_1, handle_extended_wait): Use it.
6068
02fc4de7
PA
60692010-04-30 Pedro Alves <pedro@codesourcery.com>
6070
6071 * linux-low.c (linux_kill_one_lwp, linux_kill)
6072 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
6073 (send_sigstop): Take an lwp_info as parameter instead. Queue a
6074 SIGSTOP even if the LWP is stopped.
6075 (send_sigstop_callback): New.
6076 (stop_all_lwps): Use send_sigstop_callback instead.
6077 (linux_resume_one_thread): Adjust.
6078 (proceed_one_lwp): Still proceed an LWP that the client has
6079 requested to stop, if we haven't reported it as stopped yet. Make
6080 sure that LWPs the client want stopped, have a pending SIGSTOP.
6081
bc3b5632
DE
60822010-04-26 Doug Evans <dje@google.com>
6083
ae1ada35
DE
6084 * server.c (handle_general_set): Make static.
6085
bc3b5632
DE
6086 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
6087 Print received char after testing for error/eof instead of before.
6088 (input_interrupt): Tweak comment.
6089
65730243
DE
60902010-04-23 Doug Evans <dje@google.com>
6091
6092 * server.c (start_inferior): Print inferior argv if --debug.
6093
a8ae7dc0
AR
60942010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
6095
6096 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
6097 * nto-x86-low.c: Include server.h
6098
1c07cc19
PM
60992010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
6100
6101 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
6102 be consistent with other sources of this directory.
6103 (init_registers_amd64): Correct name of source file of this function
6104 in the comment.
6105
e0a61e09
PM
61062010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6107
6108 * configure.srv (x86_64-*-mingw*): New configuration for Windows
6109 64-bit executables.
6110
54709339
PM
61112010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6112
6113 * win32-i386-low.c: Add 64-bit support.
6114 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
6115 (init_registers_amd64): Declare.
6116 (mappings): Add 64-bit version of array.
6117 (init_windows_x86): New function.
6118 (the_low_target): Change init_arch field to init_windows_x86.
6119
e8f0053d
PM
61202010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6121
6122 * win32-low.c: Adapt to support also 64-bit architecture.
6123 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
6124 (get_image_name): Use SIZE_T type for local variable `done'.
6125 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
6126 (toolhelp_get_dll_name): Idem.
6127 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
6128 Use uintptr_t typecast to avoid warning.
6129 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
6130 (handle_exception): Use phex_nz to avoid warning.
6131 (win32_wait): Remove unused local variable `process'.
6132
c481e77e
PM
61332010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6134
6135 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
6136 `amd64-avx.o'.
6137
12ea4b69
PM
61382010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
6139
6140 * configure.ac: Use `ws2_32' library for srv_mingw.
6141 * configure: Regenerate.
6142 * gdbreplay.c: Include winsock2.h instead of winsock.h.
6143 * remote-utils.c: Likewise.
6144
f6d1620c
L
61452010-04-17 H.J. Lu <hongjiu.lu@intel.com>
6146
6147 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
6148 if __x86_64__ is defined.
6149
8e642873
PM
61502010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
6151
6152 * configure: Regenerate.
6153
711e434b
PM
61542010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
6155
6156 * server.c (handle_query): Handle 'qGetTIBAddr' query.
6157 * target.h (target_ops): New get_tib_address field.
6158 * win32-low.h (win32_thread_info): Add thread_local_base field.
6159 * win32-low.c (child_add_thread): Add tlb argument.
6160 Set thread_local_base field to TLB.
6161 (get_child_debug_event): Adapt to child_add_thread change.
6162 (win32_get_tib_address): New function.
6163 (win32_target_ops): Set get_tib_address field to
6164 win32_get_tib_address.
6165 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
6166
505106cd
PA
61672010-04-12 Pedro Alves <pedro@codesourcery.com>
6168
505106cd
PA
6169 * linux-low.c (linux_mourn): Also remove the process.
6170 * server.c (handle_target_event): Don't remove the process here.
6171 * nto-low.c (nto_mourn): New.
6172 (nto_target_ops): Install it.
6173 * spu-low.c (spu_mourn): New.
6174 (spu_target_ops): Install it.
6175 * win32-low.c (win32_mourn): New.
6176 (win32_target_ops): Install it.
6177
e8470a06
PA
61782010-04-12 Pedro Alves <pedro@codesourcery.com>
6179
6180 * server.h (buffer_xml_printf): Remove redundant `;'.
6181
45ba0d02
PA
61822010-04-12 Pedro Alves <pedro@codesourcery.com>
6183
6184 * regcache.c (set_register_cache): Invalidate regcaches before
6185 changing the register cache layout.
6186 (regcache_invalidate_one): Allow a NULL regcache.
6187 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
6188 regcaches before changing the register cache layout or the target
6189 regsets.
6190
59e04013
L
61912010-04-12 H.J. Lu <hongjiu.lu@intel.com>
6192
6193 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
6194 variable warning on Linux/x86-64.
6195
8336d594
PA
61962010-04-11 Pedro Alves <pedro@codesourcery.com>
6197
6198 GDBserver disconnected tracing support.
6199
6200 * linux-low.c (linux_remove_process): Delete.
6201 (add_lwp): Don't set last_resume_kind here.
6202 (linux_kill): Use `mourn'.
6203 (linux_detach): Use `thread_db_detach', and `mourn'.
6204 (linux_mourn): New.
6205 (linux_attach_lwp_1): Adjust comment.
6206 (linux_attach): last_resume_kind moved the thread_info; adjust.
6207 (status_pending_p_callback): Adjust.
6208 (linux_wait_for_event_1): Adjust.
6209 (count_events_callback, select_singlestep_lwp_callback)
6210 (select_event_lwp_callback, cancel_breakpoints_callback)
6211 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
6212 (proceed_one_lwp): Adjust.
6213 (linux_async): Add debug output.
6214 (linux_thread_stopped): New.
6215 (linux_pause_all): New.
6216 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
6217 linux_pause_all.
6218 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
6219 (thread_db_free): Delete declaration.
6220 (thread_db_detach, thread_db_mourn): Declare.
6221 * thread-db.c (thread_db_init): Use thread_db_mourn.
6222 (thread_db_free): Delete, split in two.
6223 (disable_thread_event_reporting): New.
6224 (thread_db_detach): New.
6225 (thread_db_mourn): New.
6226
6227 * server.h (struct thread_info) <last_resume_kind>: New field.
6228 <attached>: Add comment.
6229 <gdb_detached>: New field.
6230 (handler_func): Change return type to int.
6231 (handle_serial_event, handle_target_event): Ditto.
6232 (gdb_connected): Declare.
6233 (tracing): Delete.
6234 (disconnected_tracing): Declare.
6235 (stop_tracing): Declare.
6236
6237 * server.c (handle_query) <qSupported>: Report support for
6238 disconnected tracing.
6239 (queue_stop_reply_callback): Account for running threads.
6240 (gdb_wants_thread_stopped): New.
6241 (gdb_wants_all_threads_stopped): New.
6242 (gdb_reattached_process): New.
6243 (handle_status): Clear the `gdb_detached' flag of all processes.
6244 In all-stop, stop all threads.
6245 (main): Be sure to leave tfind mode. Handle disconnected tracing.
6246 (process_serial_event): If the remote connection breaks, or if an
6247 exit was forced with "monitor exit", force an event loop exit.
6248 Handle disconnected tracing on detach.
6249 (handle_serial_event): Adjust.
6250 (handle_target_event): If GDB isn't connected, forward events back
6251 to the inferior, unless the last process exited, in which case,
6252 exit gdbserver. Adjust interface.
6253
6254 * remote-utils.c (remote_open): Don't block in accept. Instead
6255 register an event loop source on the listen socket file
6256 descriptor. Refactor bits into ...
6257 (listen_desc): ... this new global.
6258 (gdb_connected): ... this new function.
6259 (enable_async_notification): ... this new function.
6260 (handle_accept_event): ... this new function.
6261 (remote_close): Clear remote_desc.
6262
6263 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
6264
6265 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
6266 New fields.
6267 (mourn_inferior): Define.
6268 (target_process_qsupported): Avoid the dangling else problem.
6269 (thread_stopped): Define.
6270 (pause_all): Define.
6271 (target_waitstatus_to_string): Declare.
6272 * target.c (target_waitstatus_to_string): New.
6273
6274 * tracepoint.c (tracing): Make extern.
6275 (disconnected_tracing): New.
6276 (stop_tracing): Make extern. Handle tracing stops due to GDB
6277 disconnecting.
6278 (cmd_qtdisconnected): New.
6279 (cmd_qtstatus): Report disconnected tracing status in trace reply.
6280 (handle_tracepoint_general_set): Handle QTDisconnected.
6281
6282 * event-loop.c (event_handler_func): Change return type to int.
6283 (process_event): Bail out if the event handler wants the event
6284 loop to stop.
6285 (handle_file_event): Ditto.
6286 (start_event_loop): Bail out if the event handler wants the event
6287 loop to stop.
6288
6289 * nto-low.c (nto_target_ops): Adjust.
6290 * spu-low.c (spu_wait): Don't remove the process here.
6291 (spu_target_ops): Adjust.
6292 * win32-low.c (win32_wait): Don't remove the process here.
6293 (win32_target_ops): Adjust.
6294
5d267c4c
PA
62952010-04-11 Pedro Alves <pedro@codesourcery.com>
6296
6297 * regcache.c (realloc_register_cache): Invalidate inferior's
6298 regcache before recreating it.
6299
623ccd72
PA
63002010-04-09 Pedro Alves <pedro@codesourcery.com>
6301
6302 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
6303
219f2f23
PA
63042010-04-09 Stan Shebs <stan@codesourcery.com>
6305 Pedro Alves <pedro@codesourcery.com>
6306
6307 * server.h (LONGEST): New.
6308 (struct thread_info) <while_stepping>: New field.
6309 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
6310 Declare.
6311 (initialize_tracepoint, handle_tracepoint_general_set)
6312 (handle_tracepoint_query, tracepoint_finished_step)
6313 (tracepoint_was_hit, release_while_stepping_state_list):
6314 (current_traceframe): Declare.
6315 * server.c (handle_general_set): Handle tracepoint packets.
6316 (read_memory): New.
6317 (write_memory): New.
6318 (handle_search_memory_1): Use read_memory.
6319 (handle_query): Report support for conditional tracepoints, trace
6320 state variables, and tracepoint sources. Handle tracepoint
6321 queries.
6322 (main): Initialize the tracepoints module.
6323 (process_serial_event): Handle traceframe reads/writes.
6324
6325 * linux-low.c (handle_tracepoints): New.
6326 (linux_wait_1): Call it.
6327 (linux_resume_one_lwp): Handle while-stepping.
6328 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
6329 (linux_target_ops): Install them.
6330 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
6331 New field.
6332 * linux-x86-low.c (x86_supports_tracepoints): New.
6333 (the_low_target). Install it.
6334
6335 * mem-break.h (delete_breakpoint): Declare.
6336 * mem-break.c (delete_breakpoint): Make external.
6337
6338 * target.h (struct target_ops): Add `supports_tracepoints',
6339 `read_pc', and `write_pc' fields.
6340 (target_supports_tracepoints): Define.
6341 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
6342 (phex_nz): New.
6343
6344 * regcache.h (struct regcache) <registers_owned>: New field.
6345 (init_register_cache, regcache_cpy): Declare.
6346 (regcache_read_pc, regcache_write_pc): Declare.
6347 (register_cache_size): Declare.
6348 (supply_regblock): Declare.
6349 * regcache.c (init_register_cache): New.
6350 (new_register_cache): Use it.
6351 (regcache_cpy): New.
6352 (register_cache_size): New.
6353 (supply_regblock): New.
6354 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 6355
219f2f23
PA
6356 * tracepoint.c: New.
6357
6358 * Makefile.in (OBS): Add tracepoint.o.
6359 (tracepoint.o): New rule.
6360
3a13a53b
L
63612010-04-08 H.J. Lu <hongjiu.lu@intel.com>
6362
6363 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
6364 (i386-mmx.o): New.
6365 (i386-mmx.c): Likewise.
6366 (i386-mmx-linux.o): Likewise.
6367 (i386-mmx-linux.c): Likewise.
6368
6369 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
6370 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
6371 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
6372 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
6373
6374 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
6375 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
6376 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
6377
1570b33e
L
63782010-04-07 H.J. Lu <hongjiu.lu@intel.com>
6379
6380 * Makefile.in (clean): Updated.
6381 (i386-avx.o): New.
6382 (i386-avx.c): Likewise.
6383 (i386-avx-linux.o): Likewise.
6384 (i386-avx-linux.c): Likewise.
6385 (amd64-avx.o): Likewise.
6386 (amd64-avx.c): Likewise.
6387 (amd64-avx-linux.o): Likewise.
6388 (amd64-avx-linux.c): Likewise.
6389
6390 * configure.srv (srv_i386_regobj): Add i386-avx.o.
6391 (srv_i386_linux_regobj): Add i386-avx-linux.o.
6392 (srv_amd64_regobj): Add amd64-avx.o.
6393 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
6394 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
6395 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
6396 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
6397 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
6398 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
6399 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
6400
6401 * i387-fp.c: Include "i386-xstate.h".
6402 (i387_xsave): New.
6403 (i387_cache_to_xsave): Likewise.
6404 (i387_xsave_to_cache): Likewise.
6405 (x86_xcr0): Likewise.
6406
6407 * i387-fp.h (i387_cache_to_xsave): Likewise.
6408 (i387_xsave_to_cache): Likewise.
6409 (x86_xcr0): Likewise.
6410
6411 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
6412 * linux-crisv32-low.c (target_regsets): Likewise.
6413 * linux-m68k-low.c (target_regsets): Likewise.
6414 * linux-mips-low.c (target_regsets): Likewise.
6415 * linux-ppc-low.c (target_regsets): Likewise.
6416 * linux-s390-low.c (target_regsets): Likewise.
6417 * linux-sh-low.c (target_regsets): Likewise.
6418 * linux-sparc-low.c (target_regsets): Likewise.
6419 * linux-xtensa-low.c (target_regsets): Likewise.
6420
6421 * linux-low.c: Include <sys/uio.h>.
6422 (regsets_fetch_inferior_registers): Support nt_type.
6423 (regsets_store_inferior_registers): Likewise.
6424 (linux_process_qsupported): New.
6425 (linux_target_ops): Add linux_process_qsupported.
6426
6427 * linux-low.h (regset_info): Add nt_type.
6428 (linux_target_ops): Add process_qsupported.
6429
6430 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
6431 and <sys/uio.h>.
6432 (init_registers_i386_avx_linux): New.
6433 (init_registers_amd64_avx_linux): Likewise.
6434 (xmltarget_i386_linux_no_xml): Likewise.
6435 (xmltarget_amd64_linux_no_xml): Likewise.
6436 (PTRACE_GETREGSET): Likewise.
6437 (PTRACE_SETREGSET): Likewise.
6438 (x86_fill_xstateregset): Likewise.
6439 (x86_store_xstateregset): Likewise.
6440 (use_xml): Likewise.
6441 (x86_linux_update_xmltarget): Likewise.
6442 (x86_linux_process_qsupported): Likewise.
6443 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
6444 (x86_arch_setup): Don't call init_registers_amd64_linux nor
6445 init_registers_i386_linux here. Call
6446 x86_linux_update_xmltarget.
6447 (the_low_target): Add x86_linux_process_qsupported.
6448
6449 * server.c (handle_query): Call target_process_qsupported.
6450
6451 * target.h (target_ops): Add process_qsupported.
6452 (target_process_qsupported): New.
6453
fc7238bb
PA
64542010-04-03 Pedro Alves <pedro@codesourcery.com>
6455
6456 * inferiors.c (add_thread): Set last_status kind to
6457 TARGET_WAITKIND_IGNORE.
6458 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
6459 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
6460 (linux_wait_1): Move `thread' local definition to block that uses
6461 it. Don't NULL initialize `event_child'.
6462 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
6463 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
6464 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
6465
bdabb078
PA
64662010-04-01 Pedro Alves <pedro@codesourcery.com>
6467
6468 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
6469 an extended waitstatus, or by a watchpoint.
6470 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
6471 thread was stepping or has been stopped by a watchpoint.
6472
d3bbe7a0
PA
64732010-04-01 Pedro Alves <pedro@codesourcery.com>
6474
6475 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
6476 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
6477 of another, then delete the previous, and validate all
6478 breakpoints.
6479 (validate_inserted_breakpoint): New.
6480 (delete_disabled_breakpoints): New.
6481 (validate_breakpoints): New.
6482 (check_mem_read): Validate breakpoints before trusting their
6483 shadow. Delete disabled breakpoints.
6484 (check_mem_write): Validate breakpoints before trusting they
6485 should be inserted. Delete disabled breakpoints.
6486 * mem-break.h (validate_breakpoints):
6487 * server.c (handle_query): Validate breakpoints when we see a
6488 qSymbol query.
6489
8b07ae33
PA
64902010-04-01 Pedro Alves <pedro@codesourcery.com>
6491
6492 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
6493 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
6494 if we could tell there's a GDB breakpoint at stop_pc.
6495 (need_step_over_p): Don't do a step over if we find a GDB
6496 breakpoint at the resume PC.
6497
6498 * mem-break.c (struct raw_breakpoint): New.
6499 (enum bkpt_type): New type `gdb_breakpoint'.
6500 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
6501 fields. New field `raw'.
6502 (find_raw_breakpoint_at): New.
6503 (set_raw_breakpoint_at): Handle refcounting. Create a raw
6504 breakpoint instead.
6505 (set_breakpoint_at): Adjust.
6506 (delete_raw_breakpoint): New.
6507 (release_breakpoint): New.
6508 (delete_breakpoint): Rename to...
6509 (delete_breakpoint_1): ... this. Add proc parameter. Use
6510 release_breakpoint. Return ENOENT.
6511 (delete_breakpoint): Reimplement.
6512 (find_breakpoint_at): Delete.
6513 (find_gdb_breakpoint_at): New.
6514 (delete_breakpoint_at): Delete.
6515 (set_gdb_breakpoint_at): New.
6516 (delete_gdb_breakpoint_at): New.
6517 (gdb_breakpoint_here): New.
6518 (set_reinsert_breakpoint): Use release_breakpoint.
6519 (uninsert_breakpoint): Rename to ...
6520 (uninsert_raw_breakpoint): ... this.
6521 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
6522 (reinsert_raw_breakpoint): Change parameter type to
6523 raw_breakpoint.
6524 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
6525 instead.
6526 (check_breakpoints): Adjust. Use release_breakpoint.
6527 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
6528 (breakpoint_inserted_here): Ditto.
6529 (check_mem_read): Adjust to iterate over raw breakpoints instead.
6530 Don't trust the breakpoint's shadow if it is not inserted.
6531 (check_mem_write): Adjust to iterate over raw breakpoints instead.
6532 (delete_all_breakpoints): Adjust.
6533 (free_all_breakpoints): Mark all breakpoints as uninserted, and
6534 use delete_breakpoint_1.
6535
6536 * mem-break.h (breakpoints_supported): Delete declaration.
6537 (set_gdb_breakpoint_at): Declare.
6538 (gdb_breakpoint_here): Declare.
6539 (delete_breakpoint_at): Delete.
6540 (delete_gdb_breakpoint_at): Declare.
6541
6542 * server.h (struct raw_breakpoint): Forward declare.
6543 (struct process_info): New field `raw_breakpoints'.
6544
6545 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
6546 breakpoints.
6547
6bf5e0ba
PA
65482010-03-24 Pedro Alves <pedro@codesourcery.com>
6549
6550 * linux-low.c (status_pending_p_callback): Fix comment.
6551 (linux_wait_for_event_1): Move most of the internal breakpoint
6552 handling from here...
6553 (linux_wait_1): ... to here.
6554 (count_events_callback): New.
6555 (select_singlestep_lwp_callback): New.
6556 (select_event_lwp_callback): New.
6557 (cancel_breakpoints_callback): New.
6558 (select_event_lwp): New.
6559 (linux_wait_1): Simplify internal breakpoint handling. Give equal
6560 priority to all LWPs that have had events that should be reported
6561 to the client. Cancel breakpoints when about to reporting the
6562 event to the client, not while stopping lwps. No longer cancel
6563 finished single-steps here.
6564 (cancel_finished_single_step): Delete.
6565 (cancel_finished_single_steps): Delete.
6566
414a389f
PA
65672010-03-24 Pedro Alves <pedro@codesourcery.com>
6568
6569 * mem-break.c (enum bkpt_type): New.
6570 (struct breakpoint): New field `type'.
6571 (set_breakpoint_at): Change return type to struct breakpoint
6572 pointer. Set type to `other_breakpoint' by default.
6573 (delete_breakpoint): Rewrite, supporting more than one breakpoint
6574 in the breakpoint list.
6575 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
6576 (reinsert_breakpoint): Rename to ...
6577 (reinsert_raw_breakpoint): ... this.
6578 (reinsert_breakpoints_at): Adjust.
6579 * mem-break.h (struct breakpoint): Declare.
6580 (set_breakpoint_at): Change return type to struct breakpoint
6581 pointer.
6582
2280c721
PA
65832010-03-24 Pedro Alves <pedro@codesourcery.com>
6584
6585 * server.c (handle_query): Assign, not compare.
6586
d50171e4
PA
65872010-03-24 Pedro Alves <pedro@codesourcery.com>
6588
6589 Teach linux gdbserver to step-over-breakpoints.
6590
6591 * linux-low.c (can_hardware_single_step): New.
6592 (supports_breakpoints): New.
6593 (handle_extended_wait): If stopping threads, read the stop pc of
6594 the new cloned LWP.
6595 (get_pc): New.
6596 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
6597 low target doesn't support retrieving the PC.
6598 (add_lwp): Set last_resume_kind to resume_continue.
6599 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
6600 (linux_attach): Don't clear stop_expected. Set the lwp's
6601 last_resume_kind to resume_stop.
6602 (linux_detach_one_lwp): Don't check for removed breakpoints.
6603 (check_removed_breakpoint): Delete.
6604 (status_pending_p): Rename to ...
6605 (status_pending_p_callback): ... this. Don't check for removed
6606 breakpoints. Don't consider threads that are stopped from GDB's
6607 perspective.
6608 (linux_wait_for_lwp): Always read the stop_pc here.
6609 (cancel_breakpoint): New.
6610 (step_over_bkpt): New global.
6611 (linux_wait_for_event_1): Implement stepping over breakpoints.
6612 (gdb_wants_lwp_stopped): New.
6613 (gdb_wants_all_stopped): New.
6614 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
6615 single-step traps here. Store the thread's last reported target
6616 wait status.
6617 (send_sigstop): Don't clear stop_expected. Always set it,
6618 instead.
6619 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
6620 (cancel_finished_single_step): New.
6621 (cancel_finished_single_steps): New.
6622 (wait_for_sigstop): Don't cancel finished single-step traps here.
6623 (linux_resume_one_lwp): Don't check for removed breakpoints.
6624 Don't set `step' on non-hardware step archs.
6625 (linux_set_resume_request): Ignore resume_stop requests if already
6626 stopping or stopped. Set the lwp's last_resume_kind.
6627 (resume_status_pending_p): Don't check for removed breakpoints.
6628 (need_step_over_p): New.
6629 (start_step_over): New.
6630 (finish_step_over): New.
6631 (linux_resume_one_thread): Always queue a sigstop for resume_stop
6632 requests. Clear the thread's last reported target waitstatus.
6633 Don't use the `suspended' flag. Don't consider pending breakpoints.
6634 (linux_resume): Start a step-over if necessary.
6635 (proceed_one_lwp): New.
6636 (proceed_all_lwps): New.
6637 (unstop_all_lwps): New.
6638 * linux-low.h (struct lwp_info): Rewrite comment for the
6639 `suspended' flag. Add the `stop_pc' field. Delete the
6640 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
6641 Add `'last_resume_kind' and `need_step_over' fields.
6642 * inferiors.c (struct thread_info): Delete, moved elsewhere.
6643 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
6644 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
6645 (set_raw_breakpoint_at): New.
6646 (set_breakpoint_at): Rewrite to use it.
6647 (reinsert_breakpoint_handler): Delete.
6648 (set_reinsert_breakpoint): New.
6649 (reinsert_breakpoint_by_bp): Delete.
6650 (delete_reinsert_breakpoints): New.
6651 (uninsert_breakpoint): Rewrite.
6652 (uninsert_breakpoints_at): New.
6653 (reinsert_breakpoint): Rewrite.
6654 (reinsert_breakpoints_at): New.
6655 (check_breakpoints): Rewrite.
6656 (breakpoint_here): New.
6657 (breakpoint_inserted_here): New.
6658 (check_mem_read): Adjust.
6659 * mem-break.h (breakpoints_supported, breakpoint_here)
6660 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
6661 (reinsert_breakpoint_by_bp): Delete declaration.
6662 (delete_reinsert_breakpoints): Declare.
6663 (reinsert_breakpoint): Delete declaration.
6664 (reinsert_breakpoints_at): Declare.
6665 (uninsert_breakpoint): Delete declaration.
6666 (uninsert_breakpoints_at): Declare.
6667 (check_breakpoints): Adjust prototype.
6668 * server.h: Adjust include order.
6669 (struct thread_info): Declare here. Add a `last_status' field.
6670
30ba68cb
MS
66712010-03-23 Michael Snyder <msnyder@vmware.com>
6672
6673 * server.c (crc32): New function.
6674 (handle_query): Add handling for 'qCRC:' request.
6675
b9a881c2
PA
66762010-03-23 Pedro Alves <pedro@codesourcery.com>
6677
6678 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
6679 lwp had been stopped by a watchpoint.
6680
e92d13d5
PA
66812010-03-16 Pedro Alves <pedro@codesourcery.com>
6682
6683 * server.h (internal_error): Declare.
6684 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
6685 * utils.c (internal_error): New function.
6686
64daa791
AS
66872010-03-15 Andreas Schwab <schwab@redhat.com>
6688
6689 * configure.srv: Fix typo setting srv_regobj.
6690
f52cd8cd
PA
66912010-03-15 Pedro Alves <pedro@codesourcery.com>
6692
6693 * linux-low.c (fetch_register): Avoid passing a non string literal
6694 format to `error'.
6695 (usr_store_inferior_registers): Ditto.
6696
93ae6fdc
PA
66972010-03-14 Pedro Alves <pedro@codesourcery.com>
6698
6699 * linux-low.c (linux_write_memory): Bail out early if peeking
6700 memory failed.
6701
c3adc08c
PA
67022010-03-14 Pedro Alves <pedro@codesourcery.com>
6703
6704 * linux-low.h (struct lwp_info): New fields
6705 `stopped_by_watchpoint' and `stopped_data_address'.
6706 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
6707 here, and cache them in the lwp object.
6708 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
6709 directly.
6710 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
6711 field.
6712 (linux_stopped_by_watchpoint): Rewrite.
6713 (linux_stopped_data_address): Rewrite.
6714
bce522a2
PA
67152010-03-06 Simo Melenius <simo.melenius@iki.fi>
6716
6717 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
6718 switching the current inferior, not before.
6719
90884b2b
L
67202010-03-01 H.J. Lu <hongjiu.lu@intel.com>
6721
6722 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
6723 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
6724 i386-linux.c and amd64-linux.c.
6725 (reg-i386.o): Removed.
6726 (reg-i386.c): Likewise.
6727 (reg-i386-linux.o): Likewise.
6728 (reg-i386-linux.c): Likewise.
6729 (reg-x86-64.o): Likewise.
6730 (reg-x86-64.c): Likewise.
6731 (reg-x86-64-linux.o): Likewise.
6732 (reg-x86-64-linux.c): Likewise.
6733 (i386.o): New.
6734 (i386.c): Likewise.
6735 (i386-linux.o): Likewise.
6736 (i386-linux.c): Likewise.
6737 (amd64.o): Likewise.
6738 (amd64.c): Likewise.
6739 (amd64-linux.o): Likewise.
6740 (amd64-linux.c): Likewise.
6741
6742 * configure.srv (srv_i386_regobj): New.
6743 (srv_i386_linux_regobj): Likewise.
6744 (srv_amd64_regobj): Likewise.
6745 (srv_amd64_linux_regobj): Likewise.
6746 (srv_i386_32bit_xmlfiles): Likewise.
6747 (srv_i386_64bit_xmlfiles): Likewise.
6748 (srv_i386_xmlfiles): Likewise.
6749 (srv_amd64_xmlfiles): Likewise.
6750 (srv_i386_linux_xmlfiles): Likewise.
6751 (srv_amd64_linux_xmlfiles): Likewise.
6752 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
6753 srv_xmlfiles to $srv_i386_xmlfiles.
6754 (i[34567]86-*-mingw32ce*): Likewise.
6755 (i[34567]86-*-mingw*): Likewise.
6756 (i[34567]86-*-nto*): Likewise.
6757 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
6758 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
6759 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
6760 (x86_64-*-linux*): Likewise.
6761
6762 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
6763 (init_registers_amd64_linux): New.
6764 (x86_arch_setup): Replace init_registers_x86_64_linux with
6765 init_registers_amd64_linux.
6766
193f13e6
MK
67672010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
6768
6769 * configure.ac: Check for libdl. If it is not available link against
6770 static libthread_db.
6771 * configure: Regenerate.
6772
85d721b8
PA
67732010-02-22 Pedro Alves <pedro@codesourcery.com>
6774
6775 PR9605
6776
6777 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
6778 handing a read watchpoint.
6779 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
6780
6076632b
DE
67812010-02-12 Doug Evans <dje@google.com>
6782
6783 * linux-low.c (linux_supports_tracefork_flag): Document.
6784 (linux_look_up_symbols): Add comment.
6785
3327ccf7
L
67862010-02-03 H.J. Lu <hongjiu.lu@intel.com>
6787
6788 * regcache.c (supply_register): Clear regcache if buf is NULL.
6789
0718675c 67902010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 6791 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
6792
6793 * inferiors.c (find_inferior): Add function documentation.
6794 (unloaded_dll): Handle the case where the unloaded dll has not
6795 been previously registered in the dll list.
6796
177321bd
DJ
67972010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
6798
6799 * linux-arm-low.c (thumb_breakpoint_len): Delete.
6800 (thumb2_breakpoint): New.
6801 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
6802
2b009048
DJ
68032010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
6804
6805 * linux-low.c (get_stop_pc): Check for SIGTRAP.
6806 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
6807 breakpoints.
6808
3be029c7
PA
68092010-01-21 Pedro Alves <pedro@codesourcery.com>
6810
6811 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
6812
18f5de3b
JK
68132010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
6814
6815 * linux-s390-low.c (s390_collect_ptrace_register)
6816 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
6817
3743bb4f
DE
68182010-01-21 Doug Evans <dje@google.com>
6819
14ce3065
DE
6820 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
6821 (PTRACE_ARG4_TYPE): New macro.
6822 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
6823 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
6824 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
6825 (usr_store_inferior_registers): Ditto.
6826 (linux_read_memory, linux_write_memory): Ditto.
6827 (linux_test_for_tracefork): Ditto.
6828
3743bb4f
DE
6829 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
6830 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
6831
8b315be5
PA
68322010-01-21 Pedro Alves <pedro@codesourcery.com>
6833
6834 * proc-service.c (ps_lgetregs): Don't refetch registers from the
6835 target.
6836
85492558
PA
68372010-01-21 Pedro Alves <pedro@codesourcery.com>
6838
6839 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
6840 prototype to take a regcache. Adjust.
6841
442ea881
PA
68422010-01-20 Pedro Alves <pedro@codesourcery.com>
6843
6844 * regcache.h (struct thread_info): Forward declare.
6845 (struct regcache): New.
6846 (new_register_cache): Adjust prototype.
6847 (get_thread_regcache): Declare.
6848 (free_register_cache): Adjust prototype.
6849 (registers_to_string, registers_from_string): Ditto.
6850 (supply_register, supply_register_by_name, collect_register)
6851 (collect_register_as_string, collect_register_by_name): Ditto.
6852 * regcache.c (struct inferior_regcache_data): Delete.
6853 (get_regcache): Rename to ...
6854 (get_thread_regcache): ... this. Adjust. Switch inferior before
6855 fetching registers.
6856 (regcache_invalidate_one): Adjust.
6857 (regcache_invalidate): Fix prototype.
6858 (new_register_cache): Return the new register cache.
6859 (free_register_cache): Change prototype.
6860 (realloc_register_cache): Adjust.
6861 (registers_to_string): Change prototype to take a regcache. Adjust.
6862 (registers_from_string): Ditto.
6863 (register_data): Ditto.
6864 (supply_register): Ditto.
6865 (supply_register_by_name): Ditto.
6866 (collect_register): Ditto.
6867 (collect_register_as_string): Ditto.
6868 (collect_register_by_name): Ditto.
6869 * server.c (process_serial_event): Adjust.
6870 * linux-low.h (regset_fill_func, regset_store_func): Change
6871 prototype.
6872 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
6873 Change prototype.
6874 * linux-low.c (get_stop_pc): Adjust.
6875 (check_removed_breakpoint): Adjust.
6876 (linux_wait_for_event): Adjust.
6877 (linux_resume_one_lwp): Adjust.
6878 (fetch_register): Add regcache parameter. Adjust.
6879 (usr_store_inferior_registers): Ditto.
6880 (regsets_fetch_inferior_registers): Ditto.
6881 (regsets_store_inferior_registers): Ditto.
6882 (linux_fetch_registers, linux_store_registers): Ditto.
6883 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
6884 regcache. Adjust.
43aaf8b6
PA
6885 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
6886 Ditto.
442ea881
PA
6887 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
6888 prototype to take a regcache.
6889 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
6890 * remote-utils.c (convert_ascii_to_int, outreg)
6891 (prepare_resume_reply): Change prototype to take a regcache.
6892 Adjust.
6893 * target.h (struct target_ops) <fetch_registers, store_registers>:
6894 Change prototype to take a regcache.
6895 (fetch_inferior_registers, store_inferior_registers): Change
6896 prototype to take a regcache. Adjust.
6897 * proc-service.c (ps_lgetregs): Adjust.
6898 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
6899 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
6900 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
6901 take a regcache. Adjust.
6902 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
6903 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
6904 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
6905 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
6906 * linux-cris-low.c (cris_get_pc, cris_set_pc)
6907 (cris_cannot_fetch_register):
6908 (cris_breakpoint_at): Change prototype to take a regcache.
6909 Adjust.
6910 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
6911 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
6912 to take a regcache. Adjust.
6913 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
6914 Adjust.
6915 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
6916 take a regcache. Adjust.
6917 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
6918 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
6919 (m68k_set_pc): Change prototype to take a regcache. Adjust.
6920 * linux-mips-low.c (mips_get_pc):
6921 (mips_set_pc): Change prototype to take a regcache. Adjust.
6922 (mips_reinsert_addr): Adjust.
6923 (mips_collect_register): Change prototype to take a regcache.
6924 Adjust.
6925 (mips_supply_register):
6926 (mips_collect_register_32bit, mips_supply_register_32bit)
6927 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
6928 (mips_store_fpregset): Ditto.
43aaf8b6
PA
6929 * linux-ppc-low.c (ppc_supply_ptrace_register)
6930 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
6931 (parse_spufs_run): Adjust.
6932 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
6933 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
6934 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
6935 take a regcache. Adjust.
6936 * linux-s390-low.c (s390_collect_ptrace_register)
6937 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
6938 (s390_set_pc): Change prototype to take a regcache. Adjust.
6939 (s390_arch_setup): Adjust.
6940 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
6941 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
6942 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
6943 (sparc_fill_gregset, sparc_store_gregset_from_stack)
6944 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
6945 regcache. Adjust.
6946 (sparc_breakpoint_at): Adjust.
6947 * linux-xtensa-low.c (xtensa_fill_gregset):
6948 (xtensa_store_gregset):
6949 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
6950 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
6951 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
6952 prototype to take a regcache. Adjust.
6953 * win32-arm-low.c (arm_fetch_inferior_register)
6954 (arm_store_inferior_register): Change prototype to take a
6955 regcache. Adjust.
6956 * win32-i386-low.c (i386_fetch_inferior_register)
6957 (i386_store_inferior_register): Change prototype to take a
6958 regcache. Adjust.
6959 * win32-low.c (child_fetch_inferior_registers)
6960 (child_store_inferior_registers): Change prototype to take a
6961 regcache. Adjust.
6962 (win32_wait): Adjust.
6963 (win32_fetch_inferior_registers): Change prototype to take a
6964 regcache. Adjust.
6965 (win32_store_inferior_registers): Adjust.
6966 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
6967 store_inferior_register>: Change prototype to take a regcache.
6968
60c3d7b0
DE
69692010-01-20 Doug Evans <dje@google.com>
6970
6971 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
6972 #ifdef.
6973 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 6974 (W_STOPCODE): Provide definition if missing.
60c3d7b0 6975
dc146f7c
VP
69762010-01-13 Vladimir Prus <vladimir@codesourcery.com>
6977
6978 * linux-low.c (linux_core_of_thread): New.
6979 (compare_ints, show_process, list_threads): New.
6980 (linux_qxfer_osdata): Report threads and cores.
6981 (linux_target_op): Register linux_core_of_thread.
6982 * remote-utils.c (prepare_resume_reply): Report the core.
6983 (buffer_xml_printf): Support %d specifier.
6984 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
6985 New.
6986 (handle_query): Handle qXfer:threads. Announce availability
6987 thereof.
6988 * target.h (struct target_ops): New field core_of_thread.
6989
7803799a
UW
69902010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
6991
6992 * Makefile.in (clean): Remove new generated files.
6993 (reg-s390.o, reg-s390.c): Remove rules.
6994 (reg-s390x.o, reg-s390x.c): Likewise.
6995 (s390-linux32.o, s390-linux32.c): Add rules.
6996 (s390-linux64.o, s390-linux64.c): Likewise.
6997 (s390x-linux64.o, s390x-linux64.c): Likewise.
6998 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
6999 * linux-s390-low.c: Include <elf.h>.
7000 (HWCAP_S390_HIGH_GPRS): Define if undefined.
7001 (init_registers_s390): Remove prototype.
7002 (init_registers_s390x): Likewise.
7003 (init_registers_s390_linux32): Add prototype.
7004 (init_registers_s390_linux64): Likewise.
7005 (init_registers_s390x_linux64): Likewise.
7006 (s390_num_regs_3264): New define.
7007 (s390_regmap_3264): New global variable.
7008 (s390_cannot_fetch_register): Remove obsolete check.
7009 (s390_cannot_store_register): Likewise.
7010 (s390_collect_ptrace_register): Handle upper/lower register halves.
7011 (s390_supply_ptrace_register): Likewise.
7012 (s390_fill_gregset): Update to register number changes.
7013 (s390_get_hwcap): New routine.
7014 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
7015 Install appropriate regmap and register set.
7016
6e7ffa39
JB
70172010-01-01 Joel Brobecker <brobecker@adacore.com>
7018
7019 * server.c (gdbserver_version): Update copyright year to 2010.
7020 * gdbreplay.c (gdbreplay_version): Likewise.
7021
957f3f49
DE
70222009-12-28 Doug Evans <dje@google.com>
7023
7024 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
7025 elf/external.h. Include <elf.h> instead but only if necessary.
7026
ca5c370d
PA
70272009-12-28 Pedro Alves <pedro@codesourcery.com>
7028
7029 * linux-low.c (linux_remove_process): Remove `detaching'
7030 parameter. Don't release/detach from thread_db here.
7031 (linux_kill): Release/detach from thread_db here, ...
7032 (linux_detach): ... and here, before actually detaching.
7033 (linux_wait_1): ... and here, when a process exits.
7034 * thread-db.c (any_thread_of): New.
7035 (thread_db_free): Switch the current inferior to a thread of the
7036 passed in process.
7037
4ee62156
DE
70382009-12-21 Doug Evans <dje@google.com>
7039
d90e6a88
DE
7040 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
7041
c5f62d5f
DE
7042 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
7043 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
7044 warning ifndef __NR_tkill. Move setting of errno there too.
7045 Delete unnecessary resetting of errno after syscall.
7046 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
7047
10e86dd7
DE
7048 * configure.ac: Check for dladdr.
7049 * config.in: Regenerate.
7050 * configure: Regenerate.
7051 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
7052 (try_thread_db_load): Update.
7053
4ee62156
DE
7054 * linux-low.c (my_waitpid): Delete unnecessary prototype.
7055
00f515da
DE
70562009-12-18 Doug Evans <dje@google.com>
7057
e9464885
DE
7058 * event-loop.c: Include unistd.h if it exists.
7059
07d4f67e
DE
7060 * linux-low.c (my_waitpid): Move definition away from being in
7061 between linux_tracefork_child/linux_test_for_tracefork.
7062
00f515da
DE
7063 * gdb_proc_service.h (psaddr_t): Fix type.
7064 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
7065 signature to match glibc.
7066
1de1badb
DE
70672009-12-16 Doug Evans <dje@google.com>
7068
7069 * linux-low.c (linux_read_memory): Fix argument to read.
7070
aeeb81d1
PA
70712009-11-26 Pedro Alves <pedro@codesourcery.com>
7072
7073 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
7074 events, don't leave current_inferior pointing at null.
7075
10357975
PA
70762009-11-26 Pedro Alves <pedro@codesourcery.com>
7077
7078 * win32-low.c (LOG): Delete.
7079 (OUTMSG): Output to stderr.
7080 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
7081 on compile time LOG macro.
7082 (win32_wait): Fix debug output.
7083
cf6e3471
PA
70842009-11-26 Pedro Alves <pedro@codesourcery.com>
7085
7086 * win32-low.c (win32_add_one_solib): If the dll name is
7087 "ntdll.dll", prepend the system directory to the dll path.
7088
0c85e18e
MK
70892009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
7090
7091 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
7092
9ac544ce 70932009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 7094 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
7095
7096 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
7097 * configure.ac: Check for __mcoldfire__ and set
7098 gdb_cv_m68k_is_coldfire.
7099 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
7100 reg-cf.o and reg-m68k.o.
7101 * configure: Regenerated.
7102
fd7dd3e6
PA
71032009-11-16 Pedro Alves <pedro@codesourcery.com>
7104
7105 * linux-low.c (linux_remove_process): Add `detaching' parameter.
7106 Pass it to thread_db_free.
7107 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
7108 proper `detaching' argument to linux_remove_process.
7109 * linux-low.h (thread_db_free): Add `detaching' parameter.
7110 * thread-db.c (thread_db_init): Pass false as `detaching' argument
7111 to thread_db_free.
7112 (thread_db_free): Add `detaching' parameter. Only
7113 call td_ta_clear_event if detaching from process.
7114
75aa492e
MK
71152009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
7116
7117 * thread-db.c (thread_db_free): Fix typo.
7118
21e1bee4
PP
71192009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
7120
7121 PR gdb/10838
7122 * thread-db.c (thread_db_free): Call td_ta_clear_event.
7123
8838b45e
NS
71242009-11-03 Nathan Sidwell <nathan@codesourcery.com>
7125
7126 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
7127 with an i686 compiler.
7128 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
7129 needed.
7130 * configure: Rebuilt.
7131
8a35fb51
SL
71322009-10-29 Sandra Loosemore <sandra@codesourcery.com>
7133
7134 PR gdb/10783
7135
7136 * server.c (handle_search_memory_1): Correct read_addr initialization
7137 in loop for searching subsequent chunks.
7138
96f15937
PP
71392009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
7140
7141 * configure.ac: New --with-libthread-db option.
7142 * thread-db.c: Allow direct dependence on libthread_db.
7143 (thread_db_free): Adjust.
7144 * config.in: Regenerate.
7145 * configure: Likewise.
889bf7c5 7146
5f7d1694
PP
71472009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
7148
7149 PR gdb/10757
7150 * thread-db.c (attach_thread): New function.
7151 (maybe_attach_thread): Return success/failure.
7152 (find_new_threads_callback): Adjust.
889bf7c5
PA
7153 (thread_db_find_new_threads): Loop until no new threads.
7154
88e3b899
PA
71552009-10-13 Pedro Alves <pedro@codesourcery.com>
7156
7157 * proc-service.c (ps_lgetregs): Formatting.
7158
cdbfd419
PP
71592009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
7160
7161 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
7162 * configure.ac: Adjust.
7163 * linux-low.h (struct process_info_private): Move members to struct
7164 thread_db.
7165 (thread_db_free, thread_db_handle_monitor_command): New prototype.
7166 * linux-low.c (linux_remove_process): Adjust.
7167 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
7168 * server.c (handle_query): Move code ...
7169 (handle_monitor_command): ... here. New function.
7170 * target.h (struct target_ops): New member.
7171 * thread-db.c (struct thread_db): New.
7172 (libthread_db_search_path): New variable.
7173 (thread_db_create_event, thread_db_enable_reporting)
7174 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
7175 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
7176 (try_thread_db_load_1, dladdr_to_soname): New functions.
7177 (try_thread_db_load, thread_db_load_search): New functions.
7178 (thread_db_init): Search for libthread_db.
7179 (thread_db_free): New function.
7180 (thread_db_handle_monitor_command): Likewise.
7181 * config.in: Regenerate.
7182 * configure: Regenerate.
889bf7c5 7183
4168d2d6
UW
71842009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
7185
7186 * spu-low.c (spu_kill): Wait for inferior to terminate.
7187 Call clear_inferiors.
7188 (spu_detach): Call clear_inferiors.
7189
81ecdfbb
RW
71902009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7191
7192 * aclocal.m4: Regenerate.
7193 * config.in: Likewise.
7194 * configure: Likewise.
7195
0b9ff2c0
UW
71962009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7197
7198 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
7199 (parse_spufs_run): New function.
7200 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
7201 (ppc_breakpoint_at): Handle SPU breakpoints.
7202
efcbbd14
UW
72032009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7204
7205 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
7206 (SPUFS_MAGIC): Define.
7207 (spu_enumerate_spu_ids): New function.
7208 (linux_qxfer_spu): New function.
7209 (linux_target_ops): Install linux_qxfer_spu.
7210
f4d9bade
UW
72112009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7212
7213 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
7214 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
7215 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
7216 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
7217 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
7218 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
7219 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
7220 (init_registers_powerpc_cell32l): Add prototype.
7221 (init_registers_powerpc_cell64l): Likewise.
7222 (ppc_arch_setup): Detect Cell/B.E. architecture.
7223
96e946ca
RW
72242009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7225
7226 * Makefile.in (datarootdir): New variable.
7227
58d6951d
DJ
72282009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
7229
7230 * linux-low.c (linux_write_memory): Update debugging output.
7231 * Makefile.in (clean): Add new descriptions.
7232 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
7233 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
7234 * configure.srv: Add new files for arm*-*-linux*.
7235 * linux-arm-low.c: Add new declarations.
7236 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
7237 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
7238 (HWCAP_VFPv3D16): New.
7239 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
7240 instead of __IWMMXT__.
7241 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
7242 (arm_arch_setup): New.
7243 (target_regsets): Remove #ifdef. Add VFP regset.
7244 (the_low_target): Use arm_arch_setup.
7245
12b42a12
DJ
72462009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
7247
7248 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
7249 the main thread again.
7250
ac8c974e
AR
72512009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
7252
7253 Adding Neutrino gdbserver.
7254 * configure: Regenerated.
7255 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
7256 * configure.srv (i[34567]86-*-nto*): New target.
7257 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
7258 * remote-utils.c [__QNX__]: Include sys/iomgr.h
7259 (nto_comctrl) [__QNX__]: New function.
7260 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
7261
4424e0c3 72622009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
7263
7264 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
7265 srv_tgtobj.
7266
912cf4ba
PA
72672009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
7268 Pedro Alves <pedro@codesourcery.com>
7269
7270 * win32-i386-low.c (i386_get_thread_context): Handle systems that
7271 don't support CONTEXT_EXTENDED_REGISTERS.
7272 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
7273 (the_low_target): Install them.
7274 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
7275 failing with ERROR_PIPE_NOT_CONNECTED.
7276
aa5ca48f
DE
72772009-06-30 Doug Evans <dje@google.com>
7278 Pierre Muller <muller@ics.u-strasbg.fr>
7279
7280 Add h/w watchpoint support to x86-linux, win32-i386.
7281 * Makefile.in (SFILES): Add i386-low.c
7282 (i386_low_h): Define.
7283 (i386-low.o): Add dependencies.
7284 (linux-x86-low.o): Add i386-low.h dependency.
7285 (win32-i386-low.o): Ditto.
7286 * i386-low.c: New file.
7287 * i386-low.h: New file.
7288 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
7289 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
7290 * linux-low.c (linux_add_process): Initialize arch_private.
7291 (linux_remove_process): Free arch_private.
7292 (add_lwp): Initialize arch_private.
7293 (delete_lwp): Free arch_private.
7294 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
7295 provided.
7296 * linux-low.h (process_info_private): New member arch_private.
7297 (lwp_info): New member arch_private.
7298 (linux_target_ops): New members new_process, new_thread,
7299 prepare_to_resume.
7300 (ptid_of): New macro.
7301 * linux-x86-low.c: Include stddef.h, i386-low.h.
7302 (arch_process_info): New struct.
7303 (arch_lwp_info): New struct.
7304 (x86_linux_dr_get, x86_linux_dr_set): New functions.
7305 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
7306 (i386_dr_low_get_status): New function.
7307 (x86_insert_point, x86_remove_point): New functions.
7308 (x86_stopped_by_watchpoint): New function.
7309 (x86_stopped_data_address): New function.
7310 (x86_linux_new_process, x86_linux_new_thread): New functions.
7311 (x86_linux_prepare_to_resume): New function.
7312 (the_low_target): Add entries for insert_point, remove_point,
7313 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
7314 prepare_to_resume.
7315 * server.c (debug_hw_points): New global.
7316 (monitor_show_help): Document set debug-hw-points.
7317 (handle_query): Process "set debug-hw-points".
7318 * server.h (debug_hw_points): Declare.
7319 (paddress): Declare.
7320 * utils.c (NUMCELLS, CELLSIZE): New macros.
7321 (get_sell, xsnprintf, paddress): New functions.
7322 * win32-arm-low.c (the_low_target): Add entries for insert_point,
7323 remove_point, stopped_by_watchpoint, stopped_data_address.
7324 * win32-i386-low.c: Include i386-low.h.
7325 (debug_reg_state): Replaces dr.
7326 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
7327 (i386_dr_low_get_status): New function.
7328 (i386_insert_point, i386_remove_point): New functions.
7329 (i386_stopped_by_watchpoint): New function.
7330 (i386_stopped_data_address): New function.
7331 (i386_initial_stuff): Update.
7332 (get_thread_context,set_thread_context,i386_thread_added): Update.
7333 (the_low_target): Add entries for insert_point,
7334 remove_point, stopped_by_watchpoint, stopped_data_address.
7335 * win32-low.c (win32_insert_watchpoint): New function.
7336 (win32_remove_watchpoint): New function.
7337 (win32_stopped_by_watchpoint): New function.
7338 (win32_stopped_data_address): New function.
7339 (win32_target_ops): Add entries for insert_watchpoint,
7340 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
7341 * win32-low.h (win32_target_ops): New members insert_point,
7342 remove_point, stopped_by_watchpoint, stopped_data_address.
7343
d993e290
PA
73442009-06-25 Pedro Alves <pedro@codesourcery.com>
7345
7346 * server.c (process_serial_event): Re-return unsupported, not
7347 error, if the type isn't recognized. Re-allow supporting only
7348 insert or remove packets. Also call require_running for
7349 breakpoints. Add missing break statement to default case. Tidy.
7350 * target.h (struct target_ops): Rename insert_watchpoint to
7351 insert_point, and remove_watchpoint to remove_point.
7352
7353 * linux-low.h (struct linux_target_ops): Likewise.
7354 * linux-low.c (linux_insert_watchpoint): Rename to ...
7355 (linux_insert_point): ... this. Adjust.
7356 (linux_remove_watchpoint): Rename to ...
7357 (linux_remove_point): ... this. Adjust.
7358 (linux_target_ops): Adjust.
7359 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
7360 (cris_insert_point): ... this.
7361 (cris_remove_watchpoint): Rename to ...
7362 (cris_remove_point): ... this.
7363 (the_low_target): Adjust.
7364
0f54c268
PM
73652009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
7366
7367 * server.c (handle_v_kill): Pass signal_pid to
7368 kill_inferior if multi_process is zero.
7369
c6314022
AR
73702009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
7371
7372 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
7373 * target.h (target_ops): Comment for *_watchpoint to make it clear
7374 the functions can get types '0' and '1'.
7375
4463ce24
AR
73762009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
7377
7378 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
7379 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
7380 * regcache.c (get_regcache): Likewise.
7381 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
7382 * win32-low.c (child_fetch_inferior_registers): Remove check for
7383 regno 0.
7384
cf8fd78b
PA
73852009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
7386 Pedro Alves <pedro@codesourcery.com>
7387
7388 * target.h (struct target_ops) <supports_multi_process>: New
7389 callback.
7390 (target_supports_multi_process): New.
7391 * server.c (handle_query): Even if GDB reports support, only
7392 enable multi-process if the target also supports it. Report
7393 multi-process support only if the target backend supports it.
7394 * linux-low.c (linux_supports_multi_process): New function.
7395 (linux_target_ops): Install it as target_supports_multi_process
7396 callback.
7397
47c0c975
DE
73982009-05-24 Doug Evans <dje@google.com>
7399
e09875d4
DE
7400 Global renaming of find_thread_pid to find_thread_ptid.
7401 * server.h (find_thread_ptid): Renamed from find_thread_pid.
7402 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
7403 All callers updated.
7404
e27d73f6
DE
7405 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
7406 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
7407 directly.
7408
47c0c975
DE
7409 * linux-low.c (get_stop_pc): Print pc if debug_threads.
7410 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
7411 (linux_resume_one_lwp): Ditto.
7412
2acc282a
DE
74132009-05-23 Doug Evans <dje@google.com>
7414
7415 * linux-low.c (linux_resume_one_lwp): Change type of first arg
7416 from struct inferior_list_entry * to struct lwp_info *.
7417 All callers updated.
7418
9f1036c1
DE
74192009-05-13 Doug Evans <dje@google.com>
7420
7421 * linux-x86-low.c: Don't include assert.h.
7422 (x86_siginfo_fixup): Use fatal, not assert.
7423 (x86_arch_setup): Fix comment.
7424
d0722149
DE
74252009-05-12 Doug Evans <dje@google.com>
7426
7427 Biarch support for i386/amd64 gdbserver.
7428 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
7429 Add linux-x86-low.c.
7430 (linux-i386-low.o, linux-x86-64-low.o): Delete.
7431 (linux-x86-low.o): Add.
7432 * linux-x86-64-low.c: Delete.
7433 * linux-i386-low.c: Delete.
7434 * linux-x86-low.c: New file.
7435 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
7436 linux-x86-low.o.
7437 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
7438 linux-x86-low.o.
7439 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
7440 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
7441 (linux_child_pid_to_exec_file): New function.
7442 (elf_64_header_p, elf_64_file_p): New functions.
7443 (siginfo_fixup): New function.
7444 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
7445 give target a chance to convert layout.
7446 * linux-low.h (linux_target_ops): New member siginfo_fixup.
7447 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
7448
fdeb2a12
DE
74492009-05-07 Doug Evans <dje@google.com>
7450
7451 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
7452 (regsets_store_inferior_registers): Ditto.
7453
a6dbe5df
PA
74542009-05-06 Pedro Alves <pedro@codesourcery.com>
7455
7456 PR server/10048
7457
7458 * linux-low.c (must_set_ptrace_flags): Delete.
7459 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
7460 of the global.
7461 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
7462 `lwp->must_set_ptrace_flags' instead.
ba42693b 7463 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
7464 (linux_wait_1): ... not here.
7465
5091eb23
DE
74662009-04-30 Doug Evans <dje@google.com>
7467
9f767825
DE
7468 * inferiors.c (started_inferior_callback): New function.
7469 (attached_inferior_callback): New function.
7470 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
7471 * server.c (print_started_pid, print_attached_pid): New functions.
7472 (detach_or_kill_for_exit): New function.
7473 (main): Call it instead of for_each_inferior (kill_inferior_callback).
7474 * server.h (have_started_inferiors_p): Declare.
7475 (have_attached_inferiors_p): Declare.
7476
5091eb23
DE
7477 * inferiors.c (remove_process): Fix memory leak, free process.
7478 * linux-low.c (linux_remove_process): New function.
7479 (linux_kill): Call it instead of remove_process.
7480 (linux_detach, linux_wait_1): Ditto.
7481
155c8968
PA
74822009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
7483
7484 * configure.srv: Add x86 Windows CE target.
7485
7fe519cb
UW
74862009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
7487
7488 * inferiors.c (get_thread_process): Make global.
7489 * server.h (get_thread_process): Add prototype.
7490 * thread-db.c (find_one_thread): Use get_thread_process
7491 instead of current_process.
7492 (thread_db_get_tls_address): Do not crash if called when
7493 thread layer is not yet initialized.
7494
5472f405
UW
74952009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
7496
7497 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
7498 * spu-low.c (current_tid): Rename to ...
7499 (current_ptid): ... this.
7500 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
7501 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
7502 ptid_get_lwp (current_ptid) instead of current_tid.
7503 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
7504 instead of current_tid. Use find_process_pid to verify pid
7505 argument is valid. Pass proper argument to remove_process.
7506 (spu_thread_alive): Compare current_ptid instead of current_tid.
7507 (spu_resume): Likewise.
7508
55ac2b99
PA
75092009-04-02 Pedro Alves <pedro@codesourcery.com>
7510
7511 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
7512 variable.
7513
95954743
PA
75142009-04-01 Pedro Alves <pedro@codesourcery.com>
7515
7516 Implement the multiprocess extensions, and add linux multiprocess
7517 support.
7518
7519 * server.h (ULONGEST): Declare.
7520 (struct ptid, ptid_t): New.
7521 (minus_one_ptid, null_ptid): Declare.
7522 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
7523 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
7524 (struct inferior_list_entry): Change `id' type from unsigned from
7525 to ptid_t.
7526 (struct sym_cache, struct breakpoint, struct
7527 process_info_private): Forward declare.
7528 (struct process_info): Declare.
7529 (current_process): Declare.
7530 (all_processes): Declare.
7531 (initialize_inferiors): Declare.
7532 (add_thread): Adjust to use ptid_t.
7533 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
7534 (add_process, remove_process, find_thread_pid): Declare.
7535 (find_inferior_id): Adjust to use ptid_t.
7536 (cont_thread, general_thread, step_thread): Change type to ptid_t.
7537 (multi_process): Declare.
7538 (push_event): Adjust to use ptid_t.
7539 (read_ptid, write_ptid): Declare.
7540 (prepare_resume_reply): Adjust to use ptid_t.
7541 (clear_symbol_cache): Declare.
7542 * inferiors.c (all_processes): New.
7543 (null_ptid, minus_one_ptid): New.
7544 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
7545 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
7546 (add_thread): Change unsigned long to ptid. Remove gdb_id
7547 parameter. Adjust.
7548 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
7549 (gdb_id_to_thread): Rename to ...
7550 (find_thread_pid): ... this. Change unsigned long to ptid.
7551 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
7552 (loaded_dll, pull_pid_from_list): Adjust.
7553 (add_process, remove_process, find_process_pid)
7554 (get_thread_process, current_process, initialize_inferiors): New.
7555 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
7556 (struct target_waitstatus) <related_pid>: Ditto.
7557 (struct target_ops) <kill, detach>: Add `pid' argument. Change
7558 return type to int.
7559 (struct target_ops) <join>: Add `pid' argument.
7560 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
7561 (struct target_ops) <wait>: Add `ptid' field. Change return type
7562 to ptid.
7563 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
7564 (mywait): Add `ptid' argument. Change return type to ptid_t.
7565 (target_pid_to_str): Declare.
7566 * target.c (set_desired_inferior): Adjust to use ptids.
7567 (mywait): Add new `ptid' argument. Adjust.
7568 (target_pid_to_str): New.
7569 * mem-break.h (free_all_breakpoints): Declare.
7570 * mem-break.c (breakpoints): Delelete.
7571 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
7572 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
7573 to use per-process breakpoint list.
7574 (free_all_breakpoints): New.
7575 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
7576 (symbol_cache, all_symbols_looked_up): Delete.
7577 (hexchars): New.
7578 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
7579 read_ptid): New.
7580 (prepare_resume_reply): Change ptid argument's type from unsigned
7581 long to ptid_t. Adjust. Implement W;process and X;process.
7582 (free_sym_cache, clear_symbol_cache): New.
7583 (look_up_one_symbol): Adjust to per-process symbol cache. *
7584 * server.c (cont_thread, general_thread, step_thread): Change type
7585 to ptid_t.
7586 (attached): Delete.
7587 (multi_process): New.
7588 (last_ptid): Change type to ptid_t.
7589 (struct vstop_notif) <ptid>: Change type to ptid_t.
7590 (queue_stop_reply, push_event): Change `ptid' argument's type to
7591 ptid_t.
7592 (discard_queued_stop_replies): Add `pid' argument.
7593 (start_inferior): Adjust to use ptids. Adjust to mywait interface
7594 changes. Don't reference the `attached' global.
7595 (attach_inferior): Adjust to mywait interface changes.
7596 (handle_query): Adjust to use ptids. Parse GDB's qSupported
7597 features. Handle and report "multiprocess+". Handle
7598 "qAttached:PID".
7599 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
7600 changes.
7601 (handle_v_kill): New.
7602 (handle_v_stopped): Adjust to use target_pid_to_str.
7603 (handle_v_requests): Allow multiple attaches and runs when
7604 multiprocess extensions are in effect. Handle "vKill".
7605 (myresume): Adjust to use ptids.
7606 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
7607 (handle_status): Adjust to discard_queued_stop_replies interface
7608 change.
7609 (first_thread_of, kill_inferior_callback)
7610 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
7611 (main): Call initialize_inferiors. Adjust to use ptids, killing
7612 and detaching from all inferiors. Handle multiprocess packet
7613 variants.
7614 * linux-low.h: Include gdb_proc_service.h.
7615 (struct process_info_private): New.
7616 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
7617 <lwpid_of>: Use ptid_get_lwp.
7618 (get_lwp_thread): Adjust.
7619 (struct lwp_info): Add `dead' member.
7620 (find_lwp_pid): Declare.
7621 * linux-low.c (thread_db_active): Delete.
7622 (new_inferior): Adjust comment.
7623 (inferior_pid): Delete.
7624 (linux_add_process): New.
7625 (handle_extended_wait): Adjust.
7626 (add_lwp): Change unsigned long to ptid.
7627 (linux_create_inferior): Add process to processes table. Adjust
7628 to use ptids. Don't set new_inferior here.
7629 (linux_attach_lwp): Rename to ...
7630 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
7631 it. Adjust to use ptids.
7632 (linux_attach_lwp): New.
7633 (linux_attach): Add process to processes table. Don't set
7634 new_inferior here.
7635 (struct counter): New.
7636 (second_thread_of_pid_p, last_thread_of_process_p): New.
7637 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
7638 multiple processes.
7639 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
7640 processes. Remove process from process table.
7641 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
7642 to multiple processes.
7643 (any_thread_of): New.
7644 (linux_detach): Add `pid' argument, and handle it. Remove process
7645 from processes table.
7646 (linux_join): Add `pid' argument. Handle it.
7647 (linux_thread_alive): Change unsighed long argument to ptid_t.
7648 Consider dead lwps as not being alive.
7649 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
7650 threads we're not interested in.
7651 (same_lwp, find_lwp_pid): New.
7652 (linux_wait_for_lwp): Change `pid' argument's type from int to
7653 ptid_t. Adjust.
7654 (linux_wait_for_event): Rename to ...
7655 (linux_wait_for_event_1): ... this. Change `pid' argument's type
7656 from int to ptid_t. Adjust.
7657 (linux_wait_for_event): New.
7658 (linux_wait_1): Add `ptid' argument. Change return type to
7659 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
7660 that exit from the process table.
7661 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
7662 Adjust.
7663 (mark_lwp_dead): New.
7664 (wait_for_sigstop): Adjust to use ptids. If a process exits while
7665 stopping all threads, mark its main lwp as dead.
7666 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
7667 ptids.
7668 (fetch_register, usr_store_inferior_registers)
7669 (regsets_fetch_inferior_registers)
7670 (regsets_store_inferior_registers, linux_read_memory)
7671 (linux_write_memory): Inline `inferior_pid'.
7672 (linux_look_up_symbols): Adjust to use per-process
7673 `thread_db_active'.
7674 (linux_request_interrupt): Adjust to use ptids.
7675 (linux_read_auxv): Inline `inferior_pid'.
7676 (initialize_low): Don't reference thread_db_active.
7677 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
7678 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
7679 (ps_getpid): Return the pid of the current inferior.
7680 * thread-db.c (proc_handle, thread_agent): Delete.
7681 (thread_db_create_event, thread_db_enable_reporting): Adjust to
7682 per-process data.
7683 (find_one_thread): Change argument type to ptid_t. Adjust to
7684 per-process data.
7685 (maybe_attach_thread): Adjust to per-process data and ptids.
7686 (thread_db_find_new_threads): Ditto.
7687 (thread_db_init): Ditto.
7688 * spu-low.c (spu_create_inferior, spu_attach): Add process to
7689 processes table. Adjust to use ptids.
7690 (spu_kill, spu_detach): Adjust interface. Remove process from
7691 processes table.
7692 (spu_join, spu_thread_alive): Adjust interface.
7693 (spu_wait): Adjust interface. Remove process from processes
7694 table. Adjust to use ptids.
7695 * win32-low.c (current_inferior_tid): Delete.
7696 (current_inferior_ptid): New.
7697 (debug_event_ptid): New.
7698 (thread_rec): Take a ptid. Adjust.
7699 (child_add_thread): Add `pid' argument. Adjust to use ptids.
7700 (child_delete_thread): Ditto.
7701 (do_initial_child_stuff): Add `attached' argument. Add process to
7702 processes table.
7703 (child_fetch_inferior_registers, child_store_inferior_registers):
7704 Adjust.
7705 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
7706 (win32_attach): Pass 1 to do_initial_child_stuff.
7707 (win32_kill): Adjust interface. Remove process from processes
7708 table.
7709 (win32_detach): Ditto.
7710 (win32_join): Adjust interface.
7711 (win32_thread_alive): Take a ptid.
7712 (win32_resume): Adjust to use ptids.
7713 (get_child_debug_event): Ditto.
7714 (win32_wait): Adjust interface. Remove exiting process from
7715 processes table.
7716
bd99dc85
PA
77172009-04-01 Pedro Alves <pedro@codesourcery.com>
7718
7719 Non-stop mode support.
7720
7721 * server.h (non_stop): Declare.
7722 (gdb_client_data, handler_func): Declare.
7723 (delete_file_handler, add_file_handler, start_event_loop):
7724 Declare.
7725 (handle_serial_event, handle_target_event, push_event)
7726 (putpkt_notif): Declare.
7727 * target.h (enum resume_kind): New.
7728 (struct thread_resume): Replace `step' field by `kind' field.
7729 (TARGET_WNOHANG): Define.
7730 (struct target_ops) <wait>: Add `options' argument.
7731 <supports_non_stop, async, start_non_stop>: New fields.
7732 (target_supports_non_stop, target_async): New.
7733 (start_non_stop): Declare.
7734 (mywait): Add `options' argument.
7735 * target.c (mywait): Add `options' argument. Print child exit
7736 notifications here.
7737 (start_non_stop): New.
7738 * server.c (non_stop, own_buf, mem_buf): New globals.
7739 (struct vstop_notif): New.
7740 (notif_queue): New global.
7741 (queue_stop_reply, push_event, discard_queued_stop_replies)
7742 (send_next_stop_reply): New.
7743 (start_inferior): Adjust to use resume_kind. Adjust to mywait
7744 interface changes.
7745 (attach_inferior): In non-stop mode, don't wait for the target
7746 here.
7747 (handle_general_set): Handle QNonStop.
7748 (handle_query): When handling qC, return the current general
7749 thread, instead of the first thread of the list.
7750 (handle_query): If the backend supports non-stop mode, include
7751 QNonStop+ in the qSupported query response.
7752 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
7753 and non-stop mode.
7754 (handle_v_attach, handle_v_run): Handle non-stop mode.
7755 (handle_v_stopped): New.
7756 (handle_v_requests): Report support for vCont;t. Handle vStopped.
7757 (myresume): Adjust to use resume_kind. Handle non-stop.
7758 (queue_stop_reply_callback): New.
7759 (handle_status): Handle non-stop mode.
7760 (main): Clear non_stop flag on reconnection. Use the event-loop.
7761 Refactor serial protocol handling from here ...
7762 (process_serial_event): ... to this new function. When GDB
7763 selects any thread, select one here. In non-stop mode, wait until
7764 GDB acks all pending events before exiting.
7765 (handle_serial_event, handle_target_event): New.
7766 * remote-utils.c (remote_open): Install remote_desc in the event
7767 loop.
7768 (remote_close): Remove remote_desc from the event loop.
7769 (putpkt_binary): Rename to...
7770 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
7771 (putpkt_binary): New as wrapper around putpkt_binary_1.
7772 (putpkt_notif): New.
7773 (prepare_resume_reply): In non-stop mode, don't change the
7774 general_thread.
7775 * event-loop.c: New.
7776 * Makefile.in (OBJ): Add event-loop.o.
7777 (event-loop.o): New rule.
7778
7779 * linux-low.h (pid_of): Moved here.
7780 (lwpid_of): New.
7781 (get_lwp_thread): Use lwpid_of.
7782 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
7783 * linux-low.c (pid_of): Delete.
7784 (inferior_pid): Use lwpid_of.
7785 (linux_event_pipe): New.
7786 (target_is_async_p): New.
7787 (delete_lwp): New.
7788 (handle_extended_wait): Use lwpid_of.
7789 (add_lwp): Don't set lwpid field.
7790 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
7791 (linux_kill_one_lwp): If killing a running lwp, stop it first.
7792 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
7793 (linux_detach_one_lwp): If detaching from a running lwp, stop it
7794 first. Adjust to linux_wait_for_event interface changes. Use
7795 lwpid_of.
7796 (linux_detach): Don't delete the main lwp here.
7797 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
7798 (status_pending_p): Don't consider explicitly suspended lwps.
7799 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
7800 pointer. Add OPTIONS argument. Change return type to int. Use
7801 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
7802 (linux_wait_for_event): Take an integer pid instead of a lwp_info
7803 pointer. Add status pointer argument. Return a pid instead of a
7804 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
7805 changes. In non-stop mode, don't switch to a random thread.
7806 (linux_wait): Rename to...
7807 (linux_wait_1): ... this. Add target_options argument, and handle
7808 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
7809 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
7810 clean exit and signal exit code. Don't stop all threads in
7811 non-stop mode. In all-stop mode, only stop all threads when
7812 reporting a stop to GDB. Handle explicit thread stop requests.
7813 (async_file_flush, async_file_mark): New.
7814 (linux_wait): New.
7815 (send_sigstop): Use lwpid_of.
7816 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
7817 interface changes. In non-stop mode, don't switch to a random
7818 thread.
7819 (linux_resume_one_lwp): Use lwpid_of.
7820 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
7821 (linux_resume_one_thread): ... this. Handle resume_stop. In
7822 non-stop mode, don't look for pending flag in all threads.
7823 (resume_status_pending_p): Don't consider explicitly suspended
7824 threads.
7825 (my_waitpid): Reimplement. Emulate __WALL.
7826 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
7827 Use lwpid_of.
7828 (sigchld_handler, linux_supports_non_stop, linux_async)
7829 (linux_start_non_stop): New.
7830 (linux_target_ops): Register linux_supports_non_stop, linux_async
7831 and linux_start_non_stop.
7832 (initialize_low): Install SIGCHLD handler.
7833 * thread-db.c (thread_db_create_event, find_one_thread)
7834 (thread_db_get_tls_address): Use lwpid_of.
7835 * win32-low.c (win32_detach): Adjust to use resume_kind.
7836 (win32_wait): Add `options' argument.
7837 * spu-low.c (spu_resume): Adjust to use resume_kind.
7838 (spu_wait): Add `options' argument.
7839
5b1c542e
PA
78402009-04-01 Pedro Alves <pedro@codesourcery.com>
7841
7842 Decouple target code from remote protocol.
7843
7844 * target.h (enum target_waitkind): New.
7845 (struct target_waitstatus): New.
7846 (struct target_ops) <wait>: Return an unsigned long. Take a
7847 target_waitstatus pointer instead of a char pointer.
7848 (mywait): Likewise.
7849 * target.c (mywait): Change prototype to return an unsigned long.
7850 Take a target_waitstatus pointer instead of a char pointer. Adjust.
7851 * server.h (thread_from_wait, old_thread_from_wait): Delete
7852 declarations.
7853 (prepare_resume_reply): Change prototype to take a
7854 target_waitstatus.
7855 * server.c (thread_from_wait, old_thread_from_wait): Delete.
7856 (last_status, last_ptid): New.
7857 (start_inferior): Remove "statusptr" argument. Adjust. Return a
7858 pid instead of a signal.
7859 (attach_inferior): Remove "status" and "signal" parameters.
7860 Adjust.
7861 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
7862 not as an address.
7863 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
7864 (handle_v_requests, myresume): Remove "status" and "signal"
7865 parameters. Adjust.
7866 (handle_status): New.
7867 (main): Delete local `status'. Adjust.
7868 * remote-utils.c: Include target.h.
7869 (prepare_resume_reply): Change prototype to take a
7870 target_waitstatus. Adjust.
7871
7872 * linux-low.c (linux_wait): Adjust to new target_ops->wait
7873 interface.
7874 * spu-low.c (spu_wait): Adjust.
7875 * win32-low.c (enum target_waitkind, struct target_waitstatus):
7876 Delete.
7877 (win32_wait): Adjust.
7878
2bd7c093
PA
78792009-04-01 Pedro Alves <pedro@codesourcery.com>
7880
7881 * target.h (struct thread_resume): Delete leave_stopped member.
7882 (struct target_ops): Add a `n' argument to the `resume' callback.
7883 * server.c (start_inferior): Adjust.
7884 (handle_v_cont, myresume): Adjust.
7885 * linux-low.c (check_removed_breakpoint): Adjust to resume
7886 interface change, and to removed leave_stopped field.
7887 (resume_ptr): Delete.
7888 (struct thread_resume_array): New.
7889 (linux_set_resume_request): Add new `arg' parameter. Adjust to
7890 resume interface change.
7891 (linux_continue_one_thread, linux_queue_one_thread)
7892 (resume_status_pending_p): Check if the resume field is NULL
7893 instead of checking the leave_stopped member.
7894 (linux_resume): Adjust to the target resume interface change.
7895 * spu-low.c (spu_resume): Adjust to the target resume interface
7896 change.
7897 * win32-low.c (win32_detach, win32_resume): Ditto.
7898
c35fafde
PA
78992009-04-01 Pedro Alves <pedro@codesourcery.com>
7900
7901 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
7902 flag.
7903 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
7904 pending.
7905 (linux_continue_one_thread): Only preserve the stepping flag if
7906 there's a pending breakpoint.
7907
0a59d50b
PA
79082009-03-31 Pedro Alves <pedro@codesourcery.com>
7909
7910 * server.c (main): After the inferior having exited, call
7911 remote_close before exiting gdbserver.
7912
f04c6d38
TJB
79132009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
7914
7915 Fix size of FPSCR in Power 7 processors.
7916 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
7917 (PPC_FEATURE_HAS_DFP): New #define.
7918 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
7919 size of the FPSCR.
7920
78e5cee6
PA
79212009-03-23 Pedro Alves <pedro@codesourcery.com>
7922
7923 * server.c (handle_query) Whitespace and formatting.
7924
1b3f6016
PA
79252009-03-22 Pedro Alves <pedro@codesourcery.com>
7926
7927 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
7928 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
7929 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
7930 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
7931 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
7932 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
7933 Makefile.in, configure.ac: Fix whitespace throughout.
7934 * configure: Regenerate.
7935
a07b2135
PA
79362009-03-22 Pedro Alves <pedro@codesourcery.com>
7937
7938 * inferiors.c (find_inferior): Make it safe for the callback
7939 function to delete the currently iterated inferior.
7940
67cc2626
PA
79412009-03-22 Pedro Alves <pedro@codesourcery.com>
7942
7943 * Makefile.in (linuw_low_h): Move higher.
7944 (thread-db.o): Depend on $(linux_low_h).
7945
54a0b537
PA
79462009-03-17 Pedro Alves <pedro@codesourcery.com>
7947
7948 Rename "process" to "lwp" throughout.
7949
7950 * linux-low.c (all_processes): Rename to...
7951 (all_lwps): ... this.
7952 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
7953 (add_process): Rename to ...
7954 (add_lwp): ... this. Adjust.
7955 (linux_create_inferior): Adjust.
7956 (linux_attach_lwp): Adjust.
7957 (linux_attach): Adjust.
7958 (linux_kill_one_process): Rename to ...
7959 (linux_kill_one_lwp): ... this. Adjust.
7960 (linux_kill): Adjust.
7961 (linux_detach_one_process): Rename to ...
7962 (linux_detach_one_lwp): ... this. Adjust.
7963 (linux_detach): Adjust.
7964 (check_removed_breakpoint): Adjust.
7965 (status_pending_p): Adjust.
7966 (linux_wait_for_process): Rename to ...
7967 (linux_wait_for_lwp): ... this. Adjust.
7968 (linux_wait_for_event): Adjust.
7969 (send_sigstop): Adjust.
7970 (wait_for_sigstop): Adjust.
7971 (stop_all_processes): Rename to ...
7972 (stop_all_lwps): ... this.
7973 (linux_resume_one_process): Rename to ...
7974 (linux_resume_one_lwp): ... this. Adjust.
7975 (linux_set_resume_request, linux_continue_one_thread)
7976 (linux_queue_one_thread, resume_status_pending_p)
7977 (usr_store_inferior_registers, regsets_store_inferior_registers)
7978 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
7979 Adjust.
7980 * linux-low.h (get_process): Rename to ...
7981 (get_lwp): ... this. Adjust.
7982 (get_thread_process): Rename to ...
7983 (get_thread_lwp): ... this. Adjust.
7984 (get_process_thread): Rename to ...
7985 (get_lwp_thread): ... this. Adjust.
7986 (struct process_info): Rename to ...
7987 (struct lwp_info): ... this.
7988 (all_processes): Rename to ...
7989 (all_lwps): ... this.
7990 * proc-service.c (ps_lgetregs): Adjust.
7991 * thread-db.c (thread_db_create_event, find_one_thread)
7992 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
7993
0b16c5cf
PA
79942009-03-14 Pedro Alves <pedro@codesourcery.com>
7995
7996 * server.c (handle_query): Handle "qAttached".
7997
32de4b9d
NS
79982009-03-13 Nathan Sidwell <nathan@codesourcery.com>
7999
8000 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
8001 GPLv3, update license URL.
8002
2aecd87f
DE
80032009-03-01 Doug Evans <dje@google.com>
8004
93efd302 8005 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
8006 (server_h): Add gdb_signals.h.
8007 (signals.o): Update.
8008 * server.h (target_signal_from_host,target_signal_to_host_p)
8009 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
8010
86b1f9c5
PM
80112009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
8012
8013 * remote-utils.c (getpkt): Also generate remote-debug
8014 information if noack_mode is set.
8015
4aa995e1
PA
80162009-02-06 Pedro Alves <pedro@codesourcery.com>
8017
8018 * server.c (handle_query): Report qXfer:siginfo:read and
8019 qXfer:siginfo:write as supported and handle them.
8020 * target.h (struct target_ops) <qxfer_siginfo>: New field.
8021 * linux-low.c (linux_xfer_siginfo): New.
8022 (linux_target_ops): Set it.
8023
62709adf
PA
80242009-01-26 Pedro Alves <pedro@codesourcery.com>
8025
8026 * server.c (gdbserver_usage): Mention --remote-debug.
8027 (main): Accept '--remote-debug' switch.
8028
aef93bd7
DE
80292009-01-18 Doug Evans <dje@google.com>
8030
8031 * regcache.c (new_register_cache): No need to check result of xcalloc.
8032 * server.c (handle_search_memory): Back out calls to xmalloc,
8033 result is checked and error is returned to user upon failure.
8034 (handle_query): Ditto. Add more checks for result of malloc.
8035 (handle_v_cont): Check result of malloc, report error back to
8036 user upon failure.
8037 (handle_v_run): Ditto. Call freeargv.
8038 * server.h (freeargv): Declare.
8039 * utils.c (freeargv): New fn.
8040
54363045
DE
80412009-01-15 Doug Evans <dje@google.com>
8042
f626972c
DE
8043 * gdbreplay.c (perror_with_name): Make arg const char *.
8044 * server.h (target_signal_to_name): Make return type const char *.
0842e787 8045 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 8046 * utils.c (perror_with_name): Make arg const char *.
54363045 8047
18aae699
PA
80482009-01-14 Pedro Alves <pedro@codesourcery.com>
8049
8050 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
8051 when handling a EXIT_PROCESS_DEBUG_EVENT.
8052
ff703abe
JB
80532009-01-06 Joel Brobecker <brobecker@adacore.com>
8054
8055 * gdbreplay.c (gdbreplay_version): Update copyright year.
8056 * server.c (gdbserver_version): Likewise.
8057
f21cc1a2 80582009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
8059
8060 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 8061 (handle_extended_wait): Improve comment.
0e21c1ec 8062
bca929d3
DE
80632008-12-13 Doug Evans <dje@google.com>
8064
8065 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
8066 * server.h (ATTR_MALLOC): New macro.
8067 (xmalloc,xcalloc,xstrdup): Declare.
8068 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
8069 * inferiors.c: Ditto.
8070 * linux-low.c: Ditto.
8071 * mem-break.c: Ditto.
8072 * regcache.c: Ditto.
8073 * remote-utils.c: Ditto.
8074 * server.c: Ditto.
8075 * target.c: Ditto.
8076 * win32-low.c: Ditto.
8077
97438e3f
DE
80782008-12-12 Doug Evans <dje@google.com>
8079
896c7fbb
DE
8080 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
8081 in debugging printf.
8082
97438e3f
DE
8083 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
8084
e3b886f8
DE
80852008-12-09 Doug Evans <dje@google.com>
8086
8087 * linux-low.h (struct process_info): Delete member tid, unused.
8088 * thread-db.c (find_one_thread): Update.
8089 (maybe_attach_thread): Update.
8090
07e059b5
VP
80912008-12-02 Pedro Alves <pedro@codesourcery.com>
8092
889bf7c5
PA
8093 * target.h (struct target_ops): Add qxfer_osdata member.
8094 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
8095 and dirent.h.
8096 (linux_qxfer_osdata): New functions.
8097 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
8098 callback.
8099 * server.c (handle_query): Handle "qXfer:osdata:read:".
8100 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
8101 (buffer_xml_printf): New functions.
8102 * server.h (struct buffer): New.
8103 (buffer_grow_str, buffer_grow_str0): New macros.
8104 (buffer_grow, buffer_free, buffer_init, buffer_finish)
8105 (buffer_xml_printf): Declare.
07e059b5 8106
4cab47ab
DE
81072008-11-24 Doug Evans <dje@google.com>
8108
8109 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
8110
f142445f
DJ
81112008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
8112
8113 * server.c (handle_v_run): Always use the supplied argument list.
8114
d0107bb6 81152008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 8116
d0107bb6
BW
8117 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
8118 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 8119
2c4ad781
TJB
81202008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
8121
8122 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
8123 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
8124 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
8125 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
8126 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
8127 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
8128 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
8129 XML target descriptions.
8130 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
8131 when inferior is running on an ISA 2.05 or later processor. Add
8132 special case to return offset for full 64-bit slot of FPSCR when
8133 in 32-bits.
8134
dfb64f85
DJ
81352008-11-14 Daniel Gutson <dgutson@codesourcery.com>
8136
8137 * Makefile.in (SFILES, clean): Added sparc64 files.
8138 (reg-sparc64.o, reg-sparc64.c): New.
8139 * configure.srv (sparc*-*-linux*): New configuration.
8140 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
8141 syscall arguments for SPARC.
8142 (regsets_store_inferior_registers): Likewise.
8143 * linux-sparc-low.c: New file.
8144
66b6e1dd
DE
81452008-10-21 Doug Evans <dje@google.com>
8146
8147 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
8148 (READLINE_DIR,READLINE_DEP): Delete.
8149 (INTERNAL_CFLAGS): Update.
8150 (LINTFLAGS): Update.
8151
9b710a42
PA
81522008-10-10 Pedro Alves <pedro@codesourcery.com>
8153
8154 * server.c (handle_v_run): If GDB didn't specify an argv, use the
8155 whole argv from the last run, not just argv[0].
8156
5822d809
PA
81572008-09-08 Pedro Alves <pedro@codesourcery.com>
8158
8159 * regcache.c (new_register_cache): Return NULL if the register
8160 cache size isn't known yet.
8161 (free_register_cache): Avoid dereferencing a NULL regcache.
8162
74aac56f
DJ
81632008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
8164
8165 * configure.srv: Merge MIPS and MIPS64.
8166
400b20f5
MR
81672008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
8168
8169 * Makefile.in (uninstall): Apply $(EXEEXT) too.
8170
677c5bb1
LM
81712008-08-18 Luis Machado <luisgpm@br.ibm.com>
8172
8173 * Makefile.in: Add required vsx dependencies.
8174
8175 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
8176 Declare init_registers_powerpc_vsx32l.
8177 Declare init_registers_powerpc_vsx64l.
8178 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
8179 (ppc_arch_setup): Check for VSX in hwcap.
8180 (ppc_fill_vsxregset): New function.
8181 (ppc_store_vsxregset): New function.
8182 Add new VSX entry in regset_info target_regsets.
8183
8184 * configure.srv: Add new VSX dependencies.
8185
a6f3e723
SL
81862008-08-12 Pedro Alves <pedro@codesourcery.com>
8187
8188 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
8189 (remote_open): Set or clear transport_is_reliable.
8190 (putpkt_binary): Don't expect acks in noack mode.
8191 (getpkt): Don't send ack/nac in noack mode.
8192 * server.c (handle_general_set): Handle QStartNoAckMode.
8193 (handle_query): If connected by tcp pass QStartNoAckMode+ in
8194 qSupported.
8195 (main): Reset noack_mode on every connection.
8196 * server.h (noack_mode): Declare.
8197
a417dc56
RW
81982008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8199
8200 * Makefile.in (GDBREPLAY_OBS): New variable.
8201 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
8202
3221518c
UW
82032008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
8204 Daniel Jacobowitz <dan@codesourcery.com>
8205
8206 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
8207 (usr_store_inferior_registers): Likewise.
8208 (regsets_store_inferior_registers): Likewise.
8209
ec56be1b
PA
82102008-07-31 Rolf Jansen <rj@surtec.com>
8211 Pedro Alves <pedro@codesourcery.com>
8212
8213 * configure.ac: Check for memmem declaration.
8214 * server.c [HAVE_MALLOC_H]: Include malloc.h.
8215 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
8216 (disable_packet_qfThreadInfo): Unconditionally compile.
8217 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
8218 * configure, config.in: Regenerate.
8219
2fe5e3ff
DE
82202008-07-28 Doug Kwan <dougkwan@google.com>
8221
8222 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
8223 (linux_write_memory): Remove declaration of errno.
8224
836acd6d
UW
82252008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
8226
8227 * linux-low.c (handle_extended_wait): Do not use "status"
8228 variable uninitialized.
8229
aeba519e
PA
82302008-07-07 Pedro Alves <pedro@codesourcery.com>
8231
8232 * server.c (handle_v_attach): Inhibit reporting dll changes.
8233
db42f210
PA
82342008-06-27 Pedro Alves <pedro@codesourcery.com>
8235
8236 * remote-utils.c (prepare_resume_reply): If requested, don't
8237 output "thread:TID" in the T stop reply.
8238
8239 * server.c (disable_packet_vCont, disable_packet_Tthread)
8240 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
8241 (handle_query): If requested, disable support for qC, qfThreadInfo
8242 and qsThreadInfo.
8243 (handle_v_requests): If requested, disable support for vCont.
8244 (gdbserver_show_disableable): New.
8245 (main): Handle --disable-packet and --disable-packet=LIST.
8246
8247 * server.h (disable_packet_vCont, disable_packet_Tthread)
8248 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
8249
8e4c5421
CD
82502008-06-20 Carlos O'Donell <carlos@codesourcery.com>
8251
8252 * server.c (gdbserver_usage): Mention --version.
8253
6e23a804
DJ
82542008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
8255
8256 * Makefile.in (gdbreplay.o): New rule.
8257
90aa6a40
JM
82582008-06-06 Joseph Myers <joseph@codesourcery.com>
8259
8260 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
8261 message, not gdbserver.
8262
c16158bc 82632008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
8264 Nathan Sidwell <nathan@codesourcery.com>
8265 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
8266
8267 * acinclude.m4: Include ../../config/acx.m4.
8268 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
8269 * configure, config.in: Regenerate.
8270 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
8271 * server.c (gdbserver_version): Print PKGVERSION.
8272 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
8273 (main): Adjust gdbserver_usage calls.
8274 * gdbreplay.c (version, host_name): Add declarations.
8275 (gdbreplay_version, gdbreplay_usage): New.
8276 (main): Accept --version and --help options.
8277
aeb75bf5
DJ
82782008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
8279
8280 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
8281 (arm_breakpoint_at): Handle Thumb.
8282 (the_low_target): Add comment.
8283
76b233dd
UW
82842008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
8285
8286 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
8287
08388c79
DE
82882008-05-09 Doug Evans <dje@google.com>
8289
a3c83fae
DE
8290 * server.h (decode_search_memory_packet): Declare.
8291 * remote-utils.c (decode_search_memory_packet): New fn.
8292 * server.c (handle_search_memory_1): New fn.
08388c79
DE
8293 (handle_search_memory): New fn.
8294 (handle_query): Process qSearch:memory packets.
8295
bb9c3d36
UW
82962008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
8297
8298 * regcache.c (registers_length): Remove.
8299 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
8300 full register packet.
8301 * regcache.h (registers_length): Remove prototype.
8302 * server.h (PBUFSIZ): Define to 16384.
8303
7284e1be
UW
83042008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
8305
8306 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
8307 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
8308 powerpc-64l.o, and powerpc-altivec64l.o.
8309 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
8310 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
8311 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
8312 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
8313 rs6000/power-linux.xml, and rs6000/power64-linux.xml
8314 to srv_xmlfiles.
8315
8316 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
8317 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
8318 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
8319 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
8320 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
8321 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
8322 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
8323 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
8324 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
8325 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
8326 (clean): Update.
8327
8328 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
8329 (init_registers_powerpc_32l): ... this new prototype.
8330 (init_registers_powerpc_32): Remove, replace by ...
8331 (init_registers_powerpc_altivec32l): ... this new prototype.
8332 (init_registers_powerpc_e500): Remove, replace by ...
8333 (init_registers_powerpc_e500l): ... this new prototype.
8334 (init_registers_ppc64): Remove, replace by ...
8335 (init_registers_powerpc_64l): ... this new prototype.
8336 (init_registers_powerpc_64): Remove, replace by ...
8337 (init_registers_powerpc_altivec64l): ... this new prototype.
8338 (ppc_num_regs): Set to 73.
8339 (PT_ORIG_R3, PT_TRAP): Define if necessary.
8340 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
8341 (ppc_cannot_store_register): Handle orig_r3 and trap.
8342 (ppc_arch_setup): Update init_registers_... calls.
8343 (ppc_fill_gregset): Handle orig_r3 and trap.
8344
8345 * inferiors.c (clear_inferiors): Reset current_inferior.
8346
fdc59709
PB
83472008-04-23 Paolo Bonzini <bonzini@gnu.org>
8348
889bf7c5
PA
8349 * acinclude.m4: Add override.m4.
8350 * configure: Regenerate.
fdc59709 8351
c9b2f845
UW
83522008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
8353
8354 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
8355 initial call to init_register_ppc64.
8356
550512b8
UW
83572008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
8358
43aaf8b6
PA
8359 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
8360 single powerpc*-*-linux* case.
550512b8
UW
8361 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
8362
b6430ec3
UW
83632008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
8364
8365 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 8366 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
8367 from reg_xmlfiles.
8368 * linux-ppc-low.c: Include <elf.h>.
8369 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
8370 (ppc_hwcap): New global variable.
8371 (ppc_regmap): Remove __SPE__ #ifdef sections.
8372 (ppc_regmap_e500): New global variable.
8373 (ppc_cannot_store_register): Update __SPE__ special case.
8374 (ppc_get_hwcap): New function.
8375 (ppc_arch_setup): Use it to determine whether inferior supports
8376 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
8377 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
8378 Do not access registers if target does not support AltiVec.
8379 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
8380 Do not access registers if target does not support SPE.
8381 (target_regsets): Unconditionally include AltiVec and SPE regsets.
8382
52fa2412
UW
83832008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
8384
8385 * linux-low.c (disabled_regsets, num_regsets): New.
8386 (use_regsets_p): Delete.
8387 (linux_wait_for_process): Clear disabled_regsets.
8388 (regsets_fetch_inferior_registers): Check and set it.
8389 (regsets_store_inferior_registers): Likewise.
8390 (linux_fetch_registers, linux_store_registers): Do not use
8391 use_regsets_p.
8392 (initialize_low): Allocate disabled_regsets.
8393
e28b3332
DJ
83942008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
8395
8396 * Makefile.in (LIBOBJS): New.
8397 (OBS): Use LIBOBJS.
8398 (memmem.o): New rule.
8399 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
8400 * configure: Regenerated.
8401
4536995d
UW
84022008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
8403
8404 * server.c (handle_query): Never return "unsupported" for
8405 qXfer:features:read queries.
8406
221c031f
UW
84072008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
8408
8409 * server.c (get_features_xml): Fix inverted condition.
8410 (handle_query): Always support qXfer:feature:read.
8411
ccd213ac
DJ
84122008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
8413
8414 * server.c (wrapper_argv): New.
8415 (start_inferior): Handle wrapper_argv. If set, expect an extra
8416 trap.
8417 (gdbserver_usage): Document --wrapper.
8418 (main): Parse --wrapper.
8419
6fe305f7
UW
84202008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8421
8422 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
8423 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
8424 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
8425 (ppc_set_pc): Likewise.
8426 (ppc_arch_setup): New function.
8427 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
8428 of collect_register.
889bf7c5 8429 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 8430
5b0a002e
UW
84312008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8432
8433 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
8434 instead of linux-ppc64-low.o.
8435 * linux-ppc64-low.c: Remove file.
8436 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
8437 (linux-ppc64-low.o): Remove rule.
8438
8439 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
8440 (init_registers_powerpc_64): Likewise.
8441 (ppc_regmap): Conditionally define depending on __powerpc64__.
8442 (ppc_cannot_store_register): Do not special-case "fpscr" when
8443 compiled on __powerpc64__.
8444 (ppc_collect_ptrace_register): New function.
8445 (ppc_supply_ptrace_register): New function.
8446 (ppc_breakpoint): Change type to "unsigned int".
8447 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
8448 (the_low_target): Conditionally provide initializers for the
889bf7c5 8449 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
8450 collect_ptrace_register and supply_ptrace_register members.
8451
9b4b61c8
UW
84522008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8453
8454 * regcache.h (gdbserver_xmltarget): Add extern declaration.
8455 * server.c (gdbserver_xmltarget): Define.
8456 (get_features_xml): Use it to replace "target.xml" and arch_string.
8457
8458 * configure.srv: Remove srv_xmltarget. Add XML files that were
8459 mentioned there to srv_xmlfiles instead. Remove conditional tests
8460 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
8461 srv_xmlfiles and srv_regobj to include all possible choices.
8462 * configure.ac (srv_xmltarget): Remove.
8463 (srv_xmlfiles): Do not add "target.xml".
8464 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
8465 checks for supplementary target information.
8466 * configure: Regenerate.
8467 * Makefile.in (XML_TARGET): Remove.
8468 (target.xml): Remove rule.
8469 (clean): Do not clean up target.xml.
8470 (.PRECIOUS): Do not mention target.xml.
8471
8472 * target.h (struct target_ops): Remove arch_string member.
8473 * linux-low.c (linux_arch_string): Remove.
8474 (linux_target_ops): Remove arch_string initializer.
8475 * linux-low.h (struct linux_target_ops): Remove arch_string member.
8476 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
8477 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
8478 * spu-low.c (spu_arch_string): Remove.
8479 (spu_target_ops): Remove arch_string initializer.
8480 * win32-low.c (win32_arch_string): Remove.
8481 (win32_target_ops): Remove arch_string initializer.
8482 * win32-low.h (struct win32_target_ops): Remove arch_string member.
8483 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
8484 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
8485
ee1a7ae4
UW
84862008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
8487
8488 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
8489 by collect_ptrace_register and supply_ptrace_register hooks.
8490 * linux-low.c (fetch_register): Use supply_ptrace_register callback
8491 instead of checking for the_low_target.left_pad_xfer.
8492 (usr_store_inferior_registers): Use collect_ptrace_register callback
8493 instead of checking for the_low_target.left_pad_xfer.
8494
8495 * linux-s390-low.c (s390_collect_ptrace_register): New function.
8496 (s390_supply_ptrace_register): Likewise.
8497 (s390_fill_gregset): Call s390_collect_ptrace_register.
8498 (the_low_target): Update.
8499
8500 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
8501 (ppc_supply_ptrace_register): Likewise.
8502 (the_low_target): Update.
8503
8504 * linux-i386-low.c (the_low_target): Update.
8505 * linux-x86-64-low.c (the_low_target): Update.
8506
d61ddec4
UW
85072008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
8508
8509 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
8510 reg-s390.o and reg-s390x.o.
8511
8512 * linux-low.c (new_inferior): New global variable.
8513 (linux_create_inferior, linux_attach): Set it.
8514 (linux_wait_for_process): Call the_low_target.arch_setup after the
8515 target has stopped for the first time.
8516 (initialize_low): Do not call the_low_target.arch_setup.
8517
8518 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
8519 (s390_set_pc): Likewise.
8520 (s390_arch_setup): New function.
8521 (the_low_target): Use s390_arch_setup as arch_setup routine.
8522
8523 * regcache.c (realloc_register_cache): New function.
8524 (set_register_cache): Call it for each existing regcache.
8525
d05b4ac3
UW
85262008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
8527
8528 * server.h (init_registers): Remove prototype.
8529
8530 * linux-low.h (struct linux_target_ops): Add arch_setup field.
8531 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
8532 instead of init_registers ().
8533 * linux-arm-low.c (init_registers_arm): Add prototype.
8534 (init_registers_arm_with_iwmmxt): Likewise.
8535 (the_low_target): Add initializer for arch_setup field.
8536 * linux-cris-low.c (init_registers_cris): Add prototype.
8537 (the_low_target): Add initializer for arch_setup field.
8538 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
8539 (the_low_target): Add initializer for arch_setup field.
8540 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
8541 (the_low_target): Add initializer for arch_setup field.
8542 * linux-ia64-low.c (init_registers_ia64): Add prototype.
8543 (the_low_target): Add initializer for arch_setup field.
8544 * linux-m32r-low.c (init_registers_m32r): Add prototype.
8545 (the_low_target): Add initializer for arch_setup field.
8546 * linux-m68k-low.c (init_registers_m68k): Add prototype.
8547 (the_low_target): Add initializer for arch_setup field.
8548 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
8549 (init_registers_mips64_linux): Likewise.
8550 (the_low_target): Add initializer for arch_setup field.
8551 * linux-ppc-low.c (init_registers_ppc): Add prototype.
8552 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
8553 (the_low_target): Add initializer for arch_setup field.
8554 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
8555 (init_registers_powerpc_64): Likewise.
8556 (the_low_target): Add initializer for arch_setup field.
8557 * linux-s390-low.c (init_registers_s390): Add prototype.
8558 (init_registers_s390x): Likewise.
8559 (the_low_target): Add initializer for arch_setup field.
8560 * linux-sh-low.c (init_registers_sh): Add prototype.
8561 (the_low_target): Add initializer for arch_setup field.
8562 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
8563 (the_low_target): Add initializer for arch_setup field.
8564 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
8565 (the_low_target): Add initializer for arch_setup field.
8566
8567 * win32-low.h (struct win32_target_ops): Add arch_setup field.
8568 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
8569 instead of init_registers ().
8570 * win32-arm-low.c (init_registers_arm): Add prototype.
8571 (the_low_target): Add initializer for arch_setup field.
8572 * win32-i386-low.c (init_registers_i386): Add prototype.
8573 (the_low_target): Add initializer for arch_setup field.
8574
8575 * spu-low.c (init_registers_spu): Add prototype.
8576 (initialize_low): Call initialie_registers_spu () instead of
8577 initialize_registers ().
8578
fd96d250
PA
85792008-02-19 Pedro Alves <pedro@codesourcery.com>
8580
8581 * server.c (handle_v_requests): When handling the vRun and vAttach
8582 packets, if already debugging a process, don't kill it. Return an
8583 error instead.
8584
d41b6bb4
DJ
85852008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
8586
8587 * server.c (handle_query): Correct length check.
8588
5ac588cf
PA
85892008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
8590
8591 * win32-low.c (do_initial_child_stuff): Add process handle
8592 parameter. Set current_process_handle and current_process_id from the
8593 parameters. Clear globals.
8594 (win32_create_inferior): Don't set current_process_handle and
8595 current_process_id here. Instead pass them on the call to
8596 do_initial_child_stuff.
8597 (win32_attach): Likewise.
8598 (win32_clear_inferiors): New.
8599 (win32_kill): Don't close the current process handle or the
8600 current thread handle here. Instead call win32_clear_inferiors.
8601 (win32_detach): Don't open a new handle to the process. Call
8602 win32_clear_inferiors.
8603 (win32_join): Don't rely on current_process_handle; open a new
8604 handle using the process id.
8605 (win32_wait): Call win32_clear_inferiors when the inferior process
8606 has exited.
8607
ecd7ecbc
DJ
86082008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
8609
8610 * server.c (monitor_show_help): Add "exit".
8611
1525d545
MG
86122008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
8613
ecd7ecbc 8614 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
8615 (clean): Add reg-xtensa.c.
8616 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
8617 * configure.srv (xtensa*-*-linux*) New target.
8618 * linux-xtensa-low.c: New.
8619 * xtensa-xtregs.c: New.
1525d545 8620
59a016f0
PA
86212008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
8622
8623 * hostio.c: Don't include errno.h.
8624 (errno_to_fileio_errno): Move to hostio-errno.
8625 * hostio.c: (hostio_error): Remove the error parameter. Defer the
8626 error number outputting to the target->hostio_last_error callback.
8627 (hostio_packet_error): Use FILEIO_EINVAL directly.
8628 (handle_open, handle_pread, hostio_error, handle_unlink): Update
8629 calls to hostio_error.
8630 * hostio-errno.c: New.
8631 * server.h (hostio_last_error_from_errno): Declare.
8632 * target.h (target_ops): Add hostio_last_error member.
8633 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
8634 as hostio_last_error handler.
889bf7c5 8635 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
8636 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
8637 (wince_hostio_last_error): New functions.
8638 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
8639 as hostio_last_error handler.
8640 (win32_target_ops) [!_WIN32_WCE]: Register
8641 hostio_last_error_from_errno as hostio_last_error handler.
8642 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
8643 (hostio-errno.o): New rule.
8644 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
8645 * configure.srv (srv_hostio_err_objs): New variable. Default to
8646 hostio-errno.o.
8647 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
8648 * configure: Regenerate.
8649
2d717e4f
DJ
86502008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
8651
8652 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
8653 (linux_kill, linux_detach): Clean up the process list.
8654 * remote-utils.c (remote_open): Improve port number parsing.
8655 (putpkt_binary, input_interrupt): Only send interrupts if the target
8656 is running.
8657 * server.c (extended_protocol): Make static.
8658 (attached): Define earlier.
8659 (exit_requested, response_needed, program_argv): New variables.
8660 (target_running): New.
8661 (start_inferior): Clear attached here.
8662 (attach_inferior): Set attached here.
8663 (require_running): Define.
8664 (handle_query): Use require_running and target_running. Implement
8665 "monitor exit".
8666 (handle_v_attach, handle_v_run): New.
8667 (handle_v_requests): Use require_running. Handle vAttach and vRun.
8668 (gdbserver_usage): Update.
8669 (main): Redo argument parsing. Handle --debug and --multi. Handle
8670 --attach along with other options or after the port. Save
8671 program_argv. Support no initial program. Resynchronize
8672 communication with GDB after an error. Handle "monitor exit".
8673 Use require_running and target_running. Always allow the extended
8674 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
8675 restart in extended mode.
8676 * README: Refer to the GDB manual. Update --attach usage.
8677
7407e2de
AS
86782007-12-20 Andreas Schwab <schwab@suse.de>
8679
8680 * linux-low.c (STACK_SIZE): Define.
8681 (linux_tracefork_child): Use it. Use __clone2 on ia64.
8682 (linux_test_for_tracefork): Likewise.
8683
b65d95c5
DJ
86842007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
8685
8686 * linux-low.c (linux_wait_for_event): Update messages. Do not
8687 reinsert auto-delete breakpoints.
8688 * mem-break.c (struct breakpoint): Change return type of handler to
8689 int.
8690 (set_breakpoint_at): Update handler type.
8691 (reinsert_breakpoint_handler): Return 1 instead of calling
8692 delete_breakpoint.
8693 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
8694 setting a new one.
8695 (check_breakpoints): Delete auto-delete breakpoints and return 2.
8696 * mem-break.h (set_breakpoint_at): Update handler type.
8697 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
8698 * win32-low.c (auto_delete_breakpoint): New.
8699 (get_child_debug_event): Use it.
8700
4e799345
DJ
87012007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
8702
8703 * configure.ac: Check for pread and pwrite.
8704 * hostio.c (handle_pread): Fall back to lseek and read.
8705 (handle_pwrite): Fall back to lseek and write.
8706 * config.in, configure: Regenerated.
8707
27524b67
DJ
87082007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
8709
8710 * server.c (myresume): Add own_buf argument.
8711 (main): Update calls.
8712
a20d5e98
DJ
87132007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
8714
8715 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
8716 * remote-utils.c (remote_open): Do not call disable_async_io.
8717 (block_async_io): Delete.
8718 (unblock_async_io): Make static.
8719 (initialize_async_io): New.
8720 * server.c (handle_v_cont): Handle async I/O here.
8721 (myresume): Likewise. Move other common resume tasks here...
8722 (main): ... from here. Call initialize_async_io. Disable async
8723 I/O before the main loop.
8724 * server.h (initialize_async_io): Declare.
8725 (block_async_io, unblock_async_io): Delete prototypes.
8726 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
8727
b79d787e
DJ
87282007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
8729
8730 * remote-utils.c (readchar): Allow binary data in received messages.
8731
d97903b2
PA
87322007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8733
8734 * win32-low.c (attaching): New global.
8735 (win32_create_inferior): Clear the `attaching' global.
8736 (win32_attach): Set the `attaching' global.
8737 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
8738 attaching. Only set a breakpoint at the entry point if not
8739 attaching.
8740
311de423
PA
87412007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8742
8743 * server.c (main): Don't report dll events on the initial
8744 connection on attaches.
8745
6c2d16d2
PA
87462007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8747
8748 * server.c (main): Relax numerical bases supported for the pid of
8749 the --attach command line argument.
8750
5ca906e6
PA
87512007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8752
8753 * win32-low.c (win32_attach): Call OpenProcess before
8754 DebugActiveProcess, not after. Add last error output to error
8755 call.
8756
9c6c8194
PA
87572007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8758
8759 * win32-low.c (win32_get_thread_context)
8760 (win32_set_thread_context): New functions.
8761 (thread_rec): Use win32_get_thread_context.
8762 (continue_one_thread, win32_resume): Use win32_set_thread_context.
8763 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
8764 field.
8765
4d5d1aaa
PA
87662007-12-03 Leo Zayas
8767 Pedro Alves <pedro_alves@portugalmail.pt>
8768
8769 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
8770 global variables.
8771 (child_add_thread): Minor cleanup.
8772 (child_continue): Resume artificially suspended threads before
8773 calling ContinueDebugEvent.
8774 (suspend_one_thread): New.
8775 (fake_breakpoint_event): New.
8776 (get_child_debug_event): Change return type to int. Check here if
8777 gdb sent an interrupt request. If a soft interrupt was requested,
8778 fake a breakpoint event. Return 0 if there is no event to handle,
8779 and 1 otherwise.
8780 (win32_wait): Don't check here if gdb sent an interrupt request.
8781 Ensure there is a valid event to handle.
8782 (win32_request_interrupt): Add soft interruption method as last
8783 resort.
8784
c436e841
PA
87852007-12-03 Leo Zayas
8786 Pedro Alves <pedro_alves@portugalmail.pt>
8787
8788 * win32-low.h (win32_thread_info): Add descriptions to the
8789 structure members. Replace `suspend_count' counter by a
8790 `suspended' flag.
8791 * win32-low.c (thread_rec): Update condition of when to get the
8792 context from the inferior. Rely on ContextFlags being set if it
8793 has already been retrieved. Only suspend the inferior thread if
8794 we haven't already. Warn if that fails.
8795 (continue_one_thread): s/suspend_count/suspended/. Only call
8796 ResumeThread once. Warn if that fails.
8797
e7b5fa67
PA
87982007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
8799
8800 * win32-low.c (win32_wait): Don't read from the inferior when it
8801 has already exited.
8802
a385171d
PA
88032007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
8804
8805 * Makefile.in (win32_low_h): New variable.
8806 (win32-low.o): Add dependency on $(win32_low_h).
8807 (win32-arm-low.o, win32-i386-low.o): New rules.
8808
f80c84b3
DJ
88092007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
8810
8811 * hostio.c: Correct copyright year.
8812
a6b151f1
DJ
88132007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
8814
8815 * Makefile.in (OBS): Add hostio.o.
8816 (hostio.o): New rule.
8817 * server.h (handle_vFile): Declare.
8818 * hostio.c: New file.
8819 * server.c (handle_v_requests): Take packet_len and new_packet_len
8820 for binary packets. Call handle_vFile.
8821 (main): Update call to handle_v_requests.
8822
f9387fc3
DJ
88232007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
8824
8825 * linux-low.c: Include <sched.h>.
8826
51c2684e
DJ
88272007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
8828
8829 * linux-low.c (linux_tracefork_grandchild): New.
8830 (linux_tracefork_child): Use clone.
8831 (linux_test_for_tracefork): Use clone; allocate and free a stack.
8832
75f83163
JB
88332007-10-31 Joel Brobecker <brobecker@adacore.com>
8834
8835 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
8836
da5898ce
DJ
88372007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
8838
8839 * linux-low.c (handle_extended_wait): Handle unexpected signals.
8840
24a09b5f
DJ
88412007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
8842
8843 * inferiors.c (change_inferior_id): Delete.
8844 (add_pid_to_list, pull_pid_from_list): New.
8845 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
8846 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
8847 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
8848 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
8849 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
8850 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
8851 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
8852 (using_threads): Always set to 1.
8853 (handle_extended_wait): New.
8854 (add_process): Do not set TID.
8855 (linux_create_inferior): Set must_set_ptrace_flags.
8856 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
8857 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
8858 (linux_thread_alive): Rename TID argument to LWPID.
8859 (linux_wait_for_process): Handle unknown processes. Do not use TID.
8860 (linux_wait_for_event): Do not use TID or check using_threads. Update
8861 call to dead_thread_notify. Call handle_extended_wait.
8862 (linux_create_inferior): Use PTRACE_SETOPTIONS.
8863 (send_sigstop): Delete sigstop_sent.
8864 (wait_for_sigstop): Avoid TID.
8865 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
8866 (linux_test_for_tracefork): New.
8867 (linux_lookup_signals): Use thread_db_active and
8868 linux_supports_tracefork_flag.
8869 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
8870 * linux-low.h (get_process_thread): Avoid TID.
8871 (struct process_ifo): Move thread_known and tid to the end. Remove
8872 sigstop_sent.
8873 (linux_attach_lwp, thread_db_init): Update prototypes.
8874 * server.h (change_inferior_id): Delete prototype.
8875 (add_pid_to_list, pull_pid_from_list): New prototypes.
8876 * thread-db.c (thread_db_use_events): New.
8877 (find_first_thread): Rename to...
8878 (find_one_thread): ...this. Update callers and messages. Do not
8879 call fatal. Check thread_db_use_events. Do not call
8880 change_inferior_id or new_thread_notify.
8881 (maybe_attach_thread): Update. Do not call new_thread_notify.
8882 (thread_db_init): Set thread_db_use_events. Check use_events.
8883 * utils.c (fatal, warning): Correct message prefix.
8884
30ed0a8f
DJ
88852007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
8886
8887 * Makefile.in (clean): Remove new files.
8888 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
8889 (powerpc-64.o, powerpc-64.c): New rules.
8890 * configure.srv: Use alternate register sets for powerpc64-*-linux*
8891 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
8892 with SPE.
8893 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
8894 SPE targets.
8895 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
8896 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
8897 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
8898 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
8899 (target_regsets): Add AltiVec and SPE register sets.
8900 * configure.ac: Check for AltiVec and SPE.
8901 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
8902 (ppc_fill_vrregset, ppc_store_vrregset): New.
8903 (target_regsets): Add AltiVec register set.
8904 * configure: Regenerated.
8905
fd462a61
DJ
89062007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
8907
8908 * linux-low.c (O_LARGEFILE): Define.
8909 (linux_read_memory): Use /proc/PID/mem.
8910 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
8911 * configure, config.in: Regenerated.
8912
69f223ed
DJ
89132007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
8914
8915 * linux-low.c (linux_wait_for_event): Do not pass signals while
8916 single-stepping.
8917
aec18585
PA
89182007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
8919
8920 * win32-low.c (create_process): New.
8921 (win32_create_inferior): Use create_process instead of
8922 CreateProcess. If create_process failed retry appending an ".exe"
8923 suffix. Store the GetLastError result immediatelly after
8924 create_process calls and use it on the call to error.
8925
34d86ddd
PA
89262007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
8927
8928 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
8929
5a0e3bd0
JB
89302007-08-23 Joel Brobecker <brobecker@adacore.com>
8931
8932 * configure.ac: Switch license to GPLv3.
8933
f88c79e6
MS
89342007-08-01 Michael Snyder <msnyder@access-company.com>
8935
8936 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
8937
6b3d9b83
PA
89382007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
8939
8940 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
8941 typedef.
8942 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
8943 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
8944 CloseToolhelp32Snapshot.
8945 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
8946 CloseToolhelp32Snapshot.
8947
c588c53c
MS
89482007-07-27 Michael Snyder <michael.snyder@access-company.com>
8949
8950 * server.c (main): Check for inferior exit before main loop.
8951
aa0403d9
PA
89522007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
8953
8954 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
8955 instead of on tmp_desc.
8956
255e7678
DJ
89572007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
8958 Daniel Jacobowitz <dan@codesourcery.com>
8959
8960 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
8961 (add_thread): Minor cleanups.
8962 (clear_inferiors): Move lower in the file. Clear the DLL
8963 list.
8964 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
8965 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
8966 (xml_escape_text): New.
8967 * server.c (handle_query): Handle qXfer:libraries:read. Report it
8968 for qSupported.
8969 (handle_v_cont): Report errors.
8970 (gdbserver_version): Update.
8971 (main): Correct size of own_buf. Do not report initial DLL events.
8972 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
8973 (unloaded_dll, xml_escape_text): New.
8974 * win32-low.c (enum target_waitkind): Update comments.
8975 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
8976 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
8977 (win32_EnumProcessModules, win32_GetModuleInformation)
8978 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
8979 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
8980 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
8981 (win32_Module32First, win32_Module32Next, load_toolhelp)
8982 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
8983 (get_child_debug_event): Handle DLL events.
8984 (win32_wait): Likewise.
8985
0d37add9
DJ
89862007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
8987
8988 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
8989 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
8990
45e2715e
PA
89912007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
8992
8993 * win32-low.c (handle_output_debug_string): Ignore event if not
8994 waiting.
8995
c5674cf1
PA
89962007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
8997
8998 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
8999
2bbe3cc1
DJ
90002007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
9001
9002 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
9003
ae13219e
DJ
90042007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
9005
9006 * inferiors.c (change_inferior_id): Add comment.
9007 * linux-low.c (check_removed_breakpoint): Add an early
9008 prototype. Improve debug output.
9009 (linux_attach): Doc update.
9010 (linux_detach_one_process, linux_detach): Clean up before releasing
9011 each process.
9012 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
9013 * linux-low.h (struct process_info): Doc improvement.
9014 * mem-break.c (delete_all_breakpoints): New.
9015 * mem-break.h (delete_all_breakpoints): New prototype.
9016 * thread-db.c (find_first_thread): New.
9017 (thread_db_create_event): Call it instead of
9018 thread_db_find_new_threads. Clean up unused variables.
9019 (maybe_attach_thread): Remove first thread handling.
9020 (thread_db_find_new_threads): Use find_first_thread.
9021 (thread_db_get_tls_address): Likewise.
9022
4105de34
DJ
90232007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
9024
9025 * thread-db.c (thread_db_find_new_threads): Add prototype.
9026 (thread_db_create_event): Check for the main thread before adding
9027 a new thread.
9028 (maybe_attach_thread): Only enable event reporting if TID == 0.
9029 (thread_db_get_tls_address): Check for new threads.
9030
2b876972
DJ
90312007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
9032
9033 * linux-low.c (linux_create_inferior): Try execv before execvp.
9034 * spu-low.c (spu_create_inferior): Likewise.
9035
7a245884
DJ
90362007-06-13 Mike Frysinger <vapier@gentoo.org>
9037
9038 * linux-low.c (linux_create_inferior): Change execv to execvp.
9039 * spu-low.c (spu_create_inferior): Likewies.
9040
117ce543
DJ
90412007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
9042
9043 * Makefile.in (clean): Clean new files instead of deleted ones.
9044 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
9045 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
9046 rules.
9047 * configure.srv: Specify XML files and new regformats for MIPS and
9048 MIPS64 GNU/Linux.
9049 * linux-mips-low.c (mips_num_regs): Set to only used registers.
9050 (mips_regmap): Do not fetch $0. Remove unused registers. Add
9051 an entry for the restart register.
9052 (mips_cannot_fetch_register, mips_cannot_store_register)
9053 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
9054 register names to match the XML descriptions.
9055 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
9056 restart register instead of $0.
9057
0e7f50da
UW
90582007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
9059 Markus Deuling <deuling@de.ibm.com>
9060
9061 * remote-utils.c (decode_xfer_write): New function.
9062 * server.h (decode_xfer_write): Add prototype.
9063 * server.c (handle_query): Add PACKET_LEN argument. Support
9064 qXfer:spu:read and qXfer:spu:write packets.
9065 (main): Pass packet_len to handle_query.
9066 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
9067 * target.h (target_ops): Add qxfer_spu.
9068
374c1d38
UW
90692007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
9070
9071 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
9072 accessing non-seekable spufs files.
9073
bb63802a
UW
90742007-05-16 Markus Deuling <deuling@de.ibm.com>
9075
889bf7c5 9076 * server.c (handle_query): Add reply for qC packet.
bb63802a 9077
7390519e
PA
90782007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9079 Leo Zayas <lerele@champenstudios@com>
9080
9081 * server.h (check_remote_input_interrupt_request): New function.
9082 * remote_utils.c (INVALID_DESCRIPTOR): New define.
9083 (remote_desc): Initialize with INVALID_DESCRIPTOR.
9084 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
9085 (check_remote_input_interrupt_request): New function.
9086 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 9087 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
9088 winapi_GenerateConsoleCtrlEvent): New typedefs.
9089 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
9090 to 250 ms.
9091 (win32_wait): Check for remote interrupt request
9092 with check_remote_input_interrupt_request.
9093 (win32_request_interrupt): New function.
9094 (win32_target_op): Set request_interrupt to win32_request_interrupt.
9095
34b34921
PA
90962007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9097
9098 * win32-low.c (debug_registers_changed,
9099 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
9100 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
9101 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
9102 (thread_rec): Get context using the low target.
9103 (child_add_thread): Call thread_added on the low target,
9104 which does the same thing.
9105 (regptr): Delete.
9106 (do_initial_child_stuff): Remove debug registers references.
9107 Set context using the low target. Resume threads after
9108 setting the contexts.
9109 (child_continue): Remove dead variable. Remove debug
9110 registers references.
9111 (child_fetch_inferior_registers): Go through the low target.
9112 (do_child_store_inferior_registers): Remove.
9113 (child_store_inferior_registers): Go through the low target.
9114 (win32_resume): Remove debug registers references.
9115 Set context using the low target.
9116 (handle_exception): Change return type to void. Don't record
9117 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
9118 first chance exception.
889bf7c5 9119 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
9120 goto loop. Always return after waiting for debug event.
9121 (win32_wait): Convert to switch statement. Handle spurious
9122 events.
9123
9124 * win32-i386-low.c (debug_registers_changed,
9125 debug_registers_used): New.
9126 (initial_stuff): Rename to ...
9127 (i386_initial_stuff): ... this. Clear debug registers
9128 state variables.
9129 (store_debug_registers): Delete.
9130 (i386_get_thread_context): New.
9131 (load_debug_registers): Delete.
9132 (i386_set_thread_context): New.
9133 (i386_thread_added): New.
9134 (single_step): Rename to ...
9135 (i386_single_step): ... this.
9136 (do_fetch_inferior_registers): Rename to ...
9137 (i386_fetch_inferior_register): ... this.
9138 (i386_store_inferior_register): New.
9139 (the_low_target): Adapt to new interface.
9140
9141 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
9142 (arm_get_thread_context): New.
9143 (arm_set_thread_context): New.
9144 (regptr): New.
9145 (do_fetch_inferior_registers): Rename to ...
9146 (arm_fetch_inferior_register): ... this.
9147 (arm_store_inferior_register): New.
9148 (arm_wince_breakpoint): Reimplement as unsigned long.
9149 (arm_wince_breakpoint_len): Define.
9150 (the_low_target): Adapt to new interface.
9151
9152 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
9153 load_debug_registers. Add get_thread_context, set_thread_context,
9154 thread_added and store_inferior_register. Rename
9155 fetch_inferior_registers to fetch_inferior_register.
9156 (regptr): Remove declaration.
9157
dd6953e1
PA
91582007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9159
9160 * linux-low.c (linux_detach): Change return type to int. Return 0.
9161 * spu-low.c (spu_detach): Likewise.
9162
444d6139
PA
91632007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9164
9165 * target.h (target_ops): Change return type of detach to int.
9166 Add join.
9167 (join_inferior): New.
9168 * server.c (main): Don't skip detach support on mingw32.
9169 If the inferior doesn't support detaching return error.
9170 Call join_inferior instead of using waitpid.
9171 * linux-low.c (linux_join): New.
9172 (linux_target_op): Add linux_join.
9173 * spu-low.c (spu_join): New.
9174 (spu_target_ops): Add spu_join.
9175 * win32-low.c (win32_detach): Adapt to new interface.
9176 Reopen current_process_handle before detaching. Issue a child
9177 resume before detaching.
9178 (win32_join): New.
9179 (win32_target_op): Add win32_join.
9180
1d5315fe
PA
91812007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9182
9183 * win32-low.c (win32-attach): Fix return value.
9184 * target.h (target_ops): Describe ATTACH return values.
9185
bf914831
PA
91862007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9187
9188 * win32-low.c (GETPROCADDRESS): Define.
9189 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
9190 (winapi_DebugSetProcessKillOnExit): Likewise.
9191 (win32_create_inferior): Force usage of ansi CreateProcessA.
9192 (win32_attach): Use GETPROCADDRESS.
9193 (win32_detach): Likewise.
9194
f72f3e60
PA
91952007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9196
9197 * win32-low.c (win32_wait): Don't use WSTOPSIG.
9198
ed50f18f
PA
91992007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
9200
9201 * win32-low.c: Commit leftover changes from 2007-03-29.
9202
0c2ead7e
DJ
92032007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
9204
9205 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
9206 fields short instead of int. Add explicit padding.
9207 (i387_cache_to_fsave): Remove unnecessary casts.
9208 (i387_fsave_to_cache): Doc fix.
9209 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
9210
73725ff3
DJ
92112007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
9212
9213 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
9214 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
9215
d99f33d8
PA
92162007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
9217
9218 * configure.srv (arm*-*-mingw32ce*): Move near the other
9219 arm targets.
9220
68070c10
PA
92212007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
9222
2482afc6 9223 * configure.ac: Add errno checking.
68070c10
PA
9224 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
9225 sys/file.h and malloc.h.
9226 (AC_CHECK_DECLS): Add perror.
9227 (srv_mingwce): Handle.
2482afc6 9228 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
9229 win32-i386-low.o to srv_tgtobj.
9230 (i[34567]86-*-mingw*): Likewise.
9231 (arm*-*-mingw32ce*): Add case.
9232 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
9233 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
9234 [__MINGW32CE__] (strerror): New function.
9235 [__MINGW32CE__] (errno): Define to GetLastError.
9236 [__MINGW32CE__] (COUNTOF): New macro.
9237 (remote_open): Remove extra close call.
9238 * mem-break.c (delete_breakpoint_at): New function.
9239 * mem-break.h (delete_breakpoint_at): Declare.
9240 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
9241 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
9242 [USE_WIN32API] (read, write): Add char* casts.
9243 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
9244 * server.h: Include wincecompat.h on Windows CE.
9245 [HAVE_ERRNO_H]: Check.
9246 (perror): Declare if not declared.
9247 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
9248 (perror_with_name): Remove errno declaration.
9249 * wincecompat.h: New.
9250 * wincecompat.c: New.
9251 * win32-low.h: New.
9252 * win32-arm-low.c: New.
9253 * win32-i386-low.c: New.
9254 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
9255 (OUTMSG2): Make it safe.
9256 (_T): New macro.
9257 (COUNTOF): New macro.
9258 (NUM_REGS): Get it from the low target.
9259 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
9260 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
9261 (thread_rec): Let low target handle debug registers.
9262 (child_add_thread): Likewise.
9263 (child_init_thread_list): Likewise.
9264 (continue_one_thread): Likewise.
9265 (regptr): New.
9266 (do_child_fetch_inferior_registers): Move to ...
9267 * win32-i386-low.c: ... here, and rename to ...
9268 (do_fetch_inferior_registers): ... this.
889bf7c5 9269 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
9270 Go through the low target.
9271 (do_child_store_inferior_registers): Use regptr.
9272 (strwinerror): New function.
9273 (win32_create_inferior): Handle Windows CE.
9274 Use strwinerror instead of strerror on Windows error
9275 codes. Add program to the error output.
9276 Don't close the main thread handle on Windows CE.
9277 (win32_attach): Use coredll.dll on Windows CE.
9278 (win32_kill): Close current process and current
9279 thread handles.
9280 (win32_detach): Use coredll.dll on Windows CE.
9281 (win32_resume): Let low target handle debug registers, and
9282 step request.
9283 (handle_exception): Add/Remove initial breakpoint. Avoid
9284 non-existant WSTOPSIG on Windows CE.
9285 (win32_read_inferior_memory): Cast to remove warning.
9286 (win32_arch_string): Go through the low target.
9287 (initialize_low): Call set_breakpoint_data with the low
9288 target's breakpoint.
9289 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
9290 FOP_REGNUM, mappings): Move to ...
9291 * win32-i386-low.c: ... here.
9292 * win32-low.c (win32_thread_info): Move to ...
9293 * win32-low.h: ... here.
9294 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
9295 win32-arm-low.c and wincecompat.c.
9296 (all:): Add $EXEEXT.
9297 (install-only:): Likewise.
9298 (gdbserver:): Likewise.
9299 (gdbreplay:): Likewise.
9300 * config.in: Regenerate.
9301 * configure: Regenerate.
9302
41093d81
PA
93032007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
9304
9305 * win32-low.c: Rename typedef thread_info to
9306 win32_thread_info throughout.
9307
544afa54
PA
93082007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
9309
9310 * win32-i386-low.c: Rename to ...
9311 * win32-low.c: ... this.
9312 * configure.srv: Replace win32-i386-low.o with win32-low.o.
9313 * Makefile.in: Likewise.
9314
bce7165d
PA
93152007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
9316
9317 * remote-utils.c (monitor_output): Constify msg parameter.
9318 * server.h (monitor_output): Likewise.
9319 * win32-i386-low.c (handle_output_debug_string): New.
9320 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
9321 handle_output_debug_string.
9322 (get_child_debug_event): Likewise.
9323
506c7aa0
DJ
93242007-03-27 Mat Hostetter <mat@lcs.mit.edu>
9325
9326 * server.c (main): Correct strtoul check.
9327
42c81e2a
DJ
93282007-03-27 Jon Ringle <jon@ringle.org>
9329
9330 * linux-low.c: Check __ARCH_HAS_MMU__ also.
9331
9453113a
DJ
93322007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
9333
9334 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
9335
64a69107
DJ
93362007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
9337
9338 * terminal.h: Check HAVE_SGTTY_H.
9339
93402007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
9341
9342 * remote-utils.c (remote_open): Print out the assigned port number.
9343
c74d0ad8
DJ
93442007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
9345
9346 * remote-utils.c (monitor_output): New function.
9347 * server.c (debug_threads): Define here.
9348 (monitor_show_help): New function.
9349 (handle_query): Handle qRcmd.
9350 (main): Do not handle 'd' packet.
9351 * server.h (debug_threads, remote_debug, monitor_output): Declare.
9352 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
9353 of debug_threads.
9354
de7c3b4a
PA
93552007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
9356
9357 * Makefile.in (EXEEXT): New.
9358 (clean): Use $(EXEEXT).
9359
ef57601b
PA
93602007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
9361
9362 * target.h (target_ops): Rename send_signal to request_interrupt,
9363 and remove enum target_signal parameter.
9364 * linux-low.c (linux_request_interrupt): Rename from
9365 linux_send_signal, and always send SIGINT.
9366 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
9367 and always send SIGINT.
9368 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
9369 of send_signal.
9370 (input_interrupt): Likewise.
9371
820f2bda
PA
93722007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
9373
9374 * server.c (get_features_xml): Check if target implemented
9375 arch_string.
9376 * win32-i386-low.c (win32_arch_string): New.
9377 (win32_target_ops): Add win32_arch_string as arch_string member.
9378
ab39bf24
UW
93792007-02-22 Markus Deuling <deuling@de.ibm.com>
9380
9381 * spu-low.c (spu_arch_string): New.
9382 (spu_target_ops): Add spu_arch_string.
9383
61ff6e04
DJ
93842007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
9385
9386 * remote-utils.c: Remove HAVE_TERMINAL_H check.
9387 * configure.ac: Do not check for terminal.h.
9388 * configure, config.in: Regenerated.
9389
fb1e4ffc
DJ
93902007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
9391
9392 * Makefile.in (OBS): Add $(XML_BUILTIN).
9393 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
9394 (clean): Update.
9395 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
9396 (arm-with-iwmmxt.c): New.
9397 * config.in, configure: Regenerate.
9398 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
9399 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
9400 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
9401 (arm*-*-linux*): Add iWMMXt and regset support.
9402 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
9403 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
9404 (arm_store_wmmxregset, target_regsets): New.
9405 * server.c (get_features_xml): Take annex argument. Check builtin
9406 XML documents.
9407 (handle_query): Handle multiple annexes.
9408
0f48aa01
DJ
94092007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
9410
9411 * remote-utils.c [USE_WIN32API] (read, write): Define.
9412 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
9413 write.
9414
23181151
DJ
94152007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
9416
9417 * linux-i386-low.c (the_low_target): Set arch_string.
9418 * linux-x86-64-low.c (the_low_target): Likewise.
9419 * linux-low.c (linux_arch_string): New.
9420 (linux_target_ops): Add it.
9421 * linux-low.h (struct linux_target_ops): Add arch_string.
9422 * server.c (write_qxfer_response): Use const void * for DATA.
9423 (get_features_xml): New.
9424 (handle_query): Handle qXfer:features:read. Report it for qSupported.
9425 * target.h (struct target_ops): Add arch_string method.
9426
9d606399
DJ
94272007-01-03 Denis Pilat <denis.pilat@st.com>
9428 Daniel Jacobowitz <dan@codesourcery.com>
9429
9430 * linux-low.c (linux_kill): Handle being called with no threads.
9431 * win32-i386-low.c (win32_kill): Likewise.
9432 (get_child_debug_event): Clear current_process_handle.
9433
94342006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
9435 Daniel Jacobowitz <dan@codesourcery.com>
9436
9437 * remote-utils.c (remote_open): Check the type of specified
9438 serial port devices before opening them.
9439 * server.c (main): Kill the inferior if an error occurs during
9440 the first remote_open.
9441
a5e13d24
DJ
94422006-12-05 Markus Deuling <deuling@de.ibm.com>
9443
9444 * README: Update supported targets.
9445
186947f7
DJ
94462006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
9447
9448 * Makefile.in (clean): Remove reg-mips64.c.
9449 (reg-mips64.c, reg-mips64.o): New rules.
9450 * configure.srv: Handle mips64. Include regset support for mips.
9451 * linux-mips-low.c (union mips_register): New.
9452 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
9453 (mips_breakpoint, mips_breakpoint_at): Use int.
9454 (mips_collect_register, mips_supply_register)
9455 (mips_collect_register_32bit, mips_supply_register_32bit)
9456 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
9457 (mips_store_fpregset, target_regsets): New.
9458 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
9459
a13e2c95
UW
94602006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
9461
9462 * configure.srv: Add target "spu*-*-*".
9463 * Makefile.in (clean): Remove reg-spu.c.
9464 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
9465 * spu-low.c: New file.
9466
cb7283db
DJ
94672006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
9468
9469 * configure.ac: Correct td_thr_tls_get_addr test.
9470 * configure: Regenerated.
9471
89be2091
DJ
94722006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
9473
9474 * linux-low.c (linux_wait_for_event): Reformat. Use the
9475 pass_signals array.
9476 * remote-utils.c (decode_address_to_semicolon): New.
9477 * server.c (pass_signals, handle_general_set): New.
9478 (handle_query): Mention QPassSignals for qSupported.
9479 (main): Call handle_general_set.
9480 * server.h (pass_signals, decode_address_to_semicolon): New.
9481
000ef4f0
DJ
94822006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
9483
9484 * server.c (handle_query): Correct error handling for read_auxv.
9485
b7149293
UW
94862005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
9487
9488 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
9489 and srv_linux_thread_db to yes.
9490 * linux-s390-low.c (s390_fill_gregset): New function.
9491 (target_regsets): Define data structure.
9492
dae5f5cf
DJ
94932006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
9494
9495 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
9496 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
9497 * config.in, configure: Regenerated.
9498 * inferiors.c (gdb_id_to_thread): New function.
9499 (gdb_id_to_thread_id): Use it.
9500 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
9501 * linux-low.h (struct process_info): Add th member.
9502 (thread_db_get_tls_address): New prototype.
9503 * remote-utils.c (decode_address): Make non-static.
9504 * server.c (handle_query): Handle qGetTLSAddr.
9505 * server.h (gdb_id_to_thread, decode_address): New prototypes.
9506 * target.h (struct target_ops): Add get_tls_address.
9507 * thread-db.c (maybe_attach_thread): Save the thread handle.
9508 (thread_db_get_tls_address): New.
9509
32ca6d61
DJ
95102006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
9511
9512 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
9513 (linux_resume_one_process): Take a siginfo_t *. Update all
9514 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
9515 (struct pending_signals): Add a siginfo_t.
9516 (linux_wait_for_process): Always set last_status.
9517 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
9518 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
9519 * linux-low.h (struct process_info): Add last_status.
9520
5ffff7c1
DJ
95212006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
9522
9523 * remote-utils.c (try_rle): New function.
9524 (putpkt_binary): Use it.
9525
8695c747
DJ
95262006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
9527
9528 * Makefile.in (clean): Clean reg-x86-64-linux.c.
9529 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
9530 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
9531 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
9532 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
9533 point registers.
9534
290fadea
RS
95352006-08-08 Richard Sandiford <richard@codesourcery.com>
9536
9537 * server.c (terminal_fd): New variable.
9538 (old_foreground_pgrp): Likewise.
9539 (restore_old_foreground_pgrp): New function.
9540 (start_inferior): Record the terminal file descriptor in terminal_fd
9541 and its original foreground group in old_foreground_pgrp. Register
9542 restore_old_foreground_pgrp with atexit().
9543
9f2e1e63
DJ
95442006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
9545
9546 * server.c (handle_query): Correct qPart to qXfer.
9547
b80864fb
DJ
95482006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
9549
9550 * configure.ac: Check for more headers which are missing on
9551 Windows. Automatically supply -lwsock32 and USE_WIN32API.
9552 * configure.srv: Add Cygwin and mingw32.
9553 * remote-utils.c: Don't include headers unconditionally which
9554 are missing on mingw32. Include <winsock.h> for mingw32.
9555 (remote_open): Adjust for mingw32 support. Flush
9556 standard error after writing to it.
9557 (remote_close, putpkt_binary, input_interrupt, block_async_io)
9558 (unblock_async_io, enable_async_io, disable_async_io)
9559 (readchar, getpkt): Update for Winsock support.
9560 (prepare_resume_reply): Expect a protocol signal number.
9561 * server.c: Disable <sys/wait.h> on mingw32.
9562 (start_inferior): Adjust for mingw32 support. Flush
9563 standard error after writing to it.
9564 (attach_inferior): Likewise. Use protocol signal
9565 numbers.
9566 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
9567 and names.
9568 * win32-i386-low.c: New file.
9569 * Makefile.in (XM_CLIBS): Set.
9570 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
9571 (win32-i386-low.o): New dependency rule.
9572 * linux-low.c (linux_wait): Use target signal numbers.
9573 * target.h (struct target_ops): Doc fix.
9574 * server.h (target_signal_to_name): New prototype.
9575 * gdbreplay.c: Don't include headers unconditionally which
9576 are missing on mingw32. Include <winsock.h> for mingw32.
9577 (remote_close, remote_open): Adjust for Winsock support.
9578 * configure, config.in: Regenerated.
9579
0876f84a
DJ
95802006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
9581
9582 * server.c (decode_xfer_read, write_qxfer_response): New.
9583 (handle_query): Take a packet length argument. Handle
9584 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
9585 the qSupported response.
9586 (main): Update call to handle_query.
9587
01f9e8fa
DJ
95882006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
9589
9590 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
9591 (putpkt_binary): Renamed from putpkt and adjusted for binary
9592 data.
9593 (putpkt): New wrapper for putpkt_binary.
9594 (readchar): Don't mask off the high bit.
9595 (decode_X_packet): New function.
9596 * server.c (main): Call putpkt_binary if a handler sets the packet
9597 length. Save the length of the incoming packet. Handle 'X'.
9598 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
9599
be2a5f71
DJ
96002006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
9601
9602 * server.c (handle_query): Handle qSupported.
9603
ea025f5f
DJ
96042006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
9605
9606 * remote-utils.c (all_symbols_looked_up): New variable.
9607 (look_up_one_symbol): Check it.
9608 * server.h (look_up_one_symbol): New declaration.
9609 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
9610
9308fc88
DJ
96112006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
9612
9613 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 9614 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
9615 (PTRACE_GET_THREAD_AREA): Define.
9616 (ps_get_thread_area): New function.
9617
52fb6437
NS
96182006-05-09 Nathan Sidwell <nathan@codesourcery.com>
9619
9620 * configure.srv (m68k*-*-uclinux*): New target.
9621 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
9622 (linux_resume_one_process): Remove extraneous cast.
9623 (linux_read_offsets): New.
9624 (linux_target_op): Add linux_read_offsets on mmuless systems.
9625 * server.c (handle_query): Add qOffsets logic.
9626 * target.h (struct target_ops): Add read_offsets.
9627
21b0f40c
DJ
96282006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
9629
9630 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
9631 (PTRACE_GET_THREAD_AREA): Define.
9632 (ps_get_thread_area): New function.
9633 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
9634 (linux-x86-64-low.o): Update.
9635
0050a760
DJ
96362006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
9637
9638 * configure.ac: Remove checks for prfpregset_t.
9639 * gdb_proc_service.h: New file.
9640 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
9641 new "gdb_proc_service.h".
9642 * proc-service.c: Likewise.
9643 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
9644 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
9645 * Makefile.in (gdb_proc_service_h): Updated.
9646 * configure, config.in: Regenerated.
9647
b92a518e
DJ
96482006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
9649
9650 * remote-utils.c (prepare_resume_reply): Move declaration
9651 of gdb_id_from_wait to the top of the block.
9652
545587ee
DJ
96532006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
9654
9655 * linux-low.c (regsets_store_inferior_registers): Read the regset
9656 from the target before filling it.
9657
9db87ebd
DJ
96582006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
9659
9660 * server.c (attach_inferior): Return SIGTRAP for a successful
9661 attach.
9662
dd24457d
DJ
96632006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
9664
9665 * Makefile.in (OBS): Add version.o.
9666 (STAGESTUFF): Delete.
9667 (version.o): Add dependencies.
9668 (version.c): Replace rule.
9669 (clean): Remove version.c.
9670 * server.c (gdbserver_version): New.
9671 (gdbserver_usage): Use printf.
9672 (main): Handle --version and --help.
9673 * server.h (version, host_name): Add declarations.
9674
6f0f660e
EZ
96752005-12-23 Eli Zaretskii <eliz@gnu.org>
9676
889bf7c5
PA
9677 * linux-arm-low.c:
9678 * linux-arm-low.c:
9679 * inferiors.c:
9680 * i387-fp.h:
9681 * i387-fp.c:
9682 * gdbreplay.c:
9683 * regcache.c:
9684 * proc-service.c:
9685 * mem-break.h:
9686 * mem-break.c:
9687 * linux-x86-64-low.c:
9688 * linux-sh-low.c:
9689 * linux-s390-low.c:
9690 * linux-ppc64-low.c:
9691 * linux-ppc-low.c:
9692 * linux-mips-low.c:
9693 * linux-m68k-low.c:
9694 * linux-m32r-low.c:
9695 * linux-low.h:
9696 * linux-low.c:
9697 * linux-ia64-low.c:
9698 * linux-i386-low.c:
9699 * linux-crisv32-low.c:
9700 * thread-db.c:
9701 * terminal.h:
9702 * target.h:
9703 * target.c:
9704 * server.h:
9705 * server.c:
9706 * remote-utils.c:
9707 * regcache.h:
9708 * utils.c:
9709 * Makefile.in:
9710 * configure.ac:
6f0f660e
EZ
9711 * gdbserver.1: Add (C) after Copyright. Update the FSF
9712 address.
9713
9d1fb177
DJ
97142005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
9715
9716 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
9717 (arm_breakpoint_at): Recognize both breakpoints.
9718 (the_low_target): Use the correct breakpoint instruction.
9719
011a70c2
DJ
97202005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
9721
9722 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
9723 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
9724 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
9725 (the_low_target): Update.
9726
7fb85e41
AS
97272005-10-25 Andreas Schwab <schwab@suse.de>
9728
9729 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
9730
9731 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
9732 (ia64_num_regs): Reduce to 462.
9733
3db0444b
DJ
97342005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
9735
9736 * acinclude.m4: Correct quoting.
9737 * aclocal.m4: Regenerated.
9738
9739 Suggested by SZOKOVACS Robert <szo@ies.hu>:
9740 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
9741 (thread_db_init): Call thread_db_err_str.
9742 * configure.ac: Check for TD_VERSION.
9743 * config.in, configure: Regenerated.
9744
bee0189a
DJ
97452005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9746
9747 * server.h (error, fatal, warning): Add ATTR_FORMAT.
9748
e9d25b98
DJ
97492005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
9750
9751 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
9752 is not available. Define HAVE_PTRACE_GETREGS if it is.
9753 * config.in, configure: Regenerated.
9754 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
9755 * linux-i386-low.c, linux-m68k-low.c: Update to use
9756 HAVE_PTRACE_GETREGS.
9757 * linux-low.c (regsets_fetch_inferior_registers)
9758 (regsets_store_inferior_registers): Only return 0 if we processed
9759 GENERAL_REGS.
9760 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
9761 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
9762
a06660f7
DJ
97632005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
9764
9765 * inferiors.c (struct thread_info): Add gdb_id.
9766 (add_thread): Add gdb_id argument.
9767 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
9768 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
9769 calls to add_thread.
9770 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
9771 * server.c (handle_query): Use thread_to_gdb_id.
9772 (handle_v_cont, main): Use gdb_id_to_thread_id.
9773 * server.h (add_thread): Update prototype.
9774 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
9775 prototypes.
9776
5a1f5858
DJ
97772005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
9778
9779 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
9780 left-padded registers.
9781 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
9782 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
9783
e122f1f5
SE
97842005-07-01 Steve Ellcey <sje@cup.hp.com>
9785
9786 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
9787 * configure: Regenerate.
9788 * config.in: Regenerate.
9789 * server.h (NEED_DECLARATION_STRERROR):
9790 Replace with !HAVE_DECL_STRERROR.
9791
d592fa2f
DJ
97922005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
9793
9794 * linux-low.c (linux_wait, linux_send_signal): Don't test
9795 an unsigned long variable for > 0 if it could be MAX_ULONG.
9796 * server.c (myresume): Likewise.
9797 * target.c (set_desired_inferior): Likewise.
9798
ccbd4912
MK
97992005-06-13 Mark Kettenis <kettenis@gnu.org>
9800
9801 * configure.ac: Simplify and improve check for socklen_t.
9802 * configure, config.in: Regenerate.
9803
f450004a
DJ
98042005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
9805
9806 * acconfig.h: Remove.
9807 * configure.ac: Add a test for socklen_t. Use three-argument
9808 AC_DEFINE throughout.
9809 * config.in: Regenerated using autoheader 2.59.
9810 * configure: Regenerated.
9811
9812 * gdbreplay.c (socklen_t): Provide a default.
9813 (remote_open): Use socklen_t.
9814 * remote-utils.c (socklen_t): Provide a default.
9815 (remote_open): Use socklen_t.
9816 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
9817 unsigned char.
9818
9819 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
9820 char for buffers.
9821 * linux-low.c (linux_read_memory, linux_write_memory)
9822 (linux_read_auxv): Likewise.
9823 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
9824 (check_mem_write): Likewise.
9825 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
9826 Likewise.
9827 * regcache.c (struct inferior_rgcache_data, registers_to_string)
9828 (registers_from_string, register_data): Likewise.
9829 * server.c (handle_query, main): Likewise.
9830 * server.h (convert_ascii_to_int, convert_int_to_ascii)
9831 (decode_M_packet): Likewise.
9832 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
9833 * target.h (struct target_ops): Update read_memory, write_memory,
9834 and read_auxv.
9835 (read_inferior_memory, write_inferior_memory): Update.
9836 * linux-low.h (struct linux_target_ops): Change type of breakpoint
9837 to unsigned char *.
9838 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
9839 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
9840 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
9841 linux-s390-low.c, linux-sh-low.c: Update for changes in
9842 read_inferior_memory and the_low_target->breakpoint.
9843
eee84df1
DJ
98442005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
9845
9846 * Makefile.in (SFILES): Add linux-ppc64-low.c.
9847 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
9848 * configure.srv: Add powerpc64-*-linux*.
9849 * linux-ppc64-low.c: New file.
9850
45b134e5
OF
98512005-05-23 Orjan Friberg <orjanf@axis.com>
9852
9853 * linux-cris-low.c: New file with support for CRIS.
9854 * linux-crisv32-low.c: Ditto for CRISv32.
9855 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
9856 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 9857 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
9858 reg-crisv32.o, and reg-crisv32.c to make rules.
9859 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
9860 recognized targets.
9861
48d93c75
UW
98622005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
9863
9864 * linux-low.c (fetch_register): Ensure buffer size is a multiple
9865 of sizeof (PTRACE_XFER_TYPE).
9866 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
9867
e013ee27
OF
98682005-05-12 Orjan Friberg <orjanf@axis.com>
9869
889bf7c5 9870 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
9871 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
9872 pointers for hardware watchpoint support.
9873 * linux-low.h (struct linux_target_ops): Ditto.
9874 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
9875 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
9876 to linux_target_ops.
9877 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
9878 reply packet.
9879 * server.c (main): Recognize 'Z' and 'z' packets.
9880
b0ded00b
UW
98812005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
9882
9883 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
9884 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
9885 (the_low_target): Add new members.
9886
8643e2ad
DJ
98872005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
9888
9889 * proc-service.c (ps_lgetregs): Search all_processes instead of
9890 all_threads.
9891
fc620387
DJ
98922005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
9893
9894 * server.c (start_inferior): Change return type to int.
9895 (attach_inferior): Change sigptr to int *.
9896 (handle_v_cont, handle_v_requests): Change signal to int *.
9897 (main): Change signal to int.
9898
98992005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
9900
9901 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
9902 * configure.srv: Add m32r*-*-linux*.
9903 * linux-m32r-low.c: New file.
9904
e0e76420
DJ
99052005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
9906
9907 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
9908
a1928bad
DJ
99092005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
9910
9911 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
9912 Take unsigned long arguments for PIDs.
9913 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
9914 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
9915 (wait_for_sigstop, linux_resume_one_process)
9916 (regsets_fetch_inferior_registers, linux_send_signal)
9917 (linux_read_auxv): Likewise. Update the types of variables holding
9918 PIDs. Update format string specifiers.
9919 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
9920 * remote-utils.c (prepare_resume_reply): Likewise.
9921 * server.c (cont_thread, general_thread, step_thread)
9922 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
9923 unsigned long.
9924 (handle_query): Update format specifiers.
9925 (handle_v_cont, main): Use strtoul for thread IDs.
9926 * server.h (struct inferior_list_entry): Use unsigned long for ID.
9927 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
9928 (general_thread, step_thread, thread_from_wait)
9929 (old_thread_from_wait): Update.
9930 * target.h (struct thread_resume): Use unsigned long for THREAD.
9931 (struct target_ops): Use unsigned long for arguments to attach and
9932 thread_alive.
9933
dcdb98d2
DJ
99342005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
9935
9936 * acinclude.m4: Include bfd/bfd.m4 directly.
9937 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
9938 <agriffis@toolchain.org>.
9939 * aclocal.m4, configure: Regenerated.
9940
bec39cab
AC
99412005-01-07 Andrew Cagney <cagney@gnu.org>
9942
9943 * configure.ac: Rename configure.in, require autoconf 2.59.
9944 * configure: Re-generate.
9945
434c4c77
DJ
99462004-12-08 Daniel Jacobowitz <dan@debian.org>
9947
9948 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
9949 LIBS when finished.
9950 * aclocal.m4: Regenerated.
9951 * configure: Regenerated.
9952
db1d3e1b
AS
99532004-11-21 Andreas Schwab <schwab@suse.de>
9954
9955 * linux-m68k-low.c (m68k_num_gregs): Define.
9956 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
9957 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
9958 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
9959 (m68k_breakpoint_at): New. Add to the_low_target.
9960
9961 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
9962 srv_linux_thread_db to yes.
9963
43360365
JB
99642004-10-20 Joel Brobecker <brobecker@gnat.com>
9965
9966 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
9967 (ARCH_SET_FS): Likewise.
9968 (ARCH_GET_FS): Likewise.
9969 (ARCH_GET_GS): Likewise.
9970
fd500816
DJ
99712004-10-16 Daniel Jacobowitz <dan@debian.org>
9972
9973 * linux-i386-low.c (ps_get_thread_area): New.
9974 * linux-x86-64-low.c (ps_get_thread_area): New.
9975 * linux-low.c: Include <sys/syscall.h>.
9976 (linux_kill_one_process): Don't kill the first thread here.
9977 (linux_kill): Kill the first thread here.
9978 (kill_lwp): New function.
9979 (send_sigstop, linux_send_signal): Use it.
9980 * proc-service.c: Clean up #ifdefs.
9981 (fpregset_info): Delete.
9982 (ps_lgetregs): Update and enable implementation.
9983 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
9984 implementations.
9985 * remote-utils.c (struct sym_cache, symbol_cache): New.
9986 (input_interrupt): Print a clearer message.
9987 (async_io_enabled): New variable.
9988 (enable_async_io, disable_async_io): Use it. Update comments.
9989 (look_up_one_symbol): Use the symbol cache.
9990 * thread-db.c (thread_db_look_up_symbols): New function.
9991 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
9992
f6de3c42
DJ
99932004-10-16 Daniel Jacobowitz <dan@debian.org>
9994
9995 * configure.in: Test for -rdynamic.
9996 * configure: Regenerated.
9997 * Makefile (INTERNAL_LDFLAGS): New.
9998 (gdbserver, gdbreplay): Use it.
9999
2c0fc042
AC
100002004-09-02 Andrew Cagney <cagney@gnu.org>
10001
10002 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
10003
075b3282
DJ
100042004-03-23 Daniel Jacobowitz <drow@mvista.com>
10005
10006 * linux-low.c (linux_wait): Clear all_processes list also.
10007
fa6a77dc
DJ
100082004-03-12 Daniel Jacobowitz <drow@mvista.com>
10009
10010 * linux-low.c: Include <errno.h>. Remove extern declaration of
10011 errno.
10012
6d782a97
DJ
100132004-03-12 Daniel Jacobowitz <drow@mvista.com>
10014
10015 * gdbreplay.c, server.h, utils.c: Update copyright years.
10016
3a7fb99b
DJ
100172004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
10018
10019 * server.c (main): Print child status or termination signal from
10020 variable 'signal', not 'sig'.
10021
c3e735a6
DJ
100222004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
10023
10024 * linux-low.c (linux_read_memory): Change return type to
10025 int. Check for and return error from ptrace().
10026 * target.c (read_inferior_memory): Change return type to int. Pass
10027 back return status from the_target->read_memory().
10028 * target.h (struct target_ops): Adapt *read_memory() prototype.
10029 Update comment.
10030 (read_inferior_memory): Adapt prototype.
10031 * server.c (main): Return an error packet if
10032 read_inferior_memory() returns an error.
10033
a59d1c82
DJ
100342004-03-04 Daniel Jacobowitz <drow@mvista.com>
10035
10036 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
10037 Unify with other clean targets.
10038
dc3f8883
DJ
100392004-02-29 Daniel Jacobowitz <drow@mvista.com>
10040
10041 * server.c (handle_v_cont): Call set_desired_inferior.
10042
89a208da
DJ
100432004-02-29 Daniel Jacobowitz <drow@mvista.com>
10044
10045 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
10046
62ea82f5
DJ
100472004-02-29 Daniel Jacobowitz <drow@mvista.com>
10048
10049 * linux-low.c (linux_wait): Unblock async I/O.
10050 (linux_resume): Block and enable async I/O.
10051 * remote-utils.c (block_async_io, unblock_async_io): New functions.
10052 * server.h (block_async_io, unblock_async_io): Add prototypes.
10053
6910d122
DJ
100542004-02-29 Daniel Jacobowitz <drow@mvista.com>
10055
10056 * remote-utils.c (remote_open): Print a status notice after
10057 opening a TCP port.
10058 * server.c (attach_inferior): Print a status notice after
10059 attaching.
10060
100612004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
10062
10063 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
10064
c89dc5d4
DJ
100652004-02-26 Daniel Jacobowitz <drow@mvista.com>
10066
10067 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
10068 error packet.
10069 * server.c, target.h: Update copyright years.
10070
4b8dad4a
RM
100712004-02-25 Roland McGrath <roland@redhat.com>
10072
10073 * target.h (struct target_ops): New member `read_auxv'.
10074 * server.c (handle_query): Handle qPart:auxv:read: query using that.
10075 * linux-low.c (linux_read_auxv): New function.
10076 (linux_target_ops): Initialize `read_auxv' member to that.
10077
d7446758
JB
100782004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
10079
10080 Committed by Jim Blandy <jimb@redhat.com>.
10081
10082 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 10083 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
10084 instead of GPR_SIZE to distiguish s390 and s390x targets.
10085
5544ad89
DJ
100862004-01-31 Daniel Jacobowitz <drow@mvista.com>
10087
10088 * linux-low.c: Update copyright year.
10089 (check_removed_breakpoint): Clear pending_is_breakpoint.
10090 (linux_set_resume_request, linux_queue_one_thread)
10091 (resume_status_pending_p): New functions.
10092 (linux_continue_one_thread): Use process->resume.
10093 (linux_resume): Only resume threads if there are no pending events.
10094 * linux-low.h (struct process_info): Add resume request
10095 pointer.
10096
2a68b70e
DJ
100972004-01-30 Daniel Jacobowitz <drow@mvista.com>
10098
10099 * regcache.c (new_register_cache): Clear the allocated register
10100 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
10101
64386c31
DJ
101022003-10-13 Daniel Jacobowitz <drow@mvista.com>
10103
10104 * linux-low.c (linux_resume): Take a struct thread_resume *
10105 argument.
10106 (linux_wait): Update call.
10107 (resume_ptr): New static variable.
10108 (linux_continue_one_thread): Renamed from
10109 linux_continue_one_process. Use resume_ptr.
10110 (linux_resume): Use linux_continue_one_thread.
10111 * server.c (handle_v_cont, handle_v_requests): New functions.
10112 (myresume): New function.
10113 (main): Handle 'v' case.
10114 * target.h (struct thread_resume): New type.
10115 (struct target_ops): Change argument of "resume" to struct
10116 thread_resume *.
10117 (myresume): Delete macro.
10118
c938e9b0
L
101192003-08-08 H.J. Lu <hongjiu.lu@intel.com>
10120
10121 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
10122 (uninstall): Support DESTDIR.
10123
7f313d07
BC
10124Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
10125
10126 * configure.srv: Add xscale*linux copy of arm*linux entry.
10127
3b2fc2ea
DJ
101282003-07-24 Daniel Jacobowitz <drow@mvista.com>
10129
10130 * linux-arm-low.c (arm_reinsert_addr): New function.
10131 (the_low_target): Add arm_reinsert_addr.
10132
1c0a559e
MK
101332003-07-08 Mark Kettenis <kettenis@gnu.org>
10134
10135 * mem-break.c: Remove whitespace at end of file.
10136
43d5792c
DJ
101372003-06-28 Daniel Jacobowitz <drow@mvista.com>
10138
10139 * configure.in: Check whether we need to prototype strerror.
10140 * server.h: Optionally prototype strerror.
10141 * gdbreplay.c (perror_with_name): Use strerror.
10142 * linux-low.c (linux_attach_lwp): Use strerror.
10143 * utils.c (perror_with_name): Use strerror.
10144 * config.in, configure: Regenerated.
10145
c8a86edf
DJ
101462003-06-28 Daniel Jacobowitz <drow@mvista.com>
10147
10148 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
10149 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
10150
73d37363
DJ
101512003-06-20 Daniel Jacobowitz <drow@mvista.com>
10152
10153 * Makefile.in (SFILES): Update.
10154 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
10155 low-sun3.c: Remove files.
10156
6ad8ae5c
DJ
101572003-06-17 Daniel Jacobowitz <drow@mvista.com>
10158
10159 * linux-low.c: Move comment to linux_thread_alive where it belonged.
10160 (linux_detach_one_process, linux_detach): New functions.
10161 (linux_target_ops): Add linux_detach.
10162 * server.c (main): Handle 'D' packet.
10163 * target.h (struct target_ops): Add "detach" member.
10164 (detach_inferior): Define.
10165
1581182a
MK
101662003-06-13 Mark Kettenis <kettenis@gnu.org>
10167
10168 From Kelley Cook <kelleycook@wideopenwest.com>:
10169 * configure.srv: Accept i[34567]86 variants.
10170
e5379b03
DJ
101712003-06-05 Daniel Jacobowitz <drow@mvista.com>
10172
10173 * linux-low.c (linux_wait_for_event): Correct comment typos.
10174 (linux_resume_one_process): Call check_removed_breakpoint.
10175 (linux_send_signal): New function.
10176 (linux_target_ops): Add linux_send_signal.
10177 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
10178 of kill.
10179 * target.h (struct target_ops): Add send_signal.
10180
2ff29de4
JB
101812003-05-29 Jim Blandy <jimb@redhat.com>
10182
10183 * linux-low.c (usr_store_inferior_registers): Transfer buf in
10184 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
10185 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
10186 away part of the register's value.
10187
254787d4
DJ
101882003-03-26 Daniel Jacobowitz <drow@mvista.com>
10189
10190 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
10191 (linux_wait_for_event, linux_init_signals): Likewise.
10192
94e10508
DJ
101932003-03-17 Daniel Jacobowitz <drow@mvista.com>
10194
10195 * configure.in: Check for stdlib.h.
10196 * configure: Regenerated.
10197 * config.in: Regenerated.
10198
4c0711e0
DJ
101992003-01-04 Andreas Schwab <schwab@suse.de>
10200
10201 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
10202
ef66e766
AC
102032003-01-02 Andrew Cagney <ac131313@redhat.com>
10204
10205 * Makefile.in: Remove obsolete code.
10206
a1358604
DJ
102072002-11-20 Daniel Jacobowitz <drow@mvista.com>
10208
10209 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
10210 defined(PT_FPR0_HI).
10211
23ce3b1c
DJ
102122002-11-17 Stuart Hughes <seh@zee2.com>
10213
10214 * linux-arm-low.c (arm_num_regs): Increase.
10215 (arm_regmap): Include status register.
10216
102172002-11-17 Daniel Jacobowitz <drow@mvista.com>
10218
10219 * linux-low.c (register_addr): Remove incorrect -1 check.
10220
a9fa9f7d
DJ
102212002-08-29 Daniel Jacobowitz <drow@mvista.com>
10222
10223 * linux-low.c (linux_create_inferior): Call setpgid. Return
10224 the new PID.
10225 (unstopped_p, linux_signal_pid): Remove.
10226 (linux_target_ops): Remove linux_signal_pid.
10227 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
10228 global instead of target method.
10229 * target.h (struct target_ops): Remove signal_pid. Update comment
10230 for create_inferior.
10231 * server.c (signal_pid): New variable.
10232 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 10233 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
10234 (attach_inferior): Set signal_pid.
10235
17574093
DJ
102362002-08-23 Daniel Jacobowitz <drow@mvista.com>
10237
10238 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
10239
102402002-08-20 Jim Blandy <jimb@redhat.com>
10241
10242 * Makefile.in (LDFLAGS): Allow the configure script to establish a
10243 default for this.
10244
102452002-08-01 Andrew Cagney <cagney@redhat.com>
10246
10247 * Makefile.in: Make chill references obsolete.
10248
102492002-07-24 Kevin Buettner <kevinb@redhat.com>
10250
10251 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
10252 * configure: Regenerate.
10253 * config.in: Regenerate.
10254
102552002-07-09 David O'Brien <obrien@FreeBSD.org>
10256
10257 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
10258 (perror_with_name, remote_close, remote_open, expect, play): Static.
10259
102602002-07-04 Michal Ludvig <mludvig@suse.cz>
10261
4b8dad4a 10262 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
10263 byte offsets instead of an array of indexes.
10264 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
10265
102662002-06-13 Daniel Jacobowitz <drow@mvista.com>
10267
10268 * regcache.c: Add comment.
10269
102702002-06-11 Daniel Jacobowitz <drow@mvista.com>
10271
10272 * thread-db.c: New file.
10273 * proc-service.c: New file.
10274 * acinclude.m4: New file.
10275 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
10276 proc-service.o, and thread-db.o.
10277 (linux-low.o): Add USE_THREAD_DB.
10278 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
10279 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
10280 * aclocal.m4: Regenerated.
10281 * config.in: Regenerated.
10282 * configure: Regenerated.
10283 * configure.in: Check for proc_service.h, sys/procfs.h,
10284 thread_db.h, and linux/elf.h headrs.
10285 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
10286 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
10287 Check for -lthread_db and thread support.
10288 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
10289 PowerPC, and SuperH.
10290 * i387-fp.c: Constify arguments.
10291 * i387-fp.h: Likewise.
10292 * inferiors.c: (struct thread_info): Renamed from
10293 `struct inferior_info'. Remove PID member. Use generic inferior
10294 list header. All uses updated.
10295 (inferiors, signal_pid): Removed.
10296 (all_threads): New variable.
10297 (get_thread): Define.
10298 (add_inferior_to_list): New function.
10299 (for_each_inferior): New function.
10300 (change_inferior_id): New function.
10301 (add_inferior): Removed.
10302 (remove_inferior): New function.
10303 (add_thread): New function.
10304 (free_one_thread): New function.
10305 (remove_thread): New function.
10306 (clear_inferiors): Use for_each_inferior and free_one_thread.
10307 (find_inferior): New function.
10308 (find_inferior_id): New function.
10309 (inferior_target_data): Update argument type.
10310 (set_inferior_target_data): Likewise.
10311 (inferior_regcache_data): Likewise.
10312 (set_inferior_regcache_data): Likewise.
10313 * linux-low.c (linux_bp_reinsert): Remove.
10314 (all_processes, stopping_threads, using_thrads)
10315 (struct pending_signals, debug_threads, pid_of): New.
10316 (inferior_pid): Replace with macro.
10317 (struct inferior_linux_data): Remove.
10318 (get_stop_pc, add_process): New functions.
10319 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
10320 Use add_process and add_thread.
10321 (linux_attach_lwp): New function, based on old linux_attach. Use
10322 add_process and add_thread. Set stop_expected for new threads.
10323 (linux_attach): New function.
10324 (linux_kill_one_process): New function.
10325 (linux_kill): Kill all LWPs.
10326 (linux_thread_alive): Use find_inferior_id.
10327 (check_removed_breakpoints, status_pending_p): New functions.
10328 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
10329 Update. Use WNOHANG. Wait for cloned processes also. Update process
10330 struct for the found process.
10331 (linux_wait_for_event): New function.
10332 (linux_wait): Use it. Support LWPs.
10333 (send_sigstop, wait_for_sigstop, stop_all_processes)
10334 (linux_resume_one_process, linux_continue_one_process): New functions.
10335 (linux_resume): Support LWPs.
10336 (REGISTER_RAW_SIZE): Remove.
10337 (fetch_register): Use register_size instead. Call supply_register.
10338 (usr_store_inferior_registers): Likewise. Call collect_register.
10339 Fix recursive case.
10340 (regsets_fetch_inferior_registers): Improve error message.
10341 (regsets_store_inferior_registers): Add debugging.
10342 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
10343 (unstopped_p, linux_signal_pid): New functions.
10344 (linux_target_ops): Add linux_signal_pid.
10345 (linux_init_signals): New function.
10346 (initialize_low): Call it. Initialize using_threads.
10347 * regcache.c (inferior_regcache_data): Add valid
10348 flag.
10349 (get_regcache): Fetch registers lazily. Add fetch argument
10350 and update all callers.
10351 (regcache_invalidate_one, regcache_invalidate): New
10352 functions.
10353 (new_register_cache): Renamed from create_register_cache.
10354 Return the new regcache.
10355 (free_register_cache): Change argument to a void *.
10356 (registers_to_string, registers_from_string): Call get_regcache
10357 with fetch flag set.
10358 (register_data): Make static. Pass fetch flag to get_regcache.
10359 (supply_register): Call get_regcache with fetch flag clear.
10360 (collect_register): Call get_regcache with fetch flag set.
10361 (collect_register_as_string): New function.
10362 * regcache.h: Update.
10363 * remote-utils.c (putpkt): Flush after debug output and use
10364 stderr.
10365 Handle input interrupts while waiting for an ACK.
10366 (input_interrupt): Use signal_pid method.
10367 (getpkt): Flush after debug output and use stderr.
10368 (outreg): Use collect_register_as_string.
10369 (new_thread_notify, dead_thread_notify): New functions.
10370 (prepare_resume_reply): Check using_threads. Set thread_from_wait
10371 and general_thread.
10372 (look_up_one_symbol): Flush after debug output.
10373 * server.c (step_thread, server_waiting): New variables.
10374 (start_inferior): Don't use signal_pid. Update call to mywait.
10375 (attach_inferior): Update call to mywait.
10376 (handle_query): Handle qfThreadInfo and qsThreadInfo.
10377 (main): Don't fetch/store registers explicitly. Use
10378 set_desired_inferior. Support proposed ``Hs'' packet. Update
10379 calls to mywait.
10380 * server.h: Update.
10381 (struct inferior_list, struct_inferior_list_entry): New.
10382 * target.c (set_desired_inferior): New.
10383 (write_inferior_memory): Constify.
10384 (mywait): New function.
10385 * target.h: Update.
10386 (struct target_ops): New signal_pid method.
10387 (mywait): Removed macro, added prototype.
10388
10389 * linux-low.h (regset_func): Removed.
10390 (regset_fill_func, regset_store_func): New.
10391 (enum regset_type): New.
10392 (struct regset_info): Add type field. Use new operation types.
10393 (struct linux_target_ops): stop_pc renamed to get_pc.
10394 Add decr_pc_after_break and breakpoint_at.
10395 (get_process, get_thread_proess, get_process_thread)
10396 (strut process_info, all_processes, linux_attach_lwp)
10397 (thread_db_init): New.
10398
10399 * linux-arm-low.c (arm_get_pc, arm_set_pc,
10400 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
10401 (the_low_target): Add new members.
10402 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
10403 (i386_store_fpxregset): Constify.
10404 (target_regsets): Add new kind identifier.
10405 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
10406 (i386_set_pc): Add debugging.
10407 (i386_breakpoint_at): New function.
10408 (the_low_target): Add new members.
10409 * linux-mips-low.c (mips_get_pc, mips_set_pc)
10410 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
10411 (mips_breakpoint_at): New.
10412 (the_low_target): Add new members.
10413 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
10414 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
10415 (the_low_target): Add new members.
10416 * linux-sh-low.c (sh_get_pc, sh_set_pc)
10417 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
10418 (the_low_target): Add new members.
10419 * linux-x86-64-low.c (target_regsets): Add new kind
10420 identifier.
10421
104222002-05-15 Daniel Jacobowitz <drow@mvista.com>
10423
10424 From Martin Pool <mbp@samba.org>:
10425 * server.c (gdbserver_usage): New function.
10426 (main): Call it.
10427
104282002-05-14 Daniel Jacobowitz <drow@mvista.com>
10429
10430 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
10431 stop_at -> stop_pc.
10432
104332002-05-04 Andrew Cagney <ac131313@redhat.com>
10434
10435 * Makefile.in: Remove obsolete code.
10436
104372002-04-24 Michal Ludvig <mludvig@suse.cz>
10438
10439 * linux-low.c (regsets_fetch_inferior_registers),
10440 (regsets_store_inferior_registers): Removed cast to int from
10441 ptrace() calls.
10442 * regcache.h: Added declaration of struct inferior_info.
10443
104442002-04-20 Daniel Jacobowitz <drow@mvista.com>
10445
10446 * inferiors.c (struct inferior_info): Add regcache_data.
10447 (add_inferior): Call create_register_cache.
10448 (clear_inferiors): Call free_register_cache.
10449 (inferior_regcache_data, set_inferior_regcache_data): New functions.
10450 * regcache.c (struct inferior_regcache_data): New.
10451 (registers): Remove.
10452 (get_regcache): New function.
10453 (create_register_cache, free_register_cache): New functions.
10454 (set_register_cache): Don't initialize the register cache here.
10455 (registers_to_string, registers_from_string, register_data): Call
10456 get_regcache.
10457 * regcache.h: Add prototypes.
10458 * server.h: Likewise.
10459
104602002-04-20 Daniel Jacobowitz <drow@mvista.com>
10461
10462 * mem-break.c: New file.
10463 * mem-break.h: New file.
10464 * Makefile.in: Add mem-break.o rule; update server.h
10465 dependencies.
10466 * inferiors.c (struct inferior_info): Add target_data
10467 member.
10468 (clear_inferiors): Free target_data member if set.
10469 (inferior_target_data, set_inferior_target_data): New functions.
10470 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
10471 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
10472 * linux-low.c (linux_bp_reinsert): New variable.
10473 (struct inferior_linux_data): New.
10474 (linux_create_inferior): Use set_inferior_target_data.
10475 (linux_attach): Likewise. Call add_inferior.
10476 (linux_wait_for_one_inferior): New function.
10477 (linux_wait): Call it.
10478 (linux_write_memory): Add const.
10479 (initialize_low): Call set_breakpoint_data.
10480 * linux-low.h (struct linux_target_ops): Add breakpoint
10481 handling members.
10482 * server.c (attach_inferior): Remove extra add_inferior
10483 call.
10484 * server.h: Include mem-break.h. Update inferior.c
10485 prototypes.
10486 * target.c (read_inferior_memory)
10487 (write_inferior_memory): New functions.
10488 * target.h (read_inferior_memory)
10489 (write_inferior_memory): Change macros to prototypes.
10490 (struct target_ops): Update comments. Add const to write_memory
10491 definition.
10492
104932002-04-11 Daniel Jacobowitz <drow@mvista.com>
10494
10495 * linux-low.c (usr_store_inferior_registers): Support
10496 registers which are allowed to fail to store.
10497 * linux-low.h (linux_target_ops): Likewise.
10498 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
10499 (ppc_cannot_store_register): FPSCR may not be storable.
10500
105012002-04-09 Daniel Jacobowitz <drow@mvista.com>
10502
10503 * server.h: Include <string.h> if HAVE_STRING_H.
10504 * ChangeLog: Correct paths in last ChangeLog entry.
10505
105062002-04-09 Daniel Jacobowitz <drow@mvista.com>
10507
10508 * linux-low.h: Remove obsolete prototypes.
10509 (struct linux_target_ops): New.
10510 (extern the_low_target): New.
10511 * linux-low.c (num_regs, regmap): Remove declarations.
10512 (register_addr): Use the_low_target explicitly.
10513 (fetch_register): Likewise.
10514 (usr_fetch_inferior_registers): Likewise.
10515 (usr_store_inferior_registers): Likewise.
10516 * linux-arm-low.c (num_regs): Remove.
10517 (arm_num_regs): Define.
10518 (arm_regmap): Renamed from regmap, made static.
10519 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
10520 made static.
10521 (arm_cannot_store_register): Renamed from cannot_store_register,
10522 made static.
10523 (the_low_target): New.
10524 * linux-i386-low.c (num_regs): Remove.
10525 (i386_num_regs): Define.
10526 (i386_regmap): Renamed from regmap, made static.
10527 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
10528 made static.
10529 (i386_cannot_store_register): Renamed from cannot_store_register,
10530 made static.
10531 (the_low_target): New.
10532 * linux-ia64-low.c (num_regs): Remove.
10533 (ia64_num_regs): Define.
10534 (ia64_regmap): Renamed from regmap, made static.
10535 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
10536 made static.
10537 (ia64_cannot_store_register): Renamed from cannot_store_register,
10538 made static.
10539 (the_low_target): New.
10540 * linux-m68k-low.c (num_regs): Remove.
10541 (m68k_num_regs): Define.
10542 (m68k_regmap): Renamed from regmap, made static.
10543 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
10544 made static.
10545 (m68k_cannot_store_register): Renamed from cannot_store_register,
10546 made static.
10547 (the_low_target): New.
10548 * linux-mips-low.c (num_regs): Remove.
10549 (mips_num_regs): Define.
10550 (mips_regmap): Renamed from regmap, made static.
10551 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
10552 made static.
10553 (mips_cannot_store_register): Renamed from cannot_store_register,
10554 made static.
10555 (the_low_target): New.
10556 * linux-ppc-low.c (num_regs): Remove.
10557 (ppc_num_regs): Define.
10558 (ppc_regmap): Renamed from regmap, made static.
10559 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
10560 made static.
10561 (ppc_cannot_store_register): Renamed from cannot_store_register,
10562 made static.
10563 (the_low_target): New.
10564 * linux-s390-low.c (num_regs): Remove.
10565 (s390_num_regs): Define.
10566 (s390_regmap): Renamed from regmap, made static.
10567 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
10568 made static.
10569 (s390_cannot_store_register): Renamed from cannot_store_register,
10570 made static.
10571 (the_low_target): New.
10572 * linux-sh-low.c (num_regs): Remove.
10573 (sh_num_regs): Define.
10574 (sh_regmap): Renamed from regmap, made static.
10575 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
10576 made static.
10577 (sh_cannot_store_register): Renamed from cannot_store_register,
10578 made static.
10579 (the_low_target): New.
10580 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
10581 (the_low_target): New.
10582
105832002-04-09 Daniel Jacobowitz <drow@mvista.com>
10584
10585 * Makefile.in: Add stamp-h target.
10586 * configure.in: Create stamp-h.
10587 * configure: Regenerated.
10588
105892002-04-09 Daniel Jacobowitz <drow@mvista.com>
10590
10591 * inferiors.c: New file.
10592 * target.c: New file.
10593 * target.h: New file.
10594 * Makefile.in: Add target.o and inferiors.o. Update
10595 dependencies.
10596 * linux-low.c (inferior_pid): New static variable,
10597 moved from server.c.
10598 (linux_create_inferior): Renamed from create_inferior.
10599 Call add_inferior. Return 0 on success instead of a PID.
10600 (linux_attach): Renamed from myattach.
10601 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
10602 (linux_thread_alive): Renamed from mythread_alive.
10603 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
10604 child dies.
10605 (linux_resume): Renamed from myresume. Add missing ``return 0''.
10606 (regsets_store_inferior_registers): Correct error message.
10607 Add missing ``return 0''.
10608 (linux_fetch_registers): Renamed from fetch_inferior_registers.
10609 (linux_store_registers): Renamed from store_inferior_registers.
10610 (linux_read_memory): Renamed from read_inferior_memory.
10611 (linux_write_memory): Renamed from write_inferior_memory.
10612 (linux_target_ops): New structure.
10613 (initialize_low): Call set_target_ops ().
10614 * remote-utils.c (unhexify): New function.
10615 (hexify): New function.
10616 (input_interrupt): Send signals to ``signal_pid''.
10617 * server.c (inferior_pid): Remove.
10618 (start_inferior): Update create_inferior call.
10619 (attach_inferior): Call add_inferior.
10620 (handle_query): New function.
10621 (main): Call handle_query for `q' packets.
10622 * server.h: Include "target.h". Remove obsolete prototypes.
10623 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
10624
106252002-04-09 Daniel Jacobowitz <drow@mvista.com>
10626
10627 * Makefile.in: Add WARN_CFLAGS. Update configury
10628 dependencies.
10629 * configure.in: Check for <string.h>
10630 * configure: Regenerate.
10631 * config.in: Regenerate.
10632 * gdbreplay.c: Include needed system headers.
10633 (remote_open): Remove strchr prototype.
10634 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
10635 * regcache.c (supply_register): Change buf argument to const void *.
10636 (supply_register_by_name): Likewise.
10637 (collect_register): Change buf argument to void *.
10638 (collect_register_by_name): Likewise.
10639 * regcache.h: Add missing prototypes.
10640 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
10641 * server.c (handle_query): New function.
10642 (attached): New static variable, moved out of main.
10643 (main): Quiet longjmp clobber warnings.
10644 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
10645 * utils.c (error): Remove NORETURN.
10646 (fatal): Likewise.
This page took 1.659225 seconds and 4 git commands to generate.